@arbocollab/arbo-web-people 0.1.85-alpha.11 → 0.1.85-alpha.12

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/cjs/index.cjs.js CHANGED
@@ -170,7 +170,7 @@ Component that was made reactive: `,t)),K6e(t,e,n,r,i,o,a,!0)}function Z6e(t){re
170
170
  *
171
171
  * Copyright 2006, 2015 Klaus Hartl & Fagner Brack
172
172
  * Released under the MIT license
173
- */var K7;function Mze(){return K7||(K7=1,function(t,e){(function(n){var r;if(t.exports=n(),r=!0,!r){var i=window.Cookies,a=window.Cookies=n();a.noConflict=function(){return window.Cookies=i,a}}})(function(){function n(){for(var a=0,o={};a<arguments.length;a++){var s=arguments[a];for(var l in s)o[l]=s[l]}return o}function r(a){return a.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}function i(a){function o(){}function s(c,f,h){if(!(typeof document>"u")){h=n({path:"/"},o.defaults,h),typeof h.expires=="number"&&(h.expires=new Date(new Date*1+h.expires*864e5)),h.expires=h.expires?h.expires.toUTCString():"";try{var p=JSON.stringify(f);/^[\{\[]/.test(p)&&(f=p)}catch{}f=a.write?a.write(f,c):encodeURIComponent(String(f)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),c=encodeURIComponent(String(c)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var g="";for(var y in h)h[y]&&(g+="; "+y,h[y]!==!0&&(g+="="+h[y].split(";")[0]));return document.cookie=c+"="+f+g}}function l(c,f){if(!(typeof document>"u")){for(var h={},p=document.cookie?document.cookie.split("; "):[],g=0;g<p.length;g++){var y=p[g].split("="),v=y.slice(1).join("=");!f&&v.charAt(0)==='"'&&(v=v.slice(1,-1));try{var b=r(y[0]);if(v=(a.read||a)(v,b)||r(v),f)try{v=JSON.parse(v)}catch{}if(h[b]=v,c===b)break}catch{}}return c?h[c]:h}}return o.set=s,o.get=function(c){return l(c,!1)},o.getJSON=function(c){return l(c,!0)},o.remove=function(c,f){s(c,"",n(f,{expires:-1}))},o.defaults={},o.withConverter=i,o}return i(function(){})})}(EN)),EN.exports}var Rze=Mze();const i_=h6(Rze),G7=300,jA=T_("snackbarStore",()=>{const t=re(void 0),e=(a,o)=>{const s=JSON.parse(JSON.stringify(a));s.bgColor=o?"#FF5200":"#02C39A",s.prefixIcon=o?"TriangleExclamation":"Check",t.value={...s,duration:s.duration||8e3}},n=RS(a=>{e(a,!0)},G7),r=RS(a=>{e(a,!1)},G7);return{contentSnackBar:t,hideSnackBar:()=>{t.value=void 0},showErrorSnackbar:n,showSuccessSnackbar:r}});var Yl=(t=>(t[t.CONTINUE=100]="CONTINUE",t[t.SWITCHING_PROTOCOLS=101]="SWITCHING_PROTOCOLS",t[t.PROCESSING=102]="PROCESSING",t[t.OK=200]="OK",t[t.CREATED=201]="CREATED",t[t.ACCEPTED=202]="ACCEPTED",t[t.NON_AUTHORITATIVE_INFORMATION=203]="NON_AUTHORITATIVE_INFORMATION",t[t.NO_CONTENT=204]="NO_CONTENT",t[t.RESET_CONTENT=205]="RESET_CONTENT",t[t.PARTIAL_CONTENT=206]="PARTIAL_CONTENT",t[t.MULTI_STATUS=207]="MULTI_STATUS",t[t.ALREADY_REPORTED=208]="ALREADY_REPORTED",t[t.IM_USED=226]="IM_USED",t[t.MULTIPLE_CHOICES=300]="MULTIPLE_CHOICES",t[t.MOVED_PERMANENTLY=301]="MOVED_PERMANENTLY",t[t.FOUND=302]="FOUND",t[t.SEE_OTHER=303]="SEE_OTHER",t[t.NOT_MODIFIED=304]="NOT_MODIFIED",t[t.USE_PROXY=305]="USE_PROXY",t[t.SWITCH_PROXY=306]="SWITCH_PROXY",t[t.TEMPORARY_REDIRECT=307]="TEMPORARY_REDIRECT",t[t.PERMANENT_REDIRECT=308]="PERMANENT_REDIRECT",t[t.BAD_REQUEST=400]="BAD_REQUEST",t[t.UNAUTHORIZED=401]="UNAUTHORIZED",t[t.PAYMENT_REQUIRED=402]="PAYMENT_REQUIRED",t[t.FORBIDDEN=403]="FORBIDDEN",t[t.NOT_FOUND=404]="NOT_FOUND",t[t.METHOD_NOT_ALLOWED=405]="METHOD_NOT_ALLOWED",t[t.NOT_ACCEPTABLE=406]="NOT_ACCEPTABLE",t[t.PROXY_AUTHENTICATION_REQUIRED=407]="PROXY_AUTHENTICATION_REQUIRED",t[t.REQUEST_TIMEOUT=408]="REQUEST_TIMEOUT",t[t.CONFLICT=409]="CONFLICT",t[t.GONE=410]="GONE",t[t.LENGTH_REQUIRED=411]="LENGTH_REQUIRED",t[t.PRECONDITION_FAILED=412]="PRECONDITION_FAILED",t[t.PAYLOAD_TOO_LARGE=413]="PAYLOAD_TOO_LARGE",t[t.URI_TOO_LONG=414]="URI_TOO_LONG",t[t.UNSUPPORTED_MEDIA_TYPE=415]="UNSUPPORTED_MEDIA_TYPE",t[t.RANGE_NOT_SATISFIABLE=416]="RANGE_NOT_SATISFIABLE",t[t.EXPECTATION_FAILED=417]="EXPECTATION_FAILED",t[t.I_AM_A_TEAPOT=418]="I_AM_A_TEAPOT",t[t.MISDIRECTED_REQUEST=421]="MISDIRECTED_REQUEST",t[t.UNPROCESSABLE_ENTITY=422]="UNPROCESSABLE_ENTITY",t[t.LOCKED=423]="LOCKED",t[t.FAILED_DEPENDENCY=424]="FAILED_DEPENDENCY",t[t.TOO_EARLY=425]="TOO_EARLY",t[t.UPGRADE_REQUIRED=426]="UPGRADE_REQUIRED",t[t.PRECONDITION_REQUIRED=428]="PRECONDITION_REQUIRED",t[t.TOO_MANY_REQUESTS=429]="TOO_MANY_REQUESTS",t[t.REQUEST_HEADER_FIELDS_TOO_LARGE=431]="REQUEST_HEADER_FIELDS_TOO_LARGE",t[t.UNAVAILABLE_FOR_LEGAL_REASONS=451]="UNAVAILABLE_FOR_LEGAL_REASONS",t[t.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",t[t.NOT_IMPLEMENTED=501]="NOT_IMPLEMENTED",t[t.BAD_GATEWAY=502]="BAD_GATEWAY",t[t.SERVICE_UNAVAILABLE=503]="SERVICE_UNAVAILABLE",t[t.GATEWAY_TIMEOUT=504]="GATEWAY_TIMEOUT",t[t.HTTP_VERSION_NOT_SUPPORTED=505]="HTTP_VERSION_NOT_SUPPORTED",t[t.VARIANT_ALSO_NEGOTIATES=506]="VARIANT_ALSO_NEGOTIATES",t[t.INSUFFICIENT_STORAGE=507]="INSUFFICIENT_STORAGE",t[t.LOOP_DETECTED=508]="LOOP_DETECTED",t[t.NOT_EXTENDED=510]="NOT_EXTENDED",t[t.NETWORK_AUTHENTICATION_REQUIRED=511]="NETWORK_AUTHENTICATION_REQUIRED",t))(Yl||{});const $ze={BASE_URL:"/pt",DEV:!0,MODE:"production",PROD:!1,SSR:!1,VITE_API_URL:"https://api.dev.arbocollab.com/api/v1",VITE_APP_BASE_PATH:"/pt",VITE_APP_REVIEW_BASE_URL:"https://review.dev.arbocollab.com",VITE_APP_WEBPAGE_TITLE:"People Insights | ARBO",VITE_BASE_URL:"https://app.dev.arbocollab.com",VITE_FAVICON_FILENAME:"favicon-arbo",VITE_FAVICON_VERSION:"v1"},co={info:(t,e)=>{console.info(`[AXIOS-INFO] ${t}`,e||"")},error:(t,e)=>{console.error(`[AXIOS-ERROR] ${t}`,e||"")},warn:(t,e)=>{console.warn(`[AXIOS-WARN] ${t}`,e||"")},debug:(t,e)=>{console.debug(`[AXIOS-DEBUG] ${t}`,e||"")}},Ile=()=>window.location.href,Z7=window.self!==window.top,Q7=yn(),Pze=[/^\/workspace\/[^/]+\/tile\/people\/ws-user-roles\/[^/]+\/basic-info$/i],Lze=()=>{try{return jA()}catch(t){return co.warn("Failed to get snackbar store",t),null}},Tb=(t,e)=>{const n=Lze();if(!n){co.warn("Snackbar not available, notification not shown",{type:t,message:e});return}try{t==="success"?n.showSuccessSnackbar({label:e}):n.showErrorSnackbar({label:e})}catch(r){co.error("Failed to show notification",{type:t,message:e,error:r})}};function Nze(){i_.set("account.last_access_url_people_tile",Ile()),window.self!==window.top||document.querySelector(":host")?co.info("Inside shadow DOM or iframe detected"):window.location.replace(`${a_("BASE_URL","https://api.dev.arbocollab.com/api/v1")}/login`)}const Fze=i_.get("account.token");Fze||Nze();const X7=()=>a_("BASE_URL","https://app.dev.arbocollab.com"),Mle=g6e({accessTokenKey:"account.token",refreshTokenKey:"account.refresh_token",domain:void 0,secure:window.location.protocol==="https:",sameSite:"lax",refreshTokenFn:async t=>{try{const e=await xn.refreshToken({refresh_token:t});return co.info("Calling token refresh",{tokenPrefix:t.substring(0,5)+"..."}),{access_token:e.access_token,refresh_token:e.refresh_token,expires_in:e.expires_in}}catch(e){throw Tb("error","Token refresh failed"),co.error("Token refresh failed",e),e}},onRefreshSuccess:t=>{Tb("success","Token refresh successful"),HA.defaults.headers.common.Authorization=`Bearer ${t.access_token}`},onRefreshFailure:t=>{co.error("Token refresh failed permanently",t),Tb("error","Token refresh failed"),Z7?window.parent.postMessage({type:"TOKEN_EXPIRED",message:"Authentication token has expired"},"*"):window.location.replace(`${X7()}/start`)},onCrossTabLogout:t=>{co.info("Cross-tab logout event received",{reason:t}),Z7?window.parent.postMessage({type:"TOKEN_EXPIRED",message:"Authentication token has expired"},"*"):window.location.replace(`${X7()}/start`),i_.set("account.last_access_url_people_tile",Ile(),{domain:void 0})},maxRetries:5,retryDelay:500,backoffFactor:1.5,storage:void 0});function Vze(t){t.headers={...t.headers,"ws-code":Q7,ws_code:Q7,"Access-Control-Allow-Origin":"*","Access-Control-Allow-Headers":"*","Accept-Language":"*","Content-Type":"application/json"}}function NC(t){const e=i_.get("account.token"),n=i_.get("ws.user-access-id");return Vze(t),t.headers.Authorization=`Bearer ${e}`,Pze.some(i=>i.test(t.url||""))&&(t.headers.tracking=`view,people,${n}`),t}function YB(t,e){var i,a;co.error(`Redirecting to ${t} page due to error`,{url:(i=e.config)==null?void 0:i.url,method:(a=e.config)==null?void 0:a.method,statusCode:t});const n=a_("API_BASE_URL","https://app.dev.arbocollab.com"),r=a_("module.alias","/pt");n?window.location.replace(`${n}${r}/${t}`):window.location.replace(`${r}/${t}`)}function V_(t){var n,r,i,a,o;if(t.code==="ERR_NETWORK")throw co.error("Network error detected",{message:t.message,url:(n=t.config)==null?void 0:n.url}),Tb("error","Network connection error. Please check your internet connection."),new Error("Network error");if(t.code==="ECONNABORTED")throw co.error("Request timeout",{url:(r=t.config)==null?void 0:r.url,timeout:(i=t.config)==null?void 0:i.timeout}),Tb("error","Request timed out. Please try again."),new Error("Request timeout");const e=Number(t.status);if(e===Yl.FORBIDDEN||e===Yl.NOT_FOUND)YB(String(e),t);else throw co.error("HTTP error",{status:e,code:t.code,url:(a=t.config)==null?void 0:a.url,method:(o=t.config)==null?void 0:o.method}),new Error(t.code)}function Rle(t){const{status:e,data:n,config:r}=t;switch(co.debug("API response received",{status:e,url:r.url,method:r.method}),e){case Yl.OK:case Yl.CREATED:case Yl.ACCEPTED:case Yl.NO_CONTENT:return n;case Yl.UNAUTHORIZED:case Yl.BAD_REQUEST:throw co.warn("Client error in response",{status:e,url:r.url}),Tb("error",(n==null?void 0:n.message)||"Request failed"),new Error(n.message||"An error occurred");case Yl.FORBIDDEN:throw co.warn("Forbidden response, triggering redirect",{url:r.url}),YB("403",t.data),new Error(n.message||"An error occurred");case Yl.NOT_FOUND:throw co.warn("Not found response, triggering redirect",{url:r.url}),YB("404",t.data),new Error(n.message||"An error occurred");case Yl.TOO_EARLY:throw co.warn("Too early response",{url:r.url}),new Error(n.message||"An error occurred");default:return e>=200&&e<300||co.warn("Unexpected response status",{status:e,url:r.url}),n}}function a_(t,e){const n=sessionStorage.getItem(t)||$ze[t.replace("API_","VITE_API_").replace("_URL","_URL")];return(n==null?void 0:n.length)>0?n:e}const HA=ta.create(),$le=ta.create(),FC=ta.create(),Ple={retryStatusCodes:[401,425],tokenExpiredDetection:t=>{var r,i,a,o,s,l,c;const e=(r=t==null?void 0:t.response)==null?void 0:r.status,n=(a=(i=t==null?void 0:t.response)==null?void 0:i.data)==null?void 0:a.error.toString();if(e===401){if(((s=(o=t==null?void 0:t.response)==null?void 0:o.data)==null?void 0:s.error)==="user_not_exists"||((c=(l=t==null?void 0:t.response)==null?void 0:l.data)==null?void 0:c.error)==="blocked")return!1;if(n==="token_expired"||n==="empty_token")return!0}return e===425}};Wse(HA,Mle,Ple);Wse($le,Mle,Ple);$le.interceptors.request.use(t=>NC(t),V_);HA.interceptors.request.use(t=>(t.baseURL=a_("API_BASE_URL","https://api.dev.arbocollab.com/api/v1"),NC(t)),V_);FC.interceptors.request.use(t=>(t.baseURL=a_("API_REVIEW_URL",void 0),NC(t)),V_);HA.interceptors.response.use(Rle,V_);FC.interceptors.request.use(NC,V_);FC.interceptors.response.use(Rle,V_);const Un={apiClient:HA,apiReviewV2Client:FC},tE={VIEW_PROJECT:"project_getProjectDirectoryUserInterface_read",VIEW_REVIEW:"media_getReviewUserInterface_read",VIEW_UPDATE:"update_getUpdateUserInterface_read",VIEW_WOOHOO:"woohoo_getWoohooUserInterface_read"},fr=T_("data",{state:()=>({selectedDataId:"",basicInfo:{},isLoadingProfile:!1,sceneDetailFetch:{status_type_in:"",selectedSceneId:"",fetchType:"",include_archived:0,sceneTotal:0,sceneSortType:"id",sceneOrder:"asc",searchScene:"",isTreemapLastLevel:!1,previousSelectedSceneId:"",privateSceneTotal:0},commentDetailFetch:{commentSortType:"id",commentOrder:"asc",searchComment:""},viewingReport:"",currentTab:"people-home",isLoadingFetchData:!1,permissionList:[],userInfo:{}}),getters:{permissionMap:t=>({redirectPermission:{review:t.permissionList.includes(tE.VIEW_REVIEW),project:t.permissionList.includes(tE.VIEW_PROJECT),woohoo:t.permissionList.includes(tE.VIEW_WOOHOO),update:t.permissionList.includes(tE.VIEW_UPDATE),scene_hub:!0}})},actions:{setSelectedDataId(t){this.selectedDataId=t},setSelectedDataProfile(t){this.basicInfo=t},setIsLoadingProfile(t){this.isLoadingProfile=t},setSceneDetailFetch(t){this.sceneDetailFetch={...this.sceneDetailFetch,...t}},setCommentDetailFetch(t){this.commentDetailFetch={...this.commentDetailFetch,...t}},resetSceneDetail(t=[]){const e={include_archived:0,sceneSortType:"id",sceneOrder:"asc",searchScene:""};Object.keys(e).forEach(n=>{t.includes(n)||(this.sceneDetailFetch[n]=e[n])})},resetCommentDetail(t=[]){const e={commentSortType:"id",commentOrder:"asc"};Object.keys(e).forEach(n=>{t.includes(n)||(this.commentDetailFetch[n]=e[n])})},setCurrentViewReport(t){this.viewingReport=t},setCurrentActiveTab(t){this.currentTab=t},setLoadingFetchData(t){this.isLoadingFetchData=t},setPermission(t){this.permissionList=t},setUserInfo(t){this.userInfo=t}}}),TN=t=>{const e=Object.fromEntries(new Map(t.entries()));return new URLSearchParams(e)};class Bze{getItems(e,n=20){const r=Bn.GET_ITEMS.replace("{ws_code}",yn()).replace("{page}",e.toString()).replace("{per_page}",n.toString());return Un.apiClient.get(r)}getChartData(e,n){const r=Bn.GET_CHART_DATA.replace("{ws_code}",yn()).replace("{id}",e.toString());return Un.apiClient.post(r,{include_chart:n})}getUserListProfile(e,n,r,i=""){const a=Bn.GET_USER_PROFILE_LIST.replace("{ws_code}",yn()).replace("{page}",e.toString()).replace("{per_page}",n.toString()).replace("{include_wur_id}",r.toString()).replace("{display_name_and_email_like}",i.toString());return Un.apiClient.get(a)}getUserBasicInfo(e){const n=Bn.GET_BASIC_INFO.replace("{ws_code}",yn()).replace("{WS_USER_ROLE_ID}",e.toString());return Un.apiClient.get(n)}getUserPermission(e=1){const n=Bn.USER_PERMISSION.replace("{ws_code}",yn()).replace("{is_newly}",e.toString());return Un.apiClient.get(n)}getUserProfile(){const e=Bn.USER_PROFILE;return Un.apiClient.get(e)}refreshToken(e){const n=Bn.REFRESH_TOKEN,r=typeof e=="object"?e:{refresh_token:e};return Un.apiClient.post(n,r).then(i=>({access_token:i.access_token,refresh_token:i.refresh_token,expires_in:i.expires_in})).catch(i=>Promise.reject(i))}getUnresolveAssignedComment({id:e,page:n,perPage:r=10,include:i,assignedAt:a,sortByType:o,sortOrder:s,before_id:l,searchText:c},f){const h=Bn.GET_UNRESOLVE_ASSIGNED_COMMENTS.replace("{ws_code}",yn()).replace("{WS_USER_ROLE_ID}",e.toString()).replace("{include}",i.toString());let p=new URLSearchParams;if(n&&p.append("page",n.toString()),r&&p.append("per_page",r.toString()),i&&p.append("include",i.toString()),a&&p.append("assigned_at_btw",a.toString()),l&&p.append("before_id",l.toString()),o&&s){const y=`${o}-${s}`;p.append("order_by",y.toString())}Object.entries(Kk).forEach(([y,v])=>{v&&p.append(y,String(v))}),f&&Object.entries(f).forEach(([y,v])=>{v&&p.append(y,String(v))}),p=TN(p),c&&p.append("comment_raw_like",c.toString());const g=`${h}?${p.toString()}`;return Un.apiClient.get(g)}getResolveAssignedComment({id:e,page:n,perPage:r=10,include:i,assignedAt:a,sortByType:o,sortOrder:s,searchText:l}){const c=Bn.GET_RESOLVE_ASSIGNED_COMMENTS.replace("{ws_code}",yn()).replace("{WS_USER_ROLE_ID}",e.toString()).replace("{include}",i.toString()),f=new URLSearchParams;if(n&&f.append("page",n.toString()),r&&f.append("per_page",r.toString()),i&&f.append("include",i.toString()),a&&f.append("assigned_at_btw",a.toString()),o&&s){const p=`${o}-${s}`;f.append("order_by",p.toString())}Object.entries(Kk).forEach(([p,g])=>{g&&f.append(p,String(g))}),l&&f.append("comment_raw_like",l.toString());const h=`${c}?${f.toString()}`;return Un.apiClient.get(h)}getAssignedTreeMapData(e,n="status",r="",i="",a="",o="",s,l){const c=Bn.GET_ASSIGNED_TREEMAP.replace("{ws_code}",yn()).replace("{WS_USER_ROLE_ID}",e.toString()),f=new URLSearchParams;f.append("treemap_type",n.toString()),l!==""&&l==="fromStatus"?r&&f.append("template_flow_status_id_eq",r.toString()):l!==""&&l==="fromEntity"&&r&&f.append("entity_id_eq",r.toString()),i&&f.append("entity_type_code_eq",i.toString()),a&&f.append("template_flow_status_type_in",a.toString()),o&&f.append("excluded_ids_in",o.toString()),s===1&&f.append("include_archived",s.toString());const h=`${c}?${f.toString()}`;return Un.apiClient.get(h)}getCommonItems({id:e,page:n,perPage:r=20,selectedId:i="",templateFlowType:a="",includeArchived:o,fetchType:s,sortByType:l,sortOrder:c,searchText:f="",dueDateNul:h="",actualDueDateNul:p="",actualDueDateNnul:g="",dueDateBtw:y="",actualDueDateBtw:v=""},b){const w=Bn.GET_COMMON_ITEMS.replace("{ws_code}",yn()).replace("{WS_USER_ROLE_ID}",e.toString());let S=new URLSearchParams;n&&S.append("page",n.toString()),r&&S.append("per_page",r.toString()),a&&S.append("template_flow_status_type_in",a.toString());const T=fr();if(s!==""&&s==="status")if(!T.sceneDetailFetch.isTreemapLastLevel)i&&S.append("template_flow_status_id_eq",i.toString());else{const E=T.sceneDetailFetch.previousSelectedSceneId;i&&S.append("entity_id_eq",i.toString()),E&&S.append("template_flow_status_id_eq",E.toString())}else if(s!==""&&s==="entity")if(!T.sceneDetailFetch.isTreemapLastLevel)i&&S.append("entity_id_eq",i.toString());else{const E=T.sceneDetailFetch.previousSelectedSceneId;E&&S.append("entity_id_eq",E.toString()),i&&S.append("template_flow_status_id_eq",i.toString())}if(o===1&&S.append("include_archived",o.toString()),f!==""&&S.append("name_like",f.toString()),l&&c)if(l==="template_flow_status.position"){const E=`${l}-${c}`;S.append("sort_by",E.toString())}else{const E=`item.${l}-${c}`;S.append("sort_by",E.toString())}h&&S.append("due_date_nul",h.toString()),p&&S.append("actual_due_date_nul",p.toString()),g&&S.append("actual_due_date_nnul",g.toString()),y&&S.append("due_date_btw",y.toString()),v&&S.append("actual_due_date_btw",v.toString()),S.append("include_permission","1"),Object.entries(Kk).forEach(([E,D])=>{D&&S.append(E,String(D))}),b&&Object.entries(b).forEach(([E,D])=>{D&&S.append(E,String(D))}),S=TN(S);const _=`${w}?${S.toString()}`;return Un.apiClient.get(_)}resolveComment(e,n,r){const i=Bn.RESOLVE_COMMENT.replace("{ws_code}",yn()).replace("{id}",e.toString()).replace("{item_id}",n.toString()).replace("{comment_id}",r.toString());return Un.apiReviewV2Client.post(i)}getTemplateFlows(e,n,r="",i=1,a=1){const o=Bn.TEMPLATE_FLOW_STATUS.replace("{ws_code}",yn()).replace("{page}",e.toString()).replace("{per_page}",n.toString()).replace("{search_like}",r.toString()).replace("{status_eq}",a.toString()).replace("{is_deployed_eq}",i.toString());return Un.apiClient.get(o)}getStatusTemplateList(e,n,r=""){const i=Bn.TEMPLATE_FLOW_STATUS_LIST.replace("{ws_code}",yn()).replace("{page}",e.toString()).replace("{per_page}",n.toString()).replace("{search_like}",r.toString());return Un.apiClient.get(i)}getMetricList(e,n,r="",i="metric_type"){const a=Bn.LIST_METRIC.replace("{ws_code}",yn()).replace("{page}",e.toString()).replace("{per_page}",n.toString()).replace("{name_like}",r.toString()).replace("{include}",i.toString());return Un.apiClient.get(a)}getCompletedSceneReport(e,n,r="and"){const i=Bn.COMPLETED_SCENE_REPORT.replace("{ws_code}",yn()),a=new URLSearchParams;e&&a.append("time_range_btw",e.toString()),n&&a.append("assignee_id_ina",n.toString()),r&&a.append("condition_combine_type",r.toString());const o=`${i}?${a.toString()}`;return Un.apiClient.get(o)}getOverdueSceneReport(e){const n=Bn.OVERDUE_SCENE_REPORT.replace("{ws_code}",yn()),r=new URLSearchParams;e&&r.append("assignee_id_ina",e.toString());const i=`${n}?${r.toString()}`;return Un.apiClient.get(i)}getSceneStatusReport(e,n="",r,i="and"){const a=Bn.SCENE_STATUS_REPORT.replace("{ws_code}",yn()),o=new URLSearchParams;e&&o.append("template_flow_status_id_ina",e.toString()),r&&o.append("assignee_id_ina",r.toString()),n&&o.append("status_types",n.toString()),i&&o.append("condition_combine_type",i.toString());const s=`${a}?${o.toString()}`;return Un.apiClient.get(s)}getAssigneeAchievementReport(e,n,r="and"){const i=Bn.ASSIGNEE_ACHIEVEMENT_REPORT.replace("{ws_code}",yn()),a=new URLSearchParams;e&&a.append("time_range_btw",e.toString()),n&&a.append("assignee_id_ina",n.toString()),r&&a.append("condition_combine_type",r.toString());const o=`${i}?${a.toString()}`;return Un.apiClient.get(o)}getUserInvolvementReport(e,n,r="and"){const i=Bn.USER_INVOLVEMENT_REPORT.replace("{ws_code}",yn()),a=new URLSearchParams;e&&a.append("active_time_range_btw",e.toString()),n&&a.append("assignee_id_ina",n.toString()),r&&a.append("condition_combine_type",r.toString());const o=`${i}?${a.toString()}`;return Un.apiClient.get(o)}getSceneAssignementReport(e,n,r="and"){const i=Bn.SCENE_ASSIGNMENT_REPORT.replace("{ws_code}",yn()),a=new URLSearchParams;e&&a.append("time_range_btw",e.toString()),n&&a.append("assignee_id_ina",n.toString()),r&&a.append("condition_combine_type",r.toString());const o=`${i}?${a.toString()}`;return Un.apiClient.get(o)}getMetricReport(e,n,r="and"){const i=Bn.METRIC_REPORT.replace("{ws_code}",yn()),a=new URLSearchParams;e&&a.append("metric_id_eq",e.toString()),n&&a.append("assignee_id_ina",n.toString()),r&&a.append("condition_combine_type",r.toString());const o=`${i}?${a.toString()}`;return Un.apiClient.get(o)}updateScene(e,n){const r=Bn.UPDATE_SCENE.replace("{ws_code}",yn()).replace("{scene_id}",e);return Un.apiClient.put(r,n)}getAssignableUsers(e,n){const r=Bn.GET_ASSIGNABLE_USERS.replace("{ws_code}",yn()).replace("{scene_id}",e),i=new URLSearchParams;Object.entries(n).forEach(([o,s])=>{s&&i.append(o,String(s))});const a=`${r}?${i.toString()}`;return Un.apiClient.get(a)}updateAssigneesUsers(e,n){const r=Bn.UPDATE_ASSIGNEES_USERS.replace("{ws_code}",yn());return Un.apiClient.post(r,{item_ids:[e],ws_user_role_ids:n})}deleteScene(e){const n=Bn.DELETE_SCENE.replace("{ws_code}",yn()).replace("{scene_id}",e);return Un.apiClient.delete(n)}getAssignableStatus(e,n){const r=Bn.GET_ASSIGNABLE_STATUS.replace("{ws_code}",yn());return Un.apiClient.post(r,{item_ids:[e],name_like:n.name_like||"",page:n.page,per_page:10})}getSceneDetail(e,n){const r=Bn.GET_SCENE_DETAIL.replace("{ws_code}",yn()).replace("{scene_id}",e),i=new URLSearchParams;Object.entries(n).forEach(([o,s])=>{s&&i.append(o,String(s))});const a=`${r}?${i.toString()}`;return Un.apiClient.get(a)}assignUser(e,n){const r=Bn.ASSIGN_USER.replace("{ws_code}",yn());return Un.apiClient.post(r,{ws_user_role_ids:n,item_ids:[e]})}unAssignUser(e,n){const r=Bn.UNASSIGN_USER.replace("{ws_code}",yn()).replace("{scene_id}",e);return Un.apiClient.delete(r,{data:{ws_user_role_ids:n,item_ids:[e]}})}getPeopleCard(e){const n=Bn.DASHBOARD.replace("{ws_code}",yn()).replace("{id}",e.toString()),r=new URLSearchParams;Object.entries({include:"assigned_scenes,point_pool,unresolved_comments,overdue_scenes,completed_scenes_last_7_days,"}).forEach(([o,s])=>{s&&r.append(o,String(s))});const a=`${n}?${r.toString()}`;return Un.apiClient.get(a)}getPeopleDashboardData(e,n,r){const i=Bn.DASHBOARD.replace("{ws_code}",yn()).replace("{id}",String(e));let a=new URLSearchParams;const o={"comments.latest":jx,"comments.recently_resolved":jx,"recent_activities.new_renditions":"attachments,ws_creator","recent_activities.accessed_scenes":"item.point_metric,item.ws_creator,item.template_flow_status,item.item_user_roles.ws_user_role,item.assignees"},s={include:n+","+o[n],include_entity_path:1,include_permission:1};Object.entries(s).forEach(([c,f])=>{f&&a.append(c,String(f))}),Object.entries(Kk).forEach(([c,f])=>{f&&a.append(c,String(f))}),r&&Object.entries(r).forEach(([c,f])=>{f&&a.append(c,String(f))}),a=TN(a);const l=`${i}?${a.toString()}`;return Un.apiClient.get(l)}deleteRendition(e,n){const r=Bn.DELETE_RENDITION.replace("{ws_code}",yn()).replace("{scene_id}",e).replace("{rendition_id}",n);return Un.apiClient.delete(r)}getCommentAssignableUser(e,n,r,i){const a=Bn.GET_ASSIGNABLE_USERS.replace("{ws_code}",yn()).replace("{scene_id}",e).replace("{comment_id}",n),o={page:r||1,per_page:10};return i&&(o.display_name_like=i),Un.apiClient.get(a,{params:o})}getMentionableUsers(e,n){const r=Bn.GET_ASSIGNABLE_USERS.replace("{ws_code}",yn()).replace("{scene_id}",e).replace("{comment_id}",n);return Un.apiClient.get(r)}resolveCommentApi(e,n){const r=Bn.RESOLVE_COMMENT_API.replace("{ws_code}",yn()).replace("{scene_id}",e).replace("{comment_id}",n);return Un.apiReviewV2Client.post(r)}unResolveCommentApi(e,n){const r=Bn.UN_RESOLVE_COMMENT.replace("{ws_code}",yn()).replace("{scene_id}",e).replace("{comment_id}",n);return Un.apiReviewV2Client.post(r)}deleteCommentApi(e,n){const r=Bn.DELETE_COMMENT.replace("{ws_code}",yn()).replace("{scene_id}",e).replace("{comment_id}",n);return Un.apiClient.delete(r)}reactToComment({scene_id:e,comment_id:n,reaction:r}){const i=Bn.REACT_TO_COMMENT.replace("{ws_code}",yn());return Un.apiClient.post(i,{model_type:"item_comment",item_id:e,model_id:n,emoji:r})}updateReactToComment({scene_id:e,comment_id:n,reaction:r,reaction_id:i}){const a=Bn.UPDATE_REACT_TO_COMMENT.replace("{ws_code}",yn()).replace("{reaction_id}",i);return Un.apiClient.put(a,{model_type:"item_comment",model_id:n,emoji:r,item_id:e})}deleteReactToComment(e){const n=Bn.DELETE_REACT_TO_COMMENT.replace("{ws_code}",yn()).replace("{reaction_id}",e);return Un.apiClient.delete(n)}assignUserApi(e,n,r){const i=Bn.ASSIGN_COMMENT_USER_API.replace("{ws_code}",yn()).replace("{scene_id}",e).replace("{comment_id}",n);return Un.apiReviewV2Client.post(i,{assigned_id:r})}getNextRendition(e,n){const r=Bn.DASHBOARD.replace("{ws_code}",yn()).replace("{id}",String(e)),i=new URLSearchParams;Object.entries({include:"recent_activities.new_renditions,attachments,ws_creator,item",before_id:n,include_entity_path:1,per_page:5,include_permission:1}).forEach(([s,l])=>{l&&i.append(s,String(l))});const o=`${r}?${i.toString()}`;return Un.apiClient.get(o)}downloadFileFromS3(e){const n=Bn.GET_RESOURCE_API.replace("{ws_code}",yn()),r={item_id:e.scene_id,path:e.path};return Un.apiClient.get(n,{params:r})}getCommentDetail({comment_id:e,scene_id:n}){const r=Bn.GET_COMMENT_DETAIL.replace("{ws_code}",yn()).replace("{comment_id}",e.toString()).replace("{scene_id}",n.toString());return Un.apiClient.get(r,{params:{include:jx}})}getWSUserProfile(){const e=Bn.GET_WS_USER_PROFILE.replace("{ws_code}",yn());return Un.apiClient.get(e)}}const xn=new Bze,ks=T_("dashboardStore",()=>{const t=re(null),e=a=>{t.value=a},n=re(!0),r=Ht({comment_recent:!1,comment_resolved:!1,rendition:!1,scene:!1,people_comment:!1,assigned_scene:!1,chart:!1});return{dashboardData:t,getDashboardData:async a=>{const o=await xn.getPeopleCard(a);e(o)},refreshState:r,isBrowserActive:n}});var _l=(t=>(t.WHITE="#F3F5F8",t.RED="#FFD4C1",t.YELLOW="#FDE8B0",t.GREEN="#CCF3EB",t.BLUE="#A3D4F5",t.TEXT_GENERAL="#232323",t.ICON_GENERAL="#A6A6A6",t))(_l||{});const Lle=([t,e])=>{const n=t+e,r=t/n*360;return r==180?0:r<90||r>90&&r<180?90-r/2:r>180?r-180/2*-1:r/2},Nle=({rotation:t,handleRedirect:e,interactive:n})=>({type:"pie",options:{rotation:t,responsive:!0,onHover:n?(r,i)=>{const a=r.chart;i.length>0?a.canvas.style.cursor="pointer":a.canvas.style.cursor="default"}:void 0,onClick:n?function(r,i){i.length>0&&e()}:void 0,plugins:{tooltip:{enabled:!1},datalabels:{align:"end",anchor:"end",formatter:function(r){return[r.label,r.value]},color:function(r){return r.dataset.backgroundColor},font:function(){return{size:14,weight:"normal"}}}},aspectRatio:16/6,layout:{padding:{top:6,bottom:6}}}}),Uze=t=>Number.isInteger(t)?t.toString():t.toFixed(2),Wze=Qe({__name:"CardAssigned",setup(t,{expose:e}){e(),Ev.register(XD,LS,KD,QD,Eoe,Toe),Ev.register(LS,KD,QD);const n=Z(()=>({guidingTextBottomLeft:l.value?void 0:{text:"Scenes",fontStyle:{color:_l.TEXT_GENERAL,fontSize:"14px",fontWeight:"normal"},tooltip:"Scenes"},guidingTextBottomRight:void 0,backgroundColor:_l.WHITE,key:"assigned",title:"Assigned scenes",icon:{name:"Film",iconColor:"#A6A6A6",tooltip:"Assigned scenes status"},mainLabel:"AssignedMainlabel"})),r=ks(),{dashboardData:i}=Pn(r),a=Z(()=>{var S;return Number(((S=i.value)==null?void 0:S.assigned_scenes.active)||0)}),o=Z(()=>{var S;return Number(((S=i.value)==null?void 0:S.assigned_scenes.planned)||0)}),s=Z(()=>!0),l=Z(()=>a.value>0||o.value>0),c=Z(()=>{const S=a.value,T=o.value,_={active:"Active",planned:"Planned"},E={active:"#3C9BFA",planned:"#A6A6A6"},D=Object.entries({active:S,planned:T}).filter(O=>O[1]!==0).sort((O,V)=>O[1]-V[1]).map(([O,V])=>({value:V||0,key:O,label:_[O]}));return{datasets:[{backgroundColor:D.map(O=>E[O.key]),data:D}]}}),f=Z(()=>{const S=a.value,T=o.value;return S<T?[S,T]:[T,S]}),h=fr(),{currentTab:p}=Pn(h),g=()=>{p.value="people-scenes"},y=Z(()=>{const S=Lle(f.value);return{type:"pie",data:c.value,plugins:[XD],...Nle({rotation:S,handleRedirect:g,interactive:!1})}}),v=re(null),b=()=>{const S=document.getElementById("chart_assigned");S&&(v.value=new Ev(S,y.value))};Ge([l,s],S=>{S[0]&&S[1]&&fn(()=>b())},{immediate:!0});const w={cardConfiguration:n,dashboardStore:r,dashboardData:i,activeData:a,plannedData:o,showData:s,hasData:l,data:c,assigned_scenesDataArr:f,store:h,currentTab:p,handleRedirect:g,chartConfig:y,chartInstance:v,initChart:b,get SimpleCard(){return O_}};return Object.defineProperty(w,"__isScriptSetup",{enumerable:!1,value:!0}),w}}),Nn=(t,e)=>{const n=t.__vccOpts||t;for(const[r,i]of e)n[r]=i;return n};function zze(t,e,n,r,i,a){return r.showData?(R(),Re(r.SimpleCard,Ft({key:0,class:"card-simple"},r.cardConfiguration,{disabled:!1,class:{empty:!r.hasData}}),{body:ze(()=>[r.hasData?(R(),Y("div",{key:0,class:"chart-container card-title",onClick:r.handleRedirect},e[0]||(e[0]=[X("canvas",{id:"chart_assigned"},null,-1)]))):(R(),Y("span",{key:1,class:"card-title",onClick:r.handleRedirect},"0"))]),_:1},16,["class"])):pe("v-if",!0)}const jze=Nn(Wze,[["render",zze],["__scopeId","data-v-f1302b37"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/CardAssigned.vue"]]),Hze=Qe({__name:"CardCompleted",setup(t,{expose:e}){e();const n=ks(),{dashboardData:r}=Pn(n),i=Z(()=>{var f;return r.value&&((f=r.value)==null?void 0:f.completed_scenes_last_7_days)||0}),a=Z(()=>{const f=i.value>0?_l.GREEN:_l.WHITE,h=i.value>0?"#02C39A":"#A6A6A6";return{guidingTextBottomLeft:{text:"Scenes",fontStyle:{color:"#000000",fontSize:"14px",fontWeight:"normal"},tooltip:"Assigned"},backgroundColor:f,key:"Completed",title:"Total completed (7 days)",icon:{name:"Film",iconColor:h,tooltip:"Completed scenes in the last 7 days"}}}),o=fr(),{currentTab:s}=Pn(o),c={dashboardStore:n,dashboardData:r,data:i,cardConfiguration:a,store:o,currentTab:s,handleRedirect:()=>{s.value="people-charts"},get SimpleCard(){return O_}};return Object.defineProperty(c,"__isScriptSetup",{enumerable:!1,value:!0}),c}});function Yze(t,e,n,r,i,a){return R(),Re(r.SimpleCard,Ft({class:"card-simple"},r.cardConfiguration,{disabled:!1}),{body:ze(()=>[X("div",{class:"card-title",onClick:r.handleRedirect},it(r.data),1)]),_:1},16)}const qze=Nn(Hze,[["render",Yze],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/CardCompleted.vue"]]),Kze=Qe({__name:"CardOverdue",setup(t,{expose:e}){e();const n=ks(),{dashboardData:r}=Pn(n),i=Z(()=>{var f;return r.value&&((f=r.value)==null?void 0:f.overdue_scenes)||0}),a=Z(()=>{const f=i.value>0?_l.YELLOW:_l.WHITE,h=i.value>0?"#F7941D":"#A6A6A6";return{guidingTextBottomLeft:{text:"Scenes",fontStyle:{color:_l.TEXT_GENERAL,fontSize:"14px",fontWeight:"normal"},tooltip:"Assigned"},backgroundColor:f,key:"assigned",title:"Overdue",icon:{name:"Film",iconColor:h,tooltip:"Assigned scenes past due"}}}),o=fr(),{currentTab:s}=Pn(o),c={dashboardStore:n,dashboardData:r,data:i,cardConfiguration:a,store:o,currentTab:s,handleRedirect:()=>{s.value="people-charts"},get SimpleCard(){return O_}};return Object.defineProperty(c,"__isScriptSetup",{enumerable:!1,value:!0}),c}});function Gze(t,e,n,r,i,a){return R(),Re(r.SimpleCard,Ft({class:"card-simple"},r.cardConfiguration,{disabled:!1}),{body:ze(()=>[X("div",{class:"card-title",onClick:r.handleRedirect},it(r.data),1)]),_:1},16)}const Zze=Nn(Kze,[["render",Gze],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/CardOverdue.vue"]]),Qze=Qe({__name:"CardTargetPoint",setup(t,{expose:e}){e(),Ev.register(XD,LS,KD,QD,Eoe,Toe),Ev.register(LS,KD,QD);const n=Z(()=>({guidingTextBottomLeft:l.value?void 0:{text:"Points",fontStyle:{color:_l.TEXT_GENERAL,fontSize:"14px",fontWeight:"normal"},tooltip:"Points"},guidingTextBottomRight:void 0,backgroundColor:_l.WHITE,key:"points",title:"Target points",icon:{name:"Award",iconColor:"#A6A6A6",tooltip:"Assigned points towards targets"},mainLabel:"AssignedMainlabel"})),r=Z(()=>{var v,b;return Number(((b=(v=o.value)==null?void 0:v.point_pool)==null?void 0:b.collected)||0)}),i=Z(()=>{var v,b;return Number(((b=(v=o.value)==null?void 0:v.point_pool)==null?void 0:b.pending)||0)}),a=ks(),{dashboardData:o}=Pn(a),s=Z(()=>{var v;return((v=o.value)==null?void 0:v.point_pool.can_view)==1}),l=Z(()=>r.value>0||i.value>0),c=Z(()=>{const v=r.value,b=i.value,w={collected:"Earned",pending:"Awaiting"},S={collected:"#F7941D",pending:"#A6A6A6"},T=Object.entries({collected:v,pending:b}).filter(_=>_[1]!==0).sort((_,E)=>_[1]-E[1]).map(([_,E])=>({value:Uze(E)||0,key:_,label:w[_]}));return{datasets:[{backgroundColor:T.map(_=>S[_.key]),data:T}]}}),f=Z(()=>{const v=r.value,b=i.value;return v<b?[v,b]:[b,v]}),h=Z(()=>{const v=Lle(f.value);return{plugins:[XD],type:"pie",data:c.value,...Nle({interactive:!1,handleRedirect:()=>{},rotation:v})}}),p=re(null),g=()=>{const v=document.getElementById("chart_target");v&&(p.value=new Ev(v,h.value))};Ge([l,s],v=>{v[0]&&v[1]&&fn(()=>g())},{immediate:!0});const y={cardConfiguration:n,collectedData:r,pendingData:i,dashboardStore:a,dashboardData:o,showData:s,hasData:l,data:c,assigned_scenesDataArr:f,chartConfig:h,chartInstance:p,initChart:g,get SimpleCard(){return O_}};return Object.defineProperty(y,"__isScriptSetup",{enumerable:!1,value:!0}),y}}),Xze={key:0,class:"chart-container card-title"},Jze={key:1,class:"card-title non-interactive"};function eje(t,e,n,r,i,a){return r.showData?(R(),Re(r.SimpleCard,Ft({key:0,class:"card-simple"},r.cardConfiguration,{disabled:!1,class:{empty:!r.hasData}}),{body:ze(()=>[r.hasData?(R(),Y("div",Xze,e[0]||(e[0]=[X("canvas",{id:"chart_target"},null,-1)]))):(R(),Y("span",Jze,"0"))]),_:1},16,["class"])):pe("v-if",!0)}const tje=Nn(Qze,[["render",eje],["__scopeId","data-v-24024258"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/CardTargetPoint.vue"]]),nje=Qe({__name:"CardUnresolved",setup(t,{expose:e}){e();const n=ks(),{dashboardData:r}=Pn(n),i=Z(()=>{var f;return r.value&&((f=r.value)==null?void 0:f.unresolved_comments)||0}),a=Z(()=>{const f={text:"@",color:"#FFF",bgColor:i.value==0?"#A6A6A6":"#3C9BFA",show:!0};return{guidingTextBottomLeft:{text:"Comments",fontStyle:{color:_l.TEXT_GENERAL,fontSize:"14px",fontWeight:"normal"},tooltip:"Assigned"},backgroundColor:_l.WHITE,key:"Unresolved",title:"Unresolved",icon:{name:"Comments",iconColor:_l.ICON_GENERAL,tooltip:"Assigned comments to resolve"},alias:f}}),o=fr(),{currentTab:s}=Pn(o),c={dashboardStore:n,dashboardData:r,data:i,cardConfiguration:a,store:o,currentTab:s,handleRedirect:()=>{s.value="people-comments"},get SimpleCard(){return O_}};return Object.defineProperty(c,"__isScriptSetup",{enumerable:!1,value:!0}),c}});function rje(t,e,n,r,i,a){return R(),Re(r.SimpleCard,Ft({class:"card-simple"},r.cardConfiguration,{disabled:!1}),{body:ze(()=>[X("div",{class:"card-title",onClick:r.handleRedirect},it(r.data),1)]),_:1},16)}const ije=Nn(nje,[["render",rje],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/CardUnresolved.vue"]]),aje={},oje={class:"section-renditions-skeleton"};function sje(t,e){return R(),Y("div",oje,e[0]||(e[0]=[Vv('<div class="timestamp animation-skeleton dark" data-v-09df7c3e></div><div class="rendition-item animation-skeleton dark" data-v-09df7c3e><div class="name" data-v-09df7c3e></div><div class="breadcrumb" data-v-09df7c3e></div><div class="information" data-v-09df7c3e></div></div>',2)]))}const lje=Nn(aje,[["render",sje],["__scopeId","data-v-09df7c3e"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/NewRenditionSkeleton.vue"]]),uje=Qe({__name:"InfoVisual",props:{visualName:{type:String,required:!0,default:"NoData"},label:{type:String,required:!1,default:"label here"},height:{type:Number,required:!0,default:200},width:{type:Number,required:!1,default:400}},setup(t,{expose:e}){e();const n=t,r=Z(()=>n.height-36),i=Z(()=>n.width),a={props:n,visualHeight:r,visualWidth:i,get ArboIcon(){return qn}};return Object.defineProperty(a,"__isScriptSetup",{enumerable:!1,value:!0}),a}}),cje={class:"visual-info"},dje={class:"data-info"};function fje(t,e,n,r,i,a){return R(),Y("div",cje,[X("div",{class:"visual-info-container",style:_t({"--visual-height":r.visualHeight+"px","--visual-width":r.visualWidth+"px"})},[he(r.ArboIcon,{type:"visual",name:n.visualName,class:"data-visual"},null,8,["name"]),X("div",dje,it(n.label),1)],4)])}const Oc=Nn(uje,[["render",fje],["__scopeId","data-v-014c340b"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/shared/InfoVisual.vue"]]),Al=()=>{const t=re(vo());return{getEnvVariable:n=>{const r=t.value,i=r==null?void 0:r.appContext.config.globalProperties[n];if(!r)return console.error("Current instance is not available."),"";let a="";return(!r||!r.appContext.config.globalProperties)&&(console.warn("Current instance or global properties not available."),a=""),!i||i.length===0?(console.warn(`Environment variable ${n} is not defined.`),a=""):a=i,a},currentInstance:t}},VC=()=>{const t=ks(),{getDashboardData:e}=t,n=async l=>{try{return await e(l)}catch(c){return console.error("getPeopleCard",c),{error:c}}},r=fr(),{basicInfo:i}=Pn(r);return{getPeopleCard:n,getRecentActivities:(l,c)=>{var h;const f=(h=i.value)==null?void 0:h.id;if(!f)throw new Error("userId is not found in store");return xn.getPeopleDashboardData(f,l,c)},deleteRendition:({scene_id:l,rendition_id:c})=>{if(!i.value.id)throw new Error("userId is not found in store");return xn.deleteRendition(l,c)},getNextRendition:l=>{var f;const c=(f=i.value)==null?void 0:f.id;if(!c)throw new Error("userId is not found in store");return xn.getNextRendition(c,l)}}},ay=(t,e,n)=>{const r=re(void 0),i=re(!1),a=async()=>{if(!h.value)return;const p=await e();p&&(r.value=p.signature)},o=re(null),s=6e4,l=()=>{o.value&&clearInterval(o.value),o.value=setInterval(()=>{a()},Number(s))};zt(async()=>{l()}),Qa(()=>{clearInterval(o.value)}),mee(()=>{clearInterval(o.value)});const c=ks(),{refreshState:f,isBrowserActive:h}=Pn(c);return Ge(i,p=>{t!==""&&(f.value[t]=p)}),Ge(n,p=>{r.value=p,fn(()=>i.value=!1)},{immediate:!0}),Ge(r,(p,g)=>{if(!(g==null||g==""))switch(!0){case!r.value:i.value=!1;break;case p!==g:i.value=!0;break;case r.value!=n.value:i.value=!0;break;case p==n.value:break}},{immediate:!0}),{subscribeSignature:l,needUpdate:i}};class oy extends Error{}class hje extends oy{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}}class pje extends oy{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}}class mje extends oy{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}}class db extends oy{}class Fle extends oy{constructor(e){super(`Invalid unit ${e}`)}}class Yo extends oy{}class tp extends oy{constructor(){super("Zone is an abstract class")}}const tn="numeric",Sc="short",wl="long",uO={year:tn,month:tn,day:tn},Vle={year:tn,month:Sc,day:tn},gje={year:tn,month:Sc,day:tn,weekday:Sc},Ble={year:tn,month:wl,day:tn},Ule={year:tn,month:wl,day:tn,weekday:wl},Wle={hour:tn,minute:tn},zle={hour:tn,minute:tn,second:tn},jle={hour:tn,minute:tn,second:tn,timeZoneName:Sc},Hle={hour:tn,minute:tn,second:tn,timeZoneName:wl},Yle={hour:tn,minute:tn,hourCycle:"h23"},qle={hour:tn,minute:tn,second:tn,hourCycle:"h23"},Kle={hour:tn,minute:tn,second:tn,hourCycle:"h23",timeZoneName:Sc},Gle={hour:tn,minute:tn,second:tn,hourCycle:"h23",timeZoneName:wl},Zle={year:tn,month:tn,day:tn,hour:tn,minute:tn},Qle={year:tn,month:tn,day:tn,hour:tn,minute:tn,second:tn},Xle={year:tn,month:Sc,day:tn,hour:tn,minute:tn},Jle={year:tn,month:Sc,day:tn,hour:tn,minute:tn,second:tn},vje={year:tn,month:Sc,day:tn,weekday:Sc,hour:tn,minute:tn},eue={year:tn,month:wl,day:tn,hour:tn,minute:tn,timeZoneName:Sc},tue={year:tn,month:wl,day:tn,hour:tn,minute:tn,second:tn,timeZoneName:Sc},nue={year:tn,month:wl,day:tn,weekday:wl,hour:tn,minute:tn,timeZoneName:wl},rue={year:tn,month:wl,day:tn,weekday:wl,hour:tn,minute:tn,second:tn,timeZoneName:wl};class YA{get type(){throw new tp}get name(){throw new tp}get ianaName(){return this.name}get isUniversal(){throw new tp}offsetName(e,n){throw new tp}formatOffset(e,n){throw new tp}offset(e){throw new tp}equals(e){throw new tp}get isValid(){throw new tp}}let DN=null;class BC extends YA{static get instance(){return DN===null&&(DN=new BC),DN}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:n,locale:r}){return fue(e,n,r)}formatOffset(e,n){return Yx(this.offset(e),n)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type==="system"}get isValid(){return!0}}let VT={};function yje(t){return VT[t]||(VT[t]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),VT[t]}const bje={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function _je(t,e){const n=t.format(e).replace(/\u200E/g,""),r=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,i,a,o,s,l,c,f]=r;return[o,i,a,s,l,c,f]}function wje(t,e){const n=t.formatToParts(e),r=[];for(let i=0;i<n.length;i++){const{type:a,value:o}=n[i],s=bje[a];a==="era"?r[s]=o:jn(s)||(r[s]=parseInt(o,10))}return r}let nE={};class xh extends YA{static create(e){return nE[e]||(nE[e]=new xh(e)),nE[e]}static resetCache(){nE={},VT={}}static isValidSpecifier(e){return this.isValidZone(e)}static isValidZone(e){if(!e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch{return!1}}constructor(e){super(),this.zoneName=e,this.valid=xh.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:n,locale:r}){return fue(e,n,r,this.name)}formatOffset(e,n){return Yx(this.offset(e),n)}offset(e){const n=new Date(e);if(isNaN(n))return NaN;const r=yje(this.name);let[i,a,o,s,l,c,f]=r.formatToParts?wje(r,n):_je(r,n);s==="BC"&&(i=-Math.abs(i)+1);const p=WC({year:i,month:a,day:o,hour:l===24?0:l,minute:c,second:f,millisecond:0});let g=+n;const y=g%1e3;return g-=y>=0?y:1e3+y,(p-g)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}}let J7={};function xje(t,e={}){const n=JSON.stringify([t,e]);let r=J7[n];return r||(r=new Intl.ListFormat(t,e),J7[n]=r),r}let qB={};function KB(t,e={}){const n=JSON.stringify([t,e]);let r=qB[n];return r||(r=new Intl.DateTimeFormat(t,e),qB[n]=r),r}let GB={};function Sje(t,e={}){const n=JSON.stringify([t,e]);let r=GB[n];return r||(r=new Intl.NumberFormat(t,e),GB[n]=r),r}let ZB={};function Aje(t,e={}){const{base:n,...r}=e,i=JSON.stringify([t,r]);let a=ZB[i];return a||(a=new Intl.RelativeTimeFormat(t,e),ZB[i]=a),a}let lx=null;function kje(){return lx||(lx=new Intl.DateTimeFormat().resolvedOptions().locale,lx)}let eq={};function Eje(t){let e=eq[t];if(!e){const n=new Intl.Locale(t);e="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,eq[t]=e}return e}function Tje(t){const e=t.indexOf("-x-");e!==-1&&(t=t.substring(0,e));const n=t.indexOf("-u-");if(n===-1)return[t];{let r,i;try{r=KB(t).resolvedOptions(),i=t}catch{const l=t.substring(0,n);r=KB(l).resolvedOptions(),i=l}const{numberingSystem:a,calendar:o}=r;return[i,a,o]}}function Dje(t,e,n){return(n||e)&&(t.includes("-u-")||(t+="-u"),n&&(t+=`-ca-${n}`),e&&(t+=`-nu-${e}`)),t}function Oje(t){const e=[];for(let n=1;n<=12;n++){const r=Wn.utc(2009,n,1);e.push(t(r))}return e}function Cje(t){const e=[];for(let n=1;n<=7;n++){const r=Wn.utc(2016,11,13+n);e.push(t(r))}return e}function rE(t,e,n,r){const i=t.listingMode();return i==="error"?null:i==="en"?n(e):r(e)}function Ije(t){return t.numberingSystem&&t.numberingSystem!=="latn"?!1:t.numberingSystem==="latn"||!t.locale||t.locale.startsWith("en")||new Intl.DateTimeFormat(t.intl).resolvedOptions().numberingSystem==="latn"}class Mje{constructor(e,n,r){this.padTo=r.padTo||0,this.floor=r.floor||!1;const{padTo:i,floor:a,...o}=r;if(!n||Object.keys(o).length>0){const s={useGrouping:!1,...r};r.padTo>0&&(s.minimumIntegerDigits=r.padTo),this.inf=Sje(e,s)}}format(e){if(this.inf){const n=this.floor?Math.floor(e):e;return this.inf.format(n)}else{const n=this.floor?Math.floor(e):cW(e,3);return Ia(n,this.padTo)}}}class Rje{constructor(e,n,r){this.opts=r,this.originalZone=void 0;let i;if(this.opts.timeZone)this.dt=e;else if(e.zone.type==="fixed"){const o=-1*(e.offset/60),s=o>=0?`Etc/GMT+${o}`:`Etc/GMT${o}`;e.offset!==0&&xh.create(s).valid?(i=s,this.dt=e):(i="UTC",this.dt=e.offset===0?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else e.zone.type==="system"?this.dt=e:e.zone.type==="iana"?(this.dt=e,i=e.zone.name):(i="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);const a={...this.opts};a.timeZone=a.timeZone||i,this.dtf=KB(n,a)}format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(n=>{if(n.type==="timeZoneName"){const r=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...n,value:r}}else return n}):e}resolvedOptions(){return this.dtf.resolvedOptions()}}class $je{constructor(e,n,r){this.opts={style:"long",...r},!n&&cue()&&(this.rtf=Aje(e,r))}format(e,n){return this.rtf?this.rtf.format(e,n):r8e(n,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,n){return this.rtf?this.rtf.formatToParts(e,n):[]}}const Pje={firstDay:1,minimalDays:4,weekend:[6,7]};let Ci=class ux{static fromOpts(e){return ux.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,n,r,i,a=!1){const o=e||la.defaultLocale,s=o||(a?"en-US":kje()),l=n||la.defaultNumberingSystem,c=r||la.defaultOutputCalendar,f=QB(i)||la.defaultWeekSettings;return new ux(s,l,c,f,o)}static resetCache(){lx=null,qB={},GB={},ZB={}}static fromObject({locale:e,numberingSystem:n,outputCalendar:r,weekSettings:i}={}){return ux.create(e,n,r,i)}constructor(e,n,r,i,a){const[o,s,l]=Tje(e);this.locale=o,this.numberingSystem=n||s||null,this.outputCalendar=r||l||null,this.weekSettings=i,this.intl=Dje(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=a,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=Ije(this)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),n=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return e&&n?"en":"intl"}clone(e){return!e||Object.getOwnPropertyNames(e).length===0?this:ux.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,QB(e.weekSettings)||this.weekSettings,e.defaultToEN||!1)}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,n=!1){return rE(this,e,mue,()=>{const r=n?{month:e,day:"numeric"}:{month:e},i=n?"format":"standalone";return this.monthsCache[i][e]||(this.monthsCache[i][e]=Oje(a=>this.extract(a,r,"month"))),this.monthsCache[i][e]})}weekdays(e,n=!1){return rE(this,e,yue,()=>{const r=n?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},i=n?"format":"standalone";return this.weekdaysCache[i][e]||(this.weekdaysCache[i][e]=Cje(a=>this.extract(a,r,"weekday"))),this.weekdaysCache[i][e]})}meridiems(){return rE(this,void 0,()=>bue,()=>{if(!this.meridiemCache){const e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[Wn.utc(2016,11,13,9),Wn.utc(2016,11,13,19)].map(n=>this.extract(n,e,"dayperiod"))}return this.meridiemCache})}eras(e){return rE(this,e,_ue,()=>{const n={era:e};return this.eraCache[e]||(this.eraCache[e]=[Wn.utc(-40,1,1),Wn.utc(2017,1,1)].map(r=>this.extract(r,n,"era"))),this.eraCache[e]})}extract(e,n,r){const i=this.dtFormatter(e,n),a=i.formatToParts(),o=a.find(s=>s.type.toLowerCase()===r);return o?o.value:null}numberFormatter(e={}){return new Mje(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,n={}){return new Rje(e,this.intl,n)}relFormatter(e={}){return new $je(this.intl,this.isEnglish(),e)}listFormatter(e={}){return xje(this.intl,e)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:due()?Eje(this.locale):Pje}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}},ON=null;class Ss extends YA{static get utcInstance(){return ON===null&&(ON=new Ss(0)),ON}static instance(e){return e===0?Ss.utcInstance:new Ss(e)}static parseSpecifier(e){if(e){const n=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new Ss(zC(n[1],n[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${Yx(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${Yx(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,n){return Yx(this.fixed,n)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type==="fixed"&&e.fixed===this.fixed}get isValid(){return!0}}class Lje extends YA{constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function vp(t,e){if(jn(t)||t===null)return e;if(t instanceof YA)return t;if(Wje(t)){const n=t.toLowerCase();return n==="default"?e:n==="local"||n==="system"?BC.instance:n==="utc"||n==="gmt"?Ss.utcInstance:Ss.parseSpecifier(n)||xh.create(t)}else return Lp(t)?Ss.instance(t):typeof t=="object"&&"offset"in t&&typeof t.offset=="function"?t:new Lje(t)}const oW={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},tq={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},Nje=oW.hanidec.replace(/[\[|\]]/g,"").split("");function Fje(t){let e=parseInt(t,10);if(isNaN(e)){e="";for(let n=0;n<t.length;n++){const r=t.charCodeAt(n);if(t[n].search(oW.hanidec)!==-1)e+=Nje.indexOf(t[n]);else for(const i in tq){const[a,o]=tq[i];r>=a&&r<=o&&(e+=r-a)}}return parseInt(e,10)}else return e}let nb={};function Vje(){nb={}}function zu({numberingSystem:t},e=""){const n=t||"latn";return nb[n]||(nb[n]={}),nb[n][e]||(nb[n][e]=new RegExp(`${oW[n]}${e}`)),nb[n][e]}let nq=()=>Date.now(),rq="system",iq=null,aq=null,oq=null,sq=60,lq,uq=null;class la{static get now(){return nq}static set now(e){nq=e}static set defaultZone(e){rq=e}static get defaultZone(){return vp(rq,BC.instance)}static get defaultLocale(){return iq}static set defaultLocale(e){iq=e}static get defaultNumberingSystem(){return aq}static set defaultNumberingSystem(e){aq=e}static get defaultOutputCalendar(){return oq}static set defaultOutputCalendar(e){oq=e}static get defaultWeekSettings(){return uq}static set defaultWeekSettings(e){uq=QB(e)}static get twoDigitCutoffYear(){return sq}static set twoDigitCutoffYear(e){sq=e%100}static get throwOnInvalid(){return lq}static set throwOnInvalid(e){lq=e}static resetCaches(){Ci.resetCache(),xh.resetCache(),Wn.resetCache(),Vje()}}class lc{constructor(e,n){this.reason=e,this.explanation=n}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const iue=[0,31,59,90,120,151,181,212,243,273,304,334],aue=[0,31,60,91,121,152,182,213,244,274,305,335];function eu(t,e){return new lc("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${t}, which is invalid`)}function sW(t,e,n){const r=new Date(Date.UTC(t,e-1,n));t<100&&t>=0&&r.setUTCFullYear(r.getUTCFullYear()-1900);const i=r.getUTCDay();return i===0?7:i}function oue(t,e,n){return n+(qA(t)?aue:iue)[e-1]}function sue(t,e){const n=qA(t)?aue:iue,r=n.findIndex(a=>a<e),i=e-n[r];return{month:r+1,day:i}}function lW(t,e){return(t-e+7)%7+1}function cO(t,e=4,n=1){const{year:r,month:i,day:a}=t,o=oue(r,i,a),s=lW(sW(r,i,a),n);let l=Math.floor((o-s+14-e)/7),c;return l<1?(c=r-1,l=US(c,e,n)):l>US(r,e,n)?(c=r+1,l=1):c=r,{weekYear:c,weekNumber:l,weekday:s,...jC(t)}}function cq(t,e=4,n=1){const{weekYear:r,weekNumber:i,weekday:a}=t,o=lW(sW(r,1,e),n),s=Db(r);let l=i*7+a-o-7+e,c;l<1?(c=r-1,l+=Db(c)):l>s?(c=r+1,l-=Db(r)):c=r;const{month:f,day:h}=sue(c,l);return{year:c,month:f,day:h,...jC(t)}}function CN(t){const{year:e,month:n,day:r}=t,i=oue(e,n,r);return{year:e,ordinal:i,...jC(t)}}function dq(t){const{year:e,ordinal:n}=t,{month:r,day:i}=sue(e,n);return{year:e,month:r,day:i,...jC(t)}}function fq(t,e){if(!jn(t.localWeekday)||!jn(t.localWeekNumber)||!jn(t.localWeekYear)){if(!jn(t.weekday)||!jn(t.weekNumber)||!jn(t.weekYear))throw new db("Cannot mix locale-based week fields with ISO-based week fields");return jn(t.localWeekday)||(t.weekday=t.localWeekday),jn(t.localWeekNumber)||(t.weekNumber=t.localWeekNumber),jn(t.localWeekYear)||(t.weekYear=t.localWeekYear),delete t.localWeekday,delete t.localWeekNumber,delete t.localWeekYear,{minDaysInFirstWeek:e.getMinDaysInFirstWeek(),startOfWeek:e.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function Bje(t,e=4,n=1){const r=UC(t.weekYear),i=tu(t.weekNumber,1,US(t.weekYear,e,n)),a=tu(t.weekday,1,7);return r?i?a?!1:eu("weekday",t.weekday):eu("week",t.weekNumber):eu("weekYear",t.weekYear)}function Uje(t){const e=UC(t.year),n=tu(t.ordinal,1,Db(t.year));return e?n?!1:eu("ordinal",t.ordinal):eu("year",t.year)}function lue(t){const e=UC(t.year),n=tu(t.month,1,12),r=tu(t.day,1,dO(t.year,t.month));return e?n?r?!1:eu("day",t.day):eu("month",t.month):eu("year",t.year)}function uue(t){const{hour:e,minute:n,second:r,millisecond:i}=t,a=tu(e,0,23)||e===24&&n===0&&r===0&&i===0,o=tu(n,0,59),s=tu(r,0,59),l=tu(i,0,999);return a?o?s?l?!1:eu("millisecond",i):eu("second",r):eu("minute",n):eu("hour",e)}function jn(t){return typeof t>"u"}function Lp(t){return typeof t=="number"}function UC(t){return typeof t=="number"&&t%1===0}function Wje(t){return typeof t=="string"}function zje(t){return Object.prototype.toString.call(t)==="[object Date]"}function cue(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function due(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function jje(t){return Array.isArray(t)?t:[t]}function hq(t,e,n){if(t.length!==0)return t.reduce((r,i)=>{const a=[e(i),i];return r&&n(r[0],a[0])===r[0]?r:a},null)[1]}function Hje(t,e){return e.reduce((n,r)=>(n[r]=t[r],n),{})}function o_(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function QB(t){if(t==null)return null;if(typeof t!="object")throw new Yo("Week settings must be an object");if(!tu(t.firstDay,1,7)||!tu(t.minimalDays,1,7)||!Array.isArray(t.weekend)||t.weekend.some(e=>!tu(e,1,7)))throw new Yo("Invalid week settings");return{firstDay:t.firstDay,minimalDays:t.minimalDays,weekend:Array.from(t.weekend)}}function tu(t,e,n){return UC(t)&&t>=e&&t<=n}function Yje(t,e){return t-e*Math.floor(t/e)}function Ia(t,e=2){const n=t<0;let r;return n?r="-"+(""+-t).padStart(e,"0"):r=(""+t).padStart(e,"0"),r}function dp(t){if(!(jn(t)||t===null||t===""))return parseInt(t,10)}function Vg(t){if(!(jn(t)||t===null||t===""))return parseFloat(t)}function uW(t){if(!(jn(t)||t===null||t==="")){const e=parseFloat("0."+t)*1e3;return Math.floor(e)}}function cW(t,e,n=!1){const r=10**e;return(n?Math.trunc:Math.round)(t*r)/r}function qA(t){return t%4===0&&(t%100!==0||t%400===0)}function Db(t){return qA(t)?366:365}function dO(t,e){const n=Yje(e-1,12)+1,r=t+(e-n)/12;return n===2?qA(r)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function WC(t){let e=Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,t.second,t.millisecond);return t.year<100&&t.year>=0&&(e=new Date(e),e.setUTCFullYear(t.year,t.month-1,t.day)),+e}function pq(t,e,n){return-lW(sW(t,1,e),n)+e-1}function US(t,e=4,n=1){const r=pq(t,e,n),i=pq(t+1,e,n);return(Db(t)-r+i)/7}function XB(t){return t>99?t:t>la.twoDigitCutoffYear?1900+t:2e3+t}function fue(t,e,n,r=null){const i=new Date(t),a={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};r&&(a.timeZone=r);const o={timeZoneName:e,...a},s=new Intl.DateTimeFormat(n,o).formatToParts(i).find(l=>l.type.toLowerCase()==="timezonename");return s?s.value:null}function zC(t,e){let n=parseInt(t,10);Number.isNaN(n)&&(n=0);const r=parseInt(e,10)||0,i=n<0||Object.is(n,-0)?-r:r;return n*60+i}function hue(t){const e=Number(t);if(typeof t=="boolean"||t===""||Number.isNaN(e))throw new Yo(`Invalid unit value ${t}`);return e}function fO(t,e){const n={};for(const r in t)if(o_(t,r)){const i=t[r];if(i==null)continue;n[e(r)]=hue(i)}return n}function Yx(t,e){const n=Math.trunc(Math.abs(t/60)),r=Math.trunc(Math.abs(t%60)),i=t>=0?"+":"-";switch(e){case"short":return`${i}${Ia(n,2)}:${Ia(r,2)}`;case"narrow":return`${i}${n}${r>0?`:${r}`:""}`;case"techie":return`${i}${Ia(n,2)}${Ia(r,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function jC(t){return Hje(t,["hour","minute","second","millisecond"])}const qje=["January","February","March","April","May","June","July","August","September","October","November","December"],pue=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Kje=["J","F","M","A","M","J","J","A","S","O","N","D"];function mue(t){switch(t){case"narrow":return[...Kje];case"short":return[...pue];case"long":return[...qje];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const gue=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],vue=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Gje=["M","T","W","T","F","S","S"];function yue(t){switch(t){case"narrow":return[...Gje];case"short":return[...vue];case"long":return[...gue];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const bue=["AM","PM"],Zje=["Before Christ","Anno Domini"],Qje=["BC","AD"],Xje=["B","A"];function _ue(t){switch(t){case"narrow":return[...Xje];case"short":return[...Qje];case"long":return[...Zje];default:return null}}function Jje(t){return bue[t.hour<12?0:1]}function e8e(t,e){return yue(e)[t.weekday-1]}function t8e(t,e){return mue(e)[t.month-1]}function n8e(t,e){return _ue(e)[t.year<0?0:1]}function r8e(t,e,n="always",r=!1){const i={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},a=["hours","minutes","seconds"].indexOf(t)===-1;if(n==="auto"&&a){const h=t==="days";switch(e){case 1:return h?"tomorrow":`next ${i[t][0]}`;case-1:return h?"yesterday":`last ${i[t][0]}`;case 0:return h?"today":`this ${i[t][0]}`}}const o=Object.is(e,-0)||e<0,s=Math.abs(e),l=s===1,c=i[t],f=r?l?c[1]:c[2]||c[1]:l?i[t][0]:t;return o?`${s} ${f} ago`:`in ${s} ${f}`}function mq(t,e){let n="";for(const r of t)r.literal?n+=r.val:n+=e(r.val);return n}const i8e={D:uO,DD:Vle,DDD:Ble,DDDD:Ule,t:Wle,tt:zle,ttt:jle,tttt:Hle,T:Yle,TT:qle,TTT:Kle,TTTT:Gle,f:Zle,ff:Xle,fff:eue,ffff:nue,F:Qle,FF:Jle,FFF:tue,FFFF:rue};class Jo{static create(e,n={}){return new Jo(e,n)}static parseFormat(e){let n=null,r="",i=!1;const a=[];for(let o=0;o<e.length;o++){const s=e.charAt(o);s==="'"?(r.length>0&&a.push({literal:i||/^\s+$/.test(r),val:r}),n=null,r="",i=!i):i||s===n?r+=s:(r.length>0&&a.push({literal:/^\s+$/.test(r),val:r}),r=s,n=s)}return r.length>0&&a.push({literal:i||/^\s+$/.test(r),val:r}),a}static macroTokenToFormatOpts(e){return i8e[e]}constructor(e,n){this.opts=n,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,n){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...n}).format()}dtFormatter(e,n={}){return this.loc.dtFormatter(e,{...this.opts,...n})}formatDateTime(e,n){return this.dtFormatter(e,n).format()}formatDateTimeParts(e,n){return this.dtFormatter(e,n).formatToParts()}formatInterval(e,n){return this.dtFormatter(e.start,n).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,n){return this.dtFormatter(e,n).resolvedOptions()}num(e,n=0){if(this.opts.forceSimple)return Ia(e,n);const r={...this.opts};return n>0&&(r.padTo=n),this.loc.numberFormatter(r).format(e)}formatDateTimeFromString(e,n){const r=this.loc.listingMode()==="en",i=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",a=(g,y)=>this.loc.extract(e,g,y),o=g=>e.isOffsetFixed&&e.offset===0&&g.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,g.format):"",s=()=>r?Jje(e):a({hour:"numeric",hourCycle:"h12"},"dayperiod"),l=(g,y)=>r?t8e(e,g):a(y?{month:g}:{month:g,day:"numeric"},"month"),c=(g,y)=>r?e8e(e,g):a(y?{weekday:g}:{weekday:g,month:"long",day:"numeric"},"weekday"),f=g=>{const y=Jo.macroTokenToFormatOpts(g);return y?this.formatWithSystemDefault(e,y):g},h=g=>r?n8e(e,g):a({era:g},"era"),p=g=>{switch(g){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12===0?12:e.hour%12);case"hh":return this.num(e.hour%12===0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return o({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return o({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return o({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return s();case"d":return i?a({day:"numeric"},"day"):this.num(e.day);case"dd":return i?a({day:"2-digit"},"day"):this.num(e.day,2);case"c":return this.num(e.weekday);case"ccc":return c("short",!0);case"cccc":return c("long",!0);case"ccccc":return c("narrow",!0);case"E":return this.num(e.weekday);case"EEE":return c("short",!1);case"EEEE":return c("long",!1);case"EEEEE":return c("narrow",!1);case"L":return i?a({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return i?a({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return l("short",!0);case"LLLL":return l("long",!0);case"LLLLL":return l("narrow",!0);case"M":return i?a({month:"numeric"},"month"):this.num(e.month);case"MM":return i?a({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return l("short",!1);case"MMMM":return l("long",!1);case"MMMMM":return l("narrow",!1);case"y":return i?a({year:"numeric"},"year"):this.num(e.year);case"yy":return i?a({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return i?a({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return i?a({year:"numeric"},"year"):this.num(e.year,6);case"G":return h("short");case"GG":return h("long");case"GGGGG":return h("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"n":return this.num(e.localWeekNumber);case"nn":return this.num(e.localWeekNumber,2);case"ii":return this.num(e.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(e.localWeekYear,4);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return f(g)}};return mq(Jo.parseFormat(n),p)}formatDurationFromString(e,n){const r=l=>{switch(l[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},i=l=>c=>{const f=r(c);return f?this.num(l.get(f),c.length):c},a=Jo.parseFormat(n),o=a.reduce((l,{literal:c,val:f})=>c?l:l.concat(f),[]),s=e.shiftTo(...o.map(r).filter(l=>l));return mq(a,i(s))}}const wue=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function B_(...t){const e=t.reduce((n,r)=>n+r.source,"");return RegExp(`^${e}$`)}function U_(...t){return e=>t.reduce(([n,r,i],a)=>{const[o,s,l]=a(e,i);return[{...n,...o},s||r,l]},[{},null,1]).slice(0,2)}function W_(t,...e){if(t==null)return[null,null];for(const[n,r]of e){const i=n.exec(t);if(i)return r(i)}return[null,null]}function xue(...t){return(e,n)=>{const r={};let i;for(i=0;i<t.length;i++)r[t[i]]=dp(e[n+i]);return[r,null,n+i]}}const Sue=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,a8e=`(?:${Sue.source}?(?:\\[(${wue.source})\\])?)?`,dW=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,Aue=RegExp(`${dW.source}${a8e}`),fW=RegExp(`(?:T${Aue.source})?`),o8e=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,s8e=/(\d{4})-?W(\d\d)(?:-?(\d))?/,l8e=/(\d{4})-?(\d{3})/,u8e=xue("weekYear","weekNumber","weekDay"),c8e=xue("year","ordinal"),d8e=/(\d{4})-(\d\d)-(\d\d)/,kue=RegExp(`${dW.source} ?(?:${Sue.source}|(${wue.source}))?`),f8e=RegExp(`(?: ${kue.source})?`);function Ob(t,e,n){const r=t[e];return jn(r)?n:dp(r)}function h8e(t,e){return[{year:Ob(t,e),month:Ob(t,e+1,1),day:Ob(t,e+2,1)},null,e+3]}function z_(t,e){return[{hours:Ob(t,e,0),minutes:Ob(t,e+1,0),seconds:Ob(t,e+2,0),milliseconds:uW(t[e+3])},null,e+4]}function KA(t,e){const n=!t[e]&&!t[e+1],r=zC(t[e+1],t[e+2]),i=n?null:Ss.instance(r);return[{},i,e+3]}function GA(t,e){const n=t[e]?xh.create(t[e]):null;return[{},n,e+1]}const p8e=RegExp(`^T?${dW.source}$`),m8e=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function g8e(t){const[e,n,r,i,a,o,s,l,c]=t,f=e[0]==="-",h=l&&l[0]==="-",p=(g,y=!1)=>g!==void 0&&(y||g&&f)?-g:g;return[{years:p(Vg(n)),months:p(Vg(r)),weeks:p(Vg(i)),days:p(Vg(a)),hours:p(Vg(o)),minutes:p(Vg(s)),seconds:p(Vg(l),l==="-0"),milliseconds:p(uW(c),h)}]}const v8e={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function hW(t,e,n,r,i,a,o){const s={year:e.length===2?XB(dp(e)):dp(e),month:pue.indexOf(n)+1,day:dp(r),hour:dp(i),minute:dp(a)};return o&&(s.second=dp(o)),t&&(s.weekday=t.length>3?gue.indexOf(t)+1:vue.indexOf(t)+1),s}const y8e=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function b8e(t){const[,e,n,r,i,a,o,s,l,c,f,h]=t,p=hW(e,i,r,n,a,o,s);let g;return l?g=v8e[l]:c?g=0:g=zC(f,h),[p,new Ss(g)]}function _8e(t){return t.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const w8e=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,x8e=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,S8e=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function gq(t){const[,e,n,r,i,a,o,s]=t;return[hW(e,i,r,n,a,o,s),Ss.utcInstance]}function A8e(t){const[,e,n,r,i,a,o,s]=t;return[hW(e,s,n,r,i,a,o),Ss.utcInstance]}const k8e=B_(o8e,fW),E8e=B_(s8e,fW),T8e=B_(l8e,fW),D8e=B_(Aue),Eue=U_(h8e,z_,KA,GA),O8e=U_(u8e,z_,KA,GA),C8e=U_(c8e,z_,KA,GA),I8e=U_(z_,KA,GA);function M8e(t){return W_(t,[k8e,Eue],[E8e,O8e],[T8e,C8e],[D8e,I8e])}function R8e(t){return W_(_8e(t),[y8e,b8e])}function $8e(t){return W_(t,[w8e,gq],[x8e,gq],[S8e,A8e])}function P8e(t){return W_(t,[m8e,g8e])}const L8e=U_(z_);function N8e(t){return W_(t,[p8e,L8e])}const F8e=B_(d8e,f8e),V8e=B_(kue),B8e=U_(z_,KA,GA);function U8e(t){return W_(t,[F8e,Eue],[V8e,B8e])}const vq="Invalid Duration",Tue={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},W8e={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...Tue},zl=146097/400,Fy=146097/4800,z8e={years:{quarters:4,months:12,weeks:zl/7,days:zl,hours:zl*24,minutes:zl*24*60,seconds:zl*24*60*60,milliseconds:zl*24*60*60*1e3},quarters:{months:3,weeks:zl/28,days:zl/4,hours:zl*24/4,minutes:zl*24*60/4,seconds:zl*24*60*60/4,milliseconds:zl*24*60*60*1e3/4},months:{weeks:Fy/7,days:Fy,hours:Fy*24,minutes:Fy*24*60,seconds:Fy*24*60*60,milliseconds:Fy*24*60*60*1e3},...Tue},cv=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],j8e=cv.slice(0).reverse();function np(t,e,n=!1){const r={values:n?e.values:{...t.values,...e.values||{}},loc:t.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||t.conversionAccuracy,matrix:e.matrix||t.matrix};return new Qo(r)}function Due(t,e){let n=e.milliseconds??0;for(const r of j8e.slice(1))e[r]&&(n+=e[r]*t[r].milliseconds);return n}function yq(t,e){const n=Due(t,e)<0?-1:1;cv.reduceRight((r,i)=>{if(jn(e[i]))return r;if(r){const a=e[r]*n,o=t[i][r],s=Math.floor(a/o);e[i]+=s*n,e[r]-=s*o*n}return i},null),cv.reduce((r,i)=>{if(jn(e[i]))return r;if(r){const a=e[r]%1;e[r]-=a,e[i]+=a*t[r][i]}return i},null)}function H8e(t){const e={};for(const[n,r]of Object.entries(t))r!==0&&(e[n]=r);return e}let Qo=class Co{constructor(e){const n=e.conversionAccuracy==="longterm"||!1;let r=n?z8e:W8e;e.matrix&&(r=e.matrix),this.values=e.values,this.loc=e.loc||Ci.create(),this.conversionAccuracy=n?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=r,this.isLuxonDuration=!0}static fromMillis(e,n){return Co.fromObject({milliseconds:e},n)}static fromObject(e,n={}){if(e==null||typeof e!="object")throw new Yo(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new Co({values:fO(e,Co.normalizeUnit),loc:Ci.fromObject(n),conversionAccuracy:n.conversionAccuracy,matrix:n.matrix})}static fromDurationLike(e){if(Lp(e))return Co.fromMillis(e);if(Co.isDuration(e))return e;if(typeof e=="object")return Co.fromObject(e);throw new Yo(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,n){const[r]=P8e(e);return r?Co.fromObject(r,n):Co.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,n){const[r]=N8e(e);return r?Co.fromObject(r,n):Co.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,n=null){if(!e)throw new Yo("need to specify a reason the Duration is invalid");const r=e instanceof lc?e:new lc(e,n);if(la.throwOnInvalid)throw new mje(r);return new Co({invalid:r})}static normalizeUnit(e){const n={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e&&e.toLowerCase()];if(!n)throw new Fle(e);return n}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,n={}){const r={...n,floor:n.round!==!1&&n.floor!==!1};return this.isValid?Jo.create(this.loc,r).formatDurationFromString(this,e):vq}toHuman(e={}){if(!this.isValid)return vq;const n=cv.map(r=>{const i=this.values[r];return jn(i)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:r.slice(0,-1)}).format(i)}).filter(r=>r);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(n)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return this.years!==0&&(e+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(e+=this.months+this.quarters*3+"M"),this.weeks!==0&&(e+=this.weeks+"W"),this.days!==0&&(e+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(e+="T"),this.hours!==0&&(e+=this.hours+"H"),this.minutes!==0&&(e+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(e+=cW(this.seconds+this.milliseconds/1e3,3)+"S"),e==="P"&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;const n=this.toMillis();return n<0||n>=864e5?null:(e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1},Wn.fromMillis(n,{zone:"UTC"}).toISOTime(e))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?Due(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const n=Co.fromDurationLike(e),r={};for(const i of cv)(o_(n.values,i)||o_(this.values,i))&&(r[i]=n.get(i)+this.get(i));return np(this,{values:r},!0)}minus(e){if(!this.isValid)return this;const n=Co.fromDurationLike(e);return this.plus(n.negate())}mapUnits(e){if(!this.isValid)return this;const n={};for(const r of Object.keys(this.values))n[r]=hue(e(this.values[r],r));return np(this,{values:n},!0)}get(e){return this[Co.normalizeUnit(e)]}set(e){if(!this.isValid)return this;const n={...this.values,...fO(e,Co.normalizeUnit)};return np(this,{values:n})}reconfigure({locale:e,numberingSystem:n,conversionAccuracy:r,matrix:i}={}){const o={loc:this.loc.clone({locale:e,numberingSystem:n}),matrix:i,conversionAccuracy:r};return np(this,o)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return yq(this.matrix,e),np(this,{values:e},!0)}rescale(){if(!this.isValid)return this;const e=H8e(this.normalize().shiftToAll().toObject());return np(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(o=>Co.normalizeUnit(o));const n={},r={},i=this.toObject();let a;for(const o of cv)if(e.indexOf(o)>=0){a=o;let s=0;for(const c in r)s+=this.matrix[c][o]*r[c],r[c]=0;Lp(i[o])&&(s+=i[o]);const l=Math.trunc(s);n[o]=l,r[o]=(s*1e3-l*1e3)/1e3}else Lp(i[o])&&(r[o]=i[o]);for(const o in r)r[o]!==0&&(n[a]+=o===a?r[o]:r[o]/this.matrix[a][o]);return yq(this.matrix,n),np(this,{values:n},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const e={};for(const n of Object.keys(this.values))e[n]=this.values[n]===0?0:-this.values[n];return np(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid||!this.loc.equals(e.loc))return!1;function n(r,i){return r===void 0||r===0?i===void 0||i===0:r===i}for(const r of cv)if(!n(this.values[r],e.values[r]))return!1;return!0}};const Vy="Invalid Interval";function Y8e(t,e){return!t||!t.isValid?ia.invalid("missing or invalid start"):!e||!e.isValid?ia.invalid("missing or invalid end"):e<t?ia.invalid("end before start",`The end of an interval must be after its start, but you had start=${t.toISO()} and end=${e.toISO()}`):null}class ia{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(e,n=null){if(!e)throw new Yo("need to specify a reason the Interval is invalid");const r=e instanceof lc?e:new lc(e,n);if(la.throwOnInvalid)throw new pje(r);return new ia({invalid:r})}static fromDateTimes(e,n){const r=T1(e),i=T1(n),a=Y8e(r,i);return a??new ia({start:r,end:i})}static after(e,n){const r=Qo.fromDurationLike(n),i=T1(e);return ia.fromDateTimes(i,i.plus(r))}static before(e,n){const r=Qo.fromDurationLike(n),i=T1(e);return ia.fromDateTimes(i.minus(r),i)}static fromISO(e,n){const[r,i]=(e||"").split("/",2);if(r&&i){let a,o;try{a=Wn.fromISO(r,n),o=a.isValid}catch{o=!1}let s,l;try{s=Wn.fromISO(i,n),l=s.isValid}catch{l=!1}if(o&&l)return ia.fromDateTimes(a,s);if(o){const c=Qo.fromISO(i,n);if(c.isValid)return ia.after(a,c)}else if(l){const c=Qo.fromISO(r,n);if(c.isValid)return ia.before(s,c)}}return ia.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static isInterval(e){return e&&e.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(e="milliseconds"){return this.isValid?this.toDuration(e).get(e):NaN}count(e="milliseconds",n){if(!this.isValid)return NaN;const r=this.start.startOf(e,n);let i;return n!=null&&n.useLocaleWeeks?i=this.end.reconfigure({locale:r.locale}):i=this.end,i=i.startOf(e,n),Math.floor(i.diff(r,e).get(e))+(i.valueOf()!==this.end.valueOf())}hasSame(e){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,e):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(e){return this.isValid?this.s>e:!1}isBefore(e){return this.isValid?this.e<=e:!1}contains(e){return this.isValid?this.s<=e&&this.e>e:!1}set({start:e,end:n}={}){return this.isValid?ia.fromDateTimes(e||this.s,n||this.e):this}splitAt(...e){if(!this.isValid)return[];const n=e.map(T1).filter(o=>this.contains(o)).sort((o,s)=>o.toMillis()-s.toMillis()),r=[];let{s:i}=this,a=0;for(;i<this.e;){const o=n[a]||this.e,s=+o>+this.e?this.e:o;r.push(ia.fromDateTimes(i,s)),i=s,a+=1}return r}splitBy(e){const n=Qo.fromDurationLike(e);if(!this.isValid||!n.isValid||n.as("milliseconds")===0)return[];let{s:r}=this,i=1,a;const o=[];for(;r<this.e;){const s=this.start.plus(n.mapUnits(l=>l*i));a=+s>+this.e?this.e:s,o.push(ia.fromDateTimes(r,a)),r=a,i+=1}return o}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s<e.e}abutsStart(e){return this.isValid?+this.e==+e.s:!1}abutsEnd(e){return this.isValid?+e.e==+this.s:!1}engulfs(e){return this.isValid?this.s<=e.s&&this.e>=e.e:!1}equals(e){return!this.isValid||!e.isValid?!1:this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;const n=this.s>e.s?this.s:e.s,r=this.e<e.e?this.e:e.e;return n>=r?null:ia.fromDateTimes(n,r)}union(e){if(!this.isValid)return this;const n=this.s<e.s?this.s:e.s,r=this.e>e.e?this.e:e.e;return ia.fromDateTimes(n,r)}static merge(e){const[n,r]=e.sort((i,a)=>i.s-a.s).reduce(([i,a],o)=>a?a.overlaps(o)||a.abutsStart(o)?[i,a.union(o)]:[i.concat([a]),o]:[i,o],[[],null]);return r&&n.push(r),n}static xor(e){let n=null,r=0;const i=[],a=e.map(l=>[{time:l.s,type:"s"},{time:l.e,type:"e"}]),o=Array.prototype.concat(...a),s=o.sort((l,c)=>l.time-c.time);for(const l of s)r+=l.type==="s"?1:-1,r===1?n=l.time:(n&&+n!=+l.time&&i.push(ia.fromDateTimes(n,l.time)),n=null);return ia.merge(i)}difference(...e){return ia.xor([this].concat(e)).map(n=>this.intersection(n)).filter(n=>n&&!n.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:Vy}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(e=uO,n={}){return this.isValid?Jo.create(this.s.loc.clone(n),e).formatInterval(this):Vy}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:Vy}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Vy}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:Vy}toFormat(e,{separator:n=" – "}={}){return this.isValid?`${this.s.toFormat(e)}${n}${this.e.toFormat(e)}`:Vy}toDuration(e,n){return this.isValid?this.e.diff(this.s,e,n):Qo.invalid(this.invalidReason)}mapEndpoints(e){return ia.fromDateTimes(e(this.s),e(this.e))}}class iE{static hasDST(e=la.defaultZone){const n=Wn.now().setZone(e).set({month:12});return!e.isUniversal&&n.offset!==n.set({month:6}).offset}static isValidIANAZone(e){return xh.isValidZone(e)}static normalizeZone(e){return vp(e,la.defaultZone)}static getStartOfWeek({locale:e=null,locObj:n=null}={}){return(n||Ci.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:n=null}={}){return(n||Ci.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:n=null}={}){return(n||Ci.create(e)).getWeekendDays().slice()}static months(e="long",{locale:n=null,numberingSystem:r=null,locObj:i=null,outputCalendar:a="gregory"}={}){return(i||Ci.create(n,r,a)).months(e)}static monthsFormat(e="long",{locale:n=null,numberingSystem:r=null,locObj:i=null,outputCalendar:a="gregory"}={}){return(i||Ci.create(n,r,a)).months(e,!0)}static weekdays(e="long",{locale:n=null,numberingSystem:r=null,locObj:i=null}={}){return(i||Ci.create(n,r,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:n=null,numberingSystem:r=null,locObj:i=null}={}){return(i||Ci.create(n,r,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return Ci.create(e).meridiems()}static eras(e="short",{locale:n=null}={}){return Ci.create(n,null,"gregory").eras(e)}static features(){return{relative:cue(),localeWeek:due()}}}function bq(t,e){const n=i=>i.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),r=n(e)-n(t);return Math.floor(Qo.fromMillis(r).as("days"))}function q8e(t,e,n){const r=[["years",(l,c)=>c.year-l.year],["quarters",(l,c)=>c.quarter-l.quarter+(c.year-l.year)*4],["months",(l,c)=>c.month-l.month+(c.year-l.year)*12],["weeks",(l,c)=>{const f=bq(l,c);return(f-f%7)/7}],["days",bq]],i={},a=t;let o,s;for(const[l,c]of r)n.indexOf(l)>=0&&(o=l,i[l]=c(t,e),s=a.plus(i),s>e?(i[l]--,t=a.plus(i),t>e&&(s=t,i[l]--,t=a.plus(i))):t=s);return[t,i,s,o]}function K8e(t,e,n,r){let[i,a,o,s]=q8e(t,e,n);const l=e-i,c=n.filter(h=>["hours","minutes","seconds","milliseconds"].indexOf(h)>=0);c.length===0&&(o<e&&(o=i.plus({[s]:1})),o!==i&&(a[s]=(a[s]||0)+l/(o-i)));const f=Qo.fromObject(a,r);return c.length>0?Qo.fromMillis(l,r).shiftTo(...c).plus(f):f}const G8e="missing Intl.DateTimeFormat.formatToParts support";function Br(t,e=n=>n){return{regex:t,deser:([n])=>e(Fje(n))}}const Z8e=" ",Oue=`[ ${Z8e}]`,Cue=new RegExp(Oue,"g");function Q8e(t){return t.replace(/\./g,"\\.?").replace(Cue,Oue)}function _q(t){return t.replace(/\./g,"").replace(Cue," ").toLowerCase()}function ju(t,e){return t===null?null:{regex:RegExp(t.map(Q8e).join("|")),deser:([n])=>t.findIndex(r=>_q(n)===_q(r))+e}}function wq(t,e){return{regex:t,deser:([,n,r])=>zC(n,r),groups:e}}function aE(t){return{regex:t,deser:([e])=>e}}function X8e(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function J8e(t,e){const n=zu(e),r=zu(e,"{2}"),i=zu(e,"{3}"),a=zu(e,"{4}"),o=zu(e,"{6}"),s=zu(e,"{1,2}"),l=zu(e,"{1,3}"),c=zu(e,"{1,6}"),f=zu(e,"{1,9}"),h=zu(e,"{2,4}"),p=zu(e,"{4,6}"),g=b=>({regex:RegExp(X8e(b.val)),deser:([w])=>w,literal:!0}),v=(b=>{if(t.literal)return g(b);switch(b.val){case"G":return ju(e.eras("short"),0);case"GG":return ju(e.eras("long"),0);case"y":return Br(c);case"yy":return Br(h,XB);case"yyyy":return Br(a);case"yyyyy":return Br(p);case"yyyyyy":return Br(o);case"M":return Br(s);case"MM":return Br(r);case"MMM":return ju(e.months("short",!0),1);case"MMMM":return ju(e.months("long",!0),1);case"L":return Br(s);case"LL":return Br(r);case"LLL":return ju(e.months("short",!1),1);case"LLLL":return ju(e.months("long",!1),1);case"d":return Br(s);case"dd":return Br(r);case"o":return Br(l);case"ooo":return Br(i);case"HH":return Br(r);case"H":return Br(s);case"hh":return Br(r);case"h":return Br(s);case"mm":return Br(r);case"m":return Br(s);case"q":return Br(s);case"qq":return Br(r);case"s":return Br(s);case"ss":return Br(r);case"S":return Br(l);case"SSS":return Br(i);case"u":return aE(f);case"uu":return aE(s);case"uuu":return Br(n);case"a":return ju(e.meridiems(),0);case"kkkk":return Br(a);case"kk":return Br(h,XB);case"W":return Br(s);case"WW":return Br(r);case"E":case"c":return Br(n);case"EEE":return ju(e.weekdays("short",!1),1);case"EEEE":return ju(e.weekdays("long",!1),1);case"ccc":return ju(e.weekdays("short",!0),1);case"cccc":return ju(e.weekdays("long",!0),1);case"Z":case"ZZ":return wq(new RegExp(`([+-]${s.source})(?::(${r.source}))?`),2);case"ZZZ":return wq(new RegExp(`([+-]${s.source})(${r.source})?`),2);case"z":return aE(/[a-z_+-/]{1,256}?/i);case" ":return aE(/[^\S\n\r]/);default:return g(b)}})(t)||{invalidReason:G8e};return v.token=t,v}const eHe={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function tHe(t,e,n){const{type:r,value:i}=t;if(r==="literal"){const l=/^\s+$/.test(i);return{literal:!l,val:l?" ":i}}const a=e[r];let o=r;r==="hour"&&(e.hour12!=null?o=e.hour12?"hour12":"hour24":e.hourCycle!=null?e.hourCycle==="h11"||e.hourCycle==="h12"?o="hour12":o="hour24":o=n.hour12?"hour12":"hour24");let s=eHe[o];if(typeof s=="object"&&(s=s[a]),s)return{literal:!1,val:s}}function nHe(t){return[`^${t.map(n=>n.regex).reduce((n,r)=>`${n}(${r.source})`,"")}$`,t]}function rHe(t,e,n){const r=t.match(e);if(r){const i={};let a=1;for(const o in n)if(o_(n,o)){const s=n[o],l=s.groups?s.groups+1:1;!s.literal&&s.token&&(i[s.token.val[0]]=s.deser(r.slice(a,a+l))),a+=l}return[r,i]}else return[r,{}]}function iHe(t){const e=a=>{switch(a){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let n=null,r;return jn(t.z)||(n=xh.create(t.z)),jn(t.Z)||(n||(n=new Ss(t.Z)),r=t.Z),jn(t.q)||(t.M=(t.q-1)*3+1),jn(t.h)||(t.h<12&&t.a===1?t.h+=12:t.h===12&&t.a===0&&(t.h=0)),t.G===0&&t.y&&(t.y=-t.y),jn(t.u)||(t.S=uW(t.u)),[Object.keys(t).reduce((a,o)=>{const s=e(o);return s&&(a[s]=t[o]),a},{}),n,r]}let IN=null;function aHe(){return IN||(IN=Wn.fromMillis(1555555555555)),IN}function oHe(t,e){if(t.literal)return t;const n=Jo.macroTokenToFormatOpts(t.val),r=$ue(n,e);return r==null||r.includes(void 0)?t:r}function Iue(t,e){return Array.prototype.concat(...t.map(n=>oHe(n,e)))}class Mue{constructor(e,n){if(this.locale=e,this.format=n,this.tokens=Iue(Jo.parseFormat(n),e),this.units=this.tokens.map(r=>J8e(r,e)),this.disqualifyingUnit=this.units.find(r=>r.invalidReason),!this.disqualifyingUnit){const[r,i]=nHe(this.units);this.regex=RegExp(r,"i"),this.handlers=i}}explainFromTokens(e){if(this.isValid){const[n,r]=rHe(e,this.regex,this.handlers),[i,a,o]=r?iHe(r):[null,null,void 0];if(o_(r,"a")&&o_(r,"H"))throw new db("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:this.tokens,regex:this.regex,rawMatches:n,matches:r,result:i,zone:a,specificOffset:o}}else return{input:e,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function Rue(t,e,n){return new Mue(t,n).explainFromTokens(e)}function sHe(t,e,n){const{result:r,zone:i,specificOffset:a,invalidReason:o}=Rue(t,e,n);return[r,i,a,o]}function $ue(t,e){if(!t)return null;const r=Jo.create(e,t).dtFormatter(aHe()),i=r.formatToParts(),a=r.resolvedOptions();return i.map(o=>tHe(o,t,a))}const MN="Invalid DateTime",lHe=864e13;function cx(t){return new lc("unsupported zone",`the zone "${t.name}" is not supported`)}function RN(t){return t.weekData===null&&(t.weekData=cO(t.c)),t.weekData}function $N(t){return t.localWeekData===null&&(t.localWeekData=cO(t.c,t.loc.getMinDaysInFirstWeek(),t.loc.getStartOfWeek())),t.localWeekData}function Bg(t,e){const n={ts:t.ts,zone:t.zone,c:t.c,o:t.o,loc:t.loc,invalid:t.invalid};return new Wn({...n,...e,old:n})}function Pue(t,e,n){let r=t-e*60*1e3;const i=n.offset(r);if(e===i)return[r,e];r-=(i-e)*60*1e3;const a=n.offset(r);return i===a?[r,i]:[t-Math.min(i,a)*60*1e3,Math.max(i,a)]}function oE(t,e){t+=e*60*1e3;const n=new Date(t);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function BT(t,e,n){return Pue(WC(t),e,n)}function xq(t,e){const n=t.o,r=t.c.year+Math.trunc(e.years),i=t.c.month+Math.trunc(e.months)+Math.trunc(e.quarters)*3,a={...t.c,year:r,month:i,day:Math.min(t.c.day,dO(r,i))+Math.trunc(e.days)+Math.trunc(e.weeks)*7},o=Qo.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),s=WC(a);let[l,c]=Pue(s,n,t.zone);return o!==0&&(l+=o,c=t.zone.offset(l)),{ts:l,o:c}}function By(t,e,n,r,i,a){const{setZone:o,zone:s}=n;if(t&&Object.keys(t).length!==0||e){const l=e||s,c=Wn.fromObject(t,{...n,zone:l,specificOffset:a});return o?c:c.setZone(s)}else return Wn.invalid(new lc("unparsable",`the input "${i}" can't be parsed as ${r}`))}function sE(t,e,n=!0){return t.isValid?Jo.create(Ci.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(t,e):null}function PN(t,e){const n=t.c.year>9999||t.c.year<0;let r="";return n&&t.c.year>=0&&(r+="+"),r+=Ia(t.c.year,n?6:4),e?(r+="-",r+=Ia(t.c.month),r+="-",r+=Ia(t.c.day)):(r+=Ia(t.c.month),r+=Ia(t.c.day)),r}function Sq(t,e,n,r,i,a){let o=Ia(t.c.hour);return e?(o+=":",o+=Ia(t.c.minute),(t.c.millisecond!==0||t.c.second!==0||!n)&&(o+=":")):o+=Ia(t.c.minute),(t.c.millisecond!==0||t.c.second!==0||!n)&&(o+=Ia(t.c.second),(t.c.millisecond!==0||!r)&&(o+=".",o+=Ia(t.c.millisecond,3))),i&&(t.isOffsetFixed&&t.offset===0&&!a?o+="Z":t.o<0?(o+="-",o+=Ia(Math.trunc(-t.o/60)),o+=":",o+=Ia(Math.trunc(-t.o%60))):(o+="+",o+=Ia(Math.trunc(t.o/60)),o+=":",o+=Ia(Math.trunc(t.o%60)))),a&&(o+="["+t.zone.ianaName+"]"),o}const Lue={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},uHe={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},cHe={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Nue=["year","month","day","hour","minute","second","millisecond"],dHe=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],fHe=["year","ordinal","hour","minute","second","millisecond"];function hHe(t){const e={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[t.toLowerCase()];if(!e)throw new Fle(t);return e}function Aq(t){switch(t.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return hHe(t)}}function pHe(t){return WT[t]||(UT===void 0&&(UT=la.now()),WT[t]=t.offset(UT)),WT[t]}function kq(t,e){const n=vp(e.zone,la.defaultZone);if(!n.isValid)return Wn.invalid(cx(n));const r=Ci.fromObject(e);let i,a;if(jn(t.year))i=la.now();else{for(const l of Nue)jn(t[l])&&(t[l]=Lue[l]);const o=lue(t)||uue(t);if(o)return Wn.invalid(o);const s=pHe(n);[i,a]=BT(t,s,n)}return new Wn({ts:i,zone:n,loc:r,o:a})}function Eq(t,e,n){const r=jn(n.round)?!0:n.round,i=(o,s)=>(o=cW(o,r||n.calendary?0:2,!0),e.loc.clone(n).relFormatter(n).format(o,s)),a=o=>n.calendary?e.hasSame(t,o)?0:e.startOf(o).diff(t.startOf(o),o).get(o):e.diff(t,o).get(o);if(n.unit)return i(a(n.unit),n.unit);for(const o of n.units){const s=a(o);if(Math.abs(s)>=1)return i(s,o)}return i(t>e?-0:0,n.units[n.units.length-1])}function Tq(t){let e={},n;return t.length>0&&typeof t[t.length-1]=="object"?(e=t[t.length-1],n=Array.from(t).slice(0,t.length-1)):n=Array.from(t),[e,n]}let UT,WT={};class Wn{constructor(e){const n=e.zone||la.defaultZone;let r=e.invalid||(Number.isNaN(e.ts)?new lc("invalid input"):null)||(n.isValid?null:cx(n));this.ts=jn(e.ts)?la.now():e.ts;let i=null,a=null;if(!r)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(n))[i,a]=[e.old.c,e.old.o];else{const s=Lp(e.o)&&!e.old?e.o:n.offset(this.ts);i=oE(this.ts,s),r=Number.isNaN(i.year)?new lc("invalid input"):null,i=r?null:i,a=r?null:s}this._zone=n,this.loc=e.loc||Ci.create(),this.invalid=r,this.weekData=null,this.localWeekData=null,this.c=i,this.o=a,this.isLuxonDateTime=!0}static now(){return new Wn({})}static local(){const[e,n]=Tq(arguments),[r,i,a,o,s,l,c]=n;return kq({year:r,month:i,day:a,hour:o,minute:s,second:l,millisecond:c},e)}static utc(){const[e,n]=Tq(arguments),[r,i,a,o,s,l,c]=n;return e.zone=Ss.utcInstance,kq({year:r,month:i,day:a,hour:o,minute:s,second:l,millisecond:c},e)}static fromJSDate(e,n={}){const r=zje(e)?e.valueOf():NaN;if(Number.isNaN(r))return Wn.invalid("invalid input");const i=vp(n.zone,la.defaultZone);return i.isValid?new Wn({ts:r,zone:i,loc:Ci.fromObject(n)}):Wn.invalid(cx(i))}static fromMillis(e,n={}){if(Lp(e))return e<-864e13||e>lHe?Wn.invalid("Timestamp out of range"):new Wn({ts:e,zone:vp(n.zone,la.defaultZone),loc:Ci.fromObject(n)});throw new Yo(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,n={}){if(Lp(e))return new Wn({ts:e*1e3,zone:vp(n.zone,la.defaultZone),loc:Ci.fromObject(n)});throw new Yo("fromSeconds requires a numerical input")}static fromObject(e,n={}){e=e||{};const r=vp(n.zone,la.defaultZone);if(!r.isValid)return Wn.invalid(cx(r));const i=Ci.fromObject(n),a=fO(e,Aq),{minDaysInFirstWeek:o,startOfWeek:s}=fq(a,i),l=la.now(),c=jn(n.specificOffset)?r.offset(l):n.specificOffset,f=!jn(a.ordinal),h=!jn(a.year),p=!jn(a.month)||!jn(a.day),g=h||p,y=a.weekYear||a.weekNumber;if((g||f)&&y)throw new db("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(p&&f)throw new db("Can't mix ordinal dates with month/day");const v=y||a.weekday&&!g;let b,w,S=oE(l,c);v?(b=dHe,w=uHe,S=cO(S,o,s)):f?(b=fHe,w=cHe,S=CN(S)):(b=Nue,w=Lue);let T=!1;for(const M of b){const C=a[M];jn(C)?T?a[M]=w[M]:a[M]=S[M]:T=!0}const _=v?Bje(a,o,s):f?Uje(a):lue(a),E=_||uue(a);if(E)return Wn.invalid(E);const D=v?cq(a,o,s):f?dq(a):a,[O,V]=BT(D,c,r),P=new Wn({ts:O,zone:r,o:V,loc:i});return a.weekday&&g&&e.weekday!==P.weekday?Wn.invalid("mismatched weekday",`you can't specify both a weekday of ${a.weekday} and a date of ${P.toISO()}`):P.isValid?P:Wn.invalid(P.invalid)}static fromISO(e,n={}){const[r,i]=M8e(e);return By(r,i,n,"ISO 8601",e)}static fromRFC2822(e,n={}){const[r,i]=R8e(e);return By(r,i,n,"RFC 2822",e)}static fromHTTP(e,n={}){const[r,i]=$8e(e);return By(r,i,n,"HTTP",n)}static fromFormat(e,n,r={}){if(jn(e)||jn(n))throw new Yo("fromFormat requires an input string and a format");const{locale:i=null,numberingSystem:a=null}=r,o=Ci.fromOpts({locale:i,numberingSystem:a,defaultToEN:!0}),[s,l,c,f]=sHe(o,e,n);return f?Wn.invalid(f):By(s,l,r,`format ${n}`,e,c)}static fromString(e,n,r={}){return Wn.fromFormat(e,n,r)}static fromSQL(e,n={}){const[r,i]=U8e(e);return By(r,i,n,"SQL",e)}static invalid(e,n=null){if(!e)throw new Yo("need to specify a reason the DateTime is invalid");const r=e instanceof lc?e:new lc(e,n);if(la.throwOnInvalid)throw new hje(r);return new Wn({invalid:r})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,n={}){const r=$ue(e,Ci.fromObject(n));return r?r.map(i=>i?i.val:null).join(""):null}static expandFormat(e,n={}){return Iue(Jo.parseFormat(e),Ci.fromObject(n)).map(i=>i.val).join("")}static resetCache(){UT=void 0,WT={}}get(e){return this[e]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?RN(this).weekYear:NaN}get weekNumber(){return this.isValid?RN(this).weekNumber:NaN}get weekday(){return this.isValid?RN(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?$N(this).weekday:NaN}get localWeekNumber(){return this.isValid?$N(this).weekNumber:NaN}get localWeekYear(){return this.isValid?$N(this).weekYear:NaN}get ordinal(){return this.isValid?CN(this.c).ordinal:NaN}get monthShort(){return this.isValid?iE.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?iE.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?iE.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?iE.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const e=864e5,n=6e4,r=WC(this.c),i=this.zone.offset(r-e),a=this.zone.offset(r+e),o=this.zone.offset(r-i*n),s=this.zone.offset(r-a*n);if(o===s)return[this];const l=r-o*n,c=r-s*n,f=oE(l,o),h=oE(c,s);return f.hour===h.hour&&f.minute===h.minute&&f.second===h.second&&f.millisecond===h.millisecond?[Bg(this,{ts:l}),Bg(this,{ts:c})]:[this]}get isInLeapYear(){return qA(this.year)}get daysInMonth(){return dO(this.year,this.month)}get daysInYear(){return this.isValid?Db(this.year):NaN}get weeksInWeekYear(){return this.isValid?US(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?US(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){const{locale:n,numberingSystem:r,calendar:i}=Jo.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:n,numberingSystem:r,outputCalendar:i}}toUTC(e=0,n={}){return this.setZone(Ss.instance(e),n)}toLocal(){return this.setZone(la.defaultZone)}setZone(e,{keepLocalTime:n=!1,keepCalendarTime:r=!1}={}){if(e=vp(e,la.defaultZone),e.equals(this.zone))return this;if(e.isValid){let i=this.ts;if(n||r){const a=e.offset(this.ts),o=this.toObject();[i]=BT(o,a,e)}return Bg(this,{ts:i,zone:e})}else return Wn.invalid(cx(e))}reconfigure({locale:e,numberingSystem:n,outputCalendar:r}={}){const i=this.loc.clone({locale:e,numberingSystem:n,outputCalendar:r});return Bg(this,{loc:i})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const n=fO(e,Aq),{minDaysInFirstWeek:r,startOfWeek:i}=fq(n,this.loc),a=!jn(n.weekYear)||!jn(n.weekNumber)||!jn(n.weekday),o=!jn(n.ordinal),s=!jn(n.year),l=!jn(n.month)||!jn(n.day),c=s||l,f=n.weekYear||n.weekNumber;if((c||o)&&f)throw new db("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(l&&o)throw new db("Can't mix ordinal dates with month/day");let h;a?h=cq({...cO(this.c,r,i),...n},r,i):jn(n.ordinal)?(h={...this.toObject(),...n},jn(n.day)&&(h.day=Math.min(dO(h.year,h.month),h.day))):h=dq({...CN(this.c),...n});const[p,g]=BT(h,this.o,this.zone);return Bg(this,{ts:p,o:g})}plus(e){if(!this.isValid)return this;const n=Qo.fromDurationLike(e);return Bg(this,xq(this,n))}minus(e){if(!this.isValid)return this;const n=Qo.fromDurationLike(e).negate();return Bg(this,xq(this,n))}startOf(e,{useLocaleWeeks:n=!1}={}){if(!this.isValid)return this;const r={},i=Qo.normalizeUnit(e);switch(i){case"years":r.month=1;case"quarters":case"months":r.day=1;case"weeks":case"days":r.hour=0;case"hours":r.minute=0;case"minutes":r.second=0;case"seconds":r.millisecond=0;break}if(i==="weeks")if(n){const a=this.loc.getStartOfWeek(),{weekday:o}=this;o<a&&(r.weekNumber=this.weekNumber-1),r.weekday=a}else r.weekday=1;if(i==="quarters"){const a=Math.ceil(this.month/3);r.month=(a-1)*3+1}return this.set(r)}endOf(e,n){return this.isValid?this.plus({[e]:1}).startOf(e,n).minus(1):this}toFormat(e,n={}){return this.isValid?Jo.create(this.loc.redefaultToEN(n)).formatDateTimeFromString(this,e):MN}toLocaleString(e=uO,n={}){return this.isValid?Jo.create(this.loc.clone(n),e).formatDateTime(this):MN}toLocaleParts(e={}){return this.isValid?Jo.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:n=!1,suppressMilliseconds:r=!1,includeOffset:i=!0,extendedZone:a=!1}={}){if(!this.isValid)return null;const o=e==="extended";let s=PN(this,o);return s+="T",s+=Sq(this,o,n,r,i,a),s}toISODate({format:e="extended"}={}){return this.isValid?PN(this,e==="extended"):null}toISOWeekDate(){return sE(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:n=!1,includeOffset:r=!0,includePrefix:i=!1,extendedZone:a=!1,format:o="extended"}={}){return this.isValid?(i?"T":"")+Sq(this,o==="extended",n,e,r,a):null}toRFC2822(){return sE(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return sE(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?PN(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:n=!1,includeOffsetSpace:r=!0}={}){let i="HH:mm:ss.SSS";return(n||e)&&(r&&(i+=" "),n?i+="z":e&&(i+="ZZ")),sE(this,i,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():MN}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};const n={...this.c};return e.includeConfig&&(n.outputCalendar=this.outputCalendar,n.numberingSystem=this.loc.numberingSystem,n.locale=this.loc.locale),n}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,n="milliseconds",r={}){if(!this.isValid||!e.isValid)return Qo.invalid("created by diffing an invalid DateTime");const i={locale:this.locale,numberingSystem:this.numberingSystem,...r},a=jje(n).map(Qo.normalizeUnit),o=e.valueOf()>this.valueOf(),s=o?this:e,l=o?e:this,c=K8e(s,l,a,i);return o?c.negate():c}diffNow(e="milliseconds",n={}){return this.diff(Wn.now(),e,n)}until(e){return this.isValid?ia.fromDateTimes(this,e):this}hasSame(e,n,r){if(!this.isValid)return!1;const i=e.valueOf(),a=this.setZone(e.zone,{keepLocalTime:!0});return a.startOf(n,r)<=i&&i<=a.endOf(n,r)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;const n=e.base||Wn.fromObject({},{zone:this.zone}),r=e.padding?this<n?-e.padding:e.padding:0;let i=["years","months","days","hours","minutes","seconds"],a=e.unit;return Array.isArray(e.unit)&&(i=e.unit,a=void 0),Eq(n,this.plus(r),{...e,numeric:"always",units:i,unit:a})}toRelativeCalendar(e={}){return this.isValid?Eq(e.base||Wn.fromObject({},{zone:this.zone}),this,{...e,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...e){if(!e.every(Wn.isDateTime))throw new Yo("min requires all arguments be DateTimes");return hq(e,n=>n.valueOf(),Math.min)}static max(...e){if(!e.every(Wn.isDateTime))throw new Yo("max requires all arguments be DateTimes");return hq(e,n=>n.valueOf(),Math.max)}static fromFormatExplain(e,n,r={}){const{locale:i=null,numberingSystem:a=null}=r,o=Ci.fromOpts({locale:i,numberingSystem:a,defaultToEN:!0});return Rue(o,e,n)}static fromStringExplain(e,n,r={}){return Wn.fromFormatExplain(e,n,r)}static buildFormatParser(e,n={}){const{locale:r=null,numberingSystem:i=null}=n,a=Ci.fromOpts({locale:r,numberingSystem:i,defaultToEN:!0});return new Mue(a,e)}static fromFormatParser(e,n,r={}){if(jn(e)||jn(n))throw new Yo("fromFormatParser requires an input string and a format parser");const{locale:i=null,numberingSystem:a=null}=r,o=Ci.fromOpts({locale:i,numberingSystem:a,defaultToEN:!0});if(!o.equals(n.locale))throw new Yo(`fromFormatParser called with a locale of ${o}, but the format parser was created for ${n.locale}`);const{result:s,zone:l,specificOffset:c,invalidReason:f}=n.explainFromTokens(e);return f?Wn.invalid(f):By(s,l,r,`format ${n.format}`,e,c)}static get DATE_SHORT(){return uO}static get DATE_MED(){return Vle}static get DATE_MED_WITH_WEEKDAY(){return gje}static get DATE_FULL(){return Ble}static get DATE_HUGE(){return Ule}static get TIME_SIMPLE(){return Wle}static get TIME_WITH_SECONDS(){return zle}static get TIME_WITH_SHORT_OFFSET(){return jle}static get TIME_WITH_LONG_OFFSET(){return Hle}static get TIME_24_SIMPLE(){return Yle}static get TIME_24_WITH_SECONDS(){return qle}static get TIME_24_WITH_SHORT_OFFSET(){return Kle}static get TIME_24_WITH_LONG_OFFSET(){return Gle}static get DATETIME_SHORT(){return Zle}static get DATETIME_SHORT_WITH_SECONDS(){return Qle}static get DATETIME_MED(){return Xle}static get DATETIME_MED_WITH_SECONDS(){return Jle}static get DATETIME_MED_WITH_WEEKDAY(){return vje}static get DATETIME_FULL(){return eue}static get DATETIME_FULL_WITH_SECONDS(){return tue}static get DATETIME_HUGE(){return nue}static get DATETIME_HUGE_WITH_SECONDS(){return rue}}function T1(t){if(Wn.isDateTime(t))return t;if(t&&t.valueOf&&Lp(t.valueOf()))return Wn.fromJSDate(t);if(t&&typeof t=="object")return Wn.fromObject(t);throw new Yo(`Unknown datetime argument: ${t}, of type ${typeof t}`)}const Dd={getCookie(t,e){const n=document.cookie.split(";");for(let r=0;r<n.length;r++){const i=n[r].trim();if(i.startsWith(t+"="))return i.substring(t.length+1)}return null},setSessionCookie(t,e,n="/"){document.cookie=`${t}=${encodeURIComponent(e)}; path=${n}; SameSite=Lax`}},mHe=t=>{try{const e=new Date(t??""),r=new Date().getTime()-e.getTime(),i=Math.floor(r/(1e3*60*60)),a=Math.floor(r%(1e3*60*60)/(1e3*60));if(i<=3)return i===0?`${a} minute${a!==1?"s":""} ago`:`${i} hour${i!==1?"s":""} ${a} minute${a!==1?"s":""} ago`}catch(e){console.error("isShowShortDate -> error",e)}},Dq=()=>Dd.getCookie("account.last_prefered_timezone")||"Asia/Singapore",Fue=t=>{try{const e=new Date(t).toISOString(),n=Wn.fromISO(e).setZone(Dq()).toFormat(l5e);return String(n)}catch(e){console.error("formatDateValue",{e,dateStr:t,tz:Dq()})}return t},gHe=t=>{try{if(!t)return"";const e=new Date(t);if(isNaN(e.getTime()))throw new Error("Invalid date:"+t);const n=e.toISOString(),r=mHe(n),i=Fue(n);return r||String(i)}catch{return String(t)}},vHe=Qe({__name:"SectionNewRendition",setup(t,{expose:e}){const{getEnvVariable:n}=Al(),r=N=>{var _e;const U=n("BASE_REVIEW_URL"),ee=yn(),le=(_e=Qi({type:"review_rendition",config:{reviewDomain:U,ws_code:ee,scene_id:N.item.id,rendition_id:N.id,take_id:N.item.entity_id}}))==null?void 0:_e.url;window.open(le)},i=hc("switchInstance"),a=(N,U)=>{var _e;const ee=n("BASE_URL"),le=(_e=Qi({type:"hub_rendition",config:{baseDomain:ee,ws_code:yn(),scene_id:N.item.id,rendition_id:N.id}}))==null?void 0:_e.url;if(U.metaKey||U.ctrlKey){window.open(le,"_blank");return}else{if(i){i("scene_hub",{tab:"",id:N.item.id||""},{showLoading:!1});return}window.location.href=le}window.open(le)},o=Z(()=>{var N;return(N=w.value[w.value.length-1])==null?void 0:N.id}),s=Ht({canLoadMore:!0,failedRequest:!1}),l=async()=>{var N,U,ee,le;try{if(!o.value||!s.canLoadMore||h.value)return!0;h.value=!0;const _e=await p.getNextRendition(o.value),be=(U=(N=_e==null?void 0:_e.recent_activities)==null?void 0:N.new_renditions)==null?void 0:U.data;if(be)be.length==0&&(s.canLoadMore=!1),w.value=w.value.concat(((le=(ee=_e==null?void 0:_e.recent_activities)==null?void 0:ee.new_renditions)==null?void 0:le.data)||[]);else throw new Error("Failed to get more data")}catch(_e){s.failedRequest=!0,console.error("getMoreData -> error",_e)}finally{h.value=!1}},c=re(null),f=re(null);zt(()=>{S()}),Wae(f,async()=>{await l()},{distance:10,canLoadMore:()=>!h.value});const h=re(!1),p=VC(),g=re({}),y=async()=>{var U,ee,le,_e;let N;try{h.value=!0,N=await p.getRecentActivities("recent_activities.new_renditions"),b.value=(ee=(U=N==null?void 0:N.recent_activities)==null?void 0:U.new_renditions)==null?void 0:ee.meta["X-Tsr-signature"]}catch(be){console.error("getRecentNewRendition -> error",be)}finally{h.value=!1}return((_e=(le=N==null?void 0:N.recent_activities)==null?void 0:le.new_renditions)==null?void 0:_e.data)||[]},v=async()=>{var U,ee;const N=await p.getRecentActivities("recent_activities.new_renditions",ny);return{signature:(ee=(U=N==null?void 0:N.recent_activities)==null?void 0:U.new_renditions)==null?void 0:ee.meta["X-Tsr-signature"]}},b=re(void 0);ay("rendition",v,b);const w=re([]),S=async()=>{var N,U;w.value=[],w.value=await y(),_.value=((U=(N=c.value)==null?void 0:N.parentElement)==null?void 0:U.offsetHeight)||200,h.value=!1};e({resetList:S});const T=re(null),{height:_}=hh(T),E=fr(),{permissionMap:D}=Pn(E),O=(N,U)=>{const ee=n("BASE_URL"),le=Qi({type:"hub_rendition",config:{baseDomain:ee,ws_code:yn(),scene_id:N,rendition_id:U}}).url;navigator.clipboard.writeText(le).then(()=>{}).catch(_e=>{console.error("Failed to copy: ",_e)})},{deleteRendition:V}=p,{showErrorSnackbar:P}=jA(),M=()=>{let N="Update failed";navigator.onLine||(N="Network error"),P({label:N})},{refreshState:C}=Pn(ks()),F=async N=>{try{await V({scene_id:N.item.id,rendition_id:N.id})&&(C.value.rendition=!0,w.value=w.value.filter(ee=>ee.id!==N.id))}catch(U){M(),console.error("handleDelete -> error",U)}},W=Z(()=>Object.fromEntries(w.value.map(N=>[N.id,H(N)]))),H=N=>N!=null&&N.item?{items:(N==null?void 0:N.entity_path.map(ee=>{var _e;const le=ee.is_parent_item?"scene_hub":"project";return{name:ee.name,url:(_e=Qi({type:le,config:{baseDomain:n("BASE_URL"),ws_code:yn(),entity_id:ee.id,scene_id:ee.is_parent_item?ee.id:void 0}}))==null?void 0:_e.url,disabled:!1,id:ee.id,isHighlight:ee.is_parent_item=!0}}))||[],lastItemWidth:125,url:"",width:200,canCopy:!1,numberOfVisibleItems:2}:void 0,j={getEnvVariable:n,handleOpenInReview:r,switchInstance:i,handleOpenInHub:a,lastItemId:o,states:s,getMoreData:l,sectionRef:c,listRef:f,loading:h,peopleCard:p,hoveredMap:g,getRecentNewRendition:y,getUpdateSignature:v,iniSignature:b,list:w,resetList:S,recentlyAccessSceneRef:T,height:_,store:E,permissionMap:D,handleCopy:O,deleteRendition:V,showErrorSnackbar:P,showError:M,refreshState:C,handleDelete:F,breadcrumbConfig:W,createBreadCrumbProp:H,get ArboTooltip(){return dr},get TessRenditionCard(){return Sae},get TessTruncatedText(){return ty},get TessBreadcrumb(){return vC},get ArboButton(){return Nt},NewRenditionSkeleton:lje,InfoVisual:Oc,get formatDate(){return gHe},get formatDateValue(){return Fue}};return Object.defineProperty(j,"__isScriptSetup",{enumerable:!1,value:!0}),j}}),yHe={ref:"sectionRef",class:"section-renditions-wrapper"},bHe={ref:"listRef",class:"section-renditions"},_He={key:0,class:"empty-data"},wHe=["onMouseover","onMouseleave"],xHe={class:"timestamp"},SHe={key:0,class:"rendition-breadcrumb"},AHe={class:"name"};function kHe(t,e,n,r,i,a){return R(),Y("div",yHe,[X("div",bHe,[r.list.length==0&&!r.loading?(R(),Y("div",_He,[he(r.InfoVisual,{"visual-name":"NoData",label:"No activity available.",height:150})])):pe("v-if",!0),(R(!0),Y(wt,null,Qt(r.list,o=>{var s,l,c,f;return R(),Y("div",{key:o.id,class:Fe(["rendition-item",{hovered:r.hoveredMap[o.id]}]),onMouseover:()=>{r.hoveredMap[o.id]||(r.hoveredMap[o.id]=1)},onMouseleave:()=>{r.hoveredMap[o.id]===1&&(r.hoveredMap[o.id]=0)}},[he(r.ArboTooltip,{content:r.formatDateValue(o.created_at),delay:[1e3,0]},{default:ze(()=>[X("div",xHe,it(r.formatDate(o.created_at)),1)]),_:2},1032,["content"]),he(r.TessRenditionCard,Ft({class:"rendition-card"},{ref_for:!0},{renditionData:o,disabled:!1,hasNewComment:!1,isDeletable:((l=(s=o.permission)==null?void 0:s.media)==null?void 0:l.has_delete_rendition_permission)==1,isReadOnly:!1,active:!1,hovered:r.hoveredMap[o.id]>0,canDelete:((f=(c=o.permission)==null?void 0:c.media)==null?void 0:f.has_delete_rendition_permission)==1,canOpenReview:r.permissionMap.redirectPermission.review,canOpenSceneHub:r.permissionMap.redirectPermission.scene_hub,customStyle:{borderWidth:2,borderColor:"white"}},{tooltip:"",onOpenHub:(h,p)=>r.handleOpenInHub(o,p),onShowPopup:h=>r.hoveredMap[o.id]=2,onHidePopup:h=>r.hoveredMap[o.id]=0,onOpenReview:()=>r.handleOpenInReview(o),onClick:Rt(h=>r.handleOpenInHub(o,h),["stop"]),onCopy:h=>r.handleCopy(o.item.id,h),onDelete:()=>r.handleDelete(o)}),{title:ze(()=>{var h;return[r.breadcrumbConfig[o.id]?(R(),Y("div",SHe,[he(r.TessBreadcrumb,Ft({ref_for:!0},r.breadcrumbConfig[o.id],{url:"",items:((h=r.breadcrumbConfig[o.id])==null?void 0:h.items)||[],disabled:"true"}),null,16,["items"])])):pe("v-if",!0)]}),timestamp:ze(()=>[X("div",AHe,[he(r.TessTruncatedText,{value:o.name,"max-width":190},null,8,["value"])])]),_:2,__:[0]},1040,["onOpenHub","onShowPopup","onHidePopup","onOpenReview","onClick","onCopy","onDelete"])],42,wHe)}),128)),X("div",null,[r.states.failedRequest?(R(),Re(r.ArboButton,{key:0,label:"Retry",onClick:r.getMoreData})):pe("v-if",!0)]),r.loading&&r.states.canLoadMore?(R(),Y(wt,{key:1},Qt(3,o=>he(r.NewRenditionSkeleton,{key:o})),64)):pe("v-if",!0)],512)],512)}const EHe=Nn(vHe,[["render",kHe],["__scopeId","data-v-0c7bda83"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/SectionNewRendition.vue"]]),THe={},DHe={class:"pi-skeleton"};function OHe(t,e){return R(),Y("div",DHe,e[0]||(e[0]=[Vv('<div class="pi-skeleton-avatar" data-v-ee72a1a9></div><div class="pi-skeleton-body" data-v-ee72a1a9><div class="pi-skeleton-details" data-v-ee72a1a9><div class="pi-skeleton-row" data-v-ee72a1a9><div class="pi-skeleton-line" style="width:80%;" data-v-ee72a1a9></div></div><div class="pi-skeleton-row" data-v-ee72a1a9><div class="pi-skeleton-line large" style="width:50%;" data-v-ee72a1a9></div><div class="pi-skeleton-row" data-v-ee72a1a9><div class="pi-skeleton-button" data-v-ee72a1a9></div><div class="pi-skeleton-button" data-v-ee72a1a9></div></div></div><div class="pi-skeleton-row" data-v-ee72a1a9><div class="pi-skeleton-row" data-v-ee72a1a9><div class="pi-skeleton-button" style="width:140px;" data-v-ee72a1a9></div><div class="pi-skeleton-button" style="width:140px;" data-v-ee72a1a9></div></div><div class="pi-skeleton-row" data-v-ee72a1a9><div class="pi-skeleton-button" style="width:24px;" data-v-ee72a1a9></div><div class="pi-skeleton-button" style="width:100px;" data-v-ee72a1a9></div></div></div><div class="pi-skeleton-line" data-v-ee72a1a9></div></div></div><div class="pi-skeleton-status" data-v-ee72a1a9></div>',3)]))}const Vue=Nn(THe,[["render",OHe],["__scopeId","data-v-ee72a1a9"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/shared/GirdItemSkeleton.vue"]]);var dx={exports:{}};/**
173
+ */var K7;function Mze(){return K7||(K7=1,function(t,e){(function(n){var r;if(t.exports=n(),r=!0,!r){var i=window.Cookies,a=window.Cookies=n();a.noConflict=function(){return window.Cookies=i,a}}})(function(){function n(){for(var a=0,o={};a<arguments.length;a++){var s=arguments[a];for(var l in s)o[l]=s[l]}return o}function r(a){return a.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}function i(a){function o(){}function s(c,f,h){if(!(typeof document>"u")){h=n({path:"/"},o.defaults,h),typeof h.expires=="number"&&(h.expires=new Date(new Date*1+h.expires*864e5)),h.expires=h.expires?h.expires.toUTCString():"";try{var p=JSON.stringify(f);/^[\{\[]/.test(p)&&(f=p)}catch{}f=a.write?a.write(f,c):encodeURIComponent(String(f)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),c=encodeURIComponent(String(c)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var g="";for(var y in h)h[y]&&(g+="; "+y,h[y]!==!0&&(g+="="+h[y].split(";")[0]));return document.cookie=c+"="+f+g}}function l(c,f){if(!(typeof document>"u")){for(var h={},p=document.cookie?document.cookie.split("; "):[],g=0;g<p.length;g++){var y=p[g].split("="),v=y.slice(1).join("=");!f&&v.charAt(0)==='"'&&(v=v.slice(1,-1));try{var b=r(y[0]);if(v=(a.read||a)(v,b)||r(v),f)try{v=JSON.parse(v)}catch{}if(h[b]=v,c===b)break}catch{}}return c?h[c]:h}}return o.set=s,o.get=function(c){return l(c,!1)},o.getJSON=function(c){return l(c,!0)},o.remove=function(c,f){s(c,"",n(f,{expires:-1}))},o.defaults={},o.withConverter=i,o}return i(function(){})})}(EN)),EN.exports}var Rze=Mze();const i_=h6(Rze),G7=300,jA=T_("snackbarStore",()=>{const t=re(void 0),e=(a,o)=>{const s=JSON.parse(JSON.stringify(a));s.bgColor=o?"#FF5200":"#02C39A",s.prefixIcon=o?"TriangleExclamation":"Check",t.value={...s,duration:s.duration||8e3}},n=RS(a=>{e(a,!0)},G7),r=RS(a=>{e(a,!1)},G7);return{contentSnackBar:t,hideSnackBar:()=>{t.value=void 0},showErrorSnackbar:n,showSuccessSnackbar:r}});var Yl=(t=>(t[t.CONTINUE=100]="CONTINUE",t[t.SWITCHING_PROTOCOLS=101]="SWITCHING_PROTOCOLS",t[t.PROCESSING=102]="PROCESSING",t[t.OK=200]="OK",t[t.CREATED=201]="CREATED",t[t.ACCEPTED=202]="ACCEPTED",t[t.NON_AUTHORITATIVE_INFORMATION=203]="NON_AUTHORITATIVE_INFORMATION",t[t.NO_CONTENT=204]="NO_CONTENT",t[t.RESET_CONTENT=205]="RESET_CONTENT",t[t.PARTIAL_CONTENT=206]="PARTIAL_CONTENT",t[t.MULTI_STATUS=207]="MULTI_STATUS",t[t.ALREADY_REPORTED=208]="ALREADY_REPORTED",t[t.IM_USED=226]="IM_USED",t[t.MULTIPLE_CHOICES=300]="MULTIPLE_CHOICES",t[t.MOVED_PERMANENTLY=301]="MOVED_PERMANENTLY",t[t.FOUND=302]="FOUND",t[t.SEE_OTHER=303]="SEE_OTHER",t[t.NOT_MODIFIED=304]="NOT_MODIFIED",t[t.USE_PROXY=305]="USE_PROXY",t[t.SWITCH_PROXY=306]="SWITCH_PROXY",t[t.TEMPORARY_REDIRECT=307]="TEMPORARY_REDIRECT",t[t.PERMANENT_REDIRECT=308]="PERMANENT_REDIRECT",t[t.BAD_REQUEST=400]="BAD_REQUEST",t[t.UNAUTHORIZED=401]="UNAUTHORIZED",t[t.PAYMENT_REQUIRED=402]="PAYMENT_REQUIRED",t[t.FORBIDDEN=403]="FORBIDDEN",t[t.NOT_FOUND=404]="NOT_FOUND",t[t.METHOD_NOT_ALLOWED=405]="METHOD_NOT_ALLOWED",t[t.NOT_ACCEPTABLE=406]="NOT_ACCEPTABLE",t[t.PROXY_AUTHENTICATION_REQUIRED=407]="PROXY_AUTHENTICATION_REQUIRED",t[t.REQUEST_TIMEOUT=408]="REQUEST_TIMEOUT",t[t.CONFLICT=409]="CONFLICT",t[t.GONE=410]="GONE",t[t.LENGTH_REQUIRED=411]="LENGTH_REQUIRED",t[t.PRECONDITION_FAILED=412]="PRECONDITION_FAILED",t[t.PAYLOAD_TOO_LARGE=413]="PAYLOAD_TOO_LARGE",t[t.URI_TOO_LONG=414]="URI_TOO_LONG",t[t.UNSUPPORTED_MEDIA_TYPE=415]="UNSUPPORTED_MEDIA_TYPE",t[t.RANGE_NOT_SATISFIABLE=416]="RANGE_NOT_SATISFIABLE",t[t.EXPECTATION_FAILED=417]="EXPECTATION_FAILED",t[t.I_AM_A_TEAPOT=418]="I_AM_A_TEAPOT",t[t.MISDIRECTED_REQUEST=421]="MISDIRECTED_REQUEST",t[t.UNPROCESSABLE_ENTITY=422]="UNPROCESSABLE_ENTITY",t[t.LOCKED=423]="LOCKED",t[t.FAILED_DEPENDENCY=424]="FAILED_DEPENDENCY",t[t.TOO_EARLY=425]="TOO_EARLY",t[t.UPGRADE_REQUIRED=426]="UPGRADE_REQUIRED",t[t.PRECONDITION_REQUIRED=428]="PRECONDITION_REQUIRED",t[t.TOO_MANY_REQUESTS=429]="TOO_MANY_REQUESTS",t[t.REQUEST_HEADER_FIELDS_TOO_LARGE=431]="REQUEST_HEADER_FIELDS_TOO_LARGE",t[t.UNAVAILABLE_FOR_LEGAL_REASONS=451]="UNAVAILABLE_FOR_LEGAL_REASONS",t[t.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",t[t.NOT_IMPLEMENTED=501]="NOT_IMPLEMENTED",t[t.BAD_GATEWAY=502]="BAD_GATEWAY",t[t.SERVICE_UNAVAILABLE=503]="SERVICE_UNAVAILABLE",t[t.GATEWAY_TIMEOUT=504]="GATEWAY_TIMEOUT",t[t.HTTP_VERSION_NOT_SUPPORTED=505]="HTTP_VERSION_NOT_SUPPORTED",t[t.VARIANT_ALSO_NEGOTIATES=506]="VARIANT_ALSO_NEGOTIATES",t[t.INSUFFICIENT_STORAGE=507]="INSUFFICIENT_STORAGE",t[t.LOOP_DETECTED=508]="LOOP_DETECTED",t[t.NOT_EXTENDED=510]="NOT_EXTENDED",t[t.NETWORK_AUTHENTICATION_REQUIRED=511]="NETWORK_AUTHENTICATION_REQUIRED",t))(Yl||{});const $ze={BASE_URL:"/pt",DEV:!0,MODE:"production",PROD:!1,SSR:!1,VITE_API_URL:"https://api.dev.arbocollab.com/api/v1",VITE_APP_BASE_PATH:"/pt",VITE_APP_REVIEW_BASE_URL:"https://review.dev.arbocollab.com",VITE_APP_WEBPAGE_TITLE:"People Insights | ARBO",VITE_BASE_URL:"https://app.dev.arbocollab.com",VITE_FAVICON_FILENAME:"favicon-arbo",VITE_FAVICON_VERSION:"v1"},co={info:(t,e)=>{console.info(`[AXIOS-INFO] ${t}`,e||"")},error:(t,e)=>{console.error(`[AXIOS-ERROR] ${t}`,e||"")},warn:(t,e)=>{console.warn(`[AXIOS-WARN] ${t}`,e||"")},debug:(t,e)=>{console.debug(`[AXIOS-DEBUG] ${t}`,e||"")}},Ile=()=>window.location.href,Z7=window.self!==window.top,Q7=yn(),Pze=[/^\/workspace\/[^/]+\/tile\/people\/ws-user-roles\/[^/]+\/basic-info$/i],Lze=()=>{try{return jA()}catch(t){return co.warn("Failed to get snackbar store",t),null}},Tb=(t,e)=>{const n=Lze();if(!n){co.warn("Snackbar not available, notification not shown",{type:t,message:e});return}try{t==="success"?n.showSuccessSnackbar({label:e}):n.showErrorSnackbar({label:e})}catch(r){co.error("Failed to show notification",{type:t,message:e,error:r})}};function Nze(){i_.set("account.last_access_url_people_tile",Ile()),window.self!==window.top||document.querySelector(":host")?co.info("Inside shadow DOM or iframe detected"):window.location.replace(`${a_("BASE_URL","https://api.dev.arbocollab.com/api/v1")}/login`)}const Fze=i_.get("account.token");Fze||Nze();const X7=()=>a_("BASE_URL","https://app.dev.arbocollab.com"),Mle=g6e({accessTokenKey:"account.token",refreshTokenKey:"account.refresh_token",domain:void 0,secure:window.location.protocol==="https:",sameSite:"lax",refreshTokenFn:async t=>{try{const e=await xn.refreshToken({refresh_token:t});return co.info("Calling token refresh",{tokenPrefix:t.substring(0,5)+"..."}),{access_token:e.access_token,refresh_token:e.refresh_token,expires_in:e.expires_in}}catch(e){throw Tb("error","Token refresh failed"),co.error("Token refresh failed",e),e}},onRefreshSuccess:t=>{Tb("success","Token refresh successful"),HA.defaults.headers.common.Authorization=`Bearer ${t.access_token}`},onRefreshFailure:t=>{co.error("Token refresh failed permanently",t),Tb("error","Token refresh failed"),Z7?window.parent.postMessage({type:"TOKEN_EXPIRED",message:"Authentication token has expired"},"*"):window.location.replace(`${X7()}/start`)},onCrossTabLogout:t=>{co.info("Cross-tab logout event received",{reason:t}),Z7?window.parent.postMessage({type:"TOKEN_EXPIRED",message:"Authentication token has expired"},"*"):window.location.replace(`${X7()}/start`),i_.set("account.last_access_url_people_tile",Ile(),{domain:void 0})},maxRetries:5,retryDelay:500,backoffFactor:1.5,storage:void 0});function Vze(t){t.headers={...t.headers,"ws-code":Q7,ws_code:Q7,"Access-Control-Allow-Origin":"*","Access-Control-Allow-Headers":"*","Accept-Language":"*","Content-Type":"application/json"}}function NC(t){const e=i_.get("account.token"),n=i_.get("ws.user-access-id");return Vze(t),t.headers.Authorization=`Bearer ${e}`,Pze.some(i=>i.test(t.url||""))&&(t.headers.tracking=`view,people,${n}`),t}function YB(t,e){var i,a;co.error(`Redirecting to ${t} page due to error`,{url:(i=e.config)==null?void 0:i.url,method:(a=e.config)==null?void 0:a.method,statusCode:t});const n=a_("API_BASE_URL","https://app.dev.arbocollab.com"),r=a_("module.alias","/pt");n?window.location.replace(`${n}${r}/${t}`):window.location.replace(`${r}/${t}`)}function V_(t){var n,r,i,a,o;if(t.code==="ERR_NETWORK")throw co.error("Network error detected",{message:t.message,url:(n=t.config)==null?void 0:n.url}),Tb("error","Network connection error. Please check your internet connection."),new Error("Network error");if(t.code==="ECONNABORTED")throw co.error("Request timeout",{url:(r=t.config)==null?void 0:r.url,timeout:(i=t.config)==null?void 0:i.timeout}),Tb("error","Request timed out. Please try again."),new Error("Request timeout");const e=Number(t.status);if(e===Yl.FORBIDDEN||e===Yl.NOT_FOUND)YB(String(e),t);else throw co.error("HTTP error",{status:e,code:t.code,url:(a=t.config)==null?void 0:a.url,method:(o=t.config)==null?void 0:o.method}),new Error(t.code)}function Rle(t){const{status:e,data:n,config:r}=t;switch(co.debug("API response received",{status:e,url:r.url,method:r.method}),e){case Yl.OK:case Yl.CREATED:case Yl.ACCEPTED:case Yl.NO_CONTENT:return n;case Yl.UNAUTHORIZED:case Yl.BAD_REQUEST:throw co.warn("Client error in response",{status:e,url:r.url}),Tb("error",(n==null?void 0:n.message)||"Request failed"),new Error(n.message||"An error occurred");case Yl.FORBIDDEN:throw co.warn("Forbidden response, triggering redirect",{url:r.url}),YB("403",t.data),new Error(n.message||"An error occurred");case Yl.NOT_FOUND:throw co.warn("Not found response, triggering redirect",{url:r.url}),YB("404",t.data),new Error(n.message||"An error occurred");case Yl.TOO_EARLY:throw co.warn("Too early response",{url:r.url}),new Error(n.message||"An error occurred");default:return e>=200&&e<300||co.warn("Unexpected response status",{status:e,url:r.url}),n}}function a_(t,e){const n=sessionStorage.getItem(t)||$ze[t.replace("API_","VITE_API_").replace("_URL","_URL")];return(n==null?void 0:n.length)>0?n:e}const HA=ta.create(),$le=ta.create(),FC=ta.create(),Ple={retryStatusCodes:[401,425],tokenExpiredDetection:t=>{var r,i,a,o,s,l,c;const e=(r=t==null?void 0:t.response)==null?void 0:r.status,n=(a=(i=t==null?void 0:t.response)==null?void 0:i.data)==null?void 0:a.error.toString();if(e===401){if(((s=(o=t==null?void 0:t.response)==null?void 0:o.data)==null?void 0:s.error)==="user_not_exists"||((c=(l=t==null?void 0:t.response)==null?void 0:l.data)==null?void 0:c.error)==="blocked")return!1;if(n==="token_expired"||n==="empty_token")return!0}return e===425}};Wse(HA,Mle,Ple);Wse($le,Mle,Ple);$le.interceptors.request.use(t=>NC(t),V_);HA.interceptors.request.use(t=>(t.baseURL=a_("API_BASE_URL","https://api.dev.arbocollab.com/api/v1"),NC(t)),V_);FC.interceptors.request.use(t=>(t.baseURL=a_("API_REVIEW_URL",void 0),NC(t)),V_);HA.interceptors.response.use(Rle,V_);FC.interceptors.request.use(NC,V_);FC.interceptors.response.use(Rle,V_);const Un={apiClient:HA,apiReviewV2Client:FC},tE={VIEW_PROJECT:"project_getProjectDirectoryUserInterface_read",VIEW_REVIEW:"media_getReviewUserInterface_read",VIEW_UPDATE:"update_getUpdateUserInterface_read",VIEW_WOOHOO:"woohoo_getWoohooUserInterface_read"},fr=T_("data",{state:()=>({selectedDataId:"",basicInfo:{},isLoadingProfile:!1,sceneDetailFetch:{status_type_in:"",selectedSceneId:"",fetchType:"",include_archived:0,sceneTotal:0,sceneSortType:"id",sceneOrder:"asc",searchScene:"",isTreemapLastLevel:!1,previousSelectedSceneId:"",privateSceneTotal:0},commentDetailFetch:{commentSortType:"id",commentOrder:"asc",searchComment:""},viewingReport:"",currentTab:"people-home",isLoadingFetchData:!1,permissionList:[],userInfo:{}}),getters:{permissionMap:t=>({redirectPermission:{review:t.permissionList.includes(tE.VIEW_REVIEW),project:t.permissionList.includes(tE.VIEW_PROJECT),woohoo:t.permissionList.includes(tE.VIEW_WOOHOO),update:t.permissionList.includes(tE.VIEW_UPDATE),scene_hub:!0}})},actions:{setSelectedDataId(t){this.selectedDataId=t},setSelectedDataProfile(t){this.basicInfo=t},setIsLoadingProfile(t){this.isLoadingProfile=t},setSceneDetailFetch(t){this.sceneDetailFetch={...this.sceneDetailFetch,...t}},setCommentDetailFetch(t){this.commentDetailFetch={...this.commentDetailFetch,...t}},resetSceneDetail(t=[]){const e={include_archived:0,sceneSortType:"id",sceneOrder:"asc",searchScene:""};Object.keys(e).forEach(n=>{t.includes(n)||(this.sceneDetailFetch[n]=e[n])})},resetCommentDetail(t=[]){const e={commentSortType:"id",commentOrder:"asc"};Object.keys(e).forEach(n=>{t.includes(n)||(this.commentDetailFetch[n]=e[n])})},setCurrentViewReport(t){this.viewingReport=t},setCurrentActiveTab(t){this.currentTab=t},setLoadingFetchData(t){this.isLoadingFetchData=t},setPermission(t){this.permissionList=t},setUserInfo(t){this.userInfo=t}}}),TN=t=>{const e=Object.fromEntries(new Map(t.entries()));return new URLSearchParams(e)};class Bze{getItems(e,n=20){const r=Bn.GET_ITEMS.replace("{ws_code}",yn()).replace("{page}",e.toString()).replace("{per_page}",n.toString());return Un.apiClient.get(r)}getChartData(e,n){const r=Bn.GET_CHART_DATA.replace("{ws_code}",yn()).replace("{id}",e.toString());return Un.apiClient.post(r,{include_chart:n})}getUserListProfile(e,n,r,i=""){const a=Bn.GET_USER_PROFILE_LIST.replace("{ws_code}",yn()).replace("{page}",e.toString()).replace("{per_page}",n.toString()).replace("{include_wur_id}",r.toString()).replace("{display_name_and_email_like}",i.toString());return Un.apiClient.get(a)}getUserBasicInfo(e){const n=Bn.GET_BASIC_INFO.replace("{ws_code}",yn()).replace("{WS_USER_ROLE_ID}",e.toString());return Un.apiClient.get(n)}getUserPermission(e=1){const n=Bn.USER_PERMISSION.replace("{ws_code}",yn()).replace("{is_newly}",e.toString());return Un.apiClient.get(n)}getUserProfile(){const e=Bn.USER_PROFILE;return Un.apiClient.get(e)}refreshToken(e){const n=Bn.REFRESH_TOKEN,r=typeof e=="object"?e:{refresh_token:e};return Un.apiClient.post(n,r).then(i=>({access_token:i.access_token,refresh_token:i.refresh_token,expires_in:i.expires_in})).catch(i=>Promise.reject(i))}getUnresolveAssignedComment({id:e,page:n,perPage:r=10,include:i,assignedAt:a,sortByType:o,sortOrder:s,before_id:l,searchText:c},f){const h=Bn.GET_UNRESOLVE_ASSIGNED_COMMENTS.replace("{ws_code}",yn()).replace("{WS_USER_ROLE_ID}",e.toString()).replace("{include}",i.toString());let p=new URLSearchParams;if(n&&p.append("page",n.toString()),r&&p.append("per_page",r.toString()),i&&p.append("include",i.toString()),a&&p.append("assigned_at_btw",a.toString()),l&&p.append("before_id",l.toString()),o&&s){const y=`${o}-${s}`;p.append("order_by",y.toString())}Object.entries(Kk).forEach(([y,v])=>{v&&p.append(y,String(v))}),f&&Object.entries(f).forEach(([y,v])=>{v&&p.append(y,String(v))}),p=TN(p),c&&p.append("comment_raw_like",c.toString());const g=`${h}?${p.toString()}`;return Un.apiClient.get(g)}getResolveAssignedComment({id:e,page:n,perPage:r=10,include:i,assignedAt:a,sortByType:o,sortOrder:s,searchText:l}){const c=Bn.GET_RESOLVE_ASSIGNED_COMMENTS.replace("{ws_code}",yn()).replace("{WS_USER_ROLE_ID}",e.toString()).replace("{include}",i.toString()),f=new URLSearchParams;if(n&&f.append("page",n.toString()),r&&f.append("per_page",r.toString()),i&&f.append("include",i.toString()),a&&f.append("assigned_at_btw",a.toString()),o&&s){const p=`${o}-${s}`;f.append("order_by",p.toString())}Object.entries(Kk).forEach(([p,g])=>{g&&f.append(p,String(g))}),l&&f.append("comment_raw_like",l.toString());const h=`${c}?${f.toString()}`;return Un.apiClient.get(h)}getAssignedTreeMapData(e,n="status",r="",i="",a="",o="",s,l){const c=Bn.GET_ASSIGNED_TREEMAP.replace("{ws_code}",yn()).replace("{WS_USER_ROLE_ID}",e.toString()),f=new URLSearchParams;f.append("treemap_type",n.toString()),l!==""&&l==="fromStatus"?r&&f.append("template_flow_status_id_eq",r.toString()):l!==""&&l==="fromEntity"&&r&&f.append("entity_id_eq",r.toString()),i&&f.append("entity_type_code_eq",i.toString()),a&&f.append("template_flow_status_type_in",a.toString()),o&&f.append("excluded_ids_in",o.toString()),s===1&&f.append("include_archived",s.toString());const h=`${c}?${f.toString()}`;return Un.apiClient.get(h)}getCommonItems({id:e,page:n,perPage:r=20,selectedId:i="",templateFlowType:a="",includeArchived:o,fetchType:s,sortByType:l,sortOrder:c,searchText:f="",dueDateNul:h="",actualDueDateNul:p="",actualDueDateNnul:g="",dueDateBtw:y="",actualDueDateBtw:v=""},b){const w=Bn.GET_COMMON_ITEMS.replace("{ws_code}",yn()).replace("{WS_USER_ROLE_ID}",e.toString());let S=new URLSearchParams;n&&S.append("page",n.toString()),r&&S.append("per_page",r.toString()),a&&S.append("template_flow_status_type_in",a.toString());const T=fr();if(s!==""&&s==="status")if(!T.sceneDetailFetch.isTreemapLastLevel)i&&S.append("template_flow_status_id_eq",i.toString());else{const E=T.sceneDetailFetch.previousSelectedSceneId;i&&S.append("entity_id_eq",i.toString()),E&&S.append("template_flow_status_id_eq",E.toString())}else if(s!==""&&s==="entity")if(!T.sceneDetailFetch.isTreemapLastLevel)i&&S.append("entity_id_eq",i.toString());else{const E=T.sceneDetailFetch.previousSelectedSceneId;E&&S.append("entity_id_eq",E.toString()),i&&S.append("template_flow_status_id_eq",i.toString())}if(o===1&&S.append("include_archived",o.toString()),f!==""&&S.append("name_like",f.toString()),l&&c)if(l==="template_flow_status.position"){const E=`${l}-${c}`;S.append("sort_by",E.toString())}else{const E=`item.${l}-${c}`;S.append("sort_by",E.toString())}h&&S.append("due_date_nul",h.toString()),p&&S.append("actual_due_date_nul",p.toString()),g&&S.append("actual_due_date_nnul",g.toString()),y&&S.append("due_date_btw",y.toString()),v&&S.append("actual_due_date_btw",v.toString()),S.append("include_permission","1"),Object.entries(Kk).forEach(([E,D])=>{D&&S.append(E,String(D))}),b&&Object.entries(b).forEach(([E,D])=>{D&&S.append(E,String(D))}),S=TN(S);const _=`${w}?${S.toString()}`;return Un.apiClient.get(_)}resolveComment(e,n,r){const i=Bn.RESOLVE_COMMENT.replace("{ws_code}",yn()).replace("{id}",e.toString()).replace("{item_id}",n.toString()).replace("{comment_id}",r.toString());return Un.apiReviewV2Client.post(i)}getTemplateFlows(e,n,r="",i=1,a=1){const o=Bn.TEMPLATE_FLOW_STATUS.replace("{ws_code}",yn()).replace("{page}",e.toString()).replace("{per_page}",n.toString()).replace("{search_like}",r.toString()).replace("{status_eq}",a.toString()).replace("{is_deployed_eq}",i.toString());return Un.apiClient.get(o)}getStatusTemplateList(e,n,r=""){const i=Bn.TEMPLATE_FLOW_STATUS_LIST.replace("{ws_code}",yn()).replace("{page}",e.toString()).replace("{per_page}",n.toString()).replace("{search_like}",r.toString());return Un.apiClient.get(i)}getMetricList(e,n,r="",i="metric_type"){const a=Bn.LIST_METRIC.replace("{ws_code}",yn()).replace("{page}",e.toString()).replace("{per_page}",n.toString()).replace("{name_like}",r.toString()).replace("{include}",i.toString());return Un.apiClient.get(a)}getCompletedSceneReport(e,n,r="and"){const i=Bn.COMPLETED_SCENE_REPORT.replace("{ws_code}",yn()),a=new URLSearchParams;e&&a.append("time_range_btw",e.toString()),n&&a.append("assignee_id_ina",n.toString()),r&&a.append("condition_combine_type",r.toString());const o=`${i}?${a.toString()}`;return Un.apiClient.get(o)}getOverdueSceneReport(e){const n=Bn.OVERDUE_SCENE_REPORT.replace("{ws_code}",yn()),r=new URLSearchParams;e&&r.append("assignee_id_ina",e.toString());const i=`${n}?${r.toString()}`;return Un.apiClient.get(i)}getSceneStatusReport(e,n="",r,i="and"){const a=Bn.SCENE_STATUS_REPORT.replace("{ws_code}",yn()),o=new URLSearchParams;e&&o.append("template_flow_status_id_ina",e.toString()),r&&o.append("assignee_id_ina",r.toString()),n&&o.append("status_types",n.toString()),i&&o.append("condition_combine_type",i.toString());const s=`${a}?${o.toString()}`;return Un.apiClient.get(s)}getAssigneeAchievementReport(e,n,r="and"){const i=Bn.ASSIGNEE_ACHIEVEMENT_REPORT.replace("{ws_code}",yn()),a=new URLSearchParams;e&&a.append("time_range_btw",e.toString()),n&&a.append("assignee_id_ina",n.toString()),r&&a.append("condition_combine_type",r.toString());const o=`${i}?${a.toString()}`;return Un.apiClient.get(o)}getUserInvolvementReport(e,n,r="and"){const i=Bn.USER_INVOLVEMENT_REPORT.replace("{ws_code}",yn()),a=new URLSearchParams;e&&a.append("active_time_range_btw",e.toString()),n&&a.append("assignee_id_ina",n.toString()),r&&a.append("condition_combine_type",r.toString());const o=`${i}?${a.toString()}`;return Un.apiClient.get(o)}getSceneAssignementReport(e,n,r="and"){const i=Bn.SCENE_ASSIGNMENT_REPORT.replace("{ws_code}",yn()),a=new URLSearchParams;e&&a.append("time_range_btw",e.toString()),n&&a.append("assignee_id_ina",n.toString()),r&&a.append("condition_combine_type",r.toString());const o=`${i}?${a.toString()}`;return Un.apiClient.get(o)}getMetricReport(e,n,r="and"){const i=Bn.METRIC_REPORT.replace("{ws_code}",yn()),a=new URLSearchParams;e&&a.append("metric_id_eq",e.toString()),n&&a.append("assignee_id_ina",n.toString()),r&&a.append("condition_combine_type",r.toString());const o=`${i}?${a.toString()}`;return Un.apiClient.get(o)}updateScene(e,n){const r=Bn.UPDATE_SCENE.replace("{ws_code}",yn()).replace("{scene_id}",e);return Un.apiClient.put(r,n)}getAssignableUsers(e,n){const r=Bn.GET_ASSIGNABLE_USERS.replace("{ws_code}",yn()).replace("{scene_id}",e),i=new URLSearchParams;Object.entries(n).forEach(([o,s])=>{s&&i.append(o,String(s))});const a=`${r}?${i.toString()}`;return Un.apiClient.get(a)}updateAssigneesUsers(e,n){const r=Bn.UPDATE_ASSIGNEES_USERS.replace("{ws_code}",yn());return Un.apiClient.post(r,{item_ids:[e],ws_user_role_ids:n})}deleteScene(e){const n=Bn.DELETE_SCENE.replace("{ws_code}",yn()).replace("{scene_id}",e);return Un.apiClient.delete(n)}getAssignableStatus(e,n){const r=Bn.GET_ASSIGNABLE_STATUS.replace("{ws_code}",yn());return Un.apiClient.post(r,{item_ids:[e],name_like:n.name_like||"",page:n.page,per_page:10})}getSceneDetail(e,n){const r=Bn.GET_SCENE_DETAIL.replace("{ws_code}",yn()).replace("{scene_id}",e),i=new URLSearchParams;Object.entries(n).forEach(([o,s])=>{s&&i.append(o,String(s))});const a=`${r}?${i.toString()}`;return Un.apiClient.get(a)}assignUser(e,n){const r=Bn.ASSIGN_USER.replace("{ws_code}",yn());return Un.apiClient.post(r,{ws_user_role_ids:n,item_ids:[e]})}unAssignUser(e,n){const r=Bn.UNASSIGN_USER.replace("{ws_code}",yn()).replace("{scene_id}",e);return Un.apiClient.delete(r,{data:{ws_user_role_ids:n,item_ids:[e]}})}getPeopleCard(e){const n=Bn.DASHBOARD.replace("{ws_code}",yn()).replace("{id}",e.toString()),r=new URLSearchParams;Object.entries({include:"assigned_scenes,point_pool,unresolved_comments,overdue_scenes,completed_scenes_last_7_days,"}).forEach(([o,s])=>{s&&r.append(o,String(s))});const a=`${n}?${r.toString()}`;return Un.apiClient.get(a)}getPeopleDashboardData(e,n,r){const i=Bn.DASHBOARD.replace("{ws_code}",yn()).replace("{id}",String(e));let a=new URLSearchParams;const o={"comments.latest":jx,"comments.recently_resolved":jx,"recent_activities.new_renditions":"attachments,ws_creator","recent_activities.accessed_scenes":"item.point_metric,item.ws_creator,item.template_flow_status,item.item_user_roles.ws_user_role,item.assignees"},s={include:n+","+o[n],include_entity_path:1,include_permission:1};Object.entries(s).forEach(([c,f])=>{f&&a.append(c,String(f))}),Object.entries(Kk).forEach(([c,f])=>{f&&a.append(c,String(f))}),r&&Object.entries(r).forEach(([c,f])=>{f&&a.append(c,String(f))}),a=TN(a);const l=`${i}?${a.toString()}`;return Un.apiClient.get(l)}deleteRendition(e,n){const r=Bn.DELETE_RENDITION.replace("{ws_code}",yn()).replace("{scene_id}",e).replace("{rendition_id}",n);return Un.apiClient.delete(r)}getCommentAssignableUser(e,n,r,i){const a=Bn.GET_ASSIGNABLE_USERS.replace("{ws_code}",yn()).replace("{scene_id}",e).replace("{comment_id}",n),o={page:r||1,per_page:10};return i&&(o.display_name_like=i),Un.apiClient.get(a,{params:o})}getMentionableUsers(e,n){const r=Bn.GET_ASSIGNABLE_USERS.replace("{ws_code}",yn()).replace("{scene_id}",e).replace("{comment_id}",n);return Un.apiClient.get(r)}resolveCommentApi(e,n){const r=Bn.RESOLVE_COMMENT_API.replace("{ws_code}",yn()).replace("{scene_id}",e).replace("{comment_id}",n);return Un.apiReviewV2Client.post(r)}unResolveCommentApi(e,n){const r=Bn.UN_RESOLVE_COMMENT.replace("{ws_code}",yn()).replace("{scene_id}",e).replace("{comment_id}",n);return Un.apiReviewV2Client.post(r)}deleteCommentApi(e,n){const r=Bn.DELETE_COMMENT.replace("{ws_code}",yn()).replace("{scene_id}",e).replace("{comment_id}",n);return Un.apiClient.delete(r)}reactToComment({scene_id:e,comment_id:n,reaction:r}){const i=Bn.REACT_TO_COMMENT.replace("{ws_code}",yn());return Un.apiClient.post(i,{model_type:"item_comment",item_id:e,model_id:n,emoji:r})}updateReactToComment({scene_id:e,comment_id:n,reaction:r,reaction_id:i}){const a=Bn.UPDATE_REACT_TO_COMMENT.replace("{ws_code}",yn()).replace("{reaction_id}",i);return Un.apiClient.put(a,{model_type:"item_comment",model_id:n,emoji:r,item_id:e})}deleteReactToComment(e){const n=Bn.DELETE_REACT_TO_COMMENT.replace("{ws_code}",yn()).replace("{reaction_id}",e);return Un.apiClient.delete(n)}assignUserApi(e,n,r){const i=Bn.ASSIGN_COMMENT_USER_API.replace("{ws_code}",yn()).replace("{scene_id}",e).replace("{comment_id}",n);return Un.apiReviewV2Client.post(i,{assigned_id:r})}getNextRendition(e,n){const r=Bn.DASHBOARD.replace("{ws_code}",yn()).replace("{id}",String(e)),i=new URLSearchParams;Object.entries({include:"recent_activities.new_renditions,attachments,ws_creator,item",before_id:n,include_entity_path:1,per_page:5,include_permission:1}).forEach(([s,l])=>{l&&i.append(s,String(l))});const o=`${r}?${i.toString()}`;return Un.apiClient.get(o)}downloadFileFromS3(e){const n=Bn.GET_RESOURCE_API.replace("{ws_code}",yn()),r={item_id:e.scene_id,path:e.path};return Un.apiClient.get(n,{params:r})}getCommentDetail({comment_id:e,scene_id:n}){const r=Bn.GET_COMMENT_DETAIL.replace("{ws_code}",yn()).replace("{comment_id}",e.toString()).replace("{scene_id}",n.toString());return Un.apiClient.get(r,{params:{include:jx}})}getWSUserProfile(){const e=Bn.GET_WS_USER_PROFILE.replace("{ws_code}",yn());return Un.apiClient.get(e)}}const xn=new Bze,ks=T_("dashboardStore",()=>{const t=re(null),e=a=>{t.value=a},n=re(!0),r=Ht({comment_recent:!1,comment_resolved:!1,rendition:!1,scene:!1,people_comment:!1,assigned_scene:!1,chart:!1});return{dashboardData:t,getDashboardData:async a=>{const o=await xn.getPeopleCard(a);e(o)},refreshState:r,isBrowserActive:n}});var _l=(t=>(t.WHITE="#F3F5F8",t.RED="#FFD4C1",t.YELLOW="#FDE8B0",t.GREEN="#CCF3EB",t.BLUE="#A3D4F5",t.TEXT_GENERAL="#232323",t.ICON_GENERAL="#A6A6A6",t))(_l||{});const Lle=([t,e])=>{const n=t+e,r=t/n*360;return r==180?0:r<90||r>90&&r<180?90-r/2:r>180?r-180/2*-1:r/2},Nle=({rotation:t,handleRedirect:e,interactive:n})=>({type:"pie",options:{rotation:t,responsive:!0,onHover:n?(r,i)=>{const a=r.chart;i.length>0?a.canvas.style.cursor="pointer":a.canvas.style.cursor="default"}:void 0,onClick:n?function(r,i){i.length>0&&e()}:void 0,plugins:{tooltip:{enabled:!1},datalabels:{align:"end",anchor:"end",formatter:function(r){return[r.label,r.value]},color:function(r){return r.dataset.backgroundColor},font:function(){return{size:14,weight:"normal"}}}},aspectRatio:16/6,layout:{padding:{top:6,bottom:6}}}}),Uze=t=>Number.isInteger(t)?t.toString():t.toFixed(2),Wze=Qe({__name:"CardAssigned",setup(t,{expose:e}){e(),Ev.register(XD,LS,KD,QD,Eoe,Toe),Ev.register(LS,KD,QD);const n=Z(()=>({guidingTextBottomLeft:l.value?void 0:{text:"Scenes",fontStyle:{color:_l.TEXT_GENERAL,fontSize:"14px",fontWeight:"normal"},tooltip:"Scenes"},guidingTextBottomRight:void 0,backgroundColor:_l.WHITE,key:"assigned",title:"Assigned scenes",icon:{name:"Film",iconColor:"#A6A6A6",tooltip:"Assigned scenes status"},mainLabel:"AssignedMainlabel"})),r=ks(),{dashboardData:i}=Pn(r),a=Z(()=>{var S;return Number(((S=i.value)==null?void 0:S.assigned_scenes.active)||0)}),o=Z(()=>{var S;return Number(((S=i.value)==null?void 0:S.assigned_scenes.planned)||0)}),s=Z(()=>!0),l=Z(()=>a.value>0||o.value>0),c=Z(()=>{const S=a.value,T=o.value,_={active:"Active",planned:"Planned"},E={active:"#3C9BFA",planned:"#A6A6A6"},D=Object.entries({active:S,planned:T}).filter(O=>O[1]!==0).sort((O,V)=>O[1]-V[1]).map(([O,V])=>({value:V||0,key:O,label:_[O]}));return{datasets:[{backgroundColor:D.map(O=>E[O.key]),data:D}]}}),f=Z(()=>{const S=a.value,T=o.value;return S<T?[S,T]:[T,S]}),h=fr(),{currentTab:p}=Pn(h),g=()=>{p.value="people-scenes"},y=Z(()=>{const S=Lle(f.value);return{type:"pie",data:c.value,plugins:[XD],...Nle({rotation:S,handleRedirect:g,interactive:!1})}}),v=re(null),b=()=>{const S=document.getElementById("chart_assigned");S&&(v.value=new Ev(S,y.value))};Ge([l,s],S=>{S[0]&&S[1]&&fn(()=>b())},{immediate:!0});const w={cardConfiguration:n,dashboardStore:r,dashboardData:i,activeData:a,plannedData:o,showData:s,hasData:l,data:c,assigned_scenesDataArr:f,store:h,currentTab:p,handleRedirect:g,chartConfig:y,chartInstance:v,initChart:b,get SimpleCard(){return O_}};return Object.defineProperty(w,"__isScriptSetup",{enumerable:!1,value:!0}),w}}),Nn=(t,e)=>{const n=t.__vccOpts||t;for(const[r,i]of e)n[r]=i;return n};function zze(t,e,n,r,i,a){return r.showData?(R(),Re(r.SimpleCard,Ft({key:0,class:"card-simple"},r.cardConfiguration,{disabled:!1,class:{empty:!r.hasData}}),{body:ze(()=>[r.hasData?(R(),Y("div",{key:0,class:"chart-container card-title",onClick:r.handleRedirect},e[0]||(e[0]=[X("canvas",{id:"chart_assigned"},null,-1)]))):(R(),Y("span",{key:1,class:"card-title",onClick:r.handleRedirect},"0"))]),_:1},16,["class"])):pe("v-if",!0)}const jze=Nn(Wze,[["render",zze],["__scopeId","data-v-f1302b37"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/CardAssigned.vue"]]),Hze=Qe({__name:"CardCompleted",setup(t,{expose:e}){e();const n=ks(),{dashboardData:r}=Pn(n),i=Z(()=>{var f;return r.value&&((f=r.value)==null?void 0:f.completed_scenes_last_7_days)||0}),a=Z(()=>{const f=i.value>0?_l.GREEN:_l.WHITE,h=i.value>0?"#02C39A":"#A6A6A6";return{guidingTextBottomLeft:{text:"Scenes",fontStyle:{color:"#000000",fontSize:"14px",fontWeight:"normal"},tooltip:"Assigned"},backgroundColor:f,key:"Completed",title:"Total completed (7 days)",icon:{name:"Film",iconColor:h,tooltip:"Completed scenes in the last 7 days"}}}),o=fr(),{currentTab:s}=Pn(o),c={dashboardStore:n,dashboardData:r,data:i,cardConfiguration:a,store:o,currentTab:s,handleRedirect:()=>{s.value="people-charts"},get SimpleCard(){return O_}};return Object.defineProperty(c,"__isScriptSetup",{enumerable:!1,value:!0}),c}});function Yze(t,e,n,r,i,a){return R(),Re(r.SimpleCard,Ft({class:"card-simple"},r.cardConfiguration,{disabled:!1}),{body:ze(()=>[X("div",{class:"card-title",onClick:r.handleRedirect},it(r.data),1)]),_:1},16)}const qze=Nn(Hze,[["render",Yze],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/CardCompleted.vue"]]),Kze=Qe({__name:"CardOverdue",setup(t,{expose:e}){e();const n=ks(),{dashboardData:r}=Pn(n),i=Z(()=>{var f;return r.value&&((f=r.value)==null?void 0:f.overdue_scenes)||0}),a=Z(()=>{const f=i.value>0?_l.YELLOW:_l.WHITE,h=i.value>0?"#F7941D":"#A6A6A6";return{guidingTextBottomLeft:{text:"Scenes",fontStyle:{color:_l.TEXT_GENERAL,fontSize:"14px",fontWeight:"normal"},tooltip:"Assigned"},backgroundColor:f,key:"assigned",title:"Overdue",icon:{name:"Film",iconColor:h,tooltip:"Assigned scenes past due"}}}),o=fr(),{currentTab:s}=Pn(o),c={dashboardStore:n,dashboardData:r,data:i,cardConfiguration:a,store:o,currentTab:s,handleRedirect:()=>{s.value="people-charts"},get SimpleCard(){return O_}};return Object.defineProperty(c,"__isScriptSetup",{enumerable:!1,value:!0}),c}});function Gze(t,e,n,r,i,a){return R(),Re(r.SimpleCard,Ft({class:"card-simple"},r.cardConfiguration,{disabled:!1}),{body:ze(()=>[X("div",{class:"card-title",onClick:r.handleRedirect},it(r.data),1)]),_:1},16)}const Zze=Nn(Kze,[["render",Gze],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/CardOverdue.vue"]]),Qze=Qe({__name:"CardTargetPoint",setup(t,{expose:e}){e(),Ev.register(XD,LS,KD,QD,Eoe,Toe),Ev.register(LS,KD,QD);const n=Z(()=>({guidingTextBottomLeft:l.value?void 0:{text:"Points",fontStyle:{color:_l.TEXT_GENERAL,fontSize:"14px",fontWeight:"normal"},tooltip:"Points"},guidingTextBottomRight:void 0,backgroundColor:_l.WHITE,key:"points",title:"Target points",icon:{name:"Award",iconColor:"#A6A6A6",tooltip:"Assigned points towards targets"},mainLabel:"AssignedMainlabel"})),r=Z(()=>{var v,b;return Number(((b=(v=o.value)==null?void 0:v.point_pool)==null?void 0:b.collected)||0)}),i=Z(()=>{var v,b;return Number(((b=(v=o.value)==null?void 0:v.point_pool)==null?void 0:b.pending)||0)}),a=ks(),{dashboardData:o}=Pn(a),s=Z(()=>{var v;return((v=o.value)==null?void 0:v.point_pool.can_view)==1}),l=Z(()=>r.value>0||i.value>0),c=Z(()=>{const v=r.value,b=i.value,w={collected:"Earned",pending:"Awaiting"},S={collected:"#F7941D",pending:"#A6A6A6"},T=Object.entries({collected:v,pending:b}).filter(_=>_[1]!==0).sort((_,E)=>_[1]-E[1]).map(([_,E])=>({value:Uze(E)||0,key:_,label:w[_]}));return{datasets:[{backgroundColor:T.map(_=>S[_.key]),data:T}]}}),f=Z(()=>{const v=r.value,b=i.value;return v<b?[v,b]:[b,v]}),h=Z(()=>{const v=Lle(f.value);return{plugins:[XD],type:"pie",data:c.value,...Nle({interactive:!1,handleRedirect:()=>{},rotation:v})}}),p=re(null),g=()=>{const v=document.getElementById("chart_target");v&&(p.value=new Ev(v,h.value))};Ge([l,s],v=>{v[0]&&v[1]&&fn(()=>g())},{immediate:!0});const y={cardConfiguration:n,collectedData:r,pendingData:i,dashboardStore:a,dashboardData:o,showData:s,hasData:l,data:c,assigned_scenesDataArr:f,chartConfig:h,chartInstance:p,initChart:g,get SimpleCard(){return O_}};return Object.defineProperty(y,"__isScriptSetup",{enumerable:!1,value:!0}),y}}),Xze={key:0,class:"chart-container card-title"},Jze={key:1,class:"card-title non-interactive"};function eje(t,e,n,r,i,a){return r.showData?(R(),Re(r.SimpleCard,Ft({key:0,class:"card-simple"},r.cardConfiguration,{disabled:!1,class:{empty:!r.hasData}}),{body:ze(()=>[r.hasData?(R(),Y("div",Xze,e[0]||(e[0]=[X("canvas",{id:"chart_target"},null,-1)]))):(R(),Y("span",Jze,"0"))]),_:1},16,["class"])):pe("v-if",!0)}const tje=Nn(Qze,[["render",eje],["__scopeId","data-v-24024258"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/CardTargetPoint.vue"]]),nje=Qe({__name:"CardUnresolved",setup(t,{expose:e}){e();const n=ks(),{dashboardData:r}=Pn(n),i=Z(()=>{var f;return r.value&&((f=r.value)==null?void 0:f.unresolved_comments)||0}),a=Z(()=>{const f={text:"@",color:"#FFF",bgColor:i.value==0?"#A6A6A6":"#3C9BFA",show:!0};return{guidingTextBottomLeft:{text:"Comments",fontStyle:{color:_l.TEXT_GENERAL,fontSize:"14px",fontWeight:"normal"},tooltip:"Assigned"},backgroundColor:_l.WHITE,key:"Unresolved",title:"Unresolved",icon:{name:"Comments",iconColor:_l.ICON_GENERAL,tooltip:"Assigned comments to resolve"},alias:f}}),o=fr(),{currentTab:s}=Pn(o),c={dashboardStore:n,dashboardData:r,data:i,cardConfiguration:a,store:o,currentTab:s,handleRedirect:()=>{s.value="people-comments"},get SimpleCard(){return O_}};return Object.defineProperty(c,"__isScriptSetup",{enumerable:!1,value:!0}),c}});function rje(t,e,n,r,i,a){return R(),Re(r.SimpleCard,Ft({class:"card-simple"},r.cardConfiguration,{disabled:!1}),{body:ze(()=>[X("div",{class:"card-title",onClick:r.handleRedirect},it(r.data),1)]),_:1},16)}const ije=Nn(nje,[["render",rje],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/CardUnresolved.vue"]]),aje={},oje={class:"section-renditions-skeleton"};function sje(t,e){return R(),Y("div",oje,e[0]||(e[0]=[Vv('<div class="timestamp animation-skeleton dark" data-v-09df7c3e></div><div class="rendition-item animation-skeleton dark" data-v-09df7c3e><div class="name" data-v-09df7c3e></div><div class="breadcrumb" data-v-09df7c3e></div><div class="information" data-v-09df7c3e></div></div>',2)]))}const lje=Nn(aje,[["render",sje],["__scopeId","data-v-09df7c3e"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/NewRenditionSkeleton.vue"]]),uje=Qe({__name:"InfoVisual",props:{visualName:{type:String,required:!0,default:"NoData"},label:{type:String,required:!1,default:"label here"},height:{type:Number,required:!0,default:200},width:{type:Number,required:!1,default:400}},setup(t,{expose:e}){e();const n=t,r=Z(()=>n.height-36),i=Z(()=>n.width),a={props:n,visualHeight:r,visualWidth:i,get ArboIcon(){return qn}};return Object.defineProperty(a,"__isScriptSetup",{enumerable:!1,value:!0}),a}}),cje={class:"visual-info"},dje={class:"data-info"};function fje(t,e,n,r,i,a){return R(),Y("div",cje,[X("div",{class:"visual-info-container",style:_t({"--visual-height":r.visualHeight+"px","--visual-width":r.visualWidth+"px"})},[he(r.ArboIcon,{type:"visual",name:n.visualName,class:"data-visual"},null,8,["name"]),X("div",dje,it(n.label),1)],4)])}const Oc=Nn(uje,[["render",fje],["__scopeId","data-v-014c340b"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/shared/InfoVisual.vue"]]),Al=()=>{const t=re(vo());return{getEnvVariable:n=>{const r=t.value,i=r==null?void 0:r.appContext.config.globalProperties[n];if(!r)return console.error("Current instance is not available."),"";let a="";return(!r||!r.appContext.config.globalProperties)&&(console.warn("Current instance or global properties not available."),a=""),!i||i.length===0?(console.warn(`Environment variable ${n} is not defined.`),a=""):a=i,a},currentInstance:t}},VC=()=>{const t=ks(),{getDashboardData:e}=t,n=async l=>{try{return await e(l)}catch(c){return console.error("getPeopleCard",c),{error:c}}},r=fr(),{basicInfo:i}=Pn(r);return{getPeopleCard:n,getRecentActivities:(l,c)=>{var h;const f=(h=i.value)==null?void 0:h.id;if(!f)throw new Error("userId is not found in store");return xn.getPeopleDashboardData(f,l,c)},deleteRendition:({scene_id:l,rendition_id:c})=>{if(!i.value.id)throw new Error("userId is not found in store");return xn.deleteRendition(l,c)},getNextRendition:l=>{var f;const c=(f=i.value)==null?void 0:f.id;if(!c)throw new Error("userId is not found in store");return xn.getNextRendition(c,l)}}},ay=(t,e,n)=>{const r=re(void 0),i=re(!1),a=async()=>{if(!h.value)return;const p=await e();p&&(r.value=p.signature)},o=re(null),s=6e4,l=()=>{o.value&&clearInterval(o.value),o.value=setInterval(()=>{a()},Number(s))};zt(async()=>{l()}),Qa(()=>{clearInterval(o.value)}),mee(()=>{clearInterval(o.value)});const c=ks(),{refreshState:f,isBrowserActive:h}=Pn(c);return Ge(i,p=>{t!==""&&(f.value[t]=p)}),Ge(n,p=>{r.value=p,fn(()=>i.value=!1)},{immediate:!0}),Ge(r,(p,g)=>{if(!(g==null||g==""))switch(!0){case!r.value:i.value=!1;break;case p!==g:i.value=!0;break;case r.value!=n.value:i.value=!0;break;case p==n.value:break}},{immediate:!0}),{subscribeSignature:l,needUpdate:i}};class oy extends Error{}class hje extends oy{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}}class pje extends oy{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}}class mje extends oy{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}}class db extends oy{}class Fle extends oy{constructor(e){super(`Invalid unit ${e}`)}}class Yo extends oy{}class tp extends oy{constructor(){super("Zone is an abstract class")}}const tn="numeric",Sc="short",wl="long",uO={year:tn,month:tn,day:tn},Vle={year:tn,month:Sc,day:tn},gje={year:tn,month:Sc,day:tn,weekday:Sc},Ble={year:tn,month:wl,day:tn},Ule={year:tn,month:wl,day:tn,weekday:wl},Wle={hour:tn,minute:tn},zle={hour:tn,minute:tn,second:tn},jle={hour:tn,minute:tn,second:tn,timeZoneName:Sc},Hle={hour:tn,minute:tn,second:tn,timeZoneName:wl},Yle={hour:tn,minute:tn,hourCycle:"h23"},qle={hour:tn,minute:tn,second:tn,hourCycle:"h23"},Kle={hour:tn,minute:tn,second:tn,hourCycle:"h23",timeZoneName:Sc},Gle={hour:tn,minute:tn,second:tn,hourCycle:"h23",timeZoneName:wl},Zle={year:tn,month:tn,day:tn,hour:tn,minute:tn},Qle={year:tn,month:tn,day:tn,hour:tn,minute:tn,second:tn},Xle={year:tn,month:Sc,day:tn,hour:tn,minute:tn},Jle={year:tn,month:Sc,day:tn,hour:tn,minute:tn,second:tn},vje={year:tn,month:Sc,day:tn,weekday:Sc,hour:tn,minute:tn},eue={year:tn,month:wl,day:tn,hour:tn,minute:tn,timeZoneName:Sc},tue={year:tn,month:wl,day:tn,hour:tn,minute:tn,second:tn,timeZoneName:Sc},nue={year:tn,month:wl,day:tn,weekday:wl,hour:tn,minute:tn,timeZoneName:wl},rue={year:tn,month:wl,day:tn,weekday:wl,hour:tn,minute:tn,second:tn,timeZoneName:wl};class YA{get type(){throw new tp}get name(){throw new tp}get ianaName(){return this.name}get isUniversal(){throw new tp}offsetName(e,n){throw new tp}formatOffset(e,n){throw new tp}offset(e){throw new tp}equals(e){throw new tp}get isValid(){throw new tp}}let DN=null;class BC extends YA{static get instance(){return DN===null&&(DN=new BC),DN}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:n,locale:r}){return fue(e,n,r)}formatOffset(e,n){return Yx(this.offset(e),n)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type==="system"}get isValid(){return!0}}let VT={};function yje(t){return VT[t]||(VT[t]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),VT[t]}const bje={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function _je(t,e){const n=t.format(e).replace(/\u200E/g,""),r=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,i,a,o,s,l,c,f]=r;return[o,i,a,s,l,c,f]}function wje(t,e){const n=t.formatToParts(e),r=[];for(let i=0;i<n.length;i++){const{type:a,value:o}=n[i],s=bje[a];a==="era"?r[s]=o:jn(s)||(r[s]=parseInt(o,10))}return r}let nE={};class xh extends YA{static create(e){return nE[e]||(nE[e]=new xh(e)),nE[e]}static resetCache(){nE={},VT={}}static isValidSpecifier(e){return this.isValidZone(e)}static isValidZone(e){if(!e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch{return!1}}constructor(e){super(),this.zoneName=e,this.valid=xh.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:n,locale:r}){return fue(e,n,r,this.name)}formatOffset(e,n){return Yx(this.offset(e),n)}offset(e){const n=new Date(e);if(isNaN(n))return NaN;const r=yje(this.name);let[i,a,o,s,l,c,f]=r.formatToParts?wje(r,n):_je(r,n);s==="BC"&&(i=-Math.abs(i)+1);const p=WC({year:i,month:a,day:o,hour:l===24?0:l,minute:c,second:f,millisecond:0});let g=+n;const y=g%1e3;return g-=y>=0?y:1e3+y,(p-g)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}}let J7={};function xje(t,e={}){const n=JSON.stringify([t,e]);let r=J7[n];return r||(r=new Intl.ListFormat(t,e),J7[n]=r),r}let qB={};function KB(t,e={}){const n=JSON.stringify([t,e]);let r=qB[n];return r||(r=new Intl.DateTimeFormat(t,e),qB[n]=r),r}let GB={};function Sje(t,e={}){const n=JSON.stringify([t,e]);let r=GB[n];return r||(r=new Intl.NumberFormat(t,e),GB[n]=r),r}let ZB={};function Aje(t,e={}){const{base:n,...r}=e,i=JSON.stringify([t,r]);let a=ZB[i];return a||(a=new Intl.RelativeTimeFormat(t,e),ZB[i]=a),a}let lx=null;function kje(){return lx||(lx=new Intl.DateTimeFormat().resolvedOptions().locale,lx)}let eq={};function Eje(t){let e=eq[t];if(!e){const n=new Intl.Locale(t);e="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,eq[t]=e}return e}function Tje(t){const e=t.indexOf("-x-");e!==-1&&(t=t.substring(0,e));const n=t.indexOf("-u-");if(n===-1)return[t];{let r,i;try{r=KB(t).resolvedOptions(),i=t}catch{const l=t.substring(0,n);r=KB(l).resolvedOptions(),i=l}const{numberingSystem:a,calendar:o}=r;return[i,a,o]}}function Dje(t,e,n){return(n||e)&&(t.includes("-u-")||(t+="-u"),n&&(t+=`-ca-${n}`),e&&(t+=`-nu-${e}`)),t}function Oje(t){const e=[];for(let n=1;n<=12;n++){const r=Wn.utc(2009,n,1);e.push(t(r))}return e}function Cje(t){const e=[];for(let n=1;n<=7;n++){const r=Wn.utc(2016,11,13+n);e.push(t(r))}return e}function rE(t,e,n,r){const i=t.listingMode();return i==="error"?null:i==="en"?n(e):r(e)}function Ije(t){return t.numberingSystem&&t.numberingSystem!=="latn"?!1:t.numberingSystem==="latn"||!t.locale||t.locale.startsWith("en")||new Intl.DateTimeFormat(t.intl).resolvedOptions().numberingSystem==="latn"}class Mje{constructor(e,n,r){this.padTo=r.padTo||0,this.floor=r.floor||!1;const{padTo:i,floor:a,...o}=r;if(!n||Object.keys(o).length>0){const s={useGrouping:!1,...r};r.padTo>0&&(s.minimumIntegerDigits=r.padTo),this.inf=Sje(e,s)}}format(e){if(this.inf){const n=this.floor?Math.floor(e):e;return this.inf.format(n)}else{const n=this.floor?Math.floor(e):cW(e,3);return Ia(n,this.padTo)}}}class Rje{constructor(e,n,r){this.opts=r,this.originalZone=void 0;let i;if(this.opts.timeZone)this.dt=e;else if(e.zone.type==="fixed"){const o=-1*(e.offset/60),s=o>=0?`Etc/GMT+${o}`:`Etc/GMT${o}`;e.offset!==0&&xh.create(s).valid?(i=s,this.dt=e):(i="UTC",this.dt=e.offset===0?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else e.zone.type==="system"?this.dt=e:e.zone.type==="iana"?(this.dt=e,i=e.zone.name):(i="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);const a={...this.opts};a.timeZone=a.timeZone||i,this.dtf=KB(n,a)}format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(n=>{if(n.type==="timeZoneName"){const r=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...n,value:r}}else return n}):e}resolvedOptions(){return this.dtf.resolvedOptions()}}class $je{constructor(e,n,r){this.opts={style:"long",...r},!n&&cue()&&(this.rtf=Aje(e,r))}format(e,n){return this.rtf?this.rtf.format(e,n):r8e(n,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,n){return this.rtf?this.rtf.formatToParts(e,n):[]}}const Pje={firstDay:1,minimalDays:4,weekend:[6,7]};let Ci=class ux{static fromOpts(e){return ux.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,n,r,i,a=!1){const o=e||la.defaultLocale,s=o||(a?"en-US":kje()),l=n||la.defaultNumberingSystem,c=r||la.defaultOutputCalendar,f=QB(i)||la.defaultWeekSettings;return new ux(s,l,c,f,o)}static resetCache(){lx=null,qB={},GB={},ZB={}}static fromObject({locale:e,numberingSystem:n,outputCalendar:r,weekSettings:i}={}){return ux.create(e,n,r,i)}constructor(e,n,r,i,a){const[o,s,l]=Tje(e);this.locale=o,this.numberingSystem=n||s||null,this.outputCalendar=r||l||null,this.weekSettings=i,this.intl=Dje(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=a,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=Ije(this)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),n=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return e&&n?"en":"intl"}clone(e){return!e||Object.getOwnPropertyNames(e).length===0?this:ux.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,QB(e.weekSettings)||this.weekSettings,e.defaultToEN||!1)}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,n=!1){return rE(this,e,mue,()=>{const r=n?{month:e,day:"numeric"}:{month:e},i=n?"format":"standalone";return this.monthsCache[i][e]||(this.monthsCache[i][e]=Oje(a=>this.extract(a,r,"month"))),this.monthsCache[i][e]})}weekdays(e,n=!1){return rE(this,e,yue,()=>{const r=n?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},i=n?"format":"standalone";return this.weekdaysCache[i][e]||(this.weekdaysCache[i][e]=Cje(a=>this.extract(a,r,"weekday"))),this.weekdaysCache[i][e]})}meridiems(){return rE(this,void 0,()=>bue,()=>{if(!this.meridiemCache){const e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[Wn.utc(2016,11,13,9),Wn.utc(2016,11,13,19)].map(n=>this.extract(n,e,"dayperiod"))}return this.meridiemCache})}eras(e){return rE(this,e,_ue,()=>{const n={era:e};return this.eraCache[e]||(this.eraCache[e]=[Wn.utc(-40,1,1),Wn.utc(2017,1,1)].map(r=>this.extract(r,n,"era"))),this.eraCache[e]})}extract(e,n,r){const i=this.dtFormatter(e,n),a=i.formatToParts(),o=a.find(s=>s.type.toLowerCase()===r);return o?o.value:null}numberFormatter(e={}){return new Mje(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,n={}){return new Rje(e,this.intl,n)}relFormatter(e={}){return new $je(this.intl,this.isEnglish(),e)}listFormatter(e={}){return xje(this.intl,e)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:due()?Eje(this.locale):Pje}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}},ON=null;class Ss extends YA{static get utcInstance(){return ON===null&&(ON=new Ss(0)),ON}static instance(e){return e===0?Ss.utcInstance:new Ss(e)}static parseSpecifier(e){if(e){const n=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new Ss(zC(n[1],n[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${Yx(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${Yx(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,n){return Yx(this.fixed,n)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type==="fixed"&&e.fixed===this.fixed}get isValid(){return!0}}class Lje extends YA{constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function vp(t,e){if(jn(t)||t===null)return e;if(t instanceof YA)return t;if(Wje(t)){const n=t.toLowerCase();return n==="default"?e:n==="local"||n==="system"?BC.instance:n==="utc"||n==="gmt"?Ss.utcInstance:Ss.parseSpecifier(n)||xh.create(t)}else return Lp(t)?Ss.instance(t):typeof t=="object"&&"offset"in t&&typeof t.offset=="function"?t:new Lje(t)}const oW={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},tq={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},Nje=oW.hanidec.replace(/[\[|\]]/g,"").split("");function Fje(t){let e=parseInt(t,10);if(isNaN(e)){e="";for(let n=0;n<t.length;n++){const r=t.charCodeAt(n);if(t[n].search(oW.hanidec)!==-1)e+=Nje.indexOf(t[n]);else for(const i in tq){const[a,o]=tq[i];r>=a&&r<=o&&(e+=r-a)}}return parseInt(e,10)}else return e}let nb={};function Vje(){nb={}}function zu({numberingSystem:t},e=""){const n=t||"latn";return nb[n]||(nb[n]={}),nb[n][e]||(nb[n][e]=new RegExp(`${oW[n]}${e}`)),nb[n][e]}let nq=()=>Date.now(),rq="system",iq=null,aq=null,oq=null,sq=60,lq,uq=null;class la{static get now(){return nq}static set now(e){nq=e}static set defaultZone(e){rq=e}static get defaultZone(){return vp(rq,BC.instance)}static get defaultLocale(){return iq}static set defaultLocale(e){iq=e}static get defaultNumberingSystem(){return aq}static set defaultNumberingSystem(e){aq=e}static get defaultOutputCalendar(){return oq}static set defaultOutputCalendar(e){oq=e}static get defaultWeekSettings(){return uq}static set defaultWeekSettings(e){uq=QB(e)}static get twoDigitCutoffYear(){return sq}static set twoDigitCutoffYear(e){sq=e%100}static get throwOnInvalid(){return lq}static set throwOnInvalid(e){lq=e}static resetCaches(){Ci.resetCache(),xh.resetCache(),Wn.resetCache(),Vje()}}class lc{constructor(e,n){this.reason=e,this.explanation=n}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const iue=[0,31,59,90,120,151,181,212,243,273,304,334],aue=[0,31,60,91,121,152,182,213,244,274,305,335];function eu(t,e){return new lc("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${t}, which is invalid`)}function sW(t,e,n){const r=new Date(Date.UTC(t,e-1,n));t<100&&t>=0&&r.setUTCFullYear(r.getUTCFullYear()-1900);const i=r.getUTCDay();return i===0?7:i}function oue(t,e,n){return n+(qA(t)?aue:iue)[e-1]}function sue(t,e){const n=qA(t)?aue:iue,r=n.findIndex(a=>a<e),i=e-n[r];return{month:r+1,day:i}}function lW(t,e){return(t-e+7)%7+1}function cO(t,e=4,n=1){const{year:r,month:i,day:a}=t,o=oue(r,i,a),s=lW(sW(r,i,a),n);let l=Math.floor((o-s+14-e)/7),c;return l<1?(c=r-1,l=US(c,e,n)):l>US(r,e,n)?(c=r+1,l=1):c=r,{weekYear:c,weekNumber:l,weekday:s,...jC(t)}}function cq(t,e=4,n=1){const{weekYear:r,weekNumber:i,weekday:a}=t,o=lW(sW(r,1,e),n),s=Db(r);let l=i*7+a-o-7+e,c;l<1?(c=r-1,l+=Db(c)):l>s?(c=r+1,l-=Db(r)):c=r;const{month:f,day:h}=sue(c,l);return{year:c,month:f,day:h,...jC(t)}}function CN(t){const{year:e,month:n,day:r}=t,i=oue(e,n,r);return{year:e,ordinal:i,...jC(t)}}function dq(t){const{year:e,ordinal:n}=t,{month:r,day:i}=sue(e,n);return{year:e,month:r,day:i,...jC(t)}}function fq(t,e){if(!jn(t.localWeekday)||!jn(t.localWeekNumber)||!jn(t.localWeekYear)){if(!jn(t.weekday)||!jn(t.weekNumber)||!jn(t.weekYear))throw new db("Cannot mix locale-based week fields with ISO-based week fields");return jn(t.localWeekday)||(t.weekday=t.localWeekday),jn(t.localWeekNumber)||(t.weekNumber=t.localWeekNumber),jn(t.localWeekYear)||(t.weekYear=t.localWeekYear),delete t.localWeekday,delete t.localWeekNumber,delete t.localWeekYear,{minDaysInFirstWeek:e.getMinDaysInFirstWeek(),startOfWeek:e.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function Bje(t,e=4,n=1){const r=UC(t.weekYear),i=tu(t.weekNumber,1,US(t.weekYear,e,n)),a=tu(t.weekday,1,7);return r?i?a?!1:eu("weekday",t.weekday):eu("week",t.weekNumber):eu("weekYear",t.weekYear)}function Uje(t){const e=UC(t.year),n=tu(t.ordinal,1,Db(t.year));return e?n?!1:eu("ordinal",t.ordinal):eu("year",t.year)}function lue(t){const e=UC(t.year),n=tu(t.month,1,12),r=tu(t.day,1,dO(t.year,t.month));return e?n?r?!1:eu("day",t.day):eu("month",t.month):eu("year",t.year)}function uue(t){const{hour:e,minute:n,second:r,millisecond:i}=t,a=tu(e,0,23)||e===24&&n===0&&r===0&&i===0,o=tu(n,0,59),s=tu(r,0,59),l=tu(i,0,999);return a?o?s?l?!1:eu("millisecond",i):eu("second",r):eu("minute",n):eu("hour",e)}function jn(t){return typeof t>"u"}function Lp(t){return typeof t=="number"}function UC(t){return typeof t=="number"&&t%1===0}function Wje(t){return typeof t=="string"}function zje(t){return Object.prototype.toString.call(t)==="[object Date]"}function cue(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function due(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function jje(t){return Array.isArray(t)?t:[t]}function hq(t,e,n){if(t.length!==0)return t.reduce((r,i)=>{const a=[e(i),i];return r&&n(r[0],a[0])===r[0]?r:a},null)[1]}function Hje(t,e){return e.reduce((n,r)=>(n[r]=t[r],n),{})}function o_(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function QB(t){if(t==null)return null;if(typeof t!="object")throw new Yo("Week settings must be an object");if(!tu(t.firstDay,1,7)||!tu(t.minimalDays,1,7)||!Array.isArray(t.weekend)||t.weekend.some(e=>!tu(e,1,7)))throw new Yo("Invalid week settings");return{firstDay:t.firstDay,minimalDays:t.minimalDays,weekend:Array.from(t.weekend)}}function tu(t,e,n){return UC(t)&&t>=e&&t<=n}function Yje(t,e){return t-e*Math.floor(t/e)}function Ia(t,e=2){const n=t<0;let r;return n?r="-"+(""+-t).padStart(e,"0"):r=(""+t).padStart(e,"0"),r}function dp(t){if(!(jn(t)||t===null||t===""))return parseInt(t,10)}function Vg(t){if(!(jn(t)||t===null||t===""))return parseFloat(t)}function uW(t){if(!(jn(t)||t===null||t==="")){const e=parseFloat("0."+t)*1e3;return Math.floor(e)}}function cW(t,e,n=!1){const r=10**e;return(n?Math.trunc:Math.round)(t*r)/r}function qA(t){return t%4===0&&(t%100!==0||t%400===0)}function Db(t){return qA(t)?366:365}function dO(t,e){const n=Yje(e-1,12)+1,r=t+(e-n)/12;return n===2?qA(r)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function WC(t){let e=Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,t.second,t.millisecond);return t.year<100&&t.year>=0&&(e=new Date(e),e.setUTCFullYear(t.year,t.month-1,t.day)),+e}function pq(t,e,n){return-lW(sW(t,1,e),n)+e-1}function US(t,e=4,n=1){const r=pq(t,e,n),i=pq(t+1,e,n);return(Db(t)-r+i)/7}function XB(t){return t>99?t:t>la.twoDigitCutoffYear?1900+t:2e3+t}function fue(t,e,n,r=null){const i=new Date(t),a={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};r&&(a.timeZone=r);const o={timeZoneName:e,...a},s=new Intl.DateTimeFormat(n,o).formatToParts(i).find(l=>l.type.toLowerCase()==="timezonename");return s?s.value:null}function zC(t,e){let n=parseInt(t,10);Number.isNaN(n)&&(n=0);const r=parseInt(e,10)||0,i=n<0||Object.is(n,-0)?-r:r;return n*60+i}function hue(t){const e=Number(t);if(typeof t=="boolean"||t===""||Number.isNaN(e))throw new Yo(`Invalid unit value ${t}`);return e}function fO(t,e){const n={};for(const r in t)if(o_(t,r)){const i=t[r];if(i==null)continue;n[e(r)]=hue(i)}return n}function Yx(t,e){const n=Math.trunc(Math.abs(t/60)),r=Math.trunc(Math.abs(t%60)),i=t>=0?"+":"-";switch(e){case"short":return`${i}${Ia(n,2)}:${Ia(r,2)}`;case"narrow":return`${i}${n}${r>0?`:${r}`:""}`;case"techie":return`${i}${Ia(n,2)}${Ia(r,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function jC(t){return Hje(t,["hour","minute","second","millisecond"])}const qje=["January","February","March","April","May","June","July","August","September","October","November","December"],pue=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Kje=["J","F","M","A","M","J","J","A","S","O","N","D"];function mue(t){switch(t){case"narrow":return[...Kje];case"short":return[...pue];case"long":return[...qje];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const gue=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],vue=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Gje=["M","T","W","T","F","S","S"];function yue(t){switch(t){case"narrow":return[...Gje];case"short":return[...vue];case"long":return[...gue];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const bue=["AM","PM"],Zje=["Before Christ","Anno Domini"],Qje=["BC","AD"],Xje=["B","A"];function _ue(t){switch(t){case"narrow":return[...Xje];case"short":return[...Qje];case"long":return[...Zje];default:return null}}function Jje(t){return bue[t.hour<12?0:1]}function e8e(t,e){return yue(e)[t.weekday-1]}function t8e(t,e){return mue(e)[t.month-1]}function n8e(t,e){return _ue(e)[t.year<0?0:1]}function r8e(t,e,n="always",r=!1){const i={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},a=["hours","minutes","seconds"].indexOf(t)===-1;if(n==="auto"&&a){const h=t==="days";switch(e){case 1:return h?"tomorrow":`next ${i[t][0]}`;case-1:return h?"yesterday":`last ${i[t][0]}`;case 0:return h?"today":`this ${i[t][0]}`}}const o=Object.is(e,-0)||e<0,s=Math.abs(e),l=s===1,c=i[t],f=r?l?c[1]:c[2]||c[1]:l?i[t][0]:t;return o?`${s} ${f} ago`:`in ${s} ${f}`}function mq(t,e){let n="";for(const r of t)r.literal?n+=r.val:n+=e(r.val);return n}const i8e={D:uO,DD:Vle,DDD:Ble,DDDD:Ule,t:Wle,tt:zle,ttt:jle,tttt:Hle,T:Yle,TT:qle,TTT:Kle,TTTT:Gle,f:Zle,ff:Xle,fff:eue,ffff:nue,F:Qle,FF:Jle,FFF:tue,FFFF:rue};class Jo{static create(e,n={}){return new Jo(e,n)}static parseFormat(e){let n=null,r="",i=!1;const a=[];for(let o=0;o<e.length;o++){const s=e.charAt(o);s==="'"?(r.length>0&&a.push({literal:i||/^\s+$/.test(r),val:r}),n=null,r="",i=!i):i||s===n?r+=s:(r.length>0&&a.push({literal:/^\s+$/.test(r),val:r}),r=s,n=s)}return r.length>0&&a.push({literal:i||/^\s+$/.test(r),val:r}),a}static macroTokenToFormatOpts(e){return i8e[e]}constructor(e,n){this.opts=n,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,n){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...n}).format()}dtFormatter(e,n={}){return this.loc.dtFormatter(e,{...this.opts,...n})}formatDateTime(e,n){return this.dtFormatter(e,n).format()}formatDateTimeParts(e,n){return this.dtFormatter(e,n).formatToParts()}formatInterval(e,n){return this.dtFormatter(e.start,n).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,n){return this.dtFormatter(e,n).resolvedOptions()}num(e,n=0){if(this.opts.forceSimple)return Ia(e,n);const r={...this.opts};return n>0&&(r.padTo=n),this.loc.numberFormatter(r).format(e)}formatDateTimeFromString(e,n){const r=this.loc.listingMode()==="en",i=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",a=(g,y)=>this.loc.extract(e,g,y),o=g=>e.isOffsetFixed&&e.offset===0&&g.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,g.format):"",s=()=>r?Jje(e):a({hour:"numeric",hourCycle:"h12"},"dayperiod"),l=(g,y)=>r?t8e(e,g):a(y?{month:g}:{month:g,day:"numeric"},"month"),c=(g,y)=>r?e8e(e,g):a(y?{weekday:g}:{weekday:g,month:"long",day:"numeric"},"weekday"),f=g=>{const y=Jo.macroTokenToFormatOpts(g);return y?this.formatWithSystemDefault(e,y):g},h=g=>r?n8e(e,g):a({era:g},"era"),p=g=>{switch(g){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12===0?12:e.hour%12);case"hh":return this.num(e.hour%12===0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return o({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return o({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return o({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return s();case"d":return i?a({day:"numeric"},"day"):this.num(e.day);case"dd":return i?a({day:"2-digit"},"day"):this.num(e.day,2);case"c":return this.num(e.weekday);case"ccc":return c("short",!0);case"cccc":return c("long",!0);case"ccccc":return c("narrow",!0);case"E":return this.num(e.weekday);case"EEE":return c("short",!1);case"EEEE":return c("long",!1);case"EEEEE":return c("narrow",!1);case"L":return i?a({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return i?a({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return l("short",!0);case"LLLL":return l("long",!0);case"LLLLL":return l("narrow",!0);case"M":return i?a({month:"numeric"},"month"):this.num(e.month);case"MM":return i?a({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return l("short",!1);case"MMMM":return l("long",!1);case"MMMMM":return l("narrow",!1);case"y":return i?a({year:"numeric"},"year"):this.num(e.year);case"yy":return i?a({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return i?a({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return i?a({year:"numeric"},"year"):this.num(e.year,6);case"G":return h("short");case"GG":return h("long");case"GGGGG":return h("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"n":return this.num(e.localWeekNumber);case"nn":return this.num(e.localWeekNumber,2);case"ii":return this.num(e.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(e.localWeekYear,4);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return f(g)}};return mq(Jo.parseFormat(n),p)}formatDurationFromString(e,n){const r=l=>{switch(l[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},i=l=>c=>{const f=r(c);return f?this.num(l.get(f),c.length):c},a=Jo.parseFormat(n),o=a.reduce((l,{literal:c,val:f})=>c?l:l.concat(f),[]),s=e.shiftTo(...o.map(r).filter(l=>l));return mq(a,i(s))}}const wue=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function B_(...t){const e=t.reduce((n,r)=>n+r.source,"");return RegExp(`^${e}$`)}function U_(...t){return e=>t.reduce(([n,r,i],a)=>{const[o,s,l]=a(e,i);return[{...n,...o},s||r,l]},[{},null,1]).slice(0,2)}function W_(t,...e){if(t==null)return[null,null];for(const[n,r]of e){const i=n.exec(t);if(i)return r(i)}return[null,null]}function xue(...t){return(e,n)=>{const r={};let i;for(i=0;i<t.length;i++)r[t[i]]=dp(e[n+i]);return[r,null,n+i]}}const Sue=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,a8e=`(?:${Sue.source}?(?:\\[(${wue.source})\\])?)?`,dW=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,Aue=RegExp(`${dW.source}${a8e}`),fW=RegExp(`(?:T${Aue.source})?`),o8e=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,s8e=/(\d{4})-?W(\d\d)(?:-?(\d))?/,l8e=/(\d{4})-?(\d{3})/,u8e=xue("weekYear","weekNumber","weekDay"),c8e=xue("year","ordinal"),d8e=/(\d{4})-(\d\d)-(\d\d)/,kue=RegExp(`${dW.source} ?(?:${Sue.source}|(${wue.source}))?`),f8e=RegExp(`(?: ${kue.source})?`);function Ob(t,e,n){const r=t[e];return jn(r)?n:dp(r)}function h8e(t,e){return[{year:Ob(t,e),month:Ob(t,e+1,1),day:Ob(t,e+2,1)},null,e+3]}function z_(t,e){return[{hours:Ob(t,e,0),minutes:Ob(t,e+1,0),seconds:Ob(t,e+2,0),milliseconds:uW(t[e+3])},null,e+4]}function KA(t,e){const n=!t[e]&&!t[e+1],r=zC(t[e+1],t[e+2]),i=n?null:Ss.instance(r);return[{},i,e+3]}function GA(t,e){const n=t[e]?xh.create(t[e]):null;return[{},n,e+1]}const p8e=RegExp(`^T?${dW.source}$`),m8e=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function g8e(t){const[e,n,r,i,a,o,s,l,c]=t,f=e[0]==="-",h=l&&l[0]==="-",p=(g,y=!1)=>g!==void 0&&(y||g&&f)?-g:g;return[{years:p(Vg(n)),months:p(Vg(r)),weeks:p(Vg(i)),days:p(Vg(a)),hours:p(Vg(o)),minutes:p(Vg(s)),seconds:p(Vg(l),l==="-0"),milliseconds:p(uW(c),h)}]}const v8e={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function hW(t,e,n,r,i,a,o){const s={year:e.length===2?XB(dp(e)):dp(e),month:pue.indexOf(n)+1,day:dp(r),hour:dp(i),minute:dp(a)};return o&&(s.second=dp(o)),t&&(s.weekday=t.length>3?gue.indexOf(t)+1:vue.indexOf(t)+1),s}const y8e=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function b8e(t){const[,e,n,r,i,a,o,s,l,c,f,h]=t,p=hW(e,i,r,n,a,o,s);let g;return l?g=v8e[l]:c?g=0:g=zC(f,h),[p,new Ss(g)]}function _8e(t){return t.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const w8e=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,x8e=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,S8e=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function gq(t){const[,e,n,r,i,a,o,s]=t;return[hW(e,i,r,n,a,o,s),Ss.utcInstance]}function A8e(t){const[,e,n,r,i,a,o,s]=t;return[hW(e,s,n,r,i,a,o),Ss.utcInstance]}const k8e=B_(o8e,fW),E8e=B_(s8e,fW),T8e=B_(l8e,fW),D8e=B_(Aue),Eue=U_(h8e,z_,KA,GA),O8e=U_(u8e,z_,KA,GA),C8e=U_(c8e,z_,KA,GA),I8e=U_(z_,KA,GA);function M8e(t){return W_(t,[k8e,Eue],[E8e,O8e],[T8e,C8e],[D8e,I8e])}function R8e(t){return W_(_8e(t),[y8e,b8e])}function $8e(t){return W_(t,[w8e,gq],[x8e,gq],[S8e,A8e])}function P8e(t){return W_(t,[m8e,g8e])}const L8e=U_(z_);function N8e(t){return W_(t,[p8e,L8e])}const F8e=B_(d8e,f8e),V8e=B_(kue),B8e=U_(z_,KA,GA);function U8e(t){return W_(t,[F8e,Eue],[V8e,B8e])}const vq="Invalid Duration",Tue={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},W8e={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...Tue},zl=146097/400,Fy=146097/4800,z8e={years:{quarters:4,months:12,weeks:zl/7,days:zl,hours:zl*24,minutes:zl*24*60,seconds:zl*24*60*60,milliseconds:zl*24*60*60*1e3},quarters:{months:3,weeks:zl/28,days:zl/4,hours:zl*24/4,minutes:zl*24*60/4,seconds:zl*24*60*60/4,milliseconds:zl*24*60*60*1e3/4},months:{weeks:Fy/7,days:Fy,hours:Fy*24,minutes:Fy*24*60,seconds:Fy*24*60*60,milliseconds:Fy*24*60*60*1e3},...Tue},cv=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],j8e=cv.slice(0).reverse();function np(t,e,n=!1){const r={values:n?e.values:{...t.values,...e.values||{}},loc:t.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||t.conversionAccuracy,matrix:e.matrix||t.matrix};return new Qo(r)}function Due(t,e){let n=e.milliseconds??0;for(const r of j8e.slice(1))e[r]&&(n+=e[r]*t[r].milliseconds);return n}function yq(t,e){const n=Due(t,e)<0?-1:1;cv.reduceRight((r,i)=>{if(jn(e[i]))return r;if(r){const a=e[r]*n,o=t[i][r],s=Math.floor(a/o);e[i]+=s*n,e[r]-=s*o*n}return i},null),cv.reduce((r,i)=>{if(jn(e[i]))return r;if(r){const a=e[r]%1;e[r]-=a,e[i]+=a*t[r][i]}return i},null)}function H8e(t){const e={};for(const[n,r]of Object.entries(t))r!==0&&(e[n]=r);return e}let Qo=class Co{constructor(e){const n=e.conversionAccuracy==="longterm"||!1;let r=n?z8e:W8e;e.matrix&&(r=e.matrix),this.values=e.values,this.loc=e.loc||Ci.create(),this.conversionAccuracy=n?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=r,this.isLuxonDuration=!0}static fromMillis(e,n){return Co.fromObject({milliseconds:e},n)}static fromObject(e,n={}){if(e==null||typeof e!="object")throw new Yo(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new Co({values:fO(e,Co.normalizeUnit),loc:Ci.fromObject(n),conversionAccuracy:n.conversionAccuracy,matrix:n.matrix})}static fromDurationLike(e){if(Lp(e))return Co.fromMillis(e);if(Co.isDuration(e))return e;if(typeof e=="object")return Co.fromObject(e);throw new Yo(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,n){const[r]=P8e(e);return r?Co.fromObject(r,n):Co.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,n){const[r]=N8e(e);return r?Co.fromObject(r,n):Co.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,n=null){if(!e)throw new Yo("need to specify a reason the Duration is invalid");const r=e instanceof lc?e:new lc(e,n);if(la.throwOnInvalid)throw new mje(r);return new Co({invalid:r})}static normalizeUnit(e){const n={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e&&e.toLowerCase()];if(!n)throw new Fle(e);return n}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,n={}){const r={...n,floor:n.round!==!1&&n.floor!==!1};return this.isValid?Jo.create(this.loc,r).formatDurationFromString(this,e):vq}toHuman(e={}){if(!this.isValid)return vq;const n=cv.map(r=>{const i=this.values[r];return jn(i)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:r.slice(0,-1)}).format(i)}).filter(r=>r);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(n)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return this.years!==0&&(e+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(e+=this.months+this.quarters*3+"M"),this.weeks!==0&&(e+=this.weeks+"W"),this.days!==0&&(e+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(e+="T"),this.hours!==0&&(e+=this.hours+"H"),this.minutes!==0&&(e+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(e+=cW(this.seconds+this.milliseconds/1e3,3)+"S"),e==="P"&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;const n=this.toMillis();return n<0||n>=864e5?null:(e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1},Wn.fromMillis(n,{zone:"UTC"}).toISOTime(e))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?Due(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const n=Co.fromDurationLike(e),r={};for(const i of cv)(o_(n.values,i)||o_(this.values,i))&&(r[i]=n.get(i)+this.get(i));return np(this,{values:r},!0)}minus(e){if(!this.isValid)return this;const n=Co.fromDurationLike(e);return this.plus(n.negate())}mapUnits(e){if(!this.isValid)return this;const n={};for(const r of Object.keys(this.values))n[r]=hue(e(this.values[r],r));return np(this,{values:n},!0)}get(e){return this[Co.normalizeUnit(e)]}set(e){if(!this.isValid)return this;const n={...this.values,...fO(e,Co.normalizeUnit)};return np(this,{values:n})}reconfigure({locale:e,numberingSystem:n,conversionAccuracy:r,matrix:i}={}){const o={loc:this.loc.clone({locale:e,numberingSystem:n}),matrix:i,conversionAccuracy:r};return np(this,o)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return yq(this.matrix,e),np(this,{values:e},!0)}rescale(){if(!this.isValid)return this;const e=H8e(this.normalize().shiftToAll().toObject());return np(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(o=>Co.normalizeUnit(o));const n={},r={},i=this.toObject();let a;for(const o of cv)if(e.indexOf(o)>=0){a=o;let s=0;for(const c in r)s+=this.matrix[c][o]*r[c],r[c]=0;Lp(i[o])&&(s+=i[o]);const l=Math.trunc(s);n[o]=l,r[o]=(s*1e3-l*1e3)/1e3}else Lp(i[o])&&(r[o]=i[o]);for(const o in r)r[o]!==0&&(n[a]+=o===a?r[o]:r[o]/this.matrix[a][o]);return yq(this.matrix,n),np(this,{values:n},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const e={};for(const n of Object.keys(this.values))e[n]=this.values[n]===0?0:-this.values[n];return np(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid||!this.loc.equals(e.loc))return!1;function n(r,i){return r===void 0||r===0?i===void 0||i===0:r===i}for(const r of cv)if(!n(this.values[r],e.values[r]))return!1;return!0}};const Vy="Invalid Interval";function Y8e(t,e){return!t||!t.isValid?ia.invalid("missing or invalid start"):!e||!e.isValid?ia.invalid("missing or invalid end"):e<t?ia.invalid("end before start",`The end of an interval must be after its start, but you had start=${t.toISO()} and end=${e.toISO()}`):null}class ia{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(e,n=null){if(!e)throw new Yo("need to specify a reason the Interval is invalid");const r=e instanceof lc?e:new lc(e,n);if(la.throwOnInvalid)throw new pje(r);return new ia({invalid:r})}static fromDateTimes(e,n){const r=T1(e),i=T1(n),a=Y8e(r,i);return a??new ia({start:r,end:i})}static after(e,n){const r=Qo.fromDurationLike(n),i=T1(e);return ia.fromDateTimes(i,i.plus(r))}static before(e,n){const r=Qo.fromDurationLike(n),i=T1(e);return ia.fromDateTimes(i.minus(r),i)}static fromISO(e,n){const[r,i]=(e||"").split("/",2);if(r&&i){let a,o;try{a=Wn.fromISO(r,n),o=a.isValid}catch{o=!1}let s,l;try{s=Wn.fromISO(i,n),l=s.isValid}catch{l=!1}if(o&&l)return ia.fromDateTimes(a,s);if(o){const c=Qo.fromISO(i,n);if(c.isValid)return ia.after(a,c)}else if(l){const c=Qo.fromISO(r,n);if(c.isValid)return ia.before(s,c)}}return ia.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static isInterval(e){return e&&e.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(e="milliseconds"){return this.isValid?this.toDuration(e).get(e):NaN}count(e="milliseconds",n){if(!this.isValid)return NaN;const r=this.start.startOf(e,n);let i;return n!=null&&n.useLocaleWeeks?i=this.end.reconfigure({locale:r.locale}):i=this.end,i=i.startOf(e,n),Math.floor(i.diff(r,e).get(e))+(i.valueOf()!==this.end.valueOf())}hasSame(e){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,e):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(e){return this.isValid?this.s>e:!1}isBefore(e){return this.isValid?this.e<=e:!1}contains(e){return this.isValid?this.s<=e&&this.e>e:!1}set({start:e,end:n}={}){return this.isValid?ia.fromDateTimes(e||this.s,n||this.e):this}splitAt(...e){if(!this.isValid)return[];const n=e.map(T1).filter(o=>this.contains(o)).sort((o,s)=>o.toMillis()-s.toMillis()),r=[];let{s:i}=this,a=0;for(;i<this.e;){const o=n[a]||this.e,s=+o>+this.e?this.e:o;r.push(ia.fromDateTimes(i,s)),i=s,a+=1}return r}splitBy(e){const n=Qo.fromDurationLike(e);if(!this.isValid||!n.isValid||n.as("milliseconds")===0)return[];let{s:r}=this,i=1,a;const o=[];for(;r<this.e;){const s=this.start.plus(n.mapUnits(l=>l*i));a=+s>+this.e?this.e:s,o.push(ia.fromDateTimes(r,a)),r=a,i+=1}return o}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s<e.e}abutsStart(e){return this.isValid?+this.e==+e.s:!1}abutsEnd(e){return this.isValid?+e.e==+this.s:!1}engulfs(e){return this.isValid?this.s<=e.s&&this.e>=e.e:!1}equals(e){return!this.isValid||!e.isValid?!1:this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;const n=this.s>e.s?this.s:e.s,r=this.e<e.e?this.e:e.e;return n>=r?null:ia.fromDateTimes(n,r)}union(e){if(!this.isValid)return this;const n=this.s<e.s?this.s:e.s,r=this.e>e.e?this.e:e.e;return ia.fromDateTimes(n,r)}static merge(e){const[n,r]=e.sort((i,a)=>i.s-a.s).reduce(([i,a],o)=>a?a.overlaps(o)||a.abutsStart(o)?[i,a.union(o)]:[i.concat([a]),o]:[i,o],[[],null]);return r&&n.push(r),n}static xor(e){let n=null,r=0;const i=[],a=e.map(l=>[{time:l.s,type:"s"},{time:l.e,type:"e"}]),o=Array.prototype.concat(...a),s=o.sort((l,c)=>l.time-c.time);for(const l of s)r+=l.type==="s"?1:-1,r===1?n=l.time:(n&&+n!=+l.time&&i.push(ia.fromDateTimes(n,l.time)),n=null);return ia.merge(i)}difference(...e){return ia.xor([this].concat(e)).map(n=>this.intersection(n)).filter(n=>n&&!n.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:Vy}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(e=uO,n={}){return this.isValid?Jo.create(this.s.loc.clone(n),e).formatInterval(this):Vy}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:Vy}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Vy}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:Vy}toFormat(e,{separator:n=" – "}={}){return this.isValid?`${this.s.toFormat(e)}${n}${this.e.toFormat(e)}`:Vy}toDuration(e,n){return this.isValid?this.e.diff(this.s,e,n):Qo.invalid(this.invalidReason)}mapEndpoints(e){return ia.fromDateTimes(e(this.s),e(this.e))}}class iE{static hasDST(e=la.defaultZone){const n=Wn.now().setZone(e).set({month:12});return!e.isUniversal&&n.offset!==n.set({month:6}).offset}static isValidIANAZone(e){return xh.isValidZone(e)}static normalizeZone(e){return vp(e,la.defaultZone)}static getStartOfWeek({locale:e=null,locObj:n=null}={}){return(n||Ci.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:n=null}={}){return(n||Ci.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:n=null}={}){return(n||Ci.create(e)).getWeekendDays().slice()}static months(e="long",{locale:n=null,numberingSystem:r=null,locObj:i=null,outputCalendar:a="gregory"}={}){return(i||Ci.create(n,r,a)).months(e)}static monthsFormat(e="long",{locale:n=null,numberingSystem:r=null,locObj:i=null,outputCalendar:a="gregory"}={}){return(i||Ci.create(n,r,a)).months(e,!0)}static weekdays(e="long",{locale:n=null,numberingSystem:r=null,locObj:i=null}={}){return(i||Ci.create(n,r,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:n=null,numberingSystem:r=null,locObj:i=null}={}){return(i||Ci.create(n,r,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return Ci.create(e).meridiems()}static eras(e="short",{locale:n=null}={}){return Ci.create(n,null,"gregory").eras(e)}static features(){return{relative:cue(),localeWeek:due()}}}function bq(t,e){const n=i=>i.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),r=n(e)-n(t);return Math.floor(Qo.fromMillis(r).as("days"))}function q8e(t,e,n){const r=[["years",(l,c)=>c.year-l.year],["quarters",(l,c)=>c.quarter-l.quarter+(c.year-l.year)*4],["months",(l,c)=>c.month-l.month+(c.year-l.year)*12],["weeks",(l,c)=>{const f=bq(l,c);return(f-f%7)/7}],["days",bq]],i={},a=t;let o,s;for(const[l,c]of r)n.indexOf(l)>=0&&(o=l,i[l]=c(t,e),s=a.plus(i),s>e?(i[l]--,t=a.plus(i),t>e&&(s=t,i[l]--,t=a.plus(i))):t=s);return[t,i,s,o]}function K8e(t,e,n,r){let[i,a,o,s]=q8e(t,e,n);const l=e-i,c=n.filter(h=>["hours","minutes","seconds","milliseconds"].indexOf(h)>=0);c.length===0&&(o<e&&(o=i.plus({[s]:1})),o!==i&&(a[s]=(a[s]||0)+l/(o-i)));const f=Qo.fromObject(a,r);return c.length>0?Qo.fromMillis(l,r).shiftTo(...c).plus(f):f}const G8e="missing Intl.DateTimeFormat.formatToParts support";function Br(t,e=n=>n){return{regex:t,deser:([n])=>e(Fje(n))}}const Z8e=" ",Oue=`[ ${Z8e}]`,Cue=new RegExp(Oue,"g");function Q8e(t){return t.replace(/\./g,"\\.?").replace(Cue,Oue)}function _q(t){return t.replace(/\./g,"").replace(Cue," ").toLowerCase()}function ju(t,e){return t===null?null:{regex:RegExp(t.map(Q8e).join("|")),deser:([n])=>t.findIndex(r=>_q(n)===_q(r))+e}}function wq(t,e){return{regex:t,deser:([,n,r])=>zC(n,r),groups:e}}function aE(t){return{regex:t,deser:([e])=>e}}function X8e(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function J8e(t,e){const n=zu(e),r=zu(e,"{2}"),i=zu(e,"{3}"),a=zu(e,"{4}"),o=zu(e,"{6}"),s=zu(e,"{1,2}"),l=zu(e,"{1,3}"),c=zu(e,"{1,6}"),f=zu(e,"{1,9}"),h=zu(e,"{2,4}"),p=zu(e,"{4,6}"),g=b=>({regex:RegExp(X8e(b.val)),deser:([w])=>w,literal:!0}),v=(b=>{if(t.literal)return g(b);switch(b.val){case"G":return ju(e.eras("short"),0);case"GG":return ju(e.eras("long"),0);case"y":return Br(c);case"yy":return Br(h,XB);case"yyyy":return Br(a);case"yyyyy":return Br(p);case"yyyyyy":return Br(o);case"M":return Br(s);case"MM":return Br(r);case"MMM":return ju(e.months("short",!0),1);case"MMMM":return ju(e.months("long",!0),1);case"L":return Br(s);case"LL":return Br(r);case"LLL":return ju(e.months("short",!1),1);case"LLLL":return ju(e.months("long",!1),1);case"d":return Br(s);case"dd":return Br(r);case"o":return Br(l);case"ooo":return Br(i);case"HH":return Br(r);case"H":return Br(s);case"hh":return Br(r);case"h":return Br(s);case"mm":return Br(r);case"m":return Br(s);case"q":return Br(s);case"qq":return Br(r);case"s":return Br(s);case"ss":return Br(r);case"S":return Br(l);case"SSS":return Br(i);case"u":return aE(f);case"uu":return aE(s);case"uuu":return Br(n);case"a":return ju(e.meridiems(),0);case"kkkk":return Br(a);case"kk":return Br(h,XB);case"W":return Br(s);case"WW":return Br(r);case"E":case"c":return Br(n);case"EEE":return ju(e.weekdays("short",!1),1);case"EEEE":return ju(e.weekdays("long",!1),1);case"ccc":return ju(e.weekdays("short",!0),1);case"cccc":return ju(e.weekdays("long",!0),1);case"Z":case"ZZ":return wq(new RegExp(`([+-]${s.source})(?::(${r.source}))?`),2);case"ZZZ":return wq(new RegExp(`([+-]${s.source})(${r.source})?`),2);case"z":return aE(/[a-z_+-/]{1,256}?/i);case" ":return aE(/[^\S\n\r]/);default:return g(b)}})(t)||{invalidReason:G8e};return v.token=t,v}const eHe={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function tHe(t,e,n){const{type:r,value:i}=t;if(r==="literal"){const l=/^\s+$/.test(i);return{literal:!l,val:l?" ":i}}const a=e[r];let o=r;r==="hour"&&(e.hour12!=null?o=e.hour12?"hour12":"hour24":e.hourCycle!=null?e.hourCycle==="h11"||e.hourCycle==="h12"?o="hour12":o="hour24":o=n.hour12?"hour12":"hour24");let s=eHe[o];if(typeof s=="object"&&(s=s[a]),s)return{literal:!1,val:s}}function nHe(t){return[`^${t.map(n=>n.regex).reduce((n,r)=>`${n}(${r.source})`,"")}$`,t]}function rHe(t,e,n){const r=t.match(e);if(r){const i={};let a=1;for(const o in n)if(o_(n,o)){const s=n[o],l=s.groups?s.groups+1:1;!s.literal&&s.token&&(i[s.token.val[0]]=s.deser(r.slice(a,a+l))),a+=l}return[r,i]}else return[r,{}]}function iHe(t){const e=a=>{switch(a){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let n=null,r;return jn(t.z)||(n=xh.create(t.z)),jn(t.Z)||(n||(n=new Ss(t.Z)),r=t.Z),jn(t.q)||(t.M=(t.q-1)*3+1),jn(t.h)||(t.h<12&&t.a===1?t.h+=12:t.h===12&&t.a===0&&(t.h=0)),t.G===0&&t.y&&(t.y=-t.y),jn(t.u)||(t.S=uW(t.u)),[Object.keys(t).reduce((a,o)=>{const s=e(o);return s&&(a[s]=t[o]),a},{}),n,r]}let IN=null;function aHe(){return IN||(IN=Wn.fromMillis(1555555555555)),IN}function oHe(t,e){if(t.literal)return t;const n=Jo.macroTokenToFormatOpts(t.val),r=$ue(n,e);return r==null||r.includes(void 0)?t:r}function Iue(t,e){return Array.prototype.concat(...t.map(n=>oHe(n,e)))}class Mue{constructor(e,n){if(this.locale=e,this.format=n,this.tokens=Iue(Jo.parseFormat(n),e),this.units=this.tokens.map(r=>J8e(r,e)),this.disqualifyingUnit=this.units.find(r=>r.invalidReason),!this.disqualifyingUnit){const[r,i]=nHe(this.units);this.regex=RegExp(r,"i"),this.handlers=i}}explainFromTokens(e){if(this.isValid){const[n,r]=rHe(e,this.regex,this.handlers),[i,a,o]=r?iHe(r):[null,null,void 0];if(o_(r,"a")&&o_(r,"H"))throw new db("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:this.tokens,regex:this.regex,rawMatches:n,matches:r,result:i,zone:a,specificOffset:o}}else return{input:e,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function Rue(t,e,n){return new Mue(t,n).explainFromTokens(e)}function sHe(t,e,n){const{result:r,zone:i,specificOffset:a,invalidReason:o}=Rue(t,e,n);return[r,i,a,o]}function $ue(t,e){if(!t)return null;const r=Jo.create(e,t).dtFormatter(aHe()),i=r.formatToParts(),a=r.resolvedOptions();return i.map(o=>tHe(o,t,a))}const MN="Invalid DateTime",lHe=864e13;function cx(t){return new lc("unsupported zone",`the zone "${t.name}" is not supported`)}function RN(t){return t.weekData===null&&(t.weekData=cO(t.c)),t.weekData}function $N(t){return t.localWeekData===null&&(t.localWeekData=cO(t.c,t.loc.getMinDaysInFirstWeek(),t.loc.getStartOfWeek())),t.localWeekData}function Bg(t,e){const n={ts:t.ts,zone:t.zone,c:t.c,o:t.o,loc:t.loc,invalid:t.invalid};return new Wn({...n,...e,old:n})}function Pue(t,e,n){let r=t-e*60*1e3;const i=n.offset(r);if(e===i)return[r,e];r-=(i-e)*60*1e3;const a=n.offset(r);return i===a?[r,i]:[t-Math.min(i,a)*60*1e3,Math.max(i,a)]}function oE(t,e){t+=e*60*1e3;const n=new Date(t);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function BT(t,e,n){return Pue(WC(t),e,n)}function xq(t,e){const n=t.o,r=t.c.year+Math.trunc(e.years),i=t.c.month+Math.trunc(e.months)+Math.trunc(e.quarters)*3,a={...t.c,year:r,month:i,day:Math.min(t.c.day,dO(r,i))+Math.trunc(e.days)+Math.trunc(e.weeks)*7},o=Qo.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),s=WC(a);let[l,c]=Pue(s,n,t.zone);return o!==0&&(l+=o,c=t.zone.offset(l)),{ts:l,o:c}}function By(t,e,n,r,i,a){const{setZone:o,zone:s}=n;if(t&&Object.keys(t).length!==0||e){const l=e||s,c=Wn.fromObject(t,{...n,zone:l,specificOffset:a});return o?c:c.setZone(s)}else return Wn.invalid(new lc("unparsable",`the input "${i}" can't be parsed as ${r}`))}function sE(t,e,n=!0){return t.isValid?Jo.create(Ci.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(t,e):null}function PN(t,e){const n=t.c.year>9999||t.c.year<0;let r="";return n&&t.c.year>=0&&(r+="+"),r+=Ia(t.c.year,n?6:4),e?(r+="-",r+=Ia(t.c.month),r+="-",r+=Ia(t.c.day)):(r+=Ia(t.c.month),r+=Ia(t.c.day)),r}function Sq(t,e,n,r,i,a){let o=Ia(t.c.hour);return e?(o+=":",o+=Ia(t.c.minute),(t.c.millisecond!==0||t.c.second!==0||!n)&&(o+=":")):o+=Ia(t.c.minute),(t.c.millisecond!==0||t.c.second!==0||!n)&&(o+=Ia(t.c.second),(t.c.millisecond!==0||!r)&&(o+=".",o+=Ia(t.c.millisecond,3))),i&&(t.isOffsetFixed&&t.offset===0&&!a?o+="Z":t.o<0?(o+="-",o+=Ia(Math.trunc(-t.o/60)),o+=":",o+=Ia(Math.trunc(-t.o%60))):(o+="+",o+=Ia(Math.trunc(t.o/60)),o+=":",o+=Ia(Math.trunc(t.o%60)))),a&&(o+="["+t.zone.ianaName+"]"),o}const Lue={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},uHe={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},cHe={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Nue=["year","month","day","hour","minute","second","millisecond"],dHe=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],fHe=["year","ordinal","hour","minute","second","millisecond"];function hHe(t){const e={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[t.toLowerCase()];if(!e)throw new Fle(t);return e}function Aq(t){switch(t.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return hHe(t)}}function pHe(t){return WT[t]||(UT===void 0&&(UT=la.now()),WT[t]=t.offset(UT)),WT[t]}function kq(t,e){const n=vp(e.zone,la.defaultZone);if(!n.isValid)return Wn.invalid(cx(n));const r=Ci.fromObject(e);let i,a;if(jn(t.year))i=la.now();else{for(const l of Nue)jn(t[l])&&(t[l]=Lue[l]);const o=lue(t)||uue(t);if(o)return Wn.invalid(o);const s=pHe(n);[i,a]=BT(t,s,n)}return new Wn({ts:i,zone:n,loc:r,o:a})}function Eq(t,e,n){const r=jn(n.round)?!0:n.round,i=(o,s)=>(o=cW(o,r||n.calendary?0:2,!0),e.loc.clone(n).relFormatter(n).format(o,s)),a=o=>n.calendary?e.hasSame(t,o)?0:e.startOf(o).diff(t.startOf(o),o).get(o):e.diff(t,o).get(o);if(n.unit)return i(a(n.unit),n.unit);for(const o of n.units){const s=a(o);if(Math.abs(s)>=1)return i(s,o)}return i(t>e?-0:0,n.units[n.units.length-1])}function Tq(t){let e={},n;return t.length>0&&typeof t[t.length-1]=="object"?(e=t[t.length-1],n=Array.from(t).slice(0,t.length-1)):n=Array.from(t),[e,n]}let UT,WT={};class Wn{constructor(e){const n=e.zone||la.defaultZone;let r=e.invalid||(Number.isNaN(e.ts)?new lc("invalid input"):null)||(n.isValid?null:cx(n));this.ts=jn(e.ts)?la.now():e.ts;let i=null,a=null;if(!r)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(n))[i,a]=[e.old.c,e.old.o];else{const s=Lp(e.o)&&!e.old?e.o:n.offset(this.ts);i=oE(this.ts,s),r=Number.isNaN(i.year)?new lc("invalid input"):null,i=r?null:i,a=r?null:s}this._zone=n,this.loc=e.loc||Ci.create(),this.invalid=r,this.weekData=null,this.localWeekData=null,this.c=i,this.o=a,this.isLuxonDateTime=!0}static now(){return new Wn({})}static local(){const[e,n]=Tq(arguments),[r,i,a,o,s,l,c]=n;return kq({year:r,month:i,day:a,hour:o,minute:s,second:l,millisecond:c},e)}static utc(){const[e,n]=Tq(arguments),[r,i,a,o,s,l,c]=n;return e.zone=Ss.utcInstance,kq({year:r,month:i,day:a,hour:o,minute:s,second:l,millisecond:c},e)}static fromJSDate(e,n={}){const r=zje(e)?e.valueOf():NaN;if(Number.isNaN(r))return Wn.invalid("invalid input");const i=vp(n.zone,la.defaultZone);return i.isValid?new Wn({ts:r,zone:i,loc:Ci.fromObject(n)}):Wn.invalid(cx(i))}static fromMillis(e,n={}){if(Lp(e))return e<-864e13||e>lHe?Wn.invalid("Timestamp out of range"):new Wn({ts:e,zone:vp(n.zone,la.defaultZone),loc:Ci.fromObject(n)});throw new Yo(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,n={}){if(Lp(e))return new Wn({ts:e*1e3,zone:vp(n.zone,la.defaultZone),loc:Ci.fromObject(n)});throw new Yo("fromSeconds requires a numerical input")}static fromObject(e,n={}){e=e||{};const r=vp(n.zone,la.defaultZone);if(!r.isValid)return Wn.invalid(cx(r));const i=Ci.fromObject(n),a=fO(e,Aq),{minDaysInFirstWeek:o,startOfWeek:s}=fq(a,i),l=la.now(),c=jn(n.specificOffset)?r.offset(l):n.specificOffset,f=!jn(a.ordinal),h=!jn(a.year),p=!jn(a.month)||!jn(a.day),g=h||p,y=a.weekYear||a.weekNumber;if((g||f)&&y)throw new db("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(p&&f)throw new db("Can't mix ordinal dates with month/day");const v=y||a.weekday&&!g;let b,w,S=oE(l,c);v?(b=dHe,w=uHe,S=cO(S,o,s)):f?(b=fHe,w=cHe,S=CN(S)):(b=Nue,w=Lue);let T=!1;for(const M of b){const C=a[M];jn(C)?T?a[M]=w[M]:a[M]=S[M]:T=!0}const _=v?Bje(a,o,s):f?Uje(a):lue(a),E=_||uue(a);if(E)return Wn.invalid(E);const D=v?cq(a,o,s):f?dq(a):a,[O,V]=BT(D,c,r),P=new Wn({ts:O,zone:r,o:V,loc:i});return a.weekday&&g&&e.weekday!==P.weekday?Wn.invalid("mismatched weekday",`you can't specify both a weekday of ${a.weekday} and a date of ${P.toISO()}`):P.isValid?P:Wn.invalid(P.invalid)}static fromISO(e,n={}){const[r,i]=M8e(e);return By(r,i,n,"ISO 8601",e)}static fromRFC2822(e,n={}){const[r,i]=R8e(e);return By(r,i,n,"RFC 2822",e)}static fromHTTP(e,n={}){const[r,i]=$8e(e);return By(r,i,n,"HTTP",n)}static fromFormat(e,n,r={}){if(jn(e)||jn(n))throw new Yo("fromFormat requires an input string and a format");const{locale:i=null,numberingSystem:a=null}=r,o=Ci.fromOpts({locale:i,numberingSystem:a,defaultToEN:!0}),[s,l,c,f]=sHe(o,e,n);return f?Wn.invalid(f):By(s,l,r,`format ${n}`,e,c)}static fromString(e,n,r={}){return Wn.fromFormat(e,n,r)}static fromSQL(e,n={}){const[r,i]=U8e(e);return By(r,i,n,"SQL",e)}static invalid(e,n=null){if(!e)throw new Yo("need to specify a reason the DateTime is invalid");const r=e instanceof lc?e:new lc(e,n);if(la.throwOnInvalid)throw new hje(r);return new Wn({invalid:r})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,n={}){const r=$ue(e,Ci.fromObject(n));return r?r.map(i=>i?i.val:null).join(""):null}static expandFormat(e,n={}){return Iue(Jo.parseFormat(e),Ci.fromObject(n)).map(i=>i.val).join("")}static resetCache(){UT=void 0,WT={}}get(e){return this[e]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?RN(this).weekYear:NaN}get weekNumber(){return this.isValid?RN(this).weekNumber:NaN}get weekday(){return this.isValid?RN(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?$N(this).weekday:NaN}get localWeekNumber(){return this.isValid?$N(this).weekNumber:NaN}get localWeekYear(){return this.isValid?$N(this).weekYear:NaN}get ordinal(){return this.isValid?CN(this.c).ordinal:NaN}get monthShort(){return this.isValid?iE.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?iE.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?iE.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?iE.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const e=864e5,n=6e4,r=WC(this.c),i=this.zone.offset(r-e),a=this.zone.offset(r+e),o=this.zone.offset(r-i*n),s=this.zone.offset(r-a*n);if(o===s)return[this];const l=r-o*n,c=r-s*n,f=oE(l,o),h=oE(c,s);return f.hour===h.hour&&f.minute===h.minute&&f.second===h.second&&f.millisecond===h.millisecond?[Bg(this,{ts:l}),Bg(this,{ts:c})]:[this]}get isInLeapYear(){return qA(this.year)}get daysInMonth(){return dO(this.year,this.month)}get daysInYear(){return this.isValid?Db(this.year):NaN}get weeksInWeekYear(){return this.isValid?US(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?US(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){const{locale:n,numberingSystem:r,calendar:i}=Jo.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:n,numberingSystem:r,outputCalendar:i}}toUTC(e=0,n={}){return this.setZone(Ss.instance(e),n)}toLocal(){return this.setZone(la.defaultZone)}setZone(e,{keepLocalTime:n=!1,keepCalendarTime:r=!1}={}){if(e=vp(e,la.defaultZone),e.equals(this.zone))return this;if(e.isValid){let i=this.ts;if(n||r){const a=e.offset(this.ts),o=this.toObject();[i]=BT(o,a,e)}return Bg(this,{ts:i,zone:e})}else return Wn.invalid(cx(e))}reconfigure({locale:e,numberingSystem:n,outputCalendar:r}={}){const i=this.loc.clone({locale:e,numberingSystem:n,outputCalendar:r});return Bg(this,{loc:i})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const n=fO(e,Aq),{minDaysInFirstWeek:r,startOfWeek:i}=fq(n,this.loc),a=!jn(n.weekYear)||!jn(n.weekNumber)||!jn(n.weekday),o=!jn(n.ordinal),s=!jn(n.year),l=!jn(n.month)||!jn(n.day),c=s||l,f=n.weekYear||n.weekNumber;if((c||o)&&f)throw new db("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(l&&o)throw new db("Can't mix ordinal dates with month/day");let h;a?h=cq({...cO(this.c,r,i),...n},r,i):jn(n.ordinal)?(h={...this.toObject(),...n},jn(n.day)&&(h.day=Math.min(dO(h.year,h.month),h.day))):h=dq({...CN(this.c),...n});const[p,g]=BT(h,this.o,this.zone);return Bg(this,{ts:p,o:g})}plus(e){if(!this.isValid)return this;const n=Qo.fromDurationLike(e);return Bg(this,xq(this,n))}minus(e){if(!this.isValid)return this;const n=Qo.fromDurationLike(e).negate();return Bg(this,xq(this,n))}startOf(e,{useLocaleWeeks:n=!1}={}){if(!this.isValid)return this;const r={},i=Qo.normalizeUnit(e);switch(i){case"years":r.month=1;case"quarters":case"months":r.day=1;case"weeks":case"days":r.hour=0;case"hours":r.minute=0;case"minutes":r.second=0;case"seconds":r.millisecond=0;break}if(i==="weeks")if(n){const a=this.loc.getStartOfWeek(),{weekday:o}=this;o<a&&(r.weekNumber=this.weekNumber-1),r.weekday=a}else r.weekday=1;if(i==="quarters"){const a=Math.ceil(this.month/3);r.month=(a-1)*3+1}return this.set(r)}endOf(e,n){return this.isValid?this.plus({[e]:1}).startOf(e,n).minus(1):this}toFormat(e,n={}){return this.isValid?Jo.create(this.loc.redefaultToEN(n)).formatDateTimeFromString(this,e):MN}toLocaleString(e=uO,n={}){return this.isValid?Jo.create(this.loc.clone(n),e).formatDateTime(this):MN}toLocaleParts(e={}){return this.isValid?Jo.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:n=!1,suppressMilliseconds:r=!1,includeOffset:i=!0,extendedZone:a=!1}={}){if(!this.isValid)return null;const o=e==="extended";let s=PN(this,o);return s+="T",s+=Sq(this,o,n,r,i,a),s}toISODate({format:e="extended"}={}){return this.isValid?PN(this,e==="extended"):null}toISOWeekDate(){return sE(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:n=!1,includeOffset:r=!0,includePrefix:i=!1,extendedZone:a=!1,format:o="extended"}={}){return this.isValid?(i?"T":"")+Sq(this,o==="extended",n,e,r,a):null}toRFC2822(){return sE(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return sE(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?PN(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:n=!1,includeOffsetSpace:r=!0}={}){let i="HH:mm:ss.SSS";return(n||e)&&(r&&(i+=" "),n?i+="z":e&&(i+="ZZ")),sE(this,i,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():MN}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};const n={...this.c};return e.includeConfig&&(n.outputCalendar=this.outputCalendar,n.numberingSystem=this.loc.numberingSystem,n.locale=this.loc.locale),n}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,n="milliseconds",r={}){if(!this.isValid||!e.isValid)return Qo.invalid("created by diffing an invalid DateTime");const i={locale:this.locale,numberingSystem:this.numberingSystem,...r},a=jje(n).map(Qo.normalizeUnit),o=e.valueOf()>this.valueOf(),s=o?this:e,l=o?e:this,c=K8e(s,l,a,i);return o?c.negate():c}diffNow(e="milliseconds",n={}){return this.diff(Wn.now(),e,n)}until(e){return this.isValid?ia.fromDateTimes(this,e):this}hasSame(e,n,r){if(!this.isValid)return!1;const i=e.valueOf(),a=this.setZone(e.zone,{keepLocalTime:!0});return a.startOf(n,r)<=i&&i<=a.endOf(n,r)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;const n=e.base||Wn.fromObject({},{zone:this.zone}),r=e.padding?this<n?-e.padding:e.padding:0;let i=["years","months","days","hours","minutes","seconds"],a=e.unit;return Array.isArray(e.unit)&&(i=e.unit,a=void 0),Eq(n,this.plus(r),{...e,numeric:"always",units:i,unit:a})}toRelativeCalendar(e={}){return this.isValid?Eq(e.base||Wn.fromObject({},{zone:this.zone}),this,{...e,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...e){if(!e.every(Wn.isDateTime))throw new Yo("min requires all arguments be DateTimes");return hq(e,n=>n.valueOf(),Math.min)}static max(...e){if(!e.every(Wn.isDateTime))throw new Yo("max requires all arguments be DateTimes");return hq(e,n=>n.valueOf(),Math.max)}static fromFormatExplain(e,n,r={}){const{locale:i=null,numberingSystem:a=null}=r,o=Ci.fromOpts({locale:i,numberingSystem:a,defaultToEN:!0});return Rue(o,e,n)}static fromStringExplain(e,n,r={}){return Wn.fromFormatExplain(e,n,r)}static buildFormatParser(e,n={}){const{locale:r=null,numberingSystem:i=null}=n,a=Ci.fromOpts({locale:r,numberingSystem:i,defaultToEN:!0});return new Mue(a,e)}static fromFormatParser(e,n,r={}){if(jn(e)||jn(n))throw new Yo("fromFormatParser requires an input string and a format parser");const{locale:i=null,numberingSystem:a=null}=r,o=Ci.fromOpts({locale:i,numberingSystem:a,defaultToEN:!0});if(!o.equals(n.locale))throw new Yo(`fromFormatParser called with a locale of ${o}, but the format parser was created for ${n.locale}`);const{result:s,zone:l,specificOffset:c,invalidReason:f}=n.explainFromTokens(e);return f?Wn.invalid(f):By(s,l,r,`format ${n.format}`,e,c)}static get DATE_SHORT(){return uO}static get DATE_MED(){return Vle}static get DATE_MED_WITH_WEEKDAY(){return gje}static get DATE_FULL(){return Ble}static get DATE_HUGE(){return Ule}static get TIME_SIMPLE(){return Wle}static get TIME_WITH_SECONDS(){return zle}static get TIME_WITH_SHORT_OFFSET(){return jle}static get TIME_WITH_LONG_OFFSET(){return Hle}static get TIME_24_SIMPLE(){return Yle}static get TIME_24_WITH_SECONDS(){return qle}static get TIME_24_WITH_SHORT_OFFSET(){return Kle}static get TIME_24_WITH_LONG_OFFSET(){return Gle}static get DATETIME_SHORT(){return Zle}static get DATETIME_SHORT_WITH_SECONDS(){return Qle}static get DATETIME_MED(){return Xle}static get DATETIME_MED_WITH_SECONDS(){return Jle}static get DATETIME_MED_WITH_WEEKDAY(){return vje}static get DATETIME_FULL(){return eue}static get DATETIME_FULL_WITH_SECONDS(){return tue}static get DATETIME_HUGE(){return nue}static get DATETIME_HUGE_WITH_SECONDS(){return rue}}function T1(t){if(Wn.isDateTime(t))return t;if(t&&t.valueOf&&Lp(t.valueOf()))return Wn.fromJSDate(t);if(t&&typeof t=="object")return Wn.fromObject(t);throw new Yo(`Unknown datetime argument: ${t}, of type ${typeof t}`)}const Dd={getCookie(t,e){const n=document.cookie.split(";");for(let r=0;r<n.length;r++){const i=n[r].trim();if(i.startsWith(t+"="))return i.substring(t.length+1)}return null},setSessionCookie(t,e,n="/"){document.cookie=`${t}=${encodeURIComponent(e)}; path=${n}; SameSite=Lax`}},mHe=t=>{try{const e=new Date(t??""),r=new Date().getTime()-e.getTime(),i=Math.floor(r/(1e3*60*60)),a=Math.floor(r%(1e3*60*60)/(1e3*60));if(i<=3)return i===0?`${a} minute${a!==1?"s":""} ago`:`${i} hour${i!==1?"s":""} ${a} minute${a!==1?"s":""} ago`}catch(e){console.error("isShowShortDate -> error",e)}},Dq=()=>Dd.getCookie("account.last_prefered_timezone")||"Asia/Singapore",Fue=t=>{try{const e=new Date(t).toISOString(),n=Wn.fromISO(e).setZone(Dq()).toFormat(l5e);return String(n)}catch(e){console.error("formatDateValue",{e,dateStr:t,tz:Dq()})}return t},gHe=t=>{try{if(!t)return"";const e=new Date(t);if(isNaN(e.getTime()))throw new Error("Invalid date:"+t);const n=e.toISOString(),r=mHe(n),i=Fue(n);return r||String(i)}catch{return String(t)}},vHe=Qe({__name:"SectionNewRendition",setup(t,{expose:e}){const{getEnvVariable:n}=Al(),r=N=>{var _e;const U=n("BASE_REVIEW_URL"),ee=yn(),le=(_e=Qi({type:"review_rendition",config:{reviewDomain:U,ws_code:ee,scene_id:N.item.id,rendition_id:N.id,take_id:N.item.entity_id}}))==null?void 0:_e.url;window.open(le)},i=hc("switchInstance"),a=(N,U)=>{var _e;const ee=n("BASE_URL"),le=(_e=Qi({type:"hub_rendition",config:{baseDomain:ee,ws_code:yn(),scene_id:N.item.id,rendition_id:N.id}}))==null?void 0:_e.url;if(U.metaKey||U.ctrlKey){window.open(le,"_blank");return}else{if(i){i("scene_hub",{tab:"rendition",id:N.item.id,renditionId:N.id},{showLoading:!1});return}window.location.href=le}window.open(le)},o=Z(()=>{var N;return(N=w.value[w.value.length-1])==null?void 0:N.id}),s=Ht({canLoadMore:!0,failedRequest:!1}),l=async()=>{var N,U,ee,le;try{if(!o.value||!s.canLoadMore||h.value)return!0;h.value=!0;const _e=await p.getNextRendition(o.value),be=(U=(N=_e==null?void 0:_e.recent_activities)==null?void 0:N.new_renditions)==null?void 0:U.data;if(be)be.length==0&&(s.canLoadMore=!1),w.value=w.value.concat(((le=(ee=_e==null?void 0:_e.recent_activities)==null?void 0:ee.new_renditions)==null?void 0:le.data)||[]);else throw new Error("Failed to get more data")}catch(_e){s.failedRequest=!0,console.error("getMoreData -> error",_e)}finally{h.value=!1}},c=re(null),f=re(null);zt(()=>{S()}),Wae(f,async()=>{await l()},{distance:10,canLoadMore:()=>!h.value});const h=re(!1),p=VC(),g=re({}),y=async()=>{var U,ee,le,_e;let N;try{h.value=!0,N=await p.getRecentActivities("recent_activities.new_renditions"),b.value=(ee=(U=N==null?void 0:N.recent_activities)==null?void 0:U.new_renditions)==null?void 0:ee.meta["X-Tsr-signature"]}catch(be){console.error("getRecentNewRendition -> error",be)}finally{h.value=!1}return((_e=(le=N==null?void 0:N.recent_activities)==null?void 0:le.new_renditions)==null?void 0:_e.data)||[]},v=async()=>{var U,ee;const N=await p.getRecentActivities("recent_activities.new_renditions",ny);return{signature:(ee=(U=N==null?void 0:N.recent_activities)==null?void 0:U.new_renditions)==null?void 0:ee.meta["X-Tsr-signature"]}},b=re(void 0);ay("rendition",v,b);const w=re([]),S=async()=>{var N,U;w.value=[],w.value=await y(),_.value=((U=(N=c.value)==null?void 0:N.parentElement)==null?void 0:U.offsetHeight)||200,h.value=!1};e({resetList:S});const T=re(null),{height:_}=hh(T),E=fr(),{permissionMap:D}=Pn(E),O=(N,U)=>{const ee=n("BASE_URL"),le=Qi({type:"hub_rendition",config:{baseDomain:ee,ws_code:yn(),scene_id:N,rendition_id:U}}).url;navigator.clipboard.writeText(le).then(()=>{}).catch(_e=>{console.error("Failed to copy: ",_e)})},{deleteRendition:V}=p,{showErrorSnackbar:P}=jA(),M=()=>{let N="Update failed";navigator.onLine||(N="Network error"),P({label:N})},{refreshState:C}=Pn(ks()),F=async N=>{try{await V({scene_id:N.item.id,rendition_id:N.id})&&(C.value.rendition=!0,w.value=w.value.filter(ee=>ee.id!==N.id))}catch(U){M(),console.error("handleDelete -> error",U)}},W=Z(()=>Object.fromEntries(w.value.map(N=>[N.id,H(N)]))),H=N=>N!=null&&N.item?{items:(N==null?void 0:N.entity_path.map(ee=>{var _e;const le=ee.is_parent_item?"scene_hub":"project";return{name:ee.name,url:(_e=Qi({type:le,config:{baseDomain:n("BASE_URL"),ws_code:yn(),entity_id:ee.id,scene_id:ee.is_parent_item?ee.id:void 0}}))==null?void 0:_e.url,disabled:!1,id:ee.id,isHighlight:ee.is_parent_item=!0}}))||[],lastItemWidth:125,url:"",width:200,canCopy:!1,numberOfVisibleItems:2}:void 0,j={getEnvVariable:n,handleOpenInReview:r,switchInstance:i,handleOpenInHub:a,lastItemId:o,states:s,getMoreData:l,sectionRef:c,listRef:f,loading:h,peopleCard:p,hoveredMap:g,getRecentNewRendition:y,getUpdateSignature:v,iniSignature:b,list:w,resetList:S,recentlyAccessSceneRef:T,height:_,store:E,permissionMap:D,handleCopy:O,deleteRendition:V,showErrorSnackbar:P,showError:M,refreshState:C,handleDelete:F,breadcrumbConfig:W,createBreadCrumbProp:H,get ArboTooltip(){return dr},get TessRenditionCard(){return Sae},get TessTruncatedText(){return ty},get TessBreadcrumb(){return vC},get ArboButton(){return Nt},NewRenditionSkeleton:lje,InfoVisual:Oc,get formatDate(){return gHe},get formatDateValue(){return Fue}};return Object.defineProperty(j,"__isScriptSetup",{enumerable:!1,value:!0}),j}}),yHe={ref:"sectionRef",class:"section-renditions-wrapper"},bHe={ref:"listRef",class:"section-renditions"},_He={key:0,class:"empty-data"},wHe=["onMouseover","onMouseleave"],xHe={class:"timestamp"},SHe={key:0,class:"rendition-breadcrumb"},AHe={class:"name"};function kHe(t,e,n,r,i,a){return R(),Y("div",yHe,[X("div",bHe,[r.list.length==0&&!r.loading?(R(),Y("div",_He,[he(r.InfoVisual,{"visual-name":"NoData",label:"No activity available.",height:150})])):pe("v-if",!0),(R(!0),Y(wt,null,Qt(r.list,o=>{var s,l,c,f;return R(),Y("div",{key:o.id,class:Fe(["rendition-item",{hovered:r.hoveredMap[o.id]}]),onMouseover:()=>{r.hoveredMap[o.id]||(r.hoveredMap[o.id]=1)},onMouseleave:()=>{r.hoveredMap[o.id]===1&&(r.hoveredMap[o.id]=0)}},[he(r.ArboTooltip,{content:r.formatDateValue(o.created_at),delay:[1e3,0]},{default:ze(()=>[X("div",xHe,it(r.formatDate(o.created_at)),1)]),_:2},1032,["content"]),he(r.TessRenditionCard,Ft({class:"rendition-card"},{ref_for:!0},{renditionData:o,disabled:!1,hasNewComment:!1,isDeletable:((l=(s=o.permission)==null?void 0:s.media)==null?void 0:l.has_delete_rendition_permission)==1,isReadOnly:!1,active:!1,hovered:r.hoveredMap[o.id]>0,canDelete:((f=(c=o.permission)==null?void 0:c.media)==null?void 0:f.has_delete_rendition_permission)==1,canOpenReview:r.permissionMap.redirectPermission.review,canOpenSceneHub:r.permissionMap.redirectPermission.scene_hub,customStyle:{borderWidth:2,borderColor:"white"}},{tooltip:"",onOpenHub:(h,p)=>r.handleOpenInHub(o,p),onShowPopup:h=>r.hoveredMap[o.id]=2,onHidePopup:h=>r.hoveredMap[o.id]=0,onOpenReview:()=>r.handleOpenInReview(o),onClick:Rt(h=>r.handleOpenInHub(o,h),["stop"]),onCopy:h=>r.handleCopy(o.item.id,h),onDelete:()=>r.handleDelete(o)}),{title:ze(()=>{var h;return[r.breadcrumbConfig[o.id]?(R(),Y("div",SHe,[he(r.TessBreadcrumb,Ft({ref_for:!0},r.breadcrumbConfig[o.id],{url:"",items:((h=r.breadcrumbConfig[o.id])==null?void 0:h.items)||[],disabled:"true"}),null,16,["items"])])):pe("v-if",!0)]}),timestamp:ze(()=>[X("div",AHe,[he(r.TessTruncatedText,{value:o.name,"max-width":190},null,8,["value"])])]),_:2,__:[0]},1040,["onOpenHub","onShowPopup","onHidePopup","onOpenReview","onClick","onCopy","onDelete"])],42,wHe)}),128)),X("div",null,[r.states.failedRequest?(R(),Re(r.ArboButton,{key:0,label:"Retry",onClick:r.getMoreData})):pe("v-if",!0)]),r.loading&&r.states.canLoadMore?(R(),Y(wt,{key:1},Qt(3,o=>he(r.NewRenditionSkeleton,{key:o})),64)):pe("v-if",!0)],512)],512)}const EHe=Nn(vHe,[["render",kHe],["__scopeId","data-v-0c7bda83"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/SectionNewRendition.vue"]]),THe={},DHe={class:"pi-skeleton"};function OHe(t,e){return R(),Y("div",DHe,e[0]||(e[0]=[Vv('<div class="pi-skeleton-avatar" data-v-ee72a1a9></div><div class="pi-skeleton-body" data-v-ee72a1a9><div class="pi-skeleton-details" data-v-ee72a1a9><div class="pi-skeleton-row" data-v-ee72a1a9><div class="pi-skeleton-line" style="width:80%;" data-v-ee72a1a9></div></div><div class="pi-skeleton-row" data-v-ee72a1a9><div class="pi-skeleton-line large" style="width:50%;" data-v-ee72a1a9></div><div class="pi-skeleton-row" data-v-ee72a1a9><div class="pi-skeleton-button" data-v-ee72a1a9></div><div class="pi-skeleton-button" data-v-ee72a1a9></div></div></div><div class="pi-skeleton-row" data-v-ee72a1a9><div class="pi-skeleton-row" data-v-ee72a1a9><div class="pi-skeleton-button" style="width:140px;" data-v-ee72a1a9></div><div class="pi-skeleton-button" style="width:140px;" data-v-ee72a1a9></div></div><div class="pi-skeleton-row" data-v-ee72a1a9><div class="pi-skeleton-button" style="width:24px;" data-v-ee72a1a9></div><div class="pi-skeleton-button" style="width:100px;" data-v-ee72a1a9></div></div></div><div class="pi-skeleton-line" data-v-ee72a1a9></div></div></div><div class="pi-skeleton-status" data-v-ee72a1a9></div>',3)]))}const Vue=Nn(THe,[["render",OHe],["__scopeId","data-v-ee72a1a9"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/shared/GirdItemSkeleton.vue"]]);var dx={exports:{}};/**
174
174
  * @license
175
175
  * Lodash <https://lodash.com/>
176
176
  * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
@@ -205,7 +205,7 @@ var Bue;function Yt(){return Bue.apply(null,arguments)}function MHe(t){Bue=t}fun
205
205
  [`+a+"] ";for(o in arguments[0])Ir(arguments[0],o)&&(i+=o+": "+arguments[0][o]+", ");i=i.slice(0,-2)}else i=arguments[a];r.push(i)}Wue(t+`
206
206
  Arguments: `+Array.prototype.slice.call(r).join("")+`
207
207
  `+new Error().stack),n=!1}return e.apply(this,arguments)},e)}var Iq={};function zue(t,e){Yt.deprecationHandler!=null&&Yt.deprecationHandler(t,e),Iq[t]||(Wue(e),Iq[t]=!0)}Yt.suppressDeprecationWarnings=!1;Yt.deprecationHandler=null;function $d(t){return typeof Function<"u"&&t instanceof Function||Object.prototype.toString.call(t)==="[object Function]"}function $He(t){var e,n;for(n in t)Ir(t,n)&&(e=t[n],$d(e)?this[n]=e:this["_"+n]=e);this._config=t,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function e5(t,e){var n=Sp({},t),r;for(r in e)Ir(e,r)&&(Iv(t[r])&&Iv(e[r])?(n[r]={},Sp(n[r],t[r]),Sp(n[r],e[r])):e[r]!=null?n[r]=e[r]:delete n[r]);for(r in t)Ir(t,r)&&!Ir(e,r)&&Iv(t[r])&&(n[r]=Sp({},n[r]));return n}function vW(t){t!=null&&this.set(t)}var t5;Object.keys?t5=Object.keys:t5=function(t){var e,n=[];for(e in t)Ir(t,e)&&n.push(e);return n};var PHe={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function LHe(t,e,n){var r=this._calendar[t]||this._calendar.sameElse;return $d(r)?r.call(e,n):r}function Od(t,e,n){var r=""+Math.abs(t),i=e-r.length,a=t>=0;return(a?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var yW=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,lE=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,NN={},Cb={};function In(t,e,n,r){var i=r;typeof r=="string"&&(i=function(){return this[r]()}),t&&(Cb[t]=i),e&&(Cb[e[0]]=function(){return Od(i.apply(this,arguments),e[1],e[2])}),n&&(Cb[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),t)})}function NHe(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function FHe(t){var e=t.match(yW),n,r;for(n=0,r=e.length;n<r;n++)Cb[e[n]]?e[n]=Cb[e[n]]:e[n]=NHe(e[n]);return function(i){var a="",o;for(o=0;o<r;o++)a+=$d(e[o])?e[o].call(i,t):e[o];return a}}function zT(t,e){return t.isValid()?(e=jue(e,t.localeData()),NN[e]=NN[e]||FHe(e),NN[e](t)):t.localeData().invalidDate()}function jue(t,e){var n=5;function r(i){return e.longDateFormat(i)||i}for(lE.lastIndex=0;n>=0&&lE.test(t);)t=t.replace(lE,r),lE.lastIndex=0,n-=1;return t}var VHe={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function BHe(t){var e=this._longDateFormat[t],n=this._longDateFormat[t.toUpperCase()];return e||!n?e:(this._longDateFormat[t]=n.match(yW).map(function(r){return r==="MMMM"||r==="MM"||r==="DD"||r==="dddd"?r.slice(1):r}).join(""),this._longDateFormat[t])}var UHe="Invalid date";function WHe(){return this._invalidDate}var zHe="%d",jHe=/\d{1,2}/;function HHe(t){return this._ordinal.replace("%d",t)}var YHe={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function qHe(t,e,n,r){var i=this._relativeTime[n];return $d(i)?i(t,e,n,r):i.replace(/%d/i,t)}function KHe(t,e){var n=this._relativeTime[t>0?"future":"past"];return $d(n)?n(e):n.replace(/%s/i,e)}var Mq={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function gu(t){return typeof t=="string"?Mq[t]||Mq[t.toLowerCase()]:void 0}function bW(t){var e={},n,r;for(r in t)Ir(t,r)&&(n=gu(r),n&&(e[n]=t[r]));return e}var GHe={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function ZHe(t){var e=[],n;for(n in t)Ir(t,n)&&e.push({unit:n,priority:GHe[n]});return e.sort(function(r,i){return r.priority-i.priority}),e}var Hue=/\d/,Tl=/\d\d/,Yue=/\d{3}/,_W=/\d{4}/,qC=/[+-]?\d{6}/,$i=/\d\d?/,que=/\d\d\d\d?/,Kue=/\d\d\d\d\d\d?/,KC=/\d{1,3}/,wW=/\d{1,4}/,GC=/[+-]?\d{1,6}/,j_=/\d+/,ZC=/[+-]?\d+/,QHe=/Z|[+-]\d\d:?\d\d/gi,QC=/Z|[+-]\d\d(?::?\d\d)?/gi,XHe=/[+-]?\d+(\.\d{1,3})?/,XA=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,H_=/^[1-9]\d?/,xW=/^([1-9]\d|\d)/,hO;hO={};function sn(t,e,n){hO[t]=$d(e)?e:function(r,i){return r&&n?n:e}}function JHe(t,e){return Ir(hO,t)?hO[t](e._strict,e._locale):new RegExp(e9e(t))}function e9e(t){return ph(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,n,r,i,a){return n||r||i||a}))}function ph(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Kl(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function gr(t){var e=+t,n=0;return e!==0&&isFinite(e)&&(n=Kl(e)),n}var n5={};function ii(t,e){var n,r=e,i;for(typeof t=="string"&&(t=[t]),Sh(e)&&(r=function(a,o){o[e]=gr(a)}),i=t.length,n=0;n<i;n++)n5[t[n]]=r}function JA(t,e){ii(t,function(n,r,i,a){i._w=i._w||{},e(n,i._w,i,a)})}function t9e(t,e,n){e!=null&&Ir(n5,t)&&n5[t](e,n._a,n,t)}function XC(t){return t%4===0&&t%100!==0||t%400===0}var ns=0,sh=1,od=2,Ka=3,uc=4,lh=5,dv=6,n9e=7,r9e=8;In("Y",0,0,function(){var t=this.year();return t<=9999?Od(t,4):"+"+t});In(0,["YY",2],0,function(){return this.year()%100});In(0,["YYYY",4],0,"year");In(0,["YYYYY",5],0,"year");In(0,["YYYYYY",6,!0],0,"year");sn("Y",ZC);sn("YY",$i,Tl);sn("YYYY",wW,_W);sn("YYYYY",GC,qC);sn("YYYYYY",GC,qC);ii(["YYYYY","YYYYYY"],ns);ii("YYYY",function(t,e){e[ns]=t.length===2?Yt.parseTwoDigitYear(t):gr(t)});ii("YY",function(t,e){e[ns]=Yt.parseTwoDigitYear(t)});ii("Y",function(t,e){e[ns]=parseInt(t,10)});function qx(t){return XC(t)?366:365}Yt.parseTwoDigitYear=function(t){return gr(t)+(gr(t)>68?1900:2e3)};var Gue=Y_("FullYear",!0);function i9e(){return XC(this.year())}function Y_(t,e){return function(n){return n!=null?(Zue(this,t,n),Yt.updateOffset(this,e),this):WS(this,t)}}function WS(t,e){if(!t.isValid())return NaN;var n=t._d,r=t._isUTC;switch(e){case"Milliseconds":return r?n.getUTCMilliseconds():n.getMilliseconds();case"Seconds":return r?n.getUTCSeconds():n.getSeconds();case"Minutes":return r?n.getUTCMinutes():n.getMinutes();case"Hours":return r?n.getUTCHours():n.getHours();case"Date":return r?n.getUTCDate():n.getDate();case"Day":return r?n.getUTCDay():n.getDay();case"Month":return r?n.getUTCMonth():n.getMonth();case"FullYear":return r?n.getUTCFullYear():n.getFullYear();default:return NaN}}function Zue(t,e,n){var r,i,a,o,s;if(!(!t.isValid()||isNaN(n))){switch(r=t._d,i=t._isUTC,e){case"Milliseconds":return void(i?r.setUTCMilliseconds(n):r.setMilliseconds(n));case"Seconds":return void(i?r.setUTCSeconds(n):r.setSeconds(n));case"Minutes":return void(i?r.setUTCMinutes(n):r.setMinutes(n));case"Hours":return void(i?r.setUTCHours(n):r.setHours(n));case"Date":return void(i?r.setUTCDate(n):r.setDate(n));case"FullYear":break;default:return}a=n,o=t.month(),s=t.date(),s=s===29&&o===1&&!XC(a)?28:s,i?r.setUTCFullYear(a,o,s):r.setFullYear(a,o,s)}}function a9e(t){return t=gu(t),$d(this[t])?this[t]():this}function o9e(t,e){if(typeof t=="object"){t=bW(t);var n=ZHe(t),r,i=n.length;for(r=0;r<i;r++)this[n[r].unit](t[n[r].unit])}else if(t=gu(t),$d(this[t]))return this[t](e);return this}function s9e(t,e){return(t%e+e)%e}var ya;Array.prototype.indexOf?ya=Array.prototype.indexOf:ya=function(t){var e;for(e=0;e<this.length;++e)if(this[e]===t)return e;return-1};function SW(t,e){if(isNaN(t)||isNaN(e))return NaN;var n=s9e(e,12);return t+=(e-n)/12,n===1?XC(t)?29:28:31-n%7%2}In("M",["MM",2],"Mo",function(){return this.month()+1});In("MMM",0,0,function(t){return this.localeData().monthsShort(this,t)});In("MMMM",0,0,function(t){return this.localeData().months(this,t)});sn("M",$i,H_);sn("MM",$i,Tl);sn("MMM",function(t,e){return e.monthsShortRegex(t)});sn("MMMM",function(t,e){return e.monthsRegex(t)});ii(["M","MM"],function(t,e){e[sh]=gr(t)-1});ii(["MMM","MMMM"],function(t,e,n,r){var i=n._locale.monthsParse(t,r,n._strict);i!=null?e[sh]=i:ar(n).invalidMonth=t});var l9e="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Que="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Xue=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,u9e=XA,c9e=XA;function d9e(t,e){return t?Ac(this._months)?this._months[t.month()]:this._months[(this._months.isFormat||Xue).test(e)?"format":"standalone"][t.month()]:Ac(this._months)?this._months:this._months.standalone}function f9e(t,e){return t?Ac(this._monthsShort)?this._monthsShort[t.month()]:this._monthsShort[Xue.test(e)?"format":"standalone"][t.month()]:Ac(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function h9e(t,e,n){var r,i,a,o=t.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)a=Rd([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(a,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(a,"").toLocaleLowerCase();return n?e==="MMM"?(i=ya.call(this._shortMonthsParse,o),i!==-1?i:null):(i=ya.call(this._longMonthsParse,o),i!==-1?i:null):e==="MMM"?(i=ya.call(this._shortMonthsParse,o),i!==-1?i:(i=ya.call(this._longMonthsParse,o),i!==-1?i:null)):(i=ya.call(this._longMonthsParse,o),i!==-1?i:(i=ya.call(this._shortMonthsParse,o),i!==-1?i:null))}function p9e(t,e,n){var r,i,a;if(this._monthsParseExact)return h9e.call(this,t,e,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(i=Rd([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),!n&&!this._monthsParse[r]&&(a="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(a.replace(".",""),"i")),n&&e==="MMMM"&&this._longMonthsParse[r].test(t))return r;if(n&&e==="MMM"&&this._shortMonthsParse[r].test(t))return r;if(!n&&this._monthsParse[r].test(t))return r}}function Jue(t,e){if(!t.isValid())return t;if(typeof e=="string"){if(/^\d+$/.test(e))e=gr(e);else if(e=t.localeData().monthsParse(e),!Sh(e))return t}var n=e,r=t.date();return r=r<29?r:Math.min(r,SW(t.year(),n)),t._isUTC?t._d.setUTCMonth(n,r):t._d.setMonth(n,r),t}function ece(t){return t!=null?(Jue(this,t),Yt.updateOffset(this,!0),this):WS(this,"Month")}function m9e(){return SW(this.year(),this.month())}function g9e(t){return this._monthsParseExact?(Ir(this,"_monthsRegex")||tce.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):(Ir(this,"_monthsShortRegex")||(this._monthsShortRegex=u9e),this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex)}function v9e(t){return this._monthsParseExact?(Ir(this,"_monthsRegex")||tce.call(this),t?this._monthsStrictRegex:this._monthsRegex):(Ir(this,"_monthsRegex")||(this._monthsRegex=c9e),this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex)}function tce(){function t(l,c){return c.length-l.length}var e=[],n=[],r=[],i,a,o,s;for(i=0;i<12;i++)a=Rd([2e3,i]),o=ph(this.monthsShort(a,"")),s=ph(this.months(a,"")),e.push(o),n.push(s),r.push(s),r.push(o);e.sort(t),n.sort(t),r.sort(t),this._monthsRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+e.join("|")+")","i")}function y9e(t,e,n,r,i,a,o){var s;return t<100&&t>=0?(s=new Date(t+400,e,n,r,i,a,o),isFinite(s.getFullYear())&&s.setFullYear(t)):s=new Date(t,e,n,r,i,a,o),s}function zS(t){var e,n;return t<100&&t>=0?(n=Array.prototype.slice.call(arguments),n[0]=t+400,e=new Date(Date.UTC.apply(null,n)),isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t)):e=new Date(Date.UTC.apply(null,arguments)),e}function pO(t,e,n){var r=7+e-n,i=(7+zS(t,0,r).getUTCDay()-e)%7;return-i+r-1}function nce(t,e,n,r,i){var a=(7+n-r)%7,o=pO(t,r,i),s=1+7*(e-1)+a+o,l,c;return s<=0?(l=t-1,c=qx(l)+s):s>qx(t)?(l=t+1,c=s-qx(t)):(l=t,c=s),{year:l,dayOfYear:c}}function jS(t,e,n){var r=pO(t.year(),e,n),i=Math.floor((t.dayOfYear()-r-1)/7)+1,a,o;return i<1?(o=t.year()-1,a=i+mh(o,e,n)):i>mh(t.year(),e,n)?(a=i-mh(t.year(),e,n),o=t.year()+1):(o=t.year(),a=i),{week:a,year:o}}function mh(t,e,n){var r=pO(t,e,n),i=pO(t+1,e,n);return(qx(t)-r+i)/7}In("w",["ww",2],"wo","week");In("W",["WW",2],"Wo","isoWeek");sn("w",$i,H_);sn("ww",$i,Tl);sn("W",$i,H_);sn("WW",$i,Tl);JA(["w","ww","W","WW"],function(t,e,n,r){e[r.substr(0,1)]=gr(t)});function b9e(t){return jS(t,this._week.dow,this._week.doy).week}var _9e={dow:0,doy:6};function w9e(){return this._week.dow}function x9e(){return this._week.doy}function S9e(t){var e=this.localeData().week(this);return t==null?e:this.add((t-e)*7,"d")}function A9e(t){var e=jS(this,1,4).week;return t==null?e:this.add((t-e)*7,"d")}In("d",0,"do","day");In("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)});In("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)});In("dddd",0,0,function(t){return this.localeData().weekdays(this,t)});In("e",0,0,"weekday");In("E",0,0,"isoWeekday");sn("d",$i);sn("e",$i);sn("E",$i);sn("dd",function(t,e){return e.weekdaysMinRegex(t)});sn("ddd",function(t,e){return e.weekdaysShortRegex(t)});sn("dddd",function(t,e){return e.weekdaysRegex(t)});JA(["dd","ddd","dddd"],function(t,e,n,r){var i=n._locale.weekdaysParse(t,r,n._strict);i!=null?e.d=i:ar(n).invalidWeekday=t});JA(["d","e","E"],function(t,e,n,r){e[r]=gr(t)});function k9e(t,e){return typeof t!="string"?t:isNaN(t)?(t=e.weekdaysParse(t),typeof t=="number"?t:null):parseInt(t,10)}function E9e(t,e){return typeof t=="string"?e.weekdaysParse(t)%7||7:isNaN(t)?null:t}function AW(t,e){return t.slice(e,7).concat(t.slice(0,e))}var T9e="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),rce="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),D9e="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),O9e=XA,C9e=XA,I9e=XA;function M9e(t,e){var n=Ac(this._weekdays)?this._weekdays:this._weekdays[t&&t!==!0&&this._weekdays.isFormat.test(e)?"format":"standalone"];return t===!0?AW(n,this._week.dow):t?n[t.day()]:n}function R9e(t){return t===!0?AW(this._weekdaysShort,this._week.dow):t?this._weekdaysShort[t.day()]:this._weekdaysShort}function $9e(t){return t===!0?AW(this._weekdaysMin,this._week.dow):t?this._weekdaysMin[t.day()]:this._weekdaysMin}function P9e(t,e,n){var r,i,a,o=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)a=Rd([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(a,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(a,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(a,"").toLocaleLowerCase();return n?e==="dddd"?(i=ya.call(this._weekdaysParse,o),i!==-1?i:null):e==="ddd"?(i=ya.call(this._shortWeekdaysParse,o),i!==-1?i:null):(i=ya.call(this._minWeekdaysParse,o),i!==-1?i:null):e==="dddd"?(i=ya.call(this._weekdaysParse,o),i!==-1||(i=ya.call(this._shortWeekdaysParse,o),i!==-1)?i:(i=ya.call(this._minWeekdaysParse,o),i!==-1?i:null)):e==="ddd"?(i=ya.call(this._shortWeekdaysParse,o),i!==-1||(i=ya.call(this._weekdaysParse,o),i!==-1)?i:(i=ya.call(this._minWeekdaysParse,o),i!==-1?i:null)):(i=ya.call(this._minWeekdaysParse,o),i!==-1||(i=ya.call(this._weekdaysParse,o),i!==-1)?i:(i=ya.call(this._shortWeekdaysParse,o),i!==-1?i:null))}function L9e(t,e,n){var r,i,a;if(this._weekdaysParseExact)return P9e.call(this,t,e,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=Rd([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(a="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(a.replace(".",""),"i")),n&&e==="dddd"&&this._fullWeekdaysParse[r].test(t))return r;if(n&&e==="ddd"&&this._shortWeekdaysParse[r].test(t))return r;if(n&&e==="dd"&&this._minWeekdaysParse[r].test(t))return r;if(!n&&this._weekdaysParse[r].test(t))return r}}function N9e(t){if(!this.isValid())return t!=null?this:NaN;var e=WS(this,"Day");return t!=null?(t=k9e(t,this.localeData()),this.add(t-e,"d")):e}function F9e(t){if(!this.isValid())return t!=null?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return t==null?e:this.add(t-e,"d")}function V9e(t){if(!this.isValid())return t!=null?this:NaN;if(t!=null){var e=E9e(t,this.localeData());return this.day(this.day()%7?e:e-7)}else return this.day()||7}function B9e(t){return this._weekdaysParseExact?(Ir(this,"_weekdaysRegex")||kW.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(Ir(this,"_weekdaysRegex")||(this._weekdaysRegex=O9e),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)}function U9e(t){return this._weekdaysParseExact?(Ir(this,"_weekdaysRegex")||kW.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(Ir(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=C9e),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function W9e(t){return this._weekdaysParseExact?(Ir(this,"_weekdaysRegex")||kW.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(Ir(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=I9e),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function kW(){function t(f,h){return h.length-f.length}var e=[],n=[],r=[],i=[],a,o,s,l,c;for(a=0;a<7;a++)o=Rd([2e3,1]).day(a),s=ph(this.weekdaysMin(o,"")),l=ph(this.weekdaysShort(o,"")),c=ph(this.weekdays(o,"")),e.push(s),n.push(l),r.push(c),i.push(s),i.push(l),i.push(c);e.sort(t),n.sort(t),r.sort(t),i.sort(t),this._weekdaysRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+e.join("|")+")","i")}function EW(){return this.hours()%12||12}function z9e(){return this.hours()||24}In("H",["HH",2],0,"hour");In("h",["hh",2],0,EW);In("k",["kk",2],0,z9e);In("hmm",0,0,function(){return""+EW.apply(this)+Od(this.minutes(),2)});In("hmmss",0,0,function(){return""+EW.apply(this)+Od(this.minutes(),2)+Od(this.seconds(),2)});In("Hmm",0,0,function(){return""+this.hours()+Od(this.minutes(),2)});In("Hmmss",0,0,function(){return""+this.hours()+Od(this.minutes(),2)+Od(this.seconds(),2)});function ice(t,e){In(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}ice("a",!0);ice("A",!1);function ace(t,e){return e._meridiemParse}sn("a",ace);sn("A",ace);sn("H",$i,xW);sn("h",$i,H_);sn("k",$i,H_);sn("HH",$i,Tl);sn("hh",$i,Tl);sn("kk",$i,Tl);sn("hmm",que);sn("hmmss",Kue);sn("Hmm",que);sn("Hmmss",Kue);ii(["H","HH"],Ka);ii(["k","kk"],function(t,e,n){var r=gr(t);e[Ka]=r===24?0:r});ii(["a","A"],function(t,e,n){n._isPm=n._locale.isPM(t),n._meridiem=t});ii(["h","hh"],function(t,e,n){e[Ka]=gr(t),ar(n).bigHour=!0});ii("hmm",function(t,e,n){var r=t.length-2;e[Ka]=gr(t.substr(0,r)),e[uc]=gr(t.substr(r)),ar(n).bigHour=!0});ii("hmmss",function(t,e,n){var r=t.length-4,i=t.length-2;e[Ka]=gr(t.substr(0,r)),e[uc]=gr(t.substr(r,2)),e[lh]=gr(t.substr(i)),ar(n).bigHour=!0});ii("Hmm",function(t,e,n){var r=t.length-2;e[Ka]=gr(t.substr(0,r)),e[uc]=gr(t.substr(r))});ii("Hmmss",function(t,e,n){var r=t.length-4,i=t.length-2;e[Ka]=gr(t.substr(0,r)),e[uc]=gr(t.substr(r,2)),e[lh]=gr(t.substr(i))});function j9e(t){return(t+"").toLowerCase().charAt(0)==="p"}var H9e=/[ap]\.?m?\.?/i,Y9e=Y_("Hours",!0);function q9e(t,e,n){return t>11?n?"pm":"PM":n?"am":"AM"}var oce={calendar:PHe,longDateFormat:VHe,invalidDate:UHe,ordinal:zHe,dayOfMonthOrdinalParse:jHe,relativeTime:YHe,months:l9e,monthsShort:Que,week:_9e,weekdays:T9e,weekdaysMin:D9e,weekdaysShort:rce,meridiemParse:H9e},Vi={},D1={},HS;function K9e(t,e){var n,r=Math.min(t.length,e.length);for(n=0;n<r;n+=1)if(t[n]!==e[n])return n;return r}function Rq(t){return t&&t.toLowerCase().replace("_","-")}function G9e(t){for(var e=0,n,r,i,a;e<t.length;){for(a=Rq(t[e]).split("-"),n=a.length,r=Rq(t[e+1]),r=r?r.split("-"):null;n>0;){if(i=JC(a.slice(0,n).join("-")),i)return i;if(r&&r.length>=n&&K9e(a,r)>=n-1)break;n--}e++}return HS}function Z9e(t){return!!(t&&t.match("^[^/\\\\]*$"))}function JC(t){var e=null,n;if(Vi[t]===void 0&&typeof module<"u"&&module&&module.exports&&Z9e(t))try{e=HS._abbr,n=require,n("./locale/"+t),Np(e)}catch{Vi[t]=null}return Vi[t]}function Np(t,e){var n;return t&&($s(e)?n=Dh(t):n=TW(t,e),n?HS=n:typeof console<"u"&&console.warn&&console.warn("Locale "+t+" not found. Did you forget to load it?")),HS._abbr}function TW(t,e){if(e!==null){var n,r=oce;if(e.abbr=t,Vi[t]!=null)zue("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=Vi[t]._config;else if(e.parentLocale!=null)if(Vi[e.parentLocale]!=null)r=Vi[e.parentLocale]._config;else if(n=JC(e.parentLocale),n!=null)r=n._config;else return D1[e.parentLocale]||(D1[e.parentLocale]=[]),D1[e.parentLocale].push({name:t,config:e}),null;return Vi[t]=new vW(e5(r,e)),D1[t]&&D1[t].forEach(function(i){TW(i.name,i.config)}),Np(t),Vi[t]}else return delete Vi[t],null}function Q9e(t,e){if(e!=null){var n,r,i=oce;Vi[t]!=null&&Vi[t].parentLocale!=null?Vi[t].set(e5(Vi[t]._config,e)):(r=JC(t),r!=null&&(i=r._config),e=e5(i,e),r==null&&(e.abbr=t),n=new vW(e),n.parentLocale=Vi[t],Vi[t]=n),Np(t)}else Vi[t]!=null&&(Vi[t].parentLocale!=null?(Vi[t]=Vi[t].parentLocale,t===Np()&&Np(t)):Vi[t]!=null&&delete Vi[t]);return Vi[t]}function Dh(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return HS;if(!Ac(t)){if(e=JC(t),e)return e;t=[t]}return G9e(t)}function X9e(){return t5(Vi)}function DW(t){var e,n=t._a;return n&&ar(t).overflow===-2&&(e=n[sh]<0||n[sh]>11?sh:n[od]<1||n[od]>SW(n[ns],n[sh])?od:n[Ka]<0||n[Ka]>24||n[Ka]===24&&(n[uc]!==0||n[lh]!==0||n[dv]!==0)?Ka:n[uc]<0||n[uc]>59?uc:n[lh]<0||n[lh]>59?lh:n[dv]<0||n[dv]>999?dv:-1,ar(t)._overflowDayOfYear&&(e<ns||e>od)&&(e=od),ar(t)._overflowWeeks&&e===-1&&(e=n9e),ar(t)._overflowWeekday&&e===-1&&(e=r9e),ar(t).overflow=e),t}var J9e=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,eYe=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,tYe=/Z|[+-]\d\d(?::?\d\d)?/,uE=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],FN=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],nYe=/^\/?Date\((-?\d+)/i,rYe=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,iYe={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function sce(t){var e,n,r=t._i,i=J9e.exec(r)||eYe.exec(r),a,o,s,l,c=uE.length,f=FN.length;if(i){for(ar(t).iso=!0,e=0,n=c;e<n;e++)if(uE[e][1].exec(i[1])){o=uE[e][0],a=uE[e][2]!==!1;break}if(o==null){t._isValid=!1;return}if(i[3]){for(e=0,n=f;e<n;e++)if(FN[e][1].exec(i[3])){s=(i[2]||" ")+FN[e][0];break}if(s==null){t._isValid=!1;return}}if(!a&&s!=null){t._isValid=!1;return}if(i[4])if(tYe.exec(i[4]))l="Z";else{t._isValid=!1;return}t._f=o+(s||"")+(l||""),CW(t)}else t._isValid=!1}function aYe(t,e,n,r,i,a){var o=[oYe(t),Que.indexOf(e),parseInt(n,10),parseInt(r,10),parseInt(i,10)];return a&&o.push(parseInt(a,10)),o}function oYe(t){var e=parseInt(t,10);return e<=49?2e3+e:e<=999?1900+e:e}function sYe(t){return t.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function lYe(t,e,n){if(t){var r=rce.indexOf(t),i=new Date(e[0],e[1],e[2]).getDay();if(r!==i)return ar(n).weekdayMismatch=!0,n._isValid=!1,!1}return!0}function uYe(t,e,n){if(t)return iYe[t];if(e)return 0;var r=parseInt(n,10),i=r%100,a=(r-i)/100;return a*60+i}function lce(t){var e=rYe.exec(sYe(t._i)),n;if(e){if(n=aYe(e[4],e[3],e[2],e[5],e[6],e[7]),!lYe(e[1],n,t))return;t._a=n,t._tzm=uYe(e[8],e[9],e[10]),t._d=zS.apply(null,t._a),t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),ar(t).rfc2822=!0}else t._isValid=!1}function cYe(t){var e=nYe.exec(t._i);if(e!==null){t._d=new Date(+e[1]);return}if(sce(t),t._isValid===!1)delete t._isValid;else return;if(lce(t),t._isValid===!1)delete t._isValid;else return;t._strict?t._isValid=!1:Yt.createFromInputFallback(t)}Yt.createFromInputFallback=mu("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))});function rb(t,e,n){return t??e??n}function dYe(t){var e=new Date(Yt.now());return t._useUTC?[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]:[e.getFullYear(),e.getMonth(),e.getDate()]}function OW(t){var e,n,r=[],i,a,o;if(!t._d){for(i=dYe(t),t._w&&t._a[od]==null&&t._a[sh]==null&&fYe(t),t._dayOfYear!=null&&(o=rb(t._a[ns],i[ns]),(t._dayOfYear>qx(o)||t._dayOfYear===0)&&(ar(t)._overflowDayOfYear=!0),n=zS(o,0,t._dayOfYear),t._a[sh]=n.getUTCMonth(),t._a[od]=n.getUTCDate()),e=0;e<3&&t._a[e]==null;++e)t._a[e]=r[e]=i[e];for(;e<7;e++)t._a[e]=r[e]=t._a[e]==null?e===2?1:0:t._a[e];t._a[Ka]===24&&t._a[uc]===0&&t._a[lh]===0&&t._a[dv]===0&&(t._nextDay=!0,t._a[Ka]=0),t._d=(t._useUTC?zS:y9e).apply(null,r),a=t._useUTC?t._d.getUTCDay():t._d.getDay(),t._tzm!=null&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[Ka]=24),t._w&&typeof t._w.d<"u"&&t._w.d!==a&&(ar(t).weekdayMismatch=!0)}}function fYe(t){var e,n,r,i,a,o,s,l,c;e=t._w,e.GG!=null||e.W!=null||e.E!=null?(a=1,o=4,n=rb(e.GG,t._a[ns],jS(Ri(),1,4).year),r=rb(e.W,1),i=rb(e.E,1),(i<1||i>7)&&(l=!0)):(a=t._locale._week.dow,o=t._locale._week.doy,c=jS(Ri(),a,o),n=rb(e.gg,t._a[ns],c.year),r=rb(e.w,c.week),e.d!=null?(i=e.d,(i<0||i>6)&&(l=!0)):e.e!=null?(i=e.e+a,(e.e<0||e.e>6)&&(l=!0)):i=a),r<1||r>mh(n,a,o)?ar(t)._overflowWeeks=!0:l!=null?ar(t)._overflowWeekday=!0:(s=nce(n,r,i,a,o),t._a[ns]=s.year,t._dayOfYear=s.dayOfYear)}Yt.ISO_8601=function(){};Yt.RFC_2822=function(){};function CW(t){if(t._f===Yt.ISO_8601){sce(t);return}if(t._f===Yt.RFC_2822){lce(t);return}t._a=[],ar(t).empty=!0;var e=""+t._i,n,r,i,a,o,s=e.length,l=0,c,f;for(i=jue(t._f,t._locale).match(yW)||[],f=i.length,n=0;n<f;n++)a=i[n],r=(e.match(JHe(a,t))||[])[0],r&&(o=e.substr(0,e.indexOf(r)),o.length>0&&ar(t).unusedInput.push(o),e=e.slice(e.indexOf(r)+r.length),l+=r.length),Cb[a]?(r?ar(t).empty=!1:ar(t).unusedTokens.push(a),t9e(a,r,t)):t._strict&&!r&&ar(t).unusedTokens.push(a);ar(t).charsLeftOver=s-l,e.length>0&&ar(t).unusedInput.push(e),t._a[Ka]<=12&&ar(t).bigHour===!0&&t._a[Ka]>0&&(ar(t).bigHour=void 0),ar(t).parsedDateParts=t._a.slice(0),ar(t).meridiem=t._meridiem,t._a[Ka]=hYe(t._locale,t._a[Ka],t._meridiem),c=ar(t).era,c!==null&&(t._a[ns]=t._locale.erasConvertYear(c,t._a[ns])),OW(t),DW(t)}function hYe(t,e,n){var r;return n==null?e:t.meridiemHour!=null?t.meridiemHour(e,n):(t.isPM!=null&&(r=t.isPM(n),r&&e<12&&(e+=12),!r&&e===12&&(e=0)),e)}function pYe(t){var e,n,r,i,a,o,s=!1,l=t._f.length;if(l===0){ar(t).invalidFormat=!0,t._d=new Date(NaN);return}for(i=0;i<l;i++)a=0,o=!1,e=gW({},t),t._useUTC!=null&&(e._useUTC=t._useUTC),e._f=t._f[i],CW(e),mW(e)&&(o=!0),a+=ar(e).charsLeftOver,a+=ar(e).unusedTokens.length*10,ar(e).score=a,s?a<r&&(r=a,n=e):(r==null||a<r||o)&&(r=a,n=e,o&&(s=!0));Sp(t,n||e)}function mYe(t){if(!t._d){var e=bW(t._i),n=e.day===void 0?e.date:e.day;t._a=Uue([e.year,e.month,n,e.hour,e.minute,e.second,e.millisecond],function(r){return r&&parseInt(r,10)}),OW(t)}}function gYe(t){var e=new QA(DW(uce(t)));return e._nextDay&&(e.add(1,"d"),e._nextDay=void 0),e}function uce(t){var e=t._i,n=t._f;return t._locale=t._locale||Dh(t._l),e===null||n===void 0&&e===""?YC({nullInput:!0}):(typeof e=="string"&&(t._i=e=t._locale.preparse(e)),kc(e)?new QA(DW(e)):(ZA(e)?t._d=e:Ac(n)?pYe(t):n?CW(t):vYe(t),mW(t)||(t._d=null),t))}function vYe(t){var e=t._i;$s(e)?t._d=new Date(Yt.now()):ZA(e)?t._d=new Date(e.valueOf()):typeof e=="string"?cYe(t):Ac(e)?(t._a=Uue(e.slice(0),function(n){return parseInt(n,10)}),OW(t)):Iv(e)?mYe(t):Sh(e)?t._d=new Date(e):Yt.createFromInputFallback(t)}function cce(t,e,n,r,i){var a={};return(e===!0||e===!1)&&(r=e,e=void 0),(n===!0||n===!1)&&(r=n,n=void 0),(Iv(t)&&pW(t)||Ac(t)&&t.length===0)&&(t=void 0),a._isAMomentObject=!0,a._useUTC=a._isUTC=i,a._l=n,a._i=t,a._f=e,a._strict=r,gYe(a)}function Ri(t,e,n,r){return cce(t,e,n,r,!1)}var yYe=mu("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=Ri.apply(null,arguments);return this.isValid()&&t.isValid()?t<this?this:t:YC()}),bYe=mu("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=Ri.apply(null,arguments);return this.isValid()&&t.isValid()?t>this?this:t:YC()});function dce(t,e){var n,r;if(e.length===1&&Ac(e[0])&&(e=e[0]),!e.length)return Ri();for(n=e[0],r=1;r<e.length;++r)(!e[r].isValid()||e[r][t](n))&&(n=e[r]);return n}function _Ye(){var t=[].slice.call(arguments,0);return dce("isBefore",t)}function wYe(){var t=[].slice.call(arguments,0);return dce("isAfter",t)}var xYe=function(){return Date.now?Date.now():+new Date},O1=["year","quarter","month","week","day","hour","minute","second","millisecond"];function SYe(t){var e,n=!1,r,i=O1.length;for(e in t)if(Ir(t,e)&&!(ya.call(O1,e)!==-1&&(t[e]==null||!isNaN(t[e]))))return!1;for(r=0;r<i;++r)if(t[O1[r]]){if(n)return!1;parseFloat(t[O1[r]])!==gr(t[O1[r]])&&(n=!0)}return!0}function AYe(){return this._isValid}function kYe(){return Cc(NaN)}function eI(t){var e=bW(t),n=e.year||0,r=e.quarter||0,i=e.month||0,a=e.week||e.isoWeek||0,o=e.day||0,s=e.hour||0,l=e.minute||0,c=e.second||0,f=e.millisecond||0;this._isValid=SYe(e),this._milliseconds=+f+c*1e3+l*6e4+s*1e3*60*60,this._days=+o+a*7,this._months=+i+r*3+n*12,this._data={},this._locale=Dh(),this._bubble()}function jT(t){return t instanceof eI}function r5(t){return t<0?Math.round(-1*t)*-1:Math.round(t)}function EYe(t,e,n){var r=Math.min(t.length,e.length),i=Math.abs(t.length-e.length),a=0,o;for(o=0;o<r;o++)gr(t[o])!==gr(e[o])&&a++;return a+i}function fce(t,e){In(t,0,0,function(){var n=this.utcOffset(),r="+";return n<0&&(n=-n,r="-"),r+Od(~~(n/60),2)+e+Od(~~n%60,2)})}fce("Z",":");fce("ZZ","");sn("Z",QC);sn("ZZ",QC);ii(["Z","ZZ"],function(t,e,n){n._useUTC=!0,n._tzm=IW(QC,t)});var TYe=/([\+\-]|\d\d)/gi;function IW(t,e){var n=(e||"").match(t),r,i,a;return n===null?null:(r=n[n.length-1]||[],i=(r+"").match(TYe)||["-",0,0],a=+(i[1]*60)+gr(i[2]),a===0?0:i[0]==="+"?a:-a)}function MW(t,e){var n,r;return e._isUTC?(n=e.clone(),r=(kc(t)||ZA(t)?t.valueOf():Ri(t).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),Yt.updateOffset(n,!1),n):Ri(t).local()}function i5(t){return-Math.round(t._d.getTimezoneOffset())}Yt.updateOffset=function(){};function DYe(t,e,n){var r=this._offset||0,i;if(!this.isValid())return t!=null?this:NaN;if(t!=null){if(typeof t=="string"){if(t=IW(QC,t),t===null)return this}else Math.abs(t)<16&&!n&&(t=t*60);return!this._isUTC&&e&&(i=i5(this)),this._offset=t,this._isUTC=!0,i!=null&&this.add(i,"m"),r!==t&&(!e||this._changeInProgress?mce(this,Cc(t-r,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,Yt.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?r:i5(this)}function OYe(t,e){return t!=null?(typeof t!="string"&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()}function CYe(t){return this.utcOffset(0,t)}function IYe(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(i5(this),"m")),this}function MYe(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var t=IW(QHe,this._i);t!=null?this.utcOffset(t):this.utcOffset(0,!0)}return this}function RYe(t){return this.isValid()?(t=t?Ri(t).utcOffset():0,(this.utcOffset()-t)%60===0):!1}function $Ye(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function PYe(){if(!$s(this._isDSTShifted))return this._isDSTShifted;var t={},e;return gW(t,this),t=uce(t),t._a?(e=t._isUTC?Rd(t._a):Ri(t._a),this._isDSTShifted=this.isValid()&&EYe(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function LYe(){return this.isValid()?!this._isUTC:!1}function NYe(){return this.isValid()?this._isUTC:!1}function hce(){return this.isValid()?this._isUTC&&this._offset===0:!1}var FYe=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,VYe=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Cc(t,e){var n=t,r=null,i,a,o;return jT(t)?n={ms:t._milliseconds,d:t._days,M:t._months}:Sh(t)||!isNaN(+t)?(n={},e?n[e]=+t:n.milliseconds=+t):(r=FYe.exec(t))?(i=r[1]==="-"?-1:1,n={y:0,d:gr(r[od])*i,h:gr(r[Ka])*i,m:gr(r[uc])*i,s:gr(r[lh])*i,ms:gr(r5(r[dv]*1e3))*i}):(r=VYe.exec(t))?(i=r[1]==="-"?-1:1,n={y:Ug(r[2],i),M:Ug(r[3],i),w:Ug(r[4],i),d:Ug(r[5],i),h:Ug(r[6],i),m:Ug(r[7],i),s:Ug(r[8],i)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(o=BYe(Ri(n.from),Ri(n.to)),n={},n.ms=o.milliseconds,n.M=o.months),a=new eI(n),jT(t)&&Ir(t,"_locale")&&(a._locale=t._locale),jT(t)&&Ir(t,"_isValid")&&(a._isValid=t._isValid),a}Cc.fn=eI.prototype;Cc.invalid=kYe;function Ug(t,e){var n=t&&parseFloat(t.replace(",","."));return(isNaN(n)?0:n)*e}function $q(t,e){var n={};return n.months=e.month()-t.month()+(e.year()-t.year())*12,t.clone().add(n.months,"M").isAfter(e)&&--n.months,n.milliseconds=+e-+t.clone().add(n.months,"M"),n}function BYe(t,e){var n;return t.isValid()&&e.isValid()?(e=MW(e,t),t.isBefore(e)?n=$q(t,e):(n=$q(e,t),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function pce(t,e){return function(n,r){var i,a;return r!==null&&!isNaN(+r)&&(zue(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),a=n,n=r,r=a),i=Cc(n,r),mce(this,i,t),this}}function mce(t,e,n,r){var i=e._milliseconds,a=r5(e._days),o=r5(e._months);t.isValid()&&(r=r??!0,o&&Jue(t,WS(t,"Month")+o*n),a&&Zue(t,"Date",WS(t,"Date")+a*n),i&&t._d.setTime(t._d.valueOf()+i*n),r&&Yt.updateOffset(t,a||o))}var UYe=pce(1,"add"),WYe=pce(-1,"subtract");function gce(t){return typeof t=="string"||t instanceof String}function zYe(t){return kc(t)||ZA(t)||gce(t)||Sh(t)||HYe(t)||jYe(t)||t===null||t===void 0}function jYe(t){var e=Iv(t)&&!pW(t),n=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],i,a,o=r.length;for(i=0;i<o;i+=1)a=r[i],n=n||Ir(t,a);return e&&n}function HYe(t){var e=Ac(t),n=!1;return e&&(n=t.filter(function(r){return!Sh(r)&&gce(t)}).length===0),e&&n}function YYe(t){var e=Iv(t)&&!pW(t),n=!1,r=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],i,a;for(i=0;i<r.length;i+=1)a=r[i],n=n||Ir(t,a);return e&&n}function qYe(t,e){var n=t.diff(e,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function KYe(t,e){arguments.length===1&&(arguments[0]?zYe(arguments[0])?(t=arguments[0],e=void 0):YYe(arguments[0])&&(e=arguments[0],t=void 0):(t=void 0,e=void 0));var n=t||Ri(),r=MW(n,this).startOf("day"),i=Yt.calendarFormat(this,r)||"sameElse",a=e&&($d(e[i])?e[i].call(this,n):e[i]);return this.format(a||this.localeData().calendar(i,this,Ri(n)))}function GYe(){return new QA(this)}function ZYe(t,e){var n=kc(t)?t:Ri(t);return this.isValid()&&n.isValid()?(e=gu(e)||"millisecond",e==="millisecond"?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(e).valueOf()):!1}function QYe(t,e){var n=kc(t)?t:Ri(t);return this.isValid()&&n.isValid()?(e=gu(e)||"millisecond",e==="millisecond"?this.valueOf()<n.valueOf():this.clone().endOf(e).valueOf()<n.valueOf()):!1}function XYe(t,e,n,r){var i=kc(t)?t:Ri(t),a=kc(e)?e:Ri(e);return this.isValid()&&i.isValid()&&a.isValid()?(r=r||"()",(r[0]==="("?this.isAfter(i,n):!this.isBefore(i,n))&&(r[1]===")"?this.isBefore(a,n):!this.isAfter(a,n))):!1}function JYe(t,e){var n=kc(t)?t:Ri(t),r;return this.isValid()&&n.isValid()?(e=gu(e)||"millisecond",e==="millisecond"?this.valueOf()===n.valueOf():(r=n.valueOf(),this.clone().startOf(e).valueOf()<=r&&r<=this.clone().endOf(e).valueOf())):!1}function e7e(t,e){return this.isSame(t,e)||this.isAfter(t,e)}function t7e(t,e){return this.isSame(t,e)||this.isBefore(t,e)}function n7e(t,e,n){var r,i,a;if(!this.isValid())return NaN;if(r=MW(t,this),!r.isValid())return NaN;switch(i=(r.utcOffset()-this.utcOffset())*6e4,e=gu(e),e){case"year":a=HT(this,r)/12;break;case"month":a=HT(this,r);break;case"quarter":a=HT(this,r)/3;break;case"second":a=(this-r)/1e3;break;case"minute":a=(this-r)/6e4;break;case"hour":a=(this-r)/36e5;break;case"day":a=(this-r-i)/864e5;break;case"week":a=(this-r-i)/6048e5;break;default:a=this-r}return n?a:Kl(a)}function HT(t,e){if(t.date()<e.date())return-HT(e,t);var n=(e.year()-t.year())*12+(e.month()-t.month()),r=t.clone().add(n,"months"),i,a;return e-r<0?(i=t.clone().add(n-1,"months"),a=(e-r)/(r-i)):(i=t.clone().add(n+1,"months"),a=(e-r)/(i-r)),-(n+a)||0}Yt.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";Yt.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function r7e(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function i7e(t){if(!this.isValid())return null;var e=t!==!0,n=e?this.clone().utc():this;return n.year()<0||n.year()>9999?zT(n,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):$d(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",zT(n,"Z")):zT(n,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function a7e(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t="moment",e="",n,r,i,a;return this.isLocal()||(t=this.utcOffset()===0?"moment.utc":"moment.parseZone",e="Z"),n="["+t+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i="-MM-DD[T]HH:mm:ss.SSS",a=e+'[")]',this.format(n+r+i+a)}function o7e(t){t||(t=this.isUtc()?Yt.defaultFormatUtc:Yt.defaultFormat);var e=zT(this,t);return this.localeData().postformat(e)}function s7e(t,e){return this.isValid()&&(kc(t)&&t.isValid()||Ri(t).isValid())?Cc({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function l7e(t){return this.from(Ri(),t)}function u7e(t,e){return this.isValid()&&(kc(t)&&t.isValid()||Ri(t).isValid())?Cc({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function c7e(t){return this.to(Ri(),t)}function vce(t){var e;return t===void 0?this._locale._abbr:(e=Dh(t),e!=null&&(this._locale=e),this)}var yce=mu("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return t===void 0?this.localeData():this.locale(t)});function bce(){return this._locale}var mO=1e3,Ib=60*mO,gO=60*Ib,_ce=(365*400+97)*24*gO;function Mb(t,e){return(t%e+e)%e}function wce(t,e,n){return t<100&&t>=0?new Date(t+400,e,n)-_ce:new Date(t,e,n).valueOf()}function xce(t,e,n){return t<100&&t>=0?Date.UTC(t+400,e,n)-_ce:Date.UTC(t,e,n)}function d7e(t){var e,n;if(t=gu(t),t===void 0||t==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?xce:wce,t){case"year":e=n(this.year(),0,1);break;case"quarter":e=n(this.year(),this.month()-this.month()%3,1);break;case"month":e=n(this.year(),this.month(),1);break;case"week":e=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":e=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":e=n(this.year(),this.month(),this.date());break;case"hour":e=this._d.valueOf(),e-=Mb(e+(this._isUTC?0:this.utcOffset()*Ib),gO);break;case"minute":e=this._d.valueOf(),e-=Mb(e,Ib);break;case"second":e=this._d.valueOf(),e-=Mb(e,mO);break}return this._d.setTime(e),Yt.updateOffset(this,!0),this}function f7e(t){var e,n;if(t=gu(t),t===void 0||t==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?xce:wce,t){case"year":e=n(this.year()+1,0,1)-1;break;case"quarter":e=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":e=n(this.year(),this.month()+1,1)-1;break;case"week":e=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":e=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":e=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":e=this._d.valueOf(),e+=gO-Mb(e+(this._isUTC?0:this.utcOffset()*Ib),gO)-1;break;case"minute":e=this._d.valueOf(),e+=Ib-Mb(e,Ib)-1;break;case"second":e=this._d.valueOf(),e+=mO-Mb(e,mO)-1;break}return this._d.setTime(e),Yt.updateOffset(this,!0),this}function h7e(){return this._d.valueOf()-(this._offset||0)*6e4}function p7e(){return Math.floor(this.valueOf()/1e3)}function m7e(){return new Date(this.valueOf())}function g7e(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]}function v7e(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}}function y7e(){return this.isValid()?this.toISOString():null}function b7e(){return mW(this)}function _7e(){return Sp({},ar(this))}function w7e(){return ar(this).overflow}function x7e(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}In("N",0,0,"eraAbbr");In("NN",0,0,"eraAbbr");In("NNN",0,0,"eraAbbr");In("NNNN",0,0,"eraName");In("NNNNN",0,0,"eraNarrow");In("y",["y",1],"yo","eraYear");In("y",["yy",2],0,"eraYear");In("y",["yyy",3],0,"eraYear");In("y",["yyyy",4],0,"eraYear");sn("N",RW);sn("NN",RW);sn("NNN",RW);sn("NNNN",R7e);sn("NNNNN",$7e);ii(["N","NN","NNN","NNNN","NNNNN"],function(t,e,n,r){var i=n._locale.erasParse(t,r,n._strict);i?ar(n).era=i:ar(n).invalidEra=t});sn("y",j_);sn("yy",j_);sn("yyy",j_);sn("yyyy",j_);sn("yo",P7e);ii(["y","yy","yyy","yyyy"],ns);ii(["yo"],function(t,e,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=t.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?e[ns]=n._locale.eraYearOrdinalParse(t,i):e[ns]=parseInt(t,10)});function S7e(t,e){var n,r,i,a=this._eras||Dh("en")._eras;for(n=0,r=a.length;n<r;++n){switch(typeof a[n].since){case"string":i=Yt(a[n].since).startOf("day"),a[n].since=i.valueOf();break}switch(typeof a[n].until){case"undefined":a[n].until=1/0;break;case"string":i=Yt(a[n].until).startOf("day").valueOf(),a[n].until=i.valueOf();break}}return a}function A7e(t,e,n){var r,i,a=this.eras(),o,s,l;for(t=t.toUpperCase(),r=0,i=a.length;r<i;++r)if(o=a[r].name.toUpperCase(),s=a[r].abbr.toUpperCase(),l=a[r].narrow.toUpperCase(),n)switch(e){case"N":case"NN":case"NNN":if(s===t)return a[r];break;case"NNNN":if(o===t)return a[r];break;case"NNNNN":if(l===t)return a[r];break}else if([o,s,l].indexOf(t)>=0)return a[r]}function k7e(t,e){var n=t.since<=t.until?1:-1;return e===void 0?Yt(t.since).year():Yt(t.since).year()+(e-t.offset)*n}function E7e(){var t,e,n,r=this.localeData().eras();for(t=0,e=r.length;t<e;++t)if(n=this.clone().startOf("day").valueOf(),r[t].since<=n&&n<=r[t].until||r[t].until<=n&&n<=r[t].since)return r[t].name;return""}function T7e(){var t,e,n,r=this.localeData().eras();for(t=0,e=r.length;t<e;++t)if(n=this.clone().startOf("day").valueOf(),r[t].since<=n&&n<=r[t].until||r[t].until<=n&&n<=r[t].since)return r[t].narrow;return""}function D7e(){var t,e,n,r=this.localeData().eras();for(t=0,e=r.length;t<e;++t)if(n=this.clone().startOf("day").valueOf(),r[t].since<=n&&n<=r[t].until||r[t].until<=n&&n<=r[t].since)return r[t].abbr;return""}function O7e(){var t,e,n,r,i=this.localeData().eras();for(t=0,e=i.length;t<e;++t)if(n=i[t].since<=i[t].until?1:-1,r=this.clone().startOf("day").valueOf(),i[t].since<=r&&r<=i[t].until||i[t].until<=r&&r<=i[t].since)return(this.year()-Yt(i[t].since).year())*n+i[t].offset;return this.year()}function C7e(t){return Ir(this,"_erasNameRegex")||$W.call(this),t?this._erasNameRegex:this._erasRegex}function I7e(t){return Ir(this,"_erasAbbrRegex")||$W.call(this),t?this._erasAbbrRegex:this._erasRegex}function M7e(t){return Ir(this,"_erasNarrowRegex")||$W.call(this),t?this._erasNarrowRegex:this._erasRegex}function RW(t,e){return e.erasAbbrRegex(t)}function R7e(t,e){return e.erasNameRegex(t)}function $7e(t,e){return e.erasNarrowRegex(t)}function P7e(t,e){return e._eraYearOrdinalRegex||j_}function $W(){var t=[],e=[],n=[],r=[],i,a,o,s,l,c=this.eras();for(i=0,a=c.length;i<a;++i)o=ph(c[i].name),s=ph(c[i].abbr),l=ph(c[i].narrow),e.push(o),t.push(s),n.push(l),r.push(o),r.push(s),r.push(l);this._erasRegex=new RegExp("^("+r.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+e.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+t.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+n.join("|")+")","i")}In(0,["gg",2],0,function(){return this.weekYear()%100});In(0,["GG",2],0,function(){return this.isoWeekYear()%100});function tI(t,e){In(0,[t,t.length],0,e)}tI("gggg","weekYear");tI("ggggg","weekYear");tI("GGGG","isoWeekYear");tI("GGGGG","isoWeekYear");sn("G",ZC);sn("g",ZC);sn("GG",$i,Tl);sn("gg",$i,Tl);sn("GGGG",wW,_W);sn("gggg",wW,_W);sn("GGGGG",GC,qC);sn("ggggg",GC,qC);JA(["gggg","ggggg","GGGG","GGGGG"],function(t,e,n,r){e[r.substr(0,2)]=gr(t)});JA(["gg","GG"],function(t,e,n,r){e[r]=Yt.parseTwoDigitYear(t)});function L7e(t){return Sce.call(this,t,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function N7e(t){return Sce.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)}function F7e(){return mh(this.year(),1,4)}function V7e(){return mh(this.isoWeekYear(),1,4)}function B7e(){var t=this.localeData()._week;return mh(this.year(),t.dow,t.doy)}function U7e(){var t=this.localeData()._week;return mh(this.weekYear(),t.dow,t.doy)}function Sce(t,e,n,r,i){var a;return t==null?jS(this,r,i).year:(a=mh(t,r,i),e>a&&(e=a),W7e.call(this,t,e,n,r,i))}function W7e(t,e,n,r,i){var a=nce(t,e,n,r,i),o=zS(a.year,0,a.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}In("Q",0,"Qo","quarter");sn("Q",Hue);ii("Q",function(t,e){e[sh]=(gr(t)-1)*3});function z7e(t){return t==null?Math.ceil((this.month()+1)/3):this.month((t-1)*3+this.month()%3)}In("D",["DD",2],"Do","date");sn("D",$i,H_);sn("DD",$i,Tl);sn("Do",function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient});ii(["D","DD"],od);ii("Do",function(t,e){e[od]=gr(t.match($i)[0])});var Ace=Y_("Date",!0);In("DDD",["DDDD",3],"DDDo","dayOfYear");sn("DDD",KC);sn("DDDD",Yue);ii(["DDD","DDDD"],function(t,e,n){n._dayOfYear=gr(t)});function j7e(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return t==null?e:this.add(t-e,"d")}In("m",["mm",2],0,"minute");sn("m",$i,xW);sn("mm",$i,Tl);ii(["m","mm"],uc);var H7e=Y_("Minutes",!1);In("s",["ss",2],0,"second");sn("s",$i,xW);sn("ss",$i,Tl);ii(["s","ss"],lh);var Y7e=Y_("Seconds",!1);In("S",0,0,function(){return~~(this.millisecond()/100)});In(0,["SS",2],0,function(){return~~(this.millisecond()/10)});In(0,["SSS",3],0,"millisecond");In(0,["SSSS",4],0,function(){return this.millisecond()*10});In(0,["SSSSS",5],0,function(){return this.millisecond()*100});In(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});In(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});In(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});In(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});sn("S",KC,Hue);sn("SS",KC,Tl);sn("SSS",KC,Yue);var Ap,kce;for(Ap="SSSS";Ap.length<=9;Ap+="S")sn(Ap,j_);function q7e(t,e){e[dv]=gr(("0."+t)*1e3)}for(Ap="S";Ap.length<=9;Ap+="S")ii(Ap,q7e);kce=Y_("Milliseconds",!1);In("z",0,0,"zoneAbbr");In("zz",0,0,"zoneName");function K7e(){return this._isUTC?"UTC":""}function G7e(){return this._isUTC?"Coordinated Universal Time":""}var Pt=QA.prototype;Pt.add=UYe;Pt.calendar=KYe;Pt.clone=GYe;Pt.diff=n7e;Pt.endOf=f7e;Pt.format=o7e;Pt.from=s7e;Pt.fromNow=l7e;Pt.to=u7e;Pt.toNow=c7e;Pt.get=a9e;Pt.invalidAt=w7e;Pt.isAfter=ZYe;Pt.isBefore=QYe;Pt.isBetween=XYe;Pt.isSame=JYe;Pt.isSameOrAfter=e7e;Pt.isSameOrBefore=t7e;Pt.isValid=b7e;Pt.lang=yce;Pt.locale=vce;Pt.localeData=bce;Pt.max=bYe;Pt.min=yYe;Pt.parsingFlags=_7e;Pt.set=o9e;Pt.startOf=d7e;Pt.subtract=WYe;Pt.toArray=g7e;Pt.toObject=v7e;Pt.toDate=m7e;Pt.toISOString=i7e;Pt.inspect=a7e;typeof Symbol<"u"&&Symbol.for!=null&&(Pt[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});Pt.toJSON=y7e;Pt.toString=r7e;Pt.unix=p7e;Pt.valueOf=h7e;Pt.creationData=x7e;Pt.eraName=E7e;Pt.eraNarrow=T7e;Pt.eraAbbr=D7e;Pt.eraYear=O7e;Pt.year=Gue;Pt.isLeapYear=i9e;Pt.weekYear=L7e;Pt.isoWeekYear=N7e;Pt.quarter=Pt.quarters=z7e;Pt.month=ece;Pt.daysInMonth=m9e;Pt.week=Pt.weeks=S9e;Pt.isoWeek=Pt.isoWeeks=A9e;Pt.weeksInYear=B7e;Pt.weeksInWeekYear=U7e;Pt.isoWeeksInYear=F7e;Pt.isoWeeksInISOWeekYear=V7e;Pt.date=Ace;Pt.day=Pt.days=N9e;Pt.weekday=F9e;Pt.isoWeekday=V9e;Pt.dayOfYear=j7e;Pt.hour=Pt.hours=Y9e;Pt.minute=Pt.minutes=H7e;Pt.second=Pt.seconds=Y7e;Pt.millisecond=Pt.milliseconds=kce;Pt.utcOffset=DYe;Pt.utc=CYe;Pt.local=IYe;Pt.parseZone=MYe;Pt.hasAlignedHourOffset=RYe;Pt.isDST=$Ye;Pt.isLocal=LYe;Pt.isUtcOffset=NYe;Pt.isUtc=hce;Pt.isUTC=hce;Pt.zoneAbbr=K7e;Pt.zoneName=G7e;Pt.dates=mu("dates accessor is deprecated. Use date instead.",Ace);Pt.months=mu("months accessor is deprecated. Use month instead",ece);Pt.years=mu("years accessor is deprecated. Use year instead",Gue);Pt.zone=mu("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",OYe);Pt.isDSTShifted=mu("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",PYe);function Z7e(t){return Ri(t*1e3)}function Q7e(){return Ri.apply(null,arguments).parseZone()}function Ece(t){return t}var Mr=vW.prototype;Mr.calendar=LHe;Mr.longDateFormat=BHe;Mr.invalidDate=WHe;Mr.ordinal=HHe;Mr.preparse=Ece;Mr.postformat=Ece;Mr.relativeTime=qHe;Mr.pastFuture=KHe;Mr.set=$He;Mr.eras=S7e;Mr.erasParse=A7e;Mr.erasConvertYear=k7e;Mr.erasAbbrRegex=I7e;Mr.erasNameRegex=C7e;Mr.erasNarrowRegex=M7e;Mr.months=d9e;Mr.monthsShort=f9e;Mr.monthsParse=p9e;Mr.monthsRegex=v9e;Mr.monthsShortRegex=g9e;Mr.week=b9e;Mr.firstDayOfYear=x9e;Mr.firstDayOfWeek=w9e;Mr.weekdays=M9e;Mr.weekdaysMin=$9e;Mr.weekdaysShort=R9e;Mr.weekdaysParse=L9e;Mr.weekdaysRegex=B9e;Mr.weekdaysShortRegex=U9e;Mr.weekdaysMinRegex=W9e;Mr.isPM=j9e;Mr.meridiem=q9e;function vO(t,e,n,r){var i=Dh(),a=Rd().set(r,e);return i[n](a,t)}function Tce(t,e,n){if(Sh(t)&&(e=t,t=void 0),t=t||"",e!=null)return vO(t,e,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=vO(t,r,n,"month");return i}function PW(t,e,n,r){typeof t=="boolean"?(Sh(e)&&(n=e,e=void 0),e=e||""):(e=t,n=e,t=!1,Sh(e)&&(n=e,e=void 0),e=e||"");var i=Dh(),a=t?i._week.dow:0,o,s=[];if(n!=null)return vO(e,(n+a)%7,r,"day");for(o=0;o<7;o++)s[o]=vO(e,(o+a)%7,r,"day");return s}function X7e(t,e){return Tce(t,e,"months")}function J7e(t,e){return Tce(t,e,"monthsShort")}function eqe(t,e,n){return PW(t,e,n,"weekdays")}function tqe(t,e,n){return PW(t,e,n,"weekdaysShort")}function nqe(t,e,n){return PW(t,e,n,"weekdaysMin")}Np("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10,n=gr(t%100/10)===1?"th":e===1?"st":e===2?"nd":e===3?"rd":"th";return t+n}});Yt.lang=mu("moment.lang is deprecated. Use moment.locale instead.",Np);Yt.langData=mu("moment.langData is deprecated. Use moment.localeData instead.",Dh);var Pf=Math.abs;function rqe(){var t=this._data;return this._milliseconds=Pf(this._milliseconds),this._days=Pf(this._days),this._months=Pf(this._months),t.milliseconds=Pf(t.milliseconds),t.seconds=Pf(t.seconds),t.minutes=Pf(t.minutes),t.hours=Pf(t.hours),t.months=Pf(t.months),t.years=Pf(t.years),this}function Dce(t,e,n,r){var i=Cc(e,n);return t._milliseconds+=r*i._milliseconds,t._days+=r*i._days,t._months+=r*i._months,t._bubble()}function iqe(t,e){return Dce(this,t,e,1)}function aqe(t,e){return Dce(this,t,e,-1)}function Pq(t){return t<0?Math.floor(t):Math.ceil(t)}function oqe(){var t=this._milliseconds,e=this._days,n=this._months,r=this._data,i,a,o,s,l;return t>=0&&e>=0&&n>=0||t<=0&&e<=0&&n<=0||(t+=Pq(a5(n)+e)*864e5,e=0,n=0),r.milliseconds=t%1e3,i=Kl(t/1e3),r.seconds=i%60,a=Kl(i/60),r.minutes=a%60,o=Kl(a/60),r.hours=o%24,e+=Kl(o/24),l=Kl(Oce(e)),n+=l,e-=Pq(a5(l)),s=Kl(n/12),n%=12,r.days=e,r.months=n,r.years=s,this}function Oce(t){return t*4800/146097}function a5(t){return t*146097/4800}function sqe(t){if(!this.isValid())return NaN;var e,n,r=this._milliseconds;if(t=gu(t),t==="month"||t==="quarter"||t==="year")switch(e=this._days+r/864e5,n=this._months+Oce(e),t){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(e=this._days+Math.round(a5(this._months)),t){case"week":return e/7+r/6048e5;case"day":return e+r/864e5;case"hour":return e*24+r/36e5;case"minute":return e*1440+r/6e4;case"second":return e*86400+r/1e3;case"millisecond":return Math.floor(e*864e5)+r;default:throw new Error("Unknown unit "+t)}}function Oh(t){return function(){return this.as(t)}}var Cce=Oh("ms"),lqe=Oh("s"),uqe=Oh("m"),cqe=Oh("h"),dqe=Oh("d"),fqe=Oh("w"),hqe=Oh("M"),pqe=Oh("Q"),mqe=Oh("y"),gqe=Cce;function vqe(){return Cc(this)}function yqe(t){return t=gu(t),this.isValid()?this[t+"s"]():NaN}function sy(t){return function(){return this.isValid()?this._data[t]:NaN}}var bqe=sy("milliseconds"),_qe=sy("seconds"),wqe=sy("minutes"),xqe=sy("hours"),Sqe=sy("days"),Aqe=sy("months"),kqe=sy("years");function Eqe(){return Kl(this.days()/7)}var Hf=Math.round,fb={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Tqe(t,e,n,r,i){return i.relativeTime(e||1,!!n,t,r)}function Dqe(t,e,n,r){var i=Cc(t).abs(),a=Hf(i.as("s")),o=Hf(i.as("m")),s=Hf(i.as("h")),l=Hf(i.as("d")),c=Hf(i.as("M")),f=Hf(i.as("w")),h=Hf(i.as("y")),p=a<=n.ss&&["s",a]||a<n.s&&["ss",a]||o<=1&&["m"]||o<n.m&&["mm",o]||s<=1&&["h"]||s<n.h&&["hh",s]||l<=1&&["d"]||l<n.d&&["dd",l];return n.w!=null&&(p=p||f<=1&&["w"]||f<n.w&&["ww",f]),p=p||c<=1&&["M"]||c<n.M&&["MM",c]||h<=1&&["y"]||["yy",h],p[2]=e,p[3]=+t>0,p[4]=r,Tqe.apply(null,p)}function Oqe(t){return t===void 0?Hf:typeof t=="function"?(Hf=t,!0):!1}function Cqe(t,e){return fb[t]===void 0?!1:e===void 0?fb[t]:(fb[t]=e,t==="s"&&(fb.ss=e-1),!0)}function Iqe(t,e){if(!this.isValid())return this.localeData().invalidDate();var n=!1,r=fb,i,a;return typeof t=="object"&&(e=t,t=!1),typeof t=="boolean"&&(n=t),typeof e=="object"&&(r=Object.assign({},fb,e),e.s!=null&&e.ss==null&&(r.ss=e.s-1)),i=this.localeData(),a=Dqe(this,!n,r,i),n&&(a=i.pastFuture(+this,a)),i.postformat(a)}var VN=Math.abs;function Uy(t){return(t>0)-(t<0)||+t}function nI(){if(!this.isValid())return this.localeData().invalidDate();var t=VN(this._milliseconds)/1e3,e=VN(this._days),n=VN(this._months),r,i,a,o,s=this.asSeconds(),l,c,f,h;return s?(r=Kl(t/60),i=Kl(r/60),t%=60,r%=60,a=Kl(n/12),n%=12,o=t?t.toFixed(3).replace(/\.?0+$/,""):"",l=s<0?"-":"",c=Uy(this._months)!==Uy(s)?"-":"",f=Uy(this._days)!==Uy(s)?"-":"",h=Uy(this._milliseconds)!==Uy(s)?"-":"",l+"P"+(a?c+a+"Y":"")+(n?c+n+"M":"")+(e?f+e+"D":"")+(i||r||t?"T":"")+(i?h+i+"H":"")+(r?h+r+"M":"")+(t?h+o+"S":"")):"P0D"}var Tr=eI.prototype;Tr.isValid=AYe;Tr.abs=rqe;Tr.add=iqe;Tr.subtract=aqe;Tr.as=sqe;Tr.asMilliseconds=Cce;Tr.asSeconds=lqe;Tr.asMinutes=uqe;Tr.asHours=cqe;Tr.asDays=dqe;Tr.asWeeks=fqe;Tr.asMonths=hqe;Tr.asQuarters=pqe;Tr.asYears=mqe;Tr.valueOf=gqe;Tr._bubble=oqe;Tr.clone=vqe;Tr.get=yqe;Tr.milliseconds=bqe;Tr.seconds=_qe;Tr.minutes=wqe;Tr.hours=xqe;Tr.days=Sqe;Tr.weeks=Eqe;Tr.months=Aqe;Tr.years=kqe;Tr.humanize=Iqe;Tr.toISOString=nI;Tr.toString=nI;Tr.toJSON=nI;Tr.locale=vce;Tr.localeData=bce;Tr.toIsoString=mu("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",nI);Tr.lang=yce;In("X",0,0,"unix");In("x",0,0,"valueOf");sn("x",ZC);sn("X",XHe);ii("X",function(t,e,n){n._d=new Date(parseFloat(t)*1e3)});ii("x",function(t,e,n){n._d=new Date(gr(t))});//! moment.js
208
- Yt.version="2.30.1";MHe(Ri);Yt.fn=Pt;Yt.min=_Ye;Yt.max=wYe;Yt.now=xYe;Yt.utc=Rd;Yt.unix=Z7e;Yt.months=X7e;Yt.isDate=ZA;Yt.locale=Np;Yt.invalid=YC;Yt.duration=Cc;Yt.isMoment=kc;Yt.weekdays=eqe;Yt.parseZone=Q7e;Yt.localeData=Dh;Yt.isDuration=jT;Yt.monthsShort=J7e;Yt.weekdaysMin=nqe;Yt.defineLocale=TW;Yt.updateLocale=Q9e;Yt.locales=X9e;Yt.weekdaysShort=tqe;Yt.normalizeUnits=gu;Yt.relativeTimeRounding=Oqe;Yt.relativeTimeThreshold=Cqe;Yt.calendarFormat=qYe;Yt.prototype=Pt;Yt.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};const tm=T_("scene",()=>{const t=re({}),e=s=>{s.forEach(l=>{HC.set(t.value,l.id,l)})},n=re(void 0),r=re(0),i=(s,l)=>{const c=t.value;t.value={...c,[s]:{...t.value[s],...l}},o.value=!0},a=s=>t.value[s],o=re(!1);return{sceneDataMap:t,totalSceneCount:n,privateSceneCount:r,setSceneDataMap:e,updateSceneDataValue:i,getSceneDataValue:a,needRefresh:o}}),Ice=t=>{const{showErrorSnackbar:e,showSuccessSnackbar:n}=jA(),r=(C,F)=>(console.error("handleErrorHeader",C),C.code=="ERR_NETWORK"||navigator.onLine==!1?e({label:"Network error."}):e({label:(F==null?void 0:F.label)??"Update failed."}),{success:!1,data:void 0}),i=C=>{let F=C||"Update failed";navigator.onLine||(F="Network error"),e({label:F})},a=(C,F,W)=>{let H={success:!1,data:C};const j=C;return!j||j!=null&&j.error||j.error==403?(W&&i(),H={success:!1,data:C}):j&&j.error!=403&&(t&&t(F),H={success:!0,data:j}),H.success==!1&&W&&i(),H},o=C=>{const F=Dd.getCookie("account.last_prefered_timezone")||"Asia/Singapore";if(!C||!Yt(C).isValid())return null;new Date(C).setMilliseconds(0);const H=Q6(C,F);return String(H)||null},s=async(C,F)=>{try{const W=await xn.updateScene(C,{name:F});return _.value=!0,a(W,C,!0)}catch(W){return console.error("updateScene Name",W),r(W,{label:"Update failed."})}},l=async C=>{try{const F=await xn.updateScene(C,{status:0}),W=a(F,C);return W.success||i("Archive failed."),W}catch(F){return console.error("archiveScene",F),r(F,{label:"Update failed."})}},c=async C=>{try{const F=await xn.deleteScene(C),W=a(F,C);return W.success?n({label:"Deletion successful!"}):e({label:"Deletion failed."}),W}catch(F){return console.error("deleteScene",F),{success:!1,data:F}}},f=async C=>{try{const F=await xn.updateScene(C,{status:1}),W=a(F,C);return W.success||i("Unarchive failed."),W}catch(F){return console.error("unArchiveScene",F),r(F,{label:"Update failed."})}},h=async C=>{try{const F=await xn.updateScene(C,{clear_thumbnail:"1"}),W=a(F,C);return W.success?n({label:"Deletion successful"}):i("Deletion failed."),W}catch(F){return console.error("deleteThumbnail",F,!0),r(F,{label:"Deletion failed."})}},p=async(C,F)=>{var j,N;const W=o((j=F==null?void 0:F.start)==null?void 0:j.dateString),H=o((N=F==null?void 0:F.end)==null?void 0:N.dateString);try{const U=await xn.updateScene(C,{start_date:W,due_date:H});return a(U,C,!0)}catch(U){return console.error("updateDate",U),r(U,{label:"Update failed."})}},g=async C=>{try{const F=await xn.updateScene(C,{due_date:null});return a(F,C,!0)}catch(F){return console.error("clearDueDate",F),r(F,{label:"Update failed."})}},y=async C=>{try{const F=await xn.updateScene(C,{start_date:null});return a(F,C,!0)}catch(F){return console.error("updateDueDate",F),r(F,{label:"Update failed."})}},v=async(C,F)=>{try{const W=await xn.updateScene(C,{template_flow_status_id:F});return a(W,C)}catch(W){return console.error("updateSceneStatus",W),r(W,{label:"Update failed."})}},b=async(C,F)=>{try{const W=await xn.updateAssigneesUsers(C,F);return a(W,C,!0)}catch(W){return console.error("updateSceneAssignees",W),r(W,{label:"Update failed."})}},w=fr(),{basicInfo:S}=Pn(w),T=tm(),{needRefresh:_}=Pn(T);return{handleUpdateSceneName:s,handleArchiveScene:l,handleDeleteScene:c,handleUnArchiveScene:f,handleDeleteThumbnail:h,handleUpdateDate:p,handleClearDueDate:g,handleClearStarDate:y,handleUpdateSceneStatus:v,handleUpdateSceneAssignees:b,handleGetAssignableUsers:async(C,F)=>{try{const W=await xn.getAssignableUsers(C,{page:F.page,per_page:10,display_name_like:F.keyword});return{success:!0,data:{data:W.data.map(j=>({id:j.id,user_id:j.user_id,name:j.display_name,initial:j.initial,bgColor:j.color.bgColor,textColor:j.color.textColor,profile_image:j.profile_image,is_me:j.user_id==S.value.user_id})),meta:W.meta}}}catch(W){return console.error("getAssignableUsers",W),{success:!1,data:W}}},handleGetAssignableStatus:async(C,F)=>{try{const W=await xn.getAssignableStatus(C,F);return{success:!0,data:{data:W.data.filter(N=>N.can_update==1).map(N=>({id:N.id,name:N.name,color:N.color})),meta:W.meta}}}catch(W){return console.error("getAssignableStatus",W),{success:!1,data:W}}},handleGetSceneDetail:async C=>{try{const F={include_entity_path:1,include:"point_metric,ws_creator,template_flow_status,item_user_roles.ws_user_role,assignees"},W=await xn.getSceneDetail(C,F);return a(W,C)}catch(F){return console.error("getSceneDetail",F),{success:!1,data:F}}},handleAssignUser:async(C,F)=>{try{const W=await xn.assignUser(C,F);return a(W,C,!0)}catch(W){return console.error("getSceneDetail",W),r(W,{label:"Update failed."})}},handleReassignUser:async(C,F)=>{try{const W=await xn.updateAssigneesUsers(C,F);return a(W,C,!0)}catch(W){return console.error("getSceneDetail",W),r(W,{label:"Update failed."})}},handleUnassignUser:async(C,F)=>{try{const W=await xn.unAssignUser(C,F);return _.value=!0,a(W,C,!0)}catch(W){return console.error("getSceneDetail",W),r(W,{label:"Update failed."})}}}},Mqe=Qe({__name:"GridItem",props:{sceneId:{type:String,required:!0}},emits:["updateScene","loaded"],setup(t,{expose:e,emit:n}){e();const r=t,i=tm(),{sceneDataMap:a,needRefresh:o}=Pn(i),s=re(0),l=Z(()=>a.value[r.sceneId]),c=re(!1);zt(()=>{S("loaded")}),pee(()=>{S("loaded")});const f=hc("switchInstance"),h=()=>{f("scene_hub",{id:r.sceneId,tab:""},{showLoading:!1})},p=Dd.getCookie("account.last_prefered_timezone"),g=re(null);Ge(()=>r.sceneId,()=>{c.value=!1},{immediate:!0}),Ge(g,()=>{c.value=!0});const y=Z(()=>{let ge=yn();return ge||""}),v=fr(),{permissionMap:b}=Pn(v),w=Z(()=>{const ge=l.value.permission;return{canUpdateName:ge==null?void 0:ge.has_edit_permission,canUpdateThumbnail:ge==null?void 0:ge.has_edit_permission,canArchive:ge==null?void 0:ge.has_archive_permission,canDelete:ge==null?void 0:ge.has_delete_permission,canUpdateAssignees:ge==null?void 0:ge.has_update_assignee_permission,canUpdateStatus:l.value.has_stage>0?ge==null?void 0:ge.has_edit_permission:0,canUpdateDate:ge==null?void 0:ge.has_edit_date_permission,canOpenReview:b.value.redirectPermission.review,canOpenWoohoo:b.value.redirectPermission.woohoo,canOpenProject:b.value.redirectPermission.project,canOpenUpdate:b.value.redirectPermission.update}}),S=n,T=ge=>{o.value=!0,ge&&S("updateScene",ge)},{handleUpdateSceneName:_,handleGetAssignableUsers:E,handleArchiveScene:D,handleDeleteScene:O,handleUnArchiveScene:V,handleDeleteThumbnail:P,handleUpdateDate:M,handleClearDueDate:C,handleClearStarDate:F,handleUpdateSceneStatus:W,handleUpdateSceneAssignees:H,handleGetAssignableStatus:j,handleAssignUser:N,handleReassignUser:U,handleUnassignUser:ee}=Ice(T),{basicInfo:le}=Pn(v),_e=Z(()=>Number(l.value.property.is_archived)),be=Z(()=>Number(l.value.property.is_locked)),Te=Z(()=>{try{const ge=l.value,Ue=ge.assignees.map(Ye=>({id:Ye.id,user_id:Ye.user_id,name:Ye.display_name,initial:Ye.initial,bgColor:Ye==null?void 0:Ye.color.bgColor,textColor:Ye==null?void 0:Ye.color.textColor,profile_image:Ye.profile_image,is_me:Ye.user_id==le.value.user_id}));return{...ge,status:ge.template_flow_status,assignees:Ue,is_archived:_e.value,is_locked:be.value,bulk_process:ge.bulk_process}}catch(ge){return console.error(ge),l.value}});Ge(()=>Te.value,()=>s.value++,{deep:!0});const J=async ge=>{const Ue=r.sceneId;return await M(Ue,ge)},{getEnvVariable:me}=Al(),Ee=Z(()=>{const ge=l.value,Ue=Dd.getCookie("account.last_prefered_timezone")||"Asia/Singapore",ce={ws_code:y.value,scene_id:ge.id,entity_id:ge.entity_id,baseUrl:me("BASE_URL")||"https://app.dev.arbocollab.com",reviewUrl:me("BASE_REVIEW_URL")||"https://review.dev.arbocollab.com"},Ye={thumbnailKey:"thumbnail",breadcrumbKey:"entity_path",titleKey:"name",startDateKey:"start_date",dueDateKey:"due_date",isStartedKey:"is_started",isCompletedKey:"is_completed",archivedKey:"is_archived",lockedKey:"is_locked",assigneesKey:"assignees",statusKey:"status",bulkUpdateKey:"bulk_process"},te=ge.id;return{notifyError:(...ae)=>{console.error(...ae)},updateFuncs:{updateDate:async ae=>await J(ae),updateName:async ae=>await _(te,ae),updateStatus:async ae=>await W(te,ae.id),getAssignees:async ae=>await E(te,ae),getStatus:async ae=>await j(te,ae),clearDueDate:async()=>await C(te),clearStartDate:async()=>await F(te),updateAssignees:async ae=>await H(te,ae),archiveScene:async()=>await D(te),deleteScene:async()=>await O(te),unarchiveScene:async()=>await V(te),deleteThumbnail:async()=>await P(te),assignUser:async ae=>await N(te,ae),unassignUser:async ae=>await ee(te,ae),reassignUser:async ae=>await U(te,ae)},active:!1,keys:Ye,readonly:!1,disabled:!1,timezone:Ue,sceneConfiguration:ce,data:{...Te.value},permissions:w.value}});Ge([l,_e,be],()=>{s.value=s.value+1});const Ce=re(!1),de=Uae(g);Ge(de,HC.debounce(()=>{Ce.value=!de.value},300));const G={props:r,sceneStore:i,sceneDataMap:a,needRefresh:o,renderKey:s,sceneDataMapComputed:l,ready:c,switchInstance:f,handleOpenSceneHub:h,timezones:p,cardRef:g,wsCode:y,store:v,permissionMap:b,mappingPermission:w,emits:S,callbackUpdateScene:T,handleUpdateSceneName:_,handleGetAssignableUsers:E,handleArchiveScene:D,handleDeleteScene:O,handleUnArchiveScene:V,handleDeleteThumbnail:P,handleUpdateDate:M,handleClearDueDate:C,handleClearStarDate:F,handleUpdateSceneStatus:W,handleUpdateSceneAssignees:H,handleGetAssignableStatus:j,handleAssignUser:N,handleReassignUser:U,handleUnassignUser:ee,basicInfo:le,isArchived:_e,isLocked:be,sceneDataComputed:Te,_handleUpdateDate:J,getEnvVariable:me,tessCardProps:Ee,showLoading:Ce,targetIsVisible:de,get TessSceneCard(){return xae},GirdItemSkeleton:Vue};return Object.defineProperty(G,"__isScriptSetup",{enumerable:!1,value:!0}),G}}),Rqe=["id"];function $qe(t,e,n,r,i,a){return R(),Y("div",{id:r.props.sceneId,class:"grid-item-wrapper"},[It(he(r.GirdItemSkeleton,{class:"pi-skeleton"},null,512),[[Ln,r.showLoading]]),(R(),Re(r.TessSceneCard,Ft({key:r.renderKey,ref:"cardRef"},{...r.tessCardProps},{timezone:r.timezones,style:{opacity:r.showLoading?0:1},onOnOpenSceneHub:r.handleOpenSceneHub}),null,16,["timezone","style"]))],8,Rqe)}const Pqe=Nn(Mqe,[["render",$qe],["__scopeId","data-v-0da73336"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/shared/GridItem.vue"]]),Lqe=1,Nqe=t=>{const{handleGetSceneDetail:e}=Ice(void 0),n=async(b,w)=>{try{const S=await e(b);S.success&&S.data&&(l.value[w]=S.data,f.updateSceneDataValue(b,S.data))}catch(S){console.error(S)}},r=Z(()=>Dd.getCookie("account.last_prefered_timezone")||"Asia/Singapore"),i={perPage:10,itemsPerRow:1,totalItems:0,totalPages:1,currentPage:1,loading:!1},a=Ht(i);async function o(){l.value=[],Object.entries(i).forEach(([b,w])=>{a[b]=w}),await s(Lqe)}const s=async(b=1)=>{var D,O;if(a.loading)return;a.loading=!0,a.currentPage=b;const w={...t.value.filterParameter,page:b},S=await t.value.getDataFunction(w),{meta:T,data:_,private_item_count:E}=S;return y(T),g(_),(O=(D=t.value).callbackGetData)==null||O.call(D,T),p.value=E||0,_},l=re([]),c=async()=>{a.isLoadScene=!0,await o(),a.loadedPage=!1},f=tm(),{totalSceneCount:h,privateSceneCount:p}=Pn(f),g=b=>{f.setSceneDataMap(b),b&&(b==null?void 0:b.length)===0?l.value=[]:l.value=[...l.value,...b]},y=b=>{a.totalItems=b.total,a.totalPages=b.last_page,a.currentPage=b.current_page,h.value=b.total,a.loadedPage=!0,a.loading=!1};return{states:a,listData:l,callbackUpdatingMeta:y,callbackUpdateData:g,resetList:c,initList:o,handleUpdateScene:n,loadNextPage:async()=>{a.currentPage<a.totalPages&&await s(a.currentPage+1)},fetchMoreData:s,preferredTimezone:r}},Fqe=Qe({__name:"SceneList",props:{getDataFunction:{type:Function,required:!0},filterParameter:{type:Object,required:!0},callbackUpdateMeta:{type:Function,required:!1},callbackGetData:{type:Function,required:!1},ready:{type:Boolean,required:!0},height:{type:Number,required:!1}},emits:["loaded","metaUpdate","update","needUpdate"],setup(t,{expose:e,emit:n}){const r=n,i=t,a=pu(),o=E=>!!a[E],s=re({}),l=Z(()=>({getDataFunction:i.getDataFunction,filterParameter:i.filterParameter,callbackUpdateMeta:E=>{r("metaUpdate",E),r("loaded")},callbackGetData:E=>{r("loaded",E)}})),{states:c,listData:f,handleUpdateScene:h,loadNextPage:p,resetList:g,initList:y}=Nqe(l),v=(E,D)=>{h(E,D),r("update")};zt(()=>{y()});const b=re(Math.random());Ge(()=>i.filterParameter,async(E,D)=>{i.ready&&JSON.stringify(E)!==JSON.stringify(D)&&await g()},{deep:!0}),e({resetList:g});const w=async()=>{const E=await i.getDataFunction(i.filterParameter,ny);return{signature:E==null?void 0:E.meta["X-Tsr-signature"]}},S=re(""),{needUpdate:T}=ay("",w,S);Ge(T,E=>{E&&r("needUpdate")},{immediate:!0});const _={emits:r,props:i,slots:a,hasSlot:o,mapRender:s,useSceneListProps:l,states:c,listData:f,handleUpdateScene:h,loadNextPage:p,resetList:g,initList:y,_handleUpdateSceneData:v,renderKey:b,getUpdateSignature:w,iniSignature:S,needUpdate:T,get RecycleScroller(){return bC},InfoVisual:Oc,GridItemSkeleton:Vue,GridItem:Pqe};return Object.defineProperty(_,"__isScriptSetup",{enumerable:!1,value:!0}),_}}),Vqe={key:0,class:"empty-list"},Bqe={class:"scene-item"},Uqe={style:{display:"flex","flex-direction":"column",gap:"8px"}};function Wqe(t,e,n,r,i,a){return r.props.ready?(R(),Y("div",{key:r.renderKey,class:Fe(["scene-list-component",{"no-footer":!r.hasSlot("footer"),empty:!r.states.loading&&r.listData.length===0}]),style:_t({"--list-height":`${r.props.height}px`})},[!r.states.loading&&r.listData.length===0?(R(),Y("div",Vqe,[ke(t.$slots,"empty",{listData:r.listData,loadedPage:r.states.loadedPage},()=>[!r.listData.length&&r.states.loadedPage?(R(),Re(r.InfoVisual,{key:0,"visual-name":"NoData2",label:"No results. Try another search.",height:180})):pe("v-if",!0)],!0)])):pe("v-if",!0),he(r.RecycleScroller,{class:"scroller",items:r.listData,"item-size":116,"key-field":"id",style:_t({height:r.props.height+"px"}),buffer:500,onScrollEnd:r.loadNextPage},ji({default:ze(({item:o,index:s})=>[X("div",Bqe,[he(r.GridItem,{id:o.id,"scene-id":o.id,"item-data":o,onLoaded:l=>r.mapRender[o.id]=!0,onUpdateScene:l=>r._handleUpdateSceneData(l,s)},null,8,["id","scene-id","item-data","onLoaded","onUpdateScene"])])]),_:2},[r.states.loading?{name:"after",fn:ze(()=>[X("div",Uqe,[(R(),Y(wt,null,Qt(5,o=>he(r.GridItemSkeleton,{key:o})),64))])]),key:"0"}:void 0]),1032,["items","style","onScrollEnd"])],6)):pe("v-if",!0)}const LW=Nn(Fqe,[["render",Wqe],["__scopeId","data-v-fd835b02"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/shared/SceneList.vue"]]),Lq=400,zqe=Qe({__name:"SectionRecentAccess",setup(t,{expose:e}){const n=VC(),r=async T=>{var D;const _=await n.getRecentActivities("recent_activities.accessed_scenes",{...T,per_page:10}),E=_.recent_activities.accessed_scenes;return!T.after_id&&!T.before_id&&(w.value=(D=_.recent_activities.accessed_scenes)==null?void 0:D.meta["X-Tsr-signature"]),E.data=E.data.map(O=>({...O.item})),E},i={},a=re(null),o=()=>{var T;(T=a.value)==null||T.resetList()};e({resetList:o});const s=re(null),{height:l}=hh(s),c=re(!1),f=fr(),{basicInfo:h}=Pn(f);Ge(h,()=>{h.value.id&&(c.value=!0)},{deep:!0,immediate:!0});const p=Z(()=>l.value||Lq),g=ks(),{refreshState:y}=Pn(g),v=()=>{y.value.scene=!0},b=async()=>{var _,E;const T=await n.getRecentActivities("recent_activities.accessed_scenes",ny);return{signature:(E=(_=T==null?void 0:T.recent_activities)==null?void 0:_.accessed_scenes)==null?void 0:E.meta["X-Tsr-signature"]}},w=re("");ay("scene",b,w);const S={peopleCard:n,getRecentAccessScenes:r,filterParameter:i,listRef:a,resetList:o,INITIAL_HEIGHT:Lq,recentlyAccessSceneRef:s,height:l,ready:c,store:f,basicInfo:h,listHeight:p,dashboardStore:g,refreshState:y,handleUpdateScene:v,getUpdateSignature:b,iniSignature:w,InfoVisual:Oc,SceneList:LW};return Object.defineProperty(S,"__isScriptSetup",{enumerable:!1,value:!0}),S}}),jqe={ref:"recentlyAccessSceneRef",class:"recently-access-scene"};function Hqe(t,e,n,r,i,a){return R(),Y("div",jqe,[he(r.SceneList,{ref:"listRef","get-data-function":r.getRecentAccessScenes,"filter-parameter":r.filterParameter,ready:r.ready,class:"no-footer",height:r.listHeight,onUpdate:r.handleUpdateScene},{empty:ze(()=>[he(r.InfoVisual,{"visual-name":"NoData",label:"No activity available.",height:150,width:400})]),_:1},8,["ready","height"])],512)}const Nq=Nn(zqe,[["render",Hqe],["__scopeId","data-v-630eed87"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/SectionRecentAccess.vue"]]),Yqe=({comment_id:t,scene_id:e,callbackUpdate:n,commentData:r,userId:i})=>{const{showErrorSnackbar:a,showSuccessSnackbar:o}=jA(),s=e,l=t,c=async()=>[],f=(D,O)=>(console.error("Error in comment API > useCommentTile:",D),navigator.onLine===!1||D.code=="ERR_NETWORK"?a({label:"Network error."}):a({label:(O==null?void 0:O.label)??"Update failed."}),{success:!1,data:void 0}),h=async D=>{const O={success:!1,data:void 0};try{const V=await xn.assignUserApi(s,l,D);if(V)O.success=!0,O.data=V.data;else throw new Error("reassignUser failed")}catch(V){return f(V)}finally{n()}return O},p=async D=>{let O={success:!1,data:void 0};try{const{page:V,keyword:P}=D,M=await xn.getCommentAssignableUser(s,l,V,P);if(M)O={success:!0,data:{data:M.data.map(C=>({id:C.id,name:C.display_name,profile_image:C.profile_image,shortLabel:C.initial,bgColor:C.color.bgColor,textColor:C.color.textColor})),meta:M.meta}};else throw new Error("Error")}catch(V){return console.error("getAssignableUser",V),O={success:!1,data:void 0},O}return O},g=async D=>{const O={success:!1,data:void 0};try{const V=await xn.assignUserApi(s,l,D[0]);V&&(O.success=!0,O.data=V.data)}catch(V){return f(V)}finally{n()}return O},y=async()=>{const D={success:!1,data:void 0};try{const O=await xn.assignUserApi(s,l,null);O&&(D.success=!0,D.data=O.data)}catch(O){return f(O)}return D},v=async()=>{const D={success:!1,data:void 0};try{const O=await xn.resolveCommentApi(s,l);O&&(D.success=!0,D.data=O.data)}catch(O){return f(O)}finally{n()}return D},b=async()=>{const D={success:!1,data:void 0};try{const O=await xn.deleteCommentApi(s,l);if(O)D.success=!0,D.data=O.data,o({label:"Deletion successful."});else throw new Error("Error")}catch(O){f(O,{label:"Deletion failed."})}return D},w=async()=>{const D={success:!1,data:void 0};try{const O=await xn.unResolveCommentApi(s,l);O&&(D.success=!0,D.data=O.data)}catch(O){return f(O)}finally{n()}return D},S=async D=>{const O={success:!1,data:void 0};try{const{id:V,type:P,reactionType:M}=D;if(P!=="add"||!M)throw new Error("reactionType is required");const C=await xn.reactToComment({scene_id:s,comment_id:V,reaction:M});C&&(O.success=!0,O.data=C.data)}catch(V){return f(V)}finally{n()}return O},T=async D=>{const O=_(),V={success:!1,data:void 0};try{const{id:P,type:M,reactionType:C}=D;if(M!=="replace"||!C||!O)throw new Error("reactionType is required");const F=await xn.updateReactToComment({scene_id:s,comment_id:P,reaction:C,reaction_id:O});F&&(V.success=!0,V.data=F.data)}catch(P){return f(P)}finally{n()}return V},_=()=>{var D,O;return(O=(D=r.emoji_users)==null?void 0:D.find(V=>V.user_id===i))==null?void 0:O.emoji_id};return{reactToComment:S,updateReactComment:T,getMentionableUser:c,deleteReactComment:async()=>{const D=_(),O={success:!1,data:void 0};try{if(!D)throw new Error("emojiId is required");const V=await xn.deleteReactToComment(D);V&&(O.success=!0,O.data=V.data)}catch(V){return f(V)}finally{n()}return O},getAssignableUser:p,assignUser:g,resolveComment:v,deleteComment:b,unResolveComment:w,unassignUser:y,reassignUser:h}},qqe=Qe({__name:"CommentItem",props:{item:{type:Object,required:!0},commentId:{type:String,required:!0},width:{type:Number,required:!1,default:400},renderKey:{type:Number,required:!0}},emits:["commentDeleted","updateComment"],setup(t,{expose:e,emit:n}){e();const r=t,i=fr();uC();const{userInfo:a}=Pn(i),{getEnvVariable:o}=Al(),s=W=>{var j;return{items:((j=W==null?void 0:W.entity_path)==null?void 0:j.map(N=>{const U=Qi({type:N.is_parent_item?"scene_hub":"project",config:{baseDomain:o("BASE_URL"),ws_code:yn(),entity_id:N.id,scene_id:N.is_parent_item?N.id:void 0}}).url;return{name:N.name,url:U,disabled:!0,id:N.id,isHighlight:N.is_parent_item=!0}}))||[],lastItemWidth:200,canCopy:!1,url:""}},l=async({path:W})=>{if(W.length===0)return{message:"",url:""};const H=await xn.downloadFileFromS3({scene_id:yn(),path:W});return H?{url:H.url,message:H.message}:{url:"",message:""}},c=async()=>{const W=r.item.id,H=await xn.getCommentDetail({comment_id:W,scene_id:r.item.item_id});D("updateComment",H)},f=Yqe({comment_id:r.item.id,scene_id:r.item.item_id,callbackUpdate:c,commentData:r.item,userId:a.value.id}),{assignUser:h,getAssignableUser:p,resolveComment:g,deleteComment:y,unResolveComment:v,reactToComment:b,updateReactComment:w,deleteReactComment:S,unassignUser:T,getMentionableUser:_,reassignUser:E}=f,D=n,O=Z(()=>{const W=r.item;return{disabled:!1,readonly:!1,isReplying:!1,selected:!1,searchText:void 0,isResolvedList:!0,currentUser:{id:a.value.id,name:a.value.display_name},commentConfig:{renditionId:W.item_rendition_id||void 0,sceneId:W==null?void 0:W.item_id,entityId:W==null?void 0:W.item_id,wsCode:yn(),commentId:W.id},componentConfig:{isReviewComment:!!W.item_rendition_id,isMyComment:W.ws_creator.user_id==a.value.id,onSceneHub:!1},commentPermission:{canEdit:!1,canDelete:!0,canAssign:!0,canOpenSceneHub:!0,canResolve:!0,canOpenReview:!0},apiFunctions:{assignUser:h,unassignUser:T,reassignUser:E,addReaction:async H=>await b(H),removeReaction:S,replaceReaction:H=>{var N,U;const j=((U=(N=r.item.emoji_users)==null?void 0:N.find(ee=>ee.user_id==a.value.id))==null?void 0:U.emoji_id)||"";return w({...H,emojiId:j})},resolveComment:g,unResolveComment:v,deleteComment:async()=>{const H=await y();return H?(D("commentDeleted",r.item.id),H):{success:!1,data:void 0}},updateComment:()=>new Promise((H,j)=>{setTimeout(()=>{j({success:!1,data:{message:"Error"}})},1500)}),uploadFunction:void 0,getResourceURL:l,getAssignableUser:p,getMentionableUser:_},commentData:{...W}}}),V=hc("switchInstance"),P=Z(()=>{var H,j,N,U,ee,le,_e;const W=((H=r.item)==null?void 0:H.entity_path)||[];return{project:(j=W[0])==null?void 0:j.id,process:(N=W[1])==null?void 0:N.id,episode:(U=W[2])==null?void 0:U.id,take:(ee=W[3])==null?void 0:ee.id,scene:((le=W[4])==null?void 0:le.id)||r.item.item_id,rendition:((_e=W[5])==null?void 0:_e.id)||r.item.item_rendition_id,comment:r.item.id}}),M=(W,H)=>{const{scene:j,rendition:N,comment:U}=P.value;if(r.item.item_rendition_id){const ee=Qi({type:"review_rendition_comment",config:{reviewDomain:o("BASE_REVIEW_URL"),ws_code:yn(),scene_id:j,comment_id:U,rendition_id:N||""}});window.open(ee.url,"_blank")}else{const ee=Qi({type:"hub_comment",config:{baseDomain:o("BASE_URL"),ws_code:yn(),scene_id:j,comment_id:U}});H.ctrlKey||H.metaKey?window.open(ee.url,"_blank"):V?V("scene_hub",{sceneId:j,commentId:U},{showLoading:!1}):window.location.href=ee.url}},F={props:r,store:i,userInfo:a,getEnvVariable:o,createBreadCrumbProp:s,fetchResourceUrl:l,updateCommentTile:c,sceneTileComposable:f,assignUser:h,getAssignableUser:p,resolveComment:g,deleteComment:y,unResolveComment:v,reactToComment:b,updateReactComment:w,deleteReactComment:S,unassignUser:T,getMentionableUser:_,reassignUser:E,emits:D,commentTileProps:O,switchInstance:V,commentEntityConfig:P,handleOnReply:M,handleRedirectToComment:(W,H)=>{M(W,H)},get TessCommentTileCore(){return Tae},get TessBreadcrumb(){return vC}};return Object.defineProperty(F,"__isScriptSetup",{enumerable:!1,value:!0}),F}}),Kqe={class:"breadcrumb"};function Gqe(t,e,n,r,i,a){return R(),Re(r.TessCommentTileCore,Ft(r.commentTileProps,{class:"comment-tile-item",style:{"--comment-tile-width":"100%"},onOnReply:r.handleOnReply,onRedirectToComment:r.handleRedirectToComment}),{breadcrumb:ze(()=>[X("div",Kqe,[he(r.TessBreadcrumb,Ft({...r.createBreadCrumbProp(n.item)},{"can-copy":!1,"number-of-visible-items":3}),null,16)])]),_:1},16)}const Zqe=Nn(qqe,[["render",Gqe],["__scopeId","data-v-a67ebcfc"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/CommentItem.vue"]]),Qqe=Qe({__name:"CommentSkeleton",setup(t,{expose:e}){e();const r={getRandomWidth:()=>Math.floor(Math.random()*71)+30};return Object.defineProperty(r,"__isScriptSetup",{enumerable:!1,value:!0}),r}}),Xqe={class:"skeleton-comment"},Jqe={class:"comment-body"},eKe={class:"body"},tKe={class:"skeleton-details"};function nKe(t,e,n,r,i,a){return R(),Y("div",Xqe,[e[2]||(e[2]=X("div",{class:"skeleton-row bg-white",style:{height:"24px",display:"flex","justify-content":"flex-start","align-items":"center",padding:"8px"}},[X("div",{class:"skeleton-line w-50 animation-skeleton small dark"})],-1)),X("div",Jqe,[e[0]||(e[0]=Vv('<div class="skeleton-row" data-v-b9ff2b95><div class="header w-50" data-v-b9ff2b95><div class="skeleton-avatar animation-skeleton dark" data-v-b9ff2b95></div><div class="skeleton-details" data-v-b9ff2b95><div class="skeleton-line animation-skeleton dark" data-v-b9ff2b95></div><div class="skeleton-line animation-skeleton small dark" data-v-b9ff2b95></div></div></div><div class="button-group" data-v-b9ff2b95><div class="skeleton-button animation-skeleton dark sm" data-v-b9ff2b95></div><div class="skeleton-button animation-skeleton dark sm" data-v-b9ff2b95></div><div class="skeleton-button animation-skeleton dark sm" data-v-b9ff2b95></div></div></div>',1)),X("div",eKe,[X("div",tKe,[(R(!0),Y(wt,null,Qt(Math.floor(Math.random()*5)+1,o=>(R(),Y("div",{key:o,class:"skeleton-line animation-skeleton small dark",style:_t({width:`${r.getRandomWidth()}%`})},null,4))),128))])]),e[1]||(e[1]=Vv('<div class="footer" data-v-b9ff2b95><div class="skeleton-button animation-skeleton dark" data-v-b9ff2b95></div><div class="skeleton-button animation-skeleton dark" data-v-b9ff2b95></div></div><div class="footer" data-v-b9ff2b95><div class="button-group" data-v-b9ff2b95><div class="skeleton-button animation-skeleton dark" data-v-b9ff2b95></div><div class="skeleton-button animation-skeleton dark sm" data-v-b9ff2b95></div><div class="skeleton-button animation-skeleton dark sm" data-v-b9ff2b95></div><div class="skeleton-button animation-skeleton dark sm" data-v-b9ff2b95></div></div><div class="skeleton-button animation-skeleton dark" data-v-b9ff2b95></div></div>',2))])])}const rKe=Nn(Qqe,[["render",nKe],["__scopeId","data-v-b9ff2b95"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/CommentSkeleton.vue"]]),Jg=new TS("CommentFile");Jg.version(1).stores({files:"++id, files "});const iKe=()=>{const t=async a=>{await Jg.files.where("id").equals(a.id).first()?await Jg.files.update(a.id,a):await Jg.files.add(a)};return{setCommentFile:t,updateCommentFile:async(a,o)=>{try{await Jg.files.update(a,o)}catch(s){console.error("Error updating comment file",s)}},removeCommentFile:async a=>{try{await Jg.files.where("id").equals(a).delete()}catch(o){console.error("Error removing comment file",o)}},storeCommentFile:(a,o)=>{o.forEach(s=>{t({id:a.id+"_"+s.name,path:s.path,thumbnail:s.thumbnail,url:s.path,type:s.mimetype})})},getCommentFile:async a=>{try{const o=await Jg.files.where("id").equals(a).delete();return console.log("getComment File ",o),o}catch(o){console.error("Error removing comment file",o)}}}},aKe=T_("comment",()=>{const t=re({});return{commentMap:t,updateCommentData:(i,a)=>{t.value[i]={...t.value[i],...a}},setComments:i=>{const a={};i.forEach(o=>{a[o.id]=o}),t.value={...t.value,...a}},getCommentById:i=>t.value[i]}}),oKe=Qe({__name:"CommentList",props:{getData:{type:Function,required:!0},filterParameters:{type:Object,required:!1},loadMore:{type:Boolean,required:!1}},emits:["listDataChange","update","loaded"],setup(t,{expose:e,emit:n}){const r=t,i=re(!0),a=async()=>{var O;p.value=[],i.value=!0;const _=await r.getData({}),E=_.data;f(E,!0),i.value=!1;const D=(O=_.meta)==null?void 0:O.total;b("loaded",D)},o=aKe(),s=re(""),l=re(!0),c=re({}),f=(_,E)=>{if(_.length==0){l.value=!1;return}if(o.setComments(_),_.forEach(D=>{c.value[D.id]=(c.value[D.id]||0)+1,h(D,D.attachments),D.parent&&h(D.parent,D.parent.attachments)}),E){p.value=_,s.value=_[_.length-1].id;return}p.value=[...p.value,..._],s.value=p.value[p.value.length-1].id},{storeCommentFile:h}=iKe(),p=re([]),g=re(null);Wae(g,async()=>{var O;const _=s.value;if(i.value||!l.value)return;i.value=!0;const E=await r.getData({before_id:_}),D=E.data;f(D),i.value=!1,b("loaded",(O=E.meta)==null?void 0:O.total)},{canLoadMore:()=>!i.value&&r.loadMore&&l.value,distance:10});const y=re(!1),v=async()=>{var E;i.value=!0;const _=await r.getData({});f(_.data),y.value=!0,i.value=!1,b("loaded",(E=_==null?void 0:_.meta)==null?void 0:E.total)};zt(async()=>{await v()});const b=n,w=_=>{const E=p.value.findIndex(D=>D.id==_);p.value.splice(E,1),b("listDataChange"),b("update")},S=_=>{const E=p.value.findIndex(D=>D.id==_.id);p.value[E]={...p.value[E],..._},b("update")};e({resetList:a});const T={props:r,loading:i,resetList:a,commentStore:o,lastId:s,canLoadMore:l,renderKey:c,handleDataInsertion:f,storeCommentFile:h,list:p,commentListRef:g,ready:y,init:v,emits:b,deleteComment:w,handleUpdateCommentData:S,CommentItem:Zqe,InfoVisual:Oc,CommentSkeleton:rKe};return Object.defineProperty(T,"__isScriptSetup",{enumerable:!1,value:!0}),T}}),sKe={ref:"commentListRef",class:"recent-comment"},lKe={class:"empty-data"};function uKe(t,e,n,r,i,a){return R(),Y("div",sKe,[r.list.length==0&&!r.loading?ke(t.$slots,"empty",{key:0},()=>[X("div",lKe,[he(r.InfoVisual,{"visual-name":"NoData",label:"No activity available.",height:150})])],!0):pe("v-if",!0),e[0]||(e[0]=Cn()),r.list.length!==0?(R(!0),Y(wt,{key:1},Qt(r.list,o=>(R(),Re(r.CommentItem,{key:`comment_${o.id}_${r.renderKey[o.id]}`,"render-key":r.renderKey[o.id],"comment-id":o.id,item:o,onCommentDeleted:r.deleteComment,onUpdateComment:r.handleUpdateCommentData},null,8,["render-key","comment-id","item"]))),128)):pe("v-if",!0),e[1]||(e[1]=Cn()),r.loading?(R(),Y(wt,{key:2},Qt(3,o=>X("div",{key:o},[he(r.CommentSkeleton)])),64)):pe("v-if",!0)],512)}const rI=Nn(oKe,[["render",uKe],["__scopeId","data-v-bafec57c"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/CommentList.vue"]]),cKe=Qe({__name:"SectionRecentComment",setup(t,{expose:e}){const n=VC(),r=f=>({...f}),i=async f=>{var p,g,y,v,b;const h=await n.getRecentActivities("comments.latest",f);return!f.after_id&&!f.before_id&&(l.value=(g=(p=h==null?void 0:h.comments)==null?void 0:p.latest)==null?void 0:g.meta["X-Tsr-signature"]),{...(y=h==null?void 0:h.comments)==null?void 0:y.latest,data:((b=(v=h==null?void 0:h.comments)==null?void 0:v.latest)==null?void 0:b.data.map(r))||[]}},a=re(null),o=async()=>{var f;(f=a.value)==null||f.resetList()},s=async()=>{var h,p;const f=await n.getRecentActivities("comments.latest",ny);return{signature:(p=(h=f==null?void 0:f.comments)==null?void 0:h.latest)==null?void 0:p.meta["X-Tsr-signature"]}},l=re("");ay("comment_recent",s,l),e({resetList:o});const c={peopleCard:n,convertCommentData:r,getData:i,listRef:a,resetList:o,getUpdateSignature:s,iniSignature:l,CommentList:rI};return Object.defineProperty(c,"__isScriptSetup",{enumerable:!1,value:!0}),c}});function dKe(t,e,n,r,i,a){return R(),Re(r.CommentList,{ref:"listRef","get-data":r.getData,"load-more":!0},null,512)}const BN=Nn(cKe,[["render",dKe],["__scopeId","data-v-d2c94fc0"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/SectionRecentComment.vue"]]),fKe=Qe({__name:"SectionResolvedComment",setup(t,{expose:e}){const n=VC(),r=async p=>{var y,v,b,w,S;const g=await n.getRecentActivities("comments.recently_resolved",p);return!(p!=null&&p.before_id)&&!(p!=null&&p.after_id)&&(f.value=(v=(y=g==null?void 0:g.comments)==null?void 0:y.recently_resolved)==null?void 0:v.meta["X-Tsr-signature"]),{...(b=g==null?void 0:g.comments)==null?void 0:b.recently_resolved,data:((S=(w=g==null?void 0:g.comments)==null?void 0:w.recently_resolved)==null?void 0:S.data)||[]}},i=re(null),a=async()=>{var p;(p=i.value)==null||p.resetList()},o=ks(),{refreshState:s}=Pn(o),l=()=>{s.value.comment_resolved=!0};e({resetList:a});const c=async()=>{var g,y;const p=await n.getRecentActivities("comments.recently_resolved",ny);return{signature:(y=(g=p==null?void 0:p.comments)==null?void 0:g.recently_resolved)==null?void 0:y.meta["X-Tsr-signature"]}},f=re("");ay("comment_resolved",c,f);const h={peopleCard:n,getData:r,listRef:i,resetList:a,dashboardStore:o,refreshState:s,informListChange:l,getUpdateSignature:c,iniSignature:f,CommentList:rI};return Object.defineProperty(h,"__isScriptSetup",{enumerable:!1,value:!0}),h}});function hKe(t,e,n,r,i,a){return R(),Re(r.CommentList,{ref:"listRef","get-data":r.getData,"load-more":!0,onListDataChange:r.informListChange},null,512)}const pKe=Nn(fKe,[["render",hKe],["__scopeId","data-v-f0047820"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/SectionResolvedComment.vue"]]),mKe=Qe({__name:"DashboardTabSection",props:{tabs:{type:Array,required:!0}},setup(t,{expose:e}){e();const n={comment_recent:BN,comment_resolved:pKe,rendition:EHe,scene:Nq,people_comment:BN,chart:BN,assigned_scene:Nq},r=t,i=re(r.tabs[0].id);Ks(()=>{i.value=r.tabs[0].id});const a=S=>{i.value=S};Ge(i,(S,T)=>{y.value[S]=!1,y.value[T]=!1});const o=re({comment_recent:null,comment_resolved:null,rendition:null,scene:null,people_comment:null,chart:null,assigned_scene:null}),s=()=>{var T;const S=i.value;S&&y.value[S]!=null&&(y.value[S]=!1,(T=o.value[S])==null||T.resetList())},l=(S,T)=>{o.value[T]=S},c=Z(()=>r.tabs.map(S=>({...S,id:S.id}))),f=fr(),{basicInfo:h}=Pn(f),p=Z(()=>h.value.id);Ge(p,(S,T)=>{S&&S!==T&&Object.keys(o.value).forEach(_=>{var E;(E=o.value[_])==null||E.resetList()})});const g=ks(),{refreshState:y}=Pn(g),v=Z(()=>{const S=i.value;return y.value[S]}),b=Z(()=>{const S=v.value?"Refresh":"",T=v.value?"Change detected. Refresh now.":"Refresh";return{prefixIcon:"ArrowRotate",label:S,size:"small",type:"secondary",prefixTooltip:T,onClick:s}}),w={components:n,props:r,currentTab:i,changeTab:a,componentRef:o,handleRefreshPage:s,handleRefUpdate:l,computedTabs:c,store:f,basicInfo:h,userId:p,dashboardStore:g,refreshState:y,needRefresh:v,refreshBtnArgs:b,get ArboButton(){return Nt},get ArboTabs(){return hC}};return Object.defineProperty(w,"__isScriptSetup",{enumerable:!1,value:!0}),w}}),gKe={class:"tab-sections"},vKe={class:"tab"},yKe={class:"refresh-btn"};function bKe(t,e,n,r,i,a){return R(),Y("div",gKe,[X("div",vKe,[he(r.ArboTabs,{"key-value":"id",tabs:r.computedTabs,value:r.currentTab,class:"arbo-tabs",onInput:r.changeTab},ji({_:2},[Qt(r.computedTabs,o=>({name:`${o.id}`,fn:ze(()=>[o.id==r.currentTab?(R(),Re(wd(r.components[o.id]),{key:0,ref:s=>r.handleRefUpdate(s,o.id)},null,512)):pe("v-if",!0)])}))]),1032,["tabs","value"]),X("div",yKe,[he(r.ArboButton,Ft({...r.refreshBtnArgs},{onClick:r.handleRefreshPage}),null,16)])])])}const _Ke=Nn(mKe,[["render",bKe],["__scopeId","data-v-0ede6907"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/DashboardTabSection.vue"]]),wKe=Qe({__name:"ResizeLayout",props:{minWidthRight:{type:Number,required:!1,default:730},minWidthLeft:{type:Number,required:!1,default:400},layoutName:{type:String,required:!0},mode:{type:String,required:!1,default:"horizontal"},breakPoint:{type:Number,required:!1,default:1024},minHeight:{type:Number,required:!1,default:500},requireHeight:{type:Number,required:!1,default:500},requireRightMargin:{type:Number,required:!1,default:0}},emits:["resized"],setup(t,{expose:e,emit:n}){var H;const r=re(null),i=re(null),a=re(null),o=re(null),s=re(!1),l=t,{height:c}=zae(),f=n,h=Z(()=>l.minWidthRight||730),p=Z(()=>l.minWidthLeft||400),g=Z(()=>y.value<Loe||c.value<700),{width:y}=hh(r),{width:v,height:b}=hh(i),w=Z(()=>v.value),S=Z(()=>b.value),{width:T}=hh(a),_=re(!1),E=re(((H=r.value)==null?void 0:H.offsetWidth)||0),D=()=>{const j=o.value,N=r.value,U=i.value,ee=a.value;!j||!U||!ee||!N||(j.classList.add("active"),_.value=!0,E.value=N.offsetWidth)},O=()=>{const j=o.value;!j||!_.value||(_.value=!1,j.classList.remove("active"),fn(()=>{var N,U;f("resized",[(N=i.value)==null?void 0:N.offsetWidth,(U=i.value)==null?void 0:U.offsetWidth]),M()}))},V=j=>{const N=o.value,U=r.value,ee=i.value,le=a.value;if(!(!N||!ee||!le||!U)&&_.value){const _e=U.getBoundingClientRect(),be=j.clientX,Te=_e.left,J=(be-Te)/_e.width;if((1-J)*_e.width<h.value||J*_e.width<p.value)return;const me=_e.width,Ee=J*me-5,Ce=(1-J)*me-5;ee.style.width=`${Ee}px`,le.style.width=`${Ce}px`}},P=()=>{const j=o.value,N=r.value,U=i.value,ee=a.value;!j||!U||!ee||!N||(j.addEventListener("mousedown",D),document.addEventListener("mousemove",V),document.addEventListener("mouseup",O))},M=()=>{const j=JSON.stringify({left:v.value,right:T.value});localStorage.setItem("layout_"+l.layoutName,j)},C=()=>{try{const j=localStorage.getItem("layout_"+l.layoutName);if(j){const{left:N,right:U}=JSON.parse(j);i.value&&a.value&&(i.value.style.width=`${N}px`,a.value.style.width=`${U}px`)}}catch(j){console.error("getSavedLayout",j,i.value,a.value)}},F=()=>{_.value&&O()};zt(()=>{P(),fn(()=>{var j,N,U,ee;C(),f("resized",[(j=i.value)==null?void 0:j.offsetWidth,(N=a.value)==null?void 0:N.offsetWidth]),f("resized",[(U=i.value)==null?void 0:U.offsetWidth,(ee=a.value)==null?void 0:ee.offsetWidth]),s.value=!0}),document.addEventListener("resize",F)}),Gs(()=>{const j=o.value,N=r.value,U=i.value,ee=a.value;!j||!U||!ee||!N||(j.removeEventListener("mousedown",D),document.removeEventListener("mousemove",V),document.removeEventListener("mouseup",O))}),e({leftPanelRef:i,rightPanelRef:a,leftPanelWidth:v,rightPanelWidth:T});const W={resizingPanelRef:r,leftPanelRef:i,rightPanelRef:a,resizeBar:o,ready:s,props:l,windowHeight:c,emits:f,minWidthRight:h,minWidthLeft:p,isColumnLayout:g,containerWidth:y,leftPanelWidth:v,leftPanelHeight:b,leftWidth:w,leftHeight:S,rightPanelWidth:T,isDragging:_,initialWidth:E,initResize:D,handleFinishResize:O,handleResize:V,init:P,saveCurrentLayout:M,getSavedLayout:C,handleWindowResize:F};return Object.defineProperty(W,"__isScriptSetup",{enumerable:!1,value:!0}),W}}),xKe=["id"],SKe={ref:"resizeBar",class:"resize-layout__resize-bar"};function AKe(t,e,n,r,i,a){return R(),Y("div",{id:`resize-layout-${r.props.layoutName}`,ref:"resizingPanelRef",class:Fe(["resize-layout",[r.props.mode,{"break-layout":r.isColumnLayout}]])},[X("div",{ref:"leftPanelRef",class:Fe(["resize-layout__content flex-1",{"disabled-pointer":r.isDragging}]),style:_t({"min-width":`${r.minWidthLeft}px`,minHeight:`${r.isColumnLayout?r.props.requireHeight:r.props.minHeight}px`})},[r.ready?ke(t.$slots,"left",{key:0,width:r.leftWidth,height:r.leftHeight,ready:r.ready,isColumnLayout:r.isColumnLayout},()=>[e[0]||(e[0]=X("div",{class:"loading-box animation-skeleton"},null,-1))],!0):pe("v-if",!0)],6),X("div",SKe,null,512),X("div",{ref:"rightPanelRef",class:Fe(["resize-layout__content",{"disabled-pointer":r.isDragging}]),style:_t({"min-width":`${r.minWidthRight}px`,minHeight:`${r.props.minHeight}px`,"margin-right":`${r.props.requireRightMargin}px`})},[r.ready?ke(t.$slots,"right",{key:0},()=>[e[1]||(e[1]=X("div",{class:"loading-box animation-skeleton"},null,-1))],!0):pe("v-if",!0)],6)],10,xKe)}const NW=Nn(wKe,[["render",AKe],["__scopeId","data-v-17f7c923"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/layouts/ResizeLayout.vue"]]),kKe=Qe({__name:"PreferencePopup",props:{width:{type:Number,required:!1,default:280},isActive:{type:Boolean,required:!1}},setup(t,{expose:e}){e();const n=t,r=()=>{a.value?o():i()},i=()=>{f(),a.value=!0},a=re(!1),o=()=>{a.value=!1},s=re(null),l=re(null),c=re(null);o4e(s,()=>{o()});const f=()=>{const p=l.value,g=c.value;if(!p||!g)return;const y=p.getBoundingClientRect();g.style.top=`${y.bottom}px`,g.style.left=`${y.left-n.width+y.width}px`,g.style.right=`${window.innerWidth-y.right}px`},h={props:n,togglePreferencePopup:r,openPreferencePopup:i,isOpen:a,closePreferencePopup:o,preferencePopupComponentRef:s,activatorButtonRef:l,preferencePopupRef:c,positioningPopup:f,get ArboButton(){return Nt}};return Object.defineProperty(h,"__isScriptSetup",{enumerable:!1,value:!0}),h}}),EKe={ref:"preferencePopupComponentRef",class:"preference-popup-component"};function TKe(t,e,n,r,i,a){return R(),Y("div",EKe,[X("div",{ref:"activatorButtonRef",class:Fe(["activator-button",{active:r.isOpen}])},[ke(t.$slots,"activator",{},()=>[he(r.ArboButton,{class:Fe({highlight:n.isActive}),"prefix-icon":"Gear","prefix-tooltip":"Preference",type:"secondary",label:"",size:"small",onClick:r.togglePreferencePopup},null,8,["class"])],!0)],2),It(X("div",{ref:"preferencePopupRef",class:"preference-popup",style:_t({width:r.props.width+"px"})},[ke(t.$slots,"content",{},void 0,!0)],4),[[Ln,r.isOpen]])],512)}const DKe=Nn(kKe,[["render",TKe],["__scopeId","data-v-6449bd28"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/shared/PreferencePopup.vue"]]),OKe=Qe({__name:"SkeletonLoading",props:{isLoading:{type:Boolean,required:!0},width:{type:Number,required:!0},height:{type:Number,required:!0}},setup(t,{expose:e}){e();const n=t,r=Z(()=>({"--card-width":`${n.width}px`,"--card-height":`${n.height}px`})),i={props:n,computedCardStyle:r};return Object.defineProperty(i,"__isScriptSetup",{enumerable:!1,value:!0}),i}});function CKe(t,e,n,r,i,a){return R(),Re(Md,{name:"fade",mode:"out-in"},{default:ze(()=>[n.isLoading?(R(),Y("div",{key:0,class:"card-skeleton animation-skeleton",style:_t(r.computedCardStyle)},null,4)):ke(t.$slots,"default",{key:1},void 0,!0)]),_:3})}const IKe=Nn(OKe,[["render",CKe],["__scopeId","data-v-3e5dcdc8"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/shared/SkeletonLoading.vue"]]),MKe=Qe({__name:"SectionTitle",props:{countBtn:{type:Object,required:!1,default:void 0},showRefreshLabel:{type:Boolean,required:!1,default:!1},showRefreshBtn:{type:Boolean,required:!0},title:{type:String,required:!1,default:""},loading:{type:Boolean,required:!1,default:!0},activeFilter:{type:Boolean,required:!1,default:!1}},emits:["refresh"],setup(t,{expose:e,emit:n}){e();const r=pu(),i=f=>!!r[f],a=t,o=re(0),s=n,c={slots:r,hasSlot:i,props:a,renderKey:o,emits:s,refresh:()=>{o.value+=1,s("refresh")},get ArboButton(){return Nt},get TessNonInteractiveChip(){return IS},get ArboTooltip(){return dr},PreferencePopup:DKe,SkeletonLoading:IKe};return Object.defineProperty(c,"__isScriptSetup",{enumerable:!1,value:!0}),c}}),RKe={class:"section-title"},$Ke={class:"title"},PKe={class:"actions"},LKe={class:"counting-chip"};function NKe(t,e,n,r,i,a){return R(),Y("div",RKe,[ke(t.$slots,"title",{},()=>[X("div",$Ke,it(n.title),1)],!0),X("div",PKe,[ke(t.$slots,"search",{},void 0,!0),e[0]||(e[0]=Cn()),ke(t.$slots,"refresh",{},()=>[n.showRefreshBtn?(R(),Re(r.ArboTooltip,{key:0,content:n.showRefreshLabel?"Change detected. Refresh now.":"Refresh",delay:[300,0]},{default:ze(()=>[n.showRefreshLabel?(R(),Re(r.ArboButton,{key:r.renderKey,type:"secondary",label:"Refresh","prefix-icon":"ArrowRotate",size:"small",onClick:r.refresh})):(R(),Re(r.ArboButton,{key:r.renderKey+1,type:"secondary",label:"","prefix-icon":"ArrowRotate",size:"small",onClick:r.refresh}))]),_:1},8,["content"])):pe("v-if",!0)],!0),e[1]||(e[1]=Cn()),ke(t.$slots,"count",{},()=>[n.countBtn?(R(),Re(r.ArboTooltip,{key:0,content:n.countBtn.countTooltip,delay:[1e3,0]},{default:ze(()=>[he(r.SkeletonLoading,{"is-loading":r.props.loading,width:50,height:24},{default:ze(()=>[X("div",LKe,[he(r.TessNonInteractiveChip,{label:String(n.countBtn.count||"0"),icon:n.countBtn.icon},null,8,["label","icon"])])]),_:1},8,["is-loading"])]),_:1},8,["content"])):pe("v-if",!0)],!0),e[2]||(e[2]=Cn()),ke(t.$slots,"preferences",{},()=>[r.hasSlot("preference-popup")||r.hasSlot("preference")?(R(),Re(r.PreferencePopup,{key:0,"is-active":n.activeFilter},{content:ze(()=>[ke(t.$slots,"preference-popup",{},void 0,!0)]),_:3},8,["is-active"])):pe("v-if",!0)],!0)])])}const iI=Nn(MKe,[["render",NKe],["__scopeId","data-v-1814b956"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/shared/SectionTitle.vue"]]),FKe=Qe({__name:"PeopleHome",setup(t,{expose:e}){e();const n={"assigned-tile":jze,"target-points-tile":tje,"unresolved-tile":ije,"overdue-tile":Zze,"total-completed-tile":qze},r=ks(),{getDashboardData:i}=r,{dashboardData:a}=Pn(r),o=Z(()=>{var V;return["assigned-tile",((V=a.value)==null?void 0:V.point_pool.can_view)?"target-points-tile":void 0,"overdue-tile","unresolved-tile","total-completed-tile"].filter(Boolean)}),s=re(!0),l=[{id:"comment_resolved",name:"Recently resolved",needRefresh:!0},{id:"comment_recent",name:"Recent comments",needRefresh:!0}],c=Z(()=>({"--card-width":`${T.value}px`,"--max-width":`${T.value}px`})),f=[{id:"rendition",name:"New renditions",needRefresh:!0},{id:"scene",name:"Recently accessed scenes",needRefresh:!0}],{height:h}=zae(),p=re(null),g=re(null),y=fr(),{basicInfo:v}=Pn(y),b=re(null),{width:w}=hh(b),S=Z(()=>w.value),T=Z(()=>{const D=w.value,O=Math.min(Math.floor(D/266),5),V=D-(O-1)*16;return Math.floor(V/Math.ceil(O))}),_=RS(async()=>{v.value.id&&(s.value=!0,await i(v.value.id),s.value=!1)},500);Ge(v,()=>{_()},{deep:!0,immediate:!0});const E={components:n,dashboardStore:r,getDashboardData:i,dashboardData:a,tiles:o,isLoading:s,sectionComment:l,computedCardStyle:c,sectionScene:f,windowHeight:h,peopleHomeRef:p,topRef:g,store:y,basicInfo:v,sectionRef:b,width:w,widthSection:S,cardWidth:T,handleRefreshPage:_,DashboardTabSection:_Ke,ResizeLayout:NW,SectionTitle:iI,get BREAKPOINT_RESIZE(){return Loe}};return Object.defineProperty(E,"__isScriptSetup",{enumerable:!1,value:!0}),E}}),VKe={ref:"peopleHomeRef",class:"people-home"},BKe={ref:"topRef",class:"top"},UKe={ref:"sectionRef",class:"section-card-wrapper"},WKe={class:"section-card"};function zKe(t,e,n,r,i,a){return R(),Y("div",VKe,[X("div",BKe,[he(r.SectionTitle,{title:"Summary","show-refresh-btn":!0,onRefresh:r.handleRefreshPage},null,8,["onRefresh"]),X("div",UKe,[X("div",WKe,[(R(!0),Y(wt,null,Qt(r.tiles,o=>(R(),Y("div",{key:o,class:"dashboard-item-wrapper"},[he(Md,{name:"fade",mode:"out-in"},{default:ze(()=>[r.isLoading?(R(),Y("div",{key:0,class:"card-skeleton animation-skeleton",style:_t(r.computedCardStyle)},null,4)):(R(),Re(wd(r.components[o]),{key:1,class:"dashboard-item",style:_t(r.computedCardStyle)},null,8,["style"]))]),_:2},1024)]))),128))])],512)],512),X("div",{class:Fe(["bottom",{"column-layout":r.widthSection<=r.BREAKPOINT_RESIZE||r.windowHeight<700}])},[he(r.ResizeLayout,{"min-width-left":440,"min-width-right":750,"layout-name":"people-home",class:"resize-layout"},{left:ze(()=>[he(r.DashboardTabSection,{tabs:r.sectionComment})]),right:ze(()=>[he(r.DashboardTabSection,{tabs:r.sectionScene})]),_:1,__:[0]})],2)],512)}const jKe=Nn(FKe,[["render",zKe],["__scopeId","data-v-ba194661"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/sections/PeopleHome.vue"]]),HKe=Qe({__name:"ProfileAvatar",props:{bgColor:{type:String,default:"#FFFFFF"},textColor:{type:String,default:"#FFFFFF"},initialName:{type:String,default:""},profileImage:{type:String,default:""}},setup(t,{expose:e}){e();const n=t,r=fr(),i=re(null),a=re(!1);async function o(){if(n.profileImage){a.value=!0;try{const p=await fetch(n.profileImage,{method:"GET"});p.ok?i.value=n.profileImage:(console.error("loadImageSrc: Invalid image URL",p.status),i.value="")}catch(p){console.error("loadImageSrc: Error fetching image:",p),i.value=""}finally{a.value=!1}}else i.value="",a.value=!1}const s=Z(()=>r.basicInfo.private_info),l=Z(()=>{var p,g,y;return((p=s.value)==null?void 0:p.is_offline)===!0?"Logged out from account":((g=s.value)==null?void 0:g.last_active)!==null?"Active in the workspace within the last 10 minutes":((y=s.value)==null?void 0:y.last_active)===null?"No activity in the workspace within the last 10 minutes":""}),c=Z(()=>{var p,g,y;return((p=s.value)==null?void 0:p.is_offline)===!0?"#A6A6A6":((g=s.value)==null?void 0:g.last_active)!==null?"#02C39A":((y=s.value)==null?void 0:y.last_active)===null?"#F7941D":""}),f=Z(()=>({backgroundColor:c.value}));zt(()=>{o()});const h={props:n,store:r,imageUrl:i,isLoadImage:a,loadImageSrc:o,userStatusInfo:s,statusTooltipContent:l,statusBackgroundColor:c,dynamicStyles:f,get TessAvatar(){return _h},get ArboTooltip(){return dr},get ArboSkeletonLoading(){return D_}};return Object.defineProperty(h,"__isScriptSetup",{enumerable:!1,value:!0}),h}}),YKe={class:"profile-image"},qKe={class:"profile-image__main--status-avatar"},KKe={class:"profile-image__main"},GKe={key:1};function ZKe(t,e,n,r,i,a){return R(),Y("div",YKe,[X("div",qKe,[he(r.ArboTooltip,{content:r.statusTooltipContent,delay:[300,0],"hide-on-click":!0,placement:"right"},{default:ze(()=>[X("div",{class:"profile-image__main--status-avatar-icon",style:_t(r.dynamicStyles)},null,4)]),_:1},8,["content"])]),X("div",KKe,[r.isLoadImage?(R(),Re(r.ArboSkeletonLoading,{key:0,size:108,width:108,height:108,radius:4,duration:2})):(R(),Y("div",GKe,[he(r.TessAvatar,{class:"profile-image__main--avatar",image:r.imageUrl,label:"","short-label":r.props.initialName,"is-use-short-label":!0,"bg-color":r.props.bgColor,"text-color":r.props.textColor,"disable-hover":!0},null,8,["image","short-label","bg-color","text-color"])]))])])}const QKe=Nn(HKe,[["render",ZKe],["__scopeId","data-v-6855256d"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/sections/mainHeader/components/ProfileAvatar.vue"]]),XKe=Qe({__name:"ProfileInfoDetailFirstSection",setup(t,{expose:e}){e();const n=Ht({filteredData:[],currentPage:1,perPage:10,pageMeta:{},selectedUser:"",searchText:"",isFetching:!1}),r=fr();let i=Ht({isShow:!1}),a=Ht({isShow:!1});const o=re(!1),s=re(!1),l=re(0),c=async(N,U,ee,le="",_e=!1)=>{try{if(n.isFetching)return;n.isFetching=!0;const be=await xn.getUserListProfile(N,U,ee,le),Te=be.data.map(J=>{var me,Ee;return{...J,bg_color:(me=J==null?void 0:J.color)==null?void 0:me.bgColor,text_color:(Ee=J==null?void 0:J.color)==null?void 0:Ee.textColor}});_e?n.filteredData=[...Te]:n.filteredData=[...n.filteredData,...Te],n.pageMeta=be==null?void 0:be.meta,n.currentPage++,n.isFetching=!1}catch(be){console.error("fetchUserProfile error:",be)}};function f(){c(n.currentPage,n.perPage,n.selectedUser,n.searchText)}const h=Z(()=>n.filteredData.length<n.pageMeta.total),p=fr(),{selectedDataId:g}=Pn(p),y=async()=>{n.searchText="",n.currentPage=1,n.filteredData=[],await c(n.currentPage,n.perPage,g.value||"")};function v(N){n.selectedUser=JSON.parse(JSON.stringify(N))}const b=Nae(),{getEnvVariable:w}=Al(),{currentTab:S}=Pn(p),T=w("IS_DETACH");Ge(()=>n.selectedUser,()=>{T||b.replace({name:"PeopleDetail",params:{people_id:n.selectedUser||d5e(),ws_code:yn()},query:{tab:S.value||"home"}})});const _=Z(()=>r.isLoadingFetchData),E=()=>{var U;const N=r.basicInfo;o.value=!0,navigator.clipboard.writeText((U=N==null?void 0:N.user)==null?void 0:U.email).then(()=>{setTimeout(()=>{o.value=!1,i.isShow=!1},1e3)}).catch(ee=>{console.error("Could not copy the email",ee)})},D=()=>{var U;const N=r.basicInfo;s.value=!0,navigator.clipboard.writeText((U=N==null?void 0:N.user)==null?void 0:U.professional_name).then(()=>{setTimeout(()=>{s.value=!1,a.isShow=!1},1e3)}).catch(ee=>{console.error("Could not copy the name",ee)})},O=Z(()=>{let N=yn();return N||""}),V=Z(()=>{var N,U,ee;return r.isLoadingProfile||!((N=r.basicInfo)!=null&&N.user)?"":((ee=(U=r.basicInfo)==null?void 0:U.user)==null?void 0:ee.professional_name)||"Professional name not provided"});function P(N,U){return(N==null?void 0:N.id)===(U==null?void 0:U.id)?U.professional_name===null:!1}function M(){w("BASE_URL")&&(window.parent.location.href=`${w("BASE_URL")}/${O.value}/ac/acc`)}function C(N,U){return N&&N.length>U?N.substring(0,U-3)+"...":N||""}const F=async N=>{n.searchText=N,n.currentPage=1,await c(n.currentPage,n.perPage,n.selectedUser,n.searchText,!0)},W=async()=>{await c(n.currentPage,n.perPage,g.value||""),l.value++};Ge(()=>g.value,N=>{n.selectedUser=N,W()},{immediate:!0,deep:!0}),zt(async()=>{W()}),Ge(n,N=>{!n.filteredData.length&&!N.selectedUser||fr().setSelectedDataId(N.selectedUser===""?n.filteredData[0].id:N.selectedUser)});const H=Z(()=>"Choose a team member to view their profile"),j={states:n,store:r,get showCopyIcon(){return i},set showCopyIcon(N){i=N},get showCopyIconName(){return a},set showCopyIconName(N){a=N},showCopiedEmail:o,showCopiedName:s,componentKey:l,fetchUserProfile:c,loadMoreData:f,enableLoadMore:h,globalStore:p,peopleId:g,resetSearch:y,updateValue:v,router:b,getEnvVariable:w,currentTab:S,isDetach:T,isDisableSelect:_,copyEmail:E,copyName:D,wsCode:O,getProfessionalName:V,checkUserProfile:P,redirectAccountSetting:M,truncateLabel:C,handleSearch:F,init:W,tooltipContent:H,get ArboLabel(){return ea},get ArboTooltip(){return dr},get TessAssigneeSelect(){return k6},get ArboSkeletonLoading(){return D_},get ArboButton(){return Nt},get ArboIcon(){return qn}};return Object.defineProperty(j,"__isScriptSetup",{enumerable:!1,value:!0}),j}}),JKe={class:"info-detail-content"},eGe={class:"info-detail-content__main"},tGe={class:"info-detail-content__main--user-select"},nGe={class:"info-detail-content__main--user-name"},rGe={key:1,class:"detail-row"},iGe={class:"icon-wrapper"},aGe={class:"content-wrapper"},oGe={class:"inline-content"},sGe={key:4,class:"inline-copy-button"},lGe={class:"info-detail-content__main--user-email"},uGe={key:1,class:"detail-row"},cGe={class:"icon-wrapper"},dGe={class:"content-wrapper"},fGe={class:"inline-content"},hGe={key:3,class:"inline-copy-button"};function pGe(t,e,n,r,i,a){var o,s,l,c,f,h,p,g,y,v,b,w,S,T,_,E,D,O,V,P,M,C;return R(),Y("div",JKe,[X("div",eGe,[X("div",tGe,[(R(),Re(r.TessAssigneeSelect,{key:r.componentKey,modelValue:r.states.selectedUser,"onUpdate:modelValue":e[0]||(e[0]=F=>r.states.selectedUser=F),"empty-text":"No results. Try another search.","prepend-height":0,options:r.states.filteredData,"is-dark":!0,disable:r.isDisableSelect,"select-limit":1,"disable-un-select-single-mode":!0,"is-enable-pagination":!1,"is-enable-load-more":r.enableLoadMore,"is-clearable":!1,label:"",placeholder:"Please select a user","value-key":"id","tooltip-display":r.tooltipContent,onSearch:r.handleSearch,onLoadMore:r.loadMoreData,onUpdateValue:r.updateValue,onShown:r.resetSearch},ji({"loading-animation":ze(({})=>[e[6]||(e[6]=X("div",{class:"box-loading absolute"},[X("div",{class:"animation-skeleton"}),X("div",{class:"animation-skeleton"})],-1))]),prepend_list:ze(({})=>[It(X("div",null,null,512),[[Ln,!1]])]),_:2},[r.states.isFetching?{name:"empty_text",fn:ze(({})=>[e[5]||(e[5]=X("div",{class:"box-loading"},[X("div",{class:"animation-skeleton"}),X("div",{class:"animation-skeleton"})],-1))]),key:"0"}:void 0]),1032,["modelValue","options","disable","is-enable-load-more","tooltip-display"]))]),X("div",nGe,[r.store.isLoadingProfile?(R(),Re(r.ArboSkeletonLoading,{key:0,size:200,width:200,height:21,radius:4,duration:1})):(R(),Y("div",rGe,[he(r.ArboTooltip,{content:((s=(o=r.store.basicInfo)==null?void 0:o.user)==null?void 0:s.professional_name)!==null?"Professional name":"",delay:[300,0],"hide-on-click":!0},{default:ze(()=>[X("div",iGe,[he(r.ArboIcon,{name:"AddressCard"})])]),_:1},8,["content"]),X("div",aGe,[X("div",oGe,[X("div",{class:"name-hover-area",onMouseover:e[1]||(e[1]=F=>r.showCopyIconName.isShow=!0),onMouseleave:e[2]||(e[2]=F=>r.showCopyIconName.isShow=!1)},[(c=(l=r.store.basicInfo)==null?void 0:l.user)!=null&&c.professional_name&&((h=(f=r.store.basicInfo)==null?void 0:f.user)==null?void 0:h.professional_name.length)>25&&!r.showCopiedName?(R(),Re(r.ArboTooltip,{key:0,content:(g=(p=r.store.basicInfo)==null?void 0:p.user)==null?void 0:g.professional_name,delay:[1e3,0],"hide-on-click":!0,style:{"padding-top":"4px"}},{default:ze(()=>{var F,W;return[he(r.ArboLabel,{label:r.truncateLabel((W=(F=r.store.basicInfo)==null?void 0:F.user)==null?void 0:W.professional_name,25),class:"name-label-truncate"},null,8,["label"])]}),_:1},8,["content"])):!r.showCopiedName&&!r.checkUserProfile((y=r.store.basicInfo)==null?void 0:y.user,r.store.userInfo)?(R(),Re(r.ArboLabel,{key:1,label:r.getProfessionalName,class:Fe(["name-label",{"name-label-not-provided":((b=(v=r.store.basicInfo)==null?void 0:v.user)==null?void 0:b.professional_name)===null}])},null,8,["label","class"])):!r.showCopiedName&&r.checkUserProfile((w=r.store.basicInfo)==null?void 0:w.user,r.store.userInfo)?(R(),Re(r.ArboButton,{key:2,class:"update-name-button",label:"Update professional name",type:"tertiary",style:{padding:"4px 0px !important"},onClick:r.redirectAccountSetting})):(R(),Re(r.ArboLabel,{key:3,class:"name-label",label:"Copied"})),r.showCopyIconName.isShow&&((T=(S=r.store.basicInfo)==null?void 0:S.user)!=null&&T.professional_name)&&!r.showCopiedName?(R(),Y("div",sGe,[he(r.ArboTooltip,{content:"Copy",delay:[300,0],"hide-on-click":!0},{default:ze(()=>[he(r.ArboButton,{type:"tertiary","suffix-icon":"Copy",label:"",onClick:r.copyName})]),_:1})])):pe("v-if",!0)],32)])])]))]),X("div",lGe,[r.store.isLoadingProfile?(R(),Re(r.ArboSkeletonLoading,{key:0,size:200,width:200,height:21,radius:4,duration:1})):(R(),Y("div",uGe,[X("div",cGe,[he(r.ArboIcon,{name:"Email"})]),X("div",dGe,[X("div",fGe,[X("div",{class:"email-hover-area",onMouseover:e[3]||(e[3]=F=>r.showCopyIcon.isShow=!0),onMouseleave:e[4]||(e[4]=F=>r.showCopyIcon.isShow=!1)},[(E=(_=r.store.basicInfo)==null?void 0:_.user)!=null&&E.email&&((O=(D=r.store.basicInfo)==null?void 0:D.user)==null?void 0:O.email.length)>25&&!r.showCopiedEmail?(R(),Re(r.ArboTooltip,{key:0,content:(P=(V=r.store.basicInfo)==null?void 0:V.user)==null?void 0:P.email,delay:[1e3,0],"hide-on-click":!0},{default:ze(()=>{var F,W;return[he(r.ArboLabel,{label:r.truncateLabel((W=(F=r.store.basicInfo)==null?void 0:F.user)==null?void 0:W.email,25),class:"email-label"},null,8,["label"])]}),_:1},8,["content"])):r.showCopiedEmail?(R(),Re(r.ArboLabel,{key:2,class:"email-label",label:"Copied"})):(R(),Re(r.ArboLabel,{key:1,label:((C=(M=r.store.basicInfo)==null?void 0:M.user)==null?void 0:C.email)||"",class:"email-label"},null,8,["label"])),r.showCopyIcon.isShow&&!r.showCopiedEmail?(R(),Y("div",hGe,[he(r.ArboTooltip,{content:"Copy",delay:[300,0],"hide-on-click":!0},{default:ze(()=>[he(r.ArboButton,{type:"tertiary","suffix-icon":"Copy",label:"",onClick:r.copyEmail})]),_:1})])):pe("v-if",!0)],32)])])]))])])])}const mGe=Nn(XKe,[["render",pGe],["__scopeId","data-v-e2811187"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/sections/mainHeader/components/ProfileInfoDetailFirstSection.vue"]]),gGe=Qe({__name:"LinkProfileCopied",setup(t,{expose:e}){e();const n=re(!1),r=re(!1);function i(h){h.type==="mouseleave"&&setTimeout(()=>{n.value=!1},300)}const a=Z(()=>n.value===!0?"Copied":"Copy link"),{getEnvVariable:o}=Al(),s=fr(),{selectedDataId:l}=Pn(s);function c(){const h=Qi({type:"people_insight",config:{baseDomain:o("BASE_URL"),ws_code:yn(),user_id:String(l.value)||""}});o("BASE_URL")&&navigator.clipboard.writeText(h.url).then(()=>{n.value=!0}).catch(p=>{console.error("Failed to copy: ",p),r.value=!1})}const f={isCopied:n,isCopiedError:r,tooltipEventMouseLeave:i,tooltipContent:a,getEnvVariable:o,globalStore:s,peopleId:l,copyProfileLink:c,get ArboButton(){return Nt},get ArboTooltip(){return dr}};return Object.defineProperty(f,"__isScriptSetup",{enumerable:!1,value:!0}),f}}),vGe={class:"link-profile-button"};function yGe(t,e,n,r,i,a){return R(),Y("div",vGe,[X("div",{class:"link-profile-button__main",onMouseleave:r.tooltipEventMouseLeave},[he(r.ArboTooltip,{class:"link-profile-button__main--content",content:r.tooltipContent,delay:[300,0],"hide-on-click":!1},{default:ze(()=>[he(r.ArboButton,{type:"secondary","suffix-icon":"Link",label:"",onClick:Rt(r.copyProfileLink,["prevent"])})]),_:1},8,["content"])],32)])}const bGe=Nn(gGe,[["render",yGe],["__scopeId","data-v-85be9f0a"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/sections/mainHeader/components/LinkProfileCopied.vue"]]),_Ge=Qe({__name:"ProfileInfoDetailSecondSection",setup(t,{expose:e}){e();const n=fr(),{isLoadingProfile:r}=Pn(n),i=re("");function a(f,h,p,g="png"){return new Promise(y=>{const v=new Image,b=document.createElement("canvas");b.width=h,b.height=p;const w=b.getContext("2d");w&&(v.onload=()=>{w.drawImage(v,0,0,h,p);const S=b.toDataURL(`image/${g}`);y(S)},v.src=`data:image/svg+xml;base64,${btoa(f)}`)})}const{getEnvVariable:o}=Al();async function s(){const f=o("ASSET_URL")?o("ASSET_URL"):"https://arbodev.s3.ap-south-1.amazonaws.com";if(f){const h=`${f}/icon/general/default-avatar.svg`;try{const p=await fetch(h);if(!p.ok)throw new Error("Failed to load SVG file");const g=await p.text(),y=await a(g,100,100);i.value=y}catch(p){console.error("Error:",p)}}}const l=Z(()=>{const f=n.basicInfo;return f&&f.private_info&&f.private_info.common_team&&f.private_info.common_team.team?f.private_info.common_team.team.map(h=>{const p=h.avatar===null||h.avatar===void 0?i.value:h.avatar;return{...h,avatar:p}}):[]});zt(()=>{s()});const c={store:n,isLoadingProfile:r,defaultAvatar:i,convertSvgToImage:a,getEnvVariable:o,loadAndConvertSVG:s,basicInfoTeam:l,get TessAvatarGroup(){return mC},get ArboSkeletonLoading(){return D_},LinkProfileCopied:bGe};return Object.defineProperty(c,"__isScriptSetup",{enumerable:!1,value:!0}),c}}),wGe={class:"info-detail-content"},xGe={class:"info-detail-content__main"},SGe={class:"info-detail-content__content"},AGe={class:"info-detail-content__content--link-copy"},kGe={class:"info-detail-content__content--list-team-group"};function EGe(t,e,n,r,i,a){return R(),Y("div",wGe,[X("div",xGe,[X("div",SGe,[X("div",AGe,[r.isLoadingProfile?(R(),Re(r.ArboSkeletonLoading,{key:0,size:83,width:83,height:32,radius:4,duration:1})):(R(),Re(r.LinkProfileCopied,{key:1}))]),X("div",kGe,[r.isLoadingProfile?(R(),Re(r.ArboSkeletonLoading,{key:0,size:88,width:88,height:22,radius:4,duration:1})):(R(),Re(r.TessAvatarGroup,{key:1,"empty-text":"No team",data:r.basicInfoTeam,"label-key":"name","disable-hover":!0,"image-key":"avatar","tooltip-key":"name"},null,8,["data"]))])])])])}const TGe=Nn(_Ge,[["render",EGe],["__scopeId","data-v-9eec8ecc"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/sections/mainHeader/components/ProfileInfoDetailSecondSection.vue"]]),DGe=Qe({__name:"ProfileInfo",setup(t,{expose:e}){e();const n={FirstSectionInfo:mGe,SecondSectionInfo:TGe};return Object.defineProperty(n,"__isScriptSetup",{enumerable:!1,value:!0}),n}}),OGe={class:"profile-content"},CGe={class:"profile-content__main"},IGe={class:"profile-content__main--first-section"},MGe={class:"profile-content__main--second-section"};function RGe(t,e,n,r,i,a){return R(),Y("div",OGe,[X("div",CGe,[X("div",IGe,[he(r.FirstSectionInfo)]),X("div",MGe,[he(r.SecondSectionInfo)])])])}const $Ge=Nn(DGe,[["render",RGe],["__scopeId","data-v-e4f533f7"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/sections/mainHeader/components/ProfileInfo.vue"]]),PGe=Qe({__name:"SharedHeader",emits:["loaded"],setup(t,{expose:e,emit:n}){e();const r=fr();let i=1;const a=Ht({isLoading:!1,profileInfo:void 0,permissionList:[]}),{getEnvVariable:o}=Al(),s=async()=>{try{a.isLoading=!0,Dd.setSessionCookie("ws.user-access-id",r.selectedDataId);const p=await xn.getUserBasicInfo(r.selectedDataId);r.setSelectedDataProfile(p),i_.remove("account.last_access_url_people_tile",{domain:o("BASE_DOMAIN_COOKIE")})}catch(p){a.isLoading=!1,console.error("fetchBasicInfo",p)}finally{a.isLoading=!1}},l=async()=>{try{const p=await xn.getUserPermission();r.setPermission(p)}catch(p){console.error("fetchUserPermission",p)}},c=async()=>{try{const p=await xn.getUserProfile();r.setUserInfo(p)}catch(p){console.error("fetchUserProfile",p)}},f=n;zt(async()=>{await c(),l(),setTimeout(()=>{f("loaded")},3e3)}),Ge(()=>r.selectedDataId,p=>{p&&setTimeout(()=>{p&&s()},300)},{immediate:!0,deep:!0}),Ge(()=>r.basicInfo,p=>{p&&(a.profileInfo=p,i++)},{deep:!0}),Ge(()=>a.isLoading,p=>{r.setIsLoadingProfile(p)},{deep:!0});const h={store:r,get componentKey(){return i},set componentKey(p){i=p},state:a,getEnvVariable:o,fetchBasicInfo:s,fetchUserPermission:l,fetchUserProfile:c,emits:f,get ArboSkeletonLoading(){return D_},ProfileAvatar:QKe,ProfileInfo:$Ge};return Object.defineProperty(h,"__isScriptSetup",{enumerable:!1,value:!0}),h}}),LGe={class:"header-content"},NGe={class:"header-content__main"},FGe={class:"header-content__profile-image"},VGe={class:"header-content__profile-image--content"},BGe={class:"header-content__profile-info"},UGe={class:"header-content__profile-info--content"};function WGe(t,e,n,r,i,a){var o,s,l,c,f,h;return R(),Y("div",LGe,[X("div",NGe,[X("div",FGe,[X("div",VGe,[r.state.isLoading?(R(),Re(r.ArboSkeletonLoading,{key:0,size:108,width:108,height:108,radius:4,duration:1})):(R(),Re(r.ProfileAvatar,{key:r.componentKey,"profile-image":(o=r.state.profileInfo)==null?void 0:o.profile_image,"text-color":(l=(s=r.state.profileInfo)==null?void 0:s.color)==null?void 0:l.textColor,"bg-color":(f=(c=r.state.profileInfo)==null?void 0:c.color)==null?void 0:f.bgColor,"initial-name":(h=r.store.basicInfo)==null?void 0:h.initial},null,8,["profile-image","text-color","bg-color","initial-name"]))])]),X("div",BGe,[X("div",UGe,[he(r.ProfileInfo)])])])])}const zGe=Nn(PGe,[["render",WGe],["__scopeId","data-v-b176f8be"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/sections/mainHeader/SharedHeader.vue"]]),jGe=Qe({__name:"MenuTab",setup(t,{expose:e}){e();const n=fr(),{currentTab:r}=Pn(n),i=Fae();Ks(()=>{var l;if(Al().getEnvVariable("IS_DETACH"))return;const s=(l=i==null?void 0:i.query)==null?void 0:l.tab;s&&a.value.findIndex(c=>c.id==s)&&(r.value=s)});const a=Z(()=>[{id:"people-home",name:"",content:"",tooltipName:"Summary",icon:"House"},{id:"people-scenes",name:"",content:"",tooltipName:"Assigned scenes",icon:"PhotoVideo"},{id:"people-charts",name:"",content:"",tooltipName:"Charts",icon:"ChartPie"},{id:"people-comments",name:"",content:"",tooltipName:"Assigned Comments",icon:"Comments"},{id:"report-tab",name:"",content:"",tooltipName:"Reports",icon:"File"}]),o={store:n,currentTab:r,route:i,tabsListType:a,get ArboTabs(){return hC}};return Object.defineProperty(o,"__isScriptSetup",{enumerable:!1,value:!0}),o}});function HGe(t,e,n,r,i,a){return R(),Re(r.ArboTabs,{tabs:r.tabsListType,position:"left",value:r.currentTab,onInput:e[0]||(e[0]=o=>r.currentTab=o)},null,8,["tabs","value"])}const YGe=Nn(jGe,[["render",HGe],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/sections/MenuTab.vue"]]),qGe=Qe({__name:"SectionLayout",props:{layout:{type:Object,required:!1}},setup(t,{expose:e}){e();const n=pu(),a={slots:n,hasSlots:o=>n[o]!==void 0,props:t};return Object.defineProperty(a,"__isScriptSetup",{enumerable:!1,value:!0}),a}});function KGe(t,e,n,r,i,a){var o;return R(),Y("div",{class:Fe(["layout-section",{"no-footer":!r.hasSlots("footer")}]),style:_t({"--layout":r.props.layout?`${r.props.layout.header}px ${r.props.layout.content}px ${r.props.layout.footer}px`:void 0})},[It(X("div",{class:"header",style:_t({height:(o=n.layout)!=null&&o.footer?n.layout.header+"px":void 0})},[ke(t.$slots,"header",{},()=>[e[0]||(e[0]=Cn(" header ",-1))],!0)],4),[[Ln,r.hasSlots("header")]]),ke(t.$slots,"content",{},()=>{var s,l;return[It(X("div",{class:"body",style:_t({height:(s=n.layout)!=null&&s.footer?n.layout.body+"px":void 0})},[ke(t.$slots,"body",{},()=>[e[1]||(e[1]=Cn("body",-1))],!0)],4),[[Ln,r.hasSlots("body")]]),It(X("div",{class:"footer",style:_t({height:(l=n.layout)!=null&&l.footer?n.layout.footer+"px":void 0})},[ke(t.$slots,"footer",{},()=>[e[2]||(e[2]=Cn(" footer ",-1))],!0)],4),[[Ln,r.hasSlots("footer")]])]},!0)],6)}const Mce=Nn(qGe,[["render",KGe],["__scopeId","data-v-73dfa5d2"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/layouts/SectionLayout.vue"]]);function o5(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function GGe(t){if(Array.isArray(t))return o5(t)}function Fq(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(c){return void n(c)}s.done?e(l):Promise.resolve(l).then(r,i)}function ZGe(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var a=t.apply(e,n);function o(l){Fq(a,r,i,o,s,"next",l)}function s(l){Fq(a,r,i,o,s,"throw",l)}o(void 0)})}}function QGe(t,e,n){return(e=rZe(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function XGe(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function JGe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
208
+ Yt.version="2.30.1";MHe(Ri);Yt.fn=Pt;Yt.min=_Ye;Yt.max=wYe;Yt.now=xYe;Yt.utc=Rd;Yt.unix=Z7e;Yt.months=X7e;Yt.isDate=ZA;Yt.locale=Np;Yt.invalid=YC;Yt.duration=Cc;Yt.isMoment=kc;Yt.weekdays=eqe;Yt.parseZone=Q7e;Yt.localeData=Dh;Yt.isDuration=jT;Yt.monthsShort=J7e;Yt.weekdaysMin=nqe;Yt.defineLocale=TW;Yt.updateLocale=Q9e;Yt.locales=X9e;Yt.weekdaysShort=tqe;Yt.normalizeUnits=gu;Yt.relativeTimeRounding=Oqe;Yt.relativeTimeThreshold=Cqe;Yt.calendarFormat=qYe;Yt.prototype=Pt;Yt.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};const tm=T_("scene",()=>{const t=re({}),e=s=>{s.forEach(l=>{HC.set(t.value,l.id,l)})},n=re(void 0),r=re(0),i=(s,l)=>{const c=t.value;t.value={...c,[s]:{...t.value[s],...l}},o.value=!0},a=s=>t.value[s],o=re(!1);return{sceneDataMap:t,totalSceneCount:n,privateSceneCount:r,setSceneDataMap:e,updateSceneDataValue:i,getSceneDataValue:a,needRefresh:o}}),Ice=t=>{const{showErrorSnackbar:e,showSuccessSnackbar:n}=jA(),r=(C,F)=>(console.error("handleErrorHeader",C),C.code=="ERR_NETWORK"||navigator.onLine==!1?e({label:"Network error."}):e({label:(F==null?void 0:F.label)??"Update failed."}),{success:!1,data:void 0}),i=C=>{let F=C||"Update failed";navigator.onLine||(F="Network error"),e({label:F})},a=(C,F,W)=>{let H={success:!1,data:C};const j=C;return!j||j!=null&&j.error||j.error==403?(W&&i(),H={success:!1,data:C}):j&&j.error!=403&&(t&&t(F),H={success:!0,data:j}),H.success==!1&&W&&i(),H},o=C=>{const F=Dd.getCookie("account.last_prefered_timezone")||"Asia/Singapore";if(!C||!Yt(C).isValid())return null;new Date(C).setMilliseconds(0);const H=Q6(C,F);return String(H)||null},s=async(C,F)=>{try{const W=await xn.updateScene(C,{name:F});return _.value=!0,a(W,C,!0)}catch(W){return console.error("updateScene Name",W),r(W,{label:"Update failed."})}},l=async C=>{try{const F=await xn.updateScene(C,{status:0}),W=a(F,C);return W.success||i("Archive failed."),W}catch(F){return console.error("archiveScene",F),r(F,{label:"Update failed."})}},c=async C=>{try{const F=await xn.deleteScene(C),W=a(F,C);return W.success?n({label:"Deletion successful!"}):e({label:"Deletion failed."}),W}catch(F){return console.error("deleteScene",F),{success:!1,data:F}}},f=async C=>{try{const F=await xn.updateScene(C,{status:1}),W=a(F,C);return W.success||i("Unarchive failed."),W}catch(F){return console.error("unArchiveScene",F),r(F,{label:"Update failed."})}},h=async C=>{try{const F=await xn.updateScene(C,{clear_thumbnail:"1"}),W=a(F,C);return W.success?n({label:"Deletion successful"}):i("Deletion failed."),W}catch(F){return console.error("deleteThumbnail",F,!0),r(F,{label:"Deletion failed."})}},p=async(C,F)=>{var j,N;const W=o((j=F==null?void 0:F.start)==null?void 0:j.dateString),H=o((N=F==null?void 0:F.end)==null?void 0:N.dateString);try{const U=await xn.updateScene(C,{start_date:W,due_date:H});return a(U,C,!0)}catch(U){return console.error("updateDate",U),r(U,{label:"Update failed."})}},g=async C=>{try{const F=await xn.updateScene(C,{due_date:null});return a(F,C,!0)}catch(F){return console.error("clearDueDate",F),r(F,{label:"Update failed."})}},y=async C=>{try{const F=await xn.updateScene(C,{start_date:null});return a(F,C,!0)}catch(F){return console.error("updateDueDate",F),r(F,{label:"Update failed."})}},v=async(C,F)=>{try{const W=await xn.updateScene(C,{template_flow_status_id:F});return a(W,C)}catch(W){return console.error("updateSceneStatus",W),r(W,{label:"Update failed."})}},b=async(C,F)=>{try{const W=await xn.updateAssigneesUsers(C,F);return a(W,C,!0)}catch(W){return console.error("updateSceneAssignees",W),r(W,{label:"Update failed."})}},w=fr(),{basicInfo:S}=Pn(w),T=tm(),{needRefresh:_}=Pn(T);return{handleUpdateSceneName:s,handleArchiveScene:l,handleDeleteScene:c,handleUnArchiveScene:f,handleDeleteThumbnail:h,handleUpdateDate:p,handleClearDueDate:g,handleClearStarDate:y,handleUpdateSceneStatus:v,handleUpdateSceneAssignees:b,handleGetAssignableUsers:async(C,F)=>{try{const W=await xn.getAssignableUsers(C,{page:F.page,per_page:10,display_name_like:F.keyword});return{success:!0,data:{data:W.data.map(j=>({id:j.id,user_id:j.user_id,name:j.display_name,initial:j.initial,bgColor:j.color.bgColor,textColor:j.color.textColor,profile_image:j.profile_image,is_me:j.user_id==S.value.user_id})),meta:W.meta}}}catch(W){return console.error("getAssignableUsers",W),{success:!1,data:W}}},handleGetAssignableStatus:async(C,F)=>{try{const W=await xn.getAssignableStatus(C,F);return{success:!0,data:{data:W.data.filter(N=>N.can_update==1).map(N=>({id:N.id,name:N.name,color:N.color})),meta:W.meta}}}catch(W){return console.error("getAssignableStatus",W),{success:!1,data:W}}},handleGetSceneDetail:async C=>{try{const F={include_entity_path:1,include:"point_metric,ws_creator,template_flow_status,item_user_roles.ws_user_role,assignees"},W=await xn.getSceneDetail(C,F);return a(W,C)}catch(F){return console.error("getSceneDetail",F),{success:!1,data:F}}},handleAssignUser:async(C,F)=>{try{const W=await xn.assignUser(C,F);return a(W,C,!0)}catch(W){return console.error("getSceneDetail",W),r(W,{label:"Update failed."})}},handleReassignUser:async(C,F)=>{try{const W=await xn.updateAssigneesUsers(C,F);return a(W,C,!0)}catch(W){return console.error("getSceneDetail",W),r(W,{label:"Update failed."})}},handleUnassignUser:async(C,F)=>{try{const W=await xn.unAssignUser(C,F);return _.value=!0,a(W,C,!0)}catch(W){return console.error("getSceneDetail",W),r(W,{label:"Update failed."})}}}},Mqe=Qe({__name:"GridItem",props:{sceneId:{type:String,required:!0}},emits:["updateScene","loaded"],setup(t,{expose:e,emit:n}){e();const r=t,i=tm(),{sceneDataMap:a,needRefresh:o}=Pn(i),s=re(0),l=Z(()=>a.value[r.sceneId]),c=re(!1);zt(()=>{S("loaded")}),pee(()=>{S("loaded")});const f=hc("switchInstance"),h=()=>{f("scene_hub",{id:r.sceneId,tab:"home"},{showLoading:!1})},p=Dd.getCookie("account.last_prefered_timezone"),g=re(null);Ge(()=>r.sceneId,()=>{c.value=!1},{immediate:!0}),Ge(g,()=>{c.value=!0});const y=Z(()=>{let ge=yn();return ge||""}),v=fr(),{permissionMap:b}=Pn(v),w=Z(()=>{const ge=l.value.permission;return{canUpdateName:ge==null?void 0:ge.has_edit_permission,canUpdateThumbnail:ge==null?void 0:ge.has_edit_permission,canArchive:ge==null?void 0:ge.has_archive_permission,canDelete:ge==null?void 0:ge.has_delete_permission,canUpdateAssignees:ge==null?void 0:ge.has_update_assignee_permission,canUpdateStatus:l.value.has_stage>0?ge==null?void 0:ge.has_edit_permission:0,canUpdateDate:ge==null?void 0:ge.has_edit_date_permission,canOpenReview:b.value.redirectPermission.review,canOpenWoohoo:b.value.redirectPermission.woohoo,canOpenProject:b.value.redirectPermission.project,canOpenUpdate:b.value.redirectPermission.update}}),S=n,T=ge=>{o.value=!0,ge&&S("updateScene",ge)},{handleUpdateSceneName:_,handleGetAssignableUsers:E,handleArchiveScene:D,handleDeleteScene:O,handleUnArchiveScene:V,handleDeleteThumbnail:P,handleUpdateDate:M,handleClearDueDate:C,handleClearStarDate:F,handleUpdateSceneStatus:W,handleUpdateSceneAssignees:H,handleGetAssignableStatus:j,handleAssignUser:N,handleReassignUser:U,handleUnassignUser:ee}=Ice(T),{basicInfo:le}=Pn(v),_e=Z(()=>Number(l.value.property.is_archived)),be=Z(()=>Number(l.value.property.is_locked)),Te=Z(()=>{try{const ge=l.value,Ue=ge.assignees.map(Ye=>({id:Ye.id,user_id:Ye.user_id,name:Ye.display_name,initial:Ye.initial,bgColor:Ye==null?void 0:Ye.color.bgColor,textColor:Ye==null?void 0:Ye.color.textColor,profile_image:Ye.profile_image,is_me:Ye.user_id==le.value.user_id}));return{...ge,status:ge.template_flow_status,assignees:Ue,is_archived:_e.value,is_locked:be.value,bulk_process:ge.bulk_process}}catch(ge){return console.error(ge),l.value}});Ge(()=>Te.value,()=>s.value++,{deep:!0});const J=async ge=>{const Ue=r.sceneId;return await M(Ue,ge)},{getEnvVariable:me}=Al(),Ee=Z(()=>{const ge=l.value,Ue=Dd.getCookie("account.last_prefered_timezone")||"Asia/Singapore",ce={ws_code:y.value,scene_id:ge.id,entity_id:ge.entity_id,baseUrl:me("BASE_URL")||"https://app.dev.arbocollab.com",reviewUrl:me("BASE_REVIEW_URL")||"https://review.dev.arbocollab.com"},Ye={thumbnailKey:"thumbnail",breadcrumbKey:"entity_path",titleKey:"name",startDateKey:"start_date",dueDateKey:"due_date",isStartedKey:"is_started",isCompletedKey:"is_completed",archivedKey:"is_archived",lockedKey:"is_locked",assigneesKey:"assignees",statusKey:"status",bulkUpdateKey:"bulk_process"},te=ge.id;return{notifyError:(...ae)=>{console.error(...ae)},updateFuncs:{updateDate:async ae=>await J(ae),updateName:async ae=>await _(te,ae),updateStatus:async ae=>await W(te,ae.id),getAssignees:async ae=>await E(te,ae),getStatus:async ae=>await j(te,ae),clearDueDate:async()=>await C(te),clearStartDate:async()=>await F(te),updateAssignees:async ae=>await H(te,ae),archiveScene:async()=>await D(te),deleteScene:async()=>await O(te),unarchiveScene:async()=>await V(te),deleteThumbnail:async()=>await P(te),assignUser:async ae=>await N(te,ae),unassignUser:async ae=>await ee(te,ae),reassignUser:async ae=>await U(te,ae)},active:!1,keys:Ye,readonly:!1,disabled:!1,timezone:Ue,sceneConfiguration:ce,data:{...Te.value},permissions:w.value}});Ge([l,_e,be],()=>{s.value=s.value+1});const Ce=re(!1),de=Uae(g);Ge(de,HC.debounce(()=>{Ce.value=!de.value},300));const G={props:r,sceneStore:i,sceneDataMap:a,needRefresh:o,renderKey:s,sceneDataMapComputed:l,ready:c,switchInstance:f,handleOpenSceneHub:h,timezones:p,cardRef:g,wsCode:y,store:v,permissionMap:b,mappingPermission:w,emits:S,callbackUpdateScene:T,handleUpdateSceneName:_,handleGetAssignableUsers:E,handleArchiveScene:D,handleDeleteScene:O,handleUnArchiveScene:V,handleDeleteThumbnail:P,handleUpdateDate:M,handleClearDueDate:C,handleClearStarDate:F,handleUpdateSceneStatus:W,handleUpdateSceneAssignees:H,handleGetAssignableStatus:j,handleAssignUser:N,handleReassignUser:U,handleUnassignUser:ee,basicInfo:le,isArchived:_e,isLocked:be,sceneDataComputed:Te,_handleUpdateDate:J,getEnvVariable:me,tessCardProps:Ee,showLoading:Ce,targetIsVisible:de,get TessSceneCard(){return xae},GirdItemSkeleton:Vue};return Object.defineProperty(G,"__isScriptSetup",{enumerable:!1,value:!0}),G}}),Rqe=["id"];function $qe(t,e,n,r,i,a){return R(),Y("div",{id:r.props.sceneId,class:"grid-item-wrapper"},[It(he(r.GirdItemSkeleton,{class:"pi-skeleton"},null,512),[[Ln,r.showLoading]]),(R(),Re(r.TessSceneCard,Ft({key:r.renderKey,ref:"cardRef"},{...r.tessCardProps},{timezone:r.timezones,style:{opacity:r.showLoading?0:1},onOnOpenSceneHub:r.handleOpenSceneHub}),null,16,["timezone","style"]))],8,Rqe)}const Pqe=Nn(Mqe,[["render",$qe],["__scopeId","data-v-0da73336"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/shared/GridItem.vue"]]),Lqe=1,Nqe=t=>{const{handleGetSceneDetail:e}=Ice(void 0),n=async(b,w)=>{try{const S=await e(b);S.success&&S.data&&(l.value[w]=S.data,f.updateSceneDataValue(b,S.data))}catch(S){console.error(S)}},r=Z(()=>Dd.getCookie("account.last_prefered_timezone")||"Asia/Singapore"),i={perPage:10,itemsPerRow:1,totalItems:0,totalPages:1,currentPage:1,loading:!1},a=Ht(i);async function o(){l.value=[],Object.entries(i).forEach(([b,w])=>{a[b]=w}),await s(Lqe)}const s=async(b=1)=>{var D,O;if(a.loading)return;a.loading=!0,a.currentPage=b;const w={...t.value.filterParameter,page:b},S=await t.value.getDataFunction(w),{meta:T,data:_,private_item_count:E}=S;return y(T),g(_),(O=(D=t.value).callbackGetData)==null||O.call(D,T),p.value=E||0,_},l=re([]),c=async()=>{a.isLoadScene=!0,await o(),a.loadedPage=!1},f=tm(),{totalSceneCount:h,privateSceneCount:p}=Pn(f),g=b=>{f.setSceneDataMap(b),b&&(b==null?void 0:b.length)===0?l.value=[]:l.value=[...l.value,...b]},y=b=>{a.totalItems=b.total,a.totalPages=b.last_page,a.currentPage=b.current_page,h.value=b.total,a.loadedPage=!0,a.loading=!1};return{states:a,listData:l,callbackUpdatingMeta:y,callbackUpdateData:g,resetList:c,initList:o,handleUpdateScene:n,loadNextPage:async()=>{a.currentPage<a.totalPages&&await s(a.currentPage+1)},fetchMoreData:s,preferredTimezone:r}},Fqe=Qe({__name:"SceneList",props:{getDataFunction:{type:Function,required:!0},filterParameter:{type:Object,required:!0},callbackUpdateMeta:{type:Function,required:!1},callbackGetData:{type:Function,required:!1},ready:{type:Boolean,required:!0},height:{type:Number,required:!1}},emits:["loaded","metaUpdate","update","needUpdate"],setup(t,{expose:e,emit:n}){const r=n,i=t,a=pu(),o=E=>!!a[E],s=re({}),l=Z(()=>({getDataFunction:i.getDataFunction,filterParameter:i.filterParameter,callbackUpdateMeta:E=>{r("metaUpdate",E),r("loaded")},callbackGetData:E=>{r("loaded",E)}})),{states:c,listData:f,handleUpdateScene:h,loadNextPage:p,resetList:g,initList:y}=Nqe(l),v=(E,D)=>{h(E,D),r("update")};zt(()=>{y()});const b=re(Math.random());Ge(()=>i.filterParameter,async(E,D)=>{i.ready&&JSON.stringify(E)!==JSON.stringify(D)&&await g()},{deep:!0}),e({resetList:g});const w=async()=>{const E=await i.getDataFunction(i.filterParameter,ny);return{signature:E==null?void 0:E.meta["X-Tsr-signature"]}},S=re(""),{needUpdate:T}=ay("",w,S);Ge(T,E=>{E&&r("needUpdate")},{immediate:!0});const _={emits:r,props:i,slots:a,hasSlot:o,mapRender:s,useSceneListProps:l,states:c,listData:f,handleUpdateScene:h,loadNextPage:p,resetList:g,initList:y,_handleUpdateSceneData:v,renderKey:b,getUpdateSignature:w,iniSignature:S,needUpdate:T,get RecycleScroller(){return bC},InfoVisual:Oc,GridItemSkeleton:Vue,GridItem:Pqe};return Object.defineProperty(_,"__isScriptSetup",{enumerable:!1,value:!0}),_}}),Vqe={key:0,class:"empty-list"},Bqe={class:"scene-item"},Uqe={style:{display:"flex","flex-direction":"column",gap:"8px"}};function Wqe(t,e,n,r,i,a){return r.props.ready?(R(),Y("div",{key:r.renderKey,class:Fe(["scene-list-component",{"no-footer":!r.hasSlot("footer"),empty:!r.states.loading&&r.listData.length===0}]),style:_t({"--list-height":`${r.props.height}px`})},[!r.states.loading&&r.listData.length===0?(R(),Y("div",Vqe,[ke(t.$slots,"empty",{listData:r.listData,loadedPage:r.states.loadedPage},()=>[!r.listData.length&&r.states.loadedPage?(R(),Re(r.InfoVisual,{key:0,"visual-name":"NoData2",label:"No results. Try another search.",height:180})):pe("v-if",!0)],!0)])):pe("v-if",!0),he(r.RecycleScroller,{class:"scroller",items:r.listData,"item-size":116,"key-field":"id",style:_t({height:r.props.height+"px"}),buffer:500,onScrollEnd:r.loadNextPage},ji({default:ze(({item:o,index:s})=>[X("div",Bqe,[he(r.GridItem,{id:o.id,"scene-id":o.id,"item-data":o,onLoaded:l=>r.mapRender[o.id]=!0,onUpdateScene:l=>r._handleUpdateSceneData(l,s)},null,8,["id","scene-id","item-data","onLoaded","onUpdateScene"])])]),_:2},[r.states.loading?{name:"after",fn:ze(()=>[X("div",Uqe,[(R(),Y(wt,null,Qt(5,o=>he(r.GridItemSkeleton,{key:o})),64))])]),key:"0"}:void 0]),1032,["items","style","onScrollEnd"])],6)):pe("v-if",!0)}const LW=Nn(Fqe,[["render",Wqe],["__scopeId","data-v-fd835b02"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/shared/SceneList.vue"]]),Lq=400,zqe=Qe({__name:"SectionRecentAccess",setup(t,{expose:e}){const n=VC(),r=async T=>{var D;const _=await n.getRecentActivities("recent_activities.accessed_scenes",{...T,per_page:10}),E=_.recent_activities.accessed_scenes;return!T.after_id&&!T.before_id&&(w.value=(D=_.recent_activities.accessed_scenes)==null?void 0:D.meta["X-Tsr-signature"]),E.data=E.data.map(O=>({...O.item})),E},i={},a=re(null),o=()=>{var T;(T=a.value)==null||T.resetList()};e({resetList:o});const s=re(null),{height:l}=hh(s),c=re(!1),f=fr(),{basicInfo:h}=Pn(f);Ge(h,()=>{h.value.id&&(c.value=!0)},{deep:!0,immediate:!0});const p=Z(()=>l.value||Lq),g=ks(),{refreshState:y}=Pn(g),v=()=>{y.value.scene=!0},b=async()=>{var _,E;const T=await n.getRecentActivities("recent_activities.accessed_scenes",ny);return{signature:(E=(_=T==null?void 0:T.recent_activities)==null?void 0:_.accessed_scenes)==null?void 0:E.meta["X-Tsr-signature"]}},w=re("");ay("scene",b,w);const S={peopleCard:n,getRecentAccessScenes:r,filterParameter:i,listRef:a,resetList:o,INITIAL_HEIGHT:Lq,recentlyAccessSceneRef:s,height:l,ready:c,store:f,basicInfo:h,listHeight:p,dashboardStore:g,refreshState:y,handleUpdateScene:v,getUpdateSignature:b,iniSignature:w,InfoVisual:Oc,SceneList:LW};return Object.defineProperty(S,"__isScriptSetup",{enumerable:!1,value:!0}),S}}),jqe={ref:"recentlyAccessSceneRef",class:"recently-access-scene"};function Hqe(t,e,n,r,i,a){return R(),Y("div",jqe,[he(r.SceneList,{ref:"listRef","get-data-function":r.getRecentAccessScenes,"filter-parameter":r.filterParameter,ready:r.ready,class:"no-footer",height:r.listHeight,onUpdate:r.handleUpdateScene},{empty:ze(()=>[he(r.InfoVisual,{"visual-name":"NoData",label:"No activity available.",height:150,width:400})]),_:1},8,["ready","height"])],512)}const Nq=Nn(zqe,[["render",Hqe],["__scopeId","data-v-630eed87"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/SectionRecentAccess.vue"]]),Yqe=({comment_id:t,scene_id:e,callbackUpdate:n,commentData:r,userId:i})=>{const{showErrorSnackbar:a,showSuccessSnackbar:o}=jA(),s=e,l=t,c=async()=>[],f=(D,O)=>(console.error("Error in comment API > useCommentTile:",D),navigator.onLine===!1||D.code=="ERR_NETWORK"?a({label:"Network error."}):a({label:(O==null?void 0:O.label)??"Update failed."}),{success:!1,data:void 0}),h=async D=>{const O={success:!1,data:void 0};try{const V=await xn.assignUserApi(s,l,D);if(V)O.success=!0,O.data=V.data;else throw new Error("reassignUser failed")}catch(V){return f(V)}finally{n()}return O},p=async D=>{let O={success:!1,data:void 0};try{const{page:V,keyword:P}=D,M=await xn.getCommentAssignableUser(s,l,V,P);if(M)O={success:!0,data:{data:M.data.map(C=>({id:C.id,name:C.display_name,profile_image:C.profile_image,shortLabel:C.initial,bgColor:C.color.bgColor,textColor:C.color.textColor})),meta:M.meta}};else throw new Error("Error")}catch(V){return console.error("getAssignableUser",V),O={success:!1,data:void 0},O}return O},g=async D=>{const O={success:!1,data:void 0};try{const V=await xn.assignUserApi(s,l,D[0]);V&&(O.success=!0,O.data=V.data)}catch(V){return f(V)}finally{n()}return O},y=async()=>{const D={success:!1,data:void 0};try{const O=await xn.assignUserApi(s,l,null);O&&(D.success=!0,D.data=O.data)}catch(O){return f(O)}return D},v=async()=>{const D={success:!1,data:void 0};try{const O=await xn.resolveCommentApi(s,l);O&&(D.success=!0,D.data=O.data)}catch(O){return f(O)}finally{n()}return D},b=async()=>{const D={success:!1,data:void 0};try{const O=await xn.deleteCommentApi(s,l);if(O)D.success=!0,D.data=O.data,o({label:"Deletion successful."});else throw new Error("Error")}catch(O){f(O,{label:"Deletion failed."})}return D},w=async()=>{const D={success:!1,data:void 0};try{const O=await xn.unResolveCommentApi(s,l);O&&(D.success=!0,D.data=O.data)}catch(O){return f(O)}finally{n()}return D},S=async D=>{const O={success:!1,data:void 0};try{const{id:V,type:P,reactionType:M}=D;if(P!=="add"||!M)throw new Error("reactionType is required");const C=await xn.reactToComment({scene_id:s,comment_id:V,reaction:M});C&&(O.success=!0,O.data=C.data)}catch(V){return f(V)}finally{n()}return O},T=async D=>{const O=_(),V={success:!1,data:void 0};try{const{id:P,type:M,reactionType:C}=D;if(M!=="replace"||!C||!O)throw new Error("reactionType is required");const F=await xn.updateReactToComment({scene_id:s,comment_id:P,reaction:C,reaction_id:O});F&&(V.success=!0,V.data=F.data)}catch(P){return f(P)}finally{n()}return V},_=()=>{var D,O;return(O=(D=r.emoji_users)==null?void 0:D.find(V=>V.user_id===i))==null?void 0:O.emoji_id};return{reactToComment:S,updateReactComment:T,getMentionableUser:c,deleteReactComment:async()=>{const D=_(),O={success:!1,data:void 0};try{if(!D)throw new Error("emojiId is required");const V=await xn.deleteReactToComment(D);V&&(O.success=!0,O.data=V.data)}catch(V){return f(V)}finally{n()}return O},getAssignableUser:p,assignUser:g,resolveComment:v,deleteComment:b,unResolveComment:w,unassignUser:y,reassignUser:h}},qqe=Qe({__name:"CommentItem",props:{item:{type:Object,required:!0},commentId:{type:String,required:!0},width:{type:Number,required:!1,default:400},renderKey:{type:Number,required:!0}},emits:["commentDeleted","updateComment"],setup(t,{expose:e,emit:n}){e();const r=t,i=fr();uC();const{userInfo:a}=Pn(i),{getEnvVariable:o}=Al(),s=W=>{var j;return{items:((j=W==null?void 0:W.entity_path)==null?void 0:j.map(N=>{const U=Qi({type:N.is_parent_item?"scene_hub":"project",config:{baseDomain:o("BASE_URL"),ws_code:yn(),entity_id:N.id,scene_id:N.is_parent_item?N.id:void 0}}).url;return{name:N.name,url:U,disabled:!0,id:N.id,isHighlight:N.is_parent_item=!0}}))||[],lastItemWidth:200,canCopy:!1,url:""}},l=async({path:W})=>{if(W.length===0)return{message:"",url:""};const H=await xn.downloadFileFromS3({scene_id:yn(),path:W});return H?{url:H.url,message:H.message}:{url:"",message:""}},c=async()=>{const W=r.item.id,H=await xn.getCommentDetail({comment_id:W,scene_id:r.item.item_id});D("updateComment",H)},f=Yqe({comment_id:r.item.id,scene_id:r.item.item_id,callbackUpdate:c,commentData:r.item,userId:a.value.id}),{assignUser:h,getAssignableUser:p,resolveComment:g,deleteComment:y,unResolveComment:v,reactToComment:b,updateReactComment:w,deleteReactComment:S,unassignUser:T,getMentionableUser:_,reassignUser:E}=f,D=n,O=Z(()=>{const W=r.item;return{disabled:!1,readonly:!1,isReplying:!1,selected:!1,searchText:void 0,isResolvedList:!0,currentUser:{id:a.value.id,name:a.value.display_name},commentConfig:{renditionId:W.item_rendition_id||void 0,sceneId:W==null?void 0:W.item_id,entityId:W==null?void 0:W.item_id,wsCode:yn(),commentId:W.id},componentConfig:{isReviewComment:!!W.item_rendition_id,isMyComment:W.ws_creator.user_id==a.value.id,onSceneHub:!1},commentPermission:{canEdit:!1,canDelete:!0,canAssign:!0,canOpenSceneHub:!0,canResolve:!0,canOpenReview:!0},apiFunctions:{assignUser:h,unassignUser:T,reassignUser:E,addReaction:async H=>await b(H),removeReaction:S,replaceReaction:H=>{var N,U;const j=((U=(N=r.item.emoji_users)==null?void 0:N.find(ee=>ee.user_id==a.value.id))==null?void 0:U.emoji_id)||"";return w({...H,emojiId:j})},resolveComment:g,unResolveComment:v,deleteComment:async()=>{const H=await y();return H?(D("commentDeleted",r.item.id),H):{success:!1,data:void 0}},updateComment:()=>new Promise((H,j)=>{setTimeout(()=>{j({success:!1,data:{message:"Error"}})},1500)}),uploadFunction:void 0,getResourceURL:l,getAssignableUser:p,getMentionableUser:_},commentData:{...W}}}),V=hc("switchInstance"),P=Z(()=>{var H,j,N,U,ee,le,_e;const W=((H=r.item)==null?void 0:H.entity_path)||[];return{project:(j=W[0])==null?void 0:j.id,process:(N=W[1])==null?void 0:N.id,episode:(U=W[2])==null?void 0:U.id,take:(ee=W[3])==null?void 0:ee.id,scene:((le=W[4])==null?void 0:le.id)||r.item.item_id,rendition:((_e=W[5])==null?void 0:_e.id)||r.item.item_rendition_id,comment:r.item.id}}),M=(W,H)=>{const{scene:j,rendition:N,comment:U}=P.value;if(r.item.item_rendition_id){const ee=Qi({type:"review_rendition_comment",config:{reviewDomain:o("BASE_REVIEW_URL"),ws_code:yn(),scene_id:j,comment_id:U,rendition_id:N||""}});window.open(ee.url,"_blank")}else{const ee=Qi({type:"hub_comment",config:{baseDomain:o("BASE_URL"),ws_code:yn(),scene_id:j,comment_id:U}});H.ctrlKey||H.metaKey?window.open(ee.url,"_blank"):V?V("scene_hub",{sceneId:j,commentId:U},{showLoading:!1}):window.location.href=ee.url}},F={props:r,store:i,userInfo:a,getEnvVariable:o,createBreadCrumbProp:s,fetchResourceUrl:l,updateCommentTile:c,sceneTileComposable:f,assignUser:h,getAssignableUser:p,resolveComment:g,deleteComment:y,unResolveComment:v,reactToComment:b,updateReactComment:w,deleteReactComment:S,unassignUser:T,getMentionableUser:_,reassignUser:E,emits:D,commentTileProps:O,switchInstance:V,commentEntityConfig:P,handleOnReply:M,handleRedirectToComment:(W,H)=>{M(W,H)},get TessCommentTileCore(){return Tae},get TessBreadcrumb(){return vC}};return Object.defineProperty(F,"__isScriptSetup",{enumerable:!1,value:!0}),F}}),Kqe={class:"breadcrumb"};function Gqe(t,e,n,r,i,a){return R(),Re(r.TessCommentTileCore,Ft(r.commentTileProps,{class:"comment-tile-item",style:{"--comment-tile-width":"100%"},onOnReply:r.handleOnReply,onRedirectToComment:r.handleRedirectToComment}),{breadcrumb:ze(()=>[X("div",Kqe,[he(r.TessBreadcrumb,Ft({...r.createBreadCrumbProp(n.item)},{"can-copy":!1,"number-of-visible-items":3}),null,16)])]),_:1},16)}const Zqe=Nn(qqe,[["render",Gqe],["__scopeId","data-v-a67ebcfc"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/CommentItem.vue"]]),Qqe=Qe({__name:"CommentSkeleton",setup(t,{expose:e}){e();const r={getRandomWidth:()=>Math.floor(Math.random()*71)+30};return Object.defineProperty(r,"__isScriptSetup",{enumerable:!1,value:!0}),r}}),Xqe={class:"skeleton-comment"},Jqe={class:"comment-body"},eKe={class:"body"},tKe={class:"skeleton-details"};function nKe(t,e,n,r,i,a){return R(),Y("div",Xqe,[e[2]||(e[2]=X("div",{class:"skeleton-row bg-white",style:{height:"24px",display:"flex","justify-content":"flex-start","align-items":"center",padding:"8px"}},[X("div",{class:"skeleton-line w-50 animation-skeleton small dark"})],-1)),X("div",Jqe,[e[0]||(e[0]=Vv('<div class="skeleton-row" data-v-b9ff2b95><div class="header w-50" data-v-b9ff2b95><div class="skeleton-avatar animation-skeleton dark" data-v-b9ff2b95></div><div class="skeleton-details" data-v-b9ff2b95><div class="skeleton-line animation-skeleton dark" data-v-b9ff2b95></div><div class="skeleton-line animation-skeleton small dark" data-v-b9ff2b95></div></div></div><div class="button-group" data-v-b9ff2b95><div class="skeleton-button animation-skeleton dark sm" data-v-b9ff2b95></div><div class="skeleton-button animation-skeleton dark sm" data-v-b9ff2b95></div><div class="skeleton-button animation-skeleton dark sm" data-v-b9ff2b95></div></div></div>',1)),X("div",eKe,[X("div",tKe,[(R(!0),Y(wt,null,Qt(Math.floor(Math.random()*5)+1,o=>(R(),Y("div",{key:o,class:"skeleton-line animation-skeleton small dark",style:_t({width:`${r.getRandomWidth()}%`})},null,4))),128))])]),e[1]||(e[1]=Vv('<div class="footer" data-v-b9ff2b95><div class="skeleton-button animation-skeleton dark" data-v-b9ff2b95></div><div class="skeleton-button animation-skeleton dark" data-v-b9ff2b95></div></div><div class="footer" data-v-b9ff2b95><div class="button-group" data-v-b9ff2b95><div class="skeleton-button animation-skeleton dark" data-v-b9ff2b95></div><div class="skeleton-button animation-skeleton dark sm" data-v-b9ff2b95></div><div class="skeleton-button animation-skeleton dark sm" data-v-b9ff2b95></div><div class="skeleton-button animation-skeleton dark sm" data-v-b9ff2b95></div></div><div class="skeleton-button animation-skeleton dark" data-v-b9ff2b95></div></div>',2))])])}const rKe=Nn(Qqe,[["render",nKe],["__scopeId","data-v-b9ff2b95"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/CommentSkeleton.vue"]]),Jg=new TS("CommentFile");Jg.version(1).stores({files:"++id, files "});const iKe=()=>{const t=async a=>{await Jg.files.where("id").equals(a.id).first()?await Jg.files.update(a.id,a):await Jg.files.add(a)};return{setCommentFile:t,updateCommentFile:async(a,o)=>{try{await Jg.files.update(a,o)}catch(s){console.error("Error updating comment file",s)}},removeCommentFile:async a=>{try{await Jg.files.where("id").equals(a).delete()}catch(o){console.error("Error removing comment file",o)}},storeCommentFile:(a,o)=>{o.forEach(s=>{t({id:a.id+"_"+s.name,path:s.path,thumbnail:s.thumbnail,url:s.path,type:s.mimetype})})},getCommentFile:async a=>{try{const o=await Jg.files.where("id").equals(a).delete();return console.log("getComment File ",o),o}catch(o){console.error("Error removing comment file",o)}}}},aKe=T_("comment",()=>{const t=re({});return{commentMap:t,updateCommentData:(i,a)=>{t.value[i]={...t.value[i],...a}},setComments:i=>{const a={};i.forEach(o=>{a[o.id]=o}),t.value={...t.value,...a}},getCommentById:i=>t.value[i]}}),oKe=Qe({__name:"CommentList",props:{getData:{type:Function,required:!0},filterParameters:{type:Object,required:!1},loadMore:{type:Boolean,required:!1}},emits:["listDataChange","update","loaded"],setup(t,{expose:e,emit:n}){const r=t,i=re(!0),a=async()=>{var O;p.value=[],i.value=!0;const _=await r.getData({}),E=_.data;f(E,!0),i.value=!1;const D=(O=_.meta)==null?void 0:O.total;b("loaded",D)},o=aKe(),s=re(""),l=re(!0),c=re({}),f=(_,E)=>{if(_.length==0){l.value=!1;return}if(o.setComments(_),_.forEach(D=>{c.value[D.id]=(c.value[D.id]||0)+1,h(D,D.attachments),D.parent&&h(D.parent,D.parent.attachments)}),E){p.value=_,s.value=_[_.length-1].id;return}p.value=[...p.value,..._],s.value=p.value[p.value.length-1].id},{storeCommentFile:h}=iKe(),p=re([]),g=re(null);Wae(g,async()=>{var O;const _=s.value;if(i.value||!l.value)return;i.value=!0;const E=await r.getData({before_id:_}),D=E.data;f(D),i.value=!1,b("loaded",(O=E.meta)==null?void 0:O.total)},{canLoadMore:()=>!i.value&&r.loadMore&&l.value,distance:10});const y=re(!1),v=async()=>{var E;i.value=!0;const _=await r.getData({});f(_.data),y.value=!0,i.value=!1,b("loaded",(E=_==null?void 0:_.meta)==null?void 0:E.total)};zt(async()=>{await v()});const b=n,w=_=>{const E=p.value.findIndex(D=>D.id==_);p.value.splice(E,1),b("listDataChange"),b("update")},S=_=>{const E=p.value.findIndex(D=>D.id==_.id);p.value[E]={...p.value[E],..._},b("update")};e({resetList:a});const T={props:r,loading:i,resetList:a,commentStore:o,lastId:s,canLoadMore:l,renderKey:c,handleDataInsertion:f,storeCommentFile:h,list:p,commentListRef:g,ready:y,init:v,emits:b,deleteComment:w,handleUpdateCommentData:S,CommentItem:Zqe,InfoVisual:Oc,CommentSkeleton:rKe};return Object.defineProperty(T,"__isScriptSetup",{enumerable:!1,value:!0}),T}}),sKe={ref:"commentListRef",class:"recent-comment"},lKe={class:"empty-data"};function uKe(t,e,n,r,i,a){return R(),Y("div",sKe,[r.list.length==0&&!r.loading?ke(t.$slots,"empty",{key:0},()=>[X("div",lKe,[he(r.InfoVisual,{"visual-name":"NoData",label:"No activity available.",height:150})])],!0):pe("v-if",!0),e[0]||(e[0]=Cn()),r.list.length!==0?(R(!0),Y(wt,{key:1},Qt(r.list,o=>(R(),Re(r.CommentItem,{key:`comment_${o.id}_${r.renderKey[o.id]}`,"render-key":r.renderKey[o.id],"comment-id":o.id,item:o,onCommentDeleted:r.deleteComment,onUpdateComment:r.handleUpdateCommentData},null,8,["render-key","comment-id","item"]))),128)):pe("v-if",!0),e[1]||(e[1]=Cn()),r.loading?(R(),Y(wt,{key:2},Qt(3,o=>X("div",{key:o},[he(r.CommentSkeleton)])),64)):pe("v-if",!0)],512)}const rI=Nn(oKe,[["render",uKe],["__scopeId","data-v-bafec57c"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/CommentList.vue"]]),cKe=Qe({__name:"SectionRecentComment",setup(t,{expose:e}){const n=VC(),r=f=>({...f}),i=async f=>{var p,g,y,v,b;const h=await n.getRecentActivities("comments.latest",f);return!f.after_id&&!f.before_id&&(l.value=(g=(p=h==null?void 0:h.comments)==null?void 0:p.latest)==null?void 0:g.meta["X-Tsr-signature"]),{...(y=h==null?void 0:h.comments)==null?void 0:y.latest,data:((b=(v=h==null?void 0:h.comments)==null?void 0:v.latest)==null?void 0:b.data.map(r))||[]}},a=re(null),o=async()=>{var f;(f=a.value)==null||f.resetList()},s=async()=>{var h,p;const f=await n.getRecentActivities("comments.latest",ny);return{signature:(p=(h=f==null?void 0:f.comments)==null?void 0:h.latest)==null?void 0:p.meta["X-Tsr-signature"]}},l=re("");ay("comment_recent",s,l),e({resetList:o});const c={peopleCard:n,convertCommentData:r,getData:i,listRef:a,resetList:o,getUpdateSignature:s,iniSignature:l,CommentList:rI};return Object.defineProperty(c,"__isScriptSetup",{enumerable:!1,value:!0}),c}});function dKe(t,e,n,r,i,a){return R(),Re(r.CommentList,{ref:"listRef","get-data":r.getData,"load-more":!0},null,512)}const BN=Nn(cKe,[["render",dKe],["__scopeId","data-v-d2c94fc0"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/SectionRecentComment.vue"]]),fKe=Qe({__name:"SectionResolvedComment",setup(t,{expose:e}){const n=VC(),r=async p=>{var y,v,b,w,S;const g=await n.getRecentActivities("comments.recently_resolved",p);return!(p!=null&&p.before_id)&&!(p!=null&&p.after_id)&&(f.value=(v=(y=g==null?void 0:g.comments)==null?void 0:y.recently_resolved)==null?void 0:v.meta["X-Tsr-signature"]),{...(b=g==null?void 0:g.comments)==null?void 0:b.recently_resolved,data:((S=(w=g==null?void 0:g.comments)==null?void 0:w.recently_resolved)==null?void 0:S.data)||[]}},i=re(null),a=async()=>{var p;(p=i.value)==null||p.resetList()},o=ks(),{refreshState:s}=Pn(o),l=()=>{s.value.comment_resolved=!0};e({resetList:a});const c=async()=>{var g,y;const p=await n.getRecentActivities("comments.recently_resolved",ny);return{signature:(y=(g=p==null?void 0:p.comments)==null?void 0:g.recently_resolved)==null?void 0:y.meta["X-Tsr-signature"]}},f=re("");ay("comment_resolved",c,f);const h={peopleCard:n,getData:r,listRef:i,resetList:a,dashboardStore:o,refreshState:s,informListChange:l,getUpdateSignature:c,iniSignature:f,CommentList:rI};return Object.defineProperty(h,"__isScriptSetup",{enumerable:!1,value:!0}),h}});function hKe(t,e,n,r,i,a){return R(),Re(r.CommentList,{ref:"listRef","get-data":r.getData,"load-more":!0,onListDataChange:r.informListChange},null,512)}const pKe=Nn(fKe,[["render",hKe],["__scopeId","data-v-f0047820"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/SectionResolvedComment.vue"]]),mKe=Qe({__name:"DashboardTabSection",props:{tabs:{type:Array,required:!0}},setup(t,{expose:e}){e();const n={comment_recent:BN,comment_resolved:pKe,rendition:EHe,scene:Nq,people_comment:BN,chart:BN,assigned_scene:Nq},r=t,i=re(r.tabs[0].id);Ks(()=>{i.value=r.tabs[0].id});const a=S=>{i.value=S};Ge(i,(S,T)=>{y.value[S]=!1,y.value[T]=!1});const o=re({comment_recent:null,comment_resolved:null,rendition:null,scene:null,people_comment:null,chart:null,assigned_scene:null}),s=()=>{var T;const S=i.value;S&&y.value[S]!=null&&(y.value[S]=!1,(T=o.value[S])==null||T.resetList())},l=(S,T)=>{o.value[T]=S},c=Z(()=>r.tabs.map(S=>({...S,id:S.id}))),f=fr(),{basicInfo:h}=Pn(f),p=Z(()=>h.value.id);Ge(p,(S,T)=>{S&&S!==T&&Object.keys(o.value).forEach(_=>{var E;(E=o.value[_])==null||E.resetList()})});const g=ks(),{refreshState:y}=Pn(g),v=Z(()=>{const S=i.value;return y.value[S]}),b=Z(()=>{const S=v.value?"Refresh":"",T=v.value?"Change detected. Refresh now.":"Refresh";return{prefixIcon:"ArrowRotate",label:S,size:"small",type:"secondary",prefixTooltip:T,onClick:s}}),w={components:n,props:r,currentTab:i,changeTab:a,componentRef:o,handleRefreshPage:s,handleRefUpdate:l,computedTabs:c,store:f,basicInfo:h,userId:p,dashboardStore:g,refreshState:y,needRefresh:v,refreshBtnArgs:b,get ArboButton(){return Nt},get ArboTabs(){return hC}};return Object.defineProperty(w,"__isScriptSetup",{enumerable:!1,value:!0}),w}}),gKe={class:"tab-sections"},vKe={class:"tab"},yKe={class:"refresh-btn"};function bKe(t,e,n,r,i,a){return R(),Y("div",gKe,[X("div",vKe,[he(r.ArboTabs,{"key-value":"id",tabs:r.computedTabs,value:r.currentTab,class:"arbo-tabs",onInput:r.changeTab},ji({_:2},[Qt(r.computedTabs,o=>({name:`${o.id}`,fn:ze(()=>[o.id==r.currentTab?(R(),Re(wd(r.components[o.id]),{key:0,ref:s=>r.handleRefUpdate(s,o.id)},null,512)):pe("v-if",!0)])}))]),1032,["tabs","value"]),X("div",yKe,[he(r.ArboButton,Ft({...r.refreshBtnArgs},{onClick:r.handleRefreshPage}),null,16)])])])}const _Ke=Nn(mKe,[["render",bKe],["__scopeId","data-v-0ede6907"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/dashboard/DashboardTabSection.vue"]]),wKe=Qe({__name:"ResizeLayout",props:{minWidthRight:{type:Number,required:!1,default:730},minWidthLeft:{type:Number,required:!1,default:400},layoutName:{type:String,required:!0},mode:{type:String,required:!1,default:"horizontal"},breakPoint:{type:Number,required:!1,default:1024},minHeight:{type:Number,required:!1,default:500},requireHeight:{type:Number,required:!1,default:500},requireRightMargin:{type:Number,required:!1,default:0}},emits:["resized"],setup(t,{expose:e,emit:n}){var H;const r=re(null),i=re(null),a=re(null),o=re(null),s=re(!1),l=t,{height:c}=zae(),f=n,h=Z(()=>l.minWidthRight||730),p=Z(()=>l.minWidthLeft||400),g=Z(()=>y.value<Loe||c.value<700),{width:y}=hh(r),{width:v,height:b}=hh(i),w=Z(()=>v.value),S=Z(()=>b.value),{width:T}=hh(a),_=re(!1),E=re(((H=r.value)==null?void 0:H.offsetWidth)||0),D=()=>{const j=o.value,N=r.value,U=i.value,ee=a.value;!j||!U||!ee||!N||(j.classList.add("active"),_.value=!0,E.value=N.offsetWidth)},O=()=>{const j=o.value;!j||!_.value||(_.value=!1,j.classList.remove("active"),fn(()=>{var N,U;f("resized",[(N=i.value)==null?void 0:N.offsetWidth,(U=i.value)==null?void 0:U.offsetWidth]),M()}))},V=j=>{const N=o.value,U=r.value,ee=i.value,le=a.value;if(!(!N||!ee||!le||!U)&&_.value){const _e=U.getBoundingClientRect(),be=j.clientX,Te=_e.left,J=(be-Te)/_e.width;if((1-J)*_e.width<h.value||J*_e.width<p.value)return;const me=_e.width,Ee=J*me-5,Ce=(1-J)*me-5;ee.style.width=`${Ee}px`,le.style.width=`${Ce}px`}},P=()=>{const j=o.value,N=r.value,U=i.value,ee=a.value;!j||!U||!ee||!N||(j.addEventListener("mousedown",D),document.addEventListener("mousemove",V),document.addEventListener("mouseup",O))},M=()=>{const j=JSON.stringify({left:v.value,right:T.value});localStorage.setItem("layout_"+l.layoutName,j)},C=()=>{try{const j=localStorage.getItem("layout_"+l.layoutName);if(j){const{left:N,right:U}=JSON.parse(j);i.value&&a.value&&(i.value.style.width=`${N}px`,a.value.style.width=`${U}px`)}}catch(j){console.error("getSavedLayout",j,i.value,a.value)}},F=()=>{_.value&&O()};zt(()=>{P(),fn(()=>{var j,N,U,ee;C(),f("resized",[(j=i.value)==null?void 0:j.offsetWidth,(N=a.value)==null?void 0:N.offsetWidth]),f("resized",[(U=i.value)==null?void 0:U.offsetWidth,(ee=a.value)==null?void 0:ee.offsetWidth]),s.value=!0}),document.addEventListener("resize",F)}),Gs(()=>{const j=o.value,N=r.value,U=i.value,ee=a.value;!j||!U||!ee||!N||(j.removeEventListener("mousedown",D),document.removeEventListener("mousemove",V),document.removeEventListener("mouseup",O))}),e({leftPanelRef:i,rightPanelRef:a,leftPanelWidth:v,rightPanelWidth:T});const W={resizingPanelRef:r,leftPanelRef:i,rightPanelRef:a,resizeBar:o,ready:s,props:l,windowHeight:c,emits:f,minWidthRight:h,minWidthLeft:p,isColumnLayout:g,containerWidth:y,leftPanelWidth:v,leftPanelHeight:b,leftWidth:w,leftHeight:S,rightPanelWidth:T,isDragging:_,initialWidth:E,initResize:D,handleFinishResize:O,handleResize:V,init:P,saveCurrentLayout:M,getSavedLayout:C,handleWindowResize:F};return Object.defineProperty(W,"__isScriptSetup",{enumerable:!1,value:!0}),W}}),xKe=["id"],SKe={ref:"resizeBar",class:"resize-layout__resize-bar"};function AKe(t,e,n,r,i,a){return R(),Y("div",{id:`resize-layout-${r.props.layoutName}`,ref:"resizingPanelRef",class:Fe(["resize-layout",[r.props.mode,{"break-layout":r.isColumnLayout}]])},[X("div",{ref:"leftPanelRef",class:Fe(["resize-layout__content flex-1",{"disabled-pointer":r.isDragging}]),style:_t({"min-width":`${r.minWidthLeft}px`,minHeight:`${r.isColumnLayout?r.props.requireHeight:r.props.minHeight}px`})},[r.ready?ke(t.$slots,"left",{key:0,width:r.leftWidth,height:r.leftHeight,ready:r.ready,isColumnLayout:r.isColumnLayout},()=>[e[0]||(e[0]=X("div",{class:"loading-box animation-skeleton"},null,-1))],!0):pe("v-if",!0)],6),X("div",SKe,null,512),X("div",{ref:"rightPanelRef",class:Fe(["resize-layout__content",{"disabled-pointer":r.isDragging}]),style:_t({"min-width":`${r.minWidthRight}px`,minHeight:`${r.props.minHeight}px`,"margin-right":`${r.props.requireRightMargin}px`})},[r.ready?ke(t.$slots,"right",{key:0},()=>[e[1]||(e[1]=X("div",{class:"loading-box animation-skeleton"},null,-1))],!0):pe("v-if",!0)],6)],10,xKe)}const NW=Nn(wKe,[["render",AKe],["__scopeId","data-v-17f7c923"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/layouts/ResizeLayout.vue"]]),kKe=Qe({__name:"PreferencePopup",props:{width:{type:Number,required:!1,default:280},isActive:{type:Boolean,required:!1}},setup(t,{expose:e}){e();const n=t,r=()=>{a.value?o():i()},i=()=>{f(),a.value=!0},a=re(!1),o=()=>{a.value=!1},s=re(null),l=re(null),c=re(null);o4e(s,()=>{o()});const f=()=>{const p=l.value,g=c.value;if(!p||!g)return;const y=p.getBoundingClientRect();g.style.top=`${y.bottom}px`,g.style.left=`${y.left-n.width+y.width}px`,g.style.right=`${window.innerWidth-y.right}px`},h={props:n,togglePreferencePopup:r,openPreferencePopup:i,isOpen:a,closePreferencePopup:o,preferencePopupComponentRef:s,activatorButtonRef:l,preferencePopupRef:c,positioningPopup:f,get ArboButton(){return Nt}};return Object.defineProperty(h,"__isScriptSetup",{enumerable:!1,value:!0}),h}}),EKe={ref:"preferencePopupComponentRef",class:"preference-popup-component"};function TKe(t,e,n,r,i,a){return R(),Y("div",EKe,[X("div",{ref:"activatorButtonRef",class:Fe(["activator-button",{active:r.isOpen}])},[ke(t.$slots,"activator",{},()=>[he(r.ArboButton,{class:Fe({highlight:n.isActive}),"prefix-icon":"Gear","prefix-tooltip":"Preference",type:"secondary",label:"",size:"small",onClick:r.togglePreferencePopup},null,8,["class"])],!0)],2),It(X("div",{ref:"preferencePopupRef",class:"preference-popup",style:_t({width:r.props.width+"px"})},[ke(t.$slots,"content",{},void 0,!0)],4),[[Ln,r.isOpen]])],512)}const DKe=Nn(kKe,[["render",TKe],["__scopeId","data-v-6449bd28"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/shared/PreferencePopup.vue"]]),OKe=Qe({__name:"SkeletonLoading",props:{isLoading:{type:Boolean,required:!0},width:{type:Number,required:!0},height:{type:Number,required:!0}},setup(t,{expose:e}){e();const n=t,r=Z(()=>({"--card-width":`${n.width}px`,"--card-height":`${n.height}px`})),i={props:n,computedCardStyle:r};return Object.defineProperty(i,"__isScriptSetup",{enumerable:!1,value:!0}),i}});function CKe(t,e,n,r,i,a){return R(),Re(Md,{name:"fade",mode:"out-in"},{default:ze(()=>[n.isLoading?(R(),Y("div",{key:0,class:"card-skeleton animation-skeleton",style:_t(r.computedCardStyle)},null,4)):ke(t.$slots,"default",{key:1},void 0,!0)]),_:3})}const IKe=Nn(OKe,[["render",CKe],["__scopeId","data-v-3e5dcdc8"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/shared/SkeletonLoading.vue"]]),MKe=Qe({__name:"SectionTitle",props:{countBtn:{type:Object,required:!1,default:void 0},showRefreshLabel:{type:Boolean,required:!1,default:!1},showRefreshBtn:{type:Boolean,required:!0},title:{type:String,required:!1,default:""},loading:{type:Boolean,required:!1,default:!0},activeFilter:{type:Boolean,required:!1,default:!1}},emits:["refresh"],setup(t,{expose:e,emit:n}){e();const r=pu(),i=f=>!!r[f],a=t,o=re(0),s=n,c={slots:r,hasSlot:i,props:a,renderKey:o,emits:s,refresh:()=>{o.value+=1,s("refresh")},get ArboButton(){return Nt},get TessNonInteractiveChip(){return IS},get ArboTooltip(){return dr},PreferencePopup:DKe,SkeletonLoading:IKe};return Object.defineProperty(c,"__isScriptSetup",{enumerable:!1,value:!0}),c}}),RKe={class:"section-title"},$Ke={class:"title"},PKe={class:"actions"},LKe={class:"counting-chip"};function NKe(t,e,n,r,i,a){return R(),Y("div",RKe,[ke(t.$slots,"title",{},()=>[X("div",$Ke,it(n.title),1)],!0),X("div",PKe,[ke(t.$slots,"search",{},void 0,!0),e[0]||(e[0]=Cn()),ke(t.$slots,"refresh",{},()=>[n.showRefreshBtn?(R(),Re(r.ArboTooltip,{key:0,content:n.showRefreshLabel?"Change detected. Refresh now.":"Refresh",delay:[300,0]},{default:ze(()=>[n.showRefreshLabel?(R(),Re(r.ArboButton,{key:r.renderKey,type:"secondary",label:"Refresh","prefix-icon":"ArrowRotate",size:"small",onClick:r.refresh})):(R(),Re(r.ArboButton,{key:r.renderKey+1,type:"secondary",label:"","prefix-icon":"ArrowRotate",size:"small",onClick:r.refresh}))]),_:1},8,["content"])):pe("v-if",!0)],!0),e[1]||(e[1]=Cn()),ke(t.$slots,"count",{},()=>[n.countBtn?(R(),Re(r.ArboTooltip,{key:0,content:n.countBtn.countTooltip,delay:[1e3,0]},{default:ze(()=>[he(r.SkeletonLoading,{"is-loading":r.props.loading,width:50,height:24},{default:ze(()=>[X("div",LKe,[he(r.TessNonInteractiveChip,{label:String(n.countBtn.count||"0"),icon:n.countBtn.icon},null,8,["label","icon"])])]),_:1},8,["is-loading"])]),_:1},8,["content"])):pe("v-if",!0)],!0),e[2]||(e[2]=Cn()),ke(t.$slots,"preferences",{},()=>[r.hasSlot("preference-popup")||r.hasSlot("preference")?(R(),Re(r.PreferencePopup,{key:0,"is-active":n.activeFilter},{content:ze(()=>[ke(t.$slots,"preference-popup",{},void 0,!0)]),_:3},8,["is-active"])):pe("v-if",!0)],!0)])])}const iI=Nn(MKe,[["render",NKe],["__scopeId","data-v-1814b956"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/shared/SectionTitle.vue"]]),FKe=Qe({__name:"PeopleHome",setup(t,{expose:e}){e();const n={"assigned-tile":jze,"target-points-tile":tje,"unresolved-tile":ije,"overdue-tile":Zze,"total-completed-tile":qze},r=ks(),{getDashboardData:i}=r,{dashboardData:a}=Pn(r),o=Z(()=>{var V;return["assigned-tile",((V=a.value)==null?void 0:V.point_pool.can_view)?"target-points-tile":void 0,"overdue-tile","unresolved-tile","total-completed-tile"].filter(Boolean)}),s=re(!0),l=[{id:"comment_resolved",name:"Recently resolved",needRefresh:!0},{id:"comment_recent",name:"Recent comments",needRefresh:!0}],c=Z(()=>({"--card-width":`${T.value}px`,"--max-width":`${T.value}px`})),f=[{id:"rendition",name:"New renditions",needRefresh:!0},{id:"scene",name:"Recently accessed scenes",needRefresh:!0}],{height:h}=zae(),p=re(null),g=re(null),y=fr(),{basicInfo:v}=Pn(y),b=re(null),{width:w}=hh(b),S=Z(()=>w.value),T=Z(()=>{const D=w.value,O=Math.min(Math.floor(D/266),5),V=D-(O-1)*16;return Math.floor(V/Math.ceil(O))}),_=RS(async()=>{v.value.id&&(s.value=!0,await i(v.value.id),s.value=!1)},500);Ge(v,()=>{_()},{deep:!0,immediate:!0});const E={components:n,dashboardStore:r,getDashboardData:i,dashboardData:a,tiles:o,isLoading:s,sectionComment:l,computedCardStyle:c,sectionScene:f,windowHeight:h,peopleHomeRef:p,topRef:g,store:y,basicInfo:v,sectionRef:b,width:w,widthSection:S,cardWidth:T,handleRefreshPage:_,DashboardTabSection:_Ke,ResizeLayout:NW,SectionTitle:iI,get BREAKPOINT_RESIZE(){return Loe}};return Object.defineProperty(E,"__isScriptSetup",{enumerable:!1,value:!0}),E}}),VKe={ref:"peopleHomeRef",class:"people-home"},BKe={ref:"topRef",class:"top"},UKe={ref:"sectionRef",class:"section-card-wrapper"},WKe={class:"section-card"};function zKe(t,e,n,r,i,a){return R(),Y("div",VKe,[X("div",BKe,[he(r.SectionTitle,{title:"Summary","show-refresh-btn":!0,onRefresh:r.handleRefreshPage},null,8,["onRefresh"]),X("div",UKe,[X("div",WKe,[(R(!0),Y(wt,null,Qt(r.tiles,o=>(R(),Y("div",{key:o,class:"dashboard-item-wrapper"},[he(Md,{name:"fade",mode:"out-in"},{default:ze(()=>[r.isLoading?(R(),Y("div",{key:0,class:"card-skeleton animation-skeleton",style:_t(r.computedCardStyle)},null,4)):(R(),Re(wd(r.components[o]),{key:1,class:"dashboard-item",style:_t(r.computedCardStyle)},null,8,["style"]))]),_:2},1024)]))),128))])],512)],512),X("div",{class:Fe(["bottom",{"column-layout":r.widthSection<=r.BREAKPOINT_RESIZE||r.windowHeight<700}])},[he(r.ResizeLayout,{"min-width-left":440,"min-width-right":750,"layout-name":"people-home",class:"resize-layout"},{left:ze(()=>[he(r.DashboardTabSection,{tabs:r.sectionComment})]),right:ze(()=>[he(r.DashboardTabSection,{tabs:r.sectionScene})]),_:1,__:[0]})],2)],512)}const jKe=Nn(FKe,[["render",zKe],["__scopeId","data-v-ba194661"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/sections/PeopleHome.vue"]]),HKe=Qe({__name:"ProfileAvatar",props:{bgColor:{type:String,default:"#FFFFFF"},textColor:{type:String,default:"#FFFFFF"},initialName:{type:String,default:""},profileImage:{type:String,default:""}},setup(t,{expose:e}){e();const n=t,r=fr(),i=re(null),a=re(!1);async function o(){if(n.profileImage){a.value=!0;try{const p=await fetch(n.profileImage,{method:"GET"});p.ok?i.value=n.profileImage:(console.error("loadImageSrc: Invalid image URL",p.status),i.value="")}catch(p){console.error("loadImageSrc: Error fetching image:",p),i.value=""}finally{a.value=!1}}else i.value="",a.value=!1}const s=Z(()=>r.basicInfo.private_info),l=Z(()=>{var p,g,y;return((p=s.value)==null?void 0:p.is_offline)===!0?"Logged out from account":((g=s.value)==null?void 0:g.last_active)!==null?"Active in the workspace within the last 10 minutes":((y=s.value)==null?void 0:y.last_active)===null?"No activity in the workspace within the last 10 minutes":""}),c=Z(()=>{var p,g,y;return((p=s.value)==null?void 0:p.is_offline)===!0?"#A6A6A6":((g=s.value)==null?void 0:g.last_active)!==null?"#02C39A":((y=s.value)==null?void 0:y.last_active)===null?"#F7941D":""}),f=Z(()=>({backgroundColor:c.value}));zt(()=>{o()});const h={props:n,store:r,imageUrl:i,isLoadImage:a,loadImageSrc:o,userStatusInfo:s,statusTooltipContent:l,statusBackgroundColor:c,dynamicStyles:f,get TessAvatar(){return _h},get ArboTooltip(){return dr},get ArboSkeletonLoading(){return D_}};return Object.defineProperty(h,"__isScriptSetup",{enumerable:!1,value:!0}),h}}),YKe={class:"profile-image"},qKe={class:"profile-image__main--status-avatar"},KKe={class:"profile-image__main"},GKe={key:1};function ZKe(t,e,n,r,i,a){return R(),Y("div",YKe,[X("div",qKe,[he(r.ArboTooltip,{content:r.statusTooltipContent,delay:[300,0],"hide-on-click":!0,placement:"right"},{default:ze(()=>[X("div",{class:"profile-image__main--status-avatar-icon",style:_t(r.dynamicStyles)},null,4)]),_:1},8,["content"])]),X("div",KKe,[r.isLoadImage?(R(),Re(r.ArboSkeletonLoading,{key:0,size:108,width:108,height:108,radius:4,duration:2})):(R(),Y("div",GKe,[he(r.TessAvatar,{class:"profile-image__main--avatar",image:r.imageUrl,label:"","short-label":r.props.initialName,"is-use-short-label":!0,"bg-color":r.props.bgColor,"text-color":r.props.textColor,"disable-hover":!0},null,8,["image","short-label","bg-color","text-color"])]))])])}const QKe=Nn(HKe,[["render",ZKe],["__scopeId","data-v-6855256d"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/sections/mainHeader/components/ProfileAvatar.vue"]]),XKe=Qe({__name:"ProfileInfoDetailFirstSection",setup(t,{expose:e}){e();const n=Ht({filteredData:[],currentPage:1,perPage:10,pageMeta:{},selectedUser:"",searchText:"",isFetching:!1}),r=fr();let i=Ht({isShow:!1}),a=Ht({isShow:!1});const o=re(!1),s=re(!1),l=re(0),c=async(N,U,ee,le="",_e=!1)=>{try{if(n.isFetching)return;n.isFetching=!0;const be=await xn.getUserListProfile(N,U,ee,le),Te=be.data.map(J=>{var me,Ee;return{...J,bg_color:(me=J==null?void 0:J.color)==null?void 0:me.bgColor,text_color:(Ee=J==null?void 0:J.color)==null?void 0:Ee.textColor}});_e?n.filteredData=[...Te]:n.filteredData=[...n.filteredData,...Te],n.pageMeta=be==null?void 0:be.meta,n.currentPage++,n.isFetching=!1}catch(be){console.error("fetchUserProfile error:",be)}};function f(){c(n.currentPage,n.perPage,n.selectedUser,n.searchText)}const h=Z(()=>n.filteredData.length<n.pageMeta.total),p=fr(),{selectedDataId:g}=Pn(p),y=async()=>{n.searchText="",n.currentPage=1,n.filteredData=[],await c(n.currentPage,n.perPage,g.value||"")};function v(N){n.selectedUser=JSON.parse(JSON.stringify(N))}const b=Nae(),{getEnvVariable:w}=Al(),{currentTab:S}=Pn(p),T=w("IS_DETACH");Ge(()=>n.selectedUser,()=>{T||b.replace({name:"PeopleDetail",params:{people_id:n.selectedUser||d5e(),ws_code:yn()},query:{tab:S.value||"home"}})});const _=Z(()=>r.isLoadingFetchData),E=()=>{var U;const N=r.basicInfo;o.value=!0,navigator.clipboard.writeText((U=N==null?void 0:N.user)==null?void 0:U.email).then(()=>{setTimeout(()=>{o.value=!1,i.isShow=!1},1e3)}).catch(ee=>{console.error("Could not copy the email",ee)})},D=()=>{var U;const N=r.basicInfo;s.value=!0,navigator.clipboard.writeText((U=N==null?void 0:N.user)==null?void 0:U.professional_name).then(()=>{setTimeout(()=>{s.value=!1,a.isShow=!1},1e3)}).catch(ee=>{console.error("Could not copy the name",ee)})},O=Z(()=>{let N=yn();return N||""}),V=Z(()=>{var N,U,ee;return r.isLoadingProfile||!((N=r.basicInfo)!=null&&N.user)?"":((ee=(U=r.basicInfo)==null?void 0:U.user)==null?void 0:ee.professional_name)||"Professional name not provided"});function P(N,U){return(N==null?void 0:N.id)===(U==null?void 0:U.id)?U.professional_name===null:!1}function M(){w("BASE_URL")&&(window.parent.location.href=`${w("BASE_URL")}/${O.value}/ac/acc`)}function C(N,U){return N&&N.length>U?N.substring(0,U-3)+"...":N||""}const F=async N=>{n.searchText=N,n.currentPage=1,await c(n.currentPage,n.perPage,n.selectedUser,n.searchText,!0)},W=async()=>{await c(n.currentPage,n.perPage,g.value||""),l.value++};Ge(()=>g.value,N=>{n.selectedUser=N,W()},{immediate:!0,deep:!0}),zt(async()=>{W()}),Ge(n,N=>{!n.filteredData.length&&!N.selectedUser||fr().setSelectedDataId(N.selectedUser===""?n.filteredData[0].id:N.selectedUser)});const H=Z(()=>"Choose a team member to view their profile"),j={states:n,store:r,get showCopyIcon(){return i},set showCopyIcon(N){i=N},get showCopyIconName(){return a},set showCopyIconName(N){a=N},showCopiedEmail:o,showCopiedName:s,componentKey:l,fetchUserProfile:c,loadMoreData:f,enableLoadMore:h,globalStore:p,peopleId:g,resetSearch:y,updateValue:v,router:b,getEnvVariable:w,currentTab:S,isDetach:T,isDisableSelect:_,copyEmail:E,copyName:D,wsCode:O,getProfessionalName:V,checkUserProfile:P,redirectAccountSetting:M,truncateLabel:C,handleSearch:F,init:W,tooltipContent:H,get ArboLabel(){return ea},get ArboTooltip(){return dr},get TessAssigneeSelect(){return k6},get ArboSkeletonLoading(){return D_},get ArboButton(){return Nt},get ArboIcon(){return qn}};return Object.defineProperty(j,"__isScriptSetup",{enumerable:!1,value:!0}),j}}),JKe={class:"info-detail-content"},eGe={class:"info-detail-content__main"},tGe={class:"info-detail-content__main--user-select"},nGe={class:"info-detail-content__main--user-name"},rGe={key:1,class:"detail-row"},iGe={class:"icon-wrapper"},aGe={class:"content-wrapper"},oGe={class:"inline-content"},sGe={key:4,class:"inline-copy-button"},lGe={class:"info-detail-content__main--user-email"},uGe={key:1,class:"detail-row"},cGe={class:"icon-wrapper"},dGe={class:"content-wrapper"},fGe={class:"inline-content"},hGe={key:3,class:"inline-copy-button"};function pGe(t,e,n,r,i,a){var o,s,l,c,f,h,p,g,y,v,b,w,S,T,_,E,D,O,V,P,M,C;return R(),Y("div",JKe,[X("div",eGe,[X("div",tGe,[(R(),Re(r.TessAssigneeSelect,{key:r.componentKey,modelValue:r.states.selectedUser,"onUpdate:modelValue":e[0]||(e[0]=F=>r.states.selectedUser=F),"empty-text":"No results. Try another search.","prepend-height":0,options:r.states.filteredData,"is-dark":!0,disable:r.isDisableSelect,"select-limit":1,"disable-un-select-single-mode":!0,"is-enable-pagination":!1,"is-enable-load-more":r.enableLoadMore,"is-clearable":!1,label:"",placeholder:"Please select a user","value-key":"id","tooltip-display":r.tooltipContent,onSearch:r.handleSearch,onLoadMore:r.loadMoreData,onUpdateValue:r.updateValue,onShown:r.resetSearch},ji({"loading-animation":ze(({})=>[e[6]||(e[6]=X("div",{class:"box-loading absolute"},[X("div",{class:"animation-skeleton"}),X("div",{class:"animation-skeleton"})],-1))]),prepend_list:ze(({})=>[It(X("div",null,null,512),[[Ln,!1]])]),_:2},[r.states.isFetching?{name:"empty_text",fn:ze(({})=>[e[5]||(e[5]=X("div",{class:"box-loading"},[X("div",{class:"animation-skeleton"}),X("div",{class:"animation-skeleton"})],-1))]),key:"0"}:void 0]),1032,["modelValue","options","disable","is-enable-load-more","tooltip-display"]))]),X("div",nGe,[r.store.isLoadingProfile?(R(),Re(r.ArboSkeletonLoading,{key:0,size:200,width:200,height:21,radius:4,duration:1})):(R(),Y("div",rGe,[he(r.ArboTooltip,{content:((s=(o=r.store.basicInfo)==null?void 0:o.user)==null?void 0:s.professional_name)!==null?"Professional name":"",delay:[300,0],"hide-on-click":!0},{default:ze(()=>[X("div",iGe,[he(r.ArboIcon,{name:"AddressCard"})])]),_:1},8,["content"]),X("div",aGe,[X("div",oGe,[X("div",{class:"name-hover-area",onMouseover:e[1]||(e[1]=F=>r.showCopyIconName.isShow=!0),onMouseleave:e[2]||(e[2]=F=>r.showCopyIconName.isShow=!1)},[(c=(l=r.store.basicInfo)==null?void 0:l.user)!=null&&c.professional_name&&((h=(f=r.store.basicInfo)==null?void 0:f.user)==null?void 0:h.professional_name.length)>25&&!r.showCopiedName?(R(),Re(r.ArboTooltip,{key:0,content:(g=(p=r.store.basicInfo)==null?void 0:p.user)==null?void 0:g.professional_name,delay:[1e3,0],"hide-on-click":!0,style:{"padding-top":"4px"}},{default:ze(()=>{var F,W;return[he(r.ArboLabel,{label:r.truncateLabel((W=(F=r.store.basicInfo)==null?void 0:F.user)==null?void 0:W.professional_name,25),class:"name-label-truncate"},null,8,["label"])]}),_:1},8,["content"])):!r.showCopiedName&&!r.checkUserProfile((y=r.store.basicInfo)==null?void 0:y.user,r.store.userInfo)?(R(),Re(r.ArboLabel,{key:1,label:r.getProfessionalName,class:Fe(["name-label",{"name-label-not-provided":((b=(v=r.store.basicInfo)==null?void 0:v.user)==null?void 0:b.professional_name)===null}])},null,8,["label","class"])):!r.showCopiedName&&r.checkUserProfile((w=r.store.basicInfo)==null?void 0:w.user,r.store.userInfo)?(R(),Re(r.ArboButton,{key:2,class:"update-name-button",label:"Update professional name",type:"tertiary",style:{padding:"4px 0px !important"},onClick:r.redirectAccountSetting})):(R(),Re(r.ArboLabel,{key:3,class:"name-label",label:"Copied"})),r.showCopyIconName.isShow&&((T=(S=r.store.basicInfo)==null?void 0:S.user)!=null&&T.professional_name)&&!r.showCopiedName?(R(),Y("div",sGe,[he(r.ArboTooltip,{content:"Copy",delay:[300,0],"hide-on-click":!0},{default:ze(()=>[he(r.ArboButton,{type:"tertiary","suffix-icon":"Copy",label:"",onClick:r.copyName})]),_:1})])):pe("v-if",!0)],32)])])]))]),X("div",lGe,[r.store.isLoadingProfile?(R(),Re(r.ArboSkeletonLoading,{key:0,size:200,width:200,height:21,radius:4,duration:1})):(R(),Y("div",uGe,[X("div",cGe,[he(r.ArboIcon,{name:"Email"})]),X("div",dGe,[X("div",fGe,[X("div",{class:"email-hover-area",onMouseover:e[3]||(e[3]=F=>r.showCopyIcon.isShow=!0),onMouseleave:e[4]||(e[4]=F=>r.showCopyIcon.isShow=!1)},[(E=(_=r.store.basicInfo)==null?void 0:_.user)!=null&&E.email&&((O=(D=r.store.basicInfo)==null?void 0:D.user)==null?void 0:O.email.length)>25&&!r.showCopiedEmail?(R(),Re(r.ArboTooltip,{key:0,content:(P=(V=r.store.basicInfo)==null?void 0:V.user)==null?void 0:P.email,delay:[1e3,0],"hide-on-click":!0},{default:ze(()=>{var F,W;return[he(r.ArboLabel,{label:r.truncateLabel((W=(F=r.store.basicInfo)==null?void 0:F.user)==null?void 0:W.email,25),class:"email-label"},null,8,["label"])]}),_:1},8,["content"])):r.showCopiedEmail?(R(),Re(r.ArboLabel,{key:2,class:"email-label",label:"Copied"})):(R(),Re(r.ArboLabel,{key:1,label:((C=(M=r.store.basicInfo)==null?void 0:M.user)==null?void 0:C.email)||"",class:"email-label"},null,8,["label"])),r.showCopyIcon.isShow&&!r.showCopiedEmail?(R(),Y("div",hGe,[he(r.ArboTooltip,{content:"Copy",delay:[300,0],"hide-on-click":!0},{default:ze(()=>[he(r.ArboButton,{type:"tertiary","suffix-icon":"Copy",label:"",onClick:r.copyEmail})]),_:1})])):pe("v-if",!0)],32)])])]))])])])}const mGe=Nn(XKe,[["render",pGe],["__scopeId","data-v-e2811187"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/sections/mainHeader/components/ProfileInfoDetailFirstSection.vue"]]),gGe=Qe({__name:"LinkProfileCopied",setup(t,{expose:e}){e();const n=re(!1),r=re(!1);function i(h){h.type==="mouseleave"&&setTimeout(()=>{n.value=!1},300)}const a=Z(()=>n.value===!0?"Copied":"Copy link"),{getEnvVariable:o}=Al(),s=fr(),{selectedDataId:l}=Pn(s);function c(){const h=Qi({type:"people_insight",config:{baseDomain:o("BASE_URL"),ws_code:yn(),user_id:String(l.value)||""}});o("BASE_URL")&&navigator.clipboard.writeText(h.url).then(()=>{n.value=!0}).catch(p=>{console.error("Failed to copy: ",p),r.value=!1})}const f={isCopied:n,isCopiedError:r,tooltipEventMouseLeave:i,tooltipContent:a,getEnvVariable:o,globalStore:s,peopleId:l,copyProfileLink:c,get ArboButton(){return Nt},get ArboTooltip(){return dr}};return Object.defineProperty(f,"__isScriptSetup",{enumerable:!1,value:!0}),f}}),vGe={class:"link-profile-button"};function yGe(t,e,n,r,i,a){return R(),Y("div",vGe,[X("div",{class:"link-profile-button__main",onMouseleave:r.tooltipEventMouseLeave},[he(r.ArboTooltip,{class:"link-profile-button__main--content",content:r.tooltipContent,delay:[300,0],"hide-on-click":!1},{default:ze(()=>[he(r.ArboButton,{type:"secondary","suffix-icon":"Link",label:"",onClick:Rt(r.copyProfileLink,["prevent"])})]),_:1},8,["content"])],32)])}const bGe=Nn(gGe,[["render",yGe],["__scopeId","data-v-85be9f0a"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/sections/mainHeader/components/LinkProfileCopied.vue"]]),_Ge=Qe({__name:"ProfileInfoDetailSecondSection",setup(t,{expose:e}){e();const n=fr(),{isLoadingProfile:r}=Pn(n),i=re("");function a(f,h,p,g="png"){return new Promise(y=>{const v=new Image,b=document.createElement("canvas");b.width=h,b.height=p;const w=b.getContext("2d");w&&(v.onload=()=>{w.drawImage(v,0,0,h,p);const S=b.toDataURL(`image/${g}`);y(S)},v.src=`data:image/svg+xml;base64,${btoa(f)}`)})}const{getEnvVariable:o}=Al();async function s(){const f=o("ASSET_URL")?o("ASSET_URL"):"https://arbodev.s3.ap-south-1.amazonaws.com";if(f){const h=`${f}/icon/general/default-avatar.svg`;try{const p=await fetch(h);if(!p.ok)throw new Error("Failed to load SVG file");const g=await p.text(),y=await a(g,100,100);i.value=y}catch(p){console.error("Error:",p)}}}const l=Z(()=>{const f=n.basicInfo;return f&&f.private_info&&f.private_info.common_team&&f.private_info.common_team.team?f.private_info.common_team.team.map(h=>{const p=h.avatar===null||h.avatar===void 0?i.value:h.avatar;return{...h,avatar:p}}):[]});zt(()=>{s()});const c={store:n,isLoadingProfile:r,defaultAvatar:i,convertSvgToImage:a,getEnvVariable:o,loadAndConvertSVG:s,basicInfoTeam:l,get TessAvatarGroup(){return mC},get ArboSkeletonLoading(){return D_},LinkProfileCopied:bGe};return Object.defineProperty(c,"__isScriptSetup",{enumerable:!1,value:!0}),c}}),wGe={class:"info-detail-content"},xGe={class:"info-detail-content__main"},SGe={class:"info-detail-content__content"},AGe={class:"info-detail-content__content--link-copy"},kGe={class:"info-detail-content__content--list-team-group"};function EGe(t,e,n,r,i,a){return R(),Y("div",wGe,[X("div",xGe,[X("div",SGe,[X("div",AGe,[r.isLoadingProfile?(R(),Re(r.ArboSkeletonLoading,{key:0,size:83,width:83,height:32,radius:4,duration:1})):(R(),Re(r.LinkProfileCopied,{key:1}))]),X("div",kGe,[r.isLoadingProfile?(R(),Re(r.ArboSkeletonLoading,{key:0,size:88,width:88,height:22,radius:4,duration:1})):(R(),Re(r.TessAvatarGroup,{key:1,"empty-text":"No team",data:r.basicInfoTeam,"label-key":"name","disable-hover":!0,"image-key":"avatar","tooltip-key":"name"},null,8,["data"]))])])])])}const TGe=Nn(_Ge,[["render",EGe],["__scopeId","data-v-9eec8ecc"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/sections/mainHeader/components/ProfileInfoDetailSecondSection.vue"]]),DGe=Qe({__name:"ProfileInfo",setup(t,{expose:e}){e();const n={FirstSectionInfo:mGe,SecondSectionInfo:TGe};return Object.defineProperty(n,"__isScriptSetup",{enumerable:!1,value:!0}),n}}),OGe={class:"profile-content"},CGe={class:"profile-content__main"},IGe={class:"profile-content__main--first-section"},MGe={class:"profile-content__main--second-section"};function RGe(t,e,n,r,i,a){return R(),Y("div",OGe,[X("div",CGe,[X("div",IGe,[he(r.FirstSectionInfo)]),X("div",MGe,[he(r.SecondSectionInfo)])])])}const $Ge=Nn(DGe,[["render",RGe],["__scopeId","data-v-e4f533f7"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/sections/mainHeader/components/ProfileInfo.vue"]]),PGe=Qe({__name:"SharedHeader",emits:["loaded"],setup(t,{expose:e,emit:n}){e();const r=fr();let i=1;const a=Ht({isLoading:!1,profileInfo:void 0,permissionList:[]}),{getEnvVariable:o}=Al(),s=async()=>{try{a.isLoading=!0,Dd.setSessionCookie("ws.user-access-id",r.selectedDataId);const p=await xn.getUserBasicInfo(r.selectedDataId);r.setSelectedDataProfile(p),i_.remove("account.last_access_url_people_tile",{domain:o("BASE_DOMAIN_COOKIE")})}catch(p){a.isLoading=!1,console.error("fetchBasicInfo",p)}finally{a.isLoading=!1}},l=async()=>{try{const p=await xn.getUserPermission();r.setPermission(p)}catch(p){console.error("fetchUserPermission",p)}},c=async()=>{try{const p=await xn.getUserProfile();r.setUserInfo(p)}catch(p){console.error("fetchUserProfile",p)}},f=n;zt(async()=>{await c(),l(),setTimeout(()=>{f("loaded")},3e3)}),Ge(()=>r.selectedDataId,p=>{p&&setTimeout(()=>{p&&s()},300)},{immediate:!0,deep:!0}),Ge(()=>r.basicInfo,p=>{p&&(a.profileInfo=p,i++)},{deep:!0}),Ge(()=>a.isLoading,p=>{r.setIsLoadingProfile(p)},{deep:!0});const h={store:r,get componentKey(){return i},set componentKey(p){i=p},state:a,getEnvVariable:o,fetchBasicInfo:s,fetchUserPermission:l,fetchUserProfile:c,emits:f,get ArboSkeletonLoading(){return D_},ProfileAvatar:QKe,ProfileInfo:$Ge};return Object.defineProperty(h,"__isScriptSetup",{enumerable:!1,value:!0}),h}}),LGe={class:"header-content"},NGe={class:"header-content__main"},FGe={class:"header-content__profile-image"},VGe={class:"header-content__profile-image--content"},BGe={class:"header-content__profile-info"},UGe={class:"header-content__profile-info--content"};function WGe(t,e,n,r,i,a){var o,s,l,c,f,h;return R(),Y("div",LGe,[X("div",NGe,[X("div",FGe,[X("div",VGe,[r.state.isLoading?(R(),Re(r.ArboSkeletonLoading,{key:0,size:108,width:108,height:108,radius:4,duration:1})):(R(),Re(r.ProfileAvatar,{key:r.componentKey,"profile-image":(o=r.state.profileInfo)==null?void 0:o.profile_image,"text-color":(l=(s=r.state.profileInfo)==null?void 0:s.color)==null?void 0:l.textColor,"bg-color":(f=(c=r.state.profileInfo)==null?void 0:c.color)==null?void 0:f.bgColor,"initial-name":(h=r.store.basicInfo)==null?void 0:h.initial},null,8,["profile-image","text-color","bg-color","initial-name"]))])]),X("div",BGe,[X("div",UGe,[he(r.ProfileInfo)])])])])}const zGe=Nn(PGe,[["render",WGe],["__scopeId","data-v-b176f8be"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/sections/mainHeader/SharedHeader.vue"]]),jGe=Qe({__name:"MenuTab",setup(t,{expose:e}){e();const n=fr(),{currentTab:r}=Pn(n),i=Fae();Ks(()=>{var l;if(Al().getEnvVariable("IS_DETACH"))return;const s=(l=i==null?void 0:i.query)==null?void 0:l.tab;s&&a.value.findIndex(c=>c.id==s)&&(r.value=s)});const a=Z(()=>[{id:"people-home",name:"",content:"",tooltipName:"Summary",icon:"House"},{id:"people-scenes",name:"",content:"",tooltipName:"Assigned scenes",icon:"PhotoVideo"},{id:"people-charts",name:"",content:"",tooltipName:"Charts",icon:"ChartPie"},{id:"people-comments",name:"",content:"",tooltipName:"Assigned Comments",icon:"Comments"},{id:"report-tab",name:"",content:"",tooltipName:"Reports",icon:"File"}]),o={store:n,currentTab:r,route:i,tabsListType:a,get ArboTabs(){return hC}};return Object.defineProperty(o,"__isScriptSetup",{enumerable:!1,value:!0}),o}});function HGe(t,e,n,r,i,a){return R(),Re(r.ArboTabs,{tabs:r.tabsListType,position:"left",value:r.currentTab,onInput:e[0]||(e[0]=o=>r.currentTab=o)},null,8,["tabs","value"])}const YGe=Nn(jGe,[["render",HGe],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/sections/MenuTab.vue"]]),qGe=Qe({__name:"SectionLayout",props:{layout:{type:Object,required:!1}},setup(t,{expose:e}){e();const n=pu(),a={slots:n,hasSlots:o=>n[o]!==void 0,props:t};return Object.defineProperty(a,"__isScriptSetup",{enumerable:!1,value:!0}),a}});function KGe(t,e,n,r,i,a){var o;return R(),Y("div",{class:Fe(["layout-section",{"no-footer":!r.hasSlots("footer")}]),style:_t({"--layout":r.props.layout?`${r.props.layout.header}px ${r.props.layout.content}px ${r.props.layout.footer}px`:void 0})},[It(X("div",{class:"header",style:_t({height:(o=n.layout)!=null&&o.footer?n.layout.header+"px":void 0})},[ke(t.$slots,"header",{},()=>[e[0]||(e[0]=Cn(" header ",-1))],!0)],4),[[Ln,r.hasSlots("header")]]),ke(t.$slots,"content",{},()=>{var s,l;return[It(X("div",{class:"body",style:_t({height:(s=n.layout)!=null&&s.footer?n.layout.body+"px":void 0})},[ke(t.$slots,"body",{},()=>[e[1]||(e[1]=Cn("body",-1))],!0)],4),[[Ln,r.hasSlots("body")]]),It(X("div",{class:"footer",style:_t({height:(l=n.layout)!=null&&l.footer?n.layout.footer+"px":void 0})},[ke(t.$slots,"footer",{},()=>[e[2]||(e[2]=Cn(" footer ",-1))],!0)],4),[[Ln,r.hasSlots("footer")]])]},!0)],6)}const Mce=Nn(qGe,[["render",KGe],["__scopeId","data-v-73dfa5d2"],["__file","/home/mor-ubuntu/arbo/arbo-web-people/src/components/layouts/SectionLayout.vue"]]);function o5(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function GGe(t){if(Array.isArray(t))return o5(t)}function Fq(t,e,n,r,i,a,o){try{var s=t[a](o),l=s.value}catch(c){return void n(c)}s.done?e(l):Promise.resolve(l).then(r,i)}function ZGe(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var a=t.apply(e,n);function o(l){Fq(a,r,i,o,s,"next",l)}function s(l){Fq(a,r,i,o,s,"throw",l)}o(void 0)})}}function QGe(t,e,n){return(e=rZe(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function XGe(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function JGe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
209
209
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Vq(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function eZe(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Vq(Object(n),!0).forEach(function(r){QGe(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Vq(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function s5(){s5=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=typeof Symbol=="function"?Symbol:{},a=i.iterator||"@@iterator",o=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function l(M,C,F,W){return Object.defineProperty(M,C,{value:F,enumerable:!W,configurable:!W,writable:!W})}try{l({},"")}catch{l=function(C,F,W){return C[F]=W}}function c(M,C,F,W){var H=C&&C.prototype instanceof p?C:p,j=Object.create(H.prototype);return l(j,"_invoke",function(N,U,ee){var le=1;return function(_e,be){if(le===3)throw Error("Generator is already running");if(le===4){if(_e==="throw")throw be;return{value:t,done:!0}}for(ee.method=_e,ee.arg=be;;){var Te=ee.delegate;if(Te){var J=E(Te,ee);if(J){if(J===h)continue;return J}}if(ee.method==="next")ee.sent=ee._sent=ee.arg;else if(ee.method==="throw"){if(le===1)throw le=4,ee.arg;ee.dispatchException(ee.arg)}else ee.method==="return"&&ee.abrupt("return",ee.arg);le=3;var me=f(N,U,ee);if(me.type==="normal"){if(le=ee.done?4:2,me.arg===h)continue;return{value:me.arg,done:ee.done}}me.type==="throw"&&(le=4,ee.method="throw",ee.arg=me.arg)}}}(M,F,new V(W||[])),!0),j}function f(M,C,F){try{return{type:"normal",arg:M.call(C,F)}}catch(W){return{type:"throw",arg:W}}}e.wrap=c;var h={};function p(){}function g(){}function y(){}var v={};l(v,a,function(){return this});var b=Object.getPrototypeOf,w=b&&b(b(P([])));w&&w!==n&&r.call(w,a)&&(v=w);var S=y.prototype=p.prototype=Object.create(v);function T(M){["next","throw","return"].forEach(function(C){l(M,C,function(F){return this._invoke(C,F)})})}function _(M,C){function F(H,j,N,U){var ee=f(M[H],M,j);if(ee.type!=="throw"){var le=ee.arg,_e=le.value;return _e&&typeof _e=="object"&&r.call(_e,"__await")?C.resolve(_e.__await).then(function(be){F("next",be,N,U)},function(be){F("throw",be,N,U)}):C.resolve(_e).then(function(be){le.value=be,N(le)},function(be){return F("throw",be,N,U)})}U(ee.arg)}var W;l(this,"_invoke",function(H,j){function N(){return new C(function(U,ee){F(H,j,U,ee)})}return W=W?W.then(N,N):N()},!0)}function E(M,C){var F=C.method,W=M.i[F];if(W===t)return C.delegate=null,F==="throw"&&M.i.return&&(C.method="return",C.arg=t,E(M,C),C.method==="throw")||F!=="return"&&(C.method="throw",C.arg=new TypeError("The iterator does not provide a '"+F+"' method")),h;var H=f(W,M.i,C.arg);if(H.type==="throw")return C.method="throw",C.arg=H.arg,C.delegate=null,h;var j=H.arg;return j?j.done?(C[M.r]=j.value,C.next=M.n,C.method!=="return"&&(C.method="next",C.arg=t),C.delegate=null,h):j:(C.method="throw",C.arg=new TypeError("iterator result is not an object"),C.delegate=null,h)}function D(M){this.tryEntries.push(M)}function O(M){var C=M[4]||{};C.type="normal",C.arg=t,M[4]=C}function V(M){this.tryEntries=[[-1]],M.forEach(D,this),this.reset(!0)}function P(M){if(M!=null){var C=M[a];if(C)return C.call(M);if(typeof M.next=="function")return M;if(!isNaN(M.length)){var F=-1,W=function H(){for(;++F<M.length;)if(r.call(M,F))return H.value=M[F],H.done=!1,H;return H.value=t,H.done=!0,H};return W.next=W}}throw new TypeError(typeof M+" is not iterable")}return g.prototype=y,l(S,"constructor",y),l(y,"constructor",g),g.displayName=l(y,s,"GeneratorFunction"),e.isGeneratorFunction=function(M){var C=typeof M=="function"&&M.constructor;return!!C&&(C===g||(C.displayName||C.name)==="GeneratorFunction")},e.mark=function(M){return Object.setPrototypeOf?Object.setPrototypeOf(M,y):(M.__proto__=y,l(M,s,"GeneratorFunction")),M.prototype=Object.create(S),M},e.awrap=function(M){return{__await:M}},T(_.prototype),l(_.prototype,o,function(){return this}),e.AsyncIterator=_,e.async=function(M,C,F,W,H){H===void 0&&(H=Promise);var j=new _(c(M,C,F,W),H);return e.isGeneratorFunction(C)?j:j.next().then(function(N){return N.done?N.value:j.next()})},T(S),l(S,s,"Generator"),l(S,a,function(){return this}),l(S,"toString",function(){return"[object Generator]"}),e.keys=function(M){var C=Object(M),F=[];for(var W in C)F.unshift(W);return function H(){for(;F.length;)if((W=F.pop())in C)return H.value=W,H.done=!1,H;return H.done=!0,H}},e.values=P,V.prototype={constructor:V,reset:function(M){if(this.prev=this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(O),!M)for(var C in this)C.charAt(0)==="t"&&r.call(this,C)&&!isNaN(+C.slice(1))&&(this[C]=t)},stop:function(){this.done=!0;var M=this.tryEntries[0][4];if(M.type==="throw")throw M.arg;return this.rval},dispatchException:function(M){if(this.done)throw M;var C=this;function F(le){j.type="throw",j.arg=M,C.next=le}for(var W=C.tryEntries.length-1;W>=0;--W){var H=this.tryEntries[W],j=H[4],N=this.prev,U=H[1],ee=H[2];if(H[0]===-1)return F("end"),!1;if(!U&&!ee)throw Error("try statement without catch or finally");if(H[0]!=null&&H[0]<=N){if(N<U)return this.method="next",this.arg=t,F(U),!0;if(N<ee)return F(ee),!1}}},abrupt:function(M,C){for(var F=this.tryEntries.length-1;F>=0;--F){var W=this.tryEntries[F];if(W[0]>-1&&W[0]<=this.prev&&this.prev<W[2]){var H=W;break}}H&&(M==="break"||M==="continue")&&H[0]<=C&&C<=H[2]&&(H=null);var j=H?H[4]:{};return j.type=M,j.arg=C,H?(this.method="next",this.next=H[2],h):this.complete(j)},complete:function(M,C){if(M.type==="throw")throw M.arg;return M.type==="break"||M.type==="continue"?this.next=M.arg:M.type==="return"?(this.rval=this.arg=M.arg,this.method="return",this.next="end"):M.type==="normal"&&C&&(this.next=C),h},finish:function(M){for(var C=this.tryEntries.length-1;C>=0;--C){var F=this.tryEntries[C];if(F[2]===M)return this.complete(F[4],F[3]),O(F),h}},catch:function(M){for(var C=this.tryEntries.length-1;C>=0;--C){var F=this.tryEntries[C];if(F[0]===M){var W=F[4];if(W.type==="throw"){var H=W.arg;O(F)}return H}}throw Error("illegal catch attempt")},delegateYield:function(M,C,F){return this.delegate={i:P(M),r:C,n:F},this.method==="next"&&(this.arg=t),h}},e}function tZe(t){return GGe(t)||XGe(t)||iZe(t)||JGe()}function nZe(t,e){if(typeof t!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function rZe(t){var e=nZe(t,"string");return typeof e=="symbol"?e:e+""}function iZe(t,e){if(t){if(typeof t=="string")return o5(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o5(t,e):void 0}}/*!
210
210
  * @kurkle/color v0.3.4
211
211
  * https://github.com/kurkle/color#readme