1(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`6a1a1af1-8e46-4065-a48f-8d593f8bbdde`,e._sentryDebugIdIdentifier=`sentry-dbid-6a1a1af1-8e46-4065-a48f-8d593f8bbdde`)}catch{}})();import{a as e,i as t,n,r,t as i}from"./rolldown-runtime-BMeI84Mc.js";import{$ as a,A as o,B as s,C as c,D as l,E as u,F as d,G as f,H as p,I as m,J as h,K as g,L as _,M as v,N as y,O as b,P as x,Q as S,R as C,S as w,T,U as E,V as D,W as O,X as k,Y as A,Z as j,_ as M,a as ee,at as te,b as ne,c as re,ct as ie,d as ae,et as oe,f as se,g as N,h as ce,i as le,it as ue,j as de,k as fe,l as pe,m as me,n as he,nt as ge,o as _e,ot as ve,p as ye,q as be,r as xe,rt as Se,s as P,st as Ce,t as we,tt as Te,u as Ee,v as F,w as I,x as De,y as Oe,z as ke}from"./vendor-DqBgKBLk.js";import{a as Ae,c as je,d as Me,f as Ne,h as Pe,i as Fe,l as Ie,m as Le,n as Re,o as ze,p as Be,r as Ve,s as He,t as Ue,u as We}from"./chart-Cdd6VQcE.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var Ge=e=>!!e,Ke=function(e){return e.NONE=``,e}({}),qe=function(e){return e.NONE=``,e}({}),Je=Se(),Ye=(e={})=>({isProduction:!0,isDev:!1,isTest:!1,appUrl:`https://app.aptible.com`,authUrl:`https://auth.aptible.com`,billingUrl:`https://goldenboy.aptible.com`,apiUrl:`https://api.aptible.com`,metricTunnelUrl:`https://metrictunnel-nextgen.aptible.com`,freezerUrl:`https://activity.aptible.com`,llmGatewayUrl:`https://llm-gateway-api.aptible.com`,llmGatewayV2Url:`https://llm-gateway.aptible.com`,sentryDsn:`https://[email protected]/4504990894391296`,origin:`app`,betaFeatureOrgIds:`df0ee681-9e02-4c28-8916-3b215d539b08`,externalAwsFeatureOrgIds:`df0ee681-9e02-4c28-8916-3b215d539b08`,legacyDashboardUrl:`https://dashboard.aptible.com`,mintlifyChatKey:`mint_dsc_3ZKNWf51xz5J6gXrJgj8giR4`,stripePublishableKey:`pk_live_ujeTeUIMpUcvNsWwu7R9b3Zy`,llmGatewayV2OrgIds:`df0ee681-9e02-4c28-8916-3b215d539b08,1068ea90-2a6f-4f45-b1f4-623993a8512a,8233498b-99f8-46fe-ab33-2207f409a30f,4fa9c615-a8cc-4998-badb-91c0becd6fd1`,pylonChatOrgIds:`df0ee681-9e02-4c28-8916-3b215d539b08,afc1bc92-13c8-4848-bdfa-355ec07a4f7f`,...e}),Xe=(e={})=>{let t=new Date().toISOString();return{id:``,handle:``,gitRepo:``,createdAt:t,updatedAt:t,deploymentMethod:``,status:`unknown`,environmentId:``,currentConfigurationId:``,currentDeploymentId:``,currentImageId:``,currentSourceId:``,currentSettingId:``,...e}},Ze=(e={})=>({id:``,env:{},appId:``,...e}),Qe=(e={})=>{let t=new Date().toISOString();return{id:``,commonName:``,certificateBody:``,notBefore:t,notAfter:t,issuerCountry:``,issuerOrganization:``,issuerWebsite:``,issuerCommonName:``,subjectCountry:``,subjectState:``,subjectLocale:``,subjectOrganization:``,acme:!1,leafCertificate:``,certificateChain:``,sha256Fingerprint:``,trusted:!1,selfSigned:!0,subjectAlternativeNames:[],privateKeyAlgorithm:``,privateKey:``,createdAt:t,updatedAt:t,environmentId:``,...e}},$e=(e={})=>{let t=new Date().toISOString();return{id:``,status:`pending`,acme:!1,acmeConfiguration:null,acmeDnsChallengeHost:``,acmeStatus:`pending`,containerExposedPorts:[],containerPort:``,containerPorts:[],default:!1,dockerName:``,externalHost:``,externalHttpPort:``,externalHttpsPort:``,internal:!1,ipWhitelist:[],platform:`elb`,shared:!1,type:`unknown`,tokenHeader:void 0,lbAlgorithm:void 0,currentSettingId:``,createdAt:t,updatedAt:t,userDomain:``,virtualDomain:``,serviceId:``,certificateId:``,...e}},et=(e={})=>{let t=new Date().toISOString();return{id:``,organizationId:``,handle:`Unknown`,createdAt:t,updatedAt:t,type:`development`,activated:!0,totalAppCount:0,totalDatabaseCount:0,totalBackupSize:0,sweetnessStack:``,stackId:``,onboardingStatus:`unknown`,...e}},tt=(e={})=>({id:``,containerCount:0,domainCount:0,totalDiskSize:0,appContainerCount:0,databaseContainerCount:0,totalBackupSize:0,...e}),nt=(e={})=>{let t=new Date().toISOString();return{createdAt:t,updatedAt:t,id:``,appId:``,command:``,processType:``,...e}},rt=(e={})=>{let t=new Date().toISOString();return{id:``,organizationId:``,name:``,region:``,default:!1,public:!1,createdAt:t,updatedAt:t,outboundIpAddresses:[],memoryLimits:!1,cpuLimits:!1,intrusionDetection:!1,exposeIntrusionDetectionReports:!1,allowCInstanceProfile:!1,allowMInstanceProfile:!1,allowRInstanceProfile:!1,allowTInstanceProfile:!1,allowGranularContainerSizes:!1,verticalAutoscaling:!1,horizontalAutoscaling:!1,internalDomain:`aptible.in`,defaultDomain:`on-aptible.com`,selfHosted:!1,awsAccountId:``,vpcId:``,vpcCidr:``,...e}},it=(e={})=>{let t=new Date().toISOString();return{id:``,attached:!0,availabilityZone:``,baselineIops:0,databaseId:``,provisionedIops:3e3,createdAt:t,updatedAt:t,currentKmsArn:``,device:``,ebsVolumeId:``,ebsVolumeType:``,ec2InstanceId:``,environmentId:``,filesystem:``,handle:``,host:``,size:10,keyBytes:32,...e}},at=(e={})=>{let t=new Date().toISOString();return{id:``,handle:``,size:10,diskType:`gp3`,status:`pending`,environmentId:``,createdAt:t,updatedAt:t,...e}},ot=(e={})=>{let t=new Date().toISOString();return{id:``,mountPoint:``,status:`attached`,persistentDiskId:``,serviceId:``,createdAt:t,updatedAt:t,...e}},st=(e={})=>{let t=new Date().toISOString();return{id:``,databaseImageId:``,status:`pending`,handle:``,connectionUrl:``,createdAt:t,updatedAt:t,currentKmsArn:``,dockerRepo:``,provisioned:!1,enableBackups:!0,enablePitr:!1,pitrStatus:`unsupported`,olde
1stPitrTime:``,type:``,environmentId:``,serviceId:``,diskId:``,initializeFrom:``,portMapping:[],...e}},ct=(e={})=>({id:``,databaseId:``,connectionUrl:``,type:``,default:!1,...e}),lt=(e={})=>{let t=new Date().toISOString();return{id:``,default:!1,description:``,discoverable:!1,dockerRepo:``,eolAt:``,indexable:!1,type:``,version:``,visible:!0,pitrSupported:!1,createdAt:t,updatedAt:t,...e}},ut=(e={})=>{let t=new Date().toISOString();return{id:``,appId:``,databaseId:``,environmentId:``,serviceSizingPolicyId:``,handle:``,dockerRef:``,dockerRepo:``,processType:``,command:``,containerCount:0,containerMemoryLimitMb:512,currentReleaseId:``,instanceClass:`m`,forceZeroDowntime:!1,naiveHealthCheck:!1,restartFreeScaling:!1,stopTimeout:null,createdAt:t,updatedAt:t,...e}},dt=(e={})=>{let t=new Date().toISOString();return{id:``,handle:``,drainType:`tail`,drainHost:``,drainPort:``,drainUsername:``,drainPassword:``,url:``,loggingToken:``,drainApps:!1,drainProxies:!1,drainEphemeralSessions:!1,drainDatabases:!1,environmentId:``,databaseId:``,backendChannel:``,createdAt:t,updatedAt:t,status:`pending`,...e}},ft=(e={})=>{let t=new Date().toISOString();return{id:``,handle:``,drainType:``,agggregatorCaCertificate:``,aggregatorCaPrivateKeyBlob:``,aggregatorHost:``,aggregatorPortMapping:[],aggregatorInstanceId:``,aggregatorDockerName:``,aggregatorAllocation:[],drainConfiguration:{},environmentId:``,databaseId:``,createdAt:t,updatedAt:t,status:`pending`,...e}},pt=(e={})=>{let t=new Date().toISOString();return{id:``,environmentId:``,codeScanResultId:``,resourceId:``,resourceType:`unknown`,type:`unknown`,status:`unknown`,createdAt:t,updatedAt:t,gitRef:``,dockerRef:``,instanceProfile:``,containerCount:-1,containerSize:-1,diskSize:0,encryptedEnvJsonNew:``,destinationRegion:``,cancelled:!1,aborted:!1,automated:!1,immediate:!1,provisionedIops:0,ebsVolumeType:``,encryptedStackSettings:``,userName:`unknown`,userEmail:``,env:{},note:``,...e}},mt=(e={})=>{let t=new Date().toISOString();return{id:``,automatedBackupLimitPerDb:0,complianceDashboardAccess:!1,containerMemoryLimit:0,costCents:0,cpuAllowedProfiles:0,createdAt:t,diskLimit:0,environmentLimit:void 0,ephemeralSessionLimit:0,includedContainerMb:0,includedDiskGb:0,includedVhosts:0,manualBackupLimitPerDb:0,name:`none`,updatedAt:t,vhostLimit:0,horizontalAutoscaling:!1,verticalAutoscaling:!1,...e}},ht=(e={})=>{let t=new Date().toISOString();return{id:``,automatedBackupLimitPerDb:0,availablePlans:[`starter`,`development`,`growth`,`scale`,`production`],complianceDashboardAccess:!1,containerMemoryLimit:0,costCents:0,cpuAllowedProfiles:0,createdAt:t,diskLimit:0,environmentLimit:void 0,ephemeralSessionLimit:0,includedContainerMb:0,includedDiskGb:0,includedVhosts:0,manualBackupLimitPerDb:0,organizationId:``,updatedAt:t,vhostLimit:0,horizontalAutoscaling:!1,verticalAutoscaling:!1,planId:``,...e}},gt=(e={})=>({id:``,scope:`unknown`,environmentId:``,roleId:``,inheritedFrom:``,...e}),_t=(e={})=>{let t=new Date().toISOString();return{id:``,dockerRef:``,dockerRepo:``,createdAt:t,updatedAt:t,serviceId:``,...e}},vt=(e={})=>{let t=new Date().toISOString();return{id:``,awsInstanceId:``,dockerName:``,host:``,layer:``,memoryLimit:0,port:0,portMapping:[],status:``,createdAt:t,updatedAt:t,releaseId:``,...e}},yt=(e={})=>{let t=new Date().toISOString();return{id:``,connectionId:``,connectionStatus:``,description:``,peerAccountId:``,peerVpcId:``,createdAt:t,updatedAt:t,stackId:``,...e}},bt=(e={})=>{let t=new Date().toISOString();return{id:``,handle:``,phase1Alg:``,phase1DhGroup:``,phase1Lifetime:``,phase2Alg:``,phase2DhGroup:``,phase2Lifetime:``,ourGateway:``,ourNetworks:[],peerGateway:``,peerNetworks:[],perfectForwardSecrecy:``,state:`unknown`,auto:``,tunnelAttributes:{connections:{},routed_connections:{},security_associations:{}},createdAt:t,updatedAt:t,stackId:``,...e}},xt=(e={})=>{let t=new Date().toISOString();return{id:``,relationshipType:``,relationshipStartedAt:null,relationshipEndedAt:null,createdAt:t,updatedAt:t,organizationId:``,sourceResourceId:``,sourceResourceType:``,destinationResourceId:``,destinationResourceType:``,metadata:{},...e}},St=(e={})=>
1({id:``,databaseHandle:``,awsRegion:``,createdByEmail:``,databaseId:``,environmentId:``,createdFromOperationId:``,copiedFromId:``,size:0,manual:!1,createdAt:new Date().toISOString(),...e}),Ct=(e={})=>({id:``,daily:30,monthly:12,yearly:6,pitrDays:0,makeCopy:!0,keepFinal:!0,environmentId:``,createdAt:new Date().toISOString(),...e}),wt=(e={})=>{let t=new Date().toISOString();return{id:``,gitRepo:``,gitRef:`Not used`,dockerRepo:``,exposedPorts:[],dockerRef:``,createdAt:t,updatedAt:t,...e}},Tt=(e={})=>{let t=new Date().toISOString();return{id:``,environmentId:``,autoscaling:`vertical`,scalingEnabled:!1,defaultPolicy:!1,metricLookbackSeconds:300,percentile:99,postScaleUpCooldownSeconds:60,postScaleDownCooldownSeconds:300,postReleaseCooldownSeconds:60,memCpuRatioRThreshold:4,memCpuRatioCThreshold:2,memScaleUpThreshold:.9,memScaleDownThreshold:.75,minimumMemory:2048,maximumMemory:null,minContainers:2,maxContainers:4,minCpuThreshold:.1,maxCpuThreshold:.9,scaleUpStep:1,scaleDownStep:1,useHorizontalScale:!1,createdAt:t,updatedAt:t,...e}},Et=(e={})=>({id:``,frameworkId:``,name:``,category:``,displayName:``,metricHandle:``,...e}),Dt=(e={})=>({id:``,name:``,handle:``,description:``,area:``,callToAction:``,detailedDescription:``,hasRemediation:!1,customFrontend:!1,frameworks:[],frameworksAsString:``,frameworkHandles:[],isDedicatedOnly:!1,isPremium:!1,isComingSoon:!1,implementationUiComponent:``,isOrganizationScoped:!1,globalControlFrameworkIds:[],...e}),Ot=(e={})=>({id:``,globalControlId:``,accountId:``,status:``,lastEvaluation:``,resourceIds:[],isEvaluating:!1,isDisabled:!1,isComingSoon:!1,...e}),kt=(e={})=>({id:``,customerControlId:``,compliant:!1,ignored:!1,detailsText:``,resourceHandle:``,resourceType:``,resourceId:``,readableResourceType:``,linkToParameters:{path:``,parentId:null,modelId:``},...e}),At=e=>{let t=new Date().toISOString();return{id:``,email:``,createdAt:t,updatedAt:t,organizationId:``,organizationName:``,inviterName:``,roleName:``,expired:!1,...e}},jt=(e={})=>({id:``,name:``,billingDetailId:``,ssoEnforced:!1,updatedAt:new Date().toISOString(),reauthRequired:!1,address:``,city:``,zip:``,state:``,securityAlertEmail:``,opsAlertEmail:``,emergencyPhone:``,primaryPhone:``,...e}),Mt=(e={})=>({id:``,uri:``,recoveryCodesUrl:``,currentUrl:``,...e}),Nt=(e={})=>({tokenId:``,accessToken:``,userUrl:``,actorUrl:``,...e}),Pt=(e={})=>({id:``,name:`Aptible`,email:``,otpEnabled:!1,superuser:!1,readOnlyImpersonate:!1,username:``,verified:!1,currentOtpId:``,externalId:``,selectedOrganizationId:``,createdAt:new Date().toISOString(),allowAiGatewayAccess:!1,...e}),Ft=(e={})=>({id:``,paymentMethodUrl:``,organizationDetailsJson:{},invoicedExternally:!1,externalInvoicePortalUrl:``,...e}),It=(e={})=>{let t=new Date().toISOString();return{id:``,organizationId:``,name:``,type:`platform_user`,scimCreated:!1,createdAt:t,updatedAt:t,...e}},Lt=(e={})=>{let t=new Date().toISOString();return{id:``,userId:``,roleId:``,privileged:!1,createdAt:t,updatedAt:t,...e}},Rt=(e={})=>{let t=new Date().toISOString();return{id:``,dockerImage:``,dockerRepositoryUrl:``,status:`unknown`,gitRepositoryUrl:``,gitRef:``,gitCommitSha:``,gitCommitUrl:``,gitCommitMessage:``,gitCommitTimestamp:``,createdAt:t,updatedAt:t,appId:``,operationId:``,imageId:``,configurationId:``,sourceId:``,settingId:``,...e}},zt=(e={})=>{let t=new Date().toISOString();return{id:``,displayName:`Unknown`,url:``,createdAt:t,updatedAt:t,...e}},Bt=(e={})=>{let t=new Date().toISOString();return{id:``,settings:{},sensitiveSettings:{},createdAt:t,updatedAt:t,...e}},Vt=(e={})=>({id:``,serviceId:``,cpuUsage:0,ramUsage:0,ramTarget:0,costSavings:0,recommendedInstanceClass:``,recommendedContainerMemoryLimitMb:0,instanceClassAtTime:``,containerMemoryLimitMbAtTime:0,metricPercentile:0,createdAt:new Date().toISOString(),...e}),Ht=(e={})=>({id:``,estCost:0,resourceType:``,...e}),Ut=(e={})=>({hids_cost_per_month:.02,vpn_tunnel_cost_per_month:99,stack_cost_per_month:499,backup_cost_gb_per_month:.02,disk_cost_gb_per_month:.2,persistent_disk_cost_gb_per_month:.2,disk_iops_cost_per_month:.01,vhost_cost_per_hour:.06,shared_vhost_cost_per_hour:.04,m_class_gb_per_hour:.08,c_class_gb_per_hour:.1,r_class_gb_per_hour:.05,...e}
1),Wt=(e={})=>{let t=new Date().toISOString();return{id:``,name:``,organizationId:``,resourceId:``,resourceType:``,symptoms:``,rangeBegin:``,rangeEnd:``,observationTimestamp:``,data:{},createdAt:t,updatedAt:t,...e}},Gt=(e={})=>{let t=new Date().toISOString();return{id:``,organizationId:``,awsAccountId:``,accountName:``,awsRegionPrimary:``,discoveryEnabled:!1,discoveryFrequency:``,lastDiscoveryAt:``,status:`unknown`,createdByUserEmail:``,createdByUserName:``,createdByUserId:``,createdAt:t,updatedAt:t,...e}},Kt=(e={})=>{let t=new Date().toISOString();return{id:``,externalAwsAccountId:``,resourceType:``,resourceArn:``,resourceId:``,resourceName:``,region:``,metadata:{},tags:{},discoveredAt:``,lastSyncedAt:``,syncStatus:`unknown`,createdAt:t,updatedAt:t,...e}},qt=(e={})=>{let t=new Date().toISOString();return{id:``,databaseName:``,databaseUser:``,superuser:!1,appId:``,externalAwsResourceId:``,externalAwsAccountId:``,createdAt:t,updatedAt:t,...e}},Jt=(e={})=>({id:``,name:``,email:``,...e}),Yt=(e={})=>{let t=new Date().toISOString();return{id:``,handle:``,note:``,gatewayUrl:``,createdBy:Jt(),revokedAt:null,revokedBy:null,status:`ACTIVE`,environmentId:``,createdAt:t,updatedAt:t,currentUsage:{spend:0,inputTokens:0,outputTokens:0,successfulRequests:0,failedRequests:0,totalRequests:0,totalTokens:0},...e}},Xt=(e={})=>{let t=new Date().toISOString();return{id:``,handle:``,organizationId:``,gatewayUrl:``,tokenPrefix:``,createdBy:Jt(),revokedAt:null,revokedBy:null,status:`ACTIVE`,createdAt:t,updatedAt:t,...e}},Zt=(e={})=>{let t=new Date().toISOString();return{id:``,organizationId:``,teamId:``,spendLimit:0,trial:!0,models:[],currentUsage:null,createdAt:t,updatedAt:t,...e}},Qt=(e={})=>({id:``,llmKeyId:``,status:``,startTime:``,endTime:``,model:``,inputTokens:0,outputTokens:0,spend:0,durationSeconds:0,totalTokens:0,createdAt:``,updatedAt:``,...e}),$t=(e={})=>({id:``,environmentId:``,spendLimit:0,models:[],currentUsage:{spend:0,inputTokens:0,outputTokens:0,successfulRequests:0,failedRequests:0,totalRequests:0,totalTokens:0},...e}),en=(e={})=>({id:``,handle:``,url:``,llmPolicyId:``,environmentId:``,drainType:`langfuse`,publicKey:``,apiKey:``,status:`unknown`,createdAt:``,updatedAt:``,...e}),tn=(e={})=>({id:``,userId:``,agreementType:``,agreementVersion:``,createdAt:``,updatedAt:``,...e}),[L,nn]=C({cache:ke.table(),loaders:ke.loaders(),env:ke.obj(Ye()),feedback:ke.obj({preDeploySurveyAnswered:!1,freeformFeedbackGiven:!1}),users:ke.table({empty:Pt()}),token:ke.obj(Nt()),elevatedToken:ke.obj(Nt()),activityLogsToken:ke.str(),invitations:ke.table({empty:At()}),entities:ke.table(),redirectPath:ke.str(),scimToken:ke.str(),organizationSelected:ke.str(),organizations:ke.table({empty:jt()}),u2fDevices:ke.table(),otp:ke.obj(Mt()),theme:ke.str(`light`),nav:ke.obj({collapsed:!1}),modal:ke.obj({type:Ke.NONE,props:{}}),roles:ke.table({empty:It()}),currentUserRoles:ke.any([]),signal:ke.any(new AbortController),resourceStats:ke.table(),containerMetrics:ke.table(),billingDetail:ke.obj(Ft()),apps:ke.table({empty:Xe()}),appConfigs:ke.table({empty:Ze()}),certificates:ke.table({empty:Qe()}),endpoints:ke.table({empty:$e()}),environments:ke.table({empty:et()}),environmentStats:ke.table({empty:tt()}),serviceDefinitions:ke.table({empty:nt()}),stacks:ke.table({empty:rt()}),disks:ke.table({empty:it()}),persistentDisks:ke.table({empty:at()}),diskAttachments:ke.table({empty:ot()}),databases:ke.table({empty:st()}),databaseCredentials:ke.table({empty:ct()}),databaseImages:ke.table({empty:lt()}),services:ke.table({empty:ut()}),logDrains:ke.table({empty:dt()}),metricDrains:ke.table({empty:ft()}),operations:ke.table({empty:pt()}),activePlans:ke.table({empty:ht()}),llmGatewayConfigurations:ke.table({empty:Zt()}),llmGatewaySelfServiceEnrollment:ke.any(!0),llmGatewayKeys:ke.table({empty:Xt()}),llmKeys:ke.table({empty:Yt()}),llmKeyRequests:ke.table({empty:Qt()}),llmPolicies:ke.table({empty:$t()}),llmTraceDrains:ke.table({empty:en()}),plans:ke.table({empty:mt()}),permissions:ke.table({empty:gt()}),releases:ke.table({empty:_t()}),containers:ke.table({empty:vt()}),vpcPeers:ke.table({empty:yt()}),vpnTunnels:ke.table({empty:bt()}),edges:ke.table({empty:xt()}),backups:ke.table({empty:St()}),backupRps:ke.table({empty:Ct()}),images:ke.table({empty:wt()}),memberships:ke.table({empty:Lt()}),serviceSizingPolicies:ke.table({empty:Tt()}),deployments:ke.table({empty:Rt()}),sources:ke.table({empty:zt()}),settings:ke.table({empty:Bt()}),manualScaleRecommendations:ke.table({empty:Vt()}),notices:ke.obj({[qe.NONE]:``}),costs:ke.table({empty:Ht()}
1),costRates:ke.obj(Ut()),dashboards:ke.table({empty:Wt()}),externalAwsAccounts:ke.table({empty:Gt()}),externalAwsResources:ke.table({empty:Kt()}),appExternalAwsRdsConnections:ke.table({empty:qt()}),globalControls:ke.table({empty:Dt()}),globalControlFrameworks:ke.table({empty:Et()}),customerControls:ke.table({empty:Ot()}),customerControlResources:ke.table({empty:kt()}),userAgreements:ke.table({empty:tn()})}),rn=r({selectEnv:()=>an,selectLegacyDashboardUrl:()=>sn,selectOrigin:()=>on}),an=L.env.select,on=e=>an(e).origin,sn=e=>an(e).legacyDashboardUrl,cn=e(fe()),ln=e=>(0,cn.default)(`app:${e}`),un=oe;function dn(e){let t=t=>({type:e,payload:t});return t.toString=()=>e,t}function*fn(){let e=yield*p(L.loaders.selectById,{id:`bootup`});for(;!e||e.status===`loading`;)yield*un(50),e=yield*p(L.loaders.selectById,{id:`bootup`});if(e.status===`error`)throw Error(`Bootup failed`)}var pn=r({defaultEntity:()=>vn,defaultHalHref:()=>mn,extractIdFromLink:()=>R,extractResourceNameFromLink:()=>gn,halEntityParser:()=>yn}),mn=(e=``)=>({href:e});function R(e){if(!e?.href)return``;let t=e.href.split(`/`);return t[t.length-1]||``}function hn(e){switch(e){case`accounts`:return`environment`;case`llm_keys`:return`llm_key`;case`apps`:return`app`;case`databases`:return`database`;case`vhosts`:return`vhost`;case`ephemeral_sessions`:return`ephemeral_session`;case`backups`:return`backup`;case`services`:return`service`;case`releases`:return`release`;case`containers`:return`container`;case`vpc_peers`:return`vpc_peer`;case`vpn_tunnels`:return`vpn_tunnel`;case`log_drains`:return`log_drain`;case`metric_drains`:return`metric_drain`;case`llm_trace_drains`:return`llm_trace_drain`;case`app_external_aws_rds_connections`:return`app_external_aws_rds_connection`;case`external_aws_accounts`:return`external_aws_account`;case`persistent_disks`:return`persistent_disk`;case`disk_attachments`:return`disk_attachment`;default:return`unknown`}}function gn(e){if(!e?.href)return`unknown`;let t=e.href.split(`/`);return hn(t[t.length-2])}var _n=L.entities.selectTable;function vn(e){return e}function*yn(e,t){yield*t();let n=e.json;if(!n.ok)return;let r=yield*p(_n),{value:i}=n,a=[],o={},s=e=>{if(e){if(e._type){let t=r[e._type];t&&(o[t.id]||(o[t.id]=[]),o[t.id].push(t.deserialize(e)))}
1e._embedded&&Object.values(e._embedded).forEach(e=>{Array.isArray(e)?e.forEach(s):s(e)})}};s(i),Object.keys(o).forEach(e=>{let t=r[e];if(!t)return;let n=o[e];if(n.length===0)return;let i=n.reduce((e,t)=>(e[t.id]=t,e),{});a.push(t.save(i))}),yield*L.update(a)}var bn=(e={})=>({_type:`user`,id:``,iss:``,sub:``,scope:``,exp:0,session:``,email:``,email_verified:!1,name:``,...e});function xn(e){if(!e)return bn();let t=e.split(`.`)[1].replace(/-/g,`+`).replace(/_/g,`/`),n=decodeURIComponent(atob(t).split(``).map(e=>`%${`00${e.charCodeAt(0).toString(16)}`.slice(-2)}`).join(``)),r=JSON.parse(n);return(r.sub||``).includes(`organizations`)&&r.act?{_type:`org`,...r}:{_type:`user`,...r}}var Sn=r({defaultJWTToken:()=>bn,defaultTokenResponse:()=>Cn,deserializeToken:()=>wn,parseJwt:()=>xn,selectAccessToken:()=>An,selectActorUrl:()=>jn,selectElevatedAccessToken:()=>Vn,selectIsAuthWithSso:()=>In,selectIsElevatedTokenValid:()=>Bn,selectIsImpersonated:()=>Ln,selectIsTokenValid:()=>Pn,selectIsUserAuthenticated:()=>Rn,selectJwtElevatedToken:()=>zn,selectJwtToken:()=>Nn,selectToken:()=>kn,selectTokenHasWriteAccess:()=>Fn,selectUserUrl:()=>Mn}),Cn=(e={})=>{let t=new Date,n=new Date;return n.setDate(t.getDate()+1),{access_token:``,created_at:t.toISOString(),expires_at:n.toISOString(),expires_in:n.toISOString(),scope:`manage`,id:``,token_type:``,_links:{self:{href:``},user:{href:``},actor:{href:``},...e._links},_type:`token`,...e}};function wn(e){return{tokenId:e.id,accessToken:e.access_token,userUrl:mn(e._links.user?.href).href,actorUrl:mn(e._links.actor?.href).href}}var Tn=()=>Math.floor(Date.now()/1e3),En=bn(),Dn=e=>e.accessToken===``?En:xn(e.accessToken),On=e=>Tn()>e.exp,kn=L.token.select,An=e=>L.token.select(e).accessToken,jn=e=>L.token.select(e).actorUrl,Mn=e=>L.token.select(e).userUrl,Nn=D(L.token.select,Dn),Pn=D(Nn,e=>e.scope!==``&&!On(e)),Fn=D(Nn,e=>[`manage`,`elevated`,`privileged`].includes(e.scope)),In=D(Nn,e=>e._type===`org`),Ln=e=>jn(e)?jn(e)!==Mn(e):!1,Rn=Pn,zn=D(L.elevatedToken.select,Dn),Bn=D(zn,e=>e.scope===`elevated`&&!On(e)),Vn=e=>L.elevatedToken.select(e).accessToken,Hn=ln(`fx`),Un=[/failed to fetch/i,/reset store/i,/networkerror when attempting to fetch resource/i,/load failed/i,/request signal is aborted/i,/the operation was aborted/i];function*Wn(e,t){try{yield*t()}catch(t){if(console.error(t),t instanceof Error){for(let e of Un)if(e.test(t.message))return}ie(t,{contexts:{extras:{queryCtx:JSON.stringify(e)}}})}}var Gn=v.loader(L);function*Kn(e,t){Hn(`${e.name}`,e),yield*t()}var qn=O({supervisor:A});qn.use(Kn),qn.use(Wn),qn.use(function*(e,t){e.json=null,yield*t()}),qn.use(v.actions),qn.use(qn.routes());var Jn=qn.create(`reset-token`,function*(e,t){yield*L.update(L.token.reset()),yield*t()});function*Yn(e,t){e.elevated=!0,yield*t()}function*Xn(e){let t=yield*p(an);return e===`auth`?t.authUrl:e===`billing`?t.billingUrl:e===`metrictunnel`?t.metricTunnelUrl:e===`freezer`?t.freezerUrl:t.apiUrl}function*Zn(e,t){if(e.noToken){yield*t();return}let n=yield*p(An);if(!n){yield*t();return}e.request=e.req({headers:{Authorization:`Bearer ${n}`}}),yield*t()}function*Qn(e,t){if(!e.elevated){yield*t();return}let n=yield*p(Vn);if(!n){yield*t();return}e.request=e.req({headers:{Authorization:`Bearer ${n}`}}),yield*t()}function*$n(e,t){let{url:n}=e.req();return n.startsWith(`http`)?n:`${yield*Te(()=>Xn(t))}${n}`}function*er(e,t){let n=yield*Te(()=>$n(e,`billing`));e.request=e.req({url:n,credentials:`include`,headers:{"Content-Type":`application/hal+json`}}),yield*t()}function*tr(e,t){let n=yield*Te(()=>$n(e,`api`)),r={"Content-Type":`application/hal+json`};e.payload?.withSensitiveExtras||(r.Prefer=`no_sensitive_extras=true`),e.request=e.req({url:n,credentials:`include`,headers:r}),yield*t()}function*nr(e,t){let n=yield*Te(()=>$n(e,`auth`));e.request=e.req({url:n,credentials:e.credentials||`include`,headers:{"Content-Type":`application/hal+json`}}),yield*t()}function*rr(e,t){let n=yield*Te(()=>$n(e,`metrictunnel`));e.request=e.req({url:n,credentials:`include`,headers:{"Content-Type":`application/json`}}),yield*t()}function*ir(e,t){let n=yield*Te(()=>$n(e,`freezer`));e.request=e.req({url:n,credentials:`include`,headers:{"Content-Type":`application/json`}}),yield*t()}
1function*ar(e,t){yield*t(),e.response&&e.req().method===`GET`&&e.response.status===401&&(yield*be(Jn()))}function*or(e,t){let n=yield*p(L.signal.select);e.request=e.req({signal:n.signal}),yield*a([Te(t),Te(()=>new Promise(e=>{n.signal.addEventListener(`abort`,()=>{e()})}))])}var sr=1e3,cr=60*sr,lr=()=>de(10*cr),ur=()=>de(5*cr),dr=()=>de(60*sr),fr=()=>de(5*sr);function*pr(e,t){let n=yield*p(an);yield*t(),!e.json.ok&&n.isDev&&!n.isTest&&console.warn(e.json.error,e)}var z=E(O({supervisor:A}));z.use(Kn),z.use(pr),z.use(Wn),z.use(ar),z.use(v.api({schema:L})),z.use(or),z.use(tr),z.use(yn),z.use(z.routes()),z.use(Zn),z.use(v.fetch());var mr=E(O({supervisor:A}));mr.use(Kn),mr.use(pr),mr.use(Wn),mr.use(ar),mr.use(v.api({schema:L})),mr.use(or),mr.use(yn),mr.use(mr.routes()),mr.use(nr),mr.use(Zn),mr.use(Qn),mr.use(v.fetch());var hr=E(O({supervisor:A}));hr.use(Kn),hr.use(pr),hr.use(Wn),hr.use(ar),hr.use(v.api({schema:L})),hr.use(or),hr.use(yn),hr.use(hr.routes()),hr.use(er),hr.use(Zn),hr.use(v.fetch());var gr=E(O({supervisor:A}));gr.use(Kn),gr.use(pr),gr.use(Wn),gr.use(ar),gr.use(v.api({schema:L})),gr.use(or),gr.use(gr.routes()),gr.use(rr),gr.use(or),gr.use(Zn),gr.use(v.fetch());var _r=E(O({supervisor:A}));_r.use(Kn),_r.use(pr),_r.use(Wn),_r.use(ar),_r.use(v.api({schema:L})),_r.use(or),_r.use(_r.routes()),_r.use(ir),_r.use(Zn),_r.use(v.fetch());function vr(e,{max:t=50}={max:50}){function*n(n,r){let i=[];yield*L.update(L.loaders.start({id:n.key}));let a=yield*Te(()=>e.run(e({...n.payload,page:1})));if(!a.json.ok){let e=a.json.error.message;yield*L.update(L.loaders.error({id:n.key,message:e})),yield*r();return}if(i=[ge(a)],a.json.value.current_page){let r=a.json.value.current_page,o=a.json.value.total_count||0,s=a.json.value.per_page||0,c=Math.min(t,Math.ceil(o/s)),l=[];for(let t=r+1;t<=c;t+=1)l.push(()=>e.run(e({...n.payload,page:t})));l.length>0&&(i=yield*yield*S(l))}n.json={data:i},yield*L.update(L.loaders.success({id:n.key})),yield*r()}return n}function*yr(e,t){let{userId:n,...r}=e.payload;e.elevated=!0,e.request=e.req({body:JSON.stringify(r)}),yield*t(),e.json.ok&&(e.loader={message:`Saved changes successfully!`})}var br=r({findLoaderComposite:()=>Cr,resetLoaderByIds:()=>xr,selectIsAnyLoading:()=>Sr,selectLoaderComposite:()=>wr}),xr=qn.create(`reset-loader-by-ids`,function*(e,t){yield*t(),yield*L.update(L.loaders.resetByIds(e.payload.ids))}),Sr=D(L.loaders.selectTableAsList,e=>{for(let t=0;t<e.length;t+=1)if(e[t].status===`loading`)return!0;return!1}),Cr=e=>{let t=[...e].sort((e,t)=>new Date(t.lastRun).getTime()-new Date(e.lastRun).getTime()),n={loading:[],success:[],error:[],idle:[]};if(t.forEach(e=>{n[e.status].push(e)}),t.length===0)return s();if(t.length===1)return t[0];let r=t.map(e=>e.id).filter(Boolean).join(`;`);if(n.loading.length>0)return s({...n.loading[0],id:r});if(n.error.length>0){let e=s({...n.error[0],id:r});return e.message=n.error.map(e=>e.message).filter(Boolean).join(`, `),e}if(n.success.length>0){let e=s({...n.success[0],id:r});return e.message=n.success.map(e=>e.message).filter(Boolean).join(`, `),e}return n.idle.length>0?s({...n.idle[0],id:r}):t[0]},wr=D(L.loaders.selectByIds,Cr),B=b;function Tr(e){return typeof e==`function`?`${e}`:e.payload.key}function Er(e){let t=e.map(e=>Tr(e));return B(e=>wr(e,{ids:t}))}var Dr=()=>`/`,Or=`/getting-started`,kr=()=>Or,Ar=`/404`,jr=()=>Ar,Mr=`/login`,Nr=()=>Mr,Pr=`/logout`,Fr=()=>Pr,Ir=`/signup`,Lr=()=>Ir,Rr=`/elevate`,eee=(e=``)=>`${Rr}?redirect=${e}`,zr=`/settings`,Br=()=>zr,Vr=`/settings/profile`,Hr=()=>Vr,Ur=`/settings/tokens`,Wr=()=>Ur,Gr=`/settings/tokens/read`,tee=()=>Gr,Kr=`/settings/security`,qr=()=>Kr,Jr=`/settings/ssh`,nee=()=>Jr,Yr=`/settings/account-integrations`,Xr=()=>Yr,Zr=`${Yr}/aws/:id`,Qr=e=>`/settings/account-integrations/aws/${e}`,ree=`${Zr}/resources`,$r=e=>`${Qr(e)}/resources`,iee=`${Zr}/settings`,aee=e=>`${Qr(e)}/settings`,ei=`/settings/otp-setup`,oee=()=>ei,ti=`/settings/otp-recovery-codes`,see=()=>ti,ni=`/settings/add-security-key`,cee=()=>ni,lee=`/otp-reset-verify/:challengeId/:verificationCode`,uee=`${zr}/team`,ri=`/settings/team/members`,ii=()=>ri,ai=`/settings/team/invite`,dee=()=>ai,oi=`/settings/team/contacts`,si=()=>oi,ci=`/settings/team/managed-ai`,fee=()=>ci,li=`/settings/team/sso`,ui=()=>li,di=`/settings/team/scim`,pee=()=>di,fi=`/settings/team/pending-invites`,pi=()=>fi,mi=`/settings/team/roles`,hi=()=>mi,gi=`/settings/team/roles/create`,mee=()=>gi,hee=`/roles/:id`,_i=e=>`/roles/${e}`,gee=`/roles/:id/members`,vi=e=>`/roles/${e}/members`,_ee=`/roles/:id/environments`,vee=e=>`/roles/${e}
1/environments`,yee=`/roles/:id/settings`,bee=e=>`/roles/${e}/settings`,xee=`/settings/team/members/:id`,yi=e=>`/settings/team/members/${e}`,See=`/claim/:inviteId/:code`,bi=(e,t)=>`/claim/${e}/${t}`,xi=`/impersonate`,Cee=()=>xi,Si=`/forgot-password`,Ci=()=>Si,wee=`/password/update/:challengeId/:verificationCode`,wi=`/verify`,Ti=()=>wi,Tee=`/verify/:verificationId/:verificationCode`,Ei=`/plans`,Di=()=>Ei,Oi=`/billing`,Eee=()=>Oi,ki=`/settings/billing/invoices`,Ai=()=>ki,ji=`/settings/billing/payment-methods`,Mi=()=>ji,Ni=`/settings/billing/payment-methods/add-credit-card`,Dee=()=>Ni,Oee=`/settings/billing/payment-methods/add-bank-account`,kee=()=>Oee,Pi=`/settings/billing/contacts`,Aee=()=>Pi,Fi=`/settings/billing/billing-address`,jee=()=>Fi,Ii=`/settings/legal/agreements`,Li=()=>Ii,Mee=`/settings/compliance/baa/callback`,Nee=`/organizations/create`,Ri=`/organizations/picker`,zi=()=>Ri,Bi=`/sso-required`,Pee=()=>Bi,Vi=`/ai-gateway/enroll`,Hi=()=>Vi,Ui=`/llm-gateway`,Wi=()=>Ui,Fee=`/llm-gateway/:id`,Iee=e=>`/llm-gateway/${e}`,Gi=`/llm-keys`,Ki=()=>Gi,Lee=`/llm-keys/:id`,qi=e=>`/llm-keys/${e}`,Ree=`/llm-keys/:id/models`,zee=e=>`/llm-keys/${e}/models`,Bee=`/llm-keys/:id/requests`,Ji=e=>`/llm-keys/${e}/requests`,Vee=`/llm-keys/:id/requests/:requestId`,Hee=(e,t)=>`/llm-keys/${e}/requests/${t}`,Yi=`/apps`,Xi=()=>Yi,Zi=`/apps/:id`,Qi=e=>`/apps/${e}`,Uee=`${Zi}/services`,$i=e=>`${Qi(e)}/services`,ea=`${Zi}/services/:serviceId`,ta=(e,t)=>`${Qi(e)}/services/${t}`,Wee=`${Zi}/config`,Gee=e=>`${Qi(e)}/config`,Kee=`${Zi}/services/:serviceId/metrics`,na=(e,t)=>`${Qi(e)}/services/${t}/metrics`,qee=`${Zi}/services/:serviceId/scale`,ra=(e,t)=>`${Qi(e)}/services/${t}/scale`,Jee=`${Zi}
1/services/:serviceId/settings`,ia=(e,t)=>`${Qi(e)}/services/${t}/settings`,Yee=`${Zi}/services/:serviceId/disk-storage`,aa=(e,t)=>`${Qi(e)}/services/${t}/disk-storage`,Xee=`${Zi}/disk-storage`,Zee=e=>`${Qi(e)}/disk-storage`,Qee=`${Zi}/activity`,oa=e=>`${Qi(e)}/activity`,$ee=`${Zi}/endpoints`,sa=e=>`${Qi(e)}/endpoints`,ete=`${Zi}/endpoints/create`,tte=e=>`${Qi(e)}/endpoints/create`,nte=`${Zi}/settings`,rte=e=>`${Qi(e)}/settings`,ite=`${Zi}/ci-cd`,ca=e=>`${Qi(e)}/ci-cd`,ate=`${Zi}/ci-cd/github`,la=e=>`${Qi(e)}/ci-cd/github`,ote=`${Zi}/deps`,ste=e=>`/apps/${e}/deps`,cte=`/apps/:id/deployments`,ua=e=>`/apps/${e}/deployments`,lte=`/deployments/:id`,da=e=>`/deployments/${e}`,ute=`/deployments/:id/logs`,fa=e=>`/deployments/${e}/logs`,dte=`/deployments/:id/config`,fte=e=>`/deployments/${e}/config`,pa=`/databases`,ma=()=>pa,pte=e=>`${pa}?search=${encodeURIComponent(e)}`,ha=`/databases/:id`,ga=e=>`/databases/${e}`,mte=`${ha}/endpoints`,_a=e=>`${ga(e)}/endpoints`,hte=`${ha}/activity`,va=e=>`${ga(e)}/activity`,gte=`${ha}/backups`,ya=e=>`${ga(e)}/backups`,_te=`${ha}/cluster`,vte=e=>`${ga(e)}/cluster`,yte=`${ha}
1/metrics`,ba=e=>`${ga(e)}/metrics`,bte=`${ha}/scale`,xa=e=>`${ga(e)}/scale`,xte=`${ha}/settings`,Ste=e=>`${ga(e)}/settings`,Cte=`${ha}/credentials`,Sa=e=>`${ga(e)}/credentials`,wte=`${ha}/endpoints/create`,Tte=e=>`${ga(e)}/endpoints/create`,Ete=`${ha}/recovery`,Dte=e=>`${ga(e)}/recovery`,Ca=`/services`,Ote=()=>Ca,kte=e=>`${Ca}?search=${encodeURIComponent(e)}`,Ate=`/backups/:id/restore`,jte=e=>`/backups/${e}/restore`,Mte=`/endpoints/:id`,wa=e=>`/endpoints/${e}`,Nte=`/endpoints/:id/activity`,Ta=e=>`${wa(e)}/activity`,Pte=`/endpoints/:id/setup`,Ea=e=>`${wa(e)}/setup`,Da=`/endpoints/:id/settings`,Oa=e=>`${wa(e)}/settings`,ka=`/endpoints`,Aa=()=>ka,Fte=`/endpoints/:id/credentials`,Ite=e=>`/endpoints/${e}/credentials`,ja=`/environments`,Ma=()=>ja,Lte=`/environments/:id`,Na=e=>`/environments/${e}`,Rte=`/environments/:id/apps`,Pa=e=>`/environments/${e}/apps`,zte=`/environments/:id/databases`,Fa=e=>`/environments/${e}/databases`,Bte=`/environments/:id/security`,Vte=`/environments/:id/integrations`,Ia=e=>`/environments/${e}/integrations`,La=`/environments/:id/certificates`,Ra=e=>`/environments/${e}/certificates`,Hte=`/environments/:id/activity_reports`,Ute=`/environments/:id/activity`,za=e=>`/environments/${e}/activity`,Wte=`/environments/:id/backups`,Ba=e=>`/environments/${e}/backups`,Gte=`/environments/:id/llm-keys`,Va=e=>`/environments/${e}/llm-keys`,Kte=`/environments/:id/persistent-disks`,qte=e=>`/environments/${e}/persistent-disks`,Jte=`/environments/:id/settings`,Yte=`/environments/:id/certificates/create`,Xte=e=>`/environments/${e}/certificates/create`,Zte=`/environments/:id/endpoints`,Qte=e=>`/create/app?environment_id=${e}`,$te=e=>`/create/db?environment_id=${e}`,Ha=`/create/db`,Ua=e=>`${Ha}${e?`?environment_id=${e}
1`:``}`,ene=`/error`,tne=`/create`,Wa=`/deploy`,Ga=(e=``)=>`${Wa}${e?`?stack_id=${e}`:``}`,Ka=`/create/app`,qa=(e=``)=>`${Ka}${e?`?${e}`:``}`,Ja=`/create/environment`,Ya=(e=``)=>`${Ja}${e?`?${e}`:``}`,Xa=`/select/env`,Za=(e=``)=>`${Xa}${e?`?${e}`:``}`,nne=`/environments/:envId/resume`,rne=`/apps/:appId/resume`,ine=e=>`/apps/${e}/resume`,ane=`/apps/:appId/get-started`,Qa=e=>`/apps/${e}/get-started`,one=`/apps/:appId/git`,$a=e=>`/apps/${e}/git`,sne=`/apps/:appId/github`,cne=e=>`/apps/${e}/github`,eo=`/apps/:appId/git/ssh`,to=e=>`/apps/${e}/git/ssh`,lne=`/apps/:appId/deploy/configure`,no=(e,t=``)=>`/apps/${e}/deploy/configure${t?`?${t}`:``}`,une=`/apps/:appId/deploy/status`,ro=e=>`/apps/${e}/deploy/status`,io=`/sso`,ao=()=>io,dne=`/sso/:orgId`,oo=e=>`/sso/${e}`,so=`/sso/failure`,co=(e=``)=>`${so}?message=${e}`,fne=`/sso/cli/read`,lo=`/sso/cli`,pne=()=>lo,mne=`/activity-beta`,hne=`/activity-legacy`,uo=`/activity`,gne=()=>uo,_ne=`/activity/:id`,fo=e=>`/activity/${e}`,vne=`/activity/:id/config`,yne=e=>`/activity/${e}/config`,bne=`/operations/:id`,po=e=>`/operations/${e}`,xne=`/styles`,mo=`/stacks`,ho=()=>mo,go=`/create/stack`,_o=()=>go,Sne=`/databases/externalAwsResources`,vo=`/databases/externalAwsResources/:id`,yo=e=>`/databases/externalAwsResources/${e}`,Cne=`${vo}/connections`,bo=e=>`${yo(e)}/connections`,wne=`${vo}/settings`,Tne=e=>`${yo(e)}/settings`,xo=`/stacks/:id`,So=e=>`/stacks/${e}`,Ene=`${xo}/environments`,Co=e=>`${So(e)}/environments`,Dne=`${xo}/vpn-tunnels`,One=e=>`${So(e)}/vpn-tunnels`,kne=`${xo}/vpc-peering`,wo=e=>`${So(e)}/vpc-peering`,Ane=`${xo}/hids`,jne=e=>`${So(e)}/hids`,Mne=`${xo}/settings`,Nne=e=>`${So(e)}/settings`,To=`/search`,Eo=()=>To,Do=`/controls`,Pne=`/controls/:controlId`,Fne=()=>Do,Ine=(e,t)=>{let n=`${Do}/${e}/implementation`;if(!t)return n;let r=typeof t==`string`?t:t.toString();return r?`${n}?${r}`:n},Lne=(e,t)=>{let n=`${Do}/${e}/details`;if(!t)return n;let r=typeof t==`string`?t:t.toString();return r?`${n}?${r}`:n},Rne=`/certificates/:id`,Oo=e=>`/certificates/${e}`,zne=`/certificates/:id/apps`,ko=e=>`/certificates/${e}/apps`,Bne=`/certificates/:id/endpoints`,Vne=e=>`/certificates/${e}/endpoints`,Hne=`/certificates/:id/settings`,Une=e=>`/certificates/${e}/settings`,Ao=`/metric-drains/create`,Wne=(e=``)=>`${Ao}${e?`?environment_id=${e}
1`:``}`,jo=`/log-drains/create`,Gne=(e=``)=>`${jo}${e?`?environment_id=${e}`:``}`,Mo=`/llm-trace-drains/create`,Kne=(e=``)=>`${Mo}${e?`?environment_id=${e}`:``}`,qne=`${xo}/vpc-peering/create`,Jne=e=>`${So(e)}/vpc-peering/create`,No=`/support`,Po=e=>{if(!e||Object.keys(e).length===0)return No;let t=new URLSearchParams;Object.entries(e).forEach(([e,n])=>{t.set(e,n)});let n=t.toString();return n?`${No}?${n}`:No},Yne=`/print-controls`,Xne=`/sources`,Fo=`/sources/setup`,Io=()=>Fo,Zne=`/sources/:id`,Lo=e=>`/sources/${e}`,Qne=`/sources/:id/apps`,Ro=e=>`/sources/${e}/apps`,$ne=`/sources/:id/deployments`,ere=e=>`/sources/${e}/deployments`;function zo(e){return{id:`${e.id}`,name:e.name,email:e.email,otpEnabled:e.otp_enabled,readOnlyImpersonate:e.read_only_impersonate,superuser:e.superuser,username:e.username,verified:e.verified,externalId:e.external_id,selectedOrganizationId:R(e._links.selected_organization),currentOtpId:R(e._links.current_otp_configuration),createdAt:e.created_at,allowAiGatewayAccess:e.allow_ai_gateway_access}}function Bo(e){return{id:`${e.id}`,userId:R(e._links.user),agreementType:e.agreement_type,agreementVersion:e.agreement_version,createdAt:e.created_at,updatedAt:e.updated_at}}function tre(e={}){let t=new Date().toISOString();return{id:0,name:``,email:``,otp_enabled:!1,superuser:!1,read_only_impersonate:!1,username:``,verified:!1,created_at:t,updated_at:t,public_key_fingerprint:null,ssh_public_key:null,external_id:``,allow_ai_gateway_access:!1,_links:{self:mn(),roles:mn(),selected_organization:mn(),email_verification_challenges:mn(),current_otp_configuration:mn(),ssh_keys:mn(),u2f_devices:mn(),...e._links},_type:`user`,...e}}var Vo=L.users.findById,Ho=L.users.selectTable,nre=L.users.selectByIds,Uo=L.users.selectById,Wo=D(L.users.selectTableAsList,e=>e.sort((e,t)=>e.name.localeCompare(t.name))),Go=D(Wo,(e,t)=>t.search,(e,t)=>e.filter(e=>{let n=t.toLocaleLowerCase(),r=e.email.toLocaleLowerCase(),i=e.name.toLocaleLowerCase(),a=r.includes(n),o=i.includes(n),s=t===`verified`&&e.verified,c=t===`!verified`&&!e.verified,l=t===`mfa`&&e.otpEnabled,u=t===`!mfa`&&!e.otpEnabled;return a||o||s||c||l||u}).sort((e,t)=>e.name.localeCompare(t.name))),Ko=D(kn,e=>e.userUrl.split(`/`).pop()||``),qo=D(Ho,Ko,(e,t)=>e[t]||L.users.empty),Jo=D(qo,e=>e.superuser||e.readOnlyImpersonate),Yo=D(qo,e=>e.verified),Xo=D((e,t)=>Uo(e,{id:t.id}),e=>!!e.externalId&&e.externalId.trim()!==``),rre=r({defaultOrgResponse:()=>ire,entities:()=>cre,hasOrganization:()=>es,selectHasBetaFeatures:()=>are,selectHasLlmGatewayV2:()=>rs,selectHasManyOrgs:()=>ts,selectHasPylonChat:()=>ore,selectOrganizationById:()=>Zo,selectOrganizationSelected:()=>ns,selectOrganizationSelectedId:()=>$o,selectOrganizationsAsList:()=>Qo}),ire=(e={})=>{let t=new Date().toISOString();return{address:``,city:``,created_at:t,updated_at:t,emergency_phone:``,id:``,name:``,ops_alert_email:``,primary_phone:``,security_alert_email:``,state:``,zip:``,sso_enforced:!1,_links:{billing_detail:{href:``},invitations:{href:``},roles:{href:``},security_officer:{href:``},self:{href:``},users:{href:``},...e._links},_type:`organization`,...e}},Zo=L.organizations.selectById,Qo=D(L.organizations.selectTable,e=>Object.values(e).filter(Ge).sort((e,t)=>new Date(t.updatedAt).getTime()-new Date(e.updatedAt).getTime())),$o=L.organizationSelected.select,es=e=>!!e.id,ts=D(Qo,e=>e.length>1),ns=D(Qo,$o,(e,t)=>e.length===0||!t?L.organizations.empty:e.find(e=>e.id===t)||L.organizations.empty),are=D($o,an,(e,t)=>t.isDev?!0:t.betaFeatureOrgIds.split(`,`).map(e=>e.trim()).filter(Boolean).includes(e)),ore=D($o,an,(e,t)=>t.pylonChatOrgIds?t.pylonChatOrgIds.split(`,`).map(e=>e.trim()).filter(Boolean).includes(e):!1),rs=D($o,an,(e,t)=>t.llmGatewayV2OrgIds?t.llmGatewayV2OrgIds.split(`,`).map(e=>e.trim()).filter(Boolean).includes(e):!1);function sre(e){return{id:e.id,name:e.name,updatedAt:e.updated_at,ssoEnforced:e.sso_enforced,billingDetailId:R(e._links.billing_detail),reauthRequired:e.reauth_required||!1,address:e.address||``,city:e.city||``,zip:e.zip||``,state:e.state||``,securityAlertEmail:e.security_alert_email||``,opsAlertEmail:e.ops_alert_email||``,emergencyPhone:e.emergency_phone||``,primaryPhone:e.primary_phone||``}}var cre={organization:vn({id:`organization`,save:L.organizations.add,deserialize:sre})},is=mr.get(`/users/:userId`,{supervisor:fr()},function*(e,t){if(yield*Te(()=>Yn(e,t)),!e.json.ok)return;let n=zo(e.json.value);if(n.selectedOrganizationId){let e=yield*p(e=>Zo(e,{id:n.selectedOrganizationId}));if(!e.id||e.reauthRequired)return;yield*L.update(L.organizationSelected.set(n.selectedOrganizationId))}}),as=mr.get(`/organizations/:orgId/users`,{supervisor:fr()}
1,function*(e,t){yield*t(),e.json.ok&&(yield*L.update(L.users.reset()))}),os=mr.post(`/users`,function*(e,t){let n=yield*p(on);e.request=e.req({body:JSON.stringify({...e.payload,origin:n})}),yield*t()}),ss=mr.post(`/claims/user`,function*(e,t){let n=yield*p(on);e.request=e.req({body:JSON.stringify({...e.payload,origin:n})}),yield*t()}),cs=mr.patch([`/users/:userId`,`name`],function*(e,t){e.request=e.req({body:JSON.stringify({name:e.payload.name})}),yield*t(),e.json.ok&&(e.loader={message:`Successfully updated your name!`})}),ls=mr.put([`/users/:userId`,`org`],function*(e,t){e.request=e.req({body:JSON.stringify({selected_organization_id:e.payload.orgId})}),yield*L.update(L.organizationSelected.set(e.payload.orgId)),yield*t()}),us=mr.post([`/users/:userId/email_verification_challenges`,`update`],yr),lre=mr.get(`/users/:userId/otp_recovery_codes`,mr.cache()),ure=mr.get(`/users/:userId/user_agreements`,{supervisor:fr()}),dre=mr.get(`/users/:userId/user_agreements/:id`,{supervisor:fr()}),ds=mr.post(`/users/:userId/user_agreements`,function*(e,t){e.request=e.req({body:JSON.stringify({agreement_type:e.payload.agreementType,agreement_version:e.payload.agreementVersion})}),yield*t()}),fre=L.userAgreements.selectById,fs=L.userAgreements.selectTableAsList,pre=D(fs,(e,t)=>t.userId,(e,t)=>e.filter(e=>e.userId===t)),mre=r({checkClaim:()=>ss,createUser:()=>os,createUserAgreement:()=>ds,defaultUserResponse:()=>tre,deserializeUser:()=>zo,deserializeUserAgreement:()=>Bo,entities:()=>hre,fetchRecoveryCodes:()=>lre,fetchUser:()=>is,fetchUserAgreement:()=>dre,fetchUserAgreements:()=>ure,fetchUsers:()=>as,findUserById:()=>Vo,selectCanImpersonate:()=>Jo,selectCurrentUser:()=>qo,selectCurrentUserId:()=>Ko,selectIsUserScimManaged:()=>Xo,selectIsUserVerified:()=>Yo,selectUserAgreementById:()=>fre,selectUserAgreementsAsList:()=>fs,selectUserAgreementsByUserId:()=>pre,selectUserById:()=>Uo,selectUsers:()=>Ho,selectUsersAsList:()=>Wo,selectUsersByIds:()=>nre,selectUsersForSearchTable:()=>Go,updateEmail:()=>us,updateUserName:()=>cs,updateUserOrg:()=>ls}),hre={user:vn({id:`user`,save:L.users.add,deserialize:zo}),user_agreement:vn({id:`user_agreement`,save:L.userAgreements.add,deserialize:Bo})},V=e(Pe()),gre=r({addCreditCard:()=>ks,createAchSetupIntent:()=>
1As,createBillingContact:()=>Is,createBillingDetail:()=>Cre,createStripeSource:()=>Ms,createVerificationAttempt:()=>zs,deactivateStripeSource:()=>Rs,defaultBillingDetailResponse:()=>bre,deleteBillingContact:()=>Ls,deserializeBillingContact:()=>xs,deserializeExternalPaymentSource:()=>bs,deserializeStripeSource:()=>hs,fetchBillingContacts:()=>Fs,fetchBillingDetail:()=>Ds,fetchExternalPaymentSources:()=>Ps,fetchStripeSources:()=>Ns,fetchTrials:()=>Vs,finalizeAchSetupIntent:()=>js,getStripe:()=>Os,isBankAccount:()=>vs,isLegacyBankAccount:()=>gs,isModernBankAccount:()=>_s,isVerified:()=>ys,selectBillingDetail:()=>Cs,selectExternalInvoicePortalUrl:()=>Ts,selectHasPaymentMethod:()=>ws,selectIsInvoicedExternally:()=>Es,stripeClient:()=>Sre,updateBillingAddress:()=>Us,updateBillingDetail:()=>Hs,updateDefaultPaymentMethod:()=>Bs,validateBillingAddressForm:()=>Ss}),ps=e=>e==null?``:String(e),ms=e=>e==null?void 0:String(e),hs=e=>({id:String(e.id),deactivatedAt:e.deactivated_at,description:e.description,stripeTokenId:e.stripe_token_id,stripeType:ps(e.stripe_type),stripeMetadata:e.stripe_metadata?{name:ms(e.stripe_metadata.name),last4:ms(e.stripe_metadata.last4),expMonth:e.stripe_metadata.exp_month,expYear:e.stripe_metadata.exp_year,bankName:ms(e.stripe_metadata.bank_name),status:ms(e.stripe_metadata.status),setupIntentId:ms(e.stripe_metadata.setup_intent_id),hostedVerificationUrl:ms(e.stripe_metadata.hosted_verification_url)}:null}),_re=[`bank_account`,`bank-account`,`bankaccount`],vre=[`usbankaccount`,`us_bank_account`,`us-bank-account`],gs=e=>_re.includes(ps(e.stripeType).toLowerCase()),_s=e=>vre.includes(ps(e.stripeType).toLowerCase()),vs=e=>gs(e)||_s(e),ys=e=>e.stripeMetadata?.status===`verified`,bs=e=>({id:String(e.id),description:e.description}),xs=e=>({id:String(e.id),name:e.name,email:e.email}),yre=/^[0-9]{5}(?:-[0-9]{4})?$/;function Ss(e){if(!e.streetOne.trim()||!e.city.trim()||!e.state.trim()||!e.postCode.trim()||!e.country.trim())return`Please fill in all required fields.`;if(e.country===`US`&&!yre.test(e.postCode.trim()))return`Invalid Zip Code`;if([`US`,`CA`].includes(e.country)&&e.state===`NA`)return`State is required`}var bre=(e={})=>({id:``,organization_details_json:{},invoiced_externally:!1,external_invoice_portal_url:``,_links:{payment_method:mn()},...e}),xre=e=>({id:e.id,organizationDetailsJson:e.organization_details_json||{},paymentMethodUrl:e._links.payment_method?e._links.payment_method.href:``,invoicedExternally:e.invoiced_externally||!1,externalInvoicePortalUrl:e.external_invoice_portal_url||``}),Cs=L.billingDetail.select,ws=D(Cs,e=>e.paymentMethodUrl!==``),Ts=D(Cs,e=>e.externalInvoicePortalUrl),Es=D(Cs,e=>e.invoicedExternally),Ds=hr.get(`/billing_details/:id`,function*(e,t){yield*t(),e.json.ok&&(yield*L.update(L.billingDetail.set(xre(e.json.value))))});async function Os(e){return _e.setLoadParameters({advancedFraudSignals:!1}),_e(e)}var Sre={getStripe:Os},ks=qn.create(`add-credit-card`,[v.loader(L),function*(e,t){let n=yield*p(an),r=yield*Ms.run(e.payload);if(!r.json.ok)throw r.json.error;let i=yield*Hs.run({id:e.payload.id,paymentMethodUrl:`${n.billingUrl}/stripe_sources/${r.json.value.id}`,address1:e.payload.address1,address2:e.payload.address2,city:e.payload.city,state:e.payload.state,country:e.payload.country,zipcode:e.payload.zipcode});if(!i.json.ok)throw i.json.error;yield*L.update(L.loaders.success({id:e.key,message:`Successfully added stripe payment method!`})),yield*t()}]),As=hr.post(`/billing_details/:id/ach_setup_intents`,function*(e,t){e.request=e.req({body:JSON.stringify({})}),yield*t(),e.json.ok&&(e.loader={meta:{clientSecret:e.json.value.client_secret}})}),js=hr.post(`/billing_details/:id/ach_setup_intents/:setupIntentId/finalize`,function*(e,t){e.request=e.req({body:JSON.stringify({})}),yield*t(),e.json.ok&&e.json.value.stripe_metadata?.status===`verified`&&(e.loader={message:`Bank account verified`})}),Ms=hr.post(`/billing_details/:id/stripe_sources`,function*(e,t){let n={stripe_token_id:e.payload.stripeTokenId};e.request=e.req({body:JSON.stringify(n)}),yield*t(),e.json.ok&&(e.loader={message:`Successfully added stripe payment method!`})}),Ns=hr.get(`/billing_details/:id/stripe_sources`,hr.cache()),Ps=hr.get(`/billing_details/:id/external_payment_sources`,hr.cache()),Fs=hr.get(`/billing_details/:id/billing_contacts`,hr.cache()),Is=hr.post(`/billing_details/:id/billing_contacts`,function*(e,t){e.request=e.req({body:JSON.stringify({name:e.payload.name,email:e.payload.email})}),yield*t(),e.json.ok&&(e.loader={message:`Billing contact added`})}
1),Ls=hr.delete(`/billing_contacts/:id`,function*(e,t){yield*t(),e.json.ok&&(e.loader={message:`Billing contact removed`})}),Rs=hr.put(`/stripe_sources/:id`,function*(e,t){e.request=e.req({body:JSON.stringify({deactivated_at:new Date().toISOString()})}),yield*t(),e.json.ok&&(e.loader={message:`Payment method removed`})}),zs=hr.post(`/stripe_sources/:stripeSourceId/verification_attempts`,function*(e,t){e.request=e.req({body:JSON.stringify({amount_decimal1:e.payload.amountDecimal1,amount_decimal2:e.payload.amountDecimal2})}),yield*t(),e.json.ok&&(e.loader={message:`Bank account verified`})}),Bs=qn.create(`update-default-payment-method`,[v.loader(L),function*(e,t){let n=yield*p(Cs),r=yield*Hs.run({id:e.payload.billingDetailId,paymentMethodUrl:e.payload.paymentMethodUrl});if(!r.json.ok)throw r.json.error;yield*L.update(L.billingDetail.set({...n,paymentMethodUrl:e.payload.paymentMethodUrl})),yield*t()}]),Vs=hr.get(`/billing_details/:id/trials`,{supervisor:ur()},hr.cache()),Cre=hr.post(`/billing_details`,function*(e,t){e.request=e.req({body:JSON.stringify({id:e.payload.orgId,organization_details_json:{name:e.payload.orgName}})}),yield*t()}),Hs=hr.patch(`/billing_details/:id`,function*(e,t){let n=yield*p(Cs),r=e.payload.address1!==void 0||e.payload.address2!==void 0||e.payload.city!==void 0||e.payload.state!==void 0||e.payload.zipcode!==void 0||e.payload.country!==void 0,i=n.organizationDetailsJson?.billing_address||{},a={organization_details_json:r?{...n.organizationDetailsJson,billing_address:{street_one:e.payload.address1??i.street_one??``,street_two:e.payload.address2??i.street_two??``,city:e.payload.city??i.city??``,state:e.payload.state??i.state??``,post_code:e.payload.zipcode??i.post_code??``,country:e.payload.country??i.country??``}}:n.organizationDetailsJson};e.payload.paymentMethodUrl!==void 0&&(a.payment_method=e.payload.paymentMethodUrl),e.request=e.req({body:JSON.stringify(a)}),yield*t()}),Us=qn.create(`update-billing-address`,[v.loader(L),function*(e,t){let n=yield*Hs.run({id:e.payload.id,address1:e.payload.address1,address2:e.payload.address2,city:e.payload.city,state:e.payload.state,zipcode:e.payload.zipcode,country:e.payload.country});if(!n.json.ok)throw n.json.error;let r=yield*Ds.run({id:e.payload.id});if(!r.json.ok)throw r.json.error;e.loader={message:`Billing address updated`},yield*t()}]),Ws=`auth`,Gs=e=>e===`otp_token_required`,wre=e=>e===`unprocessable_entity`||e===`invalid_credentials`||e===`invalid_email`||e===`unsupported_grant_type`||e===`access_de
1nied`||e===`invalid_scope`||e===`use_invitation`,Ks=e=>{let t=e?.exception_context||{};return{error:``,code:0,verified:!1,id:``,...e,exception_context:{...t}}},Tre=r({resetStore:()=>qs,sagas:()=>Ore}),qs=dn(`RESET_STORE`);function*Ere(){for(;;)yield*h([`${Jn}`,`${qs}`]),yield*(yield*g.expect()).reset([`redirectPath`,`entities`,`signal`,`env`,`notices`]),yield*L.update(L.loaders.success({id:y}))}function*Dre(){for(;;)yield*h(`${qs}`),(yield*p(L.signal.select)).abort(`reset store`),yield*L.update(L.signal.set(new AbortController))}var Ore={watchResetStore:Ere,watchSignal:Dre},Js=ln(`tuna`);function Ys(e,t=null){Js(e,t);{let n=window;if(n===void 0||!n.aptible||typeof n.aptible.event!=`function`)return;n.aptible.event(e,t)}}function kre(e,t){Js(`identify`,e);{let n=window;if(n===void 0||!n.aptible||typeof n.aptible.identify!=`function`)return;n.aptible.identify(e,t)}}var Are=(e,t,n=250)=>{let r=(0,V.useRef)(void 0);return{onMouseEnter:()=>{r.current=setTimeout(()=>Ys(e,t),n)},onMouseLeave:()=>clearTimeout(r.current)}};function jre(e){try{let t=xn(e.accessToken);t.email&&kre(t.email,R({href:e?.userUrl})||void 0)}catch{}}var Xs=qn.create(`set-token`,function*(e,t){yield*L.update(L.token.set(e.payload)),jre(e.payload),yield*t()});function*Zs(e){if(!e.json.ok)return;let t=wn(e.json.value);e.actions.push(Xs(t))}var Qs=mr.get(`/current_token`,function*(e,t){e.noToken=!0,yield*t(),yield*Zs(e)}),$s=mr.post(`/tokens`,function*(e,t){e.request=e.req({body:JSON.stringify({username:e.payload.username,password:e.payload.password,otp_token:e.payload.otpToken,u2f:e.payload.u2f,previous_login_attempt_id:e.payload.previousLoginAttemptId,expires_in:43200,grant_type:`password`,scope:`manage`,_source:`deploy`})}),yield*t(),yield*Zs(e)}),ec=mr.post(`create-elevated-token`,function*(e,t){if(e.credentials=`omit`,e.request=e.req({url:`/tokens`,method:`POST`,body:JSON.stringify({username:e.payload.username,password:e.payload.password,otp_token:e.payload.otpToken,u2f:e.payload.u2f,previous_login_attempt_id:e.payload.previousLoginAttemptId,expires_in:1800,grant_type:`password`,scope:`elevated`,_source:`deploy`})}),yield*t(),!e.json.ok)return;Ys(`elevated-token`,e.payload.username);let n=wn(e.json.value);yield*L.update(L.elevatedToken.set(n))}),tc=mr.post(`exchange-token`,function*(e,t){let{actorToken:n,subjectToken:r,subjectTokenType:i,scope:a,ssoOrganization:o=``}=e.payload;if(e.request=e.req({url:`/tokens`,method:`POST`,body:JSON.stringify({expires_in:86090,_source:`app-ui`,grant_type:`urn:ietf:params:oauth:grant-type:token-exchange`,actor_token_type:`urn:ietf:params:oauth:token-type:jwt`,actor_token:n,subject_token_type:i,subject_token:r,scope:a,sso_organization:o})}),yield*t(),!e.json.ok)return;let s=wn(e.json.value);yield*be([qs(),Xs(s),{type:`REFRESH_DATA`}]),e.loader={message:`Success`},Ys(`exchanged-token`,e.payload)}),nc=mr.post(`/tokens/revoke_all_accessible`,function*(e,t){e.elevated=!0;let n=yield*p(an),r=yield*p(kn),i=yield*p(L.elevatedToken.select);e.request=e.req({body:JSON.stringify({except_tokens:[`${n.authUrl}/tokens/${r.tokenId}`,`${n.authUrl}/tokens/${i.tokenId}`]})}),yield*t(),e.json.ok&&(Ys(`revoked-all-tokens`),e.loader={message:`Successfully logged out of other sessions! You may wish to log out of this session, as well.`})});function*rc(e,t){yield*t(),e.json.ok&&(yield*nc.run(),e.loader={message:`${e.loader?.message||`Success!`} Other sessions have been logged out.`})}var ic=mr.post(`create-activity-logs-token`,function*(e,t){e.credentials=`omit`;let n=yield*p(kn),r=yield*p(Nn),i=r._type===`org`?r.act.email:r.email;if(e.request=e.req({url:`/tokens`,method:`POST`,body:JSON.stringify({grant_type:`urn:ietf:params:oauth:grant-type:token-exchange`,actor_token_type:`urn:ietf:params:oauth:token-type:jwt`,actor_token:n.accessToken,subject_token_type:`aptible:user:email`,subject_token:i,scope:`activity_logs`,expires_in:e.payload.expiresIn,_source:`app-ui`})}),yield*t(),!e.json.ok)return;let a=e.json.value.access_token;yield*L.update(L.activityLogsToken.set(a)),Ys(`created-activity-logs-token`),e.loader={message:`Activity logs token created successfully`}}),ac=qn.create(`reset-activity-logs-token`,function*(e,t){yield*L.update(L.activityLogsToken.reset()),yield*t()}),Mre=ln(`webauthn`);function oc(){let e=null;if(window)e=window;else if(global)e=global;else return!1;return e.PublicKeyCredential!==void 0}function sc(e){if(!oc())throw Error(`webauthn not supported for browser`);return le(e)}function cc(e){if(!oc())throw Error(`webauthn not supported for browser`);if(!e)throw Error(`payload cannot be undefined`);let t={challenge:e.challenge,rpId:e.rpId,allowCredentials:e.allowCredentials,timeout:e.timeout,extensions:e.extensions,userVerification:`discouraged`};return Mre(`SECURITY KEY GET BLOB`,t),ee({publicKey:t})}var lc=mr.post(`/users/:userId/u2f_devices`,[function*(e,t){e.elevated=!0;let{u2f:n,name:r}=e.payload;e.request=e.req({body:JSON.stringify({u2f:n,name:r,version:`WEBAUTHN`})}),yield*t()},rc]),Nre=ln(`login`),uc=qn.create(`login`,function*(e,t){let n=e.name;yield*L.update(L.loaders.start({id:n}));let r=yield*Te(()=>$s.run($s(e.payload)));if(!r.json.ok){let{error:e,code:t,exception_context:i,message:a}=r.json.error;yield*L.update(L.loaders.error({id:n,message:a,meta:Ks({error:e,code:t,exception_context:i})}));return}!e.payload.u2f&&e.payload.otpToken===``&&Nre(yield*Te(()=>ec.run(ec(e.payload)))),yield*t(),e.actions.push({type:`REFRESH_DATA`}),yield*L.update([L.loaders.success({id:n}),L.loaders.success({id:Ws})])}),dc=qn.create(`login-webauthn`,function*(e,t){let n=e.key,{webauthn:r,...i}=e.payload;if(r)try{let e=yield*Te(()=>cc(r.payload));yield*Te(()=>uc.run(uc({...i,u2f:e}))),yield*t()}catch(e){console.error(e),yield*L.update(L.loaders.error({id:n,message:e.message,meta:Ks({exception_context:{u2f:r}})}))}}),fc=mr.delete(`/tokens/:id`),pc=qn.create(`logout`,function*(e,t){yield*L.update(L.loaders.start({id:e.name}));let n=yield*p(kn),r=yield*p(L.elevatedToken.select);yield*yield*S([()=>fc.run(fc({id:n.tokenId})),()=>fc.run(fc({id:r.tokenId}))]),yield*t(),yield*be(qs()),yield*L.update([L.elevatedToken.reset(),L.loaders.success({id:e.name})])}),Pre=`https://api.hsforms.com/submissions/v3/integration/submit/20235662/9ff54b8a-a71e-464c-95e5-a7fff6511cac`,Fre=[`utm_campaign`,`utm_medium`,`utm_source`,`utm_term`,`gclid`],mc=(e,t)=>({objectTypeId:`0-1`,name:e,value:t}),Ire=e=>{let t=window;if(t===void 0)return;let n=new URLSearchParams(t.location.search);for(let t of Fre){let r=n.get(t);r&&e.fields.push(mc(t,r))}},Lre=async(e,t,n,r)=>
1{let[i,...a]=e.split(` `),o={fields:[mc(`firstname`,i),mc(`lastname`,a.toString()),mc(`email`,t),mc(`company`,n),mc(`organization_id`,r)],context:{pageUri:`${window.location.origin}${window.location.pathname}`,pageName:window.document.title}};Ire(o),await fetch(Pre,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(o)})},hc=mr.get(`/organizations`,{supervisor:ur()},function*(e,t){if(yield*t(),!e.json.ok)return;let n=yield*p($o),r=[...e.json.value._embedded.organizations].sort((e,t)=>new Date(t.updated_at).getTime()-new Date(e.updated_at).getTime());if(!r.find(e=>e.id===n)&&r.length>0){let e=r[0];if(!e)return;yield*L.update(L.organizationSelected.set(e.id))}}),gc=mr.get(`/reauthenticate_organizations`,{supervisor:ur()},function*(e,t){if(yield*t(),!e.json.ok)return;let n=e.json.value._embedded.organizations.map(e=>({...e,reauth_required:!0}));e.json.value._embedded={organizations:n}}),_c=mr.post(`/organizations`,function*(e,t){let{name:n}=e.payload;e.request=e.req({body:JSON.stringify({name:n})}),yield*t();let r=yield*p(kn);e.json.ok&&(yield*Te(()=>tc.run(tc({actorToken:r.accessToken,subjectToken:r.userUrl,subjectTokenType:`aptible:user:href`,scope:`manage`}))),yield*L.update(L.organizationSelected.set(e.json.value.id)))}),vc=mr.patch(`/organizations/:id`,function*(e,t){e.request=e.req({body:JSON.stringify({name:e.payload.name,address:e.payload.address,city:e.payload.city,state:e.payload.state,zip:e.payload.zip,security_alert_email:e.payload.securityAlertEmail,ops_alert_email:e.payload.opsAlertEmail,emergency_phone:e.payload.emergencyPhone,primary_phone:e.payload.primaryPhone})}),yield*t(),e.json.ok&&(e.loader={message:`Successfully updated contact settings!`})}),yc=mr.patch([`/organizations/:id`,`sso`],function*(e,t){e.request=e.req({body:JSON.stringify({sso_enforced:e.payload.ssoEnforced})}),yield*t(),e.json.ok&&(e.loader={message:e.payload.ssoEnforced?`Successfully enabled organization SSO enforcement!`:`Successfully disabled organization SSO enforcement!`})}),bc=mr.delete(`/organizations/:orgId/users/:userId`),xc=ln(`signup`),Sc=qn.create(`signup`,function*(e,t){let{company:n,name:r,email:i,password:a,challengeToken:o}=e.payload,s=e.key;yield*L.update(L.loaders.start({id:s}));let c;if(o===``&&(c=yield*Te(ss.run(e.payload))),xc(c),c&&!c.json.ok){let{message:e,...t}=c.json.error;yield*L.update(L.loaders.error({id:s,message:e,meta:Ks(t)}));return}let l=yield*Te(os.run(e.payload));if(xc(l),!l.json.ok){let{message:e,...t}=l.json.error;yield*L.update(L.loaders.error({id:s,message:e,meta:Ks(t)}));return}Ys(`nux.signup.created-user`,i);let u=yield*Te($s.run({username:i,password:a,otpToken:``}));if(xc(u),!u.json.ok){let{message:e,...t}=u.json.error;yield*L.update(L.loaders.error({id:s,message:e,meta:Ks(t)}));return}if(n!==``){let e=yield*Te(_c.run({name:n}));if(yield*L.update(L.loaders.start({id:s})),xc(e),!e.json.ok){let{message:t,...n}=e.json.error;yield*L.update(L.loaders.error({id:s,message:t,meta:Ks(n)}));return}let t=e.json.value.id;Lre(r,i,n,t)}xc(yield*Te(ec.run({username:i,password:a,otpToken:``}))),e.actions.push({type:`REFRESH_DATA`}),yield*L.update([L.loaders.success({id:s,meta:Ks({id:`${l.json.value.id}`,verified:l.json.value.verified})}),L.loaders.success({id:Ws})]),yield*t()}),Cc=mr.post(`/verifications`,{supervisor:j},function*(e,t){let{challengeId:n,verificationCode:r,userId:i}=e.payload;e.request=e.req({body:JSON.stringify({type:`email_verification_challenge`,challenge_id:n,verification_code:r})}),yield*t(),e.json.ok&&(yield*L.update(L.users.patch({[i]:{id:i,verified:!0}})))}),wc=mr.post(`/users/:userId/email_verification_challenges`,function*(e,t){let{origin:n}=e.payload;e.request=e.req({body:JSON.stringify({origin:n})}),yield*t(),e.json.ok&&(e.loader={message:`Success! You should receive an email shortly.`})}),Tc=mr.get(`/users/:userId/email_verification_challenges`,function*(e,t){e.elevated=!0,e.cache=!0,yield*t()}),Ec=mr.delete(`/email_verification_challenges/:id`,function*(e,t){e.elevated=!0,yield*t()}),Dc=qn.create(`elevate`,function*(e,t){let n=e.name;yield*L.update(L.loaders.start({id:n}));let r=yield*Te(()=>ec.run(ec(e.payload)));if(!r.json.ok){let{message:e,error:t,code:i,exception_context:a}=r.json.error;yield*L.update(L.loaders.error({id:n,message:e,meta:Ks({error:t,code:i,exception_context:a})}));return}yield*L.update(L.loaders.success({id:n})),yield*t()}),Oc=qn.create(`elevate-webauthn`,function*(e,t){let{webauthn:n,...r}=e.payload;if(!n)return;let i=e.key;yield*L.update(L.loaders.start({id:i}));try{let e=yield*Te(()=>cc(n.payload));yield*Te(()=>Dc.run(Dc({...r,u2f:e}))),yield*t(),yield*L.update(L.loaders.success({id:i}))}catch(e){yield*L.update(L.loaders.error({id:i,message:e.message,meta:Ks({exception_context:{u2f:n}})}))}}),Rre=(e={})=>{let t=new Date().toISOString();return{id:``,entity_id:``,sign_in_url:``,sign_out_url:``,name_format:``,certificate:``,certificate_fingerprint:``,certificate_fingerprint_algo:``,aptible_certificate:``,a
1ptible_private_key:``,created_at:t,updated_at:t,handle:``,_links:{organization:mn()},_type:`saml_configuration`,...e}},kc=mr.get(`/saml_configurations`,mr.cache()),Ac=e=>window.btoa(e.trim()),jc=mr.post(`/organizations/:orgId/saml_configurations`,function*(e,t){e.request=e.req({body:JSON.stringify({metadata:Ac(e.payload.metadata),metadata_url:e.payload.metadataUrl.trim()})}),yield*t(),e.json.ok&&(e.loader={message:`Success!`})}),Mc=mr.patch(`/saml_configurations/:samlId`,function*(e,t){e.request=e.req({body:JSON.stringify({metadata:Ac(e.payload.metadata),metadata_url:e.payload.metadataUrl.trim()})}),yield*t(),e.json.ok&&(e.loader={message:`Success!`})}),Nc=mr.patch([`/saml_configurations/:samlId`,`handle`],function*(e,t){e.request=e.req({body:JSON.stringify({handle:e.payload.handle})}),yield*t(),e.json.ok&&(e.loader={message:`Success!`})}),Pc=mr.delete(`/saml_configurations/:id`),Fc=mr.get(`/organizations/:orgId/whitelist_memberships`,mr.cache()),Ic=mr.post(`/organizations/:orgId/whitelist_memberships`,function*(e,t){e.request=e.req({body:JSON.stringify({user_id:e.payload.userId})}),yield*t()}),Lc=mr.delete(`/whitelist_memberships/:id`,mr.cache()),Rc=(e,t)=>e.some(e=>R(e._links.user)===t),zre=(e={})=>{let t=new Date().toISOString();return{id:``,organization_id:``,default_role_id:``,token_id:``,created_at:t,updated_at:t,unique_identifier:``,_type:`scim_configuration`,...e}},zc=mr.get(`/scim_configurations`,mr.cache()),Bc=mr.post(`/scim_configurations`,function*(e,t){e.request=e.req({body:JSON.stringify({scim_configuration:{organization_id:e.payload.orgId,default_role_id:e.payload.defaultRoleId,unique_identifier:`email`}})}),yield*t(),e.json.ok&&(e.loader={message:`Success!`})}),Vc=mr.patch(`/scim_configurations/:scimId`,function*(e,t){e.request=e.req({body:JSON.stringify({scim_configuration:{organization_id:e.payload.orgId,default_role_id:e.payload.defaultRoleId}})}),yield*t(),e.json.ok&&(e.loader={message:`Success!`})}),Hc=mr.delete(`/scim_configurations/:id`),Uc=L.scimToken.select,Wc=mr.post(`/scim_configurations/generate_token`,function*(e,t){if(e.request=e.req({body:JSON.stringify({scim_configuration_id:e.payload.scimConfigurationId,user_id:e.payload.userId})}),yield*t(),!e.json.ok)return;let n=e.json.value;yield*L.update(L.scimToken.set(n.token)),e.loader={message:`Token generated successfully!`}}),Gc=qn.create(`reset-scim-token`,function*(e,t){yield*L.update(L.scimToken.reset()),yield*t()}),Kc=mr.post(`/password/resets/new`,function*(e,t){let n=e.payload.email,r=yield*p(on);if(r&&n){if(e.request=e.req({body:JSON.stringify({email:n,origin:r})}),yield*t(),!e.json.ok){e.loader=e.json.error.error===`invalid_email`?{message:`If an Aptible account exists for that email address, we will email you instructions for resetting your password.`,meta:{fakeSuccess:!0}}:{message:`Error! Unable to submit request to reset your password: ${e.json.error.message} 2 `};return}e.loader={message:`If an Aptible account exists for that email address, we will email you instructions for resetting your password.`}}}),qc=mr.post([`/verifications`,`pass`],function*(e,t){let{challengeId:n,password:r,verificationCode:i}=e.payload;e.request=e.req({body:JSON.stringify({type:`password_reset_challenge`,challenge_id:n,password:r,verification_code:i})}),yield*t()}),Jc=mr.patch([`/users/:userId`,`pass`],[yr,rc]),Yc=mr.patch([`/users/:userId`,`addotp`],[yr,rc]),Xc=mr.patch([`/users/:userId`,`rmotp`],[yr,rc]),Bre=(e={})=>{let t=new Date().toISOString();return{id:``,privileged:!1,created_at:t,updated_at:t,_links:{user:mn(),role:mn()},...e,_type:`membership`}},Zc=e=>({id:e.id,privileged:e.privileged,createdAt:e.created_at,updatedAt:e.updated_at,userId:R(e._links.user),roleId:R(e._links.role)}),Vre={membership:vn({id:`membership`,save:L.memberships.add,deserialize:Zc})},Qc=L.memberships.findById,$c=L.memberships.selectTable,el=D(L.memberships.selectTableAsList,(e,t)=>t.roleId,(e,t)=>e.filter(e=>e.roleId===t)),tl=D(L.roles.selectTableAsList,L.memberships.selectTableAsList,Ho,(e,t,n)=>{let r={};for(let i of e)r[i.id]=t.filter(e=>e.roleId===i.id).map(e=>L.users.findById(n,{id:e.userId})).filter(e=>e.id!==``);return r}),nl=mr.post(`/roles/:id/memberships`,function*(e,t){e.request=e.req({body:JSON.stringify({user_url:e.payload.userUrl})}),yield*t()}),rl=mr.patch(`/memberships/:id`,function*(e,t){e.request=e.req({body:JSON.stringify({privileged:e.payload.privileged})}),yield*t()}),il=mr.delete(`/memberships/:id`),al=mr.get(`/roles/:roleId/memberships`),ol=mr.get(`/organizations/:orgId/roles/memberships`,{supervisor:j},function*(e,t){if(yield*t(),!e.json.ok)return;let n=Object.values(e.json.value._embedded).reduce((e,t)=>
2{let n=t.memberships.map(Zc);for(let t of n)e[t.id]=t;return e},{});yield*L.update(L.memberships.add(n))}),sl=qn.create(`update-user-memberships`,[Gn,function*(e,t){let{userId:n,add:r,remove:i}=e.payload,a=`${(yield*p(an)).authUrl}/users/${n}`,o=r.map(e=>Te(()=>nl.run({userUrl:a,id:e}))),s=[];for(let e=0;e<i.length;e+=1){let t=yield*Te(()=>al.run({roleId:i[e]}));if(!t.json.ok)continue;let r=t.json.value._embedded.memberships.find(e=>n===R(e._links.user));if(r){let e=Te(()=>il.run({id:r.id}));s.push(e)}}let c=(yield*yield*S(o)).map(e=>e.ok?e.value.json.ok?``:e.value.json.error.message:e.error.message).filter(Boolean);if(c.length>0)throw Error(c.join(`,`));let l=(yield*yield*S(s)).map(e=>e.ok?e.value.json.ok?``:e.value.json.error.message:e.error.message).filter(Boolean);if(l.length>0)throw Error(l.join(`,`));yield*t(),e.loader={message:`Successfully updated user roles!`}}]),Hre=r({AUTH_LOADER_ID:()=>Ws,addAllowlistMembership:()=>Ic,addOtp:()=>Yc,createActivityLogsToken:()=>ic,createMembership:()=>nl,createOrganization:()=>_c,createSamlConfiguration:()=>jc,createScimConfiguration:()=>Bc,createToken:()=>$s,createWebauthnDevice:()=>lc,defaultAuthLoaderMeta:()=>Ks,defaultMembershipResponse:()=>Bre,defaultSamlConfigurationResponse:()=>Rre,defaultScimConfigurationResponse:()=>zre,deleteAllowlistMembership:()=>Lc,deleteMembership:()=>il,deleteSamlConfiguration:()=>Pc,deleteScimConfiguration:()=>Hc,deleteToken:()=>fc,deserializeMembership:()=>Zc,elevate:()=>Dc,elevateToken:()=>ec,elevateWebauthn:()=>Oc,entities:()=>Vre,exchangeToken:()=>tc,fetchAllowlistMemberships:()=>Fc,fetchCurrentToken:()=>Qs,fetchEmailVerificationPending:()=>Tc,fetchMembershipsByOrgId:()=>ol,fetchMembershipsByRole:()=>al,fetchOrganizations:()=>hc,fetchReauthOrganizations:()=>gc,fetchSamlConfigurations:()=>kc,fetchScimConfigurations:()=>zc,findMembershipById:()=>Qc,forgotPass:()=>Kc,generateScimToken:()=>Wc,hasWebAuthnSupport:()=>oc,isAuthenticationError:()=>wre,isOtpError:()=>Gs,isUserAllowlisted:()=>Rc,login:()=>uc,loginWebauthn:()=>dc,logout:()=>pc,removeUserFromOrg:()=>bc,resendVerification:()=>wc,resetActivityLogsToken:()=>ac,resetPass:()=>qc,resetScimToken:()=>Gc,revokeAllTokens:()=>nc,revokeEmailVerification:()=>Ec,revokeTokensMdw:()=>rc,rmOtp:()=>Xc,selectMemberships:()=>$c,selectMembershipsByRoleId:()=>el,selectRoleToUsersMap:()=>tl,selectScimToken:()=>Uc,signup:()=>Sc,updateMembership:()=>rl,updateOrganization:()=>vc,updatePassword:()=>Jc,updateSamlConfiguration:()=>Mc,updateSamlHandle:()=>Nc,updateScimConfiguration:()=>Vc,updateSsoForOrganization:()=>yc,updateUserMemberships:()=>sl,verifyEmail:()=>Cc,webauthnCreate:()=>sc,webauthnGet:()=>cc}),cl=e=>e.charAt(0).toUpperCase()+e.slice(1),ll=e=>e?e.replace(/^[\s_]+|[\s_]+$/g,``).replace(/[_\s]+/g,` `).replace(/^[a-z]/,e=>e.toUpperCase()):``,ul=e=>e.replace(/([^A-Z])([A-Z])/g,`$1 $2`).replace(/[_-]+/g,` `).toLowerCase().replace(/(^\w|\b\w)/g,e=>e.toUpperCase()).replace(/\s+/g,` `).replace(/^\s+|\s+$/,``),Ure=e=>e.replace(/(\n)[^\S\n]+/g,`$1`),Wre=e=>e===`/`||/^\/\w+/.test(e),Gre=e=>e.slice(0,7),dl=e=>{if(!e)return``;let t=`${e}`.trim();return t===``||t===`0000000000000000000000000000000000000000`||t.toLowerCase()===`not used`?``:t},fl=e=>{if(!e)return``;let t=`${e}`.trim();return t===``||t.toLowerCase()===`not used`?``:t},pl=e=>e.replace(/\D/g,``),ml=e=>{let t=e.replace(/[^\d.]/g,``),n=t.indexOf(`.`);return n===-1?t:t.slice(0,n+1)+t.slice(n+1).replace(/\./g,``)},Kre=r({defaultDeploymentResponse:()=>qre,deploymentKind:()=>xl,deserializeDeployment:()=>hl,entities:()=>Zre,fetchDeploymentById:()=>wl,fetchDeployments:()=>Cl,fetchDeploymentsByAppId:()=>Tl,getDockerImageName:()=>Xre,getRegistryParts:()=>Jre,getRepoNameFromUrl:()=>Yre,rollbackTargetFor:()=>Sl,selectDeploymentById:()=>gl,selectDeployments:()=>_l,selectDeploymentsAsList:()=>vl,selectDeploymentsByAppId:()=>yl,selectDeploymentsBySourceId:()=>bl}),qre=(e={})=>{let t=new Date().toISOString();return{id:-1,status:``,docker_image:``,docker_repository_url:``,git_repository_url:``,git_ref:``,git_commit_sha:``,git_commit_url:``,git_commit_message:``,git_commit_timestamp:``,created_at:t,updated_at:t,_links:{app:mn(),operation:mn(),configuration:mn(),image:mn(),source:mn(),setting:mn(),...e._links},...e,_type:`deployment`}},hl=e=>{let t=e._links;return{id:`${e.id}`,status:e.status,dockerImage:e.docker_image||``,dockerRepositoryUrl:e.docker_repository_url||``,gitRepositoryUrl:e.git_repository_url||``,gitRef:e.git_ref||``,gitCommitSha:e.git_commit_sha||``,gitCommitUrl:e.git_commit_url||``,gitCommitMessage:e.git_commit_message||``,gitCommitTimestamp:e.git_commit_timestamp,createdAt:e.created_at,updatedAt:e.updated_at,appId:R(t.app),operationId:R(t.operation),imageId:R(t.image),configurationId:R(t.configuration),sourceId:R(t.source),settingId:R(t.setting)}},gl=L.deployments.selectById,_l=L.deployments.selectTable,vl=D(L.deployments.selectTableAsList,e=>e.sort((e,t)=>
2new Date(t.createdAt).getTime()-new Date(e.createdAt).getTime())),yl=D(vl,(e,t)=>t.appId,(e,t)=>e.filter(e=>e.appId===t)),bl=D(vl,(e,t)=>t.sourceId,(e,t)=>e.filter(e=>e.sourceId===t));function Jre(e){let[t,n]=e.split(`:`);return{name:t,tag:n}}function Yre(e){let t=new URL(e);return`${t.hostname}${t.pathname}`}function Xre(e){return e.dockerImage||`Dockerfile Build`}function xl(e){let t=!!dl(e.gitCommitSha),n=!!fl(e.dockerImage);return t&&n?`companion-repo`:t?`git`:n?`image`:`unknown`}function Sl(e){return e.imageId?{imageId:e.imageId}:null}var Cl=z.get(`/deployments?per_page=5000`,{supervisor:dr()}),wl=z.get(`/deployments/:id`),Tl=z.get(`/apps/:id/deployments`),Zre={deployment:vn({id:`deployment`,save:L.deployments.add,deserialize:hl})},Qre=r({defaultDeploySourceResponse:()=>$re,entities:()=>nie,fetchDeploymentsBySourceId:()=>Ml,fetchSourceById:()=>jl,fetchSources:()=>Al,findSourceById:()=>El,hasDeploySource:()=>tie,selectSourceById:()=>Dl,selectSources:()=>Ol,selectSourcesAsList:()=>kl}),$re=(e={})=>{let t=new Date().toISOString();return{id:-1,display_name:``,url:``,created_at:t,updated_at:t,...e,_type:`source`}},eie=e=>({id:`${e.id}`,displayName:e.display_name||`Unknown`,url:e.url,createdAt:e.created_at,updatedAt:e.updated_at}),tie=e=>e.id!==``,El=L.sources.findById,Dl=L.sources.selectById,Ol=L.sources.selectTable,kl=L.sources.selectTableAsList,Al=z.get(`/sources`,{supervisor:dr()}),jl=z.get(`/sources/:id`),Ml=z.get(`/sources/:id/deployments`),nie={source:vn({id:`source`,save:L.sources.add,deserialize:eie})},Nl=1024,Pl={m4:{name:`General Purpose (M) - Legacy`,cpuShare:.25/Nl,minimumContainerSize:Nl/2,maximumContainerSize:240*Nl,maximumContainerCount:32},m5:{name:`General Purpose (M)`,cpuShare:.25/Nl,minimumContainerSize:Nl/2,maximumContainerSize:368*Nl,maximumContainerCount:32},m:{name:`General Purpose (M)`,cpuShare:.25/Nl,minimumContainerSize:Nl/2,maximumContainerSize:368*Nl,maximumContainerCount:32},r4:{name:`Memory Optimized (R) - Legacy`,cpuShare:.125/Nl,minimumContainerSize:4*Nl,maximumContainerSize:472*Nl,maximumContainerCount:32},r5:{name:`Memory Optimized (R)`,cpuShare:.125/Nl,minimumContainerSize:4*Nl,maximumContainerSize:752*Nl,maximumContainerCount:32},r:{name:`Memory Optimized (R)`,cpuShare:.125/Nl,minimumContainerSize:4*Nl,maximumContainerSize:752*Nl,maximumContainerCount:32},c4:{name:`Compute Optimized (C) - Legacy`,cpuShare:.5/Nl,minimumContainerSize:2*Nl,maximumContainerSize:58*Nl,maximumContainerCount:32},c5:{name:`Compute Optimized (C)`,cpuShare:.5/Nl,minimumContainerSize:2*Nl,maximumContainerSize:368*Nl,maximumContainerCount:32},c:{name:`Compute Optimized (C)`,cpuShare:.5/Nl,minimumContainerSize:2*Nl,maximumContainerSize:368*Nl,maximumContainerCount:32}},Fl=e=>Pl[e]?.name||e,Il=e=>(e.containerMemoryLimitMb/1024*(Pl[e.instanceClass].cpuShare*1024)*100).toFixed(1),rie=(e={})=>{let t=new Date().toISOString();return{id:1,name:``,region:``,default:!0,public:!0,created_at:t,updated_at:t,outbound_ip_addresses:[],memory_limits:!1,cpu_limits:!1,intrusion_detection:!1,expose_intrusion_detection_reports:!1,allow_c_instance_profile:!0,allow_m_instance_profile:!0,allow_r_instance_profile:!0,allow_t_instance_profile:!0,allow_granular_container_sizes:!0,vertical_autoscaling:!1,horizontal_autoscaling:!1,internal_domain:`aptible.in`,default_domain:`on-aptible.com`,self_hosted:!1,aws_account_id:``,vpc_id:``,vpc_cidr:``,_links:{organization:{href:``}},_type:`stack`,...e}},Ll=e=>({id:`${e.id}`,name:e.name,region:e.region,default:e.default,public:e.public,createdAt:e.created_at,updatedAt:e.updated_at,outboundIpAddresses:e.outbound_ip_addresses,memoryLimits:e.memory_limits,cpuLimits:e.cpu_limits,intrusionDetection:e.intrusion_detection,exposeIntrusionDetectionReports:e.expose_intrusion_detection_reports,allowTInstanceProfile:e.allow_t_instance_profile,allowCInstanceProfile:e.allow_c_instance_profile,allowMInstanceProfile:e.allow_m_instance_profile,allowRInstanceProfile:e.allow_r_instance_profile,allowGranularContainerSizes:e.allow_granular_container_sizes,verticalAutoscaling:e.vertical_autoscaling,horizontalAutoscaling:e.horizontal_autoscaling,organizationId:R(e._links.organization),internalDomain:e.internal_domain,defaultDomain:e.default_domain,selfHosted:e.self_hosted,awsAccountId:e.aws_account_id,vpcId:e.vpc_id,vpcCidr:e.vpc_cidr}),Rl=L.stacks.findById,zl=L.stacks.selectById,Bl=L.stacks.selectTable,iie=D(L.stacks.selectTableAsList,e=>[...e].sort((e,t)=>
2e.name.localeCompare(t.name))),Vl=D(iie,$o,(e,t)=>e.filter(e=>e.organizationId===t||e.organizationId===``)),Hl=e=>({value:e.id,label:e.name}),aie=D(Vl,e=>e.map(Hl).sort((e,t)=>e.label.localeCompare(t.label))),Ul=D(Vl,(e,t)=>t.orgId,(e,t)=>e.filter(e=>e.organizationId===``||e.organizationId===t).map(Hl).sort((e,t)=>e.label.localeCompare(t.label))),Wl=D(Vl,e=>{let t=e.find(e=>e.default===!0),n=e.find(e=>e.name===`shared-us-west-1`);return t||n||L.stacks.empty}),Gl=e=>e.selfHosted?`self_hosted`:e.organizationId===``?`shared`:`dedicated`,Kl=e=>e.id!==``,ql=D(zl,e=>{let t={};return e.allowCInstanceProfile&&(t.c=Pl.c),e.allowMInstanceProfile&&(t.m=Pl.m),e.allowRInstanceProfile&&(t.r=Pl.r),t}),Jl=z.get(`/stacks?per_page=5000`,{supervisor:dr()},function*(e,t){yield*t(),e.json.ok&&(yield*L.update(L.stacks.reset()))}),Yl=z.get(`/stacks/:id`),Xl=z.get(`/stacks/:id/intrusion_detection_reports?page=:page&per_page=10`,{supervisor:fr()},z.cache()),Zl={stack:vn({id:`stack`,deserialize:Ll,save:L.stacks.add})},Ql=e=>{let t=Gl(e);return t===`self_hosted`?`Self-Hosted (${e.awsAccountId})`:cl(t)},oie=(e={})=>{let t=new Date().toISOString();return{id:1,organization_id:``,handle:``,created_at:t,updated_at:t,type:`development`,activated:!0,container_count:0,domain_count:0,total_disk_size:0,total_app_count:0,app_container_count:0,database_container_count:0,total_database_count:0,sweetness_stack:``,total_backup_size:0,onboarding_status:`unknown`,_embedded:{permissions:[]},_links:{stack:{href:``},...e._links},_type:`account`,...e}},$l=e=>({id:`${e.id}`,organizationId:e.organization_id,handle:e.handle,createdAt:e.created_at,updatedAt:e.updated_at,type:e.type,activated:e.activated,sweetnessStack:e.sweetness_stack,onboardingStatus:e.onboarding_status,stackId:R(e._links.stack),totalAppCount:e.total_app_count,totalDatabaseCount:e.total_database_count,totalBackupSize:e.total_backup_size}),eu=e=>({id:`${e.id}`,containerCount:e.container_count,domainCount:e.domain_count,totalDiskSize:e.total_disk_size,appContainerCount:e.app_container_count,databaseContainerCount:e.database_container_count,totalBackupSize:e.total_backup_size}),tu=L.environments.selectById,sie=L.environments.selectByIds,nu=L.environments.selectTable,ru=L.environments.selectTableAsList,iu=L.environments.findById,cie=L.environmentStats.selectById,lie=(e,t)=>e.filter(e=>e.stackId===t),au=D(ru,$o,(e,t)=>t===``?{}:e.filter(e=>e.organizationId===t).reduce((e,t)=>(e[t.id]=t,e),{})),ou=e=>e.type===`production`,su=D(au,e=>Object.values(e).filter(Ge)),cu=e=>({label:e.handle,value:e.id}),lu=e=>e.id!==``,uu=D(ru,(e,t)=>t.handle,(e,t)=>e.find(e=>e.handle===t)||L.environments.empty),du=z.get(`/accounts/:id`,function*(e,t){if(yield*t(),!e.json.ok)return;let n=eu(e.json.value);yield*L.update(L.environmentStats.add({[n.id]:n}))}),fu=z.get(`/accounts?per_page=5000&no_embed=true&metrics[]=app_count&metrics[]=database_count&metrics[]=backup_size`,{supervisor:dr()},function*(e,t){yield*t(),e.json.ok&&(yield*L.update(L.environments.reset()))}),pu=z.delete([`/accounts/:id`],function*(e,t){yield*t(),yield*L.update(L.environments.remove([e.payload.id]))}),mu=z.patch([`/accounts/:id`,`update-name`],function*(e,t){let n={handle:e.payload.handle};e.request=e.req({body:JSON.stringify(n)}),yield*t(),e.json.ok&&(e.loader={message:`Saved changes successfully!`})}),hu=D(ru,(e,t)=>t.stackId||``,(e,t)=>t===``?[...e].sort((e,t)=>e.id.localeCompare(t.id)):e.filter(e=>e.stackId===t).sort((e,t)=>e.id.localeCompare(t.id))),gu=z.patch(`/accounts/:id`,{supervisor:k},function*(e,t){let{id:n,status:r}=e.payload;if((yield*p(e=>tu(e,{id:n}))).onboardingStatus===r)return;yield*L.update(L.environments.patch({[n]:{onboardingStatus:r}}));let i={onboarding_status:r};e.request=e.req({body:JSON.stringify(i)}),yield*t()}),_u=z.post(`/accounts`,function*(e,t){let{name:n,stackId:r,orgId:i}=e.payload,a=yield*p(e=>zl(e,{id:r})),o={handle:n,organization_id:i,type:a.organizationId?`production`:`development`,onboarding_status:`initiated`};Kl(a)&&(o.stack_id=r),e.request=e.req({body:JSON.stringify(o)}),yield*t(),e.json.ok&&(e.loader={meta:{id:e.json.value.id}})}),vu={account:vn({id:`account`,deserialize:$l,save:L.environments.add})},uie=(e={})=>{let t=new Date().toISOString();return{id:0,handle:``,docker_repo:``,docker_ref:``,process_type:``,command:``,container_
2count:0,container_memory_limit_mb:0,instance_class:`m`,force_zero_downtime:!1,naive_health_check:!1,stop_timeout:null,created_at:t,deleted_at:``,updated_at:t,_type:`service`,...e,_links:{current_release:mn(),app:mn(),database:mn(),account:mn(),service_sizing_policy:mn(),...e._links}}},yu=e=>{let t=e._links,n=R(t.app),r=R(t.database),i=R(t.account),a=R(t.service_sizing_policy);return{id:`${e.id}`,appId:n,databaseId:r,environmentId:i,serviceSizingPolicyId:a,handle:e.handle,dockerRepo:e.docker_repo,dockerRef:e.docker_ref,processType:e.process_type,command:e.command||``,containerCount:e.container_count??0,containerMemoryLimitMb:e.container_memory_limit_mb||512,currentReleaseId:R(t.current_release),instanceClass:xu(e.instance_class||`m`),forceZeroDowntime:e.force_zero_downtime,naiveHealthCheck:e.naive_health_check,restartFreeScaling:e.restart_free_scaling??!1,stopTimeout:e.stop_timeout,createdAt:e.created_at,deletedAt:e.deleted_at,updatedAt:e.updated_at}},bu=e=>e.processType===`cmd`?`Docker CMD`:e.command,xu=e=>e.startsWith(`m`)?`m`:e.startsWith(`r`)?`r`:e.startsWith(`c`)?`c`:e,Su=e=>Pl[e]?Pl[e]:{name:``,cpuShare:0,minimumContainerSize:0,maximumContainerSize:0,maximumContainerCount:0},Cu=e=>({totalCPU:(()=>{let t=0;return e.forEach(e=>{e.containerCount!==0&&(t+=e.containerCount*e.containerMemoryLimitMb*Su(e.instanceClass).cpuShare)}),t})(),totalMemoryLimit:(()=>{let t=0;return e.forEach(e=>{e.containerCount!==0&&(t+=e.containerMemoryLimitMb*e.containerCount)}),t})()}),wu=e=>{let t=Pl[e.instanceClass||`m`];if(!t)throw Error(`could not find container profile for ${e.instanceClass}`);return{containerProfile:t,containerSizeGB:e.containerMemoryLimitMb/Nl,cpuShare:e.containerMemoryLimitMb*t.cpuShare}},die=e=>({force_zero_downtime:e.forceZeroDowntime,naive_health_check:e.naiveHealthCheck,restart_free_scaling:e.restartFreeScaling,stop_timeout:e.stopTimeout}),Tu=z.put(`/services/:id`,function*(e,t){if(e.request=e.req({body:JSON.stringify(die(e.payload))}),yield*t(),!e.json.ok){yield*L.update(L.loaders.error({id:e.key,message:`Failed to save settings`}));return}yield*L.update(L.loaders.success({id:e.key,message:`Settings saved`}))}),Eu=L.services.selectById,fie=L.services.selectByIds,Du=L.services.selectTable,Ou=e=>e.id!==``,ku=L.services.findById,pie=L.services.findByIds,Au=(e,t)=>e.filter(e=>e.appId===t),mie=(e,t)=>e.filter(e=>e.databaseId===t),ju=(e,t)=>e.filter(e=>e.environmentId===t),Mu=D(L.services.selectTableAsList,e=>[...e].sort((e,t)=>e.handle.localeCompare(t.handle))),Nu=D(Mu,e=>{let t={};return e.forEach(e=>
2{(e.appId||e.databaseId)&&(Object.hasOwn(t,e.environmentId)||(t[e.environmentId]=new Set),t[e.environmentId]?.add(e.id))}),t}),Pu=D(Nu,su,Du,(e,t,n)=>{let r=new Set;return t.forEach(t=>{let i=e[t.id];i&&[...i].map(e=>n[e]).filter(Ge).forEach(e=>{r.add(e)})}),[...r]}),Fu=D(Mu,(e,t)=>t.envId,ju),Iu=D(Mu,e=>{let t={};return e.forEach(e=>{e.appId&&(Object.hasOwn(t,e.appId)||(t[e.appId]=[]),t[e.appId]?.push(e.id))}),t}),Lu=z.get(`/services/:id`,function*(e,t){if(e.payload.waitForBootup&&(yield*fn()),e.payload.withDeleted){let t=e.req().url,n=new URL(t);n.searchParams.set(`with_deleted`,`true`),e.request=e.req({url:n.toString()})}yield*t()}),Ru=z.get(`/services?per_page=5000`,{supervisor:dr()},function*(e,t){e.payload?.waitForBootup&&(yield*fn()),yield*t(),e.json.ok&&(yield*L.update(L.services.reset()))}),zu=z.get(`/accounts/:id/services`),Bu=z.get(`/apps/:id/services`,{supervisor:fr()},function*(e,t){if(e.payload.waitForBootup&&(yield*fn()),e.payload.withDeleted){let t=e.req().url,n=new URL(t);n.searchParams.set(`with_deleted`,`true`),e.request=e.req({url:n.toString()})}yield*t()}),Vu={service:vn({id:`service`,deserialize:yu,save:L.services.add})},Hu=D(Mu,(e,t)=>t.appId,(e,t)=>e.filter(e=>e.appId===t)),Uu=e=>{let t=[];if(e.containerCount!==-1&&t.push(`${e.containerCount} container${e.containerCount>1?`s`:``}`),e.containerSize!==-1&&t.push(`${e.containerSize/1024} GB RAM`),e.diskSize!==0&&t.push(`${e.diskSize} GB Disk`),e.instanceProfile!==``){let n=Su(e.instanceProfile).name||e.instanceProfile;t.push(n)}return t.join(` ⢠`)},hie=(e={})=>{let t=new Date().toISOString();return{id:0,type:``,status:`unknown`,created_at:t,updated_at:t,git_ref:``,docker_ref:``,container_count:0,container_size:0,disk_size:0,encrypted_env_json_new:``,destination_region:``,automated:!1,cancelled:!1,aborted:!1,immediate:!1,provisioned_iops:0,ebs_volume_type:``,encrypted_stack_settings:``,instance_profile:``,user_name:``,user_email:``,env:{},note:``,_links:{account:{href:``},code_scan_result:{href:``},ephemeral_sessions:{href:``},logs:{href:``},resource:{href:``},self:{href:``},ssh_portal_connections:{href:``},user:{href:``},...e._links},_type:`operation`,...e}},Wu=e=>e||`unknown`,Gu=e=>e===`llm_key`?`LLM Key`:e===`vhost`?`Endpoint`:e===`external_aws_account`?`External AWS Account`:cl(e.replace(`_`,` `)),Ku=e=>({id:`${e.id}`,environmentId:R(e._links.account),codeScanResultId:R(e._links.code_scan_result),resourceId:R(e._links.resource),resourceType:gn(e._links.resource),type:Wu(e.type),status:e.status,createdAt:e.created_at,updatedAt:e.updated_at,gitRef:e.git_ref||``,dockerRef:e.docker_ref,containerCount:e.container_count??-1,containerSize:e.container_size??-1,diskSize:e.disk_size??0,instanceProfile:e.instance_profile||``,encryptedEnvJsonNew:e.encrypted_env_json_new,destinationRegion:e.destination_region,cancelled:e.cancelled,aborted:e.aborted,automated:e.automated,immediate:e.immediate,provisionedIops:e.provisioned_iops,ebsVolumeType:e.ebs_volume_type,encryptedStackSettings:e.encrypted_stack_settings,userEmail:e.user_email,userName:e.user_name,env:e.env||{},note:e.note}),qu=e=>e.id!==``,Ju=L.operations.selectById,Yu=D(L.operations.selectTableAsList,(e,t)=>t.limit,(e,t)=>[...e].sort((e,t)=>new Date(t.updatedAt).getTime()-new Date(e.updatedAt).getTime()).slice(0,t)),Xu=D(Yu,(e,t)=>t.resourceId,(e,t)=>e.filter(e=>e.resourceId===t)),Zu=D(Yu,(e,t)=>t.resourceIds,(e,t)=>{let n=[];for(let r=0;r<t.length;r+=1){let i=t[r],a=e.find(e=>e.resourceId===i&&e.type===`provision`);a&&n.push(a)}return n}),Qu=D(Yu,(e,t)=>t.envId,(e,t)=>e.filter(e=>e.environmentId===t)),$u=(e,t)=>e.filter(e=>e.resourceType===`service`&&e.resourceId===t),ed=(e,t)=>e.filter(e=>e.resourceType===`app`&&e.resourceId===t),td=(e,t)=>e.filter(e=>e.resourceType===`database`&&e.resourceId===t),nd=D(Yu,(e,t)=>t.id,$u),rd=D(Yu,(e,t)=>t.appId,ed),id=e=>e.find(e=>e.resourceType===`database`&&e.status===`succeeded`),ad=D(Yu,(e,t)=>t.dbId,td),gie=D(ad,e=>e.length>0?e[0]:L.operations.empty),_ie=D(rd,e=>e.find(e=>[`configure`,`provision`,`deploy`,`deprovision`].includes(e.type))||L.operations.empty),od=D(Yu,(e,t)=>t.resourceId,(e,t)=>t.resourceType,(e,t,n)=>e.find(e=>e.resourceId===t&&e.resourceType===n&&[`configure`,`configure_backup_policy`,`provision`,`deploy`,`deprovision`].includes(e.type))||L.operations.empty),sd=D(Yu,(e,t)=>t.id,(e,t)=>e.find(e=>e.resourceId===t&&e.resourceType===`external_aws_account`&&e.type===`sync`)||L.operations.empty),cd=D(Xu,(e,t)=>t.resourceType,(e,t)=>e.find(e=>e.type===`provision`&&e.resourceType===t)||L.operations.empty),ld=D(nd,e=>e.filter(e=>e.type===`scale`&&e.status!==`failed`)),ud=D(ld,e=>{if(e.length<2)return{latest:L.operations.empty,prev:L.operations.empty};let t={...e[0]},n={...e[1]};for(let r=1;r<e.length;r+=1){let i=e[r];n.containerCount===-1&&i.containerCount!==-1&&(n.containerCount=i.containerCount),n.containerSize===-1&&i.containerSize!==-1&&(n.containerSize=i.containerSize),n.diskSize===0&&i.diskSize!==0&&(n.diskSize=i.diskSize),n.instanceProfile===``&&i.instanceProfile!==``&&(n.instanceProfile=i.instanceProfile),t.containerCount===-1&&i.containerCount!==-1&&(t.containerCount=i.containerCount),t.containerSize===-1&&i.containerSize!==-1&&(t.containerSize=i.containerSize),t.diskSize===0&&i.diskSize!==0&&(t.diskSize=i.diskSize),t.instanceProfile===``&&i.instanceProfile!==``&&(t.instanceProfile=i.instanceProfile)}return{prev:n,latest:t}}),vie=D(rd,e=>e.find(e=>e.type===`scan_code`)||L.operations.empty),dd=D(rd,e=>e.find(e=>e.type===`configure`)||L.operations.empty),yie=e=>e.find(e=>e.type===`deploy`),bie=e=>e.find(e=>e.resourceType===`database`&&e.type===`provision`),fd=D(rd,e=>e.find(e=>e.type===`deploy`)||L.operations.empty),pd=D(rd,e=>e.find(e=>e.type===`deploy`&&e.codeScanResultId!==``)||L.operations.empty),md=e=>e.find(e=>e.type===`deploy`&&e.status===`succeeded`),xie=D(Qu,e=>md(e)||L.operations.empty),hd=e=>e.find(e=>e.type===`scan_code`&&e.status===`succeeded`),gd=D(rd,e=>hd(e)||L.operations.empty),_d=z.get(`/accounts/:envId/operations?page=:page&per_page=250`,{supervisor:j}),vd=qn.create(`fetch-all-env-ops`,{supervisor:fr()},vr(_d,{max:2}));function*yd(e,t){if(yield*t(),!e.json.ok)return;let n=e.json.value._embedded.operations.map(e=>`${e.id}`),r={...e.json.value,_embedded:{operations:n}};yield*L.update(L.cache.add({[e.key]:r}))}var bd={resourceType:``,operationType:``,operationStatus:``,startDate:``,endDate:``},xd=dn(`cancel-org-ops-poll`),Sd=z.get(`/organizations/:orgId/operations`,{supervisor:o(1e4,`${xd}`)}
2,function*(e,t){yield*t();let n=wd({page:1,id:e.payload.orgId,...bd});yield*yd({...e,key:n.payload.key},function*(){})}),Sie=z.get([`/organizations/:orgId/operations?page=1`,`poll-by-types`],{supervisor:o(1e4,`${xd}`)},function*(e,t){let n=e.payload.operationTypes.join(`,`),r=Cd({...bd,operationType:n});e.request=e.req({url:`${e.req().url}${r}`}),yield*t();let i=wd({page:1,id:e.payload.orgId,...bd,operationType:n});yield*yd({...e,key:i.payload.key},function*(){})});function Cd(e){let t=new URLSearchParams;e.resourceType&&t.set(`resource_type`,e.resourceType),e.operationType&&t.set(`type`,e.operationType),e.operationStatus&&t.set(`status`,e.operationStatus),e.startDate&&t.set(`start_date`,e.startDate),e.endDate&&t.set(`end_date`,e.endDate);let n=t.toString();return n?`&${n}`:``}var wd=z.get(`/organizations/:id/operations?page=:page`,{supervisor:ur()},function*(e,t){let n=Cd(e.payload);e.request=e.req({url:`${e.req().url}${n}`}),yield*yd(e,t)}),Td=z.get(`/accounts/:id/operations?page=:page`,{supervisor:ur()},function*(e,t){let n=Cd(e.payload);e.request=e.req({url:`${e.req().url}${n}`}),yield*yd(e,t)}),Ed=z.get(`/external_aws_accounts/:id/operations?page=:page`,{supervisor:ur()},function*(e,t){let n=Cd(e.payload);e.request=e.req({url:`${e.req().url}${n}`}),yield*yd(e,t)}),Dd=dn(`cancel-external-aws-account-ops-poll`),Cie=z.get([`/external_aws_accounts/:id/operations`,`poll`],{supervisor:o(1e4,`${Dd}`)},function*(e,t){yield*t();let n=Ed({page:1,id:e.payload.id,...bd});yield*yd({...e,key:n.payload.key},function*(){})}),Od=dn(`cancel-env-ops-poll`),kd=z.get([`/accounts/:envId/operations?page=1`,`poll`],{supervisor:o(1e4,`${Od}`)},function*(e,t){yield*t();let n=Td({page:1,id:e.payload.envId,...bd});yield*yd({...e,key:n.payload.key},function*(){})}),Ad=z.get(`/apps/:id/operations?page=:page&with_services=true`,{supervisor:ur()},function*(e,t){let n=Cd(e.payload);e.request=e.req({url:`${e.req().url}${n}`}),yield*yd(e,t)}),jd=dn(`cancel-app-ops-poll`),Md=z.get([`/apps/:id/operations?with_services=true`,`poll`],{supervisor:o(1e4,`${jd}`)},function*(e,t){yield*t();let n=Ad({page:1,id:e.payload.id,...bd});yield*yd({...e,key:n.payload.key},function*(){})}),Nd=z.get(`/databases/:id/operations?page=:page&with_services=true`,{supervisor:ur()},function*(e,t){let n=Cd(e.payload);e.request=e.req({url:`${e.req().url}${n}`}),yield*yd(e,t)}),Pd=dn(`cancel-db-ops-poll`),Fd=z.get([`/databases/:id/operations?with_services=true`,`poll`],{supervisor:o(1e4,`${Pd}`)},function*(e,t){yield*t();let n=Nd({page:1,id:e.payload.id,...bd});yield*yd({...e,key:n.payload.key},function*(){})}),Id=z.get(`/services/:id/operations?page=:page`,{supervisor:ur()},function*(e,t){let n=Cd(e.payload);e.request=e.req({url:`${e.req().url}${n}`}),yield*yd(e,t)}),Ld=dn(`cancel-services-ops-poll`),Rd=z.get([`/services/:id/operations`,`poll`],{supervisor:o(1e4,`${Ld}`)},function*(e,t){yield*t();let n=Id({page:1,id:e.payload.id,...bd});yield*yd({...e,key:n.payload.key},function*(){})}),zd=z.get(`/vhosts/:id/operations?page=:page`,{supervisor:ur()},function*(e,t){let n=Cd(e.payload);e.request=e.req({url:`${e.req().url}${n}`}),yield*yd(e,t)}),Bd=dn(`cancel-enp-ops-poll`),wie=z.get([`/vhosts/:id/operations`,`poll`],{supervisor:o(1e4,`${Bd}`)},function*(e,t){yield*t();let n=zd({page:1,id:e.payload.id,...bd});yield*yd({...e,key:n.payload.key},function*(){})}),Vd=z.get(`/llm_keys/:id/operations?page=:page`,{supervisor:ur()},function*(e,t){let n=Cd(e.payload);e.request=e.req({url:`${e.req().url}${n}`}),yield*yd(e,t)}),Hd=dn(`cancel-llm-key-ops-poll`),Ud=z.get([`/llm_keys/:id/operations`,`poll`],{supervisor:o(1e4,`${Hd}`)},function*(e,t){yield*t();let n=Vd({page:1,id:e.payload.id,...bd});yield*yd({...e,key:n.payload.key},function*(){})}),Wd=z.get(`/operations/:id/logs?with_deleted=true`,[function*(e,t){if(e.cache=!0,e.bodyType=`text`,yield*t(),!e.json.ok)return;let n=e.json.value,r=yield*Te(()=>fetch(n)),i=yield*Te(()=>r.text());if(!r.ok){e.json={ok:!1,error:{message:i}};return}e.json.value=i},v.fetchRetry()]),Gd=z.get(`/operations/:id`,function*(e,t){if(e.payload.withDeleted){let t=e.req().url,n=new URL(t);n.searchParams.set(`with_deleted`,`true`),e.request=e.req({url:n.toString()})}yield*t()}),Kd=z.put(`/operations/:id`,function*(e,t){if(e.request=e.req({body:JSON.stringify({cancelled:!0})}),yield*t(),e.json.ok)return;let n=e.json.error?.message||``;(n.includes(`Cancelation already requested`)||n.includes(`Operation already`))&&(e.loader={meta:{alreadyCancelled:!0}})}),qd=dn(`cancel-op-by-id-poll`),Jd=z.get([`/operations/:id`,`poll`],{supervisor:o(3e3,`${qd}`)},function*(e,t){if(e.payload.withDeleted){let t=e.req().url,n=new URL(t);n.searchParams.set(`with_deleted`,`true`),e.request=e.req({url:n.toString()})}yield*t()}),Yd=z.post([`/services/:id/operations`,`scale`],function*(e,t){let{id:n,containerCount:r,containerProfile:i,containerSize:a,recId:o=``}=e.payload,s=yield*p(ns),c=yield*p(e=>Eu(e,{id:n}
2)),l={type:`scale`,id:n,container_count:r,instance_profile:i,container_size:a};if(e.request=e.req({body:JSON.stringify(l)}),yield*t(),!e.json.ok)return;if(o!==``){let t=yield*p(e=>L.manualScaleRecommendations.selectById(e,{id:o}));Ys(`scale-service-with-recommendation`,JSON.stringify({orgId:s.id,orgName:s.name,serviceId:n,opId:e.json.value.id,costSavings:t.costSavings,curContainerProfile:c.instanceClass,curContainersize:c.containerMemoryLimitMb,recContainerProfile:t.recommendedInstanceClass,recContainerSize:t.recommendedContainerMemoryLimitMb,appliedContainerProfile:i,appliedContainerSize:a}))}let u=e.json.value.id;e.loader={message:`Scale service operation queued (operation ID: ${u})`,meta:{opId:`${u}`}}});function*Xd({id:e,wait:t=3e3,skipFetch:n=!1}){for(;;){if(n){let t=yield*p(t=>Ju(t,{id:e}));if(t.status===`succeeded`||t.status===`failed`)return t}else{let t=yield*Te(()=>Gd.run(Gd({id:e})));if(t.json.ok){if(t.json.value.status===`succeeded`||t.json.value.status===`failed`)return Ku(t.json.value)}else{let n=yield*p(t=>Ju(t,{id:e}));if(n.type===`deprovision`&&t.response?.status===404)return yield*L.update(L.operations.patch({[n.id]:{id:n.id,status:`succeeded`}})),{...n,status:`succeeded`}}}yield*un(t)}}var Zd={operation:vn({id:`operation`,deserialize:Ku,save:L.operations.add})},Qd=e=>cl(e),$d=({resourceId:e,resourceType:t,url:n})=>{switch(t){case`app`:return Qi(e);case`llm_key`:return qi(e);case`database`:return ga(e);case`environment`:return Na(e);case`vhost`:return wa(e);case`metric_drain`:case`log_drain`:case`service`:return n;case`external_aws_account`:return Qr(e);default:return``}},Tie=e=>({m4:[.5,1,2,4,7,15,30,60,150,240],m5:[.5,1,2,4,7,15,30,60,150,240],m:[.5,1,2,4,7,15,30,60,150,240],r4:[.5,1,2,4,7,15,30,60,150,240],r5:[.5,1,2,4,7,15,30,60,150,240,368,496,752],r:[.5,1,2,4,7,15,30,60,150,240,368,496,752],c4:[.5,1,2,4,7,15,30],c5:[.5,1,2,4,7,15,30,60,150,240,368],c:[.5,1,2,4,7,15,30,60,150,240,368]})[e].map(e=>e*Nl),ef=e=>Tie(e).filter(t=>t>=Pl[e].minimumContainerSize),Eie=(e={})=>{let t=new Date().toISOString();return{id:1,handle:``,git_repo:``,created_at:t,deleted_at:``,updated_at:t,deployment_method:``,status:`provisioned`,_links:{account:{href:``},current_configuration:{href:``},current_deployment:{href:``},current_image:{href:``},current_source:{href:``},current_setting:{href:``},...e._links},_embedded:{services:[],current_image:null,last_deploy_operation:null,last_operation:null,...e._embedded},...e,_type:`app`}},tf=e=>{let t=e._links;return{id:`${e.id}`,handle:e.handle,gitRepo:e.git_repo,createdAt:e.created_at,deletedAt:e.deleted_at,updatedAt:e.updated_at,deploymentMethod:e.deployment_method,status:e.status,environmentId:R(t.account),currentConfigurationId:R(t.current_configuration),currentDeploymentId:R(t.current_deployment),currentImageId:R(t.current_image),currentSourceId:R(t.current_source),currentSettingId:R(t.current_setting??{href:``})}},nf=e=>e.id!==``,rf=L.apps.selectById,af=L.apps.selectTable,of=L.apps.selectTableAsList,sf=L.apps.findById,cf=D(of,(e,t)=>t.envId,(e,t)=>t===``?e:e.filter(e=>e.environmentId===t)),lf=D(cf,e=>e[0]||L.apps.empty),uf=D(of,au,(e,t)=>e.filter(e=>lu(iu(t,{id:e.environmentId})))),df=D(uf,_l,(e,t)=>e.map(e=>({app:e,deployment:L.deployments.findById(t,{id:e.currentDeploymentId})}))),ff=D(df,e=>{if(!e||e.length===0)return null;let t=e.filter(({deployment:e})=>e&&e.id!==``&&e.createdAt!==``);return t.length===0?null:t.sort((e,t)=>{let n=e.deployment.createdAt,r=t.deployment.createdAt;return n<r?1:n>r?-1:0})[0]}),Die=D(nu,uf,(e,t)=>t.filter(t=>{let n=iu(e,{id:t.environmentId});return!(!lu(n)||n.onboardingStatus===`unknown`)})),Oie=D(of,nu,(e,t)=>t.stackId,(e,t,n)=>e.filter(e=>iu(t,{id:e.environmentId}).stackId===n)),pf=D(of,Ol,(e,t)=>t.sourceId,(e,t,n)=>e.filter(e=>El(t,{id:e.currentSourceId}).id===n)),kie=D(pf,e=>e.length),Aie=D(L.deployments.selectTable,rf,(e,t)=>L.deployments.findById(e,{id:t.currentDeploymentId})),jie=D(L.images.selectTable,rf,(e,t)=>L.images.findById(e,{id:t.currentImageId})),Mie=D(L.appConfigs.selectTable,rf,(e,t)=>L.appConfigs.findById(e,{id:t.currentConfigurationId})),mf=D(rf,Aie,jie,Mie,(e,t,n,r)=>{let i=dl(t.gitRef),a=fl(t.dockerImage),o=dl(n.gitRef),s=fl(r.env?.APTIBLE_DOCKER_IMAGE),c=i||o,l=a||s;return c&&l?`companion-repo`:c?`git-based`:l?`image-based`:`unknown`}),hf=z.get(`/apps?per_page=5000&no_embed=true`,{supervisor:dr()}
2,function*(e,t){yield*t(),e.json.ok&&(yield*L.update(L.apps.reset()))}),gf=D(nu,rf,(e,t)=>iu(e,{id:t.environmentId})),Nie=D(Bl,gf,(e,t)=>Rl(e,{id:t.stackId})),Pie=D(Eu,af,(e,t)=>sf(t,{id:e.appId})),_f=z.get(`/apps/:id`,function*(e,t){if(e.payload.waitForBootup&&(yield*fn()),e.payload.withDeleted){let t=e.req().url,n=new URL(t);n.searchParams.set(`with_deleted`,`true`),e.request=e.req({url:n.toString()})}yield*t()}),vf=z.post(`/accounts/:envId/apps`,function*(e,t){let{name:n,envId:r}=e.payload,i={handle:n,account_id:r};e.request=e.req({body:JSON.stringify(i)}),yield*t(),e.json.ok&&(e.loader={meta:{appId:e.json.value.id}})}),yf=z.post(`/apps/:appId/operations`,function*(e,t){let{type:n}=e.payload,r=(()=>{switch(n){case`deprovision`:return{type:n};case`deploy`:case`scan_code`:{let{gitRef:t}=e.payload;return{type:n,git_ref:t}}case`configure`:{let{env:t}=e.payload;return{type:n,env:t}}default:return{}}})();e.request=e.req({body:JSON.stringify(r)}),yield*t()}),bf={app:vn({id:`app`,deserialize:tf,save:L.apps.add})},xf=z.post([`/apps/:id/operations`,`restart`],function*(e,t){let{id:n}=e.payload,r={type:`restart`,id:n};if(e.request=e.req({body:JSON.stringify(r)}),yield*t(),!e.json.ok)return;let i=e.json.value.id;e.loader={message:`Restart app operation queued (operation ID: ${i})`,meta:{opId:`${i}`}}}),Sf=z.post([`/apps/:appId/operations`,`deploy`],function*(e,t){let{dockerImage:n,registryUsername:r,registryPassword:i}=e.payload;e.request=e.req({body:JSON.stringify({type:`deploy`,settings:{APTIBLE_DOCKER_IMAGE:n},sensitive_settings:{APTIBLE_PRIVATE_REGISTRY_USERNAME:r,APTIBLE_PRIVATE_REGISTRY_PASSWORD:i}})}),yield*t()}),Cf=z.post([`/apps/:appId/operations`,`rollback`],function*(e,t){let{target:n,env:r}=e.payload;if(e.request=e.req({body:JSON.stringify({type:`deploy`,deploy_image_id:n.imageId,...r?{env:r}:{}})}),yield*t(),!e.json.ok)return;let i=e.json.value.id;e.loader={message:`Rollback operation queued (operation ID: ${i})`,meta:{opId:`${i}`}}}),wf=qn.create(`deprovision-app`,function*(e,t){let{appId:n}=e.payload;yield*p(e=>rf(e,{id:n}));let r=yield*Te(()=>yf.run(yf({type:`deprovision`,appId:n})));if(!r.json.ok)return;let i=`${r.json.value.id}`;yield*Te(()=>Xd({id:i})),yield*t()}),Tf=z.put(`/apps/:id`,function*(e,t){let{handle:n}=e.payload,r={handle:n};e.request=e.req({body:JSON.stringify(r)}),yield*t(),e.json.ok&&(e.loader={message:`Saved changes successfully!`})}),Fie=e=>({key:e.id,label:e.handle,value:e.id}),Ef=(e=``)=>Be.fromISO(e,{zone:`utc`}),Df=(e=``)=>Ef(e).toFormat(`yyyy-MM-dd`),Of=(e=``)=>Ef(e).toFormat(`yyyy-MM-dd HH:mm:ss ZZZZ`),kf=(e=``)=>Ef(e).toFormat(`LLL d, yyyy`),Iie=(e=``)=>Ef(e).toFormat(`LLL d, yyyy 'at' HH:mm`),Lie=(e=``,t=`utc`)=>{let n=Be.fromISO(e,{zone:`utc`});return(t===`local`?n.toLocal():n).toFormat(`LLL d, yyyy 'at' HH:mm`)},Af=(e=``,t=`utc`)=>{let n=Be.fromISO(e,{zone:`utc`});return(t===`local`?n.toLocal():n).toFormat(`LLL d, yyyy 'at' HH:mm ZZZZ`)},jf=e=>{let t=Le.fromObject({seconds:e}).shiftTo(`hours`,`minutes`,`seconds`),n=[];return t.hours>0&&n.push(`${t.hours}h`),t.minutes>0&&n.push(`${t.minutes}m`),n.length===0?n.push(`${t.seconds.toFixed(1)}s`):n.push(`${t.seconds.toFixed(0)}s`),n.join(` `)},Mf=(e=``)=>Ef(e).toFormat(`yyyy-MM-dd`),Nf=(e=``)=>Ef(e).toFormat(`yyyy-MM-dd-HH-mm-ss`),Pf=({startDate:e,endDate:t})=>{let n=Ef(e);return Ef(t).toRelative({base:n})||``},Ff=e=>{let t=new Date;return t.setDate(t.getDate()+e),t},If=e=>new Date(new Date().getTime()+e*1e3),Lf=(e,t)=>e<t;function Rf(e,t){return new Date(e.createdAt).getTime()>new Date(t.createdAt).getTime()?e:t}var zf=(e={})=>{let t=new Date().toISOString();return{id:0,common_name:``,certificate_body:``,not_before:``,not_after:``,issuer_country:``,issuer_organization:``,issuer_website:``,issuer_common_name:``,subject_country:``,subject_state:``,subject_locale:``,subject_organization:``,acme:!1,leaf_certificate:``,certificate_chain:``,sha256_fingerprint:``,trusted:!1,self_signed:!1,subject_alternative_names:[],private_key_algorithm:``,private_key:``,created_at:t,updated_at:t,_links:{account:mn()},_type:`certificate`,...e}},Bf=e=>{let t=e._links;return{id:e.id.toString(),commonName:e.common_name||`Unknown`,certificateBody:e.certificate_body,notBefore:e.not_before,notAfter:e.not_after,issuerCountry:e.issuer_country,issuerOrganization:e.issuer_organization||`Unknown Issuer`,issuerWebsite:e.issuer_website,issuerCommonName:e.issuer_common_name,subjectCountry:e.subject_country,subjectState:e.subject_state,subjectLocale:e.subject_locale,subjectOrganization:e.subject_organization,acme:e.acme,leafCertificate:e.leaf_certificate,certificateChain:e.certificate_chain,sha256Fingerprint:e.sha256_fingerprint,trusted:e.trusted,selfSigned:e.self_signed,subjectAlternativeNames:e.subject_alternative_names,privateKeyAlgorithm:e.private_key_algorithm,privateKey:e.private_key,createdAt:e.created_at,updatedAt:e.updated_at,environmentId:R(t.account)}},Vf=L.certificates.selectById,Hf=L.certificates.selectTableAsList,Rie=e=>e.id!==``,Uf=D(Hf,(e,t)=>t.envId,(e,t)=>e.filter(e=>e.environmentId===t).sort((e,t)=>
2{let n=new Date(e.createdAt).getTime();return new Date(t.createdAt).getTime()-n})),Wf=dn(`cancel-poll-cert`),Gf=z.get([`/certificates/:id`,`poll`],{supervisor:o(5e3,`${Wf}`)}),Kf=z.get(`/certificates/:certId/apps`),qf=z.get(`/certificates/:certId/vhosts`),Jf=z.delete(`/certificates/:certId`),Yf=z.get(`/certificates/:certId`),Xf=z.get(`/accounts/:id/certificates?page=:page`),Zf=qn.create(`fetch-all-certs-by-env`,{supervisor:j},vr(Xf)),Qf=qn.create(`remove-certs`,function*(e,t){yield*L.update(L.certificates.remove(e.payload)),yield*t()}),$f=z.post(`/accounts/:envId/certificates`,function*(e,t){let n=JSON.stringify({certificate_body:e.payload.cert,private_key:e.payload.privKey});e.request=e.req({body:n}),yield*t()}),ep={certificate:vn({id:`certificate`,deserialize:Bf,save:L.certificates.add})},tp=e=>e.issuerOrganization||e.issuerCommonName,np=e=>e.sha256Fingerprint.slice(0,7),rp=e=>{let t=[e.commonName],n=e.notBefore,r=e.notAfter;n&&r&&t.push(`Valid: ${Of(n)} - ${Of(r)}`);let i=tp(e);i&&t.push(i);let a=np(e);return a&&t.push(a),t.join(` - `)},ip=(e,t)=>{let n=e.m_class_gb_per_hour;return t.startsWith(`r`)?n=e.r_class_gb_per_hour:t.startsWith(`c`)&&(n=e.c_class_gb_per_hour),n},ap=({rates:e,services:t=[],disks:n=[],persistentDisks:r=[],endpoints:i=[],backups:a=[]})=>{let o=0;for(let n of t){let t=ip(e,n.instanceClass);o+=n.containerCount*n.containerMemoryLimitMb/1024*t}for(let t of i)o+=t.shared?e.shared_vhost_cost_per_hour:e.vhost_cost_per_hour;let s=o*730;for(let t of n)s+=t.size*e.disk_cost_gb_per_month,s+=Math.max(t.provisionedIops-3e3,0)*e.disk_iops_cost_per_month;for(let t of r)s+=t.size*e.persistent_disk_cost_gb_per_month,s+=Math.max(t.provisionedIops-3e3,0)*e.disk_iops_cost_per_month;for(let t of a)s+=t.size*e.backup_cost_gb_per_month;return s};function zie(e,t=1e4){return a([Te(e),Te(function*(){throw yield*oe(t),Error(`operation timed out`)})])}var op=e=>{let t=e.toLowerCase();return[`postgresql`,`mysql`,`mongodb`].includes(t)?3:[`elasticsearch`,`influxdb`,`rabbitmq`].includes(t)?2:null},sp=e=>({postgresql:`PostgreSQL`,mysql:`MySQL`,mongodb:`MongoDB`,elasticsearch:`Elasticsearch`,influxdb:`InfluxDB`,rabbitmq:`RabbitMQ`})[e.toLowerCase()]||e,Bie=(e={})=>{let t=new Date().toISOString();return{id:1,handle:``,provisioned:!0,type:``,status:`provisioned`,docker_repo:``,current_kms_arn:``,connection_url:``,created_at:t,deleted_at:``,updated_at:t,enable_backups:!0,enable_pitr:!1,pitr_status:`unsupported`,oldest_pitr_time:``,port_mapping:[],_links:{account:{href:``},service:{href:``},database_image:{href:``},initialize_from:{href:``},disk:{href:``},...e._links},_embedded:{disk:null,last_operation:null,...e._embedded},_type:`database`,...e}},cp=e=>{let t=e._links;return{connectionUrl:e.connection_url,createdAt:e.created_at,deletedAt:e.deleted_at,updatedAt:e.updated_at,currentKmsArn:e.current_kms_arn,dockerRepo:e.docker_repo,handle:e.handle,id:`${e.id}`,provisioned:e.provisioned,enableBackups:e.enable_backups,enablePitr:e.enable_pitr,pitrStatus:e.pitr_status,oldestPitrTime:e.oldest_pitr_time,type:e.type,status:e.status,portMapping:e.port_mapping,databaseImageId:R(t.database_image),environmentId:R(t.account),serviceId:R(t.service),diskId:R(t.disk),initializeFrom:R(t.initialize_from)}},Vie=e=>e.id!==``,lp=L.databases.selectById,up=L.databases.selectTableAsList,dp=L.databases.selectTable,fp=L.databases.findById,pp=D(up,(e,t)=>t.envId,(e,t)=>t.handle,(e,t,n)=>e.find(e=>e.environmentId===t&&e.handle===n&&!e.deletedAt)||L.databases.empty),mp=D(up,au,$o,(e,t)=>e.filter(e=>lu(iu(t,{id:e.environmentId})))),hp=D(mp,e=>e.filter(e=>!e.deletedAt)),gp=D(up,(e,t)=>t.envId,(e,t)=>e.filter(e=>e.environmentId===t).sort((e,t)=>e.id.localeCompare(t.id))),_p=D(gp,(e,t)=>t.envId,(e,t)=>t.types,(e,t,n)=>e.filter(e=>e.environmentId===t).filter(e=>n.includes(e.type)).sort((e,t)=>e.id.localeCompare(t.id))),Hie=D(up,nu,(e,t)=>t.stackId,(e,t,n)=>e.filter(e=>iu(t,{id:e.environmentId}).stackId===n)),vp=D(gp,(e,t)=>t.envId,(e,t)=>e.filter(e=>e.environmentId===t).filter(e=>e.enablePitr)),yp=z.get(`/databases?per_page=5000&no_embed=true`,{supervisor:dr()}
2,function*(e,t){yield*t(),e.json.ok&&(yield*L.update(L.databases.reset()))}),bp=z.get(`/databases/:id`,function*(e,t){if(e.payload.waitForBootup&&(yield*fn()),e.payload.withDeleted){let t=e.req().url,n=new URL(t);n.searchParams.set(`with_deleted`,`true`),e.request=e.req({url:n.toString()})}yield*t()}),xp=z.get(`/accounts/:envId/databases`);function*Uie({envId:e,handle:t,wait:n=3e3}){for(;;){if((yield*Te(()=>xp.run(xp({envId:e})))).json.ok){let n=yield*p(n=>pp(n,{envId:e,handle:t}));if(n.id!==``)return n}yield*un(n)}}var Sp=z.post(`/accounts/:envId/databases`,function*(e,t){let{handle:n,type:r,envId:i,databaseImageId:a,enableBackups:o}=e.payload,s={handle:n,type:r,account_id:i,database_image_id:a,enable_backups:o};e.request=e.req({body:JSON.stringify(s)}),yield*t()}),Cp=(e,t)=>{let n=t.name.toLocaleLowerCase(),r=t.dbType,i=t.enableBackups;return{handle:n,type:r,envId:e,databaseImageId:t.imgId,enableBackups:i}},Wie=qn.create(`database-list-provision`,function*(e,t){let{dbs:n,envId:r}=e.payload,i=e.key;yield*L.update(L.loaders.start({id:i}));let a=yield*yield*S(n.map(e=>()=>wp.run(wp(Cp(r,e))))),o=[];for(let e=0;e<a.length;e+=1){let t=a[e];if(!t.ok)continue;let n=t.value.json;if(!n)continue;if(n.error){o.push(n.error);continue}let{opCtx:r,dbCtx:i}=n;if(r&&!r.json.ok){o.push(r.json.error.message);continue}i&&!i.json.ok&&o.push(i.json.error.message)}if(o.length>0){yield*L.update(L.loaders.error({id:i,message:o.join(`, `)}));return}yield*L.update(L.loaders.success({id:i})),yield*t()}),wp=qn.create(`database-provision`,function*(e,t){yield*L.update(L.loaders.start({id:e.key}));let n=yield*Te(()=>Sp.run(Sp(e.payload)));if(!n.json.ok){let t=n.json.error.message;yield*L.update(L.loaders.error({id:e.key,message:t})),e.json={error:t,dbId:``,dbCtx:null,opCtx:null};return}let r=`${n.json.value.id}`;yield*t();let i=yield*Te(Tp.run(Tp({dbId:r,iops:e.payload.iops||3e3,containerProfile:e.payload.containerProfile||`m`,containerSize:e.payload.containerSize||1024,diskSize:e.payload.diskSize||10,type:`provision`})));if(e.json={dbCtx:n,opCtx:i,dbId:r,error:``},!i.json.ok){let t=i.json.error;yield*L.update(L.loaders.error({id:e.key,message:t.message}));return}yield*L.update(L.loaders.success({id:e.key,meta:{dbId:r,opId:i.json.value.id}}))}),Tp=z.post(`/databases/:dbId/operations`,function*(e,t){let{type:n}=e.payload,r=(()=>{switch(n){case`deprovision`:return{type:n};case`backup`:return{type:n};case`configure_backup_policy`:{let{enablePitr:t}=e.payload;return{type:n,enable_pitr:t}}case`provision`:{let{containerSize:t,diskSize:r,iops:i,containerProfile:a,recoveryTargetType:o,recoveryTarget:s}=e.payload;return{container_size:t,disk_size:r,provisioned_iops:i,instance_profile:a,recovery_target_type:o,recovery_target:s,type:n}}case`pitr_restore`:{let{handle:t,recoveryTargetType:r,recoveryTarget:i}=e.payload;return{type:n,handle:t,recovery_target_type:r,recovery_target:i}}default:return{}}})();e.request=e.req({body:JSON.stringify(r)}),yield*t()}),Ep=z.get(`/databases/:id/dependents`),Dp=D(up,(e,t)=>t.id,(e,t)=>e.filter(e=>e.initializeFrom===t).sort((e,t)=>e.id.localeCompare(t.id))),Op={database:vn({id:`database`,deserialize:cp,save:L.databases.add})},kp=qn.create(`deprovision-database`,[Gn,function*(e,t){let{dbId:n}=e.payload,r=yield*Te(()=>Tp.run(Tp({type:`deprovision`,dbId:n})));if(!r.json.ok)throw Error(r.json.error.message);yield*t()}]),Ap=z.post(`/databases/:id/unlink`,function*(e,t){yield*t(),e.json.ok&&(e.loader={message:`Replica unlinked from source successfully! This action does not stop replication.`})}),jp=z.put(`/databases/:id`,function*(e,t){let{handle:n,enableBackups:r}=e.payload,i={handle:n,enable_backups:r};e.request=e.req({body:JSON.stringify(i)}),yield*t(),e.json.ok&&(e.loader={message:`Saved changes successfully!`})}),Mp=z.post([`/databases/:id/operations`,`restart`],function*(e,t){let{id:n}=e.payload,r={type:`restart`,id:n};if(e.request=e.req({body:JSON.stringify(r)}),yield*t(),!e.json.ok)return;let i=e.json.value.id;e.loader={message:`Restart database operation queued (operation ID: ${i})`,meta:{opId:`${i}`}}}),Np=z.post([`/databases/:id/operations`,`restart_recreate`],function*(e,t){let{id:n,containerProfile:r}=e.payload,i={type:`restart_recreate`,id:n,instance_profile:r};
2if(e.request=e.req({body:JSON.stringify(i)}),yield*t(),!e.json.ok)return;let a=e.json.value.id;e.loader={message:`Restart database with disk move operation queued (operation ID: ${a})`,meta:{opId:`${a}`}}}),Pp=z.post([`/databases/:id/operations`,`scale`],function*(e,t){let{id:n,diskSize:r,containerProfile:i,containerSize:a,recId:o=``,originalValues:s}=e.payload,c=yield*p(e=>lp(e,{id:n})),l=yield*p(e=>Eu(e,{id:c.serviceId})),u=yield*p(ns),d={type:`restart`,id:n,disk_size:0,container_size:a,instance_profile:i};if(s.diskSize!==r&&(d.disk_size=r),e.request=e.req({body:JSON.stringify(d)}),yield*t(),!e.json.ok)return;let f=e.json.value.id;if(o!==``){let t=yield*p(e=>L.manualScaleRecommendations.selectById(e,{id:o}));Ys(`scale-service-with-recommendation`,JSON.stringify({orgId:u.id,orgName:u.name,databaseId:n,serviceId:l.id,opId:e.json.value.id,costSavings:t.costSavings,curContainerProfile:l.instanceClass,curContainersize:l.containerMemoryLimitMb,recContainerProfile:t.recommendedInstanceClass,recContainerSize:t.recommendedContainerMemoryLimitMb,appliedContainerProfile:i,appliedContainerSize:a}))}e.loader={message:`Restart (and scale) database operation queued (operation ID: ${f})`,meta:{opId:`${f}`}}}),Fp=qn.create(`pitr-restore-database`,function*(e,t){yield*L.update(L.loaders.start({id:e.key}));let{dbId:n,handle:r,recoveryTargetType:i,recoveryTarget:a}=e.payload,o=yield*p(e=>lp(e,{id:n})),s=yield*Te(()=>Tp.run(Tp({dbId:n,type:`pitr_restore`,handle:r,recoveryTargetType:i,recoveryTarget:a})));if(!s.json.ok){yield*L.update(L.loaders.error({id:e.key,message:s.json.error.message}));return}try{yield*zie(Uie({envId:o.environmentId,handle:r}),3e4)}catch{yield*L.update(L.loaders.error({id:e.key,message:`Failed to restore database. New database was not created.`}));return}let c=yield*p(e=>pp(e,{envId:o.environmentId,handle:r})),l=yield*Te(Tp.run(Tp({dbId:c.id,type:`provision`,recoveryTargetType:i,recoveryTarget:a})));if(!l.json.ok){yield*L.update(L.loaders.error({id:e.key,message:l.json.error.message}));return}yield*L.update(L.loaders.success({id:e.key,meta:{opId:`${l.json.value.id}`}})),yield*t()}),Gie=(e,t)=>`${cl(e)} ${t}`,Kie=(e={})=>{let t=new Date().toISOString();return{id:0,acme:!1,acme_configuration:null,acme_status:``,acme_dns_challenge_host:``,container_exposed_ports:[],container_port:``,container_ports:[],default:!0,docker_name:``,elastic_load_balancer_name:``,external_host:``,external_http_port:``,external_https_port:``,internal:!1,internal_health_port:``,internal_host:``,internal_http_port:``,internal_https_port:``,ip_whitelist:[],platform:`elb`,type:`unknown`,token_header:void 0,load_balancing_algorithm_type:void 0,user_domain:``,virtual_domain:``,security_group_id:``,shared:null,status:`unknown`,created_at:t,deleted_at:``,updated_at:t,_links:{service:mn(),certificate:mn(),current_setting:mn()},_type:`vhost`,...e}},Ip=e=>({id:`${e.id}`,acme:e.acme,acmeConfiguration:e.acme_configuration,acmeDnsChallengeHost:e.acme_dns_challenge_host,acmeStatus:e.acme_status,containerExposedPorts:e.container_exposed_ports,containerPort:e.container_port||``,containerPorts:e.container_ports,createdAt:e.created_at,deletedAt:e.deleted_at,default:e.default,dockerName:e.docker_name||``,externalHost:e.external_host||``,externalHttpPort:e.external_http_port||``,externalHttpsPort:e.external_https_port||``,internal:e.internal,ipWhitelist:e.ip_whitelist,platform:e.platform,shared:e.shared,type:e.type,updatedAt:e.updated_at,userDomain:e.user_domain,virtualDomain:e.virtual_domain,status:e.status,serviceId:R(e._links.service),certificateId:R(e._links.certificate),tokenHeader:e.token_header,lbAlgorithm:e.load_balancing_algorithm_type||void 0,currentSettingId:R(e._links.current_setting)}),Lp=L.endpoints.selectById,Rp=L.endpoints.findById,zp=L.endpoints.selectTable,Bp=L.endpoints.selectTableAsList,Vp=e=>e.id!==``,Hp=(e,t)=>e.filter(e=>e.serviceId===t),qie=(e,t,n)=>e.filter(e=>ku(t,{id:e.serviceId}).environmentId===n),Up=(e,t,n)=>e.filter(e=>ku(t,{id:e.serviceId}).appId===n),Wp=D(Bp,Du,(e,t)=>t.appId,Up),Gp=D(Bp,(e,t)=>t.serviceId,Hp),Kp=D(Wp,e=>e.length===0?L.endpoints.empty:e[0]),Jie=D(mp,e=>{let t={};
2return e.forEach(e=>{t[e.serviceId]=e.id}),t}),qp=D(Nu,Bp,(e,t)=>t.envId,(e,t,n)=>t.filter(t=>e[n]?.has(t.serviceId))),Jp=D(Nu,Bp,su,(e,t,n)=>t.filter(t=>n.some(n=>e[n.id]?.has(t.serviceId)))),Yp=D(Jp,Du,af,dp,L.costRates.select,(e,t,n,r,i)=>e.map(e=>{let a=ku(t,{id:e.serviceId}),o=Mm(e),s=ap({rates:i,endpoints:[{shared:e.shared}]}),c={...e,url:o.url,hostname:o.hostname,placement:o.placement,serviceProcessType:a.processType,environmentId:a.environmentId,cost:s};if(a.appId){let e=sf(n,{id:a.appId});return{...c,resourceType:`app`,resourceHandle:e.handle,resourceId:e.id}}if(a.databaseId){let e=fp(r,{id:a.databaseId});return{...c,resourceType:`database`,resourceHandle:e.handle,resourceId:e.id}}return{...c,resourceType:`unknown`,resourceHandle:``,resourceId:``}}).sort((e,t)=>e.url.localeCompare(t.url))),Xp=D(Yp,Nu,(e,t)=>t.envId,(e,t,n)=>e.filter(e=>t[n]?.has(e.serviceId))),Zp=D(Yp,Du,(e,t)=>t.appId,(e,t,n)=>e.filter(e=>ku(t,{id:e.serviceId}).appId===n)),Yie=D(Yp,Jie,(e,t)=>t.dbId,(e,t,n)=>e.filter(e=>t[e.serviceId]===n)),Qp=D(Yp,(e,t)=>t.certId,(e,t)=>e.filter(e=>e.certificateId===t)),$p=D(Yp,(e,t)=>t.serviceId,(e,t)=>e.filter(e=>e.serviceId===t)),em=D(qp,(e,t)=>t.certId,(e,t)=>e.filter(e=>e.certificateId===t)),tm=D(cf,Iu,em,(e,t,n)=>e.filter(e=>(t[e.id]||[]).some(e=>n.find(t=>t.serviceId===e)))),nm=z.get(`/apps/:appId/vhosts`,{supervisor:fr()}),Xie=z.get(`/databases/:dbId/vhosts`,{supervisor:fr()}),rm=z.get(`/accounts/:id/vhosts`,{supervisor:fr()}),im=z.get(`/services/:id/vhosts`,{supervisor:fr()}),am=z.get(`/vhosts/:id`,{supervisor:fr()},function*(e,t){if(e.payload.withDeleted){let t=e.req().url,n=new URL(t);n.searchParams.set(`with_deleted`,`true`),e.request=e.req({url:n.toString()})}yield*t()}),om=z.get(`/vhosts?per_page=5000`,{supervisor:dr()},function*(e,t){yield*t(),e.json.ok&&(yield*L.update(L.endpoints.reset()))}),sm=dn(`cancel-fetch-endpoint-poll`),cm=z.get([`/vhosts/:id`,`poll`],{supervisor:o(5e3,`${sm}`)},function*(e,t){if(e.payload.withDeleted){let t=e.req().url,n=new URL(t);n.searchParams.set(`with_deleted`,`true`),e.request=e.req({url:n.toString()})}yield*t()}),lm={vhost:vn({id:`vhost`,deserialize:Ip,save:L.endpoints.add})},um=z.post(`/services/:serviceId/vhosts`,function*(e,t){let n=yield*p(an),r={platform:e.payload.trafficType===`grpc`?`elb`:`alb`,type:e.payload.trafficType,acme:e.payload.type===`managed`,default:e.payload.type==="default",internal:e.payload.internal,ip_whitelist:e.payload.ipAllowlist,container_port:e.payload.containerPort,token_header:e.payload.tokenHeader,load_balancing_algorithm_type:e.payload.lbAlgorithm,shared:e.payload.shared};e.payload.certId&&(r.certificate=`${n.apiUrl}/certificates/${e.payload.certId}`),e.payload.type===`managed`&&(r.user_domain=e.payload.domain),e.payload.type===`custom`&&e.payload.shared&&(r.user_domain=e.payload.domain);let i=JSON.stringify(r);e.request=e.req({body:i}),yield*t()}),dm=z.post([`/services/:serviceId/vhosts`,`db`],function*(e,t){let n={type:`tcp`,platform:`nlb`,ip_whitelist:e.payload.ipAllowlist,acme:!1,default:!1,internal:!1},r=JSON.stringify(n);e.request=e.req({body:r}),yield*t()}),Zie=z.delete(`/vhosts/:id`,function*(e,t){yield*t(),yield*L.update(L.endpoints.remove([e.payload.id]))}),fm=z.post(`/vhosts/:endpointId/operations`,function*(e,t){let n={type:e.payload.type};e.payload.settings&&(n.settings=e.payload.settings),e.request=e.req({body:JSON.stringify(n)}),yield*t()}),pm=z.post(`/vhosts/:id/operations`,function*(e,t){e.request=e.req({body:JSON.stringify({type:`deprovision`})}),yield*t(),e.json.ok&&(e.loader={meta:{opId:e.json.value.id}})}),mm=qn.create(`provision-endpoint`,function*(e,t){yield*L.update(L.loaders.start({id:e.key}));let n=``,r=e.payload;if((r.type===`managed`||r.type===`custom`)&&(n=r.certId,!n&&r.cert&&r.privKey)){let t=yield*Te($f.run($f({envId:r.envId,cert:r.cert,privKey:r.privKey})));if(!t.json.ok){let n=t.json.error;yield*L.update(L.loaders.error({id:e.key,message:n.message}));return}n=`${t.json.value.id}`}let i=yield*Te(()=>um.run(um({...e.payload,certId:n}))),a=i.json;if(!a.ok){yield*L.update(L.loaders.error({id:e.key,message:a.error.message}));return}yield*t();let o=yield*Te(fm.run(fm({endpointId:`${a.value.id}`,type:`provision`,settings:e.payload.settings??{}})));
2if(!o.json.ok){let t=o.json.error;yield*L.update(L.loaders.error({id:e.key,message:t.message}));return}e.json={endpointCtx:i,opCtx:o},yield*L.update(L.loaders.success({id:e.key,meta:{endpointId:a.value.id,opId:o.json.value.id}}))}),hm=qn.create(`provision-db-endpoint`,function*(e,t){yield*L.update(L.loaders.start({id:e.key}));let n=yield*Te(()=>dm.run(dm(e.payload))),r=n.json;if(!r.ok){yield*L.update(L.loaders.error({id:e.key,message:r.error.message}));return}yield*t();let i=yield*Te(fm.run(fm({endpointId:`${r.value.id}`,type:`provision`,settings:{}})));if(!i.json.ok){let t=i.json.error;yield*L.update(L.loaders.error({id:e.key,message:t.message}));return}e.json={endpointCtx:n,opCtx:i},yield*L.update(L.loaders.success({id:e.key,meta:{endpointId:r.value.id,opId:i.json.value.id}}))}),gm=z.post([`/vhosts/:id/operations`,`renew`],function*(e,t){e.request=e.req({body:JSON.stringify({type:`renew`})}),yield*t(),e.json.ok&&(e.loader={meta:{opId:e.json.value.id}})}),Qie=z.patch(`/vhosts/:id`,function*(e,t){let n=yield*p(an),r={ip_whitelist:e.payload.ipAllowlist,container_port:e.payload.containerPort,container_ports:e.payload.containerPorts,token_header:e.payload.tokenHeader,load_balancing_algorithm_type:e.payload.lbAlgorithm,shared:e.payload.shared};e.payload.certId&&(r.certificate=`${n.apiUrl}/certificates/${e.payload.certId}`),e.payload.domain&&(r.user_domain=e.payload.domain);let i=JSON.stringify(r);e.request=e.req({body:i}),yield*t()}),_m=qn.create(`update-endpoint`,function*(e,t){let n=e.name;yield*L.update(L.loaders.start({id:n}));let r=e.payload.certId;if(!r&&e.payload.cert&&e.payload.privKey){let t=yield*$f.run({envId:e.payload.envId,cert:e.payload.cert||``,privKey:e.payload.privKey||``});if(!t.json.ok){yield*L.update(L.loaders.error({id:n,message:t.json.error.message}));return}r=`${t.json.value.id}`}let i=yield*Qie.run({id:e.payload.id,ipAllowlist:e.payload.ipAllowlist,containerPort:e.payload.containerPort,containerPorts:e.payload.containerPorts,certId:r,tokenHeader:e.payload.tokenHeader,lbAlgorithm:e.payload.lbAlgorithm,shared:e.payload.shared,domain:e.payload.domain});if(!i.json.ok){yield*L.update(L.loaders.error({id:n,message:i.json.error.message}));return}yield*t();let a=yield*fm.run(fm({endpointId:e.payload.id,type:`provision`,settings:e.payload.settings??{}}));if(!a.json.ok){let e=a.json.error;yield*L.update(L.loaders.error({id:n,message:e.message}));return}yield*L.update(L.loaders.success({id:n,meta:{opId:a.json.value.id},message:`Success!`}))});function vm(e){return e.acme&&e.acmeStatus!==`ready`&&e.status===`provisioned`}function ym(e){return e[e.length-1]===`.`?e:`${e}.`}var bm=qn.create(`check-dns`,function*(e,t){let{from:n,to:r}=e.payload;yield*L.update(L.loaders.start({id:e.key}));let i=Math.floor(Math.random()*1e4),a=yield*Te(()=>fetch(`https://dns.google.com/resolve?rand=${i}&name=${ym(n)}`)),o=yield*Te(()=>a.json()),s=!1,c=o.Answer||[];o.Status!==0&&(yield*L.update(L.loaders.success({id:e.key,meta:{success:s}}))),s=c.some(e=>ym(e.data)===ym(r)),yield*L.update(L.loaders.success({id:e.key,meta:{success:s}})),yield*t()}),xm=e=>e.internal?`Private`:`Public`,Sm=e=>e.ipWhitelist.length>0?e.ipWhitelist.join(`, `):`Disabled`,Cm=e=>{let t=e.type===`http`||e.type===`http_proxy_protocol`,n=e.type===`tls`;return(t||n)&&!e.default&&!e.acme},$ie=e=>e.type===`http`||e.type===`http_proxy_protocol`||e.type===`grpc`,wm=e=>e.type===`tls`||e.type===`tcp`,eae={FORCE_SSL:[`alb`,`elb`],MAINTENANCE_PAGE_URL:[`alb`,`elb`],IDLE_TIMEOUT:[`alb`,`elb`,`tls`,`grpc`,`tcp`],RELEASE_HEALTHCHECK_TIMEOUT:[`alb`,`elb`],STRICT_HEALTH_CHECKS:[`alb`,`elb`],SHOW_ELB_HEALTHCHECKS:[`alb`,`elb`],SSL_PROTOCOLS_OVERRIDE:[`alb`,`elb`,`tls`,`grpc`],SSL_CIPHERS_OVERRIDE:[`elb`,`tls`,`grpc`],DISABLE_WEAK_CIPHER_SUITES:[`elb`,`tls`,`grpc`]},Tm=(e,t,n)=>{let r=eae[e];return r?t===`http`||t===`http_proxy_protocol`?r.includes(n):r.includes(t):!1},Em=e=>{let t=[{label:`Accept platform default (currently TLSv1 TLSv1.1 TLSv1.2)`,value:``},{label:`TLSv1 TLSv1.1 TLSv1.2`,value:`TLSv1 TLSv1.1 TLSv1.2`},{label:`TLSv1.1 TLSv1.2`,value:`TLSv1.1 TLSv1.2`},{label:`TLSv1.2`,value:`TLSv1.2`}];return e&&(t.splice(2,0,{label:`TLSv1 TLSv1.1 TLSv1.2 (only Perfect Forward Secrecy)`,value:`TLSv1 TLSv1.1 TLSv1.2 PFS`}),t.splice(4,0,{label:`TLSv1.1 TLSv1.2 (only Perfect Forward Secrecy)`,value:`TLSv1.1 TLSv1.2 PFS`}),t.push({label:`TLSv1.2 (only Perfect Forward Secrecy)`,value:`TLSv1.2 PFS`},{label:`TLSv1.2 TLSv1.3 (only Perfect Forward Secrecy)`,value:`TLSv1.2 PFS TLSv1.3`},{label:`TLSv1.3 (only Perfect Forward Secrecy)`,value:`TLSv1.3`})),t},Dm=(e,t)=>{let n=`Unknown`;return t.length>0&&(n=[...t].sort((e,t)=>
2e-t).join(`, `)),e.containerPorts.length>0?e.containerPorts.join(`, `):e.containerPort||`Default (${n})`},Om=`New Endpoint`,km=e=>!e||!Vp(e)?Om:e.status===`provisioning`?`Provisioning`:e.default?e.virtualDomain:e.externalHost,Am=e=>!e||!Vp(e)?Om:e.virtualDomain||e.externalHost||Om,jm=e=>{if(e)return e.tokenHeader?`True`:`False`},Mm=e=>({url:Am(e),placement:xm(e),ipAllowlist:Sm(e),hostname:km(e),token_header:jm(e)}),Nm=e=>e.split(/\s+/).filter(Boolean),Pm=e=>e.split(/[,\s]+/).filter(Boolean).map(e=>Number(e)),Fm={"Round Robin":`round_robin`,"Least Outstanding Requests":`least_outstanding_requests`,"Weighted Random":`weighted_random`},tae=(e={})=>{let t=new Date().toISOString();return{id:void 0,scaling_enabled:!1,autoscaling:`vertical`,default_policy:!1,metric_lookback_seconds:300,percentile:99,post_scale_up_cooldown_seconds:60,post_scale_down_cooldown_seconds:300,post_release_cooldown_seconds:60,mem_cpu_ratio_r_threshold:4,mem_cpu_ratio_c_threshold:2,mem_scale_up_threshold:.9,mem_scale_down_threshold:.75,minimum_memory:2048,maximum_memory:null,min_containers:2,max_containers:4,min_cpu_threshold:.1,max_cpu_threshold:.9,scale_up_step:1,scale_down_step:1,use_horizontal_scale:!1,created_at:t,updated_at:t,_type:`service_sizing_policy`,...e,_links:{account:mn(),...e._links}}},Im=e=>{let t=e._links,n=R(t.account);return{id:`${e.id}`,environmentId:n,scalingEnabled:e.scaling_enabled,autoscaling:e.autoscaling,defaultPolicy:e.default_policy,metricLookbackSeconds:e.metric_lookback_seconds,percentile:e.percentile,postScaleUpCooldownSeconds:e.post_scale_up_cooldown_seconds,postScaleDownCooldownSeconds:e.post_scale_down_cooldown_seconds,postReleaseCooldownSeconds:e.post_release_cooldown_seconds,memCpuRatioRThreshold:e.mem_cpu_ratio_r_threshold,memCpuRatioCThreshold:e.mem_cpu_ratio_c_threshold,memScaleUpThreshold:e.mem_scale_up_threshold,memScaleDownThreshold:e.mem_scale_down_threshold,minimumMemory:e.minimum_memory,maximumMemory:e.maximum_memory,minContainers:e.min_containers,maxContainers:e.max_containers,scaleUpStep:e.scale_up_step,scaleDownStep:e.scale_down_step,minCpuThreshold:e.min_cpu_threshold,maxCpuThreshold:e.max_cpu_threshold,useHorizontalScale:e.use_horizontal_scale,createdAt:e.created_at,updatedAt:e.updated_at}},Lm={service_sizing_policy:vn({id:`service_sizing_policy`,deserialize:Im,save:L.serviceSizingPolicies.add})},Rm=L.serviceSizingPolicies.selectById,zm=D(Eu,L.serviceSizingPolicies.selectTableAsList,(e,t)=>t.find(t=>t.id===e.serviceSizingPolicyId)||L.serviceSizingPolicies.empty),Bm=D(Rm,e=>e.scalingEnabled),nae=D(zm,e=>e.scalingEnabled),Vm=z.get(`/service_sizing_policies?per_page=5000`,{supervisor:ur()}),Hm=z.get(`/accounts/:id/service_sizing_policies`,{supervisor:fr()}),Um=z.get(`/services/:serviceId/service_sizing_policies`,{supervisor:fr()}),Wm=e=>({scaling_enabled:e.scalingEnabled,autoscaling:e.autoscaling,metric_lookback_seconds:e.metricLookbackSeconds,percentile:e.percentile,post_scale_up_cooldown_seconds:e.postScaleUpCooldownSeconds,post_scale_down_cooldown_seconds:e.postScaleDownCooldownSeconds,post_release_cooldown_seconds:e.postReleaseCooldownSeconds,mem_cpu_ratio_r_threshold:e.memCpuRatioRThreshold,mem_cpu_ratio_c_threshold:e.memCpuRatioCThreshold,mem_scale_up_threshold:e.memScaleUpThreshold,mem_scale_down_threshold:e.memScaleDownThreshold,minimum_memory:e.minimumMemory,maximum_memory:e.maximumMemory||null,min_containers:e.minContainers,max_containers:e.maxContainers,min_cpu_threshold:e.minCpuThreshold,max_cpu_threshold:e.maxCpuThreshold,scale_up_step:e.scaleUpStep,scale_down_step:e.scaleDownStep,use_horizontal_scale:e.useHorizontalScale}),Gm=z.post([`/services/:serviceId/service_sizing_policies`],function*(e,t){e.request=e.req({body:JSON.stringify(Wm(e.payload))}),yield*t()}),Km=z.put([`/services/:serviceId/service_sizing_policies`],function*(e,t){e.request=e.req({body:JSON.stringify(Wm(e.payload))}),yield*t()}),rae=z.delete([`/services/:serviceId/service_sizing_policy`],function*(e,t){yield*t(),e.json.ok&&(e.loader={message:`Policy changes saved`})}),qm=qn.create(`modify-service-sizing-policy`,function*(e,t){yield*L.update(L.loaders.start({id:e.name}));let n=e.payload,r=n.id?yield*Km.run(n):yield*Gm.run(n);if(yield*t(),r.json.ok)yield*L.update([L.services.patch({[n.serviceId]:{serviceSizingPolicyId:`${r.json.value.id}`}}),L.loaders.success({id:e.name,message:`Policy changes saved`})]);else{let t=r.json.error;yield*L.update(L.loaders.error({id:e.name,message:t.message}))}}),Jm=e=>{let t=e._links;return{id:e.id,handle:e.handle,drainType:e.drain_type,drainHost:e.drain_host,drainPort:e.drain_port,drainUsername:e.drain_username,drainPassword:e.drain_password,url:e.url,loggingToken:e.logging_token,drainApps:e.drain_apps,drainDatabases:e.drain_databases,drainEphemeralSessions:e.drain_ephemeral_sessions,drainProxies:e.drain_proxies,environmentId:R(t.account),databaseId:R(t.database),backendChannel:e._embedded.backend.channel,createdAt:e.created_at,deletedAt:e.deleted_at,updatedAt:e.updated_at,status:e.status}},iae=(e={})=>{let t=new Date().toISOString();return{id:``,handle:``,drain_type:`datadog`,drain_host:``,drain_port:``,drain_username:``,drain_password:``,url:``,logging_token:``,drain_apps:!1,drain_databases:!1,drain_ephemeral_sessions:!1,drain_proxies:!1,status:`pending`,created_at:t,deleted_at:``,updated_at:t,_embedded:{backend:{channel:``}},_links:{account:mn(),database:mn()},...e}},Ym=L.logDrains.selectById,Xm=L.logDrains.findById,Zm=L.logDrains.selectTableAsList,Qm=L.logDrains.selectTable,$m=D(Zm,(e,t)=>t.envId,(e,t)=>e.filter(e=>e.environmentId===t).sort((e,t)=>
2new Date(t.createdAt).getTime()-new Date(e.createdAt).getTime())),aae=e=>e.id!==``,eh=e=>[`https_post`,`logdna`,`sumologic`,`datadog`].includes(e.drainType),th=e=>[`syslog_tls_tcp`,`papertrail`].includes(e.drainType),nh=z.get(`/log_drains?per_page=5000`,{supervisor:dr()},function*(e,t){yield*t(),e.json.ok&&(yield*L.update(L.logDrains.reset()))}),rh=z.get(`/accounts/:id/log_drains`,{supervisor:ur()}),ih=z.get(`/log_drains/:id`,function*(e,t){if(e.payload.withDeleted){let t=e.req().url,n=new URL(t);n.searchParams.set(`with_deleted`,`true`),e.request=e.req({url:n.toString()})}yield*t()}),ah=z.post(`/accounts/:envId/log_drains`,function*(e,t){let n={drain_type:e.payload.drainType,handle:e.payload.handle,drain_apps:e.payload.drainApps,drain_databases:e.payload.drainDatabases,drain_proxies:e.payload.drainProxies,drain_ephemeral_sessions:e.payload.drainEphemeralSessions},r=``;if(e.payload.drainType===`elasticsearch_database`)r=JSON.stringify({...n,database_id:e.payload.databaseId});else if(e.payload.drainType===`papertrail`){let{drainHost:t,drainPort:i}=e.payload;r=JSON.stringify({...n,drain_type:`papertrail`,drain_host:t,drain_port:i})}else if(e.payload.drainType===`solarwinds`){let{drainHost:t,loggingToken:i}=e.payload;r=JSON.stringify({...n,drain_type:`solarwinds`,drain_host:t,logging_token:i})}else if(e.payload.drainType===`datadog`||e.payload.drainType===`logdna`||e.payload.drainType===`sumologic`||e.payload.drainType===`https_post`){let{url:t}=e.payload;r=JSON.stringify({...n,drain_type:`https_post`,url:t})}else if(e.payload.drainType===`insightops`)r=JSON.stringify({...n,drain_type:`syslog_tls_tcp`,drain_host:`api.logentries.com`,drain_port:2e4});else{let{drainHost:t,drainPort:i,loggingToken:a}=e.payload;r=JSON.stringify({...n,drain_type:`syslog_tls_tcp`,drain_host:t,drain_port:i,logging_token:a})}e.request=e.req({body:r}),yield*t()}),oh=z.post(`/log_drains/:id/operations`,function*(e,t){let n=JSON.stringify({type:`provision`});e.request=e.req({body:n}),yield*t()}),sh=qn.create(`create-and-provision-log-drain`,function*(e,t){let n=e.key;yield*L.update(L.loaders.start({id:n}));let r=yield*Te(()=>ah.run(ah(e.payload)));if(!r.json.ok){let e=r.json.error;yield*L.update(L.loaders.error({id:n,message:e.message}));return}let i=r.json.value.id,a=yield*Te(()=>oh.run(oh({id:`${i}`})));if(!a.json.ok){let e=a.json.error;yield*L.update(L.loaders.error({id:n,message:e.message}));return}yield*t(),yield*L.update(L.loaders.success({id:n,meta:{logDrainId:i,opId:`${a.json.value.id}`}}))}),ch=z.post([`/log_drains/:id/operations`,`deprovision`],function*(e,t){let{id:n}=e.payload,r={type:`deprovision`,id:n};if(e.request=e.req({body:JSON.stringify(r)}),yield*t(),!e.json.ok)return;let i=e.json.value.id;e.loader={message:`Deprovision log drain operation queued (operation ID: ${i})`,meta:{opId:`${i}`}}}),lh=z.post([`/log_drains/:id/operations`,`restart`],function*(e,t){let{id:n}=e.payload,r={type:`configure`,id:n};if(e.request=e.req({body:JSON.stringify(r)}),yield*t(),!e.json.ok)return;let i=e.json.value.id;e.loader={message:`Restart log drain operation queued (operation ID: ${i})`,meta:{opId:`${i}`}}}),uh={log_drain:vn({id:`log_drain`,deserialize:Jm,save:L.logDrains.add})},oae=(e={})=>{let t=new Date().toISOString();return{id:0,default:!0,description:``,discoverable:!0,docker_repo:``,indexable:!0,type:``,version:``,visible:!0,eol_at:``,pitr_supported:!1,created_at:t,updated_at:t,_type:`database_image`,...e}},dh=e=>({id:`${e.id}`,default:e.default,description:e.description,discoverable:e.discoverable,dockerRepo:e.docker_repo,eolAt:e.eol_at,indexable:e.indexable,type:e.type,version:e.version,visible:e.visible,pitrSupported:e.pitr_supported,createdAt:e.created_at,updatedAt:e.updated_at}),fh=e=>e.id!==``,ph=L.databaseImages.selectById,mh=L.databaseImages.selectTable,hh=L.databaseImages.findById,gh=D(L.databaseImages.selectTableAsList,e=>[...e].sort((e,t)=>t.description.localeCompare(e.description,`en`,{numeric:!0}))),_h=D(gh,e=>e.filter(e=>e.visible&&e.indexable)),vh=z.get(`/database_images?per_page=5000&all=true`,{supervisor:ur()}),yh=z.get(`/database_images/:id`,{supervisor:j},function*(e,t){(yield*p(t=>L.databaseImages.selectById(t,{id:e.payload.id}))).id===``&&(yield*t())}
2),bh={database_image:vn({id:`database_image`,deserialize:dh,save:L.databaseImages.add})},sae=(e={})=>{let t=new Date().toISOString();return{id:``,handle:``,drain_type:`datadog`,drain_configuration:{},environmentId:``,status:`pending`,aggregator_host:``,aggregator_allocation:[],aggregator_docker_name:``,aggregator_instance_id:``,aggregator_port_mapping:[],aggregator_ca_certificate:``,aggregator_ca_private_key_blob:``,created_at:t,deleted_at:``,updated_at:t,_links:{account:mn(),database:mn(),...e._links},...e}},xh=e=>{let t=e._links;return{id:e.id,handle:e.handle,drainType:e.drain_type,agggregatorCaCertificate:e.aggregator_ca_certificate,aggregatorCaPrivateKeyBlob:e.aggregator_ca_private_key_blob,aggregatorHost:e.aggregator_host,aggregatorPortMapping:e.aggregator_port_mapping,aggregatorInstanceId:e.aggregator_instance_id,aggregatorDockerName:e.aggregator_docker_name,aggregatorAllocation:e.aggregator_allocation,drainConfiguration:e.drain_configuration,environmentId:R(t.account),databaseId:R(t.database),createdAt:e.created_at,deletedAt:e.deleted_at,updatedAt:e.updated_at,status:e.status}},cae=L.metricDrains.selectById,Sh=L.metricDrains.findById,Ch=L.metricDrains.selectTableAsList,wh=L.metricDrains.selectTable,Th=D(Ch,(e,t)=>t.envId,(e,t)=>e.filter(e=>e.environmentId===t).sort((e,t)=>new Date(t.createdAt).getTime()-new Date(e.createdAt).getTime())),lae=e=>e.id!==``,Eh=z.get(`/accounts/:id/metric_drains`),Dh=z.get(`/metric_drains/:id`,function*(e,t){if(e.payload.withDeleted){let t=e.req().url,n=new URL(t);n.searchParams.set(`with_deleted`,`true`),e.request=e.req({url:n.toString()})}yield*t()}),Oh=z.get(`/metric_drains?per_page=5000`,{supervisor:ur()},function*(e,t){yield*t(),e.json.ok&&(yield*L.update(L.metricDrains.reset()))}),kh={US1:`https://app.datadoghq.com`,US3:`https://us3.datadoghq.com`,US5:`https://us5.datadoghq.com`,EU1:`https://app.datadoghq.eu`,"US1-FED":`https://app.ddog-gov.com`},Ah=`/api/v1/series`,jh=z.post(`/accounts/:envId/metric_drains`,function*(e,t){let n={drain_type:e.payload.drainType,handle:e.payload.handle},r=``;if(e.payload.drainType===`influxdb_database`)r=JSON.stringify({...n,database_id:e.payload.dbId});else if(e.payload.drainType===`influxdb`){let{protocol:t,hostname:i,username:a,password:o,database:s}=e.payload,c=t===`http`?80:443,l=`${t}://${i}:${e.payload.port||c}`;r=JSON.stringify({...n,drain_configuration:{address:l,username:a,password:o,database:s}})}else if(e.payload.drainType===`influxdb2`){let{protocol:t,hostname:i,org:a,authToken:o,bucket:s}=e.payload,c=t===`http`?80:443,l=`${t}://${i}:${e.payload.port||c}`;r=JSON.stringify({...n,drain_configuration:{address:l,org:a,authToken:o,bucket:s}})}else if(e.payload.drainType===`datadog`){let t=kh[e.payload.ddSite||`US1`]+Ah;r=JSON.stringify({...n,drain_configuration:{api_key:e.payload.apiKey,series_url:t}})}e.request=e.req({body:r}),yield*t()}),Mh=z.post(`/metric_drains/:id/operations`,function*(e,t){let n=JSON.stringify({type:`provision`});e.request=e.req({body:n}),yield*t()}),Nh=qn.create(`create-and-provision-metric-drain`,function*(e,t){yield*L.update(L.loaders.start({id:e.key}));let n=yield*Te(()=>jh.run(jh(e.payload)));if(!n.json.ok){let t=n.json.error;yield*L.update(L.loaders.error({id:e.key,message:t.message}));return}let r=n.json.value.id,i=yield*Te(()=>Mh.run(Mh({id:r})));if(!i.json.ok){let t=i.json.error;yield*L.update(L.loaders.error({id:e.key,message:t.message}));return}yield*t(),yield*L.update(L.loaders.success({id:e.key,meta:{metricDrainId:r,opId:`${i.json.value.id}`}}))}),Ph=z.post([`/metric_drains/:id/operations`,`deprovision`],function*(e,t){let{id:n}=e.payload,r={type:`deprovision`,id:n};if(e.request=e.req({body:JSON.stringify(r)}),yield*t(),!e.json.ok)return;let i=e.json.value.id;e.loader={message:`Deprovision log drain operation queued (operation ID: ${i})`,meta:{opId:`${i}`}}}),uae=z.post([`/metric_drains/:id/operations`,`restart`],function*(e,t){let{id:n}=e.payload,r={type:`provision`,id:n};if(e.request=e.req({body:JSON.stringify(r)}),yield*t(),!e.json.ok)return;let i=e.json.value.id;e.loader={message:`Restart log drain operation queued (operation ID: ${i})`,meta:{opId:`${i}`}}}),Fh={metric_drain:vn({id:`metric_drain`,deserialize:xh,save:L.metricDrains.add})}
2,dae=[/(?:adafruit)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9_-]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/(?:adobe)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-f0-9]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/\b((p8e-)[a-z0-9]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/AGE-SECRET-KEY-1[QPZRY9X8GF2TVDW0S3JN54KHCE6MUA7L]{58}/,/(?:airtable)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{17})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/(?:algolia)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/\b((LTAI)[a-z0-9]{20})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/(?:alibaba)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{30})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/(?:asana)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([0-9]{16})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/(?:asana)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/(?:atlassian|confluence|jira)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{24})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/\b((?:sc|ext|scauth|authress)_[a-z0-9]{5,30}\.[a-z0-9]{4,6}\.acc[_-][a-z0-9-]{10,32}\.[a-z0-9+/_=-]{30,120})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/(?:A3T[A-Z0-9]|AKIA|ASIA|ABIA|ACCA)[A-Z0-9]{16}/,/(?:beamer)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}(b_[a-z0-9=_\-]{44})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/(?:bitbucket)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/(?:bitbucket)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9=_\-]{64})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/(?:bittrex)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/(?:bittrex)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/(CLOJARS_)[a-z0-9]{60}/i,/(?:cloudflare)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9_-]{40})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/(?:cloudflare)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-f0-9]{37})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/\b(v1\.0-[a-f0-9]{24}-[a-f0-9]{146})(?:['|\"|\n|\r|\s|\x60|;]|$)/,/(?:codecov)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/(?:coinbase)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9_-]{64})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/(?:confluent)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{16})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/(?:confluent)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{64})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/(?:contentful)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9=_\-]{43})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/\b(dapi[a-h0-9]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/(?:datadog)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{40})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/(?:dnkey)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}(dnkey-[a-z0-9=_\-]{26}-[a-z0-9=_\-]{52})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/\b(doo_v1_[a-f0-9]{64})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/\b(dop_v1_[a-f0-9]{64})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/\b(dor_v1_[a-f0-9]{64})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/(?:discord)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-f0-9]{64})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/(?:discord)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([0-9]{18})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/(?:discord)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9=_\-]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/(dp\.pt\.)[a-zA-Z0-9]{43}
2/,/(?:droneci)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/(?:dropbox)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{15})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/(?:dropbox)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{11}(AAAAAAAAAA)[a-z0-9\-_=]{43})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/(?:dropbox)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}(sl\.[a-z0-9\-=_]{135})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/duffel_(test|live)_[a-zA-Z0-9_\-=]{43}/,/dt0c01\.[a-zA-Z0-9]{24}\.[a-zA-Z0-9]{64}/,/\bEZAK[a-zA-Z0-9]{54}/,/\bEZTK[a-zA-Z0-9]{54}/,/(?:etsy)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{24})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/\b(\d{15,16}\|[0-9a-z\-_]{27})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/\b(EAA[MC][a-z0-9]{20,})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/(?:facebook)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-f0-9]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/(?:fastly)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9=_\-]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/(?:finicity)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-f0-9]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/(?:finicity)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{20})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/(?:finnhub)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{20})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/(?:flickr)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/FLWSECK_TEST-[a-hA-H0-9]{12}
2/,/FLWPUBK_TEST-[a-hA-H0-9]{32}-[Xx]/,/FLWSECK_TEST-[a-hA-H0-9]{32}-[Xx]/,/fio-u-[a-zA-Z0-9\-_=]{64}/,/(?:freshbooks)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{64})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/\b(AIza[0-9A-Za-z\\-_]{35})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/(?:key|api|token|secret|client|passwd|password|auth|access)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([0-9a-z\-_.=]{10,150})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/(ghu|ghs)_[0-9a-zA-Z]{36}/,/github_pat_[0-9a-zA-Z_]{82}/,/gho_[0-9a-zA-Z]{36}/,/ghp_[0-9a-zA-Z]{36}/,/ghr_[0-9a-zA-Z]{36}/,/glpat-[0-9a-zA-Z\-\_]{20}/,/glptt-[0-9a-f]{40}/,/GR1348941[0-9a-zA-Z\-\_]{20}/,/(?:gitter)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9_-]{40})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/(?:gocardless)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}(live_[a-z0-9\-_=]{40})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/\b(eyJrIjoi[A-Za-z0-9]{70,400}={0,2})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/\b(glc_[A-Za-z0-9+/]{32,400}={0,2})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/\b(glsa_[A-Za-z0-9]{32}_[A-Fa-f0-9]{8})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/[a-z0-9]{14}\.atlasv1\.[a-z0-9\-_=]{60,70}/i,/(?:administrator_login_password|password)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}("[a-z0-9=_\-]{8,20}")(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/(?:heroku)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/(?:hubspot)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/(?:^|[\\'"` >=:])(hf_[a-zA-Z]{34})(?:$|[\\'"` <])/,/(?:^|[\\'"` >=:\(,)])(api_org_[a-zA-Z]{34})(?:$|[\\'"` <\),])/,/\b(ico-[a-zA-Z0-9]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/(?:intercom)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9=_\-]{60})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/(?:jfrog|artifactory|bintray|xray)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{73})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/(?:jfrog|artifactory|bintray|xray)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{64})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/\b(ey[a-zA-Z0-9]{17,}\.ey[a-zA-Z0-9\/\\_-]{17,}\.(?:[a-zA-Z0-9\/\\_-]{10,}={0,2})?)(?:['|\"|\n|\r|\s|\x60|;]|$)/,/\bZXlK(?:(aGJHY2lPaU)|(aGNIVWlPaU)|(aGNIWWlPaU)|(aGRXUWlPaU)|(aU5qUWlP)|(amNtbDBJanBi)|(amRIa2lPaU)|(bGNHc2lPbn)|(bGJtTWlPaU)|(cWEzVWlPaU)|(cWQyc2lPb)|(cGMzTWlPaU)|(cGRpSTZJ)|(cmFXUWlP)|(clpYbGZiM0J6SWpwY)|(cmRIa2lPaUp)|(dWIyNWpaU0k2)|(d01tTWlP)|(d01uTWlPaU)|(d2NIUWlPaU)|(emRXSWlPaU)|(emRuUWlP)|(MFlXY2lPaU)|(MGVYQWlPaUp)|(MWNtd2l)|(MWMyVWlPaUp)|(MlpYSWlPaU)|(MlpYSnphVzl1SWpv)|(NElqb2)|(NE5XTWlP)|(NE5YUWlPaU)|(NE5YUWpVekkxTmlJNkl)|(NE5YVWlPaU)|(NmFYQWlPaU))[a-zA-Z0-9\/\\_+\-\r\n]{40,}={0,2}/,/(?:kraken)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9\/=_\+\-]{80,90})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/(?:kucoin)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-f0-9]{24})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/(?:kucoin)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/(?:launchdarkly)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9=_\-]{40})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/lin_api_[a-zA-Z0-9]{40}/,/(?:linear)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-f0-9]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/(?:linkedin|linked-in)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{14})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/(?:linkedin|linked-in)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{16}
2)(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/(?:lob)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}((live|test)_[a-f0-9]{35})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/(?:lob)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}((test|live)_pub_[a-f0-9]{31})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/(?:MailchimpSDK.initialize|mailchimp)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-f0-9]{32}-us\d\d)(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/(?:mailgun)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}(key-[a-f0-9]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/(?:mailgun)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}(pubkey-[a-f0-9]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/(?:mailgun)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-h0-9]{32}-[a-h0-9]{8}-[a-h0-9]{8})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/(?:mapbox)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}(pk\.[a-z0-9]{60}\.[a-z0-9]{22})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/(?:mattermost)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{26})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/(?:messagebird|message-bird|message_bird)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{25})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/(?:messagebird|message-bird|message_bird)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/https:\/\/[a-z0-9]+\.webhook\.office\.com\/webhookb2\/[a-z0-9]{8}-([a-z0-9]{4}-){3}[a-z0-9]{12}@[a-z0-9]{8}-([a-z0-9]{4}-){3}[a-z0-9]{12}\/IncomingWebhook\/[a-z0-9]{32}\/[a-z0-9]{8}-([a-z0-9]{4}-){3}[a-z0-9]{12}/,/(?:netlify)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9=_\-]{40,46})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/(?:new-relic|newrelic|new_relic)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}(NRJS-[a-f0-9]{19})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/(?:new-relic|newrelic|new_relic)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{64})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/(?:new-relic|newrelic|new_relic)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}(NRAK-[a-z0-9]{27})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/\b(npm_[a-z0-9]{36})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/(?:nytimes|new-york-times,|newyorktimes)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9=_\-]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/(?:okta)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9=_\-]{42})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/\b(sk-[a-zA-Z0-9]{20}T3BlbkFJ[a-zA-Z0-9]{20})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/(?:plaid)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}(access-(?:sandbox|development|production)-[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/(?:plaid)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{24})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/(?:plaid)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{30})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/\b(pscale_tkn_[a-z0-9=\-_\.]{32,64})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/\b(pscale_oauth_[a-z0-9=\-_\.]{32,64})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/\b(pscale_pw_[a-z0-9=\-_\.]{32,64})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/\b(PMAK-[a-f0-9]{24}\-[a-f0-9]{34})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/\b(pnu_[a-z0-9]{36})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/-----BEGIN[ A-Z0-9_-]{0,100}PRIVATE KEY( BLOCK)?-----[\s\S-]*KEY( BLOCK)?----/i,/\b(pul-[a-f0-9]{40})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/pypi-AgEIcHlwaS5vcmc[A-Za-z0-9\-_]{50,1000}/,/(?:rapidapi)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9_-]{50})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/\b(rdme_[a-z0-9]{70})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/\b(rubygems_[a-f0-9]{48})(?:['|\"|\n|\r|\s|\x60|;
2]|$)/i,/\b(tk-us-[a-zA-Z0-9-_]{48})(?:['|\"|\n|\r|\s|\x60|;]|$)/,/(?:sendbird)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/(?:sendbird)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-f0-9]{40})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/\b(SG\.[a-z0-9=_\-\.]{66})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/\b(xkeysib-[a-f0-9]{64}\-[a-z0-9]{16})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/(?:sentry)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-f0-9]{64})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/\b(shippo_(live|test)_[a-f0-9]{40})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/shpat_[a-fA-F0-9]{32}/,/shpca_[a-fA-F0-9]{32}/,/shppa_[a-fA-F0-9]{32}/,/shpss_[a-fA-F0-9]{32}/,/(?:BUNDLE_ENTERPRISE__CONTRIBSYS__COM|BUNDLE_GEMS__CONTRIBSYS__COM)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-f0-9]{8}:[a-f0-9]{8})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/\b(http(?:s??):\/\/)([a-f0-9]{8}:[a-f0-9]{8})@(?:gems.contribsys.com|enterprise.contribsys.com)(?:[\/|\#|\?|:]|$)/i,/(xapp-\d-[A-Z0-9]+-\d+-[a-z0-9]+)/i,/(xoxb-[0-9]{10,13}\-[0-9]{10,13}[a-zA-Z0-9-]*)/,/(xoxe.xox[bp]-\d-[A-Z0-9]{163,166})/i,/(xoxe-\d-[A-Z0-9]{146})/i,/(xoxb-[0-9]{8,14}\-[a-zA-Z0-9]{18,26})/,/(xox[os]-\d+-\d+-\d+-[a-fA-F\d]+)/,/(xox[ar]-(?:\d-)?[0-9a-zA-Z]{8,48})/,/(xox[pe](?:-[0-9]{10,13}){3}-[a-zA-Z0-9-]{28,34})/,/(https?:\/\/)?hooks.slack.com\/(services|workflows)\/[A-Za-z0-9+\/]{43,46}/,/(?:snyk_token|snyk_key|snyk_api_token|snyk_api_key|snyk_oauth_token)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/\b((EAAA|sq0atp-)[0-9A-Za-z\-_]{22,60})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/(?:squarespace)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/\b((sk|rk)_(test|live|prod)_[0-9a-z]{10,99})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/(?:(?:sumo)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3})(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}(su[a-zA-Z0-9]{12})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/(?:sumo)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{64})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/(?:^|[^0-9])([0-9]{5,16}:A[a-zA-Z0-9_\-]{34})(?:$|[^a-zA-Z0-9_\-])/i,/(?:travis)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{22})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/SK[0-9a-fA-F]{32}/,/(?:twitch)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{30})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/(?:twitter)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{45})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/(?:twitter)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([0-9]{15,25}-[a-zA-Z0-9]{20,40})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/(?:twitter)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{25})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/(?:twitter)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{50})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/(?:twitter)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}(A{22}[a-zA-Z0-9%]{80,100})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/(?:typeform)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}(tfp_[a-z0-9\-_\.=]{59})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/\b(hvb\.[a-z0-9_-]{138,212})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/\b(hvs\.[a-z0-9_-]{90,100})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/(?:yandex)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}(t1\.[A-Z0-9a-z_-]+[=]{0,2}\.[A-Z0-9a-z_-]{86}[=]{0,2})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/(?:yandex)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}(AQVN[A-Za-z0-9_\-]{35,38})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/(?:yandex)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}(YC[a-zA-Z0-9_\-]{38})(?:['|\"|\n|\r|\s|\x60|;]|$)/i,/(?:zendesk)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:{1,3}=|\|\|:|<=|=>|:|\?=)(?:'|\"|\s|=|\x60){0,5}([a-z0-9]{40})(?:['|\"|\n|\r|\s|\x60|;]|$)/i],fae=e=>dae.some(t=>t.test(e)),Ih=i(((e,t)=>{t.exports={}})),pae=r({browser:()=>Qh,default:()=>$h,description:()=>zh,devDependencies:()=>Xh,engines:()=>Zh,exports:()=>Hh,funding:()=>Kh,homepage:()=>Gh,keywords:()=>qh,license:()=>Yh,main:()=>Bh,name:()=>Lh,readmeFilename:()=>Jh,repository:()=>Wh,scripts:()=>Uh,types:()=>Vh,version:()=>Rh}),Lh,Rh,zh,Bh,Vh,Hh,Uh,Wh,Gh,Kh,qh,Jh,Yh,Xh,Zh,Qh,$h,mae=n((()=>
2{Lh=`dotenv`,Rh=`16.6.1`,zh=`Loads environment variables from .env file`,Bh=`lib/main.js`,Vh=`lib/main.d.ts`,Hh={".":{types:`./lib/main.d.ts`,require:`./lib/main.js`,default:`./lib/main.js`},"./config":`./config.js`,"./config.js":`./config.js`,"./lib/env-options":`./lib/env-options.js`,"./lib/env-options.js":`./lib/env-options.js`,"./lib/cli-options":`./lib/cli-options.js`,"./lib/cli-options.js":`./lib/cli-options.js`,"./package.json":`./package.json`},Uh={"dts-check":`tsc --project tests/types/tsconfig.json`,lint:`standard`,pretest:`npm run lint && npm run dts-check`,test:`tap run --allow-empty-coverage --disable-coverage --timeout=60000`,"test:coverage":`tap run --show-full-coverage --timeout=60000 --coverage-report=text --coverage-report=lcov`,prerelease:`npm test`,release:`standard-version`},Wh={type:`git`,url:`git://github.com/motdotla/dotenv.git`},Gh=`https://github.com/motdotla/dotenv#readme`,Kh=`https://dotenvx.com`,qh=[`dotenv`,`env`,`.env`,`environment`,`variables`,`config`,`settings`],Jh=`README.md`,Yh=`BSD-2-Clause`,Xh={"@types/node":`^18.11.3`,decache:`^4.6.2`,sinon:`^14.0.1`,standard:`^17.0.0`,"standard-version":`^9.5.0`,tap:`^19.2.0`,typescript:`^4.8.4`},Zh={node:`>=12`},Qh={fs:!1},$h={name:Lh,version:Rh,description:zh,main:Bh,types:Vh,exports:Hh,scripts:Uh,repository:Wh,homepage:Gh,funding:Kh,keywords:qh,readmeFilename:Jh,license:Yh,devDependencies:Xh,engines:Zh,browser:Qh}})),hae=i(((e,n)=>{var r=Ih(),i=Ih(),a=Ih(),o=Ih(),s=(mae(),t(pae).default).version,c=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/gm;function l(e){let t={},n=e.toString();n=n.replace(/\r\n?/gm,` 3`);let r;for(;(r=c.exec(n))!=null;){let e=r[1],n=r[2]||``;n=n.trim();let i=n[0];n=n.replace(/^(['"`])([\s\S]*)\1$/gm,`$2`),i===`"`&&(n=n.replace(/\\n
3/g,` 4`),n=n.replace(/\\r/g,`\r`)),t[e]=n}return t}function u(e){e||={};let t=g(e);e.path=t;let n=C.configDotenv(e);if(!n.parsed){let e=Error(`MISSING_DATA: Cannot parse ${t} for an unknown reason`);throw e.code=`MISSING_DATA`,e}let r=m(e).split(`,`),i=r.length,a;for(let e=0;e<i;e++)try{let t=h(n,r[e].trim());a=C.decrypt(t.ciphertext,t.key);break}catch(t){if(e+1>=i)throw t}return C.parse(a)}function d(e){console.log(`[dotenv@${s}][WARN] ${e}`)}function f(e){console.log(`[dotenv@${s}][DEBUG] ${e}`)}function p(e){console.log(`[dotenv@${s}] ${e}`)}function m(e){return e&&e.DOTENV_KEY&&e.DOTENV_KEY.length>0?e.DOTENV_KEY:{}.DOTENV_KEY&&{}.DOTENV_KEY.length>0?{}.DOTENV_KEY:``}function h(e,t){let n;try{n=new URL(t)}catch(e){if(e.code===`ERR_INVALID_URL`){let e=Error(`INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:[email protected]/vault/.env.vault?environment=development`);throw e.code=`INVALID_DOTENV_KEY`,e}throw e}let r=n.password;if(!r){let e=Error(`INVALID_DOTENV_KEY: Missing key part`);throw e.code=`INVALID_DOTENV_KEY`,e}let i=n.searchParams.get(`environment`);if(!i){let e=Error(`INVALID_DOTENV_KEY: Missing environment part`);throw e.code=`INVALID_DOTENV_KEY`,e}let a=`DOTENV_VAULT_${i.toUpperCase()}`,o=e.parsed[a];
4if(!o){let e=Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${a} in your .env.vault file.`);throw e.code=`NOT_FOUND_DOTENV_ENVIRONMENT`,e}return{ciphertext:o,key:r}}function g(e){let t=null;if(e&&e.path&&e.path.length>0){if(Array.isArray(e.path))for(let n of e.path)r.existsSync(n)&&(t=n.endsWith(`.vault`)?n:`${n}.vault`);else t=e.path.endsWith(`.vault`)?e.path:`${e.path}.vault`}else t=i.resolve(process.cwd(),`.env.vault`);return r.existsSync(t)?t:null}function _(e){return e[0]===`~`?i.join(a.homedir(),e.slice(1)):e}function v(e){let t=!!(e&&e.debug),n=e&&`quiet`in e?e.quiet:!0;(t||!n)&&p(`Loading env from encrypted .env.vault`);let r=C._parseVault(e),i={};return e&&e.processEnv!=null&&(i=e.processEnv),C.populate(i,r,e),{parsed:r}}function y(e){let t=i.resolve(process.cwd(),`.env`),n=`utf8`,a=!!(e&&e.debug),o=e&&`quiet`in e?e.quiet:!0;e&&e.encoding?n=e.encoding:a&&f(`No encoding is specified. UTF-8 is used by default`);let s=[t];if(e&&e.path){if(!Array.isArray(e.path))s=[_(e.path)];else{s=[];for(let t of e.path)s.push(_(t))}}let c,l={};for(let t of s)try{let i=C.parse(r.readFileSync(t,{encoding:n}));C.populate(l,i,e)}catch(e){a&&f(`Failed to load ${t} ${e.message}`),c=e}let u={};if(e&&e.processEnv!=null&&(u=e.processEnv),C.populate(u,l,e),a||!o){let e=Object.keys(l).length,t=[];for(let e of s)try{let n=i.relative(process.cwd(),e);t.push(n)}catch(t){a&&f(`Failed to load ${e} ${t.message}`),c=t}p(`injecting env (${e}) from ${t.join(`,`)}`)}return c?{parsed:l,error:c}:{parsed:l}}function b(e){if(m(e).length===0)return C.configDotenv(e);let t=g(e);return t?C._configVault(e):(d(`You set DOTENV_KEY but you are missing a .env.vault file at ${t}. Did you forget to build it?`),C.configDotenv(e))}function x(e,t){let n=Buffer.from(t.slice(-64),`hex`),r=Buffer.from(e,`base64`),i=r.subarray(0,12),a=r.subarray(-16);r=r.subarray(12,-16);try{let e=o.createDecipheriv(`aes-256-gcm`,n,i);return e.setAuthTag(a),`${e.update(r)}${e.final()}`}catch(e){let t=e instanceof RangeError,n=e.message===`Invalid key length`,r=e.message===`Unsupported state or unable to authenticate data`;if(t||n){let e=Error(`INVALID_DOTENV_KEY: It must be 64 characters long (or more)`);throw e.code=`INVALID_DOTENV_KEY`,e}if(r){let e=Error(`DECRYPTION_FAILED: Please check your DOTENV_KEY`);throw e.code=`DECRYPTION_FAILED`,e}throw e}}function S(e,t,n={}){let r=!!(n&&n.debug),i=!!(n&&n.override);if(typeof t!=`object`){let e=Error(`OBJECT_REQUIRED: Please check the processEnv argument being passed to populate`);throw e.code=`OBJECT_REQUIRED`,e}for(let n of Object.keys(t))Object.prototype.hasOwnProperty.call(e,n)?(i===!0&&(e[n]=t[n]),r&&f(i===!0?`"${n}" is already defined and WAS overwritten`:`"${n}" is already defined and was NOT overwritten`)):e[n]=t[n]}var C={configDotenv:y,_configVault:v,_parseVault:u,config:b,decrypt:x,parse:l,populate:S};n.exports.configDotenv=C.configDotenv,n.exports._configVault=C._configVault,n.exports._parseVault=C._parseVault,n.exports.config=C.config,n.exports.decrypt=C.decrypt,n.exports.parse=C.parse,n.exports.populate=C.populate,n.exports=C}))(),gae=(e={})=>({id:0,env:{},_links:{resource:mn()},_type:`configuration`,...e}),eg=e=>({id:`${e.id}`,env:e.env||{},appId:R(e._links.resource)}),tg=e=>Object.keys(e).sort((e,t)=>e.localeCompare(t)).reduce((t,n)=>{let r=String.raw`${e[n]}`,i=t?`${t}\n`:``;return r.includes(` 5`)&&(r=`"${r}"`),`${i}${n}=${r}`},``),ng=e=>{let t=[],n=(0,hae.parse)(e);return Object.keys(n).forEach(e=>{t.push({key:e,value:n[e],meta:{}})}),t},rg=(e,t={})=>{let n={};return Object.keys(t).forEach(e=>{n[e]=``}),e.forEach(e=>{n[e.key]=e.value}),n},ig=new Set([`APTIBLE_DOCKER_IMAGE`]),ag=(e,t={})=>{let n={};return Object.keys(t).forEach(e=>{ig.has(e)||(n[e]=``)}),Object.keys(e).forEach(t=>{ig.has(t)||(n[t]=e[t])}),n},og=(e,t={})=>{let n=[],r=[],i=[];return Object.keys(t).forEach(i=>{ig.has(i)||(i in e?e[i]!==t[i]&&r.push(i):n.push(i))}),Object.keys(e).forEach(e=>{ig.has(e)||e in t||i.push(e)}),{removed:n.sort((e,t)=>e.localeCompare(t)),changed:r.sort((e,t)=>e.localeCompare(t)),restored:i.sort((e,t)=>e.localeCompare(t))}},sg=L.appConfigs.selectById,cg=D(L.appConfigs.selectTable,rf,(e,t)=>L.appConfigs.findById(e,{id:t.currentConfigurationId}));function _ae(e,t,n,r,i){let a=[];return Object.entries(e.env).forEach(([e,o])=>{if(o==null)return;let s=/([a-zA-Z0-9_-]{1,64}\.)+[a-zA-Z]{1,16}/.exec(o);if(s==null)return;let c=s[0];if(fae(`${e}=${c}`))return;let l=/db-[a-zA-Z0-9_-]+-([0-9]+)\./.exec(c);if(l&&l.length>1){let t=fp(n,{id:l[1]});if(t){a.push({why:e,refId:t.id,name:t.handle,type:`database`,resource:t});return}}let u=i.find(e=>c===e.virtualDomain||c===e.externalHost);if(u==null)return;let d=ku(r,{id:u.serviceId});if(d.appId){let n=sf(t,{id:d.appId});a.push({why:e,refId:n.id,name:n.handle,type:`app`,resource:n})}else if(d.databaseId){let t=fp(n,{id:d.databaseId});a.push({why:e,refId:t.id,name:t.handle,type:`database`,resource:t})}}),a}var lg=D(cg,af,dp,Du,Bp,_ae),vae=D(lg,e=>{let t={app:[],database:[]};
5return e.forEach(e=>{switch(e.type){case`app`:t.app.push(e);break;case`database`:t.database.push(e)}}),t}),ug=z.get(`/configurations/:id`),dg=qn.create(`rollback-deployment`,function*(e,t){yield*L.update(L.loaders.start({id:e.key}));let{appId:n,target:r,configurationId:i,currentConfigurationId:a}=e.payload;if(!r){yield*L.update(L.loaders.error({id:e.key,message:`This deployment cannot be rolled back to.`}));return}let o;if(e.payload.restoreEnv){let t=yield*Te(()=>ug.run(ug({id:i,withSensitiveExtras:!0})));if(!t.json.ok){yield*L.update(L.loaders.error({id:e.key,message:t.json.error.message}));return}let n={};if(a){let t=yield*Te(()=>ug.run(ug({id:a,withSensitiveExtras:!0})));if(!t.json.ok){yield*L.update(L.loaders.error({id:e.key,message:t.json.error.message}));return}n=t.json.value.env||{}}o=ag(t.json.value.env||{},n)}let s=yield*Te(()=>Cf.run(Cf({appId:n,target:r,env:o})));if(!s.json.ok){yield*L.update(L.loaders.error({id:e.key,message:s.json.error.message}));return}let c=`${s.json.value.id}`;yield*t(),e.json=s.json,yield*L.update(L.loaders.success({id:e.key,meta:{opId:c}}))}),fg={configuration:vn({id:`configuration`,deserialize:eg,save:L.appConfigs.add})},pg=e=>{let t=e._links;return{id:e.id.toString(),appId:R(t.app),command:e.command,processType:e.process_type,createdAt:e.created_at,updatedAt:e.updated_at}},yae=L.serviceDefinitions.selectTableAsList,bae=L.serviceDefinitions.selectById,xae=D(L.serviceDefinitions.selectTableAsList,(e,t)=>t.appId,(e,t)=>e.filter(e=>e.appId===t).sort((e,t)=>e.processType.localeCompare(t.processType))),Sae=z.get(`/apps/:appId/service_definitions`,{supervisor:ur()}),Cae=z.delete(`/service_definitions/:id`),wae=z.get(`/service_definitions/:id`),Tae=z.post(`/apps/:appId/service_definitions`,function*(e,t){let{command:n,processType:r}=e.payload,i={command:n,process_type:r};e.request=e.req({body:JSON.stringify(i)}),yield*t()}),mg={service_definition:vn({id:`service_definition`,deserialize:pg,save:L.serviceDefinitions.add})},Eae=(e={})=>{let t=new Date().toISOString();return{id:0,automated_backup_limit_per_db:0,available_plans:[],compliance_dashboard_access:!1,container_memory_limit:0,cost_cents:0,cpu_allowed_profiles:0,created_at:t,disk_limit:0,environment_limit:void 0,ephemeral_session_limit:0,included_container_mb:0,included_disk_gb:0,included_vhosts:0,manual_backup_limit_per_db:0,organization_id:``,updated_at:t,vhost_limit:0,horizontal_autoscaling:!1,vertical_autoscaling:!1,_links:{organization:mn(),plan:mn()},_type:`active_plan`,...e}},Dae=(e={})=>{let t=new Date().toISOString();return{id:0,automated_backup_limit_per_db:0,compliance_dashboard_access:!1,container_memory_limit:0,cost_cents:0,cpu_allowed_profiles:0,created_at:t,disk_limit:0,environment_limit:void 0,ephemeral_session_limit:0,included_container_mb:0,included_disk_gb:0,included_vhosts:0,manual_backup_limit_per_db:0,name:`starter`,updated_at:t,vhost_limit:0,horizontal_autoscaling:!1,vertical_autoscaling:!1,_type:`plan`,...e}},hg=e=>({id:`${e.id}`,automatedBackupLimitPerDb:e.automated_backup_limit_per_db,complianceDashboardAccess:e.compliance_dashboard_access,containerMemoryLimit:e.container_memory_limit,costCents:e.cost_cents,cpuAllowedProfiles:e.cpu_allowed_profiles,createdAt:e.created_at,diskLimit:e.disk_limit,environmentLimit:e.environment_limit,ephemeralSessionLimit:e.ephemeral_session_limit,includedContainerMb:e.included_container_mb,includedDiskGb:e.included_disk_gb,includedVhosts:e.included_vhosts,manualBackupLimitPerDb:e.manual_backup_limit_per_db,name:e.name,updatedAt:e.updated_at,vhostLimit:e.vhost_limit,horizontalAutoscaling:e.horizontal_autoscaling,verticalAutoscaling:e.vertical_autoscaling}),gg=e=>{let t=e._links;return{id:`${e.id}`,availablePlans:e.available_plans,automatedBackupLimitPerDb:e.automated_backup_limit_per_db,complianceDashboardAccess:e.compliance_dashboard_access,containerMemoryLimit:e.container_memory_limit,costCents:e.cost_cents,cpuAllowedProfiles:e.cpu_allowed_profiles,createdAt:e.created_at,diskLimit:e.disk_limit,environmentLimit:e.environment_limit,ephemeralSessionLimit:e.ephemeral_session_limit,includedContainerMb:e.included_container_mb,includedDiskGb:e.included_disk_gb,includedVhosts:e.included_vhosts,manualBackupLimitPerDb:e.manual_backup_limit_per_db,organizationId:e.organization_id,planId:R(t.plan),updatedAt:e.updated_at,vhostLimit:e.vhost_limit,horizontalAutoscaling:e.horizontal_autoscaling,verticalAutoscaling:e.vertical_autoscaling}},Oae=L.plans.selectById,_g=D(L.plans.selectTableAsList,Oae,ws,(e,t,n)=>t.id===``?n&&e.find(e=>e.name===`enterprise`)||L.plans.empty:t),vg=D(L.plans.selectTableAsList,e=>{let t={none:mt({name:`none`}),starter:mt({name:`starter`}),development:mt({name:`development`}),growth:mt({name:`growth`}),scale:mt({name:`scale`}),production:mt({name:`production`}),enterprise:mt({name:`enterprise`})};return e.reduce((e,t)=>
5(e[t.name]=t,e),t)}),kae=L.activePlans.selectById,yg=L.activePlans.selectTableAsList,bg=D(yg,e=>e.length===0?L.activePlans.empty:e[0]),xg=z.get(`/plans`),Aae=z.get(`/plans/:id`),Sg=z.get(`/active_plans?organization_id=:orgId`),Cg=z.put(`/active_plans/:id`,function*(e,t){let{planId:n}=e.payload,r={plan_id:n};e.request=e.req({body:JSON.stringify(r)}),yield*t(),e.json.ok&&(yield*L.update(L.activePlans.remove([e.payload.id])))}),wg=z.post(`/active_plans`,function*(e,t){e.request=e.req({body:JSON.stringify({organization_id:e.payload.orgId,plan_id:e.payload.planId})}),yield*t()}),Tg=qn.create(`apply-selected-plan`,[Gn,function*(e,t){let{orgId:n,planId:r,name:i}=e.payload,a=yield*Sg.run({orgId:n});if(!a.json.ok)throw a.json.error;let o=a.json.value._embedded.active_plans,s=o.length>0?yield*Cg.run({id:`${o[0].id}`,planId:r}):yield*wg.run({orgId:n,planId:r});if(!s.json.ok)throw s.json.error;e.loader={message:`Successfully updated plan to ${cl(i)}.`},yield*t()}]),Eg={plan:vn({id:`plan`,deserialize:hg,save:L.plans.add})},Dg={active_plan:vn({id:`active_plan`,deserialize:gg,save:L.activePlans.add})},jae=(e={})=>{let t=new Date().toISOString();return{id:1,connection_id:``,connection_status:``,description:``,peer_account_id:``,peer_vpc_id:``,created_at:t,updated_at:t,_links:{stack:{href:``}},_type:`vpc_peer`,...e}},Og=e=>({id:`${e.id}`,connectionId:e.connection_id,connectionStatus:e.connection_status,description:e.description,peerAccountId:e.peer_account_id,peerVpcId:e.peer_vpc_id,createdAt:e.created_at,updatedAt:e.updated_at,stackId:R(e._links.stack)}),Mae=L.vpcPeers.selectById,Nae=L.vpcPeers.selectTable,kg=D(L.vpcPeers.selectTableAsList,e=>[...e].sort((e,t)=>e.id.localeCompare(t.id))),Ag=D(kg,(e,t)=>t.stackId,(e,t)=>e.filter(e=>e.stackId===t)),jg=z.get(`/stacks/:id/vpc_peers`),Mg={vpc_peer:vn({id:`vpc_peer`,deserialize:Og,save:L.vpcPeers.add})},Pae=(e={})=>{let t=new Date().toISOString();return{id:1,handle:``,phase_1_alg:``,phase_1_dh_group:``,phase_1_lifetime:``,phase_2_alg:``,phase_2_dh_group:``,phase_2_lifetime:``,perfect_forward_secrecy:``,our_gateway:``,our_networks:[],peer_gateway:``,peer_networks:[],state:`unknown`,auto:``,tunnel_attributes:{connections:{},routed_connections:{},security_associations:{}},created_at:t,updated_at:t,_links:{stack:{href:``}},_type:`vpn_tunnel`,...e}},Fae=e=>e||{connections:{},routed_connections:{},security_associations:{}},Iae=e=>({id:`${e.id}`,handle:e.handle,phase1Alg:e.phase_1_alg,phase1DhGroup:e.phase_1_dh_group,phase1Lifetime:e.phase_1_lifetime,phase2Alg:e.phase_2_alg,phase2DhGroup:e.phase_2_dh_group,phase2Lifetime:e.phase_2_lifetime,ourGateway:e.our_gateway,ourNetworks:e.our_networks,peerGateway:e.peer_gateway,peerNetworks:e.peer_networks,perfectForwardSecrecy:e.perfect_forward_secrecy,createdAt:e.created_at,updatedAt:e.updated_at,stackId:R(e._links.stack),state:e.state,auto:e.auto,tunnelAttributes:Fae(e.tunnel_attributes)}),Lae=(e,t)=>e.filter(e=>e.stackId===t),Rae=L.vpnTunnels.selectById,zae=L.vpnTunnels.selectTable,Ng=D(L.vpnTunnels.selectTableAsList,e=>[...e].sort((e,t)=>e.handle.localeCompare(t.handle))),Pg=D(Ng,(e,t)=>t.stackId,(e,t)=>e.filter(e=>e.stackId===t)),Fg=z.get(`/stacks/:id/vpn_tunnels?per_page=5000`),Ig={vpn_tunnel:vn({id:`vpn_tunnel`,deserialize:Iae,save:L.vpnTunnels.add})},Lg=qn.create(`fetch-network-data-for-print-report`,function*(e,t){let{stackIds:n}=e.payload,r=n.flatMap(e=>[jg.run({id:e}),Fg.run({id:e})]);r.length>0&&(yield*yield*S(r)),yield*t()}),Bae=r({createRoleForOrg:()=>n_,defaultRoleResponse:()=>Vae,deleteRole:()=>r_,deserializeRole:()=>Rg,entities:()=>Wae,fetchCurrentUserRoles:()=>Qg,fetchRoles:()=>Zg,fetchUserRoles:()=>$g,fetchUsersForRole:()=>e_,findRoleById:()=>Bg,getIsBillingRole:()=>Hae,getIsOwnerRole:()=>Wg,ignoreComplianceRoles:()=>Ug,roleTypeFormat:()=>zg,selectCurrentUserRoles:()=>Jg,selectCurrentUserRolesByOrgId:()=>Yg,selectIsUserAnyOwner:()=>Uae,selectIsUserOwner:()=>Xg,selectRoleById:()=>Hg,selectRoles:()=>Vg,selectRolesByOrgId:()=>Kg,selectUserIdToRoleIdsMap:()=>qg,updateRoleName:()=>t_}),Vae=(e={})=>{let t=new Date().toISOString();return{id:``,name:``,type:`platform_user`,created_at:t,updated_at:t,scim_created:!1,_links:{organization:mn()},...e,_type:`role`}},Rg=e=>({id:e.id,name:e.name,type:e.type,createdAt:e.created_at,updatedAt:e.updated_at,scimCreated:e.scim_created,organizationId:R(e._links.organization)}),zg=e=>ul(e.type),Bg=L.roles.findById,Vg=L.roles.selectTable,Hg=L.roles.selectById,Ug=e=>e.type!==`compliance_user`&&e.type!==`compliance_owner`,Wg=e=>e.type===`owner`||e.type===`platform_owner`,Hae=e=>e.type===`owner`||e.type===`billing_owner`,Gg={owner:0,platform_owner:1,billing_owner:2,activity_log_viewer:3,platform_user:4,compliance_user:5,compliance_owner:6},Kg=D(L.roles.selectTableAsList,(e,t)=>t.orgId,(e,t)=>e.filter(e=>e.organizationId===t).filter(Ug).sort((e,t)=>
5{let n=Gg[e.type]??99,r=Gg[t.type]??99;if(n!==r)return n-r;let i=new Date(e.createdAt).getTime();return new Date(t.createdAt).getTime()-i})),qg=D(Wo,L.memberships.selectTableAsList,Kg,(e,t,n)=>{let r={};for(let i of e){let e=n.filter(e=>t.some(t=>t.roleId===e.id&&t.userId===i.id));r[i.id]=e}return r}),Jg=D(L.roles.selectTable,L.currentUserRoles.select,(e,t)=>t.map(t=>e[t]).filter(Ge)),Yg=D(Jg,(e,t)=>t.orgId,(e,t)=>e.filter(e=>e.organizationId===t)),Xg=D(Yg,e=>e.some(e=>e.type===`owner`||e.type===`platform_owner`)),Uae=D(Jg,(e,t)=>t.orgId,(e,t)=>e.filter(e=>e.organizationId===t)),Wae={role:vn({id:`role`,save:L.roles.add,deserialize:Rg})},Zg=mr.get(`/organizations/:orgId/roles`),Qg=mr.get(`/users/:userId/roles`,function*(e,t){if(yield*t(),!e.json.ok)return;let n=e.json.value._embedded.roles.map(e=>e.id);yield*L.update(L.currentUserRoles.set(n))}),$g=mr.get([`/users/:userId/roles`,`user`],mr.cache()),e_=mr.get(`/roles/:roleId/users`,mr.cache()),t_=mr.put(`/roles/:id`,function*(e,t){e.request=e.req({body:JSON.stringify({name:e.payload.name})}),yield*t(),e.json.ok&&(e.loader={message:`Successfully updated role name!`})}),n_=mr.post(`/organizations/:orgId/roles`,function*(e,t){e.request=e.req({body:JSON.stringify({name:e.payload.name,type:`platform_user`})}),yield*t(),e.json.ok&&(e.loader={message:`Successfully created ${e.payload.name} role!`})}),r_=mr.delete(`/roles/:id`,function*(e,t){yield*t(),e.json.ok&&(yield*L.update(L.roles.remove([e.payload.id])))}),Gae=(e={})=>{let t=new Date().toISOString();return{id:0,organization_id:``,aws_account_id:``,account_name:``,aws_region_primary:``,discovery_enabled:!1,discovery_frequency:``,last_discovery_at:null,status:`unknown`,created_by_user_email:``,created_by_user_name:``,created_by_user_id:``,created_at:t,updated_at:t,_links:{organization:mn(),self:mn(),external_aws_resources:mn(),...e._links||{}},_type:`external_aws_account`,...e}},i_=e=>({id:`${e.id}`,organizationId:e.organization_id,awsAccountId:e.aws_account_id,accountName:e.account_name,awsRegionPrimary:e.aws_region_primary,discoveryEnabled:e.discovery_enabled,discoveryFrequency:e.discovery_frequency,lastDiscoveryAt:e.last_discovery_at||``,status:e.status,createdByUserEmail:e.created_by_user_email,createdByUserName:e.created_by_user_name,createdByUserId:e.created_by_user_id,createdAt:e.created_at,updatedAt:e.updated_at}),a_=z.get(`/external_aws_accounts/:id`),o_=z.get(`/external_aws_accounts`),s_=z.post(`/external_aws_accounts/:id/sync`,function*(e,t){yield*t(),e.json.ok&&(e.loader={message:`Sync started.`,meta:{operationId:`${e.json.value.operation_id}`}})}),c_={external_aws_account:vn({id:`external_aws_account`,deserialize:i_,save:L.externalAwsAccounts.add})},l_=L.externalAwsAccounts.selectById,u_=L.externalAwsAccounts.selectTableAsList,d_=D(u_,(e,t)=>t.search.toLowerCase(),(e,t)=>[...t?e.filter(e=>e.accountName.toLowerCase().includes(t)||e.awsAccountId.toLowerCase().includes(t)):e].sort((e,t)=>e.accountName.localeCompare(t.accountName))),f_=z.put(`/external_aws_accounts/:id`,function*(e,t){let{accountName:n}=e.payload,r={account_name:n};e.request=e.req({body:JSON.stringify(r)}),yield*t(),e.json.ok&&(e.loader={message:`Saved changes successfully!`})}),Kae=(e={})=>({id:``,scope:`unknown`,_links:{account:mn(),role:mn()},...e,_type:`permission`}),p_=e=>({id:e.id,scope:e.scope,environmentId:R(e._links.account),roleId:R(e._links.role),inheritedFrom:``}),m_=L.permissions.findById,h_=L.permissions.selectTable,g_=L.permissions.selectTableAsList,__=D(Yg,e=>e.some(e=>e.type===`owner`)),v_=D(Yg,e=>e.some(e=>e.type===`billing_owner`||e.type===`owner`)),y_=D(Yg,e=>e.some(e=>e.type===`platform_owner`)),b_=D(el,(e,t)=>t.userId,(e,t)=>e.filter(e=>e.userId===t).some(e=>e.privileged)),x_=D(Kg,__,y_,(e,t,n)=>{let r=e.sort((e,t)=>e.name.localeCompare(t.name));return t?r:n?r.filter(e=>e.type!==`owner`&&e.type!==`billing_owner`):[]}),S_=D(__,y_,(e,t)=>e||t),C_=D(S_,b_,(e,t)=>e||t),w_=D(Jg,e=>e.some(e=>e.type===`owner`||e.type===`platform_owner`)),T_=D(L.roles.selectTableAsList,L.environments.selectTableAsList,g_,(e,t,n)=>{let r={};for(let i of e){let e={};for(let r of t)e[r.id]=n.filter(e=>e.roleId===i.id&&e.environmentId===r.id);r[i.id]=e}return r}),E_=D(g_,(e,t)=>t.envId,(e,t)=>e.filter(e=>e.environmentId===t)),D_=D(E_,(e,t)=>t.roleId,(e,t)=>e.filter(e=>e.roleId===t)),O_=D(E_,Jg,(e,t)=>t.scope,(e,t,n)=>{if(t.find(e=>[`owner`,`platform_owner`].includes(e.type)))return!0;
5if(e.length===0)return!1;let r=e.filter(e=>t.map(e=>e.id).includes(e.roleId));if(r.length===0)return!1;if(n===`basic_read`)return!0;for(let e=0;e<r.length;e+=1){let t=r[e];if(t.scope===`admin`||t.scope===`deploy`&&n===`observability`||t.scope===`sensitive`&&n===`read`||t.scope===n)return!0}return!1}),k_={permission:vn({id:`permission`,save:L.permissions.add,deserialize:p_})},A_=e=>`update-perms-${e}`,j_=qn.create(`update-perms`,function*(e,t){let{type:n,payload:r}=e.payload,i=A_(r.roleId);if(yield*L.update(L.loaders.start({id:i})),n===`add`){let e=yield*M_.run(r);e.json.ok?yield*L.update(L.loaders.success({id:i,message:`Successfully updated permissions!`})):yield*L.update(L.loaders.error({id:i,message:e.json.error.message}))}else{let e=yield*N_.run(r);e.json.ok?yield*L.update(L.loaders.success({id:i,message:`Successfully updated permissions!`})):yield*L.update(L.loaders.error({id:i,message:e.json.error.message}))}yield*t()}),M_=z.post(`/accounts/:envId/permissions`,function*(e,t){e.request=e.req({body:JSON.stringify({role:e.payload.roleId,scope:e.payload.scope})}),yield*t()}),N_=z.delete(`/permissions/:id`,function*(e,t){yield*t(),e.json.ok&&(yield*L.update(L.permissions.remove([e.payload.id])))}),P_={unknown:`Unknown`,admin:`Environment Admin`,read:`Full Visibility`,basic_read:`Basic Visibility`,deploy:`Deployment`,destroy:`Destroy`,observability:`Ops`,sensitive:`Sensitive Access`,tunnel:`Tunnel`},F_={unknown:`Unknown`,admin:`Grants Users unrestricted access to the Environment. This includes the ability to see all sensitive values and take any action against any resource in the Environment.`,read:`Allows Users to see all information for all of the resources in the Environment including App Configurations. The one exception is Database Credentials which cannot be seen.`,basic_read:`Allows Users to see basic information for all of the resources in the Environment. It does not allow them to manage the resources or see any sensitive values such as Database Credentials or Configuration values.`,deploy:`Allows Users to create and deploy resources in the Environment. This includes actions such as create, deploy, configure, and restart. It does not grant access to read any sensitive values.`,destroy:`Allows Users to destroy every resource in the Environment as well as the Environment itself.`,observability:`Allows Users to create and manage Log and Metric Drains in the Environment. It also allows Users to take actions commonly associated with incident response such as restarting and scaling resources.`,sensitive:`Allows Users to see and manage sensitive values in the Environment such as configuring Apps, viewing Database Credentials, and managing Certificates.`,tunnel:`Allows User to tunnel into Databases in the Environment. This permission does not allow Users to see Database Credentials so Users will need to be provided credentials through another channel.`},I_=e=>e.id!==``,L_=e=>!I_(e)&&e.inheritedFrom!==``,qae=e=>I_(e)||L_(e),R_=e=>{let t={admin:gt({scope:`admin`}),read:gt({scope:`read`}),basic_read:gt({scope:`basic_read`}),deploy:gt({scope:`deploy`}),destroy:gt({scope:`destroy`}),observability:gt({scope:`observability`}),sensitive:gt({scope:`sensitive`}),tunnel:gt({scope:`tunnel`}),unknown:gt()};return e.forEach(e=>{t[e.scope]={...e}}),e.length>0&&!I_(t.basic_read)&&(t.basic_read.inheritedFrom=e[0].id),I_(t.admin)&&(t.read.inheritedFrom=t.admin.id,t.basic_read.inheritedFrom=t.admin.id,t.deploy.inheritedFrom=t.admin.id,t.destroy.inheritedFrom=t.admin.id,t.observability.inheritedFrom=t.admin.id,t.sensitive.inheritedFrom=t.admin.id,t.tunnel.inheritedFrom=t.admin.id),t},z_=D(L.environments.selectTableAsList,$o,g_,Jg,(e,t,n,r)=>{if(!t)return!1;let i=r.filter(e=>e.organizationId===t);if(i.some(e=>[`owner`,`platform_owner`].includes(e.type)))return!0;let a=new Set(i.map(e=>e.id));for(let r of e){if(r.organizationId!==t)continue;let e=n.filter(e=>e.environmentId===r.id);if(e.length===0)continue;let i=e.filter(e=>a.has(e.roleId));if(i.length!==0&&i.some(e=>e.scope===`admin`||e.scope===`sensitive`||e.scope===`read`))return!0}return!1}),B_=D(Yu,au,dp,af,Du,Qm,wh,u_,(e,t,n,r,i,a,o,s)=>e.filter(e=>
5lu(iu(t,{id:e.environmentId}))).map(e=>{let c=iu(t,{id:e.environmentId}),l=``,u=``;if(e.resourceType===`app`)l=sf(r,{id:e.resourceId}).handle;else if(e.resourceType===`database`)l=fp(n,{id:e.resourceId}).handle,u=Uu(e);else if(e.resourceType===`environment`)l=iu(t,{id:e.environmentId}).handle;else if(e.resourceType===`service`){let t=ku(i,{id:e.resourceId}),n=``;return t.appId===``?t.databaseId!==``&&(n=ga(t.databaseId)):n=Qi(t.appId),l=t.processType,u=Uu(e),{...e,envHandle:c.handle,resourceHandle:l,resourceDesc:u,url:n}}else if(e.resourceType===`log_drain`){let t=Xm(a,{id:e.resourceId});l=t.handle;let n=Ia(t.environmentId);return{...e,envHandle:c.handle,resourceHandle:l,resourceDesc:u,url:n}}else if(e.resourceType===`metric_drain`){let t=Sh(o,{id:e.resourceId});l=t.handle;let n=Ia(t.environmentId);return{...e,envHandle:c.handle,resourceHandle:l,resourceDesc:u,url:n}}else if(e.resourceType===`external_aws_account`){let t=s.find(t=>t.id===e.resourceId);l=t?.accountName||t?.awsAccountId||e.resourceId}else l=e.resourceId;return{...e,envHandle:c.handle,resourceHandle:l,resourceDesc:u}}).sort((e,t)=>new Date(t.createdAt).getTime()-new Date(e.createdAt).getTime())),Jae=[`poll`],V_=D(B_,(e,t)=>t.ids,(e,t)=>e.filter(e=>t.includes(e.id)&&!Jae.includes(e.type))),H_=D(Ju,dp,af,zp,nu,u_,(e,t,n,r,i,a)=>{let o=``;if(e.resourceType===`app`)o=sf(n,{id:e.resourceId}).handle;else if(e.resourceType===`database`)o=fp(t,{id:e.resourceId}).handle;else if(e.resourceType===`environment`)o=iu(i,{id:e.environmentId}).handle;else if(e.resourceType===`vhost`)o=Am(Rp(r,{id:e.resourceId}));else if(e.resourceType===`external_aws_account`){let t=a.find(t=>t.id===e.resourceId);o=t?.accountName||t?.awsAccountId||e.resourceId}else o=e.resourceId;return o}
5),U_=D([(e,t)=>t.resourceId,(e,t)=>t.resourceType,e=>dp(e),e=>af(e),e=>zp(e),e=>nu(e),e=>Du(e),e=>h_(e),e=>Vg(e),e=>Ho(e),e=>$c(e),e=>wh(e),e=>Qm(e)],(e,t,n,r,i,a,o,s,c,l,u,d,f)=>{if(t===`App`){let t=sf(r,{id:e});if(t.handle)return t}if(t===`Database`){let t=fp(n,{id:e});if(t.handle)return t}if(t===`Account`||t===`Environment`){let t=iu(a,{id:e});if(t.handle)return t}if(t===`Service`){let t=ku(o,{id:e});if(t.id)return t}if(t===`Endpoint`){let t=Rp(i,{id:e});if(t.id)return t}if(t===`Permission`){let t=m_(s,{id:e});if(t.id)return t}if(t===`Role`){let t=Bg(c,{id:e});if(t.id)return t}if(t===`User`){let t=Vo(l,{id:e});if(t.id)return t}if(t===`MetricDrain`){let t=Sh(d,{id:e});if(t.id)return t}if(t===`LogDrain`){let t=Xm(f,{id:e});if(t.id)return t}if(t===`Membership`){let t=Qc(u,{id:e});if(t.id)return t}return null}),Yae=(e,t)=>!!U_(e,{resourceId:t.activity.primaryResourceId,resourceType:t.activity.primaryResourceType}),Xae=(e={})=>{let t=new Date().toISOString();return{id:1,docker_ref:``,docker_repo:``,created_at:t,updated_at:t,_links:{service:{href:``},...e._links},_type:`release`,...e}},W_=e=>{let t=e._links;return{id:`${e.id}`,dockerRepo:e.docker_repo,dockerRef:e.docker_ref,serviceId:R(t.service),createdAt:e.created_at,updatedAt:e.updated_at}},G_=L.releases.selectById,Zae=L.releases.selectByIds,K_=L.releases.selectTableAsList,Qae=D(K_,(e,t)=>t.serviceId,(e,t)=>e.filter(e=>e.serviceId===t).sort((e,t)=>new Date(t.createdAt).getTime()-new Date(e.createdAt).getTime())),q_=D(K_,Eu,(e,t)=>t.date,(e,t)=>t.id,(e,t,n,r)=>{let i=e.filter(e=>e.serviceId===r),a=new Date(n),o=[],s=null;for(let e of i)e.id===t.currentReleaseId||new Date(e.createdAt)>=a?o.push(e):(!s||new Date(e.createdAt)>new Date(s.createdAt))&&(s=e);return s&&!o.some(e=>e.id===s.id)&&(o.length>0?Math.min(...o.map(e=>new Date(e.createdAt).getTime())):a.getTime())>a.getTime()&&o.push(s),o.sort((e,t)=>new Date(t.createdAt).getTime()-new Date(e.createdAt).getTime())}),J_=z.get(`/releases/:id`),Y_=z.get(`/services/:serviceId/releases/?with_deleted=true`),X_={release:vn({id:`release`,save:L.releases.add,deserialize:W_})},$ae=(e={})=>{let t=new Date().toISOString();return{id:1,aws_instance_id:``,docker_name:``,host:``,instance_class:``,layer:``,memory_limit:0,port:0,port_mapping:[],status:``,created_at:t,updated_at:t,_links:{release:{href:``},...e._links},_type:`container`,...e}},Z_=e=>{let t=e._links;return{id:`${e.id}`,awsInstanceId:e.aws_instance_id,dockerName:e.docker_name,host:e.host,layer:e.layer,memoryLimit:e.memory_limit,port:e.port,portMapping:e.port_mapping,status:e.status,releaseId:R(t.release),createdAt:e.created_at,updatedAt:e.updated_at}},eoe=L.containers.selectById,toe=L.containers.selectByIds,Q_=L.containers.selectTableAsList,noe=D(Q_,(e,t)=>t.releaseId,(e,t)=>e.filter(e=>e.releaseId===t).sort((e,t)=>new Date(t.createdAt).getTime()-new Date(e.createdAt).getTime())),roe=D(Q_,(e,t)=>t.releaseId,(e,t)=>t.layers,(e,t,n)=>e.filter(e=>n.includes(e.layer)&&e.releaseId===t).sort((e,t)=>new Date(t.createdAt).getTime()-new Date(e.createdAt).getTime())),$_=D(Q_,(e,t)=>t.releaseIds,(e,t)=>t.layers,(e,t,n)=>e.filter(e=>n.includes(e.layer)&&t.includes(e.releaseId)).sort((e,t)=>new Date(t.createdAt).getTime()-new Date(e.createdAt).getTime())),ev=D($_,(e,t)=>t.currentReleaseId,(e,t)=>t.horizonInSeconds,(e,t,n)=>e.filter(e=>e.releaseId===t||e.updatedAt>=If(-n).toISOString())),ioe=z.get(`/releases/:releaseId/containers`),tv=z.get(`/releases/:releaseId/containers?with_deleted=true&per_page=5000`),nv={container:vn({id:`container`,save:L.containers.add,deserialize:Z_})},aoe=(e={})=>{let t=new Date().toISOString();return{id:1,relationship_type:``,relationship_started_at:null,relationship_ended_at:null,created_at:t,updated_at:t,deleted_at:``,metadata:{},_links:{organization:{href:``},self:{href:``},source_resource:{href:``},destination_resource:{href:``}},_type:`edge`,...e}},rv=e=>{let t=e._links,n=e=>{if(!e.href)return``;let t=e.href.match(/\/([a-z_]+)\/\d+$/);return t?t[1]:``};return{id:`${e.id}`,relationshipType:e.relationship_type,relationshipStartedAt:e.relationship_started_at,relationshipEndedAt:e.relationship_ended_at,createdAt:e.created_at,updatedAt:e.updated_at,deletedAt:e.deleted_at,organizationId:R(t.organization),sourceResourceId:R(t.source_resource),sourceResourceType:n(t.source_resource),destinationResourceId:R(t.destination_resource),destinationResourceType:n(t.destination_resource),metadata:e.metadata||{}}},iv=L.edges.selectById,av=L.edges.selectTable,ov=D(L.edges.selectTableAsList,e=>[...e].sort((e,t)=>
5e.id.localeCompare(t.id))),sv=D(ov,(e,t)=>t.resourceId,(e,t)=>e.filter(e=>e.sourceResourceId===t)),cv=D(ov,(e,t)=>t.relationshipType,(e,t)=>e.filter(e=>e.relationshipType===t)),lv=D(ov,af,dp,(e,t)=>t.id,(e,t,n,r)=>{let i=[];return e.filter(e=>e.sourceResourceId===r&&e.relationshipType===`depends_on`&&!e.deletedAt&&!e.relationshipEndedAt).forEach(e=>{let r=e.destinationResourceType,a=e.destinationResourceId,o=e.metadata?.discovered_in||``;if(r===`apps`){let e=sf(t,{id:a});e?.id&&i.push({type:`app`,why:o,refId:e.id,name:e.handle,resource:e})}else if(r===`databases`){let e=fp(n,{id:a});e?.id&&i.push({type:`database`,why:o,refId:e.id,name:e.handle,resource:e})}}),i}),uv=D(lv,e=>{let t={app:[],database:[]};return e.forEach(e=>{switch(e.type){case`app`:t.app.push(e);break;case`database`:t.database.push(e)}}),t}),dv=z.get(`/edges`,function*(e,t){let n=e.req().url,r=new URL(n);r.searchParams.set(`root_resource_id`,e.payload.rootResourceId),r.searchParams.set(`root_resource_type`,e.payload.rootResourceType||`App`),r.searchParams.set(`max_distance`,String(e.payload.maxDistance??1));let i=e.payload.onlyRelationshipTypes||[`depends_on`];for(let e of i)r.searchParams.append(`only_relationship_types[]`,e);e.request=e.req({url:r.toString()}),yield*t()}),fv={edge:vn({id:`edge`,deserialize:rv,save:L.edges.add})},pv=(e={})=>({id:0,aptible_yml_present:!1,aptible_yml_data:``,dockerfile_present:!1,dockerfile_data:``,procfile_present:!1,procfile_data:``,languages_detected:[],_links:{app:{href:``},operation:{href:``}},_type:`code_scan_result`,...e}),mv=z.get(`/code_scan_results/:id`,z.cache()),hv=(e,t)=>{let n=new Date(e.createdAt).getTime();return new Date(t.createdAt).getTime()-n},gv=e=>({id:`${e.id}`,awsRegion:e.aws_region,createdByEmail:e.created_by_email,copiedFromId:`${e._embedded.copied_from?.id||``}`,size:e.size,manual:e.manual,createdAt:e.created_at,deletedAt:e.deleted_at,databaseId:R(e._links.database),environmentId:R(e._links.account),createdFromOperationId:R(e._links.created_from_operation),databaseHandle:e.database_handle}),_v=L.backups.selectById,vv=L.backups.selectByIds,yv=L.backups.selectTableAsList,bv=L.backups.selectTable,xv=(e,t)=>e.filter(e=>e.environmentId===t),Sv=(e,t)=>e.filter(e=>e.databaseId===t),Cv=D(yv,(e,t)=>t.envId,(e,t)=>e.filter(e=>e.environmentId===t).sort(hv)),wv=D(Cv,dp,(e,t)=>e.filter(e=>!t[e.databaseId])),Tv=D(yv,(e,t)=>t.dbId,Sv),Ev={backup:vn({id:`backup`,deserialize:gv,save:L.backups.add})},Dv=z.get(`/backups?per_page=1500&page=:page`),Ov=qn.create(`fetch-backups`,{supervisor:lr()},function*(e,t){e.payload?.waitForBootup&&(yield*fn()),yield*vr(Dv)(e,t)}),kv=dn(`cancel-poll-db-backups`),Av=z.get([`/databases/:id/backups`,`poll`],{supervisor:o(1e4,`${kv}`)}),jv=z.get(`/databases/:id/backups?page=:page`,function*(e,t){if(e.payload.withDeleted){let t=e.req().url,n=new URL(t);n.searchParams.set(`with_deleted`,`true`),e.request=e.req({url:n.toString()})}if(yield*t(),!e.json.ok)return;let n=e.json.value._embedded.backups.map(e=>`${e.id}`),r={...e.json.value,_embedded:{backups:n}};yield*L.update(L.cache.add({[e.key]:r}))}),Mv=qn.create(`fetch-backups-by-database-id`,{supervisor:ur()},vr(jv)),Nv=z.get(`/backups/:id`,function*(e,t){if(e.payload.withDeleted){let t=e.req().url,n=new URL(t);n.searchParams.set(`with_deleted`,`true`),e.request=e.req({url:n.toString()})}yield*t()}),Pv=z.get(`/accounts/:id/backups?page=:page`,function*(e,t){if(e.payload.onlyOrphaned===!0&&(e.request=e.req({url:`${e.req().url}&orphaned=true`})),e.payload.perPage!=null&&(e.request=e.req({url:`${e.req().url}&per_page=${e.payload.perPage}`})),yield*t(),!e.json.ok)return;let n=e.json.value._embedded.backups.map(e=>`${e.id}`),r={...e.json.value,_embedded:{backups:n}};yield*L.update(L.cache.add({[e.key]:r}))}),ooe=qn.create(`fetch-backups-by-env-id`,{supervisor:ur()},vr(Pv)),Fv=z.post([`/backups/:id/operations`,`delete`],function*(e,t){if(e.request=e.req({body:JSON.stringify({type:`purge`})}),yield*t(),!e.json.ok)return;let n=e.json.value.id;e.loader={message:`Backup operation queued (operation ID: ${n})`,meta:{opId:`${n}`}},yield*L.update(L.backups.remove([e.payload.id]))}),Iv=z.post([`/backups/:id/operations`,`restore`],function*(e,t){let{handle:n,destEnvId:r,diskSize:i,containerSize:a}=e.payload,o={type:`restore`,handle:n,destination_account_id:r,disk_size:i||10,containerSize:a||1024};if(e.request=e.req({body:JSON.stringify(o)}),yield*t(),!e.json.ok)return;let s=e.json.value.id;e.loader={message:`Restore from Backup operation queued (operation ID: ${s})`,meta:{opId:`${s}`}}}),soe=(e={})=>({id:0,daily:0,monthly:0,yearly:0,pitr_days:0,make_copy:!1,keep_final:!1,created_at:new Date().toISOString(),_type:`backup_retention_policy`,_links:{account:mn()},...e}),coe=e=>({id:`${e.id}`,daily:e.daily,monthly:e.monthly,yearly:e.yearly,pitrDays:e.pitr_days,makeCopy:e.make_copy,keepFinal:e.keep_final,environmentId:R(e._links.account),createdAt:e.created_at}),loe=e=>!!e.id,uoe=L.backupRps.selectById,Lv=D(L.backupRps.selectTableAsList,(e,t)=>t.envId,(e,t)=>{let n=e.filter(e=>e.environmentId===t).sort((e,t)=>
5new Date(t.createdAt).getTime()-new Date(e.createdAt).getTime());return n.length===0?L.backupRps.empty:n[0]}),Rv={backup_retention_policy:vn({id:`backup_retention_policy`,deserialize:coe,save:L.backupRps.add})},zv=z.get(`/accounts/:envId/backup_retention_policies`),Bv=z.post(`/accounts/:envId/backup_retention_policies`,function*(e,t){let{daily:n,monthly:r,yearly:i,pitrDays:a,makeCopy:o,keepFinal:s,id:c}=e.payload;e.request=e.req({body:JSON.stringify({daily:n,monthly:r,yearly:i,pitr_days:a,make_copy:o,keep_final:s})}),yield*t(),e.json.ok&&(e.loader={message:`Successfully updated backup retention policy!`},yield*L.update(L.backupRps.remove([c])))}),Vv=z.post(`/accounts/:envId/operations`,function*(e,t){let{pitrDays:n}=e.payload,r=JSON.stringify({type:`configure_backup_policy`,pitr_days:n});e.request=e.req({body:r}),yield*t()}),Hv=e=>({id:e.id,connectionUrl:e.connection_url,default:e.default,type:e.type,databaseId:R(e._links.database)}),Uv=D(L.databaseCredentials.selectTableAsList,(e,t)=>t.dbId,(e,t)=>e.filter(e=>e.databaseId===t)),Wv=L.databaseCredentials.selectById,Gv={database_credential:vn({id:`database_credential`,save:L.databaseCredentials.add,deserialize:Hv})},Kv=z.get(`/databases/:dbId/database_credentials`),qv=z.get(`/database_credentials/:id`),Jv=(e,t,n)=>{if(!e||t===``)return e||``;let r=e,i=new RegExp(/\@.+\:/),a=new RegExp(/[0-9]+(?!.*\:[0-9]+)/),o=r.match(a);if(!o)return e;let s=n.find(e=>o[0]===`${e[0]}`);if(!s||s.length<2)return e;let c=s[1];return r=r.replace(i,`@${t}:`),r=r.replace(a,`${c}`),r},Yv=e=>e?{dockerRef:e.docker_ref||``,dockerRepo:e.docker_repo||``,gitRef:e.git_ref||`Not used`,gitRepo:e.git_repo||``,exposedPorts:e.exposed_ports,id:`${e.id}`,updatedAt:e.updated_at,createdAt:e.created_at}:L.images.empty,Xv=z.get(`/images/:id`),Zv=L.images.selectById,Qv={image:vn({id:`image`,save:L.images.add,deserialize:Yv})},doe=(e={})=>{let t=new Date().toISOString();return{attached:!0,availability_zone:``,baseline_iops:0,provisioned_iops:0,created_at:t,updated_at:t,current_kms_arn:``,device:``,ebs_volume_id:``,ebs_volume_type:``,instance_id:``,filesystem:``,handle:``,host:``,id:``,size:0,key_bytes:32,_type:`disk`,...e,_links:{database:mn(),account:mn(),...e._links}}},$v=e=>{let t=e._links,n=R(t.account),r=R(t.database);return{attached:e.attached,availabilityZone:e.availability_zone,baselineIops:e.baseline_iops,provisionedIops:e.provisioned_iops,createdAt:e.created_at,updatedAt:e.updated_at,currentKmsArn:e.current_kms_arn,device:e.device,ebsVolumeId:e.ebs_volume_id,ebsVolumeType:e.ebs_volume_type,ec2InstanceId:e.instance_id,filesystem:e.filesystem,handle:e.handle,host:e.host,id:e.id,size:e.size,keyBytes:e.key_bytes,environmentId:n,databaseId:r}},ey=z.get(`/disks/:id`),ty=L.disks.selectById,ny=L.disks.selectTable,ry=L.disks.selectTableAsList,iy=L.disks.findById,ay={disk:vn({id:`disk`,save:L.disks.add,deserialize:$v})},oy=(e,t)=>e.filter(e=>e.environmentId===t),foe=D(ry,(e,t)=>t.envId,oy),poe=(e={})=>{let t=new Date().toISOString();return{id:``,handle:``,size:10,disk_type:`gp3`,status:`pending`,created_at:t,updated_at:t,_type:`persistent_disk`,...e,_links:{account:mn(),...e._links}}},sy=e=>({id:`${e.id}`,handle:e.handle,size:e.size,diskType:e.disk_type,status:e.status,environmentId:R(e._links.account),createdAt:e.created_at,updatedAt:e.updated_at}),moe=L.persistentDisks.selectById,hoe=L.persistentDisks.selectTable,cy=L.persistentDisks.selectTableAsList,goe=L.persistentDisks.findById,ly=(e,t)=>e.filter(e=>e.environmentId===t).sort((e,t)=>e.handle.localeCompare(t.handle)),uy=D(cy,(e,t)=>t.envId,ly),dy=z.get(`/persistent_disks?per_page=5000`,{supervisor:dr()},function*(e,t){yield*t(),e.json.ok&&(yield*L.update(L.persistentDisks.reset()))}),_oe=z.get(`/persistent_disks/:id`),voe=z.get(`/accounts/:envId/persistent_disks`),fy=({handle:e,size:t,diskType:n})=>({handle:e,size:t,disk_type:n||`gp3`}),py=z.post(`/accounts/:envId/persistent_disks`,function*(e,t){let n=fy(e.payload);e.request=e.req({body:JSON.stringify(n)}),yield*t()}),my=e=>{switch(e.type){case`provision`:case`deprovision`:return{type:e.type};case`attach`:return{type:e.type,service_id:e.serviceId,mount_point:e.mountPoint};case`modify`:{let t={type:e.type,disk_size:e.size};return e.provisionedIops!=null&&(t.provisioned_iops=e.provisionedIops),t}default:return{}}},hy=z.post(`/persistent_disks/:id/operations`,function*(e,t){e.request=e.req({body:JSON.stringify(my(e.payload))}),yield*t()}
5),gy=qn.create(`persistent-disk-provision`,[Gn,function*(e,t){let n=yield*Te(()=>py.run(py(e.payload)));if(!n.json.ok){let t=n.json.error.message;throw e.json={error:t,diskId:``,opId:``},Error(t)}let r=`${n.json.value.id}`,i=yield*Te(()=>hy.run(hy({id:r,type:`provision`})));if(!i.json.ok){let t=i.json.error.message;throw e.json={error:t,diskId:r,opId:``},Error(t)}let a=`${i.json.value.id}`;e.json={error:``,diskId:r,opId:a},e.loader={meta:{diskId:r,opId:a}},yield*t()}]),_y=qn.create(`persistent-disk-modify`,[Gn,function*(e,t){let{id:n,size:r,provisionedIops:i}=e.payload,a=yield*Te(()=>hy.run(hy({id:n,type:`modify`,size:r,provisionedIops:i})));if(!a.json.ok){let t=a.json.error.message;throw e.json={error:t,opId:``},Error(t)}let o=`${a.json.value.id}`;e.json={error:``,opId:o},e.loader={meta:{opId:o}},yield*t()}]),vy=qn.create(`persistent-disk-attach`,[Gn,function*(e,t){let{id:n,serviceId:r,mountPoint:i}=e.payload,a=yield*Te(()=>hy.run(hy({id:n,type:`attach`,serviceId:r,mountPoint:i})));if(!a.json.ok){let t=a.json.error.message;throw e.json={error:t,opId:``},Error(t)}let o=`${a.json.value.id}`;e.json={error:``,opId:o},e.loader={meta:{opId:o}},yield*t()}]),yy=qn.create(`persistent-disk-create-and-attach`,[Gn,function*(e,t){let{envId:n,handle:r,size:i,serviceId:a,mountPoint:o}=e.payload,s=yield*Te(()=>py.run(py({envId:n,handle:r,size:i})));if(!s.json.ok){let t=s.json.error.message;throw e.json={error:t,diskId:``,opId:``},Error(t)}let c=`${s.json.value.id}`,l=yield*Te(()=>hy.run(hy({id:c,type:`provision`})));if(!l.json.ok){let t=l.json.error.message;throw e.json={error:t,diskId:c,opId:``},Error(t)}let u=yield*Te(()=>hy.run(hy({id:c,type:`attach`,serviceId:a,mountPoint:o})));if(!u.json.ok){let t=u.json.error.message;throw e.json={error:t,diskId:c,opId:``},Error(t)}let d=`${u.json.value.id}`;e.json={error:``,diskId:c,opId:d},e.loader={meta:{diskId:c,opId:d}},yield*t()}]),by={persistent_disk:vn({id:`persistent_disk`,deserialize:sy,save:L.persistentDisks.add})},yoe=(e={})=>{let t=new Date().toISOString();return{id:``,mount_point:``,created_at:t,updated_at:t,deleted_at:null,_type:`disk_attachment`,...e,_links:{persistent_disk:mn(),service:mn(),...e._links}}},xy=e=>({id:`${e.id}`,mountPoint:e.mount_point,status:e.status??(e.deleted_at?`deprovisioned`:`attached`),persistentDiskId:R(e._links.persistent_disk),serviceId:R(e._links.service),createdAt:e.created_at,updatedAt:e.updated_at}),boe=e=>e.id!==``,xoe=L.diskAttachments.selectById,Soe=L.diskAttachments.selectTable,Sy=L.diskAttachments.selectTableAsList,Coe=L.diskAttachments.findById,Cy=(e,t)=>e.filter(e=>e.persistentDiskId===t),wy=D(Sy,(e,t)=>t.persistentDiskId,Cy),Ty=D(Sy,(e,t)=>t.serviceId,(e,t)=>e.filter(e=>e.serviceId===t)),Ey=D(Ty,e=>e.filter(e=>e.status!==`deprovisioned`).map(e=>e.mountPoint.trim().toLowerCase())),Dy=(e,t)=>{let n=e.filter(e=>e.status!==`deprovisioned`);if(n.length===0)return null;if(n.length===1){let e=n[0];return t.get(e.persistentDiskId)?.handle??e.persistentDiskId}return`${n.length} Attached`},Oy=D(Ty,e=>L.persistentDisks.selectTableAsList(e),(e,t)=>Dy(e,new Map(t.map(e=>[e.id,e])))),ky=D(Ty,e=>L.persistentDisks.selectTableAsList(e),(e,t)=>{let n=e.filter(e=>e.status!==`deprovisioned`);return n.length===1?new Map(t.map(e=>[e.id,e])).get(n[0].persistentDiskId)??null:null}),Ay=D(Sy,e=>L.persistentDisks.selectTableAsList(e),(e,t)=>{let n=new Map(t.map(e=>[e.id,e])),r={};for(let t of e){if(t.status===`deprovisioned`)continue;let e=n.get(t.persistentDiskId)?.size??0;r[t.serviceId]=(r[t.serviceId]??0)+e}return r}),jy=z.get(`/disk_attachments?per_page=5000`,{supervisor:dr()},function*(e,t){yield*t(),e.json.ok&&(yield*L.update(L.diskAttachments.reset()))}),woe=z.get(`/disk_attachments/:id`),Toe=D(Sy,e=>L.persistentDisks.selectTableAsList(e),(e,t)=>t.envId,(e,t,n)=>{let r=new Set(t.filter(e=>e.environmentId===n).map(e=>e.id));return e.filter(e=>r.has(e.persistentDiskId))}),My=e=>({type:e.type}),Ny=z.post(`/disk_attachments/:id/operations`,function*(e,t){e.request=e.req({body:JSON.stringify(My(e.payload))}),yield*t()}),Py=qn.create(`disk-attachment-deprovision`,[Gn,function*(e,t){let n=yield*Te(()=>Ny.run(Ny({id:e.payload.id,type:`deprovision`})));if(!n.json.ok){let t=n.json.error.message;
5throw e.json={error:t,opId:``},Error(t)}let r=`${n.json.value.id}`;e.json={error:``,opId:r},e.loader={meta:{opId:r}},yield*t()}]),Fy={disk_attachment:vn({id:`disk_attachment`,deserialize:xy,save:L.diskAttachments.add})},Iy=z.post(`/support/create`,function*(e,t){let{subject:n,description:r,email:i,name:a,priority:o,attachments:s}=e.payload,c={subject:n||``,description:r||``,email:i||``,name:a||``,priority:o||``,attachments:s.length>0?s:[]},l=JSON.stringify(c);if(e.request=e.req({body:l}),yield*t(),!e.json.ok){e.loader={message:`Error! Unable to create the support ticket: ${e.json.error.message}`};return}e.loader={message:`Request submitted successfully! Check your email for confirmation.`}}),Ly=qn.create(`reset-support-ticket`,function*(e,t){yield*L.update(L.loaders.resetByIds([`${Iy}`])),yield*t()}),Ry=z.post(`/support/upload`,function*(e,t){let n=new FormData;if(n.append(`file`,e.payload.attachment),e.request=e.req({body:n}),e.request.headers=new Headers,yield*t(),!e.json.ok){let t=`File upload failed. Please try again.`;e.json.error&&typeof e.json.error.message==`string`&&(t=e.json.error.message),e.payload.errorCallback&&e.payload.errorCallback(t),e.loader={message:`Error! ${t}`};return}e.payload.callback({token:`${e.json.value.token}`,filename:`${e.payload.attachment.name}`}),e.payload.errorCallback&&e.payload.errorCallback(null),e.loader={message:e.json.value.message}}),Eoe=(e={})=>{let t=new Date().toISOString();return{id:0,database_name:``,database_user:``,superuser:!1,created_at:t,updated_at:t,_links:{self:mn(),app:mn(),external_aws_resource:mn(),external_aws_account:mn(),...e._links||{}},_type:`app_external_aws_rds_connection`,...e}},zy=e=>({id:`${e.id}`,databaseName:e.database_name,databaseUser:e.database_user,superuser:e.superuser,appId:R(e._links.app),externalAwsResourceId:R(e._links.external_aws_resource),externalAwsAccountId:R(e._links.external_aws_account),createdAt:e.created_at,updatedAt:e.updated_at}),Doe=z.get(`/apps/:appId/app_external_aws_rds_connections`,function*(e,t){if(yield*t(),!e.json.ok)return;let{value:n}=e.json,r=n._embedded.app_external_aws_rds_connections.reduce((e,t)=>{let n=zy(t);return e[n.id]=n,e},{});yield*L.update(L.appExternalAwsRdsConnections.add(r))}),By=z.get(`/external_aws_resources/:resourceId/app_external_aws_rds_connections`,function*(e,t){if(yield*t(),!e.json.ok)return;let{value:n}=e.json,r=n._embedded.app_external_aws_rds_connections.reduce((e,t)=>{let n=zy(t);return e[n.id]=n,e},{});yield*L.update(L.appExternalAwsRdsConnections.add(r))}),Ooe=z.get(`/external_aws_accounts/:accountId/app_external_aws_rds_connections`,function*(e,t){if(yield*t(),!e.json.ok)return;let{value:n}=e.json,r=n._embedded.app_external_aws_rds_connections.reduce((e,t)=>{let n=zy(t);return e[n.id]=n,e},{});yield*L.update(L.appExternalAwsRdsConnections.add(r))}),Vy=L.appExternalAwsRdsConnections.selectTableAsList,koe=L.appExternalAwsRdsConnections.selectById,Hy=D(Vy,(e,t)=>t.appId,(e,t)=>e.filter(e=>e.appId===t)),Uy=D(Vy,(e,t)=>t.resourceId,(e,t)=>e.filter(e=>e.externalAwsResourceId===t)),Aoe=D(Vy,(e,t)=>t.accountId,(e,t)=>e.filter(e=>e.externalAwsAccountId===t)),joe=D((e,t)=>Hy(e,t),L.externalAwsResources.selectTableAsList,(e,t)=>{let n=e.filter(e=>e.externalAwsResourceId!==``).map(e=>e.externalAwsResourceId);return t.filter(e=>n.includes(e.id))}),Wy=D((e,t)=>Uy(e,t),L.apps.selectTableAsList,(e,t)=>{let n=e.filter(e=>e.appId!==``).map(e=>e.appId);return t.filter(e=>n.includes(e.id))}),Gy={app_external_aws_rds_connection:vn({id:`app_external_aws_rds_connection`,deserialize:zy,save:L.appExternalAwsRdsConnections.add})};function Ky(e,t){return`${e}-${t}`}function Moe(e){return{id:Ky(e.resource_type,`${e.id}`),estCost:e.est_cost,resourceType:e.resource_type}}var qy=L.costs.selectTable,Jy=L.costRates.select;function Yy(e,t,n){return L.costs.findById(e,{id:Ky(t,n)}).estCost}function Noe(e,t){return t*e.backup_cost_gb_per_month}function Xy(e,t){return Noe(e,t.totalBackupSize)}function Zy(e,t,n){let r=Yy(e,`Account`,n.id),i=Xy(t,n);return Math.max(r,i)}function Qy(e,t,n,r){return Yy(e,`Stack`,r)+n.reduce((n,i)=>{if(i.stackId!==r)return n;let a=Yy(e,`Account`,i.id),o=Xy(t,i);return n+Math.max(o-a,0)},0)}var $y=z.get(`/costs/:orgId/stacks`,{supervisor:lr()}),eb=z.get(`/costs/:orgId/accounts`,{supervisor:lr()}),tb=z.get(`/costs/:orgId/apps`,{supervisor:lr()}),nb=z.get(`/costs/:orgId/databases`,{supervisor:lr()}),rb=z.get(`/costs/:orgId/services`,{supervisor:lr()}),ib=z.get(`/costs/:orgId/persistent_disks`,{supervisor:lr()}),ab=z.get(`/costs/:orgId/rates`,{supervisor:lr()}
5,function*(e,t){yield*t(),e.json.ok&&(yield*L.update(L.costRates.set(e.json.value)))}),ob={cost:vn({id:`cost`,deserialize:Moe,save:L.costs.add})},sb=D(qy,Ty,(e,t)=>{let n=new Set(t.filter(e=>e.status!==`deprovisioned`).map(e=>e.persistentDiskId)),r=0;for(let t of n){let n=L.costs.findById(e,{id:Ky(`PersistentDisk`,t)});r+=n.estCost}return r}),cb=D(qy,Jy,tu,(e,t,n)=>Zy(e,t,n)),lb=D(qy,Jy,su,(e,t)=>t.id,(e,t,n,r)=>Qy(e,t,n,r)),ub=(e,t=2)=>(e||0).toLocaleString(`en`,{style:`currency`,currency:`USD`,minimumFractionDigits:t}),db=e=>Number.isNaN(e)?`$0.00`:(e||0).toLocaleString(`en`,{style:`currency`,currency:`USD`,minimumFractionDigits:2,maximumFractionDigits:8}),fb=D(Vl,qy,Jy,su,(e,t,n,r)=>!e||!t?0:e.reduce((e,i)=>e+Qy(t,n,r,i.id),0)),Poe=e=>({id:`${e.id}`,name:e.name,organizationId:e.organization_id,resourceId:e.resource_id,resourceType:e.resource_type,symptoms:e.symptoms,rangeBegin:e.range_begin,rangeEnd:e.range_end,observationTimestamp:e.observation_timestamp,data:e.data,createdAt:e.created_at,updatedAt:e.updated_at}),pb=L.dashboards.selectTableAsList;L.dashboards.selectById,D(pb,(e,t)=>t,(e,{resourceId:t,resourceType:n,timeRangeStart:r})=>e.filter(e=>e.resourceId.toString()===t&&e.resourceType===n&&e.rangeEnd>=r)),z.post(`/dashboards`,function*(e,t){let{name:n,resourceId:r,resourceType:i,organizationId:a,symptoms:o,rangeBegin:s,rangeEnd:c}=e.payload,l={name:n,resource_id:r,resource_type:i,symptoms:o,observation_timestamp:s,range_begin:s,range_end:c,organization_id:a};if(e.request=e.req({body:JSON.stringify(l)}),yield*t(),!e.json.ok)return;let u=e.json.value.id;e.loader={message:`Dashboard created (dashboard ID: ${u})`,meta:{dashboardId:u}}}),z.get(`/dashboards?per_page=500&no_data=true`),z.get(`/dashboards?per_page=100`),z.get(`/dashboards/:id`),z.put(`/dashboards/:id`,function*(e,t){let{data:n,name:r}=e.payload,i={};n&&(i.data=n),r&&(i.name=r),e.request=e.req({body:JSON.stringify(i)}),yield*t(),e.json.ok&&(e.loader={message:`Saved changes successfully!`})}),z.delete(`/dashboards/:id`,function*(e,t){yield*t(),e.json.ok&&(yield*L.update(L.dashboards.remove([e.payload.id])))});var Foe={dashboard:vn({id:`dashboard`,deserialize:Poe,save:L.dashboards.add})},mb=e=>({"db.t4g.micro":{cpu:`2 vCPUs`,memory:`1 GB`},"db.t4g.small":{cpu:`2 vCPUs`,memory:`2 GB`},"db.t4g.medium":{cpu:`2 vCPUs`,memory:`4 GB`},"db.t4g.large":{cpu:`2 vCPUs`,memory:`8 GB`},"db.t4g.xlarge":{cpu:`4 vCPUs`,memory:`16 GB`},"db.t4g.2xlarge":{cpu:`8 vCPUs`,memory:`32 GB`},"db.t3.micro":{cpu:`2 vCPUs`,memory:`1 GB`},"db.t3.small":{cpu:`2 vCPUs`,memory:`2 GB`},"db.t3.medium":{cpu:`2 vCPUs`,memory:`4 GB`},"db.t3.large":{cpu:`2 vCPUs`,memory:`8 GB`},"db.t3.xlarge":{cpu:`4 vCPUs`,memory:`16 GB`},"db.t3.2xlarge":{cpu:`8 vCPUs`,memory:`32 GB`},"db.m6g.large":{cpu:`2 vCPUs`,memory:`8 GB`},"db.m6g.xlarge":{cpu:`4 vCPUs`,memory:`16 GB`},"db.m6g.2xlarge":{cpu:`8 vCPUs`,memory:`32 GB`},"db.m6g.4xlarge":{cpu:`16 vCPUs`,memory:`64 GB`},"db.m6g.8xlarge":{cpu:`32 vCPUs`,memory:`128 GB`},"db.m6g.12xlarge":{cpu:`48 vCPUs`,memory:`192 GB`},"db.m6g.16xlarge":{cpu:`64 vCPUs`,memory:`256 GB`},"db.m5.large":{cpu:`2 vCPUs`,memory:`8 GB`},"db.m5.xlarge":{cpu:`4 vCPUs`,memory:`16 GB`},"db.m5.2xlarge":{cpu:`8 vCPUs`,memory:`32 GB`},"db.m5.4xlarge":{cpu:`16 vCPUs`,memory:`64 GB`},"db.m5.8xlarge":{cpu:`32 vCPUs`,memory:`128 GB`},"db.m5.12xlarge":{cpu:`48 vCPUs`,memory:`192 GB`},"db.m5.16xlarge":{cpu:`64 vCPUs`,memory:`256 GB`},"db.m5.24xlarge":{cpu:`96 vCPUs`,memory:`384 GB`},"db.r6g.large":{cpu:`2 vCPUs`,memory:`16 GB`},"db.r6g.xlarge":{cpu:`4 vCPUs`,memory:`32 GB`},"db.r6g.2xlarge":{cpu:`8 vCPUs`,memory:`64 GB`},"db.r6g.4xlarge":{cpu:`16 vCPUs`,memory:`128 GB`},"db.r6g.8xlarge":{cpu:`32 vCPUs`,memory:`256 GB`},"db.r6g.12xlarge":{cpu:`48 vCPUs`,memory:`384 GB`},"db.r6g.16xlarge":{cpu:`64 vCPUs`,memory:`512 GB`},"db.r5.large":{cpu:`2 vCPUs`,memory:`16 GB`},"db.r5.xlarge":{cpu:`4 vCPUs`,memory:`32 GB`},"db.r5.2xlarge":{cpu:`8 vCPUs`,memory:`64 GB`},"db.r5.4xlarge":{cpu:`16 vCPUs`,memory:`128 GB`},"db.r5.8xlarge":{cpu:`32 vCPUs`,memory:`256 GB`},"db.r5.12xlarge":{cpu:`48 vCPUs`,memory:`384 GB`},"db.r5.16xlarge":{cpu:`64 vCPUs`,memory:`512 GB`},"db.r5.24xlarge":{cpu:`96 vCPUs`,memory:`768 GB`}})[e]||{cpu:`Unknown`,memory:`Unknown`},hb=(e,t)=>
5{switch(e?.toLowerCase()){case`gp2`:return t?`${Math.min(Math.max(t*3,100),16e3)}`:`3/GB`;case`gp3`:return`3,000 (baseline)`;case`io1`:return`Provisioned`;case`io2`:return`Provisioned`;case`magnetic`:return`~100`;default:return`Unknown`}},gb=e=>e?`AES-256`:`None`,Ioe=(e={})=>{let t=new Date().toISOString();return{id:0,external_aws_account_id:``,resource_type:``,resource_arn:``,resource_id:``,resource_name:``,region:``,metadata:{},tags:{},discovered_at:null,last_synced_at:null,sync_status:`unknown`,created_at:t,updated_at:t,_links:{self:mn(),external_aws_account:mn(),external_aws_database_credentials:mn(),...e._links||{}},_type:`external_aws_resource`,...e}},_b=e=>({id:`${e.id}`,externalAwsAccountId:R(e._links.external_aws_account),resourceType:e.resource_type,resourceArn:e.resource_arn,resourceId:e.resource_id,resourceName:e.resource_name,region:e.region,metadata:e.metadata||{},tags:e.tags||{},discoveredAt:e.discovered_at||``,lastSyncedAt:e.last_synced_at||``,syncStatus:e.sync_status,createdAt:e.created_at,updatedAt:e.updated_at}),vb=z.get(`/external_aws_resources/:id`),yb=z.get(`/external_aws_resources`),Loe=e=>e.id!==``,bb=L.externalAwsResources.selectById,xb=L.externalAwsResources.selectTableAsList,Sb=D(xb,e=>e.reduce((e,t)=>{let n=t.externalAwsAccountId;return e[n]=(e[n]||0)+1,e},{})),Cb=D(xb,(e,t)=>t.accountId,(e,t)=>e.filter(e=>e.externalAwsAccountId===t)),wb={external_aws_resource:vn({id:`external_aws_resource`,deserialize:_b,save:L.externalAwsResources.add})},Tb=z.put(`/external_aws_resources/:id`,function*(e,t){let{resourceName:n}=e.payload,r={resource_name:n};e.request=e.req({body:JSON.stringify(r)}),yield*t(),e.json.ok&&(e.loader={message:`Saved changes successfully!`})}),Eb=e=>({id:`${e.id}`,organizationId:e.organization_id,teamId:e.team_id,spendLimit:Number.parseFloat(e.spend_limit),trial:e.trial,models:e.models,currentUsage:e.current_usage?{spend:e.current_usage.spend,budgetResetAt:e.current_usage.budget_reset_at}:null,createdAt:e.created_at,updatedAt:e.updated_at}),Db=L.llmGatewayConfigurations.selectTableAsList,Ob=L.llmGatewaySelfServiceEnrollment.select,kb=D(Db,e=>$o(e),(e,t)=>e.find(e=>e.organizationId===t)??null),Ab=z.get(`/llm_gateway_configurations?organization_id=:orgId&usage=true`,function*(e,t){let{orgId:n}=e.payload;n&&(yield*t(),e.json.ok&&(yield*L.update([L.llmGatewayConfigurations.reset(),L.llmGatewaySelfServiceEnrollment.set(e.json.value.self_service_enrollment_enabled!==!1)])))}),jb=z.post(`/llm_gateway_configurations?organization_id=:orgId`,function*(e,t){yield*t(),e.response?.status===404&&(yield*L.update(L.llmGatewaySelfServiceEnrollment.set(!1)))}),Mb=z.post(`/llm_gateway_configurations/access_request?organization_id=:orgId`),Nb=z.patch(`/llm_gateway_configurations/:id?organization_id=:orgId`,function*(e,t){let{spendLimit:n,models:r}=e.payload,i={...n===void 0?{}:{spend_limit:n},...r===void 0?{}:{models:r}};e.request=e.req({body:JSON.stringify(i)}),yield*t(),e.json.ok&&(e.loader={message:`Successfully updated LLM Gateway settings!`})}),Pb={llm_gateway_configuration:vn({id:`llm_gateway_configuration`,deserialize:Eb,save:L.llmGatewayConfigurations.add})},Fb=e=>({id:`${e.id}`,handle:e.handle,organizationId:e.organization_id,gatewayUrl:e.gateway_url,tokenPrefix:e.token_prefix,createdBy:e.created_by,revokedAt:e.revoked_at,revokedBy:e.revoked_by,status:e.status,createdAt:e.created_at,updatedAt:e.updated_at}),Ib=L.llmGatewayKeys.selectById,Lb=L.llmGatewayKeys.selectTableAsList,Rb=D(Lb,e=>[...e].sort((e,t)=>t.id.localeCompare(e.id,void 0,{numeric:!0}))),zb=z.get(`/llm_gateway_keys?per_page=5000&organization_id=:orgId`,function*(e,t){e.payload.orgId&&(yield*t(),e.json.ok&&(yield*L.update(L.llmGatewayKeys.reset())))}),Bb=z.get(`/llm_gateway_keys/:id?organization_id=:orgId`),Vb=z.post(`/llm_gateway_keys?organization_id=:orgId`,function*(e,t){let{handle:n}=e.payload;e.request=e.req({body:JSON.stringify({handle:n})}),yield*t(),e.json.ok&&(e.loader={meta:{token:e.json.value?.token||``,gatewayUrl:e.json.value?.gateway_url||``}})}),Hb=z.delete(`/llm_gateway_keys/:id?organization_id=:orgId`),Ub={llm_gateway_key:vn({id:`llm_gateway_key`,deserialize:Fb,save:L.llmGatewayKeys.add})},Wb=L.llmKeys.selectById,Roe=L.llmKeys.selectTable,Gb=L.llmKeys.selectTableAsList,zoe=L.llmKeys.findById,Boe=D(Gb,(e,t)=>t.envId,(e,t)=>t===``?e:e.filter(e=>e.environmentId===t)),Kb=D(Gb,au,(e,t)=>e.filter(e=>
5lu(iu(t,{id:e.environmentId})))),qb=z.get(`/llm_keys?per_page=5000&organization_id=:orgId&usage=true`,function*(e,t){let{orgId:n}=e.payload;n&&(yield*t(),e.json.ok)}),Jb=z.get(`/accounts/:envId/llm_keys?organization_id=:orgId&usage=true`,function*(e,t){let{envId:n,orgId:r}=e.payload;n&&r&&(yield*t(),e.json.ok)}),Yb=z.get(`/llm_keys/:id?usage=true`),Xb=z.post(`/accounts/:envId/llm_keys`,function*(e,t){let n=JSON.stringify({handle:e.payload.handle,note:e.payload.note,organization_id:e.payload.orgId});e.request=e.req({body:n}),yield*t(),e.json.ok&&(e.loader={meta:{llmKey:e.json.value?.token||``}})}),Zb=z.delete(`/llm_keys/:id?organization_id=:orgId`),Voe=e=>e.split(/\n/).map(e=>e.trim()).filter(Boolean),Qb=z.get(`/metadata/models`,function*(e,t){let n=`${(yield*p(an)).llmGatewayUrl}/metadata/models`;e.request=e.req({url:n}),e.noToken=!0,yield*t(),e.json.ok&&(e.loader={meta:{models:e.json.value||[]}})}),$b=z.get(`/llm_keys/:id/requests`,function*(e,t){let{id:n,startTime:r,endTime:i,status:a,model:o,requestId:s,sortBy:c,sortOrder:l,page:u=1,perPage:d=30}=e.payload,f=new URLSearchParams;r&&f.append(`start_time`,r),i&&f.append(`end_time`,i),a&&f.append(`status`,a),o&&f.append(`model`,o),s&&f.append(`request_id`,s),c&&f.append(`sort_by`,c),l&&f.append(`sort_order`,l),f.append(`page`,String(u)),f.append(`per_page`,String(d));let p=e.req().url,m=new URL(p);if(f.forEach((e,t)=>{m.searchParams.set(t,e)}),e.request=e.req({url:m.toString()}),yield*t(),!e.json.ok)return;let h=(e.json.value?._embedded?.requests||[]).map(e=>Hoe(e,n));yield*L.update(L.llmKeyRequests.reset());for(let e of h)yield*L.update(L.llmKeyRequests.add({[e.id]:e}));e.loader={meta:{totalCount:e.json.value.total_count,perPage:e.json.value.per_page,totalPages:Math.ceil(e.json.value.total_count/e.json.value.per_page),currentPage:e.json.value.current_page}}}),ex=z.get(`/llm_keys/:id/requests/:requestId/logs`,function*(e,t){let{id:n,requestId:r}=e.payload;if(!n||!r||(e.cache=!0,e.bodyType=`text`,yield*t(),!e.json.ok))return;let i=e.json.value.trim(),a=yield*Te(()=>fetch(i)),o=yield*Te(()=>a.text());if(!a.ok){e.json={ok:!1,error:{message:o}};return}e.json.value=o}),tx=L.llmKeyRequests.selectById,nx=L.llmKeyRequests.selectTableAsList,rx=D(nx,(e,t)=>t.llmKeyId,(e,t)=>e.filter(e=>e.llmKeyId===t)),ix=e=>{let t=e.current_usage,n=t?.spend??0,r=t?.successful_requests??0,i=t?.failed_requests??0,a=t?.input_tokens??0,o=t?.output_tokens??0,s=a+o,c=r+i;return{id:`${e.id}`,handle:e.handle,note:e.note,gatewayUrl:e.gateway_url,createdBy:e.created_by,revokedAt:e.revoked_at,revokedBy:e.revoked_by,status:e.status,environmentId:R(e._links.account),createdAt:e.created_at,updatedAt:e.updated_at,token:e.token,currentUsage:{spend:n,inputTokens:a,outputTokens:o,successfulRequests:r,failedRequests:i,totalRequests:c,totalTokens:s}}},Hoe=(e,t)=>{let n=new Date(e.start_time).getTime(),r=(new Date(e.end_time).getTime()-n)/1e3,i=e.input_tokens+e.output_tokens;return{id:e._id,llmKeyId:t,status:e.status,startTime:e.start_time,endTime:e.end_time,model:e.model,inputTokens:e.input_tokens,outputTokens:e.output_tokens,spend:e.spend,durationSeconds:r,totalTokens:i,createdAt:e.start_time,updatedAt:e.end_time}},ax={llm_key:vn({id:`llm_key`,deserialize:ix,save:L.llmKeys.add})},ox=e=>{let t=e.current_usage,n=t?.spend??0,r=t?.input_tokens??0,i=t?.output_tokens??0,a=t?.successful_requests??0,o=t?.failed_requests??0,s=r+i,c=a+o;return{id:`${e.id}`,spendLimit:e.spend_limit,environmentId:R(e._links?.account),models:Array.isArray(e.models)?e.models:[],currentUsage:{spend:n,inputTokens:r,outputTokens:i,successfulRequests:a,failedRequests:o,totalRequests:c,totalTokens:s}}},Uoe=L.llmPolicies.selectById,sx=L.llmPolicies.selectTableAsList,cx=D(sx,(e,t)=>t.envId,(e,t)=>e.filter(e=>e.environmentId===t)),lx=D(sx,e=>e.reduce((e,t)=>{let n=t.currentUsage;return e.totalSpend+=n.spend,e.totalInputTokens+=n.inputTokens,e.totalOutputTokens+=n.outputTokens,e.totalTokens+=n.totalTokens,e.totalSuccessfulRequests+=n.successfulRequests,e.totalFailedRequests+=n.failedRequests,e.totalRequests+=n.totalRequests,e},{totalSpend:0,totalInputTokens:0,totalOutputTokens:0,totalTokens:0,totalSuccessfulRequests:0,totalFailedRequests:0,totalRequests:0})),ux=z.get(`/llm_policies?per_page=5000&organization_id=:orgId&usage=true`,function*(e,t){let{orgId:n}=e.payload;n&&(yield*t(),e.json.ok&&(yield*L.update(L.llmPolicies.reset())))}),dx=z.get(`/accounts/:envId/llm_policies?organization_id=:orgId&usage=true`,function*(e,t){let{envId:n,orgId:r}=e.payload;if(!n||!r||(yield*t(),!e.json.ok))return;let i=e.json.value._embedded.llm_policies;if(!i.length)return $t({environmentId:e.payload.envId});let a={...ox(i[0]),environmentId:e.payload.envId};yield*L.update(L.llmPolicies.add({[a.id]:a}))}),fx=z.post(`/accounts/:envId/llm_policies/create_or_update?organization_id=:orgId`,function*(e,t){let{envId:n,orgId:r,spendLimit:i,models:a,silent:o}=e.payload;n&&r&&(e.request=e.req({body:JSON.stringify({spend_limit:i,models:a})}),yield*t(),e.json.ok&&(o||(e.loader={message:`Successfully updated LLM policy!`})))}),px=qn.create(`ensureLlmPolicy`,[function*(e){let{envId:t,orgId:n}=e.payload;t&&n&&(yield*dx.run({envId:t,orgId:n}),(yield*p(cx,{envId:t}))[0]?.id||(yield*fx.run({envId:t,orgId:n,silent:!0}),yield*dx.run({envId:t,orgId:n})))}]),mx={llm_policy:vn({id:`llm_policy`,deserialize:ox,save:L.llmPolicies.add})}
5,hx={scale_down:`Over-provisioned`,scale_up:`Under-provisioned`,rightsized:`Rightsized`,autoscaled:`Autoscaled`},gx=`Rightsized & Autoscaled`,Woe=(e={})=>{let t=new Date().toISOString();return{id:0,service_id:0,cpu_usage:0,ram_usage:0,ram_target:0,recommended_instance_class:``,recommended_container_memory_limit_mb:0,instance_class_at_time:``,container_memory_limit_mb_at_time:0,cost_savings:0,metric_percentile:0,created_at:t,updated_at:t,_links:{service:mn()},...e,_type:`manual_service_sizing_recommendation`}},_x=e=>({id:`${e.id}`,serviceId:`${e.service_id}`,cpuUsage:e.cpu_usage,ramUsage:e.ram_usage,ramTarget:e.ram_target,recommendedInstanceClass:e.recommended_instance_class,recommendedContainerMemoryLimitMb:e.recommended_container_memory_limit_mb,instanceClassAtTime:e.instance_class_at_time??``,containerMemoryLimitMbAtTime:e.container_memory_limit_mb_at_time,costSavings:e.cost_savings,metricPercentile:e.metric_percentile,createdAt:e.created_at}),vx={manual_service_sizing_recommendation:vn({id:`manual_service_sizing_recommendation`,deserialize:_x,save:L.manualScaleRecommendations.add})},yx=D(L.manualScaleRecommendations.selectTableAsList,(e,t)=>t.serviceId,(e,t)=>e.find(e=>e.serviceId===t)||L.manualScaleRecommendations.empty),bx=z.get(`/manual_service_sizing_recommendations?per_page=5000`,{supervisor:ur()}),Goe=z.get(`/manual_service_sizing_recommendations/:id`),xx=(e,t,n)=>{if(!e||!n||t?.scalingEnabled||!e.instanceClass||!n.instanceClassAtTime)return`none`;let r=xu(e.instanceClass)!==xu(n.instanceClassAtTime),i=e.containerMemoryLimitMb!==n.containerMemoryLimitMbAtTime,a=r||i,o=new Date;o.setDate(o.getDate()-2);let s=new Date(n.createdAt)>o;if(a||!s||n.id===``)return`none`;let c=n.costSavings;return c===0?`none`:c<0?`scale_up`:c>0&&c<150?`none`:`scale_down`},Sx=D(Eu,L.manualScaleRecommendations.selectTableAsList,L.serviceSizingPolicies.selectTable,(e,t,n)=>{let r=t.find(t=>t.serviceId===e.id),i=n[e.serviceSizingPolicyId];return xx({id:e.id,instanceClass:e.instanceClass,containerMemoryLimitMb:e.containerMemoryLimitMb,serviceSizingPolicyId:e.serviceSizingPolicyId},i,r)}),Koe=[`host-intrusion-detection`,`network-intrusion-detection`,`drift-detection-and-protection`,`24-7-site-reliability-and-incident-response`,`secure-isolated-network-connections-through-vpns-and-vpcs`,`secure-network-architecture`,`network-segregation`],qoe=[`host-intrusion-detection`],Joe=[`web-application-vulnerability-scanning`],Yoe=[`sso-integration`,`multi-factor-authentication`],Xoe={"multi-factor-authentication":`mfa`,"sso-integration":`sso`,"network-intrusion-detection":`networkIds`,"host-intrusion-detection":`hids`,"web-application-vulnerability-scanning":`webAppScanning`},Zoe={Account:`Environment`,Vhost:`Endpoint`,MfaControlProxyUser:`User`},Cx={all:{name:`All Controls`,description:`The full list of security and availability controls provided by Aptible`},"hipaa-required":{name:`HIPAA Required Controls`,description:`The controls that satisfy the "Required" requirements of the HIPAA Security Rule`,logo:`hipaa.png`},"hipaa-addressable":{name:`HIPAA Addressable Controls`,description:`The controls that satisfy the "Addressable" requirements of the HIPAA Security Rule`,logo:`hipaa.png`},"hitrust-inheritable":{name:`HITRUST Inheritable Controls`,description:`The controls inheritable under Aptible's HITRUST CSF Validated Assessment`,logo:`hitrust.png`}},wx=(e,t)=>{if(t===1)return e;if(e.endsWith(`s`)||e.endsWith(`x`)||e.endsWith(`z`)||e.endsWith(`ch`)||e.endsWith(`sh`))return`${e}es`;if(e.endsWith(`y`)){let t=e[e.length-2];return t&&`aeiou`.includes(t.toLowerCase())?`${e}s`:`${e.slice(0,-1)}ies`}return`${e}s`},Tx=(e,t)=>e===`HIPAA`?t===`Required`?`HIPAA Required`:`HIPAA Addressable`:e,Qoe=(e,t)=>{let n=e.toLowerCase().replace(/\s+/g,`-`);return e===`HIPAA`?t===`Required`?`${n}-required`:`${n}-addressable`:n},$oe=(e,t)=>{if(e===`HIPAA`){if(t===`Required`)return`hipaa-required`;if(t===`Addressable`)return`hipaa-addressable`}return e===`HITRUST`&&t===`Inheritable`?`hitrust-inheritable`:`${e.toLowerCase()}-${t.toLowerCase()}`},ese=e=>{let t=e._embedded?.framework,n=t?.name??``,r=e.category??``,i=Tx(n,r),a=Qoe(n,r);return{id:`${e.id??``}`,frameworkId:`${t?.id??``}`,name:n,category:r,displayName:i,metricHandle:a}},Ex=e=>{let t=e._embedded?.global_control_frameworks?.map(ese)??[],n=e.handle??``;return{id:`${e.id??``}`,name:e.name??``,handle:n,description:e.description??``,area:e.area??``,callToAction:e.call_to_action??e.callToAction??``,detailedDescription:e.detailed_description??e.detailedDescription??``,hasRemediation:!!(e.has_remediation??e.hasRemediation??!1),customFrontend:!!(e.custom_frontend??e.customFrontend??!1),frameworks:t,frameworksAsString:t.map(e=>e.displayName||`${e.name} ${e.category}`).join(`, `),frameworkHandles:t.map(e=>e.metricHandle),isDedicatedOnly:Koe.includes(n),isPremium:qoe.includes(n),isComingSoon:Joe.includes(n),implementationUiComponent:Xoe[n]??`default`,isOrganizationScoped:Yoe.includes(n),globalControlFrameworkIds:t.map(e=>e.id)}},tse=(e=``)=>e?Zoe[e]??e:`Resource`,Dx=e=>e==null?``:`${e}`,Ox=(e,t=``)=>{let n=`${e.id??``}`,r=R(e._links?.customer_control),i=t||r||``,a=e.resource_type??e.resourceType??``,o=Dx(e.resource_id??e.resourceId);return{id:n,customerControlId:i,compliant:!!e.compliant,ignored:!!e.ignored,detailsText:e.details_text??e.detailsText??``,resourceHandle:e.resource_handle??e.resourceHandle??``,resourceType:a,resourceId:o,readableResourceType:e.readable_resource_type??e.readableResourceType??tse(a),linkToParameters:{path:o?`/resources/${a}/${o}`:``,parentId:null,modelId:o}}},kx=e=>({id:`${e.id??``}`,globalControlId:R(e._links.global_control)??e._embedded?.global_control?.i
5d?.toString()??``,accountId:R(e._links.account),status:e.status??``,lastEvaluation:e.last_evaluation??e.lastEvaluation??``,resourceIds:[],isEvaluating:!1,isDisabled:!1,isComingSoon:!1}),Ax={global_control:vn({id:`global_control`,deserialize:Ex,save:L.globalControls.add})},jx={global_control_framework:vn({id:`global_control_framework`,deserialize:e=>{let t=e._embedded?.framework,n=e.name??t?.name??``,r=e.category??``;return{id:`${e.id}`,frameworkId:t?.id?`${t.id}`:``,name:n,category:r,displayName:Tx(n,r),metricHandle:$oe(n,r)}},save:L.globalControlFrameworks.add})},Mx={customer_control:vn({id:`customer_control`,deserialize:kx,save:L.customerControls.add})},Nx={customer_control_resource:vn({id:`customer_control_resource`,deserialize:Ox,save:L.customerControlResources.add})},nse=e=>{let t=new Map;for(let n of e){let e=t.get(n.customerControlId);e?e.push(n):t.set(n.customerControlId,[n])}return t},Px=(e,t)=>e?t?e>t?e:t:e:t,Fx=e=>{if(!e)return``;let t=Be.fromISO(e,{zone:`utc`});return t.isValid?t.toRelative()??``:``},rse=()=>({totalInScope:0,totalCompliant:0,totalIgnored:0,resourceType:`Resource`,lastEvaluation:``,lastEvaluationInWords:``,progressPercentage:0,status:`NO_SCOPE`,implementationSummary:`0 Resources`,implementationAsString:`0 of 0 Resources (0%)`,statusSort:101}),Ix=(e,t)=>e===0?`NO_SCOPE`:t===0?`NOT_STARTED`:t<100?`PARTIAL`:`COMPLETE`,Lx=({resources:e,isComingSoon:t,resourceType:n,lastEvaluation:r})=>{let i=e.filter(e=>!e.ignored),a=e.filter(e=>e.ignored),o=i.length,s=t?0:i.filter(e=>e.compliant).length,c=a.length,l=o===0?0:Math.round(s/o*100),u=Ix(o,l);return{totalInScope:o,totalCompliant:s,totalIgnored:c,resourceType:n,lastEvaluation:r,lastEvaluationInWords:Fx(r),progressPercentage:l,status:u,implementationSummary:`${o} ${wx(n,o)}`,implementationAsString:`${s} of ${o} ${wx(n,o)} (${l}%)`,statusSort:o===0?101:l}},ise=(e,t)=>{if(t===`organization`)return`organization`;let n=Dx(e.resourceId),r=Dx(e.resourceHandle),i=`${Dx(e.readableResourceType)}:${Dx(e.resourceType)}:${Dx(e.id)}`;return t===`user`?r||n||i:n||r||i},Rx=(e,t)=>{let n=new Map;for(let r of e){let e=ise(r,t.identityMode),i=n.get(e);i?i.push(r):n.set(e,[r])}return Array.from(n.entries()).sort(([e],[t])=>e.localeCompare(t))},zx=e=>{let t=[...e].sort((e,t)=>Dx(e.id).localeCompare(Dx(t.id))),n=t.filter(e=>!e.ignored),r=n.length===0,i=r?t[0].compliant:n.every(e=>e.compliant),a=r?t[0]:n.find(e=>!e.compliant)??n[0];return{...a,compliant:i,ignored:r,detailsText:a.detailsText}},Bx=(e,t)=>Rx(e,t).map(([,e])=>zx(e)),ase=e=>e.handle===`sso-integration`?`organization`:e.handle===`multi-factor-authentication`?`user`:`resource`,ose=(e,t)=>{if(t.isOrganizationScoped){let n=e.flatMap(e=>e.resources),r=ase(t),i=Bx(n,{identityMode:r}),a=r===`organization`?`Organization`:i[0]?.readableResourceType??e[0]?.metrics.resourceType??`Resource`,o=e.reduce((e,t)=>Px(e,t.metrics.lastEvaluation),``),s=Lx({resources:i,isComingSoon:t.isComingSoon,resourceType:a,lastEvaluation:o});return{...s,implementationSummary:`${s.totalInScope} ${wx(s.resourceType,s.totalInScope)}`}}let n=rse();for(let t of e){if(t.isDisabled){n.totalInScope+=1;continue}n.totalInScope+=t.metrics.totalInScope,n.totalIgnored+=t.metrics.totalIgnored,n.totalCompliant+=t.metrics.totalCompliant,n.resourceType=t.metrics.resourceType,n.lastEvaluation=Px(n.lastEvaluation,t.metrics.lastEvaluation)}return n.progressPercentage=n.totalInScope===0?0:Math.round(n.totalCompliant/n.totalInScope*100),n.status=Ix(n.totalInScope,n.progressPercentage),n.lastEvaluationInWords=Fx(n.lastEvaluation),n.implementationSummary=`${n.totalInScope} ${wx(n.resourceType,n.totalInScope)}`,n.implementationAsString=`${n.totalCompliant} of ${n.totalInScope} ${wx(n.resourceType,n.totalInScope)} (${n.progressPercentage}%)`,n.statusSort=n.totalInScope===0?101:n.progressPercentage,n},Vx=e=>Rx(e.flatMap(e=>e.resources),{identityMode:`user`}).map(([e,t])=>{let n=[...t].sort((e,t)=>Dx(e.id).localeCompare(Dx(t.id)));return{identity:e,resource:zx(n),resourceIds:n.map(e=>e.id)}}),sse=e=>e===100?`success`:e===0?`danger`:`warn`,Hx=(e,t)=>{let n=e.length>0&&e.every(e=>e.isDisabled);return{scopeTotal:n?1:t.totalInScope,scopeCompliant:n?0:t.totalCompliant}},Ux=(e,t,n,r)=>{let i=Cx[e],a=t===0?0:Math.round(n/t*100);return{handle:e,name:i?.name??e,description:i?.description??``,logo:i?.logo,controlCount:r,totalControlResourcesCount:t,compliantControlResourcesCount:n,progressPercentage:a,isComplete:a===100,styleVariant:sse(a)}},Wx=[`hipaa-required`,`hipaa-addressable`,`hitrust-inheritable`],Gx=(e,t={})=>{let n=t.metricHandles&&t.metricHandles.length>0?new Set(t.metricHandles):null,r=Object.keys(Cx).reduce((e,t)=>
5(e[t]={controlCount:0,total:0,compliant:0},e),{});for(let t of e){let{globalControl:e,cumulativeMetrics:i,customerControls:a}=t,{scopeTotal:o,scopeCompliant:s}=Hx(a,i),c=r.all;c.controlCount+=1,c.total+=o,c.compliant+=s;for(let t of e.frameworks){let e=t.metricHandle;if(n&&!n.has(e))continue;r[e]||(r[e]={controlCount:0,total:0,compliant:0});let i=r[e];i.controlCount+=1,i.total+=o,i.compliant+=s}}let i={};return Object.entries(r).forEach(([e,t])=>{i[e]=Ux(e,t.total,t.compliant,t.controlCount)}),i},cse=L.globalControls.selectTableAsList,Kx=L.customerControls.selectTableAsList,qx=L.customerControlResources.selectTableAsList,Jx=D(ru,g_,Kg,(e,t)=>t.orgId,(e,t,n,r)=>{let i=n.filter(e=>e.organizationId===r),a=new Set([`owner`,`platform_owner`]),o=i.some(e=>a.has(e.type)),s=new Set(i.map(e=>e.id)),c=e.filter(e=>e.organizationId===r).map(e=>{let n=t.filter(t=>t.environmentId===e.id).filter(e=>s.has(e.roleId)),r=o||n.length>0;return{id:e.id,handle:e.handle,type:e.type,stackId:e.stackId,hasAccess:r}}).filter(e=>e.hasAccess).sort((e,t)=>e.handle.localeCompare(t.handle));return{all:c,production:c.filter(e=>e.type===`production`),development:c.filter(e=>e.type===`development`)}}),Yx=D(Jx,e=>(e.production.length>0?e.production:e.development).slice(0,5).map(e=>e.id)),Xx=D(Jx,e=>e.production.length===0&&e.all.length>0),Zx=D(cse,Kx,qx,ru,(e,t)=>t,(e,t,n,r,i)=>{let a=r.filter(e=>e.organizationId===i.orgId).reduce((e,t)=>(e[t.id]=t,e),{}),o=i.scopeIds.length>0?new Set(i.scopeIds):null,s=e.reduce((e,t)=>(e[t.id]=t,e),{}),c=nse(n),l=[];for(let e of t){let t=a[e.accountId];if(!t||o&&!o.has(t.id))continue;let n=s[e.globalControlId];if(!n)continue;let r=c.get(e.id)??[],i=r[0]?.readableResourceType??`Resource`,u=Lx({resources:r,isComingSoon:n.isComingSoon,resourceType:i,lastEvaluation:e.lastEvaluation??``}),d=n.isDedicatedOnly&&t.type===`development`;l.push({...e,metrics:u,environmentId:t.id,environmentHandle:t.handle,environmentType:t.type,isDisabled:d,resources:r})}let u=new Map;for(let e of l){let t=u.get(e.globalControlId);t?t.push(e):u.set(e.globalControlId,[e])}let d=[],f=Object.keys(Cx).reduce((e,t)=>(e[t]={controlCount:0,total:0,compliant:0},e),{}),p=new Set;for(let t of e){p.add(t.area);let e=u.get(t.id)??[],n=ose(e,t),r=e.reduce((e,t)=>(e[t.environmentId]=t,e),{});d.push({id:t.id,globalControl:t,customerControls:e,customerControlsByEnvironmentId:r,cumulativeMetrics:n});let{scopeTotal:i,scopeCompliant:a}=Hx(e,n),o=f.all;o.controlCount+=1,o.total+=i,o.compliant+=a;for(let e of t.frameworks){f[e.metricHandle]||(f[e.metricHandle]={controlCount:0,total:0,compliant:0});let t=f[e.metricHandle];t.controlCount+=1,t.total+=i,t.compliant+=a}}let m={};return Object.entries(f).forEach(([e,t])=>{m[e]=Ux(e,t.total,t.compliant,t.controlCount)}),{controls:d,frameworks:m,categories:Array.from(p).sort((e,t)=>e.localeCompare(t))}}),Qx=z.get(`/global_controls?per_page=500`),$x=z.get(`/customer_controls`,function*(e,t){if(e.payload.orgId===``||e.payload.accountIds.length===0)return;let n=new URLSearchParams;n.set(`per_page`,`500`),n.set(`organization_id`,e.payload.orgId),e.payload.accountIds.slice(0,5).forEach(e=>n.append(`account_ids[]`,e)),n.append(`include[]`,`customer_control_resources`);let r=n.toString();if(e.request=e.req({url:`${e.req().url}?${r}`}),yield*t(),e.json.ok&&e.json.value._embedded?.customer_controls){let t=e.payload.accountIds,n=yield*p(Kx),r=yield*p(qx),i=n.filter(e=>t.includes(e.accountId)).map(e=>e.id),a=new Set(i),o=r.filter(e=>a.has(e.customerControlId)).map(e=>e.id),s=new Set(n.filter(e=>e.isEvaluating).map(e=>e.id)),c={},l={};for(let t of e.json.value._embedded.customer_controls){let e=kx(t);s.has(e.id)&&(e.isEvaluating=!0),c[e.id]=e;let n=e.id;if(t._embedded?.customer_control_resources)for(let e of t._embedded.customer_control_resources){let t=Ox(e,n);l[t.id]=t}}yield*L.update([...i.length>0?[L.customerControls.remove(i)]:[],...o.length>0?[L.customerControlResources.remove(o)]:[],L.customerControls.add(c),L.customerControlResources.add(l)]),e.json.value._embedded={}}}),eS=z.patch(`/customer_control_resources/:id`,function*(e,t){let n={ignored:e.payload.ignored};e.request=e.req({body:JSON.stringify(n)}),yield*t()}
5),tS=z.post(`/customer_controls/:id/run`,function*(e,t){yield*t(),e.json.ok&&e.json.value._embedded&&(e.json.value._embedded={})}),lse=10,use=3e3,dse=`We could not confirm the control rerun completed. Refresh the page in a few minutes to check the latest evaluation.`,nS=qn.create(`security-controls:update-resource`,function*(e,t){let{id:n,ignored:r,orgId:i,accountIds:a}=e.payload,o=yield*p(e=>L.customerControlResources.selectById(e,{id:n}));yield*L.update(L.customerControlResources.patch({[n]:{ignored:r}})),!(yield*eS.run(e.payload)).json.ok&&o.id!==``?yield*L.update(L.customerControlResources.patch({[n]:{ignored:o.ignored}})):i&&a&&a.length>0&&(yield*$x.run({orgId:i,accountIds:a})),yield*t()}),rS=qn.create(`security-controls:update-resources`,function*(e,t){let{ids:n,ignored:r,orgId:i,accountIds:a}=e.payload,o=Array.from(new Set(n)).filter(Boolean);if(o.length===0){yield*t();return}let s={},c={};for(let e of o){let t=yield*p(t=>L.customerControlResources.selectById(t,{id:e}));t.id!==``&&(s[e]=t.ignored,c[e]={ignored:r})}let l=Object.keys(c);if(l.length===0){yield*t();return}yield*L.update(L.customerControlResources.patch(c));let u=[],d=!1;for(let e of l)(yield*eS.run({id:e,ignored:r})).json.ok?d=!0:u.push(e);if(u.length>0){let e=u.reduce((e,t)=>(e[t]={ignored:s[t]},e),{});yield*L.update(L.customerControlResources.patch(e))}d&&i&&a&&a.length>0&&(yield*$x.run({orgId:i,accountIds:a})),yield*t()}),iS=qn.create(`security-controls:evaluate`,[Gn,function*(e,t){let{id:n,orgId:r,accountIds:i}=e.payload;try{let e=(yield*p(e=>L.customerControls.selectById(e,{id:n}))).lastEvaluation;yield*L.update(L.customerControls.patch({[n]:{isEvaluating:!0}}));let t=yield*tS.run({id:n});if(!t.json.ok)throw Error(t.json.error.message);if(r!==``&&i.length>0){yield*$x.run({orgId:r,accountIds:i});let t=(yield*p(e=>L.customerControls.selectById(e,{id:n}))).lastEvaluation!==e;for(let a=0;!t&&a<lse;a++)if(yield*un(use),yield*$x.run({orgId:r,accountIds:i}),(yield*p(e=>L.customerControls.selectById(e,{id:n}))).lastEvaluation!==e){t=!0;break}if(!t)throw Error(dse)}}finally{yield*L.update(L.customerControls.patch({[n]:{isEvaluating:!1}}))}yield*t()}]),fse=(e={})=>{let t=new Date().toISOString();return{id:0,settings:{},sensitive_settings:{},created_at:t,updated_at:t,_type:`setting`,...e}},pse=e=>({id:`${e.id}`,settings:e.settings||{},sensitiveSettings:e.sensitive_settings||{},createdAt:e.created_at,updatedAt:e.updated_at}),aS=L.settings.selectById,oS=z.get(`/settings/:id`),sS={setting:vn({id:`setting`,save:L.settings.add,deserialize:pse})},mse={...Pb,...Ub,...ax,...mx,...bf,...Gy,...ep,...mg,...Zl,...vu,...lm,...Op,...uh,...Fh,...Vu,...bh,...Zd,...Eg,...Dg,...k_,...X_,...nv,...Mg,...Ig,...fv,...fg,...Ev,...Rv,...Gv,...Qv,...ay,...by,...Fy,...Lm,...sS,...vx,...ob,...Foe,...c_,...wb,...Ax,...jx,...Mx,...Nx},cS=D(au,af,Pu,L.manualScaleRecommendations.selectTableAsList,L.costs.selectTable,L.serviceSizingPolicies.selectTable,Ay,(e,t,n,r,i,a,o)=>n.filter(t=>lu(iu(e,{id:t.environmentId}))).filter(e=>e.appId).map(n=>{let s=iu(e,{id:n.environmentId}),c=``;c=n.appId?sf(t,{id:n.appId}).handle:`Unknown`;let l=r.find(e=>e.serviceId===n.id),u=L.costs.findById(i,{id:Ky(`Service`,n.id)}).estCost,d=a[n.serviceSizingPolicyId]??L.serviceSizingPolicies.empty,f=l?.costSavings||0;d.scalingEnabled&&(f=-.1);let p=xx({id:n.id,instanceClass:n.instanceClass,containerMemoryLimitMb:n.containerMemoryLimitMb,serviceSizingPolicyId:n.serviceSizingPolicyId},d,l);return{...n,envHandle:s.handle,resourceHandle:c,savings:f,cost:u,scaleRec:p,command:bu(n),diskStorageSort:o[n.id]??0}}).sort((e,t)=>t.id.localeCompare(e.id,void 0,{numeric:!0}))),lS=D(cS,(e,t)=>t.appId,(e,t)=>e.filter(e=>e.appId===t)),uS=D(uf,nu,Yu,Du,_l,L.costs.selectTable,(e,t,n,r,i,a)=>e.map(e=>{let o=iu(t,{id:e.environmentId}),s=ed(n,e.id)?.[0]||L.operations.empty,c=L.deployments.findById(i,{id:e.currentDeploymentId}),l=Au(Object.values(r),e.id),u=Cu(l),d=L.costs.findById(a,{id:Ky(`App`,e.id)}).estCost;return{...e,...u,envHandle:o.handle,lastOperation:s,currentDeployment:c,gitRef:c.gitRef,gitCommitSha:c.gitCommitSha,dockerImageName:c.dockerImage,lastDeployed:c.id===``?``:c.createdAt,cost:d,totalServices:l.length,services:l}}).sort((e,t)=>
5e.id.localeCompare(t.id,void 0,{numeric:!0}))),dS=(e,t)=>{let n=e.gitRef.toLocaleLowerCase(),r=e.gitCommitSha.toLocaleLowerCase(),i=e.dockerImageName.toLocaleLowerCase(),a=e.handle.toLocaleLowerCase(),o=e.envHandle.toLocaleLowerCase(),s=``,c=``,l=``;e.lastOperation&&(s=e.lastOperation.userName.toLocaleLowerCase(),c=e.lastOperation.type.toLocaleLowerCase(),l=e.lastOperation.status.toLocaleLowerCase());let u=n.includes(t),d=r.includes(t),f=i.includes(t),p=a.includes(t),m=o.includes(t),h=s!==``&&s.includes(t),g=c!==``&&c.includes(t),_=l!==``&&l.includes(t),v=t===e.id;return u||d||f||p||m||g||_||h||v},fS=(e,t)=>(n,r)=>{if(e===`cost`)return t===`asc`?n.cost-r.cost:r.cost-n.cost;if(e===`handle`)return t===`asc`?n.handle.localeCompare(r.handle):r.handle.localeCompare(n.handle);if(e===`gitRef`){let e=[n.gitRef,n.gitCommitSha].join(`@`),i=[r.gitRef,r.gitCommitSha].join(`@`);return t===`asc`?e.localeCompare(i):i.localeCompare(e)}if(e===`dockerImageName`)return t===`asc`?n.dockerImageName.localeCompare(r.dockerImageName):r.dockerImageName.localeCompare(n.dockerImageName);if(e===`id`)return t===`asc`?n.id.localeCompare(r.id,void 0,{numeric:!0}):r.id.localeCompare(n.id,void 0,{numeric:!0});if(e===`totalServices`)return t===`asc`?n.totalServices-r.totalServices:r.totalServices-n.totalServices;if(e===`envHandle`)return t===`asc`?n.envHandle.localeCompare(r.envHandle):r.envHandle.localeCompare(n.envHandle);if(e===`lastDeployed`){let e=!n.lastDeployed,i=!r.lastDeployed;if(e&&i)return 0;if(t===`desc`){if(e)return 1;if(i)return-1}else{if(e)return-1;if(i)return 1}let a=new Date(n.lastDeployed).getTime(),o=new Date(r.lastDeployed).getTime();return t===`asc`?a-o:o-a}return t===`asc`?new Date(n.createdAt).getTime()-new Date(r.createdAt).getTime():new Date(r.createdAt).getTime()-new Date(n.createdAt).getTime()},pS=D(uS,tm,(e,t)=>{let n=new Set(t.map(e=>e.id));return e.filter(e=>n.has(e.id))}),mS=D(uS,Wy,(e,t)=>{let n=new Set(t.map(e=>e.id));return e.filter(e=>n.has(e.id))}),hS=D(uS,(e,t)=>t.envId,(e,t)=>t===``?e:e.filter(e=>e.environmentId===t)),gS=D(uS,(e,t)=>t.sourceId,(e,t)=>t===``?e:e.filter(e=>e.currentSourceId===t)),_S=D(uS,(e,t)=>t.search.toLocaleLowerCase(),(e,t)=>t.envId||``,(e,t)=>t.sortBy,(e,t)=>t.sortDir,(e,t,n,r,i)=>{let a=fS(r,i);return t===``&&n===``?[...e].sort(a):e.filter(e=>{let r=dS(e,t),i=n!==``&&e.environmentId===n;return n===``?r:t===``?i:i&&r}).sort(a)}),hse=D(uS,(e,t)=>t.search.toLocaleLowerCase(),(e,t)=>t.sortBy,(e,t)=>t.sortDir,(e,t,n,r)=>{let i=fS(n,r);return t===``?[...e].sort(i):e.filter(e=>dS(e,t)).sort(i)}),gse=D(uS,(e,t)=>t.search.toLocaleLowerCase(),(e,t)=>t.sourceId,(e,t)=>t.sortBy,(e,t)=>t.sortDir,(e,t,n,r,i)=>{let a=fS(r,i);return t===``&&n===``?[...e].sort(a):e.filter(e=>{let r=dS(e,t),i=n!==``&&e.currentSourceId===n;return n===``?r:t===``?i:i&&r}).sort(a)}),vS=D(kl,uS,(e,t)=>e.map(e=>{let n=t.filter(t=>t.currentSourceId===e.id),r=n.map(e=>e.currentDeployment),i=r.reduce((e,t)=>{let n=t.gitCommitSha;return!n||Object.hasOwn(e,n)||(e[n]={sha:n,ref:t.gitRef,message:t.gitCommitMessage,date:t.gitCommitTimestamp,url:t.gitCommitUrl}),e},{}),a=Object.values(i).sort((e,t)=>!e.date||!t.date?0:new Date(t.date).getTime()-new Date(e.date).getTime());return{...e,apps:n,deployments:r,liveCommits:a}})),yS=D(vS,(e,t)=>t.search.toLocaleLowerCase(),(e,t)=>t.sortBy,(e,t)=>t.sortDir,(e,t,n,r)=>{let i=(e,t)=>{let i=(r===`asc`?e:t)[n],a=(r===`asc`?t:e)[n];return n===`liveCommits`||n===`apps`?i.length-a.length:n===`displayName`?i.localeCompare(a):0};return t===``?[...e].sort(i):e.filter(e=>e.displayName.includes(t)).sort(i)}),bS=(e,t)=>t.search.toLocaleLowerCase(),xS=(e,t)=>{let n=(e.handle||``).toLocaleLowerCase(),r=(e.envHandle||``).toLocaleLowerCase(),i=(e.type||``).toLocaleLowerCase(),a=(e.imageDesc||``).toLocaleLowerCase(),o=``,s=``,c=``;e.lastOperation&&(o=e.lastOperation.userName.toLocaleLowerCase(),s=e.lastOperation.type.toLocaleLowerCase(),c=e.lastOperation.status.toLocaleLowerCase());let l=n.includes(t),u=r.includes(t),d=o!==``&&o.includes(t),f=s!==``&&s.includes(t),p=c!==``&&c.includes(t),m=i.includes(t),h=a.includes(t),g=t===e.id;return l||h||m||u||f||p||d||g},_se=(e,t)=>(n,r)=>e===`cost`?t===`asc`?n.cost-r.cost:r.cost-n.cost:e===`savings`?t===`asc`?n.savings-r.savings:r.savings-n.savings:e===`handle`?t===`asc`?n.handle.localeCompare(r.handle):r.handle.localeCompare(n.handle):e===`id`?t===`asc`?n.id.localeCompare(r.id,void 0,{numeric:!0}):r.id.localeCompare(n.id,void 0,{numeric:!0}):e===`diskSize`?t===`asc`?n.diskSize-r.diskSize:r.diskSize-n.diskSize:e===`containerSize`?t===`asc`?n.containerSize-r.containerSize:r.containerSize-n.containerSize:e===`envHandle`?t===`asc`?n.envHandle.localeCompare(r.envHandle):r.envHandle.localeCompare(n.envHandle):e===`enableBackups`?t===`asc`?Number(n.enableBackups)-Number(r.enableBackups):Number(r.enableBackups)-Number(n.enableBackups):t===`asc`?new Date(n.createdAt).getTime()-new Date(r.createdAt).getTime():new Date(r.createdAt).getTime()-new Date(n.createdAt).getTime(),SS=D(mp,nu,Yu,ny,Du,mh,L.serviceSizingPolicies.selectTableAsList,L.manualScaleRecommendations.selectTableAsList,L.costs.selectTable,(e,t,n,r,i,a,o,s,c)=>e.map(e=>{let l=iu(t,{id:e.environmentId}),u=td(n,e.id),d=L.operations.empty;u.length>0&&(d=u[0]);let f=iy(r,{id:e.diskId}),p=ku(i,{id:e.serviceId}),m=L.costs.findById(c,{id:Ky(`Database`,e.id)}).estCost,h=o.find(e=>e.id===p.serviceSizingPolicyId),g=Cu([p]),_=hh(a,{id:e.databaseImageId}),v=s.find(t=>t.serviceId===e.serviceId),y=xx({id:e.serviceId,instanceClass:p.instanceClass,containerMemoryLimitMb:p.containerMemoryLimitMb,serviceSizingPolicyId:p.serviceSizingPolicyId},h,v);return{...e,imageDesc:_.description,envHandle:l.handle,lastOperation:d,diskSize:f.size,cost:m,containerSize:g.totalMemoryLimit/1024,containerCpu:g.totalCPU,savings:v?.costSavings||0,scaleRec:y}}).sort((e,t)=>
5t.id.localeCompare(e.id,void 0,{numeric:!0}))),CS=D(SS,bS,(e,t)=>t.sortBy,(e,t)=>t.sortDir,L.manualScaleRecommendations.selectTableAsList,L.serviceSizingPolicies.selectTable,Du,(e,t,n,r,i,a,o)=>{let s=_se(n,r),{tags:c,text:l}=TS(t),u=Object.keys(c).length===0;if(u&&l===``)return[...e].sort(s);if(u)return[...l===``?e:e.filter(e=>xS(e,l))].sort(s);let d=e=>{let t=o[e.serviceId],n=i.find(t=>t.serviceId===e.serviceId),r=a[t?.serviceSizingPolicyId??``];return xx(t?{id:t.id,instanceClass:t.instanceClass,containerMemoryLimitMb:t.containerMemoryLimitMb,serviceSizingPolicyId:t.serviceSizingPolicyId}:void 0,r,n)},f=e.filter(e=>{if(c.scalerec===`all`){let t=d(e);if(t!==`scale_up`&&t!==`scale_down`)return!1}else if(c.scaledownrec===`true`||c.scaleuprec===`true`){let t=d(e);if(c.scaledownrec===`true`&&t!==`scale_down`||c.scaleuprec===`true`&&t!==`scale_up`)return!1}return!0});return l!==``&&(f=f.filter(e=>xS(e,l))),[...f].sort(s)}),vse=D(SS,bS,(e,t)=>t.envId||``,(e,t,n)=>t===``&&n===``?e:e.filter(e=>{let r=xS(e,t),i=n!==``&&e.environmentId===n;return n===``?r:t===``?i:i&&r})),wS=D(SS,(e,t)=>t.envId,(e,t)=>e.filter(e=>e.environmentId===t)),yse=D(pb,(e,t)=>t.search,(e,t)=>e.filter(e=>e.name.toLowerCase().includes(t.toLowerCase()))),TS=e=>{let t={};if(!e)return{tags:t,text:``};let n=e.toLowerCase().trim().split(/\s+/),r=[];for(let e of n){let n=e.match(/^(\w+):(.*)$/);if(n){let e=n[1],r=n[2];if(e===`autoscaling`||e===`scaledownrec`||e===`scaleuprec`||e===`scalerec`){t[e]=r;continue}}r.push(e)}return{tags:t,text:r.join(` `)}},ES=D(au,Kb,(e,t)=>t.map(t=>{let n=iu(e,{id:t.environmentId});return{...t,envHandle:n.handle,totalRequests:t.currentUsage.totalRequests,spend:t.currentUsage.spend,totalTokens:t.currentUsage.totalTokens}}).sort((e,t)=>t.id.localeCompare(e.id,void 0,{numeric:!0}))),DS=D(ES,(e,t)=>t.envId,(e,t)=>e.filter(e=>e.environmentId===t)),OS=e=>Number.parseFloat(e)*1e6,kS=e=>({id:e.id,name:e.normalized_name||e.id,contextLength:e.context_length,maxInputTokens:e.max_input_tokens,maxOutputTokens:e.max_output_tokens||0,inputCostPerMillionTokens:OS(e.pricing.prompt),outputCostPerMillionTokens:OS(e.pricing.completion)}),AS=z.get([`/metadata/models`,`v2`],function*(e,t){let n=yield*p(an);if(!n.llmGatewayV2Url){e.response=new Response(null,{status:503}),e.json={ok:!1,error:{message:`No LLM Gateway is configured for this environment.`}};return}e.request={url:`${n.llmGatewayV2Url}/metadata/models`,method:`GET`,credentials:`omit`,headers:{},signal:e.req().signal},e.noToken=!0,yield*t(),e.json.ok&&(e.loader={meta:{models:e.json.value.data.map(kS)}})}),jS=e=>{let t=e._links,n=e.accountId||R(t?.account);return{id:e.id,handle:e.handle,url:e.url,llmPolicyId:R(t.llm_policy),environmentId:n,drainType:e.drain_type,publicKey:e.public_key,apiKey:e.api_key,status:e.status,createdAt:e.created_at,updatedAt:e.updated_at}},bse=L.llmTraceDrains.selectById,MS=L.llmTraceDrains.selectTableAsList,NS=D(MS,(e,t)=>cx(e,t),(e,t)=>t.envId,(e,t,n)=>{let r=new Set(t.map(e=>e.id).filter(e=>!!e));return e.filter(e=>!!(e.environmentId===n||e.llmPolicyId&&r.has(e.llmPolicyId)))}),PS=z.get(`/accounts/:id/llm_trace_drains?organization_id=:orgId`,{supervisor:ur()},function*(e,t){let{id:n,orgId:r}=e.payload;if(!n||!r||(yield*t(),!e.json.ok))return;let i=(e.json.value?._embedded?.llm_trace_drains||[]).map(e=>jS({...e,accountId:n}));yield*L.update(L.llmTraceDrains.add(i.reduce((e,t)=>(e[t.id]=t,e),{})))});function xse(e){return e.drainType===`langfuse`?{handle:e.handle,drain_type:e.drainType,url:e.url,public_key:e.publicKey,api_key:e.secretKey,organization_id:e.orgId}:{handle:e.handle,drain_type:e.drainType,organization_id:e.orgId}}var FS=z.post(`/llm_policies/:policyId/llm_trace_drains?organization_id=:orgId`,function*(e,t){e.request=e.req({body:JSON.stringify(xse(e.payload))}),yield*t(),e.json.ok&&(yield*PS.run({id:e.payload.accountId,orgId:e.payload.orgId}),e.loader={message:`LLM trace drain created.`})}),IS=qn.create(`createLlmTraceDrain`,[Gn,function*(e){let t=e.payload,n=t.accountId,r=t.orgId;if(!n||!r)return;yield*px.run({envId:n,orgId:r});let i=(yield*p(cx,{envId:n}))[0]?.id??``;if(!i){e.loader={message:`Unable to create or load an LLM policy for this environment.`};return}let a=yield*FS.run({...t,policyId:i});if(!a.json.ok){let t=a.json.error;yield*L.update(L.loaders.error({id:e.key,message:t.message}));return}}]),LS=z.delete(`/llm_trace_drains/:drainId?organization_id=:orgId`,function*(e,t){if(yield*t(),!e.json.ok)return;let{drainId:n}=e.payload;yield*L.update(L.llmTraceDrains.remove([n])),yield*PS.run({id:e.payload.accountId,orgId:e.payload.orgId}),e.loader={message:`LLM trace drain deleted.`}}),Sse=r({CONTAINER_PROFILES:()=>Pl,DEFAULT_PERSISTENT_DISK_TYPE:()=>`gp3`,GB:()=>Nl,MAX_SECURITY_CONTROL_SCOPE:()=>5,PRINT_REPORT_FRAMEWORK_ORDER:()=>Wx,RIGHTSIZED_AUTOSCALED_LABEL:()=>gx,SEGMENT_DISPLAY_LABELS:()=>hx,activePlanEntities:()=>Dg,addPerm:()=>M_,appConfigEntities:()=>fg,appEntities:()=>bf,appExternalAwsRdsConnectionEntities:()=>Gy,appToOption:()=>Fie,applySelectedPlan:()=>Tg,attachPersistentDisk:()=>vy,backupEntities:()=>Ev,backupRpEntities:()=>Rv,buildMfaImplementationResourceGroups:()=>Vx,buildSslProtocolsOptions:()=>Em,calcMetrics:()=>Cu,calcServiceMetrics:()=>wu,canHaveTokenHeader:()=>$ie,cancelAppOpsPoll:()=>jd,cancelDatabaseOpsPoll:()=>Pd,cancelEndpointOpsPoll:()=>Bd,cancelEnvOperationsPoll:()=>Od,cancelExternalAwsAccountOpsPoll:()=>Dd,cancelFetchEndpointPoll:()=>sm,cancelLlmKeyOpsPoll:()=>Hd,cancelOpByIdPoll:()=>qd,cancelOrgOperationsPoll:()=>
5xd,cancelPollCert:()=>Wf,cancelPollDatabaseBackups:()=>kv,cancelRunningOperation:()=>Kd,cancelServicesOpsPoll:()=>Ld,certificateEntities:()=>ep,checkDns:()=>bm,computeCostId:()=>Ky,computeEffectiveEnvironmentCostValue:()=>Zy,computeEffectiveStackCostValue:()=>Qy,computeFrameworkMetricsFromAggregates:()=>Gx,configEnvListToEnv:()=>rg,configEnvToStr:()=>tg,configStrToEnvList:()=>ng,configureBackupRpOperation:()=>Vv,connectionUrlRewrite:()=>Jv,containerEntities:()=>nv,containerSizesByProfile:()=>ef,costEntities:()=>ob,createActivePlan:()=>wg,createAndAttachPersistentDisk:()=>yy,createAppOperation:()=>yf,createCertificate:()=>$f,createDatabase:()=>Sp,createDatabaseEndpoint:()=>dm,createDatabaseOperation:()=>Tp,createDeployApp:()=>vf,createDeployEnvironment:()=>_u,createDiskAttachmentOperation:()=>Ny,createEndpoint:()=>um,createEndpointOperation:()=>fm,createLlmGatewayConfiguration:()=>jb,createLlmGatewayKey:()=>Vb,createLlmKey:()=>Xb,createLlmTraceDrain:()=>IS,createLogDrain:()=>ah,createLogDrainOperation:()=>oh,createMetricDrain:()=>jh,createMetricDrainOperation:()=>Mh,createPersistentDisk:()=>py,createPersistentDiskBody:()=>fy,createPersistentDiskOperation:()=>hy,createReadableStatus:()=>Qd,createServiceDefinition:()=>Tae,createServiceSizingPolicyByServiceId:()=>Gm,createSupportTicket:()=>Iy,credEntities:()=>Gv,customerControlEntities:()=>Mx,customerControlResourceEntities:()=>Nx,databaseEntities:()=>Op,databaseImageEntities:()=>bh,datadogPath:()=>Ah,datadogSites:()=>kh,dedupeSecurityControlResources:()=>Bx,defaultActivePlanResponse:()=>Eae,defaultAppExternalAwsRdsConnectionResponse:()=>Eoe,defaultAppResponse:()=>Eie,defaultBackupRpResponse:()=>soe,defaultCertificateResponse:()=>zf,defaultCodeScanResponse:()=>pv,defaultConfigurationResponse:()=>gae,defaultContainerResponse:()=>$ae,defaultDatabaseImageResponse:()=>oae,defaultDatabaseResponse:()=>Bie,defaultDeployDiskResponse:()=>doe,defaultDiskAttachmentResponse:()=>yoe,defaultEdgeResponse:()=>aoe,defaultEndpointResponse:()=>Kie,defaultEnvResponse:()=>oie,defaultExternalAwsAccountResponse:()=>Gae,defaultExternalAwsResourceResponse:()=>Ioe,defaultLogDrainResponse:()=>iae,defaultManualScaleRecommendationResponse:()=>Woe,defaultMetricDrainResponse:()=>sae,defaultOperationResponse:()=>hie,defaultPermissionResponse:()=>Kae,defaultPersistentDiskResponse:()=>poe,defaultPlanResponse:()=>Dae,defaultReleaseResponse:()=>Xae,defaultServiceResponse:()=>uie,defaultServiceSizingPolicyResponse:()=>tae,defaultSettingResponse:()=>fse,defaultStackResponse:()=>rie,defaultVpcPeerResponse:()=>jae,defaultVpnTunnelResponse:()=>Pae,deleteBackup:()=>Fv,deleteCertificate:()=>Jf,deleteEndpoint:()=>Zie,deleteLlmTraceDrain:()=>LS,deletePerm:()=>N_,deleteServiceDefinition:()=>Cae,deleteServiceSizingPolicyByServiceId:()=>rae,deployAppImage:()=>Sf,deprovisionApp:()=>wf,deprovisionDatabase:()=>kp,deprovisionDiskAttachment:()=>Py,deprovisionEndpoint:()=>pm,deprovisionEnvironment:()=>pu,deprovisionLogDrain:()=>ch,deprovisionMetricDrain:()=>Ph,deriveEnvPermInheritance:()=>R_,deriveScaleRecommendationState:()=>xx,deserializeActivePlan:()=>gg,deserializeAppConfig:()=>eg,deserializeAppExternalAwsRdsConnection:()=>zy,deserializeCertificate:()=>Bf,deserializeCustomerControl:()=>kx,deserializeCustomerControlResource:()=>Ox,deserializeDatabaseCredential:()=>Hv,deserializeDeployApp:()=>tf,deserializeDeployBackup:()=>gv,deserializeDeployContainer:()=>Z_,deserializeDeployDatabase:()=>cp,deserializeDeployDatabaseImage:()=>dh,deserializeDeployEdge:()=>rv,deserializeDeployEndpoint:()=>Ip,deserializeDeployEnvironment:()=>$l,deserializeDeployEnvironmentStats:()=>eu,deserializeDeployOperation:()=>Ku,deserializeDeployRelease:()=>W_,deserializeDeployService:()=>yu,deserializeDeployServiceSizingPolicy:()=>Im,deserializeDeployStack:()=>Ll,deserializeDeployVpcPeer:()=>Og,deserializeDisk:()=>$v,deserializeDiskAttachment:()=>xy,deserializeExternalAwsAccount:()=>i_,deserializeExternalAwsResource:()=>_b,deserializeGlobalControl:()=>Ex,deserializeImage:()=>Yv,deserializeLlmGatewayConfiguration:()=>Eb,deserializeLlmGatewayKey:()=>Fb,deserializeLlmGatewayModel:()=>kS,deserializeLlmKey:()=>ix,deserializeLlmPolicy:()=>ox,deserializeLlmTraceDrain:()=>jS,deserializeLogDrain:()=>Jm,deserializeManualScaleRecommendation:()=>_x,deserializeMetricDrain:()=>xh,deserializePermission:()=>p_,deserializePersistentDisk:()=>sy,deserializePlan:()=>hg,deserializeServiceDefinition:()=>pg,diskAttachmentEntities:()=>Fy,diskAttachmentOperationBody:()=>My,diskEntities:()=>ay,diskStorageLabel:()=>Dy,edgeEntities:()=>fv,emptyFilterProps:()=>bd,endpointEntities:()=>lm,endpointSettingApplies:()=>Tm,ensureLlmPolicy:()=>px,entities:()=>mse,envForRollback:()=>ag,envRollbackChanges:()=>og,envToOption:()=>cu,environmentEntities:()=>vu,estimateMonthlyCost:()=>ap,evaluateCustomerControl:()=>iS,externalAwsAccountEntities:()=>c_,externalAwsResourceEntities:()=>wb,fetchAccountLlmTraceDrains:()=>PS,fetchActivePlans:()=>Sg,fetchAllCertsByEnvId:()=>Zf,fetchAllEnvOps:()=>vd,fetchApp:()=>_f,fetchAppExternalAwsRdsConnectionsByAppId:()=>Doe,fetchAppExternalAwsRdsConnectionsByExternalAwsAccountId:()=>Ooe,fetchAppExternalAwsRdsConnectionsByExternalAwsResourceId:()=>By,fetchApps:()=>hf,fetchAppsByCertId:()=>Kf,fetchBackup:()=>Nv,fetchBackupRp:()=>zv,fetchBackups:()=>Ov,fetchBackupsByDatabaseId:()=>Mv,fetchBackupsByDatabaseIdPage:()=>jv,fetchBackupsByEnvId:()=>ooe,fetchBackupsByEnvIdPage:()=>Pv,fetchBackupsPage:()=>Dv,fetchCertificateById:()=>Yf,fetchCertificatesByEnvironmentId:()=>Xf,fetchCodeScanResult:()=>mv,fetchConfiguration:()=>ug,fetchContainersByReleaseId:()=>ioe,fetchContainersByReleaseIdWithDeleted:()=>tv,fetchCostRates:()=>ab,fetchCostsByApps:()=>tb,fetchCostsByDatabases:()=>nb,fetchCostsByEnvironments:()=>eb,fetchCostsByPersistentDisks:()=>ib,fetchCostsByServices:()=>rb,fetchCostsByStacks:()=>$y,fetchCredentialById:()=>qv,fetchCredentialsByDatabaseId:()=>Kv,fetchCustomerControls:()=>$x,fetchDatabase:()=>bp,fetchDatabaseDependents:()=>Ep,fetchDatabaseImageById:()=>yh,fetchDatabaseImages:()=>vh,fetchDatabases:()=>yp,fetchDatabasesByEnvId:()=>xp,fetchDiskAttachment:()=>woe,fetchDiskAttachments:()=>jy,fetchDiskById:()=>ey,fetchEdges:()=>dv,fetchEndpoint:()=>am,fetchEndpoints:()=>om,fetchEndpointsByAppId:()=>nm,fetchEndpointsByCertId:()=>qf,fetchEndpointsByDatabaseId:()=>Xie,fetchEndpointsByEnvironmentId:()=>rm,fetchEndpointsByServiceId:()=>im,fetchEnvLogDrains:()=>rh,fetchEnvMetricDrains:()=>Eh,fetchEnvOperations:()=>_d,fetchEnvironmentById:()=>du,fetchEnvironmentServices:()=>zu,fetchEnvironments:()=>fu,fetchExternalAwsAccountById:()=>a_,fetchExternalAwsAccounts:()=>o_,fetchExternalAwsResourceById:()=>vb,fetchExternalAwsResources:()=>yb,fetchGlobalControls:()=>Qx,fetchImageById:()=>Xv,fetchLlmGatewayConfiguration:()=>Ab,fetchLlmGatewayKeyById:()=>Bb,fetchLlmGatewayKeys:()=>zb,fetchLlmGatewayModels:()=>
5AS,fetchLlmKeyById:()=>Yb,fetchLlmKeyRequestLogs:()=>ex,fetchLlmKeyRequests:()=>$b,fetchLlmKeys:()=>qb,fetchLlmKeysByEnvId:()=>Jb,fetchLlmModels:()=>Qb,fetchLlmPolicies:()=>ux,fetchLlmPolicy:()=>dx,fetchLogDrain:()=>ih,fetchLogDrains:()=>nh,fetchManualScaleRecommendationById:()=>Goe,fetchManualScaleRecommendations:()=>bx,fetchMetricDrain:()=>Dh,fetchMetricDrains:()=>Oh,fetchNetworkDataForPrintReport:()=>Lg,fetchOperationById:()=>Gd,fetchOperationLogs:()=>Wd,fetchOperationsByAppId:()=>Ad,fetchOperationsByDatabaseId:()=>Nd,fetchOperationsByEndpointId:()=>zd,fetchOperationsByEnvId:()=>Td,fetchOperationsByExternalAwsAccountId:()=>Ed,fetchOperationsByLlmKeyId:()=>Vd,fetchOperationsByOrgId:()=>wd,fetchOperationsByServiceId:()=>Id,fetchPersistentDisk:()=>_oe,fetchPersistentDisks:()=>dy,fetchPersistentDisksByEnvId:()=>voe,fetchPlanById:()=>Aae,fetchPlans:()=>xg,fetchRelease:()=>J_,fetchReleasesByServiceWithDeleted:()=>Y_,fetchService:()=>Lu,fetchServiceDefinition:()=>wae,fetchServiceDefinitionsByAppId:()=>Sae,fetchServiceSizingPolicies:()=>Vm,fetchServiceSizingPoliciesByEnvironmentId:()=>Hm,fetchServiceSizingPoliciesByServiceId:()=>Um,fetchServices:()=>Ru,fetchServicesByAppId:()=>Bu,fetchSettingById:()=>oS,fetchStack:()=>Yl,fetchStackManagedHids:()=>Xl,fetchStacks:()=>Jl,fetchVpcPeersByStackId:()=>jg,fetchVpnTunnelsByStackId:()=>Fg,findAppById:()=>sf,findBackupsByDatabaseId:()=>Sv,findBackupsByEnvId:()=>xv,findDatabaseById:()=>fp,findDatabaseImageById:()=>hh,findDiskAttachmentById:()=>Coe,findDiskAttachmentsByPersistentDiskId:()=>Cy,findDiskById:()=>iy,findDisksByEnvId:()=>oy,findEndpointById:()=>Rp,findEndpointsByAppId:()=>Up,findEndpointsByEnvId:()=>qie,findEndpointsByServiceId:()=>Hp,findEnvById:()=>iu,findEnvironmentsByStackId:()=>lie,findLatestDbProvisionOp:()=>bie,findLatestDeployOp:()=>yie,findLatestSuccessDeployOp:()=>md,findLatestSuccessProvisionDbOp:()=>id,findLatestSuccessScanOp:()=>hd,findLlmKeyById:()=>zoe,findLogDrainById:()=>Xm,findMetricDrainById:()=>Sh,findOperationsByAppId:()=>ed,findOperationsByDbId:()=>td,findOperationsByServiceId:()=>$u,findPermissionById:()=>m_,findPersistentDiskById:()=>goe,findPersistentDisksByEnvId:()=>ly,findServiceById:()=>ku,findServicesByAppId:()=>Au,findServicesByDatabaseId:()=>mie,findServicesByEnvId:()=>ju,findServicesByIds:()=>pie,findStackById:()=>Rl,findVpnTunnelsByStackId:()=>Lae,formatCurrency:()=>ub,formatDatabaseType:()=>Gie,formatRate:()=>db,getCertFingerprint:()=>np,getCertIssuerName:()=>tp,getCertLabel:()=>rp,getContainerPort:()=>Dm,getContainerProfileFromType:()=>Su,getCpuLimit:()=>Il,getDatabaseLabel:()=>sp,getEncryptionAlgorithm:()=>gb,getEndpointDisplayHost:()=>km,getEndpointText:()=>Mm,getEndpointUrl:()=>Am,getInstanceProfileLabel:()=>Fl,getInstanceSpecs:()=>mb,getIpAllowlistText:()=>Sm,getPlacement:()=>xm,getResourceUrl:()=>$d,getScaleTextFromOp:()=>Uu,getStackType:()=>Gl,getStackTypeTitle:()=>Ql,getStorageIops:()=>hb,getTokenHeader:()=>jm,getUpdatePermId:()=>A_,globalControlEntities:()=>Ax,globalControlFrameworkEntities:()=>jx,hasDeployApp:()=>nf,hasDeployBackupRp:()=>loe,hasDeployCertificate:()=>Rie,hasDeployDatabase:()=>Vie,hasDeployDatabaseImage:()=>fh,hasDeployDiskAttachment:()=>boe,hasDeployEndpoint:()=>Vp,hasDeployEnvironment:()=>lu,hasDeployLogDrain:()=>aae,hasDeployMetricDrain:()=>lae,hasDeployOperation:()=>qu,hasDeployService:()=>Ou,hasDeployStack:()=>Kl,hasExplicitPerm:()=>I_,hasExternalAwsResource:()=>Loe,hasInheritedPerm:()=>L_,hasPerm:()=>qae,hoursPerMonth:()=>730,imageEntities:()=>Qv,isLogDrainHttps:()=>eh,isLogDrainSyslog:()=>th,isPhiAllowed:()=>ou,isRequiresCert:()=>Cm,isTlsOrTcp:()=>wm,llmGatewayConfigurationEntities:()=>Pb,llmGatewayKeyEntities:()=>Ub,llmKeyEntities:()=>ax,llmPolicyEntities:()=>mx,loadBalancingAlgorithms:()=>Fm,logDrainEntities:()=>uh,manualScaleRecommendationEntities:()=>vx,mapCreatorToProvision:()=>Cp,metricDrainEntities:()=>Fh,modifyPersistentDisk:()=>_y,modifyServiceSizingPolicy:()=>qm,normalizeInstanceClass:()=>xu,opEntities:()=>Zd,parseIpStr:()=>Nm,parseModelsStr:()=>Voe,parsePortsStrToNum:()=>Pm,parseSearchTags:()=>TS,patchCustomerControlResource:()=>eS,permissionEntities:()=>k_,persistentDiskEntities:()=>by,persistentDiskOperationBody:()=>my,pitrRestoreDatabase:()=>Fp,planEntities:()=>
5Eg,pollAppOperations:()=>Md,pollCert:()=>Gf,pollDatabaseBackups:()=>Av,pollDatabaseOperations:()=>Fd,pollEndpointOperations:()=>wie,pollEnvOperations:()=>kd,pollExternalAwsAccountOperations:()=>Cie,pollFetchEndpoint:()=>cm,pollLlmKeyOperations:()=>Ud,pollOperationById:()=>Jd,pollOrgOperations:()=>Sd,pollOrgOperationsByTypes:()=>Sie,pollServiceOperations:()=>Rd,postLlmTraceDrain:()=>FS,prettyResourceType:()=>Gu,profileCostPerGBHour:()=>ip,provisionDatabase:()=>wp,provisionDatabaseEndpoint:()=>hm,provisionDatabaseList:()=>Wie,provisionEndpoint:()=>mm,provisionLogDrain:()=>sh,provisionMetricDrain:()=>Nh,provisionPersistentDisk:()=>gy,releaseEntities:()=>X_,removeDeployCertificates:()=>Qf,renewEndpoint:()=>gm,requestLlmGatewayAccess:()=>Mb,requiresAcmeSetup:()=>vm,resetSupportTicket:()=>Ly,restartApp:()=>xf,restartDatabase:()=>Mp,restartLogDrain:()=>lh,restartMetricDrain:()=>uae,restartRecreateDatabase:()=>Np,restoreBackup:()=>Iv,revokeLlmGatewayKey:()=>Hb,revokeLlmKey:()=>Zb,rollbackApp:()=>Cf,rollbackDeployment:()=>dg,runCustomerControlEvaluation:()=>tS,scaleDatabase:()=>Pp,scaleService:()=>Yd,scopeDesc:()=>F_,scopeTitle:()=>P_,selectActiveDatabasesByOrgAsList:()=>hp,selectActiveMountPointsByServiceId:()=>Ey,selectActivePlanById:()=>kae,selectActivePlansAsList:()=>yg,selectActivityByIdsForTable:()=>V_,selectActivityForTable:()=>B_,selectAppById:()=>rf,selectAppByServiceId:()=>Pie,selectAppConfigByAppId:()=>cg,selectAppConfigById:()=>
5sg,selectAppDeploymentType:()=>mf,selectAppExternalAwsRdsConnectionById:()=>koe,selectAppExternalAwsRdsConnectionsAsList:()=>Vy,selectAppExternalAwsRdsConnectionsByAppId:()=>Hy,selectAppExternalAwsRdsConnectionsByExternalAwsAccountId:()=>Aoe,selectAppExternalAwsRdsConnectionsByExternalAwsResourceId:()=>Uy,selectAppToServicesMap:()=>Iu,selectApps:()=>af,selectAppsAsList:()=>of,selectAppsByCertId:()=>tm,selectAppsByEnvId:()=>cf,selectAppsByEnvOnboarding:()=>Die,selectAppsByOrgAsList:()=>uf,selectAppsByOrgAsListWithDeployments:()=>df,selectAppsBySource:()=>pf,selectAppsByStack:()=>Oie,selectAppsCountBySource:()=>kie,selectAppsForTable:()=>uS,selectAppsForTableByCertId:()=>pS,selectAppsForTableByEnvId:()=>hS,selectAppsForTableByExternalAwsResourceId:()=>mS,selectAppsForTableBySourceId:()=>gS,selectAppsForTableSearch:()=>hse,selectAppsForTableSearchByEnvironmentId:()=>_S,selectAppsForTableSearchBySourceId:()=>gse,selectAppsViaAppExternalAwsRdsConnectionsByExternalAwsResourceId:()=>Wy,selectAutoscalingEnabledById:()=>Bm,selectAutoscalingEnabledByServiceId:()=>nae,selectBackupById:()=>_v,selectBackupRpById:()=>uoe,selectBackups:()=>
5bv,selectBackupsAsList:()=>yv,selectBackupsByDatabaseId:()=>Tv,selectBackupsByEnvId:()=>Cv,selectBackupsByIds:()=>vv,selectCanUserManageRole:()=>C_,selectCertificateById:()=>Vf,selectCertificatesAsList:()=>Hf,selectCertificatesByEnvId:()=>Uf,selectContainerById:()=>eoe,selectContainerByIds:()=>toe,selectContainerProfilesForStack:()=>ql,selectContainersAsList:()=>Q_,selectContainersByCurrentReleaseAndHorizon:()=>ev,selectContainersByReleaseId:()=>noe,selectContainersByReleaseIdByLayerType:()=>roe,selectContainersByReleaseIdsByLayerType:()=>$_,selectCredentialById:()=>Wv,selectCredentialsByDatabaseId:()=>Uv,selectDashboardsForTableSearch:()=>yse,selectDatabaseByHandle:()=>pp,selectDatabaseById:()=>lp,selectDatabaseDependents:()=>Dp,selectDatabaseImageById:()=>ph,selectDatabaseImages:()=>mh,selectDatabaseImagesAsList:()=>gh,selectDatabaseImagesVisible:()=>_h,selectDatabases:()=>dp,selectDatabasesAsList:()=>up,selectDatabasesByEnvId:()=>gp,selectDatabasesByEnvIdAndType:()=>_p,selectDatabasesByEnvIdForTable:()=>wS,selectDatabasesByOrgAsList:()=>mp,selectDatabasesByStack:()=>Hie,selectDatabasesForTable:()=>SS,selectDatabasesForTableSearch:()=>CS,selectDatabasesForTableSearchByEnvironmentId:()=>vse,selectDefaultStack:()=>Wl,selectDependencies:()=>lg,selectDependenciesByAppId:()=>lv,selectDependenciesByType:()=>vae,selectDiskAttachmentById:()=>xoe,selectDiskAttachments:()=>Soe,selectDiskAttachmentsAsList:()=>Sy,selectDiskAttachmentsByEnvId:()=>Toe,selectDiskAttachmentsByPersistentDiskId:()=>wy,selectDiskAttachmentsByServiceId:()=>Ty,selectDiskById:()=>ty,selectDiskStorageDisplayByServiceId:()=>ky,selectDiskStorageGbByServiceId:()=>Ay,selectDiskStorageLabelByServiceId:()=>Oy,selectDisks:()=>ny,selectDisksAsList:()=>ry,selectDisksByEnvId:()=>foe,selectEdgeById:()=>iv,selectEdgeDependenciesByType:()=>uv,selectEdges:()=>av,selectEdgesAsList:()=>ov,selectEdgesByRelationshipType:()=>cv,selectEdgesBySourceResourceId:()=>sv,selectEffectiveEnvironmentCost:()=>cb,selectEffectiveStackCost:()=>lb,selectEndpointById:()=>Lp,selectEndpoints:()=>zp,selectEndpointsAsList:()=>Bp,selectEndpointsByAppId:()=>Wp,selectEndpointsByAppIdForTable:()=>Zp,selectEndpointsByCertId:()=>em,selectEndpointsByCertIdForTable:()=>Qp,selectEndpointsByDbIdForTable:()=>Yie,selectEndpointsByEnvIdForTable:()=>Xp,selectEndpointsByEnvironmentId:()=>qp,selectEndpointsByOrgAsList:()=>Jp,selectEndpointsByServiceId:()=>Gp,selectEndpointsByServiceIdForTable:()=>$p,selectEndpointsForTable:()=>Yp,selectEnvToServicesMap:()=>Nu,selectEnvironmentByAppId:()=>gf,selectEnvironmentById:()=>tu,selectEnvironmentByIds:()=>sie,selectEnvironmentByName:()=>uu,selectEnvironmentStatsById:()=>cie,selectEnvironments:()=>nu,selectEnvironmentsAsList:()=>ru,selectEnvironmentsByOrg:()=>au,selectEnvironmentsByOrgAsList:()=>su,selectEnvironmentsByStackId:()=>hu,selectExternalAwsAccountById:()=>l_,selectExternalAwsAccountsAsList:()=>u_,selectExternalAwsAccountsForTable:()=>d_,selectExternalAwsResourceById:()=>bb,selectExternalAwsResourceCountByAccountId:()=>Sb,selectExternalAwsResourcesAsList:()=>xb,selectExternalAwsResourcesByAccountId:()=>Cb,selectExternalAwsResourcesViaAppExternalAwsRdsConnectionsByAppId:()=>joe,selectFirstActivePlan:()=>bg,selectFirstAppByEnvId:()=>lf,selectFirstEndpointByAppId:()=>Kp,selectHasPrimaryResourceForOpByActivity:()=>Yae,selectHasReadOnAnyEnvInSelectedOrg:()=>z_,selectImageById:()=>Zv,selectIsAccountOwner:()=>__,selectIsBillingAdmin:()=>v_,selectIsPlatformOwner:()=>y_,selectIsRoleAdmin:()=>b_,selectIsUserAnyOwner:()=>w_,selectIsUserOwner:()=>S_,selectLatestAppDeployment:()=>ff,selectLatestBackupRpByEnvId:()=>Lv,selectLatestConfigureOp:()=>dd,selectLatestDeployOp:()=>fd,selectLatestDeployOpWithCodeScan:()=>pd,selectLatestOpByAppId:()=>_ie,selectLatestOpByDatabaseId:()=>gie,selectLatestOpByResourceId:()=>od,selectLatestProvisionOp:()=>cd,selectLatestProvisionOps:()=>Zu,selectLatestScanOp:()=>vie,selectLatestSuccessDeployOpByEnvId:()=>xie,selectLatestSuccessScanOp:()=>gd,selectLatestSyncOpByExternalAwsAccountId:()=>sd,selectLlmGatewayConfiguration:()=>kb,selectLlmGatewayConfigurationsAsList:()=>Db,selectLlmGatewayKeyById:()=>Ib,selectLlmGatewayKeysAsList:()=>Lb,selectLlmGatewayKeysForTable:()=>Rb,selectLlmGatewaySelfServiceEnrollmentEnabled:()=>Ob,selectLlmKeyById:()=>Wb,selectLlmKeyRequestById:()=>tx,selectLlmKeyRequestsAsList:()=>nx,selectLlmKeyRequestsByKeyId:()=>rx,selectLlmKeys:()=>Roe,selectLlmKeysAsList:()=>Gb,selectLlmKeysByEnvId:()=>Boe,selectLlmKeysByEnvIdForTable:()=>DS,selectLlmKeysByOrgAsList:()=>Kb,selectLlmKeysForTable:()=>ES,selectLlmPoliciesAsList:()=>sx,selectLlmPoliciesByEnvId:()=>cx,selectLlmPolicyById:()=>Uoe,selectLlmTraceDrainById:()=>bse,selectLlmTraceDrainsAsList:()=>MS,selectLlmTraceDrainsByEnvId:()=>NS,selectLogDrainById:()=>Ym,selectLogDrains:()=>Qm,selectLogDrainsAsList:()=>Zm,selectLogDrainsByEnvId:()=>$m,selectManualScaleRecommendationByServiceId:()=>yx,selectMetricDrainById:()=>cae,selectMetricDrains:()=>wh,selectMetricDrainsAsList:()=>Ch,selectMetricDrainsByEnvId:()=>Th,selectNonFailedScaleOps:()=>ld,selectOperationById:()=>Ju,selectOperationsAsList:()=>Yu,selectOperationsByAppId:()=>rd,selectOperationsByDatabaseId:()=>ad,selectOperationsByEnvId:()=>Qu,selectOperationsByResourceId:()=>Xu,selectOperationsByServiceId:()=>nd,selectOrgAiUsageTotals:()=>lx,selectOrphanedBackupsByEnvId:()=>wv,selectPermissions:()=>h_,selectPermissionsAsList:()=>g_,selectPermsByEnvAndRoleId:()=>D_,selectPermsByEnvId:()=>E_,selectPersistentDiskById:()=>moe,selectPersistentDiskCostByService:()=>sb,selectPersistentDisks:()=>hoe,selectPersistentDisksAsList:()=>cy,selectPersistentDisksByEnvId:()=>uy,selectPitrEnabledDatabasesByEnvId:()=>vp,selectPlanByActiveId:()=>_g,selectPlansForView:()=>vg,selectReleaseAsList:()=>K_,selectReleaseById:()=>G_,selectReleaseByIds:()=>Zae,selectReleasesByService:()=>Qae,selectReleasesByServiceAfterDate:()=>q_,selectResourceByIdAndType:()=>U_,selectResourceNameByOperationId:()=>H_,selectRoleToEnvToPermsMap:()=>T_,selectRolesEditable:()=>x_,selectScaleDiff:()=>ud,selectScaleRecommendationStateByServiceId:()=>Sx,selectSecurityControlAggregates:()=>Zx,selectSecurityControlDefaultScope:()=>Yx,selectSecurityControlEnvironments:()=>Jx,selectSecurityControlRequiresDedicatedStack:()=>Xx,selectServiceById:()=>Eu,selectServiceDefinitionById:()=>bae,selectServiceDefinitionsAsList:()=>yae,selectServiceDefinitionsByAppId:()=>xae,selectServiceRowsByAppId:()=>lS,selectServiceSizingPolicyById:()=>Rm,selectServiceSizingPolicyByServiceId:()=>zm,selectServices:()=>Du,selectServicesAsList:()=>Mu,selectServicesByAppId:()=>Hu,selectServicesByEnvId:()=>Fu,selectServicesByIds:()=>fie,selectServicesByOrgId:()=>Pu,selectServicesForTable:()=>cS,selectSettingById:()=>aS,selectSourcesForTable:()=>vS,selectSourcesForTableSearch:()=>yS,selectStackByAppId:()=>Nie,selectStackById:()=>
5zl,selectStacks:()=>Bl,selectStacksAsOptions:()=>aie,selectStacksByOrgAsList:()=>Vl,selectStacksByOrgAsOptions:()=>Ul,selectTotalMonthlyCostByStacks:()=>fb,selectUserHasPerms:()=>O_,selectVpcPeerById:()=>Mae,selectVpcPeers:()=>Nae,selectVpcPeersAsList:()=>kg,selectVpcPeersByStackId:()=>Ag,selectVpnTunnelById:()=>Rae,selectVpnTunnelByStackId:()=>Pg,selectVpnTunnels:()=>zae,selectVpnTunnelsAsList:()=>Ng,serviceCommandText:()=>bu,serviceDefinitionEntities:()=>mg,serviceEntities:()=>Vu,serviceSizingPolicyEntities:()=>Lm,settingEntities:()=>sS,stackEntities:()=>Zl,stackToOption:()=>Hl,syncExternalAwsAccount:()=>s_,unlinkDatabase:()=>Ap,updateActivePlan:()=>Cg,updateApp:()=>Tf,updateBackupRp:()=>Bv,updateCustomerControlResource:()=>nS,updateCustomerControlResources:()=>rS,updateDatabase:()=>jp,updateDeployEnvironmentStatus:()=>gu,updateEndpoint:()=>_m,updateEnvironmentName:()=>mu,updateExternalAwsAccount:()=>f_,updateExternalAwsResource:()=>Tb,updateLlmGatewayConfiguration:()=>Nb,updateLlmPolicy:()=>fx,updatePerm:()=>j_,updateServiceById:()=>Tu,updateServiceSizingPolicyByServiceId:()=>Km,uploadAttachment:()=>Ry,vpcPeerEntities:()=>Mg,vpnTunnelEntities:()=>Ig,waitForOperation:()=>Xd}),Cse=`https://fmwgqnbnbc4r.statuspage.io/api/v2/status.json`,RS=`system-status`,wse=qn.create(`fetch-system-status`,function*(e,t){let n=yield*Te(()=>fetch(Cse)),r=yield*Te(()=>n.json());yield*L.update(L.cache.add({[RS]:r.status})),yield*t()}),Tse=r({FETCH_REQUIRED_DATA:()=>zS,bootup:()=>BS,refreshData:()=>HS,sagas:()=>Ase}),zS=`fetch-required-data`,BS=qn.create(`bootup`,function*(e,t){let n=e.name;if(yield*L.update(L.loaders.start({id:n})),yield*Te(()=>Qs.run(Qs())),!(yield*p(An))){yield*L.update([L.loaders.success({id:zS,message:`no token found`}),L.loaders.success({id:n,message:`no token found`})]);return}yield*VS(),yield*L.update(L.loaders.success({id:n})),yield*t()});function*Ese(){yield*L.update(L.loaders.start({id:zS}));let e=yield*p(Ko);yield*hc.run(),yield*gc.run(),yield*is.run({userId:e});let t=yield*p(ns);yield*Ds.run({id:t.billingDetailId}),yield*Zg.run({orgId:t.id}),yield*Qg.run({userId:e}),yield*Fc.run({orgId:t.id}),yield*L.update(L.loaders.success({id:zS}))}function*Dse(e){yield*be($y({orgId:e})),yield*be(eb({orgId:e})),yield*be(tb({orgId:e})),yield*be(nb({orgId:e})),yield*be(rb({orgId:e})),yield*be(ib({orgId:e})),yield*be(ab({orgId:e}))}function*Ose(){let e=yield*p(ns),t=yield*S([as.run({orgId:e.id}),Jl.run(),fu.run(),hf.run(),vh.run(),yp.run(),nh.run(),Oh.run(),Ru.run(),om.run(),wd.run({id:e.id,page:1,...bd}),wse.run(),Al.run(),Cl.run(),ol.run({orgId:e.id}),Vm.run(),bx.run(),Ab.run({orgId:e.id}),ux.run({orgId:e.id}),qb.run({orgId:e.id})]);yield*Dse(e.id),yield*t}function*VS(){yield*Ese(),yield*Ose()}var HS=dn(`REFRESH_DATA`);function*kse(){yield*A(`${HS}`,VS)}var Ase={watchRefreshData:kse},jse=r({resetRedirectPath:()=>GS,selectRedirectPath:()=>US,setRedirectPath:()=>WS}),US=L.redirectPath.select,WS=qn.create(`set-redirect-path`,function*(e,t){yield*L.update(L.redirectPath.set(e.payload)),yield*t()}),GS=qn.create(`reset-redirect-path`,function*(e,t){yield*L.update(L.redirectPath.reset()),yield*t()});function KS(){let e=l(),t=B(Ko),n=B(qo),r=I(is);return(0,V.useEffect)(()=>{n.id===``&&e(is({userId:t}))},[t]),(0,V.useMemo)(()=>[n,r],[n,r.status])}function Mse(e,t){return e?.scalingEnabled?`autoscaled`:t===`scale_down`?`scale_down`:t===`scale_up`?`scale_up`:`rightsized`}function Nse(e,t){return t===`scale_down`?`scale_down`:t===`scale_up`?`scale_up`:`rightsized`}
5function Pse(){let e=B(e=>hp(e)),t=B(L.services.selectTable),n=B(L.manualScaleRecommendations.selectTableAsList),r=B(L.serviceSizingPolicies.selectTable);return(0,V.useMemo)(()=>{let i=[];for(let a of e){let e=L.services.findById(t,{id:a.serviceId}),o=e?r[e.serviceSizingPolicyId]:void 0,s=n.find(e=>e.serviceId===a.serviceId),c=xx(e?{id:e.id,instanceClass:e.instanceClass,containerMemoryLimitMb:e.containerMemoryLimitMb,serviceSizingPolicyId:e.serviceSizingPolicyId}:void 0,o,s);i.push({segmentState:Nse(o,c)})}return i},[e,t,n,r])}function Fse(){let e=B(L.services.selectTableAsList),t=B(e=>uf(e)),n=B(L.manualScaleRecommendations.selectTableAsList),r=B(L.serviceSizingPolicies.selectTable),i=(0,V.useMemo)(()=>new Set(t.map(e=>e.id)),[t]);return(0,V.useMemo)(()=>{let t=[];for(let a of e){if(!a.appId||!i.has(a.appId))continue;let e=r[a.serviceSizingPolicyId],o=n.find(e=>e.serviceId===a.id),s=xx({id:a.id,instanceClass:a.instanceClass,containerMemoryLimitMb:a.containerMemoryLimitMb,serviceSizingPolicyId:a.serviceSizingPolicyId},e,o);t.push({segmentState:Mse(e,s)})}return t},[e,i,n,r])}function qS(){let[e,t]=(0,V.useState)(document.hidden);return(0,V.useEffect)(()=>{let e=()=>t(document.hidden);return document.addEventListener(`visibilitychange`,e),()=>{document.removeEventListener(`visibilitychange`,e)}},[]),e===!1}function Ise(e,t){(0,V.useEffect)(()=>()=>{e(t.current)},[e,t])}function Lse(e,t,n,r){let i=(0,V.useRef)(null);(0,V.useEffect)(()=>{if(t){if(i.current!==null&&i.current!==n){e(r);let t=setTimeout(()=>{e(n)},50);return i.current=n,()=>clearTimeout(t)}e(n)}else e(r);i.current=n},[t,n,r,e])}var JS=({action:e,cancel:t})=>{let n=l(),r=qS(),i=(0,V.useRef)(t);i.current=t,Ise(n,i),Lse(n,r,e,t)};function Rse(e,t){return qu(e)?qu(t)?Rf(e,t):e:t}var YS=e=>{let t=u(Ad({id:e,page:1,...bd})),n=Rse(B(t=>gd(t,{appId:e})),B(t=>pd(t,{appId:e}
5))),r=c(mv({id:n.codeScanResultId}));return{op:n,gitRef:qu(n)?n.gitRef||`main`:``,codeScan:r,appOps:t}},XS=({appId:e,envId:t})=>{let n=l();u(vd({envId:t}));let r=kd({envId:t}),i=I(r),a=qS();return(0,V.useEffect)(()=>(a?(n(Od()),n(r)):n(Od()),()=>{n(Od())}),[a,e,t]),i},ZS=({appId:e,envId:t})=>{let n=B(t=>fd(t,{appId:e})),r=B(t=>dd(t,{appId:e})),i=B(t=>Kp(t,{appId:e})),a=B(e=>gp(e,{envId:t})),o=(0,V.useMemo)(()=>{let e=[...a.map(e=>e.id)];return Vp(i)&&e.push(i.id),e},[a,i]),s=B(e=>Zu(e,{resourceIds:o}));return{ops:(0,V.useMemo)(()=>[r,n,...s].filter(e=>qu(e)),[r,n,s])}};function QS(e){let t=Object.keys(e).reduce((e,t)=>(e[t]=void 0,e),{}),[n,r]=(0,V.useState)(t);return[n,t=>{let n={},i=!0;return Object.keys(e).forEach(r=>{let a=e[r],o=a(t);o&&(i=!1,n[r]=o)}),r(n),i}]}var $S=mr.get(`/users/:userId/ssh_keys`,mr.cache()),eC=mr.post(`/users/:userId/ssh_keys`,function*(e,t){let n={name:e.payload.name,ssh_public_key:e.payload.key};e.elevated=!0,e.request=e.req({body:JSON.stringify(n)}),yield*t()}),tC=mr.delete(`/ssh_keys/:id`,function*(e,t){e.elevated=!0,yield*t()});function zse(e){let t=N(),n=B(qo),r=c($S({userId:n.id})),i=(0,V.useRef)(r);(0,V.useEffect)(()=>{let n=!r.isLoading&&r.isSuccess;if(i.current.isLoading&&n){if(!r.data)return;r.data._embedded.ssh_keys.length===0&&t(e,{replace:!0})}i.current=r},[r.isSuccess,r.isLoading])}var Bse=e=>{let t=[],n=new Set;return e.forEach(e=>{n.has(e.key)?t.push({item:e,message:`${e.key} found multiple times, must be unique`}):n.add(e.key),/[a-zA-Z_]+[a-zA-Z0-9_]*/.test(e.key)||t.push({item:e,message:`${e.key} does not match regex: /[a-zA-Z_]+[a-zA-Z0-9_]*/`})}),t};function nC(e){let[t,n]=(0,V.useState)([]),[r,i]=(0,V.useState)(e),a=ng(r);return{envs:r,envList:a,errors:t,setEnvs:i,validate:()=>{let e=Bse(a);return e.length>0?(n(e),!1):(n([]),!0)}}}var Vse=25;function Hse(e,t,n){if(e.length<=t)return{totalPages:1,paginatedData:e};let r=n*t,i=r-t;return{totalPages:Math.ceil(e.length/t),paginatedData:e.slice(i,r)}}var Use=(e=Vse)=>{let[t,n]=Ee(),r=t.get(`page`),i=t.get(`rows`),a=r?Number.parseInt(r,10):1,o=i?Number.parseInt(i,10):e;return{setPage:(0,V.useCallback)(e=>{e!==0&&n(t=>{let n=new URLSearchParams(t);return n.set(`page`,e.toString()),n},{replace:!0})},[n]),page:a,resetPageParam:(0,V.useCallback)(()=>{n(e=>{let t=new URLSearchParams(e);return t.set(`page`,`1`),t},{replace:!0})},[n]),setItemsPerPage:(0,V.useCallback)(e=>{n(t=>{let n=new URLSearchParams(t);return n.set(`rows`,e.toString()),n},{replace:!0})},[n]),itemsPerPage:o}};function rC(e,t){let{page:n,setPage:r,itemsPerPage:i,setItemsPerPage:a}=Use(t),o=e.length<=i?1:Math.ceil(e.length/i),s=e.length>0?Math.min(Math.max(1,n),o):n,{paginatedData:c}=Hse(e,i,s),l=e.length;return(0,V.useEffect)(()=>{e.length>0&&s!==n&&r(s)},[s,n,r,e.length]),{page:s,setPage:r,totalPages:o,totalItems:l,data:c,itemsPerPage:i,setItemsPerPage:a,isLoading:!1,prev:()=>{s!==1&&r(s-1)},next:()=>{s!==o&&r(s+1)}}}var Wse=e=>{let t=new Date().toISOString();return{id:``,email:``,created_at:t,updated_at:t,organization_name:``,inviter_name:``,role_name:``,verification_code_expires_at:``,_links:{organization:mn()},...e}};function iC(e){return{id:e.id,email:e.email,createdAt:e.created_at,updatedAt:e.updated_at,organizationId:R(e._links.organization),organizationName:e.organization_name,inviterName:e.inviter_name,roleName:e.role_name,expired:Lf(new Date(e.verification_code_expires_at),new Date)}}var aC=L.invitations.selectById,oC=D(L.invitations.selectTableAsList,(e,t)=>t.orgId,(e,t)=>e.filter(e=>e.organizationId===t)),sC=mr.get(`/organizations/:orgId/invitations`,function*(e,t){if(!(yield*p(kn))||(yield*t(),!e.json.ok))return;let{value:n}=e.json,r=n._embedded.invitations.reduce((e,t)=>(e[t.id]=iC(t),e),{});yield*L.update(L.invitations.set(r))}),cC=mr.get(`/invitations/:id`,function*(e,t){if(yield*t(),!e.json.ok){e.response?.status===404&&(e.loader={message:`We could not find this invitation. So either it never existed or was later revoked.`});return}let{value:n}=e.json;yield*L.update(L.invitations.add({[n.id]:iC(n)}))}),lC=mr.post(`/resets`,function*(e,t){let n=yield*p(on);e.request=e.req({body:JSON.stringify({type:`invitation`,origin:n,invitation_id:e.payload.invitationId})}),yield*t(),e.json.ok&&(e.loader={message:`Resent invitation to user`})}
5),uC=mr.delete(`/invitations/:id`,function*(e,t){yield*t(),e.json.ok&&(e.loader={message:`Revoked invitation`})}),dC=mr.post(`/roles/:roleId/invitations`,function*(e,t){let n=yield*p(an);e.request=e.req({body:JSON.stringify({email:e.payload.email,origin:n.origin})}),yield*t(),e.json.ok&&(e.loader={message:`Invitation sent to ${e.payload.email}`})}),Gse=r({createInvitation:()=>dC,defaultInvitationResponse:()=>Wse,deserializeInvitation:()=>iC,fetchInvitation:()=>cC,fetchInvitations:()=>sC,resetInvitation:()=>lC,revokeInvitation:()=>uC,selectInvitationById:()=>aC,selectInvitationsByOrgId:()=>oC});function fC(e){let t=``,n=``;if(e.includes(`/claim/`)){let r=e.replace(`/claim/`,``);[t,n]=r.split(`/`)}return u(cC({id:t})),{invitation:B(e=>aC(e,{id:t})),inviteId:t,code:n}}function Kse(e,t=!1){let[n,r]=(0,V.useState)(1);return pC(jv({page:n,id:e,withDeleted:t}),n,r)}function qse(e,t){let[n,r]=(0,V.useState)(1);return pC(Pv({id:e,onlyOrphaned:t,page:n}),n,r)}function pC(e,t,n){let r=c(e),i=r.data?._embedded.backups||[],a=B(e=>vv(e,{ids:i})),o=r.data?.per_page||40,s=r.data?.total_count||0,l=Math.ceil(s/o);return{isLoading:r.isLoading,page:t,setPage:n,totalItems:s,totalPages:l,itemsPerPage:o,data:a,setItemsPerPage:()=>{},prev:()=>{t!==1&&n(t-1)},next:()=>{t!==l&&n(t+1)}}}function mC(e){let t=c(e_({roleId:e})),n={trigger:t.trigger,userIds:[]};if(!t.data||typeof t.data==`string`)return n;let r=t.data?._embedded?.users||[];return{trigger:t.trigger,userIds:r.map(e=>`${e.id}`)}}function Jse(){let[e,t]=Ee(),n=e.get(`resource_type`)||``,r=e.get(`operation_type`)||``,i=e.get(`operation_status`)||``,a=e.get(`start_date`)||``,o=e.get(`end_date`)||``;return n===`all`&&(n=``),r===`all`&&(r=``),i===`all`&&(i=``),a===`all`&&(a=``),o===`all`&&(o=``),{resourceType:n,operationType:r,operationStatus:i,startDate:a,endDate:o}}function Yse(e){let[t,n]=(0,V.useState)(1);return Xse(wd({id:e,page:t,...Jse()}),t,n)}function Xse(e,t,n){let r=c(e),i=r.data?._embedded.operations||[],a=B(e=>V_(e,{ids:i})),o=r.data?.per_page||40,s=r.data?.total_count||0,l=Math.ceil(s/o);return{isLoading:r.isLoading,page:t,setPage:n,totalItems:s,totalPages:l,itemsPerPage:o,data:a,setItemsPerPage:()=>{},prev:()=>{t!==1&&n(t-1)},next:()=>{t!==l&&n(t+1)}}}function Zse(e,t){switch(t.type){case`set`:return t.payload;case`diskSize`:return{...e,diskSize:t.payload};case`iops`:return{...e,iops:t.payload};case`containerSize`:return{...e,containerSize:t.payload};case`containerProfile`:{let n=Su(t.payload),r=Math.max(e.containerSize,n.minimumContainerSize);return{...e,containerProfile:t.payload,containerSize:r}}default:return e}}function hC(e,t){return{diskSize:t.size,iops:t.provisionedIops,containerSize:e.containerMemoryLimitMb,containerProfile:e.instanceClass}}function gC({service:e,disk:t}){let n=B(L.costRates.select),r=hC(e,t),[i,a]=(0,V.useReducer)(Zse,r);(0,V.useEffect)(()=>{a({type:`set`,payload:r})},[t.size,t.provisionedIops,e.containerMemoryLimitMb,e.instanceClass]);let o=e.containerMemoryLimitMb!==i.containerSize||e.instanceClass!==i.containerProfile||t.size!==i.diskSize||t.provisionedIops!==i.iops,s=Su(e.instanceClass),c=Su(i.containerProfile);return{scaler:i,dispatchScaler:a,changesExist:o,currentPricePerGBHour:ip(n,e.instanceClass),requestedPricePerGBHour:ip(n,i.containerProfile),requestedContainerProfile:c,currentContainerProfile:s}}function _C(e=`search`,t=300,n){let[r,i]=Ee(),a=r.get(e)||``,[o,s]=(0,V.useState)(r.get(e)||``),c=(0,V.useRef)(r.get(e)||``);return(0,V.useEffect)(()=>{a!==c.current&&(c.current=a,s(a))},[a]),(0,V.useEffect)(()=>{let r=setTimeout(()=>{i(t=>{let r=new URLSearchParams(t),i=r.get(e),a=o||``;return(i||``)===a?r:(a?(r.delete(`page`),n&&i&&Ys(n,a),r.set(e,a)):(r.delete(e),i&&r.delete(`page`)),c.current=a,r)},{replace:!0})},t);return()=>clearTimeout(r)},[o,e,t,i,n]),{search:o,onChange:e=>{s(e.currentTarget.value)}}}function vC(e,t){let n=(0,V.useRef)(e);(0,V.useEffect)(()=>{n.current=e},[e]),(0,V.useEffect)(()=>{if(!t&&t!==0)return;let e=setInterval(()=>n.current(),t);return()=>clearInterval(e)},[t])}var Qse=new Set([`queued`,`running`]);function yC(e){let t=l(),n=qS(),r=(0,V.useMemo)(()=>e.filter(Boolean),[e]),i=B(e=>r.map(t=>sd(e,{id:t}))).filter(e=>Qse.has(e.status)).map(e=>
5e.id).filter(Boolean),a=i.length>0,o=(0,V.useCallback)(()=>{r.length!==0&&r.forEach(e=>{t(Ed({id:e,page:1,resourceType:`ExternalAwsAccount`,operationType:`sync`,operationStatus:``,startDate:``,endDate:``}))})},[t,r]);return(0,V.useEffect)(()=>{n&&o()},[n,o]),vC(()=>{n&&o()},n&&r.length>0?a?1e3:1e4:null),vC(()=>{n&&i.length!==0&&i.forEach(e=>{t(Gd({id:e}))})},n&&i.length>0?1e3:null),{hasActiveSync:a,isTabActive:n}}var $se=e=>({value:e.value,title:e.title,readOnly:e.read_only}),bC=`freezer-activities-pagination`,xC=`freezer-filter-types`,SC=`freezer-filter-statuses`,CC=`freezer-filter-target-types`,wC=`freezer-filter-actors`,TC=`freezer-filter-accounts`,EC=()=>({page:1,totalPages:1,totalCount:0,perPage:40}),ece=D(e=>L.cache.selectById(e,{id:bC}),e=>e||EC()),tce=(e={})=>{let t=new Date().toISOString();return{id:``,activityType:``,title:``,occurredAt:t,primaryResourceType:``,primaryResourceId:``,status:`succeeded`,targetResources:[],organizationId:``,client:``,description:{},ipAddress:``,userEmail:``,userName:``,accountId:``,externalId:``,tokenId:``,userId:``,sourceSystem:``,summary:``,createdAt:t,updatedAt:t,...e}},DC=e=>({id:`${e.id}`,activityType:e.activity_type,title:e.title||``,occurredAt:e.occurred_at,primaryResourceType:e.primary_resource_type,primaryResourceId:`${e.primary_resource_id}`,status:e.status,targetResources:e.target_resources||[],organizationId:e.organization_id,client:e.client||``,description:e.description||{},ipAddress:e.ip_address||``,userEmail:e.user_email||``,userName:e.user_name||``,accountId:e.account_id?`${e.account_id}`:``,externalId:e.external_id||``,tokenId:e.token_id||``,userId:e.user_id||``,sourceSystem:e.source_system||``,summary:e.summary||``,createdAt:e.created_at,updatedAt:e.updated_at}),nce=e=>({value:e.value?`${e.value}`:``,title:e.title}),OC=`freezer-activities`,kC=qn.create(`clear-freezer-activities`,function*(e,t){yield*L.update(L.cache.remove([OC,bC])),yield*t()}),rce=D(e=>L.cache.selectById(e,{id:OC}),e=>e||[]),ice=10*sr,AC=dn(`cancel-freezer-activities-poll`);function ace(e){let t=new URLSearchParams;e.organizationId&&t.set(`organization_id`,e.organizationId),e.occurredAfter&&t.set(`occurred_after`,e.occurredAfter),e.occurredBefore&&t.set(`occurred_before`,e.occurredBefore),e.page&&t.set(`page`,e.page.toString()),e.perPage&&t.set(`per_page`,e.perPage.toString()),e.types?.length&&t.set(`types`,e.types.join(`,`)),e.statuses?.length&&t.set(`statuses`,e.statuses.join(`,`)),e.actors?.length&&t.set(`actors`,e.actors.join(`,`)),e.envs?.length&&t.set(`envs`,e.envs.join(`,`)),e.targetTypes?.length&&t.set(`target_types`,e.targetTypes.join(`,`)),e.resourceType&&t.set(`resource_type`,e.resourceType),e.resourceId&&t.set(`resource_id`,e.resourceId),e.q&&t.set(`q`,e.q),e.readOnly&&t.set(`read_only`,`true`);let n=t.toString();return n?`?${n}`:``}function jC(e,t){if(!e)return EC();let n=Number.parseInt(e.headers.get(`X-Total-Count`)||`0`,10);return{page:t,totalPages:Number.parseInt(e.headers.get(`X-Total-Pages`)||`1`,10),totalCount:n,perPage:40}}var MC=_r.get([`/activities`,`poll`],{supervisor:o(ice,`${AC}`)},function*(e,t){let n=e.payload||{},r=ace(n),i=e.req().url;if(e.request=e.req({url:`${i}${r}`}),yield*t(),!e.json.ok)return;let{activities:a}=e.json.value,o=a.map(DC),s=jC(e.response,n.page||1);yield*L.update(L.cache.add({[OC]:o,[bC]:s}))}),NC=`freezer-activity-by-id`,PC=D((e,t)=>L.cache.selectById(e,{id:`${NC}-${t.id}`}),e=>e||tce()),FC=_r.get(`/activities/:id`,function*(e,t){if(yield*t(),!e.json.ok)return;let n=e.json.value,r=DC(n);yield*L.update(L.cache.add({[`${NC}-${e.payload.id}`]:r}))}),IC=dn(`cancel-activity-by-id-poll`),oce=_r.get([`/activities/:id`,`poll`],{supervisor:o(5e3,`${IC}`)},function*(e,t){if(yield*t(),!e.json.ok)return;let n=e.json.value,r=DC(n),i=`${NC}-${e.payload.id}`,a=yield*p(e=>L.cache.selectById(e,{id:i}));(a?.status!==r.status||!!a?.description?.cancelled!=!!r.description?.cancelled)&&(yield*L.update(L.cache.add({[i]:r})))}),sce=_r.get(`/activity_types?per_page=5000`,function*(e,t){if(yield*t(),!e.json.ok)return;let{results:n}=e.json.value,r=n.map($se);yield*L.update(L.cache.add({[xC]:r}))}),cce=_r.get(`/activity_statuses?per_page=5000`,function*(e,t){if(yield*t(),!e.json.ok)return;let{results:n}=e.json.value;yield*L.update(L.cache.add({[SC]:n}))});_r.get(`/activity_target_types?per_page=5000`,function*(e,t){if(yield*t(),!e.json.ok)return;let{results:n}=e.json.value;yield*L.update(L.cache.add({[CC]:n}))});var lce=_r.get(`/activity_actors?per_page=5000`,function*(e,t){if(yield*t(),!e.json.ok)return;let{results:n}=e.json.value;yield*L.update(L.cache.add({[wC]:n}))}),uce=_r.get(`/activity_accounts?per_page=5000`,function*(e,t){if(yield*t(),!e.json.ok)return;let{results:n}=e.json.value,r=n.map(nce);yield*L.update(L.cache.add({[TC]:r}))}),LC=e=>{let t=new Set;return e.filter(e=>!t.has(e.title)&&(t.add(e.title),!0)).map(e=>({value:e.value,label:e.title,readOnly:e.readOnly})).sort((e,t)=>
5e.label.localeCompare(t.label))},dce=D(e=>L.cache.selectById(e,{id:xC}),e=>LC(e||[])),fce=D(e=>L.cache.selectById(e,{id:SC}),e=>LC(e||[]));D(e=>L.cache.selectById(e,{id:CC}),e=>LC(e||[]));var pce=D(e=>L.cache.selectById(e,{id:wC}),e=>LC(e||[]));D(e=>L.cache.selectById(e,{id:TC}),e=>LC(e||[]));var RC=D(e=>L.cache.selectById(e,{id:TC}),L.environments.selectTable,(e,t)=>{let n=e||[],r=Object.keys(t).length>0;return n.map(e=>{let n=t[e.value];return{...e,deleted:n?!n.activated:r}})}),zC=e=>ul(e.replace(/\./g,` `)),mce=e=>/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[1-5a-fA-F0-9]{3}-[89abAB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$/.test(e),hce=e=>(e.activityType.endsWith(`.deprovision`)||e.activityType.endsWith(`.destroy`))&&e.status===`succeeded`||[`operation.logs`,`llmkey.create`,`llmkey.revoke`].includes(e.activityType)||e.sourceSystem===`auth-api`||e.externalId&&mce(e.externalId)?null:e.externalId&&/^[+-]?\d+$/.test(e.externalId)?e.externalId:null,BC=(e,t)=>e.find(e=>e.type.toLowerCase()===t.toLowerCase())||null,VC=(e,t)=>BC(e,t)?.id||null,gce=({resourceId:e,resourceType:t,accountId:n,appId:r,dbId:i})=>{switch(t){case`user`:case`invitation`:case`invite`:case`u2fdevice`:return ii();case`operation`:return po(e);case`app`:return Qi(e);case`database`:return ga(e);case`account`:case`environment`:return Na(e);case`role`:return _i(e);case`stack`:return Co(e);case`endpoint`:case`vhost`:return Ta(e);case`llmkey`:return qi(e);case`certificate`:return Oo(e);case`source`:return Ro(e);case`orgsetting`:case`contact`:return si();case`plan`:return Di();case`externalawsaccount`:return $r(e);case`externalawsresource`:return bo(e);case`invoice`:return Ai();case`image`:return r?Qi(r):null;case`service`:return r?ta(r,e):null;case`backup`:return i?ya(i):null;case`metricdrain`:case`logdrain`:return n?Ia(n):null;case`databasecredential`:return i?Sa(i):null;default:return null}},_ce=e=>{let t=e.primaryResourceType.toLowerCase().replace(/_/g,``),n=e.primaryResourceId,r=VC(e.targetResources,`app`),i=VC(e.targetResources,`database`);return gce({resourceId:n,resourceType:t,accountId:e.accountId,appId:r,dbId:i})};function*HC({resourceType:e,resourceId:t,withDeleted:n=!1}){switch(e.toLowerCase().replace(/_/g,``)){case`database`:return yield*Te(()=>bp.run(bp({id:t,withDeleted:n})));case`app`:return yield*Te(()=>_f.run(_f({id:t,withDeleted:n})));case`account`:case`environment`:return yield*Te(()=>du.run(du({id:t})));case`operation`:return yield*Te(()=>Gd.run(Gd({id:t})));case`endpoint`:case`vhost`:return yield*Te(()=>am.run(am({id:t,withDeleted:n})));case`service`:return yield*Te(()=>Lu.run(Lu({id:t,withDeleted:n})));case`metricdrain`:return yield*Te(()=>Dh.run(Dh({id:t,withDeleted:n})));case`logdrain`:return yield*Te(()=>ih.run(ih({id:t,withDeleted:n})));default:return console.warn(`fetchResourceByType: unsupported resource type "${e}"`),null}}qn.create(`fetch-resource-by-type`,function*(e,t){yield*HC({resourceType:e.payload.resourceType,resourceId:e.payload.resourceId,withDeleted:e.payload.withDeleted||!1}),yield*t()});var UC=dn(`cancel-resource-by-type-poll`),WC=(e={})=>{let t=new Date().toISOString();return{id:``,organizationId:``,accountIds:null,userId:``,exportParameters:{},filters:{},status:`queued`,message:``,maxActivityId:0,activityCountTotal:0,activityCountCurrent:0,sizeBytes:0,expiresAfter:``,startedAt:``,finishedAt:``,createdAt:t,updatedAt:t,createdBy:``,location:``,progress:{total:0,exported:0},...e}},GC=e=>({id:`${e.id}`,organizationId:e.organization_id,accountIds:e.account_ids,userId:e.user_id,exportParameters:e.export_parameters||{},filters:e.filters||{},status:e.status,message:e.message||``,maxActivityId:e.max_activity_id,activityCountTotal:e.activity_count_total||0,activityCountCurrent:e.activity_count_current||0,sizeBytes:e.size_bytes||0,expiresAfter:e.expires_after||``,startedAt:e.started_at||``,finishedAt:e.finished_at||``,createdAt:e.created_at,updatedAt:e.updated_at,createdBy:e.created_by,location:e.location||``,progress:e.progress||{total:0,exported:0}}),KC=`freezer-activity-export`,qC=`freezer-activity-export-current`,JC=`freezer-activity-exports`,YC=`freezer-activity-exports-pagination`,vce=D((e,t)=>L.cache.selectById(e,{id:`${KC}-${t.id}`}),e=>e||WC()),yce=D(e=>L.cache.selectById(e,{id:qC}),e=>e||WC());D(e=>L.cache.selectById(e,{id:JC}),e=>e||[]),D(e=>L.cache.selectById(e,{id:YC}),e=>e||EC());var XC=_r.post(`/activity_exports`,function*(e,t){let{organizationId:n,formatType:r,csvHeader:i,occurredAfter:a,occurredBefore:o,types:s,statuses:c,actors:l,envs:u,q:d,readOnly:f}=e.payload,p={organization_id:n,format_type:r,occurred_after:a,occurred_before:o};if(i!==void 0&&(p.csv_header=i),s?.length&&(p.types=s.join(`,`)),c?.length&&(p.statuses=c.join(`,`)),l?.length&&(p.actors=l.join(`,`)),u?.length&&(p.envs=u.join(`,`)),d&&(p.q=d),f&&(p.read_only=!0),e.request=e.req({body:JSON.stringify(p)}),yield*t(),!e.json.ok)return;let m=e.json.value,h=GC(m);yield*L.update(L.cache.add({[`${KC}-${h.id}`]:h,[qC]:h}))}),bce=_r.get(`/activity_exports/:id`,function*(e,t){if(yield*t(),!e.json.ok)return;let n=e.json.value,r=GC(n);yield*L.update(L.cache.add({[`${KC}-${r.id}`]:r}))});_r.get(`/activity_exports`,function*(e,t){let{organizationId:n}
5=e.payload,r=new URLSearchParams;r.set(`organization_id`,n);let i=e.req().url;if(e.request=e.req({url:`${i}?${r.toString()}`}),yield*t(),!e.json.ok)return;let{activity_exports:a}=e.json.value,o=a.map(GC),s=jC(e.response,1);yield*L.update(L.cache.add({[JC]:o,[YC]:s}))});var ZC=`freezer-activity-export-download-url`,xce=D(e=>L.cache.selectById(e,{id:ZC}),e=>e||``),QC=_r.get(`/activity_exports/:id/file`,function*(e,t){if(yield*t(),!e.json.ok)return;let{url:n}=e.json.value;yield*L.update(L.cache.add({[ZC]:n}))}),Sce=qn.create(`poll-resource-by-type`,{supervisor:o(3*sr,`${UC}`)},function*(e,t){yield*HC({resourceType:e.payload.resourceType,resourceId:e.payload.resourceId,withDeleted:e.payload.withDeleted||!1}),yield*t()});function $C(e,t){return e-t*Math.floor(e/t)}var Cce=1721426;function ew(e,t,n,r){t=nw(e,t);let i=t-1,a=-2;return n<=2?a=0:tw(t)&&(a=-1),1721425+365*i+Math.floor(i/4)-Math.floor(i/100)+Math.floor(i/400)+Math.floor((367*n-362)/12+a+r)}function tw(e){return e%4==0&&(e%100!=0||e%400==0)}function nw(e,t){return e===`BC`?1-t:t}function rw(e){let t=`AD`;return e<=0&&(t=`BC`,e=1-e),[t,e]}var wce={standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]},iw=class{fromJulianDay(e){let t=e,n=t-Cce,r=Math.floor(n/146097),i=$C(n,146097),a=Math.floor(i/36524),o=$C(i,36524),s=Math.floor(o/1461),c=$C(o,1461),l=Math.floor(c/365),[u,d]=rw(r*400+a*100+s*4+l+ +(a!==4&&l!==4)),f=t-ew(u,d,1,1),p=2;t<ew(u,d,3,1)?p=0:tw(d)&&(p=1);let m=Math.floor(((f+p)*12+373)/367);return new mT(u,d,m,t-ew(u,d,m,1)+1)}toJulianDay(e){return ew(e.era,e.year,e.month,e.day)}getDaysInMonth(e){return wce[tw(e.year)?`leapyear`:`standard`][e.month-1]}getMonthsInYear(e){return 12}getDaysInYear(e){return tw(e.year)?366:365}getYearsInEra(e){return 9999}getEras(){return[`BC`,`AD`]}isInverseEra(e){return e.era===`BC`}balanceDate(e){e.year<=0&&(e.era=e.era===`BC`?`AD`:`BC`,e.year=1-e.year)}constructor(){this.identifier=`gregory`}},Tce={"001":1,AD:1,AE:6,AF:6,AI:1,AL:1,AM:1,AN:1,AR:1,AT:1,AU:1,AX:1,AZ:1,BA:1,BE:1,BG:1,BH:6,BM:1,BN:1,BY:1,CH:1,CL:1,CM:1,CN:1,CR:1,CY:1,CZ:1,DE:1,DJ:6,DK:1,DZ:6,EC:1,EE:1,EG:6,ES:1,FI:1,FJ:1,FO:1,FR:1,GB:1,GE:1,GF:1,GP:1,GR:1,HR:1,HU:1,IE:1,IQ:6,IR:6,IS:1,IT:1,JO:6,KG:1,KW:6,KZ:1,LB:1,LI:1,LK:1,LT:1,LU:1,LV:1,LY:6,MC:1,MD:1,ME:1,MK:1,MN:1,MQ:1,MV:5,MY:1,NL:1,NO:1,NZ:1,OM:6,PL:1,QA:6,RE:1,RO:1,RS:1,RU:1,SD:6,SE:1,SI:1,SK:1,SM:1,SY:6,TJ:1,TM:1,TR:1,UA:1,UY:1,UZ:1,VA:1,VN:1,XK:1};function aw(e,t){return t=Lw(t,e.calendar),e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function Ece(e,t){return t=Lw(t,e.calendar),e=_w(e),t=_w(t),e.era===t.era&&e.year===t.year&&e.month===t.month}function ow(e,t){return sw(e.calendar,t.calendar)&&aw(e,t)}function sw(e,t){return e.isEqual?.call(e,t)??t.isEqual?.call(t,e)??e.identifier===t.identifier}function cw(e,t){return aw(e,dw(t))}var Dce={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};function lw(e,t,n){let r=e.calendar.toJulianDay(e),i=n?Dce[n]:Nce(t),a=Math.ceil(r+1-i)%7;return a<0&&(a+=7),a}function uw(e){return Nw(Date.now(),e)}function dw(e){return Pw(uw(e))}function fw(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function pw(e,t){return mw(e)-mw(t)}function mw(e){return e.hour*36e5+e.minute*6e4+e.second*1e3+e.millisecond}var hw=null;function gw(){return hw??=new Intl.DateTimeFormat().resolvedOptions().timeZone,hw}function _w(e){return e.subtract({days:e.day-1})}function vw(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}function Oce(e){return _w(e.subtract({months:e.month-1}))}function kce(e){return e.calendar.getMinimumMonthInYear?e.calendar.getMinimumMonthInYear(e):1}function Ace(e){return e.calendar.getMinimumDayInMonth?e.calendar.getMinimumDayInMonth(e):1}function yw(e,t,n){let r=lw(e,t,n);return e.subtract({days:r})}function jce(e,t,n){return yw(e,t,n).add({days:6})}var bw=new Map,xw=new Map;function Mce(e){if(Intl.Locale){let t=bw.get(e);return t||(t=new Intl.Locale(e).maximize().region,t&&bw.set(e,t)),t}let t=e.split(`-`)[1];return t===`u`?void 0:t}function Nce(e){let t=xw.get(e);if(!t){if(Intl.Locale){let n=new Intl.Locale(e);
vendor: 10,278 bytes, line 5
5if(`getWeekInfo`in n&&(t=n.getWeekInfo(),t))return xw.set(e,t),t.firstDay}let n=Mce(e);if(e.includes(`-fw-`)){let n=e.split(`-fw-`)[1].split(`-`)[0];t=n===`mon`?{firstDay:1}:n===`tue`?{firstDay:2}:n===`wed`?{firstDay:3}:n===`thu`?{firstDay:4}:n===`fri`?{firstDay:5}:n===`sat`?{firstDay:6}:{firstDay:0}}else t=e.includes(`-ca-iso8601`)?{firstDay:1}:{firstDay:n&&Tce[n]||0};xw.set(e,t)}return t.firstDay}function Pce(e,t,n){let r=e.calendar.getDaysInMonth(e);return Math.ceil((lw(_w(e),t,n)+r)/7)}function Sw(e,t){return e&&t?e.compare(t)<=0?e:t:e||t}function Cw(e,t){return e&&t?e.compare(t)>=0?e:t:e||t}function ww(e){return e=Lw(e,new iw),Tw(nw(e.era,e.year),e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function Tw(e,t,n,r,i,a,o){let s=new Date;return s.setUTCHours(r,i,a,o),s.setUTCFullYear(e,t-1,n),s.getTime()}function Ew(e,t){if(t===`UTC`)return 0;if(e>0&&t===gw())return new Date(e).getTimezoneOffset()*-6e4;let{year:n,month:r,day:i,hour:a,minute:o,second:s}=Ow(e,t);return Tw(n,r,i,a,o,s,0)-Math.floor(e/1e3)*1e3}var Dw=new Map;function Ow(e,t){let n=Dw.get(t);n||(n=new Intl.DateTimeFormat(`en-US`,{timeZone:t,hour12:!1,era:`short`,year:`numeric`,month:`numeric`,day:`numeric`,hour:`numeric`,minute:`numeric`,second:`numeric`}),Dw.set(t,n));let r=n.formatToParts(new Date(e)),i={};for(let e of r)e.type!==`literal`&&(i[e.type]=e.value);return{year:i.era===`BC`||i.era===`B`?-i.year+1:+i.year,month:+i.month,day:+i.day,hour:i.hour===`24`?0:+i.hour,minute:+i.minute,second:+i.second}}var kw=864e5;function Fce(e,t){let n=ww(e);return Aw(e,t,n-Ew(n-kw,t),n-Ew(n+kw,t))}function Aw(e,t,n,r){return(n===r?[n]:[n,r]).filter(n=>Ice(e,t,n))}function Ice(e,t,n){let r=Ow(n,t);return e.year===r.year&&e.month===r.month&&e.day===r.day&&e.hour===r.hour&&e.minute===r.minute&&e.second===r.second}function jw(e,t,n=`compatible`){let r=Fw(e);if(t===`UTC`)return ww(r);if(t===gw()&&n===`compatible`){r=Lw(r,new iw);let e=new Date,t=nw(r.era,r.year);return e.setFullYear(t,r.month-1,r.day),e.setHours(r.hour,r.minute,r.second,r.millisecond),e.getTime()}let i=ww(r),a=Ew(i-kw,t),o=Ew(i+kw,t),s=Aw(r,t,i-a,i-o);if(s.length===1)return s[0];if(s.length>1)switch(n){case`compatible`:case`earlier`:return s[0];case`later`:return s[s.length-1];case`reject`:throw RangeError(`Multiple possible absolute times found`)}switch(n){case`earlier`:return Math.min(i-a,i-o);case`compatible`:case`later`:return Math.max(i-a,i-o);case`reject`:throw RangeError(`No such absolute time found`)}}function Mw(e,t,n=`compatible`){return new Date(jw(e,t,n))}function Nw(e,t){let n=Ew(e,t),r=new Date(e+n),i=r.getUTCFullYear(),a=r.getUTCMonth()+1,o=r.getUTCDate(),s=r.getUTCHours(),c=r.getUTCMinutes(),l=r.getUTCSeconds(),u=r.getUTCMilliseconds();return new _T(i<1?`BC`:`AD`,i<1?-i+1:i,a,o,t,n,s,c,l,u)}function Pw(e){return new mT(e.calendar,e.era,e.year,e.month,e.day)}function Fw(e,t){let n=0,r=0,i=0,a=0;if(`timeZone`in e)({hour:n,minute:r,second:i,millisecond:a}=e);else if(`hour`in e&&!t)return e;return t&&({hour:n,minute:r,second:i,millisecond:a}=t),new gT(e.calendar,e.era,e.year,e.month,e.day,n,r,i,a)}function Iw(e){return new hT(e.hour,e.minute,e.second,e.millisecond)}function Lw(e,t){if(sw(e.calendar,t))return e;let n=t.fromJulianDay(e.calendar.toJulianDay(e)),r=e.copy();return r.calendar=t,r.era=n.era,r.year=n.year,r.month=n.month,r.day=n.day,Gw(r),r}function Rw(e,t,n){return e instanceof _T?e.timeZone===t?e:zw(e,t):Nw(jw(e,t,n),t)}function Lce(e){let t=ww(e)-e.offset;return new Date(t)}function zw(e,t){return Lw(Nw(ww(e)-e.offset,t),e.calendar)}var Bw=36e5;function Vw(e,t){let n=e.copy(),r=`hour`in n?Qw(n,t):0;Hw(n,t.years||0),n.calendar.balanceYearMonth&&n.calendar.balanceYearMonth(n,e),n.month+=t.months||0,Uw(n),Ww(n),n.day+=(t.weeks||0)*7,n.day+=t.days||0,n.day+=r,Rce(n),n.calendar.balanceDate&&n.calendar.balanceDate(n),n.year<1&&(n.year=1,n.month=1,n.day=1);let i=n.calendar.getYearsInEra(n);if(n.year>i){var a;let e=(a=n.calendar).isInverseEra?.call(a,n);n.year=i,n.month=e?1:n.calendar.getMonthsInYear(n),n.day=e?1:n.calendar.getDaysInMonth(n)}n.month<1&&(n.month=1,n.day=1);let o=n.calendar.getMonthsInYear(n);return n.month>o&&(n.month=o,n.day=n.calendar.getDaysInMonth(n)),n.day=Math.max(1,Math.min(n.calendar.getDaysInMonth(n),n.day)),n}function Hw(e,t){var n;(n=e.calendar).isInverseEra?.call(n,e)&&(t=-t),e.year+=t}function Uw(e){for(;e.month<1;)Hw(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,Hw(e,1)}function Rce(e){for(;e.day<1;)e.month--,Uw(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,Uw(e)}function Ww(e){e.month=Math.max(1,Math.min(e.calendar.getMonthsInYear(e),e.month)),e.day=Math.max(1,Math.min(e.calendar.getDaysInMonth(e),e.day))}function Gw(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),Ww(e)}function Kw(e){let t={};for(let n in e)typeof e[n]==`number`&&(t[n]=-e[n]);return t}function qw(e,t){return Vw(e,Kw(t))}function Jw(e,t){let n=e.copy();return t.era!=null&&(n.era=t.era),t.year!=null&&(n.year=t.year),t.month!=null&&(n.month=t.month),t.day!=null&&(n.day=t.day),Gw(n),n}function Yw(e,t){let n=e.copy();return t.hour!=null&&(n.hour=t.hour),t.minute!=null&&(n.minute=t.minute),t.second!=null&&(n.second=t.second),t.millisecond!=null&&(n.millisecond=t.millisecond),Xw(n),n}function zce(e){e.second+=Math.floor(e.millisecond/1e3),e.millisecond=Zw(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=Zw(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=Zw(e.minute,60);let t=Math.floor(e.hour/24);return e.hour=Zw(e.hour,24),t}function Xw(e){e.millisecond=Math.max(0,Math.min(e.millisecond,1e3)),e.second=Math.max(0,Math.min(e.second,59)),e.minute=Math.max(0,Math.min(e.minute,59)),e.hour=Math.max(0,Math.min(e.hour,23))}function Zw(e,t){let n=e%t;return n<0&&(n+=t),n}function Qw(e,t){return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,zce(e)}function $w(e,t){let n=e.copy();return Qw(n,t),n}function Bce(e,t){return $w(e,Kw(t))}function eT(e,t,n,r){let i=e.copy();switch(t){case`era`:{let t=e.calendar.getEras(),a=t.indexOf(e.era);if(a<0)throw Error(`Invalid era: `+e.era);a=nT(a,n,0,t.length-1,r?.round),i.era=t[a],Gw(i);break}case`year`:var a;(a=i.calendar).isInverseEra?.call(a,i)&&(n=-n),i.year=nT(e.year,n,-1/0,9999,r?.round),i.year===-1/0&&(i.year=1),i.calendar.balanceYearMonth&&i.calendar.balanceYearMonth(i,e);break;case`month`:i.month=nT(e.month,n,1,e.calendar.getMonthsInYear(e),r?.round);break;case`day`:i.day=nT(e.day,n,1,e.calendar.getDaysInMonth(e),r?.round);break;default:throw Error(`Unsupported field `+t)}return e.calendar.balanceDate&&e.calendar.balanceDate(i),Gw(i),i}function tT(e,t,n,r){let i=e.copy();switch(t){case`hour`:{let t=e.hour,a=0,o=23;if(r?.hourCycle===12){let e=t>=12;a=e?12:0,o=e?23:11}i.hour=nT(t,n,a,o,r?.round);break}case`minute`:i.minute=nT(e.minute,n,0,59,r?.round);break;case`second`:i.second=nT(e.second,n,0,59,r?.round);break;case`millisecond`:i.millisecond=nT(e.millisecond,n,0,999,r?.round);break;default:throw Error(`Unsupported field `+t)}return i}function nT(e,t,n,r,i=!1){if(i){e+=Math.sign(t),e<n&&(e=r);let i=Math.abs(t);e=t>0?Math.ceil(e/i)*i:Math.floor(e/i)*i,e>r&&(e=n)}else e+=t,e<n?e=r-(n-e-1):e>r&&(e=n+(e-r-1));return e}function rT(e,t){let n;return n=t.years!=null&&t.years!==0||t.months!=null&&t.months!==0||t.weeks!=null&&t.weeks!==0||t.days!=null&&t.days!==0?jw(Vw(Fw(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days}),e.timeZone):ww(e)-e.offset,n+=t.milliseconds||0,n+=(t.seconds||0)*1e3,n+=(t.minutes||0)*6e4,n+=(t.hours||0)*36e5,Lw(Nw(n,e.timeZone),e.calendar)}function Vce(e,t){return rT(e,Kw(t))}function Hce(e,t,n,r){switch(t){case`hour`:{let t=0,i=23;if(r?.hourCycle===12){let n=e.hour>=12;t=n?12:0,i=n?23:11}let a=Fw(e),o=Lw(Yw(a,{hour:t}),new iw),s=[jw(o,e.timeZone,`earlier`),jw(o,e.timeZone,`later`)].filter(t=>Nw(t,e.timeZone).day===o.day)[0],c=Lw(Yw(a,{hour:i}),new iw),l=[jw(c,e.timeZone,`earlier`),jw(c,e.timeZone,`later`)].filter(t=>Nw(t,e.timeZone).day===c.day).pop(),u=ww(e)-e.offset,d=Math.floor(u/Bw),f=u%Bw;return u=nT(d,n,Math.floor(s/Bw),Math.floor(l/Bw),r?.round)*Bw+f,Lw(Nw(u,e.timeZone),e.calendar)}case`minute`:case`second`:case`millisecond`:return tT(e,t,n,r);case`era`:case`year`:case`month`:case`day`:return Lw(Nw(jw(eT(Fw(e),t,n,r),e.timeZone),e.timeZone),e.calendar);default:throw Error(`Unsupported field `+t)}}function Uce(e,t,n){let r=Fw(e),i=Yw(Jw(r,t),t);return i.compare(r)===0?e:Lw(Nw(jw(i,e.timeZone,n),e.timeZone),e.calendar)}var Wce=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})$/,Gce=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?$/,Kce=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:([+-]\d{2})(?::?(\d{2}))?(?::?(\d{2}))?)?\[(.*?)\]$/,iT=/^([+-]\d{6}|\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:(?:([+-]\d{2})(?::?(\d{2}))?)|Z)$/;function aT(e){let t=e.match(Wce);if(!t)throw iT.test(e)?Error(`Invalid ISO 8601 date string: ${e}. Use parseAbsolute() instead.`):Error(`Invalid ISO 8601 date string: `+e);let n=new mT(sT(t[1],0,9999),sT(t[2],1,12),1);return n.day=sT(t[3],1,n.calendar.getDaysInMonth(n)),n}function qce(e){let t=e.match(Gce);if(!t)throw iT.test(e)?Error(`Invalid ISO 8601 date time string: ${e}. Use parseAbsolute() instead.`):Error(`Invalid ISO 8601 date time string: `+e);let n=sT(t[1],-9999,9999),r=new gT(n<1?`BC`:`AD`,n<1?-n+1:n,sT(t[2],1,12),1,t[4]?sT(t[4],0,23):0,t[5]?sT(t[5],0,59):0,t[6]?sT(t[6],0,59):0,t[7]?sT(t[7],0,1/0)*1e3:0);return r.day=sT(t[3],0,r.calendar.getDaysInMonth(r)),r}function oT(e,t){let n=e.match(Kce);if(!n)throw Error(`Invalid ISO 8601 date time string: `+e);let r=sT(n[1],-9999,9999),i=new _T(r<1?`BC`:`AD`,r<1?-r+1:r,sT(n[2],1,12),1,n[11],0,n[4]?sT(n[4],0,23):0,n[5]?sT(n[5],0,59):0,n[6]?sT(n[6],0,59):0,n[7]?sT(n[7],0,1/0)*1e3:0);i.day=sT(n[3],0,i.calendar.getDaysInMonth(i));let a=Fw(i),o;if(n[8]){let e=sT(n[8],-23,23);if(i.offset=Math.sign(e)*(Math.abs(e)*36e5+sT(n[9]??`0`,0,59)*6e4+sT(n[10]??`0`,0,59)*1e3),o=ww(i)-i.offset,!Fce(a,i.timeZone).includes(o))throw Error(`Offset ${dT(i.offset)}
5 is invalid for ${uT(i)} in ${i.timeZone}`)}else o=jw(Fw(a),i.timeZone,t);return Nw(o,i.timeZone)}function Jce(e,t){let n=e.match(iT);if(!n)throw Error(`Invalid ISO 8601 date time string: `+e);let r=sT(n[1],-9999,9999),i=new _T(r<1?`BC`:`AD`,r<1?-r+1:r,sT(n[2],1,12),1,t,0,n[4]?sT(n[4],0,23):0,n[5]?sT(n[5],0,59):0,n[6]?sT(n[6],0,59):0,n[7]?sT(n[7],0,1/0)*1e3:0);return i.day=sT(n[3],0,i.calendar.getDaysInMonth(i)),n[8]&&(i.offset=sT(n[8],-23,23)*36e5+sT(n[9]??`0`,0,59)*6e4),zw(i,t)}function sT(e,t,n){let r=Number(e);if(r<t||r>n)throw RangeError(`Value out of range: ${t} <= ${r} <= ${n}`);return r}function cT(e){return`${String(e.hour).padStart(2,`0`)}:${String(e.minute).padStart(2,`0`)}:${String(e.second).padStart(2,`0`)}${e.millisecond?String(e.millisecond/1e3).slice(1):``}`}function lT(e){let t=Lw(e,new iw),n;return n=t.era===`BC`?t.year===1?`0000`:`-`+String(Math.abs(1-t.year)).padStart(6,`00`):String(t.year).padStart(4,`0`),`${n}-${String(t.month).padStart(2,`0`)}-${String(t.day).padStart(2,`0`)}`}function uT(e){return`${lT(e)}T${cT(e)}`}function dT(e){let t=Math.sign(e)<0?`-`:`+`;e=Math.abs(e);let n=Math.floor(e/36e5),r=Math.floor(e%36e5/6e4),i=Math.floor(e%36e5%6e4/1e3),a=`${t}${String(n).padStart(2,`0`)}:${String(r).padStart(2,`0`)}`;return i!==0&&(a+=`:${String(i).padStart(2,`0`)}`),a}function Yce(e){return`${uT(e)}${dT(e.offset)}[${e.timeZone}]`}function Xce(e,t){if(t.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function fT(e,t,n){Xce(e,t),t.set(e,n)}function pT(e){let t=typeof e[0]==`object`?e.shift():new iw,n;if(typeof e[0]==`string`)n=e.shift();else{let e=t.getEras();n=e[e.length-1]}let r=e.shift(),i=e.shift(),a=e.shift();return[t,n,r,i,a]}var Zce=new WeakMap,mT=class e{copy(){return this.era?new e(this.calendar,this.era,this.year,this.month,this.day):new e(this.calendar,this.year,this.month,this.day)}add(e){return Vw(this,e)}subtract(e){return qw(this,e)}set(e){return Jw(this,e)}cycle(e,t,n){return eT(this,e,t,n)}toDate(e){return Mw(this,e)}toString(){return lT(this)}compare(e){return fw(this,e)}constructor(...e){fT(this,Zce,{writable:!0,value:void 0});let[t,n,r,i,a]=pT(e);this.calendar=t,this.era=n,this.year=r,this.month=i,this.day=a,Gw(this)}},Qce=new WeakMap,hT=class e{copy(){return new e(this.hour,this.minute,this.second,this.millisecond)}add(e){return $w(this,e)}subtract(e){return Bce(this,e)}set(e){return Yw(this,e)}cycle(e,t,n){return tT(this,e,t,n)}toString(){return cT(this)}compare(e){return pw(this,e)}constructor(e=0,t=0,n=0,r=0){fT(this,Qce,{writable:!0,value:void 0}),this.hour=e,this.minute=t,this.second=n,this.millisecond=r,Xw(this)}},$ce=new WeakMap,gT=class e{copy(){return this.era?new e(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new e(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(e){return Vw(this,e)}subtract(e){return qw(this,e)}set(e){return Jw(Yw(this,e),e)}cycle(e,t,n){switch(e){case`era`:case`year`:case`month`:case`day`:return eT(this,e,t,n);default:return tT(this,e,t,n)}}toDate(e,t){return Mw(this,e,t)}toString(){return uT(this)}compare(e){let t=fw(this,e);return t===0?pw(this,Fw(e)):t}constructor(...e){fT(this,$ce,{writable:!0,value:void 0});let[t,n,r,i,a]=pT(e);this.calendar=t,this.era=n,this.year=r,this.month=i,this.day=a,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,Gw(this)}},ele=new WeakMap,_T=class e{copy(){return this.era?new e(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new e(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(e){return rT(this,e)}subtract(e){return Vce(this,e)}set(e,t){return Uce(this,e,t)}cycle(e,t,n){return Hce(this,e,t,n)}toDate(){return Lce(this)}toString(){return Yce(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(e){return this.toDate().getTime()-Rw(e,this.timeZone).toDate().getTime()}constructor(...e){fT(this,ele,{writable:!0,value:void 0});let[t,n,r,i,a]=pT(e),o=e.shift(),s=e.shift();this.calendar=t,this.era=n,this.year=r,this.month=i,this.day=a,this.timeZone=o,this.offset=s,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,Gw(this)}},vT=[[1868,9,8],[1912,7,30],[1926,12,25],[1989,1,8],[2019,5,1]],tle=[[1912,7,29],[1926,12,24],[1989,1,7],[2019,4,30]],yT=[
vendor: 10,953 bytes, line 5
51867,1911,1925,1988,2018],bT=[`meiji`,`taisho`,`showa`,`heisei`,`reiwa`];function xT(e){let t=vT.findIndex(([t,n,r])=>e.year<t||e.year===t&&e.month<n||e.year===t&&e.month===n&&e.day<r);return t===-1?vT.length-1:t===0?0:t-1}function ST(e){let t=yT[bT.indexOf(e.era)];if(!t)throw Error(`Unknown era: `+e.era);return new mT(e.year+t,e.month,e.day)}var nle=class extends iw{fromJulianDay(e){let t=super.fromJulianDay(e),n=xT(t);return new mT(this,bT[n],t.year-yT[n],t.month,t.day)}toJulianDay(e){return super.toJulianDay(ST(e))}balanceDate(e){let t=ST(e),n=xT(t);bT[n]!==e.era&&(e.era=bT[n],e.year=t.year-yT[n]),this.constrainDate(e)}constrainDate(e){let t=bT.indexOf(e.era),n=tle[t];if(n!=null){let[r,i,a]=n,o=r-yT[t];e.year=Math.max(1,Math.min(o,e.year)),e.year===o&&(e.month=Math.min(i,e.month),e.month===i&&(e.day=Math.min(a,e.day)))}if(e.year===1&&t>=0){let[,n,r]=vT[t];e.month=Math.max(n,e.month),e.month===n&&(e.day=Math.max(r,e.day))}}getEras(){return bT}getYearsInEra(e){let t=bT.indexOf(e.era),n=vT[t],r=vT[t+1];if(r==null)return 9999-n[0]+1;let i=r[0]-n[0];return(e.month<r[1]||e.month===r[1]&&e.day<r[2])&&i++,i}getDaysInMonth(e){return super.getDaysInMonth(ST(e))}getMinimumMonthInYear(e){let t=CT(e);return t?t[1]:1}getMinimumDayInMonth(e){let t=CT(e);return t&&e.month===t[1]?t[2]:1}constructor(...e){super(...e),this.identifier=`japanese`}};function CT(e){if(e.year===1)return vT[bT.indexOf(e.era)]}var wT=-543,rle=class extends iw{fromJulianDay(e){let t=super.fromJulianDay(e),n=nw(t.era,t.year);return new mT(this,n-wT,t.month,t.day)}toJulianDay(e){return super.toJulianDay(TT(e))}getEras(){return[`BE`]}getDaysInMonth(e){return super.getDaysInMonth(TT(e))}balanceDate(){}constructor(...e){super(...e),this.identifier=`buddhist`}};function TT(e){let[t,n]=rw(e.year+wT);return new mT(t,n,e.month,e.day)}var ET=1911;function DT(e){return e.era===`minguo`?e.year+ET:1-e.year+ET}function OT(e){let t=e-ET;return t>0?[`minguo`,t]:[`before_minguo`,1-t]}var ile=class extends iw{fromJulianDay(e){let t=super.fromJulianDay(e),[n,r]=OT(nw(t.era,t.year));return new mT(this,n,r,t.month,t.day)}toJulianDay(e){return super.toJulianDay(kT(e))}getEras(){return[`before_minguo`,`minguo`]}balanceDate(e){let[t,n]=OT(DT(e));e.era=t,e.year=n}isInverseEra(e){return e.era===`before_minguo`}getDaysInMonth(e){return super.getDaysInMonth(kT(e))}getYearsInEra(e){return e.era===`before_minguo`?9999:8088}constructor(...e){super(...e),this.identifier=`roc`}};function kT(e){let[t,n]=rw(DT(e));return new mT(t,n,e.month,e.day)}var ale=1948320,AT=[0,31,62,93,124,155,186,216,246,276,306,336],ole=class{fromJulianDay(e){let t=e-ale,n=1+Math.floor((33*t+3)/12053),r=t-(365*(n-1)+Math.floor((8*n+21)/33)),i=Math.floor(r<216?r/31:(r-6)/30),a=r-AT[i]+1;return new mT(this,n,i+1,a)}toJulianDay(e){let t=1948319+365*(e.year-1)+Math.floor((8*e.year+21)/33);return t+=AT[e.month-1],t+=e.day,t}getMonthsInYear(){return 12}getDaysInMonth(e){return e.month<=6?31:e.month<=11||$C(25*e.year+11,33)<8?30:29}getEras(){return[`AP`]}getYearsInEra(){return 9377}constructor(){this.identifier=`persian`}},jT=78,MT=80,sle=class extends iw{fromJulianDay(e){let t=super.fromJulianDay(e),n=t.year-jT,r=e-ew(t.era,t.year,1,1),i;r<MT?(n--,i=tw(t.year-1)?31:30,r+=i+155+90+10):(i=tw(t.year)?31:30,r-=MT);let a,o;if(r<i)a=1,o=r+1;else{let e=r-i;e<155?(a=Math.floor(e/31)+2,o=e%31+1):(e-=155,a=Math.floor(e/30)+7,o=e%30+1)}return new mT(this,n,a,o)}toJulianDay(e){let[t,n]=rw(e.year+jT),r,i;return tw(n)?(r=31,i=ew(t,n,3,21)):(r=30,i=ew(t,n,3,22)),e.month===1?i+e.day-1:(i+=r+Math.min(e.month-2,5)*31,e.month>=8&&(i+=(e.month-7)*30),i+=e.day-1,i)}getDaysInMonth(e){return e.month===1&&tw(e.year+jT)||e.month>=2&&e.month<=6?31:30}getYearsInEra(){return 9919}getEras(){return[`saka`]}balanceDate(){}constructor(...e){super(...e),this.identifier=`indian`}},NT=1948440,PT=1948439,FT=1300,IT=1600,cle=460322;function LT(e,t,n,r){return r+Math.ceil(29.5*(n-1))+(t-1)*354+Math.floor((3+11*t)/30)+e-1}function RT(e,t,n){let r=Math.floor((30*(n-t)+10646)/10631),i=Math.min(12,Math.ceil((n-(29+LT(t,r,1,1)))/29.5)+1);return new mT(e,r,i,n-LT(t,r,i,1)+1)}function zT(e){return(14+11*e)%30<11}var BT=class{fromJulianDay(e){return RT(this,NT,e)}toJulianDay(e){return LT(NT,e.year,e.month,e.day)}getDaysInMonth(e){let t=29+e.month%2;return e.month===12&&zT(e.year)&&t++,t}getMonthsInYear(){return 12}getDaysInYear(e){return zT(e.year)?355:354}getYearsInEra(){return 9665}getEras(){return[`AH`]}constructor(){this.identifier=`islamic-civil`}},lle=class extends BT{fromJulianDay(e){return RT(this,PT,e)}toJulianDay(e){return LT(PT,e.year,e.month,e.day)}constructor(...e){super(...e),this.identifier=`islamic-tbla`}},ule=`qgpUDckO1AbqBmwDrQpVBakGkgepC9QF2gpcBS0NlQZKB1QLagutBa4ETwoXBYsGpQbVCtYCWwmdBE0KJg2VDawFtgm6AlsKKwWVCsoG6Qr0AnYJtgJWCcoKpAvSC9kF3AJtCU0FpQpSC6ULtAW2CVcFlwJLBaMGUgdlC2oFqworBZUMSg2lDcoF1gpXCasESwmlClILagt1BXYCtwhbBFUFqQW0BdoJ3QRuAjYJqgpUDbIN1QXaAlsJqwRVCkkLZAtxC7QFtQpVCiUNkg7JDtQG6QprCasEkwpJDaQNsg25CroEWworBZUKKgtVC1wFvQQ9Ah0JlQpKC1oLbQW2AjsJmwRVBqkGVAdqC2wFrQpVBSkLkgupC9QF2gpaBasKlQVJB2QHqgu1BbYCVgpNDiULUgtqC60FrgIvCZcESwalBqwG1gpdBZ0ETQoWDZUNqgW1BdoCWwmtBJUFygbkBuoK9QS2AlYJqgpUC9IL2QXqAm0JrQSVCkoLpQuyBbUJ1gSXCkcFkwZJB1ULagVrCisFiwpGDaMNygXWCtsEawJLCaUKUgtpC3UFdgG3CFsCKwVlBbQF2gntBG0BtgimClINqQ3UBdoKWwmrBFMGKQdiB6kLsgW1ClUFJQuSDckO0gbpCmsFqwRVCikNVA2qDbUJugQ7CpsETQqqCtUK2gJdCV4ELgqaDFUNsga5BroEXQotBZUKUguoC7QLuQXaAloJSgukDdEO6AZqC20FNQWVBkoNqA3UDdoGWwWdAisGFQtKC5ULqgWuCi4JjwwnBZUGqgbWCl0FnQI=`,VT,HT;function UT(e){return cle+HT[e-FT]}function WT(e,t){let n=e-FT,r=1<<11-(t-1);return(VT[n]&r)===0?29:30}function GT(e,t){let n=UT(e);for(let r=1;r<t;r++)n+=WT(e,r);return n}function KT(e){return HT[e+1-FT]-HT[e-FT]}var dle=class extends BT{fromJulianDay(e){let t=e-NT,n=UT(FT),r=UT(IT);if(t<n||t>r)return super.fromJulianDay(e);{let e=1299,n=1,r=1;for(;r>0;){e++,r=t-UT(e)+1;let i=KT(e);if(r===i){n=12;break}if(r<i){let t=WT(e,n);for(n=1;r>t;)r-=t,n++,t=WT(e,n);break}}return new mT(this,e,n,t-GT(e,n)+1)}}toJulianDay(e){return e.year<FT||e.year>IT?super.toJulianDay(e):NT+GT(e.year,e.month)+(e.day-1)}getDaysInMonth(e){return e.year<FT||e.year>IT?super.getDaysInMonth(e):WT(e.year,e.month)}getDaysInYear(e){return e.year<FT||e.year>IT?super.getDaysInYear(e):KT(e.year)}constructor(){if(super(),this.identifier=`islamic-umalqura`,VT||=new Uint16Array(Uint8Array.from(atob(ule),e=>e.charCodeAt(0)).buffer),!HT){HT=new Uint32Array(301);let e=0;for(let t=FT;t<=IT;t++){HT[t-FT]=e;for(let n=1;n<=12;n++)e+=WT(t,n)}}}},qT=347997,fle=25920,ple=765433;function JT(e){return $C(e*7+1,19)<7}function YT(e){let t=Math.floor((235*e-234)/19),n=12084+13753*t,r=t*29+Math.floor(n/25920);return $C(3*(r+1),7)<3&&(r+=1),r}function mle(e){let t=YT(e-1),n=YT(e);return YT(e+1)-n===356?2:+(n-t===382)}function XT(e){return YT(e)+mle(e)}function ZT(e){return XT(e+1)-XT(e)}function hle(e){let t=ZT(e);switch(t>380&&(t-=30),t){case 353:return 0;case 354:return 1;case 355:return 2}}function QT(e,t){if(t>=6&&!JT(e)&&t++,t===4||t===7||t===9||t===11||t===13)return 29;let n=hle(e);return t===2?n===2?30:29:t===3?n===0?29:30:t===6?JT(e)?30:0:30}var gle=class{fromJulianDay(e){let t=e-qT,n=t*fle/ple,r=Math.floor((19*n+234)/235)+1,i=XT(r),a=Math.floor(t-i);for(;a<1;)r--,i=XT(r),a=Math.floor(t-i);let o=1,s=0;for(;s<a;)s+=QT(r,o),o++;o--,s-=QT(r,o);let c=a-s;return new mT(this,r,o,c)}toJulianDay(e){let t=XT(e.year);for(let n=1;n<e.month;n++)t+=QT(e.year,n);return t+e.day+qT}getDaysInMonth(e){return QT(e.year,e.month)}getMonthsInYear(e){return JT(e.year)?13:12}getDaysInYear(e){return ZT(e.year)}getYearsInEra(){return 9999}getEras(){return[`AM`]}balanceYearMonth(e,t){t.year!==e.year&&(JT(t.year)&&!JT(e.year)&&t.month>6?e.month--:!JT(t.year)&&JT(e.year)&&t.month>6&&e.month++)}constructor(){this.identifier=`hebrew`}},$T=1723856,eE=1824665,tE=5500;function nE(e,t,n,r){return e+365*t+Math.floor(t/4)+30*(n-1)+r-1}function rE(e,t){let n=Math.floor(4*(t-e)/1461),r=1+Math.floor((t-nE(e,n,1,1))/30);return[n,r,t+1-nE(e,n,r,1)]}function iE(e){return Math.floor(e%4/3)}function aE(e,t){return t%13==0?iE(e)+5:30}var oE=class{fromJulianDay(e){let[t,n,r]=rE($T,e),i=`AM`;return t<=0&&(i=`AA`,t+=tE),new mT(this,i,t,n,r)}toJulianDay(e){let t=e.year;return e.era===`AA`&&(t-=tE),nE($T,t,e.month,e.day)}getDaysInMonth(e){return aE(e.year,e.month)}getMonthsInYear(){return 13}getDaysInYear(e){return 365+iE(e.year)}getYearsInEra(e){return e.era===`AA`?9999:9991}getEras(){return[`AA`,`AM`]}constructor(){this.identifier=`ethiopic`}},_le=class extends oE{fromJulianDay(e){let[t,n,r]=rE($T,e);return t+=tE,new mT(this,`AA`,t,n,r)}getEras(){return[`AA`]}getYearsInEra(){return 9999}constructor(...e){super(...e),this.identifier=`ethioaa`}},vle=class extends oE{fromJulianDay(e){let[t,n,r]=rE(eE,e),i=`CE`;return t<=0&&(i=`BCE`,t=1-t),new mT(this,i,t,n,r)}toJulianDay(e){let t=e.year;return e.era===`BCE`&&(t=1-t),nE(eE,t,e.month,e.day)}getDaysInMonth(e){let t=e.year;return e.era===`BCE`&&(t=1-t),aE(t,e.month)}isInverseEra(e){return e.era===`BCE`}balanceDate(e){e.year<=0&&(e.era=e.era===`BCE`?`CE`:`BCE`,e.year=1-e.year)}getEras(){return[`BCE`,`CE`]}getYearsInEra(e){return e.era===`BCE`?9999:9715}constructor(...e){super(...e),this.identifier=`coptic`}};function sE(e){switch(e){case`buddhist`:return new rle;case`ethiopic`:return new oE;case`ethioaa`:return new _le;case`coptic`:return new vle;case`hebrew`:return new gle;case`indian`:return new sle;case`islamic-civil`:return new BT;case`islamic-tbla`:return new lle;case`islamic-umalqura`:return new dle;case`japanese`:return new nle;case`persian`:return new ole;case`roc`:return new ile;default:return new iw}}var cE=new Map,lE=class{format(e){return this.formatter.format(e)}formatToParts(e){return this.formatter.formatToParts(e)}formatRange(e,t){if(typeof this.formatter.formatRange==`function`)return this.formatter.formatRange(e,t);if(t<e)throw RangeError(`End date must be >= start date`);return`${this.formatter.format(e)} \u{2013} ${this.formatter.format(t)}`}formatRangeToParts(e,t){if(typeof this.formatter.formatRangeToParts==`function`)return this.formatter.formatRangeToParts(e,t);if(t<e)throw RangeError(`End date must be >= start date`);let n=this.formatter.formatToParts(e),r=this.formatter.formatToParts(t);return[...n.map(e=>({...e,source:`startRange`})),{type:`literal`,value:` â `,source:`shared`},...r.map(e=>({...e,source:`endRange`}))]}resolvedOptions(){let e=this.formatter.resolvedOptions();return xle()&&(this.resolvedHourCycle||=Sle(e.locale,this.options),e.hourCycle=this.resolvedHourCycle,e.hour12=this.resolvedHourCycle===`h11`||this.resolvedHourCycle===`h12`),e.calendar===`ethiopic-amete-alem`&&(e.calendar=`ethioaa`),e}constructor(e,t={}){this.formatter=uE(e,t),this.options=t}},yle={true:{ja:`h11`},false:{}};function uE(e,t={}){if(typeof t.hour12==`boolean`&&ble()){t={...t};let n=yle[String(t.hour12)][e.split(`-`)[0]],r=t.hour12?`h12`:`h23`;t.hourCycle=n??r,delete t.hour12}let n=e+(t?Object.entries(t).sort((e,t)=>
5e[0]<t[0]?-1:1).join():``);if(cE.has(n))return cE.get(n);let r=new Intl.DateTimeFormat(e,t);return cE.set(n,r),r}var dE=null;function ble(){return dE??=new Intl.DateTimeFormat(`en-US`,{hour:`numeric`,hour12:!1}).format(new Date(2020,2,3,0))===`24`,dE}var fE=null;function xle(){return fE??=new Intl.DateTimeFormat(`fr`,{hour:`numeric`,hour12:!1}).resolvedOptions().hourCycle===`h12`,fE}function Sle(e,t){if(!t.timeStyle&&!t.hour)return;e=e.replace(/(-u-)?-nu-[a-zA-Z0-9]+/,``),e+=(e.includes(`-u-`)?``:`-u`)+`-nu-latn`;let n=uE(e,{...t,timeZone:void 0}),r=parseInt(n.formatToParts(new Date(2020,2,3,0)).find(e=>e.type===`hour`).value,10),i=parseInt(n.formatToParts(new Date(2020,2,3,23)).find(e=>e.type===`hour`).value,10);if(r===0&&i===23)return`h23`;if(r===24&&i===23)return`h24`;if(r===0&&i===11)return`h11`;if(r===12&&i===11)return`h12`;throw Error(`Unexpected hour cycle result`)}function pE(e){return`${e.year}-${String(e.month).padStart(2,`0`)}-${String(e.day).padStart(2,`0`)}`}function mE(e){if(!e)return null;let t=e.match(/^(\d{4})-(\d{2})-(\d{2})$/);if(!t)return null;let[,n,r,i]=t;return new mT(Number.parseInt(n,10),Number.parseInt(r,10),Number.parseInt(i,10))}function hE(){let e=dw(`UTC`);return{start:e.subtract({days:6}),end:e}}function gE(e){return e?e.split(`,`).map(e=>e.trim().toString()).filter(Boolean):[]}function _E({orgId:e,fixedFilters:t,hideFilters:n=!1,limit:r}){let[i,a]=Ee(),[o,s]=(0,V.useState)(null),c=!t?.envs;u(sce()),u(cce()),u(lce());let d=B(dce),f=B(fce),p=B(pce),m=i.get(`occurred_after`),h=i.get(`occurred_before`),g=i.get(`page`),_=g?Number.parseInt(g,10):1,v=i.get(`types`),y=i.get(`statuses`),b=i.get(`actors`),x=i.get(`envs`),S=i.get(`q`),C=i.get(`read_only`),w=(0,V.useMemo)(()=>gE(v),[v]),T=(0,V.useMemo)(()=>gE(y),[y]),E=(0,V.useMemo)(()=>gE(b),[b]),D=(0,V.useMemo)(()=>gE(x),[x]),O=(0,V.useMemo)(()=>C===`true`,[C]),[k,A]=(0,V.useState)(w),[j,M]=(0,V.useState)(T),[ee,te]=(0,V.useState)(E),[ne,re]=(0,V.useState)(D),[ie,ae]=(0,V.useState)(O),oe=(0,V.useMemo)(()=>{let e=mE(m),t=mE(h);return e&&t?{start:e,end:t}:hE()},[m,h]),[se,N]=(0,V.useState)(oe);(0,V.useEffect)(()=>{A(w),M(T),te(E),c&&re(D),ae(O),N(oe)},[w,T,E,D,O,oe,c]),(0,V.useEffect)(()=>{if(!ie){let e=new Set(d.filter(e=>e.readOnly).map(e=>e.value));A(t=>t.filter(t=>!e.has(t)))}},[ie,d]);let ce=(0,V.useMemo)(()=>{let e=(e,t)=>e.length===t.length&&[...e].sort().join()===[...t].sort().join();return se.start.compare(oe.start)!==0||se.end.compare(oe.end)!==0||!e(k,w)||!e(j,T)||!e(ee,E)||c&&!e(ne,D)||ie!==O},[se,oe,k,w,j,T,ee,E,ne,D,ie,O,c]),le=t?.envs?.join(`,`),ue=t?.targetTypes?.join(`,`),de=t?.resourceType,fe=t?.resourceId,pe=(0,V.useMemo)(()=>{let n=mE(m),r=mE(h),i=hE();return{organizationId:e,occurredAfter:pE(n||i.start),occurredBefore:pE(r||i.end),page:_,types:w.length>0?w:void 0,statuses:T.length>0?T:void 0,actors:E.length>0?E:void 0,envs:t?.envs??(D.length>0?D:void 0),targetTypes:t?.targetTypes,resourceType:de,resourceId:fe,q:S||void 0,readOnly:O||void 0}},[e,m,h,_,w,T,E,D,O,le,ue,de,fe,S]),me=(0,V.useMemo)(()=>({organizationId:pe.organizationId,occurredAfter:pe.occurredAfter||pE(hE().start),occurredBefore:pe.occurredBefore||pE(hE().end),types:pe.types,statuses:pe.statuses,actors:pe.actors,envs:pe.envs,q:pe.q,readOnly:pe.readOnly}),[pe]);JS({action:(0,V.useMemo)(()=>MC(pe),[pe]),cancel:(0,V.useMemo)(()=>AC(),[])});let he=l();
5(0,V.useEffect)(()=>()=>{he(kC())},[he]);let ge=I(MC),_e=B(rce),ve=r?_e.slice(0,r):_e,ye=B(ece),be=(0,V.useCallback)(e=>{e&&N(e)},[]),xe=(0,V.useCallback)(e=>{let t=new URLSearchParams(i);t.set(`page`,e.toString()),a(t,{replace:!0})},[i,a]),Se=(0,V.useCallback)(()=>{he(kC());let e=new URLSearchParams(i);e.set(`page`,`1`),e.set(`occurred_after`,pE(se.start)),e.set(`occurred_before`,pE(se.end));let t=new Set(d.filter(e=>e.readOnly).map(e=>e.value)),n=[[`types`,ie?k:k.filter(e=>!t.has(e))],[`statuses`,j],[`actors`,ee],...c?[[`envs`,ne]]:[]];for(let[t,r]of n)r.length?e.set(t,r.join(`,`)):e.delete(t);ie?e.set(`read_only`,`true`):e.delete(`read_only`),Ys(`activity-filter-query`,new URLSearchParams(e).toString()),a(e,{replace:!0})},[he,i,se,k,j,ee,ne,ie,a,c,Ys,d]),P=(0,V.useCallback)(()=>{he(kC()),A([]),M([]),te([]),c&&re([]),ae(!1);let e=hE();N(e);let t={occurred_after:pE(e.start),occurred_before:pE(e.end),page:`1`};a(t,{replace:!0}),Ys(`activity-filter-query`,new URLSearchParams(t).toString())},[he,a,c]);return(0,V.useEffect)(()=>{let e=mE(m),t=mE(h);if((m||h)&&(!e||!t)){let n=[];m&&!e&&n.push(`"${m}"`),h&&!t&&n.push(`"${h}"`),s(`Invalid date ${n.length>1?`values`:`value`} ${n.join(` and `)} in URL. Showing results for the last 7 days instead.`);let r=hE(),o=new URLSearchParams(i);o.set(`occurred_after`,pE(r.start)),o.set(`occurred_before`,pE(r.end)),a(o,{replace:!0})}},[m,h,i,a]),{activities:ve,isLoading:ge.isLoading,dateRange:se,onDateRangeChange:be,pagination:ye,onPageChange:xe,dateWarning:o,onDismissWarning:()=>s(null),typeOptions:d,statusOptions:f,actorOptions:p,stagedTypes:k,stagedStatuses:j,stagedActors:ee,stagedEnvs:ne,stagedReadOnly:ie,onTypesChange:A,onStatusesChange:M,onActorsChange:te,onEnvsChange:re,onReadOnlyChange:ae,onApplyFilters:Se,onResetFilters:P,hasPendingChanges:ce,showEnvFilter:c,hideFilters:n,appliedExportFilters:me}}function vE(){return{canAccess:B(z_),destination:Fne()}}var Cle=3e3;function wle(e){let t=l(),[n,r]=(0,V.useState)(``),[i,a]=(0,V.useState)(`idle`),[o,s]=(0,V.useState)(``),c=(0,V.useRef)(null),u=B(yce),d=B(e=>vce(e,{id:n||`0`})),f=B(xce),p=I(QC),m=I(XC),h=(0,V.useCallback)(()=>{c.current&&=(clearInterval(c.current),null)},[]),g=(0,V.useCallback)(()=>{h(),a(`idle`),r(``),s(``)},[h]);(0,V.useEffect)(()=>()=>h(),[h]);let _=(0,V.useCallback)(n=>{a(`creating`),s(``),r(``);let i={organizationId:e.organizationId,formatType:n,occurredAfter:e.occurredAfter,occurredBefore:e.occurredBefore,types:e.types,statuses:e.statuses,actors:e.actors,envs:e.envs,q:e.q,readOnly:e.readOnly};t(XC(i))},[t,e]);return(0,V.useEffect)(()=>{if(i===`creating`){if(m.isError){a(`error`),s(m.message||`Failed to create export`);return}m.isSuccess&&u.id&&(r(u.id),a(`polling`))}},[i,m.isError,m.isSuccess,m.message,u.id]),(0,V.useEffect)(()=>{if(i!==`polling`||!n)return;let e=()=>{t(bce({id:n}))};return e(),c.current=setInterval(e,Cle),()=>h()},[i,n,t,h]),(0,V.useEffect)(()=>{i===`polling`&&n&&(d.status===`succeeded`?(h(),t(QC({id:n}))):d.status===`failed`&&(h(),a(`error`),s(d.message||`Export failed`)))},[i,n,d.status,d.message,h,t]),(0,V.useEffect)(()=>{i===`polling`&&n&&d.status===`succeeded`&&(p.isSuccess&&f?a(`ready`):p.isError&&(a(`error`),s(`Failed to get download URL`)))},[i,n,d.status,p.isSuccess,p.isError,f]),{status:i,error:o,startExport:_,cancel:g,exportData:d,downloadUrl:i===`ready`?f:``}}var yE=()=>
5{let e=B(e=>L.loaders.selectById(e,{id:zS})),t=B(In),n=B(qo),r=B(Qo),i=r.length===1?r[0]:r.find(e=>e.id===n.selectedOrganizationId)??L.organizations.empty,a=B(e=>Xg(e,{orgId:i.id})),o=Rc(B(e=>L.cache.selectById(e,{id:Fc({orgId:i.id}).payload.key}))?._embedded?.whitelist_memberships||[],n.id);return{blocked:e.lastSuccess>0&&es(i)&&i.ssoEnforced&&!a&&!o&&!t,org:i}},H=e(xe(),1),U=Ne(),bE=({n:e})=>(0,U.jsx)(`span`,{className:(0,H.default)(`inline-flex items-center justify-center min-w-5 h-5 px-1.5 rounded-full text-xs font-semibold leading-none flex-none order-1 grow-0`,e!==null&&e>0?`bg-indigo-200 text-black-700`:`bg-black-100 text-black-500`),children:e===null?`-`:e}),xE=({className:e=``,text:t=`loading...`,isLoading:n=!0})=>n?(0,U.jsx)(`div`,{className:e,children:t}):null,SE=({show:e=!0,className:t=``,color:n,variant:r=`base`})=>{if(!e)return null;let i=r===`xs`?12:r===`sm`?16:r===`lg`?32:24;return(0,U.jsx)(`div`,{className:t,children:(0,U.jsxs)(`svg`,{role:`img`,"aria-label":`loading spinner`,className:n?`animate-spin`:`animate-spin text-gray-500`,width:i,height:i,style:n?{color:n}:void 0,xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,children:[(0,U.jsx)(`circle`,{className:`opacity-25`,cx:`12`,cy:`12`,r:`10`,stroke:`currentColor`,strokeWidth:`4`}),(0,U.jsx)(`path`,{className:`opacity-75`,fill:`currentColor`,d:`M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z`})]})})},W=({children:e,className:t=``,variant:n=`vertical`,size:r=`lg`})=>{let i=n===`vertical`?`flex-col`:`flex-row`;return(0,U.jsx)(`div`,{className:`flex ${r===`xs`?`gap-0.5`:r===`sm`?`gap-2`:r===`xl`?`gap-8`:`gap-4`} ${i} ${t}`,children:e})},Tle=r({IconAI:()=>TD,IconActivity:()=>UD,IconAlertCircle:()=>XE,IconAlertDot:()=>GD,IconAlertTriangle:()=>ZE,IconAptible:()=>Yle,IconArrowDown:()=>jD,IconArrowLeft:()=>jE,IconArrowRight:()=>AE,IconArrowUp:()=>AD,IconAws:()=>DD,IconBars3:()=>Ule,IconBell:()=>Xle,IconBitbucket:()=>Zle,IconBox:()=>zE,IconCalendar:()=>ED,IconCard:()=>Vle,IconCertificate:()=>Mle,IconChartSquareBar:()=>ND,IconCheck:()=>HE,IconCheckCircle:()=>UE,IconCheckCircleAlt:()=>WE,IconChevronDown:()=>IE,IconChevronLeft:()=>FE,IconChevronRight:()=>PE,IconChevronUp:()=>NE,IconCircleStack:()=>MD,IconClock:()=>wD,IconCloud:()=>jle,IconCommit:()=>bD,IconCopy:()=>iD,IconCreditCard:()=>Dle,IconCube:()=>OD,IconCylinder:()=>LE,IconDeployments:()=>Qle,IconDiagnostics:()=>zle,IconDiff:()=>Ple,IconDocs:()=>JD,IconDocumentSearch:()=>$le,IconDownload:()=>aD,IconDuplicate:()=>Ble,IconEdit:()=>ME,IconEllipsis:()=>Ole,IconEllipsisHorizontal:()=>PD,IconEndpoint:()=>fD,IconEnvelope:()=>eue,IconExclamationCircle:()=>GE,IconExternalLink:()=>rD,IconExternalResource:()=>Rle,IconEyeClosed:()=>yD,IconEyeOpen:()=>vD,IconFileText:()=>BD,IconFilter:()=>oue,IconFit:()=>Ile,IconFolder:()=>tue,IconGitBranch:()=>eD,IconGitCommit:()=>nue,IconGithub:()=>gD,IconGitlab:()=>rue,IconGlobe:()=>nD,IconGlobeAlt:()=>FD,IconGrid:()=>aue,IconHamburger:()=>cD,IconHeart:()=>Ale,IconHelp:()=>qD,IconHome:()=>_D,IconInfo:()=>tD,IconKey:()=>mD,IconLayers:()=>QE,IconLightbulb:()=>KD,IconList:()=>iue,IconLock:()=>hD,IconLogout:()=>$E,IconMagnifyingGlass:()=>Gle,IconMap:()=>Fle,IconMetrics:()=>uD,IconMinusCircle:()=>KE,IconOrganization:()=>HD,IconPencil:()=>Hle,IconPipelines:()=>sue,IconPlusCircle:()=>qE,IconRefresh:()=>oD,IconReorder:()=>WD,IconRollback:()=>sD,IconScaleCheck:()=>CD,IconScaleDown:()=>xD,IconScaleUp:()=>SD,IconSearch:()=>VE,IconService:()=>pD,IconSettings:()=>BE,IconShield:()=>dD,IconShieldCheck:()=>Kle,IconSource:()=>Nle,IconStack:()=>ID,IconSubtleProvider:()=>wE,IconSwitchHorizontal:()=>LD,IconSwitchVertical:()=>RD,IconTarget:()=>Lle,IconTerminal:()=>VD,IconThumbsDown:()=>qle,IconThumbsUp:()=>kle,IconTool:()=>zD,IconTrash:()=>RE,IconUnlock:()=>Wle,IconUser:()=>Jle,IconUserCircle:()=>Ele,IconUsers:()=>kD,IconWorkplace:()=>lD,IconX:()=>JE,IconXCircle:()=>YE}),CE=(0,V.createContext)(!1),wE=CE.Provider,TE=()=>(0,V.useContext)(CE),EE=`#595E63`,DE=(e=`base`)=>e===`xs`?8:e===`sm`?16:e===`md`?20:e===`lg`?32:24,OE=({children:e,color:t,variant:n=`base`,title:r=`icon`,...i})=>{let a=TE(),o=t??(a?EE:`#111920`);return(0,U.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,width:DE(n),height:DE(n),stroke:o,fill:`none`,strokeWidth:a?1.5:2,strokeLinecap:`round`,strokeLinejoin:`round`,...i,children:[(0,U.jsx)(`title`,{children:r}),e]})},kE=({children:e,color:t,variant:n=`base`,title:r=`icon`,viewBox:i=`0 0 20 20`,strokeWidth:a=1.5,...o})=>(0,U.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:i,width:DE(n),height:DE(n),stroke:t??EE,fill:`none`,strokeWidth:a,strokeLinecap:`round`,strokeLinejoin:`round`,...o,children:[(0,U.jsx)(`title`,{children:r}),e]}),AE=e=>(0,U.jsxs)(OE,{title:`Next`,...e,children:[(0,U.jsx)(`line`,{x1:`5`,y1:`12`,x2:`19`,y2:`12`}),(0,U.jsx)(`polyline`,{points:`12 5 19 12 12 19`})]}),jE=e=>(0,U.jsxs)(OE,{title:`Prev`,...e,children:[(0,U.jsx)(`line`,{x1:`19`,y1:`12`,x2:`5`,y2:`12`}),(0,U.jsx)(`polyline`,{points:`12 19 5 12 12 5`})]}),ME=e=>(0,U.jsx)(OE,{title:`Edit`,...e,children:(0,U.jsx)(`path`,{d:`M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z`})}),NE=e=>(0,U.jsx)(OE,{title:`Up`,...e,children:(0,U.jsx)(`polyline`,{points:`18
515 12 9 6 15`})}),PE=e=>(0,U.jsx)(OE,{title:`Right`,...e,children:(0,U.jsx)(`polyline`,{points:`9 18 15 12 9 6`})}),FE=e=>(0,U.jsx)(OE,{title:`Left`,...e,children:(0,U.jsx)(`polyline`,{points:`15 18 9 12 15 6`})}),IE=e=>(0,U.jsx)(OE,{title:`Down`,...e,children:(0,U.jsx)(`polyline`,{points:`6 9 12 15 18 9`})}),LE=e=>TE()?(0,U.jsx)(kE,{title:`Databases`,...e,children:(0,U.jsx)(`path`,{d:`M17.4038 4.95192C17.4038 6.99628 14.0887 8.65385 9.99998 8.65385C5.91126 8.65385 2.59613 6.99628 2.59613 4.95192M17.4038 4.95192C17.4038 2.90756 14.0887 1.25 9.99998 1.25C5.91126 1.25 2.59613 2.90756 2.59613 4.95192M17.4038 4.95192V15.0481C17.4038 17.0924 14.0887 18.75 9.99998 18.75C5.91126 18.75 2.59613 17.0924 2.59613 15.0481V4.95192M17.4038 4.95192V8.31731M2.59613 4.95192V8.31731M17.4038 8.31731V11.6827C17.4038 13.7271 14.0887 15.3846 9.99998 15.3846C5.91126 15.3846 2.59613 13.7271 2.59613 11.6827V8.31731M17.4038 8.31731C17.4038 10.3617 14.0887 12.0192 9.99998 12.0192C5.91126 12.0192 2.59613 10.3617 2.59613 8.31731`})}):(0,U.jsx)(OE,{title:`Databases`,...e,children:(0,U.jsx)(`path`,{d:`M20.8846 5.94231C20.8846 8.39554 16.9065 10.3846 12 10.3846C7.09354 10.3846 3.11538 8.39554 3.11538 5.94231M20.8846 5.94231C20.8846 3.48908 16.9065 1.5 12 1.5C7.09354 1.5 3.11538 3.48908 3.11538 5.94231M20.8846 5.94231V18.0577C20.8846 20.5109 16.9065 22.5 12 22.5C7.09354 22.5 3.11538 20.5109 3.11538 18.0577V5.94231M20.8846 5.94231V9.98077M3.11538 5.94231V9.98077M20.8846 9.98077V14.0192C20.8846 16.4725 16.9065 18.4615 12 18.4615C7.09354 18.4615 3.11538 16.4725 3.11538 14.0192V9.98077M20.8846 9.98077C20.8846 12.434 16.9065 14.4231 12 14.4231C7.09354 14.4231 3.11538 12.434 3.11538 9.98077`})}),RE=e=>(0,U.jsx)(OE,{title:`Delete`,...e,children:(0,U.jsx)(`path`,{d:`M10 11V17M14 11V17M4 7H20M19 7L18.133 19.142C18.0971 19.6466 17.8713 20.1188 17.5011 20.4636C17.1309 20.8083 16.6439 21 16.138 21H7.862C7.35614 21 6.86907 20.8083 6.49889 20.4636C6.1287 20.1188 5.90292 19.6466 5.867 19.142L5 7H19ZM15 7V4C15 3.73478 14.8946 3.48043 14.7071 3.29289C14.5196 3.10536 14.2652 3 14 3H10C9.73478 3 9.48043 3.10536 9.29289 3.29289C9.10536 3.48043 9 3.73478 9 4V7H15Z`})}),zE=e=>TE()?(0,U.jsx)(kE,{title:`Apps`,...e,children:(0,U.jsx)(`path`,{d:`M18.4615 5.76927L9.99999 0.833374L1.53845 5.76927M18.4615 5.76927L9.99999 10.7052M18.4615 5.76927V14.2308L9.99999 19.1667M1.53845 5.76927L9.99999 10.7052M1.53845 5.76927V14.2308L9.99999 19.1667M9.99999 10.7052V19.1667`})}):(0,U.jsx)(OE,{title:`Apps`,...e,children:(0,U.jsx)(`path`,{d:`M22.1538 6.92308L12 1L1.84615 6.92308M22.1538 6.92308L12 12.8462M22.1538 6.92308V17.0769L12 23M1.84615 6.92308L12 12.8462M1.84615 6.92308V17.0769L12 23M12 12.8462V23`})}),BE=e=>(0,U.jsxs)(OE,{title:`Settings`,...e,children:[(0,U.jsx)(`circle`,{cx:`12`,cy:`12`,r:`3`}),(0,U.jsx)(`path`,{d:`M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z`})]}),Ele=e=>(0,U.jsx)(OE,{strokeWidth:`1.5`,title:`Profile`,...e,children:(0,U.jsx)(`path`,{d:`M17.982 18.725C17.2833 17.7999 16.3792 17.0496 15.3412 16.5334C14.3031 16.0171 13.1594 15.7489 12 15.75C10.8406 15.7489 9.69688 16.0171 8.65882 16.5334C7.62075 17.0496 6.71674 17.7999 6.018 18.725M17.981 18.725C19.3445 17.5122 20.3071 15.9136 20.7412 14.1411C21.1752 12.3686 21.0603 10.5061 20.4115 8.80048C19.7627 7.09487 18.6107 5.62678 17.1084 4.5909C15.6061 3.55502 13.8243 3.00029 11.9995 3.00029C10.1747 3.00029 8.39293 3.55502 6.8906 4.5909C5.38828 5.62678 4.23633 7.09487 3.58753 8.80048C2.93874 10.5061 2.82375 12.3686 3.25782 14.1411C3.69189 15.9136 4.6545 17.5122 6.018 18.725M17.981 18.725C16.335 20.1932 14.2056 21.0031 12 21C9.79403 21.0034 7.66424 20.1934 6.018 18.725M15 9.75C15 10.5456 14.6839 11.3087 14.1213 11.8713C13.5587 12.4339 12.7956 12.75 12 12.75C11.2044 12.75 10.4413 12.4339 9.87868 11.8713C9.31607 11.3087 9 10.5456 9 9.75C9 8.95435 9.31607 8.19129 9.87868 7.62868C10.4413 7.06607 11.2044 6.75 12 6.75C12.7956 6.75 13.5587 7.06607 14.1213 7.62868C14.6839 8.19129 15 8.95435 15 9.75V9.75Z`})}),VE=e=>(0,U.jsxs)(OE,{title:`Search`,...e,children:[(0,U.jsx)(`circle`,{cx:`11`,cy:`11`,r:`8`}),(0,U.jsx)(`line`,{x1:`21`,y1:`21`,x2:`16.65`,y2:`16.65`})]}),HE=e=>(0,U.jsx)(OE,{title:`Check`,...e,children:(0,U.jsx)(`polyline`,{points:`20 6 9 17 4 12`})}),UE=e=>(0,U.jsx)(OE,{title:`Check`,...e,children:(0,U.jsx)(`path`,{d:`M8.17316 13L11.1667 15.8268L15.2612 8.5M22 12C22 13.3132 21.7413 14.6136 21.2388 15.8268C20.7362 17.0401 19.9996 18.1425 19.0711 19.0711C18.1425 19.9997 17.0401 20.7362 15.8268 21.2388C14.6136 21.7413 13.3132 22 12 22C10.6868 22 9.38642 21.7413 8.17316 21.2388C6.95991 20.7362 5.85751 19.9997 4.92893 19.0711C4.00034 18.1425 3.26375 17.0401 2.7612 15.8268C2.25865 14.6136 2 13.3132 2 12C2 9.34784 3.05356 6.8043 4.92893 4.92893C6.80429 3.05357 9.34783 2 12 2C14.6522 2 17.1957 3.05357 19.0711 4.92893
5C20.9464 6.8043 22 9.34784 22 12Z`})}),WE=e=>(0,U.jsx)(OE,{title:`Check Circle Alt`,...e,children:(0,U.jsx)(`path`,{d:`M22 11.08V12C21.9988 14.1564 21.3005 16.2547 20.0093 17.9818C18.7182 19.709 16.9033 20.9725 14.8354 21.5839C12.7674 22.1953 10.5573 22.1219 8.53447 21.3746C6.51168 20.6273 4.78465 19.2461 3.61096 17.4371C2.43727 15.628 1.87979 13.4881 2.02168 11.3363C2.16356 9.18455 2.99721 7.13631 4.39828 5.49706C5.79935 3.85781 7.69279 2.71537 9.79619 2.24013C11.8996 1.7649 14.1003 1.98232 16.07 2.85999M22 3.99999L12 14.01L9.00001 11.01`})}),GE=e=>(0,U.jsx)(XE,{...e}),KE=e=>(0,U.jsxs)(OE,{title:`Minus`,...e,children:[(0,U.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,U.jsx)(`line`,{x1:`8`,y1:`12`,x2:`16`,y2:`12`})]}),qE=e=>(0,U.jsxs)(OE,{title:`New`,...e,children:[(0,U.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,U.jsx)(`line`,{x1:`12`,y1:`8`,x2:`12`,y2:`16`}),(0,U.jsx)(`line`,{x1:`8`,y1:`12`,x2:`16`,y2:`12`})]}),JE=e=>(0,U.jsxs)(OE,{title:`Remove`,...e,children:[(0,U.jsx)(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),(0,U.jsx)(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})]}),YE=e=>(0,U.jsxs)(OE,{title:`Remove`,...e,children:[(0,U.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,U.jsx)(`line`,{x1:`15`,y1:`9`,x2:`9`,y2:`15`}),(0,U.jsx)(`line`,{x1:`9`,y1:`9`,x2:`15`,y2:`15`})]}),XE=e=>(0,U.jsxs)(OE,{title:`Alert`,...e,children:[(0,U.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,U.jsx)(`line`,{x1:`12`,y1:`8`,x2:`12`,y2:`12`}),(0,U.jsx)(`line`,{x1:`12`,y1:`16`,x2:`12.01`,y2:`16`})]}),ZE=e=>(0,U.jsxs)(OE,{title:`Alert`,...e,children:[(0,U.jsx)(`path`,{d:`M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z`}),(0,U.jsx)(`line`,{x1:`12`,y1:`9`,x2:`12`,y2:`13`}),(0,U.jsx)(`line`,{x1:`12`,y1:`17`,x2:`12.01`,y2:`17`})]}
5),QE=e=>TE()?(0,U.jsxs)(kE,{title:`Stacks`,strokeLinecap:`square`,strokeLinejoin:`miter`,...e,children:[(0,U.jsx)(`path`,{d:`M2.42426 6.21208L10 1.66663L17.5758 6.21208L10 10.7575L2.42426 6.21208Z`}),(0,U.jsx)(`path`,{d:`M17.5758 10L10 14.5455L2.42426 10`}),(0,U.jsx)(`path`,{d:`M17.5758 13.7878L10 18.3333L2.42426 13.7878`})]}):(0,U.jsxs)(OE,{title:`Stacks`,...e,children:[(0,U.jsx)(`polygon`,{points:`12 2 2 7 12 12 22 7 12 2`}),(0,U.jsx)(`polyline`,{points:`2 17 12 22 22 17`}),(0,U.jsx)(`polyline`,{points:`2 12 12 17 22 12`})]}),$E=e=>(0,U.jsxs)(OE,{title:`Logout`,...e,children:[(0,U.jsx)(`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`}),(0,U.jsx)(`polyline`,{points:`16 17 21 12 16 7`}),(0,U.jsx)(`line`,{x1:`21`,y1:`12`,x2:`9`,y2:`12`})]}),eD=e=>(0,U.jsxs)(OE,{title:`Git Branch`,...e,children:[(0,U.jsx)(`line`,{x1:`6`,y1:`3`,x2:`6`,y2:`15`}),(0,U.jsx)(`circle`,{cx:`18`,cy:`6`,r:`3`}),(0,U.jsx)(`circle`,{cx:`6`,cy:`18`,r:`3`}),(0,U.jsx)(`path`,{d:`M18 9a9 9 0 0 1-9 9`})]}),tD=e=>(0,U.jsxs)(OE,{title:`Info`,...e,children:[(0,U.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,U.jsx)(`line`,{x1:`12`,y1:`16`,x2:`12`,y2:`12`}),(0,U.jsx)(`line`,{x1:`12`,y1:`8`,x2:`12.01`,y2:`8`})]}),Dle=e=>(0,U.jsxs)(OE,{title:`Billing`,...e,children:[(0,U.jsx)(`rect`,{x:`1`,y:`4`,width:`22`,height:`16`,rx:`2`,ry:`2`}),(0,U.jsx)(`line`,{x1:`1`,y1:`10`,x2:`23`,y2:`10`})]}),nD=e=>TE()?(0,U.jsx)(kE,{title:`Environments`,...e,children:(0,U.jsx)(`path`,{d:`M10 18.3333C11.8472 18.3332 13.6421 17.7196 15.1028 16.5889C16.5635 15.4581 17.6074 13.8743 18.0704 12.0861M10 18.3333C8.15281 18.3332 6.35793 17.7196 4.89722 16.5889C3.43651 15.4581 2.39269 13.8743 1.92965 12.0861M10 18.3333C12.301 18.3333 14.1667 14.6018 14.1667 9.99996C14.1667 5.39811 12.301 1.66663 10 1.66663M10 18.3333C7.6991 18.3333 5.83336 14.6018 5.83336 9.99996C5.83336 5.39811 7.6991 1.66663 10 1.66663M10 1.66663C11.478 1.66601 12.9296 2.05862 14.2058 2.80419C15.4819 3.54975 16.5368 4.62141 17.2621 5.90922M10 1.66663C8.52202 1.66601 7.07047 2.05862 5.79429 2.80419C4.51811 3.54975 3.46327 4.62141 2.73799 5.90922M17.2621 5.90922C15.246 7.65545 12.6672 8.61491 10 8.61107C7.2241 8.61107 4.68521 7.59255 2.73799 5.90922M17.2621 5.90922C17.9666 7.15736 18.3356 8.56673 18.3334 9.99996C18.3334 10.7203 18.2417 11.4194 18.0704 12.0861M18.0704 12.0861C15.6011 13.4549 12.8234 14.1711 10 14.1666C7.07225 14.1666 4.32132 13.412 1.92965 12.0861M1.92965 12.0861C1.75442 11.4046 1.66606 10.7036 1.66669 9.99996C1.66669 8.51385 2.05558 7.11755 2.73799 5.90922`})}):(0,U.jsxs)(OE,{title:`Environments`,...e,children:[(0,U.jsx)(`circle`,{cx:`12`,cy:`12`,r:`10`}),(0,U.jsx)(`line`,{x1:`2`,y1:`12`,x2:`22`,y2:`12`}),(0,U.jsx)(`path`,{d:`M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z`})]}),Ole=e=>(0,U.jsxs)(OE,{title:`More`,...e,children:[(0,U.jsx)(`circle`,{cx:`12`,cy:`12`,r:`1`}),(0,U.jsx)(`circle`,{cx:`19`,cy:`12`,r:`1`}),(0,U.jsx)(`circle`,{cx:`5`,cy:`12`,r:`1`})]}),rD=e=>(0,U.jsxs)(OE,{title:`External Link`,...e,children:[(0,U.jsx)(`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`}),(0,U.jsx)(`polyline`,{points:`15 3 21 3 21 9`}),(0,U.jsx)(`line`,{x1:`10`,y1:`14`,x2:`21`,y2:`3`})]}),iD=e=>(0,U.jsxs)(OE,{title:`Copy`,...e,children:[(0,U.jsx)(`rect`,{x:`9`,y:`9`,width:`13`,height:`13`,rx:`2`,ry:`2`}),(0,U.jsx)(`path`,{d:`M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1`})]}),aD=e=>(0,U.jsxs)(OE,{title:`Download`,...e,children:[(0,U.jsx)(`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`}),(0,U.jsx)(`polyline`,{points:`7 10 12 15 17 10`}),(0,U.jsx)(`line`,{x1:`12`,y1:`15`,x2:`12`,y2:`3`})]}),kle=e=>(0,U.jsx)(OE,{title:`Thumbs Up`,...e,children:(0,U.jsx)(`path`,{d:`M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3`})}),oD=e=>(0,U.jsxs)(OE,{title:`Refresh`,...e,children:[(0,U.jsx)(`polyline`,{points:`23 4 23 10 17 10`}),(0,U.jsx)(`polyline`,{points:`1 20 1 14 7 14`}),(0,U.jsx)(`path`,{d:`M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15`})]}),sD=e=>(0,U.jsx)(OE,{title:`Rollback`,viewBox:`0 0 20 20`,strokeWidth:1.5,...e,children:(0,U.jsx)(`path`,{d:`M5.83325 8.33337H0.833252V3.33337M0.833252 8.33337L4.69992 4.70004C5.85068 3.55122 7.34363 2.80751 8.95382 2.58097C10.564 2.35442 12.2042 2.65732 13.6273 3.44401C15.0504 4.2307 16.1792 5.45857 16.8438 6.94262C17.5083 8.42667 17.6726 10.0865 17.3118 11.672C16.951 13.2575 16.0846 14.6828 14.8434 15.7332C13.6021 16.7835 12.053 17.402 10.4297 17.4954C8.80632 17.5889 7.19657 17.1522 5.84297 16.2512C4.48937 15.3502 3.46525 14.0337 2.92492 12.5`})}),Ale=e=>(0,U.jsx)(OE,{title:`Activity`,...e,children:(0,U.jsx)(`polyline`,{points:`22 12 18 12 15 21 9 3 6 12 2 12`})}),jle=e=>(0,U.jsx)(OE,{title:`Deployments`,...e,children:(0,U.jsx)(`path`,{d:`M12.006 16.6069V8.97256M12.006 8.97256L15.3908 12.3656M12.006 8.97256L8.62126 12.3656M6.08268 20C4.87481 20.0013 3.70603 19.5709 2.78625 18.7861C1.86647 18.0012 1.25594 16.9134 1.06431 15.7179C0.872685 14.5224 1.11251 13.2975 1.74072 12.2634C2.36892 11.2292 3.34435 10.4534 4.49184 10.0753C4.19703 8.56106 4.50172 6.99124 5.3414 5.69827C6.18108 4.40531 7.48981 3.49073 8.99044 3.1482C10.4911 2.80568 12.0658 3.06211 13.3811 3.86319C14.6964 4.66428 15.6491 5.9471 16.0373 7.44003C16.6375 7.24433 17.2804 7.22079 17.8933 7.37205C18.5062 7.52331 19.0647 7.84335 19.5057 8.29603C19.9467 8.7487 20.2527 9.31597 20.389 9.9337
57C20.5254 10.5516 20.4867 11.1953 20.2773 11.7922C21.2009 12.1459 21.972 12.8125 22.4566 13.6764C22.9412 14.5403 23.1089 15.5471 22.9305 16.522C22.7522 17.4969 22.239 18.3784 21.4801 19.0137C20.7211 19.649 19.7643 19.9979 18.7756 20H6.08268Z`})}),cD=e=>(0,U.jsx)(OE,{title:`Menu`,...e,children:(0,U.jsx)(`path`,{d:`M3.75 6.75H20.25M3.75 12H20.25M3.75 17.25H20.25`})}),lD=e=>(0,U.jsx)(OE,{title:`Organization`,...e,children:(0,U.jsx)(`path`,{d:`M3.75 21H20.25M4.5 3H19.5M5.25 3V21M18.75 3V21M9 6.75H10.5M9 9.75H10.5M9 12.75H10.5M13.5 6.75H15M13.5 9.75H15M13.5 12.75H15M9 21V17.625C9 17.004 9.504 16.5 10.125 16.5H13.875C14.496 16.5 15 17.004 15 17.625V21`})}),uD=e=>(0,U.jsx)(OE,{title:`Metrics`,...e,children:(0,U.jsx)(`path`,{d:`M16 8V16M12 11V16M8 14V16M6 20H18C18.5304 20 19.0391 19.7893 19.4142 19.4142C19.7893 19.0391 20 18.5304 20 18V6C20 5.46957 19.7893 4.96086 19.4142 4.58579C19.0391 4.21071 18.5304 4 18 4H6C5.46957 4 4.96086 4.21071 4.58579 4.58579C4.21071 4.96086 4 5.46957 4 6V18C4 18.5304 4.21071 19.0391 4.58579 19.4142C4.96086 19.7893 5.46957 20 6 20Z`})}),dD=e=>TE()?(0,U.jsx)(kE,{title:`Security & Compliance`,...e,children:(0,U.jsx)(`path`,{d:`M7.22224 10.2045L9.0741 12.0901L12.7778 8.31896M17.9796 4.53271C15.052 4.69102 12.1822 3.66026 10 1.66663C7.81786 3.66026 4.94808 4.69102 2.02039 4.53271C1.78478 5.46147 1.66593 6.41693 1.66669 7.37617C1.66669 12.6473 5.20743 17.0775 10 18.3333C14.7926 17.0775 18.3334 12.6483 18.3334 7.37617C18.3334 6.39378 18.2102 5.44156 17.9796 4.53271Z`})}):(0,U.jsx)(OE,{title:`Security & Compliance`,...e,children:(0,U.jsx)(`path`,{d:`M8.66667 12.2455L10.8889 14.5082L15.3333 9.9828M21.5756 5.4393C18.0623 5.62927 14.6186 4.39237 12 2C9.38141 4.39237 5.93767 5.62927 2.42445 5.4393C2.14171 6.55381 1.99909 7.70036 2 8.85145C2 15.1768 6.24889 20.493 12 22C17.7511 20.493 22 15.178 22 8.85145C22 7.67259 21.8522 6.52992 21.5756 5.4393Z`})}),fD=({color:e,variant:t=`base`,...n})=>{if(TE()){let r=e??EE;return(0,U.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,width:DE(t),height:DE(t),fill:`none`,...n,children:[(0,U.jsx)(`title`,{children:`Endpoints`}),(0,U.jsx)(`path`,{d:`M14.3091 16.2334C14.5784 16.6676 14.9511 17.0295 15.395 17.2842C13.9304 18.4983 12.0516 19.2304 10.0005 19.2305L9.56494 19.2197C7.68267 19.1244 5.96285 18.4137 4.60205 17.2852C4.66824 17.2473 4.73437 17.2095 4.79736 17.167C5.12472 16.9458 5.40725 16.6633 5.62842 16.3359C5.65072 16.3029 5.66891 16.2673 5.68994 16.2334C6.87571 17.1699 8.37221 17.7305 10.0005 17.7305C11.6283 17.7304 13.1237 17.1695 14.3091 16.2334ZM6.9292 2.88574C6.92532 2.949 6.92334 3.01291 6.92334 3.07715C6.92336 3.54598 7.0307 3.98905 7.21826 4.38672C4.75831 5.46053 3.03863 7.91405 3.03857 10.7695C3.03859 11.0293 3.05381 11.2857 3.08154 11.5381C3.08001 11.5381 3.07819 11.5381 3.07666 11.5381C2.65198 11.5381 2.2474 11.6246 1.87939 11.7803C1.78919 11.8184 1.70129 11.861 1.61572 11.9072C1.58459 11.6757 1.56132 11.4412 1.54932 11.2041L1.53857 10.7695C1.53864 7.18017 3.77488 4.11551 6.9292 2.88574ZM13.0698 2.88477C16.2247 4.11422 18.4614 7.17963 18.4614 10.7695L18.4507 11.2041C18.4387 11.4409 18.4144 11.675 18.3833 11.9062C17.9489 11.6716 17.4517 11.5381 16.9233 11.5381C16.9215 11.5381 16.9194 11.5381 16.9175 11.5381C16.9452 11.2857 16.9614 11.0293 16.9614 10.7695C16.9614 7.91361 15.2411 5.46028 12.7808 4.38672C12.9684 3.98895 13.0766 3.54614 13.0767 3.07715C13.0767 3.01256 13.0737 2.94837 13.0698 2.88574Z`,fill:r}),(0,U.jsx)(`circle`,{cx:`10`,cy:`3.07692`,r:`2.32692`,stroke:r,strokeWidth:`1.5`}),(0,U.jsx)(`circle`,{cx:`16.9231`,cy:`14.6154`,r:`2.32692`,stroke:r,strokeWidth:`1.5`}),(0,U.jsx)(`circle`,{cx:`3.07692`,cy:`14.6154`,r:`2.32692`,stroke:r,strokeWidth:`1.5`})]})}return(0,U.jsxs)(OE,{title:`Endpoints`,color:e,variant:t,...n,children:[(0,U.jsx)(`path`,{d:`M21.1538 12.9231C21.1538 17.9786 17.0555 22.0769 12 22.0769C6.94447 22.0769 2.84615 17.9786 2.84615 12.9231C2.84615 7.86754 6.94447 3.76923 12 3.76923C17.0555 3.76923 21.1538 7.86754 21.1538 12.9231Z`}),(0,U.jsx)(`circle`,{cx:`12`,cy:`3.69231`,r:`2.69231`,fill:`white`}),(0,U.jsx)(`circle`,{cx:`20.3077`,cy:`17.5385`,r:`2.69231`,fill:`white`}),(0,U.jsx)(`circle`,{cx:`3.69231`,cy:`17.5385`,r:`2.69231`,fill:`white`})]})},pD=e=>TE()?(0,U.jsxs)(kE,{title:`Services`,...e,children:[(0,U.jsx)(`path`,{d:`M8.63636 18.6364L1.36364 11.3636C1.00198 11.002 0.798798 10.5115 0.798799 10C0.798799 9.48854 1.00198 8.99802 1.36363 8.63637L8.63636 1.36364C8.99802 1.00198 9.48854 0.7988 10 0.7988C10.5115 0.7988 11.002 1.00198 11.3636 1.36364L18.6364 8.63637C18.998 8.99802 19.2012 9.48854 19.2012 10C19.2012 10.5115 18.998 11.002 18.6364 11.3636L11.3636 18.6364C11.002 18.998 10.5115 19.2012 10 19.2012C9.48854 19.2012 8.99802 18.998 8.63636 18.6364Z`}),(0,U.jsx)(`path`,{d:`M11.8454 7.68188L14.5454 9.95461L11.8454 12.2273M8.15453 12.2273L5.45453 9.95461L8.15453 7.68188`})]}):(0,U.jsxs)(OE,{title:`Services`,...e,children:[(0,U.jsx)(`path`,{d:`M10.3636 22.3636L1.63637 13.6364
5C1.20238 13.2024 0.958566 12.6138 0.958566 12C0.958567 11.3862 1.20238 10.7976 1.63637 10.3636L10.3636 1.63636C10.7976 1.20237 11.3863 0.95856 12 0.95856C12.6138 0.95856 13.2024 1.20237 13.6364 1.63636L22.3636 10.3636C22.7976 10.7976 23.0414 11.3862 23.0414 12C23.0414 12.6138 22.7976 13.2024 22.3636 13.6364L13.6364 22.3636C13.2024 22.7976 12.6138 23.0414 12 23.0414C11.3863 23.0414 10.7976 22.7976 10.3636 22.3636Z`}),(0,U.jsx)(`path`,{d:`M14.2145 9.2182L17.4545 11.9455L14.2145 14.6727M9.78546 14.6727L6.54546 11.9455L9.78546 9.2182`})]}),Mle=e=>(0,U.jsxs)(OE,{title:`Certificates`,...e,children:[(0,U.jsx)(`path`,{d:`M12 15C15.866 15 19 11.866 19 8C19 4.13401 15.866 1 12 1C8.13401 1 5 4.13401 5 8C5 11.866 8.13401 15 12 15Z`}),(0,U.jsx)(`path`,{d:`M8.21 13.89L7 23L12 20L17 23L15.79 13.88`})]}),mD=e=>TE()?(0,U.jsx)(kE,{title:`LLM Gateway`,viewBox:`0 0 18 18`,...e,children:(0,U.jsx)(`path`,{d:`M12 3.24569C12.663 3.24569 13.2989 3.50909 13.7678 3.97793C14.2366 4.44677 14.5 5.08265 14.5 5.74569M17 5.74569C17.0001 6.47496 16.8407 7.19541 16.5329 7.85655C16.2252 8.51769 15.7765 9.1035 15.2184 9.57291C14.6603 10.0423 14.0063 10.384 13.3022 10.5739C12.5981 10.7638 11.861 10.7974 11.1425 10.6724C10.6733 10.5915 10.1767 10.694 9.84 11.0307L7.625 13.2457H5.75V15.1207H3.875V16.9957H0.75V14.6474C0.75 14.1499 0.9475 13.6724 1.29917 13.3215L6.715 7.90569C7.05167 7.56903 7.15417 7.07236 7.07333 6.60319C6.95516 5.92083 6.98003 5.22136 7.14636 4.54911C7.31268 3.87687 7.61684 3.2465 8.03956 2.69796C8.46228 2.14943 8.99434 1.69469 9.60202 1.36256C10.2097 1.03043 10.8797 0.828152 11.5697 0.768552C12.2596 0.708952 12.9544 0.793326 13.6101 1.01633C14.2657 1.23933 14.8679 1.59609 15.3784 2.06401C15.8889 2.53193 16.2967 3.1008 16.5758 3.73457C16.855 4.36833 16.9994 5.05318 17 5.74569V5.74569Z`})}):(0,U.jsx)(OE,{title:`CLI SSO Token`,...e,children:(0,U.jsx)(`path`,{d:`M15.75 5.25C16.5456 5.25 17.3087 5.56607 17.8713 6.12868C18.4339 6.69129 18.75 7.45435 18.75 8.25M21.75 8.25C21.7501 9.12511 21.5588 9.98966 21.1895 10.783C20.8202 11.5764 20.2818 12.2794 19.6121 12.8427C18.9424 13.406 18.1575 13.8159 17.3126 14.0438C16.4677 14.2718 15.5831 14.3121 14.721 14.162C14.158 14.065 13.562 14.188 13.158 14.592L10.5 17.25H8.25V19.5H6V21.75H2.25V18.932C2.25 18.335 2.487 17.762 2.909 17.341L9.408 10.842C9.812 10.438 9.935 9.842 9.838 9.279C9.6962 8.46017 9.72604 7.6208 9.92563 6.81411C10.1252 6.00741 10.4902 5.25097 10.9975 4.59273C11.5047 3.93448 12.1432 3.38879 12.8724 2.99024C13.6016 2.59168 14.4057 2.34895 15.2336 2.27743C16.0616 2.20591 16.8953 2.30716 17.6821 2.57476C18.4688 2.84236 19.1914 3.27048 19.8041 3.83198C20.4167 4.39348 20.906 5.07613 21.241 5.83665C21.5759 6.59717 21.7493 7.41898 21.75 8.25V8.25Z`})}),hD=e=>(0,U.jsxs)(OE,{title:`Restricted`,...e,children:[(0,U.jsx)(`rect`,{x:`3`,y:`11`,width:`18`,height:`11`,rx:`2`,ry:`2`}),(0,U.jsx)(`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`})]}),gD=e=>(0,U.jsx)(OE,{title:`GitHub`,...e,children:(0,U.jsx)(`path`,{d:`M9 19C4 20.5 4 16.5 2 16M16 22V18.13C16.0375 17.6532 15.9731 17.1738 15.811 16.7238C15.6489 16.2738 15.3929 15.8634 15.06 15.52C18.2 15.17 21.5 13.98 21.5 8.52C21.4997 7.12383 20.9627 5.7812 20 4.77C20.4559 3.54851 20.4236 2.19835 19.91 1C19.91 1 18.73 0.650001 16 2.48C13.708 1.85882 11.292 1.85882 9 2.48C6.27 0.650001 5.09 1 5.09 1C4.57638 2.19835 4.54414 3.54851 5 4.77C4.03013 5.7887 3.49252 7.14346 3.5 8.55C3.5 13.97 6.8 15.16 9.94 15.55C9.611 15.89 9.35726 16.2954 9.19531 16.7399C9.03335 17.1844 8.96681 17.6581 9 18.13V22`})}),Nle=e=>(0,U.jsx)(OE,{title:`Source`,...e,children:(0,U.jsx)(`path`,{d:`M16.24 7.75999C16.7979 8.31723 17.2404 8.97896 17.5424 9.70735C17.8443 10.4357 17.9997 11.2165 17.9997 12.005C17.9997 12.7935 17.8443 13.5742 17.5424 14.3026C17.2404 15.031 16.7979 15.6928 16.24 16.25M7.76 16.24C7.20214 15.6828 6.75959 15.021 6.45764 14.2926C6.1557 13.5642 6.00028 12.7835 6.00028 11.995C6.00028 11.2065 6.1557 10.4257 6.45764 9.69735C6.75959 8.96896 7.20214 8.30723 7.76 7.74999M19.07 4.92999C20.9447 6.80527 21.9979 9.34835 21.9979 12C21.9979 14.6516 20.9447 17.1947 19.07 19.07M4.93 19.07C3.05529 17.1947 2.00214 14.6516 2.00214 12C2.00214 9.34835 3.05529 6.80527 4.93 4.92999M14 12C14 13.1046 13.1046 14 12 14C10.8954 14 10 13.1046 10 12C10 10.8954 10.8954 10 12 10C13.1046 10 14 10.8954 14 12Z`})}),Ple=e=>(0,U.jsxs)(OE,{strokeWidth:`1.5`,title:`Diff`,...e,children:[(0,U.jsx)(`path`,{d:`M3 3.25L3 20.75C3 21.44 3.6048 22 4.35 22L19.65 22C20.3952 22 21 21.44 21 20.75L21 3.25C21 2.56 20.3952 2 19.65 2L4.35 2C3.6048 2 3 2.56 3 3.25Z`}),(0,U.jsx)(`path`,{d:`M15.25 9.25L8.75 9.25M12 12.5L12 6`}),(0,U.jsx)(`path`,{d:`M8.75 17L15.25 17`})]}),Fle=e=>(0,U.jsxs)(OE,{strokeWidth:`1.5`,title:`Map`,...e,children:[(0,U.jsx)(`path`,{d:`M1 6V22L8 18L16 22L23 18V2L16 6L8 2L1 6Z`}),(0,U.jsx)(`path`,{d:`M8 2V18`}),(0,U.jsx)(`path`,{d:`M16 6V22`})]}),_D=e=>(0,U.jsxs)(OE,{strokeWidth:`1.5`,title:`Home`,...e,children:[(0,U.jsx)(`path`,{d:`M3 9L12 2L21 9V20C21 20.5304 20.7893 21.0391 20.4142 21.4142C20.0391 21.7893 19.5304 22 19 22H5C4.46957 22 3.96086 21.7893 3.58579 21.4142C3.21071 21.0391 3 20.5304 3 20V9Z`}),(0,U.jsx)(`path`,{d:`M9 22V12H15V22`})]}),Ile=e=>(0,U.jsx)(OE,{strokeWidth:`1.5`,title:`Zoom to Fit`,...e,children:(0,U.jsx)(`path`,{d:`M8 3H5C4.46957 3 3.96086 3.21071 3.58579 3.58579C3.21071 3.96086 3 4.46957 3 5V8M21 8V5C21 4.46957 20.7893 3.96086 20.4142 3.58579C20.0391 3.21071 19.5304 3 19 3H16M16 21H19C19.5304 21 20.0391 20.7893 20.4142 20.4142C20.7893 20.0391 21 19.5304 21 19V16M3 16V19C3 19.5304 3.21071 20.0391 3.58579 20.4142C3.96086 20.7893 4.46957 21 5 21H8`})}),vD=e=>(0,U.jsxs)(OE,{strokeWidth:`1.5`,title:`Show`,...e,children:[(0,U.jsx)(`path`,{d:`M1 12C1 12 5 4 12 4C19 4 23 12 23 12C23 12 19 20 12 20C5 20 1 12 1 12Z`}),(0,U.jsx)(`path`,{d:`M12 15C13.6569 15 15 13.6569 15 12C15 10.3431 13.6569 9 12 9C10.3431 9 9 10.3431 9 12C9 13.6569 10.3431 15 12 15Z`})]}),yD=e=>(0,U.jsxs)(OE,{strokeWidth:`1.5`,title:`Hide`,...e,children:[(0,U.jsx)(`path`,{d:`M17.94 17.94C16.2306 19.243 14.1491 19.9649 12 20C5 20 1 12 1 12C2.24389 9.68192 3.96914 7.65663
56.06 6.06003M9.9 4.24002C10.5883 4.0789 11.2931 3.99836 12 4.00003C19 4.00003 23 12 23 12C22.393 13.1356 21.6691 14.2048 20.84 15.19M14.12 14.12C13.8454 14.4148 13.5141 14.6512 13.1462 14.8151C12.7782 14.9791 12.3809 15.0673 11.9781 15.0744C11.5753 15.0815 11.1752 15.0074 10.8016 14.8565C10.4281 14.7056 10.0887 14.4811 9.80385 14.1962C9.51897 13.9113 9.29439 13.572 9.14351 13.1984C8.99262 12.8249 8.91853 12.4247 8.92563 12.0219C8.93274 11.6191 9.02091 11.2219 9.18488 10.8539C9.34884 10.4859 9.58525 10.1547 9.88 9.88003`}),(0,U.jsx)(`path`,{d:`M3 3L21 21`})]}),Lle=e=>(0,U.jsxs)(OE,{strokeWidth:`1.5`,title:`Center`,...e,children:[(0,U.jsx)(`path`,{d:`M21.25 12C21.25 17.1086 17.1086 21.25 12 21.25C6.89137 21.25 2.75 17.1086 2.75 12C2.75 6.89137 6.89137 2.75 12 2.75C17.1086 2.75 21.25 6.89137 21.25 12Z`}),(0,U.jsx)(`path`,{d:`M21 12H18`}),(0,U.jsx)(`path`,{d:`M6 12H3`}),(0,U.jsx)(`path`,{d:`M12 6V3`}),(0,U.jsx)(`path`,{d:`M12 21V18`}),(0,U.jsx)(`path`,{d:`M14.25 12C14.25 13.2426 13.2426 14.25 12 14.25C10.7574 14.25 9.75 13.2426 9.75 12C9.75 10.7574 10.7574 9.75 12 9.75C13.2426 9.75 14.25 10.7574 14.25 12Z`,fill:`#111920`})]}),bD=e=>(0,U.jsxs)(OE,{strokeWidth:`1.5`,title:`Commit`,...e,children:[(0,U.jsx)(`path`,{d:`M12 16C14.2091 16 16 14.2091 16 12C16 9.79086 14.2091 8 12 8C9.79086 8 8 9.79086 8 12C8 14.2091 9.79086 16 12 16Z`}),(0,U.jsx)(`path`,{d:`M1.05 12H7`}),(0,U.jsx)(`path`,{d:`M17.01 12H22.96`})]}),Rle=e=>(0,U.jsxs)(OE,{title:`External Resource`,...e,children:[(0,U.jsx)(`path`,{d:`M4 7L20 7L20 3L4 3L4 7Z`}),(0,U.jsx)(`path`,{d:`M8 14L16 14L16 10L8 10L8 14Z`}),(0,U.jsx)(`path`,{d:`M10 21L14 21L14 17L10 17L10 21Z`}),(0,U.jsx)(`path`,{d:`M12 10L12 7`}),(0,U.jsx)(`path`,{d:`M12 17L12 14`})]}),xD=e=>(0,U.jsx)(OE,{color:`#4361FF`,strokeWidth:`1.5`,title:`Over-provisioned`,viewBox:`0 0 16 16`,...e,children:(0,U.jsx)(`path`,{d:`M12.6663 9.33333L7.99967 14M7.99967 14L3.33301 9.33333M7.99967 14V2`})}),SD=e=>(0,U.jsx)(OE,{color:`#AD1A1A`,strokeWidth:`1.5`,title:`Under-provisioned`,viewBox:`0 0 16 16`,...e,children:(0,U.jsx)(`path`,{d:`M3.33301 6.66667L7.99967 2M7.99967 2L12.6663 6.66667M7.99967 2V14`})}),CD=e=>
5(0,U.jsx)(OE,{strokeWidth:`1.5`,title:`Scale Check`,viewBox:`0 0 16 16`,...e,children:(0,U.jsx)(`path`,{d:`M3 8.5L7 12.5L13 3.5`})}),wD=e=>(0,U.jsxs)(OE,{color:`#825804`,strokeWidth:`1.5`,title:`Queued`,viewBox:`0 0 16 16`,...e,children:[(0,U.jsx)(`circle`,{cx:`8`,cy:`8`,r:`6`}),(0,U.jsx)(`path`,{d:`M8 5V8L10.5 9.5`})]}),zle=e=>(0,U.jsx)(OE,{title:`Diagnostics`,viewBox:`0 0 24 24`,...e,children:(0,U.jsx)(`path`,{d:`M16.5 7.5V16.5M12 10.875V16.5M7.5 14.25V16.5M5.25 21H18.75C19.3467 21 19.919 20.7629 20.341 20.341C20.7629 19.919 21 19.3467 21 18.75V5.25C21 4.65326 20.7629 4.08097 20.341 3.65901C19.919 3.23705 19.3467 3 18.75 3H5.25C4.65326 3 4.08097 3.23705 3.65901 3.65901C3.23705 4.08097 3 4.65326 3 5.25V18.75C3 19.3467 3.23705 19.919 3.65901 20.341C4.08097 20.7629 4.65326 21 5.25 21Z`})}),TD=e=>(0,U.jsxs)(OE,{strokeWidth:`0.5`,fill:`#111920`,title:`AI`,...e,children:[(0,U.jsx)(`path`,{d:`M9.813 15.904L9 18.75L8.187 15.904C7.97687 15.1689 7.5829 14.4994 7.04226 13.9587C6.50162 13.4181 5.83214 13.0241 5.097 12.814L2.25 12L5.096 11.187C5.83114 10.9769 6.50062 10.5829 7.04126 10.0423C7.5819 9.50162 7.97587 8.83214 8.186 8.097L9 5.25L9.813 8.096C10.0231 8.83114 10.4171 9.50062 10.9577 10.0413C11.4984 10.5819 12.1679 10.9759 12.903 11.186L15.75 12L12.904 12.813C12.1689 13.0231 11.4994 13.4171 10.9587 13.9577C10.4181 14.4984 10.0241 15.1679 9.814 15.903L9.813 15.904Z`}),(0,U.jsx)(`path`,{d:`M18.259 8.715L18 9.75L17.741 8.715C17.5927 8.12159 17.286 7.57962 16.8536 7.14703C16.4212 6.71444 15.8794 6.40749 15.286 6.259L14.25 6L15.286 5.741C15.8794 5.59251 16.4212 5.28556 16.8536 4.85297C17.286 4.42038 17.5927 3.87841 17.741 3.285L18 2.25L18.259 3.285C18.4073 3.87854 18.7142 4.42059 19.1468 4.85319C19.5794 5.28579 20.1215 5.59267 20.715 5.741L21.75 6L20.715 6.259C20.1215 6.40733 19.5794 6.71421 19.1468 7.14681C18.7142 7.57941 18.4073 8.12147 18.259 8.715Z`}),(0,U.jsx)(`path`,{d:`M16.894 20.567L16.5 21.75L16.106 20.567C15.9955 20.2356 15.8094 19.9345 15.5625 19.6875C15.3155 19.4406 15.0144 19.2545 14.683 19.144L13.5 18.75L14.683 18.356C15.0144 18.2455 15.3155 18.0594 15.5625 17.8125C15.8094 17.5655 15.9955 17.2644 16.106 16.933L16.5 15.75L16.894 16.933C17.0045 17.2644 17.1906 17.5655 17.4375 17.8125C17.6845 18.0594 17.9856 18.2455 18.317 18.356L19.5 18.75L18.317 19.144C17.9856 19.2545 17.6845 19.4406 17.4375 19.6875C17.1906 19.9345 17.0045 20.2356 16.894 20.567Z`})]}),ED=e=>(0,U.jsxs)(OE,{title:`Calendar`,...e,children:[(0,U.jsx)(`rect`,{x:`3`,y:`4`,width:`18`,height:`18`,rx:`2`,ry:`2`}),(0,U.jsx)(`line`,{x1:`16`,y1:`2`,x2:`16`,y2:`6`}),(0,U.jsx)(`line`,{x1:`8`,y1:`2`,x2:`8`,y2:`6`}),(0,U.jsx)(`line`,{x1:`3`,y1:`10`,x2:`21`,y2:`10`})]}),DD=e=>(0,U.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`32`,height:`32`,viewBox:`0 0 32 32`,fill:`none`,"aria-label":`AWS Icon`,role:`img`,...e,children:[(0,U.jsx)(`rect`,{width:`32`,height:`32`,rx:`4`,fill:`#F3F4F6`}),(0,U.jsx)(`path`,{d:`M10.4406 13.7011C10.4406 14.0242 10.4757 14.2861 10.5372 14.4782C10.6075 14.6702 10.6953 14.8798 10.8182 15.1068C10.8621 15.1766 10.8797 15.2465 10.8797 15.3076C10.8797 15.3949 10.827 15.4822 10.7128 15.5695L10.1596 15.9362C10.0806 15.9886 10.0016 16.0148 9.93131 16.0148C9.8435 16.0148 9.75568 15.9711 9.66787 15.8925C9.54494 15.7616 9.43956 15.6219 9.35175 15.4822C9.26394 15.3338 9.17612 15.1679 9.07953 14.9671C8.3946 15.7703 7.53404 16.1719 6.49785 16.1719C5.76023 16.1719 5.17189 15.9624 4.74161 15.5433C4.31133 15.1242 4.0918 14.5655 4.0918 13.867C4.0918 13.1249 4.35523 12.5225 4.89089 12.0685C5.42654 11.6145 6.13782 11.3875 7.04229 11.3875C7.34085 11.3875 7.64819 11.4137 7.9731 11.4573C8.298 11.501 8.63169 11.5708 8.98294 11.6494V11.0121C8.98294 10.3486 8.84244 9.88583 8.57022 9.61518C8.28922 9.34452 7.81503 9.21356 7.13888 9.21356C6.83154 9.21356 6.51541 9.24849 6.19051 9.32706C5.8656 9.40564 5.54948 9.50168 5.24214 9.62391C5.10164 9.68502 4.99626 9.71994 4.93479 9.7374C4.87333 9.75487 4.82942 9.7636 4.79429 9.7636C4.67136 9.7636 4.60989 9.67629 4.60989 9.49295V9.06514C4.60989 8.92545 4.62745 8.82068 4.67136 8.75957C4.71526 8.69845 4.79429 8.63734 4.91723 8.57622C5.22457 8.41907 5.59339 8.28811 6.02367 8.18334C6.45395 8.06985 6.91057 8.01746 7.39354 8.01746C8.4385 8.01746 9.20247 8.25319 9.69422 8.72465C10.1772 9.1961 10.4231 9.91202 10.4231 10.8724V13.7011H10.4406ZM6.87544 15.0282C7.16522 15.0282 7.46379 14.9758 7.77991 14.871C8.09603 14.7663 8.37703 14.5742 8.61413 14.3123C8.75463 14.1464 8.86 13.9631 8.91269 13.7535C8.96537 13.544 9.0005 13.2908 9.0005 12.9939V12.6273C8.74584 12.5661 8.47363 12.5138 8.19263 12.4788C7.91163 12.4439 7.63941 12.4265 7.36719
512.4265C6.77885 12.4265 6.34857 12.54 6.05879 12.7757C5.76901 13.0114 5.62851 13.3432 5.62851 13.7797C5.62851 14.19 5.73389 14.4956 5.95342 14.7052C6.16417 14.9234 6.47151 15.0282 6.87544 15.0282ZM13.9268 15.9711C13.7687 15.9711 13.6633 15.9449 13.5931 15.8838C13.5228 15.8314 13.4614 15.7092 13.4087 15.5433L11.3451 8.79449C11.2924 8.61988 11.2661 8.50638 11.2661 8.44526C11.2661 8.30557 11.3363 8.227 11.4768 8.227H12.3374C12.5042 8.227 12.6184 8.25319 12.6798 8.3143C12.7501 8.36669 12.8028 8.48892 12.8555 8.6548L14.3307 14.4345L15.7006 8.6548C15.7445 8.48019 15.7972 8.36669 15.8674 8.3143C15.9377 8.26192 16.0606 8.227 16.2187 8.227H16.9212C17.088 8.227 17.2022 8.25319 17.2724 8.3143C17.3427 8.36669 17.4041 8.48892 17.4393 8.6548L18.8267 14.5044L20.3458 8.6548C20.3985 8.48019 20.46 8.36669 20.5215 8.3143C20.5917 8.26192 20.7059 8.227 20.8639 8.227H21.6806C21.8211 8.227 21.9001 8.29684 21.9001 8.44526C21.9001 8.48892 21.8913 8.53257 21.8826 8.58496C21.8738 8.63734 21.8562 8.70718 21.8211 8.80322L19.7048 15.552C19.6521 15.7266 19.5907 15.8401 19.5204 15.8925C19.4502 15.9449 19.336 15.9798 19.1867 15.9798H18.4315C18.2647 15.9798 18.1505 15.9536 18.0803 15.8925C18.01 15.8314 17.9486 15.7179 17.9134 15.5433L16.5524 9.91202L15.2 15.5346C15.1561 15.7092 15.1034 15.8227 15.0332 15.8838C14.9629 15.9449 14.84 15.9711 14.6819 15.9711H13.9268ZM25.2106 16.2068C24.754 16.2068 24.2974 16.1545 23.8583 16.0497C23.4193 15.9449 23.0768 15.8314 22.8485 15.7005C22.708 15.6219 22.6114 15.5346 22.5763 15.456C22.5411 15.3774 22.5236 15.2901 22.5236 15.2115V14.7663C22.5236 14.5829 22.5938 14.4956 22.7255 14.4956C22.7782 14.4956 22.8309 14.5044 22.8836 14.5218C22.9363 14.5393 23.0153 14.5742 23.1031 14.6091C23.4017 14.7401 23.7266 14.8449 24.0691 14.9147C24.4203 14.9845 24.7628 15.0195 25.114 15.0195C25.6673 15.0195 26.0975 14.9234 26.3961 14.7314C26.6947 14.5393 26.8527 14.2599 26.8527 13.9019C26.8527 13.6575 26.7737 13.4567 26.6156 13.2908C26.4576 13.1249 26.159 12.9765 25.7287 12.8368L24.4554 12.4439C23.8144 12.2431 23.3402 11.9463 23.0505 11.5534C22.7607 11.1692 22.6114 10.7414 22.6114 10.2874C22.6114 9.92075 22.6904 9.59771 22.8485 9.31833C23.0065 9.03895 23.2173 8.79449 23.4807 8.60242C23.7442 8.40161 24.0427 8.25319 24.394 8.14842C24.7452 8.04365 25.114 8 25.5004 8C25.6936 8 25.8956 8.00873 26.0888 8.03492C26.2907 8.06111 26.4751 8.09604 26.6595 8.13096C26.8352 8.17461 27.002 8.21827 27.1601 8.27065C27.3181 8.32304 27.4411 8.37542 27.5289 8.4278C27.6518 8.49765 27.7396 8.56749 27.7923 8.64607C27.845 8.71592 27.8713 8.81195 27.8713 8.93418V9.34452C27.8713 9.52787 27.8011 9.62391 27.6694 9.62391C27.5991 9.62391 27.485 9.58898 27.3357 9.51914C26.8352 9.29214 26.2732 9.17864 25.6497 9.17864C25.1492 9.17864 24.754 9.25722 24.4818 9.4231C24.2096 9.58898 24.0691 9.84217 24.0691 10.2001C24.0691 10.4446 24.1569 10.6541 24.3325 10.82C24.5081 10.9859 24.833 11.1518 25.2984 11.3002L26.5454 11.6931C27.1776 11.8939 27.6343 12.1733 27.9065 12.5312C28.1787 12.8892 28.3104 13.2995 28.3104 13.7535C28.3104 14.1289 28.2314 14.4694 28.0821 14.7663C27.924 15.0631 27.7133 15.325 27.4411 15.5346C27.1688 15.7528 26.8439 15.91 26.4663 16.0235C26.0712 16.1457 25.6585 16.2068 25.2106 16.2068Z`,fill:`#252F3E`}),(0,U.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M26.8702 20.4501C23.9812 22.5717 19.7837 23.698 16.1746 23.698C11.1167 23.698 6.55921 21.8383 3.11697 18.7477C2.84475 18.5032 3.09062 18.1714 3.41553 18.3635C7.13877 20.5113 11.7313 21.8121 16.482 21.8121C19.6871 21.8121 23.2084 21.1486 26.4487 19.7866C26.9316 19.5683 27.3444 20.1009 26.8702 20.4501Z`,fill:`#FF9900`}),(0,U.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M28.0731 19.0882C27.7043 18.6167 25.632 18.8612 24.6924 18.9747C24.4114 19.0096 24.3675 18.7651 24.6221 18.5818C26.273 17.4293 28.9864 17.7611 29.3025 18.1453C29.6186 18.5381 29.2147 21.2359 27.6692 22.5281C27.4321 22.7289 27.2038 22.6241 27.3092 22.3622C27.6604 21.4978 28.442 19.5509 28.0731 19.0882Z`,fill:`#FF9900`})]}),OD=e=>(0,U.jsx)(OE,{strokeWidth:`1.5`,title:`Cube`,...e,children:(0,U.jsx)(`path`,{d:`M22.1538 6.92308L12 1L1.84615 6.92308M22.1538 6.92308L12 12.8462M22.1538 6.92308V17.0769L12 23M1.84615 6.92308L12 12.8462M1.84615 6.92308V17.0769L12 23M12 12.8462V23`})}),kD=e=>(0,U.jsx)(OE,{strokeWidth:`1.5`,title:`Users`,...e,children:(0,U.jsx)(`path`,{d:`M16.6154 20.3072V18.4611C16.6154 17.4818 16.2264 16.5427 15.5339 15.8502C14.8415 15.1578 13.9023 14.7688 12.9231 14.7688H5.53844C4.55918 14.7688 3.62002 15.1578 2.92758 15.8502C2.23514 16.5427 1.84613 17.4818 1.84613 18.4611V20.3072M22.1538 20.3072V18.4611C22.1532 17.643 21.8809 16.8482 21.3797 16.2017C20.8785 15.5551 20.1767 15.0933 19.3846 14.8888M15.6923 3.81184C16.4865 4.01519 17.1905 4.4771 17.6932 5.12474C18.1959 5.77238 18.4688 6.56891 18.4688 7.38876C18.4688 8.20861 18.1959 9.00514 17.6932 9.65278C17.1905 10.3004 16.4865 10.7623 15.6923 10.9657M12.9231 7.38414C12.9231 9.42335 11.27 11.0764 9.23075 11.0764C7.19154 11.0764 5.53844 9.42335 5.53844 7.38414C5.53844 5.34494 7.19154 3.69183 9.23075 3.69183C11.27 3.69183 12.9231 5.34494 12.9231 7.38414Z`})}),AD=e=>(0,U.jsx)(OE,{strokeWidth:`1.5`,title:`Arrow Up`,...e,children:(0,U.jsx)(`path`,{d:`M5 10L12 3M12 3L19 10M12 3V21`})}),jD=e=>(0,U.jsx)(OE,{strokeWidth:`1.5`,title:`Arrow Down`,...e,children:(0,U.jsx)(`path`,{d:`M19 14L12 21M12 21L5 14M12 21V3`})}),Ble=e=>(0,U.jsx)(OE,{strokeWidth:`1.5`,title:`Duplicate`,...e,children:(0,U.jsx)(`path`,{d:`M8 16H6C5.46957 16 4.96086 15.7893 4.58579 15.4142C4.21071 15.0391 4 14.5304 4 14V6C4 5.46957 4.21071 4.96086 4.58579 4.58579C4.96086 4.21071 5.46957 4 6 4H14C14.5304 4 15.0391 4.21071 15.4142 4.58579C15.7893 4.96086 16 5.46957 16 6V8M10 20H18C18.5304 20 19.0391 19.7893 19.4142 19.4142C19.7893 19.0391 20 18.5304 20 18V10C20 9.46957 19.7893 8.96086 19.4142 8.58579C19.0391 8.21071 18.5304 8 18 8H10C9.46957 8 8.96086 8.21071 8.58579 8.58579C8.21071 8.96086 8 9.46957 8 10V18C8 18.5304 8.21071 19.0391 8.58579 19.4142C8.96086 19.7893 9.46957 20 10 20Z`})}),Vle=e=>(0,U.jsx)(OE,{strokeWidth:`1.5`,title:`Card`,...e,children:(0,U.jsx)(`path`,{d:`M2.25 8.25H21.75M2.25 9H21.75M6.25 15.25H11.25M4.5 19.5H19.5C20.0967 19.5 20.669 19.2629 21.091 18.841C21.5129 18.419 21.75 17.8467 21.75 17.25V6.75C21.75 6.15326 21.5129 5.58097 21.091 5.15901C20.669 4.73705 20.0967 4.5 19.5 4.5H4.5C3.90326 4.5 3.33097 4.73705 2.90901 5.15901C2.48705 5.58097 2.25 6.15326 2.25 6.75V17.25C2.25 17.8467 2.48705 18.419 2.90901 18.841C3.33097 19.2629 3.90326 19.5 4.5 19.5Z`})}),MD=e=>(0,U.jsx)(OE,{strokeWidth:`1.5`,title:`Circle Stack`,...e,children:(0,U.jsx)(`path`,{d:`M20.8846 5.94231C20.8846 8.39554 16.9065 10.3846 12 10.3846C7.09354 10.3846 3.11538 8.39554 3.11538 5.94231M20.8846 5.94231C20.8846 3.48908 16.9065 1.5 12 1.5C7.09354 1.5 3.11538 3.48908 3.11538 5.94231M20.8846 5.94231V18.0577C20.8846 20.5109 16.9065 22.5 12 22.5C7.09354 22.5 3.11538 20.5109 3.11538 18.0577V5.94231M20.8846 5.94231V9.98077M3.11538 5.94231V9.98077M20.8846 9.98077V14.0192C20.8846 16.4725 16.9065 18.4615 12 18.4615C7.09354 18.4615 3.11538 16.4725 3.11538 14.0192V9.98077M20.8846 9.98077C20.8846 12.434 16.9065 14.4231 12 14.4231C7.09354 14.4231 3.11538 12.434 3.11538 9.98077`})}),ND=e=>(0,U.jsx)(OE,{strokeWidth:`1.5`,title:`Chart Square Bar`,...e,children:(0,U.jsx)(`path`,{d:`M16.5 7.5V16.5M12 10.875V16.5M7.5 14.25V16.5M5.25 21H18.75C19.3467 21 19.919 20.7629 20.341 20.341C20.7629 19.919 21 19.3467 21 18.75V5.25C21 4.65326 20.7629 4.08097 20.341 3.65901C19.919 3.23705 19.3467 3 18.75 3H5.25C4.65326 3 4.08097 3.23705 3.65901 3.65901C3.23705 4.08097 3 4.65326 3 5.25V18.75C3 19.3467 3.23705 19.919 3.65901 20.341C4.08097 20.7629 4.65326 21 5.25 21Z`})}),Hle=e=>(0,U.jsx)(OE,{strokeWidth:`1.5`,title:`Pencil`,...e,children:(0,U.jsx)(`path`,{d:`M15.232 5.232L18.768 8.768M16.732 3.732C17.2009 3.2631 17.8369 2.99967 18.5 2.99967C19.1631 2.99967 19.7991 3.2631 20.268 3.732C20.7369 4.2009 21.0003 4.83687 21.0003 5.5C21.0003 6.16313 20.7369 6.7991 20.268 7.268L6.5 21.036H3V17.464L16.732 3.732Z`})}),PD=e=>(0,U.jsxs)(OE,{strokeWidth:`1.5`,title:`Ellipsis Horizontal`,...e,children:[(0,U.jsx)(`path`,{d:`M6.75 12C6.75 12.1989 6.67098 12.3897 6.53033 12.5303C6.38968 12.671 6.19891 12.75 6 12.75C5.80109 12.75 5.61032 12.671 5.46967 12.5303C5.32902 12.3897 5.25 12.1989 5.25 12C5.25 11.8011 5.32902 11.6103 5.46967 11.4697C5.61032 11.329 5.80109 11.25 6 11.25C6.19891 11.25 6.38968 11.329 6.53033 11.4697C6.67098 11.6103 6.75 11.8011 6.75 12Z`}),(0,U.jsx)(`path`,{d:`M12.75 12C12.75 12.1989 12.671 12.3897 12.5303 12.5303C12.3897 12.671 12.1989 12.75 12 12.75C11.8011 12.75 11.6103 12.671 11.4697 12.5303C11.329 12.3897 11.25 12.1989 11.25 12C11.25 11.8011 11.329 11.6103 11.4697 11.4697C11.6103 11.329 11.8011 11.25 12 11.25C12.1989 11.25 12.3897 11.329 12.5303 11.4697C12.671 11.6103 12.75 11.8011 12.75 12Z`}),(0,U.jsx)(`path`,{d:`M18.75 12C18.75 12.1989 18.671 12.3897 18.5303 12.5303C18.3897 12.671 18.1989 12.75 18 12.75C17.8011 12.75 17.6103 12.671 17.4697 12.5303C17.329 12.3897 17.25 12.1989 17.25 12C17.25 11.8011 17.329 11.6103 17.4697 11.4697C17.6103 11.329 17.8011 11.25 18
511.25C18.1989 11.25 18.3897 11.329 18.5303 11.4697C18.671 11.6103 18.75 11.8011 18.75 12Z`})]}),FD=e=>(0,U.jsx)(OE,{strokeWidth:`1.5`,title:`Globe`,...e,children:(0,U.jsx)(`path`,{d:`M12 22C14.2167 21.9999 16.3705 21.2636 18.1234 19.9067C19.8762 18.5498 21.1288 16.6492 21.6844 14.5033M12 22C9.78334 21.9999 7.62949 21.2636 5.87664 19.9067C4.12379 18.5498 2.8712 16.6492 2.31556 14.5033M12 22C14.7611 22 17 17.5222 17 12C17 6.47778 14.7611 2 12 2M12 22C9.23889 22 7 17.5222 7 12C7 6.47778 9.23889 2 12 2M12 2C13.7736 1.99926 15.5155 2.4704 17.0469 3.36507C18.5783 4.25975 19.8441 5.54574 20.7145 7.09111M12 2C10.2264 1.99926 8.48454 2.4704 6.95312 3.36507C5.42171 4.25975 4.1559 5.54574 3.28556 7.09111M20.7145 7.09111C18.2952 9.18659 15.2006 10.3379 12 10.3333C8.66889 10.3333 5.62223 9.11111 3.28556 7.09111M20.7145 7.09111C21.5598 8.58888 22.0027 10.2801 22 12C22 12.8644 21.89 13.7033 21.6844 14.5033M21.6844 14.5033C18.7213 16.146 15.388 17.0053 12 17C8.48667 17 5.18556 16.0944 2.31556 14.5033M2.31556 14.5033C2.10528 13.6855 1.99925 12.8444 2 12C2 10.2167 2.46667 8.54111 3.28556 7.09111`})}),Ule=e=>(0,U.jsx)(OE,{strokeWidth:`1.5`,title:`Bars 3`,...e,children:(0,U.jsx)(`path`,{d:`M3.75 6.75H20.25M3.75 12H20.25M3.75 17.25H20.25`})}),ID=e=>(0,U.jsxs)(OE,{strokeWidth:`1.5`,strokeMiterlimit:`10`,strokeLinecap:`square`,title:`Stack`,...e,children:[(0,U.jsx)(`path`,{d:`M2.90909 7.45455L12 2L21.0909 7.45455L12 12.9091L2.90909 7.45455Z`}),(0,U.jsx)(`path`,{d:`M21.0909 12L12 17.4545L2.90909 12`}),(0,U.jsx)(`path`,{d:`M21.0909 16.5455L12 22L2.90909 16.5455`})]}),Wle=e=>(0,U.jsxs)(OE,{strokeWidth:`1.5`,title:`Unlock`,...e,children:[(0,U.jsx)(`path`,{d:`M19 11H5C3.89543 11 3 11.8954 3 13V20C3 21.1046 3.89543 22 5 22H19C20.1046 22 21 21.1046 21 20V13C21 11.8954 20.1046 11 19 11Z`}),(0,U.jsx)(`path`,{d:`M7 11V6.99997C6.99876 5.76002 7.45828 4.56384 8.28938 3.64364C9.12047 2.72344 10.2638 2.14487 11.4975 2.02026C12.7312 1.89565 13.9671 2.23387 14.9655 2.96928C15.9638 3.70469 16.6533 4.78482 16.9 5.99997`})]}),Gle=e=>(0,U.jsx)(OE,{strokeWidth:`1.5`,title:`Magnifying Glass`,...e,children:(0,U.jsx)(`path`,{d:`M21 21L15.803 15.803M15.803 15.803C17.2096 14.3964 17.9998 12.4887 17.9998 10.4995C17.9998 8.51029 17.2096 6.60256 15.803 5.19599C14.3964 3.78941 12.4887 2.99921 10.4995 2.99921C8.51031 2.99921 6.60258 3.78941 5.196 5.19599C3.78943 6.60256 2.99922 8.51029 2.99922 10.4995C2.99922 12.4887 3.78943 14.3964 5.196 15.803C6.60258 17.2096 8.51031 17.9998 10.4995 17.9998C12.4887 17.9998 14.3964 17.2096 15.803 15.803V15.803Z`})}),Kle=e=>(0,U.jsx)(OE,{strokeWidth:`1.5`,title:`Shield with Check`,...e,children:(0,U.jsx)(`path`,{d:`M8.66667 12.2455L10.8889 14.5082L15.3333 9.9828M21.5756 5.4393C18.0623 5.62927 14.6186 4.39237 12 2C9.38141 4.39237 5.93767 5.62927 2.42445 5.4393C2.14171 6.55381 1.99909 7.70036 2 8.85145C2 15.1768 6.24889 20.493 12 22C17.7511 20.493 22 15.178 22 8.85145C22 7.67259 21.8522 6.52992 21.5756 5.4393Z`})}),qle=e=>(0,U.jsx)(OE,{strokeWidth:`1.5`,title:`Thumbs Down`,...e,children:(0,U.jsx)(`path`,{d:`M16.6826 13.0001L12.6826 22.0001C11.887 22.0001 11.1239 21.6841 10.5613 21.1214C9.99872 20.5588 9.68265 19.7958 9.68265 19.0001V15.0001H4.02265C3.73274 15.0034 3.44558 14.9436 3.18108 14.8249C2.91657 14.7062 2.68103 14.5314 2.49079 14.3126C2.30055 14.0938 2.16014 13.8363 2.07931 13.5579C1.99847 13.2794 1.97914 12.9868 2.02265 12.7001L3.40265 3.70012C3.47497 3.22322 3.71721 2.78852 4.08474 2.47612C4.45227 2.16372 4.92032 1.99467 5.40265 2.00012H16.6826M16.6826 13.0001V2.00012M16.6826 13.0001H19.6826C20.2131 13.0001 20.7218 12.7894 21.0969 12.4143C21.4719 12.0393 21.6826 11.5306 21.6826 11.0001V4.00012C21.6826 3.46969 21.4719 2.96098 21.0969 2.58591C20.7218 2.21084 20.2131 2.00012 19.6826 2.00012H16.6826`})}),Jle=e=>(0,U.jsxs)(OE,{title:`User`,...e,children:[(0,U.jsx)(`path`,{d:`M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2`}),(0,U.jsx)(`circle`,{cx:`12`,cy:`7`,r:`4`})]}),Yle=e=>(0,U.jsx)(OE,{strokeWidth:`0`,title:`Aptible`,...e,children:(0,U.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M23.9999 13.3365V8.80189L16.7999 2H12H11.9999H7.155L0 8.80189V13.3365L12 2.00004L23.9999 13.3365ZM16.8001 21.272H13.2001V10.8814V6.34676L16.8001 9.74771L24.0001 16.5496V21.0842L16.8001 14.2823V21.272ZM7.19997 21.272H10.8V10.8814L10.8 10.8814V6.34676L10.8 6.34679V6.34676L7.19997 9.74771V9.74773L0 16.5496V21.0842L7.19997 14.2823V21.272Z`,fill:`#111920`})}),Xle=e=>(0,U.jsx)(OE,{strokeWidth:`1.5`,title:`Bell`,...e,children:(0,U.jsx)(`path`,{d:`M14.857 17.082C16.7202 16.8614 18.5509 16.4217 20.311 15.772C18.8204 14.1208 17.9967 11.9745 18 9.75V9.05V9C18 7.4087 17.3679 5.88258 16.2426 4.75736C15.1174 3.63214 13.5913 3 12 3C10.4087 3 8.88258 3.63214 7.75736 4.75736C6.63215 5.88258 6 7.4087 6 9V9.75C6.00302 11.9746 5.17899 14.121 3.688 15.772C5.421 16.412 7.248 16.857 9.143 17.082M14.857 17.082C12.959 17.3071 11.041 17.3071 9.143 17.082M14.857 17.082C15.0011 17.5319 15.0369 18.0094 14.9616 18.4757C14.8862 18.942 14.7018 19.384 14.4234 19.7656C14.1449 20.1472 13.7803 20.4576 13.3592 20.6716C12.9381 20.8856 12.4724 20.9972 12 20.9972C11.5276 20.9972 11.0619 20.8856 10.6408 20.6716C10.2197 20.4576 9.85508 20.1472 9.57662 19.7656C9.29817 19.384 9.11377 18.942 9.03842 18.4757C8.96307 18.0094 8.9989 17.5319 9.143 17.082`})}),Zle=e=>(0,U.jsxs)(OE,{strokeWidth:`1.5`,title:`Bitbucket`,...e,children:[(0,U.jsx)(`path`,{d:`M1.79259 2.00007C1.67825 1.99851 1.56496 2.02262 1.46071 2.07069C1.35646 2.11876 1.26378 2.18962 1.18921 2.27829C1.11463 2.36696 1.05997 2.47127 1.02908 2.58388C0.998189 2.69649 0.991815 2.81466 1.01041 2.93007L4.848 21.09C4.93356 21.6112 5.37353 21.995 5.88929 22H18.1109C18.2988 22.0019 18.4812 21.9351 18.6251 21.8115C18.769 21.688 18.8649 21.5158 18.8956 21.3262L22.9898 2.93882C23.0082 2.82345 23.0017 2.70536 22.9707 2.59285C22.9397 2.48033 22.885 2.37611 22.8105 2.2875C22.736 2.19888 22.6434 2.12802 22.5392 2.07988C22.4351 2.03173 22.3219 2.00748 22.2076 2.00882L1.79259 2.00007V2.00007Z`}),(0,U.jsx)(`path`,{d:`M14.6667 16H9.33333L8 8H16L14.6667 16Z`})]}),Qle=e=>(0,U.jsx)(OE,{strokeWidth:`1.5`,title:`Deployments`,...e,children:(0,U.jsx)(`path`,{d:`M12.006 16.6069V8.97256M12.006 8.97256L15.3908 12.3656M12.006 8.97256L8.62126 12.3656M6.08268 20C4.87481 20.0013 3.70603 19.5709 2.78625 18.7861C1.86647 18.0012 1.25594 16.9134 1.06431 15.7179C0.872685 14.5224 1.11251 13.2975 1.74072 12.2634C2.36892 11.2292 3.34435 10.4534 4.49184 10.0753C4.19703 8.56106 4.50172 6.99124 5.3414 5.69827C6.18108 4.40531 7.48981 3.49073 8.99044 3.1482C10.4911 2.80568 12.0658 3.06211 13.3811 3.86319C14.6964 4.66428 15.6491 5.9471 16.0373 7.44003C16.6375 7.24433 17.2804 7.22079 17.8933 7.37205C18.5062 7.52331 19.0647 7.84335 19.5057 8.29603C19.9467 8.7487 20.2527 9.31597 20.389 9.9337
57C20.5254 10.5516 20.4867 11.1953 20.2773 11.7922C21.2009 12.1459 21.972 12.8125 22.4566 13.6764C22.9412 14.5403 23.1089 15.5471 22.9305 16.522C22.7522 17.4969 22.239 18.3784 21.4801 19.0137C20.7211 19.649 19.7643 19.9979 18.7756 20H6.08268Z`})}),$le=e=>(0,U.jsx)(OE,{strokeWidth:`1.5`,title:`Document Search`,...e,children:(0,U.jsx)(`path`,{d:`M10 21H17C17.5304 21 18.0391 20.7893 18.4142 20.4142C18.7893 20.0391 19 19.5304 19 19V9.414C18.9999 9.1488 18.8946 8.89449 18.707 8.707L13.293 3.293C13.1055 3.10545 12.8512 3.00006 12.586 3H7C6.46957 3 5.96086 3.21071 5.58579 3.58579C5.21071 3.96086 5 4.46957 5 5V16M5 21L9.879 16.121M9.879 16.121C10.1567 16.4033 10.4876 16.6279 10.8525 16.7817C11.2174 16.9355 11.6092 17.0156 12.0052 17.0173C12.4012 17.0189 12.7936 16.9421 13.1599 16.7914C13.5261 16.6406 13.8588 16.4188 14.1388 16.1388C14.4189 15.8588 14.6408 15.5262 14.7916 15.16C14.9425 14.7938 15.0193 14.4014 15.0177 14.0054C15.0162 13.6094 14.9362 13.2176 14.7825 12.8526C14.6287 12.4877 14.4043 12.1568 14.122 11.879C13.5579 11.3239 12.7973 11.0142 12.0059 11.0173C11.2145 11.0204 10.4564 11.3362 9.8967 11.8957C9.33702 12.4553 9.02111 13.2133 9.0178 14.0047C9.01448 14.7961 9.32402 15.5568 9.879 16.121Z`})}),eue=e=>(0,U.jsx)(OE,{strokeWidth:`1.5`,title:`Envelope`,...e,children:(0,U.jsx)(`path`,{d:`M21.75 6.75V17.25C21.75 17.8467 21.5129 18.419 21.091 18.841C20.669 19.2629 20.0967 19.5 19.5 19.5H4.5C3.90326 19.5 3.33097 19.2629 2.90901 18.841C2.48705 18.419 2.25 17.8467 2.25 17.25V6.75M21.75 6.75C21.75 6.15326 21.5129 5.58097 21.091 5.15901C20.669 4.73705 20.0967 4.5 19.5 4.5H4.5C3.90326 4.5 3.33097 4.73705 2.90901 5.15901C2.48705 5.58097 2.25 6.15326 2.25 6.75M21.75 6.75V6.993C21.75 7.37715 21.6517 7.75491 21.4644 8.0903C21.2771 8.42569 21.0071 8.70754 20.68 8.909L13.18 13.524C12.8252 13.7425 12.4167 13.8582 12 13.8582C11.5833 13.8582 11.1748 13.7425 10.82 13.524L3.32 8.91C2.99292 8.70854 2.72287 8.42669 2.53557 8.0913C2.34827 7.75591 2.24996 7.37815 2.25 6.994V6.75`})}),tue=e=>(0,U.jsx)(OE,{strokeWidth:`1.5`,title:`Folder`,...e,children:(0,U.jsx)(`path`,{d:`M22 19C22 19.5304 21.7893 20.0391 21.4142 20.4142C21.0391 20.7893 20.5304 21 20 21H4C3.46957 21 2.96086 20.7893 2.58579 20.4142C2.21071 20.0391 2 19.5304 2 19V5C2 4.46957 2.21071 3.96086 2.58579 3.58579C2.96086 3.21071 3.46957 3 4 3H9L11 6H20C20.5304 6 21.0391 6.21071 21.4142 6.58579C21.7893 6.96086 22 7.46957 22 8V19Z`})}),nue=e=>(0,U.jsxs)(OE,{strokeWidth:`1.5`,title:`Git Commit`,...e,children:[(0,U.jsx)(`path`,{d:`M12 16C14.2091 16 16 14.2091 16 12C16 9.79086 14.2091 8 12 8C9.79086 8 8 9.79086 8 12C8 14.2091 9.79086 16 12 16Z`}),(0,U.jsx)(`path`,{d:`M1.05 12H7`}),(0,U.jsx)(`path`,{d:`M17.01 12H22.96`})]}),rue=e=>(0,U.jsx)(OE,{strokeWidth:`1.5`,title:`Gitlab`,...e,children:(0,U.jsx)(`path`,{d:`M22.65 14.39L12 22.13L1.35001 14.39C1.20723 14.285 1.10133 14.1375 1.04744 13.9687C0.993557 13.7999 0.994455 13.6183 1.05001 13.45L2.27001 9.67L4.71001 2.16C4.73367 2.09881 4.77135 2.04401 4.82001 2C4.89925 1.92762 5.00269 1.88749 5.11001 1.88749C5.21733 1.88749 5.32077 1.92762 5.40001 2C5.45139 2.04966 5.48925 2.11162 5.51001 2.18L7.95001 9.67H16.05L18.49 2.16C18.5137 2.09881 18.5513 2.04401 18.6 2C18.6792 1.92762 18.7827 1.88749 18.89 1.88749C18.9973 1.88749 19.1008 1.92762 19.18 2C19.2314 2.04966 19.2693 2.11162 19.29 2.18L21.73 9.69L23 13.45C23.0505 13.6235 23.0438 13.8086 22.9807 13.978C22.9177 14.1473 22.8017 14.2918 22.65 14.39V14.39Z`})}),LD=e=>(0,U.jsx)(OE,{strokeWidth:`1.5`,title:`Switch Horizontal`,...e,children:(0,U.jsx)(`path`,{d:`M4 17L8 13M8 7H20H8ZM20 7L16 3L20 7ZM20 7L16 11L20 7ZM16 17H4H16ZM4 17L8 21L4 17Z`})}),RD=e=>(0,U.jsx)(OE,{strokeWidth:`1.5`,title:`Switch Vertical`,...e,children:(0,U.jsx)(`path`,{d:`M17 20L13 16M7 16V4V16ZM7 4L3 8L7 4ZM7 4L11 8L7 4ZM17 8V20V8ZM17 20L21 16L17 20Z`})}),zD=e=>(0,U.jsx)(OE,{strokeWidth:`1.5`,title:`Tool`,...e,children:(0,U.jsx)(`path`,{d:`M14.7 6.29998C14.5168 6.48691 14.4141 6.73823 14.4141 6.99998C14.4141 7.26173 14.5168 7.51305 14.7 7.69998L16.3 9.29998C16.4869 9.48321 16.7382 9.58584 17 9.58584C17.2618 9.58584 17.5131 9.48321 17.7 9.29998L21.47 5.52998C21.9728 6.64117 22.1251 7.87921 21.9065 9.07913C21.6878 10.279 21.1087 11.3838 20.2463 12.2463C19.3838 13.1087 18.2791 13.6878 17.0791 13.9064C15.8792 14.1251 14.6412 13.9728 13.53 13.47L6.62 20.38C6.22218 20.7778 5.68261 21.0013 5.12 21.0013C4.55739 21.0013 4.01783 20.7778 3.62 20.38C3.22218 19.9822 2.99868 19.4426 2.99868 18.88C2.99868 18.3174 3.22218
517.7778 3.62 17.38L10.53 10.47C10.0272 9.35879 9.87492 8.12075 10.0935 6.92083C10.3122 5.72092 10.8913 4.61614 11.7537 3.7537C12.6162 2.89127 13.7209 2.31215 14.9209 2.09352C16.1208 1.8749 17.3588 2.02714 18.47 2.52998L14.71 6.28998L14.7 6.29998Z`})}),BD=e=>(0,U.jsx)(OE,{color:`#595E63`,strokeWidth:`1.5`,title:`File Text`,...e,children:(0,U.jsx)(`path`,{d:`M9.33268 1.33333H3.99935C3.64573 1.33333 3.30659 1.4738 3.05654 1.72385C2.80649 1.9739 2.66602 2.31304 2.66602 2.66666V13.3333C2.66602 13.6869 2.80649 14.0261 3.05654 14.2761C3.30659 14.5262 3.64573 14.6667 3.99935 14.6667H11.9993C12.353 14.6667 12.6921 14.5262 12.9422 14.2761C13.1922 14.0261 13.3327 13.6869 13.3327 13.3333V5.33333M9.33268 1.33333L13.3327 5.33333M9.33268 1.33333V5.33333H13.3327M10.666 8.66666H5.33268M10.666 11.3333H5.33268M6.66602 5.99999H5.33268`})}),VD=e=>(0,U.jsxs)(OE,{strokeWidth:`1.5`,title:`Terminal`,...e,children:[(0,U.jsx)(`path`,{d:`M4 17L10 11L4 5`}),(0,U.jsx)(`path`,{d:`M12 19H20`})]}),HD=e=>(0,U.jsx)(OE,{strokeWidth:`1.5`,title:`Organization`,...e,children:(0,U.jsx)(`path`,{d:`M3.75 21H20.25M4.5 3H19.5M5.25 3V21M18.75 3V21M9 6.75H10.5M9 9.75H10.5M9 12.75H10.5M13.5 6.75H15M13.5 9.75H15M13.5 12.75H15M9 21V17.625C9 17.004 9.504 16.5 10.125 16.5H13.875C14.496 16.5 15 17.004 15 17.625V21`})}),UD=e=>(0,U.jsx)(OE,{strokeWidth:`1.5`,title:`Activity`,...e,children:(0,U.jsx)(`path`,{d:`M22 12H18L15 21L9 3L6 12H2`})}),iue=e=>(0,U.jsx)(OE,{title:`List`,...e,children:(0,U.jsx)(`path`,{d:`M8 6H21M8 12H21M8 18H21M3 6H3.01M3 12H3.01M3 18H3.01`})}),aue=e=>(0,U.jsxs)(OE,{title:`Grid`,...e,children:[(0,U.jsx)(`path`,{d:`M10 3H3V10H10V3Z`}),(0,U.jsx)(`path`,{d:`M21 3H14V10H21V3Z`}),(0,U.jsx)(`path`,{d:`M21 14H14V21H21V14Z`}),(0,U.jsx)(`path`,{d:`M10 14H3V21H10V14Z`})]}),oue=e=>(0,U.jsx)(OE,{title:`Filter`,...e,children:(0,U.jsx)(`path`,{d:`M22 3H2L10 12.46V19L14 21V12.46L22 3Z`})}),sue=e=>(0,U.jsx)(OE,{title:`Filter`,...e,children:(0,U.jsx)(`path`,{d:`M7.22255 3.33398V16.6673M12.7781 3.33398V16.6673M2.70866 16.6673H17.292C17.867 16.6673 18.3337 16.2193 18.3337 15.6673V4.33398C18.3337 3.78198 17.867 3.33398 17.292 3.33398H2.70866C2.13366 3.33398 1.66699 3.78198 1.66699 4.33398V15.6673C1.66699 16.2193 2.13366 16.6673 2.70866 16.6673Z`})}),WD=e=>(0,U.jsxs)(OE,{title:`Reorder`,strokeWidth:`1.5`,...e,children:[(0,U.jsx)(`path`,{d:`M14.5 17.25C14.6989 17.25 14.8897 17.329 15.0303 17.4697C15.171 17.6103 15.25 17.8011 15.25 18C15.25 18.1989 15.171 18.3897 15.0303 18.5303C14.8897 18.671 14.6989 18.75 14.5 18.75C14.3011 18.75 14.1103 18.671 13.9697 18.5303C13.829 18.3897 13.75 18.1989 13.75 18C13.75 17.8011 13.829 17.6103 13.9697 17.4697C14.1103 17.329 14.3011 17.25 14.5 17.25Z`}),(0,U.jsx)(`path`,{d:`M14.5 11.25C14.6989 11.25 14.8897 11.329 15.0303 11.4697C15.171 11.6103 15.25 11.8011 15.25 12C15.25 12.1989 15.171 12.3897 15.0303 12.5303C14.8897 12.671 14.6989 12.75 14.5 12.75C14.3011 12.75 14.1103 12.671 13.9697 12.5303C13.829 12.3897 13.75 12.1989 13.75 12C13.75 11.8011 13.829 11.6103 13.9697 11.4697C14.1103 11.329 14.3011 11.25 14.5 11.25Z`}),(0,U.jsx)(`path`,{d:`M14.5 5.25C14.6989 5.25 14.8897 5.32902 15.0303 5.46967C15.171 5.61032 15.25 5.80109 15.25 6C15.25 6.19891 15.171 6.38968 15.0303 6.53033C14.8897 6.67098 14.6989 6.75 14.5 6.75C14.3011 6.75 14.1103 6.67098 13.9697 6.53033C13.829 6.38968 13.75 6.19891 13.75 6C13.75 5.80109 13.829 5.61032 13.9697 5.46967C14.1103 5.32902 14.3011 5.25 14.5 5.25Z`}),(0,U.jsx)(`path`,{d:`M9.5 17.25C9.69891 17.25 9.88968 17.329 10.0303 17.4697C10.171 17.6103 10.25 17.8011 10.25 18C10.25 18.1989 10.171 18.3897 10.0303 18.5303C9.88968 18.671 9.69891 18.75 9.5 18.75C9.30109 18.75 9.11032 18.671 8.96967 18.5303C8.82902 18.3897 8.75 18.1989 8.75 18C8.75 17.8011 8.82902 17.6103 8.96967 17.4697C9.11032 17.329 9.30109 17.25 9.5 17.25Z`}),(0,U.jsx)(`path`,{d:`M9.5 11.25C9.69891 11.25 9.88968 11.329 10.0303 11.4697C10.171 11.6103 10.25 11.8011 10.25 12C10.25 12.1989 10.171 12.3897 10.0303 12.5303C9.88968 12.671 9.69891 12.75 9.5 12.75C9.30109 12.75 9.11032 12.671 8.96967 12.5303C8.82902 12.3897 8.75 12.1989 8.75 12C8.75 11.8011 8.82902 11.6103 8.96967 11.4697C9.11032 11.329 9.30109 11.25 9.5 11.25Z`}),(0,U.jsx)(`path`,{d:`M9.5 5.25C9.69891 5.25 9.88968 5.32902 10.0303 5.46967C10.171 5.61032 10.25 5.80109 10.25 6C10.25 6.19891 10.171 6.38968 10.0303 6.53033C9.88968 6.67098 9.69891 6.75 9.5 6.75C9.30109 6.75 9.11032 6.67098 8.96967 6.53033C8.82902 6.38968 8.75 6.19891 8.75 6C8.75 5.80109 8.82902 5.61032 8.96967 5.46967C9.11032 5.32902 9.30109 5.25 9.5 5.25Z`})]}),GD=({variant:e=`base`,className:t,...n})=>(0,U.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 18 18`,width:DE(e),height:DE(e),fill:`none`,className:t,"aria-label":`Alert`,role:`img`,...n,children:[(0,U.jsx)(`title`,{children:`Alert`}),(0,U.jsx)(`g`,{filter:`url(#alertDotGlow)`,children:(0,U.jsx)(`circle`,{cx:`8.91425`,cy:`8.91431`,r:`3.61426`,fill:`#F9B513`})}),(0,U.jsx)(`defs`,{children:(0,U.jsxs)(`filter`,{id:`alertDotGlow`,x:`0`,y:`0`,width:`17.8285`,height:`17.8285`,filterUnits:`userSpaceOnUse`,colorInterpolationFilters:`sRGB`,children:[(0,U.jsx)(`feFlood`,{floodOpacity:`0`,result:`Backgroun
5dImageFix`}),(0,U.jsx)(`feColorMatrix`,{in:`SourceAlpha`,type:`matrix`,values:`0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0`,result:`hardAlpha`}),(0,U.jsx)(`feMorphology`,{radius:`1`,operator:`dilate`,in:`SourceAlpha`,result:`effect1_dropShadow`}),(0,U.jsx)(`feOffset`,{}),(0,U.jsx)(`feGaussianBlur`,{stdDeviation:`2.15`}),(0,U.jsx)(`feComposite`,{in2:`hardAlpha`,operator:`out`}),(0,U.jsx)(`feColorMatrix`,{type:`matrix`,values:`0 0 0 0 0.976471 0 0 0 0 0.709804 0 0 0 0 0.0745098 0 0 0 1 0`}),(0,U.jsx)(`feBlend`,{mode:`normal`,in2:`BackgroundImageFix`,result:`effect1_dropShadow`}),(0,U.jsx)(`feBlend`,{mode:`normal`,in:`SourceGraphic`,in2:`effect1_dropShadow`,result:`shape`})]})})]}),KD=({color:e,variant:t=`base`,...n})=>{let r=TE(),i=e??(r?EE:`#111920`);return(0,U.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,width:DE(t),height:DE(t),fill:`none`,...n,children:[(0,U.jsx)(`title`,{children:`Resources`}),(0,U.jsx)(`path`,{d:`M13.9268 20.8867C14.341 20.8867 14.6768 21.2225 14.6768 21.6367C14.6768 22.0509 14.341 22.3867 13.9268 22.3867H10.0723C9.65814 22.3866 9.32227 22.0509 9.32227 21.6367C9.32227 21.2226 9.65814 20.8868 10.0723 20.8867H13.9268ZM14.8906 17.0322C15.3048 17.0323 15.6406 17.3681 15.6406 17.7822C15.6405 18.1963 15.3047 18.5321 14.8906 18.5322H9.1084C8.69442 18.532 8.3585 18.1962 8.3584 17.7822C8.3584 17.3681 8.69436 17.0324 9.1084 17.0322H14.8906ZM12 1.61328C13.7323 1.61333 15.3942 2.30142 16.6191 3.52637C17.844 4.75134 18.5322 6.4132 18.5322 8.14551C18.5322 9.57149 17.9866 11.0225 16.8652 12.0479L16.8662 12.0488C16.1452 12.7699 15.7774 13.3171 15.626 14.0742C15.5448 14.4802 15.1502 14.744 14.7441 14.6631C14.338 14.5819 14.0741 14.1864 14.1553 13.7803C14.3892 12.6104 14.9853 11.8087 15.8057 10.9883L15.835 10.9609C16.6213 10.2531 17.0322 9.21277 17.0322 8.14551C17.0322 6.81093 16.5013 5.5306 15.5576 4.58691C14.614 3.64346 13.3344 3.11333 12 3.11328C10.6654 3.11328 9.3851 3.64323 8.44141 4.58691C7.49772 5.5306 6.96778 6.81093 6.96777 8.14551C6.9678 8.96233 7.11431 9.90923 8.19336 10.9883C8.91005 11.705 9.60846 12.604 9.84375 13.7803C9.92498 14.1864 9.66202 14.5818 9.25586 14.6631C8.84972 14.7443 8.45428 14.4804 8.37305 14.0742C8.2228 13.3234 7.76508 12.6811 7.13281 12.0488C5.70647 10.6225 5.4678 9.25596 5.46777 8.14551C5.46778 6.41311 6.15587 4.75136 7.38086 3.52637C8.60585 2.30138 10.2676 1.61328 12 1.61328Z`,fill:i})]})},qD=e=>(0,U.jsx)(OE,{strokeWidth:1.5,title:`Help`,...e,children:(0,U.jsx)(`path`,{d:`M4.93 4.93L9.17 9.17M14.83 14.83L19.07 19.07M19.07 4.93L14.83 9.17L18.36 5.64M4.93 19.07L9.17 14.83M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12ZM16 12C16 14.2091 14.2091 16 12 16C9.79086 16 8 14.2091 8 12C8 9.79086 9.79086 8 12 8C14.2091 8 16 9.79086 16 12Z`})}),JD=e=>(0,U.jsx)(OE,{strokeWidth:1.5,title:`Docs`,...e,children:(0,U.jsx)(`path`,{d:`M12 7C12 5.93913 11.5786 4.92172 10.8284 4.17157C10.0783 3.42143 9.06087 3 8 3H2V18H9C9.79565 18 10.5587 18.3161 11.1213 18.8787C11.6839 19.4413 12 20.2044 12 21M12 7V21M12 7C12 5.93913 12.4214 4.92172 13.1716 4.17157C13.9217 3.42143 14.9391 3 16 3H22V18H15C14.2044 18 13.4413 18.3161 12.8787 18.8787C12.3161 19.4413 12 20.2044 12 21`})}),G={type:{h1:`text-gray-900 text-3xl font-semibold`,h2:`text-xl font-semibold text-gray-900`,h3:`text-lg font-semibold text-gray-900`,h4:`text-md font-semibold text-gray-900`,link:`font-medium text-sm text-gray-500 hover:text-indigo`,"table lead text":`text-black`,"table link":`text-black group-hover:text-indigo hover:text-indigo`,"white link":`text-white underline`,"active link":`font-medium text-sm text-gray-700`,"subdued active link":`font-medium text-sm text-amber-600`,"small semibold darker":`text-sm font-semibold text-gray-900`,"micro label":`text-[11px] leading-[14px] font-normal text-black-500 uppercase tracking-[1.05px]`,"micro label strong":`text-[11px] leading-[14px] font-semibold text-black-700 uppercase tracking-[1.05px]`,"detail value":`text-[13px] leading-[13px] font-normal text-black-700 tracking-[-0.08px]`,"small normal darker":`text-sm font-normal text-gray-900`,"small normal lighter":`text-sm font-normal text-gray-500`,"medium label":`font-medium text-gray-900`,darker:`text-gray-900`,"normal lighter":`text-gray-500 text-sm`,"normal blue lighter":`text-blue-500`,"small lighter":`text-sm text-gray-500`,textarea:`appearance-none block px-3 py-2 border border-gray-300 hover:border-gray-500 rounded-md shadow-sm placeholder-gray-400 focus:outline-none focus:ring-gray-500 focus:border-gray-500 text-base w-full min-h-32 disabled:bg-black-50 disabled:cursor-not-allowed`,pre:`p-4 bg-black rounded-lg text-white`},buttons:{sizes:{xs:`px-2.5 py-1.5 text-xs font-medium `,sm:`px-3 py-2.5 text-sm leading-4 font-medium`,md:`px-4 py-2.5 text-base font-medium`,lg:`px-4 py-2 text-base font-medium`,xl:`px-6 py-3 text-base font-medium`},styles:{primary:`border border-transparent shadow-sm font-bold text-black bg-gradient-to-r from-yellow-400 to-yellow-500 hover:no-underline hover:from-yellow hover:to-yellow focus:from-orange-400 focus:to-orange-400 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-yellow-500 disabled:from-orange-200 disabled:to-orange-200 disabled:text-black-300 disabled:cursor-not-allowed`,secondary:`border border-transparent font-bold text-white bg-indigo hover:bg-indigo-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-600`,white:`border border-gray-300 font-bold shadow-sm text-black bg-white hover:bg-gray-50 hover:border-gray-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-gray-500`,delete:`border border-red-100 font-bold shadow-sm text-white bg-red hover:bg-red-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-600`,success:`border border-transparent font-bold bg-green-400 text-white hover:bg-green-600 hover:text-white focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-green-600`}}};function YD(){return typeof window<`u`}function XD(e){return $D(e)?(e.nodeName||``).toLowerCase():`#document`}function ZD(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function QD(e){return(($D(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function $D(e){return YD()?e instanceof Node||e instanceof ZD(e).Node:!1}function eO(e){return YD()?e instanceof Element||e instanceof ZD(e).Element:!1}function tO(e){return YD()?e instanceof HTMLElement||e instanceof ZD(e).HTMLElement:!1}function nO(e){return!YD()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof ZD(e).ShadowRoot}var cue=new Set([`inline`,`contents`]);function rO(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=cO(e);
5return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!cue.has(i)}var lue=new Set([`table`,`td`,`th`]);function uue(e){return lue.has(XD(e))}var due=[`:popover-open`,`:modal`];function iO(e){return due.some(t=>{try{return e.matches(t)}catch{return!1}})}var fue=[`transform`,`translate`,`scale`,`rotate`,`perspective`],pue=[`transform`,`translate`,`scale`,`rotate`,`perspective`,`filter`],mue=[`paint`,`layout`,`strict`,`content`];function aO(e){let t=oO(),n=eO(e)?cO(e):e;return fue.some(e=>n[e]?n[e]!==`none`:!1)||(n.containerType?n.containerType!==`normal`:!1)||!t&&(n.backdropFilter?n.backdropFilter!==`none`:!1)||!t&&(n.filter?n.filter!==`none`:!1)||pue.some(e=>(n.willChange||``).includes(e))||mue.some(e=>(n.contain||``).includes(e))}function hue(e){let t=uO(e);for(;tO(t)&&!sO(t);){if(aO(t))return t;if(iO(t))return null;t=uO(t)}return null}function oO(){return typeof CSS>`u`||!CSS.supports?!1:CSS.supports(`-webkit-backdrop-filter`,`none`)}var gue=new Set([`html`,`body`,`#document`]);function sO(e){return gue.has(XD(e))}function cO(e){return ZD(e).getComputedStyle(e)}function lO(e){return eO(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function uO(e){if(XD(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||nO(e)&&e.host||QD(e);return nO(t)?t.host:t}function dO(e){let t=uO(e);return sO(t)?e.ownerDocument?e.ownerDocument.body:e.body:tO(t)&&rO(t)?t:dO(t)}function fO(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=dO(e),i=r===e.ownerDocument?.body,a=ZD(r);if(i){let e=pO(a);return t.concat(a,a.visualViewport||[],rO(r)?r:[],e&&n?fO(e):[])}return t.concat(r,fO(r,[],n))}function pO(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var _ue=[`top`,`right`,`bottom`,`left`],mO=[`start`,`end`],hO=_ue.reduce((e,t)=>e.concat(t,t+`-`+mO[0],t+`-`+mO[1]),[]),gO=Math.min,_O=Math.max,vO=Math.round,yO=Math.floor,bO=e=>({x:e,y:e}),vue={left:`right`,right:`left`,bottom:`top`,top:`bottom`},yue={start:`end`,end:`start`};function xO(e,t,n){return _O(e,gO(t,n))}function SO(e,t){return typeof e==`function`?e(t):e}function CO(e){return e.split(`-`)[0]}function wO(e){return e.split(`-`)[1]}function TO(e){return e===`x`?`y`:`x`}function EO(e){return e===`y`?`height`:`width`}var bue=new Set([`top`,`bottom`]);function DO(e){return bue.has(CO(e))?`y`:`x`}function OO(e){return TO(DO(e))}function xue(e,t,n){n===void 0&&(n=!1);let r=wO(e),i=OO(e),a=EO(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=kO(o)),[o,kO(o)]}function Sue(e){return e.replace(/start|end/g,e=>yue[e])}function kO(e){return e.replace(/left|right|bottom|top/g,e=>vue[e])}function Cue(e){return{top:0,right:0,bottom:0,left:0,...e}}function wue(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:Cue(e)}function AO(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}var jO=[`input:not([inert])`,`select:not([inert])`,`textarea:not([inert])`,`a[href]:not([inert])`,`button:not([inert])`,`[tabindex]:not(slot):not([inert])`,`audio[controls]:not([inert])`,`video[controls]:not([inert])`,`[contenteditable]:not([contenteditable="false"]):not([inert])`,`details>summary:first-of-type:not([inert])`,`details:not([inert])`].join(`,`),MO=typeof Element>`u`,NO=MO?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,PO=!MO&&Element.prototype.getRootNode?function(e){return e?.getRootNode?.call(e)}:function(e){return e?.ownerDocument},FO=function e(t,n){n===void 0&&(n=!0);var r=t?.getAttribute?.call(t,`inert`);return r===``||r===`true`||n&&t&&e(t.parentNode)},Tue=function(e){var t=e?.getAttribute?.call(e,`contenteditable`);return t===``||t===`true`},Eue=function(e,t,n){if(FO(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(jO));return t&&NO.call(e,jO)&&r.unshift(e),r=r.filter(n),r},Due=function e(t,n,r){for(var i=[],a=Array.from(t);a.length;){var o=a.shift();if(!FO(o,!1)){if(o.tagName===`SLOT`){var s=o.assignedElements(),c=e(s.length?s:o.children,!0,r);r.flatten?i.push.apply(i,c):i.push({scopeParent:o,candidates:c})}else{NO.call(o,jO)&&r.filter(o)&&(n||!t.includes(o))&&i.push(o);var l=o.shadowRoot||typeof r.getShadowRoot==`function`&&r.getShadowRoot(o),u=!FO(l,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(o
5));if(l&&u){var d=e(l===!0?o.children:l.children,!0,r);r.flatten?i.push.apply(i,d):i.push({scopeParent:o,candidates:d})}else a.unshift.apply(a,o.children)}}}return i},IO=function(e){return!isNaN(parseInt(e.getAttribute(`tabindex`),10))},LO=function(e){if(!e)throw Error(`No node provided`);return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||Tue(e))&&!IO(e)?0:e.tabIndex},Oue=function(e,t){var n=LO(e);return n<0&&t&&!IO(e)?0:n},kue=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},RO=function(e){return e.tagName===`INPUT`},Aue=function(e){return RO(e)&&e.type===`hidden`},jue=function(e){return e.tagName===`DETAILS`&&Array.prototype.slice.apply(e.children).some(function(e){return e.tagName===`SUMMARY`})},Mue=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]},Nue=function(e){if(!e.name)return!0;var t=e.form||PO(e),n=function(e){return t.querySelectorAll(`input[type="radio"][name="`+e+`"]`)},r;if(typeof window<`u`&&window.CSS!==void 0&&typeof window.CSS.escape==`function`)r=n(window.CSS.escape(e.name));else try{r=n(e.name)}catch(e){return console.error(`Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s`,e.message),!1}var i=Mue(r,e.form);return!i||i===e},Pue=function(e){return RO(e)&&e.type===`radio`},Fue=function(e){return Pue(e)&&!Nue(e)},Iue=function(e){var t=e&&PO(e),n=t?.host,r=!1;if(t&&t!==e){var i,a,o;for(r=!!((i=n)!=null&&(a=i.ownerDocument)!=null&&a.contains(n)||e!=null&&(o=e.ownerDocument)!=null&&o.contains(e));!r&&n;){var s,c;t=PO(n),n=t?.host,r=!!((s=n)!=null&&(c=s.ownerDocument)!=null&&c.contains(n))}}return r},zO=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return n===0&&r===0},Lue=function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if(getComputedStyle(e).visibility===`hidden`)return!0;var i=NO.call(e,`details>summary:first-of-type`)?e.parentElement:e;if(NO.call(i,`details:not([open]) *`))return!0;if(!n||n===`full`||n===`legacy-full`){if(typeof r==`function`){for(var a=e;e;){var o=e.parentElement,s=PO(e);if(o&&!o.shadowRoot&&r(o)===!0)return zO(e);e=e.assignedSlot?e.assignedSlot:!o&&s!==e.ownerDocument?s.host:o}e=a}if(Iue(e))return!e.getClientRects().length;if(n!==`legacy-full`)return!0}else if(n===`non-zero-area`)return zO(e);return!1},Rue=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName===`FIELDSET`&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if(r.tagName===`LEGEND`)return NO.call(t,`fieldset[disabled] *`)?!0:!r.contains(e)}return!0}t=t.parentElement}return!1},zue=function(e,t){return!(t.disabled||FO(t)||Aue(t)||Lue(t,e)||jue(t)||Rue(t))},BO=function(e,t){return!(Fue(t)||LO(t)<0||!zue(e,t))},Bue=function(e){var t=parseInt(e.getAttribute(`tabindex`),10);return!!(isNaN(t)||t>=0)},Vue=function e(t){var n=[],r=[];return t.forEach(function(t,i){var a=!!t.scopeParent,o=a?t.scopeParent:t,s=Oue(o,a),c=a?e(t.candidates):o;s===0?a?n.push.apply(n,c):n.push(o):r.push({documentOrder:i,tabIndex:s,item:t,isScope:a,content:c})}),r.sort(kue).reduce(function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e},[]).concat(n)},VO=function(e,t){return t||={},Vue(t.getShadowRoot?Due([e],t.includeContainer,{filter:BO.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:Bue}):Eue(e,t.includeContainer,BO.bind(null,t)))};function Hue(){let e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function Uue(){let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(e=>{let{brand:t,version:n}=e;return t+`/`+n}).join(` `):navigator.userAgent}function HO(){return/apple/i.test(navigator.vendor)}function Wue(){return Hue().toLowerCase().startsWith(`mac`)&&!navigator.maxTouchPoints}function Gue(){return Uue().includes(`jsdom/`)}var UO=`data-floating-ui-focusable`,Kue=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`;function WO(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function GO(e,t){if(!e||!t)return!1;let n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;
5if(n&&nO(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function KO(e){return`composedPath`in e?e.composedPath()[0]:e.target}function qO(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function que(e){return e.matches(`html,body`)}function JO(e){return e?.ownerDocument||document}function YO(e){return tO(e)&&e.matches(Kue)}function Jue(e){if(!e||Gue())return!0;try{return e.matches(`:focus-visible`)}catch{return!0}}function Yue(e){return e?e.hasAttribute(UO)?e:e.querySelector(`[`+UO+`]`)||e:null}function XO(e,t,n){return n===void 0&&(n=!0),e.filter(e=>e.parentId===t&&(!n||e.context?.open)).flatMap(t=>[t,...XO(e,t.id,n)])}function Xue(e){return`nativeEvent`in e}function ZO(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}var QO=typeof document<`u`?V.useLayoutEffect:function(){},Zue={...V};function $O(e){let t=V.useRef(e);return QO(()=>{t.current=e}),t}var Que=Zue.useInsertionEffect||(e=>e());function ek(e){let t=V.useRef(()=>{});return Que(()=>{t.current=e}),V.useCallback(function(){var e=[...arguments];return t.current==null?void 0:t.current(...e)},[])}var tk=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver==`function`&&ResizeObserver.toString().includes(`[native code]`)?`full`:`none`});function nk(e,t){let n=VO(e,tk()),r=n.length;if(r===0)return;let i=WO(JO(e)),a=n.indexOf(i);return n[a===-1?t===1?0:r-1:a+t]}function $ue(e){return nk(JO(e).body,1)||e}function ede(e){return nk(JO(e).body,-1)||e}function rk(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!GO(n,r)}function tde(e){VO(e,tk()).forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)})}function ik(e){e.querySelectorAll(`[data-tabindex]`).forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute(`tabindex`,t):e.removeAttribute(`tabindex`)})}var ak=e(ue(),1);function ok(e,t,n){let{reference:r,floating:i}=e,a=DO(t),o=OO(t),s=EO(o),c=CO(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(wO(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1)}return p}var nde=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=a.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=ok(l,r,c),f=r,p={},m=0;for(let n=0;n<s.length;n++){let{name:a,fn:h}=s[n],{x:g,y:_,data:v,reset:y}=await h({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:p,rects:l,platform:o,elements:{reference:e,floating:t}});u=g??u,d=_??d,p={...p,[a]:{...p[a],...v}},y&&m<=50&&(m++,typeof y==`object`&&(y.placement&&(f=y.placement),y.rects&&(l=y.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):y.rects),{x:u,y:d}=ok(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:p}};async function sk(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=SO(t,e),p=wue(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=AO(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=AO(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left
vendor: 3,047 bytes, line 5
5:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}function rde(e,t,n){return(e?[...n.filter(t=>wO(t)===e),...n.filter(t=>wO(t)!==e)]:n.filter(e=>CO(e)===e)).filter(n=>!e||wO(n)===e||(t?Sue(n)!==n:!1))}var ide=function(e){return e===void 0&&(e={}),{name:`autoPlacement`,options:e,async fn(t){let{rects:n,middlewareData:r,placement:i,platform:a,elements:o}=t,{crossAxis:s=!1,alignment:c,allowedPlacements:l=hO,autoAlignment:u=!0,...d}=SO(e,t),f=c!==void 0||l===hO?rde(c||null,u,l):l,p=await sk(t,d),m=r.autoPlacement?.index||0,h=f[m];if(h==null)return{};let g=xue(h,n,await(a.isRTL==null?void 0:a.isRTL(o.floating)));if(i!==h)return{reset:{placement:f[0]}};let _=[p[CO(h)],p[g[0]],p[g[1]]],v=[...r.autoPlacement?.overflows||[],{placement:h,overflows:_}],y=f[m+1];if(y)return{data:{index:m+1,overflows:v},reset:{placement:y}};let b=v.map(e=>{let t=wO(e.placement);return[e.placement,t&&s?e.overflows.slice(0,2).reduce((e,t)=>e+t,0):e.overflows[0],e.overflows]}).sort((e,t)=>e[1]-t[1]),x=b.filter(e=>e[2].slice(0,wO(e[0])?2:3).every(e=>e<=0))[0]?.[0]||b[0][0];return x===i?{}:{data:{index:m+1,overflows:v},reset:{placement:x}}}}},ade=new Set([`left`,`top`]);async function ode(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=CO(n),s=wO(n),c=DO(n)===`y`,l=ade.has(o)?-1:1,u=a&&c?-1:1,d=SO(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var sde=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await ode(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},cde=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i}=t,{mainAxis:a=!0,crossAxis:o=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=SO(e,t),l={x:n,y:r},u=await sk(t,c),d=DO(CO(i)),f=TO(d),p=l[f],m=l[d];if(a){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=p+u[e],r=p-u[t];p=xO(n,p,r)}if(o){let e=d===`y`?`top`:`left`,t=d===`y`?`bottom`:`right`,n=m+u[e],r=m-u[t];m=xO(n,m,r)}let h=s.fn({...t,[f]:p,[d]:m});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[f]:a,[d]:o}}}}}};function ck(e){let t=cO(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=tO(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=vO(n)!==a||vO(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function lk(e){return eO(e)?e:e.contextElement}function uk(e){let t=lk(e);if(!tO(t))return bO(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=ck(t),o=(a?vO(n.width):n.width)/r,s=(a?vO(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var lde=bO(0);function dk(e){let t=ZD(e);return!oO()||!t.visualViewport?lde:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}
vendor: 5,753 bytes, line 5
5function ude(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ZD(e)?!1:t}function fk(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=lk(e),o=bO(1);t&&(r?eO(r)&&(o=uk(r)):o=uk(e));let s=ude(a,n,r)?dk(a):bO(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=ZD(a),t=r&&eO(r)?ZD(r):r,n=e,i=pO(n);for(;i&&r&&t!==n;){let e=uk(i),t=i.getBoundingClientRect(),r=cO(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=ZD(i),i=pO(n)}}return AO({width:u,height:d,x:c,y:l})}function pk(e,t){let n=lO(e).scrollLeft;return t?t.left+n:fk(QD(e)).left+n}function mk(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-pk(e,n),y:n.top+t.scrollTop}}function dde(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=QD(r),s=t?iO(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=bO(1),u=bO(0),d=tO(r);if((d||!d&&!a)&&((XD(r)!==`body`||rO(o))&&(c=lO(r)),tO(r))){let e=fk(r);l=uk(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?mk(o,c):bO(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function fde(e){return Array.from(e.getClientRects())}function pde(e){let t=QD(e),n=lO(e),r=e.ownerDocument.body,i=_O(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=_O(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+pk(e),s=-n.scrollTop;return cO(r).direction===`rtl`&&(o+=_O(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var hk=25;function mde(e,t){let n=ZD(e),r=QD(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=oO();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=pk(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=hk&&(a-=o)}else l<=hk&&(a+=l);return{width:a,height:o,x:s,y:c}}var hde=new Set([`absolute`,`fixed`]);function gde(e,t){let n=fk(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=tO(e)?uk(e):bO(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function gk(e,t,n){let r;if(t===`viewport`)r=mde(e,n);else if(t===`document`)r=pde(QD(e));else if(eO(t))r=gde(t,n);else{let n=dk(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return AO(r)}function _k(e,t){let n=uO(e);return n===t||!eO(n)||sO(n)?!1:cO(n).position===`fixed`||_k(n,t)}function _de(e,t){let n=t.get(e);if(n)return n;let r=fO(e,[],!1).filter(e=>eO(e)&&XD(e)!==`body`),i=null,a=cO(e).position===`fixed`,o=a?uO(e):e;for(;eO(o)&&!sO(o);){let t=cO(o),n=aO(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&hde.has(i.position)||rO(o)&&!n&&_k(e,o))?r=r.filter(e=>e!==o):i=t,o=uO(o)}return t.set(e,r),r}function vde(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?iO(t)?[]:_de(t,this._c):[].concat(n),r],o=a[0],s=a.reduce((e,n)=>{let r=gk(t,n,i);return e.top=_O(r.top,e.top),e.right=gO(r.right,e.right),e.bottom=gO(r.bottom,e.bottom),e.left=_O(r.left,e.left),e},gk(t,o,i));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}}function yde(e){let{width:t,height:n}=ck(e);return{width:t,height:n}}function bde(e,t,n){let r=tO(t),i=QD(t),a=n===`fixed`,o=fk(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=bO(0);function l(){c.x=pk(i)}if(r||!r&&!a){if((XD(t)!==`body`||rO(i))&&(s=lO(t)),r){let e=fk(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l()}a&&!r&&i&&l();let u=i&&!r&&!a?mk(i,s):bO(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function vk(e){return cO(e).position===`static`}function yk(e,t){if(!tO(e)||cO(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return QD(e)===n&&(n=n.ownerDocument.body),n}function bk(e,t){let n=ZD(e);if(iO(e))return n;if(!tO(e)){let t=uO(e);for(;t&&!sO(t);){if(eO(t)&&!vk(t))return t;t=uO(t)}return n}let r=yk(e,t);for(;r&&uue(r)&&vk(r);)r=yk(r,t);return r&&sO(r)&&vk(r)&&!aO(r)?n:r||hue(e)||n}var xde=async function(e){let t=this.getOffsetParent||bk,n=this.getDimensions,r=await n(e.floating);return{reference:bde(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Sde(e){return cO(e).direction===`rtl`}var Cde={convertOffsetParentRelativeRectToViewportRelativeRect:dde,getDocumentElement:QD,getClippingRect:vde,getOffsetParent:bk,getElementRects:xde,getClientRects:fde,getDimensions:yde,getScale:uk,isElement:eO,isRTL:Sde};function xk(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function wde(e,t){let n=null,r,i=QD(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=yO(d),h=yO(i.clientWidth-(u+f)),g=yO(i.clientHeight-(d+p)),_=yO(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:_O(0,gO(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!xk(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function Tde(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=lk(e),u=i||a?[...l?fO(l):[],...fO(t)]:[];
5u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?wde(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),p.observe(t));let m,h=c?fk(e):null;c&&g();function g(){let t=fk(e);h&&!xk(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Ede=sde,Dde=ide,Ode=cde,kde=(e,t,n)=>{let r=new Map,i={platform:Cde,...n},a={...i.platform,_c:r};return nde(e,t,{...i,platform:a})},Sk=typeof document<`u`?V.useLayoutEffect:function(){};function Ck(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Ck(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!Ck(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function wk(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Tk(e,t){let n=wk(e);return Math.round(t*n)/n}function Ek(e){let t=V.useRef(e);return Sk(()=>{t.current=e}),t}function Ade(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=V.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=V.useState(r);Ck(f,r)||p(r);let[m,h]=V.useState(null),[g,_]=V.useState(null),v=V.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=V.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=V.useRef(null),C=V.useRef(null),w=V.useRef(u),T=c!=null,E=Ek(c),D=Ek(i),O=Ek(l),k=V.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),kde(S.current,C.current,e).then(e=>{let t={...e,isPositioned:O.current!==!1};A.current&&!Ck(w.current,t)&&(w.current=t,ak.flushSync(()=>{d(t)}))})},[f,t,n,D,O]);Sk(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let A=V.useRef(!1);Sk(()=>(A.current=!0,()=>{A.current=!1}),[]),Sk(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,k);k()}},[b,x,k,E,T]);let j=V.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),M=V.useMemo(()=>({reference:b,floating:x}),[b,x]),ee=V.useMemo(()=>{let e={position:n,left:0,top:0};if(!M.floating)return e;let t=Tk(M.floating,u.x),r=Tk(M.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...wk(M.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,M.floating,u.x,u.y]);return V.useMemo(()=>({...u,update:k,refs:j,elements:M,floatingStyles:ee}),[u,k,j,M,ee])}var jde=(e,t)=>({...Ede(e),options:[e,t]}),Mde=(e,t)=>({...Ode(e),options:[e,t]}),Nde=(e,t)=>({...Dde(e),options:[e,t]}),Pde=`data-floating-ui-focusable`,Dk=`active`,Ok=`selected`,Fde=`ArrowLeft`,Ide=`ArrowRight`,Lde=`ArrowUp`,Rde=`ArrowDown`,zde=[Fde,Ide],Bde=[Lde,Rde];[...zde,...Bde];var kk={...V},Ak=!1,jk=0,Mk=()=>`floating-ui-`+Math.random().toString(36).slice(2,6)+jk++;function Nk(){let[e,t]=V.useState(()=>Ak?Mk():void 0);return QO(()=>{e??t(Mk())},[]),V.useEffect(()=>{Ak=!0},[]),e}var Pk=kk.useId||Nk;function Fk(){let e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}var Ik=V.createContext(null),Lk=V.createContext(null),Rk=()=>V.useContext(Ik)?.id||null,zk=()=>V.useContext(Lk);function Bk(e){return`data-floating-ui-`+e}function Vk(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}var Hk=Bk(`safe-polygon`);function Uk(e,t,n){if(n&&!ZO(n))return 0;if(typeof e==`number`)return e;if(typeof e==`function`){let n=e();
5return typeof n==`number`?n:n?.[t]}return e?.[t]}function Wk(e){return typeof e==`function`?e():e}function Gk(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,dataRef:i,events:a,elements:o}=e,{enabled:s=!0,delay:c=0,handleClose:l=null,mouseOnly:u=!1,restMs:d=0,move:f=!0}=t,p=zk(),m=Rk(),h=$O(l),g=$O(c),_=$O(n),v=$O(d),y=V.useRef(),b=V.useRef(-1),x=V.useRef(),S=V.useRef(-1),C=V.useRef(!0),w=V.useRef(!1),T=V.useRef(()=>{}),E=V.useRef(!1),D=ek(()=>{let e=i.current.openEvent?.type;return e?.includes(`mouse`)&&e!==`mousedown`});V.useEffect(()=>{if(!s)return;function e(e){let{open:t}=e;t||(Vk(b),Vk(S),C.current=!0,E.current=!1)}return a.on(`openchange`,e),()=>{a.off(`openchange`,e)}},[s,a]),V.useEffect(()=>{if(!s||!h.current||!n)return;function e(e){D()&&r(!1,e,`hover`)}let t=JO(o.floating).documentElement;return t.addEventListener(`mouseleave`,e),()=>{t.removeEventListener(`mouseleave`,e)}},[o.floating,n,r,s,h,D]);let O=V.useCallback(function(e,t,n){t===void 0&&(t=!0),n===void 0&&(n=`hover`);let i=Uk(g.current,`close`,y.current);i&&!x.current?(Vk(b),b.current=window.setTimeout(()=>r(!1,e,n),i)):t&&(Vk(b),r(!1,e,n))},[g,r]),k=ek(()=>{T.current(),x.current=void 0}),A=ek(()=>{if(w.current){let e=JO(o.floating).body;e.style.pointerEvents=``,e.removeAttribute(Hk),w.current=!1}}),j=ek(()=>i.current.openEvent?[`click`,`mousedown`].includes(i.current.openEvent.type):!1);V.useEffect(()=>{if(!s)return;function e(e){if(Vk(b),C.current=!1,u&&!ZO(y.current)||Wk(v.current)>0&&!Uk(g.current,`open`))return;let t=Uk(g.current,`open`,y.current);t?b.current=window.setTimeout(()=>{_.current||r(!0,e,`hover`)},t):n||r(!0,e,`hover`)}function t(e){if(j()){A();return}T.current();let t=JO(o.floating);if(Vk(S),E.current=!1,h.current&&i.current.floatingContext){n||Vk(b),x.current=h.current({...i.current.floatingContext,tree:p,x:e.clientX,y:e.clientY,onClose(){A(),k(),j()||O(e,!0,`safe-polygon`)}});let r=x.current;t.addEventListener(`mousemove`,r),T.current=()=>{t.removeEventListener(`mousemove`,r)};return}(y.current!==`touch`||!GO(o.floating,e.relatedTarget))&&O(e)}function a(e){j()||i.current.floatingContext&&(h.current==null||h.current({...i.current.floatingContext,tree:p,x:e.clientX,y:e.clientY,onClose(){A(),k(),j()||O(e)}})(e))}function c(){Vk(b)}function l(e){j()||O(e,!1)}if(eO(o.domReference)){let r=o.domReference,i=o.floating;return n&&r.addEventListener(`mouseleave`,a),f&&r.addEventListener(`mousemove`,e,{once:!0}),r.addEventListener(`mouseenter`,e),r.addEventListener(`mouseleave`,t),i&&(i.addEventListener(`mouseleave`,a),i.addEventListener(`mouseenter`,c),i.addEventListener(`mouseleave`,l)),()=>{n&&r.removeEventListener(`mouseleave`,a),f&&r.removeEventListener(`mousemove`,e),r.removeEventListener(`mouseenter`,e),r.removeEventListener(`mouseleave`,t),i&&(i.removeEventListener(`mouseleave`,a),i.removeEventListener(`mouseenter`,c),i.removeEventListener(`mouseleave`,l))}}},[o,s,e,u,f,O,k,A,r,n,_,p,g,h,i,j,v]),QO(()=>{var e;if(s&&n&&(e=h.current)!=null&&(e=e.__options)!=null&&e.blockPointerEvents&&D()){w.current=!0;let e=o.floating;if(eO(o.domReference)&&e){var t;let n=JO(o.floating).body;n.setAttribute(Hk,``);let r=o.domReference,i=p==null||(t=p.nodesRef.current.find(e=>e.id===m))==null||(t=t.context)==null?void 0:t.elements.floating;return i&&(i.style.pointerEvents=``),n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,e.style.pointerEvents=`auto`,()=>{n.style.pointerEvents=``,r.style.pointerEvents=``,e.style.pointerEvents=``}}}},[s,n,m,o,p,h,D]),QO(()=>{n||(y.current=void 0,E.current=!1,k(),A())},[n,k,A]),V.useEffect(()=>()=>{k(),Vk(b),Vk(S),A()},[s,o.domReference,k,A]);let M=V.useMemo(()=>{function e(e){y.current=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){let{nativeEvent:t}=e;function i(){!C.current&&!_.current&&r(!0,t,`hover`)}(!u||ZO(y.current))&&(n||Wk(v.current)===0||E.current&&e.movementX**2+e.movementY**2<2||(Vk(S),y.current===`touch`?i():(E.current=!0,S.current=window.setTimeout(i,Wk(v.current)))))}}},[u,r,n,_,v]);return V.useMemo(()=>s?{reference:M}:{},[s,M])}function Kk(e,t){if(!e||!t)return!1;let n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;
5if(n&&nO(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function qk(e){return`composedPath`in e?e.composedPath()[0]:e.target}var Jk={border:0,clip:`rect(0 0 0 0)`,height:`1px`,margin:`-1px`,overflow:`hidden`,padding:0,position:`fixed`,whiteSpace:`nowrap`,width:`1px`,top:0,left:0},Yk=V.forwardRef(function(e,t){let[n,r]=V.useState();QO(()=>{HO()&&r(`button`)},[]);let i={ref:t,tabIndex:0,role:n,"aria-hidden":!n||void 0,[Bk(`focus-guard`)]:``,style:Jk};return(0,U.jsx)(`span`,{...e,...i})}),Xk=V.createContext(null),Zk=Bk(`portal`);function Vde(e){e===void 0&&(e={});let{id:t,root:n}=e,r=Pk(),i=Ude(),[a,o]=V.useState(null),s=V.useRef(null);return QO(()=>()=>{a?.remove(),queueMicrotask(()=>{s.current=null})},[a]),QO(()=>{if(!r||s.current)return;let e=t?document.getElementById(t):null;if(!e)return;let n=document.createElement(`div`);n.id=r,n.setAttribute(Zk,``),e.appendChild(n),s.current=n,o(n)},[t,r]),QO(()=>{if(n===null||!r||s.current)return;let e=n||i?.portalNode;e&&!$D(e)&&(e=e.current),e||=document.body;let a=null;t&&(a=document.createElement(`div`),a.id=t,e.appendChild(a));let c=document.createElement(`div`);c.id=r,c.setAttribute(Zk,``),e=a||e,e.appendChild(c),s.current=c,o(c)},[t,n,r,i]),a}function Hde(e){let{children:t,id:n,root:r,preserveTabOrder:i=!0}=e,a=Vde({id:n,root:r}),[o,s]=V.useState(null),c=V.useRef(null),l=V.useRef(null),u=V.useRef(null),d=V.useRef(null),f=o?.modal,p=o?.open,m=!!o&&!o.modal&&o.open&&i&&!!(r||a);return V.useEffect(()=>{if(!a||!i||f)return;function e(e){a&&rk(e)&&(e.type===`focusin`?ik:tde)(a)}return a.addEventListener(`focusin`,e,!0),a.addEventListener(`focusout`,e,!0),()=>{a.removeEventListener(`focusin`,e,!0),a.removeEventListener(`focusout`,e,!0)}},[a,i,f]),V.useEffect(()=>{a&&(p||ik(a))},[p,a]),(0,U.jsxs)(Xk.Provider,{value:V.useMemo(()=>({preserveTabOrder:i,beforeOutsideRef:c,afterOutsideRef:l,beforeInsideRef:u,afterInsideRef:d,portalNode:a,setFocusManagerState:s}),[i,a]),children:[m&&a&&(0,U.jsx)(Yk,{"data-type":`outside`,ref:c,onFocus:e=>{if(rk(e,a)){var t;(t=u.current)==null||t.focus()}else ede(o?o.domReference:null)?.focus()}}),m&&a&&(0,U.jsx)(`span`,{"aria-owns":a.id,style:Jk}),a&&ak.createPortal(t,a),m&&a&&(0,U.jsx)(Yk,{"data-type":`outside`,ref:l,onFocus:e=>{if(rk(e,a)){var t;(t=d.current)==null||t.focus()}else $ue(o?o.domReference:null)?.focus(),o!=null&&o.closeOnFocusOut&&o?.onOpenChange(!1,e.nativeEvent,`focus-out`)}})]})}var Ude=()=>V.useContext(Xk);function Qk(e){return tO(e.target)&&e.target.tagName===`BUTTON`}function Wde(e){return tO(e.target)&&e.target.tagName===`A`}function $k(e){return YO(e)}function Gde(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,dataRef:i,elements:{domReference:a}}=e,{enabled:o=!0,event:s=`click`,toggle:c=!0,ignoreMouse:l=!1,keyboardHandlers:u=!0,stickIfOpen:d=!0}=t,f=V.useRef(),p=V.useRef(!1),m=V.useMemo(()=>({onPointerDown(e){f.current=e.pointerType},onMouseDown(e){let t=f.current;
5e.button===0&&s!==`click`&&(ZO(t,!0)&&l||(n&&c&&(!(i.current.openEvent&&d)||i.current.openEvent.type===`mousedown`)?r(!1,e.nativeEvent,`click`):(e.preventDefault(),r(!0,e.nativeEvent,`click`))))},onClick(e){let t=f.current;if(s===`mousedown`&&f.current){f.current=void 0;return}ZO(t,!0)&&l||(n&&c&&(!(i.current.openEvent&&d)||i.current.openEvent.type===`click`)?r(!1,e.nativeEvent,`click`):r(!0,e.nativeEvent,`click`))},onKeyDown(e){f.current=void 0,!(e.defaultPrevented||!u||Qk(e))&&(e.key===` `&&!$k(a)&&(e.preventDefault(),p.current=!0),!Wde(e)&&e.key===`Enter`&&r(!(n&&c),e.nativeEvent,`click`))},onKeyUp(e){e.defaultPrevented||!u||Qk(e)||$k(a)||e.key===` `&&p.current&&(p.current=!1,r(!(n&&c),e.nativeEvent,`click`))}}),[i,a,s,l,u,r,n,d,c]);return V.useMemo(()=>o?{reference:m}:{},[o,m])}var Kde={pointerdown:`onPointerDown`,mousedown:`onMouseDown`,click:`onClick`},qde={pointerdown:`onPointerDownCapture`,mousedown:`onMouseDownCapture`,click:`onClickCapture`},eA=e=>({escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0});function Jde(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,elements:i,dataRef:a}=e,{enabled:o=!0,escapeKey:s=!0,outsidePress:c=!0,outsidePressEvent:l=`pointerdown`,referencePress:u=!1,referencePressEvent:d=`pointerdown`,ancestorScroll:f=!1,bubbles:p,capture:m}=t,h=zk(),g=ek(typeof c==`function`?c:()=>!1),_=typeof c==`function`?g:c,v=V.useRef(!1),{escapeKey:y,outsidePress:b}=eA(p),{escapeKey:x,outsidePress:S}=eA(m),C=V.useRef(!1),w=ek(e=>{if(!n||!o||!s||e.key!==`Escape`||C.current)return;let t=a.current.floatingContext?.nodeId,i=h?XO(h.nodesRef.current,t):[];if(!y&&(e.stopPropagation(),i.length>0)){let e=!0;if(i.forEach(t=>{var n;if((n=t.context)!=null&&n.open&&!t.context.dataRef.current.__escapeKeyBubbles){e=!1;return}}),!e)return}r(!1,Xue(e)?e.nativeEvent:e,`escape-key`)}),T=ek(e=>{var t;let n=()=>{var t;w(e),(t=KO(e))==null||t.removeEventListener(`keydown`,n)};(t=KO(e))==null||t.addEventListener(`keydown`,n)}),E=ek(e=>{let t=a.current.insideReactTree;a.current.insideReactTree=!1;let n=v.current;if(v.current=!1,l===`click`&&n||t||typeof _==`function`&&!_(e))return;let o=KO(e),s=`[`+Bk(`inert`)+`]`,c=JO(i.floating).querySelectorAll(s),u=eO(o)?o:null;for(;u&&!sO(u);){let e=uO(u);if(sO(e)||!eO(e))break;u=e}if(c.length&&eO(o)&&!que(o)&&!GO(o,i.floating)&&Array.from(c).every(e=>!GO(u,e)))return;if(tO(o)&&k){let t=sO(o),n=cO(o),r=/auto|scroll/,i=t||r.test(n.overflowX),a=t||r.test(n.overflowY),s=i&&o.clientWidth>0&&o.scrollWidth>o.clientWidth,c=a&&o.clientHeight>0&&o.scrollHeight>o.clientHeight,l=n.direction===`rtl`,u=c&&(l?e.offsetX<=o.offsetWidth-o.clientWidth:e.offsetX>o.clientWidth),d=s&&e.offsetY>o.clientHeight;if(u||d)return}let d=a.current.floatingContext?.nodeId,f=h&&XO(h.nodesRef.current,d).some(t=>qO(e,t.context?.elements.floating));if(qO(e,i.floating)||qO(e,i.domReference)||f)return;let p=h?XO(h.nodesRef.current,d):[];if(p.length>0){let e=!0;if(p.forEach(t=>{var n;if((n=t.context)!=null&&n.open&&!t.context.dataRef.current.__outsidePressBubbles){e=!1;return}}),!e)return}r(!1,e,`outside-press`)}),D=ek(e=>{var t;let n=()=>{var t;E(e),(t=KO(e))==null||t.removeEventListener(l,n)};(t=KO(e))==null||t.addEventListener(l,n)});V.useEffect(()=>{if(!n||!o)return;a.current.__escapeKeyBubbles=y,a.current.__outsidePressBubbles=b;let e=-1;function t(e){r(!1,e,`ancestor-scroll`)}function c(){window.clearTimeout(e),C.current=!0}function u(){e=window.setTimeout(()=>{C.current=!1},oO()?5:0)}let d=JO(i.floating);s&&(d.addEventListener(`keydown`,x?T:w,x),d.addEventListener(`compositionstart`,c),d.addEventListener(`compositionend`,u)),_&&d.addEventListener(l,S?D:E,S);let p=[];return f&&(eO(i.domReference)&&(p=fO(i.domReference)),eO(i.floating)&&(p=p.concat(fO(i.floating))),!eO(i.reference)&&i.reference&&i.reference.contextElement&&(p=p.concat(fO(i.reference.contextElement)))),p=p.filter(e=>e!==d.defaultView?.visualViewport),p.forEach(e=>{e.addEventListener(`scroll`,t,{passive:!0})}),()=>{s&&(d.removeEventListener(`keydown`,x?T:w,x),d.removeEventListener(`compositionstart`,c),d.removeEventListener(`compositionend`,u)),_&&d.removeEventListener(l,S?D:E,S),p.forEach(e
5=>{e.removeEventListener(`scroll`,t)}),window.clearTimeout(e)}},[a,i,s,_,l,n,r,f,o,y,b,w,x,T,E,S,D]),V.useEffect(()=>{a.current.insideReactTree=!1},[a,_,l]);let O=V.useMemo(()=>({onKeyDown:w,...u&&{[Kde[d]]:e=>{r(!1,e.nativeEvent,`reference-press`)},...d!==`click`&&{onClick(e){r(!1,e.nativeEvent,`reference-press`)}}}}),[w,r,u,d]),k=V.useMemo(()=>({onKeyDown:w,onMouseDown(){v.current=!0},onMouseUp(){v.current=!0},[qde[l]]:()=>{a.current.insideReactTree=!0}}),[w,l,a]);return V.useMemo(()=>o?{reference:O,floating:k}:{},[o,O,k])}function Yde(e){let{open:t=!1,onOpenChange:n,elements:r}=e,i=Pk(),a=V.useRef({}),[o]=V.useState(()=>Fk()),s=Rk()!=null,[c,l]=V.useState(r.reference),u=ek((e,t,r)=>{a.current.openEvent=e?t:void 0,o.emit(`openchange`,{open:e,event:t,reason:r,nested:s}),n?.(e,t,r)}),d=V.useMemo(()=>({setPositionReference:l}),[]),f=V.useMemo(()=>({reference:c||r.reference||null,floating:r.floating||null,domReference:r.reference}),[c,r.reference,r.floating]);return V.useMemo(()=>({dataRef:a,open:t,onOpenChange:u,elements:f,events:o,floatingId:i,refs:d}),[t,u,f,o,i,d])}function Xde(e){e===void 0&&(e={});let{nodeId:t}=e,n=Yde({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,i=r.elements,[a,o]=V.useState(null),[s,c]=V.useState(null),l=i?.domReference||a,u=V.useRef(null),d=zk();QO(()=>{l&&(u.current=l)},[l]);let f=Ade({...e,elements:{...i,...s&&{reference:s}}}),p=V.useCallback(e=>{let t=eO(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;c(t),f.refs.setReference(t)},[f.refs]),m=V.useCallback(e=>{(eO(e)||e===null)&&(u.current=e,o(e)),(eO(f.refs.reference.current)||f.refs.reference.current===null||e!==null&&!eO(e))&&f.refs.setReference(e)},[f.refs]),h=V.useMemo(()=>({...f.refs,setReference:m,setPositionReference:p,domReference:u}),[f.refs,m,p]),g=V.useMemo(()=>({...f.elements,domReference:l}),[f.elements,l]),_=V.useMemo(()=>({...f,...r,refs:h,elements:g,nodeId:t}),[f,h,g,t,r]);return QO(()=>{r.dataRef.current.floatingContext=_;let e=d?.nodesRef.current.find(e=>e.id===t);e&&(e.context=_)}),V.useMemo(()=>({...f,context:_,refs:h,elements:g}),[f,h,g,_])}function tA(){return Wue()&&HO()}function Zde(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,events:i,dataRef:a,elements:o}=e,{enabled:s=!0,visibleOnly:c=!0}=t,l=V.useRef(!1),u=V.useRef(-1),d=V.useRef(!0);V.useEffect(()=>{if(!s)return;let e=ZD(o.domReference);function t(){!n&&tO(o.domReference)&&o.domReference===WO(JO(o.domReference))&&(l.current=!0)}function r(){d.current=!0}function i(){d.current=!1}return e.addEventListener(`blur`,t),tA()&&(e.addEventListener(`keydown`,r,!0),e.addEventListener(`pointerdown`,i,!0)),()=>{e.removeEventListener(`blur`,t),tA()&&(e.removeEventListener(`keydown`,r,!0),e.removeEventListener(`pointerdown`,i,!0))}},[o.domReference,n,s]),V.useEffect(()=>{if(!s)return;function e(e){let{reason:t}=e;(t===`reference-press`||t===`escape-key`)&&(l.current=!0)}return i.on(`openchange`,e),()=>{i.off(`openchange`,e)}},[i,s]),V.useEffect(()=>()=>{Vk(u)},[]);let f=V.useMemo(()=>({onMouseLeave(){l.current=!1},onFocus(e){if(l.current)return;let t=KO(e.nativeEvent);if(c&&eO(t)){if(tA()&&!e.relatedTarget){if(!d.current&&!YO(t))return}else if(!Jue(t))return}r(!0,e.nativeEvent,`focus`)},onBlur(e){l.current=!1;let t=e.relatedTarget,n=e.nativeEvent,i=eO(t)&&t.hasAttribute(Bk(`focus-guard`))&&t.getAttribute(`data-type`)===`outside`;u.current=window.setTimeout(()=>{let e=WO(o.domReference?o.domReference.ownerDocument:document);(t||e!==o.domReference)&&(GO(a.current.floatingContext?.refs.floating.current,e)||GO(o.domReference,e)||i||r(!1,n,`focus`))})}}),[a,o.domReference,r,c]);return V.useMemo(()=>s?{reference:f}:{},[s,f])}function nA(e,t,n){let r=new Map,i=n===`item`,a=e;if(i&&e){let{[Dk]:t,[Ok]:n,...r}=e;a=r}return{...n===`floating`&&{tabIndex:-1,[Pde]:``},...a,...t.map(t=>{let r=t?t[n]:null;return typeof r==`function`?e?r(e):null:r}).concat(e).reduce((e,t)=>(t&&Object.entries(t).forEach(t=>{let[n,a]=t;if(!(i&&[Dk,Ok].includes(n))){if(n.indexOf(`on`)===0){if(r.has(n)||r.set(n,[]),typeof a==`function`){var o;(o=r.get(n))==null||o.push(a),e[n]=function(){var e=[...arguments];return r.get(n)?.map(t=>t(...e)).find(e=>e!==void 0)}}}else e[n]=a}}),e),{})}}function Qde(e){e===void 0&&(e=[]);let t=e.map(e=>e?.reference),n=e.map(e=>e?.floating),r=e.map(e=>e?.item),i=V.useCallback(t=>nA(t,e,`reference`),t),a=V.useCallback(t=>nA(t,e,`floating`),n),o=V.useCallback(t=>nA(t,e,`item`),r);return V.useMemo(()=>({getReferenceProps:i,getFloatingProps:a,getItemProps:o}),[i,a,o])}var $de=new Map([[`select`,`listbox`],[`combobox`,`listbox`],[`label`,!1]]);function efe(e,t){t===void 0&&(t={});let{open:n,elements:r,floatingId:i}=e,{enabled:a=!0,role:o=`dialog`}=t,s=Pk(),c=r.domReference?.id||s,l=V.useMemo(()=>Yue(r.floating)?.id||i,[r.floating,i]),u=$de.get(o)??o,d=Rk()!=null,f=V.useMemo(()=>u===`tooltip`||o===`label`?{[`aria-`+(o===`label`?`labelledby`:`describedby`)]:n?l:void 0}:{"aria-expanded":n?`true`:`false`,"aria-haspopup":u===`alertdialog`?`dialog`:u,"aria-controls":n?l:void 0,...u===`listbox`&&{role:`combobox`},...u===`menu`&&{id:c},...u===`menu`&&d&&{role:`menuitem`},...o===`select`&&{"aria-autocomplete":`none`},...o===`combobox`&&{"aria-autocomplete":`list`}},[u,l,d,n,c,o]),p=V.useMemo(()=>
5{let e={id:l,...u&&{role:u}};return u===`tooltip`||o===`label`?e:{...e,...u===`menu`&&{"aria-labelledby":c}}},[u,l,c,o]),m=V.useCallback(e=>{let{active:t,selected:n}=e,r={role:`option`,...t&&{id:l+`-fui-option`}};switch(o){case`select`:case`combobox`:return{...r,"aria-selected":n}}return{}},[l,o]);return V.useMemo(()=>a?{reference:f,floating:p,item:m}:{},[a,f,p,m])}function rA(e,t,n){return n===void 0&&(n=!0),e.filter(e=>e.parentId===t&&(!n||e.context?.open)).flatMap(t=>[t,...rA(e,t.id,n)])}function iA(e,t){let[n,r]=e,i=!1,a=t.length;for(let e=0,o=a-1;e<a;o=e++){let[a,s]=t[e]||[0,0],[c,l]=t[o]||[0,0];s>=r!=l>=r&&n<=(c-a)*(r-s)/(l-s)+a&&(i=!i)}return i}function tfe(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function nfe(e){e===void 0&&(e={});let{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e,i={current:-1},a=!1,o=null,s=null,c=typeof performance<`u`?performance.now():0;function l(e,t){let n=performance.now(),r=n-c;if(o===null||s===null||r===0)return o=e,s=t,c=n,null;let i=e-o,a=t-s,l=Math.sqrt(i*i+a*a)/r;return o=e,s=t,c=n,l}let u=e=>{let{x:n,y:o,placement:s,elements:c,onClose:u,nodeId:d,tree:f}=e;return function(e){function p(){Vk(i),u()}if(Vk(i),!c.domReference||!c.floating||s==null||n==null||o==null)return;let{clientX:m,clientY:h}=e,g=[m,h],_=qk(e),v=e.type===`mouseleave`,y=Kk(c.floating,_),b=Kk(c.domReference,_),x=c.domReference.getBoundingClientRect(),S=c.floating.getBoundingClientRect(),C=s.split(`-`)[0],w=n>S.right-S.width/2,T=o>S.bottom-S.height/2,E=tfe(g,x),D=S.width>x.width,O=S.height>x.height,k=(D?x:S).left,A=(D?x:S).right,j=(O?x:S).top,M=(O?x:S).bottom;if(y&&(a=!0,!v))return;if(b&&(a=!1),b&&!v){a=!0;return}if(v&&eO(e.relatedTarget)&&Kk(c.floating,e.relatedTarget)||f&&rA(f.nodesRef.current,d).length)return;if(C===`top`&&o>=x.bottom-1||C===`bottom`&&o<=x.top+1||C===`left`&&n>=x.right-1||C===`right`&&n<=x.left+1)return p();let ee=[];switch(C){case`top`:ee=[[k,x.top+1],[k,S.bottom-1],[A,S.bottom-1],[A,x.top+1]];break;case`bottom`:ee=[[k,S.top+1],[k,x.bottom-1],[A,x.bottom-1],[A,S.top+1]];break;case`left`:ee=[[S.right-1,M],[S.right-1,j],[x.left+1,j],[x.left+1,M]];break;case`right`:ee=[[x.right-1,M],[x.right-1,j],[S.left+1,j],[S.left+1,M]]}function te(e){let[n,r]=e;switch(C){case`top`:return[[D?n+t/2:w?n+t*4:n-t*4,r+t+1],[D?n-t/2:w?n+t*4:n-t*4,r+t+1],[S.left,w||D?S.bottom-t:S.top],[S.right,w?D?S.bottom-t:S.top:S.bottom-t]];case`bottom`:return[[D?n+t/2:w?n+t*4:n-t*4,r-t],[D?n-t/2:w?n+t*4:n-t*4,r-t],[S.left,w||D?S.top+t:S.bottom],[S.right,w?D?S.top+t:S.bottom:S.top+t]];case`left`:{let e=[n+t+1,O?r+t/2:T?r+t*4:r-t*4],i=[n+t+1,O?r-t/2:T?r+t*4:r-t*4];return[[T||O?S.right-t:S.left,S.top],[T?O?S.right-t:S.left:S.right-t,S.bottom],e,i]}case`right`:return[[n-t,O?r+t/2:T?r+t*4:r-t*4],[n-t,O?r-t/2:T?r+t*4:r-t*4],[T||O?S.left+t:S.right,S.top],[T?O?S.left+t:S.right:S.left+t,S.bottom]]}}if(!iA([m,h],ee)){if(a&&!E)return p();if(!v&&r){let t=l(e.clientX,e.clientY);if(t!==null&&t<.1)return p()}iA([m,h],te([n,o]))?!a&&r&&(i.current=window.setTimeout(p,40)):p()}}};return u.__options={blockPointerEvents:n},u}var rfe=({link:e})=>{let t=`inline-flex text-indigo-300 hover:text-indigo-200 text-sm font-medium`,n=`${e.label} â`;return e.to?(0,U.jsx)(P,{to:e.to,className:t,onClick:e.onClick,children:n}):e.href?(0,U.jsx)(`a`,{href:e.href,className:t,onClick:e.onClick,target:`_blank`,rel:`noreferrer`,children:n}):(0,U.jsx)(`button`,{type:`button`,className:t,onClick:e.onClick,children:n})},aA=({fluid:e,compact:t,children:n,text:r,header:i,values:a,description:o,link:s,className:c=``,placement:l,theme:u=`dark`,referenceClassName:d,triggerButton:f=!1,triggerAriaLabel:p=`Show tooltip`})=>{let[m,h]=(0,V.useState)(!1),g=(0,V.useId)(),{refs:_,floatingStyles:v,context:y}=Xde({placement:l,open:m,onOpenChange:h,middleware:[Nde({allowedPlacements:l&&[l]}),jde(10),Mde({padding:8})],whileElementsMounted:Tde}),{getReferenceProps:b,getFloatingProps:x}=Qde([Gk(y,{move:!1,handleClose:nfe()}),Zde(y),Gde(y,{enabled:f}),Jde(y),efe(y,{role:`tooltip`})]),S=f?`inline-flex items-center justify-center border-0 bg-transparent p-0 font-inherit text-inherit cursor-pointer rounded-sm focus:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-1`:`cursor-pointer w-fit`,C={ref:_.setReference,...b(),className:(0,H.default)(d??S),...f?{type:`button`,"aria-label":p,"aria-expanded":m,"aria-describedby":m?g:void 0}:{}},w=i!=null||a&&a.length>0||s!=null,T=u===`dark`?`border-white/10`:`border-black-100`,E=t?`px-2 py-1`:`px-3 py-2`,D=`w-96`;e&&(D=`w-[60vw] md:w-max`),t&&(D=`w-max`);let O=w?D:(0,H.default)(E,D);return(0,U.jsxs)(`div`,{className:c,children:[f?(0,U.jsx)(`button`,{...C,children:n}):(0,U.jsx)(`div`,{...C,children:n}
5),m&&(0,U.jsx)(Hde,{children:(0,U.jsx)(`div`,{id:g,ref:_.setFloating,style:v,...x(),className:`z-[1000]`,children:(0,U.jsx)(`div`,{className:(0,H.default)([`shadow`,`rounded-md`,`break-normal`,`text-sm`,`text-left`,u===`dark`?`bg-black text-white`:`bg-white text-black`,O]),children:w?(0,U.jsxs)(`div`,{className:`flex flex-col`,children:[i!=null&&(0,U.jsx)(`div`,{className:(0,H.default)(E,`font-semibold border-b`,T),children:i}),(a?.length||o!=null)&&(0,U.jsxs)(`div`,{className:(0,H.default)(E,`flex flex-col gap-1`),children:[a?.map(e=>(0,U.jsxs)(`div`,{className:`flex items-baseline justify-between gap-4`,children:[(0,U.jsx)(`span`,{className:`font-semibold whitespace-nowrap`,children:e.label}),(0,U.jsx)(`span`,{className:`text-right`,children:e.value})]},e.label)),o!=null&&(0,U.jsx)(`div`,{className:a?.length?`pt-1`:void 0,children:o})]}),s!=null&&(0,U.jsx)(`div`,{className:(0,H.default)(E,`border-t`,T),children:(0,U.jsx)(rfe,{link:s})})]}):r})})})]})},oA={block:`justify-center w-full`,auto:``},sA=(e,t)=>{switch(t){case`pill`:return`rounded-full`;case`button`:return e===`xs`?`rounded`:`rounded-md`}},cA=({children:e,icon:t,...n})=>(0,U.jsxs)(K,{...n,children:[t,(0,U.jsx)(`span`,{className:e?`pl-2`:``,children:e})]}),lA=({children:e,layout:t=`auto`,variant:n=`primary`,size:r=`md`,shape:i=`button`,isLoading:a=!1,className:o=``,...s})=>{let c=(0,H.default)(`flex items-center justify-center`,oA[t],G.buttons.sizes[r],G.buttons.styles[n],sA(r,i),`hover:no-underline cursor-pointer`);return(0,U.jsx)(`a`,{...s,target:`_blank`,className:`${o} ${c}`,children:a?`Loading...`:e})},uA=({href:e})=>(0,U.jsxs)(lA,{href:e,className:`w-fit`,variant:`white`,size:`sm`,children:[`View Docs`,(0,U.jsx)(rD,{variant:`sm`,className:`inline ml-1 h-5 mt-0`})]}),dA=({children:e,layout:t=`auto`,variant:n=`primary`,size:r=`md`,shape:i=`button`,isLoading:a=!1,className:o=``,...s})=>{let c=(0,H.default)(`flex items-center justify-center`,oA[t],G.buttons.sizes[r],G.buttons.styles[n],sA(r,i),`hover:no-underline cursor-pointer`,o);return(0,U.jsx)(P,{...s,className:c,children:a?`Loading...`:e})},K=({children:e,layout:t=`auto`,variant:n=`primary`,size:r=`md`,shape:i=`button`,isLoading:a=!1,type:o=`button`,className:s=``,requireConfirm:c=!1,...l})=>{let[u,d]=(0,V.useState)(!1),f=l.onClick,p=(0,H.default)(`flex items-center justify-center`,`disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:bg-inherit disabled:hover:text-inherit disabled:hover:border-inherit`,oA[t],G.buttons.sizes[r],G.buttons.styles[n],sA(r,i));if(u){let e=(0,H.default)(G.buttons.sizes[r],G.buttons.styles.white,sA(r,i));return(0,U.jsxs)(W,{variant:`horizontal`,size:`sm`,className:c===`invert`?`flex-row-reverse`:``,children:[(0,U.jsx)(`button`,{className:e,type:`reset`,onClick:e=>{e.preventDefault(),d(!1)},children:`Cancel`}),(0,U.jsx)(`button`,{...l,onClick:e=>{e.preventDefault(),d(!1),f&&f(e)},type:o,className:`${s} ${p}`,disabled:a||l.disabled,children:`Confirm`})]})}return c&&(l={...l,onClick:e=>{e.preventDefault(),d(!0)}}),(0,U.jsx)(`button`,{...l,type:o,className:`${s} ${p}`,disabled:a||l.disabled,children:a?`Loading...`:e})},ife=({scope:e,envId:t,children:n,tooltipProps:r,...i})=>B(n=>O_(n,{scope:e,envId:t}))?(0,U.jsx)(K,{...i,children:n}):(0,U.jsx)(aA,{...r,text:`You do not have "${cl(e)}" permissions for this environment (id:${t})`,children:(0,U.jsx)(K,{...i,disabled:!0,children:n})}),fA=(e,t={})=>({envId:n,children:r,tooltipProps:i,...a})=>(0,U.jsx)(ife,{tooltipProps:i,scope:e,envId:n,...t,...a,children:r}),pA=({children:e,tooltipProps:t,...n})=>B(w_)?(0,U.jsx)(K,{...n,children:e}):(0,U.jsx)(aA,{...t,text:`You do not have a valid role type (platform_owner, owner) to access this resource`,children:(0,U.jsx)(K,{...n,disabled:!0,children:e})}),afe=({children:e,userId:t,roleId:n,orgId:r,tooltipProps:i,...a})=>B(e=>C_(e,{userId:t,roleId:n,orgId:r}))?(0,U.jsx)(K,{...a,children:e}):(0,U.jsx)(aA,{...i,text:`You are not an owner or role admin`,children:(0,U.jsx)(K,{...a,disabled:!0,children:e})}),mA=({children:e,tooltipProps:t,...n})=>{let r=B($o);return B(e=>S_(e,{orgId:r}))?(0,U.jsx)(K,{...n,children:e}):(0,U.jsx)(aA,{...t,text:`You do not have a valid role type (platform_owner, owner) to access this resource`,children:(0,U.jsx)(K,{...n,disabled:!0,children:e})})},hA=fA(`deploy`),gA=fA(`destroy`),_A=fA(`observability`),vA=fA(`sensitive`),yA=fA(`read`),bA=fA(`admin`),ofe={csv:`CSV`,jsonl:`JSON`},sfe=({onExport:e,isExporting:t,disabled:n=!1})=>{let[r,i]=(0,V.useState)(!1),a=(0,V.useRef)(null);(0,V.useEffect)(()=>
5{if(!r)return;let e=e=>{a.current&&!a.current.contains(e.target)&&i(!1)};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[r]);let o=t=>{i(!1),e(t)};return(0,U.jsxs)(`div`,{ref:a,className:`relative`,children:[(0,U.jsxs)(`button`,{type:`button`,onClick:()=>i(e=>!e),disabled:t||n,className:(0,H.default)(`flex items-center gap-1 whitespace-nowrap`,`border border-black-100 bg-white text-black text-xs font-medium`,`px-2 py-2 rounded-md shadow-sm`,`hover:bg-black-100 hover:border-black-300`,`focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-black-200`,{"opacity-50 cursor-not-allowed":t||n}),children:[`Export`,(0,U.jsx)(IE,{variant:`sm`})]}),r&&(0,U.jsx)(`div`,{className:(0,H.default)(`absolute right-0 mt-1 z-10`,`bg-white border border-black-100 rounded-md shadow p-2`,`min-w-[75px]`),children:[`csv`,`jsonl`].map(e=>(0,U.jsx)(`button`,{type:`button`,onClick:()=>o(e),className:(0,H.default)(`flex items-center justify-between w-full`,`p-2 rounded text-xs text-left`,`hover:bg-black-100`),children:(0,U.jsx)(`span`,{children:ofe[e]})},e))})]})},cfe=()=>(0,U.jsx)(`div`,{className:`h-5 w-5 animate-spin rounded-full border-2 border-[#b4c0ff] border-t-[#283a99]`,role:`img`,"aria-label":`loading spinner`}),lfe=({onCancel:e})=>(0,U.jsxs)(`button`,{type:`button`,className:`flex items-center gap-1 text-sm text-[#741414]`,onClick:e,children:[(0,U.jsx)(YE,{variant:`sm`,color:`#741414`}),`Cancel`]}),xA=({onDismiss:e})=>(0,U.jsxs)(`button`,{type:`button`,className:`flex items-center gap-1 text-sm text-[#741414]`,onClick:e,children:[(0,U.jsx)(YE,{variant:`sm`,color:`#741414`}),`Dismiss`]}),SA=({status:e,onCancel:t,errorMessage:n,progress:r,downloadUrl:i})=>{let[a,o]=(0,V.useState)(!1),s=(0,V.useRef)(null);if((0,V.useEffect)(()=>{if(a)return s.current=setTimeout(()=>t(),5e3),()=>{s.current&&clearTimeout(s.current)}},[a,t]),(0,V.useEffect)(()=>{e!==`ready`&&o(!1)},[e]),e===`idle`)return null;if(e===`error`)return(0,U.jsxs)(`div`,{role:`status`,className:`flex items-center justify-between rounded-md border border-red-300 bg-red-50 px-4 py-2.5 shadow-sm`,children:[(0,U.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,U.jsx)(ZE,{variant:`sm`,color:`#AD1A1A`}),(0,U.jsx)(`span`,{className:`text-sm text-red-900`,children:n||`Export failed`})]}),(0,U.jsx)(xA,{onDismiss:t})]});if(e===`ready`&&i)return(0,U.jsxs)(`div`,{role:`status`,className:`flex items-center justify-between rounded-md border border-[#364ecc] bg-[#ecefff] px-4 py-2.5 shadow-sm`,children:[(0,U.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,U.jsx)(`span`,{className:`text-sm text-black`,children:`Export ready`}),(0,U.jsxs)(`a`,{href:i,className:`flex items-center gap-1 text-sm font-medium text-[#364ecc] underline`,onClick:()=>o(!0),children:[(0,U.jsx)(aD,{variant:`sm`,color:`#364ecc`}),`Download`]})]}),(0,U.jsx)(xA,{onDismiss:t})]});let c=r&&r.total>0?`Exporting ${r.exported} of ${r.total}...`:`Export in progress, this may take a moment`;return(0,U.jsxs)(`div`,{role:`status`,className:`flex items-center justify-between rounded-md border border-[#364ecc] bg-[#ecefff] px-4 py-2.5 shadow-sm`,children:[(0,U.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,U.jsx)(cfe,{}),(0,U.jsx)(`span`,{className:`text-sm text-black`,children:c})]}),(0,U.jsx)(lfe,{onCancel:t})]})},ufe=e=>{switch(e){case`error`:return`underline`;default:return``}},CA=({href:e,children:t,variant:n=`default`,className:r=``})=>{let i=ufe(n);return(0,U.jsx)(`a`,{className:`${i} ${r}`,target:`_blank`,href:e,rel:`noreferrer`,children:t})},wA=e=>{let{linkIf:t,children:n,...r}=e;return t?(0,U.jsx)(CA,{...r,children:n}):n},dfe=`#E9B64D`,ffe=e=>{switch(e){case`warning`:return`bg-orange-100 border border-orange-300 text-black`;case`success`:return`bg-green-100 border border-green-400 text-black`;case`error`:return`bg-red-100 border border-red text-black`;case`info`:return`bg-black-50 border border-black-100 text-black`;case`progress`:return`bg-indigo-100 border border-indigo-500 text-black`;default:return``}},pfe=({variant:e=`info`})=>e===`error`?(0,U.jsx)(ZE,{color:`#AD1A1A`,variant:`base`}):e===`warning`?(0,U.jsx)(ZE,{color:dfe,variant:`base`}):e===`success`?(0,U.jsx)(HE,{color:`#00633F`,variant:`base`,strokeWidth:1.5,style:{transform:`scale(0.9)`}}):e===`info`?(0,U.jsx)(tD,{variant:`base`}):e===`progress`?(0,U.jsx)(SE,{color:`#364ECC`,variant:`base`}):(0,U.jsx)(tD,{variant:`base`}),q=({children:e,className:t=``,variant:n=`info`,showIcon:r=!0,iconAlign:i=`start`})=>{let a=ffe(n);return(0,U.jsxs)(`div`,{role:`status`,className:(0,H.default)(a,`rounded-md px-3 py-3 shadow flex`,i===`center`?`items-center`:`items-start`,t),children:[r?(0,U.jsx)(`div`,{className:`mr-3`,children:(0,U.jsx)(pfe,{variant:n})}):null,(0,U.jsx)(`div`,{className:r?void 0:`min-w-0 flex-1`,children:e})]})},mfe=({isSuccess:e,isError:t,isLoading:n,message:r,className:i})=>r?n?(0,U.jsx)(`div`,{className:`flex items-center text-indigo ${i}`,children:r}):e?(0,U.jsxs)(`div`,{className:`flex items-center text-green-300 ${i}`,children:[(0,U.jsx)(HE,{color:`#4D9279`}),r]}):t?(0,U.jsxs)(`div`,{className:`flex items-center text-red-300 ${i}`,children:[(0,U.jsx)(ZE,{color:`#C76464`}),r]}):null:null,TA=({isSuccess:e,isError:t,isWarning:n,message:r,className:i})=>r?e?(0,U.jsx)(q,{className:i,variant:`success`,children:r}):n?(0,U.jsx)(q,{className:i,variant:`warning`,children:r}):t?(0,U.jsx)(q,{className:i,variant:`error`,children:r}):null:null,EA=()=>B(Rn)?(0,U.jsxs)(q,{variant:`success`,children:[`You are already logged in!`,` `,(0,U.jsx)(P,{to:Dr(),className:`underline`,children:`Continue to dashboard`})]}):null,hfe=`https://www.aptible.com/legal/ai-terms-of-service`,DA=()=>(0,U.jsx)(CA,{href:hfe,children:`AI Terms of Service`}),OA=({action:e})=>(0,U.jsxs)(`p`,{className:`text-gray-700 text-sm text-center`,children:[`By `,e,`, I confirm that I have read and agree to Aptible's`,` `,(0,U.jsx)(DA,{}),`.`]});function kA(e){if(e==null)return null;if(typeof e==`string`)return e;if(typeof e==`object`){let t=e;if(typeof t.message==`string`&&t.message.trim())return t.message;if(typeof t.error==`string`&&t.error.trim())return t.error}return null}function AA(e,t){let n=e?.[t]?.href;return typeof n==`string`&&n?n:void 0}function jA(e){if(!e||typeof e!=`object`)return{status:`NONE`};let t=e,n=t._links,r=t.status||`NONE`;return{baaResourceType:typeof t._type==`string`?t._type:void 0,agreementId:typeof t.adobe_agreement_id==`string`&&t.adobe_agreement_id||void 0,status:r,signingUrl:typeof t.signing_url==`string`?t.signing_url:void 0,updatedAt:typeof t.updated_at==`string`?t.updated_at:void 0,signedAt:typeof t.signed_at==`string`?t.signed_at:void 0,downloadUrl:AA(n,`download`),selfUrl:AA(n,`self`),organizationUrl:AA(n,`organization`)}}
5function*MA(e,t){yield*t(),e.json?.ok&&e.json.value!=null&&(e.json.value=jA(e.json.value))}function gfe(e){return e.json.ok||e.response?.status!==404&&e.json.error?.error!==`not_found`?!1:(e.json={ok:!0,value:{status:`NONE`}},!0)}function*NA(e,t){yield*t(),gfe(e)}var PA=mr.get(`/organizations/:orgId/baa`,{supervisor:fr()},[mr.cache(),NA,MA]),FA=mr.post(`/organizations/:orgId/baa`,function*(e,t){let{email:n,firstName:r,lastName:i}=e.payload;if(e.request=e.req({body:JSON.stringify({email:n,signer_first_name:r,signer_last_name:i})}),yield*t(),e.json?.ok&&e.json?.value){let t=jA(e.json.value);e.json.value=t,yield*L.update(L.cache.add({[e.key]:t}))}}),_fe=mr.post(`/organizations/:orgId/baa/refresh`,[mr.cache(),NA,MA]);function IA(){let e=B($o),t=B(t=>__(t,{orgId:e})),n=B(Vl),r=(0,V.useMemo)(()=>n.some(t=>t.organizationId===e&&Gl(t)===`dedicated`),[n,e]),i=(0,V.useMemo)(()=>PA({orgId:e}),[e]);u(i),u(Jl());let a=B(e=>L.cache.selectById(e,{id:i.payload.key}))?.status;return t&&r&&a!==void 0&&a!==`SIGNED`?(0,U.jsxs)(q,{variant:`warning`,children:[`Review & Sign: An updated BAA is available. Please execute it through the new`,` `,(0,U.jsx)(P,{to:Li(),className:`underline font-medium`,children:`Agreements page`}),`. Once executed, the BAA will be available in the dashboard for download.`]}):null}function LA({className:e,...t}){return(0,U.jsx)(`form`,{className:`flex flex-col gap-4 ${e}`,...t})}function RA(e){let t=(0,H.default)(G.type.h4,`block`,e.className);return(0,U.jsx)(`label`,{...e,className:t})}function zA({children:e,variant:t=`default`}){let n=(0,H.default)(`text-sm mt-1`,{"text-red-400":t===`danger`,"text-limegreen":t===`success`,"text-orange-400":t===`warn`,"text-indigo-400":t===`info`,"text-black":t==="default"});return(0,U.jsx)(`div`,{className:n,children:e})}function J({feedbackMessage:e,children:t,label:n,labelProps:r,htmlFor:i,description:a,splitWidthInputs:o,feedbackVariant:s=`default`,className:c=``}){return(0,U.jsxs)(`div`,{className:`flex gap-1 ${o?``:`flex-col`} ${c}`,children:[(0,U.jsxs)(`div`,{className:`${o?`w-1/2`:``}`,children:[(0,U.jsx)(RA,{htmlFor:i,...r,children:n}),a?(0,U.jsx)(`div`,{className:`text-black-500 mb-1 mr-2`,children:a}):null]}),(0,U.jsxs)(`div`,{className:`flex flex-col ${o?`w-1/2`:`flex-col`}`,children:[t,e?(0,U.jsx)(zA,{variant:s,children:e}):null]})]})}var BA=({children:e})=>(0,U.jsx)(`div`,{className:`flex flex-col`,children:e}),VA=({children:e,className:t=``})=>{let n=(0,H.default)(`overflow-x-scroll w-full shadow ring-1 ring-black ring-opacity-5 rounded-lg`,t);return(0,U.jsx)(`div`,{className:n,children:(0,U.jsx)(`div`,{className:`min-w-[600px]`,children:(0,U.jsx)(`table`,{className:`table-auto w-full divide-y divide-gray-300`,children:e})})})},HA=({children:e})=>(0,U.jsx)(`thead`,{className:`bg-gray-50`,children:(0,U.jsx)(`tr`,{children:e})}),UA=({children:e})=>(0,U.jsx)(`tbody`,{className:`divide-y divide-gray-200 bg-white`,children:e}),WA=({children:e,className:t=``})=>(0,U.jsx)(`tr`,{className:`group hover:bg-gray-50 ${t}`,children:e}),GA=({children:e=`No resources found`,colSpan:t=1})=>(0,U.jsx)(WA,{children:(0,U.jsx)(Y,{colSpan:t,variant:`center`,children:e})}),Y=({children:e,className:t,colSpan:n=1,variant:r=`left`})=>{let i=(0,H.default)(`text-sm text-gray-500`,`pl-4 py-3`,`break-words`,r===`right`?`text-right pr-4 flex gap-2 justify-end`:r===`center`?`text-center`:`text-left`,t);return(0,U.jsx)(`td`,{colSpan:n,className:i,children:e})},KA=({children:e,className:t,variant:n=`left`,onClick:r})=>{let i=(0,H.default)(`pl-4 py-3`,`text-sm font-normal text-gray-500`,`align-top`,n===`right`?`text-right pr-4`:n===`center`?`text-center`:`text-left`,t);return(0,U.jsx)(`th`,{scope:`col`,className:i,onClick:r,onKeyUp:r,children:e})},qA=()=>(0,U.jsx)(`span`,{children:`No resources found.`}),JA=({message:e=``})=>(0,U.jsxs)(`span`,{children:[`Error: `,e]});function YA({query:e,isEmpty:t,children:n,empty:r=(0,U.jsx)(qA,{}),loader:i=(0,U.jsx)(xE,{}),error:a=e=>(0,U.jsx)(JA,{message:e})}){let{isInitialLoading:o,isError:s,message:c}=e;return t?o?i:s&&c?a(c):t?r:(0,U.jsx)(U.Fragment,{children:n}):(0,U.jsx)(U.Fragment,{children:n})}function XA({id:e,value:t,options:n,onSelect:r,defaultValue:i,className:a=``,ariaLabel:o=`combobox`,disabled:s=!1,placeholder:c=`Select`}){let l=(0,H.default)(`border-gray-300 text-black`,`hover:border-gray-500`,`focus:ring-gray-500 focus:border-gray-500`,`active:text-black`,`disabled:bg-black-50 disabled:border-black-100 disabled:text-black`,`rounded-md shadow-sm`,a);return(0,U.jsx)(`select`,{id:e,"aria-label":o,className:l,value:t,defaultValue:i,"aria-placeholder":c,onChange:e=>{let t=e.currentTarget.value,i=n.find(e=>e.value===t);i&&r(i)},disabled:s,children:n.map(e=>(0,U.jsx)(`option`,{value:e.value,disabled:e.disabled,children:e.label},e.key||e.value))})}function ZA({value:e,children:t,selected:n,name:r=``,onSelect:i=()=>{},disabled:a=!1,className:o=``}){return(0,U.jsxs)(`label`,{className:`flex items-center`,children:[(0,U.jsx)(`input`,{type:`radio`,name:r,value:e,checked:n===e,onChange:()=>i(e),disabled:a}),(0,U.jsx)(`span`,{className:`ml-1 ${o}`,children:t})]})}function QA({children:e,className:t=``,orientation:n=`vertical`,...r}){return(0,U.jsx)(`div`,{className:(0,H.default)(`flex gap-2`,{"flex-col":n===`vertical`,"flex-row items-center":n===`horizontal`},t),children:V.Children.map(e,e=>(0,V.cloneElement)(e,{...r}))})}var $A=e=>{let{isInitialLoading:t,isError:n,message:r}=u(Jl()),i=B(ns),a=B(e=>Ul(e,{orgId:i.id}));return t?(0,U.jsx)(xE,{}):n?(0,U.jsx)(JA,{message:r}):a.length===0?(0,U.jsx)(qA,{}):(0,U.jsx)(XA,{...e,options:a})},ej=({onSelect:e,stackId:t=``,...n})=>{let{isInitialLoading:r,isError:i,message:a}=u(fu()),o=[{label:`Select an Environment`,value:``},...B(e=>hu(e,{stackId:t})).map(cu).sort((e,t)=>
5e.label.localeCompare(t.label))];return r?(0,U.jsx)(xE,{}):i?(0,U.jsx)(JA,{message:a}):o.length===0?(0,U.jsx)(qA,{}):(0,U.jsx)(XA,{options:o,onSelect:e,...n})},vfe=(0,V.createContext)(null);(0,V.createContext)(null),(0,V.createContext)(null),(0,V.createContext)(null),(0,V.createContext)(null);var tj=(0,V.createContext)({}),nj=(0,V.createContext)(null),yfe=(0,V.createContext)(null),rj=typeof document<`u`?V.useLayoutEffect:()=>{};function bfe(e){let[t,n]=(0,V.useState)(e),r=(0,V.useRef)(t),i=(0,V.useRef)(null),a=(0,V.useRef)(()=>{if(!i.current)return;let e=i.current.next();if(e.done){i.current=null;return}r.current===e.value?a.current():n(e.value)});return rj(()=>{r.current=t,i.current&&a.current()}),[t,(0,V.useCallback)(e=>{i.current=e(r.current),a.current()},[a])]}var ij={prefix:String(Math.round(Math.random()*1e10)),current:0},aj=V.createContext(ij),xfe=V.createContext(!1);typeof window<`u`&&window.document&&window.document.createElement;var oj=new WeakMap;function Sfe(e=!1){let t=(0,V.useContext)(aj),n=(0,V.useRef)(null);if(n.current===null&&!e){let e=V.default.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED?.ReactCurrentOwner?.current;if(e){let n=oj.get(e);n==null?oj.set(e,{id:t.current,state:e.memoizedState}):e.memoizedState!==n.state&&(t.current=n.id,oj.delete(e))}n.current=++t.current}return n.current}function Cfe(e){let t=(0,V.useContext)(aj),n=Sfe(!!e),r=`react-aria${t.prefix}`;return e||`${r}-${n}`}function wfe(e){let t=V.useId(),[n]=(0,V.useState)(sj()),r=n?`react-aria`:`react-aria${ij.prefix}`;return e||`${r}-${t}`}var Tfe=typeof V.useId==`function`?wfe:Cfe;function Efe(){return!1}function Dfe(){return!0}function Ofe(e){return()=>{}}function sj(){return typeof V.useSyncExternalStore==`function`?V.useSyncExternalStore(Ofe,Efe,Dfe):(0,V.useContext)(xfe)}var kfe=!!(typeof window<`u`&&window.document&&window.document.createElement),cj=new Map,lj;typeof FinalizationRegistry<`u`&&(lj=new FinalizationRegistry(e=>{cj.delete(e)}));function uj(e){let[t,n]=(0,V.useState)(e),r=(0,V.useRef)(null),i=Tfe(t),a=(0,V.useRef)(null);if(lj&&lj.register(a,i),kfe){let e=cj.get(i);e&&!e.includes(r)?e.push(r):cj.set(i,[r])}return rj(()=>{let e=i;return()=>{lj&&lj.unregister(a),cj.delete(e)}},[i]),(0,V.useEffect)(()=>{let e=r.current;return e&&n(e),()=>{e&&(r.current=null)}}),i}function Afe(e,t){if(e===t)return e;let n=cj.get(e);if(n)return n.forEach(e=>e.current=t),t;let r=cj.get(t);return r?(r.forEach(t=>t.current=e),e):t}function dj(e=[]){let t=uj(),[n,r]=bfe(t),i=(0,V.useCallback)(()=>{r(function*(){yield t,yield document.getElementById(t)?t:void 0})},[t,r]);return rj(i,[t,i,...e]),n}function fj(...e){return(...t)=>{for(let n of e)typeof n==`function`&&n(...t)}}var pj=e=>e?.ownerDocument??document,mj=e=>e&&`window`in e&&e.window===e?e:pj(e).defaultView||window;function jfe(e){return typeof e==`object`&&!!e&&`nodeType`in e&&typeof e.nodeType==`number`}function Mfe(e){return jfe(e)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&`host`in e}var Nfe=!1;function hj(){return Nfe}function gj(e,t){if(!hj())return t&&e?e.contains(t):!1;if(!e||!t)return!1;let n=t;for(;n!==null;){if(n===e)return!0;n=n.tagName===`SLOT`&&n.assignedSlot?n.assignedSlot.parentNode:Mfe(n)?n.host:n.parentNode}return!1}var _j=(e=document)=>{if(!hj())return e.activeElement;let t=e.activeElement;for(;t&&`shadowRoot`in t&&t.shadowRoot?.activeElement;)t=t.shadowRoot.activeElement;return t};function vj(e){return hj()&&e.target.shadowRoot&&e.composedPath?e.composedPath()[0]:e.target}var Pfe=class{get currentNode(){return this._currentNode}set currentNode(e){if(!gj(this.root,e))throw Error(`Cannot set currentNode to a node that is not contained by the root node.`);let t=[],n=e,r=e;for(this._currentNode=e;n&&n!==this.root;)if(n.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let e=n,i=this._doc.createTreeWalker(e,this.whatToShow,{acceptNode:this._acceptNode});t.push(i),i.currentNode=r,this._currentSetFor.add(i),n=r=e.host}else n=n.parentNode;let i=this._doc.createTreeWalker(this.root,this.whatToShow,{acceptNode:this._acceptNode});t.push(i),i.currentNode=r,this._currentSetFor.add(i),this._walkerStack=t}get doc(){return this._doc}firstChild(){let e=this.currentNode,t=this.nextNode();return gj(e,t)?(t&&(this.currentNode=t),t):(this.currentNode=e,null)}lastChild(){let e=this._walkerStack[0].lastChild();return e&&(this.currentNode=e),e}nextNode(){let e=this._walkerStack[0].nextNode();if(e){if(e.shadowRoot){let t;if(typeof this.filter==`function`?t=this.filter(e):this.filter?.acceptNode&&(t=this.filter.acceptNode(e)),t===NodeFilter.FILTER_ACCEPT)return this.currentNode=e,e;let n=this.nextNode();return n&&(this.currentNode=n),n}return e&&(this.currentNode=e),e}if(this._walkerStack.length>1){this._walkerStack.shift();let e=this.nextNode();return e&&(this.currentNode=e),e}return null}previousNode(){let e=this._walkerStack[0];
5if(e.currentNode===e.root){if(this._currentSetFor.has(e)){if(this._currentSetFor.delete(e),this._walkerStack.length>1){this._walkerStack.shift();let e=this.previousNode();return e&&(this.currentNode=e),e}return null}return null}let t=e.previousNode();if(t){if(t.shadowRoot){let e;if(typeof this.filter==`function`?e=this.filter(t):this.filter?.acceptNode&&(e=this.filter.acceptNode(t)),e===NodeFilter.FILTER_ACCEPT)return t&&(this.currentNode=t),t;let n=this.lastChild();return n&&(this.currentNode=n),n}return t&&(this.currentNode=t),t}if(this._walkerStack.length>1){this._walkerStack.shift();let e=this.previousNode();return e&&(this.currentNode=e),e}return null}nextSibling(){return null}previousSibling(){return null}parentNode(){return null}constructor(e,t,n,r){this._walkerStack=[],this._currentSetFor=new Set,this._acceptNode=e=>{if(e.nodeType===Node.ELEMENT_NODE){let t=e.shadowRoot;if(t){let e=this._doc.createTreeWalker(t,this.whatToShow,{acceptNode:this._acceptNode});return this._walkerStack.unshift(e),NodeFilter.FILTER_ACCEPT}if(typeof this.filter==`function`)return this.filter(e);if(this.filter?.acceptNode)return this.filter.acceptNode(e);if(this.filter===null)return NodeFilter.FILTER_ACCEPT}return NodeFilter.FILTER_SKIP},this._doc=e,this.root=t,this.filter=r??null,this.whatToShow=n??NodeFilter.SHOW_ALL,this._currentNode=t,this._walkerStack.unshift(e.createTreeWalker(t,n,this._acceptNode));let i=t.shadowRoot;if(i){let e=this._doc.createTreeWalker(i,this.whatToShow,{acceptNode:this._acceptNode});this._walkerStack.unshift(e)}}};function Ffe(e,t,n,r){return hj()?new Pfe(e,t,n,r):e.createTreeWalker(t,n,r)}function yj(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=yj(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function Ife(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=yj(e))&&(r&&(r+=` `),r+=t);return r}function bj(...e){let t={...e[0]};for(let n=1;n<e.length;n++){let r=e[n];for(let e in r){let n=t[e],i=r[e];typeof n==`function`&&typeof i==`function`&&e[0]===`o`&&e[1]===`n`&&e.charCodeAt(2)>=65&&e.charCodeAt(2)<=90?t[e]=fj(n,i):(e===`className`||e===`UNSAFE_className`)&&typeof n==`string`&&typeof i==`string`?t[e]=Ife(n,i):e===`id`&&n&&i?t.id=Afe(n,i):t[e]=i===void 0?n:i}}return t}function xj(...e){return e.length===1&&e[0]?e[0]:t=>{let n=!1,r=e.map(e=>{let r=Sj(e,t);return n||=typeof r==`function`,r});if(n)return()=>{r.forEach((t,n)=>{typeof t==`function`?t():Sj(e[n],null)})}}}function Sj(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}var Lfe=new Set([`id`]),Rfe=new Set([`aria-label`,`aria-labelledby`,`aria-describedby`,`aria-details`]),zfe=new Set([`href`,`hrefLang`,`target`,`rel`,`download`,`ping`,`referrerPolicy`]),Bfe=new Set([`dir`,`lang`,`hidden`,`inert`,`translate`]),Cj=new Set(`onClick.onAuxClick.onContextMenu.onDoubleClick.onMouseDown.onMouseEnter.onMouseLeave.onMouseMove.onMouseOut.onMouseOver.onMouseUp.onTouchCancel.onTouchEnd.onTouchMove.onTouchStart.onPointerDown.onPointerMove.onPointerUp.onPointerCancel.onPointerEnter.onPointerLeave.onPointerOver.onPointerOut.onGotPointerCapture.onLostPointerCapture.onScroll.onWheel.onAnimationStart.onAnimationEnd.onAnimationIteration.onTransitionCancel.onTransitionEnd.onTransitionRun.onTransitionStart`.split(`.`)),Vfe=/^(data-.*)$/;function wj(e,t={}){let{labelable:n,isLink:r,global:i,events:a=i,propNames:o}=t,s={};for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(Lfe.has(t)||n&&Rfe.has(t)||r&&zfe.has(t)||i&&Bfe.has(t)||a&&(Cj.has(t)||t.endsWith(`Capture`)&&Cj.has(t.slice(0,-7)))||o?.has(t)||Vfe.test(t))&&(s[t]=e[t]);return s}function Tj(e){if(Hfe())e.focus({preventScroll:!0});else{let t=Ufe(e);e.focus(),Wfe(t)}}var Ej=null;function Hfe(){if(Ej==null){Ej=!1;try{document.createElement(`div`).focus({get preventScroll(){return Ej=!0,!0}})}catch{}}return Ej}function Ufe(e){let t=e.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function Wfe(e){for(let{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}function Dj(e){if(typeof window>`u`||window.navigator==null)return!1;let t=window.navigator.userAgentData?.brands;return Array.isArray(t)&&t.some(t=>e.test(t.brand))||e.test(window.navigator.userAgent)}function Oj(e){return typeof window<`u`&&window.navigator!=null&&e.test(window.navigator.userAgentData?.platform||window.navigator.platform)}function kj(e){let t=null;return()=>(t??=e(),t)}var Aj=kj(function(){return Oj(/^Mac/i)}),Gfe=kj(function(){return Oj(/^iPhone/i)}),jj=kj(function(){return Oj(/^iPad/i)||Aj()&&navigator.maxTouchPoints>1}),Mj=kj(function(){return Gfe()||jj()}),Kfe=kj(function(){return Aj()||Mj()}
5),Nj=kj(function(){return Dj(/AppleWebKit/i)&&!Pj()}),Pj=kj(function(){return Dj(/Chrome/i)}),Fj=kj(function(){return Dj(/Android/i)}),qfe=kj(function(){return Dj(/Firefox/i)}),Jfe=(0,V.createContext)({isNative:!0,open:Xfe,useHref:e=>e});function Ij(){return(0,V.useContext)(Jfe)}function Lj(e,t,n=!0){var r;let{metaKey:i,ctrlKey:a,altKey:o,shiftKey:s}=t;qfe()&&(r=window.event)!=null&&r.type?.startsWith(`key`)&&e.target===`_blank`&&(Aj()?i=!0:a=!0);let c=Nj()&&Aj()&&!jj()?new KeyboardEvent(`keydown`,{keyIdentifier:`Enter`,metaKey:i,ctrlKey:a,altKey:o,shiftKey:s}):new MouseEvent(`click`,{metaKey:i,ctrlKey:a,altKey:o,shiftKey:s,detail:1,bubbles:!0,cancelable:!0});Lj.isOpening=n,Tj(e),e.dispatchEvent(c),Lj.isOpening=!1}Lj.isOpening=!1;function Yfe(e,t){if(e instanceof HTMLAnchorElement)t(e);else if(e.hasAttribute(`data-href`)){let n=document.createElement(`a`);n.href=e.getAttribute(`data-href`),e.hasAttribute(`data-target`)&&(n.target=e.getAttribute(`data-target`)),e.hasAttribute(`data-rel`)&&(n.rel=e.getAttribute(`data-rel`)),e.hasAttribute(`data-download`)&&(n.download=e.getAttribute(`data-download`)),e.hasAttribute(`data-ping`)&&(n.ping=e.getAttribute(`data-ping`)),e.hasAttribute(`data-referrer-policy`)&&(n.referrerPolicy=e.getAttribute(`data-referrer-policy`)),e.appendChild(n),t(n),e.removeChild(n)}}function Xfe(e,t){Yfe(e,e=>Lj(e,t))}function Zfe(e){let t=Ij().useHref(e.href??``);return{"data-href":e.href?t:void 0,"data-target":e.target,"data-rel":e.rel,"data-download":e.download,"data-ping":e.ping,"data-referrer-policy":e.referrerPolicy}}var Rj=new Map,zj=new Set;function Bj(){if(typeof window>`u`)return;function e(e){return`propertyName`in e}let t=t=>{if(!e(t)||!t.target)return;let r=Rj.get(t.target);r||(r=new Set,Rj.set(t.target,r),t.target.addEventListener(`transitioncancel`,n,{once:!0})),r.add(t.propertyName)},n=t=>{if(!e(t)||!t.target)return;let r=Rj.get(t.target);if(r&&(r.delete(t.propertyName),r.size===0&&(t.target.removeEventListener(`transitioncancel`,n),Rj.delete(t.target)),Rj.size===0)){for(let e of zj)e();zj.clear()}};document.body.addEventListener(`transitionrun`,t),document.body.addEventListener(`transitionend`,n)}typeof document<`u`&&(document.readyState===`loading`?document.addEventListener(`DOMContentLoaded`,Bj):Bj());function Qfe(){for(let[e]of Rj)`isConnected`in e&&!e.isConnected&&Rj.delete(e)}function Vj(e){requestAnimationFrame(()=>{Qfe(),Rj.size===0?e():zj.add(e)})}function Hj(){let e=(0,V.useRef)(new Map),t=(0,V.useCallback)((t,n,r,i)=>{let a=i?.once?(...t)=>{e.current.delete(r),r(...t)}:r;e.current.set(r,{type:n,eventTarget:t,fn:a,options:i}),t.addEventListener(n,a,i)},[]),n=(0,V.useCallback)((t,n,r,i)=>{let a=e.current.get(r)?.fn||r;t.removeEventListener(n,a,i),e.current.delete(r)},[]),r=(0,V.useCallback)(()=>{e.current.forEach((e,t)=>{n(e.eventTarget,e.type,t,e.options)})},[n]);return(0,V.useEffect)(()=>r,[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}function Uj(e,t){let{id:n,"aria-label":r,"aria-labelledby":i}=e;return n=uj(n),i&&r?i=[...new Set([n,...i.trim().split(/\s+/)])].join(` `):i&&=i.trim().split(/\s+/).join(` `),!r&&!i&&t&&(r=t),{id:n,"aria-label":r,"aria-labelledby":i}}function Wj(e){let t=(0,V.useRef)(null),n=(0,V.useRef)(void 0),r=(0,V.useCallback)(t=>{if(typeof e==`function`){let n=e,r=n(t);return()=>{typeof r==`function`?r():n(null)}}if(e)return e.current=t,()=>{e.current=null}},[e]);return(0,V.useMemo)(()=>({get current(){return t.current},set current(e){t.current=e,n.current&&=(n.current(),void 0),e!=null&&(n.current=r(e))}}),[r])}var $fe=V.useInsertionEffect??rj;function Gj(e){let t=(0,V.useRef)(null);return $fe(()=>{t.current=e},[e]),(0,V.useCallback)((...e)=>{let n=t.current;return n?.(...e)},[])}function Kj(e,t){let n=(0,V.useRef)(!0),r=(0,V.useRef)(null),i=Gj(e);(0,V.useEffect)(()=>(n.current=!0,()=>{n.current=!1}),[]),(0,V.useEffect)(()=>{let e=r.current;n.current?n.current=!1:(!e||t.some((t,n)=>!Object.is(t,e[n])))&&i(),r.current=t},t)}function qj(e,t){let n=(0,V.useRef)(!0),r=(0,V.useRef)(null);rj(()=>(n.current=!0,()=>{n.current=!1}),[]),rj(()=>{n.current?n.current=!1:(!r.current||t.some((e,t)=>!Object.is(e,r[t])))&&e(),r.current=t},t)}function epe(){return window.ResizeObserver!==void 0}function Jj(e){let{ref:t,box:n,onResize:r}=e,i=Gj(r);(0,V.useEffect)(()=>{let e=t?.current;if(e){if(epe()){let t=new window.ResizeObserver(e=>{e.length&&i()});return t.observe(e,{box:n}
5),()=>{e&&t.unobserve(e)}}return window.addEventListener(`resize`,i,!1),()=>{window.removeEventListener(`resize`,i,!1)}}},[t,n])}function Yj(e,t){rj(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}function Xj(e,t){if(!e)return!1;let n=window.getComputedStyle(e),r=/(auto|scroll)/.test(n.overflow+n.overflowX+n.overflowY);return r&&t&&(r=e.scrollHeight!==e.clientHeight||e.scrollWidth!==e.clientWidth),r}function Zj(e,t){let n=e;for(Xj(n,t)&&(n=n.parentElement);n&&!Xj(n,t);)n=n.parentElement;return n||document.scrollingElement||document.documentElement}function tpe(e,t){let n=[];for(;e&&e!==document.documentElement;)Xj(e,t)&&n.push(e),e=e.parentElement;return n}function Qj(e){return Aj()?e.metaKey:e.ctrlKey}var npe=new Set([`checkbox`,`radio`,`range`,`color`,`file`,`image`,`button`,`submit`,`reset`]);function $j(e){return e instanceof HTMLInputElement&&!npe.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}var rpe=0,eM=new Map;function tM(e){let[t,n]=(0,V.useState)();return rj(()=>{if(!e)return;let t=eM.get(e);if(t)n(t.element.id);else{let r=`react-aria-description-${rpe++}`;n(r);let i=document.createElement(`div`);i.id=r,i.style.display=`none`,i.textContent=e,document.body.appendChild(i),t={refCount:0,element:i},eM.set(e,t)}return t.refCount++,()=>{t&&--t.refCount===0&&(t.element.remove(),eM.delete(e))}},[e]),{"aria-describedby":e?t:void 0}}function nM(e,t,n,r){let i=Gj(n),a=n==null;(0,V.useEffect)(()=>{if(a||!e.current)return;let n=e.current;return n.addEventListener(t,i,r),()=>{n.removeEventListener(t,i,r)}},[e,t,r,a])}function rM(e,t){let n=iM(e,t,`left`),r=iM(e,t,`top`),i=t.offsetWidth,a=t.offsetHeight,o=e.scrollLeft,s=e.scrollTop,{borderTopWidth:c,borderLeftWidth:l,scrollPaddingTop:u,scrollPaddingRight:d,scrollPaddingBottom:f,scrollPaddingLeft:p}=getComputedStyle(e),m=o+parseInt(l,10),h=s+parseInt(c,10),g=m+e.clientWidth,_=h+e.clientHeight,v=parseInt(u,10)||0,y=parseInt(f,10)||0,b=parseInt(d,10)||0,x=parseInt(p,10)||0;n<=o+x?o=n-parseInt(l,10)-x:n+i>g-b&&(o+=n+i-g+b),r<=h+v?s=r-parseInt(c,10)-v:r+a>_-y&&(s+=r+a-_+y),e.scrollLeft=o,e.scrollTop=s}function iM(e,t,n){let r=n===`left`?`offsetLeft`:`offsetTop`,i=0;for(;t.offsetParent&&(i+=t[r],t.offsetParent!==e);){if(t.offsetParent.contains(e)){i-=e[r];break}t=t.offsetParent}return i}function aM(e,t){if(e&&document.contains(e)){let o=document.scrollingElement||document.documentElement,s=window.getComputedStyle(o).overflow===`hidden`;if(s){let t=tpe(e);s||t.push(o);for(let n of t)rM(n,e)}else{var n;let{left:o,top:s}=e.getBoundingClientRect();e==null||(n=e.scrollIntoView)==null||n.call(e,{block:`nearest`});let{left:c,top:l}=e.getBoundingClientRect();if(Math.abs(o-c)>1||Math.abs(s-l)>1){var r,i,a;t==null||(i=t.containingElement)==null||(r=i.scrollIntoView)==null||r.call(i,{block:`center`,inline:`center`}),(a=e.scrollIntoView)==null||a.call(e,{block:`nearest`})}}}}function oM(e){return e.pointerType===``&&e.isTrusted?!0:Fj()&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function sM(e){return!Fj()&&e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType===`mouse`}function cM(e,t){let n=(0,V.useRef)(null);return e&&n.current&&t(e,n.current)&&(e=n.current),n.current=e,e}function lM(e,t,n){let r=Gj(()=>{n&&n(t)});(0,V.useEffect)(()=>{let t=e?.current?.form;return t?.addEventListener(`reset`,r),()=>{t?.removeEventListener(`reset`,r)}},[e])}function uM(e,t){let{collection:n,onLoadMore:r,scrollOffset:i=1}=e,a=(0,V.useRef)(null),o=Gj(e=>{for(let t of e)t.isIntersecting&&r&&r()});rj(()=>(t.current&&(a.current=new IntersectionObserver(o,{root:Zj(t?.current),rootMargin:`0px ${100*i}% ${100*i}% ${100*i}%`}),a.current.observe(t.current)),()=>{a.current&&a.current.disconnect()}),[n,t,i])}function dM(e){let t=V.version.split(`.`);return parseInt(t[0],10)>=19?e:e?`true`:void 0}var ipe=`react-aria-clear-focus`,ape=`react-aria-focus`;function ope(e,t=!0){let[n,r]=(0,V.useState)(!0),i=n&&t;return rj(()=>{if(i&&e.current&&`getAnimations`in e.current)for(let t of e.current.getAnimations())t instanceof CSSTransition&&t.cancel()},[e,i]),fM(e,i,(0,V.useCallback)(()=>r(!1),[])),i}function spe(e,t){let[n,r]=(0,V.useState)(t?`open`:`closed`);switch(n){case`open`:t||r(`exiting`);break;case`closed`:case`exiting`:t&&r(`open`)}let i=n===`exiting`;return fM(e,i,(0,V.useCallback)(()=>{r(e=>e===`exiting`?`closed`:e)},[])),i}function fM(e,t,n){rj(()=>
vendor: 5,685 bytes, line 5
5{if(t&&e.current){if(!(`getAnimations`in e.current)){n();return}let t=e.current.getAnimations();if(t.length===0){n();return}let r=!1;return Promise.all(t.map(e=>e.finished)).then(()=>{r||(0,ak.flushSync)(()=>{n()})}).catch(()=>{}),()=>{r=!0}}},[e,t,n])}var cpe=typeof Element<`u`&&`checkVisibility`in Element.prototype;function lpe(e){let t=mj(e);if(!(e instanceof t.HTMLElement)&&!(e instanceof t.SVGElement))return!1;let{display:n,visibility:r}=e.style,i=n!==`none`&&r!==`hidden`&&r!==`collapse`;if(i){let{getComputedStyle:t}=e.ownerDocument.defaultView,{display:n,visibility:r}=t(e);i=n!==`none`&&r!==`hidden`&&r!==`collapse`}return i}function upe(e,t){return!e.hasAttribute(`hidden`)&&!e.hasAttribute(`data-react-aria-prevent-focus`)&&(e.nodeName===`DETAILS`&&t&&t.nodeName!==`SUMMARY`?e.hasAttribute(`open`):!0)}function pM(e,t){return cpe?e.checkVisibility({visibilityProperty:!0})&&!e.closest(`[data-react-aria-prevent-focus]`):e.nodeName!==`#comment`&&lpe(e)&&upe(e,t)&&(!e.parentElement||pM(e.parentElement,e))}var mM=[`input:not([disabled]):not([type=hidden])`,`select:not([disabled])`,`textarea:not([disabled])`,`button:not([disabled])`,`a[href]`,`area[href]`,`summary`,`iframe`,`object`,`embed`,`audio[controls]`,`video[controls]`,`[contenteditable]:not([contenteditable^="false"])`,`permission`],dpe=mM.join(`:not([hidden]),`)+`,[tabindex]:not([disabled]):not([hidden])`;mM.push(`[tabindex]:not([tabindex="-1"]):not([disabled])`);var fpe=mM.join(`:not([hidden]):not([tabindex="-1"]),`);function hM(e){return e.matches(dpe)&&pM(e)&&!_M(e)}function gM(e){return e.matches(fpe)&&pM(e)&&!_M(e)}function _M(e){let t=e;for(;t!=null;){if(t instanceof t.ownerDocument.defaultView.HTMLElement&&t.inert)return!0;t=t.parentElement}return!1}var ppe=typeof document<`u`?V.useInsertionEffect??V.useLayoutEffect:()=>{};function vM(e,t,n){let[r,i]=(0,V.useState)(e||t),a=(0,V.useRef)(r),o=(0,V.useRef)(e!==void 0),s=e!==void 0;(0,V.useEffect)(()=>{o.current,o.current=s},[s]);let c=s?e:r;ppe(()=>{a.current=c});let[,l]=(0,V.useReducer)(()=>({}),{});return[c,(0,V.useCallback)((e,...t)=>{let r=typeof e==`function`?e(a.current):e;Object.is(a.current,r)||(a.current=r,i(r),l(),n?.(r,...t))},[n])]}function yM(e,t=-1/0,n=1/0){return Math.min(Math.max(e,t),n)}var bM=Symbol(`default`);function xM({values:e,children:t}){for(let[n,r]of e)t=V.createElement(n.Provider,{value:r},t);return t}function SM(e){let{className:t,style:n,children:r,defaultClassName:i,defaultChildren:a,defaultStyle:o,values:s}=e;return(0,V.useMemo)(()=>{let e,c,l;return e=typeof t==`function`?t({...s,defaultClassName:i}):t,c=typeof n==`function`?n({...s,defaultStyle:o||{}}):n,l=typeof r==`function`?r({...s,defaultChildren:a}):r??a,{className:e??i,style:c||o?{...o,...c}:void 0,children:l??a,"data-rac":``}},[t,n,r,i,a,o,s])}function CM(e,t){let n=(0,V.useContext)(e);if(t===null)return null;if(n&&typeof n==`object`&&`slots`in n&&n.slots){let e=t||bM;if(!n.slots[e]){let e=new Intl.ListFormat().format(Object.keys(n.slots).map(e=>`"${e}"`)),r=t?`Invalid slot "${t}".`:`A slot prop is required.`;throw Error(`${r} Valid slot names are ${e}.`)}return n.slots[e]}return n}function wM(e,t,n){let{ref:r,...i}=CM(n,e.slot)||{},a=Wj((0,V.useMemo)(()=>xj(t,r),[t,r])),o=bj(i,e);return`style`in i&&i.style&&`style`in e&&e.style&&(o.style=typeof i.style==`function`||typeof e.style==`function`?t=>{let n=typeof i.style==`function`?i.style(t):i.style,r={...t.defaultStyle,...n},a=typeof e.style==`function`?e.style({...t,defaultStyle:r}):e.style;return{...r,...a}}:{...i.style,...e.style}),[o,a]}function TM(e=!0){let[t,n]=(0,V.useState)(e),r=(0,V.useRef)(!1),i=(0,V.useCallback)(e=>{r.current=!0,n(!!e)},[]);return rj(()=>{r.current||n(!1)},[]),[i,t]}function EM(e){let t=/^(data-.*)$/,n={};for(let r in e)t.test(r)||(n[r]=e[r]);return n}var DM=7e3,OM=null;function kM(e,t=`assertive`,n=DM){OM?OM.announce(e,t,n):(OM=new hpe,(typeof IS_REACT_ACT_ENVIRONMENT==`boolean`?IS_REACT_ACT_ENVIRONMENT:typeof jest<`u`)?OM.announce(e,t,n):setTimeout(()=>{OM?.isAttached()&&OM?.announce(e,t,n)},100))}function mpe(e){OM&&OM.clear(e)}var hpe=class{isAttached(){return this.node?.isConnected}createLog(e){let t=document.createElement(`div`);return t.setAttribute(`role`,`log`),t.setAttribute(`aria-live`,e),t.setAttribute(`aria-relevant`,`additions`),t}destroy(){this.node&&=(document.body.removeChild(this.node),null)}announce(e,t=`assertive`,n=DM){var r,i;if(!this.node)return;let a=document.createElement(`div`);typeof e==`object`?(a.setAttribute(`role`,`img`),a.setAttribute(`aria-labelledby`,e[`aria-labelledby`])):a.textContent=e,t===`assertive`?(r=this.assertiveLog)==null||r.appendChild(a):(i=this.politeLog)==null||i.appendChild(a),e!==``&&setTimeout(()=>{a.remove()},n)}clear(e){this.node&&((!e||e===`assertive`)&&this.assertiveLog&&(this.assertiveLog.innerHTML=``),(!e||e===`polite`)&&this.politeLog&&(this.politeLog.innerHTML=``))}constructor(){this.node=null,this.assertiveLog=null,this.politeLog=null,typeof document<`u`&&(this.node=document.createElement(`div`),this.node.dataset.liveAnnouncer=`true`,Object.assign(this.node.style,{border:0,clip:`rect(0 0 0 0)`,clipPath:`inset(50%)`,height:`1px`,margin:`-1px`,overflow:`hidden`,padding:0,position:`absolute`,width:`1px`,whiteSpace:`nowrap`}),this.assertiveLog=this.createLog(`assertive`),this.node.appendChild(this.assertiveLog),this.politeLog=this.createLog(`polite`),this.node.appendChild(this.politeLog),document.body.prepend(this.node))}},AM={top:`top`,bottom:`top`,left:`left`,right:`left`},jM={top:`bottom`,bottom:`top`,left:`right`,right:`left`},gpe={top:`left`,left:`top`},MM={top:`height`,left:`width`},NM={width:`totalWidth`,height:`totalHeight`},PM={},_pe=()=>
vendor: 4,364 bytes, line 5
5typeof document<`u`?window.visualViewport:null;function FM(e,t){let n=0,r=0,i=0,a=0,o=0,s=0,c={},l=(t?.scale??1)>1;if(e.tagName===`BODY`||e.tagName===`HTML`){let l=document.documentElement;i=l.clientWidth,a=l.clientHeight,n=t?.width??i,r=t?.height??a,c.top=l.scrollTop||e.scrollTop,c.left=l.scrollLeft||e.scrollLeft,t&&(o=t.offsetTop,s=t.offsetLeft)}else({width:n,height:r,top:o,left:s}=VM(e,!1)),c.top=e.scrollTop,c.left=e.scrollLeft,i=n,a=r;return Nj()&&(e.tagName===`BODY`||e.tagName===`HTML`)&&l&&(c.top=0,c.left=0,o=t?.pageTop??0,s=t?.pageLeft??0),{width:n,height:r,totalWidth:i,totalHeight:a,scroll:c,top:o,left:s}}function vpe(e){return{top:e.scrollTop,left:e.scrollLeft,width:e.scrollWidth,height:e.scrollHeight}}function IM(e,t,n,r,i,a,o){let s=i.scroll[e]??0,c=r[MM[e]],l=o[e]+r.scroll[AM[e]]+a,u=o[e]+r.scroll[AM[e]]+c-a,d=t-s+r.scroll[AM[e]]+o[e]-r[AM[e]],f=t-s+n+r.scroll[AM[e]]+o[e]-r[AM[e]];return d<l?l-d:f>u?Math.max(u-f,l-d):0}function ype(e){let t=window.getComputedStyle(e);return{top:parseInt(t.marginTop,10)||0,bottom:parseInt(t.marginBottom,10)||0,left:parseInt(t.marginLeft,10)||0,right:parseInt(t.marginRight,10)||0}}function LM(e){if(PM[e])return PM[e];let[t,n]=e.split(` `),r=AM[t]||`right`,i=gpe[r];AM[n]||(n=`center`);let a=MM[r],o=MM[i];return PM[e]={placement:t,crossPlacement:n,axis:r,crossAxis:i,size:a,crossSize:o},PM[e]}function RM(e,t,n,r,i,a,o,s,c,l,u){let{placement:d,crossPlacement:f,axis:p,crossAxis:m,size:h,crossSize:g}=r,_={};_[m]=e[m]??0,f===`center`?_[m]+=((e[g]??0)-(n[g]??0))/2:f!==m&&(_[m]+=(e[g]??0)-(n[g]??0)),_[m]+=a;let v=e[m]-n[g]+c+l,y=e[m]+e[g]-c-l;if(_[m]=yM(_[m],v,y),d===p){let t=s?u[h]:u[NM[h]];_[jM[p]]=Math.floor(t-e[p]+i)}else _[p]=Math.floor(e[p]+e[h]+i);return _}function bpe(e,t,n,r,i,a,o,s,c,l,u){let d=(e.top==null?c[NM.height]-(e.bottom??0)-o:e.top)-(c.scroll.top??0),f=l?n.top:0,p={top:Math.max(t.top+f,(u?.offsetTop??t.top)+f),bottom:Math.min(t.top+t.height+f,(u?.offsetTop??0)+(u?.height??0))};return s===`top`?Math.max(0,d+o-p.top-((i.top??0)+(i.bottom??0)+a)):Math.max(0,p.bottom-d-((i.top??0)+(i.bottom??0)+a))}function zM(e,t,n,r,i,a,o,s){let{placement:c,axis:l,size:u}=a;return c===l?Math.max(0,n[l]-(o.scroll[l]??0)-(e[l]+(s?t[l]:0))-(r[l]??0)-r[jM[l]]-i):Math.max(0,e[u]+e[l]+(s?t[l]:0)-n[l]-n[u]+(o.scroll[l]??0)-(r[l]??0)-r[jM[l]]-i)}function xpe(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_){let v=LM(e),{size:y,crossAxis:b,crossSize:x,placement:S,crossPlacement:C}=v,w=RM(t,s,n,v,u,d,l,f,m,h,c),T=u,E=zM(s,l,t,i,a+u,v,c,g);if(o&&n[y]>E){let e=LM(`${jM[S]} ${C}`),r=RM(t,s,n,e,u,d,l,f,m,h,c);zM(s,l,t,i,a+u,e,c,g)>E&&(v=e,w=r,T=u)}let D=`bottom`;v.axis===`top`?v.placement===`top`?D=`top`:v.placement===`bottom`&&(D=`bottom`):v.crossAxis===`top`&&(v.crossPlacement===`top`?D=`bottom`:v.crossPlacement===`bottom`&&(D=`top`));let O=IM(b,w[b],n[x],s,c,a,l);w[b]+=O;let k=bpe(w,s,l,f,i,a,n.height,D,c,g,_);p&&p<k&&(k=p),n.height=Math.min(n.height,k),w=RM(t,s,n,v,T,d,l,f,m,h,c),O=IM(b,w[b],n[x],s,c,a,l),w[b]+=O;let A={},j=t[b]-w[b]-i[AM[b]],M=j+.5*t[x],ee=m/2+h,te=AM[b]===`left`?(i.left??0)+(i.right??0):(i.top??0)+(i.bottom??0),ne=n[x]-te-m/2-h;A[b]=yM(yM(M,t[b]+m/2-(w[b]+i[AM[b]]),t[b]+t[x]-m/2-(w[b]+i[AM[b]])),ee,ne),{placement:S,crossPlacement:C}=v,m?j=A[b]:C===`right`?j+=t[x]:C===`center`&&(j+=t[x]/2);let re=S===`left`||S===`top`?n[y]:0,ie={x:S===`top`||S===`bottom`?j:re,y:S===`left`||S===`right`?j:re};return{position:w,maxHeight:k,arrowOffsetLeft:A.left,arrowOffsetTop:A.top,placement:S,triggerAnchorPoint:ie}}function Spe(e){let{placement:t,targetNode:n,overlayNode:r,scrollNode:i,padding:a,shouldFlip:o,boundaryElement:s,offset:c,crossOffset:l,maxHeight:u,arrowSize:d=0,arrowBoundaryOffset:f=0}=e,p=_pe(),m=r instanceof HTMLElement?Cpe(r):document.documentElement,h=m===document.documentElement,g=window.getComputedStyle(m).position,_=!!g&&g!==`static`,v=h?VM(n,!1):HM(n,m,!1);if(!h){let{marginTop:e,marginLeft:t}=window.getComputedStyle(n);v.top+=parseInt(e,10)||0,v.left+=parseInt(t,10)||0}let y=VM(r,!0),b=ype(r);return y.width+=(b.left??0)+(b.right??0),y.height+=(b.top??0)+(b.bottom??0),xpe(t,v,y,vpe(i),b,a,o,FM(s,p),FM(m,p),HM(s,m,!1),c,l,_,u,d,f,s.contains(m),p)}function BM(e,t){let{top:n,left:r,width:i,height:a}=e.getBoundingClientRect();return t&&e instanceof e.ownerDocument.defaultView.HTMLElement&&(i=e.offsetWidth,a=e.offsetHeight),{top:n,left:r,width:i,height:a}}
5function VM(e,t){let{top:n,left:r,width:i,height:a}=BM(e,t),{scrollTop:o,scrollLeft:s,clientTop:c,clientLeft:l}=document.documentElement;return{top:n+o-c,left:r+s-l,width:i,height:a}}function HM(e,t,n){let r=window.getComputedStyle(e),i;if(r.position===`fixed`)i=BM(e,n);else{i=VM(e,n);let r=VM(t,n),a=window.getComputedStyle(t);r.top+=(parseInt(a.borderTopWidth,10)||0)-t.scrollTop,r.left+=(parseInt(a.borderLeftWidth,10)||0)-t.scrollLeft,i.top-=r.top,i.left-=r.left}return i.top-=parseInt(r.marginTop,10)||0,i.left-=parseInt(r.marginLeft,10)||0,i}function Cpe(e){let t=e.offsetParent;if(t&&t===document.body&&window.getComputedStyle(t).position===`static`&&!UM(t)&&(t=document.documentElement),t==null)for(t=e.parentElement;t&&!UM(t);)t=t.parentElement;return t||document.documentElement}function UM(e){let t=window.getComputedStyle(e);return t.transform!==`none`||/transform|perspective/.test(t.willChange)||t.filter!==`none`||t.contain===`paint`||`backdropFilter`in t&&t.backdropFilter!==`none`||`WebkitBackdropFilter`in t&&t.WebkitBackdropFilter!==`none`}var WM=new WeakMap;function wpe(e){let{triggerRef:t,isOpen:n,onClose:r}=e;(0,V.useEffect)(()=>{if(!n||r===null)return;let e=e=>{let n=e.target;if(!t.current||n instanceof Node&&!n.contains(t.current)||e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement)return;let i=r||WM.get(t.current);i&&i()};return window.addEventListener(`scroll`,e,!0),()=>{window.removeEventListener(`scroll`,e,!0)}},[n,r,t])}var Tpe=new Set([`Arab`,`Syrc`,`Samr`,`Mand`,`Thaa`,`Mend`,`Nkoo`,`Adlm`,`Rohg`,`Hebr`]),Epe=new Set([`ae`,`ar`,`arc`,`bcc`,`bqi`,`ckb`,`dv`,`fa`,`glk`,`he`,`ku`,`mzn`,`nqo`,`pnb`,`ps`,`sd`,`ug`,`ur`,`yi`]);function Dpe(e){if(Intl.Locale){let t=new Intl.Locale(e).maximize(),n=typeof t.getTextInfo==`function`?t.getTextInfo():t.textInfo;if(n)return n.direction===`rtl`;if(t.script)return Tpe.has(t.script)}let t=e.split(`-`)[0];return Epe.has(t)}var GM=Symbol.for(`react-aria.i18n.locale`);function KM(){let e=typeof window<`u`&&window[GM]||typeof navigator<`u`&&(navigator.language||navigator.userLanguage)||`en-US`;try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e=`en-US`}return{locale:e,direction:Dpe(e)?`rtl`:`ltr`}}var qM=KM(),JM=new Set;function YM(){qM=KM();for(let e of JM)e(qM)}function Ope(){let e=sj(),[t,n]=(0,V.useState)(qM);return(0,V.useEffect)(()=>(JM.size===0&&window.addEventListener(`languagechange`,YM),JM.add(n),()=>{JM.delete(n),JM.size===0&&window.removeEventListener(`languagechange`,YM)}),[]),e?{locale:typeof window<`u`&&window[GM]||`en-US`,direction:`ltr`}:t}var kpe=V.createContext(null);function XM(){let e=Ope();return(0,V.useContext)(kpe)||e}var Ape=Symbol.for(`react-aria.i18n.locale`),jpe=Symbol.for(`react-aria.i18n.strings`),ZM=void 0,QM=class e{getStringForLocale(e,t){let n=this.getStringsForLocale(t)[e];if(!n)throw Error(`Could not find intl message ${e} in ${t} locale`);return n}getStringsForLocale(e){let t=this.strings[e];return t||(t=Mpe(e,this.strings,this.defaultLocale),this.strings[e]=t),t}static getGlobalDictionaryForPackage(t){if(typeof window>`u`)return null;let n=window[Ape];if(ZM===void 0){let t=window[jpe];if(!t)return null;ZM={};for(let r in t)ZM[r]=new e({[n]:t[r]},n)}let r=ZM?.[t];if(!r)throw Error(`Strings for package "${t}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return r}constructor(e,t=`en-US`){this.strings=Object.fromEntries(Object.entries(e).filter(([,e])=>e)),this.defaultLocale=t}};function Mpe(e,t,n=`en-US`){if(t[e])return t[e];let r=Npe(e);if(t[r])return t[r];for(let e in t)if(e.startsWith(r+`-`))return t[e];return t[n]}function Npe(e){return Intl.Locale?new Intl.Locale(e).language:e.split(`-`)[0]}var $M=new Map,eN=new Map,tN=class{format(e,t){let n=this.strings.getStringForLocale(e,this.locale);return typeof n==`function`?n(t,this):n}plural(e,t,n=`cardinal`){let r=t[`=`+e];if(r)return typeof r==`function`?r():r;let i=this.locale+`:`+n,a=$M.get(i);return a||(a=new Intl.PluralRules(this.locale,{type:n}),$M.set(i,a)),r=t[a.select(e)]||t.other,typeof r==`function`?r():r}number(e){let t=eN.get(this.locale);return t||(t=new Intl.NumberFormat(this.locale),eN.set(this.locale,t)),t.format(e)}select(e,t){let n=e[t]||e.other;return typeof n==`function`?n():n}constructor(e,t){this.locale=e,this.strings=t}},nN=new WeakMap;function Ppe(e){let t=nN.get(e);return t||(t=new QM(e),nN.set(e,t)),t}function rN(e,t){return t&&QM.getGlobalDictionaryForPackage(t)||Ppe(e)}function iN(e,t){let{locale:n}=XM(),r=rN(e,t);return(0,V.useMemo)(()=>new tN(n,r),[n,r])}function aN(e){e=cM(e??{},Fpe);let{locale:t}=XM();return(0,V.useMemo)(()=>new lE(t,e),[t,e])}function Fpe(e,t){if(e===t)return!0;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(t[r]!==e[r])return!1;return!0}var oN=new Map,sN=!1;
vendor: 4,150 bytes, line 5
5try{sN=new Intl.NumberFormat(`de-DE`,{signDisplay:`exceptZero`}).resolvedOptions().signDisplay===`exceptZero`}catch{}var cN=!1;try{cN=new Intl.NumberFormat(`de-DE`,{style:`unit`,unit:`degree`}).resolvedOptions().style===`unit`}catch{}var lN={degree:{narrow:{default:`°`,"ja-JP":` 度`,"zh-TW":`度`,"sl-SI":` °`}}},uN=class{format(e){let t=``;if(t=!sN&&this.options.signDisplay!=null?Lpe(this.numberFormatter,this.options.signDisplay,e):this.numberFormatter.format(e),this.options.style===`unit`&&!cN){let{unit:e,unitDisplay:n=`short`,locale:r}=this.resolvedOptions();if(!e)return t;let i=lN[e]?.[n];t+=i[r]||i.default}return t}formatToParts(e){return this.numberFormatter.formatToParts(e)}formatRange(e,t){if(typeof this.numberFormatter.formatRange==`function`)return this.numberFormatter.formatRange(e,t);if(t<e)throw RangeError(`End date must be >= start date`);return`${this.format(e)} \u{2013} ${this.format(t)}`}formatRangeToParts(e,t){if(typeof this.numberFormatter.formatRangeToParts==`function`)return this.numberFormatter.formatRangeToParts(e,t);if(t<e)throw RangeError(`End date must be >= start date`);let n=this.numberFormatter.formatToParts(e),r=this.numberFormatter.formatToParts(t);return[...n.map(e=>({...e,source:`startRange`})),{type:`literal`,value:` â `,source:`shared`},...r.map(e=>({...e,source:`endRange`}))]}resolvedOptions(){let e=this.numberFormatter.resolvedOptions();return!sN&&this.options.signDisplay!=null&&(e={...e,signDisplay:this.options.signDisplay}),!cN&&this.options.style===`unit`&&(e={...e,style:`unit`,unit:this.options.unit,unitDisplay:this.options.unitDisplay}),e}constructor(e,t={}){this.numberFormatter=Ipe(e,t),this.options=t}};function Ipe(e,t={}){let{numberingSystem:n}=t;if(n&&e.includes(`-nu-`)&&(e.includes(`-u-`)||(e+=`-u-`),e+=`-nu-${n}`),t.style===`unit`&&!cN){let{unit:e,unitDisplay:n=`short`}=t;if(!e)throw Error(`unit option must be provided with style: "unit"`);if(!lN[e]?.[n])throw Error(`Unsupported unit ${e} with unitDisplay = ${n}`);t={...t,style:`decimal`}}let r=e+(t?Object.entries(t).sort((e,t)=>e[0]<t[0]?-1:1).join():``);if(oN.has(r))return oN.get(r);let i=new Intl.NumberFormat(e,t);return oN.set(r,i),i}function Lpe(e,t,n){if(t===`auto`)return e.format(n);if(t===`never`)return e.format(Math.abs(n));{let r=!1;if(t===`always`?r=n>0||Object.is(n,0):t===`exceptZero`&&(Object.is(n,-0)||Object.is(n,0)?n=Math.abs(n):r=n>0),r){let t=e.format(-n),r=e.format(n),i=t.replace(r,``).replace(/\u200e|\u061C/,``);return[...i].length!==1&&console.warn(`@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case`),t.replace(r,`!!!`).replace(i,`+`).replace(`!!!`,r)}return e.format(n)}}var Rpe=RegExp(`^.*\\(.*\\).*$`),zpe=[`latn`,`arab`,`hanidec`,`deva`,`beng`,`fullwide`],dN=class{parse(e){return pN(this.locale,this.options,e).parse(e)}isValidPartialNumber(e,t,n){return pN(this.locale,this.options,e).isValidPartialNumber(e,t,n)}getNumberingSystem(e){return pN(this.locale,this.options,e).options.numberingSystem}constructor(e,t={}){this.locale=e,this.options=t}},fN=new Map;function pN(e,t,n){let r=mN(e,t);if(!e.includes(`-nu-`)&&!r.isValidPartialNumber(n)){for(let i of zpe)if(i!==r.options.numberingSystem){let r=mN(e+(e.includes(`-u-`)?`-nu-`:`-u-nu-`)+i,t);if(r.isValidPartialNumber(n))return r}}return r}function mN(e,t){let n=e+(t?Object.entries(t).sort((e,t)=>e[0]<t[0]?-1:1).join():``),r=fN.get(n);return r||(r=new Bpe(e,t),fN.set(n,r)),r}var Bpe=class{parse(e){let t=this.sanitize(e);if(this.symbols.group&&(t=gN(t,this.symbols.group,``)),this.symbols.decimal&&(t=t.replace(this.symbols.decimal,`.`)),this.symbols.minusSign&&(t=t.replace(this.symbols.minusSign,`-`)),t=t.replace(this.symbols.numeral,this.symbols.index),this.options.style===`percent`){let e=t.indexOf(`-`);t=t.replace(`-`,``),t=t.replace(`+`,``);let n=t.indexOf(`.`);n===-1&&(n=t.length),t=t.replace(`.`,``),t=n-2==0?`0.${t}`:n-2==-1?`0.0${t}`:n-2==-2?`0.00`:`${t.slice(0,n-2)}.${t.slice(n-2)}`,e>-1&&(t=`-${t}`)}let n=t?+t:NaN;if(isNaN(n))return NaN;if(this.options.style===`percent`){let e={...this.options,style:`decimal`,minimumFractionDigits:Math.min((this.options.minimumFractionDigits??
50)+2,20),maximumFractionDigits:Math.min((this.options.maximumFractionDigits??0)+2,20)};return new dN(this.locale,e).parse(new uN(this.locale,e).format(n))}return this.options.currencySign===`accounting`&&Rpe.test(e)&&(n=-1*n),n}sanitize(e){return e=e.replace(this.symbols.literals,``),this.symbols.minusSign&&(e=e.replace(`-`,this.symbols.minusSign)),this.options.numberingSystem===`arab`&&(this.symbols.decimal&&(e=e.replace(`,`,this.symbols.decimal),e=e.replace(`Ø`,this.symbols.decimal)),this.symbols.group&&(e=gN(e,`.`,this.symbols.group))),this.symbols.group===`â`&&e.includes(`'`)&&(e=gN(e,`'`,this.symbols.group)),this.options.locale===`fr-FR`&&this.symbols.group&&(e=gN(e,` `,this.symbols.group),e=gN(e,/\u00A0/g,this.symbols.group)),e}isValidPartialNumber(e,t=-1/0,n=1/0){return e=this.sanitize(e),this.symbols.minusSign&&e.startsWith(this.symbols.minusSign)&&t<0?e=e.slice(this.symbols.minusSign.length):this.symbols.plusSign&&e.startsWith(this.symbols.plusSign)&&n>0&&(e=e.slice(this.symbols.plusSign.length)),this.symbols.group&&e.startsWith(this.symbols.group)||this.symbols.decimal&&e.indexOf(this.symbols.decimal)>-1&&this.options.maximumFractionDigits===0?!1:(this.symbols.group&&(e=gN(e,this.symbols.group,``)),e=e.replace(this.symbols.numeral,``),this.symbols.decimal&&(e=e.replace(this.symbols.decimal,``)),e.length===0)}constructor(e,t={}){this.locale=e,t.roundingIncrement!==1&&t.roundingIncrement!=null&&(t.maximumFractionDigits==null&&t.minimumFractionDigits==null?(t.maximumFractionDigits=0,t.minimumFractionDigits=0):t.maximumFractionDigits==null?t.maximumFractionDigits=t.minimumFractionDigits:t.minimumFractionDigits??=t.maximumFractionDigits),this.formatter=new Intl.NumberFormat(e,t),this.options=this.formatter.resolvedOptions(),this.symbols=Hpe(e,this.formatter,this.options,t),this.options.style===`percent`&&((this.options.minimumFractionDigits??0)>18||(this.options.maximumFractionDigits??0)>18)&&console.warn(`NumberParser cannot handle percentages with greater than 18 decimal places, please reduce the number in your options.`)}},hN=new Set([`decimal`,`fraction`,`integer`,`minusSign`,`plusSign`,`group`]),Vpe=[0,4,2,1,11,20,3,7,100,21,.1,1.1];function Hpe(e,t,n,r){let i=new Intl.NumberFormat(e,{...n,minimumSignificantDigits:1,maximumSignificantDigits:21,roundingIncrement:1,roundingPriority:`auto`,roundingMode:`halfExpand`}),a=i.formatToParts(-10000.111),o=i.formatToParts(10000.111),s=Vpe.map(e=>i.formatToParts(e)),c=a.find(e=>e.type===`minusSign`)?.value??`-`,l=o.find(e=>e.type===`plusSign`)?.value;!l&&(r?.signDisplay===`exceptZero`||r?.signDisplay===`always`)&&(l=`+`);let u=new Intl.NumberFormat(e,{...n,minimumFractionDigits:2,maximumFractionDigits:2}).formatToParts(.001).find(e=>e.type===`decimal`)?.value,d=a.find(e=>e.type===`group`)?.value,f=a.filter(e=>!hN.has(e.type)).map(e=>_N(e.value)),p=s.flatMap(e=>e.filter(e=>!hN.has(e.type)).map(e=>_N(e.value))),m=[...new Set([...f,...p])].sort((e,t)=>t.length-e.length),h=m.length===0?RegExp(`[\\p{White_Space}]`,`gu`):RegExp(`${m.join(`|`)}|[\\p{White_Space}]`,`gu`),g=[...new Intl.NumberFormat(n.locale,{useGrouping:!1}).format(9876543210)].reverse(),_=new Map(g.map((e,t)=>[e,t])),v=RegExp(`[${g.join(``)}]`,`g`);return{minusSign:c,plusSign:l,decimal:u,group:d,literals:h,numeral:v,index:e=>String(_.get(e))}}function gN(e,t,n){return e.replaceAll?e.replaceAll(t,n):e.split(t).join(n)}function _N(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function Upe(e={}){let{locale:t}=XM();return(0,V.useMemo)(()=>new uN(t,e),[t,e])}var vN=new Map;function yN(e){let{locale:t}=XM(),n=t+(e?Object.entries(e).sort((e,t)=>e[0]<t[0]?-1:1).join():``);if(vN.has(n))return vN.get(n);let r=new Intl.Collator(t,e);return vN.set(n,r),r}function Wpe(e){let t=yN({usage:`search`,...e}),n=(0,V.useCallback)((e,n)=>n.length===0||(e=e.normalize(`NFC`),n=n.normalize(`NFC`),t.compare(e.slice(0,n.length),n)===0),[t]),r=(0,V.useCallback)((e,n)=>n.length===0||(e=e.normalize(`NFC`),n=n.normalize(`NFC`),t.compare(e.slice(-n.length),n)===0),[t]),i=(0,V.useCallback)((e,n)=>{if(n.length===0)return!0;e=e.normalize(`NFC`),n=n.normalize(`NFC`);let r=0,i=n.length;for(;r+i<=e.length;r++){let a=e.slice(r,r+i);if(t.compare(n,a)===0)return!0}return!1},[t]);return(0,V.useMemo)(()=>({startsWith:n,endsWith:r,contains:i}),[n,r,i])}
5var bN=typeof document<`u`?window.visualViewport:null;function Gpe(e){let{direction:t}=XM(),{arrowSize:n,targetRef:r,overlayRef:i,arrowRef:a,scrollRef:o=i,placement:s=`bottom`,containerPadding:c=12,shouldFlip:l=!0,boundaryElement:u=typeof document<`u`?document.body:null,offset:d=0,crossOffset:f=0,shouldUpdatePosition:p=!0,isOpen:m=!0,onClose:h,maxHeight:g,arrowBoundaryOffset:_=0}=e,[v,y]=(0,V.useState)(null),b=[p,s,i.current,r.current,a?.current,o.current,c,l,u,d,f,m,t,g,_,n],x=(0,V.useRef)(bN?.scale);(0,V.useEffect)(()=>{m&&(x.current=bN?.scale)},[m]);let S=(0,V.useCallback)(()=>{if(p===!1||!m||!i.current||!r.current||!u||bN?.scale!==x.current)return;let e=null;if(o.current&&o.current.contains(document.activeElement)){let t=document.activeElement?.getBoundingClientRect(),n=o.current.getBoundingClientRect();e={type:`top`,offset:(t?.top??0)-n.top},e.offset>n.height/2&&(e.type=`bottom`,e.offset=(t?.bottom??0)-n.bottom)}let h=i.current;!g&&i.current&&(h.style.top=`0px`,h.style.bottom=``,h.style.maxHeight=(window.visualViewport?.height??window.innerHeight)+`px`);let v=Spe({placement:qpe(s,t),overlayNode:i.current,targetNode:r.current,scrollNode:o.current||i.current,padding:c,shouldFlip:l,boundaryElement:u,offset:d,crossOffset:f,maxHeight:g,arrowSize:n??(a?.current?BM(a.current,!0).width:0),arrowBoundaryOffset:_});if(v.position){if(h.style.top=``,h.style.bottom=``,h.style.left=``,h.style.right=``,Object.keys(v.position).forEach(e=>h.style[e]=v.position[e]+`px`),h.style.maxHeight=v.maxHeight==null?``:v.maxHeight+`px`,e&&document.activeElement&&o.current){let t=document.activeElement.getBoundingClientRect(),n=o.current.getBoundingClientRect(),r=t[e.type]-n[e.type];o.current.scrollTop+=r-e.offset}y(v)}},b);rj(S,b),Kpe(S),Jj({ref:i,onResize:S}),Jj({ref:r,onResize:S});let C=(0,V.useRef)(!1);rj(()=>{let e,t=()=>{C.current=!0,clearTimeout(e),e=setTimeout(()=>{C.current=!1},500),S()},n=()=>{C.current&&t()};return bN?.addEventListener(`resize`,t),bN?.addEventListener(`scroll`,n),()=>{bN?.removeEventListener(`resize`,t),bN?.removeEventListener(`scroll`,n)}},[S]);let w=(0,V.useCallback)(()=>{C.current||h?.()},[h,C]);return wpe({triggerRef:r,isOpen:m,onClose:h&&w}),{overlayProps:{style:{position:v?`absolute`:`fixed`,top:v?void 0:0,left:v?void 0:0,zIndex:1e5,...v?.position,maxHeight:v?.maxHeight??`100vh`}},placement:v?.placement??null,triggerAnchorPoint:v?.triggerAnchorPoint??null,arrowProps:{"aria-hidden":`true`,role:`presentation`,style:{left:v?.arrowOffsetLeft,top:v?.arrowOffsetTop}},updatePosition:S}}function Kpe(e){rj(()=>(window.addEventListener(`resize`,e,!1),()=>{window.removeEventListener(`resize`,e,!1)}),[e])}function qpe(e,t){return t===`rtl`?e.replace(`start`,`right`).replace(`end`,`left`):e.replace(`start`,`left`).replace(`end`,`right`)}function xN(e){let t=e;return t.nativeEvent=e,t.isDefaultPrevented=()=>t.defaultPrevented,t.isPropagationStopped=()=>t.cancelBubble,t.persist=()=>{},t}function SN(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function CN(e){let t=(0,V.useRef)({isFocused:!1,observer:null});return rj(()=>{let e=t.current;return()=>{e.observer&&=(e.observer.disconnect(),null)}},[]),(0,V.useCallback)(n=>{if(n.target instanceof HTMLButtonElement||n.target instanceof HTMLInputElement||n.target instanceof HTMLTextAreaElement||n.target instanceof HTMLSelectElement){t.current.isFocused=!0;let r=n.target;r.addEventListener(`focusout`,n=>{if(t.current.isFocused=!1,r.disabled){let t=xN(n);e?.(t)}t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)},{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&r.disabled){var e;(e=t.current.observer)==null||e.disconnect();let n=r===document.activeElement?null:document.activeElement;r.dispatchEvent(new FocusEvent(`blur`,{relatedTarget:n})),r.dispatchEvent(new FocusEvent(`focusout`,{bubbles:!0,relatedTarget:n}))}}),t.current.observer.observe(r,{attributes:!0,attributeFilter:[`disabled`]})}},[e])}var wN=!1;function Jpe(e){for(;e&&!hM(e);)e=e.parentElement;let t=mj(e),n=t.document.activeElement;if(!n||n===e)return;wN=!0;let r=!1,i=e=>{(e.target===n||r)&&e.stopImmediatePropagation()},a=t=>{(t.target===n||r)&&(t.stopImmediatePropagation(),!e&&!r&&(r=!0,Tj(n),c()))},o=t=>{(t.target===e||r)&&t.stopImmediatePropagation()},s=t=>{(t.target===e||r)&&(t.stopImmediatePropagation(),r||(r=!0,Tj(n),c()))};t.addEventListener(`blur`,i,!0),t.addEventListener(`focusout`,a,!0),t.addEventListener(`focusin`,s,!0),t.addEventListener(`focus`,o,!0);let c=()=>{cancelAnimationFrame(l),t.removeEventListener(`blur`,i,!0),t.removeEventListener(`focusout`,a,!0),t.removeEventListener(`focusin`,s,!0),t.removeEventListener(`focus`,o,!0),wN=!1,r=!1},l=requestAnimationFrame(c);return c}var TN=`default`,EN=``,DN=new WeakMap;
vendor: 9,493 bytes, lines 5-11
5function Ype(e){if(Mj()){if(TN==="default"){let t=pj(e);EN=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect=`none`}TN=`disabled`}else if(e instanceof HTMLElement||e instanceof SVGElement){let t=`userSelect`in e.style?`userSelect`:`webkitUserSelect`;DN.set(e,e.style[t]),e.style[t]=`none`}}function ON(e){if(Mj()){if(TN!==`disabled`)return;TN=`restoring`,setTimeout(()=>{Vj(()=>{if(TN===`restoring`){let t=pj(e);t.documentElement.style.webkitUserSelect===`none`&&(t.documentElement.style.webkitUserSelect=EN||``),EN=``,TN=`default`}})},300)}else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&DN.has(e)){let t=DN.get(e),n=`userSelect`in e.style?`userSelect`:`webkitUserSelect`;e.style[n]===`none`&&(e.style[n]=t),e.getAttribute(`style`)===``&&e.removeAttribute(`style`),DN.delete(e)}}var kN=V.createContext({register:()=>{}});kN.displayName=`PressResponderContext`;function Xpe(e,t){return t.get?t.get.call(e):t.value}function AN(e,t,n){if(!t.has(e))throw TypeError(`attempted to `+n+` private field on non-instance`);return t.get(e)}function Zpe(e,t){return Xpe(e,AN(e,t,`get`))}function Qpe(e,t,n){if(t.set)t.set.call(e,n);else{if(!t.writable)throw TypeError(`attempted to set read only private field`);t.value=n}}function jN(e,t,n){return Qpe(e,AN(e,t,`set`),n),n}function $pe(e){let t=(0,V.useContext)(kN);if(t){let{register:n,...r}=t;e=bj(r,e),n()}return Yj(t,e.ref),e}var MN=new WeakMap,NN=class{continuePropagation(){jN(this,MN,!1)}get shouldStopPropagation(){return Zpe(this,MN)}constructor(e,t,n,r){fT(this,MN,{writable:!0,value:void 0}),jN(this,MN,!0);let i=(r?.target??n.currentTarget)?.getBoundingClientRect(),a,o=0,s,c=null;n.clientX!=null&&n.clientY!=null&&(s=n.clientX,c=n.clientY),i&&(s!=null&&c!=null?(a=s-i.left,o=c-i.top):(a=i.width/2,o=i.height/2)),this.type=e,this.pointerType=t,this.target=n.currentTarget,this.shiftKey=n.shiftKey,this.metaKey=n.metaKey,this.ctrlKey=n.ctrlKey,this.altKey=n.altKey,this.x=a,this.y=o}},PN=Symbol(`linkClicked`),FN=`react-aria-pressable-style`,IN=`data-react-aria-pressable`;function LN(e){let{onPress:t,onPressChange:n,onPressStart:r,onPressEnd:i,onPressUp:a,onClick:o,isDisabled:s,isPressed:c,preventFocusOnPress:l,shouldCancelOnPointerExit:u,allowTextSelectionOnPress:d,ref:f,...p}=$pe(e),[m,h]=(0,V.useState)(!1),g=(0,V.useRef)({isPressed:!1,ignoreEmulatedMouseEvents:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null,disposables:[]}),{addGlobalListener:_,removeAllGlobalListeners:v,removeGlobalListener:y}=Hj(),b=(0,V.useCallback)((e,t)=>{let i=g.current;if(s||i.didFirePressStart)return!1;let a=!0;if(i.isTriggeringEvent=!0,r){let n=new NN(`pressstart`,t,e);r(n),a=n.shouldStopPropagation}return n&&n(!0),i.isTriggeringEvent=!1,i.didFirePressStart=!0,h(!0),a},[s,r,n]),x=(0,V.useCallback)((e,r,a=!0)=>{let o=g.current;if(!o.didFirePressStart)return!1;o.didFirePressStart=!1,o.isTriggeringEvent=!0;let c=!0;if(i){let t=new NN(`pressend`,r,e);i(t),c=t.shouldStopPropagation}if(n&&n(!1),h(!1),t&&a&&!s){let n=new NN(`press`,r,e);t(n),c&&=n.shouldStopPropagation}return o.isTriggeringEvent=!1,c},[s,i,n,t]),S=Gj(x),C=(0,V.useCallback)((e,t)=>{let n=g.current;if(s)return!1;if(a){n.isTriggeringEvent=!0;let r=new NN(`pressup`,t,e);return a(r),n.isTriggeringEvent=!1,r.shouldStopPropagation}return!0},[s,a]),w=Gj(C),T=(0,V.useCallback)(e=>{let t=g.current;if(t.isPressed&&t.target){t.didFirePressStart&&t.pointerType!=null&&x(BN(t.target,e),t.pointerType,!1),t.isPressed=!1,te(null),t.isOverTarget=!1,t.activePointerId=null,t.pointerType=null,v(),d||ON(t.target);for(let e of t.disposables)e();t.disposables=[]}},[d,v,x]),E=Gj(T),D=(0,V.useCallback)(e=>{u&&T(e)},[u,T]),O=(0,V.useCallback)(e=>{s||o?.(e)},[s,o]),k=(0,V.useCallback)((e,t)=>{if(!s&&o){let n=new MouseEvent(`click`,e);SN(n,t),o(xN(n))}},[s,o]),A=Gj(k),[j,M]=(0,V.useState)(!1);rj(()=>{let e=g.current;if(j){let t=t=>{if(e.isPressed&&e.target&&zN(t,e.target)){var n;VN(vj(t),t.key)&&t.preventDefault();let r=vj(t),i=gj(e.target,vj(t));S(BN(e.target,t),`keyboard`,i),i&&A(t,e.target),v(),t.key!==`Enter`&&RN(e.target)&&gj(e.target,r)&&!t[PN]&&(t[PN]=!0,Lj(e.target,t,!1)),e.isPressed=!1,M(!1),(n=e.metaKeyEvents)==null||n.delete(t.key)}else if(t.key===`Meta`&&e.metaKeyEvents?.size){var r;let t=e.metaKeyEvents;e.metaKeyEvents=void 0;for(let n of t.values())(r=e.target)==null||r.dispatchEvent(new KeyboardEvent(`keyup`,n))}},n=e.target,r=fj(t=>{n&&zN(t,n)&&!t.repeat&&gj(n,vj(t))&&e.target&&w(BN(e.target,t),`keyboard`)},t);return _(pj(e.target),`keyup`,r,!0),()=>{y(pj(e.target),`keyup`,r,!0)}}},[j,_,v,y]);let[ee,te]=(0,V.useState)(null);rj(()=>{let e=g.current;if(ee===`pointer`){let t=t=>{if(t.pointerId===e.activePointerId&&e.isPressed&&t.button===0&&e.target){if(gj(e.target,vj(t))&&e.pointerType!=null){let n=!1,r=setTimeout(()=>{e.isPressed&&e.target instanceof HTMLElement&&(n?E(t):(Tj(e.target),e.target.click()))},80);_(t.currentTarget,`click`,()=>n=!0,!0),e.disposables.push(()=>clearTimeout(r))}else E(t);e.isOverTarget=!1}},n=e=>{E(e)};return _(pj(e.target),`pointerup`,t,!1),_(pj(e.target),`pointercancel`,n,!1),()=>{y(pj(e.target),`pointerup`,t,!1),y(pj(e.target),`pointercancel`,n,!1)}}},[ee,_,y]);let ne=(0,V.useMemo)(()=>{let e=g.current,t={onKeyDown(t){if(zN(t.nativeEvent,t.currentTarget)&&gj(t.currentTarget,vj(t.nativeEvent))){var n;VN(vj(t.nativeEvent),t.key)&&t.preventDefault();let r=!0;!e.isPressed&&!t.repeat&&(e.target=t.currentTarget,e.isPressed=!0,M(!0),e.pointerType=`keyboard`,r=b(t,`keyboard`)),r&&t.stopPropagation(),t.metaKey&&Aj()&&((n=e.metaKeyEvents)==null||n.set(t.key,t.nativeEvent))}else t.key===`Meta`&&(e.metaKeyEvents=new Map)},onClick(t){if((!t||gj(t.currentTarget,vj(t.nativeEvent)))&&t&&t.button===0&&!e.isTriggeringEvent&&!Lj.isOpening){let n=!0;if(s&&t.preventDefault(),!e.ignoreEmulatedMouseEvents&&!e.isPressed&&(e.pointerType===`virtual`||oM(t.nativeEvent))){let e=b(t,`virtual`),r=C(t,`virtual`),i=x(t,`virtual`);O(t),n=e&&r&&i}else if(e.isPressed&&e.pointerType!==`keyboard`){let r=e.pointerType||t.nativeEvent.pointerType||`virtual`,i=C(BN(t.currentTarget,t),r),a=x(BN(t.currentTarget,t),r,!0);n=i&&a,e.isOverTarget=!1,O(t),T(t)}e.ignoreEmulatedMouseEvents=!1,n&&t.stopPropagation()}}};return typeof PointerEvent<`u`&&(t.onPointerDown=t=>{if(t.button!==0||!gj(t.currentTarget,vj(t.nativeEvent)))return;if(sM(t.nativeEvent)){e.pointerType=`virtual`;return}e.pointerType=t.pointerType;let n=!0;if(!e.isPressed){e.isPressed=!0,te(`pointer`),e.isOverTarget=!0,e.activePointerId=t.pointerId,e.target=t.currentTarget,d||Ype(e.target),n=b(t,e.pointerType);let r=vj(t.nativeEvent);`releasePointerCapture`in r&&r.releasePointerCapture(t.pointerId)}n&&t.stopPropagation()},t.onMouseDown=t=>{if(gj(t.currentTarget,vj(t.nativeEvent))&&t.button===0){if(l){let n=Jpe(t.target);n&&e.disposables.push(n)}t.stopPropagation()}},t.onPointerUp=t=>{gj(t.currentTarget,vj(t.nativeEvent))&&e.pointerType!==`virtual`&&t.button===0&&!e.isPressed&&C(t,e.pointerType||t.pointerType)},t.onPointerEnter=t=>{t.pointerId===e.activePointerId&&e.target&&!e.isOverTarget&&e.pointerType!=null&&(e.isOverTarget=!0,b(BN(e.target,t),e.pointerType))},t.onPointerLeave=t=>{t.pointerId===e.activePointerId&&e.target&&e.isOverTarget&&e.pointerType!=null&&(e.isOverTarget=!1,x(BN(e.target,t),e.pointerType,!1),D(t))},t.onDragStart=e=>{gj(e.currentTarget,vj(e.nativeEvent))&&T(e)}),t},[s,l,v,d,T,D,x,b,C,O,k]);return(0,V.useEffect)(()=>{if(!f)return;let e=pj(f.current);if(!e||!e.head||e.getElementById(FN))return;let t=e.createElement(`style`);t.id=FN,t.textContent=` 6@layer { 7 [${IN}] { 8 touch-action: pan-x pan-y pinch-zoom; 9 } 10} 11 `.trim(),e.head.prepend(t)},[f]),(0,V.useEffect)(()=>{let e=g.current;return()=>{d||ON(e.target??void 0);for(let t of e.disposables)t();e.disposables=[]}},[d]),{isPressed:c||m,pressProps:bj(p,ne,{[IN]:!0})}}function RN(e){return e.tagName===`A`&&e.hasAttribute(`href`)}function zN(e,t){let{key:n,code:r}=e,i=t,a=i.getAttribute(`role`);return(n===`Enter`||n===` `||n===`Spacebar`||r===`Space`)&&!(i instanceof mj(i).HTMLInputElement&&!HN(i,n)||i instanceof mj(i).HTMLTextAreaElement||i.isContentEditable)&&!((a===`link`||!a&&RN(i))&&n!==`Enter`)}function BN(e,t){let n=t.clientX,r=t.clientY;return{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey,clientX:n,clientY:r}}function eme(e){return e instanceof HTMLInputElement?!1:e instanceof HTMLButtonElement?e.type!==`submit`&&e.type!==`reset`:!RN(e)}function VN(e,t){return e instanceof HTMLInputElement?!HN(e,t):eme(e)}var tme=new Set([`checkbox`,`radio`,`range`,`color`,`file`,`image`,`button`,`submit`,`reset`]);function HN(e,t){return e.type===`checkbox`||e.type===`radio`?t===` `:tme.has(e.type)}var UN=null,WN=new Set,GN=new Map,KN=!1,qN=!1,nme={Tab:!0,Escape:!0};function JN(e,t){for(let n of WN)n(e,t)}function rme(e){return!(e.metaKey||!Aj()&&e.altKey||e.ctrlKey||e.key===`Control`||e.key===`Shift`||e.key===`Meta`)}function YN(e){KN=!0,!Lj.isOpening&&rme(e)&&(UN=`keyboard`,JN(`keyboard`,e))}function XN(e){UN=`pointer`,`pointerType`in e&&e.pointerType,(e.type===`mousedown`||e.type===`pointerdown`)&&(KN=!0,JN(`pointer`,e))}function ZN(e){!Lj.isOpening&&oM(e)&&(KN=!0,UN=`virtual`)}function QN(e){e.target!==window&&e.target!==document&&!wN&&e.isTrusted&&(!KN&&!qN&&(UN=`virtual`,JN(`virtual`,e)),KN=!1,qN=!1)}function $N(){wN||(KN=!1,qN=!0)}function eP(e){if(typeof window>`u`||typeof document>`u`||GN.get(mj(e)))return;
11let t=mj(e),n=pj(e),r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){KN=!0,r.apply(this,arguments)},n.addEventListener(`keydown`,YN,!0),n.addEventListener(`keyup`,YN,!0),n.addEventListener(`click`,ZN,!0),t.addEventListener(`focus`,QN,!0),t.addEventListener(`blur`,$N,!1),typeof PointerEvent<`u`&&(n.addEventListener(`pointerdown`,XN,!0),n.addEventListener(`pointermove`,XN,!0),n.addEventListener(`pointerup`,XN,!0)),t.addEventListener(`beforeunload`,()=>{tP(e)},{once:!0}),GN.set(t,{focus:r})}var tP=(e,t)=>{let n=mj(e),r=pj(e);t&&r.removeEventListener(`DOMContentLoaded`,t),GN.has(n)&&(n.HTMLElement.prototype.focus=GN.get(n).focus,r.removeEventListener(`keydown`,YN,!0),r.removeEventListener(`keyup`,YN,!0),r.removeEventListener(`click`,ZN,!0),n.removeEventListener(`focus`,QN,!0),n.removeEventListener(`blur`,$N,!1),typeof PointerEvent<`u`&&(r.removeEventListener(`pointerdown`,XN,!0),r.removeEventListener(`pointermove`,XN,!0),r.removeEventListener(`pointerup`,XN,!0)),GN.delete(n))};function ime(e){let t=pj(e),n;return t.readyState===`loading`?(n=()=>{eP(e)},t.addEventListener(`DOMContentLoaded`,n)):eP(e),()=>tP(e,n)}typeof document<`u`&&ime();function nP(){return UN!==`pointer`}function rP(){return UN}function iP(e){UN=e,JN(e,null)}function aP(){eP();let[e,t]=(0,V.useState)(UN);return(0,V.useEffect)(()=>{let e=()=>{t(UN)};return WN.add(e),()=>{WN.delete(e)}},[]),sj()?null:e}var ame=new Set([`checkbox`,`radio`,`range`,`color`,`file`,`image`,`button`,`submit`,`reset`]);function ome(e,t,n){let r=pj(n?.target),i=typeof window<`u`?mj(n?.target).HTMLInputElement:HTMLInputElement,a=typeof window<`u`?mj(n?.target).HTMLTextAreaElement:HTMLTextAreaElement,o=typeof window<`u`?mj(n?.target).HTMLElement:HTMLElement,s=typeof window<`u`?mj(n?.target).KeyboardEvent:KeyboardEvent;return e=e||r.activeElement instanceof i&&!ame.has(r.activeElement.type)||r.activeElement instanceof a||r.activeElement instanceof o&&r.activeElement.isContentEditable,!(e&&t===`keyboard`&&n instanceof s&&!nme[n.key])}function sme(e,t,n){eP(),(0,V.useEffect)(()=>{let t=(t,r)=>{ome(!!n?.isTextInput,t,r)&&e(nP())};return WN.add(t),()=>{WN.delete(t)}},t)}function oP(e){let t=pj(e);if(rP()===`virtual`){let n=_j(t);Vj(()=>{let r=_j(t);(r===n||r===t.body)&&e.isConnected&&Tj(e)})}else Tj(e)}function sP(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:i}=e,a=(0,V.useCallback)(e=>{if(e.target===e.currentTarget)return r&&r(e),i&&i(!1),!0},[r,i]),o=CN(a),s=(0,V.useCallback)(e=>{let t=pj(e.target),r=t?_j(t):_j();e.target===e.currentTarget&&r===vj(e.nativeEvent)&&(n&&n(e),i&&i(!0),o(e))},[i,n,o]);return{focusProps:{onFocus:!t&&(n||i||r)?s:void 0,onBlur:!t&&(r||i)?a:void 0}}}function cP(e){if(!e)return;let t=!0;return n=>{e({...n,preventDefault(){n.preventDefault()},isDefaultPrevented(){return n.isDefaultPrevented()},stopPropagation(){t=!0},continuePropagation(){t=!1},isPropagationStopped(){return t}}),t&&n.stopPropagation()}}function cme(e){return{keyboardProps:e.isDisabled?{}:{onKeyDown:cP(e.onKeyDown),onKeyUp:cP(e.onKeyUp)}}}var lP=V.createContext(null);function lme(e){let t=(0,V.useContext)(lP)||{};Yj(t,e);let{ref:n,...r}=t;return r}function uP(e,t){let{focusProps:n}=sP(e),{keyboardProps:r}=cme(e),i=bj(n,r),a=lme(t),o=e.isDisabled?{}:a,s=(0,V.useRef)(e.autoFocus);(0,V.useEffect)(()=>{s.current&&t.current&&oP(t.current),s.current=!1},[t]);let c=e.excludeFromTabOrder?-1:0;return e.isDisabled&&(c=void 0),{focusableProps:bj({...i,tabIndex:c},o)}}var ume=V.forwardRef(({children:e,...t},n)=>{let r=(0,V.useRef)(!1),i=(0,V.useContext)(kN);n=Wj(n||i?.ref);let a=bj(i||{},{...t,ref:n,register(){r.current=!0,i&&i.register()}});return Yj(i,n),(0,V.useEffect)(()=>{r.current||=!0},[]),V.createElement(kN.Provider,{value:a},e)});function dme({children:e}){let t=(0,V.useMemo)(()=>({register:()=>{}}),[]);return V.createElement(kN.Provider,{value:t},e)}function dP(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:i}=e,a=(0,V.useRef)({isFocusWithin:!1}),{addGlobalListener:o,removeAllGlobalListeners:s}=Hj(),c=(0,V.useCallback)(e=>{e.currentTarget.contains(e.target)&&a.current.isFocusWithin&&!e.currentTarget.contains(e.relatedTarget)&&(a.current.isFocusWithin=!1,s(),n&&n(e),i&&i(!1))},[n,i,a,s]),l=CN(c),u=(0,V.useCallback)(e=>{if(!e.currentTarget.contains(e.target))return;let t=pj(e.target),n=_j(t);if(!a.current.isFocusWithin&&n===vj(e.nativeEvent)){r&&r(e),i&&i(!0),a.current.isFocusWithin=!0,l(e);let n=e.currentTarget;o(t,`focus`,e=>{if(a.current.isFocusWithin&&!gj(n,e.target)){let r=new t.defaultView.FocusEvent(`blur`,{relatedTarget:e.target});SN(r,n);let i=xN(r);c(i)}},{capture:!0})}},[r,i,l,o,c]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}
11:{focusWithinProps:{onFocus:u,onBlur:c}}}var fP=!1,pP=0;function fme(){fP=!0,setTimeout(()=>{fP=!1},50)}function mP(e){e.pointerType===`touch`&&fme()}function pme(){if(!(typeof document>`u`))return pP===0&&typeof PointerEvent<`u`&&document.addEventListener(`pointerup`,mP),pP++,()=>{pP--,!(pP>0)&&typeof PointerEvent<`u`&&document.removeEventListener(`pointerup`,mP)}}function hP(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,isDisabled:i}=e,[a,o]=(0,V.useState)(!1),s=(0,V.useRef)({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:``,target:null}).current;(0,V.useEffect)(pme,[]);let{addGlobalListener:c,removeAllGlobalListeners:l}=Hj(),{hoverProps:u,triggerHoverEnd:d}=(0,V.useMemo)(()=>{let e=(e,r)=>{if(s.pointerType=r,i||r===`touch`||s.isHovered||!e.currentTarget.contains(e.target))return;s.isHovered=!0;let l=e.currentTarget;s.target=l,c(pj(e.target),`pointerover`,e=>{s.isHovered&&s.target&&!gj(s.target,e.target)&&a(e,e.pointerType)},{capture:!0}),t&&t({type:`hoverstart`,target:l,pointerType:r}),n&&n(!0),o(!0)},a=(e,t)=>{let i=s.target;s.pointerType=``,s.target=null,t!==`touch`&&s.isHovered&&i&&(s.isHovered=!1,l(),r&&r({type:`hoverend`,target:i,pointerType:t}),n&&n(!1),o(!1))},u={};return typeof PointerEvent<`u`&&(u.onPointerEnter=t=>{fP&&t.pointerType===`mouse`||e(t,t.pointerType)},u.onPointerLeave=e=>{!i&&e.currentTarget.contains(e.target)&&a(e,e.pointerType)}),{hoverProps:u,triggerHoverEnd:a}},[t,n,r,i,s,c,l]);return(0,V.useEffect)(()=>{i&&d({currentTarget:s.target},s.pointerType)},[i]),{hoverProps:u,isHovered:a}}function mme(e){let{ref:t,onInteractOutside:n,isDisabled:r,onInteractOutsideStart:i}=e,a=(0,V.useRef)({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),o=Gj(e=>{n&&gP(e,t)&&(i&&i(e),a.current.isPointerDown=!0)}),s=Gj(e=>{n&&n(e)});(0,V.useEffect)(()=>{let e=a.current;if(r)return;let n=t.current,i=pj(n);if(typeof PointerEvent<`u`){let n=n=>{e.isPointerDown&&gP(n,t)&&s(n),e.isPointerDown=!1};return i.addEventListener(`pointerdown`,o,!0),i.addEventListener(`click`,n,!0),()=>{i.removeEventListener(`pointerdown`,o,!0),i.removeEventListener(`click`,n,!0)}}},[t,r])}function gP(e,t){if(e.button>0)return!1;if(e.target){let t=e.target.ownerDocument;if(!t||!t.documentElement.contains(e.target)||e.target.closest(`[data-react-aria-top-layer]`))return!1}return t.current?!e.composedPath().includes(t.current):!1}var hme=500;function gme(e){let{isDisabled:t,onLongPressStart:n,onLongPressEnd:r,onLongPress:i,threshold:a=hme,accessibilityDescription:o}=e,s=(0,V.useRef)(void 0),{addGlobalListener:c,removeGlobalListener:l}=Hj(),{pressProps:u}=LN({isDisabled:t,onPressStart(e){if(e.continuePropagation(),(e.pointerType===`mouse`||e.pointerType===`touch`)&&(n&&n({...e,type:`longpressstart`}),s.current=setTimeout(()=>{e.target.dispatchEvent(new PointerEvent(`pointercancel`,{bubbles:!0})),pj(e.target).activeElement!==e.target&&Tj(e.target),i&&i({...e,type:`longpress`}),s.current=void 0},a),e.pointerType===`touch`)){let t=e=>{e.preventDefault()};c(e.target,`contextmenu`,t,{once:!0}),c(window,`pointerup`,()=>{setTimeout(()=>{l(e.target,`contextmenu`,t)},30)},{once:!0})}},onPressEnd(e){s.current&&clearTimeout(s.current),r&&(e.pointerType===`mouse`||e.pointerType===`touch`)&&r({...e,type:`longpressend`})}});return{longPressProps:bj(u,tM(i&&!t?o:void 0))}}var _P=V.createContext(null),vP=`react-aria-focus-scope-restore`,yP=null;
vendor: 9,439 bytes, line 11
11function bP(e){let{children:t,contain:n,restoreFocus:r,autoFocus:i}=e,a=(0,V.useRef)(null),o=(0,V.useRef)(null),s=(0,V.useRef)([]),{parentNode:c}=(0,V.useContext)(_P)||{},l=(0,V.useMemo)(()=>new FP({scopeRef:s}),[s]);rj(()=>{let e=c||IP.root;if(IP.getTreeNode(e.scopeRef)&&yP&&!EP(yP,e.scopeRef)){let t=IP.getTreeNode(yP);t&&(e=t)}e.addChild(l),IP.addNode(l)},[l,c]),rj(()=>{let e=IP.getTreeNode(s);e&&(e.contain=!!n)},[n]),rj(()=>{let e=a.current?.nextSibling,t=[],n=e=>e.stopPropagation();for(;e&&e!==o.current;)t.push(e),e.addEventListener(vP,n),e=e.nextSibling;return s.current=t,()=>{for(let e of t)e.removeEventListener(vP,n)}},[t]),Sme(s,r,n),yme(s,n),Cme(s,r,n),xme(s,i),(0,V.useEffect)(()=>{let e=_j(pj(s.current?s.current[0]:void 0)),t=null;if(wP(e,s.current)){for(let n of IP.traverse())n.scopeRef&&wP(e,n.scopeRef.current)&&(t=n);t===IP.getTreeNode(s)&&(yP=t.scopeRef)}},[s]),rj(()=>()=>{let e=IP.getTreeNode(s)?.parent?.scopeRef??null;(s===yP||EP(s,yP))&&(!e||IP.getTreeNode(e))&&(yP=e),IP.removeTreeNode(s)},[s]);let u=(0,V.useMemo)(()=>_me(s),[]),d=(0,V.useMemo)(()=>({focusManager:u,parentNode:l}),[l,u]);return V.createElement(_P.Provider,{value:d},V.createElement(`span`,{"data-focus-scope-start":!0,hidden:!0,ref:a}),t,V.createElement(`span`,{"data-focus-scope-end":!0,hidden:!0,ref:o}))}function _me(e){return{focusNext(t={}){let n=e.current,{from:r,tabbable:i,wrap:a,accept:o}=t,s=r||_j(pj(n[0]??void 0)),c=n[0].previousElementSibling,l=MP(xP(n),{tabbable:i,accept:o},n);l.currentNode=wP(s,n)?s:c;let u=l.nextNode();return!u&&a&&(l.currentNode=c,u=l.nextNode()),u&&DP(u,!0),u},focusPrevious(t={}){let n=e.current,{from:r,tabbable:i,wrap:a,accept:o}=t,s=r||_j(pj(n[0]??void 0)),c=n[n.length-1].nextElementSibling,l=MP(xP(n),{tabbable:i,accept:o},n);l.currentNode=wP(s,n)?s:c;let u=l.previousNode();return!u&&a&&(l.currentNode=c,u=l.previousNode()),u&&DP(u,!0),u},focusFirst(t={}){let n=e.current,{tabbable:r,accept:i}=t,a=MP(xP(n),{tabbable:r,accept:i},n);a.currentNode=n[0].previousElementSibling;let o=a.nextNode();return o&&DP(o,!0),o},focusLast(t={}){let n=e.current,{tabbable:r,accept:i}=t,a=MP(xP(n),{tabbable:r,accept:i},n);a.currentNode=n[n.length-1].nextElementSibling;let o=a.previousNode();return o&&DP(o,!0),o}}}function xP(e){return e[0].parentElement}function SP(e){let t=IP.getTreeNode(yP);for(;t&&t.scopeRef!==e;){if(t.contain)return!1;t=t.parent}return!0}function vme(e){if(e.checked)return!0;let t=[];return t=e.form?[...e.form?.elements?.namedItem(e.name)??[]]:[...pj(e).querySelectorAll(`input[type="radio"][name="${CSS.escape(e.name)}"]`)].filter(e=>!e.form),t?!t.some(e=>e.checked):!1}function yme(e,t){let n=(0,V.useRef)(void 0),r=(0,V.useRef)(void 0);rj(()=>{let i=e.current;if(!t){r.current&&=(cancelAnimationFrame(r.current),void 0);return}let a=pj(i?i[0]:void 0),o=t=>{if(t.key!==`Tab`||t.altKey||t.ctrlKey||t.metaKey||!SP(e)||t.isComposing)return;let n=_j(a),r=e.current;if(!r||!wP(n,r))return;let i=MP(xP(r),{tabbable:!0},r);if(!n)return;i.currentNode=n;let o=t.shiftKey?i.previousNode():i.nextNode();o||=(i.currentNode=t.shiftKey?r[r.length-1].nextElementSibling:r[0].previousElementSibling,t.shiftKey?i.previousNode():i.nextNode()),t.preventDefault(),o&&DP(o,!0)},s=t=>{(!yP||EP(yP,e))&&wP(vj(t),e.current)?(yP=e,n.current=vj(t)):SP(e)&&!TP(vj(t),e)?n.current?n.current.focus():yP&&yP.current&&kP(yP.current):SP(e)&&(n.current=vj(t))},c=t=>{r.current&&cancelAnimationFrame(r.current),r.current=requestAnimationFrame(()=>{let r=rP(),i=(r===`virtual`||r===null)&&Fj()&&Pj(),o=_j(a);if(!i&&o&&SP(e)&&!TP(o,e)){yP=e;let r=vj(t);if(r&&r.isConnected){var s;n.current=r,(s=n.current)==null||s.focus()}else yP.current&&kP(yP.current)}})};return a.addEventListener(`keydown`,o,!1),a.addEventListener(`focusin`,s,!1),i?.forEach(e=>e.addEventListener(`focusin`,s,!1)),i?.forEach(e=>e.addEventListener(`focusout`,c,!1)),()=>{a.removeEventListener(`keydown`,o,!1),a.removeEventListener(`focusin`,s,!1),i?.forEach(e=>e.removeEventListener(`focusin`,s,!1)),i?.forEach(e=>e.removeEventListener(`focusout`,c,!1))}},[e,t]),rj(()=>()=>{r.current&&cancelAnimationFrame(r.current)},[r])}function CP(e){return TP(e)}function wP(e,t){return!e||!t?!1:t.some(t=>t.contains(e))}function TP(e,t=null){if(e instanceof Element&&e.closest(`[data-react-aria-top-layer]`))return!0;for(let{scopeRef:n}of IP.traverse(IP.getTreeNode(t)))if(n&&wP(e,n.current))return!0;return!1}function bme(e){return TP(e,yP)}function EP(e,t){let n=IP.getTreeNode(t)?.parent;for(;n;){if(n.scopeRef===e)return!0;n=n.parent}return!1}function DP(e,t=!1){if(e!=null&&!t)try{oP(e)}catch{}else if(e!=null)try{e.focus()}catch{}}function OP(e,t=!0){let n=e[0].previousElementSibling,r=xP(e),i=MP(r,{tabbable:t},e);i.currentNode=n;let a=i.nextNode();return t&&!a&&(r=xP(e),i=MP(r,{tabbable:!1},e),i.currentNode=n,a=i.nextNode()),a}function kP(e,t=!0){DP(OP(e,t))}function xme(e,t){let n=V.useRef(t);(0,V.useEffect)(()=>{n.current&&(yP=e,!wP(_j(pj(e.current?e.current[0]:void 0)),yP.current)&&e.current&&kP(e.current)),n.current=!1},[e])}function Sme(e,t,n){rj(()=>{if(t||n)return;let r=e.current,i=pj(r?r[0]:void 0),a=t=>{let n=vj(t);wP(n,e.current)?yP=e:CP(n)||(yP=null)};return i.addEventListener(`focusin`,a,!1),r?.forEach(e=>e.addEventListener(`focusin`,a,!1)),()=>{i.removeEventListener(`focusin`,a,!1),r?.forEach(e=>e.removeEventListener(`focusin`,a,!1))}},[e,t,n])}function AP(e){let t=IP.getTreeNode(yP);for(;t&&t.scopeRef!==e;){if(t.nodeToRestore)return!1;t=t.parent}return t?.scopeRef===e}function Cme(e,t,n){let r=(0,V.useRef)(typeof document<`u`?_j(pj(e.current?e.current[0]:void 0)):null);rj(()=>{let r=e.current,i=pj(r?r[0]:void 0);if(!t||n)return;let a=()=>{(!yP||EP(yP,e))&&wP(_j(i),e.current)&&(yP=e)};return i.addEventListener(`focusin`,a,!1),r?.forEach(e=>e.addEventListener(`focusin`,a,!1)),()=>{i.removeEventListener(`focusin`,a,!1),r?.forEach(e=>e.removeEventListener(`focusin`,a,!1))}},[e,n]),rj(()=>{let r=pj(e.current?e.current[0]:void 0);if(!t)return;let i=t=>{if(t.key!==`Tab`||t.altKey||t.ctrlKey||t.metaKey||!SP(e)||t.isComposing)return;let n=r.activeElement;if(!TP(n,e)||!AP(e))return;let i=IP.getTreeNode(e);if(!i)return;let a=i.nodeToRestore,o=MP(r.body,{tabbable:!0});o.currentNode=n;let s=t.shiftKey?o.previousNode():o.nextNode();if((!a||!a.isConnected||a===r.body)&&(a=void 0,i.nodeToRestore=void 0),(!s||!TP(s,e))&&a){o.currentNode=a;do s=t.shiftKey?o.previousNode():o.nextNode();while(TP(s,e));t.preventDefault(),t.stopPropagation(),s?DP(s,!0):CP(a)?DP(a,!0):n.blur()}};return n||r.addEventListener(`keydown`,i,!0),()=>{n||r.removeEventListener(`keydown`,i,!0)}},[e,t,n]),rj(()=>{let n=pj(e.current?e.current[0]:void 0);if(!t)return;let i=IP.getTreeNode(e);if(i)return i.nodeToRestore=r.current??void 0,()=>{let r=IP.getTreeNode(e);if(!r)return;let i=r.nodeToRestore,a=_j(n);if(t&&i&&(a&&TP(a,e)||a===n.body&&AP(e))){let t=IP.clone();requestAnimationFrame(()=>{if(n.activeElement===n.body){let n=t.getTreeNode(e);for(;n;){if(n.nodeToRestore&&n.nodeToRestore.isConnected){jP(n.nodeToRestore);return}n=n.parent}for(n=t.getTreeNode(e);n;){if(n.scopeRef&&n.scopeRef.current&&IP.getTreeNode(n.scopeRef)){jP(OP(n.scopeRef.current,!0));return}n=n.parent}}})}}},[e,t])}function jP(e){e.dispatchEvent(new CustomEvent(vP,{bubbles:!0,cancelable:!0}))&&DP(e)}function MP(e,t,n){let r=t?.tabbable?gM:hM,i=pj(e?.nodeType===Node.ELEMENT_NODE?e:null),a=Ffe(i,e||i,NodeFilter.SHOW_ELEMENT,{acceptNode(e){return t!=null&&t.from?.contains(e)||t?.tabbable&&e.tagName===`INPUT`&&e.getAttribute(`type`)===`radio`&&(!vme(e)||a.currentNode.tagName===`INPUT`&&a.currentNode.type===`radio`&&a.currentNode.name===e.name)?NodeFilter.FILTER_REJECT:r(e)&&(!n||wP(e,n))&&(!t?.accept||t.accept(e))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return t?.from&&(a.currentNode=t.from),a}function NP(e,t={}){return{focusNext(n={}){let r=e.current;if(!r)return null;let{from:i,tabbable:a=t.tabbable,wrap:o=t.wrap,accept:s=t.accept}=n,c=i||_j(pj(r)),l=MP(r,{tabbable:a,accept:s});r.contains(c)&&(l.currentNode=c);let u=l.nextNode();return!u&&o&&(l.currentNode=r,u=l.nextNode()),u&&DP(u,!0),u},focusPrevious(n=t){let r=e.current;if(!r)return null;let{from:i,tabbable:a=t.tabbable,wrap:o=t.wrap,accept:s=t.accept}=n,c=i||_j(pj(r)),l=MP(r,{tabbable:a,accept:s});if(r.contains(c))l.currentNode=c;else{let e=PP(l);return e&&DP(e,!0),e??null}let u=l.previousNode();if(!u&&o){l.currentNode=r;let e=PP(l);if(!e)return null;u=e}return u&&DP(u,!0),u??null},focusFirst(n=t){let r=e.current;if(!r)return null;let{tabbable:i=t.tabbable,accept:a=t.accept}=n,o=MP(r,{tabbable:i,accept:a}).nextNode();return o&&DP(o,!0),o},focusLast(n=t){let r=e.current;if(!r)return null;let{tabbable:i=t.tabbable,accept:a=t.accept}=n,o=PP(MP(r,{tabbable:i,accept:a}));return o&&DP(o,!0),o??null}}}function PP(e){let t,n;do n=e.lastChild(),n&&(t=n);while(n);return t}var wme=class e{get size(){return this.fastMap.size}getTreeNode(e){return this.fastMap.get(e)}addTreeNode(e,t,n){let r=this.fastMap.get(t??null);if(!r)return;let i=new FP({scopeRef:e});r.addChild(i),i.parent=r,this.fastMap.set(e,i),n&&(i.nodeToRestore=n)}addNode(e){this.fastMap.set(e.scopeRef,e)}removeTreeNode(e){if(e===null)return;let t=this.fastMap.get(e);if(!t)return;let n=t.parent;for(let e of this.traverse())e!==t&&t.nodeToRestore&&e.nodeToRestore&&t.scopeRef&&t.scopeRef.current&&wP(e.nodeToRestore,t.scopeRef.current)&&(e.nodeToRestore=t.nodeToRestore);let r=t.children;n&&(n.removeChild(t),r.size>
110&&r.forEach(e=>n&&n.addChild(e))),this.fastMap.delete(t.scopeRef)}*traverse(e=this.root){if(e.scopeRef!=null&&(yield e),e.children.size>0)for(let t of e.children)yield*this.traverse(t)}clone(){let t=new e;for(let e of this.traverse())t.addTreeNode(e.scopeRef,e.parent?.scopeRef??null,e.nodeToRestore);return t}constructor(){this.fastMap=new Map,this.root=new FP({scopeRef:null}),this.fastMap.set(null,this.root)}},FP=class{addChild(e){this.children.add(e),e.parent=this}removeChild(e){this.children.delete(e),e.parent=void 0}constructor(e){this.children=new Set,this.contain=!1,this.scopeRef=e.scopeRef}},IP=new wme;function LP(e={}){let{autoFocus:t=!1,isTextInput:n,within:r}=e,i=(0,V.useRef)({isFocused:!1,isFocusVisible:t||nP()}),[a,o]=(0,V.useState)(!1),[s,c]=(0,V.useState)(()=>i.current.isFocused&&i.current.isFocusVisible),l=(0,V.useCallback)(()=>c(i.current.isFocused&&i.current.isFocusVisible),[]),u=(0,V.useCallback)(e=>{i.current.isFocused=e,o(e),l()},[l]);sme(e=>{i.current.isFocusVisible=e,l()},[],{isTextInput:n});let{focusProps:d}=sP({isDisabled:r,onFocusChange:u}),{focusWithinProps:f}=dP({isDisabled:!r,onFocusWithinChange:u});return{isFocused:a,isFocusVisible:s,focusProps:r?f:d}}function Tme(e,t){let n=t?.isDisabled,[r,i]=(0,V.useState)(!1);return rj(()=>{if(e?.current&&!n){let t=()=>{if(e.current){let t=MP(e.current,{tabbable:!0});i(!!t.nextNode())}};t();let n=new MutationObserver(t);return n.observe(e.current,{subtree:!0,childList:!0,attributes:!0,attributeFilter:[`tabIndex`,`disabled`]}),()=>{n.disconnect()}}}),!n&&r}function RP(e){let t=Dme(pj(e));t!==e&&(t&&Eme(t,e),e&&zP(e,t))}function Eme(e,t){e.dispatchEvent(new FocusEvent(`blur`,{relatedTarget:t})),e.dispatchEvent(new FocusEvent(`focusout`,{bubbles:!0,relatedTarget:t}))}function zP(e,t){e.dispatchEvent(new FocusEvent(`focus`,{relatedTarget:t})),e.dispatchEvent(new FocusEvent(`focusin`,{bubbles:!0,relatedTarget:t}))}function Dme(e){let t=_j(e),n=t?.getAttribute(`aria-activedescendant`);return n&&e.getElementById(n)||t}var BP=[];function Ome(e,t){let{onClose:n,shouldCloseOnBlur:r,isOpen:i,isDismissable:a=!1,isKeyboardDismissDisabled:o=!1,shouldCloseOnInteractOutside:s}=e;(0,V.useEffect)(()=>{if(i&&!BP.includes(t))return BP.push(t),()=>{let e=BP.indexOf(t);e>=0&&BP.splice(e,1)}},[i,t]);let c=()=>{BP[BP.length-1]===t&&n&&n()},l=e=>{(!s||s(e.target))&&BP[BP.length-1]===t&&(e.stopPropagation(),e.preventDefault())},u=e=>{(!s||s(e.target))&&(BP[BP.length-1]===t&&(e.stopPropagation(),e.preventDefault()),c())},d=e=>{e.key===`Escape`&&!o&&!e.nativeEvent.isComposing&&(e.stopPropagation(),e.preventDefault(),c())};mme({ref:t,onInteractOutside:a&&i?u:void 0,onInteractOutsideStart:l});let{focusWithinProps:f}=dP({isDisabled:!r,onBlurWithin:e=>{e.relatedTarget&&!bme(e.relatedTarget)&&(!s||s(e.relatedTarget))&&n?.()}}),p=e=>{e.target===e.currentTarget&&e.preventDefault()};return{overlayProps:{onKeyDown:d,...f},underlayProps:{onPointerDown:p}}}function kme(e,t,n){let{type:r}=e,{isOpen:i}=t;(0,V.useEffect)(()=>{n&&n.current&&WM.set(n.current,t.close)});let a;r===`menu`?a=!0:r===`listbox`&&(a=`listbox`);let o=uj();return{triggerProps:{"aria-haspopup":a,"aria-expanded":i,"aria-controls":i?o:void 0,onPress:t.toggle},overlayProps:{id:o}}}var VP=typeof document<`u`&&window.visualViewport,HP=0,UP;function WP(e={}){let{isDisabled:t}=e;rj(()=>{if(!t)return HP++,HP===1&&(UP=Mj()?KP():GP()),()=>{HP--,HP===0&&UP()}},[t])}function GP(){let e=window.innerWidth-document.documentElement.clientWidth;return fj(e>0&&(`scrollbarGutter`in document.documentElement.style?qP(document.documentElement,`scrollbarGutter`,`stable`):qP(document.documentElement,`paddingRight`,`${e}px`)),qP(document.documentElement,`overflow`,`hidden`))}function KP(){let e,t=!1,n=n=>{let r=n.target;e=Xj(r)?r:Zj(r,!0),t=!1;let i=r.ownerDocument.defaultView.getSelection();i&&!i.isCollapsed&&i.containsNode(r,!0)&&(t=!0),`selectionStart`in r&&`selectionEnd`in r&&r.selectionStart<r.selectionEnd&&r.ownerDocument.activeElement===r&&(t=!0)},r=document.createElement(`style`);r.textContent=`@layer { 12 * { 13 overscroll-behavior: contain; 14 } 15}`,document.head.prepend(r);let i=n=>{if(!(n.touches.length===2||t)){if(!e||e===document.documentElement||e===document.body){n.preventDefault();return}e.scrollHeight===e.clientHeight&&e.scrollWidth===e.clientWidth&&n.preventDefault()}},a=e=>{let t=e.target,n=e.relatedTarget;n&&$j(n)?(n.focus({preventScroll:!0}),YP(n,$j(t))):n||(t.parentElement?.closest(`[tabindex]`))?.focu
vendor: 4,531 bytes, line 15
15s({preventScroll:!0})},o=HTMLElement.prototype.focus;HTMLElement.prototype.focus=function(e){let t=document.activeElement!=null&&$j(document.activeElement);o.call(this,{...e,preventScroll:!0}),(!e||!e.preventScroll)&&YP(this,t)};let s=fj(JP(document,`touchstart`,n,{passive:!1,capture:!0}),JP(document,`touchmove`,i,{passive:!1,capture:!0}),JP(document,`blur`,a,!0));return()=>{s(),r.remove(),HTMLElement.prototype.focus=o}}function qP(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function JP(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function YP(e,t){t||!VP?XP(e):VP.addEventListener(`resize`,()=>XP(e),{once:!0})}function XP(e){let t=document.scrollingElement||document.documentElement,n=e;for(;n&&n!==t;){let e=Zj(n);if(e!==document.documentElement&&e!==document.body&&e!==n){let t=e.getBoundingClientRect(),r=n.getBoundingClientRect();if(r.top<t.top||r.bottom>t.top+n.clientHeight){let n=t.bottom;VP&&(n=Math.min(n,VP.offsetTop+VP.height));let i=r.top-t.top-((n-t.top)/2-r.height/2);e.scrollTo({top:Math.max(0,Math.min(e.scrollHeight-e.clientHeight,e.scrollTop+i)),behavior:`smooth`})}}n=e.parentElement}}var ZP=(0,V.createContext)({});function QP(){return(0,V.useContext)(ZP)??{}}var $P={};$P={dismiss:`تجاÙÙ`};var eF={};eF={dismiss:`ÐÑÑ
вÑÑлÑне`};var tF={};tF={dismiss:`Odstranit`};var nF={};nF={dismiss:`Luk`};var rF={};rF={dismiss:`SchlieÃen`};var iF={};iF={dismiss:`ÎÏÏÏÏιÏη`};var aF={};aF={dismiss:`Dismiss`};var oF={};oF={dismiss:`Descartar`};var sF={};sF={dismiss:`Lõpeta`};var cF={};cF={dismiss:`Hylkää`};var lF={};lF={dismiss:`Rejeter`};var uF={};uF={dismiss:`×תע××`};var dF={};dF={dismiss:`Odbaci`};var fF={};fF={dismiss:`ElutasÃtás`};var pF={};pF={dismiss:`Ignora`};var mF={};mF={dismiss:`éãã`};var hF={};hF={dismiss:`무ì`};var gF={};gF={dismiss:`Atmesti`};var _F={};_F={dismiss:`NerÄdÄ«t`};var vF={};vF={dismiss:`Lukk`};var yF={};yF={dismiss:`Negeren`};var bF={};bF={dismiss:`Zignoruj`};var xF={};xF={dismiss:`Descartar`};var SF={};SF={dismiss:`Dispensar`};var CF={};CF={dismiss:`Revocare`};var wF={};wF={dismiss:`ÐÑопÑÑÑиÑÑ`};var TF={};TF={dismiss:`ZruÅ¡iÅ¥`};var EF={};EF={dismiss:`Opusti`};var DF={};DF={dismiss:`Odbaci`};var OF={};OF={dismiss:`Avvisa`};var kF={};kF={dismiss:`Kapat`};var AF={};AF={dismiss:`СкаÑÑваÑи`};var jF={};jF={dismiss:`åæ¶`};var MF={};MF={dismiss:`éé`};var NF={};NF={"ar-AE":$P,"bg-BG":eF,"cs-CZ":tF,"da-DK":nF,"de-DE":rF,"el-GR":iF,"en-US":aF,"es-ES":oF,"et-EE":sF,"fi-FI":cF,"fr-FR":lF,"he-IL":uF,"hr-HR":dF,"hu-HU":fF,"it-IT":pF,"ja-JP":mF,"ko-KR":hF,"lt-LT":gF,"lv-LV":_F,"nb-NO":vF,"nl-NL":yF,"pl-PL":bF,"pt-BR":xF,"pt-PT":SF,"ro-RO":CF,"ru-RU":wF,"sk-SK":TF,"sl-SI":EF,"sr-SP":DF,"sv-SE":OF,"tr-TR":kF,"uk-UA":AF,"zh-CN":jF,"zh-TW":MF};var PF={border:0,clip:`rect(0 0 0 0)`,clipPath:`inset(50%)`,height:`1px`,margin:`-1px`,overflow:`hidden`,padding:0,position:`absolute`,width:`1px`,whiteSpace:`nowrap`};function FF(e={}){let{style:t,isFocusable:n}=e,[r,i]=(0,V.useState)(!1),{focusWithinProps:a}=dP({isDisabled:!n,onFocusWithinChange:e=>i(e)}),o=(0,V.useMemo)(()=>r?t:t?{...PF,...t}:PF,[r]);return{visuallyHiddenProps:{...a,style:o}}}function IF(e){let{children:t,elementType:n=`div`,isFocusable:r,style:i,...a}=e,{visuallyHiddenProps:o}=FF(e);return V.createElement(n,bj(a,o),t)}function Ame(e){return e&&e.__esModule?e.default:e}function LF(e){let{onDismiss:t,...n}=e,r=Uj(n,iN(Ame(NF),`@react-aria/overlays`).format(`dismiss`)),i=()=>{t&&t()};return V.createElement(IF,null,V.createElement(`button`,{...r,tabIndex:-1,onClick:i,style:{width:1,height:1}}))}var jme=typeof HTMLElement<`u`&&`inert`in HTMLElement.prototype,RF=new WeakMap,zF=[];function BF(e,t){let n=mj(e?.[0]),r=t instanceof n.Element?{root:t}:t,i=r?.root??document.body,a=r?.shouldUseInert&&jme,o=new Set(e),s=new Set,c=e=>a&&e instanceof n.HTMLElement?e.inert:e.getAttribute(`aria-hidden`)===`true`,l=(e,t)=>{a&&e instanceof n.HTMLElement?e.inert=t:t?e.setAttribute(`aria-hidden`,`true`):(e.removeAttribute(`aria-hidden`),e instanceof n.HTMLElement&&(e.inert=!1))},u=e=>{for(let t of e.querySelectorAll(`[data-live-announcer], [data-react-aria-top-layer]`))o.add(t);let t=e=>{if(s.has(e)||o.has(e)||e.parentElement&&s.has(e.parentElement)&&e.parentElement.getAttribute(`role`)!==`row`)return NodeFilter.FILTER_REJECT;for(let t of o)if(e.contains(t))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:t}),r=t(e);
15if(r===NodeFilter.FILTER_ACCEPT&&d(e),r!==NodeFilter.FILTER_REJECT){let e=n.nextNode();for(;e!=null;)d(e),e=n.nextNode()}},d=e=>{let t=RF.get(e)??0;c(e)&&t===0||(t===0&&l(e,!0),s.add(e),RF.set(e,t+1))};zF.length&&zF[zF.length-1].disconnect(),u(i);let f=new MutationObserver(e=>{for(let t of e)if(t.type===`childList`&&![...o,...s].some(e=>e.contains(t.target)))for(let e of t.addedNodes)(e instanceof HTMLElement||e instanceof SVGElement)&&(e.dataset.liveAnnouncer===`true`||e.dataset.reactAriaTopLayer===`true`)?o.add(e):e instanceof Element&&u(e)});f.observe(i,{childList:!0,subtree:!0});let p={visibleNodes:o,hiddenNodes:s,observe(){f.observe(i,{childList:!0,subtree:!0})},disconnect(){f.disconnect()}};return zF.push(p),()=>{f.disconnect();for(let e of s){let t=RF.get(e);t!=null&&(t===1?(l(e,!1),RF.delete(e)):RF.set(e,t-1))}p===zF[zF.length-1]?(zF.pop(),zF.length&&zF[zF.length-1].observe()):zF.splice(zF.indexOf(p),1)}}function Mme(e){let t=zF[zF.length-1];if(t&&!t.visibleNodes.has(e))return t.visibleNodes.add(e),()=>{t.visibleNodes.delete(e)}}function Nme(e,t){let{triggerRef:n,popoverRef:r,groupRef:i,isNonModal:a,isKeyboardDismissDisabled:o,shouldCloseOnInteractOutside:s,...c}=e,l=c.trigger===`SubmenuTrigger`,{overlayProps:u,underlayProps:d}=Ome({isOpen:t.isOpen,onClose:t.close,shouldCloseOnBlur:!0,isDismissable:!a||l,isKeyboardDismissDisabled:o,shouldCloseOnInteractOutside:s},i??r),{overlayProps:f,arrowProps:p,placement:m,triggerAnchorPoint:h}=Gpe({...c,targetRef:n,overlayRef:r,isOpen:t.isOpen,onClose:a&&!l?t.close:null});return WP({isDisabled:a||!t.isOpen}),(0,V.useEffect)(()=>{if(t.isOpen&&r.current)return a?Mme(i?.current??r.current):BF([i?.current??r.current],{shouldUseInert:!0})},[a,t.isOpen,r,i]),{popoverProps:bj(u,f),arrowProps:p,underlayProps:d,placement:m,triggerAnchorPoint:h}}var VF=V.createContext(null);function HF(e){let t=sj(),{portalContainer:n=t?null:document.body,isExiting:r}=e,[i,a]=(0,V.useState)(!1),o=(0,V.useMemo)(()=>({contain:i,setContain:a}),[i,a]),{getContainer:s}=QP();if(!e.portalContainer&&s&&(n=s()),!n)return null;let c=e.children;return e.disableFocusManagement||(c=V.createElement(bP,{restoreFocus:!0,contain:(e.shouldContainFocus||i)&&!r},c)),c=V.createElement(VF.Provider,{value:o},V.createElement(dme,null,c)),ak.createPortal(c,n)}function Pme(){let e=(0,V.useContext)(VF)?.setContain;rj(()=>{e?.(!0)},[e])}function UF(e){let{id:t,label:n,"aria-labelledby":r,"aria-label":i,labelElementType:a=`label`}=e;t=uj(t);let o=uj(),s={};n&&(r=r?`${o} ${r}`:o,s={id:o,htmlFor:a===`label`?t:void 0});let c=Uj({id:t,"aria-label":i,"aria-labelledby":r});return{labelProps:s,fieldProps:c}}function WF(e){let{description:t,errorMessage:n,isInvalid:r,validationState:i}=e,{labelProps:a,fieldProps:o}=UF(e),s=dj([!!t,!!n,r,i]),c=dj([!!t,!!n,r,i]);return o=bj(o,{"aria-describedby":[s,c,e[`aria-describedby`]].filter(Boolean).join(` `)||void 0}),{labelProps:a,fieldProps:o,descriptionProps:{id:s},errorMessageProps:{id:c}}}function GF(e){return Kfe()?e.altKey:e.ctrlKey}function KF(e,t){let n=`[data-key="${CSS.escape(String(t))}"]`,r=e.current?.dataset.collection;return r&&(n=`[data-collection="${CSS.escape(r)}"]${n}`),e.current?.querySelector(n)}var qF=new WeakMap;function Fme(e){let t=uj();return qF.set(e,t),t}function Ime(e){return qF.get(e)}var Lme=1e3;function Rme(e){let{keyboardDelegate:t,selectionManager:n,onTypeSelect:r}=e,i=(0,V.useRef)({search:``,timeout:void 0}).current;return{typeSelectProps:{onKeyDownCapture:t.getKeyForSearch?e=>{let a=zme(e.key);if(!(!a||e.ctrlKey||e.metaKey||!e.currentTarget.contains(e.target)||i.search.length===0&&a===` `)){if(a===` `&&i.search.trim().length>0&&(e.preventDefault(),`continuePropagation`in e||e.stopPropagation()),i.search+=a,t.getKeyForSearch!=null){let e=t.getKeyForSearch(i.search,n.focusedKey);e??=t.getKeyForSearch(i.search),e!=null&&(n.setFocusedKey(e),r&&r(e))}clearTimeout(i.timeout),i.timeout=setTimeout(()=>{i.search=``},Lme)}}:void 0}}}function zme(e){return e.length===1||!/^[A-Z]/i.test(e)?e:``}function Bme(e){let{selectionManager:t,keyboardDelegate:n,ref:r,autoFocus:i=!1,shouldFocusWrap:a=!1,disallowEmptySelection:o=!1,disallowSelectAll:s=!1,escapeKeyBehavior:c=`clearSelection`,selectOnFocus:l=t.selectionBehavior===`replace`,disallowTypeAhead:u=!1,shouldUseVirtualFocus:d,allowsTabNavigation:f=!1,isVirtualized:p,scrollRef:m=r,linkBehavior:h=`action`}=e,{direction:g}=XM(),_=Ij(),v=e=>{if(e.altKey&&e.key===`Tab`&&e.preventDefault(),!r.current?.contains(e.target))return;let i=(n,i)=>{if(n!=null){if(t.isLink(n)&&h===`selection`&&l&&!GF(e)){(0,ak.flushSync)(()=>{t.setFocusedKey(n,i)});let a=KF(r,n),o=t.getItemProps(n);a&&_.open(a,e,o.href,o.routerOptions);return}if(t.setFocusedKey(n,i),t.isLink(n)&&h===`override`)return;e.shiftKey&&t.selectionMode===`multiple`?t.extendSelection(n):l&&!GF(e)&&t.replaceSelection(n)}};switch(e.key){case`ArrowDown`:if(n.getKeyBelow){let r=t.focusedKey==null?n.getFirstKey?.call(n):n.getKeyBelow?.call(n,t.focu
15sedKey);r==null&&a&&(r=n.getFirstKey?.call(n,t.focusedKey)),r!=null&&(e.preventDefault(),i(r))}break;case`ArrowUp`:if(n.getKeyAbove){let r=t.focusedKey==null?n.getLastKey?.call(n):n.getKeyAbove?.call(n,t.focusedKey);r==null&&a&&(r=n.getLastKey?.call(n,t.focusedKey)),r!=null&&(e.preventDefault(),i(r))}break;case`ArrowLeft`:if(n.getKeyLeftOf){let r=t.focusedKey==null?null:n.getKeyLeftOf?.call(n,t.focusedKey);r==null&&a&&(r=g===`rtl`?n.getFirstKey?.call(n,t.focusedKey):n.getLastKey?.call(n,t.focusedKey)),r!=null&&(e.preventDefault(),i(r,g===`rtl`?`first`:`last`))}break;case`ArrowRight`:if(n.getKeyRightOf){let r=t.focusedKey==null?null:n.getKeyRightOf?.call(n,t.focusedKey);r==null&&a&&(r=g===`rtl`?n.getLastKey?.call(n,t.focusedKey):n.getFirstKey?.call(n,t.focusedKey)),r!=null&&(e.preventDefault(),i(r,g===`rtl`?`last`:`first`))}break;case`Home`:if(n.getFirstKey){if(t.focusedKey===null&&e.shiftKey)return;e.preventDefault();let r=n.getFirstKey(t.focusedKey,Qj(e));t.setFocusedKey(r),r!=null&&(Qj(e)&&e.shiftKey&&t.selectionMode===`multiple`?t.extendSelection(r):l&&t.replaceSelection(r))}break;case`End`:if(n.getLastKey){if(t.focusedKey===null&&e.shiftKey)return;e.preventDefault();let r=n.getLastKey(t.focusedKey,Qj(e));t.setFocusedKey(r),r!=null&&(Qj(e)&&e.shiftKey&&t.selectionMode===`multiple`?t.extendSelection(r):l&&t.replaceSelection(r))}break;case`PageDown`:if(n.getKeyPageBelow&&t.focusedKey!=null){let r=n.getKeyPageBelow(t.focusedKey);r!=null&&(e.preventDefault(),i(r))}break;case`PageUp`:if(n.getKeyPageAbove&&t.focusedKey!=null){let r=n.getKeyPageAbove(t.focusedKey);r!=null&&(e.preventDefault(),i(r))}break;case`a`:Qj(e)&&t.selectionMode===`multiple`&&s!==!0&&(e.preventDefault(),t.selectAll());break;case`Escape`:c===`clearSelection`&&!o&&t.selectedKeys.size!==0&&(e.stopPropagation(),e.preventDefault(),t.clearSelection());break;case`Tab`:if(!f){if(e.shiftKey)r.current.focus();else{let e=MP(r.current,{tabbable:!0}),t,n;do n=e.lastChild(),n&&(t=n);while(n);t&&(!t.contains(document.activeElement)||document.activeElement&&!gM(document.activeElement))&&Tj(t)}break}}},y=(0,V.useRef)({top:0,left:0});nM(m,`scroll`,p?void 0:()=>{y.current={top:m.current?.scrollTop??0,left:m.current?.scrollLeft??0}});let b=e=>{if(t.isFocused){e.currentTarget.contains(e.target)||t.setFocused(!1);return}if(e.currentTarget.contains(e.target)){if(t.setFocused(!0),t.focusedKey==null){let r=e=>{e!=null&&(t.setFocusedKey(e),l&&!t.isSelected(e)&&t.replaceSelection(e))},i=e.relatedTarget;i&&e.currentTarget.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_FOLLOWING?r(t.lastSelectedKey??n.getLastKey?.call(n)):r(t.firstSelectedKey??n.getFirstKey?.call(n))}else!p&&m.current&&(m.current.scrollTop=y.current.top,m.current.scrollLeft=y.current.left);if(t.focusedKey!=null&&m.current){let e=KF(r,t.focusedKey);e instanceof HTMLElement&&(!e.contains(document.activeElement)&&!d&&Tj(e),rP()===`keyboard`&&aM(e,{containingElement:r.current}))}}},x=e=>{e.currentTarget.contains(e.relatedTarget)||t.setFocused(!1)},S=(0,V.useRef)(!1);nM(r,ape,d?e=>{let{detail:n}=e;
vendor: 11,230 bytes, line 15
15e.stopPropagation(),t.setFocused(!0),n?.focusStrategy===`first`&&(S.current=!0)}:void 0),qj(()=>{if(S.current){let e=n.getFirstKey?.call(n)??null;if(e==null){let e=_j();RP(r.current),zP(e,null),t.collection.size>0&&(S.current=!1)}else t.setFocusedKey(e),S.current=!1}},[t.collection]),qj(()=>{t.collection.size>0&&(S.current=!1)},[t.focusedKey]),nM(r,ipe,d?e=>{e.stopPropagation(),t.setFocused(!1),e.detail?.clearFocusKey&&t.setFocusedKey(null)}:void 0);let C=(0,V.useRef)(i),w=(0,V.useRef)(!1);(0,V.useEffect)(()=>{if(C.current){let e=null;i===`first`&&(e=n.getFirstKey?.call(n)??null),i===`last`&&(e=n.getLastKey?.call(n)??null);let a=t.selectedKeys;if(a.size){for(let n of a)if(t.canSelectItem(n)){e=n;break}}t.setFocused(!0),t.setFocusedKey(e),e==null&&!d&&r.current&&oP(r.current),t.collection.size>0&&(C.current=!1,w.current=!0)}});let T=(0,V.useRef)(t.focusedKey),E=(0,V.useRef)(null);(0,V.useEffect)(()=>{if(t.isFocused&&t.focusedKey!=null&&(t.focusedKey!==T.current||w.current)&&m.current&&r.current){let e=rP(),n=KF(r,t.focusedKey);if(!(n instanceof HTMLElement))return;(e===`keyboard`||w.current)&&(E.current&&cancelAnimationFrame(E.current),E.current=requestAnimationFrame(()=>{m.current&&(rM(m.current,n),e!==`virtual`&&aM(n,{containingElement:r.current}))}))}!d&&t.isFocused&&t.focusedKey==null&&T.current!=null&&r.current&&oP(r.current),T.current=t.focusedKey,w.current=!1}),(0,V.useEffect)(()=>()=>{E.current&&cancelAnimationFrame(E.current)},[]),nM(r,`react-aria-focus-scope-restore`,e=>{e.preventDefault(),t.setFocused(!0)});let D={onKeyDown:v,onFocus:b,onBlur:x,onMouseDown(e){m.current===e.target&&e.preventDefault()}},{typeSelectProps:O}=Rme({keyboardDelegate:n,selectionManager:t});u||(D=bj(O,D));let k;d||(k=t.focusedKey==null?0:-1);let A=Fme(t.collection);return{collectionProps:bj(D,{tabIndex:k,"data-collection":A})}}function Vme(e){let{id:t,selectionManager:n,key:r,ref:i,shouldSelectOnPressUp:a,shouldUseVirtualFocus:o,focus:s,isDisabled:c,onAction:l,allowsDifferentPressOrigin:u,linkBehavior:d=`action`}=e,f=Ij();t=uj(t);let p=e=>{if(e.pointerType===`keyboard`&&GF(e))n.toggleSelection(r);else{if(n.selectionMode===`none`)return;if(n.isLink(r)){if(d===`selection`&&i.current){let t=n.getItemProps(r);f.open(i.current,e,t.href,t.routerOptions),n.setSelectedKeys(n.selectedKeys);return}if(d===`override`||d===`none`)return}n.selectionMode===`single`?n.isSelected(r)&&!n.disallowEmptySelection?n.toggleSelection(r):n.replaceSelection(r):e&&e.shiftKey?n.extendSelection(r):n.selectionBehavior===`toggle`||e&&(Qj(e)||e.pointerType===`touch`||e.pointerType===`virtual`)?n.toggleSelection(r):n.replaceSelection(r)}};(0,V.useEffect)(()=>{r===n.focusedKey&&n.isFocused&&(o?RP(i.current):s?s():document.activeElement!==i.current&&i.current&&oP(i.current))},[i,r,n.focusedKey,n.childFocusStrategy,n.isFocused,o]),c||=n.isDisabled(r);let m={};!o&&!c?m={tabIndex:r===n.focusedKey?0:-1,onFocus(e){e.target===i.current&&n.setFocusedKey(r)}}:c&&(m.onMouseDown=e=>{e.preventDefault()});let h=n.isLink(r)&&d===`override`,g=l&&e.UNSTABLE_itemBehavior===`action`,_=n.isLink(r)&&d!==`selection`&&d!==`none`,v=!c&&n.canSelectItem(r)&&!h&&!g,y=(l||_)&&!c,b=y&&(n.selectionBehavior===`replace`?!v:!v||n.isEmpty),x=y&&v&&n.selectionBehavior===`replace`,S=b||x,C=(0,V.useRef)(null),w=S&&v,T=(0,V.useRef)(!1),E=(0,V.useRef)(!1),D=n.getItemProps(r),O=e=>{if(l){var t;l(),(t=i.current)==null||t.dispatchEvent(new CustomEvent(`react-aria-item-action`,{bubbles:!0}))}_&&i.current&&f.open(i.current,e,D.href,D.routerOptions)},k={ref:i};if(a?(k.onPressStart=e=>{C.current=e.pointerType,T.current=w,e.pointerType===`keyboard`&&(!S||YF())&&p(e)},u?(k.onPressUp=b?void 0:e=>{e.pointerType===`mouse`&&v&&p(e)},k.onPress=b?O:e=>{e.pointerType!==`keyboard`&&e.pointerType!==`mouse`&&v&&p(e)}):k.onPress=e=>{if(b||x&&e.pointerType!==`mouse`){if(e.pointerType===`keyboard`&&!JF())return;O(e)}else e.pointerType!==`keyboard`&&v&&p(e)}):(k.onPressStart=e=>{C.current=e.pointerType,T.current=w,E.current=b,v&&(e.pointerType===`mouse`&&!b||e.pointerType===`keyboard`&&(!y||YF()))&&p(e)},k.onPress=e=>{(e.pointerType===`touch`||e.pointerType===`pen`||e.pointerType===`virtual`||e.pointerType===`keyboard`&&S&&JF()||e.pointerType===`mouse`&&E.current)&&(S?O(e):v&&p(e))}),m[`data-collection`]=Ime(n.collection),m[`data-key`]=r,k.preventFocusOnPress=o,o&&(k=bj(k,{onPressStart(e){e.pointerType!==`touch`&&(n.setFocused(!0),n.setFocusedKey(r))},onPress(e){e.pointerType===`touch`&&(n.setFocused(!0),n.setFocusedKey(r))}})),D)for(let e of[`onPressStart`,`onPressEnd`,`onPressChange`,`onPress`,`onPressUp`,`onClick`])D[e]&&(k[e]=fj(k[e],D[e]));let{pressProps:A,isPressed:j}=LN(k),M=x?e=>{C.current===`mouse`&&(e.stopPropagation(),e.preventDefault(),O(e))}:void 0,{longPressProps:ee}=gme({isDisabled:!w,onLongPress(e){e.pointerType===`touch`&&(p(e),n.setSelectionBehavior(`toggle`))}}),te=e=>{C.current===`touch`&&T.current&&e.preventDefault()},ne=d!==`none`&&n.isLink(r)?e=>{Lj.isOpening||e.preventDefault()}:void 0;return{itemProps:bj(m,v||b||o&&!c?A:{},w?ee:{},{onDoubleClick:M,onDragStartCapture:te,onClick:ne,id:t},o?{onMouseDown:e=>e.preventDefault()}:void 0),isPressed:j,isSelected:n.isSelected(r),isFocused:n.isFocused&&n.focusedKey===r,isDisabled:c,allowsSelection:v,hasAction:S}}function JF(){return window.event?.key===`Enter`}function YF(){let e=window.event;return e?.key===` `||e?.code===`Space`}var XF=class{getItemRect(e){let t=this.ref.current;if(!t)return null;let n=e==null?null:KF(this.ref,e);if(!n)return null;let r=t.getBoundingClientRect(),i=n.getBoundingClientRect();return{x:i.left-r.left-t.clientLeft+t.scrollLeft,y:i.top-r.top-t.clientTop+t.scrollTop,width:i.width,height:i.height}}getContentSize(){let e=this.ref.current;return{width:e?.scrollWidth??0,height:e?.scrollHeight??0}}getVisibleRect(){let e=this.ref.current;return{x:e?.scrollLeft??0,y:e?.scrollTop??0,width:e?.clientWidth??0,height:e?.clientHeight??0}}constructor(e){this.ref=e}},ZF=class{isDisabled(e){return this.disabledBehavior===`all`&&(e.props?.isDisabled||this.disabledKeys.has(e.key))}findNextNonDisabled(e,t){let n=e;for(;n!=null;){let e=this.collection.getItem(n);if(e?.type===`item`&&!this.isDisabled(e))return n;n=t(n)}return null}getNextKey(e){let t=e;return t=this.collection.getKeyAfter(t),this.findNextNonDisabled(t,e=>this.collection.getKeyAfter(e))}getPreviousKey(e){let t=e;return t=this.collection.getKeyBefore(t),this.findNextNonDisabled(t,e=>this.collection.getKeyBefore(e))}findKey(e,t,n){let r=e,i=this.layoutDelegate.getItemRect(r);if(!i||r==null)return null;let a=i;do{if(r=t(r),r==null)break;i=this.layoutDelegate.getItemRect(r)}while(i&&n(a,i)&&r!=null);return r}isSameRow(e,t){return e.y===t.y||e.x!==t.x}isSameColumn(e,t){return e.x===t.x||e.y!==t.y}getKeyBelow(e){return this.layout===`grid`&&this.orientation===`vertical`?this.findKey(e,e=>this.getNextKey(e),this.isSameRow):this.getNextKey(e)}getKeyAbove(e){return this.layout===`grid`&&this.orientation===`vertical`?this.findKey(e,e=>this.getPreviousKey(e),this.isSameRow):this.getPreviousKey(e)}getNextColumn(e,t){return t?this.getPreviousKey(e):this.getNextKey(e)}getKeyRightOf(e){let t=this.direction===`ltr`?`getKeyRightOf`:`getKeyLeftOf`;return this.layoutDelegate[t]?(e=this.layoutDelegate[t](e),this.findNextNonDisabled(e,e=>this.layoutDelegate[t](e))):this.layout===`grid`?this.orientation===`vertical`?this.getNextColumn(e,this.direction===`rtl`):this.findKey(e,e=>this.getNextColumn(e,this.direction===`rtl`),this.isSameColumn):this.orientation===`horizontal`?this.getNextColumn(e,this.direction===`rtl`):null}getKeyLeftOf(e){let t=this.direction===`ltr`?`getKeyLeftOf`:`getKeyRightOf`;return this.layoutDelegate[t]?(e=this.layoutDelegate[t](e),this.findNextNonDisabled(e,e=>this.layoutDelegate[t](e))):this.layout===`grid`?this.orientation===`vertical`?this.getNextColumn(e,this.direction===`ltr`):this.findKey(e,e=>this.getNextColumn(e,this.direction===`ltr`),this.isSameColumn):this.orientation===`horizontal`?this.getNextColumn(e,this.direction===`ltr`):null}getFirstKey(){let e=this.collection.getFirstKey();return this.findNextNonDisabled(e,e=>this.collection.getKeyAfter(e))}getLastKey(){let e=this.collection.getLastKey();return this.findNextNonDisabled(e,e=>this.collection.getKeyBefore(e))}getKeyPageAbove(e){let t=this.ref.current,n=this.layoutDelegate.getItemRect(e);if(!n)return null;if(t&&!Xj(t))return this.getFirstKey();let r=e;if(this.orientation===`horizontal`){let e=Math.max(0,n.x+n.width-this.layoutDelegate.getVisibleRect().width);for(;n&&n.x>e&&r!=null;)r=this.getKeyAbove(r),n=r==null?null:this.layoutDelegate.getItemRect(r)}else{let e=Math.max(0,n.y+n.height-this.layoutDelegate.getVisibleRect().height);for(;n&&n.y>e&&r!=null;)r=this.getKeyAbove(r),n=r==null?null:this.layoutDelegate.getItemRect(r)}return r??this.getFirstKey()}getKeyPageBelow(e){let t=this.ref.current,n=this.layoutDelegate.getItemRect(e);if(!n)return null;if(t&&!Xj(t))return this.getLastKey();let r=e;if(this.orientation===`horizontal`){let e=Math.min(this.layoutDelegate.getContentSize().width,n.y-n.width+this.layoutDelegate.getVisibleRect().width);for(;n&&n.x<e&&r!=null;)r=this.getKeyBelow(r),n=r==null?null:this.layoutDelegate.getItemRect(r)}else{let e=Math.min(this.layoutDelegate.getContentSize().height,n.y-n.height+this.layoutDelegate.getVisibleRect().height);for(;n&&n.y<e&&r!=null;)r=this.getKeyBelow(r),n=r==null?null:this.layoutDelegate.getItemRect(r)}return r??this.getLastKey()}getKeyForSearch(e,t){if(!this.collator)return null;let n=this.collection,r=t||this.getFirstKey();for(;r!=null;){let t=n.getItem(r);if(!t)return null;let i=t.textValue.slice(0,e.length);if(t.textValue&&this.collator.compare(i,e)===0)return r;r=this.getNextKey(r)}return null}constructor(...e){if(e.length===1){let t=e[0];this.collection=t.collection,this.ref=t.ref,this.collator=t.collator,this.disabledKeys=t.disabledKeys||new Set,this.disabledBehavior=t.disabledBehavior||`all`,this.orientation=t.orientation||`vertical`,this.direction=t.direction,this.layout=t.layout||`stack`,this.layoutDelegate=t.layoutDelegate||new XF(t.ref)}else this.collection=e[0],this.disabledKeys=e[1],this.ref=e[2],this.collator=e[3],this.layout=`stack`,this.orientation=`vertical`,this.disabledBehavior=`all`,this.layoutDelegate=new XF(this.ref);this.layout===`stack`&&this.orientation===`vertical`&&(this.getKeyLeftOf=void 0,this.getKeyRightOf=void 0)}};function Hme(e){let{selectionManager:t,collection:n,disabledKeys:r,ref:i,keyboardDelegate:a,layoutDelegate:o}=e,s=yN({usage:`search`,sensitivity:`base`}),c=t.disabledBehavior,l=(0,V.useMemo)(()=>a||new ZF({collection:n,disabledKeys:r,disabledBehavior:c,ref:i,collator:s,layoutDelegate:o}),[a,o,n,r,i,s,c]),{collectionProps:u}=Bme({...e,ref:i,selectionManager:t,keyboardDelegate:l});return{listProps:u}}var Ume=class{build(e,t){return this.context=t,QF(()=>this.iterateCollection(e))}*iterateCollection(e){let{children:t,items:n}=e;if(V.isValidElement(t)&&t.type===V.Fragment)yield*this.iterateCollection({children:t.props.children,items:n});else if(typeof t==`function`){if(!n)throw Error(`props.children was a function but props.items is missing`);let e=0;for(let r of n)yield*this.getFullNode({value:r,index:e},{renderer:t}),e++}else{let e=[];
15V.Children.forEach(t,t=>{t&&e.push(t)});let n=0;for(let t of e){let e=this.getFullNode({element:t,index:n},{});for(let t of e)n++,yield t}}}getKey(e,t,n,r){if(e.key!=null)return e.key;if(t.type===`cell`&&t.key!=null)return`${r}${t.key}`;let i=t.value;if(i!=null){let e=i.key??i.id;if(e==null)throw Error(`No key found for item`);return e}return r?`${r}.${t.index}`:`$.${t.index}`}getChildState(e,t){return{renderer:t.renderer||e.renderer}}*getFullNode(e,t,n,r){if(V.isValidElement(e.element)&&e.element.type===V.Fragment){let i=[];V.Children.forEach(e.element.props.children,e=>{i.push(e)});let a=e.index??0;for(let e of i)yield*this.getFullNode({element:e,index:a++},t,n,r);return}let i=e.element;if(!i&&e.value&&t&&t.renderer){let n=this.cache.get(e.value);if(n&&(!n.shouldInvalidate||!n.shouldInvalidate(this.context))){n.index=e.index,n.parentKey=r?r.key:null,yield n;return}i=t.renderer(e.value)}if(V.isValidElement(i)){let a=i.type;if(typeof a!=`function`&&typeof a.getCollectionNode!=`function`){let e=i.type;throw Error(`Unknown element <${e}> in collection.`)}let o=a.getCollectionNode(i.props,this.context),s=e.index??0,c=o.next();for(;!c.done&&c.value;){let a=c.value;e.index=s;let l=a.key??null;l??=a.element?null:this.getKey(i,e,t,n);let u=[...this.getFullNode({...a,key:l,index:s,wrapper:Wme(e.wrapper,a.wrapper)},this.getChildState(t,a),n?`${n}${i.key}`:i.key,r)];for(let t of u){if(t.value=a.value??e.value??null,t.value&&this.cache.set(t.value,t),e.type&&t.type!==e.type)throw Error(`Unsupported type <${$F(t.type)}> in <${$F(r?.type??`unknown parent type`)}>. Only <${$F(e.type)}> is supported.`);s++,yield t}c=o.next(u)}return}if(e.key==null||e.type==null)return;let a=this,o={type:e.type,props:e.props,key:e.key,parentKey:r?r.key:null,value:e.value??null,level:r?r.level+1:0,index:e.index,rendered:e.rendered,textValue:e.textValue??``,"aria-label":e[`aria-label`],wrapper:e.wrapper,shouldInvalidate:e.shouldInvalidate,hasChildNodes:e.hasChildNodes||!1,childNodes:QF(function*(){if(!e.hasChildNodes||!e.childNodes)return;let n=0;for(let r of e.childNodes()){r.key!=null&&(r.key=`${o.key}${r.key}`);let e=a.getFullNode({...r,index:n},a.getChildState(t,r),o.key,o);for(let t of e)n++,yield t}})};yield o}constructor(){this.cache=new WeakMap}};function QF(e){let t=[],n=null;return{*[Symbol.iterator](){for(let e of t)yield e;n||=e();for(let e of n)t.push(e),yield e}}}function Wme(e,t){if(e&&t)return n=>e(t(n));if(e)return e;if(t)return t}function $F(e){return e[0].toUpperCase()+e.slice(1)}function Gme(e,t,n){let r=(0,V.useMemo)(()=>new Ume,[]),{children:i,items:a,collection:o}=e;return(0,V.useMemo)(()=>o||t(r.build({children:i,items:a},n)),[r,i,a,o,n,t])}function eI(e,t){return typeof t.getChildren==`function`?t.getChildren(e.key):e.childNodes}function Kme(e){return qme(e,0)}function qme(e,t){if(t<0)return;let n=0;for(let r of e){if(n===t)return r;n++}}function tI(e,t,n){if(t.parentKey===n.parentKey)return t.index-n.index;let r=[...nI(e,t),t],i=[...nI(e,n),n],a=r.slice(0,i.length).findIndex((e,t)=>e!==i[t]);return a===-1?r.findIndex(e=>e===n)>=0?1:(i.findIndex(e=>e===t),-1):(t=r[a],n=i[a],t.index-n.index)}function nI(e,t){let n=[],r=t;for(;r?.parentKey!=null;)r=e.getItem(r.parentKey),r&&n.unshift(r);return n}var rI={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},iI={...rI,customError:!0,valid:!1},aI={isInvalid:!1,validationDetails:rI,validationErrors:[]},Jme=(0,V.createContext)({}),oI=`__formValidationState`+Date.now();function sI(e){if(e[oI]){let{realtimeValidation:t,displayValidation:n,updateValidation:r,resetValidation:i,commitValidation:a}=e[oI];return{realtimeValidation:t,displayValidation:n,updateValidation:r,resetValidation:i,commitValidation:a}}return Yme(e)}function Yme(e){let{isInvalid:t,validationState:n,name:r,value:i,builtinValidation:a,validate:o,validationBehavior:s=`aria`}=e;n&&(t||=n===`invalid`);let c=t===void 0?null:{isInvalid:t,validationErrors:[],validationDetails:iI},l=(0,V.useMemo)(()=>!o||i==null?null:lI(Xme(o,i)),[o,i]);
15a?.validationDetails.valid&&(a=void 0);let u=(0,V.useContext)(Jme),d=(0,V.useMemo)(()=>r?Array.isArray(r)?r.flatMap(e=>cI(u[e])):cI(u[r]):[],[u,r]),[f,p]=(0,V.useState)(u),[m,h]=(0,V.useState)(!1);u!==f&&(p(u),h(!1));let g=(0,V.useMemo)(()=>lI(m?[]:d),[m,d]),_=(0,V.useRef)(aI),[v,y]=(0,V.useState)(aI),b=(0,V.useRef)(aI),x=()=>{if(!S)return;C(!1);let e=l||a||_.current;uI(e,b.current)||(b.current=e,y(e))},[S,C]=(0,V.useState)(!1);return(0,V.useEffect)(x),{realtimeValidation:c||g||l||a||aI,displayValidation:s===`native`?c||g||v:c||g||l||a||v,updateValidation(e){s===`aria`&&!uI(v,e)?y(e):_.current=e},resetValidation(){let e=aI;uI(e,b.current)||(b.current=e,y(e)),s===`native`&&C(!1),h(!0)},commitValidation(){s===`native`&&C(!0),h(!0)}}}function cI(e){return e?Array.isArray(e)?e:[e]:[]}function Xme(e,t){if(typeof e==`function`){let n=e(t);if(n&&typeof n!=`boolean`)return cI(n)}return[]}function lI(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:iI}:null}function uI(e,t){return e===t||!!e&&!!t&&e.isInvalid===t.isInvalid&&e.validationErrors.length===t.validationErrors.length&&e.validationErrors.every((e,n)=>e===t.validationErrors[n])&&Object.entries(e.validationDetails).every(([e,n])=>t.validationDetails[e]===n)}function dI(...e){let t=new Set,n=!1,r={...rI};for(let o of e){var i,a;for(let e of o.validationErrors)t.add(e);n||=o.isInvalid;for(let e in r)(i=r)[a=e]||(i[a]=o.validationDetails[e])}return r.valid=!n,{isInvalid:n,validationErrors:[...t],validationDetails:r}}function Zme(e,t,n){let{validationBehavior:r,focus:i}=e;rj(()=>{if(r===`native`&&n?.current&&!n.current.disabled){let e=t.realtimeValidation.isInvalid?t.realtimeValidation.validationErrors.join(` `)||`Invalid value.`:``;n.current.setCustomValidity(e),n.current.hasAttribute(`title`)||(n.current.title=``),t.realtimeValidation.isInvalid||t.updateValidation($me(n.current))}});let a=(0,V.useRef)(!1),o=Gj(()=>{a.current||t.resetValidation()}),s=Gj(e=>{t.displayValidation.isInvalid||t.commitValidation();let r=n?.current?.form;if(!e.defaultPrevented&&n&&r&&ehe(r)===n.current){var a;i?i():(a=n.current)==null||a.focus(),iP(`keyboard`)}e.preventDefault()}),c=Gj(()=>{t.commitValidation()});(0,V.useEffect)(()=>{let e=n?.current;if(!e)return;let t=e.form,r=t?.reset;return t&&(t.reset=()=>{a.current=!window.event||window.event.type===`message`&&window.event.target instanceof MessagePort,r?.call(t),a.current=!1}),e.addEventListener(`invalid`,s),e.addEventListener(`change`,c),t?.addEventListener(`reset`,o),()=>{e.removeEventListener(`invalid`,s),e.removeEventListener(`change`,c),t?.removeEventListener(`reset`,o),t&&(t.reset=r)}},[n,r])}function Qme(e){let t=e.validity;return{badInput:t.badInput,customError:t.customError,patternMismatch:t.patternMismatch,rangeOverflow:t.rangeOverflow,rangeUnderflow:t.rangeUnderflow,stepMismatch:t.stepMismatch,tooLong:t.tooLong,tooShort:t.tooShort,typeMismatch:t.typeMismatch,valueMissing:t.valueMissing,valid:t.valid}}function $me(e){return{isInvalid:!e.validity.valid,validationDetails:Qme(e),validationErrors:e.validationMessage?[e.validationMessage]:[]}}function ehe(e){for(let t=0;t<e.elements.length;t++){let n=e.elements[t];if(!n.validity.valid)return n}return null}var fI=class{get childNodes(){throw Error(`childNodes is not supported`)}clone(){let e=new this.constructor(this.key);return e.value=this.value,e.level=this.level,e.hasChildNodes=this.hasChildNodes,e.rendered=this.rendered,e.textValue=this.textValue,e[`aria-label`]=this[`aria-label`],e.index=this.index,e.parentKey=this.parentKey,e.prevKey=this.prevKey,e.nextKey=this.nextKey,e.firstChildKey=this.firstChildKey,e.lastChildKey=this.lastChildKey,e.props=this.props,e.render=this.render,e.colSpan=this.colSpan,e.colIndex=this.colIndex,e}filter(e,t,n){let r=this.clone();return t.addDescendants(r,e),r}constructor(e){this.value=null,this.level=0,this.hasChildNodes=!1,this.rendered=null,this.textValue=``,this[`aria-label`]=void 0,this.index=0,this.parentKey=null,this.prevKey=null,this.nextKey=null,this.firstChildKey=null,this.lastChildKey=null,this.props={},this.colSpan=null,this.colIndex=null,this.type=this.constructor.type,this.key=e}},pI=class extends fI{filter(e,t,n){let[r,i]=gI(e,t,this.firstChildKey,n),a=this.clone();return a.firstChildKey=r,a.lastChildKey=i,a}},the=class extends fI{};the.type=`header`;var mI=class extends fI{};mI.type=`loader`;var hI=class extends pI{filter(e,t,n){if(n(this.textValue,this)){let n=this.clone();return t.addDescendants(n,e),n}return null}};hI.type=`item`;var nhe=class extends pI{filter(e,t,n){let r=super.filter(e,t,n);
vendor: 8,579 bytes, line 15
15if(r&&r.lastChildKey!==null){let t=e.getItem(r.lastChildKey);if(t&&t.type!==`header`)return r}return null}};nhe.type=`section`;var rhe=class{get size(){return this.itemCount}getKeys(){return this.keyMap.keys()}*[Symbol.iterator](){let e=this.firstKey==null?void 0:this.keyMap.get(this.firstKey);for(;e;)yield e,e=e.nextKey==null?void 0:this.keyMap.get(e.nextKey)}getChildren(e){let t=this.keyMap;return{*[Symbol.iterator](){let n=t.get(e),r=n?.firstChildKey==null?null:t.get(n.firstChildKey);for(;r;)yield r,r=r.nextKey==null?void 0:t.get(r.nextKey)}}}getKeyBefore(e){let t=this.keyMap.get(e);if(!t)return null;if(t.prevKey!=null){for(t=this.keyMap.get(t.prevKey);t&&t.type!==`item`&&t.lastChildKey!=null;)t=this.keyMap.get(t.lastChildKey);return t?.key??null}return t.parentKey}getKeyAfter(e){let t=this.keyMap.get(e);if(!t)return null;if(t.type!==`item`&&t.firstChildKey!=null)return t.firstChildKey;for(;t;){if(t.nextKey!=null)return t.nextKey;if(t.parentKey!=null)t=this.keyMap.get(t.parentKey);else return null}return null}getFirstKey(){return this.firstKey}getLastKey(){let e=this.lastKey==null?null:this.keyMap.get(this.lastKey);for(;e?.lastChildKey!=null;)e=this.keyMap.get(e.lastChildKey);return e?.key??null}getItem(e){return this.keyMap.get(e)??null}at(){throw Error(`Not implemented`)}clone(){let e=this.constructor,t=new e;return t.keyMap=new Map(this.keyMap),t.firstKey=this.firstKey,t.lastKey=this.lastKey,t.itemCount=this.itemCount,t}addNode(e){if(this.frozen)throw Error(`Cannot add a node to a frozen collection`);e.type===`item`&&this.keyMap.get(e.key)==null&&this.itemCount++,this.keyMap.set(e.key,e)}addDescendants(e,t){this.addNode(e);let n=t.getChildren(e.key);for(let e of n)this.addDescendants(e,t)}removeNode(e){if(this.frozen)throw Error(`Cannot remove a node to a frozen collection`);let t=this.keyMap.get(e);t!=null&&t.type===`item`&&this.itemCount--,this.keyMap.delete(e)}commit(e,t,n=!1){if(this.frozen)throw Error(`Cannot commit a frozen collection`);this.firstKey=e,this.lastKey=t,this.frozen=!n}filter(e){let t=new this.constructor,[n,r]=gI(this,t,this.firstKey,e);return t?.commit(n,r),t}constructor(){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.frozen=!1,this.itemCount=0}};function gI(e,t,n,r){if(n==null)return[null,null];let i=null,a=null,o=e.getItem(n);for(;o!=null;){let n=o.filter(e,t,r);n!=null&&(n.nextKey=null,a&&(n.prevKey=a.key,a.nextKey=n.key),i??=n,t.addNode(n),a=n),o=o.nextKey?e.getItem(o.nextKey):null}if(a&&a.type===`separator`){let e=a.prevKey;t.removeNode(a.key),e?(a=t.getItem(e),a.nextKey=null):a=null}return[i?.key??null,a?.key??null]}var _I=class{*[Symbol.iterator](){let e=this.firstChild;for(;e;)yield e,e=e.nextSibling}get firstChild(){return this._firstChild}set firstChild(e){this._firstChild=e,this.ownerDocument.markDirty(this)}get lastChild(){return this._lastChild}set lastChild(e){this._lastChild=e,this.ownerDocument.markDirty(this)}get previousSibling(){return this._previousSibling}set previousSibling(e){this._previousSibling=e,this.ownerDocument.markDirty(this)}get nextSibling(){return this._nextSibling}set nextSibling(e){this._nextSibling=e,this.ownerDocument.markDirty(this)}get parentNode(){return this._parentNode}set parentNode(e){this._parentNode=e,this.ownerDocument.markDirty(this)}get isConnected(){return this.parentNode?.isConnected||!1}invalidateChildIndices(e){(this._minInvalidChildIndex==null||!this._minInvalidChildIndex.isConnected||e.index<this._minInvalidChildIndex.index)&&(this._minInvalidChildIndex=e,this.ownerDocument.markDirty(this))}updateChildIndices(){let e=this._minInvalidChildIndex;for(;e;)e.index=e.previousSibling?e.previousSibling.index+1:0,e=e.nextSibling;this._minInvalidChildIndex=null}appendChild(e){e.parentNode&&e.parentNode.removeChild(e),this.firstChild??=e,this.lastChild?(this.lastChild.nextSibling=e,e.index=this.lastChild.index+1,e.previousSibling=this.lastChild):(e.previousSibling=null,e.index=0),e.parentNode=this,e.nextSibling=null,this.lastChild=e,this.ownerDocument.markDirty(this),this.isConnected&&this.ownerDocument.queueUpdate()}insertBefore(e,t){if(t==null)return this.appendChild(e);e.parentNode&&e.parentNode.removeChild(e),e.nextSibling=t,e.previousSibling=t.previousSibling,e.index=t.index-1,this.firstChild===t?this.firstChild=e:t.previousSibling&&(t.previousSibling.nextSibling=e),t.previousSibling=e,e.parentNode=t.parentNode,this.invalidateChildIndices(e),this.isConnected&&this.ownerDocument.queueUpdate()}removeChild(e){e.parentNode===this&&(this._minInvalidChildIndex===e&&(this._minInvalidChildIndex=null),e.nextSibling&&(this.invalidateChildIndices(e.nextSibling),e.nextSibling.previousSibling=e.previousSibling),e.previousSibling&&(e.previousSibling.nextSibling=e.nextSibling),this.firstChild===e&&(this.firstChild=e.nextSibling),this.lastChild===e&&(this.lastChild=e.previousSibling),e.parentNode=null,e.nextSibling=null,e.previousSibling=null,e.index=0,this.ownerDocument.markDirty(e),this.isConnected&&this.ownerDocument.queueUpdate())}addEventListener(){}removeEventListener(){}get previousVisibleSibling(){let e=this.previousSibling;for(;e&&e.isHidden;)e=e.previousSibling;return e}get nextVisibleSibling(){let e=this.nextSibling;for(;e&&e.isHidden;)e=e.nextSibling;return e}get firstVisibleChild(){let e=this.firstChild;for(;e&&e.isHidden;)e=e.nextSibling;return e}get lastVisibleChild(){let e=this.lastChild;for(;e&&e.isHidden;)e=e.previousSibling;return e}constructor(e){this._firstChild=null,this._lastChild=null,this._previousSibling=null,this._nextSibling=null,this._parentNode=null,this._minInvalidChildIndex=null,this.ownerDocument=e}},vI=class e extends _I{get index(){return this._index}set index(e){this._index=e,this.ownerDocument.markDirty(this)}get level(){return this.parentNode instanceof e?this.parentNode.level+ +(this.node?.type===`item`):0}getMutableNode(){return this.node==null?null:(this.isMutated||=(this.node=this.node.clone(),!0),this.ownerDocument.markDirty(this),this.node)}updateNode(){let t=this.nextVisibleSibling,n=this.getMutableNode();if(n!=null&&(n.index=this.index,n.level=this.level,n.parentKey=this.parentNode instanceof e?this.parentNode.node?.key??null:null,n.prevKey=this.previousVisibleSibling?.node?.key??null,n.nextKey=t?.node?.key??null,n.hasChildNodes=!!this.firstChild,n.firstChildKey=this.firstVisibleChild?.node?.key??null,n.lastChildKey=this.lastVisibleChild?.node?.key??null,(n.colSpan!=null||n.colIndex!=null)&&t)){let e=(n.colIndex??n.index)+(n.colSpan??1);if(t.node!=null&&e!==t.node.colIndex){let n=t.getMutableNode();n.colIndex=e}}}setProps(e,t,n,r,i){let a,{value:o,textValue:s,id:c,...l}=e;if(this.node==null?(a=new n(c??`react-aria-${++this.ownerDocument.nodeId}`),this.node=a):a=this.getMutableNode(),l.ref=t,a.props=l,a.rendered=r,a.render=i,a.value=o,e[`aria-label`]&&(a[`aria-label`]=e[`aria-label`]),a.textValue=s||(typeof l.children==`string`?l.children:``)||e[`aria-label`]||``,c!=null&&c!==a.key)throw Error(`Cannot change the id of an item`);l.colSpan!=null&&(a.colSpan=l.colSpan),this.isConnected&&this.ownerDocument.queueUpdate()}get style(){let e=this;return{get display(){return e.isHidden?`none`:``},set display(t){let n=t===`none`;if(e.isHidden!==n){(e.parentNode?.firstVisibleChild===e||e.parentNode?.lastVisibleChild===e)&&e.ownerDocument.markDirty(e.parentNode);let t=e.previousVisibleSibling,r=e.nextVisibleSibling;t&&e.ownerDocument.markDirty(t),r&&e.ownerDocument.markDirty(r),e.isHidden=n,e.ownerDocument.markDirty(e)}}}}hasAttribute(){}setAttribute(){}setAttributeNS(){}removeAttribute(){}constructor(e,t){super(t),this.nodeType=8,this.isMutated=!0,this._index=0,this.isHidden=!1,this.node=null}},ihe=class extends _I{get isConnected(){return!0}createElement(e){return new vI(e,this)}getMutableCollection(){return this.nextCollection||=this.collection.clone(),this.nextCollection}markDirty(e){this.dirtyNodes.add(e)}addNode(e){if(e.isHidden||e.node==null)return;let t=this.getMutableCollection();if(!t.getItem(e.node.key))for(let t of e)this.addNode(t);t.addNode(e.node)}removeNode(e){for(let t of e)this.removeNode(t);e.node&&this.getMutableCollection().removeNode(e.node.key)}getCollection(){return this.inSubscription?this.collection.clone():(this.queuedRender=!1,this.updateCollection(),this.collection)}updateCollection(){for(let e of this.dirtyNodes)e instanceof vI&&(!e.isConnected||e.isHidden)?this.removeNode(e):e.updateChildIndices();for(let e of this.dirtyNodes)e instanceof vI?(e.isConnected&&!e.isHidden&&(e.updateNode(),this.addNode(e)),e.node&&this.dirtyNodes.delete(e),e.isMutated=!1):this.dirtyNodes.delete(e);
15this.nextCollection&&(this.nextCollection.commit(this.firstVisibleChild?.node?.key??null,this.lastVisibleChild?.node?.key??null,this.isSSR),this.isSSR||(this.collection=this.nextCollection,this.nextCollection=null))}queueUpdate(){if(!(this.dirtyNodes.size===0||this.queuedRender)){this.queuedRender=!0,this.inSubscription=!0;for(let e of this.subscriptions)e();this.inSubscription=!1}}subscribe(e){return this.subscriptions.add(e),()=>this.subscriptions.delete(e)}resetAfterSSR(){this.isSSR&&(this.isSSR=!1,this.firstChild=null,this.lastChild=null,this.nodeId=0)}constructor(e){super(null),this.nodeType=11,this.ownerDocument=this,this.dirtyNodes=new Set,this.isSSR=!1,this.nodeId=0,this.nodesByProps=new WeakMap,this.nextCollection=null,this.subscriptions=new Set,this.queuedRender=!1,this.inSubscription=!1,this.collection=e,this.nextCollection=e}};function yI(e){let{children:t,items:n,idScope:r,addIdAndValue:i,dependencies:a=[]}=e,o=(0,V.useMemo)(()=>new WeakMap,a);return(0,V.useMemo)(()=>{if(n&&typeof t==`function`){let e=[];for(let a of n){let n=o.get(a);if(!n){n=t(a);let e=n.props.id??a.key??a.id;if(e==null)throw Error(`Could not determine key for item`);r!=null&&(e=r+`:`+e),n=(0,V.cloneElement)(n,i?{key:e,id:e,value:a}:{key:e}),o.set(a,n)}e.push(n)}return e}if(typeof t!=`function`)return t},[t,n,o,r,i])}if(typeof HTMLTemplateElement<`u`){let e=Object.getOwnPropertyDescriptor(Node.prototype,`firstChild`).get;Object.defineProperty(HTMLTemplateElement.prototype,"firstChild",{configurable:!0,enumerable:!0,get:function(){return this.dataset.reactAriaHidden?this.content.firstChild:e.call(this)}})}var bI=(0,V.createContext)(!1);function ahe(e){if((0,V.useContext)(bI))return V.createElement(V.Fragment,null,e.children);let t=V.createElement(bI.Provider,{value:!0},e.children);return V.createElement(`template`,{"data-react-aria-hidden":!0},t)}function xI(e){let t=(t,n)=>(0,V.useContext)(bI)?null:e(t,n);return t.displayName=e.displayName||e.name,(0,V.forwardRef)(t)}function ohe(){return(0,V.useContext)(bI)}var she=i((e=>{var t=Pe();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var d=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?d:t.useSyncExternalStore})),che=i(((e,t)=>{t.exports=she()}))(),SI=(0,V.createContext)(!1),CI=(0,V.createContext)(null);function lhe(e){if((0,V.useContext)(CI))return e.content;let{collection:t,document:n}=phe(e.createCollection);return V.createElement(V.Fragment,null,V.createElement(ahe,null,V.createElement(CI.Provider,{value:n},e.content)),V.createElement(uhe,{render:e.children,collection:t}))}function uhe({collection:e,render:t}){return t(e)}function dhe(e,t,n){let r=sj(),i=(0,V.useRef)(r);i.current=r;let a=(0,V.useCallback)(()=>i.current?n():t(),[t,n]);return(0,che.useSyncExternalStore)(e,a)}var fhe=typeof V.useSyncExternalStore==`function`?V.useSyncExternalStore:dhe;function phe(e){let[t]=(0,V.useState)(()=>new ihe(e?.()||new rhe));return{collection:fhe((0,V.useCallback)(e=>t.subscribe(e),[t]),(0,V.useCallback)(()=>{let e=t.getCollection();return t.isSSR&&t.resetAfterSSR(),e},[t]),(0,V.useCallback)(()=>(t.isSSR=!0,t.getCollection()),[t])),document:t}}var wI=(0,V.createContext)(null);function mhe(e){var t=class extends fI{};return t.type=e,t}function hhe(e,t,n,r,i,a){typeof e==`string`&&(e=mhe(e));let o=(0,V.useCallback)(i=>{i?.setProps(t,n,e,r,a)},[t,n,r,a,e]),s=(0,V.useContext)(wI);if(s){let o=s.ownerDocument.nodesByProps.get(t);return o||(o=s.ownerDocument.createElement(e.type),o.setProps(t,n,e,r,a),s.appendChild(o),s.ownerDocument.updateCollection(),s.ownerDocument.nodesByProps.set(t,o)),i?V.createElement(wI.Provider,{value:o},i):null}return V.createElement(e.type,{ref:o},i)}function TI(e,t){let n=({node:e})=>t(e.props,e.props.ref,e),r=(0,V.forwardRef)((r,i)=>{let a=(0,V.useContext)(lP);if(!(0,V.useContext)(SI)){if(t.length>=3)throw Error(t.name+` cannot be rendered outside a collection.`);return t(r,i)}return hhe(e,r,i,`children`in r?r.children:null,null,e=>V.createElement(lP.Provider,{value:a},V.createElement(n,{node:e})))});return r.displayName=t.name,r}function ghe(e){return yI({...e,addIdAndValue:!0})}var EI=(0,V.createContext)(null);function _he(e){let t=(0,V.useContext)(EI),n=(t?.dependencies||[]).concat(e.depen
15dencies),r=e.idScope??t?.idScope,i=ghe({...e,idScope:r,dependencies:n});return(0,V.useContext)(CI)&&(i=V.createElement(vhe,null,i)),t=(0,V.useMemo)(()=>({dependencies:n,idScope:r}),[r,...n]),V.createElement(EI.Provider,{value:t},i)}function vhe({children:e}){let t=(0,V.useContext)(CI),n=(0,V.useMemo)(()=>V.createElement(CI.Provider,{value:null},V.createElement(SI.Provider,{value:!0},e)),[e]);return sj()?V.createElement(wI.Provider,{value:t},n):(0,ak.createPortal)(n,t)}var DI={CollectionRoot({collection:e,renderDropIndicator:t}){return OI(e,null,t)},CollectionBranch({collection:e,parent:t,renderDropIndicator:n}){return OI(e,t,n)}};function OI(e,t,n){return yI({items:t?e.getChildren(t.key):e,dependencies:[n],children(t){let r=t.render(t);return!n||t.type!==`item`?r:V.createElement(V.Fragment,null,n({type:`item`,key:t.key,dropPosition:`before`}),r,yhe(e,t,n))}})}function yhe(e,t,n){let r=t.key,i=e.getKeyAfter(r),a=i==null?null:e.getItem(i);for(;a!=null&&a.type!==`item`;)i=e.getKeyAfter(a.key),a=i==null?null:e.getItem(i);let o=t.nextKey==null?null:e.getItem(t.nextKey);for(;o!=null&&o.type!==`item`;)o=o.nextKey==null?null:e.getItem(o.nextKey);let s=[];if(o==null){let r=t;for(;r?.type===`item`&&(!a||r.parentKey!==a.parentKey&&a.level<r.level);){let t=n({type:`item`,key:r.key,dropPosition:`after`});(0,V.isValidElement)(t)&&s.push((0,V.cloneElement)(t,{key:`${r.key}-after`})),r=r.parentKey==null?null:e.getItem(r.parentKey)}}return s}var kI=(0,V.createContext)(DI);function bhe(e,t){let{elementType:n=`button`,isDisabled:r,onPress:i,onPressStart:a,onPressEnd:o,onPressUp:s,onPressChange:c,preventFocusOnPress:l,allowFocusWhenDisabled:u,onClick:d,href:f,target:p,rel:m,type:h=`button`}=e,g;g=n===`button`?{type:h,disabled:r,form:e.form,formAction:e.formAction,formEncType:e.formEncType,formMethod:e.formMethod,formNoValidate:e.formNoValidate,formTarget:e.formTarget,name:e.name,value:e.value}:{role:`button`,href:n===`a`&&!r?f:void 0,target:n===`a`?p:void 0,type:n===`input`?h:void 0,disabled:n===`input`?r:void 0,"aria-disabled":!r||n===`input`?void 0:r,rel:n===`a`?m:void 0};let{pressProps:_,isPressed:v}=LN({onPressStart:a,onPressEnd:o,onPressChange:c,onPress:i,onPressUp:s,onClick:d,isDisabled:r,preventFocusOnPress:l,ref:t}),{focusableProps:y}=uP(e,t);u&&(y.tabIndex=r?-1:y.tabIndex);let b=bj(y,_,wj(e,{labelable:!0}));return{isPressed:v,buttonProps:bj(g,b,{"aria-haspopup":e[`aria-haspopup`],"aria-expanded":e[`aria-expanded`],"aria-controls":e[`aria-controls`],"aria-pressed":e[`aria-pressed`],"aria-current":e[`aria-current`],"aria-disabled":e[`aria-disabled`]})}}var AI={};AI={dateRange:e=>`${e.startDate} \u{625}\u{644}\u{649} ${e.endDate}`,dateSelected:e=>`${e.date} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}`,finishRangeSelectionPrompt:`اÙÙØ± ÙØ¥ÙÙØ§Ø¡ عÙ
ÙÙØ© ØªØØ¯Ùد ÙØ·Ø§Ù Ø§ÙØªØ§Ø±ÙØ®`,maximumDate:`آخر ØªØ§Ø±ÙØ® Ù
تاØ`,minimumDate:`Ø£ÙÙ ØªØ§Ø±ÙØ® Ù
تاØ`,next:`Ø§ÙØªØ§ÙÙ`,previous:`Ø§ÙØ³Ø§Ø¨Ù`,selectedDateDescription:e=>`\u{62A}\u{627}\u{631}\u{64A}\u{62E} \u{645}\u{62D}\u{62F}\u{62F}: ${e.date}`,selectedRangeDescription:e=>`\u{627}\u{644}\u{645}\u{62F}\u{649} \u{627}\u{644}\u{632}\u{645}\u{646}\u{64A} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}: ${e.dateRange}`,startRangeSelectionPrompt:`اÙÙØ± ÙØ¨Ø¯Ø¡ عÙ
ÙÙØ© ØªØØ¯Ùد ÙØ·Ø§Ù Ø§ÙØªØ§Ø±ÙØ®`,todayDate:e=>`\u{627}\u{644}\u{64A}\u{648}\u{645}\u{60C} ${e.date}`,todayDateSelected:e=>`\u{627}\u{644}\u{64A}\u{648}\u{645}\u{60C} ${e.date} \u{645}\u{62D}\u{62F}\u{62F}`};var jI={};jI={dateRange:e=>`${e.startDate} \u{434}\u{43E} ${e.endDate}`,dateSelected:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{43E} \u{435} ${e.date}`,finishRangeSelectionPrompt:`ÐаÑиÑнеÑе, за да довÑÑÑиÑе избоÑа на вÑемеви инÑеÑвал`,maximumDate:`ÐоÑледна налиÑна даÑа`,minimumDate:`ÐÑÑва налиÑна даÑа`,next:`ÐапÑед`,previous:`Ðазад`,selectedDateDescription:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D} \u{434}\u{438}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${e.dateRange}`,startRangeSelectionPrompt:`ÐаÑиÑнеÑе, за да пÑиÑÑÑпиÑе кÑм избоÑа на вÑемеви инÑеÑвал`,todayDate:e=>`\u{414}\u{43D}\u{435}\u{441}, ${e.date}`,todayDateSelected:e=>`\u{414}\u{43D}\u{435}\u{441}, ${e.date} \u{441}\u{430} \u{438}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{438}`};var MI={};MI={dateRange:e=>`${e.startDate} a\u{17E} ${e.endDate}`,dateSelected:e=>`Vybr\xe1no ${e.date}`,finishRangeSelectionPrompt:`KliknutÃm dokonÄÃte výbÄr rozsahu dat`,maximumDate:`Poslednà dostupné datum`,minimumDate:`Prvnà dostupné datum`,next:`DalÅ¡Ã`,previous:`PÅedchozÃ`,selectedDateDescription:e=>`Vybran\xe9 datum: ${e.date}`,selectedRangeDescription:e=>`Vybran\xe9 obdob\xed: ${e.dateRange}`,startRangeSelectionPrompt:`KliknutÃm zahájÃte výbÄr rozsahu dat`,todayDate:e=>`Dnes, ${e.date}`,todayDateSelected:e=>`Dnes, vybr\xe1no ${e.date}`};var NI={};NI={dateRange:e=>`${e.startDate} til ${e.endDate}`,dateSelected:e=>`${e.date} valgt`,finishRangeSelectionPrompt:`Klik for at fuldføre valg af datoomrÃ¥de`,maximumDate:`Sidste ledige dato`,minimumDate:`Første ledige dato`,next:`Næste`,previous:`Forrige`,selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt interval: ${e.dateRange}`,startRangeSelectionPrompt:`Klik for at starte valg af datoomrÃ¥de`,todayDate:e=>`I dag, ${e.date}`,todayDateSelected:e=>`I dag, ${e.date} valgt`};var PI={};PI={dateRange:e=>`${e.startDate} bis ${e.endDate}`,dateSelected:e=>`${e.date} ausgew\xe4hlt`,finishRangeSelectionPrompt:`Klicken, um die Auswahl des Datumsbereichs zu beenden`,maximumDate:`Letztes verfügbares Datum`,minimumDate:`Erstes verfügbares Datum`,next:`Weiter`,previous:`Zurück`,selectedDateDescription:e=>`Ausgew\xe4hltes Datum: ${e.date}`,selectedRangeDescription:e=>`Ausgew\xe4hlter Bereich: ${e.dateRange}`,startRangeSelectionPrompt:`Klicken, um die Auswahl des Datumsbereichs zu beginnen`,todayDate:e=>`Heute, ${e.date}`,todayDateSelected:e=>`Heute, ${e.date} ausgew\xe4hlt`};var FI={};FI={dateRange:e=>`${e.startDate} \u{3AD}\u{3C9}\u{3C2} ${e.endDate}`,dateSelected:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3AD}\u{3C7}\u{3B8}\u{3B7}\u{3BA}\u{3B5} ${e.date}`,finishRangeSelectionPrompt:`ÎάνÏε κλικ για να ολοκληÏÏÏεÏε Ïην εÏιλογή εÏÏοÏ
Ï Î·Î¼ÎµÏομηνιÏν`,maximumDate:`ΤελεÏ
Ïαία διαθÎÏιμη ημεÏομηνία`,minimumDate:`Î ÏÏÏη διαθÎÏιμη ημεÏομηνία`,next:`ÎÏÏμενο`,previous:`Î ÏοηγοÏμενο`,selectedDateDescription:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3B7} \u{3B7}\u{3BC}\u{3B5}\u{3C1}\u{3BF}\u{3BC}\u{3B7}\u{3BD}\u{3AF}\u{3B1}: ${e.date}`,selectedRangeDescription:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3BF} \u{3B5}\u{3CD}\u{3C1}\u{3BF}\u{3C2}: ${e.dateRange}`,startRangeSelectionPrompt:`ÎάνÏε κλικ για να ξεκινήÏεÏε Ïην εÏιλογή εÏÏοÏ
Ï Î·Î¼ÎµÏομηνιÏν`,todayDate:e=>`\u{3A3}\u{3AE}\u{3BC}\u{3B5}\u{3C1}\u{3B1}, ${e.date}`,todayDateSelected:e=>`\u{3A3}\u{3AE}\u{3BC}\u{3B5}\u{3C1}\u{3B1}, \u{3B5}\u{3C0}\u{3B9}\u{3BB}\u{3AD}\u{3C7}\u{3C4}\u{3B7}\u{3BA}\u{3B5} ${e.date}`};var II={};II={previous:`Previous`,next:`Next`,selectedDateDescription:e=>`Selected Date: ${e.date}`,selectedRangeDescription:e=>`Selected Range: ${e.dateRange}`,todayDate:e=>`Today, ${e.date}`,todayDateSelected:e=>`Today, ${e.date} selected`,dateSelected:e=>`${e.date} selected`,startRangeSelectionPrompt:`Click to start selecting date range`,finishRangeSelectionPrompt:`Click to finish selecting date range`,minimumDate:`First available date`,maximumDate:`Last available date`,dateRange:e=>`${e.startDate} to ${e.endDate}`};var LI={};LI={dateRange:e=>`${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} seleccionado`,finishRangeSelectionPrompt:`Haga clic para terminar de seleccionar rango de fechas`,maximumDate:`Ãltima fecha disponible`,minimumDate:`Primera fecha disponible`,next:`Siguiente`,previous:`Anterior`,selectedDateDescription:e=>
15`Fecha seleccionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo seleccionado: ${e.dateRange}`,startRangeSelectionPrompt:`Haga clic para comenzar a seleccionar un rango de fechas`,todayDate:e=>`Hoy, ${e.date}`,todayDateSelected:e=>`Hoy, ${e.date} seleccionado`};var RI={};RI={dateRange:e=>`${e.startDate} kuni ${e.endDate}`,dateSelected:e=>`${e.date} valitud`,finishRangeSelectionPrompt:`Klõpsake kuupäevavahemiku valimise lõpetamiseks`,maximumDate:`Viimane saadaolev kuupäev`,minimumDate:`Esimene saadaolev kuupäev`,next:`Järgmine`,previous:`Eelmine`,selectedDateDescription:e=>`Valitud kuup\xe4ev: ${e.date}`,selectedRangeDescription:e=>`Valitud vahemik: ${e.dateRange}`,startRangeSelectionPrompt:`Klõpsake kuupäevavahemiku valimiseks`,todayDate:e=>`T\xe4na, ${e.date}`,todayDateSelected:e=>`T\xe4na, ${e.date} valitud`};var zI={};zI={dateRange:e=>`${e.startDate} \u{2013} ${e.endDate}`,dateSelected:e=>`${e.date} valittu`,finishRangeSelectionPrompt:`Lopeta päivämääräalueen valinta napsauttamalla tätä.`,maximumDate:`Viimeinen varattavissa oleva päivämäärä`,minimumDate:`Ensimmäinen varattavissa oleva päivämäärä`,next:`Seuraava`,previous:`Edellinen`,selectedDateDescription:e=>`Valittu p\xe4iv\xe4m\xe4\xe4r\xe4: ${e.date}`,selectedRangeDescription:e=>`Valittu aikav\xe4li: ${e.dateRange}`,startRangeSelectionPrompt:`Aloita päivämääräalueen valinta napsauttamalla tätä.`,todayDate:e=>`T\xe4n\xe4\xe4n, ${e.date}`,todayDateSelected:e=>`T\xe4n\xe4\xe4n, ${e.date} valittu`};var BI={};BI={dateRange:e=>`${e.startDate} \xe0 ${e.endDate}`,dateSelected:e=>`${e.date} s\xe9lectionn\xe9`,finishRangeSelectionPrompt:`Cliquer pour finir de sélectionner la plage de dates`,maximumDate:`Dernière date disponible`,minimumDate:`Première date disponible`,next:`Suivant`,previous:`Précédent`,selectedDateDescription:e=>`Date s\xe9lectionn\xe9e\xa0: ${e.date}`,selectedRangeDescription:e=>`Plage s\xe9lectionn\xe9e\xa0: ${e.dateRange}`,startRangeSelectionPrompt:`Cliquer pour commencer à sélectionner la plage de dates`,todayDate:e=>`Aujourd'hui, ${e.date}`,todayDateSelected:e=>`Aujourd\u{2019}hui, ${e.date} s\xe9lectionn\xe9`};var VI={};VI={dateRange:e=>`${e.startDate} \u{5E2}\u{5D3} ${e.endDate}`,dateSelected:e=>`${e.date} \u{5E0}\u{5D1}\u{5D7}\u{5E8}`,finishRangeSelectionPrompt:`××¥ ××× ×ס××× ×ת ×××רת ×××× ×ת×ר××××`,maximumDate:`ת×ר×× ×¤× ×× ××ר××`,minimumDate:`ת×ר×× ×¤× ×× ×¨×ש××`,next:`×××`,previous:`××§×××`,selectedDateDescription:e=>`\u{5EA}\u{5D0}\u{5E8}\u{5D9}\u{5DA} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${e.date}`,selectedRangeDescription:e=>`\u{5D8}\u{5D5}\u{5D5}\u{5D7} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${e.dateRange}`,startRangeSelectionPrompt:`×××¥ ××× ××ת××× ××××רת ×××× ×ת×ר××××`,todayDate:e=>`\u{5D4}\u{5D9}\u{5D5}\u{5DD}, ${e.date}`,todayDateSelected:e=>`\u{5D4}\u{5D9}\u{5D5}\u{5DD}, ${e.date} \u{5E0}\u{5D1}\u{5D7}\u{5E8}`};var HI={};HI={dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`${e.date} odabran`,finishRangeSelectionPrompt:`Kliknite da dovrÅ¡ite raspon odabranih datuma`,maximumDate:`Posljednji raspoloživi datum`,minimumDate:`Prvi raspoloživi datum`,next:`SljedeÄi`,previous:`Prethodni`,selectedDateDescription:e=>`Odabrani datum: ${e.date}`,selectedRangeDescription:e=>`Odabrani raspon: ${e.dateRange}`,startRangeSelectionPrompt:`Kliknite da zapoÄnete raspon odabranih datuma`,todayDate:e=>`Danas, ${e.date}`,todayDateSelected:e=>`Danas, odabran ${e.date}`};var UI={};UI={dateRange:e=>`${e.startDate}\u{2013}${e.endDate}`,dateSelected:e=>`${e.date} kiv\xe1lasztva`,finishRangeSelectionPrompt:`Kattintson a dátumtartomány kijelölésének befejezéséhez`,maximumDate:`Utolsó elérhetÅ dátum`,minimumDate:`Az elsÅ elérhetÅ dátum`,next:`KövetkezÅ`,previous:`ElÅzÅ`,selectedDateDescription:e=>`Kijel\xf6lt d\xe1tum: ${e.date}`,selectedRangeDescription:e=>`Kijel\xf6lt tartom\xe1ny: ${e.dateRange}`,startRangeSelectionPrompt:`Kattintson a dátumtartomány kijelölésének indÃtásához`,todayDate:e=>`Ma, ${e.date}`,todayDateSelected:e=>`Ma, ${e.date} kijel\xf6lve`};var WI={};WI={dateRange:e=>`Da ${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} selezionata`,finishRangeSelectionPrompt:`Fai clic per completare la selezione dellâintervallo di date`,maximumDate:`Ultima data disponibile`,minimumDate:`Prima data disponibile`,next:`Successivo`,previous:`Precedente`,selectedDateDescription:e=>`Data selezionata: ${e.date}`,selectedRangeDescription:e=>`Intervallo selezionato: ${e.dateRange}`,startRangeSelectionPrompt:`Fai clic per selezionare lâintervallo di date`,todayDate:e=>`Oggi, ${e.date}`,todayDateSelected:e=>`Oggi, ${e.date} selezionata`};var GI={};GI={dateRange:e=>`${e.startDate} \u{304B}\u{3089} ${e.endDate}`,dateSelected:e=>`${e.date} \u{3092}\u{9078}\u{629E}`,finishRangeSelectionPrompt:`ã¯ãªãã¯ãã¦æ¥ä»ç¯å²ã®é¸æãçµäº`,maximumDate:`æçµå©ç¨å¯è½æ¥`,minimumDate:`æåã®å©ç¨å¯è½æ¥`,next:`次ã¸`,previous:`åã¸`,selectedDateDescription:e=>`\u{9078}\u{629E}\u{3057}\u{305F}\u{65E5}\u{4ED8} : ${e.date}`,selectedRangeDescription:e=>`\u{9078}\u{629E}\u{7BC4}\u{56F2} : ${e.dateRange}`,startRangeSelectionPrompt:`ã¯ãªãã¯ãã¦æ¥ä»ç¯å²ã®é¸æãéå§`,todayDate:e=>`\u{672C}\u{65E5}\u{3001}${e.date}`,todayDateSelected:e=>`\u{672C}\u{65E5}\u{3001}${e.date} \u{3092}\u{9078}\u{629E}`};var KI={};KI={dateRange:e=>`${e.startDate} ~ ${e.endDate}`,dateSelected:e=>`${e.date} \u{C120}\u{D0DD}\u{B428}`,finishRangeSelectionPrompt:`ë ì§ ë²ì ì íì ìë£íë ¤ë©´ í´ë¦íììì¤.`,maximumDate:`ë§ì§ë§ì¼ë¡ ì¬ì© ê°ë¥í ì¼ì`,minimumDate:`ì²ìì¼ë¡ ì¬ì© ê°ë¥í ì¼ì`,next:`ë¤ì`,previous:`ì´ì `,selectedDateDescription:e=>`\u{C120}\u{D0DD} \u{C77C}\u{C790}: ${e.date}`,selectedRangeDescription:e=>`\u{C120}\u{D0DD} \u{BC94}\u{C704}: ${e.dateRange}`,startRangeSelectionPrompt:`ë ì§ ë²ì ì íì ììíë ¤ë©´ í´ë¦íììì¤.`,todayDate:e=>`\u{C624}\u{B298}, ${e.date}`,todayDateSelected:e=>`\u{C624}\u{B298}, ${e.date} \u{C120}\u{D0DD}\u{B428}`};var qI={};qI={dateRange:e=>`Nuo ${e.startDate} iki ${e.endDate}`,dateSelected:e=>`Pasirinkta ${e.date}`,finishRangeSelectionPrompt:`SpustelÄkite, kad baigtumÄte pasirinkti datų intervalÄ
`,maximumDate:`PaskutinÄ galima data`,minimumDate:`Pirmoji galima data`,next:`Paskesnis`,previous:`Ankstesnis`,selectedDateDescription:e=>`Pasirinkta data: ${e.date}`,selectedRangeDescription:e=>`Pasirinktas intervalas: ${e.dateRange}`,startRangeSelectionPrompt:`SpustelÄkite, kad pradÄtumÄte pasirinkti datų intervalÄ
`,todayDate:e=>`\u{160}iandien, ${e.date}`,todayDateSelected:e=>`\u{160}iandien, pasirinkta ${e.date}`};var JI={};JI={dateRange:e=>`No ${e.startDate} l\u{12B}dz ${e.endDate}`,dateSelected:e=>`Atlas\u{12B}ts: ${e.date}`,finishRangeSelectionPrompt:`Noklikšķiniet, lai pabeigtu datumu diapazona atlasi`,maximumDate:`PÄdÄjais pieejamais datums`,minimumDate:`Pirmais pieejamais datums`,next:`TÄlÄk`,previous:`Atpakaļ`,selectedDateDescription:e=>`Atlas\u{12B}tais datums: ${e.date}`,selectedRangeDescription:e=>`Atlas\u{12B}tais diapazons: ${e.dateRange}`,startRangeSelectionPrompt:`Noklikšķiniet, lai sÄktu datumu diapazona atlasi`,todayDate:e=>`\u{160}odien, ${e.date}`,todayDateSelected:e=>`Atlas\u{12B}ta \u{161}odiena, ${e.date}`};var YI={};YI={dateRange:e=>`${e.startDate} til ${e.endDate}`,dateSelected:e=>`${e.date} valgt`,finishRangeSelectionPrompt:`Klikk for Ã¥ fullføre valg av datoomrÃ¥de`,maximumDate:`Siste tilgjengelige dato`,minimumDate:`Første tilgjengelige dato`,next:`Neste`,previous:`Forrige`,selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt omr\xe5de: ${e.dateRange}`,startRangeSelectionPrompt:`Klikk for Ã¥ starte valg av datoomrÃ¥de`,todayDate:e=>`I dag, ${e.date}`,todayDateSelected:e=>`I dag, ${e.date} valgt`};var XI={};XI={dateRange:e=>`${e.startDate} tot ${e.endDate}`,dateSelected:e=>`${e.date} geselecteerd`,finishRangeSelectionPrompt:`Klik om de selectie van het datumbereik te voltooien`,maximumDate:`Laatste beschikbare datum`,minimumDate:`Eerste beschikbare datum`,next:`Volgende`,previous:`Vorige`,selectedDateDescription:e=>`Geselecteerde datum: ${e.date}`,selectedRangeDescription:e=>`Geselecteerd bereik: ${e.dateRange}`,startRangeSelectionPrompt:`Klik om het datumbereik te selecteren`,todayDate:e=>`Vandaag, ${e.date}`,todayDateSelected:e=>`Vandaag, ${e.date} geselecteerd`};var ZI={};ZI={dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`Wybrano ${e.date}`,finishRangeSelectionPrompt:`Kliknij, aby zakoÅczyÄ wybór zakresu dat`,maximumDate:`Ostatnia dostÄpna data`,minimumDate:`Pierwsza dostÄpna data`,next:`Dalej`,previous:`Wstecz`,selectedDateDescription:e=>`Wybrana data: ${e.date}`,selectedRangeDescription:e=>`Wybrany zakres: ${e.dateRange}`,startRangeSelectionPrompt:`Kliknij, aby rozpoczÄ
Ä wybór zakresu dat`,todayDate:e=>`Dzisiaj, ${e.date}`,todayDateSelected:e=>
15`Dzisiaj wybrano ${e.date}`};var QI={};QI={dateRange:e=>`${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} selecionado`,finishRangeSelectionPrompt:`Clique para concluir a seleção do intervalo de datas`,maximumDate:`Ãltima data disponÃvel`,minimumDate:`Primeira data disponÃvel`,next:`Próximo`,previous:`Anterior`,selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.dateRange}`,startRangeSelectionPrompt:`Clique para iniciar a seleção do intervalo de datas`,todayDate:e=>`Hoje, ${e.date}`,todayDateSelected:e=>`Hoje, ${e.date} selecionado`};var $I={};$I={dateRange:e=>`${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} selecionado`,finishRangeSelectionPrompt:`Clique para terminar de selecionar o intervalo de datas`,maximumDate:`Ãltima data disponÃvel`,minimumDate:`Primeira data disponÃvel`,next:`Próximo`,previous:`Anterior`,selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.dateRange}`,startRangeSelectionPrompt:`Clique para começar a selecionar o intervalo de datas`,todayDate:e=>`Hoje, ${e.date}`,todayDateSelected:e=>`Hoje, ${e.date} selecionado`};var eL={};eL={dateRange:e=>`De la ${e.startDate} p\xe2n\u{103} la ${e.endDate}`,dateSelected:e=>`${e.date} selectat\u{103}`,finishRangeSelectionPrompt:`ApÄsaÅ£i pentru a finaliza selecÅ£ia razei pentru datÄ`,maximumDate:`Ultima datÄ disponibilÄ`,minimumDate:`Prima datÄ disponibilÄ`,next:`UrmÄtorul`,previous:`Ãnainte`,selectedDateDescription:e=>`Dat\u{103} selectat\u{103}: ${e.date}`,selectedRangeDescription:e=>`Interval selectat: ${e.dateRange}`,startRangeSelectionPrompt:`ApÄsaÅ£i pentru a începe selecÅ£ia razei pentru datÄ`,todayDate:e=>`Ast\u{103}zi, ${e.date}`,todayDateSelected:e=>`Azi, ${e.date} selectat\u{103}`};var tL={};tL={dateRange:e=>`\u{421} ${e.startDate} \u{43F}\u{43E} ${e.endDate}`,dateSelected:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43E} ${e.date}`,finishRangeSelectionPrompt:`ЩелкниÑе, ÑÑÐ¾Ð±Ñ Ð·Ð°Ð²ÐµÑÑиÑÑ Ð²ÑÐ±Ð¾Ñ Ð´Ð¸Ð°Ð¿Ð°Ð·Ð¾Ð½Ð° даÑ`,maximumDate:`ÐоÑледнÑÑ Ð´Ð¾ÑÑÑÐ¿Ð½Ð°Ñ Ð´Ð°Ñа`,minimumDate:`ÐеÑÐ²Ð°Ñ Ð´Ð¾ÑÑÑÐ¿Ð½Ð°Ñ Ð´Ð°Ñа`,next:`Ðалее`,previous:`Ðазад`,selectedDateDescription:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{430}\u{44F} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{44B}\u{439} \u{434}\u{438}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${e.dateRange}`,startRangeSelectionPrompt:`ЩелкниÑе, ÑÑÐ¾Ð±Ñ Ð½Ð°ÑаÑÑ Ð²ÑÐ±Ð¾Ñ Ð´Ð¸Ð°Ð¿Ð°Ð·Ð¾Ð½Ð° даÑ`,todayDate:e=>`\u{421}\u{435}\u{433}\u{43E}\u{434}\u{43D}\u{44F}, ${e.date}`,todayDateSelected:e=>`\u{421}\u{435}\u{433}\u{43E}\u{434}\u{43D}\u{44F}, \u{432}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43E} ${e.date}`};var nL={};nL={dateRange:e=>`Od ${e.startDate} do ${e.endDate}`,dateSelected:e=>`Vybrat\xfd d\xe1tum ${e.date}`,finishRangeSelectionPrompt:`KliknutÃm dokonÄÃte výber rozsahu dátumov`,maximumDate:`Posledný dostupný dátum`,minimumDate:`Prvý dostupný dátum`,next:`Nasledujúce`,previous:`Predchádzajúce`,selectedDateDescription:e=>`Vybrat\xfd d\xe1tum: ${e.date}`,selectedRangeDescription:e=>`Vybrat\xfd rozsah: ${e.dateRange}`,startRangeSelectionPrompt:`KliknutÃm spustÃte výber rozsahu dátumov`,todayDate:e=>`Dnes ${e.date}`,todayDateSelected:e=>`Vybrat\xfd dne\u{161}n\xfd d\xe1tum ${e.date}`};var rL={};rL={dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`${e.date} izbrano`,finishRangeSelectionPrompt:`Kliknite za dokonÄanje izbire datumskega obsega`,maximumDate:`Zadnji razpoložljivi datum`,minimumDate:`Prvi razpoložljivi datum`,next:`Naprej`,previous:`Nazaj`,selectedDateDescription:e=>`Izbrani datum: ${e.date}`,selectedRangeDescription:e=>`Izbrano obmo\u{10D}je: ${e.dateRange}`,startRangeSelectionPrompt:`Kliknite za zaÄetek izbire datumskega obsega`,todayDate:e=>`Danes, ${e.date}`,todayDateSelected:e=>`Danes, ${e.date} izbrano`};var iL={};iL={dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`${e.date} izabran`,finishRangeSelectionPrompt:`Kliknite da dovrÅ¡ite opseg izabranih datuma`,maximumDate:`Zadnji raspoloživi datum`,minimumDate:`Prvi raspoloživi datum`,next:`SledeÄi`,previous:`Prethodni`,selectedDateDescription:e=>`Izabrani datum: ${e.date}`,selectedRangeDescription:e=>`Izabrani period: ${e.dateRange}`,startRangeSelectionPrompt:`Kliknite da zapoÄnete opseg izabranih datuma`,todayDate:e=>`Danas, ${e.date}`,todayDateSelected:e=>`Danas, izabran ${e.date}`};var aL={};aL={dateRange:e=>`${e.startDate} till ${e.endDate}`,dateSelected:e=>`${e.date} har valts`,finishRangeSelectionPrompt:`Klicka för att avsluta val av datumintervall`,maximumDate:`Sista tillgängliga datum`,minimumDate:`Första tillgängliga datum`,next:`Nästa`,previous:`FöregÃ¥ende`,selectedDateDescription:e=>`Valt datum: ${e.date}`,selectedRangeDescription:e=>`Valt intervall: ${e.dateRange}`,startRangeSelectionPrompt:`Klicka för att välja datumintervall`,todayDate:e=>`Idag, ${e.date}`,todayDateSelected:e=>`Idag, ${e.date} har valts`};var oL={};oL={dateRange:e=>`${e.startDate} - ${e.endDate}`,dateSelected:e=>`${e.date} se\xe7ildi`,finishRangeSelectionPrompt:`Tarih aralıÄı seçimini tamamlamak için tıklayın`,maximumDate:`Son müsait tarih`,minimumDate:`İlk müsait tarih`,next:`Sonraki`,previous:`Ãnceki`,selectedDateDescription:e=>`Se\xe7ilen Tarih: ${e.date}`,selectedRangeDescription:e=>`Se\xe7ilen Aral\u{131}k: ${e.dateRange}`,startRangeSelectionPrompt:`Tarih aralıÄı seçimini baÅlatmak için tıklayın`,todayDate:e=>`Bug\xfcn, ${e.date}`,todayDateSelected:e=>`Bug\xfcn, ${e.date} se\xe7ildi`};var sL={};sL={dateRange:e=>`${e.startDate} \u{2014} ${e.endDate}`,dateSelected:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{43E} ${e.date}`,finishRangeSelectionPrompt:`ÐаÑиÑнÑÑÑ, Ñоб завеÑÑиÑи вибÑÑ Ð´ÑÐ°Ð¿Ð°Ð·Ð¾Ð½Ñ Ð´Ð°Ñ`,maximumDate:`ÐÑÑÐ°Ð½Ð½Ñ Ð´Ð¾ÑÑÑпна даÑа`,minimumDate:`ÐеÑÑа доÑÑÑпна даÑа`,next:`ÐаÑÑÑпний`,previous:`ÐопеÑеднÑй`,selectedDateDescription:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{438}\u{439} \u{434}\u{456}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${e.dateRange}`,startRangeSelectionPrompt:`ÐаÑиÑнÑÑÑ, Ñоб поÑаÑи вибÑÑ Ð´ÑÐ°Ð¿Ð°Ð·Ð¾Ð½Ñ Ð´Ð°Ñ`,todayDate:e=>`\u{421}\u{44C}\u{43E}\u{433}\u{43E}\u{434}\u{43D}\u{456}, ${e.date}`,todayDateSelected:e=>`\u{421}\u{44C}\u{43E}\u{433}\u{43E}\u{434}\u{43D}\u{456}, \u{432}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{43E} ${e.date}`};var cL={};cL={dateRange:e=>`${e.startDate} \u{81F3} ${e.endDate}`,dateSelected:e=>`\u{5DF2}\u{9009}\u{62E9} ${e.date}`,finishRangeSelectionPrompt:`åå»ä»¥å®æéæ©æ¥æèå´`,maximumDate:`æåä¸ä¸ªå¯ç¨æ¥æ`,minimumDate:`第ä¸ä¸ªå¯ç¨æ¥æ`,next:`ä¸ä¸é¡µ`,previous:`ä¸ä¸é¡µ`,selectedDateDescription:e=>`\u{9009}\u{5B9A}\u{7684}\u{65E5}\u{671F}\u{FF1A}${e.date}`,selectedRangeDescription:e=>`\u{9009}\u{5B9A}\u{7684}\u{8303}\u{56F4}\u{FF1A}${e.dateRange}`,startRangeSelectionPrompt:`åå»ä»¥å¼å§éæ©æ¥æèå´`,todayDate:e=>`\u{4ECA}\u{5929}\u{FF0C}\u{5373} ${e.date}`,todayDateSelected:e=>`\u{5DF2}\u{9009}\u{62E9}\u{4ECA}\u{5929}\u{FF0C}\u{5373} ${e.date}`};var lL={};lL={dateRange:e=>`${e.startDate} \u{81F3} ${e.endDate}`,dateSelected:e=>`\u{5DF2}\u{9078}\u{53D6} ${e.date}`,finishRangeSelectionPrompt:`æä¸ä¸ä»¥å®æé¸åæ¥æç¯å`,maximumDate:`æå¾ä¸åå¯ç¨æ¥æ`,minimumDate:`第ä¸åå¯ç¨æ¥æ`,next:`ä¸ä¸é `,previous:`ä¸ä¸é `,selectedDateDescription:e=>`\u{9078}\u{5B9A}\u{7684}\u{65E5}\u{671F}\u{FF1A}${e.date}`,selectedRangeDescription:e=>`\u{9078}\u{5B9A}\u{7684}\u{7BC4}\u{570D}\u{FF1A}${e.dateRange}`,startRangeSelectionPrompt:`æä¸ä¸ä»¥éå§é¸åæ¥æç¯å`,todayDate:e=>`\u{4ECA}\u{5929}\u{FF0C}${e.date}`,todayDateSelected:e=>`\u{5DF2}\u{9078}\u{53D6}\u{4ECA}\u{5929}\u{FF0C}${e.date}`};var uL={};uL={"ar-AE":AI,"bg-BG":jI,"cs-CZ":MI,"da-DK":NI,"de-DE":PI,"el-GR":FI,"en-US":II,"es-ES":LI,"et-EE":RI,"fi-FI":zI,"fr-FR":BI,"he-IL":VI,"hr-HR":HI,"hu-HU":UI,"it-IT":WI,"ja-JP":GI,"ko-KR":KI,"lt-LT":qI,"lv-LV":JI,"nb-NO":YI,"nl-NL":XI,"pl-PL":Z
vendor: 9,721 bytes, line 15
15I,"pt-BR":QI,"pt-PT":$I,"ro-RO":eL,"ru-RU":tL,"sk-SK":nL,"sl-SI":rL,"sr-SP":iL,"sv-SE":aL,"tr-TR":oL,"uk-UA":sL,"zh-CN":cL,"zh-TW":lL};function dL(e){return e&&e.__esModule?e.default:e}var fL=new WeakMap;function pL(e){return e?.calendar.identifier===`gregory`&&e.era===`BC`?`short`:void 0}function xhe(e){let t=iN(dL(uL),`@react-aria/calendar`),n,r;`highlightedRange`in e?{start:n,end:r}=e.highlightedRange||{}:n=r=e.value??void 0;let i=aN({weekday:`long`,month:`long`,year:`numeric`,day:`numeric`,era:pL(n)||pL(r),timeZone:e.timeZone}),a=`anchorDate`in e?e.anchorDate:null;return(0,V.useMemo)(()=>{if(!a&&n&&r){if(aw(n,r)){let r=i.format(n.toDate(e.timeZone));return t.format(`selectedDateDescription`,{date:r})}{let a=hL(i,t,n,r,e.timeZone);return t.format(`selectedRangeDescription`,{dateRange:a})}}return``},[n,r,a,e.timeZone,t,i])}function mL(e,t,n,r){let i=iN(dL(uL),`@react-aria/calendar`),a=pL(e)||pL(t),o=aN({month:`long`,year:`numeric`,era:a,calendar:e.calendar.identifier,timeZone:n}),s=aN({month:`long`,year:`numeric`,day:`numeric`,era:a,calendar:e.calendar.identifier,timeZone:n});return(0,V.useMemo)(()=>{if(aw(e,_w(e))){let a=e,s=t;if(e.calendar.getFormattableMonth&&(a=e.calendar.getFormattableMonth(e)),t.calendar.getFormattableMonth&&(s=t.calendar.getFormattableMonth(t)),aw(t,vw(e)))return o.format(a.toDate(n));if(aw(t,vw(t)))return r?hL(o,i,a,s,n):o.formatRange(a.toDate(n),s.toDate(n))}return r?hL(s,i,e,t,n):s.formatRange(e.toDate(n),t.toDate(n))},[e,t,o,s,i,n,r])}function hL(e,t,n,r,i){let a=e.formatRangeToParts(n.toDate(i),r.toDate(i)),o=-1;for(let e=0;e<a.length;e++){let t=a[e];if(t.source===`shared`&&t.type===`literal`)o=e;else if(t.source===`endRange`)break}let s=``,c=``;for(let e=0;e<a.length;e++)e<o?s+=a[e].value:e>o&&(c+=a[e].value);return t.format(`dateRange`,{startDate:s,endDate:c})}function She(e){return e&&e.__esModule?e.default:e}function gL(e,t){let n=iN(She(uL),`@react-aria/calendar`),r=wj(e),i=mL(t.visibleRange.start,t.visibleRange.end,t.timeZone,!1),a=mL(t.visibleRange.start,t.visibleRange.end,t.timeZone,!0);Kj(()=>{t.isFocused||kM(a)},[a]);let o=xhe(t);Kj(()=>{o&&kM(o,`polite`,4e3)},[o]);let s=dj([!!e.errorMessage,e.isInvalid,e.validationState]);fL.set(t,{ariaLabel:e[`aria-label`],ariaLabelledBy:e[`aria-labelledby`],errorMessageId:s,selectedDateDescription:o});let[c,l]=(0,V.useState)(!1),u=e.isDisabled||t.isNextVisibleRangeInvalid();u&&c&&(l(!1),t.setFocused(!0));let[d,f]=(0,V.useState)(!1),p=e.isDisabled||t.isPreviousVisibleRangeInvalid();return p&&d&&(f(!1),t.setFocused(!0)),{calendarProps:bj(r,Uj({id:e.id,"aria-label":[e[`aria-label`],a].filter(Boolean).join(`, `),"aria-labelledby":e[`aria-labelledby`]}),{role:`application`,"aria-details":e[`aria-details`]||void 0,"aria-describedby":e[`aria-describedby`]||void 0}),nextButtonProps:{onPress:()=>t.focusNextPage(),"aria-label":n.format(`next`),isDisabled:u,onFocusChange:l},prevButtonProps:{onPress:()=>t.focusPreviousPage(),"aria-label":n.format(`previous`),isDisabled:p,onFocusChange:f},errorMessageProps:{id:s},title:i}}function Che(e,t){return gL(e,t)}function whe(e,t,n){let r=gL(e,t),i=(0,V.useRef)(!1),a=(0,V.useRef)(typeof window<`u`?window:null);return nM(a,`pointerdown`,e=>{i.current=e.width===0&&e.height===0}),nM(a,`pointerup`,e=>{if(i.current){i.current=!1;return}if(t.setDragging(!1),!t.anchorDate)return;let r=e.target;n.current&&n.current.contains(document.activeElement)&&(!n.current.contains(r)||!r.closest(`button, [role="button"]`))&&t.selectFocusedDate()}),r.calendarProps.onBlur=e=>{n.current&&(!e.relatedTarget||!n.current.contains(e.relatedTarget))&&t.anchorDate&&t.selectFocusedDate()},nM(n,`touchmove`,e=>{t.isDragging&&e.preventDefault()},{passive:!1,capture:!0}),r}function The(e,t){let{startDate:n=t.visibleRange.start,endDate:r=t.visibleRange.end,firstDayOfWeek:i}=e,{direction:a}=XM(),o=e=>{switch(e.key){case`Enter`:case` `:e.preventDefault(),t.selectFocusedDate();break;case`PageUp`:e.preventDefault(),e.stopPropagation(),t.focusPreviousSection(e.shiftKey);break;case`PageDown`:e.preventDefault(),e.stopPropagation(),t.focusNextSection(e.shiftKey);break;case`End`:e.preventDefault(),e.stopPropagation(),t.focusSectionEnd();break;case`Home`:e.preventDefault(),e.stopPropagation(),t.focusSectionStart();break;case`ArrowLeft`:e.preventDefault(),e.stopPropagation(),a===`rtl`?t.focusNextDay():t.focusPreviousDay();break;case`ArrowUp`:e.preventDefault(),e.stopPropagation(),t.focusPreviousRow();break;case`ArrowRight`:e.preventDefault(),e.stopPropagation(),a===`rtl`?t.focusPreviousDay():t.focusNextDay();break;case`ArrowDown`:e.preventDefault(),e.stopPropagation(),t.focusNextRow();break;case`Escape`:`setAnchorDate`in t&&(e.preventDefault(),t.setAnchorDate(null))}},s=mL(n,r,t.timeZone,!0),{ariaLabel:c,ariaLabelledBy:l}=fL.get(t),u=Uj({"aria-label":[c,s].filter(Boolean).join(`, `),"aria-labelledby":l}),d=aN({weekday:e.weekdayStyle||`narrow`,timeZone:t.timeZone}),{locale:f}=XM(),p=(0,V.useMemo)(()=>{let e=yw(dw(t.timeZone),f,i);return[...Array(7).keys()].map(n=>{let r=e.add({days:n}).toDate(t.timeZone);return d.format(r)})},[f,t.timeZone,d,i]),m=Pce(n,f,i);return{gridProps:bj(u,{role:`grid`,"aria-readonly":t.isReadOnly||void 0,"aria-disabled":t.isDisabled||void 0,"aria-multiselectable":`highlightedRange`in t||void 0,onKeyDown:o,onFocus:()=>t.setFocused(!0),onBlur:()=>t.setFocused(!1)}),headerProps:{"aria-hidden":!0},weekDays:p,weeksInMonth:m}}function Ehe(e){return e&&e.__esModule?e.default:e}function Dhe(e,t,n){let{date:r,isDisabled:i}=e,{errorMessageId:a,selectedDateDescription:o}=fL.get(t),s=iN(Ehe(uL),`@react-aria/calendar`),c=aN({weekday:`long`,day:`numeric`,month:`long`,year:`numeric`,era:pL(r),timeZone:t.timeZone}),l=t.isSelected(r),u=t.isCellFocused(r)&&!e.isOutsideMonth;i||=t.isCellDisabled(r);let d=t.isCellUnavailable(r),f=!i&&!d,p=t.isValueInvalid&&!!(`highlightedRange`in t?!t.anchorDate&&t.highlightedRange&&r.compare(t.highlightedRange.start)>=0&&r.compare(t.highlightedRange.end)<=0:t.value&&aw(t.value,r));p&&(l=!0),r=cM(r,ow);let m=(0,V.useMemo)(()=>r.toDate(t.timeZone),[r,t.timeZone]),h=cw(r,t.timeZone),g=(0,V.useMemo)(()=>{let e=``;return`highlightedRange`in t&&t.value&&!t.anchorDate&&(aw(r,t.value.start)||aw(r,t.value.end))&&(e=o+`, `),e+=c.format(m),h?e=s.format(l?`todayDateSelected`:`todayDate`,{date:e}):l&&(e=s.format(`dateSelected`,{date:e})),t.minValue&&aw(r,t.minValue)?e+=`, `+s.format(`minimumDate`):t.maxValue&&aw(r,t.maxValue)&&(e+=`, `+s.format(`maximumDate`)),e},[c,m,s,l,h,r,t,o]),_=``;`anchorDate`in t&&u&&!t.isReadOnly&&f&&(_=t.anchorDate?s.format(`finishRangeSelectionPrompt`):s.format(`startRangeSelectionPrompt`));let v=tM(_),y=(0,V.useRef)(!1),b=(0,V.useRef)(!1),x=(0,V.useRef)(void 0),{pressProps:S,isPressed:C}=LN({shouldCancelOnPointerExit:`anchorDate`in t&&!!t.anchorDate,preventFocusOnPress:!0,isDisabled:!f||t.isReadOnly,onPressStart(e){if(t.isReadOnly){t.setFocusedDate(r);return}if(`highlightedRange`in t&&!t.anchorDate&&(e.pointerType===`mouse`||e.pointerType===`touch`)){if(t.highlightedRange&&!p){if(aw(r,t.highlightedRange.start)){t.setAnchorDate(t.highlightedRange.end),t.setFocusedDate(r),t.setDragging(!0),b.current=!0;return}if(aw(r,t.highlightedRange.end)){t.setAnchorDate(t.highlightedRange.start),t.setFocusedDate(r),t.setDragging(!0),b.current=!0;return}}let n=()=>{t.setDragging(!0),x.current=void 0,t.selectDate(r),t.setFocusedDate(r),y.current=!0};e.pointerType===`touch`?x.current=setTimeout(n,200):n()}},onPressEnd(){b.current=!1,y.current=!1,clearTimeout(x.current),x.current=void 0},onPress(){!(`anchorDate`in t)&&!t.isReadOnly&&(t.selectDate(r),t.setFocusedDate(r))},onPressUp(e){if(!t.isReadOnly&&(`anchorDate`in t&&x.current&&(t.selectDate(r),t.setFocusedDate(r)),`anchorDate`in t)){if(b.current)t.setAnchorDate(r);else if(t.anchorDate&&!y.current)t.selectDate(r),t.setFocusedDate(r);else if(e.pointerType===`keyboard`&&!t.anchorDate){t.selectDate(r);let e=r.add({days:1});t.isInvalid(e)&&(e=r.subtract({days:1})),t.isInvalid(e)||t.setFocusedDate(e)}else e.pointerType===`virtual`&&(t.selectDate(r),t.setFocusedDate(r))}}}),w;i||(w=aw(r,t.focusedDate)?0:-1),(0,V.useEffect)(()=>{u&&n.current&&(Tj(n.current),rP()!==`pointer`&&document.activeElement===n.current&&aM(n.current,{containingElement:Zj(n.current)}))},[u,n]);let T=aN({day:`numeric`,timeZone:t.timeZone,calendar:r.calendar.identifier}),E=(0,V.useMemo)(()=>T.formatToParts(m).find(e=>e.type===`day`).value,[T,m]);return{cellProps:{role:`gridcell`,"aria-disabled":!f||void 0,"aria-selected":l||void 0,"aria-invalid":p||void 0},buttonProps:bj(S,{onFocus(){i||t.setFocusedDate(r)},tabIndex:w,role:`button`,"aria-disabled":!f||void 0,"aria-label":g,"aria-invalid":p||void 0,"aria-describedby":[p?a:void 0,v[`aria-describedby`]].filter(Boolean).join(` `)||void 0,onPointerEnter(e){`highlightDate`in t&&(e.pointerType!==`touch`||t.isDragging)&&f&&t.highlightDate(r)},onPointerDown(e){`releasePointerCapture`in e.target&&e.target.releasePointerCapture(e.pointerId)},onContextMenu(e){e.preventDefault()}}),isPressed:C,isFocused:u,isSelected:l,isDisabled:i,isUnavailable:d,isOutsideVisibleRange:r.compare(t.visibleRange.start)<0||r.compare(t.visibleRange.end)>0,isInvalid:p,formattedDate:E}}function Ohe(e,t,n){let{isDisabled:r=!1,isReadOnly:i=!1,value:a,name:o,form:s,children:c,"aria-label":l,"aria-labelledby":u,validationState:d=`valid`,isInvalid:f,onPressStart:p,onPressEnd:m,onPressChange:h,onPress:g,onPressUp:_,onClick:v}=e,y=e=>{e.stopPropagation(),t.setSelected(e.target.checked)},{pressProps:b,isPressed:x}=LN({onPressStart:p,onPressEnd:m,onPressChange:h,onPress:g,onPressUp:_,onClick:v,isDisabled:r}),{pressProps:S,isPressed:C}=LN({onPressStart:p,onPressEnd:m,onPressChange:h,onPressUp:_,onClick:v,onPress(e){var r;
15g?.(e),t.toggle(),(r=n.current)==null||r.focus()},isDisabled:r||i}),{focusableProps:w}=uP(e,n),T=bj(b,w),E=wj(e,{labelable:!0});return lM(n,t.defaultSelected,t.setSelected),{labelProps:bj(S,{onClick:e=>e.preventDefault()}),inputProps:bj(E,{"aria-invalid":f||d===`invalid`||void 0,"aria-errormessage":e[`aria-errormessage`],"aria-controls":e[`aria-controls`],"aria-readonly":i||void 0,onChange:y,disabled:r,...a==null?{}:{value:a},name:o,form:s,type:`checkbox`,...T}),isSelected:t.isSelected,isPressed:x||C,isDisabled:r,isReadOnly:i,isInvalid:f||d===`invalid`}}function khe(e={}){let{isReadOnly:t}=e,[n,r]=vM(e.isSelected,e.defaultSelected||!1,e.onChange),[i]=(0,V.useState)(n);function a(e){t||r(e)}function o(){t||r(!n)}return{isSelected:n,defaultSelected:e.defaultSelected??i,setSelected:a,toggle:o}}var _L={};_L={Empty:`ÙØ§Ø±Øº`};var vL={};vL={Empty:`ÐзпÑазни`};var yL={};yL={Empty:`Prázdné`};var bL={};bL={Empty:`Tom`};var xL={};xL={Empty:`Leer`};var SL={};SL={Empty:`Îδειο`};var CL={};CL={Empty:`Empty`};var wL={};wL={Empty:`VacÃo`};var TL={};TL={Empty:`Tühjenda`};var EL={};EL={Empty:`Tyhjä`};var DL={};DL={Empty:`Vide`};var OL={};OL={Empty:`ר××§`};var kL={};kL={Empty:`Prazno`};var AL={};AL={Empty:`Ãres`};var jL={};jL={Empty:`Vuoto`};var ML={};ML={Empty:`空`};var NL={};NL={Empty:`ë¹ì´ ìì`};var PL={};PL={Empty:`TuÅ¡Äias`};var FL={};FL={Empty:`TukÅ¡s`};var IL={};IL={Empty:`Tom`};var LL={};LL={Empty:`Leeg`};var RL={};RL={Empty:`Pusty`};var zL={};zL={Empty:`Vazio`};var BL={};BL={Empty:`Vazio`};var VL={};VL={Empty:`Gol`};var HL={};HL={Empty:`Ðе заполнено`};var UL={};UL={Empty:`Prázdne`};var WL={};WL={Empty:`Prazen`};var GL={};GL={Empty:`Prazno`};var KL={};KL={Empty:`Tomt`};var qL={};qL={Empty:`BoÅ`};var JL={};JL={Empty:`ÐÑÑÑо`};var YL={};YL={Empty:`空`};var XL={};XL={Empty:`空ç½`};var ZL={};ZL={"ar-AE":_L,"bg-BG":vL,"cs-CZ":yL,"da-DK":bL,"de-DE":xL,"el-GR":SL,"en-US":CL,"es-ES":wL,"et-EE":TL,"fi-FI":EL,"fr-FR":DL,"he-IL":OL,"hr-HR":kL,"hu-HU":AL,"it-IT":jL,"ja-JP":ML,"ko-KR":NL,"lt-LT":PL,"lv-LV":FL,"nb-NO":IL,"nl-NL":LL,"pl-PL":RL,"pt-BR":zL,"pt-PT":BL,"ro-RO":VL,"ru-RU":HL,"sk-SK":UL,"sl-SI":WL,"sr-SP":GL,"sv-SE":KL,"tr-TR":qL,"uk-UA":JL,"zh-CN":YL,"zh-TW":XL};function Ahe(e){return e&&e.__esModule?e.default:e}function jhe(e){let t=(0,V.useRef)(void 0),{value:n,textValue:r,minValue:i,maxValue:a,isDisabled:o,isReadOnly:s,isRequired:c,onIncrement:l,onIncrementPage:u,onDecrement:d,onDecrementPage:f,onDecrementToMin:p,onIncrementToMax:m}=e,h=iN(Ahe(ZL),`@react-aria/spinbutton`),g=(0,V.useRef)(!1),_=(0,V.useCallback)(()=>{clearTimeout(t.current),g.current=!1},[]),v=Gj(()=>{_()});(0,V.useEffect)(()=>()=>v(),[]);let y=e=>{if(!(e.ctrlKey||e.metaKey||e.shiftKey||e.altKey||s||e.nativeEvent.isComposing))switch(e.key){case`PageUp`:if(u){e.preventDefault(),u?.();break}case`ArrowUp`:case`Up`:l&&(e.preventDefault(),l?.());break;case`PageDown`:if(f){e.preventDefault(),f?.();break}case`ArrowDown`:case`Down`:d&&(e.preventDefault(),d?.());break;case`Home`:p&&(e.preventDefault(),p?.());break;case`End`:m&&(e.preventDefault(),m?.())}},b=(0,V.useRef)(!1),x=()=>{b.current=!0},S=()=>{b.current=!1},C=r===``?h.format(`Empty`):(r||`${n}`).replace(`-`,`â`);(0,V.useEffect)(()=>{b.current&&(mpe(`assertive`),kM(C,`assertive`))},[C]);let w=(0,V.useCallback)(()=>{_()},[_]),T=Gj(e=>{v(),g.current=!0,l?.(),t.current=window.setTimeout(()=>{(a===void 0||isNaN(a)||n===void 0||isNaN(n)||n<a)&&T(60)},e)}),E=Gj(e=>{v(),g.current=!0,d?.(),t.current=window.setTimeout(()=>{(i===void 0||isNaN(i)||n===void 0||isNaN(n)||n>i)&&E(60)},e)}),D=e=>{e.preventDefault()},{addGlobalListener:O,removeAllGlobalListeners:k}=Hj(),A=(0,V.useRef)(!1),[j,M]=(0,V.useState)(null);(0,V.useEffect)(()=>{j===`touch`?T(60):j&&T(400)},[j]);let[ee,te]=(0,V.useState)(null);return(0,V.useEffect)(()=>{ee===`touch`?E(60):ee&&E(400)},[ee]),{spinButtonProps:{role:`spinbutton`,"aria-valuenow":n!==void 0&&!isNaN(n)?n:void 0,"aria-valuetext":C,"aria-valuemin":i,"aria-valuemax":a,"aria-disabled":o||void 0,"aria-readonly":s||void 0,"aria-required":c||void 0,onKeyDown:y,onFocus:x,onBlur:S},incrementButtonProps:{onPressStart:e=>{e.pointerType===`touch`?(t.current&&_(),O(window,`pointercancel`,w,{capture:!0}),A.current=!1,t.current=window.setTimeout(()=>{M(`touch`)},600)):M(`mouse`),O(window,`contextmenu`,D)},onPressUp:e=>{e.pointerType===`touch`&&(A.current=!0),_(),k(),M(null)},onPressEnd:e=>{e.pointerType===`touch`&&!g.current&&A.current&&l?.(),_(),A.current=!1,M(null)},onFocus:x,onBlur:S},decrementButtonProps:{onPressStart:e=>{e.pointerType===`touch`?(t.current&&_(),O(window,`pointercancel`,w,{capture:!0}),A.current=!1,t.current=window.setTimeout(()=>{te(`touch`)},600)):te(`mouse`)},onPressUp:e=>{e.pointerType===`touch`&&(A.current=!0),_(),k(),te(null)},onPressEnd:e=>{e.pointerType===`touch`&&!g.current&&A.current&&d?.(),_(),A.current=!1,te(null)},onFocus:x,onBlur:S}}}var QL={};QL={calendar:`Ø§ÙØªÙÙÙÙ
`,day:`ÙÙÙ
`,dayPeriod:`ص/Ù
`,endDate:`ØªØ§Ø±ÙØ® Ø§ÙØ§ÙØªÙØ§Ø¡`,era:`Ø§ÙØ¹ØµØ±`,hour:`Ø§ÙØ³Ø§Ø¹Ø§Øª`,minute:`Ø§ÙØ¯ÙائÙ`,month:`Ø§ÙØ´Ùر`,second:`Ø§ÙØ«ÙاÙÙ`,selectedDateDescription:e=>`\u{62A}\u{627}\u{631}\u{64A}\u{62E} \u{645}\u{62D}\u{62F}\u{62F}: ${e.date}`,selectedRangeDescription:e=>`\u{627}\u{644}\u{645}\u{62F}\u{649} \u{627}\u{644}\u{632}\u{645}\u{646}\u{64A} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}: ${e.startDate} \u{625}\u{644}\u{649} ${e.endDate}`,selectedTimeDescription:e=>`\u{627}\u{644}\u{648}\u{642}\u{62A} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}
15: ${e.time}`,startDate:`ØªØ§Ø±ÙØ® Ø§ÙØ¨Ø¯Ø¡`,timeZoneName:`Ø§ÙØªÙÙÙØª`,weekday:`اÙÙÙÙ
`,year:`Ø§ÙØ³ÙØ©`};var $L={};$L={calendar:`ÐалендаÑ`,day:`ден`,dayPeriod:`пÑ.об./Ñл.об.`,endDate:`ÐÑайна даÑа`,era:`еÑа`,hour:`ÑаÑ`,minute:`минÑÑа`,month:`меÑеÑ`,second:`ÑекÑнда`,selectedDateDescription:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D} \u{434}\u{438}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${e.startDate} \u{434}\u{43E} ${e.endDate}`,selectedTimeDescription:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{43E} \u{432}\u{440}\u{435}\u{43C}\u{435}: ${e.time}`,startDate:`ÐаÑална даÑа`,timeZoneName:`ÑаÑова зона`,weekday:`ден Ð¾Ñ ÑедмиÑаÑа`,year:`година`};var eR={};eR={calendar:`KalendáÅ`,day:`den`,dayPeriod:`Äást dne`,endDate:`KoneÄné datum`,era:`letopoÄet`,hour:`hodina`,minute:`minuta`,month:`mÄsÃc`,second:`sekunda`,selectedDateDescription:e=>`Vybran\xe9 datum: ${e.date}`,selectedRangeDescription:e=>`Vybran\xe9 obdob\xed: ${e.startDate} a\u{17E} ${e.endDate}`,selectedTimeDescription:e=>`Vybran\xfd \u{10D}as: ${e.time}`,startDate:`PoÄáteÄnà datum`,timeZoneName:`Äasové pásmo`,weekday:`den v týdnu`,year:`rok`};var tR={};tR={calendar:`Kalender`,day:`dag`,dayPeriod:`AM/PM`,endDate:`Slutdato`,era:`æra`,hour:`time`,minute:`minut`,month:`mÃ¥ned`,second:`sekund`,selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt interval: ${e.startDate} til ${e.endDate}`,selectedTimeDescription:e=>`Valgt tidspunkt: ${e.time}`,startDate:`Startdato`,timeZoneName:`tidszone`,weekday:`ugedag`,year:`Ã¥r`};var nR={};nR={calendar:`Kalender`,day:`Tag`,dayPeriod:`Tageshälfte`,endDate:`Enddatum`,era:`Epoche`,hour:`Stunde`,minute:`Minute`,month:`Monat`,second:`Sekunde`,selectedDateDescription:e=>`Ausgew\xe4hltes Datum: ${e.date}`,selectedRangeDescription:e=>`Ausgew\xe4hlter Bereich: ${e.startDate} bis ${e.endDate}`,selectedTimeDescription:e=>`Ausgew\xe4hlte Zeit: ${e.time}`,startDate:`Startdatum`,timeZoneName:`Zeitzone`,weekday:`Wochentag`,year:`Jahr`};var rR={};rR={calendar:`ÎμεÏολÏγιο`,day:`ημÎÏα`,dayPeriod:`Ï.μ./μ.μ.`,endDate:`ÎμεÏομηνία λήξηÏ`,era:`ÏεÏίοδοÏ`,hour:`ÏÏα`,minute:`λεÏÏÏ`,month:`μήναÏ`,second:`δεÏ
ÏεÏÏλεÏÏο`,selectedDateDescription:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3B7} \u{3B7}\u{3BC}\u{3B5}\u{3C1}\u{3BF}\u{3BC}\u{3B7}\u{3BD}\u{3AF}\u{3B1}: ${e.date}`,selectedRangeDescription:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3BF} \u{3B5}\u{3CD}\u{3C1}\u{3BF}\u{3C2}: ${e.startDate} \u{3AD}\u{3C9}\u{3C2} ${e.endDate}`,selectedTimeDescription:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3B7} \u{3CE}\u{3C1}\u{3B1}: ${e.time}`,startDate:`ÎμεÏομηνία ÎναÏξηÏ`,timeZoneName:`ζÏνη ÏÏαÏ`,weekday:`καθημεÏινή`,year:`ÎÏοÏ`};var iR={};iR={era:`era`,year:`year`,month:`month`,day:`day`,hour:`hour`,minute:`minute`,second:`second`,dayPeriod:`AM/PM`,calendar:`Calendar`,startDate:`Start Date`,endDate:`End Date`,weekday:`day of the week`,timeZoneName:`time zone`,selectedDateDescription:e=>`Selected Date: ${e.date}`,selectedRangeDescription:e=>`Selected Range: ${e.startDate} to ${e.endDate}`,selectedTimeDescription:e=>`Selected Time: ${e.time}`};var aR={};aR={calendar:`Calendario`,day:`dÃa`,dayPeriod:`a.\xA0m./p.\xA0m.`,endDate:`Fecha final`,era:`era`,hour:`hora`,minute:`minuto`,month:`mes`,second:`segundo`,selectedDateDescription:e=>`Fecha seleccionada: ${e.date}`,selectedRangeDescription:e=>`Rango seleccionado: ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Hora seleccionada: ${e.time}`,startDate:`Fecha de inicio`,timeZoneName:`zona horaria`,weekday:`dÃa de la semana`,year:`año`};var oR={};oR={calendar:`Kalender`,day:`päev`,dayPeriod:`enne/pärast lõunat`,endDate:`Lõppkuupäev`,era:`ajastu`,hour:`tund`,minute:`minut`,month:`kuu`,second:`sekund`,selectedDateDescription:e=>`Valitud kuup\xe4ev: ${e.date}`,selectedRangeDescription:e=>`Valitud vahemik: ${e.startDate} kuni ${e.endDate}`,selectedTimeDescription:e=>
15`Valitud aeg: ${e.time}`,startDate:`Alguskuupäev`,timeZoneName:`ajavöönd`,weekday:`nädalapäev`,year:`aasta`};var sR={};sR={calendar:`Kalenteri`,day:`päivä`,dayPeriod:`vuorokaudenaika`,endDate:`Päättymispäivä`,era:`aikakausi`,hour:`tunti`,minute:`minuutti`,month:`kuukausi`,second:`sekunti`,selectedDateDescription:e=>`Valittu p\xe4iv\xe4m\xe4\xe4r\xe4: ${e.date}`,selectedRangeDescription:e=>`Valittu aikav\xe4li: ${e.startDate} \u{2013} ${e.endDate}`,selectedTimeDescription:e=>`Valittu aika: ${e.time}`,startDate:`Alkamispäivä`,timeZoneName:`aikavyöhyke`,weekday:`viikonpäivä`,year:`vuosi`};var cR={};cR={calendar:`Calendrier`,day:`jour`,dayPeriod:`cadran`,endDate:`Date de fin`,era:`ère`,hour:`heure`,minute:`minute`,month:`mois`,second:`seconde`,selectedDateDescription:e=>`Date s\xe9lectionn\xe9e\xa0: ${e.date}`,selectedRangeDescription:e=>`Plage s\xe9lectionn\xe9e\xa0: ${e.startDate} au ${e.endDate}`,selectedTimeDescription:e=>`Heure choisie\xa0: ${e.time}`,startDate:`Date de début`,timeZoneName:`fuseau horaire`,weekday:`jour de la semaine`,year:`année`};var lR={};lR={calendar:`××× ×©× ×`,day:`×××`,dayPeriod:`××¤× ×״צ/×××״צ`,endDate:`ת×ר×× ×¡×××`,era:`תק×פ×`,hour:`שע×`,minute:`××§×`,month:`×××ש`,second:`×©× ×××`,selectedDateDescription:e=>`\u{5EA}\u{5D0}\u{5E8}\u{5D9}\u{5DA} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${e.date}`,selectedRangeDescription:e=>`\u{5D8}\u{5D5}\u{5D5}\u{5D7} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${e.startDate} \u{5E2}\u{5D3} ${e.endDate}`,selectedTimeDescription:e=>`\u{5D6}\u{5DE}\u{5DF} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${e.time}`,startDate:`ת×ר×× ×ת×××`,timeZoneName:`×××ר ×××`,weekday:`××× ×ש×××¢`,year:`×©× ×`};var uR={};uR={calendar:`Kalendar`,day:`dan`,dayPeriod:`AM/PM`,endDate:`Datum zavrÅ¡etka`,era:`era`,hour:`sat`,minute:`minuta`,month:`mjesec`,second:`sekunda`,selectedDateDescription:e=>`Odabrani datum: ${e.date}`,selectedRangeDescription:e=>`Odabrani raspon: ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Odabrano vrijeme: ${e.time}`,startDate:`Datum poÄetka`,timeZoneName:`vremenska zona`,weekday:`dan u tjednu`,year:`godina`};var dR={};dR={calendar:`Naptár`,day:`nap`,dayPeriod:`napszak`,endDate:`BefejezÅ dátum`,era:`éra`,hour:`óra`,minute:`perc`,month:`hónap`,second:`másodperc`,selectedDateDescription:e=>`Kijel\xf6lt d\xe1tum: ${e.date}`,selectedRangeDescription:e=>`Kijel\xf6lt tartom\xe1ny: ${e.startDate}\u{2013}${e.endDate}`,selectedTimeDescription:e=>`Kijel\xf6lt id\u{151}: ${e.time}`,startDate:`KezdÅ dátum`,timeZoneName:`idÅzóna`,weekday:`hét napja`,year:`év`};var fR={};fR={calendar:`Calendario`,day:`giorno`,dayPeriod:`AM/PM`,endDate:`Data finale`,era:`era`,hour:`ora`,minute:`minuto`,month:`mese`,second:`secondo`,selectedDateDescription:e=>`Data selezionata: ${e.date}`,selectedRangeDescription:e=>`Intervallo selezionato: da ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Ora selezionata: ${e.time}`,startDate:`Data iniziale`,timeZoneName:`fuso orario`,weekday:`giorno della settimana`,year:`anno`};var pR={};pR={calendar:`ã«ã¬ã³ãã¼`,day:`æ¥`,dayPeriod:`åå/åå¾`,endDate:`çµäºæ¥`,era:`æä»£`,hour:`æ`,minute:`å`,month:`æ`,second:`ç§`,selectedDateDescription:e=>`\u{9078}\u{629E}\u{3057}\u{305F}\u{65E5}\u{4ED8} : ${e.date}`,selectedRangeDescription:e=>`\u{9078}\u{629E}\u{7BC4}\u{56F2} : ${e.startDate} \u{304B}\u{3089} ${e.endDate}`,selectedTimeDescription:e=>`\u{9078}\u{629E}\u{3057}\u{305F}\u{6642}\u{9593} : ${e.time}`,startDate:`éå§æ¥`,timeZoneName:`ã¿ã¤ã ã¾ã¼ã³`,weekday:`ææ¥`,year:`å¹´`};var mR={};mR={calendar:`ë¬ë ¥`,day:`ì¼`,dayPeriod:`ì¤ì /ì¤í`,endDate:`ì¢
ë£ì¼`,era:`ì°í¸`,hour:`ì`,minute:`ë¶`,month:`ì`,second:`ì´`,selectedDateDescription:e=>`\u{C120}\u{D0DD} \u{C77C}\u{C790}: ${e.date}`,selectedRangeDescription:e=>`\u{C120}\u{D0DD} \u{BC94}\u{C704}: ${e.startDate} ~ ${e.endDate}`,selectedTimeDescription:e=>`\u{C120}\u{D0DD} \u{C2DC}\u{AC04}: ${e.time}`,startDate:`ììì¼`,timeZoneName:`ìê°ë`,weekday:`ìì¼`,year:`ë
`};var hR={};hR={calendar:`Kalendorius`,day:`diena`,dayPeriod:`iki pietų / po pietų`,endDate:`Pabaigos data`,era:`era`,hour:`valanda`,minute:`minutÄ`,month:`mÄnuo`,second:`sekundÄ`,selectedDateDescription:e=>`Pasirinkta data: ${e.date}`,selectedRangeDescription:e=>`Pasirinktas intervalas: nuo ${e.startDate} iki ${e.endDate}`,selectedTimeDescription:e=>`Pasirinktas laikas: ${e.time}`,startDate:`Pradžios data`,timeZoneName:`laiko juosta`,weekday:`savaitÄs diena`,year:`metai`};var gR={};gR={calendar:`KalendÄrs`,day:`diena`,dayPeriod:`priekÅ¡pusdienÄ/pÄcpusdienÄ`,endDate:`Beigu datums`,era:`Ära`,hour:`stundas`,minute:`minÅ«tes`,month:`mÄnesis`,second:`sekundes`,selectedDateDescription:e=>`Atlas\u{12B}tais datums: ${e.date}`,selectedRangeDescription:e=>`Atlas\u{12B}
15tais diapazons: no ${e.startDate} l\u{12B}dz ${e.endDate}`,selectedTimeDescription:e=>`Atlas\u{12B}tais laiks: ${e.time}`,startDate:`SÄkuma datums`,timeZoneName:`laika josla`,weekday:`nedÄļas diena`,year:`gads`};var _R={};_R={calendar:`Kalender`,day:`dag`,dayPeriod:`a.m./p.m.`,endDate:`Sluttdato`,era:`tidsalder`,hour:`time`,minute:`minutt`,month:`mÃ¥ned`,second:`sekund`,selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt omr\xe5de: ${e.startDate} til ${e.endDate}`,selectedTimeDescription:e=>`Valgt tid: ${e.time}`,startDate:`Startdato`,timeZoneName:`tidssone`,weekday:`ukedag`,year:`Ã¥r`};var vR={};vR={calendar:`Kalender`,day:`dag`,dayPeriod:`a.m./p.m.`,endDate:`Einddatum`,era:`tijdperk`,hour:`uur`,minute:`minuut`,month:`maand`,second:`seconde`,selectedDateDescription:e=>`Geselecteerde datum: ${e.date}`,selectedRangeDescription:e=>`Geselecteerd bereik: ${e.startDate} tot ${e.endDate}`,selectedTimeDescription:e=>`Geselecteerde tijd: ${e.time}`,startDate:`Startdatum`,timeZoneName:`tijdzone`,weekday:`dag van de week`,year:`jaar`};var yR={};yR={calendar:`Kalendarz`,day:`dzieÅ`,dayPeriod:`rano / po poÅudniu / wieczorem`,endDate:`Data koÅcowa`,era:`era`,hour:`godzina`,minute:`minuta`,month:`miesiÄ
c`,second:`sekunda`,selectedDateDescription:e=>`Wybrana data: ${e.date}`,selectedRangeDescription:e=>`Wybrany zakres: ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Wybrany czas: ${e.time}`,startDate:`Data poczÄ
tkowa`,timeZoneName:`strefa czasowa`,weekday:`dzieÅ tygodnia`,year:`rok`};var bR={};bR={calendar:`Calendário`,day:`dia`,dayPeriod:`AM/PM`,endDate:`Data final`,era:`era`,hour:`hora`,minute:`minuto`,month:`mês`,second:`segundo`,selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Hora selecionada: ${e.time}`,startDate:`Data inicial`,timeZoneName:`fuso horário`,weekday:`dia da semana`,year:`ano`};var xR={};xR={calendar:`Calendário`,day:`dia`,dayPeriod:`am/pm`,endDate:`Data de Término`,era:`era`,hour:`hora`,minute:`minuto`,month:`mês`,second:`segundo`,selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Hora selecionada: ${e.time}`,startDate:`Data de InÃcio`,timeZoneName:`fuso horário`,weekday:`dia da semana`,year:`ano`};var SR={};SR={calendar:`Calendar`,day:`zi`,dayPeriod:`a.m/p.m.`,endDate:`DatÄ final`,era:`erÄ`,hour:`orÄ`,minute:`minut`,month:`lunÄ`,second:`secundÄ`,selectedDateDescription:e=>`Dat\u{103} selectat\u{103}: ${e.date}`,selectedRangeDescription:e=>`Interval selectat: de la ${e.startDate} p\xe2n\u{103} la ${e.endDate}`,selectedTimeDescription:e=>`Ora selectat\u{103}: ${e.time}`,startDate:`DatÄ Ã®nceput`,timeZoneName:`fus orar`,weekday:`ziua din sÄptÄmânÄ`,year:`an`};var CR={};CR={calendar:`ÐалендаÑÑ`,day:`денÑ`,dayPeriod:`AM/PM`,endDate:`ÐаÑа оконÑаниÑ`,era:`ÑÑа`,hour:`ÑаÑ`,minute:`минÑÑа`,month:`меÑÑÑ`,second:`ÑекÑнда`,selectedDateDescription:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{430}\u{44F} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{44B}\u{439} \u{434}\u{438}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: \u{441} ${e.startDate} \u{43F}\u{43E} ${e.endDate}`,selectedTimeDescription:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{43E}\u{435} \u{432}\u{440}\u{435}\u{43C}\u{44F}: ${e.time}`,startDate:`ÐаÑа наÑала`,timeZoneName:`ÑаÑовой поÑÑ`,weekday:`Ð´ÐµÐ½Ñ Ð½ÐµÐ´ÐµÐ»Ð¸`,year:`год`};var wR={};wR={calendar:`Kalendár`,day:`deÅ`,dayPeriod:`AM/PM`,endDate:`Dátum ukonÄenia`,era:`letopoÄet`,hour:`hodina`,minute:`minúta`,month:`mesiac`,second:`sekunda`,selectedDateDescription:e=>`Vybrat\xfd d\xe1tum: ${e.date}`,selectedRangeDescription:e=>`Vybrat\xfd rozsah: od ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Vybrat\xfd \u{10D}as: ${e.time}`,startDate:`Dátum zaÄatia`,timeZoneName:`Äasové pásmo`,weekday:`deÅ tý
15ždÅa`,year:`rok`};var TR={};TR={calendar:`Koledar`,day:`dan`,dayPeriod:`dop/pop`,endDate:`Datum konca`,era:`doba`,hour:`ura`,minute:`minuta`,month:`mesec`,second:`sekunda`,selectedDateDescription:e=>`Izbrani datum: ${e.date}`,selectedRangeDescription:e=>`Izbrano obmo\u{10D}je: ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Izbrani \u{10D}as: ${e.time}`,startDate:`Datum zaÄetka`,timeZoneName:`Äasovni pas`,weekday:`dan v tednu`,year:`leto`};var ER={};ER={calendar:`Kalendar`,day:`дан`,dayPeriod:`пÑе подне/по подне`,endDate:`Datum zavrÅ¡etka`,era:`еÑа`,hour:`ÑаÑ`,minute:`минÑÑ`,month:`меÑеÑ`,second:`ÑекÑнд`,selectedDateDescription:e=>`Izabrani datum: ${e.date}`,selectedRangeDescription:e=>`Izabrani opseg: od ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Izabrano vreme: ${e.time}`,startDate:`Datum poÄetka`,timeZoneName:`вÑеменÑка зона`,weekday:`дан Ñ Ð½ÐµÐ´ÐµÑи`,year:`година`};var DR={};DR={calendar:`Kalender`,day:`dag`,dayPeriod:`fm/em`,endDate:`Slutdatum`,era:`era`,hour:`timme`,minute:`minut`,month:`mÃ¥nad`,second:`sekund`,selectedDateDescription:e=>`Valt datum: ${e.date}`,selectedRangeDescription:e=>`Valt intervall: ${e.startDate} till ${e.endDate}`,selectedTimeDescription:e=>`Vald tid: ${e.time}`,startDate:`Startdatum`,timeZoneName:`tidszon`,weekday:`veckodag`,year:`Ã¥r`};var OR={};OR={calendar:`Takvim`,day:`gün`,dayPeriod:`ÃÃ/ÃS`,endDate:`BitiÅ Tarihi`,era:`çaÄ`,hour:`saat`,minute:`dakika`,month:`ay`,second:`saniye`,selectedDateDescription:e=>`Se\xe7ilen Tarih: ${e.date}`,selectedRangeDescription:e=>`Se\xe7ilen Aral\u{131}k: ${e.startDate} - ${e.endDate}`,selectedTimeDescription:e=>`Se\xe7ilen Zaman: ${e.time}`,startDate:`BaÅlangıç Tarihi`,timeZoneName:`saat dilimi`,weekday:`haftanın günü`,year:`yıl`};var kR={};kR={calendar:`ÐалендаÑ`,day:`денÑ`,dayPeriod:`дп/пп`,endDate:`ÐаÑа завеÑÑеннÑ`,era:`еÑа`,hour:`година`,minute:`Ñ
вилина`,month:`мÑÑÑÑÑ`,second:`ÑекÑнда`,selectedDateDescription:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{438}\u{439} \u{434}\u{456}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${e.startDate} \u{2014} ${e.endDate}`,selectedTimeDescription:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{438}\u{439} \u{447}\u{430}\u{441}: ${e.time}`,startDate:`ÐаÑа поÑаÑкÑ`,timeZoneName:`ÑаÑовий поÑÑ`,weekday:`Ð´ÐµÐ½Ñ ÑижнÑ`,year:`ÑÑк`};var AR={};AR={calendar:`æ¥å`,day:`æ¥`,dayPeriod:`ä¸å/ä¸å`,endDate:`ç»ææ¥æ`,era:`纪å
`,hour:`å°æ¶`,minute:`åé`,month:`æ`,second:`ç§`,selectedDateDescription:e=>`\u{9009}\u{5B9A}\u{7684}\u{65E5}\u{671F}\u{FF1A}${e.date}`,selectedRangeDescription:e=>`\u{9009}\u{5B9A}\u{7684}\u{8303}\u{56F4}\u{FF1A}${e.startDate} \u{81F3} ${e.endDate}`,selectedTimeDescription:e=>`\u{9009}\u{5B9A}\u{7684}\u{65F6}\u{95F4}\u{FF1A}${e.time}`,startDate:`å¼å§æ¥æ`,timeZoneName:`æ¶åº`,weekday:`工使¥`,year:`å¹´`};var jR={};jR={calendar:`æ¥æ`,day:`æ¥`,dayPeriod:`ä¸å/ä¸å`,endDate:`çµææ¥æ`,era:`纪å
`,hour:`å°æ¶`,minute:`åé`,month:`æ`,second:`ç§`,selectedDateDescription:e=>`\u{9078}\u{5B9A}\u{7684}\u{65E5}\u{671F}\u{FF1A}${e.date}`,selectedRangeDescription:e=>`\u{9078}\u{5B9A}\u{7684}\u{7BC4}\u{570D}\u{FF1A}${e.startDate} \u{81F3} ${e.endDate}`,selectedTimeDescription:e=>`\u{9078}\u{5B9A}\u{7684}\u{6642}\u{9593}\u{FF1A}${e.time}`,startDate:`éå§æ¥æ`,timeZoneName:`æ¶åº`,weekday:`工使¥`,year:`å¹´`};var MR={};MR={"ar-AE":QL,"bg-BG":$L,"cs-CZ":eR,"da-DK":tR,"de-DE":nR,"el-GR":rR,"en-US":iR,"es-ES":aR,"et-EE":oR,"fi-FI":sR,"fr-FR":cR,"he-IL":lR,"hr-HR":uR,"hu-HU":dR,"it-IT":fR,"ja-JP":pR,"ko-KR":mR,"lt-LT":hR,"lv-LV":gR,"nb-NO":_R,"nl-NL":vR,"pl-PL":yR,"pt-BR":bR,"pt-PT":xR,"ro-RO":SR,"ru-RU":CR,"sk-SK":wR,"sl-SI":TR,"sr-SP":ER,"sv-SE":DR,"tr-TR":OR,"uk-UA":kR,"zh-CN":AR,"zh-TW":jR};function NR(e,t,n){let{direction:r}=XM(),i=(0,V.useMemo)(()=>NP(t),[t]),a=a=>
vendor: 8,380 bytes, line 15
15{if(a.currentTarget.contains(a.target)&&(a.altKey&&(a.key===`ArrowDown`||a.key===`ArrowUp`)&&`setOpen`in e&&(a.preventDefault(),a.stopPropagation(),e.setOpen(!0)),!n))switch(a.key){case`ArrowLeft`:if(a.preventDefault(),a.stopPropagation(),r===`rtl`){if(t.current){let e=a.target,n=PR(t.current,e.getBoundingClientRect().left,-1);n&&n.focus()}}else i.focusPrevious();break;case`ArrowRight`:if(a.preventDefault(),a.stopPropagation(),r===`rtl`){if(t.current){let e=a.target,n=PR(t.current,e.getBoundingClientRect().left,1);n&&n.focus()}}else i.focusNext()}},o=()=>{if(!t.current)return;let e=window.event?.target,n=MP(t.current,{tabbable:!0});if(e&&=(n.currentNode=e,n.previousNode()),!e){let t;do t=n.lastChild(),t&&(e=t);while(t)}for(;e?.hasAttribute(`data-placeholder`);){let t=n.previousNode();if(t&&t.hasAttribute(`data-placeholder`))e=t;else break}e&&e.focus()},{pressProps:s}=LN({preventFocusOnPress:!0,allowTextSelectionOnPress:!0,onPressStart(e){e.pointerType===`mouse`&&o()},onPress(e){(e.pointerType===`touch`||e.pointerType===`pen`)&&o()}});return bj(s,{onKeyDown:a})}function PR(e,t,n){let r=MP(e,{tabbable:!0}),i=r.nextNode(),a=null,o=1/0;for(;i;){let e=i.getBoundingClientRect().left-t,s=Math.abs(e);Math.sign(e)===n&&s<o&&(a=i,o=s),i=r.nextNode()}return a}function Mhe(e){return e&&e.__esModule?e.default:e}var FR=new WeakMap,IR=`__role_`+Date.now(),LR=`__focusManager_`+Date.now();function RR(e,t,n){let{isInvalid:r,validationErrors:i,validationDetails:a}=t.displayValidation,{labelProps:o,fieldProps:s,descriptionProps:c,errorMessageProps:l}=WF({...e,labelElementType:`span`,isInvalid:r,errorMessage:e.errorMessage||i}),u=(0,V.useRef)(null),{focusWithinProps:d}=dP({...e,onFocusWithin(n){var r;u.current=t.value,(r=e.onFocus)==null||r.call(e,n)},onBlurWithin:n=>{var r;t.confirmPlaceholder(),t.value!==u.current&&t.commitValidation(),(r=e.onBlur)==null||r.call(e,n)},onFocusWithinChange:e.onFocusChange}),f=iN(Mhe(MR),`@react-aria/datepicker`),p=t.maxGranularity===`hour`?`selectedTimeDescription`:`selectedDateDescription`,m=t.maxGranularity===`hour`?`time`:`date`,h=tM(t.value?f.format(p,{[m]:t.formatValue({month:`long`})}):``),g=e[IR]===`presentation`?s[`aria-describedby`]:[h[`aria-describedby`],s[`aria-describedby`]].filter(Boolean).join(` `)||void 0,_=e[LR],v=(0,V.useMemo)(()=>_||NP(n),[_,n]),y=NR(t,n,e[IR]===`presentation`);FR.set(t,{ariaLabel:e[`aria-label`],ariaLabelledBy:[o.id,e[`aria-labelledby`]].filter(Boolean).join(` `)||void 0,ariaDescribedBy:g,focusManager:v});let b=(0,V.useRef)(e.autoFocus),x;x=e[IR]===`presentation`?{role:`presentation`}:bj(s,{role:`group`,"aria-disabled":e.isDisabled||void 0,"aria-describedby":g}),(0,V.useEffect)(()=>{b.current&&v.focusFirst(),b.current=!1},[v]),lM(e.inputRef,t.defaultValue,t.setValue),Zme({...e,focus(){v.focusFirst()}},t,e.inputRef);let S={type:`hidden`,name:e.name,form:e.form,value:t.value?.toString()||``,disabled:e.isDisabled};e.validationBehavior===`native`&&(S.type=`text`,S.hidden=!0,S.required=e.isRequired,S.onChange=()=>{});let C=wj(e);return{labelProps:{...o,onClick:()=>{v.focusFirst()}},fieldProps:bj(C,x,y,d,{onKeyDown(t){e.onKeyDown&&e.onKeyDown(t)},onKeyUp(t){e.onKeyUp&&e.onKeyUp(t)},style:{unicodeBidi:`isolate`}}),inputProps:S,descriptionProps:c,errorMessageProps:l,isInvalid:r,validationErrors:i,validationDetails:a}}function Nhe(e,t,n){let r=RR(e,t,n);return r.inputProps.value=t.timeValue?.toString()||``,r}function Phe(e){return e&&e.__esModule?e.default:e}function Fhe(e,t,n){let r=uj(),i=uj(),a=uj(),o=iN(Phe(MR),`@react-aria/datepicker`),{isInvalid:s,validationErrors:c,validationDetails:l}=t.displayValidation,{labelProps:u,fieldProps:d,descriptionProps:f,errorMessageProps:p}=WF({...e,labelElementType:`span`,isInvalid:s,errorMessage:e.errorMessage||c}),m=NR(t,n),h=d[`aria-labelledby`]||d.id,{locale:g}=XM(),_=t.formatValue(g,{month:`long`}),v=tM(_?o.format(`selectedDateDescription`,{date:_}):``),y=[v[`aria-describedby`],d[`aria-describedby`]].filter(Boolean).join(` `)||void 0,b=wj(e),x=(0,V.useMemo)(()=>NP(n),[n]),S=(0,V.useRef)(!1),{focusWithinProps:C}=dP({...e,isDisabled:t.isOpen,onBlurWithin:t=>{if(!document.getElementById(i)?.contains(t.relatedTarget)){var n,r;S.current=!1,(n=e.onBlur)==null||n.call(e,t),(r=e.onFocusChange)==null||r.call(e,!1)}},onFocusWithin:t=>{if(!S.current){var n,r;S.current=!0,(n=e.onFocus)==null||n.call(e,t),(r=e.onFocusChange)==null||r.call(e,!0)}}});return{groupProps:bj(b,m,d,v,C,{role:`group`,"aria-disabled":e.isDisabled||null,"aria-labelledby":h,"aria-describedby":y,onKeyDown(n){t.isOpen||e.onKeyDown&&e.onKeyDown(n)},onKeyUp(n){t.isOpen||e.onKeyUp&&e.onKeyUp(n)}}),labelProps:{...u,onClick:()=>{x.focusFirst()}},fieldProps:{...d,id:a,[IR]:`presentation`,"aria-describedby":y,value:t.value,defaultValue:t.defaultValue,onChange:t.setValue,placeholderValue:e.placeholderValue,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,granularity:e.granularity,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isRequired:e.isRequired,validationBehavior:e.validationBehavior,[oI]:t,autoFocus:e.autoFocus,name:e.name,form:e.form},descriptionProps:f,errorMessageProps:p,buttonProps:{...v,id:r,"aria-haspopup":`dialog`,"aria-label":o.format(`calendar`),"aria-labelledby":`${r} ${h}`,"aria-describedby":y,"aria-expanded":t.isOpen,isDisabled:e.isDisabled||e.isReadOnly,onPress:()=>t.setOpen(!0)},dialogProps:{id:i,"aria-labelledby":`${r} ${h}`},calendarProps:{autoFocus:!0,value:t.dateValue,onChange:t.setDateValue,minValue:e.minValue,maxValue:e.maxValue,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isDateUnavailable:e.isDateUnavailable,defaultFocusedValue:t.dateValue?void 0:e.placeholderValue,isInvalid:t.isInvalid,errorMessage:typeof e.errorMessage==`function`?e.errorMessage(t.displayValidation):e.errorMessage||t.displayValidation.validationErrors.join(` `),firstDayOfWeek:e.firstDayOfWeek,pageBehavior:e.pageBehavior},isInvalid:s,validationErrors:c,validationDetails:l}}function Ihe(e){return e&&e.__esModule?e.default:e}function Lhe(){let{locale:e}=XM(),t=rN(Ihe(MR),`@react-aria/datepicker`);return(0,V.useMemo)(()=>{try{return new Intl.DisplayNames(e,{type:`dateTimeField`})}catch{return new Rhe(e,t)}},[e,t])}var Rhe=class{of(e){return this.dictionary.getStringForLocale(e,this.locale)}constructor(e,t){this.locale=e,this.dictionary=t}};function zhe(e,t,n){let r=(0,V.useRef)(``),{locale:i,direction:a}=XM(),o=Lhe(),{ariaLabel:s,ariaLabelledBy:c,ariaDescribedBy:l,focusManager:u}=FR.get(t),d=e.isPlaceholder?``:e.text,f=(0,V.useMemo)(()=>t.dateFormatter.resolvedOptions(),[t.dateFormatter]),p=aN({month:`long`,timeZone:f.timeZone}),m=aN({hour:`numeric`,hour12:f.hour12,timeZone:f.timeZone});if(e.type===`month`&&!e.isPlaceholder){let e=p.format(t.dateValue);d=e===d?e:`${d} \u{2013} ${e}`}else e.type===`hour`&&!e.isPlaceholder&&(d=m.format(t.dateValue));let{spinButtonProps:h}=jhe({value:e.value,textValue:d,minValue:e.minValue,maxValue:e.maxValue,isDisabled:t.isDisabled,isReadOnly:t.isReadOnly||!e.isEditable,isRequired:t.isRequired,onIncrement:()=>{r.current=``,t.increment(e.type)},onDecrement:()=>{r.current=``,t.decrement(e.type)},onIncrementPage:()=>{r.current=``,t.incrementPage(e.type)},onDecrementPage:()=>{r.current=``,t.decrementPage(e.type)},onIncrementToMax:()=>{r.current=``,e.maxValue!==void 0&&t.setSegment(e.type,e.maxValue)},onDecrementToMin:()=>{r.current=``,e.minValue!==void 0&&t.setSegment(e.type,e.minValue)}}),g=(0,V.useMemo)(()=>new dN(i,{maximumFractionDigits:0}),[i]),_=()=>{if(e.text===e.placeholder&&u.focusPrevious(),g.isValidPartialNumber(e.text)&&!t.isReadOnly&&!e.isPlaceholder){let n=e.text.slice(0,-1),i=g.parse(n);n=i===0?``:n,n.length===0||i===0?t.clearSegment(e.type):t.setSegment(e.type,i),r.current=n}else e.type===`dayPeriod`&&t.clearSegment(e.type)},v=e=>{if(e.key===`a`&&(Aj()?e.metaKey:e.ctrlKey)&&e.preventDefault(),!(e.ctrlKey||e.metaKey||e.shiftKey||e.altKey))switch(e.key){case`Backspace`:case`Delete`:e.preventDefault(),e.stopPropagation(),_()}},{startsWith:y}=Wpe({sensitivity:`base`}),b=aN({hour:`numeric`,hour12:!0}),x=(0,V.useMemo)(()=>{let e=new Date;return e.setHours(0),b.formatToParts(e).find(e=>e.type===`dayPeriod`).value},[b]),S=(0,V.useMemo)(()=>{let e=new Date;return e.setHours(12),b.formatToParts(e).find(e=>e.type===`dayPeriod`).value},[b]),C=aN({year:`numeric`,era:`narrow`,timeZone:`UTC`}),w=(0,V.useMemo)(()=>
15{if(e.type!==`era`)return[];let n=Lw(new mT(1,1,1),t.calendar),r=t.calendar.getEras().map(e=>{let t=n.set({year:1,month:1,day:1,era:e}).toDate(`UTC`);return{era:e,formatted:C.formatToParts(t).find(e=>e.type===`era`).value}}),i=Bhe(r.map(e=>e.formatted));if(i)for(let e of r)e.formatted=e.formatted.slice(i);return r},[C,t.calendar,e.type]),T=n=>{if(t.isDisabled||t.isReadOnly)return;let i=r.current+n;switch(e.type){case`dayPeriod`:if(y(x,n))t.setSegment(`dayPeriod`,0);else if(y(S,n))t.setSegment(`dayPeriod`,12);else break;u.focusNext();break;case`era`:{let e=w.find(e=>y(e.formatted,n));e&&(t.setSegment(`era`,e.era),u.focusNext());break}case`day`:case`hour`:case`minute`:case`second`:case`month`:case`year`:{if(!g.isValidPartialNumber(i))return;let a=g.parse(i),o=a,s=e.minValue===0;if(e.type===`hour`&&t.dateFormatter.resolvedOptions().hour12){switch(t.dateFormatter.resolvedOptions().hourCycle){case`h11`:a>11&&(o=g.parse(n));break;case`h12`:s=!1,a>12&&(o=g.parse(n))}e.value!==void 0&&e.value>=12&&a>1&&(a+=12)}else e.maxValue!==void 0&&a>e.maxValue&&(o=g.parse(n));if(isNaN(a))return;let c=o!==0||s;c&&t.setSegment(e.type,o),e.maxValue!==void 0&&(Number(a+`0`)>e.maxValue||i.length>=String(e.maxValue).length)?(r.current=``,c&&u.focusNext()):r.current=i;break}}},E=()=>{r.current=``,n.current&&aM(n.current,{containingElement:Zj(n.current)}),window.getSelection()?.collapse(n.current)};nM((0,V.useRef)(typeof document<`u`?document:null),`selectionchange`,()=>{let e=window.getSelection();e?.anchorNode&&n.current?.contains(e?.anchorNode)&&e.collapse(n.current)});let D=(0,V.useRef)(``);nM(n,`beforeinput`,r=>{if(n.current)switch(r.preventDefault(),r.inputType){case`deleteContentBackward`:case`deleteContentForward`:g.isValidPartialNumber(e.text)&&!t.isReadOnly&&_();break;case`insertCompositionText`:D.current=n.current.textContent,n.current.textContent=n.current.textContent;break;default:r.data!=null&&T(r.data)}}),nM(n,`input`,e=>{let{inputType:t,data:r}=e;t===`insertCompositionText`&&(n.current&&(n.current.textContent=D.current),r!=null&&(y(x,r)||y(S,r))&&T(r))}),rj(()=>{let e=n.current;return()=>{document.activeElement===e&&(u.focusPrevious()||u.focusNext())}},[n,u]);let O=Mj()||e.type===`timeZoneName`?{role:`textbox`,"aria-valuemax":null,"aria-valuemin":null,"aria-valuetext":null,"aria-valuenow":null}:{};e!==(0,V.useMemo)(()=>t.segments.find(e=>e.isEditable),[t.segments])&&!t.isInvalid&&(l=void 0);let k=uj(),A=!t.isDisabled&&!t.isReadOnly&&e.isEditable,j=Uj({"aria-label":`${e.type===`literal`?``:o.of(e.type)}${s?`, ${s}`:``}${c?`, `:``}`,"aria-labelledby":c});if(e.type===`literal`)return{segmentProps:{"aria-hidden":!0}};let M={caretColor:`transparent`};if(a===`rtl`){M.unicodeBidi=`embed`;let t=f[e.type];(t===`numeric`||t===`2-digit`)&&(M.direction=`ltr`)}return{segmentProps:bj(h,j,{id:k,...O,"aria-invalid":t.isInvalid?`true`:void 0,"aria-describedby":l,"aria-readonly":t.isReadOnly||!e.isEditable?`true`:void 0,"data-placeholder":e.isPlaceholder||void 0,contentEditable:A,suppressContentEditableWarning:A,spellCheck:A?`false`:void 0,autoCorrect:A?`off`:void 0,enterKeyHint:A?`next`:void 0,inputMode:t.isDisabled||e.type===`dayPeriod`||e.type===`era`||!A?void 0:`numeric`,tabIndex:t.isDisabled?void 0:0,onKeyDown:v,onFocus:E,style:M,onPointerDown(e){e.stopPropagation()},onMouseDown(e){e.stopPropagation()}})}}function Bhe(e){e.sort();let t=e[0],n=e[e.length-1];for(let e=0;e<t.length;e++)if(t[e]!==n[e])return e;return 0}function Vhe(e){return e&&e.__esModule?e.default:e}function Hhe(e,t,n){let r=iN(Vhe(MR),`@react-aria/datepicker`),{isInvalid:i,validationErrors:a,validationDetails:o}=t.displayValidation,{labelProps:s,fieldProps:c,descriptionProps:l,errorMessageProps:u}=WF({...e,labelElementType:`span`,isInvalid:i,errorMessage:e.errorMessage||a}),d=c[`aria-labelledby`]||c.id,{locale:f}=XM(),p=t.formatValue(f,{month:`long`}),m=tM(p?r.format(`selectedRangeDescription`,{startDate:p.start,endDate:p.end}):``),h={"aria-label":r.format(`startDate`),"aria-labelledby":d},g={"aria-label":r.format(`endDate`),"aria-labelledby":d},_=uj(),v=uj(),y=NR(t,n),b=[m[`aria-describedby`],c[`aria-describedby`]].filter(
15Boolean).join(` `)||void 0,x=(0,V.useMemo)(()=>NP(n,{accept:e=>e.id!==_}),[n,_]),S={[LR]:x,[IR]:`presentation`,"aria-describedby":b,placeholderValue:e.placeholderValue,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,granularity:e.granularity,shouldForceLeadingZeros:e.shouldForceLeadingZeros,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isRequired:e.isRequired,validationBehavior:e.validationBehavior},C=wj(e),w=(0,V.useRef)(!1),{focusWithinProps:T}=dP({...e,isDisabled:t.isOpen,onBlurWithin:t=>{if(!document.getElementById(v)?.contains(t.relatedTarget)){var n,r;w.current=!1,(n=e.onBlur)==null||n.call(e,t),(r=e.onFocusChange)==null||r.call(e,!1)}},onFocusWithin:t=>{if(!w.current){var n,r;w.current=!0,(n=e.onFocus)==null||n.call(e,t),(r=e.onFocusChange)==null||r.call(e,!0)}}}),E=(0,V.useRef)(aI),D=(0,V.useRef)(aI);return{groupProps:bj(C,y,c,m,T,{role:`group`,"aria-disabled":e.isDisabled||null,"aria-describedby":b,onKeyDown(n){t.isOpen||e.onKeyDown&&e.onKeyDown(n)},onKeyUp(n){t.isOpen||e.onKeyUp&&e.onKeyUp(n)}}),labelProps:{...s,onClick:()=>{x.focusFirst()}},buttonProps:{...m,id:_,"aria-haspopup":`dialog`,"aria-label":r.format(`calendar`),"aria-labelledby":`${_} ${d}`,"aria-describedby":b,"aria-expanded":t.isOpen,isDisabled:e.isDisabled||e.isReadOnly,onPress:()=>t.setOpen(!0)},dialogProps:{id:v,"aria-labelledby":`${_} ${d}`},startFieldProps:{...h,...S,value:t.value?.start??null,defaultValue:t.defaultValue?.start,onChange:e=>t.setDateTime(`start`,e),autoFocus:e.autoFocus,name:e.startName,form:e.form,[oI]:{realtimeValidation:t.realtimeValidation,displayValidation:t.displayValidation,updateValidation(e){E.current=e,t.updateValidation(dI(e,D.current))},resetValidation:t.resetValidation,commitValidation:t.commitValidation}},endFieldProps:{...g,...S,value:t.value?.end??null,defaultValue:t.defaultValue?.end,onChange:e=>t.setDateTime(`end`,e),name:e.endName,form:e.form,[oI]:{realtimeValidation:t.realtimeValidation,displayValidation:t.displayValidation,updateValidation(e){D.current=e,t.updateValidation(dI(E.current,e))},resetValidation:t.resetValidation,commitValidation:t.commitValidation}},descriptionProps:l,errorMessageProps:u,calendarProps:{autoFocus:!0,value:t.dateRange?.start&&t.dateRange.end?t.dateRange:null,onChange:t.setDateRange,minValue:e.minValue,maxValue:e.maxValue,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isDateUnavailable:e.isDateUnavailable,allowsNonContiguousRanges:e.allowsNonContiguousRanges,defaultFocusedValue:t.dateRange?void 0:e.placeholderValue,isInvalid:t.isInvalid,errorMessage:typeof e.errorMessage==`function`?e.errorMessage(t.displayValidation):e.errorMessage||t.displayValidation.validationErrors.join(` `),firstDayOfWeek:e.firstDayOfWeek,pageBehavior:e.pageBehavior},isInvalid:i,validationErrors:a,validationDetails:o}}function Uhe(e,t){let{role:n=`dialog`}=e,r=dj();r=e[`aria-label`]?void 0:r;let i=(0,V.useRef)(!1);return(0,V.useEffect)(()=>{if(t.current&&!t.current.contains(document.activeElement)){oP(t.current);let e=setTimeout(()=>{(document.activeElement===t.current||document.activeElement===document.body)&&(i.current=!0,t.current&&(t.current.blur(),oP(t.current)),i.current=!1)},500);return()=>{clearTimeout(e)}}},[t]),Pme(),{dialogProps:{...wj(e,{labelable:!0}),role:n,tabIndex:-1,"aria-labelledby":e[`aria-labelledby`]||r,onBlur:e=>{i.current&&e.stopPropagation()}},titleProps:{id:r}}}var zR=function(e){return e[e.none=0]=`none`,e[e.cancel=0]=`cancel`,e[e.move=1]=`move`,e[e.copy=2]=`copy`,e[e.link=4]=`link`,e[e.all=7]=`all`,e}({}),BR={...zR,copyMove:3,copyLink:6,linkMove:5,all:7,uninitialized:7},VR=WR(BR);VR[7]=`all`;var HR={none:`cancel`,link:`link`,copy:`copy`,move:`move`},UR=WR(HR);function WR(e){let t={};for(let n in e)t[e[n]]=n;return t}var Whe=new Set([`text/plain`,`text/uri-list`,`text/html`]),GR=`application/vnd.react-aria.items+json`,Ghe=`application/octet-stream`,KR=new WeakMap,qR=Symbol();function Khe(e){let{id:t}=KR.get(e)||{};if(!t)throw Error(`Droppable item outside a droppable collection`);return t}function qhe(e){let{ref:t}=KR.get(e)||{};if(!t)throw Error(`Droppable item outside a droppable collection`);return t}function JR(e){let t=new Set;for(let n of e)for(let e of Object.keys(n))t.add(e);return t}function YR(e){return e||=`virtual`,e===`pointer`&&(e=`virtual`),e===`virtual`&&typeof window<`u`&&`ontouchstart`in window&&(e=`touch`),e}function XR(){return YR(aP())}function ZR(){return YR(rP())}function Jhe(e,t){let n=new Map,r=!1,i=[];for(let e of t){let t=Object.keys(e);t.length>1&&(r=!0);let a={};for(let i of t){let t=n.get(i);t?r=!0:(t=[],n.set(i,t));let o=e[i];a[i]=o,t.push(o)}i.push(a)}for(let[t,r]of n)if(Whe.has(t)){let n=r.join(` 16`);e.items.add(n,t)}else e.items.add(r[0],t);
vendor: 4,338 bytes, line 16
16if(r){let t=JSON.stringify(i);e.items.add(t,GR)}}var QR=class{has(e){return this.includesUnknownTypes||e===qR&&this.types.has(`application/octet-stream`)?!0:typeof e==`string`&&this.types.has(e)}constructor(e){this.types=new Set;let t=!1;for(let n of e.items)n.type!==`application/vnd.react-aria.items+json`&&(n.kind===`file`&&(t=!0),n.type?this.types.add(n.type):this.types.add(Ghe));this.includesUnknownTypes=!t&&e.types.includes(`Files`)}};function Yhe(e){let t=[];if(!e)return t;let n=!1;if(e.types.includes(`application/vnd.react-aria.items+json`))try{let r=e.getData(GR),i=JSON.parse(r);for(let e of i)t.push({kind:`text`,types:new Set(Object.keys(e)),getText:t=>Promise.resolve(e[t])});n=!0}catch{}if(!n){let n=new Map;for(let r of e.items)if(r.kind===`string`)n.set(r.type||`application/octet-stream`,e.getData(r.type));else if(r.kind===`file`){if(typeof r.webkitGetAsEntry==`function`){let e=r.webkitGetAsEntry();if(!e)continue;e.isFile?t.push($R(r.getAsFile())):e.isDirectory&&t.push(ez(e))}else t.push($R(r.getAsFile()))}n.size>0&&t.push({kind:`text`,types:new Set(n.keys()),getText:e=>Promise.resolve(n.get(e))})}return t}function Xhe(e){return typeof e.text==`function`?e.text():new Promise((t,n)=>{let r=new FileReader;r.onload=()=>{t(r.result)},r.onerror=n,r.readAsText(e)})}function $R(e){if(!e)throw Error(`No file provided`);return{kind:`file`,type:e.type||`application/octet-stream`,name:e.name,getText:()=>Xhe(e),getFile:()=>Promise.resolve(e)}}function ez(e){return{kind:`directory`,name:e.name,getEntries:()=>Zhe(e)}}async function*Zhe(e){let t=e.createReader(),n;do{n=await new Promise((e,n)=>{t.readEntries(e,n)});for(let e of n)e.isFile?yield $R(await Qhe(e)):e.isDirectory&&(yield ez(e))}while(n.length>0)}function Qhe(e){return new Promise((t,n)=>e.file(t,n))}var tz={draggingKeys:new Set};function $he(e){tz.draggingCollectionRef=e}function ege(e){tz.draggingKeys=e}function nz(e){tz.dropCollectionRef=e}function rz(){tz={draggingKeys:new Set}}function tge(e){tz=e}function iz(e){let{draggingCollectionRef:t,dropCollectionRef:n}=tz;return t?.current!=null&&t.current===(e?.current||n?.current)}var az;function oz(e){az=e}var sz=zR.none;function cz(e){sz=e}var lz=new Map,uz=new Map,dz=null,fz=new Set;function pz(e){return lz.set(e.element,e),dz?.updateValidDropTargets(),()=>{lz.delete(e.element),dz?.updateValidDropTargets()}}function nge(e){return uz.set(e.element,e),()=>{uz.delete(e.element)}}function rge(e,t){if(dz)throw Error(`Cannot begin dragging while already dragging`);dz=new cge(e,t),requestAnimationFrame(()=>{dz&&(dz.setup(),ZR()===`keyboard`&&dz.next())});for(let e of fz)e()}function mz(){let[e,t]=(0,V.useState)(dz);return(0,V.useEffect)(()=>{let e=()=>t(dz);return fz.add(e),()=>{fz.delete(e)}},[]),e}function ige(){return!!dz}function age(){dz=null;for(let e of fz)e()}var hz=[`pointerdown`,`pointermove`,`pointerenter`,`pointerleave`,`pointerover`,`pointerout`,`pointerup`,`mousedown`,`mousemove`,`mouseenter`,`mouseleave`,`mouseover`,`mouseout`,`mouseup`,`touchstart`,`touchmove`,`touchend`,`focusin`,`focusout`],oge=[`pointerup`,`mouseup`,`touchend`],sge={keyboard:`dragStartedKeyboard`,touch:`dragStartedTouch`,virtual:`dragStartedVirtual`},cge=class{setup(){document.addEventListener(`keydown`,this.onKeyDown,!0),document.addEventListener(`keyup`,this.onKeyUp,!0),window.addEventListener(`focus`,this.onFocus,!0),window.addEventListener(`blur`,this.onBlur,!0),document.addEventListener(`click`,this.onClick,!0),document.addEventListener(`pointerdown`,this.onPointerDown,!0);for(let e of hz)document.addEventListener(e,this.cancelEvent,!0);this.mutationObserver=new MutationObserver(()=>this.updateValidDropTargets()),this.updateValidDropTargets(),kM(this.stringFormatter.format(sge[ZR()]))}teardown(){var e,t,n;document.removeEventListener(`keydown`,this.onKeyDown,!0),document.removeEventListener(`keyup`,this.onKeyUp,!0),window.removeEventListener(`focus`,this.onFocus,!0),window.removeEventListener(`blur`,this.onBlur,!0),document.removeEventListener(`click`,this.onClick,!0),document.removeEventListener(`pointerdown`,this.onPointerDown,!0);for(let e of hz)document.removeEventListener(e,this.cancelEvent,!0);(e=this.mutationObserver)==null||e.disconnect(),(t=(n=this).restoreAriaHidden)==null||t.call(n)}onKeyDown(e){if(this.cancelEvent(e),e.key===`Escape`){this.cancel();return}
16e.key===`Tab`&&!(e.metaKey||e.altKey||e.ctrlKey)&&(e.shiftKey?this.previous():this.next()),typeof this.currentDropTarget?.onKeyDown==`function`&&this.currentDropTarget.onKeyDown(e,this.dragTarget)}onKeyUp(e){this.cancelEvent(e),e.key===`Enter`&&(e.altKey||this.getCurrentActivateButton()?.contains(e.target)?this.activate(this.currentDropTarget,this.currentDropItem):this.drop())}getCurrentActivateButton(){return this.currentDropItem?.activateButtonRef?.current??this.currentDropTarget?.activateButtonRef?.current??null}onFocus(e){let t=this.getCurrentActivateButton();if(e.target===t){this.cancelEvent(e);return}if(e.target!==this.dragTarget.element&&this.cancelEvent(e),!(e.target instanceof HTMLElement)||e.target===this.dragTarget.element)return;let n=this.validDropTargets.find(t=>t.element===e.target)||this.validDropTargets.find(t=>t.element.contains(e.target));if(!n){this.currentDropTarget?this.currentDropTarget.element.focus():this.dragTarget.element.focus();return}let r=uz.get(e.target);n&&this.setCurrentDropTarget(n,r)}onBlur(e){let t=this.getCurrentActivateButton();if(e.relatedTarget===t){this.cancelEvent(e);return}e.target!==this.dragTarget.element&&this.cancelEvent(e),(!e.relatedTarget||!(e.relatedTarget instanceof HTMLElement))&&(this.currentDropTarget?this.currentDropTarget.element.focus():this.dragTarget.element.focus())}onClick(e){if(this.cancelEvent(e),oM(e)||this.isVirtualClick){let t=[...uz.values()].find(t=>t.element===e.target||t.activateButtonRef?.current?.contains(e.target)),n=this.validDropTargets.find(t=>t.element.contains(e.target));if((t?.activateButtonRef?.current??n?.activateButtonRef?.current)?.contains(e.target)&&n){this.activate(n,t);return}if(e.target===this.dragTarget.element){this.cancel();return}n&&(this.setCurrentDropTarget(n,t),this.drop(t))}}onPointerDown(e){this.cancelEvent(e),this.isVirtualClick=sM(e)}cancelEvent(e){(e.type!==`focusin`&&e.type!==`focusout`||e.target!==this.dragTarget?.element&&e.target!==this.getCurrentActivateButton())&&(oge.includes(e.type)||e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation())}updateValidDropTargets(){if(!this.mutationObserver)return;if(this.mutationObserver.disconnect(),this.restoreAriaHidden&&this.restoreAriaHidden(),this.validDropTargets=lge(this.dragTarget),this.validDropTargets.length>0){let e=this.findNearestDropTarget();this.validDropTargets=[...this.validDropTargets.slice(e),...this.validDropTargets.slice(0,e)]}this.currentDropTarget&&!this.validDropTargets.includes(this.currentDropTarget)&&this.setCurrentDropTarget(this.validDropTargets[0]);let e=JR(this.dragTarget.items),t=[...uz.values()].filter(t=>typeof t.getDropOperation!=`function`||t.getDropOperation(e,this.dragTarget.allowedDropOperations)!==`cancel`),n=this.validDropTargets.filter(e=>!t.some(t=>e.element.contains(t.element)));this.restoreAriaHidden=BF([this.dragTarget.element,...t.flatMap(e=>e.activateButtonRef?.current?[e.element,e.activateButtonRef?.current]:[e.element]),...n.flatMap(e=>e.activateButtonRef?.current?[e.element,e.activateButtonRef?.current]:[e.element])],{shouldUseInert:!0}),this.mutationObserver.observe(document.body,{subtree:!0,attributes:!0,attributeFilter:[`aria-hidden`,`inert`]})}next(){if(!this.currentDropTarget){this.setCurrentDropTarget(this.validDropTargets[0]);return}let e=this.validDropTargets.indexOf(this.currentDropTarget);if(e<0){this.setCurrentDropTarget(this.validDropTargets[0]);return}e===this.validDropTargets.length-1?this.dragTarget.element.closest(`[aria-hidden="true"], [inert]`)?this.setCurrentDropTarget(this.validDropTargets[0]):(this.setCurrentDropTarget(null),this.dragTarget.element.focus()):this.setCurrentDropTarget(this.validDropTargets[e+1])}previous(){if(!this.currentDropTarget){this.setCurrentDropTarget(this.validDropTargets[this.validDropTargets.length-1]);return}let e=this.validDropTargets.indexOf(this.currentDropTarget);if(e<0){this.setCurrentDropTarget(this.validDropTargets[this.validDropTargets.length-1]);return}e===0?this.dragTarget.element.closest(`[aria-hidden="true"], [inert]`)?this.setCurrentDropTarget(this.validDropTargets[this.validDropTargets.length-1]):(this.setCurrentDropTarget(null),this.dragTarget.element.focus()):this.setCurrentDropTarget(this.validDropTargets[e-1])}findNearestDropTarget(){let e=this.dragTarget.element.getBoundingClientRect(),t=1/0,n=-1;for(let r=0;r<this.validDropTargets.length;r++){let i=this.validDropTargets[r].element.getBoundingClientRect(),a=i.left-e.left,o=i.top-e.top,s=a*a+o*o;s<t&&(t=s,n=r)}return n}setCurrentDropTarget(e,t){if(e!==this.currentDropTarget){if(this.currentDropTarget&&typeof this.currentDropTarget.onDropExit==`function`){let e=this.currentDropTarget.element.getBoundingClientRect();this.currentDropTarget.onDropExit({type:`dropexit`,x:e.left+e.width/2,y:e.top+e.height/2})}if(this.currentDropTarget=e,e){if(typeof e.onDropEnter==`function`){let t=e.element.getBoundingClientRect();e.onDropEnter({type:`dropenter`,x:t.left+t.width/2,y:t.top+t.height/2},this.dragTarget)}t||e?.element.focus()}}if(t!=null&&t!==this.currentDropItem&&(this.currentDropTarget&&typeof this.currentDropTarget.onDropTargetEnter==`function`&&this.currentDropTarget.onDropTargetEnter(t.target),t.element.focus(),this.currentDropItem=t,!this.initialFocused)){let e=t?.element.getAttribute(`aria-label`);e&&kM(e,`polite`),this.initialFocused=!0}}end(){var e;if(this.teardown(),age(),typeof this.dragTarget.onDragEnd==`function`){let e=(this.currentDropTarget&&this.dropOperation!==`cancel`?this.currentDropTarget:this.dragTarget).element.getBoundingClientRect();this.dragTarget.onDragEnd({type:`dragend`,x:e.x+e.width/2,y:e.y+e.height/2,dropOperation:this.dropOperation||`cancel`})}this.currentDropTarget&&!this.currentDropTarget.preventFocusOnDrop&&((e=document.activeElement)==null||e.dispatchEvent(new FocusEvent(`focu
16sin`,{bubbles:!0}))),this.setCurrentDropTarget(null)}cancel(){this.setCurrentDropTarget(null),this.end(),this.dragTarget.element.closest(`[aria-hidden="true"], [inert]`)||this.dragTarget.element.focus(),kM(this.stringFormatter.format(`dropCanceled`))}drop(e){if(!this.currentDropTarget){this.cancel();return}if(typeof e?.getDropOperation==`function`){let t=JR(this.dragTarget.items);this.dropOperation=e.getDropOperation(t,this.dragTarget.allowedDropOperations)}else if(typeof this.currentDropTarget.getDropOperation==`function`){let e=JR(this.dragTarget.items);this.dropOperation=this.currentDropTarget.getDropOperation(e,this.dragTarget.allowedDropOperations)}else this.dropOperation=this.dragTarget.allowedDropOperations[0];if(typeof this.currentDropTarget.onDrop==`function`){let t=this.dragTarget.items.map(e=>({kind:`text`,types:new Set(Object.keys(e)),getText:t=>Promise.resolve(e[t])})),n=this.currentDropTarget.element.getBoundingClientRect();this.currentDropTarget.onDrop({type:`drop`,x:n.left+n.width/2,y:n.top+n.height/2,items:t,dropOperation:this.dropOperation},e?.target??null)}this.end(),kM(this.stringFormatter.format(`dropComplete`))}activate(e,t){if(e&&typeof e.onDropActivate==`function`){let n=t?.target??null,r=e.element.getBoundingClientRect();e.onDropActivate({type:`dropactivate`,x:r.left+r.width/2,y:r.top+r.height/2},n)}}constructor(e,t){this.validDropTargets=[],this.currentDropTarget=null,this.currentDropItem=null,this.dropOperation=null,this.mutationObserver=null,this.restoreAriaHidden=null,this.isVirtualClick=!1,this.dragTarget=e,this.stringFormatter=t,this.onKeyDown=this.onKeyDown.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.onFocus=this.onFocus.bind(this),this.onBlur=this.onBlur.bind(this),this.onClick=this.onClick.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.cancelEvent=this.cancelEvent.bind(this),this.initialFocused=!1}};function lge(e){let t=JR(e.items);return[...lz.values()].filter(n=>n.element.closest(`[aria-hidden="true"], [inert]`)?!1:typeof n.getDropOperation!=`function`||n.getDropOperation(t,e.allowedDropOperations)!==`cancel`)}var gz={};gz={dragDescriptionKeyboard:`اضغط Enter ÙØ¨Ø¯Ø¡ Ø§ÙØ³ØØ¨.`,dragDescriptionKeyboardAlt:`اضغط عÙÙ Alt + Enter ÙØ¨Ø¯Ø¡ Ø§ÙØ³ØØ¨.`,dragDescriptionLongPress:`اضغط باستÙ
رار ÙØ¨Ø¯Ø¡ Ø§ÙØ³ØØ¨.`,dragDescriptionTouch:`اضغط Ù
رتÙÙ ÙØ¨Ø¯Ø¡ Ø§ÙØ³ØØ¨.`,dragDescriptionVirtual:`اÙÙØ± ÙØ¨Ø¯Ø¡ Ø§ÙØ³ØØ¨.`,dragItem:e=>`\u{627}\u{633}\u{62D}\u{628} ${e.itemText}`,dragSelectedItems:(e,t)=>`\u{627}\u{633}\u{62D}\u{628} ${t.plural(e.count,{one:()=>`${t.number(e.count)} \u{639}\u{646}\u{635}\u{631} \u{645}\u{62D}\u{62F}\u{62F}`,other:()=>`${t.number(e.count)} \u{639}\u{646}\u{627}\u{635}\u{631} \u{645}\u{62D}\u{62F}\u{62F}\u{629}`})}`,dragSelectedKeyboard:(e,t)=>`\u{627}\u{636}\u{63A}\u{637} \u{639}\u{644}\u{649} Enter \u{644}\u{644}\u{633}\u{62D}\u{628} ${t.plural(e.count,{one:`عدد Ø§ÙØ¹Ùاصر اÙÙ
ختارة`,other:`عدد Ø§ÙØ¹Ùاصر اÙÙ
ختارة`})}.`,dragSelectedKeyboardAlt:(e,t)=>`\u{627}\u{636}\u{63A}\u{637} \u{639}\u{644}\u{649} \u{645}\u{641}\u{62A}\u{627}\u{62D}\u{64A} Alt + Enter \u{644}\u{644}\u{633}\u{62D}\u{628} ${t.plural(e.count,{one:`عدد Ø§ÙØ¹Ùاصر اÙÙ
ختارة`,other:`عدد Ø§ÙØ¹Ùاصر اÙÙ
ختارة`})}.`,dragSelectedLongPress:(e,t)=>`\u{627}\u{636}\u{63A}\u{637} \u{628}\u{627}\u{633}\u{62A}\u{645}\u{631}\u{627}\u{631} \u{644}\u{644}\u{633}\u{62D}\u{628} ${t.plural(e.count,{one:`عدد Ø§ÙØ¹Ùاصر اÙÙ
ختارة`,other:`عدد Ø§ÙØ¹Ùاصر اÙÙ
ختارة`})}.`,dragStartedKeyboard:`بدأ Ø§ÙØ³ØØ¨. اضغط Tab ÙÙØ§ÙØªÙØ§Ù Ø¥ÙÙ Ù
ÙØ¶Ø¹ Ø§ÙØ¥ÙÙØ§ØªØ Ø«Ù
اضغط Enter ÙÙØ¥ÙÙØ§ØªØ أ٠اضغط Escape ÙÙØ¥Ùغاء.`,dragStartedTouch:`بدأ Ø§ÙØ³ØØ¨. Ø§ÙØªÙ٠إÙÙ Ù
ÙØ¶Ø¹ Ø§ÙØ¥ÙÙØ§ØªØ Ø«Ù
اضغط Ù
رتÙÙ ÙÙØ¥ÙÙØ§Øª.`,dragStartedVirtual:`بدأ Ø§ÙØ³ØØ¨. Ø§ÙØªÙ٠إÙÙ Ù
ÙØ§Ù Ø§ÙØ¥ÙÙØ§ØªØ Ø«Ù
اÙÙØ± أ٠اضغط Enter ÙÙØ¥ÙÙØ§Øª.`,dropCanceled:`تÙ
Ø¥ÙØºØ§Ø¡ Ø§ÙØ¥ÙÙØ§Øª.`,dropComplete:`Ø§ÙØªÙ
Ù Ø§ÙØ¥ÙÙØ§Øª.`,dropDescriptionKeyboard:`اضغط Enter ÙÙØ¥ÙÙØ§Øª. اضغط Escape ÙØ¥Ùغاء Ø§ÙØ³ØØ¨.`,dropDescriptionTouch:`اضغط Ù
رتÙÙ ÙÙØ¥ÙÙØ§Øª.`,dropDescriptionVirtual:`اÙÙØ± ÙÙØ¥ÙÙØ§Øª.`,dropIndicator:`Ù
ؤشر Ø§ÙØ¥ÙÙØ§Øª`,dropOnItem:e=>`\u{625}\u{641}\u{644}\u{627}\u{62A} ${e.itemText}`,dropOnRoot:`Ø§ÙØ¥ÙÙØ§Øª`,endDragKeyboard:`Ø§ÙØ³ØØ¨. اضغط Enter ÙØ¥Ùغاء Ø§ÙØ³ØØ¨.`,endDragTouch:`Ø§ÙØ³ØØ¨. اضغط Ù
رتÙÙ ÙØ¥Ùغاء Ø§ÙØ³ØØ¨.`,endDragVirtual:`Ø§ÙØ³ØØ¨. اÙÙØ± ÙØ¥Ùغاء Ø§ÙØ³ØØ¨.`,insertAfter:e=>`\u{623}\u{62F}\u{62E}\u{644} \u{628}\u{639}\u{62F} ${e.itemText}`,insertBefore:e=>`\u{623}\u{62F}\u{62E}\u{644} \u{642}\u{628}\u{644} ${e.itemText}`,insertBetween:e=>`\u{623}\u{62F}\u{62E}\u{644} \u{628}\u{64A}\u{646} ${e.beforeItemText} \u{648} ${e.afterItemText}`};var _z={};_z={dragDescriptionKeyboard:`ÐаÑиÑнеÑе âEnterâ, за да запоÑнеÑе да плÑзгаÑе.`,dragDescriptionKeyboardAlt:`ÐаÑиÑнеÑе Alt + Enter, за да запоÑнеÑе да плÑзгаÑе.`,dragDescriptionLongPress:`ÐаÑиÑнеÑе пÑодÑлжиÑелно, за да запоÑнеÑе да плÑзгаÑе.`,dragDescriptionTouch:`ÐаÑиÑнеÑе двÑкÑаÑно, за да запоÑнеÑе да плÑзгаÑе.`,dragDescriptionVirtual:`ЩÑакнеÑе, за да запоÑнеÑе да плÑзгаÑе.`,dragItem:e=>`\u{41F}\u{43B}\u{44A}\u{437}\u{43D}\u{438} ${e.itemText}`,dragSelectedItems:(e,t)=>`\u{41F}\u{43B}\u{44A}\u{437}\u{43D}\u{438} ${t.plural(e.count,{one:()=>`${t.number(e.count)} \u{438}\u{437}\u{431}\u{440}\u{430}\u{43D} \u{435}\u{43B}\u{435}\u{43C}\u{435}\u{43D}\u{442}`,other:()=>`${t.number(e.count)} \u{438}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{438} \u{435}\u{43B}\u{435}\u{43C}\u{435}\u{43D}\u{442}\u{430}`})}`,dragSelectedKeyboard:(e,t)=>`\u{41D}\u{430}\u{442}\u{438}\u{441}\u{43D}\u{435}\u{442}\u{435} Enter, \u{437}\u{430} \u{434}\u{430} \u{43F}\u{43B}\u{44A}\u{437}\u{43D}\u{435}\u{442}\u{435} ${t.plural(e.count,{one:()=>`${t.number(e.count)} \u{438}\u{437}\u{431}\u{440}\u{430}\u{43D} \u{435}\u{43B}\u{435}\u{43C}\u{435}\u{43D}\u{442}`,other:()=>`${t.number(e.count)} \u{438}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{438} \u{435}\u{43B}\u{435}\u{43C}\u{435}\u{43D}\u{442}\u{438}`})}.`,dragSelectedKeyboardAlt:(e,t)=>`\u{41D}\u{430}\u{442}\u{438}\u{441}\u{43D}\u{435}\u{442}\u{435} Alt \u{438} Enter, \u{437}\u{430} \u{434}\u{430} \u{43F}\u{43B}\u{44A}\u{437}\u{43D}\u{435}\u{442}\u{435} ${t.plural(e.count,{one:()=>`${t.number(e.count)} \u{438}\u{437}\u{431}\u{440}\u{430}\u{43D} \u{435}\u{43B}\u{435}\u{43C}\u{435}\u{43D}\u{442}`,other:()=>`${t.number(e.count)} \u{438}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{438} \u{435}\u{43B}\u{435}\u{43C}\u{435}\u{43D}\u{442}\u{438}`})}.`,dragSelectedLongPress:(e,t)=>`\u{41D}\u{430}\u{442}\u{438}\u{441}\u{43D}\u{435}\u{442}\u{435} \u{43F}\u{440}\u{43E}\u{434}\u{44A}\u{43B}\u{436}\u{438}\u{442}\u{435}\u{43B}\u{43D}\u{43E}, \u{437}\u{430} \u{434}\u{430} \u{43F}\u{43B}\u{44A}\u{437}\u{43D}\u{435}\u{442}\u{435} ${t.plural(e.count,{one:()=>`${t.number(e.count)} \u{438}\u{437}\u{431}\u{440}\u{430}\u{43D} \u{435}\u{43B}\u{435}\u{43C}\u{435}\u{43D}\u{442}`,other:()=>`${t.number(e.count)} \u{438}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{438} \u{435}\u{43B}\u{435}\u{43C}\u{435}\u{43D}\u{442}\u{438}`})}.`,dragStartedKeyboard:`ÐапоÑна плÑзгане. ÐаÑиÑнеÑе âTabâ, за да Ñе пÑидвижиÑе до ÑелÑа, Ñлед коеÑо наÑиÑнеÑе âEnterâ за пÑÑкане или наÑиÑнеÑе âEscapeâ за оÑмÑна.`,dragStartedTouch:`ÐапоÑна плÑзгане. ÐÑидвижеÑе Ñе до ÑелÑа, Ñлед коеÑо наÑиÑнеÑе двÑкÑаÑно, за да пÑÑнеÑе.`,dragStartedVirtual:`ÐапоÑна плÑзгане. ÐÑидвижеÑе Ñе до ÑелÑа, Ñлед коеÑо ÑÑакнеÑе или наÑиÑнеÑе âEnterâ за пÑÑкане.`,dropCanceled:`ÐÑÑканеÑо е оÑменено.`,dropComplete:`ÐÑÑканеÑо е завÑÑÑено.`,dropDescriptionKeyboard:`ÐаÑиÑнеÑе âEnterâ за пÑÑкане. ÐаÑиÑнеÑе âEscapeâ за оÑмÑна на плÑзганеÑо.`,dropDescriptionTouch:`ÐаÑиÑнеÑе двÑкÑаÑно за пÑÑкане.`,dropDescriptionVirtual:`ЩÑакнеÑе за пÑÑкане.`,dropIndicator:`индикаÑÐ¾Ñ Ð·Ð° пÑÑкане`,dropOnItem:e=>`\u{41F}\u{443}\u{441}\u{43D}\u{438} \u{432}\u{44A}\u{440}\u{445}\u{443} ${e.itemText}`,dropOnRoot:`ÐÑÑни вÑÑÑ
Ñ`,endDragKeyboard:`ÐлÑзгане. ÐаÑиÑнеÑе âEnterâ за оÑмÑна на плÑзганеÑо.`,endDragTouch:`ÐлÑзгане. ÐаÑиÑнеÑе двÑкÑаÑно за оÑмÑна на плÑзганеÑо.`,endDragVirtual:`ÐлÑзгане. ЩÑакнеÑе за оÑмÑна.`,insertAfter:e=>`\u{412}\u{43C}\u{44A}\u{43A}\u{43D}\u{438} \u{441}\u{43B}\u{435}\u{434} ${e.itemText}`,insertBefore:e=>`\u{412}\u{43C}\u{44A}\u{43A}\u{43D}\u{438} \u{43F}\u{440}\u{435}\u{434}\u{438} ${e.itemText}`,insertBetween:e=>`\u{412}\u{43C}\u{44A}\u{43A}\u{43D}\u{438} \u{43C}\u{435}\u{436}\u{434}\u{443} ${e.beforeItemText} \u{438} ${e.afterItemText}`};var vz={};vz={dragDescriptionKeyboard:`StisknutÃm klávesy Enter zaÄnete s pÅetahovánÃm.`,dragDescriptionKeyboardAlt:`StisknutÃm Alt + Enter zahájÃte pÅetahovánÃ.`,dragDescriptionLongPress:`Dlouhým stisknutÃm zahájÃte pÅetahovánÃ.`,dragDescriptionTouch:`PoklepánÃm zaÄnete s pÅetahovánÃm.`,dragDescriptionVirtual:`KliknutÃm zaÄnete s pÅetahovánÃm.`,dragItem:e=>`P\u{159}et\xe1hnout ${e.itemText}`,dragSelectedItems:(e,t)=>`P\u{159}et\xe1hnout ${t.plural(e.count,{one:()=>`${t.number(e.count)} vybranou polo\u{17E}ku`,few:()=>`${t.number(e.count)} vybran\xe9 polo\u{17E}ky`,other:()=>`${t.number(e.count)} vybran\xfdch polo\u{17E}ek`})}`,dragSelectedKeyboard:(e,t)=>`Stisknut\xedm kl\xe1vesy Enter p\u{159}et\xe1hn\u{11B}te ${t.plural(e.count,{one:()=>`${t.number(e.count)} vybranou polo\u{17E}ku`,other:()=>`${t.number(e.count)} vybran\xe9 polo\u{17E}ky`})}.`,dragSelectedKeyboardAlt:(e,t)=>`Stisknut\xedm Alt + Enter p\u{159}et\xe1hn\u{11B}te ${t.plural(e.count,{one:()=>`${t.number(e.count)} vybranou polo\u{17E}ku`,other:()=>`${t.number(e.count)} vybran\xe9 polo\u{17E}ky`})}.`,dragSelectedLongPress:(e,t)=>`Dlouh\xfdm stisknut\xedm p\u{159}et\xe1hnete ${t.plural(e.count,{one:()=>`${t.number(e.count)} vybranou polo\u{17E}ku`,other:()=>`${t.number(e.count)} vybran\xe9 polo\u{17E}ky`})}.`,dragStartedKeyboard:`ZaÄnÄte s pÅetahovánÃm. Po stisknutà klávesy Tab najdÄte požadovaný cÃl a stisknutÃm klávesy Enter pÅetaženà dokonÄete nebo stisknutÃm klávesy Esc akci zruÅ¡te.`,dragStartedTouch:`ZaÄnÄte s pÅetahovánÃm. NajdÄte požadovaný cÃl a poklepánÃm pÅetaženà dokonÄete.`,dragStartedVirtual:`ZaÄnÄte s pÅetahovánÃm. NajdÄte požadovaný cÃl a kliknutÃm nebo stisknutÃm klávesy Enter pÅetaženà dokonÄete.`,dropCanceled:`PÅetaženà bylo zruÅ¡eno.`,dropComplete:`PÅetaženà bylo dokonÄeno.`,dropDescriptionKeyboard:`StisknutÃm klávesy Enter pÅetaženà dokonÄete nebo stisknutÃm klávesy Esc akci zruÅ¡te.`,dropDescriptionTouch:`PoklepánÃm pÅetaženà dokonÄete.`,dropDescriptionVirtual:`KliknutÃm objekt pÅetáhnÄte.`,dropIndicator:`indikátor pÅetaženÃ`,dropOnItem:e=>`P\u{159}et\xe1hnout na ${e.itemText}`,dropOnRoot:`PÅetáhnout na`,endDragKeyboard:`ProbÃhá pÅetahovánÃ. StisknutÃm klávesy Enter pÅetaženà zruÅ¡Ãte.`,endDragTouch:`ProbÃhá pÅetahovánÃ. PoklepánÃm pÅetaženà zruÅ¡Ãte.`,endDragVirtual:`ProbÃhá pÅetahovánÃ. KliknutÃm pÅetaženà zruÅ¡Ãte.`,insertAfter:e=>`Vlo\u{17E}it za ${e.itemText}`,insertBefore:e=>`Vlo\u{17E}it p\u{159}ed ${e.itemText}`,insertBetween:e=>`Vlo\u{17E}it mezi ${e.beforeItemText} a ${e.afterItemText}`};var yz={};yz={dragDescriptionKeyboard:`Tryk pÃ¥ Enter for at starte med at trække.`,dragDescriptionKeyboardAlt:`Tryk pÃ¥ Alt + Enter for at starte med at trække.`,dragDescriptionLongPress:`Tryk længe for at starte med at trække.`,dragDescriptionTouch:`Dobbelttryk for at starte med at trække.`,dragDescriptionVirtual:`Klik for at starte med at trække.`,dragItem:e=>`Tr\xe6k ${e.itemText}`,dragSelectedItems:(e,t)=>`Tr\xe6k ${t.plural(e.count,{one:()=>`${t.number(e.count)} valgt element`,other:()=>`${t.number(e.count)} valgte elementer`})}`,dragSelectedKeyboard:(e,t)=>`Tryk p\xe5 Enter for at tr\xe6kke ${t.plural(e.count,{one:()=>`${t.number(e.count)} valgte element`,other:()=>`${t.number(e.count)} valgte elementer`})}.`,dragSelectedKeyboardAlt:(e,t)=>`Tryk p\xe5 Alt + Enter for at tr\xe6kke ${t.plural(e.count,{one:()=>`${t.number(e.count)} valgte element`,other:()=>`${t.number(e.count)} valgte elementer`})}.`,dragSelectedLongPress:(e,t)=>`Tryk l\xe6nge for at tr\xe6kke ${t.plural(e.count,{one:()=>`${t.number(e.count)} valgte element`,other:()=>`${t.number(e.count)} valgte elementer`})}.`,dragStartedKeyboard:`Startet med at trække. Tryk pÃ¥ Tab for at gÃ¥ til et slip-mÃ¥l, tryk derefter pÃ¥ Enter for at slippe, eller tryk pÃ¥ Escape for at annullere.`,dragStartedTouch:`Startet med at trække. GÃ¥ til et slip-mÃ¥l, og dobbelttryk derefter for at slippe.`,dragStartedVirtual:`Startet med at trække. GÃ¥ til et slip-mÃ¥l, og klik eller tryk derefter pÃ¥ enter for at slippe.`,dropCanceled:`Slip annulleret.`,dropComplete:`Slip fuldført.`,dropDescriptionKeyboard:`Tryk pÃ¥ Enter for at slippe. Tryk pÃ¥ Escape for at annullere trækning.`,dropDescriptionTouch:`Dobbelttryk for at slippe.`,dropDescriptionVirtual:`Klik for at slippe.`,dropIndicator:`slip-indikator`,dropOnItem:e=>`Slip p\xe5 ${e.itemText}`,dropOnRoot:`Slip pÃ¥`,endDragKeyboard:`Trækning. Tryk pÃ¥ enter for at annullere træk.`,endDragTouch:`Trækning. Dobbelttryk for at annullere træk.`,endDragVirtual:`Trækning. Klik for at annullere trækning.`,insertAfter:e=>`Inds\xe6t efter ${e.itemText}`,insertBefore:e=>`Inds\xe6t f\xf8r ${e.itemText}`,insertBetween:e=>`Inds\xe6t mellem ${e.beforeItemText} og ${e.afterItemText}`};var bz={};bz={dragDescriptionKeyboard:`Drücken Sie die Eingabetaste, um den Ziehvorgang zu starten.`,dragDescriptionKeyboardAlt:`Alt + Eingabe drücken, um den Ziehvorgang zu starten.`,dragDescriptionLongPress:`Lang drücken, um mit dem Ziehen zu beginnen.`,dragDescriptionTouch:`Tippen Sie doppelt, um den Ziehvorgang zu starten.`,dragDescriptionVirtual:`Zum Starten des Ziehvorgangs klicken.`,dragItem:e=>`${e.itemText} ziehen`,dragSelectedItems:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} ausgew\xe4hltes Objekt`,other:()=>`${t.number(e.count)} ausgew\xe4hlte Objekte`})} ziehen`,dragSelectedKeyboard:(e,t)=>`Eingabetaste dr\xfccken, um ${t.plural(e.count,{one:()=>`${t.number(e.count)} ausgew\xe4hltes Element`,other:()=>`${t.number(e.count)} ausgew\xe4hlte Elemente`})} zu ziehen.`,dragSelectedKeyboardAlt:(e,t)=>`Alt + Eingabetaste dr\xfccken, um ${t.plural(e.count,{one:()=>`${t.number(e.count)} ausgew\xe4hltes Element`,other:()=>`${t.number(e.count)} ausgew\xe4hlte Elemente`})} zu ziehen.`,dragSelectedLongPress:(e,t)=>`Lang dr\xfccken, um ${t.plural(e.count,{one:()=>`${t.number(e.count)} ausgew\xe4hltes Element`,other:()=>`${t.number(e.count)} ausgew\xe4hlte Elemente`})} zu ziehen.`,dragStartedKeyboard:`Ziehvorgang gestartet. Drücken Sie die Tabulatortaste, um zu einem Ablegeziel zu navigieren und drücken Sie dann die Eingabetaste, um das Objekt abzulegen, oder Escape, um den Vorgang abzubrechen.`,dragStartedTouch:`Ziehvorgang gestartet. Navigieren Sie zu einem Ablegeziel und tippen Sie doppelt, um das Objekt abzulegen.`,dragStartedVirtual:`Ziehvorgang gestartet. Navigieren Sie zu einem Ablegeziel und klicken Sie oder drücken Sie die Eingabetaste, um das Objekt abzulegen.`,dropCanceled:`Ablegen abgebrochen.`,dropComplete:`Ablegen abgeschlossen.`,dropDescriptionKeyboard:`Drücken Sie die Eingabetaste, um das Objekt abzulegen. Drücken Sie Escape, um den Vorgang abzubrechen.`,dropDescriptionTouch:`Tippen Sie doppelt, um das Objekt abzulegen.`,dropDescriptionVirtual:`Zum Ablegen klicken.`,dropIndicator:`Ablegeanzeiger`,dropOnItem:e=>`Auf ${e.itemText} ablegen`,dropOnRoot:`Ablegen
16auf`,endDragKeyboard:`Ziehvorgang läuft. Drücken Sie die Eingabetaste, um den Vorgang abzubrechen.`,endDragTouch:`Ziehvorgang läuft. Tippen Sie doppelt, um den Vorgang abzubrechen.`,endDragVirtual:`Ziehvorgang läuft. Klicken Sie, um den Vorgang abzubrechen.`,insertAfter:e=>`Nach ${e.itemText} einf\xfcgen`,insertBefore:e=>`Vor ${e.itemText} einf\xfcgen`,insertBetween:e=>`Zwischen ${e.beforeItemText} und ${e.afterItemText} einf\xfcgen`};var xz={};xz={dragDescriptionKeyboard:`ΠαÏήÏÏε Enter για ÎναÏξη ÏÎ·Ï Î¼ÎµÏαÏοÏάÏ.`,dragDescriptionKeyboardAlt:`ΠαÏήÏÏε Alt + Enter για ÎναÏξη ÏÎ·Ï Î¼ÎµÏαÏοÏάÏ.`,dragDescriptionLongPress:`ΠαÏήÏÏε ÏαÏαÏεÏαμÎνα για να ξεκινήÏεÏε Ïη μεÏαÏοÏά.`,dragDescriptionTouch:`ΠαÏήÏÏε δÏο ÏοÏÎÏ Î³Î¹Î± ÎναÏξη ÏÎ·Ï Î¼ÎµÏαÏοÏάÏ.`,dragDescriptionVirtual:`ÎάνÏε κλικ για να ξεκινήÏεÏε Ïη μεÏαÏοÏά.`,dragItem:e=>`\u{39C}\u{3B5}\u{3C4}\u{3B1}\u{3C6}\u{3BF}\u{3C1}\u{3AC} ${e.itemText}`,dragSelectedItems:(e,t)=>`\u{39C}\u{3B5}\u{3C4}\u{3B1}\u{3C6}\u{3BF}\u{3C1}\u{3AC} \u{3C3}\u{3B5} ${t.plural(e.count,{one:()=>`${t.number(e.count)} \u{3B5}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3BF} \u{3C3}\u{3C4}\u{3BF}\u{3B9}\u{3C7}\u{3B5}\u{3AF}\u{3BF}`,other:()=>`${t.number(e.count)} \u{3B5}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3B1} \u{3C3}\u{3C4}\u{3BF}\u{3B9}\u{3C7}\u{3B5}\u{3AF}\u{3B1}`})}`,dragSelectedKeyboard:(e,t)=>`\u{3A0}\u{3B1}\u{3C4}\u{3AE}\u{3C3}\u{3C4}\u{3B5} Enter \u{3B3}\u{3B9}\u{3B1} \u{3BD}\u{3B1} \u{3C3}\u{3CD}\u{3C1}\u{3B5}\u{3C4}\u{3B5} ${t.plural(e.count,{one:()=>`${t.number(e.count)} \u{3B5}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3BF} \u{3C3}\u{3C4}\u{3BF}\u{3B9}\u{3C7}\u{3B5}\u{3AF}\u{3BF}`,other:()=>`${t.number(e.count)} \u{3B5}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3B1} \u{3C3}\u{3C4}\u{3BF}\u{3B9}\u{3C7}\u{3B5}\u{3AF}\u{3B1}`})}.`,dragSelectedKeyboardAlt:(e,t)=>`\u{3A0}\u{3B1}\u{3C4}\u{3AE}\u{3C3}\u{3C4}\u{3B5} Alt + Enter \u{3B3}\u{3B9}\u{3B1} \u{3BD}\u{3B1} \u{3C3}\u{3CD}\u{3C1}\u{3B5}\u{3C4}\u{3B5} ${t.plural(e.count,{one:()=>`${t.number(e.count)} \u{3B5}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3BF} \u{3C3}\u{3C4}\u{3BF}\u{3B9}\u{3C7}\u{3B5}\u{3AF}\u{3BF}`,other:()=>`${t.number(e.count)} \u{3B5}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3B1} \u{3C3}\u{3C4}\u{3BF}\u{3B9}\u{3C7}\u{3B5}\u{3AF}\u{3B1}`})}.`,dragSelectedLongPress:(e,t)=>`\u{3A0}\u{3B1}\u{3C4}\u{3AE}\u{3C3}\u{3C4}\u{3B5} \u{3C0}\u{3B1}\u{3C1}\u{3B1}\u{3C4}\u{3B5}\u{3C4}\u{3B1}\u{3BC}\u{3AD}\u{3BD}\u{3B1} \u{3B3}\u{3B9}\u{3B1} \u{3BD}\u{3B1} \u{3C3}\u{3CD}\u{3C1}\u{3B5}\u{3C4}\u{3B5} ${t.plural(e.count,{one:()=>`${t.number(e.count)} \u{3B5}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3BF} \u{3C3}\u{3C4}\u{3BF}\u{3B9}\u{3C7}\u{3B5}\u{3AF}\u{3BF}`,other:()=>`${t.number(e.count)} \u{3B5}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3B1} \u{3C3}\u{3C4}\u{3BF}\u{3B9}\u{3C7}\u{3B5}\u{3AF}\u{3B1}`})}.`,dragStartedKeyboard:`ΠμεÏαÏοÏά ξεκίνηÏε. ΠαÏήÏÏε Ïο ÏλήκÏÏο Tab για να μεÏαβείÏε Ïε Îναν ÏÏοοÏιÏÎ¼Ï Î±ÏÏθεÏÎ·Ï ÎºÎ±Î¹, ÏÏη ÏÏ
νÎÏεια, ÏαÏήÏÏε Enter για αÏÏθεÏη ή ÏαÏήÏÏε Escape για ακÏÏÏÏη.`,dragStartedTouch:`ΠμεÏαÏοÏά ξεκίνηÏε. ÎεÏαβείÏε Ïε Îναν ÏÏοοÏιÏÎ¼Ï Î±ÏÏθεÏÎ·Ï ÎºÎ±Î¹, ÏÏη ÏÏ
νÎÏεια, ÏαÏήÏÏε δÏο ÏοÏÎÏ Î³Î¹Î± αÏÏθεÏη.`,dragStartedVirtual:`ΠμεÏαÏοÏά ξεκίνηÏε. ÎεÏαβείÏε Ïε Îναν ÏÏοοÏιÏÎ¼Ï Î±ÏÏθεÏÎ·Ï ÎºÎ±Î¹, ÏÏη ÏÏ
νÎÏεια, κάνÏε κλικ ή ÏαÏήÏÏε Enter για αÏÏθεÏη.`,dropCanceled:`ΠαÏÏθεÏη ακÏ
ÏÏθηκε.`,dropComplete:`ΠαÏÏθεÏη ολοκληÏÏθηκε.`,dropDescriptionKeyboard:`ΠαÏήÏÏε Enter για αÏÏθεÏη. ΠαÏήÏÏε Escape για ακÏÏÏÏη ÏÎ·Ï Î¼ÎµÏαÏοÏάÏ.`,dropDescriptionTouch:`ΠαÏήÏÏε δÏο ÏοÏÎÏ Î³Î¹Î± αÏÏθεÏη.`,dropDescriptionVirtual:`ÎάνÏε κλικ για αÏÏθεÏη.`,dropIndicator:`δείκÏÎ·Ï Î±ÏÏθεÏηÏ`,dropOnItem:e=>`\u{391}\u{3C0}\u{3CC}\u{3B8}\u{3B5}\u{3C3}\u{3B7} \u{3C3}\u{3B5} ${e.itemText}`,dropOnRoot:`ÎÏÏθεÏη Ïε`,endDragKeyboard:`ÎεÏαÏοÏά Ïε εξÎλιξη. ΠαÏήÏÏε Enter για ακÏÏÏÏη ÏÎ·Ï Î¼ÎµÏαÏοÏάÏ.`,endDragTouch:`ÎεÏαÏοÏά Ïε εξÎλιξη. ΠαÏήÏÏε δÏο ÏοÏÎÏ Î³Î¹Î± ακÏÏÏÏη ÏÎ·Ï Î¼ÎµÏαÏοÏάÏ.`,endDragVirtual:`ÎεÏαÏοÏά Ïε εξÎλιξη. ÎάνÏε κλικ για ακÏÏÏÏη ÏÎ·Ï Î¼ÎµÏαÏοÏάÏ.`,insertAfter:e=>`\u{395}\u{3B9}\u{3C3}\u{3B1}\u{3B3}\u{3C9}\u{3B3}\u{3AE} \u{3BC}\u{3B5}\u{3C4}\u{3AC} \u{3B1}\u{3C0}\u{3CC} ${e.itemText}`,insertBefore:e=>`\u{395}\u{3B9}\u{3C3}\u{3B1}\u{3B3}\u{3C9}\u{3B3}\u{3AE} \u{3C0}\u{3C1}\u{3B9}\u{3BD} \u{3B1}\u{3C0}\u{3CC} ${e.itemText}`,insertBetween:e=>`\u{395}\u{3B9}\u{3C3}\u{3B1}\u{3B3}\u{3C9}\u{3B3}\u{3AE} \u{3BC}\u{3B5}\u{3C4}\u{3B1}\u{3BE}\u{3CD} ${e.beforeItemText} \u{3BA}\u{3B1}\u{3B9} ${e.afterItemText}`};var Sz={};Sz={dragItem:e=>`Drag ${e.itemText}`,dragSelectedItems:(e,t)=>`Drag ${t.plural(e.count,{one:()=>`${t.number(e.count)} selected item`,other:()=>`${t.number(e.count)} selected items`})}`,dragDescriptionKeyboard:`Press Enter to start dragging.`,dragDescriptionKeyboardAlt:`Press Alt + Enter to start dragging.`,dragDescriptionTouch:`Double tap to
16start dragging.`,dragDescriptionVirtual:`Click to start dragging.`,dragDescriptionLongPress:`Long press to start dragging.`,dragSelectedKeyboard:(e,t)=>`Press Enter to drag ${t.plural(e.count,{one:()=>`${t.number(e.count)} selected item`,other:()=>`${t.number(e.count)} selected items`})}.`,dragSelectedKeyboardAlt:(e,t)=>`Press Alt + Enter to drag ${t.plural(e.count,{one:()=>`${t.number(e.count)} selected item`,other:()=>`${t.number(e.count)} selected items`})}.`,dragSelectedLongPress:(e,t)=>`Long press to drag ${t.plural(e.count,{one:()=>`${t.number(e.count)} selected item`,other:()=>`${t.number(e.count)} selected items`})}.`,dragStartedKeyboard:`Started dragging. Press Tab to navigate to a drop target, then press Enter to drop, or press Escape to cancel.`,dragStartedTouch:`Started dragging. Navigate to a drop target, then double tap to drop.`,dragStartedVirtual:`Started dragging. Navigate to a drop target, then click or press Enter to drop.`,endDragKeyboard:`Dragging. Press Enter to cancel drag.`,endDragTouch:`Dragging. Double tap to cancel drag.`,endDragVirtual:`Dragging. Click to cancel drag.`,dropDescriptionKeyboard:`Press Enter to drop. Press Escape to cancel drag.`,dropDescriptionTouch:`Double tap to drop.`,dropDescriptionVirtual:`Click to drop.`,dropCanceled:`Drop canceled.`,dropComplete:`Drop complete.`,dropIndicator:`drop indicator`,dropOnRoot:`Drop on`,dropOnItem:e=>`Drop on ${e.itemText}`,insertBefore:e=>`Insert before ${e.itemText}`,insertBetween:e=>`Insert between ${e.beforeItemText} and ${e.afterItemText}`,insertAfter:e=>`Insert after ${e.itemText}`};var Cz={};Cz={dragDescriptionKeyboard:`Pulse Intro para empezar a arrastrar.`,dragDescriptionKeyboardAlt:`Pulse Intro para empezar a arrastrar.`,dragDescriptionLongPress:`Mantenga pulsado para comenzar a arrastrar.`,dragDescriptionTouch:`Pulse dos veces para iniciar el arrastre.`,dragDescriptionVirtual:`Haga clic para iniciar el arrastre.`,dragItem:e=>`Arrastrar ${e.itemText}`,dragSelectedItems:(e,t)=>`Arrastrar ${t.plural(e.count,{one:()=>`${t.number(e.count)} elemento seleccionado`,other:()=>`${t.number(e.count)} elementos seleccionados`})}`,dragSelectedKeyboard:(e,t)=>`Pulse Intro para arrastrar ${t.plural(e.count,{one:()=>`${t.number(e.count)} elemento seleccionado`,other:()=>`${t.number(e.count)} elementos seleccionados`})}.`,dragSelectedKeyboardAlt:(e,t)=>`Pulse Alt + Intro para arrastrar ${t.plural(e.count,{one:()=>`${t.number(e.count)} elemento seleccionado`,other:()=>`${t.number(e.count)} elementos seleccionados`})}.`,dragSelectedLongPress:(e,t)=>`Mantenga pulsado para arrastrar ${t.plural(e.count,{one:()=>`${t.number(e.count)} elemento seleccionado`,other:()=>`${t.number(e.count)} elementos seleccionados`})}.`,dragStartedKeyboard:`Se ha empezado a arrastrar. Pulse el tabulador para ir al destino donde se vaya a colocar y, a continuación, pulse Intro para soltar, o pulse Escape para cancelar.`,dragStartedTouch:`Se ha empezado a arrastrar. Vaya al destino donde se vaya a colocar y, a continuación, pulse dos veces para soltar.`,dragStartedVirtual:`Se ha empezado a arrastrar. Vaya al destino donde se vaya a colocar y, a continuación, haga clic o pulse Intro para soltar.`,dropCanceled:`Se ha cancelado la colocación.`,dropComplete:`Colocación finalizada.`,dropDescriptionKeyboard:`Pulse Intro para soltar. Pulse Escape para cancelar el arrastre.`,dropDescriptionTouch:`Pulse dos veces para soltar.`,dropDescriptionVirtual:`Haga clic para soltar.`,dropIndicator:`indicador de colocación`,dropOnItem:e=>`Soltar en ${e.itemText}`,dropOnRoot:`Soltar en`,endDragKeyboard:`Arrastrando. Pulse Intro para cancelar el arrastre.`,endDragTouch:`Arrastrando. Pulse dos veces para cancelar el arrastre.`,endDragVirtual:`Arrastrando. Haga clic para cancelar el arrastre.`,insertAfter:e=>`Insertar despu\xe9s de ${e.itemText}`,insertBefore:e=>`Insertar antes de ${e.itemText}`,insertBetween:e=>`Insertar entre ${e.beforeItemText} y ${e.afterItemText}`};var wz={};wz={dragDescriptionKeyboard:`Lohistamise alustamiseks vajutage klahvi Enter.`,dragDescriptionKeyboardAlt:`Lohistamise alustamiseks vajutage klahvikombinatsiooni Alt + Enter.`,dragDescriptionLongPress:`Vajutage pikalt lohistamise alustamiseks.`,dragDescriptionTouch:`Topeltpuudutage lohistamise alustamiseks.`,dragDescriptionVirtual:`Klõpsake lohistamise alustamiseks.`,dragItem:e=>`Lohista ${e.itemText}`,dragSelectedItems:(e,t)=>`Lohista ${t.plural(e.count,{one:()=>`${t.number(e.count)} valitud \xfcksust`,other:()=>`${t.number(e.count)} valitud \xfcksust`})}`,dragSelectedKeyboard:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} valitud \xfcksuse`,other:()=>`${t.number(e.count)} valitud \xfcksuse`})} lohistamiseks vajutage sisestusklahvi Enter.`,dragSelectedKeyboardAlt:(e,t)=>`Lohistamiseks vajutage klahvikombinatsiooni Alt + Enter ${t.plural(e.count,{one:()=>`${t.number(e.count)} valitud \xfcksuse`,other:()=>`${t.number(e.count)} valitud \xfcksuse`})} jaoks.`,dragSelectedLongPress:(e,t)=>`Pikk vajutus ${t.plural(e.count,{one:()=>`${t.number(e.count)} valitud \xfcksuse`,other:()=>`${t.number(e.count)} valitud \xfcksuse`})} lohistamiseks.`,dragStartedKeyboard:`Alustati lohistamist. Kukutamise sihtmärgi juurde navigeerimiseks vajutage klahvi Tab, seejärel vajutage kukutamiseks klahvi Enter või loobumiseks klahvi Escape.`,dragStartedTouch:`Alustati lohistamist. Navigeerige kukutamise sihtmärgi juurde ja topeltpuudutage kukutamiseks.`,dragStartedVirtual:`Alustati lohistamist. Navigeerige kukutamise sihtmärgi juurde ja kukutamiseks klõpsake või vajutage klahvi Enter.`,dropCanceled:`Lohistamisest loobuti.`,dropComplete:`Lohistamine on tehtud.`,dropDescriptionKeyboard:`Kukutamiseks vajutage klahvi Enter. Lohistamisest loobumiseks vajutage klahvi Escape.`,dropDescriptionTouch:`Kukutamiseks topeltpuudutage.`,dropDescriptionVirtual:`Kukutamiseks klõpsake.`,dropIndicator:`lohistamise indikaator`,dropOnItem:e=>`Kukuta asukohta ${e.itemText}`,dropOnRoot:`Kukuta asukohta`,endDragKeyboard:`Lohistamine. Lohistamisest loobumiseks vajutage klahvi Enter.`,endDragTouch:`Lohistamine. Lohistamisest loobumiseks topeltpuudutage.`,endDragVirtual:`Lohistamine. Lohistamisest loobumiseks klõpsake.`,insertAfter:e=>`Sisesta ${e.itemText} j\xe4rele`,insertBefore:e=>`Sisesta ${e.itemText} ette`,insertBetween:e=>`Sisesta ${e.beforeItemText} ja ${e.afterItemText} vahele`};var Tz={};Tz={dragDescriptionKeyboard:`Aloita vetäminen painamalla Enter-näppäintä.`,dragDescriptionKeyboardAlt:`Aloita vetäminen painamalla Alt + Enter -näppäinyhdistelmää.`,dragDescriptionLongPress:`Aloita vetäminen pitämällä painettuna.`,dragDescriptionTouch:`Aloita vetäminen kaksoisnapauttamalla.`,dragDescriptionVirtual:`Aloita vetäminen napsauttamalla.`,dragItem:e=>`Ved\xe4 kohdetta ${e.itemText}`,dragSelectedItems:(e,t)=>`Ved\xe4 ${t.plural(e.count,{one:()=>`${t.number(e.count)} valittua kohdetta`,other:()=>`${t.number(e.count)} valittua kohdetta`})}`,dragSelectedKeyboard:(e,t)=>`Ved\xe4 painamalla Enter ${t.plural(e.count,{one:()=>`${t.number(e.count)} valittu kohde`,other:()=>`${t.number(e.count)} valittua kohdetta`})}.`,dragSelectedKeyboardAlt:(e,t)=>`Ved\xe4 painamalla Alt + Enter ${t.plural(e.count,{one:()=>`${t.number(e.count)} valittu kohde`,other:()=>`${t.number(e.count)} valittua kohdetta`})}.`,dragSelectedLongPress:(e,t)=>`Ved\xe4 pit\xe4m\xe4ll\xe4 painettuna ${t.plural(e.count,{one:()=>`${t.number(e.count)} valittu kohde`,other:()=>`${t.number(e.count)} valittua kohdetta`})}.`,dragStartedKeyboard:`Vetäminen aloitettu. Siirry pudotuskohteeseen painamalla sarkainnäppäintä ja sitten pudota painamalla Enter-näppäintä tai peruuta painamalla Escape-näppäintä.`,dragStartedTouch:`Vetäminen aloitettu. Siirry pudotuskohteeseen ja pudota kaksoisnapauttamalla.`,dragStartedVirtual:`Vetäminen aloitettu. Siirry pudotuskohteeseen ja pudota napsauttamalla tai painamalla Enter-näppäintä.`,dropCanceled:`Pudotus peruutettu.`,dropComplete:`Pudotus suoritettu.`,dropDescriptionKeyboard:`Pudota painamalla Enter-näppäintä. Peruuta vetäminen painamalla Escape-näppäintä.`,dropDescriptionTouch:`Pudota kaksoisnapauttamalla.`,dropDescriptionVirtual:`Pudota napsauttamalla.`,dropIndicator:`pudotuksen ilmaisin`,dropOnItem:e=>`Pudota kohteeseen ${e.itemText}`,dropOnRoot:`Pudota kohteeseen`,endDragKeyboard:`Vedetään. Peruuta vetäminen painamalla Enter-näppäintä.`,endDragTouch:`Vedetään. Peruuta vetäminen kaksoisnapauttamalla.`,endDragVirtual:`Vedetään. Peruuta vetäminen napsauttamalla.`,insertAfter:e=>`Lis\xe4\xe4 kohteen ${e.itemText} j\xe4lkeen`,insertBefore:e=>`Lis\xe4\xe4 ennen kohdetta ${e.itemText}`,insertBetween:e=>`Lis\xe4\xe4 kohteiden ${e.beforeItemText} ja ${e.afterItemText} v\xe4liin`};var Ez={};Ez={dragDescriptionKeyboard:`Appuyez sur Entrée pour commencer le déplacement.`,dragDescriptionKeyboardAlt:`Appuyez sur Alt\xA0+\xA0Entrée pour commencer à faire glisser.`,dragDescriptionLongPress:`Appuyez de manière prolongée pour commencer à faire glisser.`,dragDescriptionTouch:`Touchez deux fois pour commencer le déplacement.`,dragDescriptionVirtual:`Cliquez pour commencer le déplacement.`,dragItem:e=>`D\xe9placer ${e.itemText}`,dragSelectedItems:(e,t)=>`D\xe9placer ${t.plural(e.count,{one:()=>`${t.number(e.count)} \xe9l\xe9ment s\xe9lectionn\xe9`,other:()=>`${t.number(e.count)} \xe9l\xe9ments s\xe9lectionn\xe9s`})}`,dragSelectedKeyboard:(e,t)=>`Appuyez sur Entr\xe9e pour faire glisser ${t.plural(e.count,{one:()=>`${t.number(e.count)} \xe9l\xe9ment s\xe9lectionn\xe9`,other:()=>`${t.number(e.count)} \xe9l\xe9ments s\xe9lectionn\xe9s`})}.`,dragSelectedKeyboardAlt:(e,t)=>`Appuyez sur Alt\xa0+\xa0Entr\xe9e pour faire glisser ${t.plural(e.count,{one:()=>`${t.number(e.count)} \xe9l\xe9ment s\xe9lectionn\xe9`,other:()=>`${t.number(e.count)} \xe9l\xe9ments s\xe9lectionn\xe9s`})}.`,dragSelectedLongPress:(e,t)=>`Appuyez de mani\xe8re prolong\xe9e pour faire glisser ${t.plural(e.count,{one:()=>`${t.number(e.count)} \xe9l\xe9ment s\xe9lectionn\xe9`,other:()=>`${t.number(e.count)} \xe9l\xe9ments s\xe9lectionn\xe9s`})}.`,dragStartedKeyboard:`Déplacement commencé. Appuyez sur Tabulation pour accéder à une cible de dépôt, puis appuyez sur Entrée pour déposer, ou appuyez sur Ãchap pour annuler.`,dragStartedTouch:`Déplacement commencé. Accédez à une cible de dépôt, puis touchez deux fois pour déposer.`,dragStartedVirtual:`Déplacement commencé. Accédez à une cible de dépôt, puis cliquez ou appuyez sur Entrée pour déposer.`,dropCanceled:`Dépôt annulé.`,dropComplete:`Dépôt terminé.`,dropDescriptionKeyboard:`Appuyez sur Entrée pour déposer. Appuyez sur Ãchap pour annuler le déplacement.`,dropDescriptionTouch:`Touchez deux fois pour déposer.`,dropDescriptionVirtual:`Cliquez pour déposer.`,dropIndicator:`indicateur de dépôt`,dropOnItem:e=>`D\xe9poser sur ${e.itemText}`,dropOnRoot:`Déposer sur`,endDragKeyboard:`Déplacement. Appuyez sur Entrée pour annuler le déplacement.`,endDragTouch:`Déplacement. Touchez deux fois pour annuler le déplacement.`,endDragVirtual:`Déplacement. Cliquez pour annuler le déplacement.`,insertAfter:e=>`Ins\xe9rer apr\xe8s ${e.itemText}`,insertBefore:e=>`Ins\xe9rer avant ${e.itemText}`,insertBetween:e=>`Ins\xe9rer entre ${e.beforeItemText} et ${e.afterItemText}`};var Dz={};Dz={dragDescriptionKeyboard:`×קש ×¢× Enter ××× ××ת××× ××ר×ר.`,dragDescriptionKeyboardAlt:`×קש Alt + Enter ××× ××ת××× ××ר×ר.`,dragDescriptionLongPress:`×××¥ ××××¦× ×ר××× ××× ××ת××× ××ר×ר.`,dragDescriptionTouch:`×קש פע×××× ××× ××ת××× ××ר×ר×.`,dragDescriptionVirtual:`×××¥ ××× ××ת××× ××ר×ר.`,dragItem:e=>`\u{5D2}\u{5E8}\u{5D5}\u{5E8} \u{5D0}\u{5EA} ${e.itemText}`,dragSelectedItems:(e,t)=>`\u{5D2}\u{5E8}\u{5D5}\u{5E8} ${t.plural(e.count,{one:()=>`\u{5E4}\u{5E8}\u{5D9}\u{5D8} \u{5E0}\u{5D1}\u{5D7}\u{5E8} ${t.number(e.count)}`,other:()=>`${t.number(e.count)} \u{5E4}\u{5E8}\u{5D9}\u{5D8}\u{5D9}
16\u{5DD} \u{5E9}\u{5E0}\u{5D1}\u{5D7}\u{5E8}\u{5D5}`})}`,dragSelectedKeyboard:(e,t)=>`\u{5D4}\u{5E7}\u{5E9} \u{5E2}\u{5DC} Enter \u{5DB}\u{5D3}\u{5D9} \u{5DC}\u{5D2}\u{5E8}\u{5D5}\u{5E8} ${t.plural(e.count,{one:()=>`${t.number(e.count)} \u{5E4}\u{5E8}\u{5D9}\u{5D8} \u{5E9}\u{5E0}\u{5D1}\u{5D7}\u{5E8}`,other:()=>`${t.number(e.count)} \u{5E4}\u{5E8}\u{5D9}\u{5D8}\u{5D9}\u{5DD} \u{5E9}\u{5E0}\u{5D1}\u{5D7}\u{5E8}\u{5D5}`})}.`,dragSelectedKeyboardAlt:(e,t)=>`\u{5D4}\u{5E7}\u{5E9} Alt + Enter \u{5DB}\u{5D3}\u{5D9} \u{5DC}\u{5D2}\u{5E8}\u{5D5}\u{5E8} ${t.plural(e.count,{one:()=>`${t.number(e.count)} \u{5E4}\u{5E8}\u{5D9}\u{5D8} \u{5E9}\u{5E0}\u{5D1}\u{5D7}\u{5E8}`,other:()=>`${t.number(e.count)} \u{5E4}\u{5E8}\u{5D9}\u{5D8}\u{5D9}\u{5DD} \u{5E9}\u{5E0}\u{5D1}\u{5D7}\u{5E8}\u{5D5}`})}.`,dragSelectedLongPress:(e,t)=>`\u{5DC}\u{5D7}\u{5E5} \u{5DC}\u{5D7}\u{5D9}\u{5E6}\u{5D4} \u{5D0}\u{5E8}\u{5D5}\u{5DB}\u{5D4} \u{5DB}\u{5D3}\u{5D9} \u{5DC}\u{5D2}\u{5E8}\u{5D5}\u{5E8} ${t.plural(e.count,{one:()=>`${t.number(e.count)} \u{5E4}\u{5E8}\u{5D9}\u{5D8} \u{5E9}\u{5E0}\u{5D1}\u{5D7}\u{5E8}`,other:()=>`${t.number(e.count)} \u{5E4}\u{5E8}\u{5D9}\u{5D8}\u{5D9}\u{5DD} \u{5E9}\u{5E0}\u{5D1}\u{5D7}\u{5E8}\u{5D5}`})}.`,dragStartedKeyboard:`×ת××ת ××ר×ר. ×קש ×¢× Tab ××× ×× ××× ×× ×§××ת ××ר××¨× ××××ר ××× ×קש ×¢× Enter ××× ×ש×רר ×× ×¢× Escape ××× ××××.`,dragStartedTouch:`×ת××ת ××ר×ר. × ××× ×× ×§××ת ×ש×ר×ר ××××ר ××× ×קש פע×××× ××× ×ש×רר.`,dragStartedVirtual:`×ת××ת ××ר×ר. × ××× ×× ×§××ת ×ש×ר×ר ××××ר ××× ×××¥ ×× ×קש ×¢× Enter ××× ×ש×רר.`,dropCanceled:`×ש×ר×ר ××××.`,dropComplete:`×ש×ר×ר ××ש××.`,dropDescriptionKeyboard:`×קש ×¢× Enter ××× ×ש×רר. ×קש ×¢× Escape ××× ×××× ×ת ××ר×ר×.`,dropDescriptionTouch:`×קש פע×××× ××× ×ש×רר.`,dropDescriptionVirtual:`×××¥ ××× ×ש×רר.`,dropIndicator:`××××× ×©×ר×ר`,dropOnItem:e=>`\u{5E9}\u{5D7}\u{5E8}\u{5E8} \u{5E2}\u{5DC} ${e.itemText}`,dropOnRoot:`ש×רר ×¢×`,endDragKeyboard:`××רר. ×קש ×¢× Enter ××× ×××× ×ת ××ר×ר×.`,endDragTouch:`××רר. ×קש פע×××× ××× ×××× ×ת ××ר×ר×.`,endDragVirtual:`××רר. ×××¥ ××× ×××× ×ת ××ר×ר×.`,insertAfter:e=>`\u{5D4}\u{5D5}\u{5E1}\u{5E3} \u{5D0}\u{5D7}\u{5E8}\u{5D9} ${e.itemText}`,insertBefore:e=>`\u{5D4}\u{5D5}\u{5E1}\u{5E3} \u{5DC}\u{5E4}\u{5E0}\u{5D9} ${e.itemText}`,insertBetween:e=>`\u{5D4}\u{5D5}\u{5E1}\u{5E3} \u{5D1}\u{5D9}\u{5DF} ${e.beforeItemText} \u{5DC}\u{5D1}\u{5D9}\u{5DF} ${e.afterItemText}`};var Oz={};Oz={dragDescriptionKeyboard:`Pritisnite Enter da biste poÄeli povlaÄiti.`,dragDescriptionKeyboardAlt:`Pritisnite Alt + Enter za poÄetak povlaÄenja.`,dragDescriptionLongPress:`Dugo pritisnite za poÄetak povlaÄenja.`,dragDescriptionTouch:`Dvaput dodirnite da biste poÄeli povlaÄiti.`,dragDescriptionVirtual:`Kliknite da biste poÄeli povlaÄiti.`,dragItem:e=>`Povucite stavku ${e.itemText}`,dragSelectedItems:(e,t)=>`Povucite ${t.plural(e.count,{one:()=>`${t.number(e.count)} odabranu stavku`,other:()=>`ovoliko odabranih stavki: ${t.number(e.count)}`})}`,dragSelectedKeyboard:(e,t)=>`Pritisnite Enter za povla\u{10D}enje ${t.plural(e.count,{one:()=>`${t.number(e.count)} odabrana stavka`,other:()=>`${t.number(e.count)} odabrane stavke`})}.`,dragSelectedKeyboardAlt:(e,t)=>`Pritisnite Alt + Enter za povla\u{10D}enje ${t.plural(e.count,{one:()=>`${t.number(e.count)} odabrana stavka`,other:()=>`${t.number(e.count)} odabrane stavke`})}.`,dragSelectedLongPress:(e,t)=>`Dugo pritisnite za povla\u{10D}enje ${t.plural(e.count,{one:()=>`${t.number(e.count)} odabrana stavka`,other:()=>`${t.number(e.count)} odabrane stavke`})}.`,dragStartedKeyboard:`PoÄeli ste povlaÄiti. Pritisnite tipku tabulatora da biste doÅ¡li do cilja ispuÅ¡tanja, a zatim Enter da biste ispustili stavku ili Escape da biste prekinuli povlaÄenje.`,dragStartedTouch:`PoÄeli ste povlaÄiti. DoÄite do cilja ispuÅ¡tanja, a zatim dva
16put dodirnite da biste ispustili stavku.`,dragStartedVirtual:`PoÄeli ste povlaÄiti. DoÄite do cilja ispuÅ¡tanja, a zatim kliknite ili pritisnite Enter da biste ispustili stavku.`,dropCanceled:`PovlaÄenje je prekinuto.`,dropComplete:`IspuÅ¡tanje je dovrÅ¡eno.`,dropDescriptionKeyboard:`Pritisnite Enter da biste ispustili stavku. Pritisnite Escape da biste prekinuli povlaÄenje.`,dropDescriptionTouch:`Dvaput dodirnite da biste ispustili stavku.`,dropDescriptionVirtual:`Kliknite da biste ispustili stavku.`,dropIndicator:`pokazatelj ispuÅ¡tanja`,dropOnItem:e=>`Ispustite na stavku ${e.itemText}`,dropOnRoot:`Ispustite na`,endDragKeyboard:`PovlaÄenje. Pritisnite Enter da biste prekinuli povlaÄenje.`,endDragTouch:`PovlaÄenje. Dvaput dodirnite da biste prekinuli povlaÄenje.`,endDragVirtual:`PovlaÄenje. Kliknite da biste prekinuli povlaÄenje.`,insertAfter:e=>`Umetnite iza stavke ${e.itemText}`,insertBefore:e=>`Ispustite ispred stavke ${e.itemText}`,insertBetween:e=>`Umetnite izme\u{111}u stavki ${e.beforeItemText} i ${e.afterItemText}`};var kz={};kz={dragDescriptionKeyboard:`Nyomja le az Enter billentyűt a húzás megkezdéséhez.`,dragDescriptionKeyboardAlt:`Nyomja le az Alt + Enter billentyűket a húzás megkezdéséhez.`,dragDescriptionLongPress:`Hosszan nyomja meg a húzás elindÃtásához.`,dragDescriptionTouch:`Koppintson duplán a húzás megkezdéséhez.`,dragDescriptionVirtual:`Kattintson a húzás megkezdéséhez.`,dragItem:e=>`${e.itemText} h\xfaz\xe1sa`,dragSelectedItems:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} kijel\xf6lt elem`,other:()=>`${t.number(e.count)} kijel\xf6lt elem`})} h\xfaz\xe1sa`,dragSelectedKeyboard:(e,t)=>`Nyomja meg az Entert ${t.plural(e.count,{one:()=>`${t.number(e.count)} kijel\xf6lt elem`,other:()=>`${t.number(e.count)} kijel\xf6lt elem`})} h\xfaz\xe1s\xe1hoz.`,dragSelectedKeyboardAlt:(e,t)=>`Nyomja meg az Alt + Enter billenty\u{171}ket ${t.plural(e.count,{one:()=>`${t.number(e.count)} kijel\xf6lt elem`,other:()=>`${t.number(e.count)} kijel\xf6lt elem`})} h\xfaz\xe1s\xe1hoz.`,dragSelectedLongPress:(e,t)=>`Tartsa lenyomva hosszan ${t.plural(e.count,{one:()=>`${t.number(e.count)} kijel\xf6lt elem`,other:()=>`${t.number(e.count)} kijel\xf6lt elem`})} h\xfaz\xe1s\xe1hoz.`,dragStartedKeyboard:`Húzás megkezdve. Nyomja le a Tab billentyűt az elengedési célhoz navigálásához, majd nyomja le az Enter billentyűt az elengedéshez, vagy nyomja le az Escape billentyűt a megszakÃtáshoz.`,dragStartedTouch:`Húzás megkezdve. Navigáljon egy elengedési célhoz, majd koppintson duplán az elengedéshez.`,dragStartedVirtual:`Húzás megkezdve. Navigáljon egy elengedési célhoz, majd kattintson vagy nyomja le az Enter billentyűt az elengedéshez.`,dropCanceled:`Elengedés megszakÃtva.`,dropComplete:`Elengedés teljesÃtve.`,dropDescriptionKeyboard:`Nyomja le az Enter billentyűt az elengedéshez. Nyomja le az Escape billentyűt a húzás megszakÃtásához.`,dropDescriptionTouch:`Koppintson duplán az elengedéshez.`,dropDescriptionVirtual:`Kattintson az elengedéshez.`,dropIndicator:`elengedésjelzÅ`,dropOnItem:e=>`Elenged\xe9s erre: ${e.itemText}`,dropOnRoot:`Elengedés erre:`,endDragKeyboard:`Húzás folyamatban. Nyomja le az Enter billentyűt a húzás megszakÃtásához.`,endDragTouch:`Húzás folyamatban. Koppintson duplán a húzás megszakÃtásához.`,endDragVirtual:`Húzás folyamatban. Kattintson a húzás megszakÃtásához.`,insertAfter:e=>`Besz\xfar\xe1s ${e.itemText} ut\xe1n`,insertBefore:e=>`Besz\xfar\xe1s ${e.itemText} el\xe9`,insertBetween:e=>`Besz\xfar\xe1s ${e.beforeItemText} \xe9s ${e.afterItemText} k\xf6z\xe9`};var Az={};Az={dragDescriptionKeyboard:`Premi Invio per iniziare a trascinare.`,dragDescriptionKeyboardAlt:`Premi Alt + Invio per iniziare a trascinare.`,dragDescriptionLongPress:`Premi a lungo per iniziare a trascinare.`,dragDescriptionTouch:`Tocca due volte per iniziare a trascinare.`,dragDescriptionVirtual:`Fai clic per iniziare a trascinare.`,dragItem:e=>`Trascina ${e.itemText}`,dragSelectedItems:(e,t)=>`Trascina ${t.plural(e.count,{one:()=>`${t.number(e.count)} altro elemento selezionato`,other:()=>`${t.number(e.count)} altri elementi selezionati`})}`,dragSelectedKeyboard:(e,t)=>`Premi Invio per trascinare ${t.plural(e.count,{one:()=>`${t.number(e.count)} elemento selezionato`,other:()=>`${t.number(e.count)} elementi selezionati`})}.`,dragSelectedKeyboardAlt:(e,t)=>`Premi Alt + Invio per trascinare ${t.plural(e.count,{one:()=>`${t.number(e.count)} elemento selezionato`,other:()=>`${t.number(e.count)} elementi selezionati`})}.`,dragSelectedLongPress:(e,t)=>`Premi a lungo per trascinare ${t.plural(e.count,{one:()=>`${t.number(e.count)} elemento selezionato`,other:()=>`${t.number(e.count)} elementi selezionati`})}.`,dragStartedKeyboard:`Hai iniziato a trascinare. Premi Tab per arrivare sullâarea di destinazione, quindi premi Invio per rilasciare o Esc per annullare.`,dragStartedTouch:`Hai iniziato a trascinare. Arriva sullâarea di destinazione, quindi tocca due volte per rilasciare.`,dragStartedVirtual:`Hai iniziato a trascinare. Arriva sullâarea di destinazione, quindi fai clic o premi Invio per rilasciare.`,dropCanceled:`Rilascio annullato.`,dropComplete:`Rilascio completato.`,dropDescriptionKeyboard:`Premi Invio per rilasciare. Premi Esc per annullare.`,dropDescriptionTouch:`Tocca due volte per rilasciare.`,dropDescriptionVirtual:`Fai clic per rilasciare.`,dropIndicator:`indicatore di rilascio`,dropOnItem:e=>`Rilascia su ${e.itemText}`,dropOnRoot:`Rilascia su`,endDragKeyboard:`Trascinamento. Premi Invio per annullare.`,endDragTouch:`Trascinamento. Tocca due volte per annullare.`,endDragVirtual:`Trascinamento. Fai clic per annullare.`,insertAfter:e=>`Inserisci dopo ${e.itemText}`,insertBefore:e=>`Inserisci prima di ${e.itemText}`,insertBetween:e=>`Inserisci tra ${e.beforeItemText} e ${e.afterItemText}`};var jz={};jz={dragDescriptionKeyboard:`Enter ãã¼ãæ¼ãã¦ãã©ãã°ãéå§ãã¦ãã ããã`,dragDescriptionKeyboardAlt:`Alt+Enter ãã¼ãæ¼ãã¦ãã©ãã°ãéå§ãã¾ãã`,dragDescriptionLongPress:`é·æ¼ããã¦ãã©ãã°ãéå§ãã¾ãã`,dragDescriptionTouch:`ããã«ã¿ãããã¦ãã©ãã°ãéå§ãã¾ãã`,dragDescriptionVirtual:`ã¯ãªãã¯ãã¦ãã©ãã°ãéå§ãã¾ãã`,dragItem:e=>`${e.itemText} \u{3092}\u{30C9}\u{30E9}\u{30C3}\u{30B0}`,dragSelectedItems:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} \u{500B}\u{306E}\u{9078}\u{629E}\u{9805}\u{76EE}`,other:()=>`${t.number(e.count)} \u{500B}\u{306E}\u{9078}\u{629E}\u{9805}\u{76EE}`})} \u{3092}\u{30C9}\u{30E9}\u{30C3}\u{30B0}`,dragSelectedKeyboard:(e,t)=>`Enter \u{30AD}\u{30FC}\u{3092}\u{62BC}\u{3057}\u{3066}\u{3001}${t.plural(e.count,{one:()=>`${t.number(e.count)} \u{9078}\u{629E}\u{3057}\u{305F}\u{9805}\u{76EE}`,other:()=>`${t.number(e.count)} \u{9078}\u{629E}\u{3057}\u{305F}\u{9805}\u{76EE}`})}\u{3092}\u{30C9}\u{30E9}\u{30C3}\u{30B0}\u{3057}\u{307E}\u{3059}\u{3002}`,dragSelectedKeyboardAlt:(e,t)=>`Alt+Enter \u{30AD}\u{30FC}\u{3092}\u{62BC}\u{3057}\u{3066}\u{3001}${t.plural(e.count,{one:()=>`${t.number(e.count)} \u{9078}\u{629E}\u{3057}\u{305F}\u{9805}\u{76EE}`,other:()=>`${t.number(e.count)} \u{9078}\u{629E}\u{3057}\u{305F}\u{9805}\u{76EE}`})}\u{3092}\u{30C9}\u{30E9}\u{30C3}\u{30B0}\u{3057}\u{307E}\u{3059}\u{3002}`,dragSelectedLongPress:(e,t)=>`\u{9577}\u{62BC}\u{3057}\u{3057}\u{3066}\u{3001}${t.plural(e.count,{one:()=>`${t.number(e.count)} \u{9078}\u{629E}\u{3057}\u{305F}\u{9805}\u{76EE}`,other:()=>`${t.number(e.count)} \u{9078}\u{629E}\u{3057}\u{305F}\u{9805}\u{76EE}`})}\u{3092}\u{30C9}\u{30E9}\u{30C3}\u{30B0}\u{3057}\u{307E}\u{3059}\u{3002}`,dragStartedKeyboard:`ãã©ãã°ãéå§ãã¾ããTab ãã¼ãæ¼ãã¦ããããã¿ã¼ã²ããã«ãã©ãããEnter ãã¼ãæ¼ãã¦ããããããããEsc ãã¼ãæ¼ãã¦ãã£ã³ã»ã«ãã¾ãã`,dragStartedTouch:`ãã©ãã°ãéå§ãã¾ãããããããã®ã¿ã¼ã²ããã«ç§»åããããã«ã¿ãããã¦ãããããã¾ãã`,dragStartedVirtual:`ãã©ãã°ãéå§ãã¾ãããããããã®ã¿ã¼ã²ããã«ç§»åããã¯ãªãã¯ã¾ã㯠Enter ãã¼ãæ¼ãã¦ãããããã¾ãã`,dropCanceled:`ããããããã£ã³ã»ã«ããã¾ããã`,dropComplete:`ãããããå®äºãã¾ããã`,dropDescriptionKeyboard:`Enter ãã¼ãæ¼ãã¦ãããããã¾ããEsc ãã¼ãæ¼ãã¦ãã©ãã°ããã£ã³ã»ã«ãã¾ãã`,dropDescriptionTouch:`ããã«ã¿ãããã¦ãããããã¾ãã`,dropDescriptionVirtual:`ã¯ãªãã¯ãã¦ãããããã¾ãã`,dropIndicator:`ããããã¤ã³ã¸ã±ã¼ã¿ã¼`,dropOnItem:e=>`${e.itemText} \u{306B}\u{30C9}\u{30ED}\u{30C3}\u{30D7}`,dropOnRoot:`ããããå ´æ`,endDragKeyboard:`ãã©ãã°ãã¦ãã¾ããEnter ãã¼ãæ¼ãã¦ãã©ãã°ããã£ã³ã»ã«ãã¾ãã`,endDragTouch:`ãã©ãã°ãã¦ãã¾ããããã«ã¿ãããã¦ãã©ãã°ããã£ã³ã»ã«ãã¾ãã`,endDragVirtual:`ãã©ãã°ãã¦ãã¾ããã¯ãªãã¯ãã¦ãã©ãã°ããã£ã³ã»ã«ãã¾ãã`,insertAfter:e=>`${e.itemText} \u{306E}\u{5F8C}\u{306B}\u{633F}\u{5165}`,insertBefore:e=>`${e.itemText} \u{306E}\u{524D}\u{306B}\u{633F}\u{5165}`,insertBetween:e=>`${e.beforeItemText} \u{3068} ${e.afterItemText} \u{306E}\u{9593}\u{306B}\u{633F}\u{5165}`};var Mz={};Mz={dragDescriptionKeyboard:`ëë그를 ììíë ¤ë©´ Enter를 ë르ì¸ì.`,dragDescriptionKeyboardAlt:`ëë그를 ììíë ¤ë©´ Alt + Enter를 ë르ììì¤.`,dragDescriptionLongPress:`ëë그를 ììíë ¤ë©´ ê¸¸ê² ë르ììì¤.`,dragDescriptionTouch:`ëë그를 ììíë ¤ë©´ ëë¸ ííì¸ì.`,dragDescriptionVirtual:`ëë그를 ììíë ¤ë©´ í´ë¦íì¸ì.`,dragItem:e=>`${e.itemText} \u{B4DC}\u{B798}\u{ADF8}`,dragSelectedItems:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)}\u{AC1C} \u{C120}\u{D0DD} \u{D56D}\u{BAA9}`,other:()=>`${t.number(e.count)}\u{AC1C} \u{C120}\u{D0DD} \u{D56D}\u{BAA9}`})} \u{B4DC}\u{B798}\u{ADF8}`,dragSelectedKeyboard:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)}\u{AC1C} \u{C120}\u{D0DD} \u{D56D}\u{BAA9}`,other:()=>`${t.number(e.count)}\u{AC1C} \u{C120}\u{D0DD} \u{D56D}\u{BAA9}`})}\u{C744} \u{B4DC}\u{B798}\u{ADF8}\u{D558}\u{B824}\u{BA74} Enter\u{B97C} \u{B204}\u{B974}\u{C2ED}\u{C2DC}\u{C624}.`,dragSelectedKeyboardAlt:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)}\u{AC1C} \u{C120}\u{D0DD} \u{D56D}\u{BAA9}`,other:()=>`${t.number(e.count)}\u{AC1C} \u{C120}\u{D0DD} \u{D56D}\u{BAA9}`})}\u{C744} \u{B4DC}\u{B798}\u{ADF8}\u{D558}\u{B824}\u{BA74} Alt + Enter\u{B97C} \u{B204}\u{B974}\u{C2ED}\u{C2DC}\u{C624}.`,dragSelectedLongPress:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)}\u{AC1C} \u{C120}\u{D0DD} \u{D56D}\u{BAA9}`,other:()=>`${t.number(e.count)}\u{AC1C} \u{C120}\u{D0DD} \u{D56D}\u{BAA9}`})}\u{C744} \u{B4DC}\u{B798}\u{ADF8}\u{D558}\u{B824}\u{BA74} \u{AE38}\u{AC8C} \u{B204}\u{B974}\u{C2ED}\u{C2DC}\u{C624}.`,dragStartedKeyboard:`ëëê·¸ê° ììëììµëë¤. Tabì ëë¬ ëë¡ ëìì¼ë¡ ì´ëí ë¤ì Enter를 ëë¬ ëë¡íê±°ë Esc를 ëë¬ ì·¨ìíì¸ì.`,dragStartedTouch:`ëëê·¸ê° ììëììµëë¤. ëë¡ ëìì¼ë¡ ì´ëí ë¤ì ëë¸ ííì¬ ëë¡íì¸ì.`,dragStartedVirtual:`ëëê·¸ê° ììëììµëë¤. ëë¡ ëìì¼ë¡ ì´ëí ë¤ì í´ë¦íê±°ë Enter를 ëë¬ ëë¡íì¸ì.`,dropCanceled:`ëë¡ì´ ì·¨ìëììµëë¤.`,dropComplete:`ëë¡ì´ ìë£ëììµëë¤.`,dropDescriptionKeyboard:`ëë¡íë ¤ë©´ Enter를 ë르ì¸ì. ëë그를 ì·¨ìíë ¤ë©´ Esc를 ë르ì¸ì.`,dropDescriptionTouch:`ëë¸ ííì¬ ëë¡íì¸ì.`,dropDescriptionVirtual:`ëë¡íë ¤ë©´ í´ë¦íì¸ì.`,dropIndicator:`ëë¡ íì기`,dropOnItem:e=>`${e.itemText}\u{C5D0} \u{B4DC}\u{B86D}`,dropOnRoot:`ëë¡ ëì`,endDragKeyboard:`ëëê·¸ ì¤ì
ëë¤. ëë그를 ì·¨ìíë ¤ë©´ Enter를 ë르ì¸ì.`,endDragTouch:`ëëê·¸ ì¤ì
ëë¤. ëë그를 ì·¨ìíë ¤ë©´ ëë¸ ííì¸ì.`,endDragVirtual:`ëëê·¸ ì¤ì
ëë¤. ëë그를 ì·¨ìíë ¤ë©´ í´ë¦íì¸ì.`,insertAfter:e=>`${e.itemText} \u{C774}\u{D6C4}\u{C5D0} \u{C0BD}\u{C785}`,insertBefore:e=>`${e.itemText} \u{C774}\u{C804}\u{C5D0} \u{C0BD}\u{C785}`,insertBetween:e=>`${e.beforeItemText} \u{BC0F} ${e.afterItemText} \u{C0AC}\u{C774}\u{C5D0} \u{C0BD}\u{C785}`};var Nz={};
16Nz={dragDescriptionKeyboard:`Paspauskite âEnterâ, kad pradÄtumÄte vilkti.`,dragDescriptionKeyboardAlt:`Paspauskite âAlt + Enterâ, kad pradÄtumÄte vilkti.`,dragDescriptionLongPress:`Palaikykite nuspaudÄ, kad pradÄtumÄte vilkti.`,dragDescriptionTouch:`Palieskite dukart, kad pradÄtumÄte vilkti.`,dragDescriptionVirtual:`SpustelÄkite, kad pradÄtumÄte vilkti.`,dragItem:e=>`Vilkti ${e.itemText}`,dragSelectedItems:(e,t)=>`Vilkti ${t.plural(e.count,{one:()=>`${t.number(e.count)} pasirinkt\u{105} element\u{105}`,other:()=>`${t.number(e.count)} pasirinktus elementus`})}`,dragSelectedKeyboard:(e,t)=>`Paspauskite \u{201E}Enter\u{201C}, jei norite nuvilkti ${t.plural(e.count,{one:()=>`${t.number(e.count)} pasirinkt\u{105} element\u{105}`,other:()=>`${t.number(e.count)} pasirinktus elementus`})}.`,dragSelectedKeyboardAlt:(e,t)=>`Paspauskite \u{201E}Alt + Enter\u{201C}, kad nuvilktum\u{117}te ${t.plural(e.count,{one:()=>`${t.number(e.count)} pasirinkt\u{105} element\u{105}`,other:()=>`${t.number(e.count)} pasirinktus elementus`})}.`,dragSelectedLongPress:(e,t)=>`Nuspaud\u{119} palaikykite, kad nuvilktum\u{117}te ${t.plural(e.count,{one:()=>`${t.number(e.count)} pasirinkt\u{105} element\u{105}`,other:()=>`${t.number(e.count)} pasirinktus elementus`})}.`,dragStartedKeyboard:`PradÄta vilkti. Paspauskite âTabâ, kad pereitumÄte į tiesioginÄ paskirties vietÄ
, tada paspauskite âEnterâ, kad numestumÄte, arba âEscapeâ, kad atÅ¡auktumÄte.`,dragStartedTouch:`PradÄta vilkti. Eikite į tiesioginÄ paskirties vietÄ
, tada palieskite dukart, kad numestumÄte.`,dragStartedVirtual:`PradÄta vilkti. Eikite į tiesioginÄ paskirties vietÄ
ir spustelÄkite arba paspauskite âEnterâ, kad numestumÄte.`,dropCanceled:`Numetimas atÅ¡auktas.`,dropComplete:`Numesta.`,dropDescriptionKeyboard:`Pas
16pauskite âEnterâ, kad numestumÄte. Paspauskite âEscapeâ, kad atÅ¡auktumÄte vilkimÄ
.`,dropDescriptionTouch:`Palieskite dukart, kad numestumÄte.`,dropDescriptionVirtual:`SpustelÄkite, kad numestumÄte.`,dropIndicator:`numetimo indikatorius`,dropOnItem:e=>`Numesti ant ${e.itemText}`,dropOnRoot:`Numesti ant`,endDragKeyboard:`Velkama. Paspauskite âEnterâ, kad atÅ¡auktumÄte vilkimÄ
.`,endDragTouch:`Velkama. SpustelÄkite dukart, kad atÅ¡auktumÄte vilkimÄ
.`,endDragVirtual:`Velkama. SpustelÄkite, kad atÅ¡auktumÄte vilkimÄ
.`,insertAfter:e=>`\u{12E}terpti po ${e.itemText}`,insertBefore:e=>`\u{12E}terpti prie\u{161} ${e.itemText}`,insertBetween:e=>`\u{12E}terpti tarp ${e.beforeItemText} ir ${e.afterItemText}`};var Pz={};Pz={dragDescriptionKeyboard:`Nospiediet Enter, lai sÄktu vilkÅ¡anu.`,dragDescriptionKeyboardAlt:`Nospiediet taustiÅu kombinÄciju Alt+Enter, lai sÄktu vilkÅ¡anu.`,dragDescriptionLongPress:`Turiet nospiestu, lai sÄktu vilkÅ¡anu.`,dragDescriptionTouch:`Veiciet dubultskÄrienu, lai sÄktu vilkÅ¡anu.`,dragDescriptionVirtual:`Noklikšķiniet, lai sÄktu vilkÅ¡anu.`,dragItem:e=>`Velciet ${e.itemText}`,dragSelectedItems:(e,t)=>`Velciet ${t.plural(e.count,{one:()=>`${t.number(e.count)} atlas\u{12B}to vienumu`,other:()=>`${t.number(e.count)} atlas\u{12B}tos vienumus`})}`,dragSelectedKeyboard:(e,t)=>`Nospiediet tausti\u{146}u Enter, lai vilktu ${t.plural(e.count,{one:()=>`${t.number(e.count)} atlas\u{12B}to vienumu`,other:()=>`${t.number(e.count)} atlas\u{12B}tos vienumus`})}.`,dragSelectedKeyboardAlt:(e,t)=>`Nospiediet tausti\u{146}u kombin\u{101}ciju Alt+Enter, lai vilktu ${t.plural(e.count,{one:()=>`${t.number(e.count)} atlas\u{12B}to vienumu`,other:()=>`${t.number(e.count)} atlas\u{12B}tos vienumus`})}.`,dragSelectedLongPress:(e,t)=>`Turiet nospiestu, lai vilktu ${t.plural(e.count,{one:()=>`${t.number(e.count)} atlas\u{12B}to vienumu`,other:()=>`${t.number(e.count)} atlas\u{12B}tos vienumus`})}.`,dragStartedKeyboard:`UzsÄkta vilkÅ¡ana. Nospiediet taustiÅu Tab, lai pÄrietu uz nomeÅ¡anas mÄrÄ·i, pÄc tam nospiediet Enter, lai nomestu, vai nospiediet Escape, lai atceltu.`,dragStartedTouch:`UzsÄkta vilkÅ¡ana. PÄrejiet uz nomeÅ¡anas mÄrÄ·i, pÄc tam veiciet dubultskÄrienu, lai nomestu.`,dragStartedVirtual:`UzsÄkta vilkÅ¡ana. PÄrejiet uz nomeÅ¡anas mÄrÄ·i, pÄc tam nospiediet Enter, lai nomestu.`,dropCanceled:`NomeÅ¡ana atcelta.`,dropComplete:`NomeÅ¡ana pabeigta.`,dropDescriptionKeyboard:`Nospiediet Enter, lai nomestu. Nospiediet Escape, lai atceltu vilkÅ¡anu.`,dropDescriptionTouch:`Veiciet dubultskÄrienu, lai nomestu.`,dropDescriptionVirtual:`Noklikšķiniet, lai nomestu.`,dropIndicator:`nomeÅ¡anas indikators`,dropOnItem:e=>`Nometiet uz ${e.itemText}`,dropOnRoot:`Nometiet uz`,endDragKeyboard:`Notiek vilkÅ¡ana. Nospiediet Enter, lai atceltu vilkÅ¡anu.`,endDragTouch:`Notiek vilkÅ¡ana. Veiciet dubultskÄrienu, lai atceltu vilkÅ¡anu.`,endDragVirtual:`Notiek vilkÅ¡ana. Noklikšķiniet, lai atceltu vilkÅ¡anu.`,insertAfter:e=>`Ievietojiet p\u{113}c ${e.itemText}`,insertBefore:e=>`Ievietojiet pirms ${e.itemText}`,insertBetween:e=>`Ievietojiet starp ${e.beforeItemText} un ${e.afterItemText}`};var Fz={};Fz={dragDescriptionKeyboard:`Trykk pÃ¥ Enter for Ã¥ begynne Ã¥ dra.`,dragDescriptionKeyboardAlt:`Trykk pÃ¥ Alt + Enter for Ã¥ begynne Ã¥ dra.`,dragDescriptionLongPress:`Trykk lenge for Ã¥ begynne Ã¥ dra.`,dragDescriptionTouch:`Dobbelttrykk for Ã¥ begynne Ã¥ dra.`,dragDescriptionVirtual:`Klikk for Ã¥ begynne Ã¥ dra.`,dragItem:e=>`Dra ${e.itemText}`,dragSelectedItems:(e,t)=>`Dra ${t.plural(e.count,{one:()=>`${t.number(e.count)} merket element`,other:()=>`${t.number(e.count)} merkede elementer`})}`,dragSelectedKeyboard:(e,t)=>`Trykk Enter for \xe5 dra ${t.plural(e.count,{one:()=>`${t.number(e.count)} valgt element`,other:()=>`${t.number(e.count)} valgte elementer`})}.`,dragSelectedKeyboardAlt:(e,t)=>`Trykk p\xe5 Alt + Enter for \xe5 dra ${t.plural(e.count,{one:()=>`${t.number(e.count)} valgt element`,other:()=>`${t.number(e.count)} valgte elementer`})}.`,dragSelectedLongPress:(e,t)=>`Trykk lenge for \xe5 dra ${t.plural(e.count,{one:()=>`${t.number(e.count)} valgt element`,other:()=>`${t.number(e.count)} valgte elementer`})}.`,dragStartedKeyboard:`Begynte Ã¥ dra. Trykk pÃ¥ Tab for Ã¥ navigere til et mÃ¥l, og trykk deretter pÃ¥ Enter for Ã¥ slippe eller pÃ¥ Esc for Ã¥ avbryte.`,dragStartedTouch:`Begynte Ã¥ dra. Naviger til et mÃ¥l, og dobbelttrykk for Ã¥ slippe.`,dragStartedVirtual:`Begynte Ã¥ dra. Naviger til et mÃ¥l, og klikk eller trykk pÃ¥ Enter for Ã¥ slippe.`,dropCanceled:`Avbrøt slipping.`,dropComplete:`Slippingen er fullført.`,dropDescriptionKeyboard:`Trykk pÃ¥ Enter for Ã¥ slippe. Trykk pÃ¥ Esc hvis du vil avbryte draingen.`,dropDescriptionTouch:`Dobbelttrykk for Ã¥ slippe.`,dropDescriptionVirtual:`Klikk for Ã¥ slippe.`,dropIndicator:`slippeindikator`,dropOnItem:e=>`Slipp p\xe5 ${e.itemText}`,dropOnRoot:`Slipp pÃ¥`,endDragKeyboard:`Drar. Trykk pÃ¥ Enter hvis du vil avbryte.`,endDragTouch:`Drar. Dobbelttrykk hvis du vil avbryte.`,endDragVirtual:`Drar. Klikk hvis du vil avbryte.`,insertAfter:e=>`Sett inn etter ${e.itemText}`,insertBefore:e=>`Sett inn f\xf8r ${e.itemText}`,insertBetween:e=>`Sett inn mellom ${e.beforeItemText} og ${e.afterItemText}`};var Iz={};Iz={dragDescriptionKeyboard:`Druk op Enter om te slepen.`,dragDescriptionKeyboardAlt:`Druk op Alt + Enter om te slepen.`,dragDescriptionLongPress:`Houd lang ingedrukt om te slepen.`,dragDescriptionTouch:`Dubbeltik om te slepen.`,dragDescriptionVirtual:`Klik om met slepen te starten.`,dragItem:e=>`${e.itemText} slepen`,dragSelectedItems:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} geselecteerd item`,other:()=>`${t.number(e.count)} geselecteerde items`})} slepen`,dragSelectedKeyboard:(e,t)=>`Druk op Enter om ${t.plural(e.count,{one:()=>`${t.number(e.count)} geselecteerd item`,other:()=>`${t.number(e.count)} geselecteerde items`})} te slepen.`,dragSelectedKeyboardAlt:(e,t)=>`Druk op Alt + Enter om ${t.plural(e.count,{one:()=>`${t.number(e.count)} geselecteerd item`,other:()=>`${t.number(e.count)} geselecteerde items`})} te slepen.`,dragSelectedLongPress:(e,t)=>`Houd lang ingedrukt om ${t.plural(e.count,{one:()=>`${t.number(e.count)} geselecteerd item`,other:()=>`${t.number(e.count)} geselecteerde items`})} te slepen.`,dragStartedKeyboard:`Begonnen met slepen. Druk op Tab om naar een locatie te gaan. Druk dan op Enter om neer te zetten, of op Esc om te annuleren.`,dragStartedTouch:`Begonnen met slepen. Ga naar de gewenste locatie en dubbeltik om neer te zetten.`,dragStartedVirtual:`Begonnen met slepen. Ga naar de gewenste locatie en klik of druk op Enter om neer te zetten.`,dropCanceled:`Neerzetten geannuleerd.`,dropComplete:`Neerzetten voltooid.`,dropDescriptionKeyboard:`Druk op Enter om neer te zetten. Druk op Esc om het slepen te annuleren.`,dropDescriptionTouch:`Dubbeltik om neer te zetten.`,dropDescriptionVirtual:`Klik om neer te zetten.`,dropIndicator:`aanwijzer voor neerzetten`,dropOnItem:e=>`Neerzetten op ${e.itemText}`,dropOnRoot:`Neerzetten op`,endDragKeyboard:`Bezig met slepen. Druk op Enter om te annuleren.`,endDragTouch:`Bezig met slepen. Dubbeltik om te annuleren.`,endDragVirtual:`Bezig met slepen. Klik om te annuleren.`,insertAfter:e=>`Plaatsen na ${e.itemText}`,insertBefore:e=>`Plaatsen v\xf3\xf3r ${e.itemText}`,insertBetween:e=>`Plaatsen tussen ${e.beforeItemText} en ${e.afterItemText}`};var Lz={};Lz={dragDescriptionKeyboard:`NaciÅnij Enter, aby rozpoczÄ
Ä przeciÄ
ganie.`,dragDescriptionKeyboardAlt:`NaciÅnij Alt + Enter, aby rozpoczÄ
Ä przeciÄ
ganie.`,dragDescriptionLongPress:`NaciÅnij i przytrzymaj, aby rozpoczÄ
Ä przeciÄ
ganie.`,dragDescriptionTouch:`Dotknij dwukrotnie, aby rozpoczÄ
Ä przeciÄ
ganie.`,dragDescriptionVirtual:`Kliknij, aby rozpoczÄ
Ä przeciÄ
ganie.`,dragItem:e=>`Przeci\u{105}gnij ${e.itemText}`,dragSelectedItems:(e,t)=>`Przeci\u{105}gnij ${t.plural(e.count,{one:()=>`${t.number(e.count)} wybrany element`,other:()=>`${t.number(e.count)} wybranych element\xf3w`})}`,dragSelectedKeyboard:(e,t)=>`Naci\u{15B}nij Enter, aby przeci\u{105}gn\u{105}\u{107} ${t.plural(e.count,{one:()=>`${t.number(e.count)} wybrany element`,other:()=>`${t.number(e.count)} wybrane(-ych) elementy(-\xf3w)`})}.`,dragSelectedKeyboardAlt:(e,t)=>`Naci\u{15B}nij Alt + Enter, aby przeci\u{105}gn\u{105}\u{107} ${t.plural(e.count,{one:()=>`${t.number(e.count)} wybrany element`,other:()=>`${t.number(e.count)} wybrane(-ych) elementy(-\xf3w)`})}.`,dragSelectedLongPress:(e,t)=>`Naci\u{15B}nij i przytrzymaj, aby przeci\u{105}gn\u{105}\u{107} ${t.plural(e.count,{one:()=>`${t.number(e.count)} wybrany element`,other:()=>`${t.number(e.count)} wybrane(-ych) elementy(-\xf3w)`})}.`,dragStartedKeyboard:`RozpoczÄto przeciÄ
ganie. NaciÅnij Tab, aby wybraÄ miejsce docelowe, a nastÄpnie naciÅnij Enter, aby upuÅciÄ, lub Escape, aby anulowaÄ.`,dragStartedTouch:`RozpoczÄto przeciÄ
ganie. Wybierz miejsce, w którym chcesz upuÅciÄ element, a nastÄpnie dotknij dwukrotnie, aby upuÅciÄ.F`,dragStartedVirtual:`RozpoczÄto przeciÄ
ganie. Wybierz miejsce, w którym chcesz upuÅciÄ element, a nastÄpnie kliknij lub naciÅnij Enter, aby upuÅciÄ.`,dropCanceled:`Anulowano upuszczenie.`,dropComplete:`ZakoÅczono upuszczanie.`,dropDescriptionKeyboard:`NaciÅnij Enter, aby upuÅciÄ. NaciÅnij Escape, aby anulowaÄ przeciÄ
gniÄcie.`,dropDescriptionTouch:`Dotknij dwukrotnie, aby upuÅciÄ.`,dropDescriptionVirtual:`Kliknij, aby upuÅciÄ.`,dropIndicator:`wskaźnik upuszczenia`,dropOnItem:e=>
16`Upu\u{15B}\u{107} na ${e.itemText}`,dropOnRoot:`UpuÅÄ`,endDragKeyboard:`PrzeciÄ
ganie. NaciÅnij Enter, aby anulowaÄ przeciÄ
gniÄcie.`,endDragTouch:`PrzeciÄ
ganie. Kliknij dwukrotnie, aby anulowaÄ przeciÄ
gniÄcie.`,endDragVirtual:`PrzeciÄ
ganie. Kliknij, aby anulowaÄ przeciÄ
ganie.`,insertAfter:e=>`Umie\u{15B}\u{107} za ${e.itemText}`,insertBefore:e=>`Umie\u{15B}\u{107} przed ${e.itemText}`,insertBetween:e=>`Umie\u{15B}\u{107} mi\u{119}dzy ${e.beforeItemText} i ${e.afterItemText}`};var Rz={};Rz={dragDescriptionKeyboard:`Pressione Enter para começar a arrastar.`,dragDescriptionKeyboardAlt:`Pressione Alt + Enter para começar a arrastar.`,dragDescriptionLongPress:`Pressione e segure para começar a arrastar.`,dragDescriptionTouch:`Toque duas vezes para começar a arrastar.`,dragDescriptionVirtual:`Clique para começar a arrastar.`,dragItem:e=>`Arrastar ${e.itemText}`,dragSelectedItems:(e,t)=>`Arrastar ${t.plural(e.count,{one:()=>`${t.number(e.count)} item selecionado`,other:()=>`${t.number(e.count)} itens selecionados`})}`,dragSelectedKeyboard:(e,t)=>`Pressione Enter para arrastar ${t.plural(e.count,{one:()=>`${t.number(e.count)} o item selecionado`,other:()=>`${t.number(e.count)} os itens selecionados`})}.`,dragSelectedKeyboardAlt:(e,t)=>`Pressione Alt + Enter para arrastar ${t.plural(e.count,{one:()=>`${t.number(e.count)} o item selecionado`,other:()=>`${t.number(e.count)} os itens selecionados`})}.`,dragSelectedLongPress:(e,t)=>`Pressione e segure para arrastar ${t.plural(e.count,{one:()=>`${t.number(e.count)} o item selecionado`,other:()=>`${t.number(e.count)} os itens selecionados`})}.`,dragStartedKeyboard:`Comece a arrastar. Pressione Tab para navegar até um alvo e, em seguida, pressione Enter para soltar ou pressione Escape para cancelar.`,dragStartedTouch:`Comece a arrastar. Navegue até um alvo e toque duas vezes para soltar.`,dragStartedVirtual:`Comece a arrastar. Navegue até um alvo e clique ou pressione Enter para soltar.`,dropCanceled:`Liberação cancelada.`,dropComplete:`Liberação concluÃda.`,dropDescriptionKeyboard:`Pressione Enter para soltar. Pressione Escape para cancelar.`,dropDescriptionTouch:`Toque duas vezes para soltar.`,dropDescriptionVirtual:`Clique para soltar.`,dropIndicator:`indicador de liberação`,dropOnItem:e=>`Soltar em ${e.itemText}`,dropOnRoot:`Soltar`,endDragKeyboard:`Arrastando. Pressione Enter para cancelar.`,endDragTouch:`Arrastando. Toque duas vezes para cancelar.`,endDragVirtual:`Arrastando. Clique para cancelar.`,insertAfter:e=>`Inserir ap\xf3s ${e.itemText}`,insertBefore:e=>`Inserir antes de ${e.itemText}`,insertBetween:e=>`Inserir entre ${e.beforeItemText} e ${e.afterItemText}`};var zz={};zz={dragDescriptionKeyboard:`Prima Enter para iniciar o arrasto.`,dragDescriptionKeyboardAlt:`Prima Alt + Enter para iniciar o arrasto.`,dragDescriptionLongPress:`Prima longamente para começar a arrastar.`,dragDescriptionTouch:`Faça duplo toque para começar a arrastar.`,dragDescriptionVirtual:`Clique para iniciar o arrasto.`,dragItem:e=>`Arrastar ${e.itemText}`,dragSelectedItems:(e,t)=>`Arrastar ${t.plural(e.count,{one:()=>`${t.number(e.count)} item selecionado`,other:()=>`${t.number(e.count)} itens selecionados`})}`,dragSelectedKeyboard:(e,t)=>`Prima Enter para arrastar ${t.plural(e.count,{one:()=>`${t.number(e.count)} o item selecionado`,other:()=>`${t.number(e.count)} os itens selecionados`})}.`,dragSelectedKeyboardAlt:(e,t)=>`Prima Alt + Enter para arrastar ${t.plural(e.count,{one:()=>`${t.number(e.count)} o item selecionado`,other:()=>`${t.number(e.count)} os itens selecionados`})}.`,dragSelectedLongPress:(e,t)=>`Prima longamente para arrastar ${t.plural(e.count,{one:()=>`${t.number(e.count)} o item selecionado`,other:()=>`${t.number(e.count)} os itens selecionados`})}.`,dragStartedKeyboard:`Arrasto iniciado. Prima a tecla de tabulação para navegar para um destino para largar, e em seguida prima Enter para largar ou prima Escape para cancelar.`,dragStartedTouch:`Arrasto iniciado. Navegue para um destino para largar, e em seguida faça duplo toque para largar.`,dragStartedVirtual:`Arrasto iniciado. Navegue para um destino para largar, e em seguida clique ou prima Enter para largar.`,dropCanceled:`Largar cancelado.`,dropComplete:`Largar completo.`,dropDescriptionKeyboard:`Prima Enter para largar. Prima Escape para cancelar o arrasto.`,dropDescriptionTouch:`Faça duplo toque para largar.`,dropDescriptionVirtual:`Clique para largar.`,dropIndicator:`Indicador de largar`,dropOnItem:e=>`Largar em ${e.itemText}`,dropOnRoot:`Largar em`,endDragKeyboard:`A arrastar. Prima Enter para cancelar o arrasto.`,endDragTouch:`A arrastar. Faça duplo toque para cancelar o arrasto.`,endDragVirtual:`A arrastar. Clique para cancelar o arrasto.`,insertAfter:e=>`Inserir depois de ${e.itemText}`,insertBefore:e=>`Inserir antes de ${e.itemText}`,insertBetween:e=>`Inserir entre ${e.beforeItemText} e ${e.afterItemText}`};var Bz={};Bz={dragDescriptionKeyboard:`ApÄsaÈi pe Enter pentru a începe glisarea.`,dragDescriptionKeyboardAlt:`ApÄsaÈi pe Alt + Enter pentru a începe glisarea.`,dragDescriptionLongPress:`ApÄsaÈi lung pentru a începe glisarea.`,dragDescriptionTouch:`AtingeÈi de douÄ ori pentru a începe sÄ glisaÈi.`,dragDescriptionVirtual:`FaceÈi clic pentru a începe glisarea.`,dragItem:e=>`Glisa\u{21B}i ${e.itemText}`,dragSelectedItems:(e,t)=>`Glisa\u{21B}i ${t.plural(e.count,{one:()=>`${t.number(e.count)} element selectat`,other:()=>`${t.number(e.count)} elemente selectate`})}`,dragSelectedKeyboard:(e,t)=>`Ap\u{103}sa\u{21B}i pe Enter pentru a glisa ${t.plural(e.count,{one:()=>`${t.number(e.count)} element selectat`,other:()=>`${t.number(e.count)} elemente selectate`})}.`,dragSelectedKeyboardAlt:(e,t)=>`Ap\u{103}sa\u{21B}i pe Alt + Enter pentru a glisa ${t.plural(e.count,{one:()=>`${t.number(e.count)} element selectat`,other:()=>`${t.number(e.count)} elemente selectate`})}.`,dragSelectedLongPress:(e,t)=>`Ap\u{103}sa\u{21B}i lung pentru a glisa ${t.plural(e.count,{one:()=>`${t.number(e.count)} element selectat`,other:()=>`${t.number(e.count)} elemente selectate`})}.`,dragStartedKeyboard:`A început glisarea. ApÄsaÈi pe Tab pentru a naviga la o ÈintÄ de fixare, apoi apÄsaÈi pe Enter pentru a fixa sau apÄsaÈi pe Escape pentru a anula glisarea.`,dragStartedTouch:`A început glisarea. NavigaÈi la o ÈintÄ de fixare, apoi atingeÈi de douÄ ori pentru a fixa.`,dragStartedVirtual:`A început glisarea. NavigaÈi la o ÈintÄ de fixare, apoi faceÈi clic sau apÄsaÈi pe Enter pentru a fixa.`,dropCanceled:`Fixare anulatÄ.`,dropComplete:`Fixare finalizatÄ.`,dropDescriptionKeyboard:`ApÄsaÈi pe Enter pentru a fixa. ApÄsaÈi pe Escape pentru a anula glisarea.`,dropDescriptionTouch:`AtingeÈi de douÄ ori pentru a fixa.`,dropDescriptionVirtual:`FaceÈi clic pentru a fixa.`,dropIndicator:`indicator de fixare`,dropOnItem:e=>`Fixa\u{21B}i pe ${e.itemText}`,dropOnRoot:`Fixare pe`,endDragKeyboard:`Se gliseazÄ. ApÄsaÈi pe Enter pentru a anula glisarea.`,endDragTouch:`Se gliseazÄ. AtingeÈi de douÄ ori pentru a anula glisarea.`,endDragVirtual:`Se gliseazÄ. FaceÈi clic pentru a anula glisarea.`,insertAfter:e=>`Insera\u{21B}i dup\u{103} ${e.itemText}`,insertBefore:e=>`Insera\u{21B}i \xeenainte de ${e.itemText}`,insertBetween:e=>`Insera\u{21B}i \xeentre ${e.beforeItemText} \u{219}i ${e.afterItemText}`};var Vz={};Vz={dragDescriptionKeyboard:`ÐажмиÑе клавиÑÑ Enter Ð´Ð»Ñ Ð½Ð°Ñала пеÑеÑаÑкиваниÑ.`,dragDescriptionKeyboardAlt:`ÐажмиÑе Alt + Enter, ÑÑÐ¾Ð±Ñ Ð½Ð°ÑаÑÑ Ð¿ÐµÑеÑаÑкиваÑÑ.`,dragDescriptionLongPress:`ÐажмиÑе и ÑдеÑживайÑе, ÑÑÐ¾Ð±Ñ Ð½Ð°ÑаÑÑ Ð¿ÐµÑеÑаÑкиваÑÑ.`,dragDescriptionTouch:`ÐÐ²Ð°Ð¶Ð´Ñ Ð½Ð°Ð¶Ð¼Ð¸Ñе Ð´Ð»Ñ Ð½Ð°Ñала пеÑеÑаÑкиваниÑ.`,dragDescriptionVirtual:`ЩелкниÑе Ð´Ð»Ñ Ð½Ð°Ñала пеÑеÑаÑкиваниÑ.`,dragItem:e=>`\u{41F}\u{435}\u{440}\u{435}\u{442}\u{430}\u{449}\u{438}\u{442}\u{44C} ${e.itemText}`,dragSelectedItems:(e,t)=>`\u{41F}\u{435}\u{440}\u{435}\u{442}\u{430}\u{449}\u{438}\u{442}\u{44C} ${t.plural(e.count,{one:()=>`${t.number(e.count)} \u{432}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{44B}\u{439} \u{44D}\u{43B}\u{435}\u{43C}\u{435}\u{43D}\u{442}`,other:()=>`${t.number(e.count)} \u{432}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{44B}\u{445} \u{44D}\u{43B}\u{435}\u{43C}`})}`,dragSelectedKeyboard:(e,t)=>`\u{41D}\u{430}\u{436}\u{43C}\u{438}\u{442}\u{435} Enter \u{434}\u{43B}\u{44F} \u{43F}\u{435}\u{440}\u{435}\u{442}\u{430}\u{441}\u{43A}\u{438}\u{432}\u{430}\u{43D}\u{438}\u{44F} ${t.plural(e.count,{one:()=>`${t.number(e.count)} \u{432}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{43E}\u{433}\u{43E} \u{44D}\u{43B}\u{435}\u{43C}\u{435}\u{43D}\u{442}\u{430}`,other:()=>`${t.number(e.count)} \u{432}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{44B}\u{445} \u{44D}\u{43B}\u{435}\u{43C}\u{435}\u{43D}\u{442}\u{43E}\u{432}`})}.`,dragSelectedKeyboardAlt:(e,t)=>`\u{41D}\u{430}\u{436}\u{43C}\u{438}\u{442}\u{435} Alt + Enter \u{434}\u{43B}\u{44F} \u{43F}\u{435}\u{440}\u{435}\u{442}\u{430}\u{441}\u{43A}\u{438}\u{432}\u{430}\u{43D}\u{438}\u{44F} ${t.plural(e.count,{one:()=>`${t.number(e.count)} \u{432}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{43E}\u{433}\u{43E} \u{44D}\u{43B}\u{435}\u{43C}\u{435}\u{43D}\u{442}\u{430}`,other:()=>`${t.number(e.count)} \u{432}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{44B}\u{445} \u{44D}\u{43B}\u{435}\u{43C}\u{435}\u{43D}\u{442}\u{43E}\u{432}`})}.`,dragSelectedLongPress:(e,t)=>`\u{41D}\u{430}\u{436}\u{43C}\u{438}\u{442}\u{435} \u{438} \u{443}\u{434}\u{435}\u{440}\u{436}\u{438}\u{432}\u{430}\u{439}\u{442}\u{435} \u{434}\u{43B}\u{44F} \u{43F}\u{435}\u{440}\u{435}\u{442}\u{430}\u{441}\u{43A}\u{438}\u{432}\u{430}\u{43D}\u{438}\u{44F} ${t.plural(e.count,{one:()=>`${t.number(e.count)} \u{432}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{43E}\u{433}\u{43E} \u{44D}\u{43B}\u{435}\u{43C}\u{435}\u{43D}\u{442}\u{430}`,other:()=>`${t.number(e.count)} \u{432}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{44B}\u{445} \u{44D}\u{43B}\u{435}\u{43C}\u{435}\u{43D}\u{442}\u{43E}\u{432}`})}.`,dragStartedKeyboard:`ÐаÑаÑо пеÑеÑаÑкивание. ÐажмиÑе клавиÑÑ Tab Ð´Ð»Ñ Ð²ÑбоÑа Ñели, заÑем нажмиÑе клавиÑÑ Enter, ÑÑÐ¾Ð±Ñ Ð¿ÑимениÑÑ Ð¿ÐµÑеÑаÑкивание, или клавиÑÑ Escape Ð´Ð»Ñ Ð¾ÑÐ¼ÐµÐ½Ñ Ð´ÐµÐ¹ÑÑвиÑ.`,dragStartedTouch:`ÐаÑаÑо пеÑеÑаÑкивание. ÐÑбеÑиÑе ÑелÑ, заÑем Ð´Ð²Ð°Ð¶Ð´Ñ Ð½Ð°Ð¶Ð¼Ð¸Ñе, ÑÑÐ¾Ð±Ñ Ð¿ÑимениÑÑ Ð¿ÐµÑеÑаÑкивание.`,dragStartedVirtual:`ÐаÑаÑо пеÑеÑаÑкивание. ÐажмиÑе клавиÑÑ Tab Ð´Ð»Ñ Ð²ÑбоÑа Ñели, заÑем нажмиÑе клавиÑÑ Enter, ÑÑÐ¾Ð±Ñ Ð¿ÑимениÑÑ Ð¿ÐµÑеÑаÑкивание.`,dropCanceled:`ÐеÑеÑаÑкивание оÑменено.`,dropComplete:`ÐеÑеÑаÑкивание завеÑÑено.`,dropDescriptionKeyboard:`ÐажмиÑе клавиÑÑ Enter, ÑÑÐ¾Ð±Ñ Ð¿ÑимениÑÑ Ð¿ÐµÑеÑаÑкивание. ÐажмиÑе клавиÑÑ Escape Ð´Ð»Ñ Ð¾ÑменÑ.`,dropDescriptionTouch:`ÐÐ²Ð°Ð¶Ð´Ñ Ð½Ð°Ð¶Ð¼Ð¸Ñе, ÑÑÐ¾Ð±Ñ Ð¿ÑимениÑÑ Ð¿ÐµÑеÑаÑкивание.`,dropDescriptionVirtual:`ЩелкниÑе, ÑÑÐ¾Ð±Ñ Ð¿ÑимениÑÑ Ð¿ÐµÑеÑаÑкивание.`,dropIndicator:`индикаÑÐ¾Ñ Ð¿ÐµÑеÑаÑкиваниÑ`,dropOnItem:e=>`\u{41F}\u{435}\u{440}\u{435}\u{442}\u{430}\u{449}\u{438}\u{442}\u{44C} \u{43D}\u{430} ${e.itemText}`,dropOnRoot:`ÐеÑеÑаÑиÑÑ Ð½Ð°`,endDragKeyboard:`ÐеÑеÑаÑкивание. ÐажмиÑе клавиÑÑ Enter Ð´Ð»Ñ Ð¾ÑменÑ.`,endDragTouch:`ÐеÑеÑаÑкивание. ÐÐ²Ð°Ð¶Ð´Ñ Ð½Ð°Ð¶Ð¼Ð¸Ñе Ð´Ð»Ñ Ð¾ÑменÑ.`,endDragVirtual:`ÐеÑеÑаÑкивание. ЩелкниÑе Ð´Ð»Ñ Ð¾ÑменÑ.`,insertAfter:e=>`\u{412}\u{441}\u{442}\u{430}\u{432}\u{438}\u{442}\u{44C} \u{43F}\u{43E}\u{441}\u{43B}\u{435} ${e.itemText}`,insertBefore:e=>`\u{412}\u{441}\u{442}\u{430}\u{432}\u{438}\u{442}\u{44C} \u{43F}\u{435}\u{440}\u{435}\u{434} ${e.itemText}`,insertBetween:e=>`\u{412}\u{441}\u{442}\u{430}\u{432}\u{438}\u{442}\u{44C} \u{43C}\u{435}\u{436}\u{434}\u{443} ${e.beforeItemText} \u{438} ${e.afterItemText}`};var Hz={};Hz={dragDescriptionKeyboard:`StlaÄenÃm klávesu Enter zaÄnete presúvanie.`,dragDescriptionKeyboardAlt:`StlaÄenÃm klávesov Alt + Enter zaÄnete presúvanie.`,dragDescriptionLongPress:`Dlhým stlaÄenÃm zaÄnete presúvanie.`,dragDescriptionTouch:`Dvojitým kliknutÃm zaÄnete presúvanie.`,dragDescriptionVirtual:`KliknutÃm zaÄnete presúvanie.`,dragItem:e=>`Presun\xfa\u{165} polo\u{17E}ku ${e.itemText}`,dragSelectedItems:(e,t)=>`Presun\xfa\u{165} ${t.plural(e.count,{one:()=>`${t.number(e.count)} vybrat\xfa polo\u{17E}ku`,other:()=>`${t.number(e.count)} vybrat\xe9 polo\u{17E}ky`})}`,dragSelectedKeyboard:(e,t)=>`Stla\u{10D}en\xedm kl\xe1vesu Enter presuniete ${t.plural(e.count,{one:()=>`${t.number(e.count)} vybrat\xfa polo\u{17E}ku`,other:()=>`${t.number(e.count)} vybrat\xfdch polo\u{17E}iek`})}.`,dragSelectedKeyboardAlt:(e,t)=>`Stla\u{10D}en\xedm kl\xe1vesov Alt + Enter presuniete ${t.plural(e.count,{one:()=>`${t.number(e.count)} vybrat\xfa polo\u{17E}ku`,other:()=>`${t.number(e.count)} vybrat\xfdch polo\u{17E}iek`})}.`,dragSelectedLongPress:(e,t)=>`Dlh\xfdm stla\u{10D}en\xedm presuniete ${t.plural(e.count,{one:()=>`${t.number(e.count)} vybrat\xfa polo\u{17E}ku`,other:()=>`${t.number(e.count)} vybrat\xfdch polo\u{17E}iek`})}.`,dragStartedKeyboard:`Presúvanie sa zaÄalo. Do cieľového umiestnenia prejdete stlaÄenÃm klávesu Tab. Ak chcete položku umiestniÅ¥, stlaÄte kláves Enter alebo stlaÄte kláves Esc, ak chcete presúvanie zruÅ¡iÅ¥.`,dragStartedTouch:`Presúvanie sa zaÄalo. Prejdite na cieľové umiestnenie a dvojitým kliknutÃm umiestnite položku.`,dragStartedVirtual:`Presúvanie sa zaÄalo. Prejdite na cieľové umiestnenie a kliknutÃm alebo stlaÄenÃm klávesu Enter umiestnite položku.`,dropCanceled:`Umiestnenie zruÅ¡ené.`,dropComplete:`Umiestnenie dokonÄené.`,dropDescriptionKeyboard:`StlaÄenÃm klávesu Enter umiestnite položku. StlaÄenÃm klávesu Esc zruÅ¡Ãte presúvanie.`,dropDescriptionTouch:`Dvojitým kliknutÃm umiestnite položku.`,dropDescriptionVirtual:`KliknutÃm umiestnite položku.`,dropIndicator:`indikátor umiestnenia`,dropOnItem:e=>`Umiestni\u{165} na polo\u{17E}ku ${e.itemText}`,dropOnRoot:`UmiestniÅ¥ na`,endDragKeyboard:`Prebieha presúvanie. Ak ho chcete zruÅ¡iÅ¥, stlaÄte kláves Enter.`,endDragTouch:`Prebieha presúvanie. Dvojitým kliknutÃm ho môžete zruÅ¡iÅ¥.`,endDragVirtual:`Prebieha presúvanie.`,insertAfter:e=>`Vlo\u{17E}i\u{165} za polo\u{17E}ku ${e.itemText}`,insertBefore:e=>`Vlo\u{17E}i\u{165} pred polo\u{17E}ku ${e.itemText}`,insertBetween:e=>`Vlo\u{17E}i\u{165} medzi polo\u{17E}ky ${e.beforeItemText} a ${e.afterItemText}`};var Uz={};Uz={dragDescriptionKeyboard:`Pritisnite tipko Enter za zaÄetek vleÄenja.`,dragDescriptionKeyboardAlt:`Pritisnite tipki Alt + Enter za zaÄetek vleÄenja.`,dragDescriptionLongPress:`Pritisnite in zadržite za zaÄetek vleÄenja.`,dragDescriptionTouch:`Dvotapnite za zaÄetek vleÄenja.`,dragDescriptionVirtual:`Kliknite za zaÄetek vleÄenja.`,dragItem:e=>`Povleci ${e.itemText}`,dragSelectedItems:(e,t)=>`Povlecite ${t.plural(e.count,{one:()=>`${t.number(e.count)} izbran element`,other:()=>`izbrane elemente (${t.number(e.count)})`})}`,dragSelectedKeyboard:(e,t)=>`Pritisnite tipko Enter, da povle\u{10D}ete ${t.plural(e.count,{one:()=>`${t.number(e.count)} izbrani element`,other:()=>`${t.number(e.count)} izbranih elementov`})}.`,dragSelectedKeyboardAlt:(e,t)=>`Pritisnite tipki Alt + Enter, da povle\u{10D}ete ${t.plural(e.count,{one:()=>`${t.number(e.count)} izbrani element`,other:()=>`${t.number(e.count)} izbranih elementov`})}.`,dragSelectedLongPress:(e,t)=>`Pritisnite in zadr\u{17E}ite, da povle\u{10D}ete ${t.plural(e.count,{one:()=>`${t.number(e.count)} izbrani element`,other:()=>`${t.number(e.count)} izbranih elementov`})}.`,dragStartedKeyboard:`VleÄenje se je zaÄelo. Pritisnite tipko Tab za pomik na mesto, kamor želite spustiti elemente, in pritisnite tipko Enter, da jih spustite, ali tipko Escape, da prekliÄete postopek.`,dragStartedTouch:`VleÄenje se je zaÄelo. Pomaknite s
16e na mesto, kamor želite spustiti elemente, in dvotapnite, da jih spustite.`,dragStartedVirtual:`VleÄenje se je zaÄelo. Pomaknite se na mesto, kamor želite spustiti elemente, in kliknite ali pritisnite tipko Enter, da jih spustite.`,dropCanceled:`Spust je preklican.`,dropComplete:`Spust je konÄan.`,dropDescriptionKeyboard:`Pritisnite tipko Enter, da spustite. Pritisnite tipko Escape, da prekliÄete vleÄenje.`,dropDescriptionTouch:`Dvotapnite, da spustite.`,dropDescriptionVirtual:`Kliknite, da spustite.`,dropIndicator:`indikator spusta`,dropOnItem:e=>`Spusti na mesto ${e.itemText}`,dropOnRoot:`Spusti na mesto`,endDragKeyboard:`VleÄenje. Pritisnite tipko Enter za preklic vleÄenja.`,endDragTouch:`VleÄenje. Dvotapnite za preklic vleÄenja.`,endDragVirtual:`VleÄenje. Kliknite, da prekliÄete vleÄenje.`,insertAfter:e=>`Vstavi za ${e.itemText}`,insertBefore:e=>`Vstavi pred ${e.itemText}`,insertBetween:e=>`Vstavi med ${e.beforeItemText} in ${e.afterItemText}`};var Wz={};Wz={dragDescriptionKeyboard:`Pritisnite Enter da biste zapoÄeli prevlaÄenje.`,dragDescriptionKeyboardAlt:`Pritisnite Alt + Enter da biste zapoÄeli prevlaÄenje.`,dragDescriptionLongPress:`Pritisnite dugo da biste zapoÄeli prevlaÄenje.`,dragDescriptionTouch:`Dvaput dodirnite da biste zapoÄeli prevlaÄenje.`,dragDescriptionVirtual:`Kliknite da biste zapoÄeli prevlaÄenje.`,dragItem:e=>`Prevucite ${e.itemText}`,dragSelectedItems:(e,t)=>`Prevucite ${t.plural(e.count,{one:()=>`${t.number(e.count)} izabranu stavku`,other:()=>`${t.number(e.count)} izabrane stavke`})}`,dragSelectedKeyboard:(e,t)=>`Pritisnite Enter da biste prevukli ${t.plural(e.count,{one:()=>`${t.number(e.count)} izabranu stavku`,other:()=>`${t.number(e.count)} izabranih stavki`})}.`,dragSelectedKeyboardAlt:(e,t)=>`Pritisnite Alt + Enter da biste prevukli ${t.plural(e.count,{one:()=>`${t.number(e.count)} izabranu stavku`,other:()=>`${t.number(e.count)} izabranih stavki`})}.`,dragSelectedLongPress:(e,t)=>`Pritisnite dugo da biste prevukli ${t.plural(e.count,{one:()=>`${t.number(e.count)} izabranu stavku`,other:()=>`${t.number(e.count)} izabranih stavki`})}.`,dragStartedKeyboard:`PrevlaÄenje je zapoÄeto. Pritisnite Tab da biste otiÅ¡li do cilja za otpuÅ¡tanje, zatim pritisnite Enter za ispuÅ¡tanje ili pritisnite Escape za otkazivanje.`,dragStartedTouch:`PrevlaÄenje je zapoÄeto. Idite do cilja za otpuÅ¡tanje, a zatim dvaput dodirnite za otpuÅ¡tanje.`,dragStartedVirtual:`PrevlaÄenje je zapoÄeto. Idite do cilja za otpuÅ¡tanje, a zatim kliknite ili pritinite Enter za otpuÅ¡tanje.`,dropCanceled:`OtpuÅ¡tanje je otkazano.`,dropComplete:`PrevlaÄenje je zavrÅ¡eno.`,dropDescriptionKeyboard:`Pritisnite Enter da biste otpustili. Pritisnite Escape da biste otkazali prevlaÄenje.`,dropDescriptionTouch:`Dvaput dodirnite za otpuÅ¡tanje.`,dropDescriptionVirtual:`Kliknite za otpuÅ¡tanje.`,dropIndicator:`Indikator otpuÅ¡tanja`,dropOnItem:e=>`Otpusti na ${e.itemText}`,dropOnRoot:`Otpusti na`,endDragKeyboard:`PrevlaÄenje u toku. Pritisnite Enter da biste otkazali prevlaÄenje.`,endDragTouch:`PrevlaÄenje u toku. Dvaput dodirnite da biste otkazali prevlaÄenje.`,endDragVirtual:`PrevlaÄenje u toku. Kliknite da biste otkazali prevlaÄenje.`,insertAfter:e=>`Umetnite posle ${e.itemText}`,insertBefore:e=>`Umetnite ispred ${e.itemText}`,insertBetween:e=>`Umetnite izme\u{111}u ${e.beforeItemText} i ${e.afterItemText}`};var Gz={};Gz={dragDescriptionKeyboard:`Tryck pÃ¥ enter för att börja dra.`,dragDescriptionKeyboardAlt:`Tryck pÃ¥ Alt + Retur för att börja dra.`,dragDescriptionLongPress:`Tryck länge för att börja dra.`,dragDescriptionTouch:`Dubbeltryck för att börja dra.`,dragDescriptionVirtual:`Klicka för att börja dra.`,dragItem:e=>`Dra ${e.itemText}`,dragSelectedItems:(e,t)=>`Dra ${t.plural(e.count,{one:()=>`${t.number(e.count)} valt objekt`,other:()=>`${t.number(e.count)} valda objekt`})}`,dragSelectedKeyboard:(e,t)=>`Tryck p\xe5 Retur f\xf6r att dra ${t.plural(e.count,{one:()=>`${t.number(e.count)} markerat objekt`,other:()=>`${t.number(e.count)} markerade objekt`})}.`,dragSelectedKeyboardAlt:(e,t)=>`Tryck p\xe5 Alt + Retur f\xf6r att dra ${t.plural(e.count,{one:()=>`${t.number(e.count)} markerat objekt`,other:()=>`${t.number(e.count)} markerade objekt`})}.`,dragSelectedLongPress:(e,t)=>`Tryck l\xe4nge f\xf6r att dra ${t.plural(e.count,{one:()=>`${t.number(e.count)} markerat objekt`,other:()=>`${t.number(e.count)} markerade objekt`})}.`,dragStartedKeyboard:`Börja dra. Tryck pÃ¥ tabb för att navigera till mÃ¥let, tryck pÃ¥ enter för att släppa eller pÃ¥ escape för att avbryta.`,dragStartedTouch:`Börja dra. Navigera till ett mÃ¥l och dubbeltryck för att släppa.`,dragStartedVirtual:`Börja dra. Navigera till ett mÃ¥l och klicka eller tryck pÃ¥ enter för att släppa.`,dropCanceled:`SläppÃ¥tgärd avbröts.`,dropComplete:`SläppÃ¥tgärd klar.`,dropDescriptionKeyboard:`Tryck pÃ¥ enter för att släppa. Tryck pÃ¥ escape för att avbryta dragÃ¥tgärd.`,dropDescriptionTouch:`Dubbeltryck för att släppa.`,dropDescriptionVirtual:`Klicka för att släppa.`,dropIndicator:`släppindikator`,dropOnItem:e=>`Sl\xe4pp p\xe5 ${e.itemText}`,dropOnRoot:`Släpp pÃ¥`,endDragKeyboard:`Drar. Tryck pÃ¥ enter för att avbryta dragÃ¥tgärd.`,endDragTouch:`Drar. Dubbeltryck för att avbryta dragÃ¥tgärd.`,endDragVirtual:`Drar. Klicka för att avbryta dragÃ¥tgärd.`,insertAfter:e=>`Infoga efter ${e.itemText}`,insertBefore:e=>`Infoga f\xf6re ${e.itemText}`,insertBetween:e=>`Infoga mellan ${e.beforeItemText} och ${e.afterItemText}`};var Kz={};Kz={dragDescriptionKeyboard:`Sürüklemeyi baÅlatmak için Enter'a basın.`,dragDescriptionKeyboardAlt:`Sürüklemeyi baÅlatmak için Alt + Enter'a basın.`,dragDescriptionLongPress:`Sürüklemeye baÅlamak için uzun basın.`,dragDescriptionTouch:`Sürüklemeyi baÅlatmak için çift tıklayın.`,dragDescriptionVirtual:`Sürüklemeyi baÅlatmak için tıklayın.`,dragItem:e=>`${e.itemText}\u{2019}i s\xfcr\xfckle`,dragSelectedItems:(e,t)=>`S\xfcr\xfckle ${t.plural(e.count,{one:()=>`${t.number(e.count)} se\xe7ili \xf6ge`,other:()=>`${t.number(e.count)} se\xe7ili \xf6ge`})}`,dragSelectedKeyboard:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} se\xe7ilmi\u{15F} \xf6\u{11F}e`,other:()=>`${t.number(e.count)} se\xe7ilmi\u{15F} \xf6\u{11F}e`})} \xf6\u{11F}esini s\xfcr\xfcklemek i\xe7in Enter'a bas\u{131}n.`,dragSelectedKeyboardAlt:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} se\xe7ilmi\u{15F} \xf6\u{11F}e`,other:()=>`${t.number(e.count)} se\xe7ilmi\u{15F} \xf6\u{11F}e`})} \xf6\u{11F}esini s\xfcr\xfcklemek i\xe7in Alt + Enter tu\u{15F}
16una bas\u{131}n.`,dragSelectedLongPress:(e,t)=>`${t.plural(e.count,{one:()=>`${t.number(e.count)} se\xe7ilmi\u{15F} \xf6\u{11F}e`,other:()=>`${t.number(e.count)} se\xe7ilmi\u{15F} \xf6\u{11F}e`})} \xf6\u{11F}esini s\xfcr\xfcklemek i\xe7in uzun bas\u{131}n.`,dragStartedKeyboard:`Sürükleme baÅlatıldı. Bir bırakma hedefine gitmek için Tabâa basın, ardından bırakmak için Enterâa basın veya iptal etmek için Escapeâe basın.`,dragStartedTouch:`Sürükleme baÅlatıldı. Bir bırakma hedefine gidin, ardından bırakmak için çift tıklayın.`,dragStartedVirtual:`Sürükleme baÅlatıldı. Bir bırakma hedefine gidin, ardından bırakmak için Enterâa tıklayın veya basın.`,dropCanceled:`Bırakma iptal edildi.`,dropComplete:`Bırakma tamamlandı.`,dropDescriptionKeyboard:`Bırakmak için Enter'a basın. Sürüklemeyi iptal etmek için Escape'e basın.`,dropDescriptionTouch:`Bırakmak için çift tıklayın.`,dropDescriptionVirtual:`Bırakmak için tıklayın.`,dropIndicator:`bırakma göstergesi`,dropOnItem:e=>`${e.itemText} \xfczerine b\u{131}rak`,dropOnRoot:`Bırakın`,endDragKeyboard:`Sürükleme. Sürüklemeyi iptal etmek için Enter'a basın.`,endDragTouch:`Sürükleme. Sürüklemeyi iptal etmek için çift tıklayın.`,endDragVirtual:`Sürükleme. Sürüklemeyi iptal etmek için tıklayın.`,insertAfter:e=>`${e.itemText}\u{2019}den sonra gir`,insertBefore:e=>`${e.itemText}\u{2019}den \xf6nce gir`,insertBetween:e=>`${e.beforeItemText} ve ${e.afterItemText} aras\u{131}na gir`};var qz={};qz={dragDescriptionKeyboard:`ÐаÑиÑнÑÑÑ Enter, Ñоб поÑаÑи пеÑеÑÑгÑваннÑ.`,dragDescriptionKeyboardAlt:`ÐаÑиÑнÑÑÑ Alt + Enter, Ñоб поÑаÑи пеÑеÑÑгÑваннÑ.`,dragDescriptionLongPress:`ÐаÑиÑнÑÑÑ Ñ ÑÑÑимÑйÑе, Ñоб поÑаÑи пеÑеÑÑгÑваннÑ.`,dragDescriptionTouch:`ÐаÑиÑнÑÑÑ Ð´Ð²ÑÑÑ, Ñоб поÑаÑи пеÑеÑÑгÑваннÑ.`,dragDescriptionVirtual:`ÐаÑиÑнÑÑÑ, Ñоб поÑаÑи пеÑеÑÑгÑваннÑ.`,dragItem:e=>`\u{41F}\u{435}\u{440}\u{435}\u{442}\u{44F}\u{433}\u{43D}\u{443}\u{442}\u{438} ${e.itemText}`,dragSelectedItems:(e,t)=>`\u{41F}\u{435}\u{440}\u{435}\u{442}\u{44F}\u{433}\u{43D}\u{456}\u{442}\u{44C} ${t.plural(e.count,{one:()=>`${t.number(e.count)} \u{432}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{438}\u{439} \u{435}\u{43B}\u{435}\u{43C}\u{435}\u{43D}\u{442}`,other:()=>`${t.number(e.count)} \u{432}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{438}\u{445} \u{435}\u{43B}\u{435}\u{43C}`})}`,dragSelectedKeyboard:(e,t)=>`\u{41D}\u{430}\u{442}\u{438}\u{441}\u{43D}\u{456}\u{442}\u{44C} Enter, \u{449}\u{43E}\u{431} \u{43F}\u{435}\u{440}\u{435}\u{442}\u{44F}\u{433}\u{43D}\u{443}\u{442}\u{438} ${t.plural(e.count,{one:()=>`${t.number(e.count)} \u{432}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{438}\u{439} \u{435}\u{43B}\u{435}\u{43C}\u{435}\u{43D}\u{442}`,other:()=>`${t.number(e.count)} \u{432}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{438}\u{445} \u{435}\u{43B}\u{435}\u{43C}\u{435}\u{43D}\u{442}\u{438}(-\u{456}\u{432})`})}.`,dragSelectedKeyboardAlt:(e,t)=>`\u{41D}\u{430}\u{442}\u{438}\u{441}\u{43D}\u{456}\u{442}\u{44C} Alt + Enter, \u{449}\u{43E}\u{431} \u{43F}\u{435}\u{440}\u{435}\u{442}\u{44F}\u{433}\u{43D}\u{443}\u{442}\u{438} ${t.plural(e.count,{one:()=>`${t.number(e.count)} \u{432}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{438}\u{439} \u{435}\u{43B}\u{435}\u{43C}\u{435}\u{43D}\u{442}`,other:()=>`${t.number(e.count)} \u{432}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{438}\u{445} \u{435}\u{43B}\u{435}\u{43C}\u{435}\u{43D}\u{442}\u{438}(-\u{456}\u{432})`})}.`,dragSelectedLongPress:(e,t)=>`\u{423}\u{442}\u{440}\u{438}\u{43C}\u{443}\u{439}\u{442}\u{435}, \u{449}\u{43E}\u{431} \u{43F}\u{435}\u{440}\u{435}\u{442}\u{44F}\u{433}\u{43D}\u{443}\u{442}\u{438} ${t.plural(e.count,{one:()=>`${t.number(e.count)} \u{432}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{438}\u{439} \u{435}\u{43B}\u{435}\u{43C}\u{435}\u{43D}\u{442}`,other:()=>`${t.number(e.count)} \u{432}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{438}\u{445} \u{435}\u{43B}\u{435}\u{43C}\u{435}\u{43D}\u{442}\u{438}(-\u{456}\u{432})`})}.`,dragStartedKeyboard:`ÐеÑеÑÑгÑÐ²Ð°Ð½Ð½Ñ Ð¿Ð¾ÑалоÑÑ. ÐаÑиÑнÑÑÑ Tab, Ñоб пеÑейÑи до ÑÑÐ»Ñ Ð¿ÐµÑеÑÑгÑваннÑ, поÑÑм наÑиÑнÑÑÑ Enter, Ñоб пеÑеÑÑгнÑÑи, або Escape, Ñоб ÑкаÑÑваÑи.`,dragStartedTouch:`ÐеÑеÑÑгÑÐ²Ð°Ð½Ð½Ñ Ð¿Ð¾ÑалоÑÑ. ÐеÑейдÑÑÑ Ð´Ð¾ ÑÑÐ»Ñ Ð¿ÐµÑеÑÑгÑваннÑ, поÑÑм наÑиÑнÑÑÑ Ð´Ð²ÑÑÑ, Ñоб пеÑеÑÑгнÑÑи.`,dragStartedVirtual:`ÐеÑеÑÑгÑÐ²Ð°Ð½Ð½Ñ Ð¿Ð¾ÑалоÑÑ. ÐеÑейдÑÑÑ Ð´Ð¾ ÑÑÐ»Ñ Ð¿ÐµÑеÑÑгÑваннÑ, поÑÑм наÑиÑнÑÑÑ Enter, Ñоб пеÑеÑÑгнÑÑи.`,dropCanceled:`ÐеÑеÑÑгÑÐ²Ð°Ð½Ð½Ñ ÑкаÑовано.`,dropComplete:`ÐеÑеÑÑгÑÐ²Ð°Ð½Ð½Ñ Ð·Ð°Ð²ÐµÑÑено.`,dropDescriptionKeyboard:`ÐаÑиÑнÑÑÑ Enter, Ñоб пеÑеÑÑгнÑÑи. ÐаÑиÑнÑÑÑ Escape, Ñоб ÑкаÑÑваÑи пеÑеÑÑгÑваннÑ.`,dropDescriptionTouch:`ÐаÑиÑнÑÑÑ Ð´Ð²ÑÑÑ, Ñоб пеÑеÑÑгнÑÑи.`,dropDescriptionVirtual:`ÐаÑиÑнÑÑÑ, Ñоб пеÑеÑÑгнÑÑи.`,dropIndicator:`ÑндикаÑÐ¾Ñ Ð¿ÐµÑеÑÑгÑваннÑ`,dropOnItem:e=>`\u{41F}\u{435}\u{440}\u{435}\u{442}\u{44F}\u{433}\u{43D}\u{443}\u{442}\u{438} \u{43D}\u{430} ${e.itemText}`,dropOnRoot:`ÐеÑеÑÑгнÑÑи на`,endDragKeyboard:`ТÑÐ¸Ð²Ð°Ñ Ð¿ÐµÑеÑÑгÑваннÑ. ÐаÑиÑнÑÑÑ Enter, Ñоб ÑкаÑÑваÑи пеÑеÑÑгÑваннÑ.`,endDragTouch:`ТÑÐ¸Ð²Ð°Ñ Ð¿ÐµÑеÑÑгÑваннÑ. ÐаÑиÑнÑÑÑ Ð´Ð²ÑÑÑ, Ñоб ÑкаÑÑваÑи пеÑеÑÑгÑваннÑ.`,endDragVirtual:`ТÑÐ¸Ð²Ð°Ñ Ð¿ÐµÑеÑÑгÑваннÑ. ÐаÑиÑнÑÑÑ, Ñоб ÑкаÑÑваÑи пеÑеÑÑгÑваннÑ.`,insertAfter:e=>`\u{412}\u{441}\u{442}\u{430}\u{432}\u{438}\u{442}\u{438} \u{43F}\u{456}\u{441}\u{43B}\u{44F} ${e.itemText}`,insertBefore:e=>`\u{412}\u{441}\u{442}\u{430}\u{432}\u{438}\u{442}\u{438} \u{43F}\u{435}\u{440}\u{435}\u{434} ${e.itemText}`,insertBetween:e=>`\u{412}\u{441}\u{442}\u{430}\u{432}\u{438}\u{442}\u{438} \u{43C}\u{456}\u{436} ${e.beforeItemText} \u{456} ${e.afterItemText}`};var Jz={};Jz={dragDescriptionKeyboard:`æ Enter å¼å§æå¨ã`,dragDescriptionKeyboardAlt:`æ Alt + Enter å¼å§æå¨ã`,dragDescriptionLongPress:`é¿æä»¥å¼å§æå¨ã`,dragDescriptionTouch:`åå»å¼å§æå¨ã`,dragDescriptionVirtual:`åå»å¼å§æå¨ã`,dragItem:e=>`\u{62D6}\u{52A8} ${e.itemText}`,dragSelectedItems:(e,t)=>`\u{62D6}\u{52A8} ${t.plural(e.count,{one:()=>`${t.number(e.count)} \u{9009}\u{4E2D}\u{9879}\u{76EE}`,other:()=>`${t.number(e.count)} \u{9009}\u{4E2D}\u{9879}\u{76EE}`})}`,dragSelectedKeyboard:(e,t)=>`\u{6309} Enter \u{4EE5}\u{62D6}\u{52A8} ${t.plural(e.count,{one:()=>`${t.number(e.count)} \u{4E2A}\u{9009}\u{5B9A}\u{9879}`,other:()=>`${t.number(e.count)} \u{4E2A}\u{9009}\u{5B9A}\u{9879}`})}\u{3002}`,dragSelectedKeyboardAlt:(e,t)=>`\u{6309} Alt + Enter \u{4EE5}\u{62D6}\u{52A8} ${t.plural(e.count,{one:()=>`${t.number(e.count)} \u{4E2A}\u{9009}\u{5B9A}\u{9879}`,other:()=>`${t.number(e.count)} \u{4E2A}\u{9009}\u{5B9A}\u{9879}`})}\u{3002}`,dragSelectedLongPress:(e,t)=>`\u{957F}\u{6309}\u{4EE5}\u{62D6}\u{52A8} ${t.plural(e.count,{one:()=>`${t.number(e.count)} \u{4E2A}\u{9009}\u{5B9A}\u{9879}`,other:()=>`${t.number(e.count)} \u{4E2A}\u{9009}\u{5B9A}\u{9879}`})}\u{3002}`,dragStartedKeyboard:`å·²å¼å§æå¨ãæ Tab 导èªå°æ¾ç½®ç®æ ï¼ç¶åæ Enter æ¾ç½®ææ Escape åæ¶ã`,dragStartedTouch:`å·²å¼å§æå¨ã导èªå°æ¾ç½®ç®æ ï¼ç¶åå廿¾ç½®ã`,dragStartedVirtual:`å·²å¼å§æå¨ã导èªå°æ¾ç½®ç®æ ï¼ç¶åå廿æ Enter æ¾ç½®ã`,dropCanceled:`æ¾ç½®å·²åæ¶ã`,dropComplete:`æ¾ç½®å·²å®æã`,dropDescriptionKeyboard:`æ Enter æ¾ç½®ãæ Escape åæ¶æå¨ã`,dropDescriptionTouch:`å廿¾ç½®ã`,dropDescriptionVirtual:`å廿¾ç½®ã`,dropIndicator:`æ¾ç½®æ è®°`,dropOnItem:e=>`\u{653E}\u{7F6E}\u{4E8E} ${e.itemText}`,dropOnRoot:`æ¾ç½®äº`,endDragKeyboard:`æ£å¨æå¨ãæ Enter åæ¶æå¨ã`,endDragTouch:`æ£å¨æå¨ãåå»åæ¶æå¨ã`,endDragVirtual:`æ£å¨æå¨ãåå»åæ¶æå¨ã`,insertAfter:e=>`\u{63D2}\u{5165}\u{5230} ${e.itemText} \u{4E4B}\u{540E}`,insertBefore:e=>`\u{63D2}\u{5165}\u{5230} ${e.itemText} \u{4E4B}\u{524D}`,insertBetween:e=>`\u{63D2}\u{5165}\u{5230} ${e.beforeItemText} \u{548C} ${e.afterItemText} \u{4E4B}\u{95F4}`};var Yz={};Yz={dragDescriptionKeyboard:`æ Enter éµä»¥éå§ææ³ã`,dragDescriptionKeyboardAlt:`æ Alt+Enter éµä»¥éå§ææ³ã`,dragDescriptionLongPress:`鷿以éå§ææ³ã`,dragDescriptionTouch:`è¼é»å
©ä¸ä»¥éå§ææ³ã`,dragDescriptionVirtual:`æä¸ä¸æ»é¼ 以éå§ææ³ã`,dragItem:e=>`\u{62D6}\u{66F3}\u{300C}${e.itemText}\u{300D}`,dragSelectedItems:(e,t)=>`\u{62D6}\u{66F3} ${t.plural(e.count,{one:()=>`${t.number(e.count)} \u{500B}\u{9078}\u{5B9A}\u{9805}\u{76EE}`,other:()=>`${t.number(e.count)} \u{500B}\u{9078}\u{5B9A}\u{9805}\u{76EE}`})}`,dragSelectedKeyboard:(e,t)=>`\u{6309} Enter \u{9375}\u{4EE5}\u{62D6}\u{66F3} ${t.plural(e.count,{one:()=>`${t.number(e.count)} \u{500B}\u{9078}\u{5B9A}\u{9805}\u{76EE}`,other:()=>`${t.number(e.count)} \u{500B}\u{9078}\u{5B9A}\u{9805}\u{76EE}`})}\u{3002}`,dragSelectedKeyboardAlt:(e,t)=>`\u{6309} Alt+Enter \u{9375}\u{4EE5}\u{62D6}\u{66F3} ${t.plural(e.count,{one:()=>`${t.number(e.count)} \u{500B}\u{9078}\u{5B9A}\u{9805}\u{76EE}`,other:()=>`${t.number(e.count)} \u{500B}\u{9078}\u{5B9A}\u{9805}\u{76EE}`})}\u{3002}`,dragSelectedLongPress:(e,t)=>`\u{9577}\u{6309}\u{4EE5}\u{62D6}\u{66F3} ${t.plural(e.count,{one:()=>`${t.number(e.count)} \u{500B}\u{9078}\u{5B9A}\u{9805}\u{76EE}`,other:()=>`${t.number(e.count)} \u{500B}\u{9078}\u{5B9A}\u{9805}\u{76EE}`})}\u{3002}`,dragStartedKeyboard:`å·²éå§ææ³ãæ Tab éµä»¥çè¦½è³æ¾ç½®ç®æ¨ï¼ç¶å¾æ Enter éµä»¥æ¾ç½®ï¼ææ Escape éµä»¥åæ¶ã`,dragStartedTouch:`å·²éå§ææ³ãçè¦½è³æ¾ç½®ç®æ¨ï¼ç¶å¾è¼é»
16å
©ä¸ä»¥æ¾ç½®ã`,dragStartedVirtual:`å·²éå§ææ³ãçè¦½è³æ¾ç½®ç®æ¨ï¼ç¶å¾æä¸ä¸æ»é¼ ææ Enter éµä»¥æ¾ç½®ã`,dropCanceled:`æ¾ç½®å·²åæ¶ã`,dropComplete:`æ¾ç½®å·²å®æã`,dropDescriptionKeyboard:`æ Enter éµä»¥æ¾ç½®ãæ Escape éµä»¥åæ¶ææ³ã`,dropDescriptionTouch:`è¼é»å
©ä¸ä»¥æ¾ç½®ã`,dropDescriptionVirtual:`æä¸ä¸æ»é¼ 以æ¾ç½®ã`,dropIndicator:`æ¾ç½®æç¤ºå¨`,dropOnItem:e=>`\u{653E}\u{7F6E}\u{5728}\u{300C}${e.itemText}\u{300D}\u{4E0A}`,dropOnRoot:`æ¾ç½®å¨`,endDragKeyboard:`ææ³ä¸ãæ Enter éµä»¥åæ¶ææ³ã`,endDragTouch:`ææ³ä¸ãè¼é»å
©ä¸ä»¥åæ¶ææ³ã`,endDragVirtual:`ææ³ä¸ãæä¸ä¸æ»é¼ ä»¥åæ¶ææ³ã`,insertAfter:e=>`\u{63D2}\u{5165}\u{81F3}\u{300C}${e.itemText}\u{300D}\u{4E4B}\u{5F8C}`,insertBefore:e=>`\u{63D2}\u{5165}\u{81F3}\u{300C}${e.itemText}\u{300D}\u{4E4B}\u{524D}`,insertBetween:e=>`\u{63D2}\u{5165}\u{81F3}\u{300C}${e.beforeItemText}\u{300D}\u{548C}\u{300C}${e.afterItemText}\u{300D}\u{4E4B}\u{9593}`};var Xz={};Xz={"ar-AE":gz,"bg-BG":_z,"cs-CZ":vz,"da-DK":yz,"de-DE":bz,"el-GR":xz,"en-US":Sz,"es-ES":Cz,"et-EE":wz,"fi-FI":Tz,"fr-FR":Ez,"he-IL":Dz,"hr-HR":Oz,"hu-HU":kz,"it-IT":Az,"ja-JP":jz,"ko-KR":Mz,"lt-LT":Nz,"lv-LV":Pz,"nb-NO":Fz,"nl-NL":Iz,"pl-PL":Lz,"pt-BR":Rz,"pt-PT":zz,"ro-RO":Bz,"ru-RU":Vz,"sk-SK":Hz,"sl-SI":Uz,"sr-SP":Wz,"sv-SE":Gz,"tr-TR":Kz,"uk-UA":qz,"zh-CN":Jz,"zh-TW":Yz};function uge(e){return e&&e.__esModule?e.default:e}var Zz={keyboard:{start:`dragDescriptionKeyboard`,end:`endDragKeyboard`},touch:{start:`dragDescriptionTouch`,end:`endDragTouch`},virtual:{start:`dragDescriptionVirtual`,end:`endDragVirtual`}};function dge(e){let{hasDragButton:t,isDisabled:n}=e,r=iN(uge(Xz),`@react-aria/dnd`),i=(0,V.useRef)({options:e,x:0,y:0}).current;i.options=e;let a=(0,V.useRef)(null),[o,s]=(0,V.useState)(!1),c=e=>{a.current=e,s(!!e)},{addGlobalListener:l,removeAllGlobalListeners:u}=Hj(),d=(0,V.useRef)(null),f=t=>{var n,r;if(t.defaultPrevented)return;if(t.stopPropagation(),d.current===`virtual`){t.preventDefault(),g(t.target),d.current=null;return}typeof e.onDragStart==`function`&&e.onDragStart({type:`dragstart`,x:t.clientX,y:t.clientY});let a=e.getItems();(n=(r=t.dataTransfer).clearData)==null||n.call(r),Jhe(t.dataTransfer,a);let o=zR.all;if(typeof e.getAllowedDropOperations==`function`){let t=e.getAllowedDropOperations();o=zR.none;for(let e of t)o|=zR[e]||zR.none}cz(o);let s=VR[o]||`none`;t.dataTransfer.effectAllowed=s===`cancel`?`none`:s,typeof e.preview?.current==`function`&&e.preview.current(a,(e,n,r)=>{if(!e)return;let i=e.getBoundingClientRect(),a=t.currentTarget.getBoundingClientRect(),o=t.clientX-a.x,s=t.clientY-a.y;(o>i.width||s>i.height)&&(o=i.width/2,s=i.height/2);let c=o,l=s;
vendor: 22,423 bytes, line 16
16typeof n==`number`&&typeof r==`number`&&(c=n,l=r),c=Math.max(0,Math.min(c,i.width)),l=Math.max(0,Math.min(l,i.height));let u=2*Math.round(i.height/2);e.style.height=`${u}px`,t.dataTransfer.setDragImage(e,c,l)}),l(window,`drop`,e=>{e.preventDefault(),e.stopPropagation(),console.warn(`Drags initiated from the React Aria useDrag hook may only be dropped on a target created with useDrop. This ensures that a keyboard and screen reader accessible alternative is available.`)},{once:!0}),i.x=t.clientX,i.y=t.clientY;let u=t.target;requestAnimationFrame(()=>{c(u)})},p=t=>{t.stopPropagation(),(t.clientX!==i.x||t.clientY!==i.y)&&(typeof e.onDragMove==`function`&&e.onDragMove({type:`dragmove`,x:t.clientX,y:t.clientY}),i.x=t.clientX,i.y=t.clientY)},m=t=>{if(t.stopPropagation(),typeof e.onDragEnd==`function`){let n={type:`dragend`,x:t.clientX,y:t.clientY,dropOperation:HR[t.dataTransfer.dropEffect]};az&&(n.dropOperation=HR[az]),e.onDragEnd(n)}c(null),u(),cz(zR.none),oz(void 0)};(0,V.useEffect)(()=>()=>{if(a.current&&(!a.current.isConnected||parseInt(V.version,10)<17)){if(typeof i.options.onDragEnd==`function`){let e={type:`dragend`,x:0,y:0,dropOperation:HR[az||`none`]};i.options.onDragEnd(e)}c(null),cz(zR.none),oz(void 0)}},[i]);let h=e=>{(e.pointerType===`keyboard`||e.pointerType===`virtual`)&&g(e.target)},g=e=>{if(typeof i.options.onDragStart==`function`){let t=e.getBoundingClientRect();i.options.onDragStart({type:`dragstart`,x:t.x+t.width/2,y:t.y+t.height/2})}rge({element:e,items:i.options.getItems(),allowedDropOperations:typeof i.options.getAllowedDropOperations==`function`?i.options.getAllowedDropOperations():[`move`,`copy`,`link`],onDragEnd(e){c(null),typeof i.options.onDragEnd==`function`&&i.options.onDragEnd(e)}},r),c(e)},_=XR(),v=o?Zz[_].end:Zz[_].start,y=tM(r.format(v)),b={};return t||(b={...y,onPointerDown(e){if(d.current=sM(e.nativeEvent)?`virtual`:e.pointerType,e.width<1&&e.height<1)d.current=`virtual`;else{let t=e.currentTarget.getBoundingClientRect(),n=e.clientX-t.x,r=e.clientY-t.y,i=t.width/2,a=t.height/2;Math.abs(n-i)<=.5&&Math.abs(r-a)<=.5?d.current=`virtual`:d.current=e.pointerType}},onKeyDownCapture(e){e.target===e.currentTarget&&e.key===`Enter`&&(e.preventDefault(),e.stopPropagation())},onKeyUpCapture(e){e.target===e.currentTarget&&e.key===`Enter`&&(e.preventDefault(),e.stopPropagation(),g(e.target))},onClick(e){(oM(e.nativeEvent)||d.current===`virtual`)&&(e.preventDefault(),e.stopPropagation(),g(e.target))}}),n?{dragProps:{draggable:`false`},dragButtonProps:{},isDragging:!1}:{dragProps:{...b,draggable:`true`,onDragStart:f,onDrag:p,onDragEnd:m},dragButtonProps:{...y,onPress:h},isDragging:o}}function fge(e){return e&&e.__esModule?e.default:e}var pge={keyboard:`dropDescriptionKeyboard`,touch:`dropDescriptionTouch`,virtual:`dropDescriptionVirtual`};function Qz(){let e=iN(fge(Xz),`@react-aria/dnd`),t=XR();return{dropProps:{...tM(mz()?e.format(pge[t]):``),onClick:()=>{}}}}var mge=800;function hge(e){let{hasDropButton:t,isDisabled:n}=e,[r,i]=(0,V.useState)(!1),a=(0,V.useRef)({x:0,y:0,dragOverElements:new Set,dropEffect:`none`,allowedOperations:zR.all,dropActivateTimer:void 0}).current,o=t=>{if(i(!0),typeof e.onDropEnter==`function`){let n=t.currentTarget.getBoundingClientRect();e.onDropEnter({type:`dropenter`,x:t.clientX-n.x,y:t.clientY-n.y})}},s=t=>{if(i(!1),typeof e.onDropExit==`function`){let n=t.currentTarget.getBoundingClientRect();e.onDropExit({type:`dropexit`,x:t.clientX-n.x,y:t.clientY-n.y})}},c=t=>{t.preventDefault(),t.stopPropagation();let n=$z(t);if(t.clientX===a.x&&t.clientY===a.y&&n===a.allowedOperations){t.dataTransfer.dropEffect=a.dropEffect;return}a.x=t.clientX,a.y=t.clientY;let r=a.dropEffect;if(n!==a.allowedOperations){let r=eB(n),i=r[0];if(typeof e.getDropOperation==`function`){let a=new QR(t.dataTransfer);i=tB(n,e.getDropOperation(a,r))}a.dropEffect=UR[i]||`none`}if(typeof e.getDropOperationForPoint==`function`){let r=new QR(t.dataTransfer),i=t.currentTarget.getBoundingClientRect(),o=tB(n,e.getDropOperationForPoint(r,eB(n),a.x-i.x,a.y-i.y));a.dropEffect=UR[o]||`none`}if(a.allowedOperations=n,t.dataTransfer.dropEffect=a.dropEffect,a.dropEffect===`none`&&r!==`none`?s(t):a.dropEffect!==`none`&&r===`none`&&o(t),typeof e.onDropMove==`function`&&a.dropEffect!==`none`){let n=t.currentTarget.getBoundingClientRect();e.onDropMove({type:`dropmove`,x:a.x-n.x,y:a.y-n.y})}if(clearTimeout(a.dropActivateTimer),e.onDropActivate&&typeof e.onDropActivate==`function`&&a.dropEffect!==`none`){let n=e.onDropActivate,r=t.currentTarget.getBoundingClientRect();a.dropActivateTimer=setTimeout(()=>{n({type:`dropactivate`,x:a.x-r.x,y:a.y-r.y})},mge)}},l=t=>{if(t.preventDefault(),t.stopPropagation(),a.dragOverElements.add(t.target),a.dragOverElements.size>1)return;let n=$z(t),r=eB(n),i=r[0];if(typeof e.getDropOperation==`function`){let a=new QR(t.dataTransfer);i=tB(n,e.getDropOperation(a,r))}if(typeof e.getDropOperationForPoint==`function`){let a=new QR(t.dataTransfer),o=t.currentTarget.getBoundingClientRect();i=tB(n,e.getDropOperationForPoint(a,r,t.clientX-o.x,t.clientY-o.y))}a.x=t.clientX,a.y=t.clientY,a.allowedOperations=n,a.dropEffect=UR[i]||`none`,t.dataTransfer.dropEffect=a.dropEffect,i!==`cancel`&&o(t)},u=e=>{e.preventDefault(),e.stopPropagation(),a.dragOverElements.delete(e.target);for(let t of a.dragOverElements)e.currentTarget.contains(t)||a.dragOverElements.delete(t);a.dragOverElements.size>0||(a.dropEffect!==`none`&&s(e),clearTimeout(a.dropActivateTimer))},d=t=>{if(t.preventDefault(),t.stopPropagation(),oz(a.dropEffect),typeof e.onDrop==`function`){let n=HR[a.dropEffect],r=Yhe(t.dataTransfer),i=t.currentTarget.getBoundingClientRect(),o={type:`drop`,x:t.clientX-i.x,y:t.clientY-i.y,items:r,dropOperation:n};e.onDrop(o)}let n={...tz};a.dragOverElements.clear(),s(t),clearTimeout(a.dropActivateTimer),n.draggingCollectionRef==null?oz(void 0):tge(n)},f=Gj(t=>{typeof e.onDropEnter==`function`&&e.onDropEnter(t)}),p=Gj(t=>{typeof e.onDropExit==`function`&&e.onDropExit(t)}),m=Gj(t=>{typeof e.onDropActivate==`function`&&e.onDropActivate(t)}),h=Gj(t=>{typeof e.onDrop==`function`&&e.onDrop(t)}),g=Gj((t,n)=>e.getDropOperation?e.getDropOperation(t,n):n[0]),{ref:_}=e;rj(()=>{if(!n&&_.current)return pz({element:_.current,getDropOperation:g,onDropEnter(e){i(!0),f(e)},onDropExit(e){i(!1),p(e)},onDrop:h,onDropActivate:m})},[n,_]);let{dropProps:v}=Qz();return n?{dropProps:{},dropButtonProps:{isDisabled:!0},isDropTarget:!1}:{dropProps:{...!t&&v,onDragEnter:l,onDragOver:c,onDragLeave:u,onDrop:d},dropButtonProps:{...t&&v},isDropTarget:r}}function $z(e){let t=BR[e.dataTransfer.effectAllowed];sz&&(t&=sz);let n=zR.none;return Aj()?(e.altKey&&(n|=zR.copy),e.ctrlKey&&!jj()&&(n|=zR.link),e.metaKey&&(n|=zR.move)):(e.altKey&&(n|=zR.link),e.shiftKey&&(n|=zR.move),e.ctrlKey&&(n|=zR.copy)),n?t&n:t}function eB(e){let t=[];return e&zR.move&&t.push(`move`),e&zR.copy&&t.push(`copy`),e&zR.link&&t.push(`link`),t}function tB(e,t){return e&zR[t]?t:`cancel`}function gge(e,t,n,r,i=!1,a=!1){switch(r){case`left`:return i?nB(e,t,n,a,`left`):rB(e,t,n,a,`left`);case`right`:return i?rB(e,t,n,a,`right`):nB(e,t,n,a,`right`);case`up`:return rB(e,t,n,a);case`down`:return nB(e,t,n,a)}}function nB(e,t,n,r=!1,i=null){if(!n)return{type:`root`};if(n.type===`root`){let t=e.getFirstKey?.call(e)??null;return t==null?null:{type:`item`,key:t,dropPosition:`before`}}if(n.type===`item`){let r=null;r=i?i===`right`?e.getKeyRightOf?.call(e,n.key):e.getKeyLeftOf?.call(e,n.key):e.getKeyBelow?.call(e,n.key);let a=t.getKeyAfter(n.key);if(r!=null&&r!==a)return{type:`item`,key:r,dropPosition:n.dropPosition};switch(n.dropPosition){case`before`:return{type:`item`,key:n.key,dropPosition:`on`};case`on`:{let e=t.getItem(n.key),i=r==null?null:t.getItem(r);return e&&i&&i.level>=e.level?{type:`item`,key:i.key,dropPosition:`before`}:{type:`item`,key:n.key,dropPosition:`after`}}case`after`:{let e=t.getItem(n.key),r=e?.nextKey==null?null:t.getItem(e.nextKey);for(;r!=null&&r.type!==`item`;)r=r.nextKey==null?null:t.getItem(r.nextKey);if(e&&r==null&&e.parentKey!=null){let n=t.getItem(e.parentKey),r=n?.nextKey==null?null:t.getItem(n.nextKey);if(r?.type===`item`)return{type:`item`,key:r.key,dropPosition:`before`};if(n?.type===`item`)return{type:`item`,key:n.key,dropPosition:`after`}}if(r)return{type:`item`,key:r.key,dropPosition:`on`}}}}return r?{type:`root`}:null}function rB(e,t,n,r=!1,i=null){if(!n||r&&n.type===`root`){let n=null,r=e.getLastKey?.call(e);for(;r!=null;){let e=t.getItem(r);if(e?.type!==`item`)break;n=r,r=e?.parentKey}return n==null?null:{type:`item`,key:n,dropPosition:`after`}}if(n.type===`item`){let r=null;r=i?i===`left`?e.getKeyLeftOf?.call(e,n.key):e.getKeyRightOf?.call(e,n.key):e.getKeyAbove?.call(e,n.key);let a=t.getKeyBefore(n.key);if(r!=null&&r!==a)return{type:`item`,key:r,dropPosition:n.dropPosition};switch(n.dropPosition){case`before`:{let e=t.getItem(n.key);if(e&&e.prevKey!=null){let n=iB(t,e.prevKey);if(n)return n}return r==null?{type:`root`}:{type:`item`,key:r,dropPosition:`on`}}case`on`:return{type:`item`,key:n.key,dropPosition:`before`};case`after`:return iB(t,n.key)||{type:`item`,key:n.key,dropPosition:`on`}}}return n.type===`root`?null:{type:`root`}}function iB(e,t){let n=e.getItem(t),r=e.getKeyAfter(t),i=r==null?null:e.getItem(r);if(n&&i&&i.level>n.level){let t=eI(n,e),r=null;for(let e of t)e.type===`item`&&(r=e);if(r)return{type:`item`,key:r.key,dropPosition:`after`}}return null}var aB=20;function _ge(e){let t=(0,V.useRef)(null),n=(0,V.useRef)(!0),r=(0,V.useRef)(!0);(0,V.useEffect)(()=>{if(e.current){t.current=Xj(e.current)?e.current:Zj(e.current);let i=window.getComputedStyle(t.current);n.current=/(auto|scroll)/.test(i.overflowX),r.current=/(auto|scroll)/.test(i.overflowY)}},[e]);let i=(0,V.useRef)({timer:void 0,dx:0,dy:0}).current;(0,V.useEffect)(()=>()=>{i.timer&&=(cancelAnimationFrame(i.timer),void 0)},[i]);let a=(0,V.useCallback)(()=>{n.current&&t.current&&(t.current.scrollLeft+=i.dx),r.current&&t.current&&(t.current.scrollTop+=i.dy),i.timer&&=requestAnimationFrame(a)},[t,i]);return{move(e,n){if(!Nj()||Mj()||!t.current)return;let r=t.current.getBoundingClientRect(),o=aB,s=aB,c=r.height-aB,l=r.width-aB;e<o||e>l||n<s||n>c?(e<o?i.dx=e-o:e>l&&(i.dx=e-l),n<s?i.dy=n-s:n>c&&(i.dy=n-c),i.timer||=requestAnimationFrame(a)):this.stop()},stop(){i.timer&&=(cancelAnimationFrame(i.timer),void 0)}}}function vge(e,t,n){let r=(0,V.useRef)({props:e,state:t,nextTarget:null,dropOperation:null}).current;r.props=e,r.state=t;let i=(0,V.useCallback)(async e=>{let{onInsert:t,onRootDrop:i,onItemDrop:a,onReorder:o,onMove:s,acceptedDragTypes:c=`all`,shouldAcceptItemDrop:l}=r.props,{draggingKeys:u}=tz,d=iz(n),{target:f,dropOperation:p,items:m}=e,h=m;(c!==`all`||l)&&(h=m.filter(e=>{let t;return t=e.kind===`directory`?new Set([qR]):e.kind===`file`?new Set([e.type]):e.types,c===`all`||c.some(e=>t.has(e))?f.type===`item`&&f.dropPosition===`on`&&l?l(f,t):!0:!1})),h.length>0&&(f.type===`root`&&i&&await i({items:h,dropOperation:p}),f.type===`item`&&(f.dropPosition===`on`&&a&&await a({items:h,dropOperation:p,isInternal:d,target:f}),s&&d&&await s({keys:u,dropOperation:p,target:f}),f.dropPosition!==`on`&&(!d&&t&&await t({items:h,dropOperation:p,target:f}),d&&o&&await o({keys:u,dropOperation:p,target:f}))))},[r,n]),a=_ge(n),{dropProps:o}=hge({ref:n,onDropEnter(){r.nextTarget!=null&&t.setTarget(r.nextTarget)},onDropMove(e){r.nextTarget!=null&&t.setTarget(r.nextTarget),a.move(e.x,e.y)},getDropOperationForPoint(i,a,o,s){let{draggingKeys:c,dropCollectionRef:l}=tz,u=iz(n),d=e.dropTargetDelegate.getDropTargetFromPoint(o,s,e=>t.getDropOperation({target:e,types:i,allowedOperations:a,isInternal:u,draggingKeys:c})!==`cancel`);if(!d)return r.dropOperation=`cancel`,r.nextTarget=null,`cancel`;if(r.dropOperation=t.getDropOperation({target:d,types:i,allowedOperations:a,isInternal:u,draggingKeys:c}),r.dropOperation===`cancel`){let e={type:`root`},n=t.getDropOperation({target:e,types:i,allowedOperations:a,isInternal:u,draggingKeys:c});n!==`cancel`&&(d=e,r.dropOperation=n)}return d&&r.dropOperation!==`cancel`&&n?.current!==l?.current&&nz(n),r.nextTarget=r.dropOperation===`cancel`?null:d,r.dropOperation},onDropExit(){nz(void 0),t.setTarget(null),a.stop()},onDropActivate(n){t.target?.type===`item`&&typeof e.onDropActivate==`function`&&e.onDropActivate({type:`dropactivate`,x:n.x,y:n.y,target:t.target})},onDrop(e){nz(n),t.target&&l(e,t.target);let{draggingCollectionRef:r}=tz;r??rz()}}),s=(0,V.useRef)(null),c=(0,V.useCallback)(()=>{let{state:e}=r;if(s.current){let{target:t,collection:n,selectedKeys:r,focusedKey:i,isInternal:a,draggingKeys:o}=s.current;if(e.collection.size>n.size&&e.selectionManager.isSelectionEqual(r)){let t=new Set;for(let r of e.collection.getKeys())n.getItem(r)||t.add(r);if(e.selectionManager.setSelectedKeys(t),e.selectionManager.focusedKey===i){let n=t.keys().next().value;if(n!=null){let t=e.collection.getItem(n);t?.type===`cell`&&(n=t.parentKey),n!=null&&e.selectionManager.setFocusedKey(n),e.selectionManager.selectionMode===`none`&&iP(`keyboard`)}}}else i!=null&&e.selectionManager.focusedKey===i&&a&&t.type===`item`&&t.dropPosition!==`on`&&o.has(e.collection.getItem(i)?.parentKey)?(e.selectionManager.setFocusedKey(e.collection.getItem(i)?.parentKey??null),iP(`keyboard`)):e.selectionManager.focusedKey===i&&t.type===`item`&&t.dropPosition===`on`&&e.collection.getItem(t.key)!=null?(e.selectionManager.setFocusedKey(t.key),iP(`keyboard`)):e.selectionManager.focusedKey!=null&&!e.selectionManager.isSelected(e.selectionManager.focusedKey)&&iP(`keyboard`);e.selectionManager.setFocused(!0)}},[r]),l=(0,V.useCallback)((e,t)=>{let{state:a}=r;s.current={timeout:void 0,focusedKey:a.selectionManager.focusedKey,collection:a.collection,selectedKeys:a.selectionManager.selectedKeys,draggingKeys:tz.draggingKeys,isInternal:iz(n),target:t},(r.props.onDrop||i)({type:`drop`,x:e.x,y:e.y,target:t,items:e.items,dropOperation:e.dropOperation}),s.current.timeout=setTimeout(()=>{c(),s.current=null},50)},[r,i,n,c]);(0,V.useEffect)(()=>()=>{s.current&&clearTimeout(s.current.timeout)},[]),rj(()=>{s.current&&t.collection!==s.current.collection&&c()});let{direction:u}=XM();(0,V.useEffect)(()=>{if(!n.current)return;let e=(e,t=!0,n=`down`)=>gge(r.props.keyboardDelegate,r.state.collection,e,n,u===`rtl`,t),t=(t,n=!0)=>e(t,n,`up`),i=(e,t,i,a,o=!0)=>{let s=0,c,{draggingKeys:l}=tz,u=iz(n);do{let n=a(e,o);if(!n)return null;e=n,c=r.state.getDropOperation({target:n,types:t,allowedOperations:i,isInternal:u,draggingKeys:l}),e.type===`root`&&s++}while(c===`cancel`&&!r.state.isDropTarget(e)&&s<2);return c===`cancel`?null:e};return pz({element:n.current,preventFocusOnDrop:!0,getDropOperation(t,a){if(r.state.target){let{draggingKeys:e}=tz,i=iz(n);return r.state.getDropOperation({target:r.state.target,types:t,allowedOperations:a,isInternal:i,draggingKeys:e})}return i(null,t,a,e)?`move`:`cancel`},onDropEnter(a,o){let s=JR(o.items),c=r.state.selectionManager,l=null;nz(n);let u=c.focusedKey,d=`after`,f=u==null?null:r.state.collection.getItem(u);if(f?.type===`cell`&&(u=f.parentKey),u!=null&&c.isSelected(u)&&(c.selectedKeys.size>1&&c.firstSelectedKey===u?d=`before`:u=c.lastSelectedKey),u!=null){l={type:`item`,key:u,dropPosition:d};let{draggingKeys:a}=tz,c=iz(n);r.state.getDropOperation({target:l,types:s,allowedOperations:o.allowedDropOperations,isInternal:c,draggingKeys:a})===`cancel`&&(l=i(l,s,o.allowedDropOperations,e,!1)??i(l,s,o.allowedDropOperations,t,!1))}l||=i(null,s,o.allowedDropOperations,e),r.state.setTarget(l)},onDropExit(){nz(void 0),r.state.setTarget(null)},onDropTargetEnter(e){r.state.setTarget(e)},onDropActivate(e,t){t?.type===`item`&&t?.dropPosition===`on`&&typeof r.props.onDropActivate==`function`&&r.props.onDropActivate({type:`dropactivate`,x:e.x,y:e.y,target:t})},onDrop(e,t){nz(n),r.state.target&&l(e,t||r.state.target)},onKeyDown(a,o){var s,c;let{keyboardDelegate:l}=r.props,u=JR(o.items);switch(a.key){case`ArrowDown`:if(l.getKeyBelow){let t=i(r.state.target,u,o.allowedDropOperations,(t,n)=>e(t,n,`down`));r.state.setTarget(t)}break;case`ArrowUp`:if(l.getKeyAbove){let t=i(r.state.target,u,o.allowedDropOperations,(t,n)=>e(t,n,`up`));r.state.setTarget(t)}break;case`ArrowLeft`:if(l.getKeyLeftOf){let t=i(r.state.target,u,o.allowedDropOperations,(t,n)=>e(t,n,`left`));r.state.setTarget(t)}break;case`ArrowRight`:if(l.getKeyRightOf){let t=i(r.state.target,u,o.allowedDropOperations,(t,n)=>e(t,n,`right`));r.state.setTarget(t)}break;case`Home`:if(l.getFirstKey){let t=i(null,u,o.allowedDropOperations,e);r.state.setTarget(t)}break;case`End`:if(l.getLastKey){let e=i(null,u,o.allowedDropOperations,t);r.state.setTarget(e)}break;case`PageDown`:if(l.getKeyPageBelow){let a=r.state.target;if(!a)a=i(null,u,o.allowedDropOperations,e);else{let s=l.getFirstKey?.call(l);a.type===`item`&&(s=a.key);let c=null;s!=null&&(c=l.getKeyPageBelow(s));let d=a.type===`item`?a.dropPosition:`after`;if((c==null||a.type===`item`&&a.key===l.getLastKey?.call(l))&&(c=l.getLastKey?.call(l)??null,d=`after`),c==null)break;a={type:`item`,key:c,dropPosition:d};let{draggingCollectionRef:f,draggingKeys:p}=tz,m=f?.current===n?.current;r.state.getDropOperation({target:a,types:u,allowedOperations:o.allowedDropOperations,isInternal:m,draggingKeys:p})===`cancel`&&(a=i(a,u,o.allowedDropOperations,e,!1)??i(a,u,o.allowedDropOperations,t,!1))}r.state.setTarget(a??r.state.target)}break;case`PageUp`:{if(!l.getKeyPageAbove)break;let a=r.state.target;if(!a)a=i(null,u,o.allowedDropOperations,t);else if(a.type===`item`){if(a.key===l.getFirstKey?.call(l))a={type:`root`};else{let e=l.getKeyPageAbove(a.key),t=a.dropPosition;if(e??(e=l.getFirstKey?.call(l),t=`before`),e==null)break;a={type:`item`,key:e,dropPosition:t}}let{draggingKeys:s}=tz,c=iz(n);r.state.getDropOperation({target:a,types:u,allowedOperations:o.allowedDropOperations,isInternal:c,draggingKeys:s})===`cancel`&&(a=i(a,u,o.allowedDropOperations,t,!1)??i(a,u,o.allowedDropOperations,e,!1))}r.state.setTarget(a??r.state.target);break}}(s=(c=r.props).onKeyDown)==null||s.call(c,a)}})},[r,n,l,u]);let d=uj();return KR.set(t,{id:d,ref:n}),{collectionProps:bj(o,{id:d,"aria-describedby":null})}}function oB(e,t,n){let{dropProps:r}=Qz(),i=qhe(t);(0,V.useEffect)(()=>{if(n.current)return nge({element:n.current,target:e.target,getDropOperation(n,r){let{draggingKeys:a}=tz,o=iz(i);return t.getDropOperation({target:e.target,types:n,allowedOperations:r,isInternal:o,draggingKeys:a})},activateButtonRef:e.activateButtonRef})},[n,e.target,t,i,e.activateButtonRef]);let a=mz(),{draggingKeys:o}=tz,s=iz(i),c=a&&t.getDropOperation({target:e.target,types:JR(a.dragTarget.items),allowedOperations:a.dragTarget.allowedDropOperations,isInternal:s,draggingKeys:o})!==`cancel`,l=t.isDropTarget(e.target);return(0,V.useEffect)(()=>{a&&l&&n.current&&n.current.focus()},[l,a,n]),{dropProps:{...r,"aria-hidden":!a||c?void 0:`true`},isDropTarget:l}}function yge(e){return e&&e.__esModule?e.default:e}function bge(e,t,n){let{target:r}=e,{collection:i}=t,a=iN(yge(Xz),`@react-aria/dnd`),o=mz(),{dropProps:s}=oB(e,t,n),c=uj(),l=e=>e==null?``:i.getTextValue?.call(i,e)??i.getItem(e)?.textValue??``,u=``,d;if(r.type===`root`)u=a.format(`dropOnRoot`),d=`${c} ${Khe(t)}`;else if(r.dropPosition===`on`)u=a.format(`dropOnItem`,{itemText:l(r.key)});else{let e,t;if(r.dropPosition===`before`){let t=i.getItem(r.key)?.prevKey,n=t==null?null:i.getItem(t);e=n?.type===`item`?n.key:null}else e=r.key;if(r.dropPosition===`after`){let e=i.getItem(r.key)?.nextKey,n=e==null?null:i.getItem(e);t=n?.type===`item`?n.key:null}else t=r.key;e!=null&&t!=null?u=a.format(`insertBetween`,{beforeItemText:l(e),afterItemText:l(t)}):e==null?t!=null&&(u=a.format(`insertBefore`,{itemText:l(t)})):u=a.format(`insertAfter`,{itemText:l(e)})}let f=t.isDropTarget(r),p=o?s[`aria-hidden`]:`true`;return{dropIndicatorProps:{...s,id:c,"aria-roledescription":a.format(`dropIndicator`),"aria-label":u,"aria-labelledby":d,"aria-hidden":p,tabIndex:-1},isDropTarget:f,isHidden:!f&&!!p}}function xge(e){return e&&e.__esModule?e.default:e}var Sge={keyboard:{selected:`dragSelectedKeyboard`,notSelected:`dragDescriptionKeyboard`},touch:{selected:`dragSelectedLongPress`,notSelected:`dragDescriptionLongPress`},virtual:{selected:`dragDescriptionVirtual`,notSelected:`dragDescriptionVirtual`}};function Cge(e,t){let n=iN(xge(Xz),`@react-aria/dnd`),r=t.isDisabled||t.selectionManager.isDisabled(e.key),{dragProps:i,dragButtonProps:a}=dge({getItems(){return t.getItems(e.key)},preview:t.preview,getAllowedDropOperations:t.getAllowedDropOperations,hasDragButton:e.hasDragButton,onDragStart(n){t.startDrag(e.key,n),ege(t.draggingKeys)},onDragMove(e){t.moveDrag(e)},onDragEnd(e){let{dropOperation:n}=e,r=n!==`cancel`&&iz();t.endDrag({...e,keys:t.draggingKeys,isInternal:r}),rz()}}),o=t.collection.getItem(e.key),s=t.getKeysForDrag(e.key).size,c=s>1&&t.selectionManager.isSelected(e.key),l,u,d=XR();if(!e.hasDragButton&&t.selectionManager.selectionMode!==`none`){let t=Sge[d][c?`selected`:`notSelected`];e.hasAction&&d===`keyboard`&&(t+=`Alt`),u=c?n.format(t,{count:s}):n.format(t),delete i.onClick}else if(c)l=n.format(`dragSelectedItems`,{count:s});else{var f;let r=(f=t.collection).getTextValue?.call(f,e.key)??o?.textValue??``;l=n.format(`dragItem`,{itemText:r})}let p=tM(u);if(u&&Object.assign(i,p),!e.hasDragButton&&e.hasAction){let{onKeyDownCapture:e,onKeyUpCapture:t}=i;d===`touch`&&delete i[`aria-describedby`],i.onKeyDownCapture=t=>{t.altKey&&e?.(t)},i.onKeyUpCapture=e=>{e.altKey&&t?.(e)}}return{dragProps:r?{}:i,dragButtonProps:{...a,isDisabled:r,"aria-label":l}}}function wge(e,t,n){let{draggingCollectionRef:r}=tz;t.draggingKeys.size>0&&r?.current!==n.current&&$he(n)}var Tge=V.forwardRef(function(e,t){let n=e.children,[r,i]=(0,V.useState)(null),a=(0,V.useRef)(null),o=(0,V.useRef)(void 0);return(0,V.useImperativeHandle)(t,()=>(e,t)=>{let r=n(e),s,c,l;r&&typeof r==`object`&&`element`in r?(s=r.element,c=r.x,l=r.y):s=r,(0,ak.flushSync)(()=>{i(s)}),t(a.current,c,l),o.current=requestAnimationFrame(()=>{i(null)})},[n]),(0,V.useEffect)(()=>()=>{o.current&&cancelAnimationFrame(o.current)},[]),r?V.createElement(`div`,{style:{zIndex:-100,position:`fixed`,top:0,left:-1e5},ref:a},r):null}),Ege=class{getPrimaryStart(e){return this.orientation===`horizontal`?e.left:e.top}getPrimaryEnd(e){return this.orientation===`horizontal`?e.right:e.bottom}getSecondaryStart(e){return this.orientation===`horizontal`?e.top:e.left}getSecondaryEnd(e){return this.orientation===`horizontal`?e.bottom:e.right}
16getFlowStart(e){return this.layout===`stack`?this.getPrimaryStart(e):this.getSecondaryStart(e)}getFlowEnd(e){return this.layout===`stack`?this.getPrimaryEnd(e):this.getSecondaryEnd(e)}getFlowSize(e){return this.getFlowEnd(e)-this.getFlowStart(e)}getDropTargetFromPoint(e,t,n){if(this.collection[Symbol.iterator]().next().done||!this.ref.current)return{type:`root`};let r=this.ref.current.getBoundingClientRect(),i=this.orientation===`horizontal`?e:t,a=this.orientation===`horizontal`?t:e;i+=this.getPrimaryStart(r),a+=this.getSecondaryStart(r);let o=this.layout===`stack`?i:a,s=this.orientation===`horizontal`&&this.direction===`rtl`,c=this.layout===`grid`&&this.orientation===`vertical`&&this.direction===`rtl`,l=this.layout===`stack`?s:c,u=this.ref.current?.dataset.collection,d=this.ref.current.querySelectorAll(u?`[data-collection="${CSS.escape(u)}"]`:`[data-key]`),f=new Map;for(let e of d)e instanceof HTMLElement&&e.dataset.key!=null&&f.set(e.dataset.key,e);let p=[...this.collection].filter(e=>e.type===`item`),m=0,h=p.length;for(;m<h;){let e=Math.floor((m+h)/2),t=p[e],r=f.get(String(t.key));if(!r)break;let u=r.getBoundingClientRect(),d=t=>{t?m=e+1:h=e};if(i<this.getPrimaryStart(u))d(s);else if(i>this.getPrimaryEnd(u))d(!s);else if(a<this.getSecondaryStart(u))d(c);else if(a>this.getSecondaryEnd(u))d(!c);else{let e={type:`item`,key:t.key,dropPosition:`on`};if(n(e))o<=this.getFlowStart(u)+5&&n({...e,dropPosition:`before`})?e.dropPosition=l?`after`:`before`:o>=this.getFlowEnd(u)-5&&n({...e,dropPosition:`after`})&&(e.dropPosition=l?`before`:`after`);else{let t=this.getFlowStart(u)+this.getFlowSize(u)/2;o<=t&&n({...e,dropPosition:`before`})?e.dropPosition=l?`after`:`before`:o>=t&&n({...e,dropPosition:`after`})&&(e.dropPosition=l?`before`:`after`)}return e}}let g=p[Math.min(m,p.length-1)];return r=f.get(String(g.key))?.getBoundingClientRect(),r&&(i<this.getPrimaryStart(r)||Math.abs(o-this.getFlowStart(r))<Math.abs(o-this.getFlowEnd(r)))?{type:`item`,key:g.key,dropPosition:l?`after`:`before`}:{type:`item`,key:g.key,dropPosition:l?`before`:`after`}}constructor(e,t,n){this.collection=e,this.ref=t,this.layout=n?.layout||`stack`,this.orientation=n?.orientation||`vertical`,this.direction=n?.direction||`ltr`}},sB=new WeakMap;function cB(e,t){let{id:n}=sB.get(e)??{};if(!n)throw Error(`Unknown list`);return`${n}-${Dge(t)}`}function Dge(e){return typeof e==`string`?e.replace(/\s*/g,``):``+e}var lB={};lB={deselectedItem:e=>`${e.item} \u{63A}\u{64A}\u{631} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}`,longPressToSelect:`اضغط Ù
Ø·ÙÙÙØ§ ÙÙØ¯Ø®Ù٠إÙÙ ÙØ¶Ø¹ Ø§ÙØªØØ¯Ùد.`,select:`ØªØØ¯Ùد`,selectedAll:`جÙ
ÙØ¹ Ø§ÙØ¹Ùاصر اÙÙ
ØØ¯Ø¯Ø©.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`ÙÙ
ÙØªÙ
ØªØØ¯Ùد Ø¹ÙØ§ØµØ±`,one:()=>`${t.number(e.count)} \u{639}\u{646}\u{635}\u{631} \u{645}\u{62D}\u{62F}\u{62F}`,other:()=>`${t.number(e.count)} \u{639}\u{646}\u{635}\u{631} \u{645}\u{62D}\u{62F}\u{62F}`})}.`,selectedItem:e=>`${e.item} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}`};var uB={};uB={deselectedItem:e=>`${e.item} \u{43D}\u{435} \u{435} \u{438}\u{437}\u{431}\u{440}\u{430}\u{43D}.`,longPressToSelect:`ÐаÑиÑнеÑе и задÑÑжÑе за да влезеÑе в избиÑаÑелен Ñежим.`,select:`ÐзбеÑеÑе`,selectedAll:`ÐÑиÑки елеменÑи Ñа избÑани.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`ÐÑма избÑани елеменÑи`,one:()=>`${t.number(e.count)} \u{438}\u{437}\u{431}\u{440}\u{430}\u{43D} \u{435}\u{43B}\u{435}\u{43C}\u{435}\u{43D}\u{442}`,other:()=>`${t.number(e.count)} \u{438}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{438} \u{435}\u{43B}\u{435}\u{43C}\u{435}\u{43D}\u{442}\u{438}`})}.`,selectedItem:e=>`${e.item} \u{438}\u{437}\u{431}\u{440}\u{430}\u{43D}.`};var dB={};dB={deselectedItem:e=>`Polo\u{17E}ka ${e.item} nen\xed vybr\xe1na.`,longPressToSelect:`Dlouhým stisknutÃm pÅejdete do režimu výbÄru.`,select:`Vybrat`,selectedAll:`Vybrány vÅ¡echny položky.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Nevybrány žádné položky`,one:()=>`Vybr\xe1na ${t.number(e.count)} polo\u{17E}ka`,other:()=>`Vybr\xe1no ${t.number(e.count)} polo\u{17E}ek`})}.`,selectedItem:e=>`Vybr\xe1na polo\u{17E}ka ${e.item}.`};var fB={};fB={deselectedItem:e=>`${e.item} ikke valgt.`,longPressToSelect:`Lav et langt tryk for at aktivere valgtilstand.`,select:`Vælg`,selectedAll:`Alle elementer valgt.`,selectedCount:(e,t)=>
16`${t.plural(e.count,{"=0":`Ingen elementer valgt`,one:()=>`${t.number(e.count)} element valgt`,other:()=>`${t.number(e.count)} elementer valgt`})}.`,selectedItem:e=>`${e.item} valgt.`};var pB={};pB={deselectedItem:e=>`${e.item} nicht ausgew\xe4hlt.`,longPressToSelect:`Gedrückt halten, um Auswahlmodus zu öffnen.`,select:`Auswählen`,selectedAll:`Alle Elemente ausgewählt.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Keine Elemente ausgewählt`,one:()=>`${t.number(e.count)} Element ausgew\xe4hlt`,other:()=>`${t.number(e.count)} Elemente ausgew\xe4hlt`})}.`,selectedItem:e=>`${e.item} ausgew\xe4hlt.`};var mB={};mB={deselectedItem:e=>`\u{394}\u{3B5}\u{3BD} \u{3B5}\u{3C0}\u{3B9}\u{3BB}\u{3AD}\u{3C7}\u{3B8}\u{3B7}\u{3BA}\u{3B5} \u{3C4}\u{3BF} \u{3C3}\u{3C4}\u{3BF}\u{3B9}\u{3C7}\u{3B5}\u{3AF}\u{3BF} ${e.item}.`,longPressToSelect:`ΠαÏήÏÏε ÏαÏαÏεÏαμÎνα για να μÏείÏε Ïε λειÏοÏ
Ïγία εÏιλογήÏ.`,select:`ÎÏιλογή`,selectedAll:`ÎÏιλÎÏθηκαν Ïλα Ïα ÏÏοιÏεία.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Îεν εÏιλÎÏθηκαν ÏÏοιÏεία`,one:()=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3AD}\u{3C7}\u{3B8}\u{3B7}\u{3BA}\u{3B5} ${t.number(e.count)} \u{3C3}\u{3C4}\u{3BF}\u{3B9}\u{3C7}\u{3B5}\u{3AF}\u{3BF}`,other:()=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3AD}\u{3C7}\u{3B8}\u{3B7}\u{3BA}\u{3B1}\u{3BD} ${t.number(e.count)} \u{3C3}\u{3C4}\u{3BF}\u{3B9}\u{3C7}\u{3B5}\u{3AF}\u{3B1}`})}.`,selectedItem:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3AD}\u{3C7}\u{3B8}\u{3B7}\u{3BA}\u{3B5} \u{3C4}\u{3BF} \u{3C3}\u{3C4}\u{3BF}\u{3B9}\u{3C7}\u{3B5}\u{3AF}\u{3BF} ${e.item}.`};var hB={};hB={deselectedItem:e=>`${e.item} not selected.`,select:`Select`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`No items selected`,one:()=>`${t.number(e.count)} item selected`,other:()=>`${t.number(e.count)} items selected`})}.`,selectedAll:`All items selected.`,selectedItem:e=>`${e.item} selected.`,longPressToSelect:`Long press to enter selection mode.`};var gB={};gB={deselectedItem:e=>`${e.item} no seleccionado.`,longPressToSelect:`Mantenga pulsado para abrir el modo de selección.`,select:`Seleccionar`,selectedAll:`Todos los elementos seleccionados.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Ningún elemento seleccionado`,one:()=>`${t.number(e.count)} elemento seleccionado`,other:()=>`${t.number(e.count)} elementos seleccionados`})}.`,selectedItem:e=>`${e.item} seleccionado.`};var _B={};_B={deselectedItem:e=>`${e.item} pole valitud.`,longPressToSelect:`Valikurežiimi sisenemiseks vajutage pikalt.`,select:`Vali`,selectedAll:`Kõik üksused valitud.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Ãksusi pole valitud`,one:()=>`${t.number(e.count)} \xfcksus valitud`,other:()=>`${t.number(e.count)} \xfcksust valitud`})}.`,selectedItem:e=>`${e.item} valitud.`};var vB={};vB={deselectedItem:e=>`Kohdetta ${e.item} ei valittu.`,longPressToSelect:`Siirry valintatilaan painamalla pitkään.`,select:`Valitse`,selectedAll:`Kaikki kohteet valittu.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Ei yhtään kohdetta valittu`,one:()=>`${t.number(e.count)} kohde valittu`,other:()=>`${t.number(e.count)} kohdetta valittu`})}.`,selectedItem:e=>`${e.item} valittu.`};var yB={};yB={deselectedItem:e=>`${e.item} non s\xe9lectionn\xe9.`,longPressToSelect:`Appuyez de manière prolongée pour passer en mode de sélection.`,select:`Sélectionner`,selectedAll:`Tous les éléments sélectionnés.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Aucun élément sélectionné`,one:()=>`${t.number(e.count)} \xe9l\xe9ment s\xe9lectionn\xe9`,other:()=>`${t.number(e.count)} \xe9l\xe9ments s\xe9lectionn\xe9s`})}.`,selectedItem:e=>`${e.item} s\xe9lectionn\xe9.`};var bB={};bB={deselectedItem:e=>`${e.item} \u{5DC}\u{5D0} \u{5E0}\u{5D1}\u{5D7}\u{5E8}.`,longPressToSelect:`××§×©× ×ר××× ××× ××¡× ×××¦× ×××ר×.`,select:`××ר`,selectedAll:`×× ×פר×××× × ××ר×.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`×× × ×××¨× ×¤×¨××××`,one:()=>`\u{5E4}\u{5E8}\u{5D9}\u{5D8} ${t.number(e.count)} \u{5E0}\u{5D1}\u{5D7}\u{5E8}`,other:()=>`${t.number(e.count)} \u{5E4}\u{5E8}\u{5D9}\u{5D8}\u{5D9}
16\u{5DD} \u{5E0}\u{5D1}\u{5D7}\u{5E8}\u{5D5}`})}.`,selectedItem:e=>`${e.item} \u{5E0}\u{5D1}\u{5D7}\u{5E8}.`};var xB={};xB={deselectedItem:e=>`Stavka ${e.item} nije odabrana.`,longPressToSelect:`Dugo pritisnite za ulazak u naÄin odabira.`,select:`Odaberite`,selectedAll:`Odabrane su sve stavke.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Nije odabrana nijedna stavka`,one:()=>`Odabrana je ${t.number(e.count)} stavka`,other:()=>`Odabrano je ${t.number(e.count)} stavki`})}.`,selectedItem:e=>`Stavka ${e.item} je odabrana.`};var SB={};SB={deselectedItem:e=>`${e.item} nincs kijel\xf6lve.`,longPressToSelect:`Nyomja hosszan a kijelöléshez.`,select:`Kijelölés`,selectedAll:`Az összes elem kijelölve.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Egy elem sincs kijelölve`,one:()=>`${t.number(e.count)} elem kijel\xf6lve`,other:()=>`${t.number(e.count)} elem kijel\xf6lve`})}.`,selectedItem:e=>`${e.item} kijel\xf6lve.`};var CB={};CB={deselectedItem:e=>`${e.item} non selezionato.`,longPressToSelect:`Premi a lungo per passare alla modalità di selezione.`,select:`Seleziona`,selectedAll:`Tutti gli elementi selezionati.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Nessun elemento selezionato`,one:()=>`${t.number(e.count)} elemento selezionato`,other:()=>`${t.number(e.count)} elementi selezionati`})}.`,selectedItem:e=>`${e.item} selezionato.`};var wB={};wB={deselectedItem:e=>`${e.item} \u{304C}\u{9078}\u{629E}\u{3055}\u{308C}\u{3066}\u{3044}\u{307E}\u{305B}\u{3093}\u{3002}`,longPressToSelect:`é·æ¼ããã¦é¸æã¢ã¼ããéãã¾ãã`,select:`鏿`,selectedAll:`ãã¹ã¦ã®é
ç®ã鏿ãã¾ããã`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`é
ç®ã鏿ããã¦ãã¾ãã`,one:()=>`${t.number(e.count)} \u{9805}\u{76EE}\u{3092}\u{9078}\u{629E}\u{3057}\u{307E}\u{3057}\u{305F}`,other:()=>`${t.number(e.count)} \u{9805}\u{76EE}\u{3092}\u{9078}\u{629E}\u{3057}\u{307E}\u{3057}\u{305F}`})}\u{3002}`,selectedItem:e=>`${e.item} \u{3092}\u{9078}\u{629E}\u{3057}\u{307E}\u{3057}\u{305F}\u{3002}`};var TB={};TB={deselectedItem:e=>`${e.item}\u{C774}(\u{AC00}) \u{C120}\u{D0DD}\u{B418}\u{C9C0} \u{C54A}\u{C558}\u{C2B5}\u{B2C8}\u{B2E4}.`,longPressToSelect:`ì í 모ëë¡ ë¤ì´ê°ë ¤ë©´ ê¸¸ê² ë르ììì¤.`,select:`ì í`,selectedAll:`모ë íëª©ì´ ì íëììµëë¤.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`ì íë íëª©ì´ ììµëë¤`,one:()=>`${t.number(e.count)}\u{AC1C} \u{D56D}\u{BAA9}\u{C774} \u{C120}\u{D0DD}\u{B418}\u{C5C8}\u{C2B5}\u{B2C8}\u{B2E4}`,other:()=>`${t.number(e.count)}\u{AC1C} \u{D56D}\u{BAA9}\u{C774} \u{C120}\u{D0DD}\u{B418}\u{C5C8}\u{C2B5}\u{B2C8}\u{B2E4}`})}.`,selectedItem:e=>`${e.item}\u{C774}(\u{AC00}) \u{C120}\u{D0DD}\u{B418}\u{C5C8}\u{C2B5}\u{B2C8}\u{B2E4}.`};var EB={};EB={deselectedItem:e=>`${e.item} nepasirinkta.`,longPressToSelect:`NorÄdami įjungti pasirinkimo režimÄ
, paspauskite ir palaikykite.`,select:`Pasirinkti`,selectedAll:`Pasirinkti visi elementai.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Nepasirinktas nÄ vienas elementas`,one:()=>`Pasirinktas ${t.number(e.count)} elementas`,other:()=>`Pasirinkta element\u{173}: ${t.number(e.count)}`})}.`,selectedItem:e=>`Pasirinkta: ${e.item}.`};var DB={};DB={deselectedItem:e=>`Vienums ${e.item} nav atlas\u{12B}ts.`,longPressToSelect:`Ilgi turiet nospiestu. lai ieslÄgtu atlases režīmu.`,select:`AtlasÄ«t`,selectedAll:`AtlasÄ«ti visi vienumi.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Nav atlasÄ«ts neviens vienums`,one:()=>`Atlas\u{12B}to vienumu skaits: ${t.number(e.count)}`,other:()=>`Atlas\u{12B}to vienumu skaits: ${t.number(e.count)}`})}.`,selectedItem:e=>`Atlas\u{12B}ts vienums ${e.item}.`};var OB={};OB={deselectedItem:e=>`${e.item} er ikke valgt.`,longPressToSelect:`Bruk et langt trykk for Ã¥ gÃ¥ inn i valgmodus.`,select:`Velg`,selectedAll:`Alle elementer er valgt.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Ingen elementer er valgt`,one:()=>`${t.number(e.count)} element er valgt`,other:()=>`${t.number(e.count)} elementer er valgt`})}.`,selectedItem:e=>`${e.item} er valgt.`};var kB={};kB={deselectedItem:e=>`${e.item} niet geselecteerd.`,longPressToSelect:`Druk lang om de selectiemodus te openen.`,select:`
16Selecteren`,selectedAll:`Alle items geselecteerd.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Geen items geselecteerd`,one:()=>`${t.number(e.count)} item geselecteerd`,other:()=>`${t.number(e.count)} items geselecteerd`})}.`,selectedItem:e=>`${e.item} geselecteerd.`};var AB={};AB={deselectedItem:e=>`Nie zaznaczono ${e.item}.`,longPressToSelect:`NaciÅnij i przytrzymaj, aby wejÅÄ do trybu wyboru.`,select:`Zaznacz`,selectedAll:`Wszystkie zaznaczone elementy.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Nie zaznaczono żadnych elementów`,one:()=>`${t.number(e.count)} zaznaczony element`,other:()=>`${t.number(e.count)} zaznaczonych element\xf3w`})}.`,selectedItem:e=>`Zaznaczono ${e.item}.`};var jB={};jB={deselectedItem:e=>`${e.item} n\xe3o selecionado.`,longPressToSelect:`Mantenha pressionado para entrar no modo de seleção.`,select:`Selecionar`,selectedAll:`Todos os itens selecionados.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Nenhum item selecionado`,one:()=>`${t.number(e.count)} item selecionado`,other:()=>`${t.number(e.count)} itens selecionados`})}.`,selectedItem:e=>`${e.item} selecionado.`};var MB={};MB={deselectedItem:e=>`${e.item} n\xe3o selecionado.`,longPressToSelect:`Prima continuamente para entrar no modo de seleção.`,select:`Selecionar`,selectedAll:`Todos os itens selecionados.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Nenhum item selecionado`,one:()=>`${t.number(e.count)} item selecionado`,other:()=>`${t.number(e.count)} itens selecionados`})}.`,selectedItem:e=>`${e.item} selecionado.`};var NB={};NB={deselectedItem:e=>`${e.item} neselectat.`,longPressToSelect:`ApÄsaÈi lung pentru a intra în modul de selectare.`,select:`Selectare`,selectedAll:`Toate elementele selectate.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Niciun element selectat`,one:()=>`${t.number(e.count)} element selectat`,other:()=>`${t.number(e.count)} elemente selectate`})}.`,selectedItem:e=>`${e.item} selectat.`};var PB={};PB={deselectedItem:e=>`${e.item} \u{43D}\u{435} \u{432}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43E}.`,longPressToSelect:`ÐажмиÑе и ÑдеÑживайÑе Ð´Ð»Ñ Ð²Ñ
ода в Ñежим вÑбоÑа.`,select:`ÐÑбÑаÑÑ`,selectedAll:`ÐÑбÑÐ°Ð½Ñ Ð²Ñе ÑлеменÑÑ.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`ÐÐµÑ Ð²ÑбÑаннÑÑ
ÑлеменÑов`,one:()=>`${t.number(e.count)} \u{44D}\u{43B}\u{435}\u{43C}\u{435}\u{43D}\u{442} \u{432}\u{44B}\u{431}\u{440}\u{430}\u{43D}`,other:()=>`${t.number(e.count)} \u{44D}\u{43B}\u{435}\u{43C}\u{435}\u{43D}\u{442}\u{43E}\u{432} \u{432}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43E}`})}.`,selectedItem:e=>`${e.item} \u{432}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43E}.`};var FB={};FB={deselectedItem:e=>`Nevybrat\xe9 polo\u{17E}ky: ${e.item}.`,longPressToSelect:`DlhÅ¡Ãm stlaÄenÃm prejdite do režimu výberu.`,select:`VybraÅ¥`,selectedAll:`VÅ¡etky vybraté položky.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Žiadne vybraté položky`,one:()=>`${t.number(e.count)} vybrat\xe1 polo\u{17E}ka`,other:()=>`Po\u{10D}et vybrat\xfdch polo\u{17E}iek:${t.number(e.count)}`})}.`,selectedItem:e=>`Vybrat\xe9 polo\u{17E}ky: ${e.item}.`};var IB={};IB={deselectedItem:e=>`Element ${e.item} ni izbran.`,longPressToSelect:`Za izbirni naÄin pritisnite in dlje Äasa držite.`,select:`Izberite`,selectedAll:`Vsi elementi so izbrani.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Noben element ni izbran`,one:()=>`${t.number(e.count)} element je izbran`,other:()=>`${t.number(e.count)} elementov je izbranih`})}.`,selectedItem:e=>`Element ${e.item} je izbran.`};var LB={};LB={deselectedItem:e=>`${e.item} nije izabrano.`,longPressToSelect:`Dugo pritisnite za ulazak u režim biranja.`,select:`Izaberite`,selectedAll:`Izabrane su sve stavke.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Nije izabrana nijedna stavka`,one:()=>`Izabrana je ${t.number(e.count)} stavka`,other:()=>`Izabrano je ${t.number(e.count)} stavki`})}.`,selectedItem:e=>`${e.item} je izabrano.`};var RB={};RB={deselectedItem:e=>`${e.item} ej markerat.`,longPressToSelect:`Tryck länge när du vill öppna väljarläge.`,select:`Markera`,selectedAll:`Alla markerade objekt.`,selectedCount:(e,t)=>
vendor: 4,099 bytes, line 16
16`${t.plural(e.count,{"=0":`Inga markerade objekt`,one:()=>`${t.number(e.count)} markerat objekt`,other:()=>`${t.number(e.count)} markerade objekt`})}.`,selectedItem:e=>`${e.item} markerat.`};var zB={};zB={deselectedItem:e=>`${e.item} se\xe7ilmedi.`,longPressToSelect:`Seçim moduna girmek için uzun basın.`,select:`Seç`,selectedAll:`Tüm ögeler seçildi.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`Hiçbir öge seçilmedi`,one:()=>`${t.number(e.count)} \xf6ge se\xe7ildi`,other:()=>`${t.number(e.count)} \xf6ge se\xe7ildi`})}.`,selectedItem:e=>`${e.item} se\xe7ildi.`};var BB={};BB={deselectedItem:e=>`${e.item} \u{43D}\u{435} \u{432}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{43E}.`,longPressToSelect:`ÐиконайÑе довге наÑиÑненнÑ, Ñоб пеÑейÑи в Ñежим вибоÑÑ.`,select:`ÐибÑаÑи`,selectedAll:`УÑÑ ÐµÐ»ÐµÐ¼ÐµÐ½Ñи вибÑано.`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`ÐодниÑ
елеменÑÑв не вибÑано`,one:()=>`${t.number(e.count)} \u{435}\u{43B}\u{435}\u{43C}\u{435}\u{43D}\u{442} \u{432}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{43E}`,other:()=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{43E} \u{435}\u{43B}\u{435}\u{43C}\u{435}\u{43D}\u{442}\u{456}\u{432}: ${t.number(e.count)}`})}.`,selectedItem:e=>`${e.item} \u{432}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{43E}.`};var VB={};VB={deselectedItem:e=>`\u{672A}\u{9009}\u{62E9} ${e.item}\u{3002}`,longPressToSelect:`é¿æä»¥è¿å
¥éæ©æ¨¡å¼ã`,select:`éæ©`,selectedAll:`已鿩ææé¡¹ç®ã`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`æªéæ©é¡¹ç®`,one:()=>`\u{5DF2}\u{9009}\u{62E9} ${t.number(e.count)} \u{4E2A}\u{9879}\u{76EE}`,other:()=>`\u{5DF2}\u{9009}\u{62E9} ${t.number(e.count)} \u{4E2A}\u{9879}\u{76EE}`})}\u{3002}`,selectedItem:e=>`\u{5DF2}\u{9009}\u{62E9} ${e.item}\u{3002}`};var HB={};HB={deselectedItem:e=>`\u{672A}\u{9078}\u{53D6}\u{300C}${e.item}\u{300D}\u{3002}`,longPressToSelect:`鷿以é²å
¥é¸ææ¨¡å¼ã`,select:`é¸å`,selectedAll:`å·²é¸åææé
ç®ã`,selectedCount:(e,t)=>`${t.plural(e.count,{"=0":`æªé¸åä»»ä½é
ç®`,one:()=>`\u{5DF2}\u{9078}\u{53D6} ${t.number(e.count)} \u{500B}\u{9805}\u{76EE}`,other:()=>`\u{5DF2}\u{9078}\u{53D6} ${t.number(e.count)} \u{500B}\u{9805}\u{76EE}`})}\u{3002}`,selectedItem:e=>`\u{5DF2}\u{9078}\u{53D6}\u{300C}${e.item}\u{300D}\u{3002}`};var UB={};UB={"ar-AE":lB,"bg-BG":uB,"cs-CZ":dB,"da-DK":fB,"de-DE":pB,"el-GR":mB,"en-US":hB,"es-ES":gB,"et-EE":_B,"fi-FI":vB,"fr-FR":yB,"he-IL":bB,"hr-HR":xB,"hu-HU":SB,"it-IT":CB,"ja-JP":wB,"ko-KR":TB,"lt-LT":EB,"lv-LV":DB,"nb-NO":OB,"nl-NL":kB,"pl-PL":AB,"pt-BR":jB,"pt-PT":MB,"ro-RO":NB,"ru-RU":PB,"sk-SK":FB,"sl-SI":IB,"sr-SP":LB,"sv-SE":RB,"tr-TR":zB,"uk-UA":BB,"zh-CN":VB,"zh-TW":HB};function Oge(e){return e&&e.__esModule?e.default:e}function kge(e,t){let{getRowText:n=e=>{var n;return(n=t.collection).getTextValue?.call(n,e)??t.collection.getItem(e)?.textValue}}=e,r=iN(Oge(UB),`@react-aria/grid`),i=t.selectionManager.rawSelection,a=(0,V.useRef)(i),o=(0,V.useCallback)(()=>{if(!t.selectionManager.isFocused||i===a.current){a.current=i;return}let e=WB(i,a.current),o=WB(a.current,i),s=t.selectionManager.selectionBehavior===`replace`,c=[];if(t.selectionManager.selectedKeys.size===1&&s){let e=t.selectionManager.selectedKeys.keys().next().value;if(e!=null&&t.collection.getItem(e)){let t=n(e);t&&c.push(r.format(`selectedItem`,{item:t}))}}else if(e.size===1&&o.size===0){let t=e.keys().next().value;if(t!=null){let e=n(t);e&&c.push(r.format(`selectedItem`,{item:e}))}}else if(o.size===1&&e.size===0){let e=o.keys().next().value;if(e!=null&&t.collection.getItem(e)){let t=n(e);t&&c.push(r.format(`deselectedItem`,{item:t}))}}t.selectionManager.selectionMode===`multiple`&&(c.length===0||i===`all`||i.size>1||a.current===`all`||a.current?.size>1)&&c.push(i===`all`?r.format(`selectedAll`):r.format(`selectedCount`,{count:i.size})),c.length>0&&kM(c.join(` `)),a.current=i},[i,t.selectionManager.selectedKeys,t.selectionManager.isFocused,t.selectionManager.selectionBehavior,t.selectionManager.selectionMode,t.collection,n,r]);Kj(()=>
16{if(t.selectionManager.isFocused)o();else{let e=requestAnimationFrame(o);return()=>cancelAnimationFrame(e)}},[i,t.selectionManager.isFocused])}function WB(e,t){let n=new Set;if(e===`all`||t===`all`)return n;for(let r of e.keys())t.has(r)||n.add(r);return n}function Age(e){return e&&e.__esModule?e.default:e}function jge(e){let t=iN(Age(UB),`@react-aria/grid`),n=aP(),r=(n===`pointer`||n===`virtual`||n==null)&&typeof window<`u`&&`ontouchstart`in window;return tM((0,V.useMemo)(()=>{let n=e.selectionManager.selectionMode,i=e.selectionManager.selectionBehavior,a;return r&&(a=t.format(`longPressToSelect`)),i===`replace`&&n!==`none`&&e.hasItemActions?a:void 0},[e.selectionManager.selectionMode,e.selectionManager.selectionBehavior,e.hasItemActions,t,r]))}function Mge(e){return e&&e.__esModule?e.default:e}function Nge(e,t){let{key:n}=e,r=t.selectionManager,i=uj(),a=!t.selectionManager.canSelectItem(n),o=t.selectionManager.isSelected(n);return{checkboxProps:{id:i,"aria-label":iN(Mge(UB),`@react-aria/grid`).format(`select`),isSelected:o,isDisabled:a,onChange:()=>r.toggleSelection(n)}}}function Pge(e,t,n){let{isVirtualized:r,keyboardDelegate:i,layoutDelegate:a,onAction:o,disallowTypeAhead:s,linkBehavior:c=`action`,keyboardNavigationBehavior:l=`arrow`,escapeKeyBehavior:u=`clearSelection`,shouldSelectOnPressUp:d}=e;!e[`aria-label`]&&!e[`aria-labelledby`]&&console.warn(`An aria-label or aria-labelledby prop is required for accessibility.`);let{listProps:f}=Hme({selectionManager:t.selectionManager,collection:t.collection,disabledKeys:t.disabledKeys,ref:n,keyboardDelegate:i,layoutDelegate:a,isVirtualized:r,selectOnFocus:t.selectionManager.selectionBehavior===`replace`,shouldFocusWrap:e.shouldFocusWrap,linkBehavior:c,disallowTypeAhead:s,autoFocus:e.autoFocus,escapeKeyBehavior:u}),p=uj(e.id);sB.set(t,{id:p,onAction:o,linkBehavior:c,keyboardNavigationBehavior:l,shouldSelectOnPressUp:d});let m=jge({selectionManager:t.selectionManager,hasItemActions:!!o}),h=Tme(n,{isDisabled:t.collection.size!==0}),g=bj(wj(e,{labelable:!0}),{role:`grid`,id:p,"aria-multiselectable":t.selectionManager.selectionMode===`multiple`?`true`:void 0},t.collection.size===0?{tabIndex:h?-1:0}:f,m);return r&&(g[`aria-rowcount`]=t.collection.size,g[`aria-colcount`]=1),kge({},t),{gridProps:g}}var GB={expand:{ltr:`ArrowRight`,rtl:`ArrowLeft`},collapse:{ltr:`ArrowLeft`,rtl:`ArrowRight`}};function Fge(e,t,n){let{node:r,isVirtualized:i}=e,{direction:a}=XM(),{onAction:o,linkBehavior:s,keyboardNavigationBehavior:c,shouldSelectOnPressUp:l}=sB.get(t),u=dj(),d=(0,V.useRef)(null),f=()=>{n.current!==null&&(d.current!=null&&r.key!==d.current||!n.current?.contains(document.activeElement))&&oP(n.current)},p={},m=e.hasChildItems,h=t.selectionManager.isLink(r.key);if(r!=null&&`expandedKeys`in t){var g;let e=(g=t.collection).getChildren?.call(g,r.key);m||=[...e??[]].length>1,o==null&&!h&&t.selectionManager.selectionMode===`none`&&m&&(o=()=>t.toggleKey(r.key));let n=m?t.expandedKeys.has(r.key):void 0,i=1;if(r.level>0&&r?.parentKey!=null){let e=t.collection.getItem(r.parentKey);if(e){var _;i=[...(_=t.collection).getChildren?.call(_,e.key)].filter(e=>e.type===`item`).length}}else i=[...t.collection].filter(e=>e.level===0&&e.type===`item`).length;p={"aria-expanded":n,"aria-level":r.level+1,"aria-posinset":r?.index+1,"aria-setsize":i}}let{itemProps:v,...y}=Vme({selectionManager:t.selectionManager,key:r.key,ref:n,isVirtualized:i,shouldSelectOnPressUp:e.shouldSelectOnPressUp||l,onAction:o||r.props?.onAction?fj(r.props?.onAction,o?()=>o(r.key):void 0):void 0,focus:f,linkBehavior:s}),b=e=>{if(!e.currentTarget.contains(e.target)||!n.current||!document.activeElement)return;let i=MP(n.current);if(i.currentNode=document.activeElement,`expandedKeys`in t&&document.activeElement===n.current){if(e.key===GB.expand[a]&&t.selectionManager.focusedKey===r.key&&m&&!t.expandedKeys.has(r.key)){t.toggleKey(r.key),e.stopPropagation();return}if(e.key===GB.collapse[a]&&t.selectionManager.focusedKey===r.key&&m&&t.expandedKeys.has(r.key)){t.toggleKey(r.key),e.stopPropagation();return}}switch(e.key){case`ArrowLeft`:if(c===`arrow`){let t=a===`rtl`?i.nextNode():i.previousNode();if(t)e.preventDefault(),e.stopPropagation(),oP(t),aM(t,{containingElement:Zj(n.current)});else if(e.preventDefault(),e.stopPropagation(),a===`rtl`)oP(n.current),aM(n.current,{containingElement:Zj(n.current)});else{i.currentNode=n.current;let e=KB(i);e&&(oP(e),aM(e,{containingElement:Zj(n.current)}))}}break;case`ArrowRight`:if(c===`arrow`){let t=a===`rtl`?i.previousNode():i.nextNode();if(t)e.preventDefault(),e.stopPropagation(),oP(t),aM(t,{containingElement:Zj(n.current)});else if(e.preventDefault(),e.stopPropagation(),a===`ltr`)oP(n.current),aM(n.current,{containingElement:Zj(n.current)});else{i.currentNode=n.current;let e=KB(i);e&&(oP(e),aM(e,{containingElement:Zj(n.current)}))}}break;case`ArrowUp`:case`ArrowDown`:if(!e.altKey&&n.current.contains(e.target)){var o;e.stopPropagation(),e.preventDefault(),(o=n.current.parentElement)==null||o.dispatchEvent(new KeyboardEvent(e.nativeEvent.type,e.nativeEvent))}}},x=e=>{if(d.current=r.key,e.target!==n.current){nP()||t.selectionManager.setFocusedKey(r.key);return}},S=e=>{if(e.currentTarget.contains(e.target)&&n.current&&document.activeElement&&e.key===`Tab`&&c===`tab`){let t=MP(n.current,{tabbable:!0});t.currentNode=document.activeElement,(e.shiftKey?t.previousNode():t.nextNode())&&e.stopPropagation()}},C=Zfe(r.props),w=bj(v,y.hasAction?C:{},{role:`row`,onKeyDownCapture:b,onKeyDown:S,onFocus:x,"aria-label":r[`aria-label`]||r.textValue||void 0,"aria-selected":t.selectionManager.canSelectItem(r.key)?t.selectionManager.isSelected(r.key):void 0,"aria-disabled":t.selectionManager.isDisabled(r.key)||void 0,"aria-labelledby":u&&(r[`aria-label`]||r.textValue)?`${cB(t,r.key)} ${u}`:void 0,id:cB(t,r.key)});if(i){let{collection:e}=t;w[`aria-rowindex`]=[...e].find(e=>e.type===`section`)?[...e.getKeys()].filter(t=>e.getItem(t)?.type!==`section`).findIndex(e=>e===r.key)+1:r.index+1}let T={role:`gridcell`,"aria-colindex":1};return{rowProps:{...bj(w,p)},gridCellProps:T,descriptionProps:{id:u},...y}}function KB(e){let t=null,n=null;do n=e.lastChild(),n&&(t=n);while(n);return t}function Ige(e,t){let{key:n}=e,{checkboxProps:r}=Nge(e,t);return{checkboxProps:{...r,"aria-labelledby":`${r.id} ${cB(t,n)}`}}}function Lge(e){let{value:t=0,minValue:n=0,maxValue:r=100,valueLabel:i,isIndeterminate:a,formatOptions:o={style:`percent`}}=e,s=wj(e,{labelable:!0}),{labelProps:c,fieldProps:l}=UF({...e,labelElementType:`span`});t=yM(t,n,r);let u=(t-n)/(r-n),d=Upe(o);if(!a&&!i){let e=o.style===`percent`?u:t;i=d.format(e)}return{progressBarProps:bj(s,{...l,"aria-valuenow":a?void 0:t,"aria-valuemin":n,"aria-valuemax":r,"aria-valuetext":a?void 0:i,role:`progressbar`}),labelProps:c}}function Rge(e,t,n){let{labelProps:r,inputProps:i,isSelected:a,isPressed:o,isDisabled:s,isReadOnly:c}=Ohe(e,t,n);return{labelProps:r,inputProps:{...i,role:`switch`,checked:a},isSelected:a,isPressed:o,isDisabled:s,isReadOnly:c}}var qB=(0,V.createContext)({}),JB=(0,V.createContext)(null),zge=(0,V.forwardRef)(function(e,t){[e,t]=wM(e,t,JB);let{value:n=0,minValue:r=0,maxValue:i=100,isIndeterminate:a=!1}=e;n=yM(n,r,i);let[o,s]=TM(!e[`aria-label`]&&!e[`aria-labelledby`]),{progressBarProps:c,labelProps:l}=Lge({...e,label:s}),u=a?void 0:(n-r)/(i-r)*100,d=SM({...e,defaultClassName:`react-aria-ProgressBar`,values:{percentage:u,valueText:c[`aria-valuetext`],isIndeterminate:a}}),f=wj(e,{global:!0});return V.createElement(`div`,{...bj(f,d,c),ref:t,slot:e.slot||void 0},V.createElement(qB.Provider,{value:{...l,ref:o,elementType:`span`}},d.children))}),YB=(0,V.createContext)({}),XB=xI(function(e,t){[e,t]=wM(e,t,YB);let n=e,{isPending:r}=n,{buttonProps:i,isPressed:a}=bhe(e,t);i=Bge(i,r);let{focusProps:o,isFocused:s,isFocusVisible:c}=LP(e),{hoverProps:l,isHovered:u}=hP({...e,isDisabled:e.isDisabled||r}
16),d={isHovered:u,isPressed:(n.isPressed||a)&&!r,isFocused:s,isFocusVisible:c,isDisabled:e.isDisabled||!1,isPending:r??!1},f=SM({...e,values:d,defaultClassName:`react-aria-Button`}),p=uj(i.id),m=uj(),h=i[`aria-labelledby`];r&&(h?h=`${h} ${m}`:i[`aria-label`]&&(h=`${p} ${m}`));let g=(0,V.useRef)(r);(0,V.useEffect)(()=>{let e={"aria-labelledby":h||p};(!g.current&&s&&r||g.current&&s&&!r)&&kM(e,`assertive`),g.current=r},[r,s,h,p]);let _=wj(e,{global:!0});return delete _.onClick,V.createElement(`button`,{...bj(_,f,i,o,l),type:i.type===`submit`&&r?`button`:i.type,id:p,ref:t,"aria-labelledby":h,slot:e.slot||void 0,"aria-disabled":r?`true`:i[`aria-disabled`],"data-disabled":e.isDisabled||void 0,"data-pressed":d.isPressed||void 0,"data-hovered":u||void 0,"data-focused":s||void 0,"data-pending":r||void 0,"data-focus-visible":c||void 0},V.createElement(JB.Provider,{value:{id:m}},f.children))});function Bge(e,t){if(t){for(let t in e)t.startsWith(`on`)&&!(t.includes(`Focus`)||t.includes(`Blur`))&&(e[t]=void 0);e.href=void 0,e.target=void 0}return e}var ZB=(0,V.createContext)({});function QB(e,t,n){return t!=null&&e.compare(t)<0||n!=null&&e.compare(n)>0}function $B(e,t,n,r,i){let a={};for(let e in t)a[e]=Math.floor(t[e]/2),a[e]>0&&t[e]%2==0&&a[e]--;return nV(e,eV(e,t,n).subtract(a),t,n,r,i)}function eV(e,t,n,r,i){let a=e;return t.years?a=Oce(e):t.months?a=_w(e):t.weeks&&(a=yw(e,n)),nV(e,a,t,n,r,i)}function tV(e,t,n,r,i){let a={...t};return a.days?a.days--:a.weeks?a.weeks--:a.months?a.months--:a.years&&a.years--,nV(e,eV(e,t,n).subtract(a),t,n,r,i)}function nV(e,t,n,r,i,a){if(i&&e.compare(i)>=0){let e=Cw(t,eV(Pw(i),n,r));e&&(t=e)}if(a&&e.compare(a)<=0){let e=Sw(t,tV(Pw(a),n,r));e&&(t=e)}return t}function rV(e,t,n){if(t){let n=Cw(e,Pw(t));n&&(e=n)}if(n){let t=Sw(e,Pw(n));t&&(e=t)}return e}function iV(e,t,n){if(!n)return e;for(;e.compare(t)>=0&&n(e);)e=e.subtract({days:1});return e.compare(t)>=0?e:null}function aV(e){let t=(0,V.useMemo)(()=>new lE(e.locale),[e.locale]),n=(0,V.useMemo)(()=>t.resolvedOptions(),[t]),{locale:r,createCalendar:i,visibleDuration:a={months:1},minValue:o,maxValue:s,selectionAlignment:c,isDateUnavailable:l,pageBehavior:u=`visible`,firstDayOfWeek:d}=e,f=(0,V.useMemo)(()=>i(n.calendar),[i,n.calendar]),[p,m]=vM(e.value,e.defaultValue??null,e.onChange),h=(0,V.useMemo)(()=>p?Lw(Pw(p),f):null,[p,f]),g=(0,V.useMemo)(()=>p&&`timeZone`in p?p.timeZone:n.timeZone,[p,n.timeZone]),[_,v]=vM((0,V.useMemo)(()=>e.focusedValue?rV(Lw(Pw(e.focusedValue),f),o,s):void 0,[e.focusedValue,f,o,s]),(0,V.useMemo)(()=>rV(e.defaultFocusedValue?Lw(Pw(e.defaultFocusedValue),f):h||Lw(dw(g),f),o,s),[e.defaultFocusedValue,h,g,f,o,s]),e.onFocusChange),[y,b]=(0,V.useState)(()=>{switch(c){case`start`:return eV(_,a,r,o,s);case`end`:return tV(_,a,r,o,s);default:return $B(_,a,r,o,s)}}),[x,S]=(0,V.useState)(e.autoFocus||!1),C=(0,V.useMemo)(()=>{let e={...a};return e.days?e.days--:e.days=-1,y.add(e)},[y,a]),[w,T]=(0,V.useState)(f);if(!sw(f,w)){let e=Lw(_,f);b($B(e,a,r,o,s)),v(e),T(f)}QB(_,o,s)?v(rV(_,o,s)):_.compare(y)<0?b(tV(_,a,r,o,s)):_.compare(C)>0&&b(eV(_,a,r,o,s));function E(e){e=rV(e,o,s),v(e)}function D(t){if(!e.isDisabled&&!e.isReadOnly){let e=t;if(e===null){m(null);return}if(e=rV(e,o,s),e=iV(e,y,l),!e)return;e=Lw(e,p?.calendar||new iw),p&&`hour`in p?m(p.set(e)):m(e)}}let O=(0,V.useMemo)(()=>h?l&&l(h)?!0:QB(h,o,s):!1,[h,l,o,s]),k=e.isInvalid||e.validationState===`invalid`||O,A=k?`invalid`:null,j=(0,V.useMemo)(()=>u===`visible`?a:oV(a),[u,a]);return{isDisabled:e.isDisabled??!1,isReadOnly:e.isReadOnly??!1,value:h,setValue:D,visibleRange:{start:y,end:C},minValue:o,maxValue:s,focusedDate:_,timeZone:g,validationState:A,isValueInvalid:k,setFocusedDate(e){E(e),S(!0)},focusNextDay(){E(_.add({days:1}))},focusPreviousDay(){E(_.subtract({days:1}))},focusNextRow(){a.days?this.focusNextPage():(a.weeks||a.months||a.years)&&E(_.add({weeks:1}))},focusPreviousRow(){a.days?this.focusPreviousPage():(a.weeks||a.months||a.years)&&E(_.subtract({weeks:1}))},focusNextPage(){let e=y.add(j);v(rV(_.add(j),o,s)),b(eV(nV(_,e,j,r,o,s),j,r))},focusPreviousPage(){let e=y.subtract(j);v(rV(_.subtract(j),o,s)),b(eV(nV(_,e,j,r,o,s),j,r))},focusSectionStart(){a.days?E(y):a.weeks?E(yw(_,r)):(a.months||a.years)&&E(_w(_))},focusSectionEnd(){a.days?E(C):a.weeks?E(jce(_,r)):(a.months||a.years)&&E(vw(_))},focusNextSection(e){if(!e&&!a.days){E(_.add(oV(a)));return}a.days?this.focusNextPage():a.weeks?E(_.add({months:1}
16)):(a.months||a.years)&&E(_.add({years:1}))},focusPreviousSection(e){if(!e&&!a.days){E(_.subtract(oV(a)));return}a.days?this.focusPreviousPage():a.weeks?E(_.subtract({months:1})):(a.months||a.years)&&E(_.subtract({years:1}))},selectFocusedDate(){l&&l(_)||D(_)},selectDate(e){D(e)},isFocused:x,setFocused:S,isInvalid(e){return QB(e,o,s)},isSelected(e){return h!=null&&aw(e,h)&&!this.isCellDisabled(e)&&!this.isCellUnavailable(e)},isCellFocused(e){return x&&_&&aw(e,_)},isCellDisabled(t){return e.isDisabled||t.compare(y)<0||t.compare(C)>0||this.isInvalid(t)},isCellUnavailable(t){return e.isDateUnavailable?e.isDateUnavailable(t):!1},isPreviousVisibleRangeInvalid(){let e=y.subtract({days:1});return aw(e,y)||this.isInvalid(e)},isNextVisibleRangeInvalid(){let e=C.add({days:1});return aw(e,C)||this.isInvalid(e)},getDatesInWeek(e,t=y){let n=t.add({weeks:e}),i=[];n=yw(n,r,d);let a=lw(n,r,d);for(let e=0;e<a;e++)i.push(null);for(;i.length<7;){i.push(n);let e=n.add({days:1});if(aw(n,e))break;n=e}for(;i.length<7;)i.push(null);return i}}}function oV(e){let t={...e};for(let n in e)t[n]=1;return t}function Vge(e){let{value:t,defaultValue:n,onChange:r,createCalendar:i,locale:a,visibleDuration:o={months:1},minValue:s,maxValue:c,...l}=e,[u,d]=vM(t,n||null,r),[f,p]=(0,V.useState)(null),m=`center`;if(u&&u.start&&u.end){let e=$B(Pw(u.start),o,a,s,c).add(o).subtract({days:1});u.end.compare(e)>0&&(m=`start`)}let h=(0,V.useRef)(null),[g,_]=(0,V.useState)(null),v=(0,V.useMemo)(()=>Cw(s,g?.start),[s,g]),y=(0,V.useMemo)(()=>Sw(c,g?.end),[c,g]),b=aV({...l,value:u&&u.start,createCalendar:i,locale:a,visibleDuration:o,minValue:v,maxValue:y,selectionAlignment:e.selectionAlignment||m}),x=t=>{if(t&&e.isDateUnavailable&&!e.allowsNonContiguousRanges){let e=lV(t,b,-1),n=lV(t,b,1);h.current={start:e,end:n},_(h.current)}else h.current=null,_(null)},[S,C]=(0,V.useState)(b.visibleRange);(!ow(b.visibleRange.start,S.start)||!ow(b.visibleRange.end,S.end))&&(x(f),C(b.visibleRange));let w=e=>{e?(p(e),x(e)):(p(null),x(null))},T=f?sV(f,b.focusedDate):u&&sV(u.start,u.end),E=t=>{if(e.isReadOnly)return;let n=iV(rV(t,v,y),b.visibleRange.start,e.isDateUnavailable);if(n){if(!f)w(n);else{let e=sV(f,n);e&&d({start:cV(e.start,u?.start),end:cV(e.end,u?.end)}),w(null)}}},[D,O]=(0,V.useState)(!1),{isDateUnavailable:k}=e,A=(0,V.useMemo)(()=>!u||f?!1:k&&(k(u.start)||k(u.end))?!0:QB(u.start,s,c)||QB(u.end,s,c),[k,u,f,s,c]),j=e.isInvalid||e.validationState===`invalid`||A,M=j?`invalid`:null;return{...b,value:u,setValue:d,anchorDate:f,setAnchorDate:w,highlightedRange:T,validationState:M,isValueInvalid:j,selectFocusedDate(){E(b.focusedDate)},selectDate:E,highlightDate(e){f&&b.setFocusedDate(e)},isSelected(e){return!!(T&&e.compare(T.start)>=0&&e.compare(T.end)<=0&&!b.isCellDisabled(e)&&!b.isCellUnavailable(e))},isInvalid(e){return b.isInvalid(e)||QB(e,h.current?.start,h.current?.end)},isDragging:D,setDragging:O}}function sV(e,t){return!e||!t?null:(t.compare(e)<0&&([e,t]=[t,e]),{start:Pw(e),end:Pw(t)})}function cV(e,t){return e=Lw(e,t?.calendar||new iw),t&&`hour`in t?t.set(e):e}function lV(e,t,n){let r=e.add({days:n});for(;(n<0?r.compare(t.visibleRange.start)>=0:r.compare(t.visibleRange.end)<=0)&&!t.isCellUnavailable(r);)r=r.add({days:n});if(t.isCellUnavailable(r))return r.add({days:-n})}var uV=class{*[Symbol.iterator](){yield*this.iterable}get size(){return this._size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){let t=this.keyMap.get(e);return t?t.prevKey??null:null}getKeyAfter(e){let t=this.keyMap.get(e);return t?t.nextKey??null:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){return this.keyMap.get(e)??null}at(e){let t=[...this.getKeys()];return this.getItem(t[e])}getChildren(e){return this.keyMap.get(e)?.childNodes||[]}constructor(e){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=e;let t=e=>{if(this.keyMap.set(e.key,e),e.childNodes&&e.type===`section`)for(let n of e.childNodes)t(n)};for(let n of e)t(n);let n=null,r=0,i=0;for(let[e,t]of this.keyMap)n?(n.nextKey=e,t.prevKey=n.key):(this.firstKey=e,t.prevKey=void 0),t.type===`item`&&(t.index=r++),(t.type===`section`||t.type===`item`)&&i++,n=t,n.nextKey=void 0;this._size=i,this.lastKey=n?.key??null}},dV=class e extends Set{constructor(t,n,r){super(t),t instanceof e?(this.anchorKey=n??t.anchorKey,this.currentKey=r??t.currentKey):(this.anchorKey=n??null,this.currentKey=r??null)}};function Hge(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function Uge(e){let{selectionMode:t=`none`,disallowEmptySelection:n=!1,allowDuplicateSelectionEvents:r,selectionBehavior:i=`toggle`,disabledBehavior:a=`all`}=e,o=(0,V.useRef)(!1),[,s]=(0,V.useState)(!1),c=(0,V.useRef)(null),l=(0,V.useRef)(null),[,u]=(0,V.useState)(null),[d,f]=vM((0,V.useMemo)(()=>fV(e.selectedKeys),[e.selectedKeys]),(0,V.useMemo)(()=>fV(e.defaultSelectedKeys,new dV),[e.defaultSelectedKeys]),e.onSelectionChange),p=(0,V.useMemo)(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),[m,h]=(0,V.useState)(i);i===`replace`&&m===`toggle`&&typeof d==`object`&&d.size===0&&h(`replace`);let g=(0,V.useRef)(i);return(0,V.useEffect)(()=>{i!==g.current&&(h(i),g.current=i)},[i]),{selectionMode:t,disallowEmptySelection:n,selectionBehavior:m,setSelectionBehavior:h,get isFocused(){return o.current},setFocused(e){o.current=e,s(e)},get focusedKey(){return c.current},get childFocusStrategy(){return l.current},setFocusedKey(e,t=`first`){c.current=e,l.current=t,u(e)},selectedKeys:d,setSelectedKeys(e){(r||!Hge(e,d))&&f(e)},disabledKeys:p,disabledBehavior:a}}function fV(e,t){return e?e===`all`?`all`:new dV(e):t}var Wge=class e{get selectionMode(){return this.state.selectionMode}get disallowEmptySelection(){return this.state.disallowEmptySelection}get selectionBehavior(){return this.state.selectionBehavior}setSelectionBehavior(e){this.state.setSelectionBehavior(e)}get isFocused(){return this.state.isFocused}setFocused(e){this.state.setFocused(e)}get focusedKey(){return this.state.focusedKey}get childFocusStrategy(){return this.state.childFocusStrategy}setFocusedKey(e,t){(e==null||this.collection.getItem(e))&&this.state.setFocusedKey(e,t)}get selectedKeys(){return this.state.selectedKeys===`all`?new Set(this.getSelectAllKeys()):this.state.selectedKeys}get rawSelection(){return this.state.selectedKeys}isSelected(e){if(this.state.selectionMode===`none`)return!1;let t=this.getKey(e);return t==null?!1:this.state.selectedKeys===`all`?this.canSelectItem(t):this.state.selectedKeys.has(t)}get isEmpty(){return this.state.selectedKeys!==`all`&&this.state.selectedKeys.size===0}get isSelectAll(){if(this.isEmpty)return!1;if(this.state.selectedKeys===`all`)return!0;
vendor: 5,239 bytes, line 16
16if(this._isSelectAll!=null)return this._isSelectAll;let e=this.getSelectAllKeys(),t=this.state.selectedKeys;return this._isSelectAll=e.every(e=>t.has(e)),this._isSelectAll}get firstSelectedKey(){let e=null;for(let t of this.state.selectedKeys){let n=this.collection.getItem(t);(!e||n&&tI(this.collection,n,e)<0)&&(e=n)}return e?.key??null}get lastSelectedKey(){let e=null;for(let t of this.state.selectedKeys){let n=this.collection.getItem(t);(!e||n&&tI(this.collection,n,e)>0)&&(e=n)}return e?.key??null}get disabledKeys(){return this.state.disabledKeys}get disabledBehavior(){return this.state.disabledBehavior}extendSelection(e){if(this.selectionMode===`none`)return;if(this.selectionMode===`single`){this.replaceSelection(e);return}let t=this.getKey(e);if(t==null)return;let n;if(this.state.selectedKeys===`all`)n=new dV([t],t,t);else{let e=this.state.selectedKeys,r=e.anchorKey??t;n=new dV(e,r,t);for(let i of this.getKeyRange(r,e.currentKey??t))n.delete(i);for(let e of this.getKeyRange(t,r))this.canSelectItem(e)&&n.add(e)}this.state.setSelectedKeys(n)}getKeyRange(e,t){let n=this.collection.getItem(e),r=this.collection.getItem(t);return n&&r?tI(this.collection,n,r)<=0?this.getKeyRangeInternal(e,t):this.getKeyRangeInternal(t,e):[]}getKeyRangeInternal(e,t){if(this.layoutDelegate?.getKeyRange)return this.layoutDelegate.getKeyRange(e,t);let n=[],r=e;for(;r!=null;){let e=this.collection.getItem(r);if(e&&(e.type===`item`||e.type===`cell`&&this.allowsCellSelection)&&n.push(r),r===t)return n;r=this.collection.getKeyAfter(r)}return[]}getKey(e){let t=this.collection.getItem(e);if(!t||t.type===`cell`&&this.allowsCellSelection)return e;for(;t&&t.type!==`item`&&t.parentKey!=null;)t=this.collection.getItem(t.parentKey);return!t||t.type!==`item`?null:t.key}toggleSelection(e){if(this.selectionMode===`none`)return;if(this.selectionMode===`single`&&!this.isSelected(e)){this.replaceSelection(e);return}let t=this.getKey(e);if(t==null)return;let n=new dV(this.state.selectedKeys===`all`?this.getSelectAllKeys():this.state.selectedKeys);n.has(t)?n.delete(t):this.canSelectItem(t)&&(n.add(t),n.anchorKey=t,n.currentKey=t),!(this.disallowEmptySelection&&n.size===0)&&this.state.setSelectedKeys(n)}replaceSelection(e){if(this.selectionMode===`none`)return;let t=this.getKey(e);if(t==null)return;let n=this.canSelectItem(t)?new dV([t],t,t):new dV;this.state.setSelectedKeys(n)}setSelectedKeys(e){if(this.selectionMode===`none`)return;let t=new dV;for(let n of e){let e=this.getKey(n);if(e!=null&&(t.add(e),this.selectionMode===`single`))break}this.state.setSelectedKeys(t)}getSelectAllKeys(){let e=[],t=n=>{for(;n!=null;){if(this.canSelectItem(n)){let r=this.collection.getItem(n);r?.type===`item`&&e.push(n),r?.hasChildNodes&&(this.allowsCellSelection||r.type!==`item`)&&t(Kme(eI(r,this.collection))?.key??null)}n=this.collection.getKeyAfter(n)}};return t(this.collection.getFirstKey()),e}selectAll(){!this.isSelectAll&&this.selectionMode===`multiple`&&this.state.setSelectedKeys(`all`)}clearSelection(){!this.disallowEmptySelection&&(this.state.selectedKeys===`all`||this.state.selectedKeys.size>0)&&this.state.setSelectedKeys(new dV)}toggleSelectAll(){this.isSelectAll?this.clearSelection():this.selectAll()}select(e,t){this.selectionMode!==`none`&&(this.selectionMode===`single`?this.isSelected(e)&&!this.disallowEmptySelection?this.toggleSelection(e):this.replaceSelection(e):this.selectionBehavior===`toggle`||t&&(t.pointerType===`touch`||t.pointerType===`virtual`)?this.toggleSelection(e):this.replaceSelection(e))}isSelectionEqual(e){if(e===this.state.selectedKeys)return!0;let t=this.selectedKeys;if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;for(let n of t)if(!e.has(n))return!1;return!0}canSelectItem(e){if(this.state.selectionMode===`none`||this.state.disabledKeys.has(e))return!1;let t=this.collection.getItem(e);return!(!t||t!=null&&t.props?.isDisabled||t.type===`cell`&&!this.allowsCellSelection)}isDisabled(e){var t;return this.state.disabledBehavior===`all`&&(this.state.disabledKeys.has(e)||!!((t=this.collection.getItem(e))!=null&&t.props?.isDisabled))}isLink(e){var t;return!!((t=this.collection.getItem(e))!=null&&t.props?.href)}getItemProps(e){return this.collection.getItem(e)?.props}withCollection(t){return new e(t,this.state,{allowsCellSelection:this.allowsCellSelection,layoutDelegate:this.layoutDelegate||void 0})}constructor(e,t,n){this.collection=e,this.state=t,this.allowsCellSelection=n?.allowsCellSelection??!1,this._isSelectAll=null,this.layoutDelegate=n?.layoutDelegate||null}};function Gge(e){let{filter:t,layoutDelegate:n}=e,r=Uge(e),i=(0,V.useMemo)(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),a=Gme(e,(0,V.useCallback)(e=>t?new uV(t(e)):new uV(e),[t]),(0,V.useMemo)(()=>({suppressTextValueWarning:e.suppressTextValueWarning}),[e.suppressTextValueWarning])),o=(0,V.useMemo)(()=>new Wge(a,r,{layoutDelegate:n}),[a,r,n]);return pV(a,o),{collection:a,disabledKeys:i,selectionManager:o}}function Kge(e,t){let n=(0,V.useMemo)(()=>t?e.collection.filter(t):e.collection,[e.collection,t]),r=e.selectionManager.withCollection(n);return pV(n,r),{collection:n,selectionManager:r,disabledKeys:e.disabledKeys}}function pV(e,t){let n=(0,V.useRef)(null);(0,V.useEffect)(()=>
16{if(t.focusedKey!=null&&!e.getItem(t.focusedKey)&&n.current){let r=n.current.getItem(t.focusedKey),i=[...n.current.getKeys()].map(e=>{let t=n.current.getItem(e);return t?.type===`item`?t:null}).filter(e=>e!==null),a=[...e.getKeys()].map(t=>{let n=e.getItem(t);return n?.type===`item`?n:null}).filter(e=>e!==null),o=(i?.length??0)-(a?.length??0),s=Math.min(o>1?Math.max((r?.index??0)-o+1,0):r?.index??0,(a?.length??0)-1),c=null,l=!1;for(;s>=0;){if(!t.isDisabled(a[s].key)){c=a[s];break}s<a.length-1&&!l?s++:(l=!0,s>(r?.index??0)&&(s=r?.index??0),s--)}t.setFocusedKey(c?c.key:null)}n.current=e},[e,t])}function mV(e){let[t,n]=vM(e.isOpen,e.defaultOpen||!1,e.onOpenChange);return{isOpen:t,setOpen:n,open:(0,V.useCallback)(()=>{n(!0)},[n]),close:(0,V.useCallback)(()=>{n(!1)},[n]),toggle:(0,V.useCallback)(()=>{n(!t)},[n,t])}}var hV={};hV={rangeOverflow:e=>`\u{64A}\u{62C}\u{628} \u{623}\u{646} \u{62A}\u{643}\u{648}\u{646} \u{627}\u{644}\u{642}\u{64A}\u{645}\u{629} ${e.maxValue} \u{623}\u{648} \u{642}\u{628}\u{644} \u{630}\u{644}\u{643}.`,rangeReversed:`ØªØ§Ø±ÙØ® Ø§ÙØ¨Ø¯Ø¡ ÙØ¬Ø¨ Ø£Ù ÙÙÙÙ ÙØ¨Ù ØªØ§Ø±ÙØ® Ø§ÙØ§ÙØªÙØ§Ø¡.`,rangeUnderflow:e=>`\u{64A}\u{62C}\u{628} \u{623}\u{646} \u{62A}\u{643}\u{648}\u{646} \u{627}\u{644}\u{642}\u{64A}\u{645}\u{629} ${e.minValue} \u{623}\u{648} \u{628}\u{639}\u{62F} \u{630}\u{644}\u{643}.`,unavailableDate:`Ø§ÙØ¨ÙØ§ÙØ§Øª اÙÙ
ØØ¯Ø¯Ø© ØºÙØ± Ù
ØªØ§ØØ©.`};var gV={};gV={rangeOverflow:e=>`\u{421}\u{442}\u{43E}\u{439}\u{43D}\u{43E}\u{441}\u{442}\u{442}\u{430} \u{442}\u{440}\u{44F}\u{431}\u{432}\u{430} \u{434}\u{430} \u{435} ${e.maxValue} \u{438}\u{43B}\u{438} \u{43F}\u{43E}-\u{440}\u{430}\u{43D}\u{43D}\u{430}.`,rangeReversed:`ÐаÑалнаÑа даÑа ÑÑÑбва да е пÑеди кÑайнаÑа.`,rangeUnderflow:e=>`\u{421}\u{442}\u{43E}\u{439}\u{43D}\u{43E}\u{441}\u{442}\u{442}\u{430} \u{442}\u{440}\u{44F}\u{431}\u{432}\u{430} \u{434}\u{430} \u{435} ${e.minValue} \u{438}\u{43B}\u{438} \u{43F}\u{43E}-\u{43A}\u{44A}\u{441}\u{43D}\u{43E}.`,unavailableDate:`ÐзбÑанаÑа даÑа не е налиÑна.`};var _V={};_V={rangeOverflow:e=>`Hodnota mus\xed b\xfdt ${e.maxValue} nebo d\u{159}\xedv\u{11B}j\u{161}\xed.`,rangeReversed:`Datum zahájenà musà pÅedcházet datu ukonÄenÃ.`,rangeUnderflow:e=>`Hodnota mus\xed b\xfdt ${e.minValue} nebo pozd\u{11B}j\u{161}\xed.`,unavailableDate:`Vybrané datum nenà k dispozici.`};var vV={};vV={rangeOverflow:e=>`V\xe6rdien skal v\xe6re ${e.maxValue} eller tidligere.`,rangeReversed:`Startdatoen skal være før slutdatoen.`,rangeUnderflow:e=>`V\xe6rdien skal v\xe6re ${e.minValue} eller nyere.`,unavailableDate:`Den valgte dato er ikke tilgængelig.`};var yV={};yV={rangeOverflow:e=>`Der Wert muss ${e.maxValue} oder fr\xfcher sein.`,rangeReversed:`Das Startdatum muss vor dem Enddatum liegen.`,rangeUnderflow:e=>`Der Wert muss ${e.minValue} oder sp\xe4ter sein.`,unavailableDate:`Das ausgewählte Datum ist nicht verfügbar.`};var bV={};bV={rangeOverflow:e=>`\u{397} \u{3C4}\u{3B9}\u{3BC}\u{3AE} \u{3C0}\u{3C1}\u{3AD}\u{3C0}\u{3B5}\u{3B9} \u{3BD}\u{3B1} \u{3B5}\u{3AF}\u{3BD}\u{3B1}\u{3B9} ${e.maxValue} \u{3AE} \u{3C0}\u{3B1}\u{3BB}\u{3B1}\u{3B9}\u{3CC}\u{3C4}\u{3B5}\u{3C1}\u{3B7}.`,rangeReversed:`ΠημεÏομηνία ÎναÏÎ¾Î·Ï ÏÏÎÏει να είναι ÏÏιν αÏÏ Ïην ημεÏομηνία λήξηÏ.`,rangeUnderflow:e=>`\u{397} \u{3C4}\u{3B9}\u{3BC}\u{3AE} \u{3C0}\u{3C1}\u{3AD}\u{3C0}\u{3B5}\u{3B9} \u{3BD}\u{3B1} \u{3B5}\u{3AF}\u{3BD}\u{3B1}\u{3B9} ${e.minValue} \u{3AE} \u{3BC}\u{3B5}\u{3C4}\u{3B1}\u{3B3}\u{3B5}\u{3BD}\u{3AD}\u{3C3}\u{3C4}\u{3B5}\u{3C1}\u{3B7}.`,unavailableDate:`ΠεÏιλεγμÎνη ημεÏομηνία δεν είναι διαθÎÏιμη.`};var xV={};xV={rangeUnderflow:e=>`Value must be ${e.minValue} or later.`,rangeOverflow:e=>`Value must be ${e.maxValue} or earlier.`,rangeReversed:`Start date must be before end date.`,unavailableDate:`Selected date unavailable.`};var SV={};SV={rangeOverflow:e=>`El valor debe ser ${e.maxValue} o anterior.`,rangeReversed:`La fecha de inicio debe ser anterior a la fecha de finalización.`,rangeUnderflow:e=>`El valor debe ser ${e.minValue}
16 o posterior.`,unavailableDate:`Fecha seleccionada no disponible.`};var CV={};CV={rangeOverflow:e=>`V\xe4\xe4rtus peab olema ${e.maxValue} v\xf5i varasem.`,rangeReversed:`Alguskuupäev peab olema enne lõppkuupäeva.`,rangeUnderflow:e=>`V\xe4\xe4rtus peab olema ${e.minValue} v\xf5i hilisem.`,unavailableDate:`Valitud kuupäev pole saadaval.`};var wV={};wV={rangeOverflow:e=>`Arvon on oltava ${e.maxValue} tai sit\xe4 aikaisempi.`,rangeReversed:`Aloituspäivän on oltava ennen lopetuspäivää.`,rangeUnderflow:e=>`Arvon on oltava ${e.minValue} tai sit\xe4 my\xf6h\xe4isempi.`,unavailableDate:`Valittu päivämäärä ei ole käytettävissä.`};var TV={};TV={rangeOverflow:e=>`La valeur doit \xeatre ${e.maxValue} ou ant\xe9rieure.`,rangeReversed:`La date de début doit être antérieure à la date de fin.`,rangeUnderflow:e=>`La valeur doit \xeatre ${e.minValue} ou ult\xe9rieure.`,unavailableDate:`La date sélectionnée nâest pas disponible.`};var EV={};EV={rangeOverflow:e=>`\u{5D4}\u{5E2}\u{5E8}\u{5DA} \u{5D7}\u{5D9}\u{5D9}\u{5D1} \u{5DC}\u{5D4}\u{5D9}\u{5D5}\u{5EA} ${e.maxValue} \u{5D0}\u{5D5} \u{5DE}\u{5D5}\u{5E7}\u{5D3}\u{5DD} \u{5D9}\u{5D5}\u{5EA}\u{5E8}.`,rangeReversed:`ת×ר×× ××ת××× ×××× ××××ת ××¤× × ×ª×ר×× ×ס×××.`,rangeUnderflow:e=>`\u{5D4}\u{5E2}\u{5E8}\u{5DA} \u{5D7}\u{5D9}\u{5D9}\u{5D1} \u{5DC}\u{5D4}\u{5D9}\u{5D5}\u{5EA} ${e.minValue} \u{5D0}\u{5D5} \u{5DE}\u{5D0}\u{5D5}\u{5D7}\u{5E8} \u{5D9}\u{5D5}\u{5EA}\u{5E8}.`,unavailableDate:`×ת×ר×× ×× ××ר ××× × ××××.`};var DV={};DV={rangeOverflow:e=>`Vrijednost mora biti ${e.maxValue} ili ranije.`,rangeReversed:`Datum poÄetka mora biti prije datuma zavrÅ¡etka.`,rangeUnderflow:e=>`Vrijednost mora biti ${e.minValue} ili kasnije.`,unavailableDate:`Odabrani datum nije dostupan.`};var OV={};OV={rangeOverflow:e=>`Az \xe9rt\xe9knek ${e.maxValue} vagy kor\xe1bbinak kell lennie.`,rangeReversed:`A kezdÅ dátumnak a befejezÅ dátumnál korábbinak kell lennie.`,rangeUnderflow:e=>`Az \xe9rt\xe9knek ${e.minValue} vagy k\xe9s\u{151}bbinek kell lennie.`,unavailableDate:`A kiválasztott dátum nem érhetÅ el.`};var kV={};kV={rangeOverflow:e=>`Il valore deve essere ${e.maxValue} o precedente.`,rangeReversed:`La data di inizio deve essere antecedente alla data di fine.`,rangeUnderflow:e=>`Il valore deve essere ${e.minValue} o successivo.`,unavailableDate:`Data selezionata non disponibile.`};var AV={};AV={rangeOverflow:e=>`\u{5024}\u{306F} ${e.maxValue} \u{4EE5}\u{4E0B}\u{306B}\u{3059}\u{308B}\u{5FC5}\u{8981}\u{304C}\u{3042}\u{308A}\u{307E}\u{3059}\u{3002}`,rangeReversed:`éå§æ¥ã¯çµäºæ¥ããåã«ããå¿
è¦ãããã¾ãã`,rangeUnderflow:e=>`\u{5024}\u{306F} ${e.minValue} \u{4EE5}\u{4E0A}\u{306B}\u{3059}\u{308B}\u{5FC5}\u{8981}\u{304C}\u{3042}\u{308A}\u{307E}\u{3059}\u{3002}`,unavailableDate:`鏿ããæ¥ä»ã¯ä½¿ç¨ã§ãã¾ããã`};var jV={};jV={rangeOverflow:e=>`\u{AC12}\u{C740} ${e.maxValue} \u{C774}\u{C804}\u{C774}\u{C5B4}\u{C57C} \u{D569}\u{B2C8}\u{B2E4}.`,rangeReversed:`ììì¼ì ì¢
ë£ì¼ ì´ì ì´ì´ì¼ í©ëë¤.`,rangeUnderflow:e=>`\u{AC12}\u{C740} ${e.minValue} \u{C774}\u{D6C4}\u{C5EC}\u{C57C} \u{D569}\u{B2C8}\u{B2E4}.`,unavailableDate:`ì íí ë ì§ë¥¼ ì¬ì©í ì ììµëë¤.`};var MV={};MV={rangeOverflow:e=>`Reik\u{161}m\u{117} turi b\u{16B}ti ${e.maxValue} arba ankstesn\u{117}.`,rangeReversed:`Pradžios data turi bÅ«ti ankstesnÄ nei pabaigos data.`,rangeUnderflow:e=>`Reik\u{161}m\u{117} turi b\u{16B}ti ${e.minValue} arba naujesn\u{117}.`,unavailableDate:`Pasirinkta data nepasiekiama.`};var NV={};NV={rangeOverflow:e=>`V\u{113}rt\u{12B}bai ir j\u{101}b\u{16B}t ${e.maxValue} vai agr\u{101}kai.`,rangeReversed:`SÄkuma datumam ir jÄbÅ«t pirms beigu datuma.`,rangeUnderflow:e=>`V\u{113}rt\u{12B}bai ir j\u{101}b\u{16B}t ${e.minValue} vai v\u{113}l\u{101}kai.`,unavailableDate:`AtlasÄ«tais datums nav pieejams.`};var PV={};PV={rangeOverflow:e=>`Verdien m\xe5 v\xe6re ${e.maxValue} eller tidligere.`,rangeReversed:`Startdatoen mÃ¥ være før sluttdatoen.`,rangeUnderflow:e=>`Verdien m\xe5 v\xe6re ${e.minValue} eller senere.`,unavailableDate:`Valgt dato utilgjengelig.`};var FV={};FV={rangeOverflow:e=>`Waarde moet ${e.maxValue} of eerder zijn.`,rangeReversed:`De startdatum moet voor de einddatum liggen.`,rangeUnderflow:e=>`Waarde moet ${e.minValue} of later zijn.`,unavailableDate:`Geselecteerde datum niet beschikbaar.`};var IV={};IV={rangeOverflow:e=>`Warto\u{15B}\u{107} musi mie\u{107} warto\u{15B}\u{107} ${e.maxValue} lub wcze\u{15B}niejsz\u{105}.`,rangeReversed:`Data rozpoczÄcia musi byÄ wczeÅniejsza niż data zakoÅczenia.`,rangeUnderflow:e=>`Warto\u{15B}\u{107} musi mie\u{107} warto\u{15B}\u{107} ${e.minValue} lub p\xf3\u{17A}niejsz\u{105}.`,unavailableDate:`Wybrana data jest niedostÄpna.`};var LV={};LV={rangeOverflow:e=>`O valor deve ser ${e.maxValue} ou anterior.`,rangeReversed:`A data inicial deve ser anterior à data final.`,rangeUnderflow:e=>`O valor deve ser ${e.minValue} ou posterior.`,unavailableDate:`Data selecionada indisponÃvel.`};var RV={};RV={rangeOverflow:e=>`O valor tem de ser ${e.maxValue} ou anterior.`,rangeReversed:`A data de inÃcio deve ser anterior à data de fim.`,rangeUnderflow:e=>`O valor tem de ser ${e.minValue} ou posterior.`,unavailableDate:`Data selecionada indisponÃvel.`};var zV={};zV={rangeOverflow:e=>`Valoarea trebuie s\u{103} fie ${e.maxValue} sau anterioar\u{103}.`,rangeReversed:`Data de început trebuie sÄ fie anterioarÄ datei de sfârÈit.`,rangeUnderflow:e=>`Valoarea trebuie s\u{103} fie ${e.minValue} sau ulterioar\u{103}.`,unavailableDate:`Data selectatÄ nu este disponibilÄ.`};var BV={};BV={rangeOverflow:e=>`\u{417}\u{43D}\u{430}\u{447}\u{435}\u{43D}\u{438}\u{435} \u{434}\u{43E}\u{43B}\u{436}\u{43D}\u{43E} \u{431}\u{44B}\u{442}\u{44C} \u{43D}\u{435} \u{43F}\u{43E}\u{437}\u{436}\u{435} ${e.maxValue}.`,rangeReversed:`ÐаÑа наÑала должна пÑедÑеÑÑвоваÑÑ Ð´Ð°Ñе оконÑаниÑ.`,rangeUnderflow:e=>`\u{417}\u{43D}\u{430}\u{447}\u{435}\u{43D}\u{438}\u{435} \u{434}\u{43E}\u{43B}\u{436}\u{43D}\u{43E} \u{431}\u{44B}\u{442}\u{44C} \u{43D}\u{435} \u{440}\u{430}\u{43D}\u{44C}\u{448}\u{435} ${e.minValue}.`,unavailableDate:`ÐÑбÑÐ°Ð½Ð½Ð°Ñ Ð´Ð°Ñа недоÑÑÑпна.`};var VV={};VV={rangeOverflow:e=>`Hodnota mus\xed by\u{165} ${e.maxValue} alebo skor\u{161}ia.`,rangeReversed:`Dátum zaÄiatku musà byÅ¥ skoršà ako dátum konca.`,rangeUnderflow:e=>`Hodnota mus\xed by\u{165} ${e.minValue} alebo neskor\u{161}ia.`,unavailableDate:`Vybratý dátum je nedostupný.`};var HV={};HV={rangeOverflow:e=>`Vrednost mora biti ${e.maxValue} ali starej\u{161}a.`,rangeReversed:`ZaÄetni datum mora biti pred konÄnim datumom.`,rangeUnderflow:e=>`Vrednost mora biti ${e.minValue} ali novej\u{161}a.`,unavailableDate:`Izbrani datum ni na voljo.`};var UV={};UV={rangeOverflow:e=>`Vrednost mora da bude ${e.maxValue} ili starija.`,rangeReversed:`Datum poÄetka mora biti pre datuma zavrÅ¡etka.`,rangeUnderflow:e=>`Vrednost mora da bude ${e.minValue} ili novija.`,unavailableDate:`Izabrani datum nije dostupan.`};var WV={};WV={rangeOverflow:e=>`V\xe4rdet m\xe5ste vara ${e.maxValue} eller tidigare.`,rangeReversed:`Startdatumet mÃ¥ste vara före slutdatumet.`,rangeUnderflow:e=>`V\xe4rdet m\xe5ste vara ${e.minValue} eller senare.`,unavailableDate:`Det valda datumet är inte tillgängligt.`};var GV={};GV={rangeOverflow:e=>`De\u{11F}er, ${e.maxValue} veya \xf6ncesi olmal\u{131}d\u{131}r.`,rangeReversed:`BaÅlangıç tarihi bitiÅ tarihinden önce olmalıdır.`,rangeUnderflow:e=>`De\u{11F}er, ${e.minValue} veya sonras\u{131} olmal\u{131}d\u{131}r.`,unavailableDate:`Seçilen tarih kullanılamıyor.`};var KV={};KV={rangeOverflow:e=>`\u{417}\u{43D}\u{430}\u{447}\u{435}\u{43D}\u{43D}\u{44F} \u{43C}\u{430}\u{454} \u{431}\u{443}\u{442}\u{438} \u{43D}\u{435} \u{43F}\u{456}\u{437}\u{43D}\u{456}\u{448}\u{435} ${e.maxValue}.`,rangeReversed:`ÐаÑа поÑаÑÐºÑ Ð¼Ð°Ñ Ð¿ÐµÑедÑваÑи даÑÑ Ð·Ð°Ð²ÐµÑÑеннÑ.`,rangeUnderflow:e=>`\u{417}\u{43D}\u{430}\u{447}\u{435}\u{43D}\u{43D}\u{44F} \u{43C}\u{430}\u{454} \u{431}\u{443}\u{442}\u{438} \u{43D}\u{435} \u{440}\u{430}\u{43D}\u{456}\u{448}\u{435} ${e.minValue}.`,unavailableDate:`ÐибÑана даÑа недоÑÑÑпна.`};var qV={};qV={rangeOverflow:e=>`\u{503C}\u{5FC5}\u{987B}\u{662F} ${e.maxValue} \u{6216}\u{66F4}\u{65E9}\u{65E5}\u{671F}\u{3002}`,rangeReversed:`å¼å§æ¥æå¿
é¡»æ©äºç»ææ¥æã`,rangeUnderflow:e=>`\u{503C}\u{5FC5}\u{987B}\u{662F} ${e.minValue} \u{6216}\u{66F4}\u{665A}\u{65E5}\u{671F}\u{3002}`,unavailableDate:`æéæ¥æä¸å¯ç¨ã`};var JV={};JV={rangeOverflow:e=>`\u{503C}\u{5FC5}\u{9808}\u{662F} ${e.maxValue} \u{6216}\u{66F4}\u{65E9}\u{3002}
16`,rangeReversed:`éå§æ¥æå¿
é å¨çµææ¥æä¹åã`,rangeUnderflow:e=>`\u{503C}\u{5FC5}\u{9808}\u{662F} ${e.minValue} \u{6216}\u{66F4}\u{665A}\u{3002}`,unavailableDate:`æé¸æ¥æç¡æ³ä½¿ç¨ã`};var YV={};YV={"ar-AE":hV,"bg-BG":gV,"cs-CZ":_V,"da-DK":vV,"de-DE":yV,"el-GR":bV,"en-US":xV,"es-ES":SV,"et-EE":CV,"fi-FI":wV,"fr-FR":TV,"he-IL":EV,"hr-HR":DV,"hu-HU":OV,"it-IT":kV,"ja-JP":AV,"ko-KR":jV,"lt-LT":MV,"lv-LV":NV,"nb-NO":PV,"nl-NL":FV,"pl-PL":IV,"pt-BR":LV,"pt-PT":RV,"ro-RO":zV,"ru-RU":BV,"sk-SK":VV,"sl-SI":HV,"sr-SP":UV,"sv-SE":WV,"tr-TR":GV,"uk-UA":KV,"zh-CN":qV,"zh-TW":JV};function qge(e){return e&&e.__esModule?e.default:e}var XV=new QM(qge(YV));function ZV(){let e=typeof navigator<`u`&&(navigator.language||navigator.userLanguage)||`en-US`;try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e=`en-US`}return e}function QV(e,t,n,r,i){let a=e!=null&&n!=null&&e.compare(n)>0,o=e!=null&&t!=null&&e.compare(t)<0,s=e!=null&&r?.(e)||!1,c=a||o||s,l=[];if(c){let e=ZV(),r=new tN(e,QM.getGlobalDictionaryForPackage(`@react-stately/datepicker`)||XV),c=new lE(e,$V({},i)),u=c.resolvedOptions().timeZone;o&&t!=null&&l.push(r.format(`rangeUnderflow`,{minValue:c.format(t.toDate(u))})),a&&n!=null&&l.push(r.format(`rangeOverflow`,{maxValue:c.format(n.toDate(u))})),s&&l.push(r.format(`unavailableDate`))}return{isInvalid:c,validationErrors:l,validationDetails:{badInput:s,customError:!1,patternMismatch:!1,rangeOverflow:a,rangeUnderflow:o,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!c}}}function Jge(e,t,n,r,i){let a=dI(QV(e?.start??null,t,n,r,i),QV(e?.end??null,t,n,r,i));if(e?.end!=null&&e.start!=null&&e.end.compare(e.start)<0){let e=QM.getGlobalDictionaryForPackage(`@react-stately/datepicker`)||XV;a=dI(a,{isInvalid:!0,validationErrors:[e.getStringForLocale(`rangeReversed`,ZV())],validationDetails:{...rI,rangeUnderflow:!0,rangeOverflow:!0,valid:!1}})}return a}var Yge={year:`numeric`,month:`numeric`,day:`numeric`,hour:`numeric`,minute:`2-digit`,second:`2-digit`},Xge={year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`};function $V(e,t){e={...t.shouldForceLeadingZeros?Xge:Yge,...e};let n=t.granularity||`minute`,r=Object.keys(e),i=r.indexOf(t.maxGranularity??`year`);i<0&&(i=0);let a=r.indexOf(n);if(a<0&&(a=2),i>a)throw Error(`maxGranularity must be greater than granularity`);let o=r.slice(i,a+1).reduce((t,n)=>(t[n]=e[n],t),{});return t.hourCycle!=null&&(o.hour12=t.hourCycle===12),o.timeZone=t.timeZone||`UTC`,(n===`hour`||n===`minute`||n===`second`)&&t.timeZone&&!t.hideTimeZone&&(o.timeZoneName=`short`),t.showEra&&i===0&&(o.era=`short`),o}function eH(e){return e&&`hour`in e?e:new hT}function tH(e,t){if(e===null)return null;if(e)return Lw(e,t)}function nH(e,t,n,r){if(e)return tH(e,n);let i=Lw(uw(r??gw()).set({hour:0,minute:0,second:0,millisecond:0}),n);return t===`year`||t===`month`||t===`day`?Pw(i):r?i:Fw(i)}function rH(e,t){let n=e&&`timeZone`in e?e.timeZone:void 0,r=e&&`minute`in e?`minute`:`day`;if(e&&t&&!(t in e))throw Error(`Invalid granularity `+t+` for value `+e.toString());let[i,a]=(0,V.useState)([r,n]);e&&(i[0]!==r||i[1]!==n)&&a([r,n]),t||=e?r:i[0];let o=e?n:i[1];return[t,o]}function Zge(e){let t=mV(e),[n,r]=vM(e.value,e.defaultValue||null,e.onChange),[i]=(0,V.useState)(n),a=n||e.placeholderValue||null,[o,s]=rH(a,e.granularity),c=n==null?null:n.toDate(s??`UTC`),l=o===`hour`||o===`minute`||o===`second`,u=e.shouldCloseOnSelect??!0,[d,f]=(0,V.useState)(null),[p,m]=(0,V.useState)(null);if(n&&(d=n,`hour`in n&&(p=n)),a&&!(o in a))throw Error(`Invalid granularity `+o+` for value `+a.toString());let h=n?.calendar.identifier===`gregory`&&n.era===`BC`,g=(0,V.useMemo)(()=>({granularity:o,timeZone:s,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,showEra:h}),[o,e.hourCycle,e.shouldForceLeadingZeros,s,e.hideTimeZone,h]),{minValue:_,maxValue:v,isDateUnavailable:y}=e,b=(0,V.useMemo)(()=>QV(n,_,v,y,g),[n,_,v,y,g]),x=sI({...e,value:n,builtinValidation:b}),S=x.displayValidation.isInvalid,C=e.validationState||(S?`invalid`:null),w=(e,t)=>{r(`timeZone`in t?t.set(Pw(e)):Fw(e,t)),f(null),m(null),x.commitValidation()},T=n=>{let i=typeof u==`function`?u():u;l?p||i?w(n,p||eH(e.defaultValue||e.placeholderValue)):f(n):(r(n),x.commitValidation()),i&&t.setOpen(!1)},E=e=>{d&&e?w(d,e):m(e)};return{...x,value:n,defaultValue:e.defaultValue??i,setValue:r,dateValue:d,timeValue:p,setDateValue:T,setTimeValue:E,granularity:o,hasTime:l,...t,setOpen(r){!r&&!n&&d&&l&&w(d,p||eH(e.defaultValue||e.placeholderValue)),t.setOpen(r)}
16,validationState:C,isInvalid:S,formatValue(e,t){return c?new lE(e,$V(t,g)).format(c):``},getDateFormatter(e,t){return new lE(e,$V({},{...g,...t}))}}}var Qge=new QM({ach:{year:`mwaka`,month:`dwe`,day:`nino`},af:{year:`jjjj`,month:`mm`,day:`dd`},am:{year:`áááá`,month:`áá`,day:`áá`},an:{year:`aaaa`,month:`mm`,day:`dd`},ar:{year:`Ø³ÙØ©`,month:`Ø´ÙØ±`,day:`ÙÙÙ
`},ast:{year:`aaaa`,month:`mm`,day:`dd`},az:{year:`iiii`,month:`aa`,day:`gg`},be:{year:`гггг`,month:`мм`,day:`дд`},bg:{year:`гггг`,month:`мм`,day:`дд`},bn:{year:`yyyy`,month:`মিমি`,day:`dd`},br:{year:`bbbb`,month:`mm`,day:`dd`},bs:{year:`gggg`,month:`mm`,day:`dd`},ca:{year:`aaaa`,month:`mm`,day:`dd`},cak:{year:`jjjj`,month:`ii`,day:`q'q'`},ckb:{year:`ساڵ`,month:`Ù
اÙÚ¯`,day:`ÚÛÚ`},cs:{year:`rrrr`,month:`mm`,day:`dd`},cy:{year:`bbbb`,month:`mm`,day:`dd`},da:{year:`åååå`,month:`mm`,day:`dd`},de:{year:`jjjj`,month:`mm`,day:`tt`},dsb:{year:`llll`,month:`mm`,day:`źź`},el:{year:`εεεε`,month:`μμ`,day:`ηη`},en:{year:`yyyy`,month:`mm`,day:`dd`},eo:{year:`jjjj`,month:`mm`,day:`tt`},es:{year:`aaaa`,month:`mm`,day:`dd`},et:{year:`aaaa`,month:`kk`,day:`pp`},eu:{year:`uuuu`,month:`hh`,day:`ee`},fa:{year:`ساÙ`,month:`Ù
اÙ`,day:`Ø±ÙØ²`},ff:{year:`hhhh`,month:`ll`,day:`ññ`},fi:{year:`vvvv`,month:`kk`,day:`pp`},fr:{year:`aaaa`,month:`mm`,day:`jj`},fy:{year:`jjjj`,month:`mm`,day:`dd`},ga:{year:`bbbb`,month:`mm`,day:`ll`},gd:{year:`bbbb`,month:`mm`,day:`ll`},gl:{year:`aaaa`,month:`mm`,day:`dd`},he:{year:`×©× ×`,month:`×××ש`,day:`×××`},hr:{year:`gggg`,month:`mm`,day:`dd`},hsb:{year:`llll`,month:`mm`,day:`dd`},hu:{year:`éééé`,month:`hh`,day:`nn`},ia:{year:`aaaa`,month:`mm`,day:`dd`},id:{year:`tttt`,month:`bb`,day:`hh`},it:{year:`aaaa`,month:`mm`,day:`gg`},ja:{year:`å¹´`,month:`æ`,day:`æ¥`},ka:{year:`á¬á¬á¬á¬`,month:`áá`,day:`á á `},kk:{year:`жжжж`,month:`аа`,day:`кк`},kn:{year:`ವವವವ`,month:`ಮಿಮà³`,day:`ದಿದಿ`},ko:{year:`ì°ë`,month:`ì`,day:`ì¼`},lb:{year:`jjjj`,month:`mm`,day:`dd`},lo:{year:`àºàºàºàº`,month:`àºàº`,day:`ວວ`},lt:{year:`mmmm`,month:`mm`,day:`dd`},lv:{year:`gggg`,month:`mm`,day:`dd`},meh:{year:`aaaa`,month:`mm`,day:`dd`},ml:{year:`വർഷà´`,month:`മാസà´`,day:`à´¤àµà´¯à´¤à´¿`},ms:{year:`tttt`,month:`mm`,day:`hh`},nb:{year:`åååå`,month:`mm`,day:`dd`},nl:{year:`jjjj`,month:`mm`,day:`dd`},nn:{year:`åååå`,month:`mm`,day:`dd`},no:{year:`åååå`,month:`mm`,day:`dd`},oc:{year:`aaaa`,month:`mm`,day:`jj`},pl:{year:`rrrr`,month:`mm`,day:`dd`},pt:{year:`aaaa`,month:`mm`,day:`dd`},rm:{year:`oooo`,month:`mm`,day:`dd`},ro:{year:`aaaa`,month:`ll`,day:`zz`},ru:{year:`гггг`,month:`мм`,day:`дд`}
16,sc:{year:`aaaa`,month:`mm`,day:`dd`},scn:{year:`aaaa`,month:`mm`,day:`jj`},sk:{year:`rrrr`,month:`mm`,day:`dd`},sl:{year:`llll`,month:`mm`,day:`dd`},sr:{year:`гггг`,month:`мм`,day:`дд`},sv:{year:`åååå`,month:`mm`,day:`dd`},szl:{year:`rrrr`,month:`mm`,day:`dd`},tg:{year:`ÑÑÑÑ`,month:`мм`,day:`ÑÑ`},th:{year:`à¸à¸à¸à¸`,month:`à¸à¸`,day:`วว`},tr:{year:`yyyy`,month:`aa`,day:`gg`},uk:{year:`ÑÑÑÑ`,month:`мм`,day:`дд`},"zh-CN":{year:`å¹´`,month:`æ`,day:`æ¥`},"zh-TW":{year:`å¹´`,month:`æ`,day:`æ¥`}},`en`);function $ge(e,t,n){return e===`era`||e===`dayPeriod`?t:e===`year`||e===`month`||e===`day`?Qge.getStringForLocale(e,n):`ââ`}var iH={year:!0,month:!0,day:!0,hour:!0,minute:!0,second:!0,dayPeriod:!0,era:!0},aH={year:5,month:2,day:7,hour:2,minute:15,second:15},oH={dayperiod:`dayPeriod`,relatedYear:`year`,yearName:`literal`,unknown:`literal`};function sH(e){let{locale:t,createCalendar:n,hideTimeZone:r,isDisabled:i=!1,isReadOnly:a=!1,isRequired:o=!1,minValue:s,maxValue:c,isDateUnavailable:l}=e,u=e.value||e.defaultValue||e.placeholderValue||null,[d,f]=rH(u,e.granularity),p=f||`UTC`;if(u&&!(d in u))throw Error(`Invalid granularity `+d+` for value `+u.toString());let m=(0,V.useMemo)(()=>new lE(t),[t]),h=(0,V.useMemo)(()=>n(m.resolvedOptions().calendar),[n,m]),[g,_]=vM(e.value,e.defaultValue??null,e.onChange),[v]=(0,V.useState)(g),y=(0,V.useMemo)(()=>tH(g,h)??null,[g,h]),[b,x]=(0,V.useState)(()=>nH(e.placeholderValue,d,h,f)),S=y||b,C=h.identifier===`gregory`&&S.era===`BC`,w=(0,V.useMemo)(()=>({granularity:d,maxGranularity:e.maxGranularity??`year`,timeZone:f,hideTimeZone:r,hourCycle:e.hourCycle,showEra:C,shouldForceLeadingZeros:e.shouldForceLeadingZeros}),[e.maxGranularity,d,e.hourCycle,e.shouldForceLeadingZeros,f,r,C]),T=(0,V.useMemo)(()=>$V({},w),[w]),E=(0,V.useMemo)(()=>new lE(t,T),[t,T]),D=(0,V.useMemo)(()=>E.resolvedOptions(),[E]),O=(0,V.useMemo)(()=>E.formatToParts(new Date).filter(e=>iH[e.type]).reduce((e,t)=>(e[oH[t.type]||t.type]=!0,e),{}),[E]),[k,A]=(0,V.useState)(()=>e.value||e.defaultValue?{...O}:{}),j=(0,V.useRef)(null),M=(0,V.useRef)(h);(0,V.useEffect)(()=>{sw(h,M.current)||(M.current=h,x(t=>Object.keys(k).length>0?Lw(t,h):nH(e.placeholderValue,d,h,f)))},[h,d,k,f,e.placeholderValue]),g&&Object.keys(k).length<Object.keys(O).length&&(k={...O},A(k)),g==null&&Object.keys(k).length===Object.keys(O).length&&(k={},A(k),x(nH(e.placeholderValue,d,h,f)));let ee=y&&Object.keys(k).length>=Object.keys(O).length?y:b,te=t=>{if(e.isDisabled||e.isReadOnly)return;let n=Object.keys(k),r=Object.keys(O);t==null?(_(null),x(nH(e.placeholderValue,d,h,f)),A({})):n.length===0&&j.current==null||n.length>=r.length||n.length===r.length-1&&O.dayPeriod&&!k.dayPeriod&&j.current!==`dayPeriod`?(n.length===0&&(k={...O},A(k)),t=Lw(t,u?.calendar||new iw),_(t)):x(t),j.current=null},ne=(0,V.useMemo)(()=>ee.toDate(p),[ee,p]),re=(0,V.useMemo)(()=>e_e(ne,k,E,D,ee,h,t,d),[ne,k,E,D,ee,h,t,d]);O.era&&k.year&&!k.era?(k.era=!0,A({...k})):!O.era&&k.era&&(delete k.era,A({...k}));let ie=e=>{k[e]=!0,e===`year`&&O.era&&(k.era=!0),A({...k})},ae=(e,t)=>{if(k[e])te(t_e(ee,e,t,D));else{ie(e);let t=Object.keys(k),n=Object.keys(O);(t.length>=n.length||t.length===n.length-1&&O.dayPeriod&&!k.dayPeriod)&&te(ee)}},oe=(0,V.useMemo)(()=>QV(g,s,c,l,w),[g,s,c,l,w]),se=sI({...e,value:g,builtinValidation:oe}),N=se.displayValidation.isInvalid,ce=e.validationState||(N?`invalid`:null);return{...se,value:y,defaultValue:e.defaultValue??v,dateValue:ne,calendar:h,setValue:te,segments:re,dateFormatter:E,validationState:ce,isInvalid:N,granularity:d,maxGranularity:e.maxGranularity??`year`,isDisabled:i,isReadOnly:a,isRequired:o,increment(e){ae(e,1)},decrement(e){ae(e,-1)},incrementPage(e){ae(e,aH[e]||1)},decrementPage(e){ae(e,-(aH[e]||1))},setSegment(e,t){ie(e),te(n_e(ee,e,t,D))},confirmPlaceholder(){if(e.isDisabled||e.isReadOnly)return;let t=Object.keys(k),n=Object.keys(O);t.length===n.length-1&&O.dayPeriod&&!k.dayPeriod&&(k={...O},A(k),te(ee.copy()))},clearSegment(t){delete k[t],j.current=t,A({...k});let n=nH(e.placeholderValue,d,h,f),r=ee;if(t===`dayPeriod`&&`hour`in ee&&`hour`in n){let e=ee.hour>=12,t=n.hour>=12;e&&!t?r=ee.set({hour:ee.hour-12}):!e&&t&&(r=ee.set({hour:ee.hour+12}))}else t===`hour`&&`hour`in ee&&ee.hour>=12&&k.dayPeriod?r=ee.set({hour:n.hour+12}):t in ee&&(r=ee.set({[t]:n[t]}));_(null),te(r)},formatValue(e){if(!y)return``;let n=$V(e,w);return new lE(t,n).format(ne)},getDateFormatter(e,t){return new lE(e,$V({},{...w,...t}))}}}function e_e(e,t,n,r,i,a,o,s){let c=[`hour`,`minute`,`second`],l=n.formatToParts(e),u=[];for(let e of l){let n=oH[e.type]||e.type,l=iH[n];n===`era`&&a.getEras().length===1&&(l=!1);let d=iH[n]&&!t[n],f=iH[n]?$ge(n,e.value,o):null,p={type:n,text:d?f:e.value,...cH(i,n,r),isPlaceholder:d,placeholder:f,isEditable:l};n===`hour`?(u.push({type:`literal`,text:`â¦`,...cH(i,`literal`,r),isPlaceholder:!1,placeholder:``,isEditable:!1}),u.push(p),n===s&&u.push({type:`literal`,text:`â©`,...cH(i,`literal`,r),isPlaceholder:!1,placeholder:``,isEditable:!1})):c.includes(n)&&n===s?(u.push(p),u.push({type:`literal`,text:`â©`,...cH(i,`literal`,r),isPlaceholder:!1,placeholder:``,isEditable:!1})):u.push(p)}return u}
16function cH(e,t,n){switch(t){case`era`:{let t=e.calendar.getEras();return{value:t.indexOf(e.era),minValue:0,maxValue:t.length-1}}case`year`:return{value:e.year,minValue:1,maxValue:e.calendar.getYearsInEra(e)};case`month`:return{value:e.month,minValue:kce(e),maxValue:e.calendar.getMonthsInYear(e)};case`day`:return{value:e.day,minValue:Ace(e),maxValue:e.calendar.getDaysInMonth(e)}}if(`hour`in e)switch(t){case`dayPeriod`:return{value:e.hour>=12?12:0,minValue:0,maxValue:12};case`hour`:if(n.hour12){let t=e.hour>=12;return{value:e.hour,minValue:t?12:0,maxValue:t?23:11}}return{value:e.hour,minValue:0,maxValue:23};case`minute`:return{value:e.minute,minValue:0,maxValue:59};case`second`:return{value:e.second,minValue:0,maxValue:59}}return{}}function t_e(e,t,n,r){switch(t){case`era`:case`year`:case`month`:case`day`:return e.cycle(t,n,{round:t===`year`})}if(`hour`in e)switch(t){case`dayPeriod`:{let t=e.hour,n=t>=12;return e.set({hour:n?t-12:t+12})}case`hour`:case`minute`:case`second`:return e.cycle(t,n,{round:t!==`hour`,hourCycle:r.hour12?12:24})}throw Error(`Unknown segment: `+t)}function n_e(e,t,n,r){switch(t){case`day`:case`month`:case`year`:case`era`:return e.set({[t]:n})}if(`hour`in e&&typeof n==`number`)switch(t){case`dayPeriod`:{let t=e.hour,r=t>=12;return n>=12===r?e:e.set({hour:r?t-12:t+12})}case`hour`:if(r.hour12){let t=e.hour>=12;!t&&n===12&&(n=0),t&&n<12&&(n+=12)}case`minute`:case`second`:return e.set({[t]:n})}throw Error(`Unknown segment: `+t)}function r_e(e){let t=mV(e),[n,r]=vM(e.value,e.defaultValue||null,e.onChange),[i]=(0,V.useState)(n),[a,o]=(0,V.useState)(()=>n||{start:null,end:null});n==null&&a.start&&a.end&&(a={start:null,end:null},o(a));let s=n||a,c=e=>{s=e||{start:null,end:null},o(s),lH(s)?r(s):r(null)},[l,u]=rH(s?.start||s?.end||e.placeholderValue||null,e.granularity),d=l===`hour`||l===`minute`||l===`second`,f=e.shouldCloseOnSelect??!0,[p,m]=(0,V.useState)(null),[h,g]=(0,V.useState)(null);s&&lH(s)&&(p=s,`hour`in s.start&&(h=s));let _=(e,t)=>{c({start:`timeZone`in t.start?t.start.set(Pw(e.start)):Fw(e.start,t.start),end:`timeZone`in t.end?t.end.set(Pw(e.end)):Fw(e.end,t.end)}),m(null),g(null),E.commitValidation()},v=n=>{let r=typeof f==`function`?f():f;d?lH(n)&&(r||h?.start&&h?.end)?_(n,{start:h?.start||eH(e.placeholderValue),end:h?.end||eH(e.placeholderValue)}):m(n):lH(n)?(c(n),E.commitValidation()):m(n),r&&t.setOpen(!1)},y=e=>{lH(p)&&lH(e)?_(p,e):g(e)},b=s?.start?.calendar.identifier===`gregory`&&s.start.era===`BC`||s?.end?.calendar.identifier===`gregory`&&s.end.era===`BC`,x=(0,V.useMemo)(()=>({granularity:l,timeZone:u,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,showEra:b}),[l,e.hourCycle,e.shouldForceLeadingZeros,u,e.hideTimeZone,b]),{minValue:S,maxValue:C,isDateUnavailable:w}=e,T=(0,V.useMemo)(()=>Jge(s,S,C,w,x),[s,S,C,w,x]),E=sI({...e,value:n,name:(0,V.useMemo)(()=>[e.startName,e.endName].filter(e=>e!=null),[e.startName,e.endName]),builtinValidation:T}),D=E.displayValidation.isInvalid,O=e.validationState||(D?`invalid`:null);return{...E,value:s,defaultValue:e.defaultValue??i,setValue:c,dateRange:p,timeRange:h,granularity:l,hasTime:d,setDate(e,t){v(e===`start`?{start:t,end:p?.end??null}:{start:p?.start??null,end:t})},setTime(e,t){y(e===`start`?{start:t,end:h?.end??null}:{start:h?.start??null,end:t})},setDateTime(e,t){c(e===`start`?{start:t,end:s?.end??null}:{start:s?.start??null,end:t})},setDateRange:v,setTimeRange:y,...t,setOpen(n){!n&&!(s?.start&&s?.end)&&lH(p)&&d&&_(p,{start:h?.start||eH(e.placeholderValue),end:h?.end||eH(e.placeholderValue)}),t.setOpen(n)},validationState:O,isInvalid:D,formatValue(t,n){if(!s||!s.start||!s.end)return null;let r=`timeZone`in s.start?s.start.timeZone:void 0,i=e.granularity||(s.start&&`minute`in s.start?`minute`:`day`),a=`timeZone`in s.end?s.end.timeZone:void 0,o=e.granularity||(s.end&&`minute`in s.end?`minute`:`day`),c=$V(n,{granularity:i,timeZone:r,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,showEra:s.start.calendar.identifier===`gregory`&&s.start.era===`BC`||s.end.calendar.identifier===`gregory`&&s.end.era===`BC`}),l=s.start.toDate(r||`UTC`),u=s.end.toDate(a||`UTC`),d=new lE(t,c),f;if(r===a&&i===o&&s.start.compare(s.end)!==0){try{let e=d.formatRangeToParts(l,u),t=-1;for(let n=0;n<e.length;n++){let r=e[n];if(r.source===`shared`&&r.type===`literal`)t=n;else if(r.source===`endRange`)break}let n=``,r=``;for(let i=0;i<e.length;
16i++)i<t?n+=e[i].value:i>t&&(r+=e[i].value);return{start:n,end:r}}catch{}f=d}else f=new lE(t,$V(n,{granularity:o,timeZone:a,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle}));return{start:d.format(l),end:f.format(u)}},getDateFormatter(e,t){return new lE(e,$V({},{...x,...t}))}}}function lH(e){return e?.start!=null&&e.end!=null}function i_e(e){let{placeholderValue:t=new hT,minValue:n,maxValue:r,defaultValue:i,granularity:a,validate:o}=e,[s,c]=vM(e.value,i??null,e.onChange),l=s||t,u=l&&`day`in l?l:void 0,d=i&&`timeZone`in i?i.timeZone:void 0,f=(0,V.useMemo)(()=>{let e=l&&`timeZone`in l?l.timeZone:void 0;return(e||d)&&t?Rw(uH(t),e||d):uH(t)},[t,l,d]),p=(0,V.useMemo)(()=>uH(n,u),[n,u]),m=(0,V.useMemo)(()=>uH(r,u),[r,u]),h=(0,V.useMemo)(()=>s&&`day`in s?Iw(s):s,[s]),g=(0,V.useMemo)(()=>s==null?null:uH(s),[s]),_=(0,V.useMemo)(()=>i==null?null:uH(i),[i]),v=e=>{c(u||d?e:e&&Iw(e))};return{...sH({...e,value:g,defaultValue:_,minValue:p,maxValue:m,onChange:v,granularity:a||`minute`,maxGranularity:`hour`,placeholderValue:f??void 0,createCalendar:()=>new iw,validate:(0,V.useCallback)(()=>o?.(s),[o,s])}),timeValue:h}}function uH(e,t=dw(gw())){return e?`day`in e?e:Fw(t,e):null}function a_e(e){let{getItems:t,isDisabled:n,collection:r,selectionManager:i,onDragStart:a,onDragMove:o,onDragEnd:s,preview:c,getAllowedDropOperations:l}=e,[,u]=(0,V.useState)(!1),d=(0,V.useRef)(new Set),f=(0,V.useRef)(null),p=e=>{let t=new Set;if(i.isSelected(e))for(let e of i.selectedKeys){let n=r.getItem(e);if(n){let a=!1,o=n.parentKey;for(;o!=null;){if(i.selectedKeys.has(o)){a=!0;break}let e=r.getItem(o);o=e?e.parentKey:null}a||t.add(e)}}else t.add(e);return t};return{collection:r,selectionManager:i,get draggedKey(){return f.current},get draggingKeys(){return d.current},isDragging(e){return d.current.has(e)},getKeysForDrag:p,getItems(e){let n=p(e),i=[];for(let e of n){let t=r.getItem(e)?.value;t!=null&&i.push(t)}return t(p(e),i)},isDisabled:n,preview:c,getAllowedDropOperations:l,startDrag(e,t){let n=p(e);d.current=n,f.current=e,i.setFocused(!1),u(!0),typeof a==`function`&&a({...t,keys:n})},moveDrag(e){typeof o==`function`&&o({...e,keys:d.current})},endDrag(e){let{isInternal:t}=e;typeof s==`function`&&s({...e,keys:d.current,isInternal:t}),d.current=new Set,f.current=null,u(!1)}}}function o_e(e){let{acceptedDragTypes:t=`all`,isDisabled:n,onInsert:r,onRootDrop:i,onItemDrop:a,onReorder:o,onMove:s,shouldAcceptItemDrop:c,collection:l,selectionManager:u,onDropEnter:d,getDropOperation:f,onDrop:p}=e,[m,h]=(0,V.useState)(null),g=(0,V.useRef)(null),_=e=>{if(e.dropPosition===`before`){let t=l.getItem(e.key);return t&&t.prevKey!=null?{type:`item`,key:t.prevKey,dropPosition:`after`}:null}if(e.dropPosition===`after`){let t=l.getItem(e.key);return t&&t.nextKey!=null?{type:`item`,key:t.nextKey,dropPosition:`before`}:null}return null},v=(0,V.useCallback)(e=>{let{target:u,types:d,allowedOperations:m,isInternal:h,draggingKeys:g}=e;if(n||!u)return`cancel`;if(t===`all`||t.some(e=>d.has(e))){let e=r&&u.type===`item`&&!h&&(u.dropPosition===`before`||u.dropPosition===`after`),t=o&&u.type===`item`&&h&&(u.dropPosition===`before`||u.dropPosition===`after`)&&s_e(l,u,g),n=u.type!==`item`||u.dropPosition!==`on`||!c||c(u,d),_=s&&u.type===`item`&&h&&n,v=i&&u.type===`root`&&!h,y=a&&u.type===`item`&&u.dropPosition===`on`&&!(h&&u.key!=null&&g.has(u.key))&&n;if(p||e||t||_||v||y)return f?f(u,d,m):m[0]}return`cancel`},[n,l,t,f,r,i,a,c,o,s,p]);return{collection:l,selectionManager:u,isDisabled:n,target:m,setTarget(t){if(this.isDropTarget(t))return;let n=g.current;n&&typeof e.onDropExit==`function`&&e.onDropExit({type:`dropexit`,x:0,y:0,target:n}),t&&typeof d==`function`&&d({type:`dropenter`,x:0,y:0,target:t}),g.current=t??null,h(t??null)},isDropTarget(e){let t=g.current;return!t||!e?!1:dH(e,t)?!0:e?.type===`item`&&t?.type===`item`&&e.key!==t.key&&e.dropPosition!==t.dropPosition&&e.dropPosition!==`on`&&t.dropPosition!==`on`?dH(_(e),t)||dH(e,_(t)):!1},getDropOperation(e){return v(e)}}}function dH(e,t){if(!e)return!t;switch(e.type){case`root`:return t?.type===`root`;case`item`:return t?.type===`item`&&t?.key===e.key&&t?.dropPosition===e.dropPosition}}function s_e(e,t,n){let r=e.getItem(t.key);for(let t of n)if(e.getItem(t)?.parentKey!==r?.parentKey)return!1;return!0}function c_e(e){let t=mV(e),[n,r]=(0,V.useState)(null),[i,a]=(0,V.useState)([]),o=()=>{a([]),t.close()},s=(e,t)=>{a(n=>t>n.length?n:[...n.slice(0,t),e])},c=(e,t)=>{a(n=>n[t]===e?n.slice(0,t):n)};return{focusStrategy:n,...t,open(e=null){r(e),t.open()}
vendor: 3,729 bytes, line 16
16,toggle(e=null){r(e),t.toggle()},close(){o()},expandedKeysStack:i,openSubmenu:s,closeSubmenu:c}}var fH=(0,V.createContext)(null),pH=(0,V.createContext)(null),mH=(0,V.createContext)(null),hH=(0,V.createContext)(null),l_e=(0,V.forwardRef)(function(e,t){[e,t]=wM(e,t,fH);let{locale:n}=XM(),r=aV({...e,locale:n,createCalendar:e.createCalendar||sE}),{calendarProps:i,prevButtonProps:a,nextButtonProps:o,errorMessageProps:s,title:c}=Che(e,r),l=SM({...e,values:{state:r,isDisabled:e.isDisabled||!1,isInvalid:r.isValueInvalid},defaultClassName:`react-aria-Calendar`}),u=wj(e,{global:!0});return V.createElement(`div`,{...bj(u,l,i),ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-invalid":r.isValueInvalid||void 0},V.createElement(xM,{values:[[YB,{slots:{previous:a,next:o}}],[tj,{"aria-hidden":!0,level:2,children:c}],[mH,r],[fH,e],[ZB,{slots:{errorMessage:s}}]]},V.createElement(IF,null,V.createElement(`h2`,null,i[`aria-label`])),l.children,V.createElement(IF,null,V.createElement(`button`,{"aria-label":o[`aria-label`],disabled:o.isDisabled,onClick:()=>r.focusNextPage(),tabIndex:-1}))))}),gH=(0,V.forwardRef)(function(e,t){[e,t]=wM(e,t,pH);let{locale:n}=XM(),r=Vge({...e,locale:n,createCalendar:e.createCalendar||sE}),{calendarProps:i,prevButtonProps:a,nextButtonProps:o,errorMessageProps:s,title:c}=whe(e,r,t),l=SM({...e,values:{state:r,isDisabled:e.isDisabled||!1,isInvalid:r.isValueInvalid},defaultClassName:`react-aria-RangeCalendar`}),u=wj(e,{global:!0});return V.createElement(`div`,{...bj(l,u,i),ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-invalid":r.isValueInvalid||void 0},V.createElement(xM,{values:[[YB,{slots:{previous:a,next:o}}],[tj,{"aria-hidden":!0,level:2,children:c}],[hH,r],[pH,e],[ZB,{slots:{errorMessage:s}}]]},V.createElement(IF,null,V.createElement(`h2`,null,i[`aria-label`])),l.children,V.createElement(IF,null,V.createElement(`button`,{"aria-label":o[`aria-label`],disabled:o.isDisabled,onClick:()=>r.focusNextPage(),tabIndex:-1}))))}),_H=(0,V.createContext)(null),vH=(0,V.forwardRef)(function(e,t){let n=(0,V.useContext)(mH),r=(0,V.useContext)(hH),i=CM(fH),a=CM(pH),o=n??r,s=o.visibleRange.start;e.offset&&(s=s.add(e.offset));let c=i?.firstDayOfWeek??a?.firstDayOfWeek,{gridProps:l,headerProps:u,weekDays:d,weeksInMonth:f}=The({startDate:s,endDate:vw(s),weekdayStyle:e.weekdayStyle,firstDayOfWeek:c},o),p=wj(e,{global:!0});return V.createElement(_H.Provider,{value:{headerProps:u,weekDays:d,startDate:s,weeksInMonth:f}},V.createElement(`table`,{...bj(p,l),ref:t,style:e.style,cellPadding:0,className:e.className??`react-aria-CalendarGrid`},typeof e.children==`function`?V.createElement(V.Fragment,null,V.createElement(yH,null,e=>V.createElement(bH,null,e)),V.createElement(xH,null,e.children)):e.children))});function u_e(e,t){let{children:n,style:r,className:i}=e,{headerProps:a,weekDays:o}=(0,V.useContext)(_H),s=wj(e,{global:!0});return V.createElement(`thead`,{...bj(s,a),ref:t,style:r,className:i??`react-aria-CalendarGridHeader`},V.createElement(`tr`,null,o.map((e,t)=>V.cloneElement(n(e),{key:t}))))}var yH=(0,V.forwardRef)(u_e);function d_e(e,t){let{children:n,style:r,className:i}=e,a=wj(e,{global:!0});return V.createElement(`th`,{...a,ref:t,style:r,className:i||`react-aria-CalendarHeaderCell`},n)}var bH=(0,V.forwardRef)(d_e);function f_e(e,t){let{children:n,style:r,className:i}=e,a=(0,V.useContext)(mH),o=(0,V.useContext)(hH),s=a??o,{startDate:c,weeksInMonth:l}=(0,V.useContext)(_H),u=wj(e,{global:!0});return V.createElement(`tbody`,{...u,ref:t,style:r,className:i??`react-aria-CalendarGridBody`},[...Array(l).keys()].map(e=>V.createElement(`tr`,{key:e},s.getDatesInWeek(e,c).map((e,t)=>e?V.cloneElement(n(e),{key:t}):V.createElement(`td`,{key:t}
16)))))}var xH=(0,V.forwardRef)(f_e),SH=(0,V.forwardRef)(function({date:e,...t},n){let r=(0,V.useContext)(mH),i=(0,V.useContext)(hH),a=r??i,{startDate:o}=(0,V.useContext)(_H)??{startDate:a.visibleRange.start},s=!Ece(o,e),c=cw(e,a.timeZone),l=(0,V.useRef)(null),{cellProps:u,buttonProps:d,...f}=Dhe({date:e,isOutsideMonth:s},a,l),{hoverProps:p,isHovered:m}=hP({...t,isDisabled:f.isDisabled}),{focusProps:h,isFocusVisible:g}=LP();g&&=f.isFocused;let _=!1,v=!1;`highlightedRange`in a&&a.highlightedRange&&(_=aw(e,a.highlightedRange.start),v=aw(e,a.highlightedRange.end));let y=SM({...t,defaultChildren:f.formattedDate,defaultClassName:`react-aria-CalendarCell`,values:{date:e,isHovered:m,isOutsideMonth:s,isFocusVisible:g,isSelectionStart:_,isSelectionEnd:v,isToday:c,...f}}),b={"data-focused":f.isFocused||void 0,"data-hovered":m||void 0,"data-pressed":f.isPressed||void 0,"data-unavailable":f.isUnavailable||void 0,"data-disabled":f.isDisabled||void 0,"data-focus-visible":g||void 0,"data-outside-visible-range":f.isOutsideVisibleRange||void 0,"data-outside-month":s||void 0,"data-selected":f.isSelected||void 0,"data-selection-start":_||void 0,"data-selection-end":v||void 0,"data-invalid":f.isInvalid||void 0,"data-today":c||void 0},x=wj(t,{global:!0});return V.createElement(`td`,{...u,ref:n},V.createElement(`div`,{...bj(x,d,h,p,b,y),ref:l}))}),CH=(0,V.createContext)(null),wH=(0,V.createContext)(null),TH=(0,V.createContext)({}),EH=(0,V.forwardRef)(function(e,t){[e,t]=wM(e,t,TH);let{isDisabled:n,isInvalid:r,isReadOnly:i,onHoverStart:a,onHoverChange:o,onHoverEnd:s,...c}=e;n??=!!e[`aria-disabled`]&&e[`aria-disabled`]!==`false`,r??=!!e[`aria-invalid`]&&e[`aria-invalid`]!==`false`;let{hoverProps:l,isHovered:u}=hP({onHoverStart:a,onHoverChange:o,onHoverEnd:s,isDisabled:n}),{isFocused:d,isFocusVisible:f,focusProps:p}=LP({within:!0}),m=SM({...e,values:{isHovered:u,isFocusWithin:d,isFocusVisible:f,isDisabled:n,isInvalid:r},defaultClassName:`react-aria-Group`});return V.createElement(`div`,{...bj(c,p,l),...m,ref:t,role:e.role??`group`,slot:e.slot??void 0,"data-focus-within":d||void 0,"data-hovered":u||void 0,"data-focus-visible":f||void 0,"data-disabled":n||void 0,"data-invalid":r||void 0,"data-readonly":i||void 0},m.children)}),DH=(0,V.createContext)({}),p_e=e=>{let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,...i}=e;return i},m_e=xI(function(e,t){[e,t]=wM(e,t,DH);let{hoverProps:n,isHovered:r}=hP({...e,isDisabled:e.disabled}),{isFocused:i,isFocusVisible:a,focusProps:o}=LP({isTextInput:!0,autoFocus:e.autoFocus}),s=!!e[`aria-invalid`]&&e[`aria-invalid`]!==`false`,c=SM({...e,values:{isHovered:r,isFocused:i,isFocusVisible:a,isDisabled:e.disabled||!1,isInvalid:s},defaultClassName:`react-aria-Input`});return V.createElement(`input`,{...bj(p_e(e),o,n),...c,ref:t,"data-focused":i||void 0,"data-disabled":e.disabled||void 0,"data-hovered":r||void 0,"data-focus-visible":a||void 0,"data-invalid":s||void 0})}),OH=(0,V.createContext)({}),kH=(0,V.createContext)(null),AH=(0,V.forwardRef)(function(e,t){let{render:n}=(0,V.useContext)(kH);return V.createElement(V.Fragment,null,n(e,t))});function h_e(e,t){let n=e?.renderDropIndicator,r=e?.isVirtualDragging?.call(e),i=(0,V.useCallback)(e=>{if(r||t?.isDropTarget(e))return n?n(e):V.createElement(AH,{target:e})},[t?.target,r,n]);return e?.useDropIndicator?i:void 0}function g_e(e,t,n){let r=e.focusedKey,i=null;if(t!=null&&t.isVirtualDragging?.call(t)&&n?.target?.type===`item`&&(i=n.target.key,n.target.dropPosition===`after`)){let e=n.collection.getKeyAfter(i),t=null;if(e!=null){let r=n.collection.getItem(i)?.level??0;for(;e;){let i=n.collection.getItem(e);if(!i)break;if(i.type!==`item`){e=n.collection.getKeyAfter(e);continue}if((i.level??0)<=r)break;t=e,e=n.collection.getKeyAfter(e)}}i=e??t??i}return(0,V.useMemo)(()=>new Set([r,i].filter(e=>e!=null)),[r,i])}var __e=(0,V.createContext)(null);function v_e(e){let t=(0,V.useRef)({});return V.createElement(__e.Provider,{value:t},e.children)}var y_e=(0,V.createContext)({isSelected:!1}),jH=(0,V.createContext)(null);TI(mI,function(e,t,n){let r=(0,V.useContext)(jH),{isLoading:i,onLoadMore:a,scrollOffset:o,...s}=e,c=(0,V.useRef)(null);uM((0,V.useMemo)(()=>
16({onLoadMore:a,collection:r?.collection,sentinelRef:c,scrollOffset:o}),[a,o,r?.collection]),c);let l=SM({...s,id:void 0,children:n.rendered,defaultClassName:`react-aria-ListBoxLoadingIndicator`,values:null});return V.createElement(V.Fragment,null,V.createElement(`div`,{style:{position:`relative`,width:0,height:0},inert:dM(!0)},V.createElement(`div`,{"data-testid":`loadMoreSentinel`,ref:c,style:{position:`absolute`,height:1,width:1}})),i&&l.children&&V.createElement(`div`,{...bj(wj(e,{global:!0}),{tabIndex:-1}),...l,role:`option`,ref:t},l.children))});var b_e=(0,V.createContext)({placement:`bottom`}),MH=(0,V.createContext)(null),NH=(0,V.createContext)(null),PH=(0,V.forwardRef)(function(e,t){[e,t]=wM(e,t,MH);let n=(0,V.useContext)(IH),r=mV(e),i=e.isOpen!=null||e.defaultOpen!=null||!n?r:n,a=spe(t,i.isOpen)||e.isExiting||!1,o=ohe(),{direction:s}=XM();if(o){let t=e.children;return typeof t==`function`&&(t=t({trigger:e.trigger||null,placement:`bottom`,isEntering:!1,isExiting:!1,defaultChildren:null})),V.createElement(V.Fragment,null,t)}return i&&!i.isOpen&&!a?null:V.createElement(x_e,{...e,triggerRef:e.triggerRef,state:i,popoverRef:t,isExiting:a,dir:s})});function x_e({state:e,isExiting:t,UNSTABLE_portalContainer:n,clearContexts:r,...i}){let a=(0,V.useRef)(null),o=(0,V.useRef)(null),s=(0,V.useContext)(NH),c=s&&i.trigger===`SubmenuTrigger`,{popoverProps:l,underlayProps:u,arrowProps:d,placement:f,triggerAnchorPoint:p}=Nme({...i,offset:i.offset??8,arrowRef:a,groupRef:c?s:o},e),m=i.popoverRef,h=ope(m,!!f)||i.isEntering||!1,g=SM({...i,defaultClassName:`react-aria-Popover`,values:{trigger:i.trigger||null,placement:f,isEntering:h,isExiting:t}}),_=!i.isNonModal||i.trigger===`SubmenuTrigger`,[v,y]=(0,V.useState)(!1);rj(()=>{m.current&&y(_&&!m.current.querySelector(`[role=dialog]`))},[m,_]),(0,V.useEffect)(()=>{v&&i.trigger!==`SubmenuTrigger`&&m.current&&!m.current.contains(document.activeElement)&&oP(m.current)},[v,m,i.trigger]);let b=(0,V.useMemo)(()=>{let e=g.children;if(r)for(let t of r)e=V.createElement(t.Provider,{value:null},e);return e},[g.children,r]),x={...l.style,"--trigger-anchor-point":p?`${p.x}px ${p.y}px`:void 0,...g.style},S=V.createElement(`div`,{...bj(wj(i,{global:!0}),l),...g,role:v?`dialog`:void 0,tabIndex:v?-1:void 0,"aria-label":i[`aria-label`],"aria-labelledby":i[`aria-labelledby`],ref:m,slot:i.slot||void 0,style:x,dir:i.dir,"data-trigger":i.trigger,"data-placement":f,"data-entering":h||void 0,"data-exiting":t||void 0},!i.isNonModal&&V.createElement(LF,{onDismiss:e.close}),V.createElement(b_e.Provider,{value:{...d,placement:f,ref:a}},b),V.createElement(LF,{onDismiss:e.close}));return c?V.createElement(HF,{...i,shouldContainFocus:v,isExiting:t,portalContainer:n??s?.current??void 0},S):V.createElement(HF,{...i,shouldContainFocus:v,isExiting:t,portalContainer:n},!i.isNonModal&&e.isOpen&&V.createElement(`div`,{"data-testid":`underlay`,...u,style:{position:`fixed`,inset:0}}),V.createElement(`div`,{ref:o,style:{display:`contents`}},V.createElement(NH.Provider,{value:o},S)))}var S_e=(0,V.createContext)(null),C_e=class extends fI{filter(e,t,n){let r=e.getItem(this.firstChildKey);if(r&&n(r.textValue,this)){let n=this.clone();return t.addDescendants(n,e),n}return null}};C_e.type=`submenutrigger`;var FH=(0,V.createContext)(null),IH=(0,V.createContext)(null);function LH(e){let t=c_e(e),n=(0,V.useRef)(null),{triggerProps:r,overlayProps:i}=kme({type:`dialog`},t,n),[a,o]=(0,V.useState)(null);return Jj({ref:n,onResize:(0,V.useCallback)(()=>{n.current&&o(n.current.offsetWidth+`px`)},[n])}),r.id=uj(),i[`aria-labelledby`]=r.id,V.createElement(xM,{values:[[IH,t],[S_e,t],[FH,i],[MH,{trigger:`DialogTrigger`,triggerRef:n,"aria-labelledby":i[`aria-labelledby`],style:{"--trigger-width":a}}]]},V.createElement(ume,{...r,ref:n,isPressed:t.isOpen},e.children))}var RH=(0,V.forwardRef)(function(e,t){let n=e[`aria-labelledby`];[e,t]=wM(e,t,FH);let{dialogProps:r,titleProps:i}=Uhe({...e,"aria-labelledby":n},t),a=(0,V.useContext)(IH);!r[`aria-label`]&&!r[`aria-labelledby`]&&e[`aria-labelledby`]&&(r[`aria-labelledby`]=e[`aria-labelledby`]);let o=SM({defaultClassName:`react-aria-Dialog`,className:e.className,style:e.style,children:e.children,values:{close:a?.close||(()=>{})}}),s=wj(e,{global:!0});return V.createElement(`section`,{...bj(s,o,r),ref:t,slot:e.slot||void 0},V.createElement(xM,{values:[[tj,{slots:{[bM]:{},title:{...i,level:2}}}],[YB,{slots:{[bM]:{},close:{onPress:()=>a?.close()}}}]]},o.children))}),w_e=[`day`,`month`,`year`],T_e={hour:1,minute:2,second:3};function E_e(e,t){let{autoComplete:n,isDisabled:r,name:i}=e,{visuallyHiddenProps:a}=FF({style:{position:`fixed`,top:0,left:0}}),o=60;t.granularity===`second`?o=1:t.granularity===`hour`&&(o=3600);let s=t.value==null?``:t.value.toString(),c=t.granularity===`day`?`date`:`datetime-local`,l=[`hour`,`minute`,`second`],u=0;return l.includes(t.granularity)&&(u=T_e[t.granularity],l=l.slice(0,u)),{containerProps:{...a,"aria-hidden":!0,"data-react-aria-prevent-focus":!0,"data-a11y-ignore":`aria-hidden-focus`},inputProps:{tabIndex:-1,autoComplete:n,disabled:r,type:c,form:``,name:i,step:o,value:s,onChange:e=>{let n=e.target.value.toString();if(n)try{let e=qce(n);if(t.granularity===`day`&&(e=aT(n)),`setSegment`in t)for(let n in e)w_e.includes(n)&&t.setSegment(n,e[n]),l.includes(n)&&t.setSegment(n,e[n]);t.setValue(e)}catch{}}}}}function D_e(e){let{state:t}
vendor: 2,355 bytes, line 16
16=e,{containerProps:n,inputProps:r}=E_e({...e},t);return V.createElement(`div`,{...n,"data-testid":`hidden-dateinput-container`},V.createElement(`input`,r))}var zH=(0,V.createContext)(null),O_e=(0,V.createContext)(null),BH=(0,V.createContext)(null),VH=(0,V.createContext)(null),HH=(0,V.forwardRef)(function(e,t){[e,t]=wM(e,t,O_e);let{validationBehavior:n}=CM(wH)||{},r=e.validationBehavior??n??`native`,{locale:i}=XM(),a=i_e({...e,locale:i,validationBehavior:r}),o=(0,V.useRef)(null),[s,c]=TM(!e[`aria-label`]&&!e[`aria-labelledby`]),l=(0,V.useRef)(null),{labelProps:u,fieldProps:d,inputProps:f,descriptionProps:p,errorMessageProps:m,...h}=Nhe({...EM(e),label:c,inputRef:l,validationBehavior:r},a,o),g=SM({...e,values:{state:a,isInvalid:a.isInvalid,isDisabled:a.isDisabled,isReadOnly:a.isReadOnly},defaultClassName:`react-aria-TimeField`}),_=wj(e,{global:!0});return delete _.id,V.createElement(xM,{values:[[VH,a],[TH,{...d,ref:o,isInvalid:a.isInvalid,isDisabled:a.isDisabled}],[DH,{...f,ref:l}],[qB,{...u,ref:s,elementType:`span`}],[ZB,{slots:{description:p,errorMessage:m}}],[CH,h]]},V.createElement(`div`,{..._,...g,ref:t,slot:e.slot||void 0,"data-invalid":a.isInvalid||void 0,"data-disabled":a.isDisabled||void 0,"data-readonly":a.isReadOnly||void 0}))}),UH=(0,V.forwardRef)(function(e,t){let n=(0,V.useContext)(BH),r=(0,V.useContext)(VH);return n||r?V.createElement(WH,{...e,ref:t}):V.createElement(k_e,{...e,ref:t})}),k_e=(0,V.forwardRef)((e,t)=>{let[n,r]=wM({slot:e.slot},t,zH),{locale:i}=XM(),a=sH({...n,locale:i,createCalendar:sE}),o=(0,V.useRef)(null),{fieldProps:s,inputProps:c}=RR({...n,inputRef:o},a,r);return V.createElement(xM,{values:[[BH,a],[DH,{...c,ref:o}],[TH,{...s,ref:r,isInvalid:a.isInvalid,isDisabled:a.isDisabled}]]},V.createElement(WH,e))}),WH=(0,V.forwardRef)((e,t)=>{let{className:n,children:r}=e,i=(0,V.useContext)(BH),a=(0,V.useContext)(VH),o=i??a;return V.createElement(V.Fragment,null,V.createElement(EH,{...e,ref:t,slot:e.slot||void 0,className:n??`react-aria-DateInput`,isReadOnly:o.isReadOnly,isInvalid:o.isInvalid,isDisabled:o.isDisabled},o.segments.map((e,t)=>(0,V.cloneElement)(r(e),{key:t}))),V.createElement(m_e,{className:``}))}),GH=(0,V.forwardRef)(function({segment:e,...t},n){let r=(0,V.useContext)(BH),i=(0,V.useContext)(VH),a=r??i,o=Wj(n),{segmentProps:s}=zhe(e,a,o),{focusProps:c,isFocused:l,isFocusVisible:u}
16=LP(),{hoverProps:d,isHovered:f}=hP({...t,isDisabled:a.isDisabled||e.type===`literal`}),p=SM({...t,values:{...e,isReadOnly:a.isReadOnly,isInvalid:a.isInvalid,isDisabled:a.isDisabled,isHovered:f,isFocused:l,isFocusVisible:u},defaultChildren:e.text,defaultClassName:`react-aria-DateSegment`});return V.createElement(`span`,{...bj(wj(t,{global:!0}),s,c,d),...p,style:s.style,ref:o,"data-placeholder":e.isPlaceholder||void 0,"data-invalid":a.isInvalid||void 0,"data-readonly":a.isReadOnly||void 0,"data-disabled":a.isDisabled||void 0,"data-type":e.type,"data-hovered":f||void 0,"data-focused":l||void 0,"data-focus-visible":u||void 0})}),A_e=(0,V.createContext)(null),j_e=(0,V.createContext)(null),M_e=(0,V.createContext)(null),N_e=(0,V.createContext)(null),KH=[TH,YB,qB,ZB],P_e=(0,V.forwardRef)(function(e,t){[e,t]=wM(e,t,A_e);let{validationBehavior:n}=CM(wH)||{},r=e.validationBehavior??n??`native`,i=Zge({...e,validationBehavior:r}),a=(0,V.useRef)(null),[o,s]=TM(!e[`aria-label`]&&!e[`aria-labelledby`]),{groupProps:c,labelProps:l,fieldProps:u,buttonProps:d,dialogProps:f,calendarProps:p,descriptionProps:m,errorMessageProps:h,...g}=Fhe({...EM(e),label:s,validationBehavior:r},i,a),[_,v]=(0,V.useState)(null);Jj({ref:a,onResize:(0,V.useCallback)(()=>{a.current&&v(a.current.offsetWidth+`px`)},[])});let{focusProps:y,isFocused:b,isFocusVisible:x}=LP({within:!0}),S=SM({...e,values:{state:i,isFocusWithin:b,isFocusVisible:x,isDisabled:e.isDisabled||!1,isInvalid:i.isInvalid,isOpen:i.isOpen,isReadOnly:e.isReadOnly||!1},defaultClassName:`react-aria-DatePicker`}),C=wj(e,{global:!0});return delete C.id,V.createElement(xM,{values:[[M_e,i],[TH,{...c,ref:a,isInvalid:i.isInvalid}],[zH,u],[YB,{...d,isPressed:i.isOpen}],[qB,{...l,ref:o,elementType:`span`}],[fH,p],[IH,i],[MH,{trigger:`DatePicker`,triggerRef:a,placement:`bottom start`,style:{"--trigger-width":_},clearContexts:KH}],[FH,f],[ZB,{slots:{description:m,errorMessage:h}}],[CH,g]]},V.createElement(`div`,{...bj(C,S,y),ref:t,slot:e.slot||void 0,"data-focus-within":b||void 0,"data-invalid":i.isInvalid||void 0,"data-focus-visible":x||void 0,"data-disabled":e.isDisabled||void 0,"data-readonly":e.isReadOnly||void 0,"data-open":i.isOpen||void 0}),V.createElement(D_e,{autoComplete:e.autoComplete,name:e.name,isDisabled:e.isDisabled,state:i}))}),qH=(0,V.forwardRef)(function(e,t){[e,t]=wM(e,t,j_e);let{validationBehavior:n}=CM(wH)||{},r=e.validationBehavior??n??`native`,i=r_e({...e,validationBehavior:r}),a=(0,V.useRef)(null),[o,s]=TM(!e[`aria-label`]&&!e[`aria-labelledby`]),{groupProps:c,labelProps:l,startFieldProps:u,endFieldProps:d,buttonProps:f,dialogProps:p,calendarProps:m,descriptionProps:h,errorMessageProps:g,..._}=Hhe({...EM(e),label:s,validationBehavior:r},i,a),[v,y]=(0,V.useState)(null);Jj({ref:a,onResize:(0,V.useCallback)(()=>{a.current&&y(a.current.offsetWidth+`px`)},[])});let{focusProps:b,isFocused:x,isFocusVisible:S}=LP({within:!0}),C=SM({...e,values:{state:i,isFocusWithin:x,isFocusVisible:S,isDisabled:e.isDisabled||!1,isInvalid:i.isInvalid,isOpen:i.isOpen,isReadOnly:e.isReadOnly||!1},defaultClassName:`react-aria-DateRangePicker`}),w=wj(e,{global:!0});return delete w.id,V.createElement(xM,{values:[[N_e,i],[TH,{...c,ref:a,isInvalid:i.isInvalid}],[YB,{...f,isPressed:i.isOpen}],[qB,{...l,ref:o,elementType:`span`}],[pH,m],[IH,i],[MH,{trigger:`DateRangePicker`,triggerRef:a,placement:`bottom start`,style:{"--trigger-width":v},clearContexts:KH}],[FH,p],[zH,{slots:{start:u,end:d}}],[ZB,{slots:{description:h,errorMessage:g}}],[CH,_]]},V.createElement(`div`,{...bj(w,C,b),ref:t,slot:e.slot||void 0,"data-focus-within":x||void 0,"data-invalid":i.isInvalid||void 0,"data-focus-visible":S||void 0,"data-disabled":e.isDisabled||void 0,"data-readonly":e.isReadOnly||void 0,"data-open":i.isOpen||void 0}))}),F_e=(0,V.createContext)(null),I_e=(0,V.forwardRef)(function(e,t){return[e,t]=wM(e,t,F_e),V.createElement(lhe,{content:V.createElement(_he,e)},n=>V.createElement(L_e,{props:e,collection:n,gridListRef:t}))});function L_e({props:e,collection:t,gridListRef:n}){[e,n]=wM(e,n,nj);let{shouldUseVirtualFocus:r,filter:i,disallowTypeAhead:a,...o}=e,{dragAndDropHooks:s,keyboardNavigationBehavior:c=`arrow`,layout:l=`stack`}=e,{CollectionRoot:u,isVirtualized:d,layoutDelegate:f,dropTargetDelegate:p}=(0,V.useContext)(kI),m=Kge(Gge({...o,collection:t,children:void 0,layoutDelegate:f}),i),h=yN({usage:`search`,sensitivity:`base`}),{disabledBehavior:g,disabledKeys:_}=m.selectionManager,{direction:v}=XM(),y=(0,V.useMemo)(()=>new ZF({collection:m.collection,collator:h,ref:n,disabledKeys:_,disabledBehavior:g,layoutDelegate:f,layout:l,direction:v}),[m.collection,n,l,_,g,f,h,v]),{gridProps:b}=Pge({...o,keyboardDelegate:y,keyboardNavigationBehavior:l===`grid`?`tab`:c,isVirtualized:d,shouldSelectOnPressUp:e.shouldSelectOnPressUp},m,n),x=m.selectionManager,S=!!s?.useDraggableCollectionState,C=!!s?.useDroppableCollectionState;(0,V.useRef)(S),(0,V.useRef)(C),(0,V.useEffect)(()=>{},[S,C]);let w,T,E,D=!1,O=null,k=(0,V.useRef)(null);if(S&&s){w=s.useDraggableCollectionState({collection:m.collection,selectionManager:x,preview:s.renderDragPreview?k:void 0}),s.useDraggableCollection({},w,n);let e=s.DragPreview;O=s.renderDragPreview?V.createElement(e,{ref:k},s.renderDragPreview):null}if(C&&s){T=s.useDroppableCollectionState({collection:m.collection,selectionManager:x});let e=new ZF({collection:m.collection,disabledKeys:x.disabledKeys,disabledBehavior:x.disabledBehavior,ref:n}),r=s.dropTargetDelegate||p||new s.ListDropTargetDelegate(t,n,{layout:l,direction:v});E=s.useDroppableCollection({keyboardDelegate:e,dropTargetDelegate:r},T,n),D=T.isDropTarget({type:`root`})}let{focusProps:A,isFocused:j,isFocusVisible:M}=LP(),ee=m.collection.size===0,te={isDropTarget:D,isEmpty:ee,isFocused:j,isFocusVisible:M,layout:l,state:m},ne=SM({className:e.className,style:e.style,defaultClassName:`react-aria-GridList`,values:te}),re=null;if(ee&&e.renderEmptyState){let t=e.renderEmptyState(te);re=V.createElement(`div`,{role:`row`,"aria-rowindex":1,style:{display:`contents`}},V.createElement(`div`,{role:`gridcell`,style:{display:`contents`}},t))}let ie=wj(e,{global:!0});return V.createElement(bP,null,V.createElement(`div`,{...bj(ie,ne,b,A,E?.collectionProps,null),ref:n,slot:e.slot||void 0,onScroll:e.onScroll,"data-drop-target":D||void 0,"data-empty":ee||void 0,"data-focused":j||void 0,"data-focus-visible":M||void 0,"data-layout":l},V.createElement(xM,{values:[[jH,m],[OH,{dragAndDropHooks:s,dragState:w,dropState:T}],[kH,{render:z_e}]]},C&&V.createElement(H_e,null),V.createElement(v_e,null,V.createElement(u,{collection:m.collection,scrollRef:n,persistedKeys:g_e(x,s,T),renderDropIndicator:h_e(s,T)}))),re,O))}var R_e=TI(hI,function(e,t,n){let r=(0,V.useContext)(jH),{dragAndDropHooks:i,dragState:a,dropState:o}=(0,V.useContext)(OH),s=Wj(t),{isVirtualized:c}=(0,V.useContext)(kI),{rowProps:l,gridCellProps:u,descriptionProps:d,...f}=Fge({node:n,shouldSelectOnPressUp:!!a,isVirtualized:c},r,s),{hoverProps:p,isHovered:m}=hP({isDisabled:!f.allowsSelection&&!f.hasAction,onHoverStart:n.props.onHoverStart,onHoverChange:n.props.onHoverChange,onHoverEnd:n.props.onHoverEnd}),{isFocusVisible:h,focusProps:g}=LP(),{checkboxProps:_}=Ige({key:n.key},r),v=r.selectionManager.disabledBehavior===`all`&&f.isDisabled?{isDisabled:!0}:{},y=null;a&&i&&(y=i.useDraggableItem({key:n.key,hasDragButton:!0},a));let b=null,x=(0,V.useRef)(null),{visuallyHiddenProps:S}=FF();o&&i&&(b=i.useDropIndicator({target:{type:`item`,key:n.key,dropPosition:`on`}},o,x));let C=a&&a.isDragging(n.key),w=SM({...e,id:void 0,children:n.rendered,defaultClassName:`react-aria-GridListItem`,values:{...f,isHovered:m,isFocusVisible:h,selectionMode:r.selectionManager.selectionMode,selectionBehavior:r.selectionManager.selectionBehavior,allowsDragging:!!a,isDragging:C,isDropTarget:b?.isDropTarget}}),T=(0,V.useRef)(null);(0,V.useEffect)(()=>
16{a&&!T.current&&console.warn(`Draggable items in a GridList must contain a <Button slot="drag"> element so that keyboard and screen reader users can drag them.`)},[]),(0,V.useEffect)(()=>{n.textValue},[n.textValue]);let E=wj(e,{global:!0});return delete E.id,delete E.onClick,V.createElement(V.Fragment,null,b&&!b.isHidden&&V.createElement(`div`,{role:`row`,style:{position:`absolute`}},V.createElement(`div`,{role:`gridcell`},V.createElement(`div`,{role:`button`,...S,...b?.dropIndicatorProps,ref:x}))),V.createElement(`div`,{...bj(E,w,l,g,p,y?.dragProps),ref:s,"data-selected":f.isSelected||void 0,"data-disabled":f.isDisabled||void 0,"data-hovered":m||void 0,"data-focused":f.isFocused||void 0,"data-focus-visible":h||void 0,"data-pressed":f.isPressed||void 0,"data-allows-dragging":!!a||void 0,"data-dragging":C||void 0,"data-drop-target":b?.isDropTarget||void 0,"data-selection-mode":r.selectionManager.selectionMode===`none`?void 0:r.selectionManager.selectionMode},V.createElement(`div`,{...u,style:{display:`contents`}},V.createElement(xM,{values:[[vfe,{slots:{[bM]:{},selection:_}}],[YB,{slots:{[bM]:v,drag:{...y?.dragButtonProps,ref:T,style:{pointerEvents:`none`}}}}],[ZB,{slots:{[bM]:{},description:d}}],[kI,DI],[jH,null],[nj,null],[yfe,null],[y_e,{isSelected:f.isSelected}]]},w.children))))});function z_e(e,t){t=Wj(t);let{dragAndDropHooks:n,dropState:r}=(0,V.useContext)(OH),i=(0,V.useRef)(null),{dropIndicatorProps:a,isHidden:o,isDropTarget:s}=n.useDropIndicator(e,r,i);return o?null:V.createElement(V_e,{...e,dropIndicatorProps:a,isDropTarget:s,buttonRef:i,ref:t})}function B_e(e,t){let{dropIndicatorProps:n,isDropTarget:r,buttonRef:i,...a}=e,{visuallyHiddenProps:o}=FF(),s=SM({...a,defaultClassName:`react-aria-DropIndicator`,values:{isDropTarget:r}});return V.createElement(`div`,{...s,role:`row`,ref:t,"data-drop-target":r||void 0},V.createElement(`div`,{role:`gridcell`},V.createElement(`div`,{...o,role:`button`,...n,ref:i}),s.children))}var V_e=(0,V.forwardRef)(B_e);function H_e(){let{dragAndDropHooks:e,dropState:t}=(0,V.useContext)(OH),n=(0,V.useRef)(null),{dropIndicatorProps:r}=e.useDropIndicator({target:{type:`root`}},t,n),i=t.isDropTarget({type:`root`}),{visuallyHiddenProps:a}=FF();return!i&&r[`aria-hidden`]?null:V.createElement(`div`,{role:`row`,"aria-hidden":r[`aria-hidden`],style:{position:`absolute`}},V.createElement(`div`,{role:`gridcell`},V.createElement(`div`,{role:`button`,...a,...r,ref:n})))}TI(mI,function(e,t,n){let r=(0,V.useContext)(jH),{isVirtualized:i}=(0,V.useContext)(kI),{isLoading:a,onLoadMore:o,scrollOffset:s,...c}=e,l=(0,V.useRef)(null);uM((0,V.useMemo)(()=>({onLoadMore:o,collection:r?.collection,sentinelRef:l,scrollOffset:s}),[o,s,r?.collection]),l);let u=SM({...c,id:void 0,children:n.rendered,defaultClassName:`react-aria-GridListLoadingIndicator`,values:null});return V.createElement(V.Fragment,null,V.createElement(`div`,{style:{position:`relative`,width:0,height:0},inert:dM(!0)},V.createElement(`div`,{"data-testid":`loadMoreSentinel`,ref:l,style:{position:`absolute`,height:1,width:1}})),a&&u.children&&V.createElement(`div`,{...u,...wj(e,{global:!0}),role:`row`,ref:t},V.createElement(`div`,{"aria-colindex":i?1:void 0,role:`gridcell`},u.children)))});var JH=(0,V.forwardRef)(function(e,t){[e,t]=wM(e,t,tj);let{children:n,level:r=3,className:i,...a}=e,o=`h${r}`;return V.createElement(o,{...a,ref:t,className:i??`react-aria-Heading`},n)}),U_e=(0,V.createContext)(null),W_e=(0,V.forwardRef)(function(e,t){let{inputRef:n=null,...r}=e;[e,t]=wM(r,t,U_e);let i=Wj(xj(n,e.inputRef===void 0?null:e.inputRef)),a=khe(e),{labelProps:o,inputProps:s,isSelected:c,isDisabled:l,isReadOnly:u,isPressed:d}=Rge({...EM(e),children:typeof e.children==`function`||e.children},a,i),{isFocused:f,isFocusVisible:p,focusProps:m}=LP(),h=e.isDisabled||e.isReadOnly,{hoverProps:g,isHovered:_}=hP({...e,isDisabled:h}),v=SM({...e,defaultClassName:`react-aria-Switch`,values:{isSelected:c,isPressed:d,isHovered:_,isFocused:f,isFocusVisible:p,isDisabled:l,isReadOnly:u,state:a}}),y=wj(e,{global:!0});return delete y.id,delete y.onClick,V.createElement(`label`,{...bj(y,o,g,v),ref:t,slot:e.slot||void 0,"data-selected":c||void 0,"data-pressed":d||void 0,"data-hovered":_||void 0,"data-focused":f||void 0,"data-focus-visible":p||void 0,"data-disabled":l||void 0,"data-readonly":u||void 0},V.createElement(IF,{elementType:`span`},V.createElement(`input`,{...bj(s,m),ref:i})),v.children)});function G_e(e){return{dragAndDropHooks:(0,V.useMemo)(()=>{let{onDrop:t,onInsert:n,onItemDrop:r,onReorder:i,onMove:a,onRootDrop:o,getItems:s,renderDragPreview:c,renderDropIndicator:l,dropTargetDelegate:u}=e,d=!!s,f=!!(t||n||r||i||a||o),p={};return d&&(p.useDraggableCollectionState=function(t){return a_e({...t,...e})},p.useDraggableCollection=wge,p.useDraggableItem=Cge,p.DragPreview=Tge,p.renderDragPreview=c,p.isVirtualDragging=ige),f&&(p.useDroppableCollectionState=function(t){return o_e({...t,...e})},p.useDroppableItem=oB,p.useDroppableCollection=function(t,n,r){return vge({...t,...e},n,r)},p.useDropIndicator=bge,p.renderDropIndicator=l,p.dropTargetDelegate=u,p.ListDropTargetDelegate=Ege),p},[e])}}var X=(0,V.forwardRef)((e,t)=>{let n=(0,H.default)(`appearance-none outline-none`,`leading-none`,`p-3`,`hover:border-gray-500`,`focus:ring-gray-500 focus:ring-2 focus:ring-offset-2 focus:border-gray-500`,`border border-gray-300 placeholder-gray-400 rounded-md shadow-sm`,`disabled:cursor-not-allowed disabled:opacity-50`,e.className);return(0,U.jsx)(`input`,{...e,"aria-label":e.name,ref:t,className:n})}),YH=({search:e,onChange:t,placeholder:n=`Search...`,className:r=`w-[300px] h-[36px]`,autoFocus:i=!1,...a})=>(0,U.jsxs)(`div`,{...a,className:`flex relative ${r}`,children:[(0,U.jsx)(VE,{className:`absolute top-[10px] left-[10px]`,color:`#595E63`,variant:`sm`}
16),(0,U.jsx)(X,{placeholder:n,type:`text`,value:e,onChange:t,autoFocus:i,className:`pl-9 w-full`})]}),XH=({className:e,autoResize:t=!1,...n})=>{let r=(0,V.useRef)(null);return(0,V.useEffect)(()=>{let e=r.current;if(!e||!t)return;let n=()=>{e.style.height=`auto`,e.style.height=`${e.scrollHeight+20}px`};n();let i=new ResizeObserver(n);return i.observe(e),()=>i.disconnect()},[t,n.value]),(0,U.jsx)(`textarea`,{className:(0,H.default)(G.type.textarea,e,t&&`resize-none overflow-hidden`),...n,ref:r})},ZH=({className:e,label:t,labelClassName:n,variant:r=`default`,variantSize:i=`base`,...a})=>{if(r===`simple`){let{checked:r,...o}=a;return(0,U.jsxs)(`label`,{className:`flex items-center w-fit`,children:[(0,U.jsx)(`input`,{type:`checkbox`,className:(0,H.default)(`sr-only`,i===`sm`&&`px-1 py-1`),checked:r,...o}),(0,U.jsx)(`span`,{className:(0,H.default)(`w-5 h-5 flex items-center justify-center rounded text-black`,e),children:r?(0,U.jsx)(HE,{variant:`sm`,color:`#171717`}):null}),(0,U.jsx)(`span`,{className:(0,H.default)(`ml-1`,n),children:t})]})}return(0,U.jsxs)(`label`,{className:`flex w-fit`,children:[(0,U.jsx)(X,{type:`checkbox`,className:(0,H.default)(`rounded-lg`,i===`base`&&`h-6`,i===`sm`&&`h-4 px-2 py-2 my-0.5`,e),...a}),(0,U.jsx)(`span`,{className:(0,H.default)(`ml-1`,n),children:t})]})},QH=[`max-w-fit`,`data-[disabled]:disabled:opacity-50`,`data-[disabled]:opacity-50`,`data-[disabled]:cursor-not-allowed`],$H=(0,H.default)(`appearance-none outline-none`,`p-3`,`pr-10`,`w-full`,`leading-none`,`border border-gray-300 placeholder-gray-400 rounded-md shadow-sm`,`data-[hovered]:border-gray-500`,`data-[focus-within]:border-gray-500`,`data-[focus-within]:ring-1`,`data-[focus-within]:ring-gray-500`,`data-[disabled]:opacity-50`),eU=(0,H.default)(`appearance-none outline-none`,`px-3 py-2`,`pr-10`,`w-full`,`leading-none`,`border border-gray-300 rounded-md shadow-sm`,`data-[hovered]:border-gray-500`,`data-[focus-within]:border-gray-500`,`data-[focus-within]:ring-1`,`data-[focus-within]:ring-gray-500`,`data-[disabled]:bg-black-50`,`data-[disabled]:border-black-100`,`data-[disabled]:text-black`),tU=(0,H.default)(`appearance-none outline-none`,`bg-transparent`,`p-0`,`m-0`,`border-none`,`min-w-0`),nU=(0,H.default)(`w-full text-left`,`px-3 py-2`,`rounded`,`hover:bg-gray-50`,`outline-none`,`focus:ring-2`,`focus:ring-gray-500`),rU=(0,H.default)(`outline-none`,`focus:bg-gray-200`,`rounded`),iU=(0,H.default)(`absolute`,`right-3`,`top-1/2`,`-translate-y-1/2`,`outline-none`,`data-[disabled]:cursor-not-allowed`,`hover:border-gray-500`),aU=(0,H.default)(`w-8`,`h-8`,`flex`,`items-center`,`justify-center`,`rounded`,`hover:bg-gray-50`,`outline-none`,`focus:ring-2`,`focus:ring-gray-500`,`data-[disabled]:opacity-50`,`data-[disabled]:bg-white`,`data-[disabled]:cursor-not-allowed`),K_e=(0,H.default)(`w-8`,`leading-8`,`text-sm`,`text-center`,`rounded-md`,`m-2`,`hover:bg-gray-50`,`data-[selected]:font-semibold`,`data-[selected]:bg-off-white`,`data-[today]:bg-gray-200`,`data-[outside-month]:hidden`,`data-[disabled]:opacity-50`,`data-[disabled]:bg-white`,`data-[disabled]:cursor-not-allowed`),oU=(0,H.default)(`w-11`,`h-11`,`flex`,`items-center`,`justify-center`,`text-sm`,`text-center`,`rounded-none`,`m-0`,`font-normal`,`hover:bg-gray-50`,`data-[selected]:bg-gray-100`,`data-[selection-start]:bg-[#171717]`,`data-[selection-end]:bg-[#171717]`,`data-[selection-start]:text-white`,`data-[selection-end]:text-white`,`data-[selection-start]:rounded-l-md`,`data-[selection-end]:rounded-r-md`,`data-[outside-month]:hidden`,`data-[disabled]:opacity-50`,`data-[disabled]:bg-white`,`data-[disabled]:cursor-not-allowed`);function sU(e){let t=(0,H.default)(...QH,e.className);return(0,U.jsxs)(P_e,{...e,className:t,"aria-label":e[`aria-label`]?e[`aria-label`]:`Date`,children:[(0,U.jsxs)(EH,{className:`flex w-full relative`,children:[(0,U.jsx)(UH,{className:$H,children:e=>(0,U.jsx)(GH,{segment:e,className:rU})}),(0,U.jsx)(XB,{className:iU,children:(0,U.jsx)(ED,{variant:`sm`})})]}),(0,U.jsx)(PH,{className:`bg-white border border-black-100 rounded-lg shadow`,children:(0,U.jsx)(RH,{className:`p-4`,children:(0,U.jsxs)(l_e,{children:[(0,U.jsxs)(`header`,{className:`flex items-center justify-between mb-4`,children:[(0,U.jsx)(XB,{slot:`previous`,className:aU,children:(0,U.jsx)(FE,{variant:`sm`})}),(0,U.jsx)(JH,{className:`text-sm font-semibold text-gray-900`}),(0,U.jsx)(XB,{slot:`next`,className:aU,children:(0,U.jsx)(PE,{variant:`sm`})})]}),(0,U.jsxs)(vH,{className:`border-spacing-1`,children:[(0,U.jsx)(yH,{children:e=>(0,U.jsx)(bH,{children:e})}),(0,U.jsx)(xH,{children:e=>(0,U.jsx)(SH,{date:e,className:K_e})})]})]})})})]})}function cU(e){let t=e.useUTC?`UTC`:gw(),n=(0,H.default)(...QH,`block w-full max-w-none`,e.className),r=e.disableFuture?dw(t):void 0,i=e.disableFuture&&e.maxRangeDays&&e.maxRangeDays>0?r.subtract({days:Math.max(0,e.maxRangeDays-1)}):void 0,a=dw(t),o=Math.max(1,Math.min(7,e.maxRangeDays??7)),s={start:a.subtract({days:o-1}),end:a},c=Object.prototype.hasOwnProperty.call(e,`value`),[l,u]=(0,V.useState)(()=>e.defaultValue??s),d=c?e.value:l,f=!!d?.start&&!!d?.end&&d.end.compare(a)===0,p=f?(()=>{let e=d.start.toDate(`UTC`).getTime(),t=d.end.toDate(`UTC`).getTime();return`Last ${Math.floor(Math.abs(t-e)/864e5)+1} days`})():``,m=t=>{let n=t;if(e.maxRangeDays&&t?.start&&t?.end){let r=t.start.compare(t.end)<=0,i=Math.abs(t.end.toDate(`UTC`).getTime()-t.start.toDate(`UTC`).getTime());if(Math.floor(i/864e5)+1>e.maxRangeDays){let i=e.maxRangeDays-1;n=r?{start:t.start,end:t.start.add({days:i})}:{start:t.end.subtract({days:i}),end:t.end}}}e.onChange?.(n),c||u(n)},h=(0,V.useMemo)(()=>t=>{if(e.disableFuture&&r&&t.compare(r)>0||i&&t.compare(i)<0)return!0;
16if(e.maxRangeDays&&d?.start&&!d?.end){let n=d.start,r=d.start.add({days:e.maxRangeDays-1});if(t.compare(n)<0||t.compare(r)>0)return!0}return!1},[e.disableFuture,r,i,e.maxRangeDays,d]);return(0,U.jsxs)(qH,{...e,value:d,onChange:m,maxValue:r,minValue:i,isDateUnavailable:h,className:n,"aria-label":`Date range`,children:[(0,U.jsxs)(EH,{className:(0,H.default)(`flex w-full relative items-center gap-2`,eU,e.dense?`py-2 pl-2`:null),children:[f?(0,U.jsx)(XB,{className:(0,H.default)(tU,`flex-1 flex items-center text-sm pl-2 pr-2 truncate cursor-pointer`),children:p}):(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(UH,{slot:`start`,className:(0,H.default)(tU,`pr-2 text-sm`),children:e=>(0,U.jsx)(GH,{segment:e,className:rU})}),(0,U.jsx)(`span`,{"aria-hidden":`true`,className:`text-gray-700`,children:`â`}),(0,U.jsx)(UH,{slot:`end`,className:(0,H.default)(tU,`flex-1 pl-2 text-sm`),children:e=>(0,U.jsx)(GH,{segment:e,className:rU})})]}),(0,U.jsx)(XB,{className:iU,children:(0,U.jsx)(ED,{variant:`sm`})})]}),(0,U.jsx)(PH,{className:`bg-white border border-black-100 rounded-lg shadow`,children:(0,U.jsxs)(RH,{className:`p-4`,children:[e.maxRangeDays?(0,U.jsxs)(`div`,{className:`mb-2 text-xs text-gray-600`,children:[`Maximum range: `,e.maxRangeDays,` days`]}):null,(0,U.jsx)(q_e,{onSelectRange:e=>m(e),currentValue:d,maxValue:r,minValue:i,isDateUnavailable:h,maxRangeDays:e.maxRangeDays,tz:t})]})})]})}function q_e(e){let t=(0,V.useMemo)(()=>dw(e.tz),[e.tz]),n=(0,V.useMemo)(()=>({start:t,end:t}),[t]),r=(0,V.useMemo)(()=>{let n=Math.max(1,Math.min(7,e.maxRangeDays??7));return{start:t.subtract({days:n-1}),end:t}},[t,e.maxRangeDays]),i=(0,V.useMemo)(()=>{let n=Math.max(1,Math.min(30,e.maxRangeDays??30));return{start:t.subtract({days:n-1}),end:t}},[t,e.maxRangeDays]),a=(0,V.useMemo)(()=>{let n=Math.max(1,Math.min(90,e.maxRangeDays??90));return{start:t.subtract({days:n-1}),end:t}},[t,e.maxRangeDays]),o=(e.maxRangeDays??1/0)>=1,s=(e.maxRangeDays??1/0)>=7,c=(e.maxRangeDays??1/0)>=30,l=(e.maxRangeDays??1/0)>=90,u=(e,t)=>!e||!t?!1:e.year===t.year&&e.month===t.month&&e.day===t.day,d=(e,t)=>!e||!t?!1:u(e.start,t.start)&&u(e.end,t.end),f=`custom`;e.currentValue&&d(e.currentValue,n)?f=`last1`:e.currentValue&&d(e.currentValue,r)?f=`last7`:e.currentValue&&d(e.currentValue,i)?f=`last30`:e.currentValue&&d(e.currentValue,a)&&(f=`last90`);let p=`custom`;return f===`last1`&&o?p=`last1`:f===`last7`&&s?p=`last7`:f===`last30`&&c?p=`last30`:f===`last90`&&l&&(p=`last90`),(0,U.jsxs)(`div`,{className:`flex gap-4`,children:[(0,U.jsx)(`div`,{className:`w-40 pr-4 border-r border-gray-200`,children:(0,U.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[o?(0,U.jsx)(XB,{onPress:()=>e.onSelectRange(n),className:(0,H.default)(nU,p===`last1`&&`bg-off-white font-semibold`),children:`Last day`}):null,s?(0,U.jsx)(XB,{onPress:()=>e.onSelectRange(r),className:(0,H.default)(nU,p===`last7`&&`bg-off-white font-semibold`),children:`Last 7 days`}):null,c?(0,U.jsx)(XB,{onPress:()=>e.onSelectRange(i),className:(0,H.default)(nU,p===`last30`&&`bg-off-white font-semibold`),children:`Last 30 days`}):null,l?(0,U.jsx)(XB,{onPress:()=>e.onSelectRange(a),className:(0,H.default)(nU,p===`last90`&&`bg-off-white font-semibold`),children:`Last 90 days`}):null,(0,U.jsx)(XB,{className:(0,H.default)(nU,p===`custom`&&`bg-off-white font-semibold`),children:`Custom`})]})}),(0,U.jsx)(`div`,{className:`flex-1`,children:(0,U.jsxs)(gH,{maxValue:e.maxValue,minValue:e.minValue,isDateUnavailable:e.isDateUnavailable,children:[(0,U.jsxs)(`header`,{className:`flex items-center justify-between mb-4`,children:[(0,U.jsx)(XB,{slot:`previous`,className:aU,children:(0,U.jsx)(FE,{variant:`sm`})}),(0,U.jsx)(JH,{className:`text-sm font-semibold text-gray-900`}),(0,U.jsx)(XB,{slot:`next`,className:aU,children:(0,U.jsx)(PE,{variant:`sm`})})]}),(0,U.jsx)(`div`,{className:`px-2 py-1`,children:(0,U.jsxs)(vH,{className:`border-spacing-0`,children:[(0,U.jsx)(yH,{children:e=>(0,U.jsx)(bH,{children:e})}),(0,U.jsx)(xH,{children:e=>(0,U.jsx)(SH,{date:e,className:oU})})]})})]})})]})}function lU(e){let t=e.useUTC?`UTC`:gw(),n=(0,H.default)(...QH,`block w-full max-w-none`,e.className),r=e.disableFuture?dw(t):void 0,i=e.disableFuture&&e.maxRangeDays&&e.maxRangeDays>0?r.subtract({days:Math.max(0,e.maxRangeDays-1)}):void 0,a=Object.prototype.hasOwnProperty.call(e,`value`),[o,s]=(0,V.useState)(()=>e.defaultValue),c=a?e.value:o,l=t=>{let n=t;if(e.maxRangeDays&&t?.start&&t?.end){let r=t.start.compare(t.end)<=0,i=Math.abs(t.end.toDate(`UTC`).getTime()-t.start.toDate(`UTC`).getTime());if(Math.floor(i/864e5)+1>e.maxRangeDays){let i=e.maxRangeDays-1;n=r?{start:t.start,end:t.start.add({days:i})}:{start:t.end.subtract({days:i}),end:t.end}}}e.onChange?.(n),a||s(n)},u=(0,V.useMemo)(()=>t=>{if(e.disableFuture&&r&&t.compare(r)>0||i&&t.compare(i)<0)return!0;
16if(e.maxRangeDays&&c?.start&&!c?.end){let n=c.start,r=c.start.add({days:e.maxRangeDays-1});if(t.compare(n)<0||t.compare(r)>0)return!0}return!1},[e.disableFuture,r,i,e.maxRangeDays,c]);return(0,U.jsxs)(qH,{...e,value:c,onChange:l,maxValue:r,minValue:i,isDateUnavailable:u,granularity:`minute`,hourCycle:e.hourCycle,className:n,"aria-label":`Date and time range`,children:[(0,U.jsxs)(EH,{className:(0,H.default)(`flex w-full relative items-center gap-2`,eU,e.dense?`py-2 pl-2`:null),children:[(0,U.jsx)(UH,{slot:`start`,className:(0,H.default)(tU,`pr-2 text-sm`),children:e=>(0,U.jsx)(GH,{segment:e,className:rU})}),(0,U.jsx)(`span`,{"aria-hidden":`true`,className:`text-gray-700`,children:`â`}),(0,U.jsx)(UH,{slot:`end`,className:(0,H.default)(tU,`flex-1 pl-2 text-sm`),children:e=>(0,U.jsx)(GH,{segment:e,className:rU})}),(0,U.jsx)(XB,{className:iU,children:(0,U.jsx)(ED,{variant:`sm`})})]}),(0,U.jsx)(PH,{className:`bg-white border border-black-100 rounded-lg shadow`,children:(0,U.jsx)(RH,{className:`p-4`,children:(0,U.jsx)(J_e,{onSelectRange:e=>l(e),currentValue:c,maxValue:r,minValue:i,isDateUnavailable:u,maxRangeDays:e.maxRangeDays,quickRanges:e.quickRanges,tz:t})})})]})}var uU=e=>{let t=e.match(/^(\d+)([mhd])$/);if(!t)return 0;let n=Number.parseInt(t[1],10);switch(t[2]){case`m`:return n*60*1e3;case`h`:return n*60*60*1e3;case`d`:return n*24*60*60*1e3;default:return 0}};function J_e(e){let t=(0,V.useMemo)(()=>uw(e.tz),[e.tz]),[n,r]=(0,V.useState)(e.currentValue);(0,V.useMemo)(()=>{r(e.currentValue)},[e.currentValue]);let i=e=>{let n=uU(e),r=t;return{start:t.subtract({milliseconds:n}),end:r}},a=(0,V.useMemo)(()=>e.quickRanges&&e.quickRanges.length>0?e.quickRanges.map(e=>({label:e.label,value:i(e.duration)})):[{label:`Last day`,duration:`1d`},{label:`Last 7 days`,duration:`7d`},{label:`Last 30 days`,duration:`30d`},{label:`Last 90 days`,duration:`90d`}].filter(t=>uU(t.duration)/864e5<=(e.maxRangeDays??1/0)).map(e=>({label:e.label,value:i(e.duration)})),[e.quickRanges,e.maxRangeDays,t]),o=(e,t)=>!e||!t?!1:e.year===t.year&&e.month===t.month&&e.day===t.day&&e.hour===t.hour&&e.minute===t.minute,s=(e,t)=>!e||!t?!1:o(e.start,t.start)&&o(e.end,t.end),c=a.findIndex(t=>s(e.currentValue,t.value));return(0,U.jsxs)(`div`,{className:`flex gap-4`,children:[(0,U.jsx)(`div`,{className:`w-40 pr-4 border-r border-gray-200`,children:(0,U.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[a.map((t,n)=>(0,U.jsx)(XB,{onPress:()=>e.onSelectRange(t.value),className:(0,H.default)(nU,c===n&&`bg-off-white font-semibold`),children:t.label},t.label)),(0,U.jsx)(XB,{className:(0,H.default)(nU,c===-1&&`bg-off-white font-semibold`),children:`Custom`})]})}),(0,U.jsxs)(`div`,{className:`flex-1`,children:[(0,U.jsxs)(gH,{value:n,onChange:t=>{r(t),e.onSelectRange(t)},maxValue:e.maxValue,minValue:e.minValue,isDateUnavailable:e.isDateUnavailable,children:[(0,U.jsxs)(`header`,{className:`flex items-center justify-between mb-4`,children:[(0,U.jsx)(XB,{slot:`previous`,className:aU,children:(0,U.jsx)(FE,{variant:`sm`})}),(0,U.jsx)(JH,{className:`text-sm font-semibold text-gray-900`}),(0,U.jsx)(XB,{slot:`next`,className:aU,children:(0,U.jsx)(PE,{variant:`sm`})})]}),(0,U.jsx)(`div`,{className:`px-2 py-1`,children:(0,U.jsxs)(vH,{className:`border-spacing-0`,children:[(0,U.jsx)(yH,{children:e=>(0,U.jsx)(bH,{children:e})}),(0,U.jsx)(xH,{children:e=>(0,U.jsx)(SH,{date:e,className:oU})})]})})]}),n?.start&&n?.end?(0,U.jsx)(`div`,{className:`mt-4 pt-4 border-t border-gray-200`,children:(0,U.jsxs)(`div`,{className:`flex gap-4 items-center`,children:[(0,U.jsxs)(`div`,{className:`flex-1`,children:[(0,U.jsxs)(`div`,{className:`text-xs text-gray-600 mb-1`,children:[`Start Time on `,n.start.toDate().toLocaleDateString()]}),(0,U.jsx)(HH,{value:n.start,hourCycle:24,onChange:t=>{if(t){let i={...n,start:t};r(i),e.onSelectRange(i)}},granularity:`minute`,"aria-label":`Start time`,children:e=>(0,U.jsx)(UH,{className:(0,H.default)($H,`text-sm w-full min-w-0`),children:e=>(0,U.jsx)(GH,{segment:e,className:rU})})})]}),(0,U.jsx)(`span`,{className:`text-gray-700 mt-5`,children:`â`}),(0,U.jsxs)(`div`,{className:`flex-1`,children:[(0,U.jsxs)(`div`,{className:`text-xs text-gray-600 mb-1`,children:[`End Time on `,n.end.toDate().toLocaleDateString()]}),(0,U.jsx)(HH,{value:n.end,hourCycle:24,onChange:t=>{if(t){let i={...n,end:t};r(i),e.onSelectRange(i)}},granularity:`minute`,"aria-label":`End time`,children:e=>(0,U.jsx)(UH,{className:(0,H.default)($H,`text-sm w-full min-w-0`),children:e=>(0,U.jsx)(GH,{segment:e,className:rU})})})]})]})}):null]})]})}var dU=({onValueChange:e,...t})=>{let n=e=>{e.preventDefault(),e.stopPropagation(),e.dataTransfer.dropEffect=`copy`},r=t=>{t.preventDefault(),t.stopPropagation();let n=Array.from(t.dataTransfer.files);n.length!==0&&Promise.all(n.map(e=>e.text())).then(t=>{e(t.join(` 17`))}).catch(()=>void 0)};return(0,U.jsx)(XH,{...t,onChange:t=>e(t.currentTarget.value),onDragOver:n,onDrop:r})};function fU({actions:e,className:t,align:n=`right`}){e.length>2&&console.warn(`Avoid adding 3 or more actions. Instead, use a ListBox or Menu Component to provide more actions`);let r=(0,H.default)(t,{"justify-start":n===`left`,"justify-end":n===`right`});return(0,U.jsx)(`div`,{className:r,children:e?.map((e,t)=>(0,U.jsx)(`div`,{children:e},`action-${t}`))})}var Z=({children:e,className:t=``,size:n=`lg`,bg:r=`white`})=>(0,U.jsx)(`div`,{className:`bg-${r} ${n===`none`?`p-0`:n===`sm`?`p-2`:n===`md`?`p-4`:`p-7`} shadow border border-black-100 rounded-lg ${t}`,children:e}),pU=({children:e})=>(0,U.jsx)(`div`,{className:`flex flex-col gap-4`,children:e}),mU={UPPERCASE:`uppercase`},Y_e=({isActive:e})=>(0,H.default)(`text-xl`,`text-gray-900`,`focus:text-gray-900`,`font-semibold`,{[G.type.link]:!e},{[G.type.link]:e});function hU({crumbs:e}){return(0,U.jsx)(`nav`,{"aria-label":`Breadcrumb`,children:(0,U.jsx)(`table`,{children:(0,U.jsxs)(`tbody`,{children:[(0,U.jsx)(`tr`,{children:e.map((t,n)=>(0,U.jsxs)(V.Fragment,{children:[(0,U.jsx)(`td`,{className:`p-0 align-bottom`,children:t.label?(0,U.jsx)(`span`,{className:(0,H.default)(`select-none text-xs font-semibold text-gray-500 tracking-wide`,{uppercase:t.crumbVariant===mU.UPPERCASE}),children:t.label}):null}),n===e.length-1?null:(0,U.jsx)(`td`,{className:`p-0`})]},`label-${t.name}-${n}`))}),(0,U.jsx)(`tr`,{children:e.map((t,n)=>(0,U.jsxs)(V.Fragment,{children:[(0,U.jsx)(`td`,{className:`p-0 align-bottom pr-1.5`,children:t.to===null?(0,U.jsx)(`span`,{className:`text-xl font-semibold break-words`,children:t.name}):(0,U.jsx)(re,{className:Y_e,to:t.to,children:t.name})}),n===e.length-1?null:(0,U.jsx)(`td`,{className:`p-0 pr-1.5 align-bottom`,children:(0,U.jsx)(`span`,{className:`text-xl text-gray-400`,children:`/`})})]},`name-${t.name}-${n}`))})]})})})}var gU=`This is an estimate of the cost of running the current resources for one month. It is updated automatically as resources are added or scaled. Please note: it does not represent your actual usage for the month and does not reflect contract discounts, custom rates, or allocations.`,X_e=`Updated automatically as resources are added or scaled.`,_U=({text:e=gU,ariaLabel:t=`More about estimated monthly cost`,...n})=>(0,U.jsx)(aA,{text:e,triggerButton:!0,triggerAriaLabel:t,...n,children:(0,U.jsx)(tD,{className:`inline-block opacity-50 hover:opacity-100 cursor-pointer`,variant:`sm`,"aria-hidden":!0})}),vU=({cost:e,className:t,...n})=>(0,U.jsx)(`span`,{className:(0,H.default)(`flex items-center w-fit`,t),...n,children:e==null?(0,U.jsx)(SE,{}):(0,U.jsx)(`span`,{children:ub(e)})}),Z_e=(e,t={})=>{let{days:n=90}=t,[r]=(0,V.useState)(()=>Date.now()),[i,a]=(0,V.useState)(!1),o=(0,V.useMemo)(()=>r+n*24*60*60*1e3,[r,n]);return{show:!i&&Date.now()<=o,handleDismiss:()=>a(!0)}},yU=({variant:e=`new`,as:t=`span`,feature:n,expiresInDays:r,onClick:i,...a})=>{let{show:o,handleDismiss:s}=Z_e(n,{days:r});if(!o)return;let c=(0,H.default)(`inline-block`,`px-1`,`py-[2px]`,`rounded-sm`,`text-[9px]`,`font-semibold`,`text-white`,`uppercase`,`bg-indigo`,`leading-[11px]`,a.className);return t===`button`?(0,U.jsx)(`button`,{type:`button`,className:c,onClick:()=>{s(),i&&i()},children:e}):(0,U.jsx)(`span`,{className:c,children:e})},bU=({on:e})=>(0,U.jsx)(`div`,{className:(0,H.default)(`rounded-sm`,`text-base font-normal`,`px-1 py-0 flex gap-1 justify-center items-center w-fit`,e?`text-black bg-lime-400`:`text-black bg-black-200`),children:e?`ON`:`OFF`}),Q_e=({isActive:e})=>(0,H.default)(`flex items-center`,{"font-normal text-base text-gray-500 hover:text-gray-700":!e,"border-transparent hover:border-gray-300":!e,"font-semibold text-black":e,"border-orange-400":e},`focus:text-black`,`whitespace-nowrap pb-3 px-1 border-b-3`,`hover:no-underline`),xU=({label:e,to:t,badge:n,count:r,enabled:i,end:a})=>(0,U.jsx)(re,{to:t,end:a,className:Q_e,children:(0,U.jsxs)(`span`,{className:`flex items-center gap-2`,children:[e,r!==void 0&&(0,U.jsx)(bE,{n:r}),n&&(0,U.jsx)(yU,{...n}),i!==void 0&&(0,U.jsx)(bU,{on:i})]})},e),SU=({tabs:e})=>(0,U.jsx)(`nav`,{className:`flex space-x-8 bg-white border-black-100 border-b`,"aria-label":`Tabs`,children:e.map(e=>(0,U.jsx)(xU,{label:e.name,to:e.href,badge:e.badge,count:e.count,enabled:e.enabled,end:e.end},e.name))}),$_e=({message:e,meta:t={}})=>(0,U.jsxs)(Z,{className:`flex items-center justify-center`,children:[(0,U.jsxs)(`h1`,{className:`text-lg text-red-500 font-semibold`,children:[(0,U.jsx)(ZE,{className:`inline pr-3 mb-1`,style:{width:32},color:`#AD1A1A`}),(0,U.jsx)(`span`,{className:`ml-2`,children:e})]}),(0,U.jsx)(`div`,{children:Object.keys(t).map(e=>(0,U.jsxs)(`div`,{children:[e,`: `,t[e]]},e))})]}),CU=({breadcrumbs:e,title:t,titleLabel:n,detailsBox:r,actions:i,tabs:a,isError:o,message:s,meta:c,lastBreadcrumbTo:l})=>o?(0,U.jsx)($_e,{message:s,meta:c}):(0,U.jsxs)(`div`,{className:`flex flex-col`,children:[(0,U.jsx)(`div`,{className:`pb-[11px]`,children:e?l?(0,U.jsx)(hU,{crumbs:[...e,{to:l,name:t,label:n,crumbVariant:n?mU.UPPERCASE:void 0}]}):(0,U.jsx)(hU,{crumbs:[...e,{to:null,name:t,label:n,crumbVariant:n?mU.UPPERCASE:void 0}]}):null}),(0,U.jsx)(`div`,{className:`flex items-center`,children:i&&(0,U.jsx)(fU,{actions:i})}),(0,U.jsx)(`div`,{children:r||null}),a?(0,U.jsx)(`div`,{className:`pt-4`,children:(0,U.jsx)(SU,{tabs:a})}):null]});function wU({children:e}){return(0,U.jsx)(Z,{className:`flex flex-col gap-3`,children:e})}function TU({title:e,icon:t,otherButtonsBeforeDocs:n,docsUrl:r=``,isLoading:i=!1}){return(0,U.jsxs)(`div`,{className:`flex justify-between items-center`,children:[(0,U.jsxs)(W,{size:`sm`,variant:`horizontal`,className:`items-center`,children:[t?(0,U.jsx)(`div`,{className:`w-[32px] h-[32px]`,children:t}):null,(0,U.jsx)(`h1`,{className:`text-lg text-gray-500`,children:e}),(0,U.jsx)(SE,{show:i})]}),(0,U.jsxs)(`div`,{className:`flex`,children:[n||null,r?(0,U.jsx)(uA,{href:r}):null]})]})}function EU({children:e,columns:t=2}){let n=`md:grid-cols-2`;return t===3?n=`md:grid-cols-3`:t>=4&&(n=`lg:grid-cols-${t}`),(0,U.jsx)(`div`,{className:`grid ${n} grid-cols-1 gap-4`,children:e})}function DU({title:e,titleTooltip:t,children:n,isLoading:r=!1}){return(0,U.jsxs)(`div`,{children:[(0,U.jsxs)(`h3`,{className:`text-base font-semibold text-gray-900 flex items-center gap-1.5`,children:[e,t==null?null:(0,U.jsx)(_U,{text:t,ariaLabel:`More information: ${e}`}),(0,U.jsx)(SE,{variant:`xs`,className:`inline-block ml-2`,show:r})]}),(0,U.jsx)(`div`,{className:`break-all`,children:n})]})}function OU({children:e,className:t=``,onClose:n,"aria-label":r,handleEscape:i=!0}){return(0,V.useEffect)(()=>
17{if(!i)return;let e=e=>{e.key===`Escape`&&n()};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[n,i]),(0,ak.createPortal)((0,U.jsx)(`div`,{className:(0,H.default)(`fixed inset-0 z-[100] flex items-center justify-center bg-black/50`,t),role:`dialog`,"aria-modal":`true`,"aria-label":r,onClick:e=>{e.target===e.currentTarget&&n()},onKeyDown:e=>{e.target===e.currentTarget&&(e.key===`Enter`||e.key===` `)&&(e.key===` `&&e.preventDefault(),n())},children:e}),document.body)}function kU({children:e,className:t,isOpen:n=!1,onClose:r}){(0,V.useEffect)(()=>{if(!n||!r)return;let e=e=>{e.key===`Escape`&&r()};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[n,r]);let i=(0,H.default)(`bg-white`,`align-middle max-w-lg w-full p-0`,`relative inline-block rounded-lg text-left overflow-hidden shadow-xl transform transition-all`,t);return n?(0,U.jsx)(`div`,{className:i,children:e}):null}function AU({title:e,icon:t,titleTrailing:n,description:r,onClose:i}){return(0,U.jsxs)(`div`,{className:`m-6 pb-6 mb-0 border-b border-gray-100`,children:[(0,U.jsxs)(`div`,{className:`flex items-start justify-between`,children:[(0,U.jsxs)(`div`,{className:`flex items-center gap-2`,children:[t,(0,U.jsx)(`span`,{className:`text-lg font-bold`,children:e}),n]}),i&&(i?(0,U.jsx)(`button`,{type:`button`,className:`p-1 hover:bg-gray-100 rounded transition-colors`,onClick:()=>i(),onKeyDown:()=>i(),"aria-label":`Close modal`,children:(0,U.jsx)(JE,{className:`w-5 h-5 text-gray-400 hover:text-gray-600`})}):null)]}),r?(0,U.jsx)(`p`,{className:`mt-2 text-sm font-normal text-gray-700`,children:r}):null]})}function jU({actions:e}){return(0,U.jsx)(fU,{className:`flex items-center gap-2 justify-end px-6 py-4 bg-gray-50`,actions:e})}function MU({children:e,className:t}){return(0,U.jsx)(`div`,{className:(0,H.default)(`p-6`,t),children:e})}var NU=({children:e,description:t,endChildren:n=null,visible:r=!0})=>r?(0,U.jsxs)(W,{variant:`horizontal`,size:`sm`,className:`items-center`,children:[(0,U.jsx)(`h2`,{className:G.type.h2,children:e}),(0,U.jsx)(aA,{fluid:!0,text:t,placement:`bottom`,children:(0,U.jsx)(tD,{className:`opacity-50 hover:opacity-100`,variant:`sm`})}),n]}):null,PU=({children:e})=>(0,U.jsx)(W,{size:`sm`,children:e}),FU=({children:e})=>(0,U.jsx)(`div`,{children:e}),IU=({children:e,className:t})=>(0,U.jsx)(`div`,{className:(0,H.default)(`text-gray-500`,t),children:e}),LU=({isLoading:e=!1})=>e?(0,U.jsx)(`div`,{children:(0,U.jsx)(SE,{})}):null;function RU(e){return(0,U.jsxs)(W,{variant:`horizontal`,size:`sm`,className:`items-center text-gray-500`,children:[(0,U.jsxs)(`div`,{className:`whitespace-nowrap`,children:[`Page `,e.totalPages===0?0:e.page,` of`,` `,e.totalPages]}),(0,U.jsxs)(W,{variant:`horizontal`,size:`sm`,className:`items-center`,children:[(0,U.jsx)(cA,{variant:`white`,icon:(0,U.jsx)(jE,{color:`#111920`,variant:`sm`}),size:`xs`,disabled:e.page===1,onClick:t=>{t.preventDefault(),e.prev()}}),(0,U.jsx)(cA,{variant:`white`,icon:(0,U.jsx)(AE,{color:`#111920`,variant:`sm`}),size:`xs`,disabled:e.page===e.totalPages,onClick:t=>{t.preventDefault(),e.next()}}),(0,U.jsx)(SE,{show:e?.isLoading})]})]})}var zU=()=>(0,U.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M17.7612 8.67888V5.20733L12.4328 0H8.88062H8.88056H5.29507L0 5.20733V8.67888L8.88059 2.79603e-05L17.7612 8.67888ZM12.4329 14.754H9.76873V6.79925V3.3277L12.4329 5.93137L17.7613 11.1387V14.6102L12.4329 9.40291V14.754ZM5.32835 14.754H7.99253V6.79928L7.99256 6.79925V3.3277L7.99253 3.32773V3.3277L5.32835 5.93137V5.93139L0 11.1387V14.6102L5.32835 9.40294V14.754Z`,fill:`#E09600`}),eve=()=>(0,U.jsxs)(`svg`,{viewBox:`-1.5 0 20 15`,fill:`none`,width:24,children:[(0,U.jsx)(`title`,{children:`Aptible Logo Without Text`}),(0,U.jsx)(zU,{})]}),BU=({width:e=100})=>(0,U.jsxs)(`svg`,{width:e,viewBox:`0 0 87 18`,fill:`none`,children:[(0,U.jsx)(`title`,{children:`Aptible Logo`}),(0,U.jsx)(`path`,{d:`M27.818 0.00649058L22.2769 14.5705H24.8263L26.0482 11.1273H32.2002L33.4213 14.5705H35.9707L30.4531 0.00649058H27.818ZM26.7439 9.11196L29.1246 2.22708H29.1657L31.5264 9.11196H26.7439ZM42.7631 3.87569C41.0789 3.87569 40.0248 4.6505 39.4559 5.38312H39.4147V4.16127H37.1808V18H39.4147V13.3284H39.4559C40.0257 14.1032 41.0789 14.8756 42.7631 14.8756C45.5014 14.8756 47.5456 12.7994 47.5456 9.37564C47.5465 5.95429 45.5014 3.87569 42.7631 3.87569ZM42.341 13.1239C40.5502 13.1239 39.4349 11.6774 39.4349 9.37564C39.4349 7.05364 40.5502 5.62895 42.341 5.62895C44.2795 5.62895 45.3126 7.33922 45.3126 9.37564C45.3126 11.4121 44.2795 13.1239 42.341 13.1239ZM51.9547 4.16127H53.9789V5.91211H51.9547V11.5549C51.9547 12.7378 52.5447 12.8797 53.9789 12.7986V14.5503C53.5366 14.6517 53.049 14.7125 52.4591 14.7125C50.6918
1714.7125 49.7208 13.9377 49.7208 11.739V5.91292H48.1633V4.16127H49.7208V0.881907H51.9547V4.16127ZM55.9308 4.16127H58.1437V14.5705H55.9308V4.16127ZM58.2914 1.21212C58.2914 1.88146 57.73 2.42423 57.0377 2.42423C56.3454 2.42423 55.7839 1.88146 55.7839 1.21212C55.7839 0.542775 56.3445 0 57.0369 0C57.73 0 58.2914 0.542775 58.2914 1.21212ZM65.9079 3.87082C64.2438 3.87082 63.1906 4.62535 62.6208 5.41963H62.5797V0.00162264H60.3667V14.5657H62.5797V13.3625H62.6208C63.1906 14.0756 64.2438 14.8699 65.9079 14.8699C68.6663 14.8699 70.7114 12.7937 70.7114 9.36996C70.7114 5.94861 68.6663 3.87082 65.9079 3.87082ZM65.5168 13.1134C63.705 13.1134 62.5898 11.6668 62.5898 9.36509C62.5898 7.04309 63.705 5.61841 65.5168 5.61841C67.4554 5.61841 68.4884 7.32867 68.4884 9.36509C68.4884 11.4015 67.4554 13.1134 65.5168 13.1134ZM72.5031 0.00162264H74.737V14.5657H72.5031V0.00162264ZM81.86 13.1191C79.9005 13.1191 78.7416 11.6725 78.7416 9.92166H87.0001C87.0001 6.21473 85.2948 3.87163 81.8189 3.87163C78.5729 3.87163 76.5278 5.99162 76.5278 9.37158C76.5278 12.6307 78.5729 14.8715 81.9213 14.8715C84.683 14.8715 86.2859 13.3641 86.8314 11.3885H84.6184C84.4305 12.0189 83.692 13.1191 81.86 13.1191ZM81.8172 5.56243C83.6081 5.56243 84.7888 6.72343 84.7888 8.33228H78.7399C78.7399 6.72343 80.0264 5.56243 81.8172 5.56243Z`,fill:`#0A1B2B`}),(0,U.jsx)(zU,{})]}),tve=r({selectNav:()=>VU,setCollapsed:()=>HU}),VU=L.nav.select,HU=qn.create(`nav-collapse`,function*(e,t){yield*L.update(L.nav.update({key:`collapsed`,value:e.payload.collapsed})),yield*t()}),nve=`bg-off-white font-semibold text-black`,UU=`hover:bg-black-50 text-black-500`,WU=`block p-2 rounded-md hover:no-underline`,GU=(e,t)=>(0,H.default)(WU,t?`pl-2 pr-0`:`px-2`,`py-2 rounded-md hover:no-underline`,{[UU]:!e,[nve]:e}),KU=({icon:e,name:t,to:n,hideName:r=!1,isActive:i})=>{let a=(0,U.jsxs)(`div`,{className:`flex items-center`,children:[(0,U.jsx)(`div`,{className:r?void 0:`mr-2`,"aria-hidden":`true`,children:e}),r?null:(0,U.jsx)(`div`,{children:t})]});return i===void 0?(0,U.jsx)(re,{className:({isActive:e})=>GU(e,r),to:n,children:a},n):(0,U.jsx)(P,{className:GU(i,r),to:n,"aria-current":i?`page`:void 0,children:a},n)},rve=({icon:e,name:t,tooltipText:n,hideName:r=!1})=>(0,U.jsx)(`span`,{className:(0,H.default)(WU,r?`pl-2 pr-0`:`px-2`,`py-2 rounded-md hover:no-underline`,UU),children:(0,U.jsxs)(`div`,{className:`flex items-center`,children:[(0,U.jsx)(`div`,{className:r?void 0:`mr-2`,"aria-hidden":`true`,children:e}),r?null:(0,U.jsxs)(`div`,{className:`flex items-center`,children:[t,(0,U.jsx)(aA,{text:n,fluid:!0,children:(0,U.jsx)(hD,{variant:`sm`,className:`ml-1 opacity-60`})})]})]})}),ive=`block py-2 rounded-md hover:no-underline`,qU=`hover:bg-black-50 hover:text-black text-black-500`,ave=({collapsedOverride:e,disableToggle:t=!1,onToggleCollapsed:n})=>{let r=l(),{collapsed:i}=B(VU),a=e??i,o=B(e=>L.cache.selectById(e,{id:RS})),s=o?.description&&o?.indicator!==`none`,c=B(e=>L.loaders.selectById(e,{id:zS}).isSuccess),u=N(),{canAccess:d,destination:f}=vE(),p=B(ns),m=B(qo),h=B(Jo),g=B(ts),_=B(rs),{blocked:v}=yE(),y=ce({path:ea,end:!1})!==null,b=[];c&&!es(p)?b.push({key:`no-org`,label:`No Organization selected`,message:`You are not currently viewing an organization. Select one to continue.`,action:{label:`Select an Organization`,to:zi()}}):c&&v&&b.push({key:`sso-required`,label:`SSO Login Required`,message:`Organization ${p.name} requires SSO. Sign in with SSO to continue accessing this organization.`,action:{label:`Login with SSO`,to:oo(p.id),external:!0}}),s&&o&&b.push({key:`system-status`,label:`Platform Status`,message:o.description});let x=[{name:`Home`,to:Dr(),icon:(0,U.jsx)(_D,{})},{name:`Activity`,to:gne(),icon:(0,U.jsx)(UD,{})}],S=[{name:`Stacks`,to:ho(),icon:(0,U.jsx)(QE,{})},{name:`Environments`,to:Ma(),icon:(0,U.jsx)(nD,{})},{name:`Apps`,to:Xi(),icon:(0,U.jsx)(zE,{}),isActive:!y&&void 0},{name:`Services`,to:Ote(),icon:(0,U.jsx)(pD,{}),isActive:y?!0:void 0},{name:`Databases`,to:ma(),icon:(0,U.jsx)(LE,{})},{name:`Endpoints`,to:Aa(),icon:(0,U.jsx)(fD,{})},{name:`Security & Compliance`,to:f,icon:(0,U.jsx)(dD,{}),disabled:!d,disabledTooltip:`Requires Full Visibility on any Environment`}],C=[{name:`LLM Gateway`,to:_?Wi():Ki(),icon:(0,U.jsx)(mD,{}),badge:{variant:`beta`,feature:`llm-keys`}}],w=e=>(0,U.jsxs)(`div`,{className:`relative`,children:[e.disabled?(0,U.jsx)(rve,{icon:e.icon,name:e.name,hideName:a,tooltipText:e.disabledTooltip??``}):(0,U.jsx)(KU,{icon:e.icon,name:e.name,to:e.to,hideName:a,isActive:e.isActive}),e.badge&&!a?(0,U.jsx)(yU,{...e.badge,className:`absolute right-2 top-1/2 -translate-y-1/2 cursor-pointer`}):null]}
17,e.name),T=(e,t,n)=>(0,U.jsxs)(`button`,{type:`button`,onClick:n,className:`w-full flex items-center justify-between px-2 pt-4 pb-1 text-sm font-semibold text-black-300 uppercase tracking-wide hover:text-black cursor-pointer`,"aria-expanded":!t,children:[(0,U.jsx)(`span`,{children:e}),t?(0,U.jsx)(IE,{variant:`sm`,color:`#888C90`}):(0,U.jsx)(NE,{variant:`sm`,color:`#888C90`})]}),E=`flex items-center w-full px-3 py-2 gap-2 text-black hover:bg-black-50 hover:text-black rounded-md cursor-pointer text-left outline-none`,D=p.name?p.name.slice(0,20):``,O=m.name?m.name.slice(0,20):``,[k,A]=(0,V.useState)(new Set),j=e=>A(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}),[M,ee]=(0,V.useState)(!1),[te,ne]=(0,V.useState)(!1);return(0,U.jsx)(wE,{value:!0,children:(0,U.jsxs)(`div`,{className:`flex-1 flex flex-col min-h-0 border-r border-gray-200 bg-white`,children:[(0,U.jsxs)(`div`,{className:`flex-1 min-h-0 flex flex-col pt-5 pb-4 overflow-y-auto`,children:[t?null:(0,U.jsx)(`button`,{"aria-label":`${a?`Expand`:`Collapse`} Menu`,type:`button`,className:`${a?`mt-0 ml-4 my-4`:`absolute top-4 right-4`} hover:cursor-pointer`,onClick:()=>{if(n){n();return}r(HU({collapsed:!i}))},children:(0,U.jsx)(cD,{color:`#888C90`})}),(0,U.jsx)(`div`,{className:`flex items-center flex-shrink-0 pl-4`,children:(0,U.jsx)(P,{to:Dr(),children:a?(0,U.jsx)(eve,{}):(0,U.jsx)(BU,{})})}),a?null:(0,U.jsx)(`div`,{className:`mt-4 px-3`,children:(0,U.jsx)(`div`,{className:`border border-gray-200 bg-white rounded-lg px-2 py-1 flex items-center justify-between h-[36px] cursor-pointer hover:bg-black-50`,onClick:()=>u(Eo()),onKeyUp:()=>u(Eo()),children:(0,U.jsxs)(`div`,{className:`flex items-center`,children:[(0,U.jsx)(VE,{color:`#888C90`,variant:`sm`}),` `,(0,U.jsx)(`div`,{className:`ml-2 text-black-300`,children:`Search...`})]})})}),(0,U.jsx)(`div`,{className:`mt-2 flex-1 ${a?`pl-2 pr-0`:`px-2`}`,children:(0,U.jsxs)(`nav`,{className:`bg-white`,children:[x.map(w),a?(0,U.jsxs)(U.Fragment,{children:[S.map(w),C.map(w)]}):(0,U.jsxs)(U.Fragment,{children:[T(`Platform`,k.has(`platform`),()=>j(`platform`)),k.has(`platform`)?null:S.map(w),T(`Managed AI`,k.has(`managed-ai`),()=>j(`managed-ai`)),k.has(`managed-ai`)?null:C.map(w)]})]})})]}),(0,U.jsxs)(`div`,{className:`flex-shrink-0 px-2 w-full pb-3`,children:[!a&&b.length>0?(0,U.jsx)(`div`,{className:`mb-2 flex flex-col gap-1`,children:b.map(e=>(0,U.jsxs)(LH,{children:[(0,U.jsxs)(XB,{className:`flex items-center gap-2 h-[30px] w-full pl-3 pr-2 py-2 rounded border border-orange-300 bg-orange-100 shadow-[0px_1px_2px_rgba(0,0,0,0.06)] font-mono font-bold text-[10px] leading-[14px] uppercase text-black outline-none cursor-pointer text-left`,"aria-label":e.label,children:[(0,U.jsx)(GD,{variant:`sm`,className:`shrink-0`}),(0,U.jsx)(`span`,{className:`truncate`,children:e.label})]}),(0,U.jsx)(PH,{placement:`top`,offset:8,children:(0,U.jsx)(`div`,{className:`bg-orange-100 border border-orange-300 rounded shadow-[2px_2px_5px_rgba(0,0,0,0.05)] p-3 w-[280px] outline-none flex flex-col gap-2`,children:(0,U.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,U.jsx)(GD,{variant:`sm`,className:`shrink-0 mt-0.5`}),(0,U.jsxs)(`div`,{className:`flex-1 text-[12px] leading-[16px] text-black`,children:[e.message,e.key===`system-status`?(0,U.jsxs)(U.Fragment,{children:[` `,(0,U.jsx)(`a`,{href:`https://status.aptible.com`,target:`_blank`,rel:`noreferrer`,className:`text-indigo underline`,children:`See Status Page for more details`}),`.`]}):null]})]})})})]},e.key))}):null,h?(0,U.jsx)(KU,{to:Cee(),icon:(0,U.jsx)(XE,{}),name:`Impersonate`,hideName:a}):null,(0,U.jsx)(KU,{to:Po(),icon:(0,U.jsx)(qD,{}),name:`Contact Support`,hideName:a}),(0,U.jsxs)(LH,{isOpen:M,onOpenChange:ee,children:[(0,U.jsxs)(XB,{className:(0,H.default)(`flex items-center w-full py-2 rounded-md outline-none cursor-pointer hover:no-underline`,a?`pl-2 pr-0`:`px-2`,M?`bg-black-50 text-black`:qU),"aria-label":`Resources`,children:[(0,U.jsxs)(`div`,{className:`flex items-center flex-1 min-w-0`,children:[(0,U.jsx)(`div`,{className:`mr-2`,"aria-hidden":`true`,children:(0,U.jsx)(KD,{})}),a?null:(0,U.jsx)(`div`,{children:`Resources`})]}),a?null:(0,U.jsx)(PE,{variant:`sm`,color:`#888C90`})]}),(0,U.jsx)(PH,{placement:`right`,offset:8,children:(0,U.jsx)(`div`,{className:`bg-white border border-black-100 rounded-md shadow-[2px_2px_5px_rgba(0,0,0,0.05)] p-2 min-w-[205px] outline-none flex flex-col gap-1`,children:[{key:`access-tokens`,label:`Access Tokens`,icon:(0,U.jsx)(mD,{}),to:Wr(),external:!1}
17,{key:`install-cli`,label:`Install CLI`,icon:(0,U.jsx)(VD,{}),to:`https://www.aptible.com/docs/cli`,external:!0},{key:`view-docs`,label:`View Docs`,icon:(0,U.jsx)(JD,{}),to:`https://aptible.com/docs`,external:!0}].map(e=>e.external?(0,U.jsxs)(`a`,{href:e.to,target:`_blank`,rel:`noreferrer`,className:E,children:[(0,U.jsx)(`span`,{className:`shrink-0`,"aria-hidden":`true`,children:e.icon}),(0,U.jsx)(`span`,{children:e.label})]},e.key):(0,U.jsxs)(P,{to:e.to,className:E,children:[(0,U.jsx)(`span`,{className:`shrink-0`,"aria-hidden":`true`,children:e.icon}),(0,U.jsx)(`span`,{children:e.label})]},e.key))})})]}),a?null:(0,U.jsx)(`div`,{className:`my-2 border-t border-black-100`}),(0,U.jsxs)(LH,{isOpen:te,onOpenChange:ne,children:[(0,U.jsxs)(XB,{className:(0,H.default)(ive,a?`pl-2 pr-0`:`px-2`,`w-full flex items-center justify-between outline-none cursor-pointer`,te?`bg-black-50 text-black`:qU),"aria-label":`Organization menu`,children:[(0,U.jsxs)(`div`,{className:`flex items-center min-w-0`,children:[(0,U.jsx)(`div`,{className:(0,H.default)(`flex items-center justify-center rounded-md bg-indigo-100 p-1.5`,a?void 0:`mr-3`),"aria-hidden":`true`,children:(0,U.jsx)(lD,{})}),a?null:(0,U.jsxs)(`div`,{className:`min-w-0 text-left leading-tight`,children:[(0,U.jsx)(`div`,{className:`text-black-500 font-medium truncate`,children:D}),(0,U.jsx)(`div`,{className:`text-gray-400 text-sm truncate`,children:O})]})]}),a?null:(0,U.jsx)(PE,{variant:`sm`,color:`#888C90`})]}),(0,U.jsx)(PH,{placement:`right`,offset:8,children:(0,U.jsxs)(`div`,{className:`bg-white border border-black-100 rounded-md shadow-[2px_2px_5px_rgba(0,0,0,0.05)] p-2 min-w-[205px] outline-none flex flex-col gap-1`,children:[g?(0,U.jsxs)(P,{to:zi(),className:E,children:[(0,U.jsx)(`span`,{className:`shrink-0`,"aria-hidden":`true`,children:(0,U.jsx)(LD,{})}),(0,U.jsx)(`span`,{children:`Switch Organization`})]}):null,(0,U.jsxs)(P,{to:Br(),className:E,children:[(0,U.jsx)(`span`,{className:`shrink-0`,"aria-hidden":`true`,children:(0,U.jsx)(BE,{})}),(0,U.jsx)(`span`,{children:`Settings`})]}),(0,U.jsxs)(P,{to:Fr(),className:E,children:[(0,U.jsx)(`span`,{className:`shrink-0`,"aria-hidden":`true`,children:(0,U.jsx)($E,{})}),(0,U.jsx)(`span`,{children:`Log Out`})]})]})})]})]})]})})},ove=e=>{let t=new Date,n=new Date(e.range_begin),r=new Date(e.range_end);return t>=n&&t<=r};function JU(){let e=B(Cs),t=c(Vs({id:e.id})),n=c(Ns({id:e.id})),r=new Date().toISOString();if(!t.lastSuccess||!n.lastSuccess)return{hasTrialNoPayment:!1,endDate:r,expiresIn:``};let i=t.data?._embedded?.trials.find(ove),a=(n.data?._embedded?.stripe_sources||[]).some(e=>e.deactivated_at===null),o=r,s=i?.range_end?i.range_end:r;return{hasTrialNoPayment:i!==void 0&&!a,endDate:s,expiresIn:Pf({startDate:o,endDate:s})}}var sve=`bg-off-white font-semibold text-black focus:text-black`,cve=`text-black-500 hover:bg-black-50 hover:text-black`,lve=`group flex items-center p-2 text-base rounded-md hover:no-underline`;function uve(){let e=B(an),t=B($o),n=B(ts),r=B(e=>__(e,{orgId:t})),i=B(e=>v_(e,{orgId:t})),a=B(rs),{hasTrialNoPayment:o}=JU();u(xg()),u(Sg({orgId:t}));let s=B(bg),c=B(e=>_g(e,{id:s.planId})),l=B(Vl).some(e=>Gl(e)===`dedicated`)||c.name===`production`||c.name===`enterprise`,d=({isActive:e})=>(0,H.default)(lve,{[cve]:!e,[sve]:e});return(0,U.jsxs)(`nav`,{className:`flex flex-col`,children:[(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`h4`,{className:`${G.type.h4} ml-2`,children:`Account Settings`}),(0,U.jsx)(re,{className:d,to:Hr(),children:`Profile`}),(0,U.jsxs)(re,{className:d,to:qr(),children:[`Security`,(0,U.jsx)(aA,{text:`Reauthentication Required`,fluid:!0,children:(0,U.jsx)(hD,{variant:`sm`,className:`ml-1 opacity-60`})})]}),(0,U.jsxs)(re,{className:d,to:nee(),children:[`SSH Keys`,(0,U.jsx)(aA,{text:`Reauthentication Required`,fluid:!0,children:(0,U.jsx)(hD,{variant:`sm`,className:`ml-1 opacity-60`})})]}),(0,U.jsx)(re,{className:d,to:Wr(),children:`Access Tokens`}),(0,U.jsx)(`hr`,{className:`mt-3 mx-2`})]}),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`h4`,{className:`${G.type.h4} ml-2 mt-4`,children:`Team Settings`}),(0,U.jsx)(re,{className:d,to:ii(),children:`Members`}),(0,U.jsx)(re,{className:d,to:pi(),children:`Pending Invites`}),(0,U.jsx)(re,{className:d,to:hi(),children:`Roles`}),r?(0,U.jsx)(re,{className:d,to:ui(),children:`Single Sign-On`}):(0,U.jsxs)(`span`,{className:d({isActive:!1}),children:[`Single Sign-On`,(0,U.jsx)(aA,{text:`Must be account owner`,fluid:!0,children:(0,U.jsx)(hD,{variant:`sm`,className:`ml-1 opacity-60`})})]}),r&&!n&&!o?(0,U.jsx)(re,{className:d,to:pee(),children:`Provisioning`}):(0,U.jsxs)(`span`,{className:d({isActive:!1}),children:[`Provisioning`,(0,U.jsx)(aA,{text:o?`Feature not available for trial users`:`Must be account owner with a single assigned organization`,fluid:!0,children:(0,U.jsx)(hD,{variant:`sm`,className:`ml-1 opacity-60`})})]}
17),r?(0,U.jsx)(re,{className:d,to:si(),children:`Organization Settings`}):(0,U.jsxs)(`span`,{className:d({isActive:!1}),children:[`Organization Settings`,(0,U.jsx)(aA,{text:`Must be account owner`,fluid:!0,children:(0,U.jsx)(hD,{variant:`sm`,className:`ml-1 opacity-60`})})]}),(e.isDev||e.externalAwsFeatureOrgIds.includes(t))&&(0,U.jsx)(re,{className:d,to:Xr(),children:`Account Integrations`}),r&&a?(0,U.jsx)(re,{className:d,to:fee(),children:`Managed AI`}):null,(0,U.jsx)(`hr`,{className:`mt-3 mx-2`})]}),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`h4`,{className:`${G.type.h4} ml-2 mt-4`,children:`Billing`}),r?(0,U.jsx)(re,{className:d,to:Di(),children:`Plans`}):(0,U.jsxs)(`span`,{className:d({isActive:!1}),children:[`Plans`,(0,U.jsx)(aA,{text:`Must be account owner`,fluid:!0,children:(0,U.jsx)(hD,{variant:`sm`,className:`ml-1 opacity-60`})})]}),i?(0,U.jsx)(re,{className:d,to:Ai(),children:`Invoices`}):(0,U.jsxs)(`span`,{className:d({isActive:!1}),children:[`Invoices`,(0,U.jsx)(aA,{text:`Must be account owner or billing admin owner`,fluid:!0,children:(0,U.jsx)(hD,{variant:`sm`,className:`ml-1 opacity-60`})})]}),i?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(re,{className:d,to:Mi(),children:`Payment Methods`}),(0,U.jsx)(re,{className:d,to:Aee(),children:`Contacts`}),(0,U.jsx)(re,{className:d,to:jee(),children:`Billing Address`})]}):null]}),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`hr`,{className:`mt-3 mx-2`}),(0,U.jsx)(`h4`,{className:`${G.type.h4} ml-2 mt-4`,children:`Legal and Compliance`}),l?(0,U.jsx)(re,{className:d,to:Li(),children:`Agreements`}):(0,U.jsxs)(`span`,{className:d({isActive:!1}),children:[`Agreements`,(0,U.jsx)(aA,{text:`Production or Enterprise plan required`,fluid:!0,children:(0,U.jsx)(hD,{variant:`sm`,className:`ml-1 opacity-60`})})]})]})]})}var dve=({steps:e,currentStep:t})=>{let n=[...Array(e).keys()];return(0,U.jsx)(`div`,{className:`flex progress brand-dark-form__progress`,children:n.map((e,n)=>(0,U.jsx)(`div`,{className:(0,H.default)(`progress-dot`,t-1===n&&`isActive`)},e))})},YU=({children:e,className:t=``})=>(0,U.jsx)(`code`,{className:`${t} bg-gray-200 font-mono text-black pt-0.5 pb-1 px-1.5 rounded-md text-[0.9rem]`,children:e});function XU(e){if(e?.length)return e[e.length-1]}function ZU(e,t,n){if(e===t)return!0;if(!e||!t)return e==null&&t==null;let r=e.length;if(r!==t.length)return!1;for(let i=0;i<r;i++)if(e[i]!==t[i]&&!n?.(e[i],t[i]))return!1;return!0}function QU(e,t){if(e){for(let n of e)if(t(n))return!0}}function $U(e,t){let n=e.indexOf(t);n>=0&&e.splice(n,1)}function fve(e,t){let n=0,r=0;for(;n<e.length;
vendor: 61,391 bytes, lines 17-19
17n++)t.includes(e[n])||(e[r]=e[n],r++);for(;r<e.length;)e.pop()}function eW(e,t,n){for(let n=0;n<t.length;n++)$U(e,t[n]);for(let r=t.length-1;r>=0;r--)e.splice(n,0,t[r])}var tW=e=>e==null||e===``?null:e;function nW(e){return e!=null&&e!==``}function rW(e){return!nW(e)}var iW=e=>e!=null&&typeof e.toString==`function`?e.toString():null,aW=(e,t)=>(e?JSON.stringify(e):null)===(t?JSON.stringify(t):null),pve=(e,t,n=!1)=>e==null?t==null?0:-1:t==null?1:(typeof e==`object`&&e.toNumber&&(e=e.toNumber()),typeof t==`object`&&t.toNumber&&(t=t.toNumber()),!n||typeof e!=`string`?e>t?1:e<t?-1:0:e.localeCompare(t)),oW=class{constructor(){this.allSyncListeners=new Map,this.allAsyncListeners=new Map,this.globalSyncListeners=new Set,this.globalAsyncListeners=new Set,this.asyncFunctionsQueue=[],this.scheduled=!1,this.firedEvents={}}setFrameworkOverrides(e){this.frameworkOverrides=e}getListeners(e,t,n){let r=t?this.allAsyncListeners:this.allSyncListeners,i=r.get(e);return!i&&n&&(i=new Set,r.set(e,i)),i}noRegisteredListenersExist(){return this.allSyncListeners.size===0&&this.allAsyncListeners.size===0&&this.globalSyncListeners.size===0&&this.globalAsyncListeners.size===0}addEventListener(e,t,n=!1){this.getListeners(e,n,!0).add(t)}removeEventListener(e,t,n=!1){let r=this.getListeners(e,n,!1);r&&(r.delete(t),r.size===0&&(n?this.allAsyncListeners:this.allSyncListeners).delete(e))}addGlobalListener(e,t=!1){this.getGlobalListeners(t).add(e)}removeGlobalListener(e,t=!1){this.getGlobalListeners(t).delete(e)}dispatchEvent(e){this.dispatchToListeners(e,!0),this.dispatchToListeners(e,!1),this.firedEvents[e.type]=!0}dispatchEventOnce(e){this.firedEvents[e.type]||this.dispatchEvent(e)}dispatchToListeners(e,t){let n=e.type;if(t&&`event`in e){let t=e.event;t instanceof Event&&(e.eventPath=t.composedPath())}let{frameworkOverrides:r}=this,i=e=>{let n=r?()=>r.wrapIncoming(e):e;t?this.dispatchAsync(n):n()},a=this.getListeners(n,t,!1);if((a?.size??0)>0){let t=new Set(a);for(let n of t)a?.has(n)&&i(()=>n(e))}let o=this.getGlobalListeners(t);if(o.size>0){let t=new Set(o);for(let r of t)i(()=>r(n,e))}}getGlobalListeners(e){return e?this.globalAsyncListeners:this.globalSyncListeners}dispatchAsync(e){if(this.asyncFunctionsQueue.push(e),!this.scheduled){let e=()=>{window.setTimeout(this.flushAsyncQueue.bind(this),0)},t=this.frameworkOverrides;t?t.wrapIncoming(e):e(),this.scheduled=!0}}flushAsyncQueue(){this.scheduled=!1;let e=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[];for(let t of e)t()}},mve=/[&<>"']/g,hve={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`};function sW(e){return e?.toString().toString()??null}function cW(e){return sW(e)?.replace(mve,e=>hve[e])??null}function lW(e){return typeof e==`string`&&e.startsWith(`=`)&&e.length>1}function gve(e){return!e||e==null?null:e.replace(/([a-z])([A-Z])/g,`$1 $2`).replace(/([A-Z]+)([A-Z])([a-z])/g,`$1 $2$3`).replace(/\./g,` `).split(` `).map(e=>e.substring(0,1).toUpperCase()+(e.length>1?e.substring(1,e.length):``)).join(` `)}function uW(e){return e.eRootDiv.getRootNode()}function dW(e){return uW(e).activeElement}function fW(e){let{gos:t,eRootDiv:n}=e,r=null,i=t.get(`getDocument`);return i&&nW(i)?r=i():n&&(r=n.ownerDocument),r&&nW(r)?r:document}function pW(e){let t=dW(e);return t===null||t===fW(e).body}function mW(e){return fW(e).defaultView||window}function hW(e){let t=null,n=null;try{t=fW(e).fullscreenElement}catch{}finally{t||=uW(e),n=t.querySelector(`body`)||(t instanceof ShadowRoot?t:t instanceof Document?t?.documentElement:t)}return n}function _ve(e){return hW(e)?.clientWidth??(window.innerWidth||-1)}function vve(e){return hW(e)?.clientHeight??(window.innerHeight||-1)}function gW(e,t,n){n==null||typeof n==`string`&&n==``?vW(e,t):_W(e,t,n)}function _W(e,t,n){e.setAttribute(yW(t),n.toString())}function vW(e,t){e.removeAttribute(yW(t))}function yW(e){return`aria-${e}`}function bW(e,t){t?e.setAttribute(`role`,t):e.removeAttribute(`role`)}function yve(e){let t=e?.direction;return t===`asc`?`ascending`:t===`desc`?`descending`:t===`mixed`?`other`:`none`}function bve(e){return e.getAttribute(`aria-label`)}function xW(e,t){gW(e,`label`,t)}function SW(e,t){gW(e,`labelledby`,t)}function CW(e,t){gW(e,`live`,t)}function xve(e,t){gW(e,`atomic`,t)}function Sve(e,t){gW(e,`relevant`,t)}function wW(e,t){gW(e,`invalid`,t)}function Cve(e,t){gW(e,`disabled`,t)}function TW(e,t){gW(e,`hidden`,t)}function EW(e,t){_W(e,`expanded`,t)}function wve(e,t){_W(e,`setsize`,t)}function Tve(e,t){_W(e,`posinset`,t)}function Eve(e,t){_W(e,`rowcount`,t)}function DW(e,t){_W(e,`rowindex`,t)}function Dve(e,t){_W(e,`rowspan`,t)}function Ove(e,t){_W(e,`colcount`,t)}function OW(e,t){_W(e,`colindex`,t)}function kve(e,t){_W(e,`colspan`,t)}function Ave(e,t){_W(e,`sort`,t)}function jve(e){vW(e,`sort`)}function kW(e,t){gW(e,`selected`,t)}function Mve(e,t){gW(e,`controls`,t)}function Nve(e,t){Mve(e,t.id),SW(t,e.id)}function AW(e,t){gW(e,`owns`,t)}function jW(e,t){return t===void 0?e(`ariaIndeterminate`,`indeterminate`):t===!0?e(`ariaChecked`,`checked`):e(`ariaUnchecked`,`unchecked`)}var MW=`[tabindex], input, select, button, textarea, [href]`,NW=`[disabled], .ag-disabled:not(.ag-button), .ag-disabled *`;function PW(e){return!e||!e.matches(`input, select, button, textarea`)||!e.matches(NW)?!1:XW(e)}function FW(e,t,n={}){let{skipAriaHidden:r}=n;e.classList.toggle(`ag-hidden`,!t),r||TW(e,!t)}function IW(e,t,n={}){let{skipAriaHidden:r}=n;e.classList.toggle(`ag-invisible`,!t),r||TW(e,!t)}function LW(e,t){let n=`disabled`,r=t?e=>e.setAttribute(n,``):e=>e.removeAttribute(n);r(e);let i=e.querySelectorAll(`input`)??[];for(let e of i)r(e)}function RW(e,t,n){let r=0;for(;e;){if(e.classList.contains(t))return!0;if(e=e.parentElement,typeof n==`number`){if(++r>n)break}else if(e===n)break}return!1}function zW(e){let{height:t,width:n,borderTopWidth:r,borderRightWidth:i,borderBottomWidth:a,borderLeftWidth:o,paddingTop:s,paddingRight:c,paddingBottom:l,paddingLeft:u,marginTop:d,marginRight:f,marginBottom:p,marginLeft:m,boxSizing:h}=window.getComputedStyle(e),g=Number.parseFloat;return{height:g(t||`0`),width:g(n||`0`),borderTopWidth:g(r||`0`),borderRightWidth:g(i||`0`),borderBottomWidth:g(a||`0`),borderLeftWidth:g(o||`0`),paddingTop:g(s||`0`),paddingRight:g(c||`0`),paddingBottom:g(l||`0`),paddingLeft:g(u||`0`),marginTop:g(d||`0`),marginRight:g(f||`0`),marginBottom:g(p||`0`),marginLeft:g(m||`0`),boxSizing:h}}function BW(e){let t=zW(e);return t.boxSizing===`border-box`?t.height-t.paddingTop-t.paddingBottom-t.borderTopWidth-t.borderBottomWidth:t.height}function VW(e){let t=zW(e);return t.boxSizing===`border-box`?t.width-t.paddingLeft-t.paddingRight-t.borderLeftWidth-t.borderRightWidth:t.width}function HW(e){let{height:t,marginBottom:n,marginTop:r}=zW(e);return Math.floor(t+n+r)}function UW(e){let{width:t,marginLeft:n,marginRight:r}=zW(e);return Math.floor(t+n+r)}function WW(e){let t=e.getBoundingClientRect(),{borderTopWidth:n,borderLeftWidth:r,borderRightWidth:i,borderBottomWidth:a}=zW(e);return{top:t.top+(n||0),left:t.left+(r||0),right:t.right+(i||0),bottom:t.bottom+(a||0)}}function GW(e,t){let n=e.scrollLeft;return t&&(n=Math.abs(n)),n}function KW(e,t,n){n&&(t*=-1),e.scrollLeft=t}function qW(e){for(;e?.firstChild;)e.firstChild.remove()}function JW(e){e?.parentNode&&e.remove()}function YW(e){return!!e.offsetParent}function XW(e){return e.checkVisibility?e.checkVisibility({checkVisibilityCSS:!0}):!(!YW(e)||window.getComputedStyle(e).visibility!==`visible`)}function ZW(e){let t=document.createElement(`div`);return t.innerHTML=(e||``).trim(),t.firstChild}function QW(e){return()=>{let t=e();return!t||$W(t)||eG(t)}}function $W(e){return e.clientWidth<e.scrollWidth}function eG(e){return e.clientHeight<e.scrollHeight}function tG(e,t){t===`flex`?(e.style.removeProperty(`width`),e.style.removeProperty(`minWidth`),e.style.removeProperty(`maxWidth`),e.style.flex=`1 1 auto`):nG(e,t)}function nG(e,t){t=iG(t),e.style.width=t,e.style.maxWidth=t,e.style.minWidth=t}function rG(e,t){t=iG(t),e.style.height=t,e.style.maxHeight=t,e.style.minHeight=t}function iG(e){return typeof e==`number`?`${e}px`:e}function aG(e){return e instanceof Node||e instanceof HTMLElement}function oG(e,t,n){n==null||n===``?e.removeAttribute(t):e.setAttribute(t,n.toString())}function sG(e,t){if(!t.isContentEditable)return;let n=mW(e).getSelection();if(!n)return;let r=fW(e).createRange();r.selectNodeContents(t),r.collapse(!1),n.removeAllRanges(),n.addRange(r)}function cG(e,t,n){let r=mW(e).ResizeObserver,i=r?new r(n):null;return i?.observe(t),()=>i?.disconnect()}function lG(e,t){let n=mW(e);n.requestAnimationFrame?n.requestAnimationFrame(t):n.webkitRequestAnimationFrame?n.webkitRequestAnimationFrame(t):n.setTimeout(t,0)}var uG=`data-ref`,dG;function fG(){return dG??=document.createTextNode(` `),dG.cloneNode()}function pG(e){let{attrs:t,children:n,cls:r,ref:i,role:a,tag:o}=e,s=document.createElement(o);if(r&&(s.className=r),i&&s.setAttribute(uG,i),a&&s.setAttribute(`role`,a),t)for(let e of Object.keys(t))s.setAttribute(e,t[e]);if(n){if(typeof n==`string`)s.textContent=n;else{let e=!0;for(let t of n)t&&(typeof t==`string`?(s.appendChild(document.createTextNode(t)),e=!1):typeof t==`function`?s.appendChild(t()):(e&&=(s.appendChild(fG()),!1),s.append(pG(t)),s.appendChild(fG())))}}return s}var mG=[`touchstart`,`touchend`,`touchmove`,`touchcancel`,`scroll`],hG=[`wheel`],gG={},_G=(()=>{let e={select:`input`,change:`input`,submit:`form`,reset:`form`,error:`img`,load:`img`,abort:`img`};return t=>{if(typeof gG[t]==`boolean`)return gG[t];let n=document.createElement(e[t]||`div`);return t=`on`+t,gG[t]=t in n}})();function vG(e,t){return!t||!e?!1:bG(t).indexOf(e)>=0}function yG(e){let t=[],n=e.target;for(;n;)t.push(n),n=n.parentElement;return t}function bG(e){let t=e;return t.path?t.path:t.composedPath?t.composedPath():yG(t)}function xG(e,t,n){let r=SG(t),i;r!=null&&(i={passive:r}),e.addEventListener(t,n,i)}var SG=e=>{let t=mG.includes(e),n=hG.includes(e);if(t)return!0;if(n)return!1};function CG(e,t,n){if(n===0)return!1;let r=Math.abs(e.clientX-t.clientX),i=Math.abs(e.clientY-t.clientY);return Math.max(r,i)<=n}var wG=(e,t)=>{let n=e.identifier;for(let e=0,r=t.length;e<r;++e){let r=t[e];if(r.identifier===n)return r}return null};function TG(e,t){return e.gos.isElementInThisInstance(t.target)}function Pve(e,t,n){let r=e.getBoundingClientRect().height,i=_ve(n)-2,a=vve(n)-2;if(!e.offsetParent)return;let o=WW(e.offsetParent),{clientY:s,clientX:c}=t,l=s-o.top-r/2,u=c-o.left-10,d=fW(n),f=d.defaultView||window,p=f.pageYOffset||d.documentElement.scrollTop,m=f.pageXOffset||d.documentElement.scrollLeft;i>0&&u+e.clientWidth>i+m&&(u=i+m-e.clientWidth),u<0&&(u=0),a>0&&l+e.clientHeight>a+p&&(l=a+p-e.clientHeight),l<0&&(l=0),e.style.left=`${u}px`,e.style.top=`${l}px`}var EG=(e,...t)=>{for(let n of t){let[t,r,i,a]=n;t.addEventListener(r,i,a),e.push(n)}},DG=e=>{if(e){for(let[t,n,r,i]of e)t.removeEventListener(n,r,i);e.length=0}},OG=e=>{e.cancelable&&e.preventDefault()};function Fve(e,t){return t}function kG(e){return e?.getLocaleTextFunc()??Fve}function Ive(e,t,n,r){let i=t[n];return e.getLocaleTextFunc()(n,typeof i==`function`?i(r):i,r)}function Lve(e){return(t,n,r)=>e({key:t,defaultValue:n,variableValues:r})}function Rve(e){return(t,n,r)=>{let i=e?.[t];if(i&&r?.length){let e=0;for(;!(e>=r.length||i.indexOf("${variable}")===-1);)i=i.replace("${variable}",r[e++])}return i??n}}var AG=class{constructor(){this.destroyFunctions=[],this.destroyed=!1,this.__v_skip=!0,this.propertyListenerId=0,this.lastChangeSetIdLookup={},this.isAlive=()=>!this.destroyed}preWireBeans(e){this.beans=e,this.stubContext=e.context,this.eventSvc=e.eventSvc,this.gos=e.gos}destroy(){let{destroyFunctions:e}=this;for(let t=0;t<e.length;t++)e[t]();e.length=0,this.destroyed=!0,this.dispatchLocalEvent({type:`destroyed`})}addEventListener(e,t,n){this.localEventService||=new oW,this.localEventService.addEventListener(e,t,n)}removeEventListener(e,t,n){this.localEventService?.removeEventListener(e,t,n)}dispatchLocalEvent(e){this.localEventService?.dispatchEvent(e)}addManagedElementListeners(e,t){return this._setupListeners(e,t)}addManagedEventListeners(e){return this._setupListeners(this.eventSvc,e)}addManagedListeners(e,t){return this._setupListeners(e,t)}_setupListeners(e,t){let n=[];for(let r of Object.keys(t)){let i=t[r];i&&n.push(this._setupListener(e,r,i))}return n}_setupListener(e,t,n){if(this.destroyed)return()=>null;let r;if(zve(e))e.__addEventListener(t,n),r=()=>(e.__removeEventListener(t,n),null);else{let i=Bve(e);e instanceof HTMLElement?xG(e,t,n):i?e.addListener(t,n):e.addEventListener(t,n),r=i?()=>(e.removeListener(t,n),null):()=>(e.removeEventListener(t,n),null)}return this.destroyFunctions.push(r),()=>(r(),this.destroyFunctions=this.destroyFunctions.filter(e=>e!==r),null)}setupPropertyListener(e,t){let{gos:n}=this;n.addPropertyEventListener(e,t);let r=()=>(n.removePropertyEventListener(e,t),null);return this.destroyFunctions.push(r),()=>(r(),this.destroyFunctions=this.destroyFunctions.filter(e=>e!==r),null)}addManagedPropertyListener(e,t){return this.destroyed?()=>null:this.setupPropertyListener(e,t)}addManagedPropertyListeners(e,t){if(this.destroyed)return;let n=e.join(`-`)+this.propertyListenerId++,r=e=>{if(e.changeSet){if(e.changeSet&&e.changeSet.id===this.lastChangeSetIdLookup[n])return;this.lastChangeSetIdLookup[n]=e.changeSet.id}t({type:`propertyChanged`,changeSet:e.changeSet,source:e.source})};for(let t of e)this.setupPropertyListener(t,r)}getLocaleTextFunc(){return kG(this.beans.localeSvc)}addDestroyFunc(e){this.isAlive()?this.destroyFunctions.push(e):e()}createOptionalManagedBean(e,t){return e?this.createManagedBean(e,t):void 0}createManagedBean(e,t){let n=this.createBean(e,t);return this.addDestroyFunc(this.destroyBean.bind(this,e,t)),n}createBean(e,t,n){return(t||this.stubContext).createBean(e,n)}destroyBean(e,t){return(t||this.stubContext).destroyBean(e)}destroyBeans(e,t){return(t||this.stubContext).destroyBeans(e)}};function zve(e){return e.__addEventListener!==void 0}function Bve(e){return e.eventServiceType===`global`}var Q=class extends AG{},jG=new Set,MG=(e,t)=>{jG.has(t)||(jG.add(t),e())};MG._set=jG;var Vve={pending:!1,funcs:[]},Hve={pending:!1,funcs:[]};function NG(e,t=`setTimeout`,n){let r=t===`raf`?Hve:Vve;if(r.funcs.push(e),r.pending)return;r.pending=!0;let i=()=>{let e=r.funcs.slice();r.funcs.length=0,r.pending=!1;for(let t of e)t()};t===`raf`?lG(n,i):window.setTimeout(i,0)}function PG(e,t,n){let r;return function(...i){let a=this;return window.clearTimeout(r),r=window.setTimeout(function(){e.isAlive()&&t.apply(a,i)},n),r}}function FG(e,t){let n=0;return function(...r){let i=this,a=Date.now();a-n<t||(n=a,e.apply(i,r))}}function Uve(e,t,n,r=100){let i=Date.now(),a=null,o=!1,s=()=>{a!=null&&(window.clearInterval(a),a=null)};e.addDestroyFunc(s);let c=()=>{let e=Date.now()-i>r;(t()||e)&&(n(),o=!0,s())};c(),o||(a=window.setInterval(c,10))}var IG=new Set([`__proto__`,`constructor`,`prototype`]);function Wve(e,t){if(e!=null){if(Array.isArray(e)){for(let n=0;n<e.length;n++)t(n.toString(),e[n]);return}for(let n of Object.keys(e).filter(e=>!IG.has(e)))t(n,e[n])}}function LG(e,t,n=!0,r=!1){nW(t)&&Wve(t,(t,i)=>{let a=e[t];a!==i&&(r&&a==null&&typeof i==`object`&&i&&i.constructor===Object&&(a={},e[t]=a),RG(i)&&RG(a)&&!Array.isArray(a)?LG(a,i,n,r):(n||i!==void 0)&&(e[t]=i))})}function RG(e){return typeof e==`object`&&!!e}var zG=class e{static applyGlobalGridOptions(t){if(!e.gridOptions)return{...t};let n={};return LG(n,e.gridOptions,!0,!0),e.mergeStrategy===`deep`?LG(n,t,!0,!0):n={...n,...t},e.gridOptions.context&&(n.context=e.gridOptions.context),t.context&&(e.mergeStrategy===`deep`&&n.context&&LG(t.context,n.context,!0,!0),n.context=t.context),n}static applyGlobalGridOption(t,n){if(e.mergeStrategy===`deep`){let r=VG(t);if(r&&typeof r==`object`&&typeof n==`object`)return e.applyGlobalGridOptions({[t]:n})[t]}return n}};zG.gridOptions=void 0,zG.mergeStrategy=`shallow`;var BG=zG;function VG(e){return BG.gridOptions?.[e]}var HG={suppressContextMenu:!1,preventDefaultOnContextMenu:!1,allowContextMenuWithControlKey:!1,suppressMenuHide:!0,enableBrowserTooltips:!1,tooltipTrigger:`hover`,tooltipShowDelay:2e3,tooltipSwitchShowDelay:200,tooltipHideDelay:1e4,tooltipMouseTrack:!1,tooltipShowMode:`standard`,tooltipInteraction:!1,copyHeadersToClipboard:!1,copyGroupHeadersToClipboard:!1,clipboardDelimiter:` `,suppressCopyRowsToClipboard:!1,suppressCopySingleCellRanges:!1,suppressLastEmptyLineOnPaste:!1,suppressClipboardPaste:!1,suppressClipboardApi:!1,suppressCutToClipboard:!1,maintainColumnOrder:!1,enableStrictPivotColumnOrder:!1,suppressFieldDotNotation:!1,allowDragFromColumnsToolPanel:!1,suppressMovableColumns:!1,suppressColumnMoveAnimation:!1,suppressMoveWhenColumnDragging:!1,suppressDragLeaveHidesColumns:!1,suppressRowGroupHidesColumns:!1,suppressAutoSize:!1,autoSizePadding:20,skipHeaderOnAutoSize:!1,singleClickEdit:!1,suppressClickEdit:!1,readOnlyEdit:!1,stopEditingWhenCellsLoseFocus:!1,enterNavigatesVertically:!1,enterNavigatesVerticallyAfterEdit:!1,enableCellEditingOnBackspace:!1,undoRedoCellEditing:!1,undoRedoCellEditingLimit:10,suppressCsvExport:!1,suppressExcelExport:!1,cacheQuickFilter:!1,includeHiddenColumnsInQuickFilter:!1,excludeChildrenWhenTreeDataFiltering:!1,enableAdvancedFilter:!1,includeHiddenColumnsInAdvancedFilter:!1,enableCharts:!1,masterDetail:!1,keepDetailRows:!1,keepDetailRowsCount:10,detailRowAutoHeight:!1,tabIndex:0,rowBuffer:10,valueCache:!1,valueCacheNeverExpires:!1,enableCellExpressions:!1,suppressTouch:!1,suppressFocusAfterRefresh:!1,suppressBrowserResizeObserver:!1,suppressPropertyNamesCheck:!1,suppressChangeDetection:!1,debug:!1,suppressLoadingOverlay:!1,suppressNoRowsOverlay:!1,pagination:!1,paginationPageSize:100,paginationPageSizeSelector:!0,paginationAutoPageSize:!1,paginateChildRows:!1,suppressPaginationPanel:!1,pivotMode:!1,pivotPanelShow:`never`,pivotDefaultExpanded:0,pivotSuppressAutoColumn:!1,suppressExpandablePivotGroups:!1,functionsReadOnly:!1,suppressAggFuncInHeader:!1,alwaysAggregateAtRootLevel:!1,aggregateOnlyChangedColumns:!1,suppressAggFilteredOnly:!1,removePivotHeaderRowWhenSingleValueColumn:!1,animateRows:!0,cellFlashDuration:500,cellFadeDuration:1e3,allowShowChangeAfterFilter:!1,domLayout:`normal`,ensureDomOrder:!1,enableRtl:!1,suppressColumnVirtualisation:!1,suppressMaxRenderedRowRestriction:!1,suppressRowVirtualisation:!1,rowDragManaged:!1,refreshAfterGroupEdit:!1,rowDragInsertDelay:500,suppressRowDrag:!1,suppressMoveWhenRowDragging:!1,rowDragEntireRow:!1,rowDragMultiRow:!1,embedFullWidthRows:!1,groupDisplayType:`singleColumn`,groupDefaultExpanded:0,groupMaintainOrder:!1,groupSelectsChildren:!1,groupSuppressBlankHeader:!1,groupSelectsFiltered:!1,showOpenedGroup:!1,groupRemoveSingleChildren:!1,groupRemoveLowestSingleChildren:!1,groupHideOpenParents:!1,groupHideColumnsUntilExpanded:!1,groupAllowUnbalanced:!1,rowGroupPanelShow:`never`,suppressMakeColumnVisibleAfterUnGroup:!1,treeData:!1,rowGroupPanelSuppressSort:!1,suppressGroupRowsSticky:!1,rowModelType:`clientSide`,asyncTransactionWaitMillis:50,suppressModelUpdateAfterUpdateTransaction:!1,cacheOverflowSize:1,infiniteInitialRowCount:1,serverSideInitialRowCount:1,cacheBlockSize:100,maxBlocksInCache:-1,maxConcurrentDatasourceRequests:2,blockLoadDebounceMillis:0,purgeClosedRowNodes:!1,serverSideSortAllLevels:!1,serverSideOnlyRefreshFilteredGroups:!1,serverSidePivotResultFieldSeparator:`_`,viewportRowModelPageSize:5,viewportRowModelBufferSize:5,alwaysShowHorizontalScroll:!1,alwaysShowVerticalScroll:!1,debounceVerticalScrollbar:!1,suppressHorizontalScroll:!1,suppressScrollOnNewData:!1,suppressScrollWhenPopupsAreOpen:!1,suppressAnimationFrame:!1,suppressMiddleClickScrolls:!1,suppressPreventDefaultOnMouseWheel:!1,rowMultiSelectWithClick:!1,suppressRowDeselection:!1,suppressRowClickSelection:!1,suppressCellFocus:!1,suppressHeaderFocus:!1,suppressMultiRangeSelection:!1,enableCellTextSelection:!1,enableRangeSelection:!1,enableRangeHandle:!1,enableFillHandle:!1,fillHandleDirection:`xy`,suppressClearOnFillReduction:!1,accentedSort:!1,unSortIcon:!1,suppressMultiSort:!1,alwaysMultiSort:!1,suppressMaintainUnsortedOrder:!1,suppressRowHoverHighlight:!1,suppressRowTransform:!1,columnHoverHighlight:!1,deltaSort:!1,enableGroupEdit:!1,groupLockGroupColumns:0,serverSideEnableClientSideSort:!1,suppressServerSideFullWidthLoadingRow:!1,pivotMaxGeneratedColumns:-1,columnMenu:`new`,reactiveCustomComponents:!0,suppressSetFilterByDefault:!1,enableFilterHandlers:!1},UG=`https://www.ag-grid.com`;function WG(e,t,...n){e.get(`debug`)&&console.log(`AG Grid: `+t,...n)}function GG(e,...t){MG(()=>qG(e,...t),e+t?.join(``))}function KG(e,...t){MG(()=>Gve(e,...t),e+t?.join(``))}function Gve(e,...t){console.error(`AG Grid: `+e,...t)}function qG(e,...t){console.warn(`AG Grid: `+e,...t)}var JG=new Set,YG={},XG={},ZG,QG=!1,$G=!1,Kve=!1;function qve(e){let[t,n]=e.version.split(`.`)||[],[r,i]=ZG.split(`.`)||[];return t===r&&n===i}function Jve(e){ZG||=e.version;let t=e=>`You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. ${e} Please update all modules to the same version.`;e.version?qve(e)||KG(t(`'${e.moduleName}' is version ${e.version} but the other modules are version ${ZG}.`)):KG(t(`'${e.moduleName}' is incompatible.`));let n=e.validate?.();n&&!n.isValid&&KG(`${n.message}`)}function eK(e,t,n=!1){n||(QG=!0),Jve(e);let r=e.rowModels??[`all`];JG.add(e);let i;t===void 0?i=YG:($G=!0,XG[t]===void 0&&(XG[t]={}),i=XG[t]);for(let t of r)i[t]===void 0&&(i[t]={}),i[t][e.moduleName]=e;if(e.dependsOn)for(let r of e.dependsOn)eK(r,t,n)}function Yve(e){delete XG[e]}function tK(e,t,n){let r=n=>!!YG[n]?.[e]||!!XG[t]?.[n]?.[e];return r(n)||r(`all`)}function nK(){return $G}function Xve(e,t){let n=XG[e]??{};return[...Object.values(YG.all??{}),...Object.values(n.all??{}),...Object.values(YG[t]??{}),...Object.values(n[t]??{})]}function Zve(){return new Set(JG)}function Qve(e,t){let n=XG[e]??{};return[...Object.values(n.all??{}),...Object.values(n[t]??{})]}function $ve(){return QG}function rK(){return Kve}function iK(e){for(let t of e){if(`setLicenseKey`in t)return t;if(t.dependsOn){let e=iK(t.dependsOn);if(e)return e}}}var aK=`35.2.1`,oK=2e3,sK=100,cK=`_version_`,lK=null,uK=`${UG}/javascript-data-grid`;function eye(e){lK=e}function tye(e){uK=e}function dK(e,t,n){return lK?.(e,t)??[aye(e,t,n)]}function fK(e,t,n,r,i){e(`${r?`warning`:`error`} #${t}`,...dK(t,n,i))}function nye(e){if(!e)return String(e);let t={};for(let n of Object.keys(e))typeof e[n]!=`object`&&typeof e[n]!=`function`&&(t[n]=e[n]);return JSON.stringify(t)}function rye(e){let t=e;return e instanceof Error?t=e.toString():typeof e==`object`&&(t=nye(e)),t}function pK(e){return e===void 0?`undefined`:e===null?`null`:e}function mK(e,t){return`${e}?${t.toString()}`}function iye(e,t,n){let r=Array.from(t.entries()).sort((e,t)=>t[1].length-e[1].length),i=mK(e,t);for(let[a,o]of r){if(a===cK)continue;let r=i.length-n;if(r<=0)break;let s=r+3,c=o.length-s>sK?o.slice(0,o.length-s)+`...`:o.slice(0,sK)+`...`;t.set(a,c),i=mK(e,t)}return i}function hK(e,t){let n=new URLSearchParams;if(n.append(cK,aK),t)for(let e of Object.keys(t))n.append(e,rye(t[e]));let r=`${uK}/errors/${e}`,i=mK(r,n);return i.length<=oK?i:iye(r,n,oK)}var aye=(e,t,n)=>{let r=hK(e,t),i=`${n?n+` 18`:``}Visit ${r}`;return rK()?i:`${i}${n?``:` 19 Alternatively register the ValidationModule to see the full message in the console.`}`};function gK(...e){fK(GG,e[0],e[1],!0)}function _K(...e){fK(KG,e[0],e[1],!1)}function vK(e,t,n){fK(KG,e,t,!1,n)}function oye(e,t){let n=t[0];return`error #${n} `+dK(n,t[1],e).join(` `)}function yK(...e){return oye(void 0,e)}function bK(e,t){return e.get(`rowModelType`)===t}function xK(e,t){return bK(e,`clientSide`)}function SK(e,t){return bK(e,`serverSide`)}function CK(e,t){return e.get(`domLayout`)===t}function wK(e){return qK(e)!==void 0}function TK(e){return typeof e.get(`getRowHeight`)==`function`}function sye(e,t){return t?!e.get(`enableStrictPivotColumnOrder`):e.get(`maintainColumnOrder`)}function cye({gos:e,formula:t}){let n=e.get(`rowNumbers`);return n||!!t?.active&&n!==!1}function EK(e,t,n=!1,r){let{gos:i,environment:a}=e;if(r??=a.getDefaultRowHeight(),TK(i)){if(n)return{height:r,estimated:!0};let e={node:t,data:t.data},a=i.getCallback(`getRowHeight`)(e);if(OK(a))return a===0&&gK(23),{height:Math.max(1,a),estimated:!1}}if(t.detail&&i.get(`masterDetail`))return lye(i);let o=i.get(`rowHeight`);return{height:o&&OK(o)?o:r,estimated:!1}}function lye(e){if(e.get(`detailRowAutoHeight`))return{height:1,estimated:!1};let t=e.get(`detailRowHeight`);return OK(t)?{height:t,estimated:!1}:{height:300,estimated:!1}}function DK(e){let{environment:t,gos:n}=e,r=n.get(`rowHeight`);if(!r||rW(r))return t.getDefaultRowHeight();let i=t.refreshRowHeightVariable();return i===-1?(gK(24),t.getDefaultRowHeight()):i}function OK(e){return!isNaN(e)&&typeof e==`number`&&isFinite(e)}function kK(e,t,n){let r=t[e.getDomDataKey()];return r?r[n]:void 0}function AK(e,t,n,r){let i=e.getDomDataKey(),a=t[i];rW(a)&&(a={},t[i]=a),a[n]=r}function jK(e){return!e.get(`ensureDomOrder`)&&e.get(`animateRows`)}function MK(e){return!(e.get(`paginateChildRows`)||e.get(`groupHideOpenParents`)||CK(e,`print`))}function NK(e){return!e.get(`autoGroupColumnDef`)?.comparator&&!e.get(`treeData`)}function PK(e){let t=e.get(`groupAggFiltering`);if(typeof t==`function`)return e.getCallback(`groupAggFiltering`);if(t===!0)return()=>!0}function FK(e){return e.get(`grandTotalRow`)}function uye(e){return e.get(`groupHideOpenParents`)?!0:e.get(`groupDisplayType`)===`multipleColumns`}function dye(e){return uye(e)&&e.get(`groupHideColumnsUntilExpanded`)&&xK(e)}function IK(e,t){return!t&&e.get(`groupDisplayType`)===`groupRows`}function LK(e,t,n){return!!t.group&&!t.footer&&IK(e,n)}function RK(e){let t=e.getCallback(`getRowId`);return t===void 0?t:e=>{let n=t(e);return typeof n!=`string`&&(MG(()=>gK(25,{id:n}),`getRowIdString`),n=String(n)),n}}function fye(e,t){let n=e.get(`groupHideParentOfSingleChild`);return!!(n===!0||n===`leafGroupsOnly`&&t.leafGroup||e.get(`groupRemoveSingleChildren`)||e.get(`groupRemoveLowestSingleChildren`)&&t.leafGroup)}function pye(e){let t=e.get(`maxConcurrentDatasourceRequests`);return t>0?t:void 0}function zK(e){return e?.checkboxes??!0}function BK(e){return e?.mode===`multiRow`&&(e.headerCheckbox??!0)}function VK(e){if(typeof e==`object`)return e.checkboxLocation??`selectionColumn`}function HK(e){return e?.hideDisabledCheckboxes??!1}function mye(e){return typeof e.get(`rowSelection`)!=`string`}function UK(e){let t=e.get(`cellSelection`);return t===void 0?e.get(`enableRangeSelection`):!!t}function WK(e){let t=e.get(`cellSelection`)??!1;return(typeof t==`object`&&t.enableColumnSelection)??!1}function GK(e){let t=e.get(`rowSelection`)??`single`;if(typeof t==`string`){let t=e.get(`suppressRowClickSelection`),n=e.get(`suppressRowDeselection`);return t&&n?!1:t?`enableDeselection`:!n||`enableSelection`}return t.mode===`singleRow`||t.mode===`multiRow`?t.enableClickSelection??!1:!1}function hye(e){let t=GK(e);return t===!0||t===`enableSelection`}function gye(e){let t=GK(e);return t===!0||t===`enableDeselection`}function KK(e){let t=e.get(`rowSelection`);return typeof t==`string`?e.get(`isRowSelectable`):t?.isRowSelectable}function qK(e){let t=`beanName`in e&&e.beanName===`gos`?e.get(`rowSelection`):e.rowSelection;if(typeof t==`string`)switch(t){case`multiple`:return`multiRow`;case`single`:return`singleRow`;default:return}switch(t?.mode){case`multiRow`:case`singleRow`:return t.mode;default:return}}function JK(e){return qK(e)===`multiRow`}function _ye(e){let t=e.get(`rowSelection`);return typeof t==`string`?e.get(`rowMultiSelectWithClick`):t?.enableSelectionWithoutKeys??!1}function YK(e){let t=e.get(`rowSelection`);if(typeof t==`string`){let t=e.get(`groupSelectsChildren`),n=e.get(`groupSelectsFiltered`);return t&&n?`filteredDescendants`:t?`descendants`:`self`}return t?.mode===`multiRow`?t.groupSelects:void 0}function XK(e,t=!0){let n=e.get(`rowSelection`);return typeof n==`object`?n.mode===`multiRow`?n.selectAll:`all`:t?`all`:void 0}function vye(e){let t=e.get(`rowSelection`);return typeof t==`string`?!1:t?.mode===`multiRow`?t.ctrlASelectsRows??!1:!1}function ZK(e){let t=YK(e);return t===`descendants`||t===`filteredDescendants`}function QK(e){let t=e.get(`rowSelection`);return typeof t==`object`&&t.masterSelects||`self`}function yye(e){return e.isModuleRegistered(`SetFilter`)&&!e.get(`suppressSetFilterByDefault`)}function $K(e){return e.get(`columnMenu`)===`legacy`}function bye(e){return!$K(e)}function xye(e){return!e||e.length<2?e:`on`+e[0].toUpperCase()+e.substring(1)}function Sye(e,t,n){typeof e!=`object`&&(e={});let r={...e};for(let e of n){let n=t[e];n!==void 0&&(r[e]=n)}return r}function Cye(e,t){if(!e)return;let n={},r=!1;for(let t of Object.keys(e))n[t]=e[t],r=!0;if(!r)return;let i={type:`gridOptionsChanged`,options:n};t.dispatchEvent(i);let a={type:`componentStateChanged`,...n};t.dispatchEvent(a)}function eq(e,t){return e.addCommon(t)}function tq(e,t){return e[t]??e.gridOptions?.[t]??VG(t)??HG[t]}function wye({gos:e},t){return t.button===2||t.ctrlKey&&e.get(`allowContextMenuWithControlKey`)}var Tye={resizable:!0,sortable:!0},Eye=0;function nq(){return Eye++}function rq(e){return e instanceof iq}var Dye=[`asc`,`desc`,null],Oye=[{type:`absolute`,direction:`asc`},{type:`absolute`,direction:`desc`},null],iq=class extends Q{constructor(e,t,n,r){super(),this.colDef=e,this.userProvidedColDef=t,this.colId=n,this.primary=r,this.isColumn=!0,this.instanceId=nq(),this.autoHeaderHeight=null,this.sortDef=aq(),this._wasSortExplicitlyRemoved=!1,this.moving=!1,this.resizing=!1,this.menuVisible=!1,this.formulaRef=null,this.lastLeftPinned=!1,this.firstRightPinned=!1,this.filterActive=!1,this.colEventSvc=new oW,this.tooltipEnabled=!1,this.rowGroupActive=!1,this.pivotActive=!1,this.aggregationActive=!1,this.flex=null,this.colIdSanitised=cW(n)}destroy(){super.destroy(),this.beans.rowSpanSvc?.deregister(this)}getInstanceId(){return this.instanceId}initState(){let{colDef:e,beans:{sortSvc:t,pinnedCols:n,colFlex:r}}=this;t?.initCol(this);let i=e.hide;this.visible=i===void 0?!e.initialHide:!i,n?.initCol(this),r?.initCol(this)}setColDef(e,t,n){let r=e.spanRows!==this.colDef.spanRows;this.colDef=e,this.userProvidedColDef=t,this.initMinAndMaxWidths(),this.initDotNotation(),this.initTooltip(),r&&(this.beans.rowSpanSvc?.deregister(this),this.initRowSpan()),this.dispatchColEvent(`colDefChanged`,n)}getUserProvidedColDef(){return this.userProvidedColDef}getParent(){return this.parent}getOriginalParent(){return this.originalParent}postConstruct(){this.initState(),this.initMinAndMaxWidths(),this.resetActualWidth(`gridInitializing`),this.initDotNotation(),this.initTooltip(),this.initRowSpan(),this.addPivotListener()}initDotNotation(){let{gos:e,colDef:{field:t,tooltipField:n}}=this,r=e.get(`suppressFieldDotNotation`);this.fieldContainsDots=nW(t)&&t.includes(`.`)&&!r,this.tooltipFieldContainsDots=nW(n)&&n.includes(`.`)&&!r}initMinAndMaxWidths(){let e=this.colDef;this.minWidth=e.minWidth??this.beans.environment.getDefaultColumnMinWidth(),this.maxWidth=e.maxWidth??2**53-1}initTooltip(){this.beans.tooltipSvc?.initCol(this)}initRowSpan(){this.colDef.spanRows&&this.beans.rowSpanSvc?.register(this)}addPivotListener(){let e=this.beans.pivotColDefSvc,t=this.colDef.pivotValueColumn;e&&t&&this.addManagedListeners(t,{colDefChanged:t=>{let n=e.recreateColDef(this.colDef);this.setColDef(n,n,t.source)}})}resetActualWidth(e){let t=this.calculateColInitialWidth(this.colDef);this.setActualWidth(t,e,!0)}calculateColInitialWidth(e){let t=e.width??e.initialWidth??200;return Math.max(Math.min(t,this.maxWidth),this.minWidth)}isEmptyGroup(){return!1}isRowGroupDisplayed(e){return this.beans.showRowGroupCols?.isRowGroupDisplayed(this,e)??!1}isPrimary(){return this.primary}isFilterAllowed(){return!!this.colDef.filter}isFieldContainsDots(){return this.fieldContainsDots}isTooltipEnabled(){return this.tooltipEnabled}isTooltipFieldContainsDots(){return this.tooltipFieldContainsDots}getHighlighted(){return this.highlighted}__addEventListener(e,t){this.colEventSvc.addEventListener(e,t)}__removeEventListener(e,t){this.colEventSvc.removeEventListener(e,t)}addEventListener(e,t){this.frameworkEventListenerService=this.beans.frameworkOverrides.createLocalEventListenerWrapper?.(this.frameworkEventListenerService,this.colEventSvc);let n=this.frameworkEventListenerService?.wrap(e,t)??t;this.colEventSvc.addEventListener(e,n)}removeEventListener(e,t){let n=this.frameworkEventListenerService?.unwrap(e,t)??t;this.colEventSvc.removeEventListener(e,n)}createColumnFunctionCallbackParams(e){return eq(this.gos,{node:e,data:e.data,column:this,colDef:this.colDef})}isSuppressNavigable(e){return this.beans.cellNavigation?.isSuppressNavigable(this,e)??!1}isCellEditable(e){return this.beans.editSvc?.isCellEditable({rowNode:e,column:this})??!1}isSuppressFillHandle(){return!!this.colDef.suppressFillHandle}isAutoHeight(){return!!this.colDef.autoHeight}isAutoHeaderHeight(){return!!this.colDef.autoHeaderHeight}isRowDrag(e){return this.isColumnFunc(e,this.colDef.rowDrag)}isDndSource(e){return this.isColumnFunc(e,this.colDef.dndSource)}isCellCheckboxSelection(e){return this.beans.selectionSvc?.isCellCheckboxSelection(this,e)??!1}isSuppressPaste(e){return this.isColumnFunc(e,this.colDef?.suppressPaste??null)}isResizable(){return!!this.getColDefValue(`resizable`)}getColDefValue(e){return this.colDef[e]??Tye[e]}isColumnFunc(e,t){return typeof t==`boolean`?t:typeof t==`function`&&t(this.createColumnFunctionCallbackParams(e))}createColumnEvent(e,t){return eq(this.gos,{type:e,column:this,columns:[this],source:t})}isMoving(){return this.moving}getSort(){return this.sortDef.direction}getSortDef(){return this.sortDef.direction?this.sortDef:null}getColDefAllowedSortTypes(){let e=[],{sort:t,initialSort:n}=this.colDef,r=t===null?t:dq(t?.type),i=n===null?n:dq(n?.type);return r&&e.push(r),i&&e.push(i),e}getSortingOrder(){let e=this.getColDefAllowedSortTypes().includes(`absolute`)?Oye:Dye;return(this.colDef.sortingOrder??this.gos.get(`sortingOrder`)??e).map(e=>aq(e))}getAvailableSortTypes(){let e=this.getSortingOrder().reduce((e,t)=>(t.direction&&e.push(t.type),e),this.getColDefAllowedSortTypes());return new Set(e)}get wasSortExplicitlyRemoved(){return this._wasSortExplicitlyRemoved}setSortDef(e,t=!1){t||(this._wasSortExplicitlyRemoved=!e.direction),this.sortDef=e}isSortable(){return!!this.getColDefValue(`sortable`)}isSortAscending(){return this.getSort()===`asc`}isSortDescending(){return this.getSort()===`desc`}isSortNone(){return rW(this.getSort())}isSorting(){return nW(this.getSort())}getSortIndex(){return this.sortIndex}isMenuVisible(){return this.menuVisible}getAggFunc(){return this.aggFunc}getLeft(){return this.left}getOldLeft(){return this.oldLeft}getRight(){return this.left+this.actualWidth}setLeft(e,t){this.oldLeft=this.left,this.left!==e&&(this.left=e,this.dispatchColEvent(`leftChanged`,t))}isFilterActive(){return this.filterActive}isHovered(){return gK(261),!!this.beans.colHover?.isHovered(this)}setFirstRightPinned(e,t){this.firstRightPinned!==e&&(this.firstRightPinned=e,this.dispatchColEvent(`firstRightPinnedChanged`,t))}setLastLeftPinned(e,t){this.lastLeftPinned!==e&&(this.lastLeftPinned=e,this.dispatchColEvent(`lastLeftPinnedChanged`,t))}isFirstRightPinned(){return this.firstRightPinned}isLastLeftPinned(){return this.lastLeftPinned}isPinned(){return this.pinned===`left`||this.pinned===`right`}isPinnedLeft(){return this.pinned===`left`}isPinnedRight(){return this.pinned===`right`}getPinned(){return this.pinned}setVisible(e,t){let n=e===!0;this.visible!==n&&(this.visible=n,this.dispatchColEvent(`visibleChanged`,t)),this.dispatchStateUpdatedEvent(`hide`)}isVisible(){return this.visible}isSpanHeaderHeight(){return!this.getColDef().suppressSpanHeaderHeight}getFirstRealParent(){let e=this.getOriginalParent();for(;e?.isPadding();)e=e.getOriginalParent();return e}getColumnGroupPaddingInfo(){let e=this.getParent();if(!e?.isPadding())return{numberOfParents:0,isSpanningTotal:!1};let t=e.getPaddingLevel()+1,n=!0;for(;e;){if(!e.isPadding()){n=!1;break}e=e.getParent()}return{numberOfParents:t,isSpanningTotal:n}}getColDef(){return this.colDef}getDefinition(){return this.colDef}getColumnGroupShow(){return this.colDef.columnGroupShow}getColId(){return this.colId}getId(){return this.colId}getUniqueId(){return this.colId}getActualWidth(){return this.actualWidth}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(e){let t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}createBaseColDefParams(e){return eq(this.gos,{node:e,data:e.data,colDef:this.colDef,column:this})}getColSpan(e){if(rW(this.colDef.colSpan))return 1;let t=this.createBaseColDefParams(e),n=this.colDef.colSpan(t);return Math.max(n,1)}getRowSpan(e){if(rW(this.colDef.rowSpan))return 1;let t=this.createBaseColDefParams(e),n=this.colDef.rowSpan(t);return Math.max(n,1)}setActualWidth(e,t,n=!1){e=Math.max(e,this.minWidth),e=Math.min(e,this.maxWidth),this.actualWidth!==e&&(this.actualWidth=e,this.flex!=null&&t!==`flex`&&t!==`gridInitializing`&&(this.flex=null),n||this.fireColumnWidthChangedEvent(t)),this.dispatchStateUpdatedEvent(`width`)}fireColumnWidthChangedEvent(e){this.dispatchColEvent(`widthChanged`,e)}isGreaterThanMax(e){return e>this.maxWidth}getMinWidth(){return this.minWidth}getMaxWidth(){return this.maxWidth}getFlex(){return this.flex}isRowGroupActive(){return this.rowGroupActive}isPivotActive(){return this.pivotActive}isAnyFunctionActive(){return this.isPivotActive()||this.isRowGroupActive()||this.isValueActive()}isAnyFunctionAllowed(){return this.isAllowPivot()||this.isAllowRowGroup()||this.isAllowValue()}isValueActive(){return this.aggregationActive}isAllowPivot(){return this.colDef.enablePivot===!0}isAllowValue(){return this.colDef.enableValue===!0}isAllowRowGroup(){return this.colDef.enableRowGroup===!0}isAllowFormula(){return this.colDef.allowFormula===!0}dispatchColEvent(e,t,n){let r=this.createColumnEvent(e,t);n&&LG(r,n),this.colEventSvc.dispatchEvent(r)}dispatchStateUpdatedEvent(e){this.colEventSvc.dispatchEvent({type:`columnStateUpdated`,key:e})}};function aq(e){return cq(e)?{direction:e.direction,type:e.type}:{direction:uq(e),type:dq(e)}}function oq(e){return e===`asc`||e===`desc`||e===null}function sq(e){return e==="default"||e===`absolute`}function cq(e){if(!e||typeof e!=`object`)return!1;let t=e;return sq(t.type)&&oq(t.direction)}function lq(e,t){return e?t?e.type===t.type&&e.direction===t.direction:!e||e.direction===null:!t||t.direction===null}function uq(e){return oq(e)?e:null}function dq(e){return sq(e)?e:`default`}function kye(e,t,n){let r=n?.()??t.sortSvc.getDisplaySortForColumn(e),i=dq(r?.type),a=uq(r?.direction),o=e.getAvailableSortTypes();return{isDefaultSortAllowed:o.has(`default`),isAbsoluteSortAllowed:o.has(`absolute`),isAbsoluteSort:i===`absolute`,isDefaultSort:i==="default",isAscending:a===`asc`,isDescending:a===`desc`,direction:a}}function fq(e){return e instanceof pq}var pq=class extends Q{constructor(e,t,n,r){super(),this.colGroupDef=e,this.groupId=t,this.padding=n,this.level=r,this.isColumn=!1,this.expandable=!1,this.instanceId=nq(),this.expandableListenerRemoveCallback=null,this.expanded=!!e?.openByDefault}destroy(){this.expandableListenerRemoveCallback&&this.reset(null,void 0),super.destroy()}reset(e,t){this.colGroupDef=e,this.level=t,this.originalParent=null,this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback(),this.children=void 0,this.expandable=void 0}getInstanceId(){return this.instanceId}getOriginalParent(){return this.originalParent}getLevel(){return this.level}isVisible(){return this.children?this.children.some(e=>e.isVisible()):!1}isPadding(){return this.padding}setExpanded(e){this.expanded=e!==void 0&&e,this.dispatchLocalEvent({type:`expandedChanged`})}isExpandable(){return this.expandable}isExpanded(){return this.expanded}getGroupId(){return this.groupId}getId(){return this.getGroupId()}setChildren(e){this.children=e}getChildren(){return this.children}getColGroupDef(){return this.colGroupDef}getLeafColumns(){let e=[];return this.addLeafColumns(e),e}forEachLeafColumn(e){if(this.children)for(let t of this.children)rq(t)?e(t):fq(t)&&t.forEachLeafColumn(e)}addLeafColumns(e){if(this.children)for(let t of this.children)rq(t)?e.push(t):fq(t)&&t.addLeafColumns(e)}getColumnGroupShow(){let e=this.colGroupDef;if(e)return e.columnGroupShow}setupExpandable(){this.setExpandable(),this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback();let e=this.onColumnVisibilityChanged.bind(this);for(let t of this.getLeafColumns())t.__addEventListener(`visibleChanged`,e);this.expandableListenerRemoveCallback=()=>{for(let t of this.getLeafColumns())t.__removeEventListener(`visibleChanged`,e);this.expandableListenerRemoveCallback=null}}setExpandable(){if(this.isPadding())return;let e=!1,t=!1,n=!1,r=this.findChildrenRemovingPadding();for(let i=0,a=r.length;i<a;i++){let a=r[i];if(!a.isVisible())continue;let o=a.getColumnGroupShow();o===`open`?(e=!0,n=!0):o===`closed`?(t=!0,n=!0):(e=!0,t=!0)}let i=e&&t&&n;this.expandable!==i&&(this.expandable=i,this.dispatchLocalEvent({type:`expandableChanged`}))}findChildrenRemovingPadding(){let e=[],t=n=>{for(let r of n)fq(r)&&r.isPadding()?t(r.children):e.push(r)};return t(this.children),e}onColumnVisibilityChanged(){this.setExpandable()}},Aye={numericColumn:{headerClass:`ag-right-aligned-header`,cellClass:`ag-right-aligned-cell`},rightAligned:{headerClass:`ag-right-aligned-header`,cellClass:`ag-right-aligned-cell`}};function mq(e,t,n){let r={},i=e.gos;return Object.assign(r,i.get(`defaultColGroupDef`)),Object.assign(r,t),i.validateColDef(r,n),r}var jye=class{constructor(){this.existingKeys={}}addExistingKeys(e){for(let t=0;t<e.length;t++)this.existingKeys[e[t]]=!0}getUniqueKey(e,t){e=iW(e);let n=0;for(;;){let r=e??t;if(r?n!==0&&(r+=`_`+n):r=n,!this.existingKeys[r]){let t=String(r);return e&&n>0&&gK(273,{providedId:e,usedId:t}),this.existingKeys[t]=!0,t}n++}}},Mye=(e,t)=>{fq(e)&&e.setupExpandable(),e.originalParent=t};function Nye(e,t=null,n,r,i){let a=new jye,{existingCols:o,existingGroups:s,existingColKeys:c}=Pye(r);a.addExistingKeys(c);let l=hq(e,t,0,n,o,a,s,i),{colGroupSvc:u}=e,d=u?.findMaxDepth(l,0)??0,f=u?u.balanceColumnTree(l,0,d,a):l;return vq(null,f,Mye),{columnTree:f,treeDepth:d}}function Pye(e){let t=[],n=[],r=[];return e&&vq(null,e,e=>{if(fq(e)){let t=e;n.push(t)}else{let n=e;r.push(n.getId()),t.push(n)}}),{existingCols:t,existingGroups:n,existingColKeys:r}}function hq(e,t,n,r,i,a,o,s){if(!t)return[];let{colGroupSvc:c}=e,l=Array(t.length);for(let u=0;u<l.length;u++){let d=t[u];c&&Bye(d)?l[u]=c.createProvidedColumnGroup(r,d,n,i,a,o,s):l[u]=Fye(e,r,d,i,a,s)}return l}function Fye(e,t,n,r,i,a){let o=Lye(n,r);o&&r?.splice(o.idx,1);let s=o?.column;if(s){let t=_q(e,n,s.getColId());s.setColDef(t,n,a),Iye(e,s,t,a)}else{let r=i.getUniqueKey(n.colId,n.field);s=new iq(_q(e,n,r),n,r,t),e.context.createBean(s)}return e.dataTypeSvc?.addColumnListeners(s),s}function gq(e,t,n,r,i,a,o,s){let{sortSvc:c,pinnedCols:l,colFlex:u}=e;n!==void 0&&t.setVisible(!n,s),c&&(c.updateColSort(t,r,s),i!==void 0&&c.setColSortIndex(t,i)),a!==void 0&&l?.setColPinned(t,a),o!==void 0&&u?.setColFlex(t,o)}function Iye(e,t,n,r){gq(e,t,n.hide,n.sort,n.sortIndex,n.pinned,n.flex,r);let i=t.getFlex();if(!(i!=null&&i>0)){if(n.width!=null)t.setActualWidth(n.width,r);else{let e=t.getActualWidth();t.setActualWidth(e,r)}}}function Lye(e,t){if(t)for(let n=0;n<t.length;n++){let r=t[n].getUserProvidedColDef();if(r){if(e.colId!=null){if(t[n].getId()===e.colId)return{idx:n,column:t[n]};continue}if(e.field!=null){if(r.field===e.field)return{idx:n,column:t[n]};continue}if(r===e)return{idx:n,column:t[n]}}}}function _q(e,t,n,r){let{gos:i,dataTypeSvc:a}=e,o={},s=i.get(`defaultColDef`);LG(o,s,!1,!0);let c=Rye(e,o,t,n);c&&zye(e,c,o);let l=o.cellDataType;LG(o,t,!1,!0),l!==void 0&&(o.cellDataType=l);let u=i.get(`autoGroupColumnDef`),d=NK(i);return t.rowGroup&&u&&d&&LG(o,{sort:u.sort,initialSort:u.initialSort},!1,!0),a?.postProcess(o),a?.validateColDef(o,t,s,n),i.validateColDef(o,n,r),o}function Rye(e,t,n,r){let i=e.dataTypeSvc?.updateColDefAndGetColumnType(t,n,r),a=n.type??i??t.type;return t.type=a,a?Tq(a):void 0}function zye(e,t,n){if(!t.length)return;let r=Object.assign({},Aye),i=e.gos.get(`columnTypes`)||{};for(let e of Object.keys(i)){let t=i[e];e in r?gK(34,{key:e}):(t.type&&gK(35),r[e]=t)}for(let e of t){let t=r[e.trim()];t?LG(n,t,!1,!0):gK(36,{t:e})}}function Bye(e){return e.children!==void 0}function vq(e,t,n){if(t)for(let r=0;r<t.length;r++){let i=t[r];fq(i)&&vq(i,i.getChildren(),n),n(i,e)}}var Vye=`ag-Grid-AutoColumn`,Hye=`ag-Grid-SelectionColumn`;function yq(e){let t=[],n=e=>{for(let r=0;r<e.length;r++){let i=e[r];rq(i)?t.push(i):fq(i)&&n(i.getChildren())}};return n(e),t}function bq(e){return e.reduce((e,t)=>e+t.getActualWidth(),0)}function xq(e,t,n){let r={};if(!t)return;vq(null,t,e=>{r[e.getInstanceId()]=e}),n&&vq(null,n,e=>{r[e.getInstanceId()]=null});let i=Object.values(r).filter(e=>e!=null);e.context.destroyBeans(i)}function Sq(e){return e.getId().startsWith(Vye)}function Cq(e){return(typeof e==`string`?e:`getColId`in e?e.getColId():e.colId)?.startsWith(`ag-Grid-SelectionColumn`)??!1}function wq(e){return(typeof e==`string`?e:`getColId`in e?e.getColId():e.colId)?.startsWith(`ag-Grid-RowNumbersColumn`)??!1}function Uye(e){return Cq(e)||wq(e)}function Tq(e){let t=[];return e instanceof Array?t=e:typeof e==`string`&&(t=e.split(`,`)),t}function Wye(e,t){return ZU(e,t,(e,t)=>e.getColId()===t.getColId())}function Gye(e){e.map={};for(let t of e.list)e.map[t.getId()]=t}function Eq(e){return e===`optionsUpdated`?`gridOptionsChanged`:e}function Dq(e,t){return e===t||e.colId==t||e.getColDef()===t}var Kye=(e,t)=>(n,r)=>{let i={value1:void 0,value2:void 0},a=!1;return e&&(e[n]!==void 0&&(i.value1=e[n],a=!0),nW(r)&&e[r]!==void 0&&(i.value2=e[r],a=!0)),!a&&t&&(t[n]!==void 0&&(i.value1=t[n]),nW(r)&&t[r]!==void 0&&(i.value2=t[r])),i};function qye(e,t){let n={...e,sort:void 0,colId:t},r=Oq(e);return r&&(n.sort=r.direction,n.sortType=r.type),n}function Oq(e){let{sort:t,initialSort:n}=e,r=cq(t)||oq(t),i=cq(n)||oq(n);return r?aq(t):i?aq(n):null}function kq(e,t){return e+`_`+t}function Aq(e){return e instanceof jq}var jq=class extends Q{constructor(e,t,n,r){super(),this.providedColumnGroup=e,this.groupId=t,this.partId=n,this.pinned=r,this.isColumn=!1,this.displayedChildren=[],this.autoHeaderHeight=null,this.parent=null,this.colIdSanitised=cW(this.getUniqueId())}reset(){this.parent=null,this.children=null,this.displayedChildren=null}getParent(){return this.parent}getUniqueId(){return kq(this.groupId,this.partId)}isEmptyGroup(){return this.displayedChildren.length===0}isMoving(){let e=this.getProvidedColumnGroup().getLeafColumns();return!e||e.length===0?!1:e.every(e=>e.isMoving())}checkLeft(){for(let e of this.displayedChildren)Aq(e)&&e.checkLeft();if(this.displayedChildren.length>0){if(this.gos.get(`enableRtl`)){let e=XU(this.displayedChildren).getLeft();this.setLeft(e)}else{let e=this.displayedChildren[0].getLeft();this.setLeft(e)}}else this.setLeft(null)}getLeft(){return this.left}getOldLeft(){return this.oldLeft}setLeft(e){this.oldLeft=this.left,this.left!==e&&(this.left=e,this.dispatchLocalEvent({type:`leftChanged`}))}getPinned(){return this.pinned}getGroupId(){return this.groupId}getPartId(){return this.partId}getActualWidth(){let e=0;for(let t of this.displayedChildren??[])e+=t.getActualWidth();return e}isResizable(){if(!this.displayedChildren)return!1;let e=!1;for(let t of this.displayedChildren)t.isResizable()&&(e=!0);return e}getMinWidth(){let e=0;for(let t of this.displayedChildren)e+=t.getMinWidth();return e}addChild(e){this.children||=[],this.children.push(e)}getDisplayedChildren(){return this.displayedChildren}getLeafColumns(){let e=[];return this.addLeafColumns(e),e}getDisplayedLeafColumns(){let e=[];return this.addDisplayedLeafColumns(e),e}getDefinition(){return this.providedColumnGroup.getColGroupDef()}getColGroupDef(){return this.providedColumnGroup.getColGroupDef()}isPadding(){return this.providedColumnGroup.isPadding()}isExpandable(){return this.providedColumnGroup.isExpandable()}isExpanded(){return this.providedColumnGroup.isExpanded()}setExpanded(e){this.providedColumnGroup.setExpanded(e)}isAutoHeaderHeight(){return!!this.getColGroupDef()?.autoHeaderHeight}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(e){let t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}addDisplayedLeafColumns(e){for(let t of this.displayedChildren??[])rq(t)?e.push(t):Aq(t)&&t.addDisplayedLeafColumns(e)}addLeafColumns(e){for(let t of this.children??[])rq(t)?e.push(t):Aq(t)&&t.addLeafColumns(e)}getChildren(){return this.children}getColumnGroupShow(){return this.providedColumnGroup.getColumnGroupShow()}getProvidedColumnGroup(){return this.providedColumnGroup}getPaddingLevel(){let e=this.getParent();return!this.isPadding()||!e?.isPadding()?0:1+e.getPaddingLevel()}calculateDisplayedColumns(){this.displayedChildren=[];let e=this;for(;e?.isPadding();)e=e.getParent();if(!(e&&e.getProvidedColumnGroup().isExpandable())){this.displayedChildren=this.children,this.dispatchLocalEvent({type:`displayedChildrenChanged`});return}for(let t of this.children??[])if(!Aq(t)||t.displayedChildren?.length)switch(t.getColumnGroupShow()){case`open`:e.getProvidedColumnGroup().isExpanded()&&this.displayedChildren.push(t);break;case`closed`:e.getProvidedColumnGroup().isExpanded()||this.displayedChildren.push(t);break;default:this.displayedChildren.push(t)}this.dispatchLocalEvent({type:`displayedChildrenChanged`})}},$={BACKSPACE:`Backspace`,TAB:`Tab`,ENTER:`Enter`,ESCAPE:`Escape`,SPACE:` `,LEFT:`ArrowLeft`,UP:`ArrowUp`,RIGHT:`ArrowRight`,DOWN:`ArrowDown`,DELETE:`Delete`,F2:`F2`,PAGE_UP:`PageUp`,PAGE_DOWN:`PageDown`,PAGE_HOME:`Home`,PAGE_END:`End`,A:`KeyA`,C:`KeyC`,D:`KeyD`,V:`KeyV`,X:`KeyX`,Y:`KeyY`,Z:`KeyZ`},Jye=65,Yye=67,Xye=86,Zye=68,Qye=90,$ye=89;function Mq(e){let{keyCode:t}=e,n;switch(t){case Jye:n=$.A;break;case Yye:n=$.C;break;case Xye:n=$.V;break;case Zye:n=$.D;break;case Qye:n=$.Z;break;case $ye:n=$.Y;break;default:n=e.code}return n}function ebe(e,t){return new Nq(n=>{n(window.setInterval(e,t))})}var Nq=class e{constructor(e){this.status=0,this.resolution=null,this.waiters=[],e(e=>this.onDone(e),e=>this.onReject(e))}static all(t){return t.length?new e(e=>{let n=t.length,r=Array(n);t.forEach((t,i)=>{t.then(t=>{r[i]=t,n--,n===0&&e(r)})})}):e.resolve()}static resolve(t=null){return new e(e=>e(t))}then(t){return new e(e=>{this.status===1?e(t(this.resolution)):this.waiters.push(n=>e(t(n)))})}onDone(e){this.status=1,this.resolution=e;for(let t of this.waiters)t(e)}onReject(e){}},tbe=class extends AG{constructor(){super(...arguments),this.beanName=`dragAndDrop`,this.dragSourceAndParamsList=[],this.dragItem=null,this.dragInitialSourcePointerOffsetX=0,this.dragInitialSourcePointerOffsetY=0,this.lastMouseEvent=null,this.lastDraggingEvent=null,this.dragSource=null,this.dragImageCompPromise=null,this.dragImageComp=null,this.dragImageLastIcon=void 0,this.dragImageLastLabel=void 0,this.dropTargets=[],this.externalDropZoneCount=0,this.lastDropTarget=null}addDragSource(e,t=!1){let n={capturePointer:!0,dragSource:e,eElement:e.eElement,dragStartPixels:e.dragStartPixels,onDragStart:t=>this.onDragStart(e,t),onDragStop:this.onDragStop.bind(this),onDragging:this.onDragging.bind(this),onDragCancel:this.onDragCancel.bind(this),includeTouch:t};this.dragSourceAndParamsList.push(n),this.beans.dragSvc.addDragSource(n)}setDragImageCompIcon(e,t=!1){let n=this.dragImageComp;n&&(t||this.dragImageLastIcon!==e)&&(this.dragImageLastIcon=e,n.setIcon(e,t))}removeDragSource(e){let{dragSourceAndParamsList:t,beans:n}=this;for(let r=0,i=t.length;r<i;r++)if(t[r].dragSource===e){let e=t[r];n.dragSvc?.removeDragSource(e),t.splice(r,1);break}}destroy(){let{dragSourceAndParamsList:e,dropTargets:t,beans:n}=this,r=n.dragSvc;for(let t of e)r?.removeDragSource(t);e.length=0,t.length=0,this.externalDropZoneCount=0,this.clearDragAndDropProperties(),super.destroy()}nudge(){let e=this.lastMouseEvent;e&&this.onDragging(e,!0)}onDragStart(e,t){this.lastMouseEvent=t,this.dragSource=e,this.dragItem=e.getDragItem();let n=e.eElement.getBoundingClientRect();this.dragInitialSourcePointerOffsetX=t.clientX-n.left,this.dragInitialSourcePointerOffsetY=t.clientY-n.top,e.onDragStarted?.(),this.createAndUpdateDragImageComp(e)}onDragStop(e){let{dragSource:t,lastDropTarget:n}=this;if(t?.onDragStopped?.(),n){let t=this.dropTargetEvent(n,e,!1);n.onDragStop?.(t)}this.clearDragAndDropProperties()}onDragCancel(){let{dragSource:e,lastDropTarget:t,lastMouseEvent:n}=this;if(e?.onDragCancelled?.(),t&&n){let e=this.dropTargetEvent(t,n,!1);t.onDragCancel?.(e)}this.clearDragAndDropProperties()}onDragging(e,t=!1){this.positionDragImageComp(e);let n=this.findCurrentDropTarget(e),{lastDropTarget:r,dragSource:i,dragItem:a}=this,o=!1;if(n!==r){if(o=!0,r){let n=this.dropTargetEvent(r,e,t);r.onDragLeave?.(n)}if(r!==null&&!n?this.handleExit(i,a):r===null&&n&&this.handleEnter(i,a),n){let r=this.dropTargetEvent(n,e,t);n.onDragEnter?.(r)}this.lastDropTarget=n}else if(n){let r=this.dropTargetEvent(n,e,t);n.onDragging?.(r),r?.changed&&(o=!0)}this.lastMouseEvent=e,o&&this.updateDragImageComp()}clearDragAndDropProperties(){this.removeDragImageComp(this.dragImageComp),this.dragImageCompPromise=null,this.dragImageLastIcon=void 0,this.dragImageLastLabel=void 0,this.lastMouseEvent=null,this.lastDraggingEvent=null,this.lastDropTarget=null,this.dragItem=null,this.dragInitialSourcePointerOffsetX=0,this.dragInitialSourcePointerOffsetY=0,this.dragSource=null}getAllContainersFromDropTarget(e){let t=e.getContainer(),n=e.getSecondaryContainers?.(),r=n?.length;if(!r)return[[t]];let i=Array(r+1);i[0]=[t];for(let e=0;e<r;++e)i[e+1]=n[e];return i}isMouseOnDropTarget(e,t){let n=this.getAllContainersFromDropTarget(t),r=!1,i=(e,t)=>{for(let n of t){let{width:t,height:r,left:i,right:a,top:o,bottom:s}=n.getBoundingClientRect();if(t===0||r===0)return!1;let c=e.clientX>=i&&e.clientX<a,l=e.clientY>=o&&e.clientY<s;if(!c||!l)return!1}return!0};for(let t of n)if(i(e,t)){r=!0;break}let{eElement:a,type:o}=this.dragSource;return t.targetContainsSource&&!t.getContainer().contains(a)?!1:r&&t.isInterestedIn(o,a)}findCurrentDropTarget(e){let t=[],n=this.dropTargets;for(let r=0,i=n.length;r<i;++r){let i=n[r];this.isMouseOnDropTarget(e,i)&&t.push(i)}let r=t.length;if(r===0)return null;if(r===1)return t[0];let i=uW(this.beans).elementsFromPoint(e.clientX,e.clientY);for(let e=0,n=i.length;e<n;++e){let n=i[e];for(let e=0,r=t.length;e<r;e++){let r=t[e],i=this.getAllContainersFromDropTarget(r),a=!1;for(let e=0,t=i.length;e<t&&!a;e++){let t=i[e];for(let e=0,r=t.length;e<r;e++)if(t[e]===n){a=!0;break}}if(a)return r}}return null}addDropTarget(e){this.dropTargets.push(e),e.external&&this.externalDropZoneCount++}removeDropTarget(e){let t=e.getContainer(),n=this.dropTargets,r=0;for(let e=0,i=n.length;e<i;++e){let i=n[e];if(i.getContainer()===t){i.external&&--this.externalDropZoneCount;continue}r!==e&&(n[r]=i),++r}n.length=r}hasExternalDropZones(){return this.externalDropZoneCount>0}findExternalZone(e){let t=this.dropTargets;for(let n=0,r=t.length;n<r;++n){let r=t[n];if(r.external&&r.getContainer()===e)return r}return null}dropTargetEvent(e,t,n){let{dragSource:r,dragItem:i,lastDraggingEvent:a,lastMouseEvent:o,dragInitialSourcePointerOffsetX:s,dragInitialSourcePointerOffsetY:c}=this,l=e.getContainer(),u=l.getBoundingClientRect(),{clientX:d,clientY:f}=t,p=d-(o?.clientX||0),m=f-(o?.clientY||0),h=this.createEvent({event:t,x:d-u.left,y:f-u.top,vDirection:m>0?`down`:m<0?`up`:null,hDirection:p<0?`left`:p>0?`right`:null,initialSourcePointerOffsetX:s,initialSourcePointerOffsetY:c,dragSource:r,fromNudge:n,dragItem:i,dropZoneTarget:l,dropTarget:a?.dropTarget??null,changed:!!a?.changed});return this.lastDraggingEvent=h,h}positionDragImageComp(e){let t=this.dragImageComp?.getGui();t&&Pve(t,e,this.beans)}removeDragImageComp(e){this.dragImageComp===e&&(this.dragImageComp=null),e&&(e.getGui()?.remove(),this.destroyBean(e))}createAndUpdateDragImageComp(e){let t=this.createDragImageComp(e)??null;this.dragImageCompPromise=t,t?.then(e=>{let n=this.lastMouseEvent;if(t!==this.dragImageCompPromise||!n||!this.isAlive()){this.destroyBean(e);return}this.dragImageCompPromise=null,this.dragImageLastIcon=void 0,this.dragImageLastLabel=void 0;let r=this.dragImageComp;r!==e&&(this.dragImageComp=e,this.removeDragImageComp(r)),e&&(this.appendDragImageComp(e),this.updateDragImageComp(),this.positionDragImageComp(n))})}appendDragImageComp(e){let t=e.getGui(),n=t.style;n.position=`absolute`,n.zIndex=`9999`,this.beans.dragSvc?.hasPointerCapture()&&(n.pointerEvents=`none`),this.gos.setInstanceDomData(t),this.beans.environment.applyThemeClasses(t),n.top=`20px`,n.left=`20px`;let r=hW(this.beans);r?r.appendChild(t):this.warnNoBody()}updateDragImageComp(){let{dragImageComp:e,dragSource:t,lastDropTarget:n,lastDraggingEvent:r,dragImageLastLabel:i}=this;if(!e)return;this.setDragImageCompIcon(n?.getIconName?.(r)??null);let a=t?.dragItemName;typeof a==`function`&&(a=a(r)),a||=``,i!==a&&(this.dragImageLastLabel=a,e.setLabel(a))}};function Pq(e){return typeof e==`object`&&!!e.component}function nbe(e){return e?e.prototype&&`getGui`in e.prototype:!1}function Fq(e,t,n,r){let{name:i}=n,a,o,s,c,l,u;if(t){let n=t,d=n[i+`Selector`],f=d?d(r):null,p=t=>{typeof t==`string`?a=t:t!=null&&t!==!0&&(e.isFrameworkComponent(t)?s=t:o=t)};f?(p(f.component),c=f.params,l=f.popup,u=f.popupPosition):p(n[i])}return{compName:a,jsComp:o,fwComp:s,paramsFromSelector:c,popupFromSelector:l,popupPositionFromSelector:u}}var rbe=class extends Q{constructor(){super(...arguments),this.beanName=`userCompFactory`}wireBeans(e){this.agCompUtils=e.agCompUtils,this.registry=e.registry,this.frameworkCompWrapper=e.frameworkCompWrapper,this.gridOptions=e.gridOptions}getCompDetailsFromGridOptions(e,t,n,r=!1){return this.getCompDetails(this.gridOptions,e,t,n,r)}getCompDetails(e,t,n,r,i=!1){let{name:a,cellRenderer:o}=t,{compName:s,jsComp:c,fwComp:l,paramsFromSelector:u,popupFromSelector:d,popupPositionFromSelector:f}=Fq(this.beans.frameworkOverrides,e,t,r),p,m,h=e=>{let t=this.registry.getUserComponent(a,e);t&&(c=t.componentFromFramework?void 0:t.component,l=t.componentFromFramework?t.component:void 0,p=t.params,m=t.processParams)};if(s!=null&&h(s),c==null&&l==null&&n!=null&&h(n),c&&o&&!nbe(c)&&(c=this.agCompUtils?.adaptFunction(t,c)),!c&&!l){let{validation:e}=this.beans;i&&(s!==n||!n)?s?e?.isProvidedUserComp(s)||_K(50,{compName:s}):n?e||_K(260,{...this.gos.getModuleErrorParams(),propName:a,compName:n}):_K(216,{name:a}):n&&!e&&_K(146,{comp:n});return}let g=this.mergeParams(e,t,r,u,p,m),_=c==null,v=c??l;return{componentFromFramework:_,componentClass:v,params:g,type:t,popupFromSelector:d,popupPositionFromSelector:f,newAgStackInstance:()=>this.newAgStackInstance(v,_,g,t)}}newAgStackInstance(e,t,n,r){let i=!t,a;a=i?new e:this.frameworkCompWrapper.wrap(e,r.mandatoryMethods,r.optionalMethods,r),this.createBean(a);let o=a.init?.(n);return o==null?Nq.resolve(a):o.then(()=>a)}mergeParams(e,t,n,r=null,i,a){let o={...n,...i},s=e?.[t.name+`Params`];return typeof s==`function`?LG(o,s(n)):typeof s==`object`&&LG(o,s),LG(o,r),a?a(o):o}},ibe={name:`dateComponent`,mandatoryMethods:[`getDate`,`setDate`],optionalMethods:[`afterGuiAttached`,`setInputPlaceholder`,`setInputAriaLabel`,`setDisabled`,`refresh`]},abe={name:`dragAndDropImageComponent`,mandatoryMethods:[`setIcon`,`setLabel`]},obe={name:`headerComponent`,optionalMethods:[`refresh`]},sbe={name:`innerHeaderComponent`},cbe={name:`innerHeaderGroupComponent`},lbe={name:`headerGroupComponent`},ube={name:`cellRenderer`,optionalMethods:[`refresh`,`afterGuiAttached`],cellRenderer:!0},dbe={name:`loadingCellRenderer`,cellRenderer:!0},fbe={name:`cellEditor`,mandatoryMethods:[`getValue`],optionalMethods:[`isPopup`,`isCancelBeforeStart`,`isCancelAfterEnd`,`getPopupPosition`,`focusIn`,`focusOut`,`afterGuiAttached`,`refresh`]},pbe={name:`tooltipComponent`},Iq={name:`filter`,mandatoryMethods:[`isFilterActive`,`doesFilterPass`,`getModel`,`setModel`],optionalMethods:[`afterGuiAttached`,`afterGuiDetached`,`onNewRowsLoaded`,`getModelAsString`,`onFloatingFilterChanged`,`onAnyFilterChanged`,`refresh`]},mbe={name:`floatingFilterComponent`,mandatoryMethods:[`onParentModelChanged`],optionalMethods:[`afterGuiAttached`,`refresh`]},hbe={name:`fullWidthCellRenderer`,optionalMethods:[`refresh`,`afterGuiAttached`],cellRenderer:!0},gbe={name:`loadingCellRenderer`,cellRenderer:!0},_be={name:`groupRowRenderer`,optionalMethods:[`afterGuiAttached`],cellRenderer:!0},vbe={name:`detailCellRenderer`,optionalMethods:[`refresh`],cellRenderer:!0};function ybe(e,t){return e.getCompDetailsFromGridOptions(abe,`agDragAndDropImage`,t,!0)}function bbe(e,t,n){return e.getCompDetails(t,obe,`agColumnHeader`,n)}function xbe(e,t,n){return e.getCompDetails(t,sbe,void 0,n)}function Sbe(e,t){let n=t.columnGroup.getColGroupDef();return e.getCompDetails(n,lbe,`agColumnGroupHeader`,t)}function Cbe(e,t,n){return e.getCompDetails(t,cbe,void 0,n)}function wbe(e,t){return e.getCompDetailsFromGridOptions(hbe,void 0,t,!0)}function Tbe(e,t){return e.getCompDetailsFromGridOptions(gbe,`agLo
19adingCellRenderer`,t,!0)}function Ebe(e,t){return e.getCompDetailsFromGridOptions(_be,`agGroupRowRenderer`,t,!0)}function Dbe(e,t){return e.getCompDetailsFromGridOptions(vbe,`agDetailCellRenderer`,t,!0)}function Lq(e,t,n){return e.getCompDetails(t,ube,void 0,n)}function Rq(e,t,n){return e.getCompDetails(t,dbe,`agSkeletonCellRenderer`,n,!0)}function zq(e,t,n){return e.getCompDetails(t,fbe,`agCellEditor`,n,!0)}function Obe(e,t,n,r){let i=t.filter;return Pq(i)&&(t={filter:i.component,filterParams:t.filterParams}),e.getCompDetails(t,Iq,r,n,!0)}function kbe(e,t,n){return e.getCompDetails(t,ibe,`agDateInput`,n,!0)}function Abe(e,t){return e.getCompDetails(t.colDef,pbe,`agTooltipComponent`,t,!0)}function jbe(e,t,n,r){return e.getCompDetails(t,mbe,r,n)}function Bq(e,t){return Fq(e,t,Iq)}function Vq(e,t,n){return e.mergeParams(t,Iq,n)}var Mbe=class extends tbe{createEvent(e){return eq(this.gos,e)}createDragImageComp(e){let{gos:t,beans:n}=this;return ybe(n.userCompFactory,eq(t,{dragSource:e}))?.newAgStackInstance()}handleEnter(e,t){e?.onGridEnter?.(t)}handleExit(e,t){e?.onGridExit?.(t)}warnNoBody(){gK(54)}isDropZoneWithinThisGrid(e){return this.beans.ctrlsSvc.getGridBodyCtrl().eGridBody.contains(e.dropZoneTarget)}registerGridDropTarget(e,t){let n={getContainer:e,isInterestedIn:e=>e===1||e===0,getIconName:()=>`notAllowed`};this.addDropTarget(n),t.addDestroyFunc(()=>this.removeDropTarget(n))}};function Hq(e){return!!e.operator}var Uq=`ag-resizer-wrapper`,Wq=(e,t)=>({tag:`div`,ref:`${e}Resizer`,cls:`ag-resizer ag-resizer-${t}`}),Nbe={tag:`div`,cls:Uq,children:[Wq(`eTopLeft`,`topLeft`),Wq(`eTop`,`top`),Wq(`eTopRight`,`topRight`),Wq(`eRight`,`right`),Wq(`eBottomRight`,`bottomRight`),Wq(`eBottom`,`bottom`),Wq(`eBottomLeft`,`bottomLeft`),Wq(`eLeft`,`left`)]},Pbe=class extends AG{constructor(e,t){super(),this.element=e,this.dragStartPosition={x:0,y:0},this.position={x:0,y:0},this.lastSize={width:-1,height:-1},this.positioned=!1,this.resizersAdded=!1,this.resizeListeners=[],this.boundaryEl=null,this.isResizing=!1,this.isMoving=!1,this.resizable={},this.movable=!1,this.currentResizer=null,this.config={popup:!1,...t}}wireBeans(e){this.popupSvc=e.popupSvc,this.dragSvc=e.dragSvc}center(e){let{clientHeight:t,clientWidth:n}=this.offsetParent,r=n/2-this.getWidth()/2,i=t/2-this.getHeight()/2;this.offsetElement(r,i,e)}initialisePosition(e){if(this.positioned)return;let{centered:t,forcePopupParentAsOffsetParent:n,minWidth:r,width:i,minHeight:a,height:o,x:s,y:c}=this.config;this.offsetParent||this.setOffsetParent();let l=0,u=0,d=XW(this.element);if(d){let e=this.findBoundaryElement(),t=window.getComputedStyle(e);if(t.minWidth!=null){let n=e.offsetWidth-this.element.offsetWidth;u=Number.parseInt(t.minWidth,10)-n}if(t.minHeight!=null){let n=e.offsetHeight-this.element.offsetHeight;l=Number.parseInt(t.minHeight,10)-n}}if(this.minHeight=a||l,this.minWidth=r||u,i&&this.setWidth(i),o&&this.setHeight(o),(!i||!o)&&this.refreshSize(),t)this.center(e);else if(s||c)this.offsetElement(s,c,e);else if(d&&n){let t=this.boundaryEl,n=!0;if(t||(t=this.findBoundaryElement(),n=!1),t){let r=Number.parseFloat(t.style.top),i=Number.parseFloat(t.style.left);n?this.offsetElement(Number.isNaN(i)?0:i,Number.isNaN(r)?0:r,e):this.setPosition(i,r)}}this.positioned=!!this.offsetParent}isPositioned(){return this.positioned}getPosition(){return this.position}setMovable(e,t){if(!this.config.popup||e===this.movable)return;this.movable=e;let n=this.moveElementDragListener||{eElement:t,onDragStart:this.onMoveStart.bind(this),onDragging:this.onMove.bind(this),onDragStop:this.onMoveEnd.bind(this)};e?(this.dragSvc?.addDragSource(n),this.moveElementDragListener=n):(this.dragSvc?.removeDragSource(n),this.moveElementDragListener=void 0)}setResizable(e){if(this.clearResizeListeners(),e?this.addResizers():this.removeResizers(),typeof e==`boolean`){if(e===!1)return;e={topLeft:e,top:e,topRight:e,right:e,bottomRight:e,bottom:e,bottomLeft:e,left:e}}for(let t of Object.keys(e)){let n=!!e[t],r=this.getResizerElement(t),i={dragStartPixels:0,eElement:r,onDragStart:e=>this.onResizeStart(e,t),onDragging:this.onResize.bind(this),onDragStop:e=>this.onResizeEnd(e,t)};(n||!this.isAlive()&&!n)&&(n?(this.dragSvc?.addDragSource(i),this.resizeListeners.push(i),r.style.pointerEvents=`all`):r.style.pointerEvents=`none`,this.resizable[t]=n)}}removeSizeFromEl(){this.element.style.removeProperty(`height`),this.element.style.removeProperty(`width`),this.element.style.removeProperty(`flex`)}restoreLastSize(){this.element.style.flex=`0 0 auto`;let{height:e,width:t}=this.lastSize;t!==-1&&(this.element.style.width=`${t}px`),e!==-1&&(this.element.style.height=`${e}px`)}
vendor: 17,127 bytes, line 19
19getHeight(){return this.element.offsetHeight}setHeight(e){let{popup:t}=this.config,n=this.element,r=!1;if(typeof e==`string`&&e.includes(`%`))rG(n,e),e=HW(n),r=!0;else if(e=Math.max(this.minHeight,e),this.positioned){let t=this.getAvailableHeight();t&&e>t&&(e=t)}this.getHeight()!==e&&(r?(n.style.maxHeight=`unset`,n.style.minHeight=`unset`):t?rG(n,e):(n.style.height=`${e}px`,n.style.flex=`0 0 auto`,this.lastSize.height=typeof e==`number`?e:Number.parseFloat(e)))}getAvailableHeight(){let{popup:e,forcePopupParentAsOffsetParent:t}=this.config;this.positioned||this.initialisePosition();let{clientHeight:n}=this.offsetParent;if(!n)return null;let r=this.element.getBoundingClientRect(),i=this.offsetParent.getBoundingClientRect(),a=e?this.position.y:r.top,o=e?0:i.top,s=0;if(t){let e=this.element.parentElement;if(e){let{bottom:t}=e.getBoundingClientRect();s=t-r.bottom}}return n+o-a-s}getWidth(){return this.element.offsetWidth}setWidth(e){let t=this.element,{popup:n}=this.config,r=!1;if(typeof e==`string`&&e.includes(`%`))nG(t,e),e=UW(t),r=!0;else if(this.positioned){e=Math.max(this.minWidth,e);let{clientWidth:t}=this.offsetParent,r=n?this.position.x:this.element.getBoundingClientRect().left;t&&e+r>t&&(e=t-r)}this.getWidth()!==e&&(r?(t.style.maxWidth=`unset`,t.style.minWidth=`unset`):this.config.popup?nG(t,e):(t.style.width=`${e}px`,t.style.flex=` unset`,this.lastSize.width=typeof e==`number`?e:Number.parseFloat(e)))}offsetElement(e=0,t=0,n){let{forcePopupParentAsOffsetParent:r}=this.config,i=r?this.boundaryEl:this.element;i&&(this.popupSvc?.positionPopup({ePopup:i,keepWithinBounds:!0,skipObserver:this.movable||this.isResizable(),updatePosition:()=>({x:e,y:t}),postProcessCallback:n}),this.setPosition(Number.parseFloat(i.style.left),Number.parseFloat(i.style.top)))}constrainSizeToAvailableHeight(e){if(!this.config.forcePopupParentAsOffsetParent)return;let t=()=>{let e=this.getAvailableHeight();this.element.style.setProperty(`max-height`,`${e}px`)};e&&this.popupSvc?(this.resizeObserverSubscriber?.(),this.resizeObserverSubscriber=cG(this.beans,this.popupSvc?.getPopupParent(),t)):(this.element.style.removeProperty(`max-height`),this.resizeObserverSubscriber&&=(this.resizeObserverSubscriber(),void 0))}setPosition(e,t){this.position.x=e,this.position.y=t}updateDragStartPosition(e,t){this.dragStartPosition={x:e,y:t}}calculateMouseMovement(e){let{e:t,isLeft:n,isTop:r,anywhereWithin:i,topBuffer:a}=e,o=t.clientX-this.dragStartPosition.x,s=t.clientY-this.dragStartPosition.y;return{movementX:this.shouldSkipX(t,!!n,!!i,o)?0:o,movementY:this.shouldSkipY(t,!!r,a,s)?0:s}}shouldSkipX(e,t,n,r){let i=this.element.getBoundingClientRect(),a=this.offsetParent.getBoundingClientRect(),o=this.boundaryEl.getBoundingClientRect(),s=this.config.popup?this.position.x:i.left,c=s<=0&&a.left>=e.clientX||a.right<=e.clientX&&a.right<=o.right;return c?!0:(c=t?r<0&&e.clientX>s+a.left||r>0&&e.clientX<s+a.left:n?r<0&&e.clientX>o.right||r>0&&e.clientX<s+a.left:r<0&&e.clientX>o.right||r>0&&e.clientX<o.right,c)}shouldSkipY(e,t,n=0,r){let i=this.element.getBoundingClientRect(),a=this.offsetParent.getBoundingClientRect(),o=this.boundaryEl.getBoundingClientRect(),s=this.config.popup?this.position.y:i.top,c=s<=0&&a.top>=e.clientY||a.bottom<=e.clientY&&a.bottom<=o.bottom;return c?!0:(c=t?r<0&&e.clientY>s+a.top+n||r>0&&e.clientY<s+a.top:r<0&&e.clientY>o.bottom||r>0&&e.clientY<o.bottom,c)}createResizeMap(){let e=e=>({element:this.element.querySelector(`[data-ref=${e}Resizer]`)});this.resizerMap={topLeft:e(`eTopLeft`),top:e(`eTop`),topRight:e(`eTopRight`),right:e(`eRight`),bottomRight:e(`eBottomRight`),bottom:e(`eBottom`),bottomLeft:e(`eBottomLeft`),left:e(`eLeft`)}}addResizers(){if(this.resizersAdded)return;let e=this.element;e&&(e.appendChild(pG(Nbe)),this.createResizeMap(),this.resizersAdded=!0)}removeResizers(){this.resizerMap=void 0,this.element.querySelector(`.${Uq}`)?.remove(),this.resizersAdded=!1}getResizerElement(e){return this.resizerMap[e].element}onResizeStart(e,t){this.boundaryEl=this.findBoundaryElement(),this.positioned||this.initialisePosition(),this.currentResizer={isTop:!!t.match(/top/i),isRight:!!t.match(/right/i),isBottom:!!t.match(/bottom/i),isLeft:!!t.match(/left/i)},this.element.classList.add(`ag-resizing`),this.resizerMap[t].element.classList.add(`ag-active`);let{popup:n,forcePopupParentAsOffsetParent:r}=this.config;!n&&!r&&this.applySizeToSiblings(this.currentResizer.isBottom||this.currentResizer.isTop),this.isResizing=!0,this.updateDragStartPosition(e.clientX,e.clientY)}getSiblings(){let e=this.element.parentElement;return e?Array.prototype.slice.call(e.children).filter(e=>!e.classList.contains(`ag-hidden`)):null}getMinSizeOfSiblings(){let e=this.getSiblings()||[],t=0,n=0;for(let r of e){let e=!!r.style.flex&&r.style.flex!==`0 0 auto`;if(r===this.element)continue;let i=this.minHeight||0,a=this.minWidth||0;if(e){let e=window.getComputedStyle(r);e.minHeight&&(i=Number.parseInt(e.minHeight,10)),e.minWidth&&(a=Number.parseInt(e.minWidth,10))}else i=r.offsetHeight,a=r.offsetWidth;t+=i,n+=a}return{height:t,width:n}}applySizeToSiblings(e){let t=null,n=this.getSiblings();if(n){for(let r=0;r<n.length;r++){let i=n[r];i!==t&&(e?i.style.height=`${i.offsetHeight}px`:i.style.width=`${i.offsetWidth}px`,i.style.flex=`0 0 auto`,i===this.element&&(t=n[r+1]))}t&&(t.style.removeProperty(`height`),t.style.removeProperty(`min-height`),t.style.removeProperty(`max-height`),t.style.flex=`1 1 auto`)}}isResizable(){return Object.values(this.resizable).some(e=>e)}onResize(e){if(!this.isResizing||!this.currentResizer)return;let{popup:t,forcePopupParentAsOffsetParent:n}=this.config,{isTop:r,isRight:i,isBottom:a,isLeft:o}=this.currentResizer,s=i||o,c=a||r,{movementX:l,movementY:u}=this.calculateMouseMovement({e,isLeft:o,isTop:r}),d=this.position.x,f=this.position.y,p=0,m=0;if(s&&l){let e=o?-1:1,t=this.getWidth(),n=t+l*e,r=!1;o&&(p=t-n,(d+p<=0||n<=this.minWidth)&&(r=!0,p=0)),r||this.setWidth(n)}if(c&&u){let e=r?-1:1,t=this.getHeight(),n=t+u*e,i=!1;r?(m=t-n,(f+m<=0||n<=this.minHeight)&&(i=!0,m=0)):!this.config.popup&&!this.config.forcePopupParentAsOffsetParent&&t<n&&this.getMinSizeOfSiblings().height+n>this.element.parentElement.offsetHeight&&(i=!0),i||this.setHeight(n)}this.updateDragStartPosition(e.clientX,e.clientY),((t||n)&&p||m)&&this.offsetElement(d+p,f+m)}onResizeEnd(e,t){this.isResizing=!1,this.currentResizer=null,this.boundaryEl=null,this.element.classList.remove(`ag-resizing`),this.resizerMap[t].element.classList.remove(`ag-active`),this.dispatchLocalEvent({type:`resize`})}refreshSize(){let e=this.element;this.config.popup&&(this.config.width||this.setWidth(e.offsetWidth),this.config.height||this.setHeight(e.offsetHeight))}onMoveStart(e){this.boundaryEl=this.findBoundaryElement(),this.positioned||this.initialisePosition(),this.isMoving=!0,this.element.classList.add(`ag-moving`),this.updateDragStartPosition(e.clientX,e.clientY)}onMove(e){if(!this.isMoving)return;let{x:t,y:n}=this.position,r;this.config.calculateTopBuffer&&(r=this.config.calculateTopBuffer());let{movementX:i,movementY:a}=this.calculateMouseMovement({e,isTop:!0,anywhereWithin:!0,topBuffer:r});this.offsetElement(t+i,n+a),this.updateDragStartPosition(e.clientX,e.clientY)}onMoveEnd(){this.isMoving=!1,this.boundaryEl=null,this.element.classList.remove(`ag-moving`)}setOffsetParent(){this.offsetParent=this.config.forcePopupParentAsOffsetParent&&this.popupSvc?this.popupSvc.getPopupParent():this.element.offsetParent}findBoundaryElement(){let e=this.element;for(;e;){if(window.getComputedStyle(e).position!==`static`)return e;e=e.parentElement}return this.element}clearResizeListeners(){for(;this.resizeListeners.length;){let e=this.resizeListeners.pop();this.dragSvc?.removeDragSource(e)}}destroy(){super.destroy(),this.moveElementDragListener&&this.dragSvc?.removeDragSource(this.moveElementDragListener),this.constrainSizeToAvailableHeight(!1),this.clearResizeListeners(),this.removeResizers()}},Fbe=class extends Pbe{};function Gq(e){return typeof e?.getGui==`function`}var Kq=class{constructor(e){this.cssClassStates={},this.getGui=e}toggleCss(e,t){if(e){if(e.includes(` `)){let n=(e||``).split(` `);if(n.length>1){for(let e of n)this.toggleCss(e,t);return}}this.cssClassStates[e]!==t&&e.length&&(this.getGui()?.classList.toggle(e,t),this.cssClassStates[e]=t)}}},Ibe=0,qq=class extends AG{constructor(e,t){super(),this.suppressDataRefValidation=!1,this.displayed=!0,this.visible=!0,this.compId=Ibe++,this.cssManager=new Kq(()=>this.eGui),this.componentSelectors=new Map((t??[]).map(e=>[e.selector,e])),e&&this.setTemplate(e)}preConstruct(){this.wireTemplate(this.getGui()),this.addGlobalCss()}wireTemplate(e,t){e&&this.gos&&(this.applyElementsToComponent(e),this.createChildComponentsFromTags(e,t))}getCompId(){return this.compId}getDataRefAttribute(e){return e.getAttribute?e.getAttribute(uG):null}applyElementsToComponent(e,t,n,r=null){if(t===void 0&&(t=this.getDataRefAttribute(e)),t){let i=this[t];if(i===null)this[t]=r??e;else{let e=n?.[t];if(!this.suppressDataRefValidation&&!e)throw Error(`data-ref: ${t} on ${this.constructor.name} with ${i}`)}}}createChildComponentsFromTags(e,t){let n=[];for(let t of e.childNodes??[])n.push(t);for(let r of n){if(!(r instanceof HTMLElement))continue;let n=this.createComponentFromElement(r,e=>{let t=e.getGui();if(t)for(let e of r.attributes??[])t.setAttribute(e.name,e.value)},t);if(n){if(n.addItems&&r.children.length){this.createChildComponentsFromTags(r,t);let e=Array.prototype.slice.call(r.children);n.addItems(e)}this.swapComponentForNode(n,e,r)}else r.childNodes&&this.createChildComponentsFromTags(r,t)}}createComponentFromElement(e,t,n){let r=e.nodeName,i=this.getDataRefAttribute(e),a=r.indexOf(`AG-`)===0,o=a?this.componentSelectors.get(r):null,s=null;if(o){let e=n&&i?n[i]:void 0;s=new o.component(e),s.setParentComponent(this),this.createBean(s,null,t)}else if(a)throw Error(`selector: ${r}`);return this.applyElementsToComponent(e,i,n,s),s}swapComponentForNode(e,t,n){let r=e.getGui();t.replaceChild(r,n),t.insertBefore(document.createComment(n.nodeName),r),this.addDestroyFunc(this.destroyBean.bind(this,e))}activateTabIndex(e,t){let n=t??this.gos.get(`tabIndex`);e||=[],e.length||e.push(this.getGui());for(let t of e)t.setAttribute(`tabindex`,n.toString())}setTemplate(e,t,n){let r;r=typeof e==`string`||e==null?ZW(e):pG(e),this.setTemplateFromElement(r,t,n)}setTemplateFromElement(e,t,n,r=!1){if(this.eGui=e,this.suppressDataRefValidation=r,t)for(let e=0;e<t.length;e++){let n=t[e];this.componentSelectors.set(n.selector,n)}this.wireTemplate(e,n)}getGui(){return this.eGui}getFocusableElement(){return this.eGui}getAriaElement(){return this.getFocusableElement()}setParentComponent(e){this.parentComponent=e}getParentComponent(){return this.parentComponent}setGui(e){this.eGui=e}queryForHtmlElement(e){return this.eGui.querySelector(e)}getContainerAndElement(e,t){let n=t;return e==null?null:(n||=this.eGui,aG(e)?{element:e,parent:n}:{element:e.getGui(),parent:n})}prependChild(e,t){let{element:n,parent:r}=this.getContainerAndElement(e,t)||{};n&&r&&r.prepend(n)}appendChild(e,t){let{element:n,parent:r}=this.getContainerAndElement(e,t)||{};n&&r&&r.appendChild(n)}isDisplayed(){return this.displayed}setVisible(e,t={}){if(e!==this.visible){this.visible=e;let{skipAriaHidden:n}=t;IW(this.eGui,e,{skipAriaHidden:n})}}setDisplayed(e,t={}){if(e!==this.displayed){this.displayed=e;let{skipAriaHidden:n}=t;FW(this.eGui,e,{skipAriaHidden:n});let r={type:`displayChanged`,visible:this.displayed};this.dispatchLocalEvent(r)}}destroy(){this.parentComponent&&=void 0,super.destroy()}addGuiEventListener(e,t,n){this.eGui.addEventListener(e,t,n),this.addDestroyFunc(()=>this.eGui.removeEventListener(e,t))}addCss(e){this.cssManager.toggleCss(e,!0)}removeCss(e){this.cssManager.toggleCss(e,!1)}toggleCss(e,t){this.cssManager.toggleCss(e,t)}registerCSS(e){this.css===Jq?(this.css=[e],this.addGlobalCss()):(this.css||=[],this.css.push(e))}addGlobalCss(){if(Array.isArray(this.css)){let e=`component-`+Object.getPrototypeOf(this)?.constructor?.name;for(let t of this.css??[])this.beans.environment.addGlobalCSS(t,e)}this.css=Jq}},Jq=Symbol(),Yq=class extends qq{},Xq,Zq,Qq,$q,eJ,tJ,nJ;function rJ(){return Xq===void 0&&(Xq=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),Xq}function iJ(){return Zq===void 0&&(Zq=/(firefox)/i.test(navigator.userAgent)),Zq}function aJ(){return Qq===void 0&&(Qq=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)),Qq}function oJ(){return $q===void 0&&($q=/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform===`MacIntel`&&navigator.maxTouchPoints>1),$q}function sJ(e){if(!e)return null;let t=e.tabIndex,n=e.getAttribute(`tabIndex`);return t===-1&&(n===null||n===``&&!iJ())?null:t.toString()}function Lbe(){if(nJ!==void 0)return nJ;if(!document.body)return-1;let e=1e6,t=iJ()?6e6:1e9,n=document.createElement(`div`);for(document.body.appendChild(n);;){let r=e*2;if(n.style.height=r+`px`,r>t||n.clientHeight!==r)break;e=r}return n.remove(),nJ=e,e}function cJ(){return tJ??lJ(),tJ}function lJ(){let e=document.body,t=document.createElement(`div`);t.style.width=t.style.height=`100px`,t.style.opacity=`0`,t.style.overflow=`scroll`,t.style.msOverflowStyle=`scrollbar`,t.style.position=`absolute`,e.appendChild(t);let n=t.offsetWidth-t.clientWidth;n===0&&t.clientWidth===0&&(n=null),t.parentNode&&t.remove(),n!=null&&(tJ=n,eJ=n===0)}function uJ(){return eJ??lJ(),eJ}var dJ=!1,fJ=0;function Rbe(e){fJ>0||(e.addEventListener(`keydown`,pJ),e.addEventListener(`mousedown`,pJ))}function zbe(e){fJ>0||(e.removeEventListener(`keydown`,pJ),e.removeEventListener(`mousedown`,pJ))}function pJ(e){let t=dJ,n=e.type===`keydown`;n&&(e.ctrlKey||e.metaKey||e.altKey)||t!==n&&(dJ=n)}function Bbe(e){let t=fW(e);return Rbe(t),fJ++,()=>{fJ--,zbe(t)}}function mJ(){return dJ}function hJ(e,t,n=!1){let r=MW,i=NW;t&&(i+=`, `+t),n&&(i+=`, [tabindex="-1"]`);let a=Array.prototype.slice.apply(e.querySelectorAll(r)).filter(e=>XW(e)),o=Array.prototype.slice.apply(e.querySelectorAll(i));return o.length?((e,t)=>e.filter(e=>t.indexOf(e)===-1))(a,o):a}function gJ(e,t=!1,n=!1,r=!1){let i=hJ(e,r?`.ag-tab-guard`:null,n),a=t?XU(i):i[0];return a?(a.focus({preventScroll:!0}),!0):!1}function _J(e,t,n,r){let i=hJ(t,n?`:not([tabindex="-1"])`:null),a=dW(e),o;o=n?i.findIndex(e=>e.contains(a)):i.indexOf(a);let s=o+(r?-1:1);return s<0||s>=i.length?null:i[s]}function vJ(e,t=5){let n=0;for(;e&&sJ(e)===null&&++n<=t;)e=e.parentElement;return sJ(e)===null?null:e}var Vbe=`ag-focus-managed`,yJ=class extends AG{constructor(e,t={isStopPropagation:()=>!1,stopPropagation:()=>{}},n={}){super(),this.eFocusable=e,this.stopPropagationCallbacks=t,this.callbacks=n,this.callbacks={shouldStopEventPropagation:()=>!1,onTabKeyDown:e=>{if(e.defaultPrevented)return;let t=_J(this.beans,this.eFocusable,!1,e.shiftKey);t&&(t.focus(),e.preventDefault())},...n}}postConstruct(){let{eFocusable:e,callbacks:{onFocusIn:t,onFocusOut:n}}=this;e.classList.add(Vbe),this.addKeyDownListeners(e),t&&this.addManagedElementListeners(e,{focusin:t}),n&&this.addManagedElementListeners(e,{focusout:n})}addKeyDownListeners(e){this.addManagedElementListeners(e,{keydown:e=>{if(e.defaultPrevented||this.stopPropagationCallbacks.isStopPropagation(e))return;let{callbacks:t}=this;if(t.shouldStopEventPropagation(e)){this.stopPropagationCallbacks.stopPropagation(e);return}e.key===$.TAB?t.onTabKeyDown(e):t.handleKeyDown&&t.handleKeyDown(e)}})}},bJ=`__ag_Grid_Stop_Propagation`;function xJ(e){e[bJ]=!0}function SJ(e){return e[bJ]===!0}var CJ={isStopPropagation:SJ,stopPropagation:xJ},wJ=class extends yJ{constructor(e,t){super(e,CJ,t)}},Hbe={applyFilter:`Apply`,clearFilter:`Clear`,resetFilter:`Reset`,cancelFilter:`Cancel`,textFilter:`Text Filter`,numberFilter:`Number Filter`,bigintFilter:`BigInt Filter`,dateFilter:`Date Filter`,setFilter:`Set Filter`,filterOoo:`Filter...`,empty:`Choose one`,equals:`Equals`,notEqual:`Does not equal`,lessThan:`Less than`,greaterThan:`Greater than`,inRange:`Between`,inRangeStart:`From`,inRangeEnd:`To`,lessThanOrEqual:`Less than or equal to`,greaterThanOrEqual:`Greater than or equal to`,contains:`Contains`,notContains:`Does not contain`,startsWith:`Begins with`,endsWith:`Ends with`,blank:`Blank`,notBlank:`Not blank`,before:`Before`,after:`After`,andCondition:`AND`,orCondition:`OR`,dateFormatOoo:`yyyy-mm-dd`,filterSummaryInactive:`is (All)`,filterSummaryContains:`contains`,filterSummaryNotContains:`does not contain`,filterSummaryTextEquals:`equals`,filterSummaryTextNotEqual:`does not equal`,filterSummaryStartsWith:`begins with`,filterSummaryEndsWith:`ends with`,filterSummaryBlank:`is blank`,filterSummaryNotBlank:`is not blank`,filterSummaryEquals:`=`,filterSummaryNotEqual:`!=`,filterSummaryGreaterThan:`>`,filterSummaryGreaterThanOrEqual:`>=`,filterSummaryLessThan:`<`,filterSummaryLessThanOrEqual:`<=`,filterSummaryInRange:`between`,yesterday:`Yesterday`,today:`Today`,tomorrow:`Tomorrow`,last7Days:`Last 7 Days`,lastWeek:`Last Week`,thisWeek:`This Week`,nextWeek:`Next Week`,last30Days:`Last 30 Days`,lastMonth:`Last Month`,thisMonth:`This Month`,nextMonth:`Next Month`,last90Days:`Last 90 Days`,lastQuarter:`L
19ast Quarter`,thisQuarter:`This Quarter`,nextQuarter:`Next Quarter`,lastYear:`Last Year`,thisYear:`This Year`,yearToDate:`Year To Date`,nextYear:`Next Year`,last6Months:`Last 6 Months`,last12Months:`Last 12 Months`,last24Months:`Last 24 Months`,filterSummaryInRangeValues:e=>`(${e[0]}, ${e[1]})`,filterSummaryTextQuote:e=>`"${e[0]}"`,minDateValidation:e=>`Date must be after ${e[0]}`,maxDateValidation:e=>`Date must be before ${e[0]}`,strictMinValueValidation:e=>`Must be greater than ${e[0]}`,strictMaxValueValidation:e=>`Must be less than ${e[0]}`};function TJ(e,t,n){return Ive(e,Hbe,t,n)}function EJ(e,t){let{debounceMs:n}=e;return DJ(e)?(n!=null&&gK(71),0):n??t}function DJ(e){return(e.buttons?.indexOf(`apply`)??-1)>=0}function OJ(e,t,n,r){let i=TJ(e,n);return typeof t==`function`?i=t({filterOptionKey:r,filterOption:TJ(e,r),placeholder:i}):typeof t==`string`&&(i=t),i}var Ube=class extends Yq{constructor(e,t){super(),this.filterNameKey=e,this.cssIdentifier=t,this.applyActive=!1,this.debouncePending=!1,this.defaultDebounceMs=0}postConstruct(){let e={tag:`div`,cls:`ag-filter-body-wrapper ag-${this.cssIdentifier}-body-wrapper`,children:[this.createBodyTemplate()]};this.setTemplate(e,this.getAgComponents()),this.createManagedBean(new wJ(this.getFocusableElement(),{handleKeyDown:this.handleKeyDown.bind(this)})),this.positionableFeature=this.createBean(new Fbe(this.getPositionableElement(),{forcePopupParentAsOffsetParent:!0}))}handleKeyDown(e){}init(e){let t=e;this.setParams(t),this.setModelIntoUi(t.state.model,!0).then(()=>this.updateUiVisibility())}areStatesEqual(e,t){return e===t}refresh(e){let t=e,n=this.params;this.params=t;let{source:r,state:i,additionalEventAttributes:a}=t;r===`colDef`&&this.updateParams(t,n);let o=this.state;this.state=i;let s=a?.fromAction;return(s&&s!==`apply`||i.model!==o.model||!this.areStatesEqual(i.state,o.state))&&this.setModelIntoUi(i.model),!0}setParams(e){this.params=e,this.state=e.state,this.commonUpdateParams(e)}updateParams(e,t){this.commonUpdateParams(e,t)}commonUpdateParams(e,t){this.applyActive=DJ(e),this.setupApplyDebounced()}doesFilterPass(e){gK(283);let{getHandler:t,model:n,column:r}=this.params;return t().doesFilterPass({...e,model:n,handlerParams:this.beans.colFilter.getHandlerParams(r)})}getFilterTitle(){return this.translate(this.filterNameKey)}isFilterActive(){return gK(284),this.params.model!=null}setupApplyDebounced(){let e=EJ(this.params,this.defaultDebounceMs),t=PG(this,this.checkApplyDebounce.bind(this),e);this.applyDebounced=()=>{this.debouncePending=!0,t()}}checkApplyDebounce(){this.debouncePending&&(this.debouncePending=!1,this.doApplyModel())}getModel(){return gK(285),this.params.model}setModel(e){gK(286);let{beans:t,params:n}=this;return t.colFilter.setModelForColumnLegacy(n.column,e)}applyModel(e=`api`){return this.doApplyModel()}canApply(e){return!0}doApplyModel(e){let{params:t,state:{valid:n=!0,model:r}}=this;if(!n)return!1;let i=!this.areModelsEqual(t.model,r);return i&&t.onAction(`apply`,e),i}onNewRowsLoaded(){}onUiChanged(e,t=!1){this.updateUiVisibility();let n=this.getModelFromUi(),r={model:n,state:this.getState(),valid:this.canApply(n)};this.state=r;let{params:i,gos:a,eventSvc:o,applyActive:s}=this;i.onStateChange(r),i.onUiChange(this.getUiChangeEventParams()),a.get(`enableFilterHandlers`)||o.dispatchEvent({type:`filterModified`,column:i.column,filterInstance:this}),r.valid&&(e??=s?void 0:`debounce`,e===`immediately`?this.doApplyModel({afterFloatingFilter:t,afterDataChange:!1}):e===`debounce`&&this.applyDebounced())}getState(){}getUiChangeEventParams(){}afterGuiAttached(e){this.lastContainerType=e?.container,this.refreshFilterResizer(e?.container)}refreshFilterResizer(e){let{positionableFeature:t,gos:n}=this;if(!t)return;let r=e===`floatingFilter`||e===`columnFilter`;r?(t.restoreLastSize(),t.setResizable(n.get(`enableRtl`)?{bottom:!0,bottomLeft:!0,left:!0}:{bottom:!0,bottomRight:!0,right:!0})):(t.removeSizeFromEl(),t.setResizable(!1)),t.constrainSizeToAvailableHeight(r)}afterGuiDetached(){this.checkApplyDebounce(),this.positionableFeature?.constrainSizeToAvailableHeight(!1)}destroy(){this.positionableFeature=this.destroyBean(this.positionableFeature),super.destroy()}translate(e,t){return TJ(this,e,t)}getPositionableElement(){return this.getGui()}areModelsEqual(e,t){return e===t||e==null&&t==null?!0:e==null||t==null?!1:this.areNonNullModelsEqual(e,t)}},kJ=class extends qq{isPopup(){return!0}setParentComponent(e){e.addCss(`ag-has-popup`),super.setParentComponent(e)}destroy(){let e=this.parentComponent;e?.isAlive()&&e.getGui().classList.remove(`ag-has-popup`),super.destroy()}},AJ=class extends kJ{constructor(){super(...arguments),this.errorMessages=null}init(e){this.params=e,this.initialiseEditor(e),this.eEditor.onValueChange(()=>e.validate())}destroy(){this.eEditor.destroy(),this.errorMessages=null,super.destroy()}};function jJ(e){let t=e.rowModel;return t.getType()===`clientSide`?t:void 0}function MJ(e){let t=e.rowModel;return t.getType()===`infinite`?t:void 0}function Wbe(e){let t=e.rowModel;return t.getType()===`serverSide`?t:void 0}var Gbe=`row-group-`,Kbe=0,NJ=class{constructor(e){this.id=void 0,this.destroyed=!1,this._groupData=void 0,this.master=!1,this.detail=void 0,this.rowIndex=null,this.field=null,this.rowGroupColumn=null,this.key=null,this.sourceRowIndex=-1,this._leafs=void 0,this.childrenAfterGroup=null,this.childrenAfterFilter=null,this.childrenAfterAggFilter=null,this.childrenAfterSort=null,this.allChildrenCount=null,this.childrenMapped=null,this.treeParent=null,this.treeNodeFlags=0,this._expanded=void 0,this.displayed=!1,this.rowTop=null,this.oldRowTop=null,this.selectable=!0,this.__objectId=Kbe++,this.alreadyRendered=!1,this.formulaRowIndex=null,this.hovered=!1,this.__selected=!1,this.beans=e}get groupData(){let e=this._groupData;return e===void 0?this.footer?this.sibling?.groupData:this.beans.groupStage?.loadGroupData(this)??null:e}set groupData(e){this._groupData=e}get primaryRow(){let e=this.footer&&this.sibling?this.sibling:this,{pinnedSibling:t}=e;return t&&e.rowPinned&&(e=t,e.footer&&e.sibling&&(e=e.sibling)),e}get allLeafChildren(){let e=this._leafs;return e===void 0?this.beans.groupStage?.loadLeafs?.(this)??null:e}set allLeafChildren(e){this._leafs=e}get expanded(){let e=this.beans.expansionSvc;return e?e.isExpanded(this):this.level===-1||!!this._expanded}set expanded(e){this._expanded=e}setData(e){this.setDataCommon(e,!1)}updateData(e){this.setDataCommon(e,!0)}setDataCommon(e,t){let{valueCache:n,eventSvc:r}=this.beans,i=this.data;this.data=e,n?.onDataChanged(),this.updateDataOnDetailNode(),this.resetQuickFilterAggregateText();let a=this.createDataChangedEvent(e,i,t);if(this.__localEventService?.dispatchEvent(a),this.sibling){this.sibling.data=e;let n=this.sibling.createDataChangedEvent(e,i,t);this.sibling.__localEventService?.dispatchEvent(n)}r.dispatchEvent({type:`rowNodeDataChanged`,node:this});let o=this.pinnedSibling;o&&(o.data=e,o.__localEventService?.dispatchEvent(o.createDataChangedEvent(e,i,t)),r.dispatchEvent({type:`rowNodeDataChanged`,node:o}))}updateDataOnDetailNode(){let e=this.detailNode;e&&(e.data=this.data)}createDataChangedEvent(e,t,n){return{type:`dataChanged`,node:this,oldData:t,newData:e,update:n}}getRowIndexString(){return this.rowIndex==null?(_K(13),null):this.rowPinned===`top`?`t-`+this.rowIndex:this.rowPinned===`bottom`?`b-`+this.rowIndex:this.rowIndex.toString()}setDataAndId(e,t){let{selectionSvc:n}=this.beans,r=n?.createDaemonNode?.(this),i=this.data;this.data=e,this.updateDataOnDetailNode(),this.setId(t),n&&(n.updateRowSelectable(this),n.syncInRowNode(this,r));let a=this.createDataChangedEvent(e,i,!1);this.__localEventService?.dispatchEvent(a)}setId(e){let t=RK(this.beans.gos);if(t){if(this.data){let e=this.parent?.getRoute()??[];this.id=t({data:this.data,parentKeys:e.length>0?e:void 0,level:this.level,rowPinned:this.rowPinned}),this.id.startsWith(`row-group-`)&&_K(14,{groupPrefix:Gbe})}else this.id=void 0}else this.id=e}setRowTop(e){if(this.oldRowTop=this.rowTop,this.rowTop===e)return;this.rowTop=e,this.dispatchRowEvent(`topChanged`);let t=e!==null;this.displayed!==t&&(this.displayed=t,this.dispatchRowEvent(`displayedChanged`))}clearRowTopAndRowIndex(){this.oldRowTop=null,this.setRowTop(null),this.setRowIndex(null)}setHovered(e){this.hovered=e}isHovered(){return this.hovered}setRowHeight(e,t=!1){this.rowHeight=e,this.rowHeightEstimated=t,this.dispatchRowEvent(`height
19Changed`)}setExpanded(e,t,n){this.beans.expansionSvc?.setExpanded(this,e,t,n)}setDataValue(e,t,n){let{colModel:r,valueSvc:i,gos:a,editSvc:o}=this.beans;if(e==null)return!1;let s=r.getCol(e)??r.getColDefCol(e);if(!s)return!1;if(!this.group){let e=s.getColDef();e.pivotValueColumn&&(s=e.pivotValueColumn)}let c=i.getValueForDisplay({column:s,node:this,from:`data`}).value;if(a.get(`readOnlyEdit`)){let{beans:{eventSvc:e},data:r,rowIndex:i,rowPinned:a}=this;return e.dispatchEvent({type:`cellEditRequest`,event:null,rowIndex:i,rowPinned:a,column:s,colDef:s.colDef,data:r,node:this,oldValue:c,newValue:t,value:t,source:n}),!1}if(n!==`data`&&o&&!o.committing){let e=o.setDataValue({rowNode:this,column:s},t,n);if(e!=null)return e}let l=i.setValue(this,s,t,n);return this.dispatchCellChangedEvent(s,t,c),l&&this.pinnedSibling?.dispatchCellChangedEvent(s,t,c),l}getDataValue(e,t=`data`){let{colModel:n,valueSvc:r,formula:i}=this.beans;if(e==null)return;let a=n.getCol(e)??n.getColDefCol(e);if(!a)return;let o=t===`data-raw`,s=o||t===`value`?`data`:t,c=r.getValue(a,this,s,o);if(!o&&(i&&a.isAllowFormula()&&i.isFormula(c)&&(c=i.resolveValue(a,this)),t!==`data`&&a.getAggFunc()&&typeof c==`object`&&c)){if(typeof c.toNumber==`function`)return c.toNumber();if(`value`in c)return c.value}return c}updateHasChildren(){let e=this.group&&!this.footer||!!this.childrenAfterGroup?.length,{rowChildrenSvc:t}=this.beans;t&&(e=t.getHasChildrenValue(this)),e!==this.__hasChildren&&(this.__hasChildren=!!e,this.dispatchRowEvent(`hasChildrenChanged`))}hasChildren(){return this.__hasChildren??this.updateHasChildren(),this.__hasChildren}dispatchCellChangedEvent(e,t,n){let r={type:`cellChanged`,node:this,column:e,newValue:t,oldValue:n};this.__localEventService?.dispatchEvent(r)}resetQuickFilterAggregateText(){this.quickFilterAggregateText=null}isExpandable(){return this.beans.expansionSvc?.isExpandable(this)??!1}isSelected(){if(this.footer)return this.sibling.isSelected();let e=this.rowPinned&&this.pinnedSibling;return e?e.isSelected():this.__selected}depthFirstSearch(e){let t=this.childrenAfterGroup;if(t)for(let n=0,r=t.length;n<r;++n)t[n].depthFirstSearch(e);e(this)}getAggregatedChildren(e,t){let n=this.beans;return n.aggChildrenSvc?.getAggregatedChildren(this,n.colModel.getCol(e),t)??[]}dispatchRowEvent(e){this.__localEventService?.dispatchEvent({type:e,node:this})}setSelected(e,t=!1,n=`api`){this.beans.selectionSvc?.setNodesSelected({nodes:[this],newValue:e,clearSelection:t,source:n})}isRowPinned(){return!!this.rowPinned}__addEventListener(e,t){(this.__localEventService??=new oW).addEventListener(e,t)}__removeEventListener(e,t){this.removeLocalListener(e,t)}addEventListener(e,t){this.beans.validation?.checkRowEvents(e);let n=this.__localEventService??=new oW;this.frameworkEventListenerService=this.beans.frameworkOverrides.createLocalEventListenerWrapper?.(this.frameworkEventListenerService,n);let r=this.frameworkEventListenerService?.wrap(e,t)??t;n.addEventListener(e,r)}removeEventListener(e,t){let n=this.frameworkEventListenerService?.unwrap(e,t)??t;this.removeLocalListener(e,n)}removeLocalListener(e,t){let n=this.__localEventService;n&&(n.removeEventListener(e,t),n.noRegisteredListenersExist()&&(this.__localEventService=null))}isFullWidthCell(){if(gK(61),this.detail)return!0;let e=this.beans.gos.getCallback(`isFullWidthRow`);return e?e({rowNode:this}):!1}getRoute(){if(this.level===-1)return[];if(this.key==null)return;let e=[],t=this;for(;t?.key!=null;)e.push(t.key),t=t.parent;return e.reverse()}setRowIndex(e){this.rowIndex!==e&&(this.rowIndex=e,this.dispatchRowEvent(`rowIndexChanged`))}setAllChildrenCount(e){this.allChildrenCount!==e&&(this.allChildrenCount=e,this.dispatchRowEvent(`allChildrenCountChanged`))}setUiLevel(e){this.uiLevel!==e&&(this.uiLevel=e,this.dispatchRowEvent(`uiLevelChanged`))}getFirstChild(){let e=this.childStore;return e?e.getFirstNode():this.childrenAfterSort?.[0]??null}_destroy(e){if(this.destroyed)return!1;this.destroyed=!0;let t=this.pinnedSibling;if(t?.rowPinned&&!this.rowPinned&&this.beans.pinnedRowModel?.pinRow(t,null),e?this.clearRowTopAndRowIndex():(this.setRowTop(null),this.setRowIndex(null)),!this.footer){let t=this.detailNode;t&&t._destroy(e);let n=this.sibling;n&&n._destroy(e)}return!0}};function qbe(e,t,n){return eq(t,{type:n,node:e,data:e.data,rowIndex:e.rowIndex,rowPinned:e.rowPinned})}var Jbe=new Set([`__autoHeights`,`__checkAutoHeightsDebounced`,`__localEventService`,`__objectId`,`_groupData`,`_leafs`,`childStore`,`groupValue`,`oldRowTop`,`sticky`,`treeNodeFlags`,`treeParent`]),Ybe=(e,t)=>
vendor: 103,396 bytes, line 19
19{let n=new NJ(t);for(let t of Object.keys(e))Jbe.has(t)||(n[t]=e[t]);return n.oldRowTop=null,n},PJ=(e,t,n)=>{if(!n)return;let r=n.rowIndex;if(r==null)return;r+=t;let i=e.getRowCount();for(;r>=0&&r<i;){let n=e.getRow(r);if(!n||!n.footer&&!n.detail)return n;r+=t}},FJ=class{constructor(e,t){this.beans=e,this.floating=t,this.all=new Set,this.visible=new Set,this.order=[],this.queued=new Set}size(){return this.visible.size}add(e){let{all:t,visible:n,order:r}=this;t.has(e)||(t.add(e),n.add(e),r.push(e),this.sort())}delete(e){this.all.delete(e),this.visible.delete(e),this.queued.delete(e.id),$U(this.order,e)}has(e){return this.visible.has(e)}forEach(e){this.order.forEach(e)}getByIndex(e){return this.order[e]}getById(e){for(let t of this.visible)if(t.id==e)return t}clear(){let{all:e,visible:t,order:n,queued:r}=this;e.clear(),r.clear(),t.clear(),n.length=0}sort(){let{sortSvc:e,rowNodeSorter:t,gos:n}=this.beans,r=e?.getSortOptions()??[],i=this.order,a=Qbe(i);if(i.sort((e,n)=>t?.compareRowNodes(r,e,n)||(e.pinnedSibling?.rowIndex??0)-(n.pinnedSibling?.rowIndex??0)),!a)return;let o=FK(n);o===`bottom`||o===`pinnedBottom`?this.order.push(a):this.order.unshift(a)}hide(e){let{all:t,visible:n}=this,r=n.size;return t.forEach(t=>e(t)?n.delete(t):n.add(t)),this.order=Array.from(n),this.sort(),r!=n.size}queue(e){this.queued.add(e)}unqueue(e){this.queued.delete(e)}forEachQueued(e){this.queued.forEach(e)}};function IJ(e){if(e.level===-1)return!0;let t=e.parent;return t?.childrenAfterSort?.some(t=>t==e)?IJ(t):!1}function LJ(e,t){let{gos:n,rowModel:r,filterManager:i}=e;return SK(n,r)?!r.getRowNode(t.id):i?.isAnyFilterPresent()?!IJ(t):n.get(`pivotMode`)?!t.group:!1}function Xbe(e){return!!e.footer&&e.level===-1}function Zbe(e){return!!e.pinnedSibling&&Xbe(e.pinnedSibling)}function Qbe(e){let t=e.findIndex(Zbe);if(t>-1)return e.splice(t,1)?.[0]}var RJ=class extends Q{constructor(){super(...arguments),this.csrm=null}postConstruct(){let{gos:e,beans:t}=this;this.top=new FJ(t,`top`),this.bottom=new FJ(t,`bottom`),this.csrm=jJ(t)??null;let n=e=>LJ(t,e.pinnedSibling),r=()=>{let n=e.get(`isRowPinned`);n&&e.get(`enableRowPinning`)&&t.rowModel.forEachNode(e=>this.pinRow(e,n(e)),!0),this.refreshRowPositions(),this.dispatchRowPinnedEvents()};this.addManagedEventListeners({stylesChanged:this.onGridStylesChanges.bind(this),modelUpdated:({keepRenderedRows:e})=>{this.tryToEmptyQueues(),this.pinGrandTotalRow();let t=!1;this.forContainers(e=>{t||=e.hide(n)});let r=this.refreshRowPositions();(!e||r||t)&&this.dispatchRowPinnedEvents()},columnRowGroupChanged:()=>{this.forContainers(exe),this.refreshRowPositions()},rowNodeDataChanged:({node:t})=>{(e.get(`isRowPinnable`)?.(t)??!0)||this.pinRow(t,null)},firstDataRendered:r}),this.addManagedPropertyListener(`pivotMode`,()=>{this.forContainers(e=>e.hide(n)),this.dispatchRowPinnedEvents()}),this.addManagedPropertyListener(`grandTotalRow`,({currentValue:e})=>{this._grandTotalPinned=e===`pinnedBottom`?`bottom`:e===`pinnedTop`?`top`:null}),this.addManagedPropertyListener(`isRowPinned`,r)}destroy(){this.reset(!1),super.destroy()}reset(e=!0){this.forContainers(e=>{let t=[];e.forEach(e=>t.push(e)),t.forEach(e=>this.pinRow(e,null)),e.clear()}),e&&this.dispatchRowPinnedEvents()}pinRow(e,t,n){if(t!=null&&e.destroyed)return;if(e.footer){let n=e.level;if(n>-1)return;if(n===-1){this._grandTotalPinned=t,this.csrm?.reMapRows();return}}let r=e.rowPinned??e.pinnedSibling?.rowPinned;if(r!=null&&t!=null&&t!=r){let r=e.rowPinned?e:e.pinnedSibling,i=e.rowPinned?e.pinnedSibling:e;this.pinRow(r,null,n),this.pinRow(i,t,n);return}let i=n&&txe(this.beans,e,n);if(i){i.forEach(e=>this.pinRow(e,t));return}if(t==null){let n=e.rowPinned?e:e.pinnedSibling,r=this.findPinnedRowNode(n);if(!r)return;r.delete(n);let i=n.pinnedSibling;BJ(n),this.refreshRowPositions(t),this.dispatchRowPinnedEvents(i)}else{let n=zJ(this.beans,e,t),r=this.getContainer(t);r.add(n),LJ(this.beans,e)&&r.hide(e=>LJ(this.beans,e.pinnedSibling)),this.refreshRowPositions(t),this.dispatchRowPinnedEvents(e)}}isManual(){return!0}isEmpty(e){return this.getContainer(e).size()===0}isRowsToRender(e){return!this.isEmpty(e)}ensureRowHeightsValid(){let e=!1,t=0,n=n=>{if(n.rowHeightEstimated){let r=EK(this.beans,n);n.setRowTop(t),n.setRowHeight(r.height),t+=r.height,e=!0}};return this.bottom.forEach(n),t=0,this.top.forEach(n),this.eventSvc.dispatchEvent({type:`pinnedHeightChanged`}),e}getPinnedTopTotalHeight(){return VJ(this.top)}getPinnedBottomTotalHeight(){return VJ(this.bottom)}getPinnedTopRowCount(){return this.top.size()}getPinnedBottomRowCount(){return this.bottom.size()}getPinnedTopRow(e){return this.top.getByIndex(e)}getPinnedBottomRow(e){return this.bottom.getByIndex(e)}getPinnedRowById(e,t){return this.getContainer(t).getById(e)}forEachPinnedRow(e,t){this.getContainer(e).forEach(t)}getPinnedState(){let e=e=>{let t=[];return this.forEachPinnedRow(e,e=>{let n=e.pinnedSibling?.id;n!=null&&t.push(n)}),t};return{top:e(`top`),bottom:e(`bottom`)}}setPinnedState(e){this.forContainers((t,n)=>{for(let r of e[n]){let e=this.beans.rowModel.getRowNode(r);e?this.pinRow(e,n):t.queue(r)}})}getGrandTotalPinned(){return this._grandTotalPinned}setGrandTotalPinned(e){this._grandTotalPinned=e}tryToEmptyQueues(){this.forContainers((e,t)=>{let n=new Set;e.forEachQueued(e=>{let t=this.beans.rowModel.getRowNode(e);t&&n.add(t)});for(let r of n)e.unqueue(r.id),this.pinRow(r,t)})}pinGrandTotalRow(){let{csrm:e,beans:t,_grandTotalPinned:n}=this;if(!e)return;let r=e.rootNode?.sibling;if(!r)return;let i=r.pinnedSibling,a=i&&this.findPinnedRowNode(i);if(!n){if(!a)return;BJ(i),a.delete(i)}else if(a&&a.floating!==n&&(BJ(i),a.delete(i)),!a||a.floating!==n){let e=zJ(t,r,n);this.getContainer(n).add(e)}}onGridStylesChanges(e){e.rowHeightChanged&&this.forContainers(e=>e.forEach(e=>e.setRowHeight(e.rowHeight,!0)))}getContainer(e){return e===`top`?this.top:this.bottom}findPinnedRowNode(e){if(this.top.has(e))return this.top;if(this.bottom.has(e))return this.bottom}refreshRowPositions(e){let t=e=>$be(this.beans,e);if(e)return t(this.getContainer(e));let n=!1;return this.forContainers(e=>{let r=t(e);n||=r}),n}forContainers(e){e(this.top,`top`),e(this.bottom,`bottom`)}dispatchRowPinnedEvents(e){this.eventSvc.dispatchEvent({type:`pinnedRowsChanged`}),e?.dispatchRowEvent(`rowPinned`)}};function $be(e,t){let n=0,r=!1;return t.forEach((t,i)=>{if(r||=t.rowTop!==n,t.setRowTop(n),t.rowHeightEstimated||t.rowHeight==null){let n=EK(e,t).height;r||=t.rowHeight!==n,t.setRowHeight(n)}t.setRowIndex(i),n+=t.rowHeight}),r}function zJ(e,t,n){if(t.pinnedSibling)return t.pinnedSibling;let r=Ybe(t,e);return r.setRowTop(null),r.setRowIndex(null),r.rowPinned=n,r.id=`${n===`top`?`t-`:`b-`}${n}-${t.id}`,r.pinnedSibling=t,t.pinnedSibling=r,r}function BJ(e){if(!e.pinnedSibling)return;e.rowPinned=null,e._destroy(!1);let t=e.pinnedSibling;e.pinnedSibling=void 0,t&&(t.pinnedSibling=void 0,t.rowPinned=null)}function exe(e){let t=new Set;e.forEach(e=>{e.group&&t.add(e)}),t.forEach(t=>e.delete(t))}function txe(e,t,n){let{rowSpanSvc:r}=e,i=(n&&r?.isCellSpanning(n,t))??!1;if(n&&i)return r?.getCellSpan(n,t)?.spannedNodes}function VJ(e){let t=e.size();if(t===0)return 0;let n=e.getByIndex(t-1);return n===void 0?0:n.rowTop+n.rowHeight}var HJ=class extends Q{constructor(){super(...arguments),this.nextId=0,this.pinnedTopRows={cache:{},order:[]},this.pinnedBottomRows={cache:{},order:[]}}postConstruct(){let e=this.gos;this.setPinnedRowData(e.get(`pinnedTopRowData`),`top`),this.setPinnedRowData(e.get(`pinnedBottomRowData`),`bottom`),this.addManagedPropertyListener(`pinnedTopRowData`,e=>this.setPinnedRowData(e.currentValue,`top`)),this.addManagedPropertyListener(`pinnedBottomRowData`,e=>this.setPinnedRowData(e.currentValue,`bottom`)),this.addManagedEventListeners({stylesChanged:this.onGridStylesChanges.bind(this)})}reset(){}isEmpty(e){return this.getCache(e).order.length===0}isRowsToRender(e){return!this.isEmpty(e)}isManual(){return!1}pinRow(e,t){}onGridStylesChanges(e){if(e.rowHeightChanged){let e=e=>{e.setRowHeight(e.rowHeight,!0)};KJ(this.pinnedBottomRows,e),KJ(this.pinnedTopRows,e)}}ensureRowHeightsValid(){let e=!1,t=0,n=n=>{if(n.rowHeightEstimated){let r=EK(this.beans,n);n.setRowTop(t),n.setRowHeight(r.height),t+=r.height,e=!0}};return KJ(this.pinnedBottomRows,n),t=0,KJ(this.pinnedTopRows,n),this.eventSvc.dispatchEvent({type:`pinnedHeightChanged`}),e}setPinnedRowData(e,t){this.updateNodesFromRowData(e,t),this.eventSvc.dispatchEvent({type:`pinnedRowDataChanged`})}updateNodesFromRowData(e,t){let n=this.getCache(t);if(e===void 0){n.order.length=0,n.cache={};return}let r=RK(this.gos),i=t===`top`?`t-`:`b-`,a=new Set(n.order),o=[],s=new Set,c=0,l=-1;for(let u of e){let e=r?.({data:u,level:0,rowPinned:t})??i+this.nextId++;if(s.has(e)){gK(96,{id:e,data:u});continue}l++,s.add(e),o.push(e);let d=WJ(n,e);if(d!==void 0)d.data!==u&&d.updateData(u),c+=this.setRowTopAndRowIndex(d,c,l),a.delete(e);else{let r=new NJ(this.beans);r.id=e,r.data=u,r.rowPinned=t,c+=this.setRowTopAndRowIndex(r,c,l),n.cache[e]=r,n.order.push(e)}}for(let e of a)WJ(n,e)?.clearRowTopAndRowIndex(),delete n.cache[e];n.order=o}setRowTopAndRowIndex(e,t,n){return e.setRowTop(t),e.setRowHeight(EK(this.beans,e).height),e.setRowIndex(n),e.rowHeight}getPinnedTopTotalHeight(){return UJ(this.pinnedTopRows)}getPinnedBottomTotalHeight(){return UJ(this.pinnedBottomRows)}getPinnedTopRowCount(){return qJ(this.pinnedTopRows)}getPinnedBottomRowCount(){return qJ(this.pinnedBottomRows)}getPinnedTopRow(e){return GJ(this.pinnedTopRows,e)}getPinnedBottomRow(e){return GJ(this.pinnedBottomRows,e)}getPinnedRowById(e,t){return WJ(this.getCache(t),e)}forEachPinnedRow(e,t){return KJ(this.getCache(e),t)}getCache(e){return e===`top`?this.pinnedTopRows:this.pinnedBottomRows}getPinnedState(){return{top:[],bottom:[]}}setPinnedState(){}getGrandTotalPinned(){}setGrandTotalPinned(){}};function UJ(e){let t=qJ(e);if(t===0)return 0;let n=GJ(e,t-1);return n===void 0?0:n.rowTop+n.rowHeight}function WJ(e,t){return e.cache[t]}function GJ(e,t){return WJ(e,e.order[t])}function KJ(e,t){e.order.forEach((n,r)=>{let i=WJ(e,n);i&&t(i,r)})}function qJ(e){return e.order.length}var nxe=class extends Q{constructor(){super(...arguments),this.beanName=`pinnedRowModel`}postConstruct(){let{gos:e}=this,t=()=>{let t=e.get(`enableRowPinning`),n=FK(e),r=!!t||n===`pinnedBottom`||n===`pinnedTop`,i=r?this.inner instanceof HJ:this.inner instanceof RJ;this.inner&&i&&this.destroyBean(this.inner),(i||!this.inner)&&(this.inner=this.createManagedBean(r?new RJ:new HJ))};this.addManagedPropertyListeners([`enableRowPinning`,`grandTotalRow`],t),t()}reset(){return this.inner.reset()}isEmpty(e){return this.inner.isEmpty(e)}isManual(){return this.inner.isManual()}isRowsToRender(e){return this.inner.isRowsToRender(e)}pinRow(e,t,n){return this.inner.pinRow(e,t,n)}ensureRowHeightsValid(){return this.inner.ensureRowHeightsValid()}getPinnedRowById(e,t){return this.inner.getPinnedRowById(e,t)}getPinnedTopTotalHeight(){return this.inner.getPinnedTopTotalHeight()}getPinnedBottomTotalHeight(){return this.inner.getPinnedBottomTotalHeight()}getPinnedTopRowCount(){return this.inner.getPinnedTopRowCount()}getPinnedBottomRowCount(){return this.inner.getPinnedBottomRowCount()}getPinnedTopRow(e){return this.inner.getPinnedTopRow(e)}getPinnedBottomRow(e){return this.inner.getPinnedBottomRow(e)}forEachPinnedRow(e,t){return this.inner.forEachPinnedRow(e,t)}getPinnedState(){return this.inner.getPinnedState()}setPinnedState(e){return this.inner.setPinnedState(e)}setGrandTotalPinned(e){return this.inner.setGrandTotalPinned(e)}getGrandTotalPinned(){return this.inner.getGrandTotalPinned()}},rxe=500,ixe=550,JJ,axe=e=>{if(!JJ)JJ=new WeakSet;else if(JJ.has(e))return!1;return JJ.add(e),!0},YJ=class{constructor(e,t=!1){this.eElement=e,this.preventClick=t,this.startListener=null,this.handlers=[],this.eventSvc=void 0,this.touchStart=null,this.lastTapTime=null,this.longPressTimer=0,this.moved=!1}addEventListener(e,t){let n=this.eventSvc;if(!n){if(n===null)return;this.eventSvc=n=new oW;let e=this.onTouchStart.bind(this);this.startListener=e,this.eElement.addEventListener(`touchstart`,e,{passive:!0})}n.addEventListener(e,t)}removeEventListener(e,t){this.eventSvc?.removeEventListener(e,t)}onTouchStart(e){if(this.touchStart||!axe(e))return;let t=e.touches[0];this.touchStart=t;let n=this.handlers;if(!n.length){let e=this.eElement,t=e.ownerDocument,r=this.onTouchMove.bind(this),i=this.onTouchEnd.bind(this),a=this.onTouchCancel.bind(this),o={passive:!0},s={passive:!1};EG(n,[e,`touchmove`,r,o],[t,`touchcancel`,a,o],[t,`touchend`,i,s],[t,`contextmenu`,OG,s])}this.clearLongPress(),this.longPressTimer=window.setTimeout(()=>{this.longPressTimer=0,this.touchStart===t&&!this.moved&&(this.moved=!0,this.eventSvc?.dispatchEvent({type:`longTap`,touchStart:t,touchEvent:e}))},ixe)}onTouchMove(e){let{moved:t,touchStart:n}=this;if(!t&&n){let t=wG(n,e.touches);t&&!CG(t,n,4)&&(this.clearLongPress(),this.moved=!0)}}onTouchEnd(e){let t=this.touchStart;t&&wG(t,e.changedTouches)&&(this.moved||(this.eventSvc?.dispatchEvent({type:`tap`,touchStart:t}),this.checkDoubleTap(t)),this.preventClick&&OG(e),this.cancel())}onTouchCancel(e){let t=this.touchStart;t&&wG(t,e.changedTouches)&&(this.lastTapTime=null,this.cancel())}checkDoubleTap(e){let t=Date.now(),n=this.lastTapTime;n&&t-n>rxe&&(this.eventSvc?.dispatchEvent({type:`doubleTap`,touchStart:e}),t=null),this.lastTapTime=t}cancel(){this.clearLongPress(),DG(this.handlers),this.touchStart=null}clearLongPress(){window.clearTimeout(this.longPressTimer),this.longPressTimer=0,this.moved=!1}destroy(){let e=this.startListener;e&&(this.startListener=null,this.eElement.removeEventListener(`touchstart`,e)),this.cancel(),this.eElement=null,this.eventSvc=null}},oxe=1,sxe=class{constructor(e){this.beans={},this.createdBeans=[],this.destroyed=!1,this.instanceId=oxe++,e?.beanClasses&&(this.beanDestroyComparator=e.beanDestroyComparator,this.init(e))}init(e){this.id=e.id,this.beans.context=this,this.destroyCallback=e.destroyCallback;for(let t of Object.keys(e.providedBeanInstances))this.beans[t]=e.providedBeanInstances[t];for(let t of e.beanClasses){let e=new t;e.beanName?this.beans[e.beanName]=e:console.error(`Bean ${t.name} is missing beanName`),this.createdBeans.push(e)}for(let t of e.derivedBeans??[]){let{beanName:e,bean:n}=t(this);this.beans[e]=n,this.createdBeans.push(n)}e.beanInitComparator&&this.createdBeans.sort(e.beanInitComparator),this.initBeans(this.createdBeans)}getBeanInstances(){return Object.values(this.beans)}createBean(e,t){return this.initBeans([e],t),e}initBeans(e,t){let n=this.beans;for(let t of e)t.preWireBeans?.(n),t.wireBeans?.(n);for(let t of e)t.preConstruct?.();t&&e.forEach(t);for(let t of e)t.postConstruct?.()}getBeans(){return this.beans}getBean(e){return this.beans[e]}getId(){return this.id}destroy(){if(this.destroyed)return;this.destroyed=!0;let e=this.getBeanInstances();this.beanDestroyComparator&&e.sort(this.beanDestroyComparator),this.destroyBeans(e),this.beans={},this.createdBeans=[],this.destroyCallback?.()}destroyBean(e){e?.destroy?.()}destroyBeans(e){if(e)for(let t=0;t<e.length;t++)this.destroyBean(e[t]);return[]}isDestroyed(){return this.destroyed}};function cxe(e){return{beanName:`gridApi`,bean:e.getBean(`apiFunctionSvc`).api}}var XJ=Object.fromEntries(`licenseManager.environment.eventSvc.gos.paginationAutoPageSizeSvc.apiFunctionSvc.gridApi.registry.agCompUtils.userCompFactory.rowContainerHeight.horizontalResizeSvc.localeSvc.pinnedRowModel.dragSvc.colGroupSvc.visibleCols.popupSvc.selectionSvc.colFilter.quickFilter.filterManager.colModel.headerNavigation.pageBounds.pagination.pageBoundsListener.rowSpanSvc.stickyRowSvc.rowRenderer.expressionSvc.alignedGridsSvc.navigation.valueCache.valueSvc.autoWidthCalc.filterMenuFactory.dragAndDrop.focusSvc.cellNavigation.cellStyles.scrollVisibleSvc.sortSvc.colHover.colAnimation.autoColSvc.selectionColSvc.changeDetectionSvc.animationFrameSvc.undoRedo.colDefFactory.rowStyleSvc.rowNodeBlockLoader.rowNodeSorter.ctrlsSvc.pinnedCols.dataTypeSvc.syncSvc.overlays.stateSvc.expansionSvc.apiEventSvc.ariaAnnounce.menuSvc.colMoves.colAutosize.colFlex.colResize.pivotColsSvc.valueColsSvc.rowGroupColsSvc.colNames.colViewport.pivotResultCols.showRowGroupCols.validation`.split(`.`).map((e,t)=>[e,t]));function lxe(e,t){return((e.beanName?XJ[e.beanName]:void 0)??2**53-1)-((t.beanName?XJ[t.beanName]:void 0)??2**53-1)}function uxe(e,t){return e?.beanName===`gridDestroySvc`?-1:+(t?.beanName===`gridDestroySvc`)}function dxe(e){let{rowIndex:t,rowPinned:n,column:r}=e;return`${t}.${n??`null`}.${r.getId()}`}function ZJ(e,t){let n=e.column===t.column,r=e.rowPinned===t.rowPinned,i=e.rowIndex===t.rowIndex;return n&&r&&i}function fxe(e,t){switch(e.rowPinned){case`top`:if(t.rowPinned!==`top`)return!0;break;case`bottom`:if(t.rowPinned!==`bottom`)return!1;break;default:if(nW(t.rowPinned))return t.rowPinned!==`top`}return e.rowIndex<t.rowIndex}function pxe(e,t){return!e&&!t?!0:!e||!t?!1:e.rowIndex===t.rowIndex&&e.rowPinned==t.rowPinned}function QJ(e){let t=0,n,{pinnedRowModel:r,rowModel:i,pageBounds:a}=e;return r?.getPinnedTopRowCount()?n=`top`:i.getRowCount()?(n=null,t=a.getFirstRow()):r?.getPinnedBottomRowCount()&&(n=`bottom`),n===void 0?null:{rowIndex:t,rowPinned:n}}function $J(e){let t,n=null,{pinnedRowModel:r,pageBounds:i}=e,a=r?.getPinnedBottomRowCount(),o=r?.getPinnedTopRowCount();return a?(n=`bottom`,t=a-1):e.rowModel.getRowCount()?t=i.getLastRow():o&&(n=`top`,t=o-1),t===void 0?null:{rowIndex:t,rowPinned:n}}function eY(e,t){switch(t.rowPinned){case`top`:return e.pinnedRowModel?.getPinnedTopRow(t.rowIndex);case`bottom`:return e.pinnedRowModel?.getPinnedBottomRow(t.rowIndex);default:return e.rowModel.getRow(t.rowIndex)}}function tY(e,t){let n=e.spannedRowRenderer?.getCellByPosition(t);if(n)return n;let r=e.rowRenderer.getRowByPosition(t);return r?r.getCellCtrl(t.column):null}function mxe(e,t,n){let{rowModel:r,pinnedRowModel:i}=e,a;return a??=r?.getRowNode(t),n?a??=i?.getPinnedRowById(t,n):(a??=i?.getPinnedRowById(t,`top`),a??=i?.getPinnedRowById(t,`bottom`)),a}function nY(e,t,n=!1){let{rowIndex:r,rowPinned:i}=t,{pageBounds:a,pinnedRowModel:o,rowModel:s}=e;return r===0?i===`top`?null:i===`bottom`&&s.isRowsToRender()?{rowIndex:a.getLastRow(),rowPinned:null}:o?.isRowsToRender(`top`)?{rowIndex:o.getPinnedTopRowCount()-1,rowPinned:`top`}:null:n?iY(e,i?void 0:s.getRow(r),!0)??{rowIndex:r-1,rowPinned:i}:{rowIndex:r-1,rowPinned:i}}function rY(e,t,n=!1){let{rowIndex:r,rowPinned:i}=t,{pageBounds:a,pinnedRowModel:o,rowModel:s}=e;return hxe(e,t)?i===`bottom`?null:i===`top`&&s.isRowsToRender()?{rowIndex:a.getFirstRow(),rowPinned:null}:o?.isRowsToRender(`bottom`)?{rowIndex:0,rowPinned:`bottom`}:null:n?iY(e,i?void 0:s.getRow(r))??{rowIndex:r+1,rowPinned:i}:{rowIndex:r+1,rowPinned:i}}function iY(e,t,n=!1){let{gos:r,rowRenderer:i}=e;if(!t?.sticky||!MK(r))return;let a=i.getStickyTopRowCtrls(),o=i.getStickyBottomRowCtrls(),s=!o.some(e=>e.rowNode.rowIndex===t.rowIndex),c=s?a:o,l=(n?-1:1)*(s?-1:1),u;for(let e=0;e<c.length;e++)if(c[e].rowNode.rowIndex===t.rowIndex){u=c[e+l];break}return u?{rowIndex:u.rowNode.rowIndex,rowPinned:null}:void 0}function hxe(e,t){let{rowPinned:n,rowIndex:r}=t,{pinnedRowModel:i,pageBounds:a}=e;return n===`top`?(i?.getPinnedTopRowCount()??0)-1<=r:n===`bottom`?(i?.getPinnedBottomRowCount()??0)-1<=r:a.getLastRow()<=r}function gxe(e,t,n){t.addManagedElementListeners(n,{keydown:t=>{if(!t.defaultPrevented&&!xxe(t)&&t.key===$.TAB){let r=t.shiftKey;_J(e,n,!1,r)||sY(e,r)&&t.preventDefault()}}})}function _xe(e,t){return e.ctrlsSvc.get(`gridCtrl`).focusInnerElement(t)}function aY(e){return e.gos.get(`suppressHeaderFocus`)||!!e.overlays?.exclusive}function oY(e){return e.gos.get(`suppressCellFocus`)||!!e.overlays?.exclusive}function sY(e,t,n=!1){let r=e.ctrlsSvc.get(`gridCtrl`),i=r.focusNextInnerContainer(t);return i===!0?!0:i===!1?i:((n||!t&&!r.isDetailGrid()&&r.isFocusInsideGridBody())&&r.forceFocusOutOfContainer(t),!1)}function vxe(e,t){let n=e.focusSvc,r=n.getFocusedCell();if(r&&t&&ZJ(r,t)){let{rowIndex:r,rowPinned:i,column:a}=t;pW(e)&&n.setFocusedCell({rowIndex:r,column:a,rowPinned:i,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!mJ()})}}function yxe(e,t){let n=e.getFocusableContainerName();return n===`gridBody`?t():cY(e,()=>hJ(e.getGui(),`.ag-tab-guard`).length>0)?n:null}function cY(e,t){e.setAllowFocus?.(!0);try{return t()}finally{e.setAllowFocus?.(!1)}}var bxe=`__ag_Grid_Skip_Focusable_Container`;function xxe(e){return e[bxe]===!0}function lY(e){return e.ctrlsSvc.getHeaderRowContainerCtrl()?.getRowCount()??0}function uY(e){let t=[],n=e.ctrlsSvc.getHeaderRowContainerCtrls();for(let r of n){if(!r)continue;let n=r.getGroupRowCount()||0;for(let i=0;i<n;i++){let n=r.getGroupRowCtrlAtIndex(i),a=t[i];if(n){let r=Sxe(e,n);(a==null||r>a)&&(t[i]=r)}}}return t}function Sxe(e,t){let n=e.colModel.isPivotMode()?wxe(e):mY(e),r=t.getHeaderCellCtrls();for(let e of r){let{column:t}=e,r=t.getAutoHeaderHeight();r!=null&&r>n&&t.isAutoHeaderHeight()&&(n=r)}return n}function dY(e){let t=e.colModel.isPivotMode()?Cxe(e):fY(e);return e.colModel.forAllCols(e=>{let n=e.getAutoHeaderHeight();n!=null&&n>t&&e.isAutoHeaderHeight()&&(t=n)}),t}function fY(e){return e.gos.get(`headerHeight`)??e.environment.getDefaultHeaderHeight()}function pY(e){return e.gos.get(`floatingFiltersHeight`)??fY(e)}function mY(e){return e.gos.get(`groupHeaderHeight`)??fY(e)}function Cxe(e){return e.gos.get(`pivotHeaderHeight`)??fY(e)}function wxe(e){return e.gos.get(`pivotGroupHeaderHeight`)??mY(e)}function Txe(e,t){return e.headerRowIndex===t.headerRowIndex&&e.column===t.column}function Exe(e){return e?.headerRowIndex!=null}var Dxe=class extends Q{setComp(e,t,n){this.comp=e,this.eGui=t;let{beans:r}=this,{headerNavigation:i,touchSvc:a,ctrlsSvc:o}=r;i&&this.createManagedBean(new wJ(n,{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addManagedEventListeners({columnPivotModeChanged:this.onPivotModeChanged.bind(this,r),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this,r)}),this.onPivotModeChanged(r),this.setupHeaderHeight();let s=this.onHeaderContextMenu.bind(this);this.addManagedElementListeners(this.eGui,{contextmenu:s}),a?.mockHeaderContextMenu(this,s),o.register(`gridHeaderCtrl`,this)}setupHeaderHeight(){let e=this.setHeaderHeight.bind(this);e(),this.addManagedPropertyListeners([`headerHeight`,`pivotHeaderHeight`,`groupHeaderHeight`,`pivotGroupHeaderHeight`,`floatingFiltersHeight`],e),this.addManagedEventListeners({headerRowsChanged:e,columnHeaderHeightChanged:e,columnGroupHeaderHeightChanged:()=>lG(this.beans,()=>e()),stylesChanged:e,advancedFilterEnabledChanged:e})}setHeaderHeight(){let{beans:e}=this,t=0,n=uY(e).reduce((e,t)=>e+t,0),r=dY(e);e.filterManager?.hasFloatingFilters()&&(t+=pY(e)),t+=n,t+=r;let i=e.environment.getHeaderRowBorderWidth(),a=t+i;if(this.headerHeightWithBorder!==a){this.headerHeightWithBorder=a;let e=`${a}px`;this.comp.setHeightAndMinHeight(e)}this.headerHeight!==t&&(this.headerHeight=t,this.eventSvc.dispatchEvent({type:`headerHeightChanged`}))}onPivotModeChanged(e){let t=e.colModel.isPivotMode();this.comp.toggleCss(`ag-pivot-on`,t),this.comp.toggleCss(`ag-pivot-off`,!t)}onDisplayedColumnsChanged(e){let t=e.visibleCols.allCols.some(e=>e.isSpanHeaderHeight());this.comp.toggleCss(`ag-header-allow-overflow`,t)}onTabKeyDown(e){let t=this.gos.get(`enableRtl`),n=e.shiftKey,r=n===t?`RIGHT`:`LEFT`,{beans:i}=this,{headerNavigation:a,focusSvc:o}=i;(a.navigateHorizontally(r,!0,e)||!n&&o.focusOverlay(!1)||sY(i,n,!0))&&e.preventDefault()}handleKeyDown(e){let t=null,{headerNavigation:n}=this.beans;switch(e.key){case $.LEFT:t=`LEFT`;case $.RIGHT:nW(t)||(t=`RIGHT`),n.navigateHorizontally(t,!1,e)&&e.preventDefault();break;case $.UP:t=`UP`;case $.DOWN:nW(t)||(t=`DOWN`),n.navigateVertically(t,e)&&e.preventDefault();break;default:return}}onFocusOut(e){let{relatedTarget:t}=e,{eGui:n,beans:r}=this;(t||!n.contains(dW(r)))&&(n.contains(t)||(r.focusSvc.focusedHeader=null))}onHeaderContextMenu(e,t,n){let{menuSvc:r,ctrlsSvc:i}=this.beans;if(!e&&!n||!r?.isHeaderContextMenuEnabled())return;let{target:a}=e??t;(a===this.eGui||a===i.getHeaderRowContainerCtrl()?.eViewport)&&r.showHeaderContextMenu(void 0,e,n)}},hY=class extends Q{constructor(e,t=!1){super(),this.callback=e,this.addSpacer=t}postConstruct(){let e=this.setWidth.bind(this);this.addManagedPropertyListener(`domLayout`,e),this.addManagedEventListeners({columnContainerWidthChanged:e,displayedColumnsChanged:e,leftPinnedWidthChanged:e}),this.addSpacer&&this.addManagedEventListeners({rightPinnedWidthChanged:e,scrollVisibilityChanged:e,scrollbarWidthChanged:e}),this.setWidth()}setWidth(){let e=CK(this.gos,`print`),{visibleCols:t,scrollVisibleSvc:n}=this.beans,r=t.bodyWidth,i=t.getColsLeftWidth(),a=t.getDisplayedColumnsRightWidth(),o;e?o=r+i+a:(o=r,this.addSpacer&&(this.gos.get(`enableRtl`)?i:a)===0&&n.verticalScrollShowing&&(o+=n.getScrollbarWidth())),this.callback(o)}},gY=class extends Q{};function _Y(e,t,n){return n&&e.addDestroyFunc(()=>t.destroyBean(n)),n??e}var vY=class extends Q{constructor(e,t,n,r){super(),this.columnOrGroup=e,this.eCell=t,this.colsSpanning=r,this.columnOrGroup=e,this.ariaEl=t.querySelector(`[role=columnheader]`)||t,this.beans=n}setColsSpanning(e){this.colsSpanning=e,this.onLeftChanged()}getColumnOrGroup(){let{beans:e,colsSpanning:t}=this;return e.gos.get(`enableRtl`)&&t?XU(t):this.columnOrGroup}postConstruct(){let e=this.onLeftChanged.bind(this);this.addManagedListeners(this.columnOrGroup,{leftChanged:e}),this.setLeftFirstTime(),this.addManagedEventListeners({displayedColumnsWidthChanged:e}),this.addManagedPropertyListener(`domLayout`,e)}setLeftFirstTime(){let{gos:e,colAnimation:t}=this.beans,n=e.get(`suppressColumnMoveAnimation`),r=nW(this.columnOrGroup.getOldLeft());t?.isActive()&&r&&!n?this.animateInLeft():this.onLeftChanged()}animateInLeft(){let e=this.getColumnOrGroup(),t=this.modifyLeftForPrintLayout(e,e.getOldLeft()),n=this.modifyLeftForPrintLayout(e,e.getLeft());this.setLeft(t),this.actualLeft=n,this.beans.colAnimation.executeNextVMTurn(()=>{this.actualLeft===n&&this.setLeft(n)})}onLeftChanged(){let e=this.getColumnOrGroup(),t=e.getLeft();this.actualLeft=this.modifyLeftForPrintLayout(e,t),this.setLeft(this.actualLeft)}modifyLeftForPrintLayout(e,t){let{gos:n,visibleCols:r}=this.beans;if(!CK(n,`print`)||e.getPinned()===`left`)return t;let i=r.getColsLeftWidth();return e.getPinned()===`right`?i+r.bodyWidth+t:i+t}setLeft(e){if(nW(e)&&(this.eCell.style.left=`${e}px`),Aq(this.columnOrGroup)){let e=this.columnOrGroup.getLeafColumns();if(!e.length)return;e.length>1&&kve(this.ariaEl,e.length)}}},Oxe=`ag-column-first`,kxe=`ag-column-last`;function yY(e,t,n,r){return rW(e)?[]:jxe(e.headerClass,e,t,n,r)}function bY(e,t,n){e.toggleCss(Oxe,n.isColAtEdge(t,`first`)),e.toggleCss(kxe,n.isColAtEdge(t,`last`))}function Axe(e,t,n,r){return eq(t,{colDef:e,column:n,columnGroup:r})}function jxe(e,t,n,r,i){if(rW(e))return[];let a;return a=typeof e==`function`?e(Axe(t,n,r,i)):e,typeof a==`string`?[a]:Array.isArray(a)?[...a]:[]}var Mxe=0,xY=`headerCtrl`,SY=class extends Q{constructor(e,t){super(),this.column=e,this.rowCtrl=t,this.resizeToggleTimeout=0,this.resizeMultiplier=1,this.resizeFeature=null,this.lastFocusEvent=null,this.dragSource=null,this.reAttemptToFocus=!1,this.instanceId=e.getUniqueId()+`-`+Mxe++}postConstruct(){let e=this.refreshTabIndex.bind(this);this.addManagedPropertyListeners([`suppressHeaderFocus`],e),this.addManagedEventListeners({overlayExclusiveChanged:e})}setComp(e,t,n,r,i){t.setAttribute(`col-id`,this.column.colIdSanitised),this.wireComp(e,t,n,r,i),this.reAttemptToFocus&&(this.reAttemptToFocus=!1,this.focus(this.lastFocusEvent??void 0))}shouldStopEventPropagation(e){let{headerRowIndex:t,column:n}=this.beans.focusSvc.focusedHeader,r=n.getDefinition(),i=r?.suppressHeaderKeyboardEvent;return nW(i)?!!i(eq(this.gos,{colDef:r,column:n,headerRowIndex:t,event:e})):!1}getWrapperHasFocus(){return dW(this.beans)===this.eGui}setGui(e,t){this.eGui=e,this.addDomData(t),t.addManagedListeners(this.beans.eventSvc,{displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this)}),t.addManagedElementListeners(this.eGui,{focus:this.onGuiFocus.bind(this)}),this.onDisplayedColumnsChanged(),this.refreshTabIndex()}refreshHeaderStyles(){let e=this.column.getDefinition();if(!e)return;let{headerStyle:t}=e,n;n=typeof t==`function`?t(this.getHeaderClassParams()):t,n&&this.comp.setUserStyles(n)}onGuiFocus(){this.eventSvc.dispatchEvent({type:`headerFocused`,column:this.column})}setupAutoHeight(e){let{wrapperElement:t,checkMeasuringCallback:n,compBean:r}=e,{beans:i}=this,a=e=>{if(!this.isAlive()||!r.isAlive())return;let{paddingTop:n,paddingBottom:o,borderBottomWidth:s,borderTopWidth:c}=zW(this.eGui),l=n+o+s+c,u=t.offsetHeight+l;if(e<5&&(!fW(i)?.contains(t)||u==0)){NG(()=>a(e+1),`raf`,i);return}this.setColHeaderHeight(this.column,u)},o=!1,s,c=()=>{let e=this.column.isAutoHeaderHeight();e&&!o&&l(),!e&&o&&u()},l=()=>{o=!0,this.comp.toggleCss(`ag-header-cell-auto-height`,!0),a(0),s=cG(this.beans,t,()=>a(0))},u=()=>{o=!1,s&&s(),this.comp.toggleCss(`ag-header-cell-auto-height`,!1),s=void 0};c(),r.addDestroyFunc(()=>u()),r.addManagedListeners(this.column,{widthChanged:()=>o&&a(0)}),r.addManagedEventListeners({sortChanged:()=>{o&&window.setTimeout(()=>a(0))}}),n&&n(c)}onDisplayedColumnsChanged(){let{comp:e,column:t,beans:n,eGui:r}=this;e&&t&&r&&(bY(e,t,n.visibleCols),OW(r,n.visibleCols.getAriaColIndex(t)))}addResizeAndMoveKeyboardListeners(e){e.addManagedListeners(this.eGui,{keydown:this.onGuiKeyDown.bind(this),keyup:this.onGuiKeyUp.bind(this)})}refreshTabIndex(){let e=aY(this.beans);this.eGui&&oG(this.eGui,`tabindex`,e?null:`-1`)}onGuiKeyDown(e){let t=dW(this.beans),n=e.key===$.LEFT||e.key===$.RIGHT;if(this.isResizing&&(e.preventDefault(),e.stopImmediatePropagation()),t!==this.eGui||!e.shiftKey&&!e.altKey&&!e.ctrlKey&&!e.metaKey)return;if((this.isResizing||n)&&(e.preventDefault(),e.stopImmediatePropagation()),(e.ctrlKey||e.metaKey)&&Mq(e)===$.C)return this.beans.clipboardSvc?.copyToClipboard();if(!n)return;let r=e.key===$.LEFT===this.gos.get(`enableRtl`)?`right`:`left`;if(e.altKey){this.isResizing=!0,this.resizeMultiplier+=1;let t=this.getViewportAdjustedResizeDiff(e);this.resizeHeader(t,e.shiftKey),this.resizeFeature?.toggleColumnResizing(!0)}else this.moveHeader(r)}moveHeader(e){this.beans.colMoves?.moveHeader(e,this.eGui,this.column,this.rowCtrl.pinned,this)}getViewportAdjustedResizeDiff(e){let t=this.getResizeDiff(e),{pinnedCols:n}=this.beans;return n?n.getHeaderResizeDiff(t,this.column):t}getResizeDiff(e){let{gos:t,column:n}=this,r=e.key===$.LEFT!==t.get(`enableRtl`),i=n.getPinned(),a=t.get(`enableRtl`);return i&&a!==(i===`right`)&&(r=!r),(r?-1:1)*this.resizeMultiplier}onGuiKeyUp(){this.isResizing&&(this.resizeToggleTimeout&&=(window.clearTimeout(this.resizeToggleTimeout),0),this.isResizing=!1,this.resizeMultiplier=1,this.resizeToggleTimeout=window.setTimeout(()=>{this.resizeFeature?.toggleColumnResizing(!1)},150))}handleKeyDown(e){let t=this.getWrapperHasFocus();switch(e.key){case $.PAGE_DOWN:case $.PAGE_UP:case $.PAGE_HOME:case $.PAGE_END:t&&e.preventDefault()}}addDomData(e){let t=xY,{eGui:n,gos:r}=this;AK(r,n,t,this),e.addDestroyFunc(()=>AK(r,n,t,null))}focus(e){if(!this.isAlive())return!1;let{eGui:t}=this;return t?(this.lastFocusEvent=e||null,t.focus()):this.reAttemptToFocus=!0,!0}focusThis(){this.beans.focusSvc.focusedHeader={headerRowIndex:this.rowCtrl.rowIndex,column:this.column}}removeDragSource(){this.dragSource&&=(this.beans.dragAndDrop?.removeDragSource(this.dragSource),null)}handleContextMenuMouseEvent(e,t,n){let r=e??t,{menuSvc:i,gos:a}=this.beans;a.get(`preventDefaultOnContextMenu`)&&r.preventDefault(),i?.isHeaderContextMenuEnabled(n)&&i.showHeaderContextMenu(n,e,t),this.dispatchColumnMouseEvent(`columnHeaderContextMenu`,n)}dispatchColumnMouseEvent(e,t){this.eventSvc.dispatchEvent({type:e,column:t})}setColHeaderHeight(e,t){if(!e.setAutoHeaderHeight(t))return;let{eventSvc:n}=this;e.isColumn?n.dispatchEvent({type:`columnHeaderHeightChanged`,column:e,columns:[e],source:`autosizeColumnHeaderHeight`}):n.dispatchEvent({type:`columnGroupHeaderHeightChanged`,columnGroup:e,source:`autosizeColumnGroupHeaderHeight`})}clearComponent(){this.removeDragSource(),this.resizeFeature=null,this.comp=null,this.eGui=null}destroy(){super.destroy(),this.column=null,this.lastFocusEvent=null,this.rowCtrl=null}},Nxe=class extends SY{constructor(){super(...arguments),this.refreshFunctions={},this.userHeaderClasses=new Set,this.ariaDescriptionProperties=new Map}wireComp(e,t,n,r,i){this.comp=e;let{rowCtrl:a,column:o,beans:s}=this,{colResize:c,context:l,colHover:u,rangeSvc:d}=s,f=_Y(this,l,i);this.setGui(t,f),this.updateState(),this.setupWidth(f),this.setupMovingCss(f),this.setupMenuClass(f),this.setupSortableClass(f),this.setupWrapTextClass(),this.refreshSpanHeaderHeight(),this.setupAutoHeight({wrapperElement:r,checkMeasuringCallback:e=>this.setRefreshFunction(`measuring`,e),compBean:f}),this.addColumnHoverListener(f),this.setupFilterClass(f),this.setupStylesFromColDef(),this.setupClassesFromColDef(),this.setupTooltip(),this.addActiveHeaderMouseListeners(f),this.setupSelectAll(f),this.setupUserComp(),this.refreshAria(),c?this.resizeFeature=f.createManagedBean(c.createResizeFeature(a.pinned,o,n,e,this)):FW(n,!1),u?.createHoverFeature(f,[o],t),d?.createRangeHighlightFeature(f,o,e),f.createManagedBean(new vY(o,t,s)),f.createManagedBean(new wJ(t,{shouldStopEventPropagation:e=>this.shouldStopEventPropagation(e),onTabKeyDown:()=>null,handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addResizeAndMoveKeyboardListeners(f),f.addManagedPropertyListeners([`suppressMovableColumns`,`suppressMenuHide`,`suppressAggFuncInHeader`,`enableAdvancedFilter`],()=>this.refresh()),f.addManagedListeners(o,{colDefChanged:()=>this.refresh(),formulaRefChanged:()=>this.refresh(),headerHighlightChanged:this.onHeaderHighlightChanged.bind(this)});let p=()=>this.checkDisplayName();f.addManagedEventListeners({columnValueChanged:p,columnRowGroupChanged:p,columnPivotChanged:p,headerHeightChanged:this.onHeaderHeightChanged.bind(this)}),f.addDestroyFunc(()=>{this.refreshFunctions={},this.selectAllFeature=null,this.dragSourceElement=void 0,this.userCompDetails=null,this.userHeaderClasses.clear(),this.ariaDescriptionProperties.clear(),this.clearComponent()})}resizeHeader(e,t){this.beans.colResize?.resizeHeader(this.column,e,t)}getHeaderClassParams(){let{column:e,beans:t}=this,n=e.colDef;return eq(t.gos,{colDef:n,column:e,floatingFilter:!1})}setupUserComp(){let e=this.lookupUserCompDetails();e&&this.setCompDetails(e)}setCompDetails(e){this.userCompDetails=e,this.comp.setUserCompDetails(e)}lookupUserCompDetails(){let e=this.createParams(),t=this.column.getColDef();return bbe(this.beans.userCompFactory,t,e)}createParams(){let{menuSvc:e,sortSvc:t,colFilter:n,gos:r}=this.beans;return eq(r,{column:this.column,displayName:this.displayName,enableSorting:this.column.isSortable(),enableMenu:this.menuEnabled,enableFilterButton:this.openFilterEnabled&&!!e?.isHeaderFilterButtonEnabled(this.column),enableFilterIcon:!!n&&(!this.openFilterEnabled||$K(this.gos)),showColumnMenu:(t,n)=>{e?.showColumnMenu({column:this.column,buttonElement:t,positionBy:`button`,onClosedCallback:n})},showColumnMenuAfterMouseClick:(t,n)=>{e?.showColumnMenu({column:this.column,mouseEvent:t,positionBy:`mouse`,onClosedCallback:n})},showFilter:t=>{e?.showFilterMenu({column:this.column,buttonElement:t,containerType:`columnFilter`,positionBy:`button`})},progressSort:e=>{t?.progressSort(this.column,!!e,`uiColumnSorted`)},setSort:(e,n)=>{t?.setSortForColumn(this.column,aq(e),!!n,`uiColumnSorted`)},eGridHeader:this.eGui,setTooltip:(e,t)=>{r.assertModuleRegistered(`Tooltip`,3),this.setupTooltip(e,t)}})}setupSelectAll(e){let{selectionSvc:t}=this.beans;t&&(this.selectAllFeature=e.createOptionalManagedBean(t.createSelectAllFeature(this.column)),this.selectAllFeature?.setComp(this),e.addManagedPropertyListener(`rowSelection`,()=>{let n=t.createSelectAllFeature(this.column);n&&!this.selectAllFeature?(this.selectAllFeature=e.createManagedBean(n),this.selectAllFeature?.setComp(this),this.comp.refreshSelectAllGui()):this.selectAllFeature&&!n&&(this.comp.removeSelectAllGui(),this.selectAllFeature=this.destroyBean(this.selectAllFeature))}))}getSelectAllGui(){return this.selectAllFeature?.getCheckboxGui()}handleKeyDown(e){super.handleKeyDown(e),e.key===$.SPACE?this.selectAllFeature?.onSpaceKeyDown(e):e.key===$.ENTER?this.onEnterKeyDown(e):e.key===$.DOWN&&e.altKey&&this.showMenuOnKeyPress(e,!1)}onEnterKeyDown(e){let{column:t,gos:n,sortable:r,beans:i}=this,a=!1;(e.ctrlKey||e.metaKey)&&(a=this.showMenuOnKeyPress(e,!0)),a||(!e.altKey&&WK(n)?i.rangeSvc?.handleColumnSelection(t,e):r&&i.sortSvc?.progressSort(t,e.shiftKey,`uiColumnSorted`))}showMenuOnKeyPress(e,t){let n=this.comp.getUserCompInstance();return CY(n)&&n.onMenuKeyboardShortcut(t)?(e.preventDefault(),!0):!1}onFocusIn(e){this.eGui.contains(e.relatedTarget)||(this.focusThis(),this.announceAriaDescription()),mJ()&&this.setActiveHeader(!0)}onFocusOut(e){this.eGui.contains(e.relatedTarget)||this.setActiveHeader(!1)}setupTooltip(e,t){this.tooltipFeature=this.beans.tooltipSvc?.setupHeaderTooltip(this.tooltipFeature,this,e,t)}setupStylesFromColDef(){this.setRefreshFunction(`headerStyles`,this.refreshHeaderStyles.bind(this)),this.refreshHeaderStyles()}setupClassesFromColDef(){let e=()=>{let e=yY(this.column.getColDef(),this.gos,this.column,null),t=this.userHeaderClasses;this.userHeaderClasses=new Set(e);for(let n of e)t.has(n)?t.delete(n):this.comp.toggleCss(n,!0);for(let e of t)this.comp.toggleCss(e,!1)};this.setRefreshFunction(`headerClasses`,e),e()}setDragSource(e){this.dragSourceElement=e,this.removeDragSource(),e&&this.draggable&&(this.dragSource=this.beans.colMoves?.setDragSourceForHeader(e,this.column,this.displayName)??null)}updateState(){let{menuSvc:e}=this.beans;this.menuEnabled=!!e?.isColumnMenuInHeaderEnabled(this.column),this.openFilterEnabled=!!e?.isFilterMenuInHeaderEnabled(this.column),this.sortable=this.column.isSortable(),this.displayName=this.calculateDisplayName(),this.draggable=this.workOutDraggable()}setRefreshFunction(e,t){this.refreshFunctions[e]=t}refresh(){this.updateState(),this.refreshHeaderComp(),this.refreshAria();for(let e of Object.values(this.refreshFunctions))e()}refreshHeaderComp(){let e=this.lookupUserCompDetails();e&&(this.comp.getUserCompInstance()!=null&&this.userCompDetails.componentClass==e.componentClass&&this.attemptHeaderCompRefresh(e.params)?this.setDragSource(this.dragSourceElement):this.setCompDetails(e))}attemptHeaderCompRefresh(e){let t=this.comp.getUserCompInstance();return!t||!t.refresh?!1:t.refresh(e)}calculateDisplayName(){return this.beans.colNames.getDisplayNameForColumn(this.column,`header`,!0)}checkDisplayName(){this.displayName!==this.calculateDisplayName()&&this.refresh()}workOutDraggable(){let e=this.column.getColDef();return!(this.gos.get(`suppressMovableColumns`)||e.suppressMovable||e.lockPosition)||!!e.enableRowGroup||!!e.enablePivot}setupWidth(e){let t=()=>{let e=this.column.getActualWidth();this.comp.setWidth(`${e}px`)};e.addManagedListeners(this.column,{widthChanged:t}),t()}setupMovingCss(e){let t=()=>{this.comp.toggleCss(`ag-header-cell-moving`,this.column.isMoving())};e.addManagedListeners(this.column,{movingChanged:t}),t()}setupMenuClass(e){let t=()=>{this.comp?.toggleCss(`ag-column-menu-visible`,this.column.isMenuVisible())};e.addManagedListeners(this.column,{menuVisibleChanged:t}),t()}setupSortableClass(e){let t=()=>{this.comp.toggleCss(`ag-header-cell-sortable`,!!this.sortable)};t(),this.setRefreshFunction(`updateSortable`,t),e.addManagedEventListeners({sortChanged:this.refreshAriaSort.bind(this)})}setupFilterClass(e){let t=()=>{let e=this.column.isFilterActive();this.comp.toggleCss(`ag-header-cell-filtered`,e),this.refreshAria()};e.addManagedListeners(this.column,{filterActiveChanged:t}),t()}setupWrapTextClass(){let e=()=>{let e=!!this.column.getColDef().wrapHeaderText;this.comp.toggleCss(`ag-header-cell-wrap-text`,e)};e(),this.setRefreshFunction(`wrapText`,e)}onHeaderHighlightChanged(){let e=this.column.getHighlighted(),t=e===0,n=e===1;this.comp.toggleCss(`ag-header-highlight-before`,t),this.comp.toggleCss(`ag-header-highlight-after`,n)}onDisplayedColumnsChanged(){super.onDisplayedColumnsChanged(),this.isAlive()&&this.onHeaderHeightChanged()}onHeaderHeightChanged(){this.refreshSpanHeaderHeight()}refreshSpanHeaderHeight(){let{eGui:e,column:t,comp:n,beans:r}=this,i=uY(this.beans),a=i.reduce((e,t)=>e+t,0)===0;if(n.toggleCss(`ag-header-parent-hidden`,a),!t.isSpanHeaderHeight()){e.style.removeProperty(`top`),e.style.removeProperty(`height`),n.toggleCss(`ag-header-span-height`,!1),n.toggleCss(`ag-header-span-total`,!1);return}let{numberOfParents:o,isSpanningTotal:s}=this.column.getColumnGroupPaddingInfo();n.toggleCss(`ag-header-span-height`,o>0);let c=dY(r);if(o===0){n.toggleCss(`ag-header-span-total`,!1),e.style.setProperty(`top`,`0px`),e.style.setProperty(`height`,`${c}px`);return}n.toggleCss(`ag-header-span-total`,s);let l=(this.column.getFirstRealParent()?.getLevel()??-1)+1,u=i.length-l,d=0;for(let e=0;e<u;e++)d+=i[i.length-1-e];e.style.setProperty(`top`,`${-d}px`),e.style.setProperty(`height`,`${c+d}px`)}refreshAriaSort(){let e=null,{beans:t,column:n,comp:r,sortable:i}=this;if(i){let i=this.getLocaleTextFunc(),a=t.sortSvc?.getDisplaySortForColumn(n)??null;r.setAriaSort(yve(a)),e=i(`ariaSortableColumn`,`Press ENTER to sort`)}else r.setAriaSort();this.setAriaDescriptionProperty(`sort`,e)}refreshAriaMenu(){let e=null;this.menuEnabled&&(e=this.getLocaleTextFunc()(`ariaMenuColumn`,`Press ALT DOWN to open column menu`)),this.setAriaDescriptionProperty(`menu`,e)}refreshAriaFilterButton(){let e=null,{openFilterEnabled:t,gos:n}=this;t&&!$K(n)&&(e=this.getLocaleTextFunc()(`ariaFilterColumn`,`Press CTRL ENTER to open filter`)),this.setAriaDescriptionProperty(`filterButton`,e)}refreshAriaFiltered(){let e=null;this.column.isFilterActive()&&(e=this.getLocaleTextFunc()(`ariaColumnFiltered`,`Column Filtered`)),this.setAriaDescriptionProperty(`filter`,e)}refreshAriaCellSelection(){let e=null,{gos:t,column:n}=this;WK(t)&&!wq(n)&&(e=this.getLocaleTextFunc()(`ariaColumnCellSelection`,`Press Enter to toggle selection for all visible cells in this column`)),this.setAriaDescriptionProperty(`cellSelection`,e)}setAriaDescriptionProperty(e,t){let n=this.ariaDescriptionProperties;t==null?n.delete(e):n.set(e,t)}announceAriaDescription(){let{beans:e,eGui:t,ariaDescriptionProperties:n}=this;if(!t.contains(dW(e)))return;let r=Array.from(n.keys()).sort((e,t)=>e===`filter`?-1:t.charCodeAt(0)-e.charCodeAt(0)).map(e=>n.get(e)).join(`. `);e.ariaAnnounce?.announceValue(r,`columnHeader`)}refreshAria(){this.refreshAriaSort(),this.refreshAriaMenu(),this.refreshAriaFilterButton(),this.refreshAriaFiltered(),this.refreshAriaCellSelection()}addColumnHoverListener(e){this.beans.colHover?.addHeaderColumnHoverListener(e,this.comp,this.column)}addActiveHeaderMouseListeners(e){let t=e=>this.handleMouseOverChange(e.type===`mouseenter`);e.addManagedListeners(this.eGui,{mouseenter:t,mouseleave:t,click:()=>{this.setActiveHeader(!0),this.dispatchColumnMouseEvent(`columnHeaderClicked`,this.column)},contextmenu:e=>this.handleContextMenuMouseEvent(e,void 0,this.column)})}handleMouseOverChange(e){this.setActiveHeader(e),this.eventSvc.dispatchEvent({type:e?`columnHeaderMouseOver`:`columnHeaderMouseLeave`,column:this.column})}setActiveHeader(e){this.comp.toggleCss(`ag-header-active`,e)}getAnchorElementForMenu(e){let t=this.comp.getUserCompInstance();return CY(t)?t.getAnchorElementForMenu(e):this.eGui}destroy(){this.tooltipFeature=this.destroyBean(this.tooltipFeature),super.destroy()}};function CY(e){return typeof e?.getAnchorElementForMenu==`function`&&typeof e.onMenuKeyboardShortcut==`function`}var Pxe=0,wY=class extends Q{constructor(e,t,n){super(),this.rowIndex=e,this.pinned=t,this.type=n,this.instanceId=Pxe++,this.comp=null,this.allCtrls=[];let r=`ag-header-row-column`;n===`group`?r=`ag-header-row-group`:n===`filter`&&(r=`ag-header-row-filter`),this.headerRowClass=`ag-header-row ${r}`}setRowIndex(e){this.rowIndex=e,this.comp?.setRowIndex(this.getAriaRowIndex()),this.onRowHeightChanged()}postConstruct(){this.isPrintLayout=CK(this.gos,`print`),this.isEnsureDomOrder=this.gos.get(`ensureDomOrder`)}areCellsRendered(){return this.comp?this.allCtrls.every(e=>e.eGui!=null):!1}setComp(e,t,n=!0){this.comp=e,t=_Y(this,this.beans.context,t),n&&(this.setRowIndex(this.rowIndex),this.onVirtualColumnsChanged()),this.setWidth(),this.addEventListeners(t)}getAriaRowIndex(){return this.rowIndex+1}addEventListeners(e){let t=this.onRowHeightChanged.bind(this),n=this.onDisplayedColumnsChanged.bind(this);e.addManagedEventListeners({columnResized:this.setWidth.bind(this),displayedColumnsChanged:n,virtualColumnsChanged:e=>this.onVirtualColumnsChanged(e.afterScroll),columnGroupHeaderHeightChanged:t,columnHeaderHeightChanged:t,stylesChanged:t,advancedFilterEnabledChanged:t}),e.addManagedPropertyListener(`domLayout`,n),e.addManagedPropertyListener(`ensureDomOrder`,e=>this.isEnsureDomOrder=e.currentValue),e.addManagedPropertyListeners([`headerHeight`,`pivotHeaderHeight`,`groupHeaderHeight`,`pivotGroupHeaderHeight`,`floatingFiltersHeight`],t)}onDisplayedColumnsChanged(){this.isPrintLayout=CK(this.gos,`print`),this.onVirtualColumnsChanged(),this.setWidth(),this.onRowHeightChanged()}setWidth(){if(!this.comp)return;let e=this.getWidthForRow();this.comp.setWidth(`${e}px`)}getWidthForRow(){let{visibleCols:e}=this.beans;return this.isPrintLayout?this.pinned==null?e.getContainerWidth(`right`)+e.getContainerWidth(`left`)+e.getContainerWidth(null):0:e.getContainerWidth(this.pinned)}onRowHeightChanged(){if(!this.comp)return;let{topOffset:e,rowHeight:t}=this.getTopAndHeight();this.comp.setTop(e+`px`),this.comp.setHeight(t+`px`)}getTopAndHeight(){let e=0,t=uY(this.beans);for(let n=0;n<t.length;n++){if(n===this.rowIndex&&this.type===`group`)return{topOffset:e,rowHeight:t[n]};e+=t[n]}let n=dY(this.beans);if(this.type===`column`)return{topOffset:e,rowHeight:n};e+=n;let r=pY(this.beans);return{topOffset:e,rowHeight:r}}onVirtualColumnsChanged(e=!1){if(!this.comp)return;let t=this.getUpdatedHeaderCtrls(),n=this.isEnsureDomOrder||this.isPrintLayout;this.comp.setHeaderCtrls(t,n,e)}getUpdatedHeaderCtrls(){let e=this.ctrlsById;this.ctrlsById=new Map;let t=this.getColumnsInViewport();for(let n of t)this.recycleAndCreateHeaderCtrls(n,this.ctrlsById,e);let n=e=>{let{focusSvc:t,visibleCols:n}=this.beans;return t.isHeaderWrapperFocused(e)?n.isVisible(e.column):!1};if(e)for(let[t,r]of e)n(r)?this.ctrlsById.set(t,r):this.destroyBean(r);return this.allCtrls=Array.from(this.ctrlsById.values()),this.allCtrls}getHeaderCellCtrls(){return this.allCtrls}recycleAndCreateHeaderCtrls(e,t,n){if(e.isEmptyGroup())return;let r=e.getUniqueId(),i;if(n&&(i=n.get(r),n.delete(r)),i&&i.column!=e&&(this.destroyBean(i),i=void 0),i==null)switch(this.type){case`filter`:i=this.createBean(this.beans.registry.createDynamicBean(`headerFilterCellCtrl`,!0,e,this));break;case`group`:i=this.createBean(this.beans.registry.createDynamicBean(`headerGroupCellCtrl`,!0,e,this));break;default:i=this.createBean(new Nxe(e,this))}t.set(r,i)}getColumnsInViewport(){if(!this.isPrintLayout)return this.getComponentsToRender();if(this.pinned)return[];let e=[];for(let t of[`left`,null,`right`])e.push(...this.getComponentsToRender(t));return e}getComponentsToRender(e=this.pinned){return this.type===`group`?this.beans.colViewport.getHeadersToRender(e,this.rowIndex):this.beans.colViewport.getColumnHeadersToRender(e)}focusHeader(e,t){let n=this.allCtrls.find(t=>t.column==e);return n?n.focus(t):!1}destroy(){this.allCtrls=this.destroyBeans(this.allCtrls),this.ctrlsById=void 0,this.comp=null,super.destroy()}},Fxe=class extends Q{constructor(e){super(),this.pinned=e,this.hidden=!1,this.includeFloatingFilter=!1,this.groupsRowCtrls=[]}setComp(e,t){this.comp=e,this.eViewport=t;let{pinnedCols:n,ctrlsSvc:r,colModel:i,colMoves:a}=this.beans;this.setupCenterWidth(),n?.setupHeaderPinnedWidth(this),this.setupDragAndDrop(a,this.eViewport);let o=this.refresh.bind(this,!0);this.addManagedEventListeners({displayedColumnsChanged:o,advancedFilterEnabledChanged:o});let s=`${typeof this.pinned==`string`?this.pinned:`center`}Header`;r.register(s,this),i.ready&&this.refresh()}getAllCtrls(){let e=[...this.groupsRowCtrls];return this.columnsRowCtrl&&e.push(this.columnsRowCtrl),this.filtersRowCtrl&&e.push(this.filtersRowCtrl),e}refresh(e=!1){let{focusSvc:t,filterManager:n,visibleCols:r}=this.beans,i=0,a=t.getFocusHeaderToUseAfterRefresh(),o=()=>{let t=r.headerGroupRowCount;i=t,e||(this.groupsRowCtrls=this.destroyBeans(this.groupsRowCtrls));let n=this.groupsRowCtrls.length;if(n!==t){if(n>t){for(let e=t;e<n;e++)this.destroyBean(this.groupsRowCtrls[e]);this.groupsRowCtrls.length=t;return}for(let e=n;e<t;e++){let t=this.createBean(new wY(e,this.pinned,`group`));this.groupsRowCtrls.push(t)}}},s=()=>{let t=i++;if(this.hidden){this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl);return}this.columnsRowCtrl==null||!e?(this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl),this.columnsRowCtrl=this.createBean(new wY(t,this.pinned,`column`))):this.columnsRowCtrl.rowIndex!==t&&this.columnsRowCtrl.setRowIndex(t)},c=()=>{this.includeFloatingFilter=!!n?.hasFloatingFilters()&&!this.hidden;let t=()=>{this.filtersRowCtrl=this.destroyBean(this.filtersRowCtrl)};if(!this.includeFloatingFilter){t();return}e||t();let r=i++;this.filtersRowCtrl?this.filtersRowCtrl.rowIndex!==r&&this.filtersRowCtrl.setRowIndex(r):this.filtersRowCtrl=this.createBean(new wY(r,this.pinned,`filter`))},l=this.getAllCtrls();o(),s(),c();let u=this.getAllCtrls();this.comp.setCtrls(u),this.restoreFocusOnHeader(t,a),l.length!==u.length&&this.beans.eventSvc.dispatchEvent({type:`headerRowsChanged`})}getHeaderCtrlForColumn(e){let t=t=>t?.getHeaderCellCtrls().find(t=>t.column===e);if(rq(e))return t(this.columnsRowCtrl);if(this.groupsRowCtrls.length!==0)for(let e=0;e<this.groupsRowCtrls.length;e++){let n=t(this.groupsRowCtrls[e]);if(n)return n}}getHtmlElementForColumnHeader(e){return this.getHeaderCtrlForColumn(e)?.eGui??null}getRowType(e){return this.getAllCtrls()[e]?.type}focusHeader(e,t,n){let r=this.getAllCtrls()[e];return r?r.focusHeader(t,n):!1}getGroupRowCount(){return this.groupsRowCtrls.length}getGroupRowCtrlAtIndex(e){return this.groupsRowCtrls[e]}getRowCount(){return this.groupsRowCtrls.length+ +!!this.columnsRowCtrl+ +!!this.filtersRowCtrl}setHorizontalScroll(e){this.comp.setViewportScrollLeft(e)}onScrollCallback(e){this.addManagedElementListeners(this.eViewport,{scroll:e})}destroy(){this.filtersRowCtrl=this.destroyBean(this.filtersRowCtrl),this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl),this.groupsRowCtrls=this.destroyBeans(this.groupsRowCtrls),super.destroy()}setupDragAndDrop(e,t){let n=e?.createBodyDropTarget(this.pinned,t);n&&this.createManagedBean(n)}restoreFocusOnHeader(e,t){if(!t)return;let{column:n}=t;n.getPinned()==this.pinned&&e.focusHeaderPosition({headerPosition:t,scroll:!1})}setupCenterWidth(){this.pinned??this.createManagedBean(new hY(e=>this.comp.setCenterWidth(`${e}px`),!0))}},TY={AUTO_HEIGHT:`ag-layout-auto-height`,NORMAL:`ag-layout-normal`,PRINT:`ag-layout-print`},EY=class extends Q{constructor(e){super(),this.view=e}postConstruct(){this.addManagedPropertyListener(`domLayout`,this.updateLayoutClasses.bind(this)),this.updateLayoutClasses()}updateLayoutClasses(){let e=this.gos.get(`domLayout`),t={autoHeight:e===`autoHeight`,normal:e===`normal`,print:e===`print`},n=t.autoHeight?TY.AUTO_HEIGHT:t.print?TY.PRINT:TY.NORMAL;this.view.updateLayoutClasses(n,t)}},DY=class extends Yq{constructor(e,t){super(),this.direction=t,this.eViewport=null,this.eContainer=null,this.hideTimeout=0,this.setTemplate(e)}postConstruct(){this.addManagedEventListeners({scrollVisibilityChanged:this.onScrollVisibilityChanged.bind(this)}),this.onScrollVisibilityChanged(),this.toggleCss(`ag-apple-scrollbar`,aJ()||oJ())}destroy(){super.destroy(),window.clearTimeout(this.hideTimeout)}initialiseInvisibleScrollbar(){this.invisibleScrollbar===void 0&&(this.invisibleScrollbar=uJ(),this.invisibleScrollbar&&(this.hideAndShowInvisibleScrollAsNeeded(),this.addActiveListenerToggles()))}addActiveListenerToggles(){let e=this.getGui(),t=()=>this.toggleCss(`ag-scrollbar-active`,!0),n=()=>this.toggleCss(`ag-scrollbar-active`,!1);this.addManagedListeners(e,{mouseenter:t,mousedown:t,touchstart:t,mouseleave:n,touchend:n})}onScrollVisibilityChanged(){this.invisibleScrollbar===void 0&&this.initialiseInvisibleScrollbar(),lG(this.beans,()=>this.setScrollVisible())}hideAndShowInvisibleScrollAsNeeded(){this.addManagedEventListeners({bodyScroll:e=>{e.direction===this.direction&&(this.hideTimeout&&=(window.clearTimeout(this.hideTimeout),0),this.toggleCss(`ag-scrollbar-scrolling`,!0))},bodyScrollEnd:()=>{this.hideTimeout=window.setTimeout(()=>{this.toggleCss(`ag-scrollbar-scrolling`,!1),this.hideTimeout=0},400)}})}attemptSettingScrollPosition(e){let t=this.eViewport;Uve(this,()=>XW(t),()=>this.setScrollPosition(e),100)}onScrollCallback(e){this.addManagedElementListeners(this.eViewport,{scroll:e})}},Ixe={tag:`div`,cls:`ag-body-horizontal-scroll`,attrs:{"aria-hidden":`true`},children:[{tag:`div`,ref:`eLeftSpacer`,cls:`ag-horizontal-left-spacer`},{tag:`div`,ref:`eViewport`,cls:`ag-body-horizontal-scroll-viewport`,children:[{tag:`div`,ref:`eContainer`,cls:`ag-body-horizontal-scroll-container`}]},{tag:`div`,ref:`eRightSpacer`,cls:`ag-horizontal-right-spacer`}]},Lxe=class extends DY{constructor(){super(Ixe,`horizontal`),this.eLeftSpacer=null,this.eRightSpacer=null,this.setScrollVisibleDebounce=0}wireBeans(e){this.visibleCols=e.visibleCols,this.scrollVisibleSvc=e.scrollVisibleSvc}postConstruct(){super.postConstruct();let e=this.setFakeHScrollSpacerWidths.bind(this);this.addManagedEventListeners({displayedColumnsChanged:e,displayedColumnsWidthChanged:e,pinnedRowDataChanged:this.refreshCompBottom.bind(this)}),this.addManagedPropertyListener(`domLayout`,e),this.beans.ctrlsSvc.register(`fakeHScrollComp`,this),this.createManagedBean(new hY(e=>this.eContainer.style.width=`${e}px`)),this.addManagedPropertyListeners([`suppressHorizontalScroll`],this.onScrollVisibilityChanged.bind(this))}destroy(){window.clearTimeout(this.setScrollVisibleDebounce),super.destroy()}initialiseInvisibleScrollbar(){this.invisibleScrollbar===void 0&&(this.enableRtl=this.gos.get(`enableRtl`),super.initialiseInvisibleScrollbar(),this.invisibleScrollbar&&this.refreshCompBottom())}refreshCompBottom(){if(!this.invisibleScrollbar)return;let e=this.beans.pinnedRowModel?.getPinnedBottomTotalHeight()??0;this.getGui().style.bottom=`${e}px`}onScrollVisibilityChanged(){super.onScrollVisibilityChanged(),this.setFakeHScrollSpacerWidths()}setFakeHScrollSpacerWidths(){let e=this.scrollVisibleSvc.verticalScrollShowing,t=this.visibleCols.getDisplayedColumnsRightWidth(),n=!this.enableRtl&&e,r=this.scrollVisibleSvc.getScrollbarWidth();n&&(t+=r),nG(this.eRightSpacer,t),this.eRightSpacer.classList.toggle(`ag-scroller-corner`,t<=r);let i=this.visibleCols.getColsLeftWidth();this.enableRtl&&e&&(i+=r),nG(this.eLeftSpacer,i),this.eLeftSpacer.classList.toggle(`ag-scroller-corner`,i<=r)}setScrollVisible(){let e=this.scrollVisibleSvc.horizontalScrollShowing,t=this.invisibleScrollbar,n=this.gos.get(`suppressHorizontalScroll`),r=e&&this.scrollVisibleSvc.getScrollbarWidth()||0,i=n?0:r===0&&t?16:r,a=()=>{this.setScrollVisibleDebounce=0,this.toggleCss(`ag-scrollbar-invisible`,t),rG(this.getGui(),i),rG(this.eViewport,i),rG(this.eContainer,i),i||this.eContainer.style.setProperty(`min-height`,`1px`),this.setVisible(e,{skipAriaHidden:!0})};window.clearTimeout(this.setScrollVisibleDebounce),e?this.setScrollVisibleDebounce=window.setTimeout(a,100):a()}getScrollPosition(){return GW(this.eViewport,this.enableRtl)}setScrollPosition(e){XW(this.eViewport)||this.attemptSettingScrollPosition(e),KW(this.eViewport,e,this.enableRtl)}},OY=class extends Q{constructor(e,t){super(),this.eContainer=e,this.eViewport=t}postConstruct(){this.addManagedEventListeners({rowContainerHeightChanged:this.onHeightChanged.bind(this,this.beans.rowContainerHeight)})}onHeightChanged(e){let t=e.uiContainerHeight,n=t==null?``:`${t}px`;this.eContainer.style.height=n,this.eViewport&&(this.eViewport.style.height=n)}},Rxe={tag:`div`,cls:`ag-body-vertical-scroll`,attrs:{"aria-hidden":`true`},children:[{tag:`div`,ref:`eViewport`,cls:`ag-body-vertical-scroll-viewport`,children:[{tag:`div`,ref:`eContainer`,cls:`ag-body-vertical-scroll-container`}]}]},zxe=class extends DY{constructor(){super(Rxe,`vertical`)}postConstruct(){super.postConstruct(),this.createManagedBean(new OY(this.eContainer));let{ctrlsSvc:e}=this.beans;e.register(`fakeVScrollComp`,this),this.addManagedEventListeners({rowContainerHeightChanged:this.onRowContainerHeightChanged.bind(this,e)})}setScrollVisible(){let{scrollVisibleSvc:e}=this.beans,t=e.verticalScrollShowing,n=this.invisibleScrollbar,r=t&&e.getScrollbarWidth()||0,i=r===0&&n?16:r;this.toggleCss(`ag-scrollbar-invisible`,n),nG(this.getGui(),i),nG(this.eViewport,i),nG(this.eContainer,i),this.setDisplayed(t,{skipAriaHidden:!0})}onRowContainerHeightChanged(e){let t=e.getGridBodyCtrl().eBodyViewport,n=this.getScrollPosition(),r=t.scrollTop;n!=r&&this.setScrollPosition(r,!0)}getScrollPosition(){return this.eViewport.scrollTop}setScrollPosition(e,t){!t&&!XW(this.eViewport)&&this.attemptSettingScrollPosition(e),this.eViewport.scrollTop=e}},kY=`Viewport`,AY=`fakeVScrollComp`,jY=[`fakeHScrollComp`,`centerHeader`,`topCenter`,`bottomCenter`,`stickyTopCenter`,`stickyBottomCenter`],MY=100,NY=150,Bxe=class extends Q{constructor(e){super(),this.clearRetryListenerFncs=[],this.lastScrollSource=[null,null],this.scrollLeft=-1,this.nextScrollTop=-1,this.scrollTop=-1,this.lastOffsetHeight=-1,this.lastScrollTop=-1,this.lastIsHorizontalScrollShowing=!1,this.scrollTimer=0,this.isScrollActive=!1,this.isVerticalPositionInvalidated=!0,this.isHorizontalPositionInvalidated=!0,this.eBodyViewport=e,this.resetLastHScrollDebounced=PG(this,()=>this.lastScrollSource[1]=null,NY),this.resetLastVScrollDebounced=PG(this,()=>this.lastScrollSource[0]=null,NY)}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.animationFrameSvc=e.animationFrameSvc,this.visibleCols=e.visibleCols}destroy(){super.destroy(),this.clearRetryListenerFncs=[],window.clearTimeout(this.scrollTimer)}postConstruct(){this.enableRtl=this.gos.get(`enableRtl`);let e=this.invalidateVerticalScroll.bind(this),t=this.invalidateHorizontalScroll.bind(this);this.addManagedEventListeners({displayedColumnsWidthChanged:this.onDisplayedColumnsWidthChanged.bind(this),bodyHeightChanged:e,scrollGapChanged:t}),this.addManagedElementListeners(this.eBodyViewport,{scroll:e}),this.ctrlsSvc.whenReady(this,e=>{this.centerRowsCtrl=e.center,this.fakeVScrollComp=e.fakeVScrollComp,this.fakeHScrollComp=e.fakeHScrollComp,this.onDisplayedColumnsWidthChanged(),this.addScrollListener()})}invalidateHorizontalScroll(){this.isHorizontalPositionInvalidated=!0}invalidateVerticalScroll(){this.isVerticalPositionInvalidated=!0}addScrollListener(){this.addHorizontalScrollListeners(),this.addVerticalScrollListeners()}addHorizontalScrollListeners(){this.addManagedElementListeners(this.centerRowsCtrl.eViewport,{scroll:this.onHScroll.bind(this,kY)});for(let e of jY){let t=this.ctrlsSvc.get(e);this.registerScrollPartner(t,this.onHScroll.bind(this,e))}}addVerticalScrollListeners(){let e=this.gos.get(`debounceVerticalScrollbar`),t=e?PG(this,this.onVScroll.bind(this,kY),MY):this.onVScroll.bind(this,kY),n=e?PG(this,this.onVScroll.bind(this,AY),MY):this.onVScroll.bind(this,AY);this.addManagedElementListeners(this.eBodyViewport,{scroll:t}),this.registerScrollPartner(this.fakeVScrollComp,n)}registerScrollPartner(e,t){e.onScrollCallback(t)}onDisplayedColumnsWidthChanged(){this.enableRtl&&this.horizontallyScrollHeaderCenterAndFloatingCenter()}horizontallyScrollHeaderCenterAndFloatingCenter(e){this.centerRowsCtrl!=null&&(e===void 0&&(e=this.centerRowsCtrl.getCenterViewportScrollLeft()),this.setScrollLeftForAllContainersExceptCurrent(Math.abs(e)))}setScrollLeftForAllContainersExceptCurrent(e){for(let t of[...jY,kY])this.lastScrollSource[1]!==t&&KW(this.getViewportForSource(t),e,this.enableRtl)}getViewportForSource(e){return e===kY?this.centerRowsCtrl.eViewport:this.ctrlsSvc.get(e).eViewport}isControllingScroll(e,t){return this.lastScrollSource[t]==null?(t===0?this.lastScrollSource[0]=e:this.lastScrollSource[1]=e,!0):this.lastScrollSource[t]===e}onHScroll(e){if(!this.isControllingScroll(e,1))return;let{scrollLeft:t}=this.centerRowsCtrl.eViewport;if(this.shouldBlockScrollUpdate(1,t,!0))return;let n=GW(this.getViewportForSource(e),this.enableRtl);this.doHorizontalScroll(n),this.resetLastHScrollDebounced()}onVScroll(e){if(!this.isControllingScroll(e,0))return;let t=e===kY?this.eBodyViewport.scrollTop:this.fakeVScrollComp.getScrollPosition(),n=t;if(this.shouldBlockScrollUpdate(0,n,!0))return;e===kY?this.fakeVScrollComp.setScrollPosition(n):(this.eBodyViewport.scrollTop=t,n=this.eBodyViewport.scrollTop,this.invalidateVerticalScroll(),n!==t&&this.fakeVScrollComp.setScrollPosition(n,!0));let{animationFrameSvc:r}=this;r?.setScrollTop(n),this.nextScrollTop=n,r?.active?r.schedule():this.scrollGridIfNeeded(!0),this.resetLastVScrollDebounced()}doHorizontalScroll(e){let t=this.fakeHScrollComp.getScrollPosition();(this.scrollLeft!==e||e!==t)&&(this.scrollLeft=e,this.fireScrollEvent(1),this.horizontallyScrollHeaderCenterAndFloatingCenter(e),this.centerRowsCtrl.onHorizontalViewportChanged(!0))}isScrolling(){return this.isScrollActive}fireScrollEvent(e){let t={type:`bodyScroll`,direction:e===1?`horizontal`:`vertical`,left:this.scrollLeft,top:this.scrollTop};this.isScrollActive=!0,this.eventSvc.dispatchEvent(t),window.clearTimeout(this.scrollTimer),this.scrollTimer=window.setTimeout(()=>{this.scrollTimer=0,this.isScrollActive=!1,this.eventSvc.dispatchEvent({...t,type:`bodyScrollEnd`})},NY)}shouldBlockScrollUpdate(e,t,n=!1){return n&&!oJ()?!1:e===0?this.shouldBlockVerticalScroll(t):this.shouldBlockHorizontalScroll(t)}shouldBlockVerticalScroll(e){let t=BW(this.eBodyViewport),{scrollHeight:n}=this.eBodyViewport;return e<0||e+t>n}shouldBlockHorizontalScroll(e){let t=this.centerRowsCtrl.getCenterWidth(),{scrollWidth:n}=this.centerRowsCtrl.eViewport;if(this.enableRtl){if(e>0)return!0}else if(e<0)return!0;return Math.abs(e)+t>n}redrawRowsAfterScroll(){this.fireScrollEvent(0)}checkScrollLeft(){let e=this.scrollLeft,t=!1;for(let n of jY)if(this.getViewportForSource(n).scrollLeft!==e){t=!0;break}t&&this.onHScroll(kY)}scrollGridIfNeeded(e=!1){let t=this.scrollTop!=this.nextScrollTop;return t&&(this.scrollTop=this.nextScrollTop,e&&this.invalidateVerticalScroll(),this.redrawRowsAfterScroll()),t}setHorizontalScrollPosition(e,t=!1){let n=this.centerRowsCtrl.eViewport.scrollWidth-this.centerRowsCtrl.getCenterWidth();!t&&this.shouldBlockScrollUpdate(1,e)&&(e=this.enableRtl?e>0?0:n:Math.min(Math.max(e,0),n)),KW(this.centerRowsCtrl.eViewport,Math.abs(e),this.enableRtl),this.doHorizontalScroll(e)}setVerticalScrollPosition(e){this.invalidateVerticalScroll(),this.eBodyViewport.scrollTop=e}getVScrollPosition(){if(!this.isVerticalPositionInvalidated){let{lastOffsetHeight:e,lastScrollTop:t}=this;return{top:t,bottom:t+e}}this.isVerticalPositionInvalidated=!1;let{scrollTop:e,offsetHeight:t}=this.eBodyViewport;return this.lastScrollTop=e,this.lastOffsetHeight=t,{top:e,bottom:e+t}}getApproximateVScollPosition(){return this.lastScrollTop>=0&&this.lastOffsetHeight>=0?{top:this.scrollTop,bottom:this.scrollTop+this.lastOffsetHeight}:this.getVScrollPosition()}getHScrollPosition(){return this.centerRowsCtrl.getHScrollPosition()}isHorizontalScrollShowing(){return this.isHorizontalPositionInvalidated&&=(this.lastIsHorizontalScrollShowing=this.centerRowsCtrl.isHorizontalScrollShowing(),!1),this.lastIsHorizontalScrollShowing}scrollHorizontally(e){let t=this.centerRowsCtrl.eViewport.scrollLeft;return this.setHorizontalScrollPosition(t+e),this.centerRowsCtrl.eViewport.scrollLeft-t}scrollToTop(){this.setVerticalScrollPosition(0)}ensureNodeVisible(e,t=null){let{rowModel:n}=this.beans,r=n.getRowCount(),i=-1;for(let t=0;t<r;t++){let r=n.getRow(t);if(typeof e==`function`){if(r&&e(r)){i=t;break}}else if(e===r||e===r.data){i=t;break}}i>=0&&this.ensureIndexVisible(i,t)}ensureIndexVisible(e,t,n=0){if(CK(this.gos,`print`))return;let{rowModel:r}=this.beans,i=r.getRowCount();if(typeof e!=`number`||e<0||e>=i){gK(88,{index:e});return}this.clearRetryListeners();let{frameworkOverrides:a,pageBounds:o,rowContainerHeight:s,rowRenderer:c}=this.beans;a.wrapIncoming(()=>{let i=this.ctrlsSvc.getGridBodyCtrl(),a=r.getRow(e),l,u,d=0;this.invalidateVerticalScroll();do{let{stickyTopHeight:e,stickyBottomHeight:n}=i,r=a.rowTop,f=a.rowHeight,p=o.getPixelOffset(),m=a.rowTop-p,h=m+a.rowHeight,g=this.getVScrollPosition(),_=s.divStretchOffset,v=g.top+_,y=g.bottom+_,b=y-v,x=s.getScrollPositionForPixel(m),S=s.getScrollPositionForPixel(h-b),C=Math.min((x+S)/2,m),w=v+e>m,T=y-n<h,E=null;t===`top`?E=x-e:t===`bottom`?E=S+n:t===`middle`?E=C:w?E=x-e:T&&(E=S-x>b?x-e:S+n),E!==null&&(this.setVerticalScrollPosition(E),c.redraw({afterScroll:!0})),l=r!==a.rowTop||f!==a.rowHeight,u=e!==i.stickyTopHeight||n!==i.stickyBottomHeight,d++}while((l||u)&&d<10);if(this.animationFrameSvc?.flushAllFrames(),n<10&&(a?.stub||!this.beans.rowAutoHeight?.areRowsMeasured())){let i=this.getVScrollPosition().top;this.clearRetryListenerFncs=this.addManagedEventListeners({bodyScroll:()=>{let e=this.getVScrollPosition().top;i!==e&&this.clearRetryListeners()},modelUpdated:()=>{this.clearRetryListeners(),!(e>=r.getRowCount())&&this.ensureIndexVisible(e,t,n+1)}})}})}clearRetryListeners(){for(let e of this.clearRetryListenerFncs)e();this.clearRetryListenerFncs=[]}ensureColumnVisible(e,t=`auto`){let{colModel:n,frameworkOverrides:r}=this.beans,i=n.getCol(e);if(!i||i.isPinned()||!this.visibleCols.isColDisplayed(i))return;let a=this.getPositionedHorizontalScroll(i,t);r.wrapIncoming(()=>{a!==null&&this.centerRowsCtrl.setCenterViewportScrollLeft(a),this.centerRowsCtrl.onHorizontalViewportChanged(),this.animationFrameSvc?.flushAllFrames()})}getPositionedHorizontalScroll(e,t){let{columnBeforeStart:n,columnAfterEnd:r}=this.isColumnOutsideViewport(e),i=this.centerRowsCtrl.getCenterWidth()<e.getActualWidth(),a=this.centerRowsCtrl.getCenterWidth(),o=this.enableRtl,s=(o?n:r)||i,c=o?r:n;t!==`auto`&&(s=t===`start`,c=t===`end`);let l=t===`middle`;if(s||c||l){let{colLeft:t,colMiddle:n,colRight:r}=this.getColumnBounds(e);return l?n-a/2:s?o?r:t:o?t-a:r-a}return null}isColumnOutsideViewport(e){let{start:t,end:n}=this.getViewportBounds(),{colLeft:r,colRight:i}=this.getColumnBounds(e),a=this.enableRtl;return{columnBeforeStart:a?t>i:n<i,columnAfterEnd:a?n<r:t>r}}getColumnBounds(e){let t=this.enableRtl,n=this.visibleCols.bodyWidth,r=e.getActualWidth(),i=e.getLeft(),a=t?-1:1,o=t?n-i:i,s=o+r*a;return{colLeft:o,colMiddle:o+r/2*a,colRight:s}}getViewportBounds(){let e=this.centerRowsCtrl.getCenterWidth(),t=this.centerRowsCtrl.getCenterViewportScrollLeft();return{start:t,end:e+t,width:e}}},PY={horizontal:{overflow:e=>e.scrollWidth-e.clientWidth,scrollSize:e=>e.scrollWidth,clientSize:e=>e.clientWidth,opposite:`vertical`},vertical:{overflow:e=>e.scrollHeight-e.clientHeight,scrollSize:e=>e.scrollHeight,clientSize:e=>e.clientHeight,opposite:`horizontal`}};function Vxe(e,t,n=cJ()||0,r,i){return FY(e,t,`horizontal`,n,r,i)}function Hxe(e,t,n=cJ()||0,r,i){return FY(e,t,`vertical`,n,r,i)}function FY(e,t,n,r,i,a){let o=PY[n],s=PY[o.opposite],c=!i||XW(i),l=!a||XW(a),u=o.overflow(e);if(u<=0)return!1;if(!t||r===0)return!0;let d=s.overflow(t);if(d<=0)return!0;if(u<=r){if(c&&l&&Uxe({candidateOverflow:d,candidateScrollSize:s.scrollSize(t),candidateClientSize:s.clientSize(t),scrollbarWidth:r}))return!1;let n=o.clientSize(e)+r;return o.scrollSize(e)<=n}return!0}function Uxe({candidateOverflow:e,candidateScrollSize:t,candidateClientSize:n,scrollbarWidth:r}){if(e<=0||e>r)return!1;let i=n+r;return t>n&&t<=i}var Wxe=class extends Q{constructor(e){super(),this.centerContainerCtrl=e}wireBeans(e){this.scrollVisibleSvc=e.scrollVisibleSvc}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCtrl=e.gridBodyCtrl,this.listenForResize()}),this.addManagedEventListeners({scrollbarWidthChanged:this.onScrollbarWidthChanged.bind(this)}),this.addManagedPropertyListeners([`alwaysShowHorizontalScroll`,`alwaysShowVerticalScroll`],()=>{this.checkViewportAndScrolls()})}listenForResize(){let{beans:e,centerContainerCtrl:t,gridBodyCtrl:n}=this,r=()=>{lG(e,()=>{this.onCenterViewportResized()})};t.registerViewportResizeListener(r),n.registerBodyViewportResizeListener(r)}onScrollbarWidthChanged(){this.checkViewportAndScrolls()}onCenterViewportResized(){if(this.scrollVisibleSvc.updateScrollGap(),this.centerContainerCtrl.isViewportInTheDOMTree()){let{pinnedCols:e,colFlex:t}=this.beans;e?.keepPinnedColumnsNarrowerThanViewport(),this.checkViewportAndScrolls();let n=this.centerContainerCtrl.getCenterWidth();n!==this.centerWidth&&(this.centerWidth=n,t?.refreshFlexedColumns({viewportWidth:this.centerWidth,updateBodyWidths:!0,fireResizedEvent:!0}))}else this.bodyHeight=0}checkViewportAndScrolls(){this.updateScrollVisibleService(),this.checkBodyHeight(),this.onHorizontalViewportChanged(),this.gridBodyCtrl.scrollFeature.checkScrollLeft()}getBodyHeight(){return this.bodyHeight}checkBodyHeight(){let e=this.gridBodyCtrl.eBodyViewport,t=BW(e);this.bodyHeight!==t&&(this.bodyHeight=t,this.eventSvc.dispatchEvent({type:`bodyHeightChanged`}))}updateScrollVisibleService(){this.updateScrollVisibleServiceImpl(),setTimeout(this.updateScrollVisibleServiceImpl.bind(this),500)}updateScrollVisibleServiceImpl(){if(!this.isAlive())return;let e={horizontalScrollShowing:this.centerContainerCtrl.isHorizontalScrollShowing(),verticalScrollShowing:this.gridBodyCtrl.isVerticalScrollShowing()};this.scrollVisibleSvc.setScrollsVisible(e)}onHorizontalViewportChanged(){let{centerContainerCtrl:e,beans:t}=this,n=e.getCenterWidth(),r=e.getViewportScrollLeft();t.colViewport.setScrollPosition(n,r)}};function IY(e){return e.altKey||e.ctrlKey||e.metaKey?!1:e.key?.length===1}function LY(e,t,n,r){let i=t.getColDef().cellRendererParams?.suppressMouseEventHandling;return RY(e,t,n,r,i)}function Gxe(e,t,n,r){let i=t?.suppressMouseEventHandling;return RY(e,void 0,n,r,i)}function RY(e,t,n,r,i){return i?i(eq(e,{column:t,node:n,event:r})):!1}function zY(e,t,n){let r=t;for(;r;){let t=kK(e,r,n);if(t)return t;r=r.parentElement}return null}var BY=`cellCtrl`;function VY(e,t){return zY(e,t,BY)}var HY=`renderedRow`;function Kxe(e,t){return zY(e,t,HY)}function UY(e,t,n,r,i){let a=r?r.getColDef().suppressKeyboardEvent:void 0;if(!a)return!1;let o=eq(e,{event:t,editing:i,column:r,node:n,data:n.data,colDef:r.getColDef()});return!!(a&&a(o))}function qxe(e){let{pinnedRowModel:t,rowModel:n,rangeSvc:r,visibleCols:i}=e;if(!r||i.allCols.length===0)return;let a=t?.isEmpty(`top`)??!0,o=t?.isEmpty(`bottom`)??!0,s=a?null:`top`,c,l;o?(c=null,l=n.getRowCount()-1):(c=`bottom`,l=t?.getPinnedBottomRowCount()??-1),r.setCellRange({rowStartIndex:0,rowStartPinned:s,rowEndIndex:l,rowEndPinned:c})}var Jxe=class extends Q{constructor(e){super(),this.element=e}postConstruct(){this.addKeyboardListeners(),this.addMouseListeners(),this.beans.touchSvc?.mockRowContextMenu(this),this.editSvc=this.beans.editSvc}addKeyboardListeners(){let e=`keydown`,t=this.processKeyboardEvent.bind(this,e);this.addManagedElementListeners(this.element,{[e]:t})}addMouseListeners(){let e=`mousedown`;_G(`pointerdown`)?e=`pointerdown`:_G(`touchstart`)&&(e=`touchstart`);let t=[`dblclick`,`contextmenu`,`mouseover`,`mouseout`,`click`,e];for(let e of t){let t=this.processMouseEvent.bind(this,e);this.addManagedElementListeners(this.element,{[e]:t})}}processMouseEvent(e,t){if(!TG(this.beans,t)||SJ(t))return;let{cellCtrl:n,rowCtrl:r}=this.getControlsForEventTarget(t.target);e===`contextmenu`?(n?.column&&n.dispatchCellContextMenuEvent(t),this.beans.contextMenuSvc?.handleContextMenuMouseEvent(t,void 0,r,n)):(n&&n.onMouseEvent(e,t),r&&r.onMouseEvent(e,t))}getControlsForEventTarget(e){let{gos:t}=this;return{cellCtrl:VY(t,e),rowCtrl:Kxe(t,e)}}processKeyboardEvent(e,t){let{cellCtrl:n,rowCtrl:r}=this.getControlsForEventTarget(t.target);t.defaultPrevented||(n?this.processCellKeyboardEvent(n,e,t):r?.isFullWidth()&&this.processFullWidthRowKeyboardEvent(r,e,t))}processCellKeyboardEvent(e,t,n){let r=this.editSvc?.isEditing(e,{withOpenEditor:!0})??!1;UY(this.gos,n,e.rowNode,e.column,r)||t===`keydown`&&((r||!this.beans.navigation?.handlePageScrollingKey(n))&&e.onKeyDown(n),this.doGridOperations(n,r),IY(n)&&e.processCharacter(n)),t===`keydown`&&this.eventSvc.dispatchEvent(e.createEvent(n,`cellKeyDown`))}processFullWidthRowKeyboardEvent(e,t,n){let{rowNode:r}=e,{focusSvc:i,navigation:a}=this.beans,o=i.getFocusedCell()?.column;if(!UY(this.gos,n,r,o,!1)){let r=n.key;if(t===`keydown`)switch(r){case $.PAGE_HOME:case $.PAGE_END:case $.PAGE_UP:case $.PAGE_DOWN:a?.handlePageScrollingKey(n,!0);break;case $.LEFT:case $.RIGHT:if(!this.gos.get(`embedFullWidthRows`))break;case $.UP:case $.DOWN:e.onKeyboardNavigate(n);break;case $.TAB:e.onTabKeyDown(n)}}t===`keydown`&&this.eventSvc.dispatchEvent(e.createRowEvent(`cellKeyDown`,n))}doGridOperations(e,t){if(!e.ctrlKey&&!e.metaKey||t||!TG(this.beans,e))return;let n=Mq(e),{clipboardSvc:r,undoRedo:i}=this.beans;if(n===$.A)return this.onCtrlAndA(e);if(n===$.C)return this.onCtrlAndC(r,e);if(n===$.D)return this.onCtrlAndD(r,e);if(n===$.V)return this.onCtrlAndV(r,e);if(n===$.X)return this.onCtrlAndX(r,e);if(n===$.Y)return this.onCtrlAndY(i);if(n===$.Z)return this.onCtrlAndZ(i,e)}onCtrlAndA(e){let{beans:{rowModel:t,rangeSvc:n,selectionSvc:r},gos:i}=this;n&&UK(i)&&!vye(i)&&t.isRowsToRender()?qxe(this.beans):r&&r.selectAllRowNodes({source:`keyboardSelectAll`,selectAll:XK(i)}),e.preventDefault()}onCtrlAndC(e,t){if(!e||this.gos.get(`enableCellTextSelection`))return;let{cellCtrl:n}=this.getControlsForEventTarget(t.target);this.editSvc?.isEditing(n,{withOpenEditor:!0})||(t.preventDefault(),e.copyToClipboard())}onCtrlAndX(e,t){if(!e||this.gos.get(`enableCellTextSelection`)||this.gos.get(`suppressCutToClipboard`))return;let{cellCtrl:n}=this.getControlsForEventTarget(t.target);this.editSvc?.isEditing(n,{withOpenEditor:!0})||(t.preventDefault(),e.cutToClipboard(void 0,`ui`))}onCtrlAndV(e,t){let{cellCtrl:n}=this.getControlsForEventTarget(t.target);this.editSvc?.isEditing(n,{withOpenEditor:!0})||e&&!this.gos.get(`suppressClipboardPaste`)&&e.pasteFromClipboard()}onCtrlAndD(e,t){e&&!this.gos.get(`suppressClipboardPaste`)&&e.copyRangeDown(),t.preventDefault()}onCtrlAndZ(e,t){this.gos.get(`undoRedoCellEditing`)&&e&&(t.preventDefault(),t.shiftKey?e.redo(`ui`):e.undo(`ui`))}onCtrlAndY(e){e?.redo(`ui`)}},WY=e=>e.topRowCtrls,GY=e=>e.getStickyTopRowCtrls(),KY=e=>e.getStickyBottomRowCtrls(),qY=e=>e.bottomRowCtrls,JY=e=>e.allRowCtrls,YY=e=>e.getCtrls(`top`),XY=e=>e.getCtrls(`center`),ZY=e=>e.getCtrls(`bottom`),Yxe={center:{type:`center`,name:`center-cols`,getRowCtrls:JY,getSpannedRowCtrls:XY},left:{type:`left`,name:`pinned-left-cols`,pinnedType:`left`,getRowCtrls:JY,getSpannedRowCtrls:XY},right:{type:`right`,name:`pinned-right-cols`,pinnedType:`right`,getRowCtrls:JY,getSpannedRowCtrls:XY},fullWidth:{type:`fullWidth`,name:`full-width`,fullWidth:!0,getRowCtrls:JY},topCenter:{type:`center`,name:`floating-top`,getRowCtrls:WY,getSpannedRowCtrls:YY},topLeft:{type:`left`,name:`pinned-left-floating`,container:`ag-pinned-left-floating-top`,pinnedType:`left`,getRowCtrls:WY,getSpannedRowCtrls:YY},topRight:{type:`right`,name:`pinned-right-floating`,container:`ag-pinned-right-floating-top`,pinnedType:`right`,getRowCtrls:WY,getSpannedRowCtrls:YY},topFullWidth:{type:`fullWidth`,name:`floating-top-full-width`,fullWidth:!0,getRowCtrls:WY},stickyTopCenter:{type:`center`,name:`sticky-top`,getRowCtrls:GY},stickyTopLeft:{type:`left`,name:`pinned-left-sticky-top`,container:`ag-pinned-left-sticky-top`,pinnedType:`left`,getRowCtrls:GY},stickyTopRight:{type:`right`,name:`pinned-right-sticky-top`,container:`ag-pinned-right-sticky-top`,pinnedType:`right`,getRowCtrls:GY},stickyTopFullWidth:{type:`fullWidth`,name:`sticky-top-full-width`,fullWidth:!0,getRowCtrls:GY},stickyBottomCenter:{type:`center`,name:`sticky-bottom`,getRowCtrls:KY},stickyBottomLeft:{type:`left`,name:`pinned-left-sticky-bottom`,container:`ag-pinned-left-sticky-bottom`,pinnedType:`left`,getRowCtrls:KY},stickyBottomRight:{type:`right`,name:`pinned-right-sticky-bottom`,container:`ag-pinned-right-sticky-bottom`,pinnedType:`right`,getRowCtrls:KY},stickyBottomFullWidth:{type:`fullWidth`,name:`sticky-bottom-full-width`,fullWidth:!0,getRowCtrls:KY},bottomCenter:{type:`center`,name:`floating-bottom`,getRowCtrls:qY,getSpannedRowCtrls:ZY},bottomLeft:{type:`left`,name:`pinned-left-floating-bottom`,container:`ag-pinned-left-floating-bottom`,pinnedType:`left`,getRowCtrls:qY,getSpannedRowCtrls:ZY},bottomRight:{type:`right`,name:`pinned-right-floating-bottom`,container:`ag-pinned-right-floating-bottom`,pinnedType:`right`,getRowCtrls:qY,getSpannedRowCtrls:ZY},bottomFullWidth:{type:`fullWidth`,name:`floating-bottom-full-width`,fullWidth:!0,getRowCtrls:qY}};function QY(e){return`ag-${eX(e).name}-viewport`}function $Y(e){let t=eX(e);return t.container??`ag-${t.name}-container`}function Xxe(e){return`ag-${eX(e).name}-spanned-cells-container`}function eX(e){return Yxe[e]}var Zxe=[`topCenter`,`topLeft`,`topRight`],Qxe=[`bottomCenter`,`bottomLeft`,`bottomRight`],$xe=[`center`,`left`,`right`],eSe=[`center`,`left`,`right`,`fullWidth`],tSe=[`stickyTopCenter`,`stickyBottomCenter`,`center`,`topCenter`,`bottomCenter`],nSe=[`left`,`bottomLeft`,`topLeft`,`stickyTopLeft`,`stickyBottomLeft`],rSe=[`right`,`bottomRight`,`topRight`,`stickyTopRight`,`stickyBottomRight`],tX=[`stickyTopCenter`,`stickyTopLeft`,`stickyTopRight`],nX=[`stickyBottomCenter`,`stickyBottomLeft`,`stickyBottomRight`],iSe=[...tX,`stickyTopFullWidth`,...nX,`stickyBottomFullWidth`],aSe=[...Zxe,...Qxe,...$xe,...tX,...nX],oSe=class extends Q{constructor(e){super(),this.name=e,this.visible=!0,this.EMPTY_CTRLS=[],this.options=eX(e)}postConstruct(){this.enableRtl=this.gos.get(`enableRtl`),this.forContainers([`center`],()=>{this.viewportSizeFeature=this.createManagedBean(new Wxe(this)),this.addManagedEventListeners({stickyTopOffsetChanged:this.onStickyTopOffsetChanged.bind(this)})})}onStickyTopOffsetChanged(e){this.comp.setOffsetTop(`${e.offset}px`)}registerWithCtrlsService(){this.options.fullWidth||this.beans.ctrlsSvc.register(this.name,this)}forContainers(e,t){e.indexOf(this.name)>=0&&t()}setComp(e,t,n,r){this.comp=e,this.eContainer=t,this.eSpannedContainer=n,this.eViewport=r,this.createManagedBean(new Jxe(this.eViewport??this.eContainer)),this.addPreventScrollWhileDragging(),this.listenOnDomOrder();let{pinnedCols:i,rangeSvc:a}=this.beans,o=()=>this.onPinnedWidthChanged();this.forContainers(nSe,()=>{this.pinnedWidthFeature=this.createOptionalManagedBean(i?.createPinnedWidthFeature(!0,this.eContainer,this.eSpannedContainer)),this.addManagedEventListeners({leftPinnedWidthChanged:o})}),this.forContainers(rSe,()=>{this.pinnedWidthFeature=this.createOptionalManagedBean(i?.createPinnedWidthFeature(!1,this.eContainer,this.eSpannedContainer)),this.addManagedEventListeners({rightPinnedWidthChanged:o})}),this.forContainers(eSe,()=>this.createManagedBean(new OY(this.eContainer,this.name===`center`?r:void 0))),a&&this.forContainers(aSe,()=>this.createManagedBean(a.createDragListenerFeature(this.eContainer))),this.forContainers(tSe,()=>this.createManagedBean(new hY(e=>this.comp.setContainerWidth(`${e}px`)))),this.visible=this.isContainerVisible(),this.addListeners(),this.registerWithCtrlsService()}onScrollCallback(e){this.addManagedElementListeners(this.eViewport,{scroll:e})}addListeners(){let{spannedRowRenderer:e,gos:t}=this.beans,n=this.onDisplayedColumnsChanged.bind(this);this.addManagedEventListeners({displayedColumnsChanged:n,displayedColumnsWidthChanged:n,displayedRowsChanged:e=>this.onDisplayedRowsChanged(e.afterScroll)}),n(),this.onDisplayedRowsChanged(),e&&this.options.getSpannedRowCtrls&&t.get(`enableCellSpan`)&&this.addManagedListeners(e,{spannedRowsUpdated:()=>{let t=this.options.getSpannedRowCtrls(e);t&&this.comp.setSpannedRowCtrls(t,!1)}})}listenOnDomOrder(){if(iSe.indexOf(this.name)>=0){this.comp.setDomOrder(!0);return}let e=()=>{let e=this.gos.get(`ensureDomOrder`),t=CK(this.gos,`print`);this.comp.setDomOrder(e||t)};this.addManagedPropertyListener(`domLayout`,e),e()}onDisplayedColumnsChanged(){this.forContainers([`center`],()=>this.onHorizontalViewportChanged())}addPreventScrollWhileDragging(){let{dragSvc:e}=this.beans;if(!e)return;let t=t=>{e.dragging&&t.cancelable&&t.preventDefault()};this.eContainer.addEventListener(`touchmove`,t,{passive:!1}),this.addDestroyFunc(()=>this.eContainer.removeEventListener(`touchmove`,t))}onHorizontalViewportChanged(e=!1){let t=this.getCenterWidth(),n=this.getCenterViewportScrollLeft();this.beans.colViewport.setScrollPosition(t,n,e)}hasHorizontalScrollGap(){return this.eContainer.clientWidth-this.eViewport.clientWidth<0}hasVerticalScrollGap(){return this.eContainer.clientHeight-this.eViewport.clientHeight<0}getCenterWidth(){return VW(this.eViewport)}getCenterViewportScrollLeft(){return GW(this.eViewport,this.enableRtl)}registerViewportResizeListener(e){let t=cG(this.beans,this.eViewport,e);this.addDestroyFunc(()=>t())}isViewportInTheDOMTree(){return YW(this.eViewport)}getViewportScrollLeft(){return GW(this.eViewport,this.enableRtl)}isHorizontalScrollShowing(){let{beans:e,gos:t,eViewport:n}=this,r=t.get(`alwaysShowHorizontalScroll`),{ctrlsSvc:i}=e,a=i.getGridBodyCtrl()?.eBodyViewport,o=i.get(`fakeHScrollComp`)?.getGui(),s=i.get(`fakeVScrollComp`)?.getGui();return r||Vxe(n,a,void 0,o,s)}setHorizontalScroll(e){this.comp.setHorizontalScroll(e)}getHScrollPosition(){return{left:this.eViewport.scrollLeft,right:this.eViewport.scrollLeft+this.eViewport.offsetWidth}}setCenterViewportScrollLeft(e){KW(this.eViewport,e,this.enableRtl)}isContainerVisible(){return this.options.pinnedType==null||!!this.pinnedWidthFeature&&this.pinnedWidthFeature.getWidth()>0}onPinnedWidthChanged(){let e=this.isContainerVisible();this.visible!=e&&(this.visible=e,this.onDisplayedRowsChanged())}onDisplayedRowsChanged(e=!1){let t=this.options.getRowCtrls(this.beans.rowRenderer);if(!this.visible||t.length===0){this.comp.setRowCtrls({rowCtrls:this.EMPTY_CTRLS});return}let n=CK(this.gos,`print`),r=this.gos.get(`embedFullWidthRows`)||n,i=t.filter(e=>{let t=e.isFullWidth();return this.options.fullWidth?!r&&t:r||!t});this.comp.setRowCtrls({rowCtrls:i,useFlushSync:e})}},sSe=`ag-force-vertical-scroll`,cSe=`ag-selectable`,lSe=`ag-column-moving`,uSe=class extends Q{constructor(){super(...arguments),this.stickyTopHeight=0,this.stickyBottomHeight=0}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.colModel=e.colModel,this.scrollVisibleSvc=e.scrollVisibleSvc,this.pinnedRowModel=e.pinnedRowModel,this.filterManager=e.filterManager,this.rowGroupColsSvc=e.rowGroupColsSvc}setComp(e,t,n,r,i,a,o){this.comp=e,this.eGridBody=t,this.eBodyViewport=n,this.eTop=r,this.eBottom=i,this.eStickyTop=a,this.eStickyBottom=o,this.eCenterColsViewport=n.querySelector(`.${QY(`center`)}`),this.eFullWidthContainer=n.querySelector(`.${$Y(`fullWidth`)}`),this.setCellTextSelection(this.gos.get(`enableCellTextSelection`)),this.addManagedPropertyListener(`enableCellTextSelection`,e=>this.setCellTextSelection(e.currentValue)),this.createManagedBean(new EY(this.comp)),this.scrollFeature=this.createManagedBean(new Bxe(n)),this.beans.rowDragSvc?.setupRowDrag(n,this),this.setupRowAnimationCssClass(),this.addEventListeners(),this.addFocusListeners([r,n,i,a,o]),this.setGridRootRole(),this.onGridColumnsChanged(),this.addBodyViewportListener(),this.setFloatingHeights(),this.disableBrowserDragging(),this.addStopEditingWhenGridLosesFocus(),this.updateScrollingClasses(),this.filterManager?.setupAdvFilterHeaderComp(r),this.ctrlsSvc.register(`gridBodyCtrl`,this)}addEventListeners(){let e=this.setFloatingHeights.bind(this),t=this.setGridRootRole.bind(this),n=this.toggleRowResizeStyles.bind(this);this.addManagedEventListeners({gridColumnsChanged:this.onGridColumnsChanged.bind(this),scrollVisibilityChanged:this.onScrollVisibilityChanged.bind(this),scrollGapChanged:this.updateScrollingClasses.bind(this),pinnedRowDataChanged:e,pinnedHeightChanged:e,pinnedRowsChanged:e,headerHeightChanged:this.setStickyTopOffsetTop.bind(this),columnRowGroupChanged:t,columnPivotChanged:t,rowResizeStarted:n,rowResizeEnded:n}),this.addManagedPropertyListener(`treeData`,t)}toggleRowResizeStyles(e){let t=e.type===`rowResizeStarted`;this.eBodyViewport.classList.toggle(`ag-prevent-animation`,t)}onGridColumnsChanged(){let e=this.beans.colModel.getCols();this.comp.setColumnCount(e.length)}onScrollVisibilityChanged(){let{scrollVisibleSvc:e}=this,t=e.verticalScrollShowing;this.setVerticalScrollPaddingVisible(t),this.setStickyWidth(t),this.setStickyBottomOffsetBottom();let n=`calc(100% + ${(t&&e.getScrollbarWidth()||0)+(uJ()?16:0)}px)`;lG(this.beans,()=>this.comp.setBodyViewportWidth(n)),this.updateScrollingClasses()}setGridRootRole(){let{rowGroupColsSvc:e,colModel:t,gos:n}=this,r=n.get(`treeData`);if(!r){let n=t.isPivotMode();r=(e?e.columns.length:0)>=(n?2:1)}this.comp.setGridRootRole(r?`treegrid`:`grid`)}addFocusListeners(e){for(let t of e)this.addManagedElementListeners(t,{focusin:e=>{let{target:n}=e,r=RW(n,`ag-root`,t);t.classList.toggle(`ag-has-focus`,!r)},focusout:e=>{let{target:n,relatedTarget:r}=e,i=t.contains(r),a=RW(r,`ag-root`,t);RW(n,`ag-root`,t)||(!i||a)&&t.classList.remove(`ag-has-focus`)}})}setColumnMovingCss(e){this.comp.setColumnMovingCss(lSe,e)}setCellTextSelection(e=!1){this.comp.setCellSelectableCss(cSe,e)}updateScrollingClasses(){let{eGridBody:{classList:e},scrollVisibleSvc:t}=this;e.toggle(`ag-body-vertical-content-no-gap`,!t.verticalScrollGap),e.toggle(`ag-body-horizontal-content-no-gap`,!t.horizontalScrollGap)}disableBrowserDragging(){this.addManagedElementListeners(this.eGridBody,{dragstart:e=>{if(e.target instanceof HTMLImageElement)return e.preventDefault(),!1}})}addStopEditingWhenGridLosesFocus(){this.beans.editSvc?.addStopEditingWhenGridLosesFocus([this.eBodyViewport,this.eBottom,this.eTop,this.eStickyTop,this.eStickyBottom])}updateRowCount(){let e=(this.ctrlsSvc.getHeaderRowContainerCtrl()?.getRowCount()??0)+(this.filterManager?.getHeaderRowCount()??0),{rowModel:t}=this.beans,n=t.isLastRowIndexKnown()?t.getRowCount():-1,r=n===-1?-1:e+n;this.comp.setRowCount(r)}registerBodyViewportResizeListener(e){this.comp.registerBodyViewportResizeListener(e)}setVerticalScrollPaddingVisible(e){let t=e?`scroll`:`hidden`;this.comp.setPinnedTopBottomOverflowY(t)}isVerticalScrollShowing(){let{gos:e,comp:t,ctrlsSvc:n}=this,r=e.get(`alwaysShowVerticalScroll`),i=r?sSe:null,a=CK(e,`normal`);t.setAlwaysVerticalScrollClass(i,r);let o=n.get(`center`)?.eViewport,s=n.get(`fakeHScrollComp`)?.getGui(),c=n.get(`fakeVScrollComp`)?.getGui();return r||a&&Hxe(this.eBodyViewport,o,void 0,c,s)}setupRowAnimationCssClass(){let{rowContainerHeight:e,environment:t}=this.beans,n=t.sizesMeasured,r=()=>{let t=n&&jK(this.gos)&&!e.stretching,r=t?`ag-row-animation`:`ag-row-no-animation`;this.comp.setRowAnimationCssOnBodyViewport(r,t)};r(),this.addManagedEventListeners({heightScaleChanged:r}),this.addManagedPropertyListener(`animateRows`,r),this.addManagedEventListeners({stylesChanged:()=>{!n&&t.sizesMeasured&&(n=!0,r())}})}addBodyViewportListener(){let{eBodyViewport:e,eStickyTop:t,eStickyBottom:n,eTop:r,eBottom:i,beans:{popupSvc:a,touchSvc:o}}=this,s=this.onBodyViewportContextMenu.bind(this);this.addManagedElementListeners(e,{contextmenu:s}),o?.mockBodyContextMenu(this,s),this.addManagedElementListeners(e,{wheel:this.onBodyViewportWheel.bind(this,a)});let c=this.onStickyWheel.bind(this);for(let e of[t,n,r,i])this.addManagedElementListeners(e,{wheel:c});let l=this.onHorizontalWheel.bind(this);for(let e of[`left`,`right`,`topLeft`,`topRight`,`bottomLeft`,`bottomRight`])this.addManagedElementListeners(this.ctrlsSvc.get(e).eContainer,{wheel:l});this.addFullWidthContainerWheelListener()}addFullWidthContainerWheelListener(){this.addManagedElementListeners(this.eFullWidthContainer,{wheel:e=>this.onFullWidthContainerWheel(e)})}onFullWidthContainerWheel(e){let{deltaX:t,deltaY:n,shiftKey:r}=e;(r||Math.abs(t)>Math.abs(n))&&TG(this.beans,e)&&this.scrollGridBodyToMatchEvent(e)}onStickyWheel(e){let{deltaY:t}=e;this.scrollVertically(t)>0&&e.preventDefault()}onHorizontalWheel(e){let{deltaX:t,deltaY:n,shiftKey:r}=e;(r||Math.abs(t)>Math.abs(n))&&this.scrollGridBodyToMatchEvent(e)}scrollGridBodyToMatchEvent(e){let{deltaX:t,deltaY:n}=e;e.preventDefault(),this.eCenterColsViewport.scrollBy({left:t||n})}onBodyViewportContextMenu(e,t,n){if(!e&&!n)return;this.gos.get(`preventDefaultOnContextMenu`)&&(e||n).preventDefault();let{target:r}=e||t;(r===this.eBodyViewport||r===this.ctrlsSvc.get(`center`).eViewport)&&this.beans.contextMenuSvc?.showContextMenu({mouseEvent:e,touchEvent:n,value:null,anchorToElement:this.eGridBody,source:`ui`})}onBodyViewportWheel(e,t){this.gos.get(`suppressScrollWhenPopupsAreOpen`)&&e?.hasAnchoredPopup()&&t.preventDefault()}scrollVertically(e){let t=this.eBodyViewport.scrollTop;return this.scrollFeature.setVerticalScrollPosition(t+e),this.eBodyViewport.scrollTop-t}setFloatingHeights(){let{pinnedRowModel:e,beans:{environment:t}}=this,n=e?.getPinnedTopTotalHeight(),r=e?.getPinnedBottomTotalHeight(),i=t.getPinnedRowBorderWidth()-t.getRowBorderWidth(),a=n?i+n:0,o=r?i+r:0;this.comp.setTopHeight(a),this.comp.setBottomHeight(o),this.comp.setTopInvisible(a<=0),this.comp.setBottomInvisible(o<=0),this.setStickyTopOffsetTop(),this.setStickyBottomOffsetBottom()}setStickyTopHeight(e=0){this.comp.setStickyTopHeight(`${e}px`),this.stickyTopHeight=e}setStickyBottomHeight(e=0){this.comp.setStickyBottomHeight(`${e}px`),this.stickyBottomHeight=e}setStickyWidth(e){if(!e)this.comp.setStickyTopWidth(`100%`),this.comp.setStickyBottomWidth(`100%`);else{let e=this.scrollVisibleSvc.getScrollbarWidth();this.comp.setStickyTopWidth(`calc(100% - ${e}px)`),this.comp.setStickyBottomWidth(`calc(100% - ${e}px)`)}}setStickyTopOffsetTop(){let e=this.ctrlsSvc.get(`gridHeaderCtrl`).headerHeight+(this.filterManager?.getHeaderHeight()??0),t=this.pinnedRowModel?.getPinnedTopTotalHeight()??0,n=0;e>0&&(n+=e),t>0&&(n+=t),n>0&&(n+=1),this.comp.setStickyTopTop(`${n}px`)}setStickyBottomOffsetBottom(){let{pinnedRowModel:e,scrollVisibleSvc:t,comp:n}=this,r=(e?.getPinnedBottomTotalHeight()??0)+(t.horizontalScrollShowing&&t.getScrollbarWidth()||0);n.setStickyBottomBottom(`${r}px`)}};function rX(e){return pG(e)}var iX={TAB_GUARD:`ag-tab-guard`,TAB_GUARD_TOP:`ag-tab-guard-top`,TAB_GUARD_BOTTOM:`ag-tab-guard-bottom`},aX=class extends AG{constructor(e,t){super(),this.stopPropagationCallbacks=t,this.skipTabGuardFocus=!1,this.forcingFocusOut=!1,this.allowFocus=!1;let{comp:n,eTopGuard:r,eBottomGuard:i,focusTrapActive:a,forceFocusOutWhenTabGuardsAreEmpty:o,isFocusableContainer:s,focusInnerElement:c,onFocusIn:l,onFocusOut:u,shouldStopEventPropagation:d,onTabKeyDown:f,handleKeyDown:p,isEmpty:m,eFocusableElement:h}=e;this.comp=n,this.eTopGuard=r,this.eBottomGuard=i,this.providedFocusInnerElement=c,this.eFocusableElement=h,this.focusTrapActive=!!a,this.forceFocusOutWhenTabGuardsAreEmpty=!!o,this.isFocusableContainer=!!s,this.providedFocusIn=l,this.providedFocusOut=u,this.providedShouldStopEventPropagation=d,this.providedOnTabKeyDown=f,this.providedHandleKeyDown=p,this.providedIsEmpty=m}postConstruct(){this.createManagedBean(new yJ(this.eFocusableElement,this.stopPropagationCallbacks,{shouldStopEventPropagation:()=>this.shouldStopEventPropagation(),onTabKeyDown:e=>this.onTabKeyDown(e),handleKeyDown:e=>this.handleKeyDown(e),onFocusIn:e=>this.onFocusIn(e),onFocusOut:e=>this.onFocusOut(e)})),this.activateTabGuards();for(let e of[this.eTopGuard,this.eBottomGuard])this.addManagedElementListeners(e,{focus:this.onFocus.bind(this)})}handleKeyDown(e){this.providedHandleKeyDown&&this.providedHandleKeyDown(e)}tabGuardsAreActive(){return!!this.eTopGuard&&this.eTopGuard.hasAttribute(`tabIndex`)}shouldStopEventPropagation(){return this.providedShouldStopEventPropagation?this.providedShouldStopEventPropagation():!1}activateTabGuards(){if(this.forcingFocusOut)return;let e=this.gos.get(`tabIndex`);this.comp.setTabIndex(e.toString())}deactivateTabGuards(){this.comp.setTabIndex()}onFocus(e){if(this.isFocusableContainer&&!this.eFocusableElement.contains(e.relatedTarget)&&!this.allowFocus){this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard);return}if(this.skipTabGuardFocus){this.skipTabGuardFocus=!1;return}if(this.forceFocusOutWhenTabGuardsAreEmpty&&(this.providedIsEmpty?this.providedIsEmpty():hJ(this.eFocusableElement,`.ag-tab-guard`).length===0)){this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard);return}if(this.isFocusableContainer&&this.eFocusableElement.contains(e.relatedTarget))return;let t=e.target===this.eBottomGuard;!(this.providedFocusInnerElement?this.providedFocusInnerElement(t):this.focusInnerElement(t))&&this.forceFocusOutWhenTabGuardsAreEmpty&&this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard)}findNextElementOutsideAndFocus(e){let t=hJ(fW(this.beans).body,null,!0),n=t.indexOf(e?this.eTopGuard:this.eBottomGuard);if(n===-1)return;let r,i;e?(r=0,i=n):(r=n+1,i=t.length);let a=t.slice(r,i),o=this.gos.get(`tabIndex`);a.sort((e,t)=>{let n=Number.parseInt(e.getAttribute(`tabindex`)||`0`),r=Number.parseInt(t.getAttribute(`tabindex`)||`0`);return r===o?1:n===o?-1:n===0?1:r===0?-1:n-r}),a[e?a.length-1:0]?.focus()}onFocusIn(e){this.focusTrapActive||this.forcingFocusOut||(this.providedFocusIn&&this.providedFocusIn(e),this.isFocusableContainer||this.deactivateTabGuards())}onFocusOut(e){this.focusTrapActive||(this.providedFocusOut&&this.providedFocusOut(e),this.eFocusableElement.contains(e.relatedTarget)||this.activateTabGuards())}onTabKeyDown(e){if(this.providedOnTabKeyDown){this.providedOnTabKeyDown(e);return}if(this.focusTrapActive||e.defaultPrevented)return;let t=this.tabGuardsAreActive();t&&this.deactivateTabGuards();let n=this.getNextFocusableElement(e.shiftKey);t&&setTimeout(()=>this.activateTabGuards(),0),n&&(n.focus(),e.preventDefault())}focusInnerElement(e=!1){let t=hJ(this.eFocusableElement);return this.tabGuardsAreActive()&&(t.splice(0,1),t.splice(-1,1)),t.length?(t[e?t.length-1:0].focus({preventScroll:!0}),!0):!1}getNextFocusableElement(e){return _J(this.beans,this.eFocusableElement,!1,e)}forceFocusOutOfContainer(e=!1){if(this.forcingFocusOut)return;let t=e?this.eTopGuard:this.eBottomGuard;this.activateTabGuards(),this.skipTabGuardFocus=!0,this.forcingFocusOut=!0,t.focus(),window.setTimeout(()=>{this.forcingFocusOut=!1,this.activateTabGuards()})}isTabGuard(e,t){return e===this.eTopGuard&&!t||e===this.eBottomGuard&&(t??!0)}setAllowFocus(e){this.allowFocus=e}},dSe=class extends AG{constructor(e,t){super(),this.comp=e,this.stopPropagationCallbacks=t}initialiseTabGuard(e){this.eTopGuard=this.createTabGuard(`top`),this.eBottomGuard=this.createTabGuard(`bottom`),this.eFocusableElement=this.comp.getFocusableElement();let{eTopGuard:t,eBottomGuard:n,eFocusableElement:r,stopPropagationCallbacks:i}=this,a=[t,n],o={setTabIndex:e=>{for(let t of a)e==null?t.removeAttribute(`tabindex`):t.setAttribute(`tabindex`,e)}};this.addTabGuards(t,n);let{focusTrapActive:s=!1,onFocusIn:c,onFocusOut:l,focusInnerElement:u,handleKeyDown:d,onTabKeyDown:f,shouldStopEventPropagation:p,isEmpty:m,forceFocusOutWhenTabGuardsAreEmpty:h,isFocusableContainer:g}=e;this.tabGuardCtrl=this.createManagedBean(new aX({comp:o,focusTrapActive:s,eTopGuard:t,eBottomGuard:n,eFocusableElement:r,onFocusIn:c,onFocusOut:l,focusInnerElement:u,handleKeyDown:d,onTabKeyDown:f,shouldStopEventPropagation:p,isEmpty:m,forceFocusOutWhenTabGuardsAreEmpty:h,isFocusableContainer:g},i))}getTabGuardCtrl(){return this.tabGuardCtrl}createTabGuard(e){let t=fW(this.beans).createElement(`div`),n=e===`top`?iX.TAB_GUARD_TOP:iX.TAB_GUARD_BOTTOM;return t.classList.add(iX.TAB_GUARD,n),bW(t,`presentation`),t}addTabGuards(e,t){let n=this.eFocusableElement;n.prepend(e),n.append(t)}removeAllChildrenExceptTabGuards(){let e=[this.eTopGuard,this.eBottomGuard];qW(this.comp.getFocusableElement()),this.addTabGuards(...e)}forceFocusOutOfContainer(e=!1){this.tabGuardCtrl.forceFocusOutOfContainer(e)}appendChild(e,t,n){aG(t)||(t=t.getGui());let{eBottomGuard:r}=this;r?r.before(t):e(t,n)}destroy(){let{eTopGuard:e,eBottomGuard:t}=this;JW(e),JW(t),super.destroy()}},fSe=class extends qq{initialiseTabGuard(e,t){this.tabGuardFeature=this.createManagedBean(new dSe(this,t)),this.tabGuardFeature.initialiseTabGuard(e)}forceFocusOutOfContainer(e=!1){this.tabGuardFeature.forceFocusOutOfContainer(e)}appendChild(e,t){this.tabGuardFeature.appendChild(super.appendChild.bind(this),e,t)}},pSe=class extends fSe{initialiseTabGuard(e){super.initialiseTabGuard(e,CJ)}},oX=(e,t)=>cY(e,()=>gJ(e.getGui(),t,!1,!0)),sX=e=>e?.getFocusableContainerName()??`external`,mSe=e=>e==null?`external`:typeof e==`string`?e:`gridBody`,hSe=class extends Q{constructor(){super(...arguments),this.additionalFocusableContainers=new Set}setComp(e,t,n){this.view=e,this.eGridHostDiv=t,this.eGui=n,this.eGui.setAttribute(`grid-id`,this.beans.context.getId());let{dragAndDrop:r,ctrlsSvc:i}=this.beans;r?.registerGridDropTarget(()=>this.eGui,this),this.createManagedBean(new EY(this.view)),this.view.setRtlClass(this.gos.get(`enableRtl`)?`ag-rtl`:`ag-ltr`);let a=cG(this.beans,this.eGridHostDiv,this.onGridSizeChanged.bind(this));this.addDestroyFunc(()=>a()),i.register(`gridCtrl`,this)}isDetailGrid(){return vJ(this.getGui())?.getAttribute(`row-id`)?.startsWith(`detail`)||!1}getOptionalSelectors(){let e=this.beans;return{paginationSelector:e.pagination?.getPaginationSelector(),gridHeaderDropZonesSelector:e.registry?.getSelector(`AG-GRID-HEADER-DROP-ZONES`),sideBarSelector:e.sideBar?.getSelector(),statusBarSelector:e.registry?.getSelector(`AG-STATUS-BAR`),watermarkSelector:e.licenseManager?.getWatermarkSelector()}}onGridSizeChanged(){this.eventSvc.dispatchEvent({type:`gridSizeChanged`,clientWidth:this.eGridHostDiv.clientWidth,clientHeight:this.eGridHostDiv.clientHeight})}destroyGridUi(){this.view.destroyGridUi()}getGui(){return this.eGui}setResizeCursor(e){let{view:t}=this;e===!1?t.setCursor(null):t.setCursor(e===1?`ew-resize`:`ns-resize`)}disableUserSelect(e){this.view.setUserSelect(e?`none`:null)}focusNextInnerContainer(e){let t=this.getFocusableContainers(),{indexWithFocus:n,nextIndex:r}=this.getNextFocusableIndex(t,e),i=n===-1?e?t.length-1:0:r,{gos:a,beans:{focusSvc:o,navigation:s}}=this,c=a.getCallback(`tabToNextGridContainer`);if(c){let r=o.getDefaultTabToNextGridContainerTarget({backwards:e,focusableContainers:t,nextIndex:i}),a=sX(t[i]),l=r==null&&a===`gridBody`?`gridBody`:mSe(r),u=c({backwards:e,previousContainer:sX(t[n]),nextContainer:l,defaultTarget:r});if(u!==void 0){if(typeof u==`boolean`)return u;if(typeof u==`string`){if(u===`gridBody`)return this.focusGridBodyDefault(e)||void 0;let n=t.find(e=>e.getFocusableContainerName()===u);if(!n){qG(`tabToNextGridContainer - ${u} container not found`);return}return oX(n,e)?!0:void 0}return Exe(u)?o.focusHeaderPosition({headerPosition:u})||void 0:(s?.ensureCellVisible(u),o.setFocusedCell({...u,forceBrowserFocus:!0}),o.isCellFocused(u)||void 0)}}return this.focusNextInnerContainerDefault({backwards:e,focusableContainers:t,indexWithFocus:n,nextIndex:i})||void 0}focusInnerElement(e){let{gos:t,beans:n,beans:{focusSvc:r,visibleCols:i}}=this;if(t.getCallback(`focusGridInnerElement`)?.({fromBottom:!!e}))return!0;let a=this.getFocusableContainers();if(e)return this.focusNextInnerContainerDefault({backwards:!0,focusableContainers:a,indexWithFocus:a.length,nextIndex:a.length-1})?!0:r.focusGridView({column:XU(i.allCols),backwards:!0});let o=i.allCols;if(t.get(`headerHeight`)===0||aY(n)){if(r.focusGridView({column:o[0],backwards:e}))return!0;for(let t=1;t<a.length;t++)if(gJ(a[t].getGui(),e))return!0;return!1}return r.focusFirstHeader()}forceFocusOutOfContainer(e=!1){this.view.forceFocusOutOfContainer(e)}isFocusInsideGridBody(){let e=this.getFocusableContainers(),{indexWithFocus:t}=this.getNextFocusableIndex(e);return e[t]?.getFocusableContainerName()===`gridBody`}addFocusableContainer(e){this.additionalFocusableContainers.add(e)}removeFocusableContainer(e){this.additionalFocusableContainers.delete(e)}allowFocusForNextCoreContainer(e){let t=this.view.getFocusableContainers(),{indexWithFocus:n,nextIndex:r}=this.getNextFocusableIndex(t,e);this.focusNextInnerContainerDefault({backwards:!!e,focusableContainers:t,indexWithFocus:n,nextIndex:r})||this.forceFocusOutOfContainer(e)}isFocusable(){let e=this.beans;return!oY(e)||!aY(e)||!!e.sideBar?.comp?.isDisplayed()}getNextFocusableIndex(e,t){let n=dW(this.beans),r=e.findIndex(e=>e.getGui().contains(n));return{indexWithFocus:r,nextIndex:r+(t?-1:1)}}focusGridBodyDefault(e){let{gos:t,beans:n,beans:{focusSvc:r,visibleCols:{allCols:i}}}=this;return e?r.focusGridView({column:XU(i),backwards:!0}):t.get(`headerHeight`)===0||aY(n)?r.focusGridView({column:i[0]}):r.focusFirstHeader()}focusNextInnerContainerDefault(e){let{backwards:t,focusableContainers:n,indexWithFocus:r}=e,i=t?-1:1;for(let a=e.nextIndex;a>=0&&a<n.length;a+=i){let e=n[a];if(e.getFocusableContainerName()===`gridBody`&&(r===-1||(t?r>a:r<a))){if(this.focusGridBodyDefault(t))return!0;continue}if(oX(e,t))return!0}return!1}getFocusableContainers(){return[...this.view.getFocusableContainers(),...this.additionalFocusableContainers]}destroy(){this.additionalFocusableContainers.clear(),super.destroy()}},cX=(e,t)=>{for(let n of Object.keys(t))t[n]=e;return t},lX={dispatchEvent:`CommunityCore`,...cX(`CommunityCore`,{destroy:0,getGridId:0,getGridOption:0,isDestroyed:0,setGridOption:0,updateGridOptions:0,isModuleRegistered:0}),...cX(`GridState`,{getState:0,setState:0}),...cX(`SharedRowSelection`,{setNodesSelected:0,selectAll:0,deselectAll:0,selectAllFiltered:0,deselectAllFiltered:0,selectAllOnCurrentPage:0,deselectAllOnCurrentPage:0,getSelectedNodes:0,getSelectedRows:0}),...cX(`RowApi`,{redrawRows:0,setRowNodeExpanded:0,getRowNode:0,addRenderedRowListener:0,getRenderedNodes:0,forEachNode:0,getFirstDisplayedRowIndex:0,getLastDisplayedRowIndex:0,getDisplayedRowAtIndex:0,getDisplayedRowCount:0}),...cX(`ScrollApi`,{getVerticalPixelRange:0,getHorizontalPixelRange:0,ensureColumnVisible:0,ensureIndexVisible:0,ensureNodeVisible:0}),...cX(`KeyboardNavigation`,{getFocusedCell:0,clearFocusedCell:0,setFocusedCell:0,tabToNextCell:0,tabToPreviousCell:0,setFocusedHeader:0}),...cX(`EventApi`,{addEventListener:0,addGlobalListener:0,removeEventListener:0,removeGlobalListener:0}),...cX(`ValueCache`,{expireValueCache:0}),...cX(`CellApi`,{getCellValue:0}),...cX(`SharedMenu`,{showColumnMenu:0,hidePopupMenu:0}),...cX(`Sort`,{onSortChanged:0}),...cX(`PinnedRow`,{getPinnedTopRowCount:0,getPinnedBottomRowCount:0,getPinnedTopRow:0,getPinnedBottomRow:0,forEachPinnedRow:0}),...cX(`Overlay`,{showLoadingOverlay:0,showNoRowsOverlay:0,hideOverlay:0}
19),...cX(`RenderApi`,{setGridAriaProperty:0,refreshCells:0,refreshHeader:0,isAnimationFrameQueueEmpty:0,flushAllAnimationFrames:0,getSizesForCurrentTheme:0,getCellRendererInstances:0}),...cX(`HighlightChanges`,{flashCells:0}),...cX(`RowDrag`,{addRowDropZone:0,removeRowDropZone:0,getRowDropZoneParams:0,getRowDropPositionIndicator:0,setRowDropPositionIndicator:0}),...cX(`ColumnApi`,{getColumnDefs:0,getColumnDef:0,getDisplayNameForColumn:0,getColumn:0,getColumns:0,applyColumnState:0,getColumnState:0,resetColumnState:0,isPinning:0,isPinningLeft:0,isPinningRight:0,getDisplayedColAfter:0,getDisplayedColBefore:0,setColumnsVisible:0,setColumnsPinned:0,getAllGridColumns:0,getDisplayedLeftColumns:0,getDisplayedCenterColumns:0,getDisplayedRightColumns:0,getAllDisplayedColumns:0,getAllDisplayedVirtualColumns:0}),...cX(`ColumnAutoSize`,{sizeColumnsToFit:0,autoSizeColumns:0,autoSizeAllColumns:0}),...cX(`ColumnGroup`,{setColumnGroupOpened:0,getColumnGroup:0,getProvidedColumnGroup:0,getDisplayNameForColumnGroup:0,getColumnGroupState:0,setColumnGroupState:0,resetColumnGroupState:0,getLeftDisplayedColumnGroups:0,getCenterDisplayedColumnGroups:0,getRightDisplayedColumnGroups:0,getAllDisplayedColumnGroups:0}),...cX(`ColumnMove`,{moveColumnByIndex:0,moveColumns:0}),...cX(`ColumnResize`,{setColumnWidths:0}),...cX(`ColumnHover`,{isColumnHovered:0}),...cX(`EditCore`,{getCellEditorInstances:0,getEditingCells:0,getEditRowValues:0,stopEditing:0,startEditingCell:0,isEditing:0,validateEdit:0}),...cX(`BatchEdit`,{startBatchEdit:0,cancelBatchEdit:0,commitBatchEdit:0,isBatchEditing:0}),...cX(`UndoRedoEdit`,{undoCellEditing:0,redoCellEditing:0,getCurrentUndoSize:0,getCurrentRedoSize:0}
vendor: 109,810 bytes, line 19
19),...cX(`FilterCore`,{isAnyFilterPresent:0,onFilterChanged:0}),...cX(`ColumnFilter`,{isColumnFilterPresent:0,getColumnFilterInstance:0,destroyFilter:0,setFilterModel:0,getFilterModel:0,getColumnFilterModel:0,setColumnFilterModel:0,showColumnFilter:0,hideColumnFilter:0,getColumnFilterHandler:0,doFilterAction:0}),...cX(`QuickFilter`,{isQuickFilterPresent:0,getQuickFilter:0,resetQuickFilter:0}),...cX(`Find`,{findGetActiveMatch:0,findGetTotalMatches:0,findGoTo:0,findNext:0,findPrevious:0,findGetNumMatches:0,findGetParts:0,findClearActive:0,findRefresh:0}),...cX(`Pagination`,{paginationIsLastPageFound:0,paginationGetPageSize:0,paginationGetCurrentPage:0,paginationGetTotalPages:0,paginationGetRowCount:0,paginationGoToNextPage:0,paginationGoToPreviousPage:0,paginationGoToFirstPage:0,paginationGoToLastPage:0,paginationGoToPage:0}),...cX(`CsrmSsrmSharedApi`,{expandAll:0,collapseAll:0,resetRowGroupExpansion:0}),...cX(`SsrmInfiniteSharedApi`,{setRowCount:0,getCacheBlockState:0,isLastRowIndexKnown:0}),...cX(`ClientSideRowModelApi`,{onGroupExpandedOrCollapsed:0,refreshClientSideRowModel:0,isRowDataEmpty:0,forEachLeafNode:0,forEachNodeAfterFilter:0,forEachNodeAfterFilterAndSort:0,applyTransaction:0,applyTransactionAsync:0,flushAsyncTransactions:0,getBestCostNodeSelection:0,onRowHeightChanged:0,resetRowHeights:0}),...cX(`CsvExport`,{getDataAsCsv:0,exportDataAsCsv:0}),...cX(`InfiniteRowModel`,{refreshInfiniteCache:0,purgeInfiniteCache:0,getInfiniteRowCount:0}),...cX(`AdvancedFilter`,{getAdvancedFilterModel:0,setAdvancedFilterModel:0,showAdvancedFilterBuilder:0,hideAdvancedFilterBuilder:0}),...cX(`IntegratedCharts`,{getChartModels:0,getChartRef:0,getChartImageDataURL:0,downloadChart:0,openChartToolPanel:0,closeChartToolPanel:0,createRangeChart:0,createPivotChart:0,createCrossFilterChart:0,updateChart:0,restoreChart:0}),...cX(`Clipboard`,{copyToClipboard:0,cutToClipboard:0,copySelectedRowsToClipboard:0,copySelectedRangeToClipboard:0,copySelectedRangeDown:0,pasteFromClipboard:0}),...cX(`ExcelExport`,{getDataAsExcel:0,exportDataAsExcel:0,getSheetDataForExcel:0,getMultipleSheetsAsExcel:0,exportMultipleSheetsAsExcel:0}),...cX(`SharedMasterDetail`,{addDetailGridInfo:0,removeDetailGridInfo:0,getDetailGridInfo:0,forEachDetailGridInfo:0}),...cX(`ContextMenu`,{showContextMenu:0}),...cX(`ColumnMenu`,{showColumnChooser:0,hideColumnChooser:0}),...cX(`CellSelection`,{getCellRanges:0,addCellRange:0,clearRangeSelection:0,clearCellSelection:0}),...cX(`SharedRowGrouping`,{setRowGroupColumns:0,removeRowGroupColumns:0,addRowGroupColumns:0,getRowGroupColumns:0,moveRowGroupColumn:0}),...cX(`SharedAggregation`,{addAggFuncs:0,clearAggFuncs:0,setColumnAggFunc:0}),...cX(`SharedPivot`,{isPivotMode:0,getPivotResultColumn:0,setValueColumns:0,getValueColumns:0,removeValueColumns:0,addValueColumns:0,setPivotColumns:0,removePivotColumns:0,addPivotColumns:0,getPivotColumns:0,setPivotResultColumns:0,getPivotResultColumns:0}),...cX(`ServerSideRowModelApi`,{getServerSideSelectionState:0,setServerSideSelectionState:0,applyServerSideTransaction:0,applyServerSideTransactionAsync:0,applyServerSideRowData:0,retryServerSideLoads:0,flushServerSideAsyncTransactions:0,refreshServerSide:0,getServerSideGroupLevelState:0,onRowHeightChanged:0,resetRowHeights:0}),...cX(`SideBar`,{isSideBarVisible:0,setSideBarVisible:0,setSideBarPosition:0,openToolPanel:0,closeToolPanel:0,getOpenedToolPanel:0,refreshToolPanel:0,isToolPanelShowing:0,getToolPanelInstance:0,getSideBar:0}),...cX(`StatusBar`,{getStatusPanel:0}),...cX(`AiToolkit`,{getStructuredSchema:0})},uX={isDestroyed:()=>!0,destroy(){},preConstruct(){},postConstruct(){},preWireBeans(){},wireBeans(){}},gSe=(e,t)=>e.eventSvc.dispatchEvent(t),dX=class{};Reflect.defineProperty(dX,"name",{value:`GridApi`});var _Se=class extends Q{constructor(){super(),this.beanName=`apiFunctionSvc`,this.api=new dX,this.fns={...uX,dispatchEvent:gSe},this.preDestroyLink=``;let{api:e}=this;for(let t of Object.keys(lX))e[t]=this.makeApi(t)[t]}postConstruct(){this.preDestroyLink=this.beans.frameworkOverrides.getDocLink(`grid-lifecycle/#grid-pre-destroyed`)}addFunction(e,t){let{fns:n,beans:r}=this;n!==uX&&(n[e]=r?.validation?.validateApiFunction(e,t)??t)}makeApi(e){return{[e]:(...t)=>{let{beans:n,fns:{[e]:r}}=this;return r?r(n,...t):this.apiNotFound(e)}}}apiNotFound(e){let{beans:t,gos:n,preDestroyLink:r}=this;if(!t)gK(26,{fnName:e,preDestroyLink:r});else{let t=lX[e];n.assertModuleRegistered(t,`api.${e}`)&&gK(27,{fnName:e,module:t})}}destroy(){super.destroy(),this.fns=uX,this.beans=null}};function vSe(e){return e.context.getId()}function ySe(e){e.gridDestroySvc.destroy()}function bSe(e){return e.gridDestroySvc.destroyCalled}function xSe(e,t){return e.gos.get(t)}function SSe(e,t,n){fX(e,{[t]:n})}function fX(e,t){e.gos.updateGridOptions({options:t})}function CSe(e,t){let n=t.replace(/Module$/,``);return e.gos.isModuleRegistered(n)}function wSe(e,t,n){let r=pX(e,t,n);if(r){let{className:e}=r;if(typeof e==`string`&&e.includes(`ag-icon`)||typeof e==`object`&&e[`ag-icon`])return r}let i=rX({tag:`span`});return i.appendChild(r),i}function pX(e,t,n){let r=null;e===`smallDown`?gK(262):e===`smallLeft`?gK(263):e===`smallRight`&&gK(264);let i=n?.getColDef().icons;if(i&&(r=i[e]),t.gos&&!r){let n=t.gos.get(`icons`);n&&(r=n[e])}if(r){let t;if(typeof r==`function`)t=r();else if(typeof r==`string`)t=r;else{gK(38,{iconName:e});return}if(typeof t==`string`)return ZW(t);if(aG(t))return t;gK(133,{iconName:e});return}{let n=t.registry.getIcon(e);return n||t.validation?.validateIcon(e),rX({tag:`span`,cls:`ag-icon ag-icon-${n??e}`,role:`presentation`,attrs:{unselectable:`on`}})}}var TSe={tag:`div`,cls:`ag-drag-handle ag-row-drag`,attrs:{draggable:`true`}},ESe=class extends Yq{constructor(e,t,n){super(TSe),this.rowNode=e,this.column=t,this.eCell=n}postConstruct(){this.getGui().appendChild(pX(`rowDrag`,this.beans,null)),this.addGuiEventListener(`mousedown`,e=>{e.stopPropagation()}),this.addDragSource(),this.checkVisibility()}addDragSource(){this.addGuiEventListener(`dragstart`,this.onDragStart.bind(this))}onDragStart(e){let{rowNode:t,column:n,eCell:r,gos:i}=this,a=n.getColDef().dndSourceOnRowDrag,o=e.dataTransfer;if(o.setDragImage(r,0,0),a)a(eq(i,{rowNode:t,dragEvent:e}));else try{let e=JSON.stringify(t.data);o.setData(`application/json`,e),o.setData(`text/plain`,e)}catch{}}checkVisibility(){let e=this.column.isDndSource(this.rowNode);this.setDisplayed(e)}},DSe=`.ag-dnd-ghost{align-items:center;background-color:var(--ag-drag-and-drop-image-background-color);border:var(--ag-drag-and-drop-image-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-drag-and-drop-image-shadow);color:var(--ag-text-color);cursor:move;display:flex;font-weight:500;gap:var(--ag-cell-widget-spacing);height:var(--ag-header-height);overflow:hidden;padding-left:var(--ag-cell-horizontal-padding);padding-right:var(--ag-cell-horizontal-padding);text-overflow:ellipsis;transform:translateY(calc(var(--ag-spacing)*2));white-space:nowrap}.ag-dnd-ghost-not-allowed{border:var(--ag-drag-and-drop-image-not-allowed-border)}`,OSe={tag:`div`,children:[{tag:`div`,ref:`eGhost`,cls:`ag-dnd-ghost ag-unselectable`,children:[{tag:`span`,ref:`eIcon`,cls:`ag-dnd-ghost-icon ag-shake-left-to-right`},{tag:`div`,ref:`eLabel`,cls:`ag-dnd-ghost-label`}]}]},kSe=class extends Yq{constructor(){super(),this.dragSource=null,this.eIcon=null,this.eLabel=null,this.eGhost=null,this.registerCSS(DSe)}postConstruct(){let e=e=>wSe(e,this.beans,null);this.dropIconMap={pinned:e(`columnMovePin`),hide:e(`columnMoveHide`),move:e(`columnMoveMove`),left:e(`columnMoveLeft`),right:e(`columnMoveRight`),group:e(`columnMoveGroup`),aggregate:e(`columnMoveValue`),pivot:e(`columnMovePivot`),notAllowed:e(`dropNotAllowed`)}}init(e){this.dragSource=e.dragSource,this.setTemplate(OSe),this.beans.environment.applyThemeClasses(this.eGhost)}destroy(){this.dragSource=null,super.destroy()}setIcon(e,t){let{eGhost:n,eIcon:r,dragSource:i,dropIconMap:a,gos:o}=this;qW(r);let s=null;e||=i?.getDefaultIconName?i.getDefaultIconName():`notAllowed`,s=a[e],n.classList.toggle(`ag-dnd-ghost-not-allowed`,e===`notAllowed`),r.classList.toggle(`ag-shake-left-to-right`,t),!(s===a.hide&&o.get(`suppressDragLeaveHidesColumns`))&&s&&r.appendChild(s)}setLabel(e){this.eLabel.textContent=e}};function ASe(e,t){e.rowDragSvc?.rowDragFeature?.addRowDropZone(t)}function jSe(e,t){let n=e.dragAndDrop?.findExternalZone(t.getContainer());n&&e.dragAndDrop?.removeDropTarget(n)}function MSe(e,t){return e.rowDragSvc?.rowDragFeature?.getRowDropZone(t)}function NSe(e){let t=e.rowDropHighlightSvc;return t?{row:t.row,dropIndicatorPosition:t.position}:{row:null,dropIndicatorPosition:`none`}}function PSe(e,t){let n=e.rowDropHighlightSvc;if(!n)return;let r=t?.row,i=t?.dropIndicatorPosition;i!==`above`&&i!==`below`&&i!==`inside`&&(i=`none`),r?.rowIndex==null||i===`none`?n.clear():n.set(r,i)}var mX=(e,t)=>{if(t!=null&&e?.setPointerCapture)try{return e.setPointerCapture(t),e.hasPointerCapture(t)}catch{}return!1},FSe=(e,t)=>{if(typeof PointerEvent>`u`||!(t instanceof PointerEvent))return null;let n=t.pointerId;if(!mX(e,n))return null;let r={eElement:e,pointerId:n,onLost(e){LSe(r,e)}};return e.addEventListener(`lostpointercapture`,r.onLost),r},ISe=e=>{if(!e)return;hX(e);let{eElement:t,pointerId:n}=e;if(t){try{t.releasePointerCapture(n)}catch{}e.eElement=null}},hX=e=>{let{eElement:t,onLost:n}=e;t&&n&&(t.removeEventListener(`lostpointercapture`,n),e.onLost=null)},LSe=(e,t)=>{hX(e);let{eElement:n,pointerId:r}=e;n&&t.pointerId===r&&mX(n,r)},gX,_X,vX={passive:!0},yX={passive:!1},bX=e=>{if(!_X)_X=new WeakSet;else if(_X.has(e))return!1;return _X.add(e),!0},RSe=class extends AG{constructor(){super(...arguments),this.beanName=`dragSvc`,this.dragging=!1,this.drag=null,this.dragSources=[]}get startTarget(){return this.drag?.start.target??null}isPointer(){return!!gX?.has(uW(this.beans))}hasPointerCapture(){let e=this.drag?.pointerCapture;return!!(e&&this.beans.eRootDiv.hasPointerCapture?.(e.pointerId))}destroy(){this.drag&&this.cancelDrag();let e=this.dragSources;for(let t of e)xX(t);e.length=0,super.destroy()}removeDragSource(e){let t=this.dragSources;for(let n=0,r=t.length;n<r;++n){let r=t[n];if(r.params===e){t.splice(n,1),xX(r);break}}}addDragSource(e){if(!this.isAlive())return;let{eElement:t,includeTouch:n}=e,r=[],i;if(n){let e=t.style;e&&(i=e.touchAction,e.touchAction=`none`)}let a={handlers:r,params:e,oldTouchAction:i};this.dragSources.push(a),EG(r,[t,`pointerdown`,t=>this.onPointerDown(e,t),yX],[t,`mousedown`,t=>this.onMouseDown(e,t)]);let o=this.gos.get(`suppressTouch`);n&&!o&&EG(r,[t,`touchstart`,t=>this.onTouchStart(e,t),yX])}cancelDrag(e){let t=this.drag;e??=t?.eElement,e&&this.eventSvc.dispatchEvent({type:`dragCancelled`,target:e}),t?.params.onDragCancel?.(),this.destroyDrag()}shouldPreventMouseEvent(e){let t=e.type;return(t===`mousemove`||t===`pointermove`)&&e.cancelable&&TG(this.beans,e)&&!PW(CX(e))}initDrag(e,...t){this.drag=e;let n=this.beans,r=e=>this.onScroll(e),i=e=>this.onKeyDown(e),a=uW(n),o=fW(n);EG(e.handlers,[a,`contextmenu`,OG],[a,`keydown`,i],[o,`scroll`,r,{capture:!0}],[o.defaultView||window,`scroll`,r],...t)}destroyDrag(){this.dragging=!1;let e=this.drag;if(e){let t=e.rootEl;gX?.get(t)===e&&gX.delete(t),this.drag=null,ISe(e.pointerCapture),DG(e.handlers)}}onPointerDown(e,t){if(this.isPointer())return;let n=this.beans;if(_X?.has(t))return;let r=t.pointerType;if(r===`touch`&&(n.gos.get(`suppressTouch`)||!e.includeTouch||(e.stopPropagationForTouch&&t.stopPropagation(),PW(CX(t))))||!t.isPrimary||r===`mouse`&&t.button!==0)return;this.destroyDrag();let i=uW(n),a=e.eElement,o=t.pointerId,s=new SX(i,e,t,o);gX??=new WeakMap,gX.set(i,s);let c=e=>{e.pointerId===o&&this.onMouseOrPointerMove(e)},l=e=>{e.pointerId===o&&this.onMouseOrPointerUp(e)},u=e=>{e.pointerId===o&&bX(e)&&this.cancelDrag()},d=e=>this.draggingPreventDefault(e);this.initDrag(s,[i,`pointerup`,l],[i,`pointercancel`,u],[i,`pointermove`,c,yX],[i,`touchmove`,d,yX],[a,`mousemove`,d,yX]),e.dragStartPixels===0?this.onMouseOrPointerMove(t):bX(t)}onTouchStart(e,t){if(this.gos.get(`suppressTouch`)||!e.includeTouch||!bX(t)||PW(CX(t)))return;if(e.stopPropagationForTouch&&t.stopPropagation(),this.isPointer()){this.dragging&&OG(t);return}this.destroyDrag();let n=this.beans,r=new SX(uW(n),e,t.touches[0]),i=e=>this.onTouchMove(e),a=e=>this.onTouchUp(e),o=e=>this.onTouchCancel(e),s=e=>this.draggingPreventDefault(e),c=uW(n),l=t.target??e.eElement;this.initDrag(r,[l,`touchmove`,i,vX],[l,`touchend`,a,vX],[l,`touchcancel`,o,vX],[c,`touchmove`,s,yX],[c,`touchend`,a,yX],[c,`touchcancel`,o,yX]),e.dragStartPixels===0&&this.onMove(r.start)}draggingPreventDefault(e){this.dragging&&OG(e)}onMouseDown(e,t){if(t.button!==0||_X?.has(t)||this.isPointer())return;let n=this.beans;this.destroyDrag();let r=new SX(uW(n),e,t),i=e=>this.onMouseOrPointerMove(e),a=e=>this.onMouseOrPointerUp(e),o=uW(n);this.initDrag(r,[o,`mousemove`,i],[o,`mouseup`,a]),e.dragStartPixels===0?this.onMouseOrPointerMove(t):bX(t)}onScroll(e){if(!bX(e))return;let t=this.drag,n=t?.lastDrag;n&&this.dragging&&t.params?.onDragging?.(n)}onMouseOrPointerMove(e){bX(e)&&(rJ()&&fW(this.beans).getSelection()?.removeAllRanges(),this.shouldPreventMouseEvent(e)&&OG(e),this.onMove(e))}onTouchCancel(e){let t=this.drag;t&&bX(e)&&wG(t.start,e.changedTouches)&&this.cancelDrag()}onTouchMove(e){let t=this.drag;if(!t||!bX(e))return;let n=wG(t.start,e.touches);n&&(this.onMove(n),this.draggingPreventDefault(e))}onMove(e){let t=this.drag;if(!t)return;t.lastDrag=e;let n=t.params;if(!this.dragging){let r=t.start;if(CG(e,r,n.dragStartPixels??4)||(this.dragging=!0,n.capturePointer&&(t.pointerCapture=FSe(this.beans.eRootDiv,e)),this.eventSvc.dispatchEvent({type:`dragStarted`,target:n.eElement}),n.onDragStart?.(r),this.drag!==t)||(n.onDragging?.(r),this.drag!==t))return}n.onDragging?.(e)}onTouchUp(e){let t=this.drag;t&&bX(e)&&this.onUp(wG(t.start,e.changedTouches))}onMouseOrPointerUp(e){bX(e)&&this.onUp(e)}onUp(e){let t=this.drag;t&&(e||=t.lastDrag,e&&this.dragging&&(this.dragging=!1,t.params.onDragStop?.(e),this.eventSvc.dispatchEvent({type:`dragStopped`,target:t.params.eElement})),this.destroyDrag())}onKeyDown(e){e.key===$.ESCAPE&&this.cancelDrag()}},xX=e=>{DG(e.handlers);let t=e.oldTouchAction;if(t!=null){let n=e.params.eElement.style;n&&(n.touchAction=t)}},SX=class{constructor(e,t,n,r=null){this.rootEl=e,this.params=t,this.start=n,this.pointerId=r,this.handlers=[],this.lastDrag=null,this.pointerCapture=null,this.eElement=t.eElement}},CX=e=>{let t=e.target;return t instanceof Element?t:null},zSe=class extends RSe{shouldPreventMouseEvent(e){return this.gos.get(`enableCellTextSelection`)&&super.shouldPreventMouseEvent(e)}},BSe=class extends Q{constructor(){super(...arguments),this.beanName=`horizontalResizeSvc`}addResizeBar(e){let t={dragStartPixels:e.dragStartPixels||0,eElement:e.eResizeBar,onDragStart:this.onDragStart.bind(this,e),onDragStop:this.onDragStop.bind(this,e),onDragging:this.onDragging.bind(this,e),onDragCancel:this.onDragStop.bind(this,e),includeTouch:!0,stopPropagationForTouch:!0},{dragSvc:n}=this.beans;return n.addDragSource(t),()=>n.removeDragSource(t)}onDragStart(e,t){this.dragStartX=t.clientX,this.setResizeIcons();let n=t instanceof MouseEvent&&t.shiftKey===!0;e.onResizeStart(n)}setResizeIcons(){let e=this.beans.ctrlsSvc.get(`gridCtrl`);e.setResizeCursor(1),e.disableUserSelect(!0)}onDragStop(e){e.onResizeEnd(this.resizeAmount),this.resetIcons()}resetIcons(){let e=this.beans.ctrlsSvc.get(`gridCtrl`);e.setResizeCursor(!1),e.disableUserSelect(!1)}onDragging(e,t){this.resizeAmount=t.clientX-this.dragStartX,e.onResizing(this.resizeAmount)}},VSe={tag:`div`,cls:`ag-drag-handle ag-row-drag`,attrs:{"aria-hidden":`true`}},wX={skipAriaHidden:!0},HSe=class extends Yq{constructor(e,t,n,r,i,a=!1){super(),this.cellValueFn=e,this.rowNode=t,this.column=n,this.customGui=r,this.dragStartPixels=i,this.alwaysVisible=a,this.dragSource=null,this.disabled=!1}isCustomGui(){return this.customGui!=null}postConstruct(){let{beans:e,customGui:t}=this;t?this.setDragElement(t,this.dragStartPixels):(this.setTemplate(VSe),this.getGui().appendChild(pX(`rowDrag`,e,null)),this.addDragSource()),this.alwaysVisible||this.initCellDrag()}initCellDrag(){let{beans:e,rowNode:t}=this,n=this.refreshVisibility.bind(this);this.addManagedListeners(e.eventSvc,{rowDragVisibilityChanged:n}),this.addManagedListeners(t,{dataChanged:n,cellChanged:n}),this.refreshVisibility()}setDragElement(e,t){this.setTemplateFromElement(e,void 0,void 0,!0),this.addDragSource(t)}refreshVisibility(){if(this.alwaysVisible)return;let{beans:e,column:t,rowNode:n}=this,{gos:r,dragAndDrop:i,rowDragSvc:a}=e,o=a?.visibility,s=!(o===`suppress`||o===`hidden`&&!i?.hasExternalDropZones()),c=s;if(s&&!this.isCustomGui()&&t){let e=t.getColDef().rowDrag;if(e===!1)s=!1;else{let r=typeof e==`function`;c=t.isRowDrag(n),s=r||c}}s&&c&&n.footer&&r.get(`rowDragManaged`)&&(c=!1,s=!0),c&&=s,s||this.setDisplayed(s,wX),c||this.setVisible(c,wX),this.setDisabled(!c||o===`disabled`&&!i?.hasExternalDropZones()),s&&this.setDisplayed(s,wX),c&&this.setVisible(c,wX)}setDisabled(e){e!==this.disabled&&(this.disabled=e,this.getGui()?.classList?.toggle(`ag-drag-handle-disabled`,e))}getSelectedNodes(){let e=this.rowNode;if(!this.gos.get(`rowDragMultiRow`))return[e];let t=this.beans.selectionSvc?.getSelectedNodes()??[];return t.indexOf(e)===-1?[e]:t}getDragItem(){let{column:e,rowNode:t}=this;return{rowNode:t,rowNodes:this.getSelectedNodes(),columns:e?[e]:void 0,defaultTextValue:this.cellValueFn()}}addDragSource(e=4){if(this.dragSource&&this.removeDragSource(),this.gos.get(`rowDragManaged`)&&this.rowNode.footer)return;let t=this.getGui();if(this.gos.get(`enableCellTextSelection`)){this.removeMouseDownListener();let e=_G(`pointerdown`)?{pointerdown:OG}:{mousedown:OG};this.mouseDownListener=this.addManagedElementListeners(t,e)[0]}let n=this.getLocaleTextFunc();this.dragSource={type:2,eElement:t,dragItemName:e=>this.getDragItemName(e,n),getDragItem:()=>this.getDragItem(),dragStartPixels:e,dragSourceDomDataKey:this.gos.getDomDataKey()},this.beans.dragAndDrop.addDragSource(this.dragSource,!0)}getDragItemName(e,t){let n=e?.dragItem||this.getDragItem(),r=(e?.dropTarget?.rows.length??n.rowNodes?.length)||1,i=this.column?.getColDef()?.rowDragText??this.gos.get(`rowDragText`);return i?i(n,r):r===1?this.cellValueFn()||`1 ${t(`rowDragRow`,`rows`)}`:`${r} ${t(`rowDragRows`,`rows`)}`}destroy(){this.removeDragSource(),this.removeMouseDownListener(),super.destroy()}removeDragSource(){this.dragSource&&=(this.beans.dragAndDrop.removeDragSource(this.dragSource),null)}removeMouseDownListener(){this.mouseDownListener&&=(this.mouseDownListener(),void 0)}},USe=class{constructor(e){this.tickingInterval=null,this.onScrollCallback=null,this.scrollContainer=e.scrollContainer,this.scrollHorizontally=e.scrollAxis.includes(`x`),this.scrollVertically=e.scrollAxis.includes(`y`),this.scrollByTick=e.scrollByTick??20,e.onScrollCallback&&(this.onScrollCallback=e.onScrollCallback),this.scrollVertically&&(this.getVerticalPosition=e.getVerticalPosition,this.setVerticalPosition=e.setVerticalPosition),this.scrollHorizontally&&(this.getHorizontalPosition=e.getHorizontalPosition,this.setHorizontalPosition=e.setHorizontalPosition),this.shouldSkipVerticalScroll=e.shouldSkipVerticalScroll||(()=>!1),this.shouldSkipHorizontalScroll=e.shouldSkipHorizontalScroll||(()=>!1)}get scrolling(){return this.tickingInterval!==null}check(e,t=!1){let n=!this.scrollVertically||t||this.shouldSkipVerticalScroll(),r=!this.scrollHorizontally||this.shouldSkipHorizontalScroll();if(n&&r)return;let i=this.scrollContainer.getBoundingClientRect(),a=this.scrollByTick;this.tickLeft=!r&&e.clientX<i.left+a,this.tickRight=!r&&e.clientX>i.right-a,this.tickUp=!n&&e.clientY<i.top+a,this.tickDown=!n&&e.clientY>i.bottom-a,this.tickLeft||this.tickRight||this.tickUp||this.tickDown?this.ensureTickingStarted():this.ensureCleared()}ensureTickingStarted(){this.tickingInterval===null&&(this.tickingInterval=window.setInterval(this.doTick.bind(this),100),this.tickCount=0)}doTick(){this.tickCount++;let e=this.tickCount>20?200:this.tickCount>10?80:40;if(this.scrollVertically){let t=this.getVerticalPosition();this.tickUp&&this.setVerticalPosition(t-e),this.tickDown&&this.setVerticalPosition(t+e)}if(this.scrollHorizontally){let t=this.getHorizontalPosition();this.tickLeft&&this.setHorizontalPosition(t-e),this.tickRight&&this.setHorizontalPosition(t+e)}this.onScrollCallback&&this.onScrollCallback()}ensureCleared(){this.tickingInterval&&=(window.clearInterval(this.tickingInterval),null)}},TX=class{constructor(){this.reordered=!1,this.removals=[],this.updates=new Set,this.adds=new Set}},EX=e=>{let t=e.childrenAfterGroup;for(;t?.length;){let e=t[0];if(e.sourceRowIndex>=0)return e;t=e.childrenAfterGroup}},WSe=(e,t,n,r)=>{if(!t.size||!e)return!1;let i=!1,a=e.length??0,o=-1;n&&(o=n.sourceRowIndex,n=o<0?EX(n):null,n&&(o=n.sourceRowIndex)),o<0||o>=a?o=a:r||++o;let s=o,c=Math.min(o,a-1);for(let e of t){let t=e.sourceRowIndex;t<s&&(s=t),t>c&&(c=t)}let l=s;for(let n=s;n<o;++n){let r=e[n];t.has(r)||(r.sourceRowIndex!==l&&(r.sourceRowIndex=l,e[l]=r,i=!0),++l)}let u=c;for(let n=c;n>=o;--n){let r=e[n];t.has(r)||(r.sourceRowIndex!==u&&(r.sourceRowIndex=u,e[u]=r,i=!0),--u)}for(let n of t)n.sourceRowIndex!==l&&(n.sourceRowIndex=l,e[l]=n,i=!0),++l;return i};function GSe(e,t){return VY(e,t.target)?.getFocusedCellPosition()??null}function DX(e,t){let n=CK(e.gos,`normal`),r=t,i,a;r.clientX!=null||r.clientY!=null?(i=r.clientX,a=r.clientY):(i=r.x,a=r.y);let{pageFirstPixel:o}=e.pageBounds.getCurrentPagePixelRange();if(a+=o,n){let t=e.ctrlsSvc.getScrollFeature(),n=t.getVScrollPosition(),r=t.getHScrollPosition();i+=r.left,a+=n.top}return{x:i,y:a}}var KSe=.25,qSe=class extends Q{constructor(e){super(),this.eContainer=e,this.lastDraggingEvent=null,this.autoScroll=null,this.autoScrollChanged=!1,this.autoScrollChanging=!1,this.autoScrollOldV=null}postConstruct(){let e=this.beans;e.ctrlsSvc.whenReady(this,t=>{let n=()=>t.gridBodyCtrl.scrollFeature.getVScrollPosition().top,r=new USe({scrollContainer:t.gridBodyCtrl.eBodyViewport,scrollAxis:`y`,getVerticalPosition:n,setVerticalPosition:e=>t.gridBodyCtrl.scrollFeature.setVerticalScrollPosition(e),onScrollCallback:()=>{let t=n();if(this.autoScrollOldV!==t){this.autoScrollOldV=t,this.autoScrollChanging=!0;return}let r=this.autoScrollChanging;this.autoScrollChanged=r,this.autoScrollChanging=!1,r&&(e.dragAndDrop?.nudge(),this.autoScrollChanged=!1)}});this.autoScroll=r,this.clearAutoScroll()})}destroy(){super.destroy(),this.clearAutoScroll(),this.autoScroll=null,this.lastDraggingEvent=null,this.eContainer=null}getContainer(){return this.eContainer}isInterestedIn(e){return e===2}getIconName(e){return e?.dropTarget?.allowed===!1||this.beans.rowDragSvc.visibility!==`visible`?`notAllowed`:`move`}getRowNodes(e){if(!this.isFromThisGrid(e))return e.dragItem.rowNodes||[];let t=e.dragItem.rowNode;if(this.gos.get(`rowDragMultiRow`)){let e=this.beans.selectionSvc?.getSelectedNodes();if(e&&e.indexOf(t)>=0)return e.slice().sort(JSe)}return[t]}onDragEnter(e){this.dragging(e,!0)}onDragging(e){this.dragging(e,!1)}dragging(e,t){let{lastDraggingEvent:n,beans:r}=this;if(t){let t=this.getRowNodes(e);e.dragItem.rowNodes=t,kX(t,!0)}this.lastDraggingEvent=e;let i=e.fromNudge,a=this.makeRowsDrop(n,e,i,!1);r.rowDropHighlightSvc?.fromDrag(e),t&&this.dispatchGridEvent(`rowDragEnter`,e),this.dispatchGridEvent(`rowDragMove`,e);let o=this.autoScroll;a?.rowDragManaged&&a.moved&&a.allowed&&a.sameGrid&&!a.suppressMoveWhenRowDragging&&(!i&&!o?.scrolling||this.autoScrollChanged)&&this.dropRows(a),o?.check(e.event)}isFromThisGrid(e){return e.dragSource.dragSourceDomDataKey===this.gos.getDomDataKey()}makeRowsDrop(e,t,n,r){let{beans:i,gos:a}=this,o=this.newRowsDrop(t,r),s=i.rowModel;if(t.dropTarget=o,t.changed=!1,!o)return null;let{sameGrid:c,rootNode:l,source:u,target:d}=o;d??=s.getRow(s.getRowCount()-1)??null;let f=this.beans.groupEditSvc,p=!!f?.canSetParent(o),m=null;if(d?.footer){let e=PJ(s,-1,d)??PJ(s,1,d);p&&(m=d.sibling??l),d=e??null}d?.detail&&(d=d.parent),o.moved&&=u!==d;let h=.5;if(d&&(h=c&&o.moved&&(m||!p)?u.rowIndex>d.rowIndex?-.5:.5:(o.y-d.rowTop-d.rowHeight/2)/d.rowHeight||0),!p&&c&&d&&o.moved&&xK(a)){let e=YSe(s,o);e&&(h=u.rowIndex>e.rowIndex?-.5:.5,d=e,o.moved&&=u!==d)}return o.target=d,o.newParent=m,o.pointerPos=XSe(d,o.y),o.yDelta=h,f?.fixRowsDrop(o,p,n,h),this.validateRowsDrop(o,p,r),t.changed||=OX(e?.dropTarget,o),o}newRowsDrop(e,t){let{beans:n,gos:r}=this,i=n.rowModel.rootNode,a=xK(r)?r.get(`rowDragManaged`):!1,o=r.get(`suppressMoveWhenRowDragging`),s=this.isFromThisGrid(e),{rowNode:c,rowNodes:l}=e.dragItem;if(l||=c?[c]:[],c||=l[0],!c||!i)return null;let u=this.beans.dragAndDrop.isDropZoneWithinThisGrid(e),d=!0;a&&(!l.length||n.rowDragSvc.visibility!==`visible`||(o||!s)&&!u)&&(d=!1);let f=DX(n,e).y,p=this.getOverNode(f);return{api:n.gridApi,context:n.gridOptions.context,draggingEvent:e,rowDragManaged:a,suppressMoveWhenRowDragging:o,sameGrid:s,withinGrid:u,treeData:!1,rootNode:i,moved:c!==p,y:f,overNode:p,overIndex:p?.rowIndex??-1,pointerPos:`none`,position:`none`,source:c,target:p??null,newParent:null,rows:l,allowed:d,highlight:!t&&a&&o&&(u||!s),yDelta:0,inside:!1,droppedManaged:!1}}validateRowsDrop(e,t,n){let{source:r,target:i,yDelta:a,inside:o,moved:s,rowDragManaged:c,suppressMoveWhenRowDragging:l}=e;e.moved&&=r!==i;let{position:u,fallbackPosition:d}=this.computeDropPosition(s,o,a);e.position=u,t||(e.newParent=null),this.enforceSuppressMoveWhenRowDragging(e,l,`initial`);let f=(!c||e.allowed)&&this.gos.get(`isRowValidDropPosition`);f&&this.applyDropValidator(e,t,n,c,f),c&&(e.rows=this.filterRows(e)),this.beans.groupEditSvc?.clearNewSameParent(e,t),this.enforceSuppressMoveWhenRowDragging(e,l,`final`),e.position===`inside`&&(!e.allowed||!e.newParent)&&(e.position=d)}computeDropPosition(e,t,n){let r=n<0?`above`:`below`;return e?{position:t?`inside`:r,fallbackPosition:r}:{position:`none`,fallbackPosition:r}}enforceSuppressMoveWhenRowDragging(e,t,n){if(t){if(n===`initial`){e.moved||(e.allowed=!1);return}(!e.rows.length||e.position===`none`)&&(e.allowed=!1)}}applyDropValidator(e,t,n,r,i){this.beans.groupEditSvc?.clearNewSameParent(e,t);let a=i(e);if(!a){e.allowed=!1;return}if(typeof a!=`object`)return;a.rows!==void 0&&(e.rows=a.rows??[]),t&&a.newParent!==void 0&&(e.newParent=a.newParent),a.target!==void 0&&(e.target=a.target),a.position&&(e.position=a.position),a.allowed===void 0?r||(e.allowed=!0):e.allowed=a.allowed;let o=e.draggingEvent;a.changed&&o&&(o.changed=!0),!n&&a.highlight!==void 0&&(e.highlight=a.highlight)}addRowDropZone(e){if(!e.getContainer()){gK(55);return}let t=this.beans.dragAndDrop;if(t.findExternalZone(e.getContainer())){gK(56);return}let n={isInterestedIn:e=>e===2,getIconName:()=>`move`,external:!0,...e.fromGrid?e:{getContainer:e.getContainer,onDragEnter:e.onDragEnter&&(t=>e.onDragEnter(this.rowDragEvent(`rowDragEnter`,t))),onDragLeave:e.onDragLeave&&(t=>e.onDragLeave(this.rowDragEvent(`rowDragLeave`,t))),onDragging:e.onDragging&&(t=>e.onDragging(this.rowDragEvent(`rowDragMove`,t))),onDragStop:e.onDragStop&&(t=>e.onDragStop(this.rowDragEvent(`rowDragEnd`,t))),onDragCancel:e.onDragCancel&&(t=>e.onDragCancel(this.rowDragEvent(`rowDragCancel`,t)))}};t.addDropTarget(n),this.addDestroyFunc(()=>t.removeDropTarget(n))}getRowDropZone(e){return{getContainer:this.getContainer.bind(this),onDragEnter:t=>{this.onDragEnter(t),e?.onDragEnter?.(this.rowDragEvent(`rowDragEnter`,t))},onDragLeave:t=>{this.onDragLeave(t),e?.onDragLeave?.(this.rowDragEvent(`rowDragLeave`,t))},onDragging:t=>{this.onDragging(t),e?.onDragging?.(this.rowDragEvent(`rowDragMove`,t))},onDragStop:t=>{this.onDragStop(t),e?.onDragStop?.(this.rowDragEvent(`rowDragEnd`,t))},onDragCancel:t=>{this.onDragCancel(t),e?.onDragCancel?.(this.rowDragEvent(`rowDragCancel`,t))},fromGrid:!0}}getOverNode(e){let{pageBounds:t,rowModel:n}=this.beans,r=e>t.getCurrentPagePixelRange().pageLastPixel?-1:n.getRowIndexAtPixel(e);return r>=0?n.getRow(r):void 0}rowDragEvent(e,t){let n=this.beans,{dragItem:r,dropTarget:i,event:a,vDirection:o}=t,s=i?.rootNode===n.rowModel.rootNode,c=s?i.y:DX(n,t).y,l=s?i.overNode:this.getOverNode(c),u=s?i.overIndex:l?.rowIndex??-1;return{api:n.gridApi,context:n.gridOptions.context,type:e,event:a,node:r.rowNode,nodes:r.rowNodes,overIndex:u,overNode:l,y:c,vDirection:o,rowsDrop:i}}dispatchGridEvent(e,t){let n=this.rowDragEvent(e,t);this.eventSvc.dispatchEvent(n)}onDragLeave(e){this.dispatchGridEvent(`rowDragLeave`,e),this.stopDragging(e,!1)}onDragStop(e){let t=this.lastDraggingEvent?.dropTarget??null,n=this.makeRowsDrop(this.lastDraggingEvent,e,!1,!0);this.dispatchGridEvent(`rowDragEnd`,e),n?.allowed&&n.rowDragManaged&&(!t?.droppedManaged||OX(t,n))&&this.dropRows(n),this.stopDragging(e,!0)}onDragCancel(e){this.dispatchGridEvent(`rowDragCancel`,e),this.stopDragging(e,!0)}stopDragging(e,t){this.clearAutoScroll(),this.beans.groupEditSvc?.stopDragging(t),this.beans.rowDropHighlightSvc?.fromDrag(null),kX(e.dragItem.rowNodes,!1),this.lastDraggingEvent=null}clearAutoScroll(){this.autoScroll?.ensureCleared(),this.autoScrollChanged=!1,this.autoScrollChanging=!1,this.autoScrollOldV=null}dropRows(e){return e.droppedManaged=!0,e.sameGrid?this.csrmMoveRows(e):this.csrmAddRows(e)}csrmAddRows({position:e,target:t,rows:n}){let r=RK(this.gos),i=this.beans.rowModel,a=n.filter(({data:e,rowPinned:t})=>!i.getRowNode(r?.({data:e,level:0,rowPinned:t})??e.id)).map(({data:e})=>e);if(a.length===0)return!1;let o;if(t){let n=t.sourceRowIndex>=0?t:EX(t);n&&(o=n.sourceRowIndex+(e===`above`?0:1))}return i.updateRowData({add:a,addIndex:o}),!0}filterRows(e){let{groupEditSvc:t}=this.beans,{rows:n,sameGrid:r}=e,i;for(let a=0,o=n.length;a<o;++a){let o=!0,s=n[a];(!s||s.footer||r&&s.destroyed&&!s.group||!this.csrmGetLeaf(s))&&(o=!1),o&&t&&!t.canDropRow(s,e)&&(o=!1),o?i?.push(s):i??=n.slice(0,a)}return i??n}csrmMoveRows(e){let t=this.beans.groupEditSvc;return t?.isGroupingDrop(e)?t.dropGroupEdit(e):this.csrmMoveRowsReorder(e)}csrmMoveRowsReorder({position:e,target:t,rows:n,newParent:r,rootNode:i}){let a=!1,o=new Set;for(let e of n){r&&e.parent!==r&&(e.treeParent=r,a=!0);let t=this.csrmGetLeaf(e);t&&o.add(t)}if(!a&&o.size===0)return!1;let s=this.beans.focusSvc,c=s.getFocusedCell(),l=c&&tY(this.beans,c);if(o.size&&WSe(i._leafs,o,t,e===`above`)&&(a=!0),!a)return!1;let u=this.beans.rowModel,d=new TX;return d.reordered=!0,u.refreshModel({step:`group`,keepRenderedRows:!0,animate:!this.gos.get(`suppressAnimationFrame`),changedRowNodes:d}),l?l.focusCell():s.clearFocusedCell(),!0}csrmGetLeaf(e){if(e.sourceRowIndex>=0)return e.destroyed?void 0:e;let t=this.beans.groupEditSvc;return t?t.csrmFirstLeaf(e):EX(e)}},OX=(e,t)=>e!==t&&(!e||e.sameGrid!==t.sameGrid||e.allowed!==t.allowed||e.position!==t.position||e.target!==t.target||e.source!==t.source||e.newParent!==t.newParent||!ZU(e.rows,t.rows)),JSe=({rowIndex:e},{rowIndex:t})=>e!==null&&t!==null?e-t:0,kX=(e,t)=>{for(let n=0,r=e?.length||0;n<r;++n){let r=e[n];r.dragging!==t&&(r.dragging=t,r.dispatchRowEvent(`draggingChanged`))}},YSe=(e,t)=>{let n=null,r=t.target;if(r&&t.rows.indexOf(r)<0)return null;let i=t.source;if(!r||!i)return null;let a=r.rowIndex-i.rowIndex,o=a<0?-1:1;a=t.suppressMoveWhenRowDragging?Math.abs(a):1;let s=new Set(t.rows);do{let t=PJ(e,o,r);if(!t)break;s.has(t)||(n=t,--a),r=t}while(a>0);return n},XSe=(e,t)=>{let n=e?.rowTop,r=e?.rowHeight??0;if(n==null||!r||r<=0)return`none`;let i=t-n,a=r*KSe;return i<=a?`above`:i>=r-a?`below`:`inside`},ZSe=class extends Q{constructor(){super(...arguments),this.beanName=`rowDragSvc`,this.rowDragFeature=null,this.visibility=`suppress`}setupRowDrag(e,t){let n=t.createManagedBean(new qSe(e)),r=this.beans.dragAndDrop;r.addDropTarget(n),t.addDestroyFunc(()=>r.removeDropTarget(n)),this.rowDragFeature=n;let i=()=>this.refreshVisibility();this.addManagedPropertyListeners([`rowDragManaged`,`suppressRowDrag`,`refreshAfterGroupEdit`],i),this.addManagedEventListeners({newColumnsLoaded:i,columnRowGroupChanged:i,columnPivotModeChanged:i,sortChanged:i,filterChanged:i}),this.visibility=this.computeVisibility()}createRowDragComp(e,t,n,r,i,a){return new HSe(e,t,n,r,i,a)}createRowDragCompForRow(e,t){if(UK(this.gos))return;let n=this.getLocaleTextFunc();return this.createRowDragComp(()=>`1 ${n(`rowDragRow`,`row`)}`,e,void 0,t,void 0,!0)}createRowDragCompForCell(e,t,n,r,i,a){let o=this.gos;if(!o.get(`rowDragManaged`)||xK(o)&&!o.get(`pagination`))return this.createRowDragComp(n,e,t,r,i,a)}cancelRowDrag(){this.rowDragFeature?.lastDraggingEvent&&this.beans.dragSvc?.cancelDrag()}computeVisibility(){let e=this.beans,t=e.gos;if(t.get(`suppressRowDrag`))return`suppress`;if(!t.get(`rowDragManaged`))return`visible`;let n=e.colModel.isPivotMode();return(n||e.rowGroupColsSvc?.columns?.length)&&!t.get(`refreshAfterGroupEdit`)?`hidden`:n||e.filterManager?.isAnyFilterPresent()||e.sortSvc?.isSortActive()?`disabled`:`visible`}refreshVisibility(){let e=this.visibility,t=this.computeVisibility();e!==t&&(this.visibility=t,this.eventSvc?.dispatchEvent({type:`rowDragVisibilityChanged`}))}},QSe=class extends Q{constructor(){super(...arguments),this.beanName=`rowDropHighlightSvc`,this.uiLevel=0,this.dragging=!1,this.row=null,this.position=`none`}postConstruct(){this.addManagedEventListeners({modelUpdated:this.onModelUpdated.bind(this)})}onModelUpdated(){let e=this.row,t=this.dragging;!e||e?.rowIndex===null||this.position===`none`?this.clear():this.set(e,this.position),this.dragging=t}destroy(){this.clear(),super.destroy()}clear(){let e=this.row;this.dragging=!1,e&&(this.uiLevel=0,this.position=`none`,this.row=null,e.dispatchRowEvent(`rowHighlightChanged`))}set(e,t){let n=e!==this.row,r=e.uiLevel,i=t!==this.position,a=r!==this.uiLevel;this.dragging=!1,(n||i||a)&&(n&&this.clear(),this.uiLevel=r,this.position=t,this.row=e,e.dispatchRowEvent(`rowHighlightChanged`))}fromDrag(e){let t=e?.dropTarget;if(t){let{highlight:e,target:n,position:r}=t;if(e&&n&&r!==`none`){this.set(n,r),this.dragging=!0;return}}this.dragging&&this.clear()}},AX={moduleName:`Drag`,version:aK,beans:[zSe]},$Se={moduleName:`DragAndDrop`,version:aK,dynamicBeans:{dndSourceComp:ESe},icons:{rowDrag:`grip`}},jX={moduleName:`SharedDragAndDrop`,version:aK,beans:[Mbe],dependsOn:[AX],userComponents:{agDragAndDropImage:kSe},icons:{columnMovePin:`pin`,columnMoveHide:`eye-slash`,columnMoveMove:`arrows`,columnMoveLeft:`left`,columnMoveRight:`right`,columnMoveGroup:`group`,columnMoveValue:`aggregation`,columnMovePivot:`pivot`,dropNotAllowed:`not-allowed`,rowDrag:`grip`}},eCe={moduleName:`RowDrag`,version:aK,beans:[QSe,ZSe],apiFunctions:{addRowDropZone:ASe,removeRowDropZone:jSe,getRowDropZoneParams:MSe,getRowDropPositionIndicator:NSe,setRowDropPositionIndicator:PSe},dependsOn:[jX]},tCe={moduleName:`HorizontalResize`,version:aK,beans:[BSe],dependsOn:[AX]},nCe=`:where(.ag-ltr) :where(.ag-column-moving){.ag-cell,.ag-header-cell,.ag-spanned-cell-wrapper{transition:left .2s}.ag-header-group-cell{transition:left .2s,width .2s}}:where(.ag-rtl) :where(.ag-column-moving){.ag-cell,.ag-header-cell,.ag-spanned-cell-wrapper{transition:right .2s}.ag-header-group-cell{transition:right .2s,width .2s}}`,rCe=class extends Q{constructor(){super(...arguments),this.beanName=`colAnimation`,this.executeNextFuncs=[],this.executeLaterFuncs=[],this.active=!1,this.activeNext=!1,this.suppressAnimation=!1,this.animationThreadCount=0}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>this.gridBodyCtrl=e.gridBodyCtrl)}isActive(){return this.active&&!this.suppressAnimation}setSuppressAnimation(e){this.suppressAnimation=e}start(){if(this.active)return;let{gos:e}=this;e.get(`suppressColumnMoveAnimation`)||e.get(`enableRtl`)||(this.ensureAnimationCssClassPresent(),this.active=!0,this.activeNext=!0)}finish(){this.active&&this.flush(()=>this.activeNext=!1,()=>this.active=!1)}executeNextVMTurn(e){this.activeNext?this.executeNextFuncs.push(e):e()}executeLaterVMTurn(e){this.active?this.executeLaterFuncs.push(e):e()}ensureAnimationCssClassPresent(){this.animationThreadCount++;let e=this.animationThreadCount,{gridBodyCtrl:t}=this;t.setColumnMovingCss(!0),this.executeLaterFuncs.push(()=>{this.animationThreadCount===e&&t.setColumnMovingCss(!1)})}flush(e,t){let{executeNextFuncs:n,executeLaterFuncs:r}=this;if(n.length===0&&r.length===0){e(),t();return}let i=e=>{for(;e.length;){let t=e.pop();t&&t()}};this.beans.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e(),i(n)},0),window.setTimeout(()=>{t(),i(r)},200)})}};function iCe(e,t,n){e.colMoves?.moveColumnByIndex(t,n,`api`)}function aCe(e,t,n){e.colMoves?.moveColumns(t,n,`api`)}var oCe=class extends Q{constructor(e){super(),this.pinned=e,this.columnsToAggregate=[],this.columnsToGroup=[],this.columnsToPivot=[]}onDragEnter(e){if(this.clearColumnsList(),this.gos.get(`functionsReadOnly`))return;let t=e.dragItem.columns;if(t)for(let e of t)e.isPrimary()&&(e.isAnyFunctionActive()||(e.isAllowValue()?this.columnsToAggregate.push(e):e.isAllowRowGroup()?this.columnsToGroup.push(e):e.isAllowPivot()&&this.columnsToPivot.push(e)))}getIconName(){return this.columnsToAggregate.length+this.columnsToGroup.length+this.columnsToPivot.length>0?this.pinned?`pinned`:`move`:null}onDragLeave(e){this.clearColumnsList()}clearColumnsList(){this.columnsToAggregate.length=0,this.columnsToGroup.length=0,this.columnsToPivot.length=0}onDragging(e){}onDragStop(e){let{valueColsSvc:t,rowGroupColsSvc:n,pivotColsSvc:r}=this.beans;this.columnsToAggregate.length>0&&t?.addColumns(this.columnsToAggregate,`toolPanelDragAndDrop`),this.columnsToGroup.length>0&&n?.addColumns(this.columnsToGroup,`toolPanelDragAndDrop`),this.columnsToPivot.length>0&&r?.addColumns(this.columnsToPivot,`toolPanelDragAndDrop`)}onDragCancel(){this.clearColumnsList()}};function sCe(e,t){!t||t.length<=1||t.filter(t=>e.indexOf(t)<0).length>0||t.sort((t,n)=>e.indexOf(t)-e.indexOf(n))}function cCe(e){let t=[...e];for(let n of e){let e=null,r=n.getParent();for(;r!=null&&r.getDisplayedLeafColumns().length===1;)e=r,r=r.getParent();if(e!=null){let n=e.getColGroupDef()?.marryChildren?e.getProvidedColumnGroup().getLeafColumns():e.getLeafColumns();for(let e of n)t.includes(e)||t.push(e)}}return t}function lCe(e,t,n,r){let i=r.allCols,a=null,o=null;for(let r=0;r<e.length;r++){let s=e[r],c=n.getProposedColumnOrder(t,s);if(!n.doesOrderPassRules(c))continue;let l=c.filter(e=>i.includes(e));if(o===null)o=l;else if(!ZU(l,o))break;let u=dCe(c);(a===null||u<a.fragCount)&&(a={move:s,fragCount:u})}return a}function MX(e){let{isFromHeader:t,fromLeft:n,xPosition:r,fromEnter:i,fakeEvent:a,pinned:o,gos:s,colModel:c,colMoves:l,visibleCols:u}=e,{allMovingColumns:d}=e;t&&(d=cCe(d));let f=d.slice();sCe(c.getCols(),f);let p=pCe({movingCols:f,draggingRight:n,xPosition:r,pinned:o,gos:s,colModel:c,visibleCols:u}),m=uCe(f,c);if(p.length===0)return;let h=p[0];if(m!==null&&(t||!i)&&!a&&(!n&&h>=m||n&&h<=m))return;let g=lCe(p,f,l,u);if(!g)return;let _=g.move;if(!(_>c.getCols().length-f.length))return{columns:f,toIndex:_}}function NX(e){let{columns:t,toIndex:n}=MX(e)||{},{finished:r,colMoves:i}=e;return!t||n==null?null:(i.moveColumns(t,n,`uiColumnMoved`,r),r?null:{columns:t,toIndex:n})}function uCe(e,t){let n=t.getCols(),r=e.map(e=>n.indexOf(e)).sort((e,t)=>e-t),i=r[0];return XU(r)-i===r.length-1?i:null}function dCe(e){function t(e){let t=[],n=e.getOriginalParent();for(;n!=null;)t.push(n),n=n.getOriginalParent();return t}let n=0;for(let r=0;r<e.length-1;r++){let i=t(e[r]),a=t(e[r+1]);[i,a]=i.length>a.length?[i,a]:[a,i];for(let e of i)a.indexOf(e)===-1&&n++}return n}function fCe(e,t){switch(t){case`left`:return e.leftCols;case`right`:return e.rightCols;default:return e.centerCols}}function pCe(e){let{movingCols:t,draggingRight:n,xPosition:r,pinned:i,gos:a,colModel:o,visibleCols:s}=e;if(a.get(`suppressMovableColumns`)||t.some(e=>e.getColDef().suppressMovable))return[];let c=fCe(s,i),l=o.getCols(),u=c.filter(e=>t.includes(e)),d=c.filter(e=>!t.includes(e)),f=l.filter(e=>!t.includes(e)),p=0,m=r;if(n){let e=0;for(let t of u)e+=t.getActualWidth();m-=e}if(m>0){for(let e=0;e<d.length;e++){let t=d[e];if(m-=t.getActualWidth(),m<0)break;p++}n&&p++}let h;if(p>0){let e=d[p-1];h=f.indexOf(e)+1}else h=f.indexOf(d[0]),h===-1&&(h=0);let g=[h],_=(e,t)=>e-t;if(n){let e=h+1,t=l.length-1;for(;e<=t;)g.push(e),e++;g.sort(_)}else{let e=h,t=l.length-1,n=l[e];for(;e<=t&&c.indexOf(n)<0;)e++,g.push(e),n=l[e];for(e=h-1;e>=0;)g.push(e),e--;g.sort(_).reverse()}return g}function PX(e){let{pinned:t,fromKeyboard:n,gos:r,ctrlsSvc:i,useHeaderRow:a,skipScrollPadding:o}=e,s=i.getHeaderRowContainerCtrl(t)?.eViewport,{x:c}=e;return s?(n&&(c-=s.getBoundingClientRect().left),r.get(`enableRtl`)&&(a&&(s=s.querySelector(`.ag-header-row`)),c=s.clientWidth-c),t==null&&!o&&(c+=i.get(`center`).getCenterViewportScrollLeft()),c):0}function FX(e,t){for(let n of e)n.moving=t,n.dispatchColEvent(`movingChanged`,`uiColumnMoved`)}var IX=7,LX=100,RX=LX/2,mCe=5,hCe=100,gCe=class extends Q{constructor(e){super(),this.pinned=e,this.needToMoveLeft=!1,this.needToMoveRight=!1,this.lastMovedInfo=null,this.isCenterContainer=!nW(e)}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCon=e.gridBodyCtrl})}getIconName(){let{pinned:e,lastDraggingEvent:t}=this,{dragItem:n}=t||{},r=n?.columns??[];for(let t of r){let r=t.getPinned();if(t.getColDef().lockPinned){if(r==e)return`move`;continue}let i=n?.containerType;if(i===e||!e)return`move`;if(e&&(!r||i!==e))return`pinned`}return`notAllowed`}onDragEnter(e){let t=e.dragItem,n=t.columns;if(e.dragSource.type===0)this.setColumnsVisible(n,!0,`uiColumnDragged`);else{let e=t.visibleState,r=(n||[]).filter(t=>e[t.getId()]&&!t.isVisible());this.setColumnsVisible(r,!0,`uiColumnDragged`)}this.gos.get(`suppressMoveWhenColumnDragging`)||this.attemptToPinColumns(n,this.pinned),this.onDragging(e,!0,!0)}onDragging(e=this.lastDraggingEvent,t=!1,n=!1,r=!1){let{gos:i,ctrlsSvc:a}=this.beans,o=i.get(`suppressMoveWhenColumnDragging`);if(r&&!o){this.finishColumnMoving();return}if(this.lastDraggingEvent=e,!e||!r&&rW(e.hDirection))return;let s=PX({x:e.x,pinned:this.pinned,gos:i,ctrlsSvc:a});t||this.checkCenterForScrolling(s),o?this.handleColumnDragWhileSuppressingMovement(e,t,n,s,r):this.handleColumnDragWhileAllowingMovement(e,t,n,s,r)}onDragLeave(){this.ensureIntervalCleared(),this.clearHighlighted(),this.updateDragItemContainerType(),this.lastMovedInfo=null}onDragStop(){this.onDragging(this.lastDraggingEvent,!1,!0,!0),this.ensureIntervalCleared(),this.lastMovedInfo=null}onDragCancel(){this.clearHighlighted(),this.ensureIntervalCleared(),this.lastMovedInfo=null}setColumnsVisible(e,t,n){if(!e?.length)return;let r=e.filter(e=>!e.getColDef().lockVisible);r.length&&this.beans.colModel.setColsVisible(r,t,n)}finishColumnMoving(){this.clearHighlighted();let e=this.lastMovedInfo;if(!e)return;let{columns:t,toIndex:n}=e;this.beans.colMoves.moveColumns(t,n,`uiColumnMoved`,!0)}updateDragItemContainerType(){let{lastDraggingEvent:e}=this;if(this.gos.get(`suppressMoveWhenColumnDragging`)||!e)return;let t=e.dragItem;t&&(t.containerType=this.pinned)}handleColumnDragWhileSuppressingMovement(e,t,n,r,i){let a=this.getAllMovingColumns(e,!0);if(i){let e=this.isAttemptingToPin(a);e&&this.attemptToPinColumns(a,void 0,!0);let{fromLeft:r,xPosition:i}=this.getNormalisedXPositionInfo(a,e)||{};if(r==null||i==null){this.finishColumnMoving();return}this.moveColumnsAfterHighlight({allMovingColumns:a,xPosition:i,fromEnter:t,fakeEvent:n,fromLeft:r})}else{if(!this.beans.dragAndDrop.isDropZoneWithinThisGrid(e))return;this.highlightHoveredColumn(a,r)}}handleColumnDragWhileAllowingMovement(e,t,n,r,i){let a=this.getAllMovingColumns(e),o=this.normaliseDirection(e.hDirection)===`right`,s=e.dragSource.type===1,c=NX({...this.getMoveColumnParams({allMovingColumns:a,isFromHeader:s,xPosition:r,fromLeft:o,fromEnter:t,fakeEvent:n}),finished:i});c&&(this.lastMovedInfo=c)}getAllMovingColumns(e,t=!1){let n=e.dragSource.getDragItem(),r=null;return t?(r=n.columnsInSplit,r||=n.columns):r=n.columns,r?r.filter(e=>!e.getColDef().lockPinned||e.getPinned()==this.pinned):[]}getMoveColumnParams(e){let{allMovingColumns:t,isFromHeader:n,xPosition:r,fromLeft:i,fromEnter:a,fakeEvent:o}=e,{gos:s,colModel:c,colMoves:l,visibleCols:u}=this.beans;return{allMovingColumns:t,isFromHeader:n,fromLeft:i,xPosition:r,pinned:this.pinned,fromEnter:a,fakeEvent:o,gos:s,colModel:c,colMoves:l,visibleCols:u}}highlightHoveredColumn(e,t){let{gos:n,colModel:r}=this.beans,i=n.get(`enableRtl`),a=r.getCols().filter(e=>e.isVisible()&&e.getPinned()===this.pinned),o=null,s=null,c=null;for(let e of a){if(s=e.getActualWidth(),o=this.getNormalisedColumnLeft(e,0,i),o!=null){let n=o+s;if(o<=t&&n>=t){c=e;break}}o=null,s=null}if(c)e.indexOf(c)!==-1&&(c=null);else{for(let e=a.length-1;e>=0;e--){let t=a[e],n=a[e].getParent();if(!n){c=t;break}let r=n?.getDisplayedLeafColumns();if(r.length){c=XU(r);break}}if(!c)return;o=this.getNormalisedColumnLeft(c,0,i),s=c.getActualWidth()}if(c==null||o==null||s==null){this.lastHighlightedColumn?.column!==c&&this.clearHighlighted();return}let l;if(t-o<s/2){let e=a.indexOf(c);e===0?l=0:(l=1,c=a[e-1])}else l=1;(this.lastHighlightedColumn?.column!==c||this.lastHighlightedColumn?.position!==l)&&this.clearHighlighted(),zX(c,l),this.lastHighlightedColumn={column:c,position:l}}getNormalisedXPositionInfo(e,t){let{gos:n,visibleCols:r}=this.beans,i=n.get(`enableRtl`),{firstMovingCol:a,column:o,position:s}=this.getColumnMoveAndTargetInfo(e,t,i);if(!a||!o||s==null)return;let c=r.allCols,l=c.indexOf(a),u=c.indexOf(o),d=s===0,f=l<u||l===u&&!d,p=0;if(d?f&&--p:f||(p+=1),u+p===l)return;let m=c[u+p];if(m)return{fromLeft:f,xPosition:this.getNormalisedColumnLeft(m,20,i)}}getColumnMoveAndTargetInfo(e,t,n){let r=this.lastHighlightedColumn||{},{firstMovingCol:i,lastMovingCol:a}=_Ce(e);if(!i||!a||r.column||!t)return{firstMovingCol:i,...r};let o=this.getPinDirection()===`left`;return{firstMovingCol:i,position:+!!o,column:o===n?a:i}}normaliseDirection(e){if(this.gos.get(`enableRtl`))switch(e){case`left`:return`right`;case`right`:return`left`}return e}getNormalisedColumnLeft(e,t,n){let{gos:r,ctrlsSvc:i}=this.beans,a=e.getLeft();if(a==null)return null;let o=e.getActualWidth();return PX({x:n?a+o-t:a+t,pinned:e.getPinned(),useHeaderRow:n,skipScrollPadding:!0,gos:r,ctrlsSvc:i})}isAttemptingToPin(e){let t=this.needToMoveLeft||this.needToMoveRight,n=this.failedMoveAttempts>IX;return t&&n||e.some(e=>e.getPinned()!==this.pinned)}moveColumnsAfterHighlight(e){let{allMovingColumns:t,xPosition:n,fromEnter:r,fakeEvent:i,fromLeft:a}=e,{columns:o,toIndex:s}=MX(this.getMoveColumnParams({allMovingColumns:t,isFromHeader:!0,xPosition:n,fromLeft:a,fromEnter:r,fakeEvent:i}))||{};o&&s!=null&&(this.lastMovedInfo={columns:o,toIndex:s}),this.finishColumnMoving()}clearHighlighted(){let{lastHighlightedColumn:e}=this;e&&(zX(e.column,null),this.lastHighlightedColumn=null)}checkCenterForScrolling(e){if(!this.isCenterContainer)return;let t=this.beans.ctrlsSvc.get(`center`),n=t.getCenterViewportScrollLeft(),r=n+t.getCenterWidth(),i,a;this.gos.get(`enableRtl`)?(i=e<n+RX,a=e>r-RX):(a=e<n+RX,i=e>r-RX),this.needToMoveRight=i,this.needToMoveLeft=a,a||i?this.ensureIntervalStarted():this.ensureIntervalCleared()}ensureIntervalStarted(){this.movingIntervalId||(this.intervalCount=0,this.failedMoveAttempts=0,this.movingIntervalId=window.setInterval(this.moveInterval.bind(this),hCe),this.beans.dragAndDrop.setDragImageCompIcon(this.needToMoveLeft?`left`:`right`,!0))}ensureIntervalCleared(){this.movingIntervalId&&(window.clearInterval(this.movingIntervalId),this.movingIntervalId=null,this.failedMoveAttempts=0,this.beans.dragAndDrop.setDragImageCompIcon(this.getIconName()))}moveInterval(){let e;this.intervalCount++,e=10+this.intervalCount*mCe,e>LX&&(e=LX);let t=null,n=this.gridBodyCon.scrollFeature;if(this.needToMoveLeft?t=n.scrollHorizontally(-e):this.needToMoveRight&&(t=n.scrollHorizontally(e)),t!==0)this.onDragging(this.lastDraggingEvent),this.failedMoveAttempts=0;else{this.failedMoveAttempts++;let{pinnedCols:e,dragAndDrop:t,gos:n}=this.beans;if(this.failedMoveAttempts<=IX+1||!e)return;if(t.setDragImageCompIcon(`pinned`),!n.get(`suppressMoveWhenColumnDragging`)){let e=this.lastDraggingEvent?.dragItem.columns;this.attemptToPinColumns(e,void 0,!0)}}}getPinDirection(){if(this.needToMoveLeft||this.pinned===`left`)return`left`;if(this.needToMoveRight||this.pinned===`right`)return`right`}attemptToPinColumns(e,t,n=!1){let r=(e||[]).filter(e=>!e.getColDef().lockPinned);if(!r.length)return 0;n&&(t=this.getPinDirection());let{pinnedCols:i,dragAndDrop:a}=this.beans;return i?.setColsPinned(r,t,`uiColumnDragged`),n&&a.nudge(),r.length}destroy(){super.destroy(),this.lastDraggingEvent=null,this.clearHighlighted(),this.lastMovedInfo=null}};function zX(e,t){e.highlighted!==t&&(e.highlighted=t,e.dispatchColEvent(`headerHighlightChanged`,`uiColumnMoved`))}function _Ce(e){let t=e.length,n,r;for(let i=0;i<t;i++){if(!n){let t=e[i];t.getLeft()!=null&&(n=t)}if(!r){let n=e[t-1-i];n.getLeft()!=null&&(r=n)}if(n&&r)break}return{firstMovingCol:n,lastMovingCol:r}}var vCe=class extends Q{constructor(e,t){super(),this.pinned=e,this.eContainer=t}postConstruct(){let{ctrlsSvc:e,dragAndDrop:t}=this.beans,n=this.pinned;e.whenReady(this,e=>{let t,r=e.gridBodyCtrl.eBodyViewport;switch(n){case`left`:t=[[r,e.left.eContainer],[e.bottomLeft.eContainer],[e.topLeft.eContainer]];break;case`right`:t=[[r,e.right.eContainer],[e.bottomRight.eContainer],[e.topRight.eContainer]];break;default:t=[[r,e.center.eViewport],[e.bottomCenter.eViewport],[e.topCenter.eViewport]]}this.eSecondaryContainers=t}),this.moveColumnFeature=this.createManagedBean(new gCe(n)),this.bodyDropPivotTarget=this.createManagedBean(new oCe(n)),t.addDropTarget(this),this.addDestroyFunc(()=>t.removeDropTarget(this))}isInterestedIn(e){return e===1||e===0&&this.gos.get(`allowDragFromColumnsToolPanel`)}getSecondaryContainers(){return this.eSecondaryContainers}getContainer(){return this.eContainer}getIconName(){return this.currentDropListener.getIconName()}isDropColumnInPivotMode(e){return this.beans.colModel.isPivotMode()&&e.dragSource.type===0}onDragEnter(e){this.currentDropListener=this.isDropColumnInPivotMode(e)?this.bodyDropPivotTarget:this.moveColumnFeature,this.currentDropListener.onDragEnter(e)}onDragLeave(e){this.currentDropListener.onDragLeave(e)}onDragging(e){this.currentDropListener.onDragging(e)}onDragStop(e){this.currentDropListener.onDragStop(e)}onDragCancel(){this.currentDropListener.onDragCancel()}};function BX(e,t){let n=[],r=[],i=[];return e.forEach(e=>{let t=e.getColDef().lockPosition;t===`right`?i.push(e):t===`left`||t===!0?n.push(e):r.push(e)}),t.get(`enableRtl`)?[...i,...r,...n]:[...n,...r,...i]}function VX(e,t){let n=!0;return vq(null,t,t=>{if(!fq(t))return;let r=t;if(!r.getColGroupDef()?.marryChildren)return;let i=[];for(let t of r.getLeafColumns()){let n=e.indexOf(t);i.push(n)}Math.max.apply(Math,i)-Math.min.apply(Math,i)>r.getLeafColumns().length-1&&(n=!1)}),n}var yCe=class extends Q{constructor(){super(...arguments),this.beanName=`colMoves`}moveColumnByIndex(e,t,n){let r=this.beans.colModel.getCols();if(!r)return;let i=r[e];this.moveColumns([i],t,n)}moveColumns(e,t,n,r=!0){let{colModel:i,colAnimation:a,visibleCols:o,eventSvc:s}=this.beans,c=i.getCols();if(!c)return;if(t>c.length-e.length){gK(30,{toIndex:t});return}a?.start();let l=i.getColsForKeys(e);this.doesMovePassRules(l,t)&&(eW(i.getCols(),l,t),o.refresh(n),s.dispatchEvent({type:`columnMoved`,columns:l,column:l.length===1?l[0]:null,toIndex:t,finished:r,source:n})),a?.finish()}doesMovePassRules(e,t){let n=this.getProposedColumnOrder(e,t);return this.doesOrderPassRules(n)}doesOrderPassRules(e){let{colModel:t,gos:n}=this.beans;return!(!VX(e,t.getColTree())||!(e=>{let t=e=>e?e===`left`||e===!0?-1:1:0,r=n.get(`enableRtl`),i=r?1:-1,a=!0;for(let n of e){let e=t(n.getColDef().lockPosition);r?e>i&&(a=!1):e<i&&(a=!1),i=e}return a})(e))}getProposedColumnOrder(e,t){let n=this.beans.colModel.getCols().slice();return eW(n,e,t),n}createBodyDropTarget(e,t){return new vCe(e,t)}moveHeader(e,t,n,r,i){let{ctrlsSvc:a,gos:o,colModel:s,visibleCols:c,focusSvc:l}=this.beans,u=t.getBoundingClientRect(),d=u.left,f=Aq(n),p=f?u.width:n.getActualWidth(),m=e===`left`!==o.get(`enableRtl`),h=PX({x:m?d-20:d+p+20,pinned:r,fromKeyboard:!0,gos:o,ctrlsSvc:a}),g=l.focusedHeader;NX({allMovingColumns:f?n.getLeafColumns():[n],isFromHeader:!0,fromLeft:e===`right`,xPosition:h,pinned:r,fromEnter:!1,fakeEvent:!1,gos:o,colModel:s,colMoves:this,visibleCols:c,finished:!0});let _;if(f){let e=n.getDisplayedLeafColumns();_=m?e[0]:XU(e)}else _=n;if(a.getScrollFeature().ensureColumnVisible(_,`auto`),(!i.isAlive()||o.get(`ensureDomOrder`))&&g){let e;if(f){let t=n.getGroupId(),r=n.getLeafColumns();if(!r.length)return;let i=r[0].getParent();if(!i)return;e=bCe(i,t)}else e=n;e&&l.focusHeaderPosition({headerPosition:{...g,column:e}})}}setDragSourceForHeader(e,t,n){let{gos:r,colModel:i,dragAndDrop:a,visibleCols:o}=this.beans,s=!r.get(`suppressDragLeaveHidesColumns`),c=Aq(t),l=c?t.getProvidedColumnGroup().getLeafColumns():[t],u={type:1,eElement:e,getDefaultIconName:()=>s?`hide`:`notAllowed`,getDragItem:c?()=>SCe(t,o.allCols):()=>xCe(t),dragItemName:n,onDragStarted:()=>{s=!r.get(`suppressDragLeaveHidesColumns`),FX(l,!0)},onDragStopped:()=>FX(l,!1),onDragCancelled:()=>FX(l,!1),onGridEnter:e=>{if(s){let{columns:t=[],visibleState:n}=e??{},r=c?e=>!n||n[e.getColId()]:()=>!0,a=t.filter(e=>!e.getColDef().lockVisible&&r(e));i.setColsVisible(a,!0,`uiColumnMoved`)}},onGridExit:e=>{if(s){let t=e?.columns?.filter(e=>!e.getColDef().lockVisible)||[];i.setColsVisible(t,!1,`uiColumnMoved`)}}};return a.addDragSource(u,!0),u}};function bCe(e,t){for(;e;){if(e.getGroupId()===t)return e;e=e.getParent()}}function xCe(e){let t={};return t[e.getId()]=e.isVisible(),{columns:[e],visibleState:t,containerType:e.pinned}}function SCe(e,t){let n=e.getProvidedColumnGroup().getLeafColumns(),r={};for(let e of n)r[e.getId()]=e.isVisible();let i=[];for(let e of t)n.indexOf(e)>=0&&(i.push(e),$U(n,e));for(let e of n)i.push(e);let a=[],o=e.getLeafColumns();for(let e of i)o.indexOf(e)!==-1&&a.push(e);return{columns:i,columnsInSplit:a,visibleState:r,containerType:a[0]?.pinned}}var CCe={moduleName:`ColumnMove`,version:aK,beans:[yCe,rCe],apiFunctions:{moveColumnByIndex:iCe,moveColumns:aCe},dependsOn:[jX],css:[nCe]},HX={moduleName:`AutoWidth`,version:aK,beans:[class extends Q{constructor(){super(...arguments),this.beanName=`autoWidthCalc`}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.centerRowContainerCtrl=e.center})}getPreferredWidthForColumn(e,t){let n=this.getHeaderCellForColumn(e);if(!n)return-1;let r=this.beans.rowRenderer.getAllCellsNotSpanningForColumn(e);return t||r.push(n),this.getPreferredWidthForElements(r)}getPreferredWidthForColumnGroup(e){let t=this.getHeaderCellForColumn(e);return t?this.getPreferredWidthForElements([t]):-1}getPreferredWidthForElements(e,t){let n=document.createElement(`form`);n.style.position=`fixed`;let r=this.centerRowContainerCtrl.eContainer;for(let t of e)this.cloneItemIntoDummy(t,n);r.appendChild(n);let i=Math.ceil(n.getBoundingClientRect().width);return n.remove(),t??=this.gos.get(`autoSizePadding`),i+t}getHeaderCellForColumn(e){let t=null;for(let n of this.beans.ctrlsSvc.getHeaderRowContainerCtrls()){let r=n.getHtmlElementForColumnHeader(e);r!=null&&(t=r)}return t}cloneItemIntoDummy(e,t){let n=e.cloneNode(!0);n.style.width=``,n.style.position=`static`,n.style.left=``;let r=document.createElement(`div`),i=r.classList;[`ag-header-cell`,`ag-header-group-cell`].some(e=>n.classList.contains(e))?(i.add(`ag-header`,`ag-header-row`),r.style.position=`static`):i.add(`ag-row`);let a=e.parentElement;for(;a;){if([`ag-header-row`,`ag-row`].some(e=>a.classList.contains(e))){for(let e=0;e<a.classList.length;e++){let t=a.classList[e];t!=`ag-row-position-absolute`&&i.add(t)}break}a=a.parentElement}r.appendChild(n),t.appendChild(r)}}]};function wCe(e,t,n=!0,r=`api`){e.colResize?.setColumnWidths(t,!1,n,r)}function UX(e,t){if(!e||e.length==0)return;let n=t(e[0]);for(let r=1;r<e.length;r++)if(n!==t(e[r]))return;return n}function WX(e,t,n){if(!t.length)return;let r=t.length===1?t[0]:null,i=UX(t,e=>e.getPinned());e.dispatchEvent({type:`columnPinned`,pinned:i??null,columns:t,column:r,source:n})}function TCe(e,t,n){if(!t.length)return;let r=t.length===1?t[0]:null,i=UX(t,e=>e.isVisible());e.dispatchEvent({type:`columnVisible`,visible:i,columns:t,column:r,source:n})}function ECe(e,t,n,r){e.dispatchEvent({type:t,columns:n,column:n&&n.length==1?n[0]:null,source:r})}function GX(e,t,n,r,i=null){t?.length&&e.dispatchEvent({type:`columnResized`,columns:t,column:t.length===1?t[0]:null,flexColumns:i,finished:n,source:r})}var DCe=class extends Q{constructor(e,t,n,r){super(),this.comp=e,this.eResize=t,this.pinned=n,this.columnGroup=r}postConstruct(){if(!this.columnGroup.isResizable()){this.comp.setResizableDisplayed(!1);return}let{horizontalResizeSvc:e,gos:t,colAutosize:n}=this.beans,r=e.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});this.addDestroyFunc(r),!t.get(`suppressAutoSize`)&&n&&this.addDestroyFunc(n.addColumnGroupResize(this.eResize,this.columnGroup,()=>this.resizeLeafColumnsToFit(`uiColumnResized`)))}onResizeStart(e){let{columnsToResize:t,resizeStartWidth:n,resizeRatios:r,groupAfterColumns:i,groupAfterStartWidth:a,groupAfterRatios:o}=this.getInitialValues(e);this.resizeCols=t,this.resizeStartWidth=n,this.resizeRatios=r,this.resizeTakeFromCols=i,this.resizeTakeFromStartWidth=a,this.resizeTakeFromRatios=o,this.toggleColumnResizing(!0)}onResizing(e,t,n=`uiColumnResized`){let r=this.normaliseDragChange(t),i=this.resizeStartWidth+r;this.resizeColumnsFromLocalValues(i,n,e)}getInitialValues(e){let t=e=>e.reduce((e,t)=>e+t.getActualWidth(),0),n=(e,t)=>e.map(e=>e.getActualWidth()/t),r=this.getColumnsToResize(),i=t(r),a={columnsToResize:r,resizeStartWidth:i,resizeRatios:n(r,i)},o=null;if(e&&(o=this.beans.colGroupSvc?.getGroupAtDirection(this.columnGroup,`After`)??null),o){let e=a.groupAfterColumns=o.getDisplayedLeafColumns().filter(e=>e.isResizable());a.groupAfterRatios=n(e,a.groupAfterStartWidth=t(e))}else a.groupAfterColumns=void 0,a.groupAfterStartWidth=void 0,a.groupAfterRatios=void 0;return a}resizeLeafColumnsToFit(e){let t=this.beans.autoWidthCalc.getPreferredWidthForColumnGroup(this.columnGroup),n=this.getInitialValues();t>n.resizeStartWidth&&this.resizeColumns(n,t,e,!0)}resizeColumnsFromLocalValues(e,t,n=!0){if(!this.resizeCols||!this.resizeRatios)return;let r={columnsToResize:this.resizeCols,resizeStartWidth:this.resizeStartWidth,resizeRatios:this.resizeRatios,groupAfterColumns:this.resizeTakeFromCols,groupAfterStartWidth:this.resizeTakeFromStartWidth,groupAfterRatios:this.resizeTakeFromRatios};this.resizeColumns(r,e,t,n)}resizeColumns(e,t,n,r=!0){let{columnsToResize:i,resizeStartWidth:a,resizeRatios:o,groupAfterColumns:s,groupAfterStartWidth:c,groupAfterRatios:l}=e,u=[];if(u.push({columns:i,ratios:o,width:t}),s){let e=t-a;u.push({columns:s,ratios:l,width:c-e})}this.beans.colResize?.resizeColumnSets({resizeSets:u,finished:r,source:n}),r&&this.toggleColumnResizing(!1)}toggleColumnResizing(e){this.comp.toggleCss(`ag-column-resizing`,e)}getColumnsToResize(){return this.columnGroup.getDisplayedLeafColumns().filter(e=>e.isResizable())}normaliseDragChange(e){let t=e;return this.gos.get(`enableRtl`)?this.pinned!==`left`&&(t*=-1):this.pinned===`right`&&(t*=-1),t}destroy(){super.destroy(),this.resizeCols=void 0,this.resizeRatios=void 0,this.resizeTakeFromCols=void 0,this.resizeTakeFromRatios=void 0}},OCe=class extends Q{constructor(e,t,n,r,i){super(),this.pinned=e,this.column=t,this.eResize=n,this.comp=r,this.ctrl=i}postConstruct(){let e=[],t,n,r=()=>{if(FW(this.eResize,t),!t)return;let{horizontalResizeSvc:r,colAutosize:i}=this.beans,a=r.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});e.push(a),n&&i&&e.push(i.addColumnAutosizeListeners(this.eResize,this.column))},i=()=>{for(let t of e)t();e.length=0},a=()=>{let e=this.column.isResizable(),a=!this.gos.get(`suppressAutoSize`)&&!this.column.getColDef().suppressAutoSize;(e!==t||a!==n)&&(t=e,n=a,i(),r())};a(),this.addDestroyFunc(i),this.ctrl.setRefreshFunction(`resize`,a)}onResizing(e,t){let{column:n,lastResizeAmount:r,resizeStartWidth:i,beans:a}=this,o=this.normaliseResizeAmount(t),s=[{key:n,newWidth:i+o}],{pinnedCols:c,ctrlsSvc:l,colResize:u}=a;if(this.column.getPinned()){let e=c?.leftWidth??0,t=c?.rightWidth??0,n=VW(l.getGridBodyCtrl().eBodyViewport)-50;if(e+t+(o-r)>n)return}this.lastResizeAmount=o,u?.setColumnWidths(s,this.resizeWithShiftKey,e,`uiColumnResized`),e&&this.toggleColumnResizing(!1)}onResizeStart(e){this.resizeStartWidth=this.column.getActualWidth(),this.lastResizeAmount=0,this.resizeWithShiftKey=e,this.toggleColumnResizing(!0)}toggleColumnResizing(e){this.column.resizing=e,this.comp.toggleCss(`ag-column-resizing`,e)}normaliseResizeAmount(e){let t=e,n=this.pinned!==`left`,r=this.pinned===`right`;return this.gos.get(`enableRtl`)?n&&(t*=-1):r&&(t*=-1),t}},kCe=class extends Q{constructor(){super(...arguments),this.beanName=`colResize`}setColumnWidths(e,t,n,r){let i=[],{colModel:a,gos:o,visibleCols:s}=this.beans;for(let n of e){let e=a.getColDefCol(n.key)||a.getCol(n.key);if(e&&(i.push({width:n.newWidth,ratios:[1],columns:[e]}),o.get(`colResizeDefault`)===`shift`&&(t=!t),t)){let t=s.getColAfter(e);if(!t)continue;let r=e.getActualWidth()-n.newWidth,a=t.getActualWidth()+r;i.push({width:a,ratios:[1],columns:[t]})}}i.length!==0&&this.resizeColumnSets({resizeSets:i,finished:n,source:r})}resizeColumnSets(e){let{resizeSets:t,finished:n,source:r}=e;if(t&&!t.every(e=>ACe(e))){if(n){let e=t&&t.length>0?t[0].columns:null;GX(this.eventSvc,e,n,r)}return}let i=[],a=[];for(let e of t){let{width:t,columns:n,ratios:o}=e,s={},c={};for(let e of n)a.push(e);let l=!0,u=0;for(;l;){if(u++,u>1e3){_K(31);break}l=!1;let e=[],r=0,i=t;n.forEach((t,n)=>{if(c[t.getId()])i-=s[t.getId()];else{e.push(t);let i=o[n];r+=i}});let a=1/r;e.forEach((n,r)=>{let u=r===e.length-1,d;u?d=i:(d=Math.round(o[r]*t*a),i-=d);let f=n.getMinWidth(),p=n.getMaxWidth();d<f?(d=f,c[n.getId()]=!0,l=!0):p>0&&d>p&&(d=p,c[n.getId()]=!0,l=!0),s[n.getId()]=d})}for(let e of n){let t=s[e.getId()];e.getActualWidth()!==t&&(e.setActualWidth(t,r),i.push(e))}}let o=i.length>0,s=[];if(o){let{colFlex:e,visibleCols:t,colViewport:n}=this.beans;s=e?.refreshFlexedColumns({resizingCols:a,skipSetLeft:!0})??[],t.setLeftValues(r),t.updateBodyWidths(),n.checkViewportColumns()}let c=a.concat(s);(o||n)&&GX(this.eventSvc,c,n,r,s)}resizeHeader(e,t,n){if(!e.isResizable())return;let r=e.getActualWidth(),i=e.getMinWidth(),a=e.getMaxWidth(),o=Math.min(Math.max(r+t,i),a);this.setColumnWidths([{key:e,newWidth:o}],n,!0,`uiColumnResized`)}createResizeFeature(e,t,n,r,i){return new OCe(e,t,n,r,i)}createGroupResizeFeature(e,t,n,r){return new DCe(e,t,n,r)}};function ACe(e){let{columns:t,width:n}=e,r=0,i=0,a=!0;for(let e of t){let t=e.getMinWidth();r+=t||0;let n=e.getMaxWidth();n>0?i+=n:a=!1}return n>=r&&(!a||n<=i)}var jCe={moduleName:`ColumnResize`,version:aK,beans:[kCe],apiFunctions:{setColumnWidths:wCe},dependsOn:[tCe,HX]},MCe=class extends Q{constructor(e,t){super(),this.removeChildListenersFuncs=[],this.columnGroup=t,this.comp=e}postConstruct(){this.addListenersToChildrenColumns(),this.addManagedListeners(this.columnGroup,{displayedChildrenChanged:this.onDisplayedChildrenChanged.bind(this)}),this.onWidthChanged(),this.addDestroyFunc(this.removeListenersOnChildrenColumns.bind(this))}addListenersToChildrenColumns(){this.removeListenersOnChildrenColumns();let e=this.onWidthChanged.bind(this);for(let t of this.columnGroup.getLeafColumns())t.__addEventListener(`widthChanged`,e),t.__addEventListener(`visibleChanged`,e),this.removeChildListenersFuncs.push(()=>{t.__removeEventListener(`widthChanged`,e),t.__removeEventListener(`visibleChanged`,e)})}removeListenersOnChildrenColumns(){for(let e of this.removeChildListenersFuncs)e();this.removeChildListenersFuncs=[]}onDisplayedChildrenChanged(){this.addListenersToChildrenColumns(),this.onWidthChanged()}onWidthChanged(){let e=this.columnGroup.getActualWidth();this.comp.setWidth(`${e}px`),this.comp.toggleCss(`ag-hidden`,e===0)}},NCe=class extends SY{constructor(){super(...arguments),this.onSuppressColMoveChange=()=>{!this.isAlive()||this.isSuppressMoving()?this.removeDragSource():this.dragSource||this.setDragSource(this.eGui)}}wireComp(e,t,n,r,i){let{column:a,beans:o}=this,{context:s,colNames:c,colHover:l,rangeSvc:u,colResize:d}=o;this.comp=e,i=_Y(this,s,i),this.setGui(t,i),this.displayName=c.getDisplayNameForColumnGroup(a,`header`),this.refreshHeaderStyles(),this.addClasses(),this.setupMovingCss(i),this.setupExpandable(i),this.setupTooltip(),this.refreshAnnouncement(),this.setupAutoHeight({wrapperElement:r,compBean:i}),this.setupUserComp(),this.addHeaderMouseListeners(i,r),this.addManagedPropertyListener(`groupHeaderHeight`,this.refreshMaxHeaderHeight.bind(this)),this.refreshMaxHeaderHeight();let f=this.rowCtrl.pinned,p=a.getProvidedColumnGroup().getLeafColumns();l?.createHoverFeature(i,p,t),u?.createRangeHighlightFeature(i,a,e),i.createManagedBean(new vY(a,t,o)),i.createManagedBean(new MCe(e,a)),d?this.resizeFeature=i.createManagedBean(d.createGroupResizeFeature(e,n,f,a)):e.setResizableDisplayed(!1),i.createManagedBean(new wJ(t,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:()=>void 0,handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)})),this.addHighlightListeners(i,p),this.addManagedEventListeners({cellSelectionChanged:()=>this.refreshAnnouncement()}),i.addManagedPropertyListener(`suppressMovableColumns`,this.onSuppressColMoveChange),this.addResizeAndMoveKeyboardListeners(i),i.addDestroyFunc(()=>this.clearComponent())}getHeaderClassParams(){let{column:e,beans:t}=this,n=e.getDefinition();return eq(t.gos,{colDef:n,columnGroup:e,floatingFilter:!1})}refreshMaxHeaderHeight(){let{gos:e,comp:t}=this,n=e.get(`groupHeaderHeight`);n==null?(t.setHeaderWrapperHidden(!1),t.setHeaderWrapperMaxHeight(null)):n===0?t.setHeaderWrapperHidden(!0):t.setHeaderWrapperMaxHeight(n)}addHighlightListeners(e,t){if(this.beans.gos.get(`suppressMoveWhenColumnDragging`))for(let n of t)e.addManagedListeners(n,{headerHighlightChanged:this.onLeafColumnHighlightChanged.bind(this,n)})}onLeafColumnHighlightChanged(e){let t=this.column.getDisplayedLeafColumns(),n=t[0]===e,r=XU(t)===e;if(!n&&!r)return;let i=e.getHighlighted(),a=!!this.rowCtrl.getHeaderCellCtrls().find(e=>e.column.isMoving()),o=!1,s=!1;if(a){let e=this.beans.gos.get(`enableRtl`),t=i===1,a=i===0;n&&(e?s=t:o=a),r&&(e?o=a:s=t)}this.comp.toggleCss(`ag-header-highlight-before`,o),this.comp.toggleCss(`ag-header-highlight-after`,s)}resizeHeader(e,t){let{resizeFeature:n}=this;if(!n)return;let r=n.getInitialValues(t);n.resizeColumns(r,r.resizeStartWidth+e,`uiColumnResized`,!0)}resizeLeafColumnsToFit(e){this.resizeFeature?.resizeLeafColumnsToFit(e)}setupUserComp(){let{colGroupSvc:e,userCompFactory:t,gos:n,enterpriseMenuFactory:r}=this.beans,i=this.column,a=i.getProvidedColumnGroup(),o=Sbe(t,eq(n,{displayName:this.displayName,columnGroup:i,setExpanded:t=>{e.setColumnGroupOpened(a,t,`gridInitializing`)},setTooltip:(e,t)=>{n.assertModuleRegistered(`Tooltip`,3),this.setupTooltip(e,t)},showColumnMenu:(e,t)=>r?.showMenuAfterButtonClick(a,e,`columnMenu`,t),showColumnMenuAfterMouseClick:(e,t)=>r?.showMenuAfterMouseEvent(a,e,`columnMenu`,t),eGridHeader:this.eGui}));o&&this.comp.setUserCompDetails(o)}addHeaderMouseListeners(e,t){let{column:n,comp:r,beans:{rangeSvc:i},gos:a}=this,o=e=>this.handleMouseOverChange(e.type===`mouseenter`);e.addManagedListeners(this.eGui,{mouseenter:o,mouseleave:o,click:()=>this.dispatchColumnMouseEvent(`columnHeaderClicked`,n.getProvidedColumnGroup()),contextmenu:e=>this.handleContextMenuMouseEvent(e,void 0,n.getProvidedColumnGroup())}),r.toggleCss(`ag-header-group-cell-selectable`,WK(a));let s=i?.createHeaderGroupCellMouseListenerFeature(this.column,t);s&&this.createManagedBean(s)}handleMouseOverChange(e){this.eventSvc.dispatchEvent({type:e?`columnHeaderMouseOver`:`columnHeaderMouseLeave`,column:this.column.getProvidedColumnGroup()})}setupTooltip(e,t){this.tooltipFeature=this.beans.tooltipSvc?.setupHeaderGroupTooltip(this.tooltipFeature,this,e,t)}setupExpandable(e){let t=this.column.getProvidedColumnGroup();this.refreshExpanded();let n=this.refreshExpanded.bind(this);e.addManagedListeners(t,{expandedChanged:n,expandableChanged:n})}refreshExpanded(){let{column:e}=this;this.expandable=e.isExpandable();let t=e.isExpanded();this.expandable?this.comp.setAriaExpanded(t?`true`:`false`):this.comp.setAriaExpanded(void 0),this.refreshHeaderStyles()}addClasses(){let{column:e}=this,t=e.getColGroupDef(),n=yY(t,this.gos,null,e);e.isPadding()?(n.push(`ag-header-group-cell-no-group`),e.getLeafColumns().every(e=>e.isSpanHeaderHeight())&&n.push(`ag-header-span-height`)):(n.push(`ag-header-group-cell-with-group`),t?.wrapHeaderText&&n.push(`ag-header-cell-wrap-text`));for(let e of n)this.comp.toggleCss(e,!0)}setupMovingCss(e){let{column:t}=this,n=t.getProvidedColumnGroup().getLeafColumns(),r=()=>this.comp.toggleCss(`ag-header-cell-moving`,t.isMoving());for(let t of n)e.addManagedListeners(t,{movingChanged:r});r()}onFocusIn(e){this.eGui.contains(e.relatedTarget)||(this.focusThis(),this.announceAriaDescription())}handleKeyDown(e){if(super.handleKeyDown(e),!this.getWrapperHasFocus())return;let{column:t,expandable:n,gos:r,beans:i}=this,a=WK(r);if(e.key==$.ENTER){if(a&&!e.altKey)i.rangeSvc?.handleColumnSelection(t,e);else if(n){let e=!t.isExpanded();i.colGroupSvc.setColumnGroupOpened(t.getProvidedColumnGroup(),e,`uiColumnExpanded`)}}}refreshAnnouncement(){let e,{gos:t}=this;WK(t)&&(e=this.getLocaleTextFunc()(`ariaColumnGroupCellSelection`,`Press Enter to toggle selection for all visible cells in this column group`)),this.ariaAnnouncement=e}announceAriaDescription(){let{beans:e,eGui:t,ariaAnnouncement:n}=this;n&&t.contains(dW(e))&&e.ariaAnnounce?.announceValue(n,`columnHeader`)}setDragSource(e){this.isAlive()&&!this.isSuppressMoving()&&(this.removeDragSource(),e&&(this.dragSource=this.beans.colMoves?.setDragSourceForHeader(e,this.column,this.displayName)??null))}isSuppressMoving(){return this.gos.get(`suppressMovableColumns`)||this.column.getLeafColumns().some(e=>e.getColDef().suppressMovable||e.getColDef().lockPosition)}destroy(){this.tooltipFeature=this.destroyBean(this.tooltipFeature),super.destroy()}};function PCe(e,t,n){e.colGroupSvc?.setColumnGroupOpened(t,n,`api`)}function FCe(e,t,n){return e.colGroupSvc?.getColumnGroup(t,n)??null}function ICe(e,t){return e.colGroupSvc?.getProvidedColGroup(t)??null}function LCe(e,t,n){return e.colNames.getDisplayNameForColumnGroup(t,n)||``}function RCe(e){return e.colGroupSvc?.getColumnGroupState()??[]}function zCe(e,t){e.colGroupSvc?.setColumnGroupState(t,`api`)}function BCe(e){e.colGroupSvc?.resetColumnGroupState(`api`)}function VCe(e){return e.visibleCols.treeLeft}function HCe(e){return e.visibleCols.treeCenter}function UCe(e){return e.visibleCols.treeRight}function WCe(e){return e.visibleCols.getAllTrees()}var KX=class{constructor(){this.existingIds={}}getInstanceIdForKey(e){let t=this.existingIds[e],n;return n=typeof t==`number`?t+1:0,this.existingIds[e]=n,n}};function GCe(e,t){for(let n=0;n<t.length;n++){let r=e.indexOf(t[n]);r>=0&&(e[r]=e[e.length-1],e.pop())}}var KCe=class extends Q{constructor(){super(...arguments),this.beanName=`visibleCols`,this.colsAndGroupsMap={},this.leftCols=[],this.rightCols=[],this.centerCols=[],this.allCols=[],this.headerGroupRowCount=0,this.bodyWidth=0,this.leftWidth=0,this.rightWidth=0,this.isBodyWidthDirty=!0}refresh(e,t=!1){let{colFlex:n,colModel:r,colGroupSvc:i,colViewport:a,selectionColSvc:o}=this.beans;t||this.buildTrees(r,i),i?.updateOpenClosedVisibility(),this.leftCols=JX(this.treeLeft),this.centerCols=JX(this.treeCenter),this.rightCols=JX(this.treeRight),o?.refreshVisibility(this.leftCols,this.centerCols,this.rightCols),this.joinColsAriaOrder(r),this.joinCols(),this.headerGroupRowCount=this.getHeaderRowCount(),this.setLeftValues(e),this.autoHeightCols=this.allCols.filter(e=>e.isAutoHeight()),n?.refreshFlexedColumns(),this.updateBodyWidths(),this.setFirstRightAndLastLeftPinned(r,this.leftCols,this.rightCols,e),a.checkViewportColumns(!1),this.eventSvc.dispatchEvent({type:`displayedColumnsChanged`,source:e})}getHeaderRowCount(){if(!this.gos.get(`hidePaddedHeaderRows`))return this.beans.colModel.cols.treeDepth;let e=0;for(let t of this.allCols){let n=t.getParent();for(;n;){if(!n.isPadding()){let t=n.getProvidedColumnGroup().getLevel()+1;t>e&&(e=t);break}n=n.getParent()}}return e}updateBodyWidths(){let e=bq(this.centerCols),t=bq(this.leftCols),n=bq(this.rightCols);this.isBodyWidthDirty=this.bodyWidth!==e,(this.bodyWidth!==e||this.leftWidth!==t||this.rightWidth!==n)&&(this.bodyWidth=e,this.leftWidth=t,this.rightWidth=n,this.eventSvc.dispatchEvent({type:`columnContainerWidthChanged`}),this.eventSvc.dispatchEvent({type:`displayedColumnsWidthChanged`}))}setLeftValues(e){this.setLeftValuesOfCols(e),this.setLeftValuesOfGroups()}setFirstRightAndLastLeftPinned(e,t,n,r){let i,a;this.gos.get(`enableRtl`)?(i=t?t[0]:null,a=n?XU(n):null):(i=t?XU(t):null,a=n?n[0]:null);for(let t of e.getCols())t.setLastLeftPinned(t===i,r),t.setFirstRightPinned(t===a,r)}buildTrees(e,t){let n=e.getColsToShow(),r=n.filter(e=>e.getPinned()==`left`),i=n.filter(e=>e.getPinned()==`right`),a=n.filter(e=>e.getPinned()!=`left`&&e.getPinned()!=`right`),o=new KX,s=e=>t?t.createColumnGroups(e):e.columns;this.treeLeft=s({columns:r,idCreator:o,pinned:`left`,oldDisplayedGroups:this.treeLeft}),this.treeRight=s({columns:i,idCreator:o,pinned:`right`,oldDisplayedGroups:this.treeRight}),this.treeCenter=s({columns:a,idCreator:o,pinned:null,oldDisplayedGroups:this.treeCenter}),this.updateColsAndGroupsMap()}clear(){this.leftCols=[],this.rightCols=[],this.centerCols=[],this.allCols=[],this.ariaOrderColumns=[]}joinColsAriaOrder(e){let t=e.getCols(),n=[],r=[],i=[];for(let e of t){let t=e.getPinned();t?t===!0||t===`left`?n.push(e):i.push(e):r.push(e)}this.ariaOrderColumns=n.concat(r).concat(i)}getAriaColIndex(e){let t;return t=Aq(e)?e.getLeafColumns()[0]:e,this.ariaOrderColumns.indexOf(t)+1}setLeftValuesOfGroups(){for(let e of[this.treeLeft,this.treeRight,this.treeCenter])for(let t of e)Aq(t)&&t.checkLeft()}setLeftValuesOfCols(e){let{colModel:t}=this.beans;if(!t.getColDefCols())return;let n=t.getCols().slice(0),r=this.gos.get(`enableRtl`);for(let t of[this.leftCols,this.rightCols,this.centerCols]){if(r){let n=bq(t);for(let r of t)n-=r.getActualWidth(),r.setLeft(n,e)}else{let n=0;for(let r of t)r.setLeft(n,e),n+=r.getActualWidth()}GCe(n,t)}for(let t of n)t.setLeft(null,e)}joinCols(){this.allCols=this.gos.get(`enableRtl`)?this.rightCols.concat(this.centerCols).concat(this.leftCols):this.leftCols.concat(this.centerCols).concat(this.rightCols)}getAllTrees(){return this.treeLeft&&this.treeRight&&this.treeCenter?this.treeLeft.concat(this.treeCenter).concat(this.treeRight):null}isColDisplayed(e){return this.allCols.indexOf(e)>=0}getLeftColsForRow(e){let{leftCols:t,beans:{colModel:n}}=this;return n.colSpanActive?this.getColsForRow(e,t):t}getRightColsForRow(e){let{rightCols:t,beans:{colModel:n}}=this;return n.colSpanActive?this.getColsForRow(e,t):t}getColsForRow(e,t,n,r){let i=[],a=null;for(let o=0;o<t.length;o++){let s=t[o],c=t.length-o,l=Math.min(s.getColSpan(e),c),u=[s];if(l>1){let e=l-1;for(let n=1;n<=e;n++)u.push(t[o+n]);o+=e}let d;if(n){d=!1;for(let e of u)n(e)&&(d=!0)}else d=!0;d&&(i.length===0&&a&&r&&r(s)&&i.push(a),i.push(s)),a=s}return i}getContainerWidth(e){switch(e){case`left`:return this.leftWidth;case`right`:return this.rightWidth;default:return this.bodyWidth}}getColBefore(e){let t=this.allCols,n=t.indexOf(e);return n>0?t[n-1]:null}isPinningLeft(){return this.leftCols.length>0}isPinningRight(){return this.rightCols.length>0}updateColsAndGroupsMap(){this.colsAndGroupsMap={};let e=e=>{this.colsAndGroupsMap[e.getUniqueId()]=e};qX(this.treeCenter,!1,e),qX(this.treeLeft,!1,e),qX(this.treeRight,!1,e)}isVisible(e){return this.colsAndGroupsMap[e.getUniqueId()]===e}getFirstColumn(){let e=this.gos.get(`enableRtl`),t=[`leftCols`,`centerCols`,`rightCols`];e&&t.reverse();for(let n=0;n<t.length;n++){let r=this[t[n]];if(r.length)return e?XU(r):r[0]}return null}getColAfter(e){let t=this.allCols,n=t.indexOf(e);return n<t.length-1?t[n+1]:null}getColsLeftWidth(){return bq(this.leftCols)}getDisplayedColumnsRightWidth(){return bq(this.rightCols)}isColAtEdge(e,t){let n=this.allCols;if(!n.length)return!1;let r=t===`first`,i;if(Aq(e)){let t=e.getDisplayedLeafColumns();if(!t.length)return!1;i=r?t[0]:XU(t)}else i=e;return(r?n[0]:XU(n))===i}};function qX(e,t,n){if(e)for(let r=0;r<e.length;r++){let i=e[r];Aq(i)&&qX(t?i.getDisplayedChildren():i.getChildren(),t,n),n(i)}}function JX(e){let t=[];return qX(e,!0,e=>{rq(e)&&t.push(e)}),t}var qCe={moduleName:`ColumnGroup`,version:aK,dynamicBeans:{headerGroupCellCtrl:NCe},beans:[class extends Q{constructor(){super(...arguments),this.beanName=`colGroupSvc`}getColumnGroupState(){let e=[];return vq(null,this.beans.colModel.getColTree(),t=>{fq(t)&&e.push({groupId:t.getGroupId(),open:t.isExpanded()})}),e}resetColumnGroupState(e){let t=this.beans.colModel.getColDefColTree();if(!t)return;let n=[];vq(null,t,e=>{if(fq(e)){let t=e.getColGroupDef(),r={groupId:e.getGroupId(),open:t?t.openByDefault:void 0};n.push(r)}}),this.setColumnGroupState(n,e)}setColumnGroupState(e,t){let{colModel:n,colAnimation:r,visibleCols:i,eventSvc:a}=this.beans;if(!n.getColTree().length)return;r?.start();let o=[];for(let t of e){let e=t.groupId,n=t.open,r=this.getProvidedColGroup(e);r&&r.isExpanded()!==n&&(r.setExpanded(n),o.push(r))}i.refresh(t,!0),o.length&&a.dispatchEvent({type:`columnGroupOpened`,columnGroup:o.length===1?o[0]:void 0,columnGroups:o}),r?.finish()}setColumnGroupOpened(e,t,n){let r;r=fq(e)?e.getId():e||``,this.setColumnGroupState([{groupId:r,open:t}],n)}getProvidedColGroup(e){let t=null;return vq(null,this.beans.colModel.getColTree(),n=>{fq(n)&&n.getId()===e&&(t=n)}),t}getGroupAtDirection(e,t){let n=e.getProvidedColumnGroup().getLevel()+e.getPaddingLevel(),r=e.getDisplayedLeafColumns(),i=t===`After`?XU(r):r[0],a=`getCol${t}`;for(;;){let t=this.beans.visibleCols[a](i);if(!t)return null;let r=this.getColGroupAtLevel(t,n);if(r!==e)return r}}getColGroupAtLevel(e,t){let n=e.getParent(),r,i;for(;r=n.getProvidedColumnGroup().getLevel(),i=n.getPaddingLevel(),!(r+i<=t);)n=n.getParent();return n}updateOpenClosedVisibility(){qX(this.beans.visibleCols.getAllTrees(),!1,e=>{Aq(e)&&e.calculateDisplayedColumns()})}getColumnGroup(e,t){if(!e)return null;if(Aq(e))return e;let n=this.beans.visibleCols.getAllTrees(),r=typeof t==`number`,i=null;return qX(n,!1,n=>{if(Aq(n)){let a=n,o;o=r?e===a.getGroupId()&&t===a.getPartId():e===a.getGroupId(),o&&(i=a)}}),i}createColumnGroups(e){let{columns:t,idCreator:n,pinned:r,oldDisplayedGroups:i,isStandaloneStructure:a}=e,o=this.mapOldGroupsById(i),s=[],c=t;for(;c.length;){let e=c;c=[];let t=0,i=i=>{let l=t;t=i;let u=e[l],d=(Aq(u)?u.getProvidedColumnGroup():u).getOriginalParent();if(d==null){for(let t=l;t<i;t++)s.push(e[t]);return}let f=this.createColumnGroup(d,n,o,r,a);for(let t=l;t<i;t++)f.addChild(e[t]);c.push(f)};for(let n=1;n<e.length;n++){let r=e[n],a=(Aq(r)?r.getProvidedColumnGroup():r).getOriginalParent(),o=e[t];a!==(Aq(o)?o.getProvidedColumnGroup():o).getOriginalParent()&&i(n)}t<e.length&&i(e.length)}return a||this.setupParentsIntoCols(s,null),s}createProvidedColumnGroup(e,t,n,r,i,a,o){let s=i.getUniqueKey(t.groupId||null,null),c=mq(this.beans,t,s),l=new pq(c,s,!1,n);this.createBean(l);let u=this.findExistingGroup(t,a);u&&a.splice(u.idx,1);let d=u?.group;d&&l.setExpanded(d.isExpanded());let f=hq(this.beans,c.children,n+1,e,r,i,a,o);return l.setChildren(f),l}balanceColumnTree(e,t,n,r){let i=[];for(let a=0;a<e.length;a++){let o=e[a];if(fq(o)){let e=o,a=this.balanceColumnTree(e.getChildren(),t+1,n,r);e.setChildren(a),i.push(e)}else{let a,s;for(let e=t;e<n;e++){let t=r.getUniqueKey(null,null),n=new pq(mq(this.beans,null,t),t,!0,e);this.createBean(n),s&&s.setChildren([n]),s=n,a||=s}if(a&&s){if(i.push(a),e.some(e=>fq(e))){s.setChildren([o]);continue}s.setChildren(e);break}i.push(o)}}return i}findDepth(e){let t=0,n=e;for(;n?.[0]&&fq(n[0]);)t++,n=n[0].getChildren();return t}findMaxDepth(e,t){let n=t;for(let r=0;r<e.length;r++){let i=e[r];if(fq(i)){let e=i,r=this.findMaxDepth(e.getChildren(),t+1);n<r&&(n=r)}}return n}balanceTreeForAutoCols(e,t){let n=[];for(let r of e){let e=r;for(let n=t-1;n>=0;n--){let t=new pq(null,`FAKE_PATH_${r.getId()}_${n}`,!0,n);this.createBean(t),t.setChildren([e]),e.originalParent=t,e=t}t===0&&(r.originalParent=null),n.push(e)}return n}findExistingGroup(e,t){if(e.groupId!=null)for(let n=0;n<t.length;n++){let r=t[n];if(r.getColGroupDef()&&r.getId()===e.groupId)return{idx:n,group:r}}}createColumnGroup(e,t,n,r,i){let a=e.getGroupId(),o=t.getInstanceIdForKey(a),s=n[kq(a,o)];return s&&s.getProvidedColumnGroup()!==e&&(s=null),nW(s)?s.reset():(s=new jq(e,a,o,r),i||this.createBean(s)),s}mapOldGroupsById(e){let t={},n=e=>{for(let r of e)if(Aq(r)){let e=r;t[r.getUniqueId()]=e,n(e.getChildren())}};return e&&n(e),t}setupParentsIntoCols(e,t){for(let n of e??[])if(n.parent!==t&&(this.beans.colViewport.colsWithinViewportHash=``),n.parent=t,Aq(n)){let e=n;this.setupParentsIntoCols(e.getChildren(),e)}}}],apiFunctions:{getAllDisplayedColumnGroups:WCe,getCenterDisplayedColumnGroups:HCe,getColumnGroup:FCe,getColumnGroupState:RCe,getDisplayNameForColumnGroup:LCe,getLeftDisplayedColumnGroups:VCe,getProvidedColumnGroup:ICe,getRightDisplayedColumnGroups:UCe,resetColumnGroupState:BCe,setColumnGroupOpened:PCe,setColumnGroupState:zCe}};function YX(e,t,n){let{colModel:r,rowGroupColsSvc:i,pivotColsSvc:a,autoColSvc:o,selectionColSvc:s,colAnimation:c,visibleCols:l,pivotResultCols:u,environment:d,valueColsSvc:f,eventSvc:p,gos:m}=e,h=r.getColDefCols()??[],g=s?.getColumns();if(!h.length&&!g?.length)return!1;if(t?.state&&!t.state.forEach)return gK(32),!1;let _=(r,o,s,c,l)=>{if(!r)return;let u=Kye(o,t.defaultState),p=u(`flex`).value1,m=u(`sort`).value1,h=u(`sortType`).value1,g=oq(m)||sq(h),_=dq(h),v=uq(m),y=g?{type:_,direction:v}:void 0;if(gq(e,r,u(`hide`).value1,y,u(`sortIndex`).value1,u(`pinned`).value1,p,n),p==null){let e=u(`width`).value1;if(e!=null){let t=r.getColDef().minWidth??d.getDefaultColumnMinWidth();t!=null&&e>=t&&r.setActualWidth(e,n)}}!l&&r.isPrimary()&&(f?.syncColumnWithState(r,n,u),i?.syncColumnWithState(r,n,u,s),a?.syncColumnWithState(r,n,u,c))},v=(c,u,d)=>{let f=XX(e,n),h=u.slice(),g={},v={},y=[],b=[],x=[],S=0,C=i?.columns.slice()??[],w=a?.columns.slice()??[];for(let e of c){let t=e.colId;if(t.startsWith(`ag-Grid-AutoColumn`)){y.push(e),x.push(e);continue}if(Cq(t)){b.push(e),x.push(e);continue}let n=d(t);n?(_(n,e,g,v,!1),$U(h,n)):(x.push(e),S+=1)}let T=e=>_(e,null,g,v,!1);h.forEach(T),i?.sortColumns($X.bind(i,g,C)),a?.sortColumns($X.bind(a,v,w)),r.refreshCols(!1,n);let E=(e,t,n=[])=>{for(let r of t){let t=e(r.colId);$U(n,t),_(t,r,null,null,!0)}n.forEach(T)};return E(e=>o?.getColumn(e)??null,y,o?.getColumns()?.slice()),E(e=>s?.getColumn(e)??null,b,s?.getColumns()?.slice()),YCe(t,r,m),l.refresh(n),p.dispatchEvent({type:`columnEverythingChanged`,source:n}),f(),{unmatchedAndAutoStates:x,unmatchedCount:S}};c?.start();let{unmatchedAndAutoStates:y,unmatchedCount:b}=v(t.state||[],h,e=>r.getColDefCol(e));return(y.length>0||nW(t.defaultState))&&(b=v(y,u?.getPivotResultCols()?.list??[],e=>u?.getPivotResultCol(e)??null).unmatchedCount),c?.finish(),b===0}function JCe(e,t){let{colModel:n,autoColSvc:r,selectionColSvc:i,eventSvc:a,gos:o}=e,s=n.getColDefCols();if(!s?.length)return;let c=yq(n.getColDefColTree()),l=[],u=1e3,d=1e3,f=e=>{let t=QX(e);rW(t.rowGroupIndex)&&t.rowGroup&&(t.rowGroupIndex=u++),rW(t.pivotIndex)&&t.pivot&&(t.pivotIndex=d++),l.push(t)};r?.getColumns()?.forEach(f),i?.getColumns()?.forEach(f),c?.forEach(f),YX(e,{state:l},t);let p=r?.getColumns()??[];YX(e,{state:[...i?.getColumns()??[],...p,...s].map(e=>({colId:e.colId})),applyOrder:!0},t),a.dispatchEvent(eq(o,{type:`columnsReset`,source:t}))}function XX(e,t){let{rowGroupColsSvc:n,pivotColsSvc:r,valueColsSvc:i,colModel:a,sortSvc:o,eventSvc:s}=e,c={rowGroupColumns:n?.columns.slice()??[],pivotColumns:r?.columns.slice()??[],valueColumns:i?.columns.slice()??[]},l=ZX(e),u={};for(let e of l)u[e.colId]=e;return()=>{let i=(e,n,r,i)=>{if(ZU(n.map(i),r.map(i)))return;let a=new Set(n);for(let e of r)a.delete(e)||a.add(e);let o=[...a];s.dispatchEvent({type:e,columns:o,column:o.length===1?o[0]:null,source:t})},d=e=>{let t=[];return a.forAllCols(n=>{let r=u[n.getColId()];r&&e(r,n)&&t.push(n)}),t},f=e=>e.getColId();i(`columnRowGroupChanged`,c.rowGroupColumns,n?.columns??[],f),i(`columnPivotChanged`,c.pivotColumns,r?.columns??[],f);let p=d((e,t)=>{let n=e.aggFunc!=null,r=n!=t.isValueActive(),i=n&&e.aggFunc!=t.getAggFunc();return r||i});p.length>0&&ECe(s,`columnValueChanged`,p,t),GX(s,d((e,t)=>e.width!=t.getActualWidth()),!0,t),WX(s,d((e,t)=>e.pinned!=t.getPinned()),t),TCe(s,d((e,t)=>e.hide==t.isVisible()),t);let m=d((e,t)=>!lq(t.getSortDef(),{type:dq(e.sortType),direction:uq(e.sort)})||e.sortIndex!=t.getSortIndex());m.length>0&&o?.dispatchSortChangedEvents(t,m);let h=ZX(e);ZCe(l,h,t,a,s)}}function ZX(e){let{colModel:t,rowGroupColsSvc:n,pivotColsSvc:r}=e;if(rW(t.getColDefCols())||!t.isAlive())return[];let i=n?.columns,a=r?.columns,o=[],s=e=>{let t=e.isRowGroupActive()&&i?i.indexOf(e):null,n=e.isPivotActive()&&a?a.indexOf(e):null,r=e.isValueActive()?e.getAggFunc():null,s=e.getSortIndex()==null?null:e.getSortIndex();o.push({colId:e.getColId(),width:e.getActualWidth(),hide:!e.isVisible(),pinned:e.getPinned(),sort:e.getSort(),sortType:e.getSortDef()?.type,sortIndex:s,aggFunc:r,rowGroup:e.isRowGroupActive(),rowGroupIndex:t,pivot:e.isPivotActive(),pivotIndex:n,flex:e.getFlex()??null})};t.forAllCols(e=>s(e));let c=new Map(t.getCols().map((e,t)=>[e.getColId(),t]));return o.sort((e,t)=>(c.has(e.colId)?c.get(e.colId):-1)-(c.has(t.colId)?c.get(t.colId):-1)),o}function QX(e){let t=(e,t)=>e??t??null,n=e.getColDef(),r=aq(t(n.sort,n.initialSort)),i=r.direction,a=r.type,o=t(n.sortIndex,n.initialSortIndex),s=t(n.hide,n.initialHide),c=t(n.pinned,n.initialPinned),l=t(n.width,n.initialWidth),u=t(n.flex,n.initialFlex),d=t(n.rowGroupIndex,n.initialRowGroupIndex),f=t(n.rowGroup,n.initialRowGroup);d==null&&!f&&(d=null,f=null);let p=t(n.pivotIndex,n.initialPivotIndex),m=t(n.pivot,n.initialPivot);p==null&&!m&&(p=null,m=null);let h=t(n.aggFunc,n.initialAggFunc);return{colId:e.getColId(),sort:i,sortType:a,sortIndex:o,hide:s,pinned:c,width:l,flex:u,rowGroup:f,rowGroupIndex:d,pivot:m,pivotIndex:p,aggFunc:h}}function YCe(e,t,n){if(!e.applyOrder||!e.state)return;let r=[];for(let t of e.state)t.colId!=null&&r.push(t.colId);XCe(t.cols,r,t,n)}function XCe(e,t,n,r){if(e==null)return;let i=[],a={};for(let n of t){if(a[n])continue;let t=e.map[n];t&&(i.push(t),a[n]=!0)}let o=0;for(let t of e.list){let e=t.getColId();a[e]??(e.startsWith(`ag-Grid-AutoColumn`)?i.splice(o++,0,t):i.push(t))}if(i=BX(i,r),!VX(i,n.getColTree())){gK(39);return}e.list=i}function ZCe(e,t,n,r,i){let a={};for(let e of t)a[e.colId]=e;let o={};for(let t of e)a[t.colId]&&(o[t.colId]=!0);let s=e.filter(e=>o[e.colId]),c=t.filter(e=>o[e.colId]),l=[];c.forEach((e,t)=>{let n=s?.[t];if(n&&n.colId!==e.colId){let e=r.getCol(n.colId);e&&l.push(e)}}),l.length&&i.dispatchEvent({type:`columnMoved`,columns:l,column:l.length===1?l[0]:null,finished:!0,source:n})}var $X=(e,t,n,r)=>{let i=e[n.getId()],a=e[r.getId()],o=i!=null,s=a!=null;if(o&&s)return i-a;if(o)return-1;if(s)return 1;let c=t.indexOf(n),l=t.indexOf(r),u=c>=0;return u&&l>=0?c-l:u?-1:1},QCe=class extends Q{constructor(){super(...arguments),this.beanName=`colModel`,this.pivotMode=!1,this.ready=!1,this.changeEventsDispatching=!1}postConstruct(){this.pivotMode=this.gos.get(`pivotMode`),this.addManagedPropertyListeners([`groupDisplayType`,`treeData`,`treeDataDisplayType`,`groupHideOpenParents`,`groupHideColumnsUntilExpanded`,`rowNumbers`,`hidePaddedHeaderRows`],e=>this.refreshAll(Eq(e.source))),this.addManagedPropertyListeners([`defaultColDef`,`defaultColGroupDef`,`columnTypes`,`suppressFieldDotNotation`],this.recreateColumnDefs.bind(this)),this.addManagedPropertyListener(`pivotMode`,e=>this.setPivotMode(this.gos.get(`pivotMode`),Eq(e.source)))}createColsFromColDefs(e){let{beans:t}=this,{valueCache:n,colAutosize:r,rowGroupColsSvc:i,pivotColsSvc:a,valueColsSvc:o,visibleCols:s,eventSvc:c,groupHierarchyColSvc:l}=t,u=this.colDefs?XX(t,e):void 0;n?.expire();let d=this.colDefCols?.list,f=this.colDefCols?.tree,p=Nye(t,this.colDefs,!0,f,e);xq(t,this.colDefCols?.tree,p.columnTree);let m=p.columnTree,h=p.treeDepth,g=yq(m),_={};for(let e of g)_[e.getId()]=e;this.colDefCols={tree:m,treeDepth:h,list:g,map:_},this.createColumnsForService([l],this.colDefCols,e),i?.extractCols(e,d),a?.extractCols(e,d),o?.extractCols(e,d),this.ready=!0,this.changeEventsDispatching=!0,this.refreshCols(!0,e),this.changeEventsDispatching=!1,s.refresh(e),c.dispatchEvent({type:`columnEverythingChanged`,source:e}),u&&(this.changeEventsDispatching=!0,u(),this.changeEventsDispatching=!1),c.dispatchEvent({type:`newColumnsLoaded`,source:e}),e===`gridInitializing`&&r?.applyAutosizeStrategy()}refreshCols(e,t){if(!this.colDefCols)return;let n=this.cols?.tree;this.saveColOrder();let{autoColSvc:r,selectionColSvc:i,rowNumbersSvc:a,quickFilter:o,pivotResultCols:s,showRowGroupCols:c,rowAutoHeight:l,visibleCols:u,colViewport:d,eventSvc:f,formula:p}=this.beans,m=this.selectCols(s,this.colDefCols);p?.setFormulasActive(m),this.createColumnsForService([r,i,a],m,t);let h=sye(this.gos,this.showingPivotResult);(!e||h)&&this.restoreColOrder(m),this.positionLockedCols(m),c?.refresh(),o?.refreshCols(),this.setColSpanActive(),l?.setAutoHeightActive(m),u.clear(),d.clear(),ZU(n,this.cols.tree)||f.dispatchEvent({type:`gridColumnsChanged`})}createColumnsForService(e,t,n){for(let r of e)r&&(r.createColumns(t,e=>{this.lastOrder=e(this.lastOrder),this.lastPivotOrder=e(this.lastPivotOrder)},n),r.addColumns(t))}selectCols(e,t){let n=e?.getPivotResultCols()??null;this.showingPivotResult=n!=null;let{map:r,list:i,tree:a,treeDepth:o}=n??t;return this.cols={list:i.slice(),map:{...r},tree:a.slice(),treeDepth:o},n&&(n.list.some(e=>this.cols?.map[e.getColId()]!==void 0)||(this.lastPivotOrder=null)),this.cols}getColsToShow(){if(!this.cols)return[];let{beans:e,showingPivotResult:t,cols:n}=this,{valueColsSvc:r,selectionColSvc:i,gos:a}=e,o=this.isPivotMode()&&!t,s=i?.isSelectionColumnEnabled(),c=cye(e),l=r?.columns,u=dye(a);return n.list.filter(e=>{let t=Sq(e);return o?l?.includes(e)||t&&(!u||e.isVisible())||s&&Cq(e)||c&&wq(e):t&&!u||e.isVisible()})}refreshAll(e){this.ready&&(this.refreshCols(!1,e),this.beans.visibleCols.refresh(e))}setColsVisible(e,t=!1,n){YX(this.beans,{state:e.map(e=>({colId:typeof e==`string`?e:e.getColId(),hide:!t}))},n)}restoreColOrder(e){let t=this.showingPivotResult?this.lastPivotOrder:this.lastOrder;if(!t)return;let n=t.filter(t=>e.map[t.getId()]!=null);if(n.length===0)return;if(n.length===e.list.length){e.list=n;return}let r=e=>{let t=e.getOriginalParent();return t?t.getChildren().length>1||r(t):!1};if(!n.some(e=>r(e))){let t=new Set(n);for(let r of e.list)t.has(r)||n.push(r);e.list=n;return}let i=new Map;for(let e=0;e<n.length;e++){let t=n[e];i.set(t,e)}let a=e.list.filter(e=>!i.has(e));if(a.length===0){e.list=n;return}let o=(e,t)=>{let n=t?t.getOriginalParent():e.getOriginalParent();if(!n)return null;let r=null,a=null;for(let o of n.getChildren())if(o!==t&&o!==e){if(o instanceof iq){let e=i.get(o);if(e==null)continue;(r==null||r<e)&&(r=e,a=o);continue}o.forEachLeafColumn(e=>{let t=i.get(e);t!=null&&(r==null||r<t)&&(r=t,a=e)})}return a??o(e,n)},s=[],c=new Map;for(let e of a){let t=o(e,null);if(t==null){s.push(e);continue}let n=c.get(t);n===void 0?c.set(t,e):Array.isArray(n)?n.push(e):c.set(t,[n,e])}let l=Array(e.list.length),u=l.length-1;for(let e=s.length-1;e>=0;e--)l[u--]=s[e];for(let e=n.length-1;e>=0;e--){let t=n[e],r=c.get(t);if(r){if(Array.isArray(r))for(let e=r.length-1;e>=0;e--){let t=r[e];l[u--]=t}else l[u--]=r}l[u--]=t}e.list=l}positionLockedCols(e){e.list=BX(e.list,this.gos)}saveColOrder(){this.showingPivotResult?this.lastPivotOrder=this.cols?.list??null:this.lastOrder=this.cols?.list??null}getColumnDefs(e){return this.colDefCols&&this.beans.colDefFactory?.getColumnDefs(this.colDefCols.list,this.showingPivotResult,this.lastOrder,this.cols?.list??[],e)}setColSpanActive(){this.colSpanActive=!!this.cols?.list.some(e=>e.getColDef().colSpan!=null)}isPivotMode(){return this.pivotMode}setPivotMode(e,t){if(e===this.pivotMode||(this.pivotMode=e,!this.ready))return;this.refreshCols(!1,t);let{visibleCols:n,eventSvc:r}=this.beans;n.refresh(t),r.dispatchEvent({type:`columnPivotModeChanged`})}isPivotActive(){let e=this.beans.pivotColsSvc?.columns;return this.pivotMode&&!!e?.length}recreateColumnDefs(e){if(!this.cols)return;this.beans.autoColSvc?.updateColumns(e);let t=Eq(e.source);this.createColsFromColDefs(t)}setColumnDefs(e,t){this.colDefs=e,this.createColsFromColDefs(t)}destroy(){xq(this.beans,this.colDefCols?.tree),super.destroy()}getColTree(){return this.cols?.tree??[]}getColDefColTree(){return this.colDefCols?.tree??[]}getColDefCols(){return this.colDefCols?.list??null}getCols(){return this.cols?.list??[]}forAllCols(e){let{pivotResultCols:t,autoColSvc:n,selectionColSvc:r,groupHierarchyColSvc:i}=this.beans;QU(this.colDefCols?.list,e)||QU(n?.columns?.list,e)||QU(r?.columns?.list,e)||QU(i?.columns?.list,e)||QU(t?.getPivotResultCols()?.list,e)}getColsForKeys(e){return e?e.map(e=>this.getCol(e)).filter(e=>e!=null):[]}getColDefCol(e){return this.colDefCols?.list?this.getColFromCollection(e,this.colDefCols):null}getCol(e){return e==null?null:this.getColFromCollection(e,this.cols)}getColById(e){return this.cols?.map[e]??null}getColFromCollection(e,t){if(t==null)return null;let{map:n,list:r}=t;if(typeof e==`string`&&n[e])return n[e];for(let t=0;t<r.length;t++)if(Dq(r[t],e))return r[t];let{autoColSvc:i,selectionColSvc:a,groupHierarchyColSvc:o}=this.beans;return i?.getColumn(e)??a?.getColumn(e)??o?.getColumn(e)??null}},$Ce=`.ag-label{white-space:nowrap}:where(.ag-ltr) .ag-label{margin-right:var(--ag-spacing)}:where(.ag-rtl) .ag-label{margin-left:var(--ag-spacing)}:where(.ag-label-align-right) .ag-label{order:1}:where(.ag-ltr) :where(.ag-label-align-right) .ag-label{margin-left:var(--ag-spacing)}:where(.ag-rtl) :where(.ag-label-align-right) .ag-label{margin-right:var(--ag-spacing)}:where(.ag-label-align-right){.ag-label,.ag-wrapper{flex:none}}.ag-label-align-top{align-items:flex-start;flex-direction:column}:where(.ag-label-align-top){.ag-label,.ag-wrapper{align-self:stretch}}.ag-label-ellipsis{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:where(.ag-label-align-top) .ag-label{margin-bottom:calc(var(--ag-spacing)*.5)}`,ewe=class extends qq{constructor(e,t,n){super(t,n),this.labelSeparator=``,this.labelAlignment=`left`,this.disabled=!1,this.label=``,this.config=e||{},this.registerCSS($Ce)}postConstruct(){this.addCss(`ag-labeled`),this.eLabel.classList.add(`ag-label`);let{labelSeparator:e,label:t,labelWidth:n,labelAlignment:r,disabled:i,labelEllipsis:a}=this.config;i!=null&&this.setDisabled(i),e!=null&&this.setLabelSeparator(e),t!=null&&this.setLabel(t),n!=null&&this.setLabelWidth(n),a!=null&&this.setLabelEllipsis(a),this.setLabelAlignment(r||this.labelAlignment),this.refreshLabel()}refreshLabel(){let{label:e,eLabel:t}=this;qW(t),typeof e==`string`?t.innerText=e+this.labelSeparator:e&&t.appendChild(e),e===``?(FW(t,!1),bW(t,`presentation`)):(FW(t,!0),bW(t,null))}setLabelSeparator(e){return this.labelSeparator===e?this:(this.labelSeparator=e,this.label!=null&&this.refreshLabel(),this)}getLabelId(){let e=this.eLabel;return e.id=e.id||`ag-${this.getCompId()}-label`,e.id}getLabel(){return this.label}setLabel(e){return this.label===e?this:(this.label=e,this.refreshLabel(),this)}setLabelAlignment(e){let t=this.getGui().classList;return t.toggle(`ag-label-align-left`,e===`left`),t.toggle(`ag-label-align-right`,e===`right`),t.toggle(`ag-label-align-top`,e===`top`),this}setLabelEllipsis(e){return this.eLabel.classList.toggle(`ag-label-ellipsis`,e),this}setLabelWidth(e){return this.label==null||tG(this.eLabel,e),this}setDisabled(e){e=!!e;let t=this.getGui();return LW(t,e),t.classList.toggle(`ag-disabled`,e),this.disabled=e,this}isDisabled(){return!!this.disabled}},eZ=class extends ewe{constructor(e,t,n,r){super(e,t,n),this.className=r}postConstruct(){super.postConstruct();let{width:e,value:t,onValueChange:n,ariaLabel:r}=this.config;e!=null&&this.setWidth(e),t!=null&&this.setValue(t),n!=null&&this.onValueChange(n),r!=null&&this.setAriaLabel(r),this.className&&this.addCss(this.className),this.refreshAriaLabelledBy()}setLabel(e){return super.setLabel(e),this.refreshAriaLabelledBy(),this}refreshAriaLabelledBy(){let e=this.getAriaElement(),t=this.getLabelId(),n=this.getLabel();n==null||n==``||bve(e)!==null?SW(e,``):SW(e,t??``)}setAriaLabel(e){return xW(this.getAriaElement(),e),this.refreshAriaLabelledBy(),this}onValueChange(e){return this.addManagedListeners(this,{fieldValueChanged:()=>e(this.getValue())}),this}getWidth(){return this.getGui().clientWidth}setWidth(e){return nG(this.getGui(),e),this}getPreviousValue(){return this.previousValue}getValue(){return this.value}setValue(e,t){return this.value===e?this:(this.previousValue=this.value,this.value=e,t||this.dispatchLocalEvent({type:`fieldValueChanged`}),this)}};function twe(e){return{tag:`div`,role:`presentation`,children:[{tag:`div`,ref:`eLabel`,cls:`ag-input-field-label`},{tag:`div`,ref:`eWrapper`,cls:`ag-wrapper ag-input-wrapper`,role:`presentation`,children:[{tag:e,ref:`eInput`,cls:`ag-input-field-input`}]}]}}var tZ=class extends eZ{constructor(e,t,n=`text`,r=`input`){super(e,e?.template??twe(r),[],t),this.inputType=n,this.displayFieldTag=r,this.eLabel=null,this.eWrapper=null,this.eInput=null}postConstruct(){super.postConstruct(),this.setInputType(this.inputType);let{eLabel:e,eWrapper:t,eInput:n,className:r}=this;e.classList.add(`${r}-label`),t.classList.add(`${r}-input-wrapper`),n.classList.add(`${r}-input`),this.addCss(`ag-input-field`),n.id=n.id||`ag-${this.getCompId()}-input`;let{inputName:i,inputWidth:a,inputPlaceholder:o,autoComplete:s,tabIndex:c}=this.config;i!=null&&this.setInputName(i),a!=null&&this.setInputWidth(a),o!=null&&this.setInputPlaceholder(o),s!=null&&this.setAutoComplete(s),this.addInputListeners(),this.activateTabIndex([n],c)}addInputListeners(){this.addManagedElementListeners(this.eInput,{input:e=>this.setValue(e.target.value)})}setInputType(e){this.displayFieldTag===`input`&&(this.inputType=e,oG(this.eInput,`type`,e))}getInputElement(){return this.eInput}getWrapperElement(){return this.eWrapper}setInputWidth(e){return tG(this.eWrapper,e),this}setInputName(e){return this.getInputElement().setAttribute(`name`,e),this}getFocusableElement(){return this.eInput}setMaxLength(e){let t=this.eInput;return t.maxLength=e,this}setInputPlaceholder(e){return oG(this.eInput,`placeholder`,e),this}setInputAriaLabel(e){return xW(this.eInput,e),this.refreshAriaLabelledBy(),this}setDisabled(e){return LW(this.eInput,e),super.setDisabled(e)}setAutoComplete(e){if(e===!0)oG(this.eInput,`autocomplete`,null);else{let t=typeof e==`string`?e:`off`;oG(this.eInput,`autocomplete`,t)}return this}},nZ=class extends tZ{constructor(e,t=`ag-checkbox`,n=`checkbox`){super(e,t,n),this.labelAlignment=`right`,this.selected=!1,this.readOnly=!1,this.passive=!1}postConstruct(){super.postConstruct();let{readOnly:e,passive:t,name:n}=this.config;typeof e==`boolean`&&this.setReadOnly(e),typeof t==`boolean`&&this.setPassive(t),n!=null&&this.setName(n)}addInputListeners(){this.addManagedElementListeners(this.eInput,{click:this.onCheckboxClick.bind(this)}),this.addManagedElementListeners(this.eLabel,{click:this.toggle.bind(this)})}getNextValue(){return this.selected===void 0||!this.selected}setPassive(e){this.passive=e}isReadOnly(){return this.readOnly}setReadOnly(e){this.eWrapper.classList.toggle(`ag-disabled`,e),this.eInput.disabled=e,this.readOnly=e}setDisabled(e){return this.eWrapper.classList.toggle(`ag-disabled`,e),super.setDisabled(e)}toggle(){if(this.eInput.disabled)return;let e=this.isSelected(),t=this.getNextValue();this.passive?this.dispatchChange(t,e):this.setValue(t)}getValue(){return this.isSelected()}setValue(e,t){return this.refreshSelectedClass(e),this.setSelected(e,t),this}setName(e){let t=this.getInputElement();return t.name=e,this}isSelected(){return this.selected}setSelected(e,t){if(this.isSelected()===e)return;this.previousValue=this.isSelected(),e=this.selected=typeof e==`boolean`?e:void 0;let n=this.eInput;n.checked=e,n.indeterminate=e===void 0,t||this.dispatchChange(this.selected,this.previousValue)}dispatchChange(e,t,n){this.dispatchLocalEvent({type:`fieldValueChanged`,selected:e,previousValue:t,event:n});let r=this.getInputElement();this.eventSvc.dispatchEvent({type:`checkboxChanged`,id:r.id,name:r.name,selected:e,previousValue:t})}onCheckboxClick(e){if(this.passive||this.eInput.disabled)return;let t=this.isSelected(),n=this.selected=e.target.checked;this.refreshSelectedClass(n),this.dispatchChange(n,t,e)}refreshSelectedClass(e){let t=this.eWrapper.classList;t.toggle(`ag-checked`,e===!0),t.toggle(`ag-indeterminate`,e==null)}},rZ={selector:`AG-CHECKBOX`,component:nZ},nwe=`.ag-checkbox-cell{height:100%}`,rwe={tag:`div`,cls:`ag-cell-wrapper ag-checkbox-cell`,role:`presentation`,children:[{tag:`ag-checkbox`,ref:`eCheckbox`,role:`presentation`}]},iwe=class extends Yq{constructor(){super(rwe,[rZ]),this.eCheckbox=null,this.registerCSS(nwe)}init(e){this.refresh(e);let{eCheckbox:t,beans:n}=this,r=t.getInputElement();r.setAttribute(`tabindex`,`-1`),CW(r,`polite`),this.addManagedListeners(r,{click:e=>{if(xJ(e),t.isDisabled())return;let n=t.getValue();this.onCheckboxChanged(n)},dblclick:e=>{xJ(e)}}),this.addManagedElementListeners(e.eGridCell,{keydown:r=>{if(r.key===$.SPACE&&!t.isDisabled()){e.eGridCell===dW(n)&&t.toggle();let i=t.getValue();this.onCheckboxChanged(i),r.preventDefault()}}})}refresh(e){return this.params=e,this.updateCheckbox(e),!0}updateCheckbox(e){let t,n=!0,{value:r,column:i,node:a}=e;if(a.group&&i){if(typeof r==`boolean`)t=r;else{let e=i.getColId();e.startsWith(`ag-Grid-AutoColumn`)?t=r==null||r===``?void 0:r===`true`:a.aggData&&a.aggData[e]!==void 0||a.sourceRowIndex>=0?t=r??void 0:n=!1}}else t=r??void 0;let{eCheckbox:o}=this;if(!n){o.setDisplayed(!1);return}o.setValue(t);let s=e.disabled??!i?.isCellEditable(a);o.setDisabled(s);let c=this.getLocaleTextFunc(),l=jW(c,t),u=s?l:`${c(`ariaToggleCellValue`,`Press SPACE to toggle cell value`)} (${l})`;o.setInputAriaLabel(u)}onCheckboxChanged(e){let{params:t}=this,{column:n,node:r,value:i}=t,{editSvc:a}=this.beans;if(!n)return;let o={rowNode:r,column:n};a?.dispatchCellEvent(o,null,`cellEditingStarted`,{value:i});let s=r.setDataValue(n,e,`ui`);a?.dispatchCellEvent(o,null,`cellEditingStopped`,{oldValue:i,newValue:e,valueChanged:s}),s||this.updateCheckbox(t)}},awe={tag:`div`,cls:`ag-skeleton-container`},owe=class extends Yq{constructor(){super(awe)}init(e){let t=`ag-cell-skeleton-renderer-${this.getCompId()}`;this.getGui().setAttribute(`id`,t),this.addDestroyFunc(()=>SW(e.eParentOfValue)),SW(e.eParentOfValue,t),e.deferRender?this.setupLoading(e):e.node.failedLoad?this.setupFailed():this.setupLoading(e)}setupFailed(){let e=this.getLocaleTextFunc();this.getGui().textContent=e(`loadingError`,`ERR`);let t=e(`ariaSkeletonCellLoadingFailed`,`Row failed to load`);xW(this.getGui(),t)}setupLoading(e){let t=rX({tag:`div`,cls:`ag-skeleton-effect`}),n=e.node.rowIndex;if(n!=null){let e=75+25*(n%2==0?Math.sin(n):Math.cos(n));t.style.width=`${e}%`}this.getGui().appendChild(t);let r=this.getLocaleTextFunc(),i=e.deferRender?r(`ariaDeferSkeletonCellLoading`,`Cell is loading`):r(`ariaSkeletonCellLoading`,`Row data is loading`);xW(this.getGui(),i)}refresh(e){return!1}},swe={moduleName:`CheckboxCellRenderer`,version:aK,userComponents:{agCheckboxCellRenderer:iwe}},cwe={moduleName:`SkeletonCellRenderer`,version:aK,userComponents:{agSkeletonCellRenderer:owe}};function lwe(e,t){let n=e.colModel.getColDefCol(t);return n?n.getColDef():null}function uwe(e){return e.colModel.getColumnDefs(!0)}function dwe(e,t,n){return e.colNames.getDisplayNameForColumn(t,n)||``}function fwe(e,t){return e.colModel.getColDefCol(t)}function pwe(e){return e.colModel.getColDefCols()}function mwe(e,t){return YX(e,t,`api`)}function hwe(e){return ZX(e)}function gwe(e){JCe(e,`api`)}function _we(e){return e.visibleCols.isPinningLeft()||e.visibleCols.isPinningRight()}function vwe(e){return e.visibleCols.isPinningLeft()}function ywe(e){return e.visibleCols.isPinningRight()}function bwe(e,t){return e.visibleCols.getColAfter(t)}function xwe(e,t){return e.visibleCols.getColBefore(t)}function Swe(e,t,n){e.colModel.setColsVisible(t,n,`api`)}function Cwe(e,t,n){e.pinnedCols?.setColsPinned(t,n,`api`)}function wwe(e){return e.colModel.getCols()}function Twe(e){return e.visibleCols.leftCols}function Ewe(e){return e.visibleCols.centerCols}function Dwe(e){return e.visibleCols.rightCols}function Owe(e){return e.visibleCols.allCols}function kwe(e){return e.colViewport.getViewportColumns()}function iZ(e,t){if(!e)return;let n=e,r={};for(let e of Object.keys(n)){if(t&&t.indexOf(e)>=0||IG.has(e))continue;let i=n[e];r[e]=typeof i==`object`&&i&&i.constructor===Object?iZ(i):i}return r}var Awe=class extends Q{constructor(){super(...arguments),this.beanName=`colDefFactory`}wireBeans(e){this.rowGroupColsSvc=e.rowGroupColsSvc,this.pivotColsSvc=e.pivotColsSvc}getColumnDefs(e,t,n,r,i=!1){let a=e.slice();t?a.sort((e,t)=>n.indexOf(e)-n.indexOf(t)):(n||i)&&a.sort((e,t)=>r.indexOf(e)-r.indexOf(t));let o=this.rowGroupColsSvc?.columns,s=this.pivotColsSvc?.columns;return this.buildColumnDefs(a,o,s)}buildColumnDefs(e,t=[],n=[]){let r=[],i={};for(let a of e){let e=this.createDefFromColumn(a,t,n),o=!0,s=e,c=a.getOriginalParent(),l=null;for(;c;){let e=null;if(c.isPadding()){c=c.getOriginalParent();continue}let t=i[c.getGroupId()];if(t){t.children.push(s),o=!1;break}if(e=this.createDefFromGroup(c),e&&(e.children=[s],i[e.groupId]=e,s=e,c=c.getOriginalParent()),c!=null&&l===c){o=!1;break}l=c}o&&r.push(s)}return r}createDefFromGroup(e){let t=iZ(e.getColGroupDef(),[`children`]);return t&&(t.groupId=e.getGroupId()),t}createDefFromColumn(e,t,n){let r=iZ(e.getColDef());return r.colId=e.getColId(),r.width=e.getActualWidth(),r.rowGroup=e.isRowGroupActive(),r.rowGroupIndex=e.isRowGroupActive()?t.indexOf(e):null,r.pivot=e.isPivotActive(),r.pivotIndex=e.isPivotActive()?n.indexOf(e):null,r.aggFunc=e.isValueActive()?e.getAggFunc():null,r.hide=!e.isVisible()||void 0,r.pinned=e.isPinned()?e.getPinned():null,r.sort=e.getSortDef(),r.sortIndex=e.getSortIndex()==null?null:e.getSortIndex(),r}},jwe=class extends Q{constructor(){super(...arguments),this.beanName=`colFlex`,this.columnsHidden=!1}refreshFlexedColumns(e={}){let t=e.source??`flex`;e.viewportWidth!=null&&(this.flexViewportWidth=e.viewportWidth);let n=this.flexViewportWidth,{visibleCols:r,colDelayRenderSvc:i}=this.beans,a=r.centerCols,o=-1;if(e.resizingCols){let t=new Set(e.resizingCols);for(let e=a.length-1;e>=0;e--)if(t.has(a[e])){o=e;break}}let s=!1,c=a.map((e,t)=>{let n=e.getFlex(),r=n!=null&&n>0&&t>o;return s||=r,{col:e,isFlex:r,flex:Math.max(0,n??0),initialSize:e.getActualWidth(),min:e.getMinWidth(),max:e.getMaxWidth(),targetSize:0}});if(s?(i?.hideColumns(`colFlex`),this.columnsHidden=!0):this.columnsHidden&&this.revealColumns(i),!n||!s)return[];let l=c.length,u=c.reduce((e,t)=>e+t.flex,0),d=n,f=(e,n)=>{e.frozenSize=n,e.col.setActualWidth(n,t),d-=n,u-=e.flex,--l},p=e=>e.frozenSize!=null;for(let e of c)e.isFlex||f(e,e.initialSize);for(;l>0;){let e=Math.round(u<1?d*u:d),t,n=0,r=0;for(let i of c){if(p(i))continue;t=i,r+=e*(i.flex/u);let a=r-n,o=Math.round(a);i.targetSize=o,n+=o}t&&(t.targetSize+=e-n);let i=0;for(let e of c){if(p(e))continue;let t=e.targetSize,n=Math.min(Math.max(t,e.min),e.max);i+=n-t,e.violationType=n===t?void 0:n<t?`max`:`min`,e.targetSize=n}let a=i===0?`all`:i>0?`min`:`max`;for(let e of c)p(e)||(a===`all`||e.violationType===a)&&f(e,e.targetSize)}e.skipSetLeft||r.setLeftValues(t),e.updateBodyWidths&&r.updateBodyWidths();let m=c.filter(e=>e.isFlex&&!e.violationType).map(e=>e.col);if(e.fireResizedEvent){let e=c.filter(e=>e.initialSize!==e.frozenSize).map(e=>e.col),n=c.filter(e=>e.flex).map(e=>e.col);GX(this.eventSvc,e,!0,t,n)}return this.revealColumns(i),m}revealColumns(e){this.columnsHidden&&=(e?.revealColumns(`colFlex`),!1)}initCol(e){let{flex:t,initialFlex:n}=e.colDef;t===void 0?n!==void 0&&(e.flex=n):e.flex=t}setColFlex(e,t){e.flex=t??null,e.dispatchStateUpdatedEvent(`flex`)}},aZ=e=>{if(typeof e==`bigint`)return e;let t;if(typeof e==`number`)t=e;else if(typeof e==`string`&&(t=e.trim(),t===``||(t.endsWith(`n`)&&(t=t.slice(0,-1)),!/^[+-]?\d+$/.test(t))))return null;if(t==null)return null;try{return BigInt(t)}catch{return null}},oZ=`T`,Mwe=RegExp(`[${oZ} ]`),Nwe=RegExp(`^\\d{4}-\\d{2}-\\d{2}(${oZ}\\d{2}:\\d{2}:\\d{2}\\D?)?`);function sZ(e,t){return e.toString().padStart(t,`0`)}function cZ(e,t=!0,n=oZ){if(!e)return null;let r=[e.getFullYear(),e.getMonth()+1,e.getDate()].map(e=>sZ(e,2)).join(`-`);return t&&(r+=n+[e.getHours(),e.getMinutes(),e.getSeconds()].map(e=>sZ(e,2)).join(`:`)),r}function lZ(e,t=!0){return e?t?[String(e.getFullYear()),String(e.getMonth()+1),sZ(e.getDate(),2),sZ(e.getHours(),2),`:${sZ(e.getMinutes(),2)}`,`:${sZ(e.getSeconds(),2)}
19`]:[e.getFullYear(),e.getMonth()+1,sZ(e.getDate(),2)].map(String):null}var uZ=e=>{if(e>3&&e<21)return`th`;switch(e%10){case 1:return`st`;case 2:return`nd`;case 3:return`rd`}return`th`},dZ=[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],fZ=[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`];function Pwe(e,t){if(t==null)return cZ(e,!1);let n=sZ(e.getFullYear(),4),r={YYYY:()=>n.slice(n.length-4,n.length),YY:()=>n.slice(n.length-2,n.length),Y:()=>`${e.getFullYear()}`,MMMM:()=>dZ[e.getMonth()],MMM:()=>dZ[e.getMonth()].slice(0,3),MM:()=>sZ(e.getMonth()+1,2),Mo:()=>`${e.getMonth()+1}${uZ(e.getMonth()+1)}`,M:()=>`${e.getMonth()+1}`,Do:()=>`${e.getDate()}${uZ(e.getDate())}`,DD:()=>sZ(e.getDate(),2),D:()=>`${e.getDate()}`,dddd:()=>fZ[e.getDay()],ddd:()=>fZ[e.getDay()].slice(0,3),dd:()=>fZ[e.getDay()].slice(0,2),do:()=>`${e.getDay()}${uZ(e.getDay())}`,d:()=>`${e.getDay()}`},i=new RegExp(Object.keys(r).join(`|`),`g`);return t.replace(i,e=>e in r?r[e]():e)}function pZ(e,t=!1){return!!mZ(e,t)}function Fwe(e){return pZ(e,!0)}function mZ(e,t=!1,n){if(!e||!n&&!Nwe.test(e))return null;let[r,i]=e.split(Mwe);if(!r)return null;let a=r.split(`-`).map(e=>Number.parseInt(e,10));if(a.filter(e=>!isNaN(e)).length!==3)return null;let[o,s,c]=a,l=new Date(o,s-1,c);if(l.getFullYear()!==o||l.getMonth()!==s-1||l.getDate()!==c||!i&&t)return null;if(!i||i===`00:00:00`)return l;let[u,d,f]=i.split(`:`).map(e=>Number.parseInt(e,10));if(u>=0&&u<24)l.setHours(u);else if(t)return null;if(d>=0&&d<60)l.setMinutes(d);else if(t)return null;if(f>=0&&f<60)l.setSeconds(f);else if(t)return null;return l}function hZ(e,t,n){if(!t||!e)return;if(!n)return e[t];let r=t.split(`.`),i=e;for(let e=0;e<r.length;e++){if(i==null)return;i=i[r[e]]}return i}var Iwe=[`dateTimeString`,`dateString`,`text`,`number`,`bigint`,`boolean`,`date`],Lwe=class extends Q{constructor(){super(...arguments),this.beanName=`dataTypeSvc`,this.dataTypeDefinitions={},this.isPendingInference=!1,this.isColumnTypeOverrideInDataTypeDefinitions=!1,this.columnStateUpdatesPendingInference={},this.columnStateUpdateListenerDestroyFuncs=[],this.columnDefinitionPropsPerDataType={number(){return{cellEditor:`agNumberCellEditor`}},bigint({filterModuleBean:e}){return e?{cellEditor:`agTextCellEditor`}:{cellEditor:`agTextCellEditor`,comparator:{default:Vwe,absolute:Hwe}}},boolean(){return{cellEditor:`agCheckboxCellEditor`,cellRenderer:`agCheckboxCellRenderer`,getFindText:()=>null,suppressKeyboardEvent:({node:e,event:t,column:n})=>t.key===$.SPACE&&n.isCellEditable(e)}},date({formatValue:e}){return{cellEditor:`agDateCellEditor`,keyCreator:e}},dateString({formatValue:e}){return{cellEditor:`agDateStringCellEditor`,keyCreator:e}},dateTime(e){return this.date(e)},dateTimeString(e){return this.dateString(e)},object({formatValue:e,colModel:t,colId:n}){return{cellEditorParams:{useFormatter:!0},comparator:(r,i)=>{let a=t.getColDefCol(n),o=a?.getColDef();if(!a||!o)return 0;let s=r==null?``:e({column:a,node:null,value:r}),c=i==null?``:e({column:a,node:null,value:i});return s===c?0:s>c?1:-1},keyCreator:e}},text(){return{}}}}wireBeans(e){this.colModel=e.colModel}postConstruct(){this.processDataTypeDefinitions(),this.addManagedPropertyListener(`dataTypeDefinitions`,e=>{this.processDataTypeDefinitions(),this.colModel.recreateColumnDefs(e)})}processDataTypeDefinitions(){let e=this.getDefaultDataTypes(),t={},n={},r=e=>t=>{let{column:n,node:r,value:i}=t,a=n.getColDef().valueFormatter;return a===e.groupSafeValueFormatter&&(a=e.valueFormatter),this.beans.valueSvc.formatValue(n,r,i,a)};for(let i of Object.keys(e)){let a=e[i],o={...a,groupSafeValueFormatter:vZ(a,this.gos)};t[i]=o,n[i]=r(o)}let i=this.gos.get(`dataTypeDefinitions`)??{},a={};for(let o of Object.keys(i)){let s=i[o],c=this.processDataTypeDefinition(s,i,[o],e);c&&(t[o]=c,s.dataTypeMatcher&&(a[o]=s.dataTypeMatcher),n[o]=r(c))}let{valueParser:o,valueFormatter:s}=e.object,{valueParser:c,valueFormatter:l}=t.object;this.hasObjectValueParser=c!==o,this.hasObjectValueFormatter=l!==s,this.formatValueFuncs=n,this.dataTypeDefinitions=t,this.dataTypeMatchers=this.sortKeysInMatchers(a,e)}sortKeysInMatchers(e,t){let n={...e};for(let r of Iwe)delete n[r],n[r]=e[r]??t[r].dataTypeMatcher;return n}processDataTypeDefinition(e,t,n,r){let i,a=e.extendsDataType;if(e.columnTypes&&(this.isColumnTypeOverrideInDataTypeDefinitions=!0),e.extendsDataType===e.baseDataType){let n=r[a],o=t[a];if(n&&o&&(n=o),!_Z(e,n,a))return;i=gZ(n,e)}else{if(n.includes(a)){gK(44);return}let o=t[a];if(!_Z(e,o,a))return;let s=this.processDataTypeDefinition(o,t,[...n,a],r);if(!s)return;i=gZ(s,e)}return{...i,groupSafeValueFormatter:vZ(i,this.gos)}}updateColDefAndGetColumnType(e,t,n){let{cellDataType:r}=t;r===void 0&&(r=e.cellDataType);let{field:i}=t;if((r==null||r===!0)&&(r=this.canInferCellDataType(e,t)?this.inferCellDataType(i,n):!1),this.addFormulaCellEditorToColDef(e,t),!r){e.cellDataType=!1;return}let a=this.dataTypeDefinitions[r];if(!a){gK(47,{cellDataType:r});return}return e.cellDataType=r,a.groupSafeValueFormatter&&(e.valueFormatter=a.groupSafeValueFormatter),a.valueParser&&(e.valueParser=a.valueParser),a.suppressDefaultProperties||this.setColDefPropertiesForBaseDataType(e,r,a,n),a.columnTypes}addFormulaCellEditorToColDef(e,t){(t.allowFormula??e.allowFormula)&&!t.cellEditor&&(e.cellEditor=`agFormulaCellEditor`)}addColumnListeners(e){if(!this.isPendingInference)return;let t=this.columnStateUpdatesPendingInference[e.getColId()];if(!t)return;let n=e=>{t.add(e.key)};e.__addEventListener(`columnStateUpdated`,n),this.columnStateUpdateListenerDestroyFuncs.push(()=>e.__removeEventListener(`columnStateUpdated`,n))}canInferCellDataType(e,t){let{gos:n}=this;if(!xK(n))return!1;let r={cellRenderer:!0,valueGetter:!0,valueParser:!0,refData:!0}
vendor: 29,262 bytes, lines 19-30
19;if(bZ(t,r))return!1;let i=t.type===null?e.type:t.type;if(i){let e=n.get(`columnTypes`)??{};if(Tq(i).some(t=>{let n=e[t.trim()];return n&&bZ(n,r)}))return!1}return!bZ(e,r)}inferCellDataType(e,t){if(!e)return;let n,r=this.getInitialData();if(r?n=hZ(r,e,e.includes(`.`)&&!this.gos.get(`suppressFieldDotNotation`)):this.initWaitForRowData(t),n!=null)return Object.keys(this.dataTypeMatchers).find(e=>this.dataTypeMatchers[e](n))??`object`}getInitialData(){let e=this.gos.get(`rowData`);if(e?.length)return e[0];if(this.initialData)return this.initialData;{let e=this.beans.rowModel.rootNode?._leafs;if(e?.length)return e[0].data}return null}initWaitForRowData(e){if(this.columnStateUpdatesPendingInference[e]=new Set,this.isPendingInference)return;this.isPendingInference=!0;let t=this.isColumnTypeOverrideInDataTypeDefinitions,{colAutosize:n,eventSvc:r}=this.beans;t&&n&&(n.shouldQueueResizeOperations=!0);let[i]=this.addManagedEventListeners({rowDataUpdateStarted:e=>{let{firstRowData:a}=e;a&&(i?.(),this.isPendingInference=!1,this.processColumnsPendingInference(a,t),this.columnStateUpdatesPendingInference={},t&&n?.processResizeOperations(),r.dispatchEvent({type:`dataTypesInferred`}))}})}processColumnsPendingInference(e,t){this.initialData=e;let n=[];this.destroyColumnStateUpdateListeners();let r={},i={};for(let e of Object.keys(this.columnStateUpdatesPendingInference)){let a=this.columnStateUpdatesPendingInference[e],o=this.colModel.getCol(e);if(!o)continue;let s=o.getColDef();if(!this.resetColDefIntoCol(o,`cellDataTypeInferred`))continue;let c=o.getColDef();if(t&&c.type&&c.type!==s.type){let t=Uwe(o,a);t.rowGroup&&t.rowGroupIndex==null&&(r[e]=t),t.pivot&&t.pivotIndex==null&&(i[e]=t),n.push(t)}}t&&n.push(...this.generateColumnStateForRowGroupAndPivotIndexes(r,i)),n.length&&YX(this.beans,{state:n},`cellDataTypeInferred`),this.initialData=null}generateColumnStateForRowGroupAndPivotIndexes(e,t){let n={},{rowGroupColsSvc:r,pivotColsSvc:i}=this.beans;return r?.restoreColumnOrder(n,e),i?.restoreColumnOrder(n,t),Object.values(n)}resetColDefIntoCol(e,t){let n=e.getUserProvidedColDef();if(!n)return!1;let r=_q(this.beans,n,e.getColId());return e.setColDef(r,n,t),!0}getDateStringTypeDefinition(e){let{dateString:t}=this.dataTypeDefinitions;return e?this.getDataTypeDefinition(e)??t:t}getDateParserFunction(e){return this.getDateStringTypeDefinition(e).dateParser}getDateFormatterFunction(e){return this.getDateStringTypeDefinition(e).dateFormatter}getDateIncludesTimeFlag(e){return e===`dateTime`||e===`dateTimeString`}getDataTypeDefinition(e){let t=e.getColDef();if(t.cellDataType)return this.dataTypeDefinitions[t.cellDataType]}getBaseDataType(e){return this.getDataTypeDefinition(e)?.baseDataType}checkType(e,t){if(t==null)return!0;let n=this.getDataTypeDefinition(e)?.dataTypeMatcher;return!n||e.getColDef().allowFormula&&this.beans.formula?.isFormula(t)?!0:n(t)}validateColDef(e,t,n,r){if(e.cellDataType===`object`){let i=e=>e?.cellDataType==null||e?.cellDataType===!0,a=i(t)&&i(n),o=e=>gK(48,{property:e,inferred:a,colId:r}),{object:s}=this.dataTypeDefinitions;e.valueFormatter===s.groupSafeValueFormatter&&!this.hasObjectValueFormatter&&o(`Formatter`),e.editable&&e.valueParser===s.valueParser&&!this.hasObjectValueParser&&o(`Parser`)}}postProcess(e){let t=e.cellDataType;if(!t||typeof t!=`string`)return;let{dataTypeDefinitions:n,beans:r,formatValueFuncs:i}=this,a=n[t];a&&r.colFilter?.setColDefPropsForDataType(e,a,i[t])}getFormatValue(e){return this.formatValueFuncs[e]}isColPendingInference(e){return this.isPendingInference&&!!this.columnStateUpdatesPendingInference[e]}setColDefPropertiesForBaseDataType(e,t,n,r){let i=this.formatValueFuncs[t],a=this.columnDefinitionPropsPerDataType[n.baseDataType]({colDef:e,cellDataType:t,colModel:this.colModel,dataTypeDefinition:n,colId:r,formatValue:i,filterModuleBean:this.beans.filterManager});e.cellEditor===`agFormulaCellEditor`&&a.cellEditor!==e.cellEditor&&(a.cellEditor=e.cellEditor),Object.assign(e,a)}getDateObjectTypeDef(e){let t=this.getLocaleTextFunc(),n=this.getDateIncludesTimeFlag(e);return{baseDataType:e,valueParser:e=>mZ(e.newValue&&String(e.newValue)),valueFormatter:e=>e.value==null?``:!(e.value instanceof Date)||isNaN(e.value.getTime())?t(`invalidDate`,`Invalid Date`):cZ(e.value,n)??``,dataTypeMatcher:e=>e instanceof Date}}getDateStringTypeDef(e){let t=this.getDateIncludesTimeFlag(e);return{baseDataType:e,dateParser:e=>mZ(e)??void 0,dateFormatter:e=>cZ(e??null,t)??void 0,valueParser:e=>pZ(String(e.newValue))?e.newValue:null,valueFormatter:e=>pZ(String(e.value))?String(e.value):``,dataTypeMatcher:e=>typeof e==`string`&&pZ(e)}}getDefaultDataTypes(){let e=this.getLocaleTextFunc();return{number:{baseDataType:`number`,valueParser:e=>e.newValue?.trim?.()===``?null:Number(e.newValue),valueFormatter:t=>t.value==null?``:typeof t.value!=`number`||isNaN(t.value)?e(`invalidNumber`,`Invalid Number`):String(t.value),dataTypeMatcher:e=>typeof e==`number`},bigint:{baseDataType:`bigint`,valueParser:e=>{let{newValue:t}=e;return t==null||typeof t==`string`&&t.trim()===``?null:aZ(t)},valueFormatter:t=>t.value==null?``:typeof t.value==`bigint`?String(t.value):e(`invalidBigInt`,`Invalid BigInt`),dataTypeMatcher:e=>typeof e==`bigint`},text:{baseDataType:`text`,valueParser:e=>e.newValue===``?null:iW(e.newValue),dataTypeMatcher:e=>typeof e==`string`},boolean:{baseDataType:`boolean`,valueParser:e=>e.newValue==null?e.newValue:e.newValue?.trim?.()===``?null:String(e.newValue).toLowerCase()===`true`,valueFormatter:e=>e.value==null?``:String(e.value),dataTypeMatcher:e=>typeof e==`boolean`},date:this.getDateObjectTypeDef(`date`),dateString:this.getDateStringTypeDef(`dateString`),dateTime:this.getDateObjectTypeDef(`dateTime`),dateTimeString:{...this.getDateStringTypeDef(`dateTimeString`),dataTypeMatcher:e=>typeof e==`string`&&Fwe(e)},object:{baseDataType:`object`,valueParser:()=>null,valueFormatter:e=>iW(e.value)??``}}}destroyColumnStateUpdateListeners(){for(let e of this.columnStateUpdateListenerDestroyFuncs)e();this.columnStateUpdateListenerDestroyFuncs=[]}destroy(){this.dataTypeDefinitions={},this.dataTypeMatchers={},this.formatValueFuncs={},this.columnStateUpdatesPendingInference={},this.destroyColumnStateUpdateListeners(),super.destroy()}};function gZ(e,t){let n={...e,...t};return e.columnTypes&&t.columnTypes&&t.appendColumnTypes&&(n.columnTypes=[...Tq(e.columnTypes),...Tq(t.columnTypes)]),n}function _Z(e,t,n){return t?t.baseDataType===e.baseDataType||(gK(46),!1):(gK(45,{parentCellDataType:n}),!1)}var Rwe=e=>typeof e==`bigint`||typeof e==`number`,zwe=e=>e===`number`||e===`bigint`;function vZ(e,t){if(e.valueFormatter)return n=>{let{node:r,colDef:i,column:a,value:o}=n;if(r?.group){let t=(i.pivotValueColumn??a).getAggFunc();if(t){if(t===`first`||t===`last`)return e.valueFormatter(n);let{baseDataType:r}=e;if(zwe(r)&&t!==`count`){if(Rwe(o))return e.valueFormatter(n);if(o==null)return;if(typeof o==`object`){if(typeof o.toNumber==`function`)return e.valueFormatter({...n,value:o.toNumber()});if(`value`in o)return e.valueFormatter({...n,value:o.value})}}return}}else if(t.get(`groupHideOpenParents`)&&n.column.isRowGroupActive()&&typeof n.value==`string`&&!e.dataTypeMatcher?.(n.value))return;return e.valueFormatter(n)}}function Bwe(e,t,n,r){if(!t[n])return!1;let i=e[n];return i===null?(t[n]=!1,!1):r===void 0?!!i:i===r}function Vwe(e,t){if(e==null)return t==null?0:-1;if(t==null)return 1;let n=aZ(e),r=aZ(t);return n!=null&&r!=null?n===r?0:n>r?1:-1:0}function Hwe(e,t){if(e==null)return t==null?0:-1;if(t==null)return 1;let n=yZ(e),r=yZ(t);return n!=null&&r!=null?n===r?0:n>r?1:-1:0}function yZ(e){let t=aZ(e);return t==null?null:t<0n?-t:t}function bZ(e,t){return[[`cellRenderer`,`agSparklineCellRenderer`],[`valueGetter`,void 0],[`valueParser`,void 0],[`refData`,void 0]].some(([n,r])=>Bwe(e,t,n,r))}function Uwe(e,t){let n=QX(e);for(let e of t)delete n[e],e===`rowGroup`?delete n.rowGroupIndex:e===`pivot`&&delete n.pivotIndex;return n}var Wwe={moduleName:`DataType`,version:aK,beans:[Lwe],dependsOn:[swe]},Gwe={moduleName:`ColumnFlex`,version:aK,beans:[jwe]},xZ={moduleName:`ColumnApi`,version:aK,beans:[Awe],apiFunctions:{getColumnDef:lwe,getDisplayNameForColumn:dwe,getColumn:fwe,getColumns:pwe,applyColumnState:mwe,getColumnState:hwe,resetColumnState:gwe,isPinning:_we,isPinningLeft:vwe,isPinningRight:ywe,getDisplayedColAfter:bwe,getDisplayedColBefore:xwe,setColumnsVisible:Swe,setColumnsPinned:Cwe,getAllGridColumns:wwe,getDisplayedLeftColumns:Twe,getDisplayedCenterColumns:Ewe,getDisplayedRightColumns:Dwe,getAllDisplayedColumns:Owe,getAllDisplayedVirtualColumns:kwe,getColumnDefs:uwe}},Kwe=class extends Q{constructor(){super(...arguments),this.beanName=`colNames`}getDisplayNameForColumn(e,t,n=!1){if(!e)return null;let r=this.getHeaderName(e.getColDef(),e,null,null,t),{aggColNameSvc:i}=this.beans;return n&&i?i.getHeaderName(e,r):r}getDisplayNameForProvidedColumnGroup(e,t,n){let r=t?.getColGroupDef();return r?this.getHeaderName(r,null,e,t,n):null}getDisplayNameForColumnGroup(e,t){return this.getDisplayNameForProvidedColumnGroup(e,e.getProvidedColumnGroup(),t)}getHeaderName(e,t,n,r,i){let a=e.headerValueGetter;if(a){let o=eq(this.gos,{colDef:e,column:t,columnGroup:n,providedColumnGroup:r,location:i});return typeof a==`function`?a(o):typeof a==`string`?this.beans.expressionSvc?.evaluate(a,o)??null:``}return e.headerName==null?e.field?gve(e.field):``:e.headerName}},qwe=class extends Q{constructor(){super(...arguments),this.beanName=`colViewport`,this.colsWithinViewport=[],this.headerColsWithinViewport=[],this.colsWithinViewportHash=``,this.rowsOfHeadersToRenderLeft={},this.rowsOfHeadersToRenderRight={},this.rowsOfHeadersToRenderCenter={},this.columnsToRenderLeft=[],this.columnsToRenderRight=[],this.columnsToRenderCenter=[]}wireBeans(e){this.visibleCols=e.visibleCols,this.colModel=e.colModel}postConstruct(){this.suppressColumnVirtualisation=this.gos.get(`suppressColumnVirtualisation`)}getScrollPosition(){return this.scrollPosition}setScrollPosition(e,t,n=!1){let{visibleCols:r}=this,i=r.isBodyWidthDirty;if(e!==this.scrollWidth||t!==this.scrollPosition||i){if(this.scrollWidth=e,this.scrollPosition=t,r.isBodyWidthDirty=!0,this.gos.get(`enableRtl`)){let n=r.bodyWidth;this.viewportLeft=n-t-e,this.viewportRight=n-t}else this.viewportLeft=t,this.viewportRight=e+t;this.colModel.ready&&this.checkViewportColumns(n)}}getColumnHeadersToRender(e){switch(e){case`left`:return this.columnsToRenderLeft;case`right`:return this.columnsToRenderRight;default:return this.columnsToRenderCenter}}getHeadersToRender(e,t){let n;switch(e){case`left`:n=this.rowsOfHeadersToRenderLeft[t];break;case`right`:n=this.rowsOfHeadersToRenderRight[t];break;default:n=this.rowsOfHeadersToRenderCenter[t]}return n??[]}extractViewportColumns(){let e=this.visibleCols.centerCols;this.isColumnVirtualisationSuppressed()?(this.colsWithinViewport=e,this.headerColsWithinViewport=e):(this.colsWithinViewport=e.filter(this.isColumnInRowViewport.bind(this)),this.headerColsWithinViewport=e.filter(this.isColumnInHeaderViewport.bind(this)))}isColumnVirtualisationSuppressed(){return this.suppressColumnVirtualisation||this.viewportRight===0}clear(){this.rowsOfHeadersToRenderLeft={},this.rowsOfHeadersToRenderRight={},this.rowsOfHeadersToRenderCenter={},this.colsWithinViewportHash=``}isColumnInHeaderViewport(e){return e.isAutoHeaderHeight()||Jwe(e)?!0:this.isColumnInRowViewport(e)}isColumnInRowViewport(e){if(e.isAutoHeight())return!0;let t=e.getLeft()||0,n=t+e.getActualWidth(),r=this.viewportLeft-200,i=this.viewportRight+200;return!(t<r&&n<r)&&!(t>i&&n>i)}getViewportColumns(){let{leftCols:e,rightCols:t}=this.visibleCols;return this.colsWithinViewport.concat(e).concat(t)}getColsWithinViewport(e){if(!this.colModel.colSpanActive)return this.colsWithinViewport;let t=e=>{let t=e.getLeft();return nW(t)&&t>this.viewportLeft},n=this.isColumnVirtualisationSuppressed()?void 0:this.isColumnInRowViewport.bind(this),{visibleCols:r}=this,i=r.centerCols;return r.getColsForRow(e,i,n,t)}checkViewportColumns(e=!1){this.extractViewport()&&this.eventSvc.dispatchEvent({type:`virtualColumnsChanged`,afterScroll:e})}calculateHeaderRows(){let{leftCols:e,rightCols:t}=this.visibleCols;this.columnsToRenderLeft=e,this.columnsToRenderRight=t,this.columnsToRenderCenter=this.colsWithinViewport;let n=e=>{let t=new Set,n={};for(let r of e){let e=r.getParent(),i=r.isSpanHeaderHeight();for(;e&&!t.has(e);){if(i&&e.isPadding()){e=e.getParent();continue}let r=e.getProvidedColumnGroup().getLevel();n[r]??(n[r]=[]),n[r].push(e),t.add(e),e=e.getParent()}}return n};this.rowsOfHeadersToRenderLeft=n(e),this.rowsOfHeadersToRenderRight=n(t),this.rowsOfHeadersToRenderCenter=n(this.headerColsWithinViewport)}extractViewport(){let e=e=>`${e.getId()}-${e.getPinned()||`normal`}`;this.extractViewportColumns();let t=this.getViewportColumns().map(e).join(`#`),n=this.colsWithinViewportHash!==t;return n&&(this.colsWithinViewportHash=t,this.calculateHeaderRows()),n}};function Jwe(e){for(;e;){if(e.isAutoHeaderHeight())return!0;e=e.getParent()}return!1}var Ywe={moduleName:`CellRendererFunction`,version:aK,beans:[class extends Q{constructor(){super(...arguments),this.beanName=`agCompUtils`}adaptFunction(e,t){if(!e.cellRenderer)return null;class n{refresh(){return!1}getGui(){return this.eGui}init(e){let n=t(e),r=typeof n;if(r===`string`||r===`number`||r===`boolean`){this.eGui=ZW(`<span>`+n+`</span>`);return}if(n==null){this.eGui=rX({tag:`span`});return}this.eGui=n}}return n}}]},Xwe=class extends AG{constructor(){super(...arguments),this.beanName=`registry`}registerDynamicBeans(e){if(e){this.dynamicBeans??={};for(let t of Object.keys(e))this.dynamicBeans[t]=e[t]}}createDynamicBean(e,t,...n){if(!this.dynamicBeans)throw Error(this.getDynamicError(e,!0));let r=this.dynamicBeans[e];if(r==null){if(t)throw Error(this.getDynamicError(e,!1));return}return new r(...n)}};function Zwe(e){return typeof e==`object`&&!!e.getComp}var Qwe=class extends Xwe{constructor(){super(...arguments),this.agGridDefaults={},this.agGridDefaultOverrides={},this.jsComps={},this.selectors={},this.icons={}}postConstruct(){let e=this.gos.get(`components`);if(e!=null)for(let t of Object.keys(e))this.jsComps[t]=e[t]}registerModule(e){let{icons:t,userComponents:n,dynamicBeans:r,selectors:i}=e;if(n){let e=(e,t,n,r)=>{this.agGridDefaults[e]=t,(n||r)&&(this.agGridDefaultOverrides[e]={params:n,processParams:r})};for(let t of Object.keys(n)){let r=n[t];if(Zwe(r)&&(r=r.getComp(this.beans)),typeof r==`object`){let{classImp:n,params:i,processParams:a}=r;e(t,n,i,a)}else e(t,r)}}this.registerDynamicBeans(r);for(let e of i??[])this.selectors[e.selector]=e;if(t)for(let e of Object.keys(t))this.icons[e]=t[e]}getUserComponent(e,t){let n=(e,t,n,r)=>({componentFromFramework:t,component:e,params:n,processParams:r}),{frameworkOverrides:r}=this.beans,i=r.frameworkComponent(t,this.gos.get(`components`));if(i!=null)return n(i,!0);let a=this.jsComps[t];if(a)return n(a,r.isFrameworkComponent(a));let o=this.agGridDefaults[t];if(o){let e=this.agGridDefaultOverrides[t];return n(o,!1,e?.params,e?.processParams)}return this.beans.validation?.missingUserComponent(e,t,this.agGridDefaults,this.jsComps),null}getSelector(e){return this.selectors[e]}getIcon(e){return this.icons[e]}getDynamicError(e,t){return t?yK(279,{name:e}):this.beans.validation?.missingDynamicBean(e)??yK(256)}},$we=23,eTe=class extends Q{constructor(){super(...arguments),this.beanName=`ctrlsSvc`,this.params={},this.ready=!1,this.readyCallbacks=[]}postConstruct(){this.addEventListener(`ready`,()=>{if(this.updateReady(),this.ready){for(let e of this.readyCallbacks)e(this.params);this.readyCallbacks.length=0}},this.beans.frameworkOverrides.runWhenReadyAsync?.()??!1)}updateReady(){let e=Object.values(this.params);this.ready=e.length===$we&&e.every(e=>e?.isAlive()??!1)}whenReady(e,t){this.ready?t(this.params):this.readyCallbacks.push(t),e.addDestroyFunc(()=>{let e=this.readyCallbacks.indexOf(t);e>=0&&this.readyCallbacks.splice(e,1)})}register(e,t){this.params[e]=t,this.updateReady(),this.ready&&this.dispatchLocalEvent({type:`ready`}),t.addDestroyFunc(()=>{this.updateReady()})}get(e){return this.params[e]}getGridBodyCtrl(){return this.params.gridBodyCtrl}getHeaderRowContainerCtrls(){let{leftHeader:e,centerHeader:t,rightHeader:n}=this.params;return[e,n,t]}getHeaderRowContainerCtrl(e){let t=this.params;switch(e){case`left`:return t.leftHeader;case`right`:return t.rightHeader;default:return t.centerHeader}}getScrollFeature(){return this.getGridBodyCtrl().scrollFeature}},tTe=`:where([class^=ag-]),:where([class^=ag-]):after,:where([class^=ag-]):before{box-sizing:border-box}:where([class^=ag-]):where(button){color:inherit}:where([class^=ag-]):where(div,span,label):focus-visible{box-shadow:inset var(--ag-focus-shadow);outline:none;&:where(.invalid){box-shadow:inset var(--ag-focus-error-shadow)}}:where([class^=ag-]) ::-ms-clear{display:none}.ag-hidden{display:none!important}.ag-invisible{visibility:hidden!important}.ag-tab-guard{display:block;height:0;position:absolute;width:0}.ag-tab-guard-top{top:1px}.ag-tab-guard-bottom{bottom:1px}.ag-measurement-container{height:0;overflow:hidden;visibility:hidden;width:0}.ag-measurement-element-border{display:inline-block}.ag-measurement-element-border:before{border-left:var(--ag-internal-measurement-border);content:"";display:block}.ag-popup-child{top:0;z-index:5}.ag-popup-child:where(:not(.ag-tooltip-custom)){box-shadow:var(--ag-popup-shadow)}.ag-input-wrapper,.ag-picker-field-wrapper{align-items:center;display:flex;flex:1 1 auto;line-height:normal;position:relative}.ag-input-field{align-items:center;display:flex;flex-direction:row}.ag-input-field-input:where(:not([type=checkbox],[type=radio])){flex:1 1 auto;min-width:0;width:100%}.ag-chart,.ag-dnd-ghost,.ag-external,.ag-popup,.ag-root-wrapper{cursor:default;line-height:normal;white-space:normal;-webkit-font-smoothing:antialiased;background-color:var(--ag-background-color);color:var(--ag-text-color);color-scheme:var(--ag-browser-color-scheme);font-family:var(--ag-font-family);font-size:var(--ag-font-size);font-weight:var(--ag-font-weight);--ag-indentation-level:0}:where(.ag-icon):before{align-items:center;background-color:currentcolor;color:inherit;content:"";display:flex;font-family:inherit;font-size:var(--ag-icon-size);font-style:normal;font-variant:normal;height:var(--ag-icon-size);justify-content:center;line-height:var(--ag-icon-size);-webkit-mask-size:contain;mask-size:contain;text-transform:none;width:var(--ag-icon-size)}.ag-icon{background-position:50%;background-repeat:no-repeat;background-size:contain;color:var(--ag-icon-color);display:block;height:var(--ag-icon-size);position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:var(--ag-icon-size)}.ag-disabled .ag-icon,[disabled] .ag-icon{opacity:.5}.ag-icon-grip.ag-disabled,.ag-icon-grip[disabled]{opacity:.35}.ag-icon-loading{animation-duration:1s;animation-iteration-count:infinite;animation-name:spin;animation-timing-function:linear}@keyframes spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.ag-resizer{pointer-events:none;position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none;z-index:1}:where(.ag-resizer){&.ag-resizer-topLeft{cursor:nwse-resize;height:5px;left:0;top:0;width:5px}&.ag-resizer-top{cursor:ns-resize;height:5px;left:5px;right:5px;top:0}&.ag-resizer-topRight{cursor:nesw-resize;height:5px;right:0;top:0;width:5px}&.ag-resizer-right{bottom:5px;cursor:ew-resize;right:0;top:5px;width:5px}&.ag-resizer-bottomRight{bottom:0;cursor:nwse-resize;height:5px;right:0;width:5px}&.ag-resizer-bottom{bottom:0;cursor:ns-resize;height:5px;left:5px;right:5px}&.ag-resizer-bottomLeft{bottom:0;cursor:nesw-resize;height:5px;left:0;width:5px}&.ag-resizer-left{bottom:5px;cursor:ew-resize;left:0;top:5px;width:5px}}.ag-menu{background-color:var(--ag-menu-background-color);border:var(--ag-menu-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-menu-shadow);color:var(--ag-menu-text-color);max-height:100%;overflow-y:auto;position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}`,SZ=typeof window!=`object`||!window?.document?.fonts?.forEach,CZ=(e,t,n,r,i,a,o=!1)=>{if(SZ)return;let s=e;r&&(s=`@layer ${CSS.escape(r).replaceAll(`\\.`,`.`)} { ${e} }`);let c=DZ.map.get(t);if(c||(c=[],DZ.map.set(t,c)),c.some(e=>e.injectedCss===s))return;let l=document.createElement(`style`);a&&l.setAttribute(`nonce`,a),l.dataset.agCss=n,l.dataset.agCssVersion=aK,l.textContent=s;let u={rawCss:e,injectedCss:s,el:l,priority:i,isParams:o},d;for(let e of c){if(e.priority>i)break;d=e}if(d){d.el.after(l);let e=c.indexOf(d);c.splice(e+1,0,u)}else t.nodeName===`STYLE`?t.after(l):t.insertBefore(l,t.querySelector(`:not(title, meta)`)),c.push(u)},wZ=(e,t,n,r)=>{CZ(tTe,e,`shared`,t,0,n),r?.forEach((r,i)=>r.forEach(r=>CZ(r,e,i,t,0,n)))},nTe=(e,t,n,r,i,a)=>{if(SZ)return;let o=DZ.grids.get(e);o?o.paramsCss=t:DZ.grids.set(e,{styleContainer:r,paramsCss:t}),TZ(r),t&&n&&CZ(t,r,n,i,2,a,!0)},rTe=e=>{let t=DZ.grids.get(e)?.styleContainer;t&&(DZ.grids.delete(e),Array.from(DZ.grids.values()).some(e=>e.styleContainer===t)?TZ(t):(TZ(t,!0),DZ.map.delete(t)))},TZ=(e,t=!1)=>{let n=new Set;for(let t of DZ.grids.values())t.styleContainer===e&&n.add(t.paramsCss);let r=DZ.map.get(e)??[];for(let e=r.length-1;e>=0;e--)(t||r[e].isParams&&!n.has(r[e].rawCss))&&(r[e].el.remove(),r.splice(e,1))},EZ=()=>{let e=globalThis.agStyleInjectionVersions??(globalThis.agStyleInjectionVersions=new Map),t=e.get(aK);return t||(t={map:new WeakMap,grids:new Map,paramsId:0},e.set(aK,t)),t},DZ=EZ(),OZ=e=>new AZ(e),kZ=`$default`,iTe=0,AZ=class{constructor({feature:e,params:t,modeParams:n={},css:r,cssImports:i}){this.feature=e,this.css=r,this.cssImports=i,this.modeParams={[kZ]:{...n[kZ]??{},...t??{}},...n}}use(e,t,n){let r=this._inject;if(r==null){let{css:e}=this;if(e){let t=`ag-theme-${this.feature??`part`}-${++iTe}`;typeof e==`function`&&(e=e()),e=`:where(.${t}) { 20${e} 21} 22`;for(let t of this.cssImports??[])e=`@import url(${JSON.stringify(t)}); 23${e}`;r={css:e,class:t}}else r=!1;this._inject=r}return r&&e&&CZ(r.css,e,r.class,t,1,n),r?r.class:!1}},aTe=e=>e.replace(/[A-Z]|\d+/g,e=>`-${e}`).toLowerCase(),jZ=e=>`--ag-${aTe(e)}`,MZ=e=>`var(${jZ(e)})`,oTe=(e,t,n)=>Math.max(t,Math.min(n,e)),sTe=e=>{let t=new Map;return n=>{let r=n;return t.has(r)||t.set(r,e(n)),t.get(r)}},NZ=e=>({ref:`accentColor`,mix:e}),PZ=e=>({ref:`foregroundColor`,mix:e}),FZ=e=>({ref:`foregroundColor`,mix:e,onto:`backgroundColor`}),cTe=e=>({ref:`foregroundColor`,mix:e,onto:`headerBackgroundColor`}),IZ={ref:`backgroundColor`},LZ={ref:`foregroundColor`},RZ={ref:`accentColor`},zZ={backgroundColor:`#fff`,foregroundColor:`#181d1f`,borderColor:PZ(.15),chromeBackgroundColor:FZ(.02),browserColorScheme:`light`},lTe={...zZ,textColor:LZ,accentColor:`#2196f3`,invalidColor:`#e02525`,fontFamily:[`-apple-system`,`BlinkMacSystemFont`,`Segoe UI`,`Roboto`,`Oxygen-Sans`,`Ubuntu`,`Cantarell`,`Helvetica Neue`,`sans-serif`],subtleTextColor:{ref:`textColor`,mix:.5},borderWidth:1,borderRadius:4,spacing:8,fontSize:14,fontWeight:`inherit`,focusShadow:{spread:3,color:NZ(.5)},focusErrorShadow:{spread:3,color:{ref:`invalidColor`,onto:`backgroundColor`,mix:.5}},popupShadow:`0 0 16px #00000026`,cardShadow:`0 1px 4px 1px #00000018`,dropdownShadow:{ref:`cardShadow`},listItemHeight:{calc:`max(iconSize, dataFontSize) + widgetVerticalSpacing`},dragAndDropImageBackgroundColor:IZ,dragAndDropImageBorder:!0,dragAndDropImageNotAllowedBorder:{color:{ref:`invalidColor`,onto:`dragAndDropImageBackgroundColor`,mix:.5}},dragAndDropImageShadow:{ref:`popupShadow`},iconSize:16,iconColor:`inherit`,toggleButtonWidth:28,toggleButtonHeight:18,toggleButtonOnBackgroundColor:RZ,toggleButtonOffBackgroundColor:FZ(.3),toggleButtonSwitchBackgroundColor:IZ,toggleButtonSwitchInset:2,tooltipBackgroundColor:{ref:`chromeBackgroundColor`},tooltipErrorBackgroundColor:{ref:`invalidColor`,onto:`backgroundColor`,mix:.1},tooltipTextColor:{ref:`textColor`},tooltipErrorTextColor:{ref:`invalidColor`},tooltipBorder:!0,tooltipErrorBorder:{color:{ref:`invalidColor`,onto:`backgroundColor`,mix:.25}},panelBackgroundColor:IZ,panelTitleBarHeight:{ref:`headerHeight`},panelTitleBarBackgroundColor:{ref:`headerBackgroundColor`},panelTitleBarIconColor:{ref:`headerTextColor`},panelTitleBarTextColor:{ref:`headerTextColor`},panelTitleBarFontFamily:{ref:`headerFontFamily`},panelTitleBarFontSize:{ref:`headerFontSize`},panelTitleBarFontWeight:{ref:`headerFontWeight`},panelTitleBarBorder:!0,dialogShadow:{ref:`popupShadow`},dialogBorder:{color:PZ(.2)},widgetContainerHorizontalPadding:{calc:`spacing * 1.5`},widgetContainerVerticalPadding:{calc:`spacing * 1.5`},widgetHorizontalSpacing:{calc:`spacing * 1.5`},widgetVerticalSpacing:{ref:`spacing`},dataFontSize:{ref:`fontSize`},headerBackgroundColor:{ref:`chromeBackgroundColor`},headerFontFamily:{ref:`fontFamily`},headerFontSize:{ref:`fontSize`},headerFontWeight:500,headerTextColor:{ref:`textColor`},headerHeight:{calc:`max(iconSize, dataFontSize) + spacing * 4 * headerVerticalPaddingScale`},headerVerticalPaddingScale:1,menuBorder:{color:PZ(.2)},menuBackgroundColor:FZ(.03),menuTextColor:FZ(.95),menuShadow:{ref:`popupShadow`},menuSeparatorColor:{ref:`borderColor`}},uTe=[`colorScheme`,`color`,`length`,`scale`,`borderStyle`,`border`,`shadow`,`image`,`fontFamily`,`fontWeight`,`duration`],dTe=sTe(e=>(e=e.toLowerCase(),uTe.find(t=>e.endsWith(t.toLowerCase()))??`length`)),BZ=e=>typeof e==`object`&&e?.ref?MZ(e.ref):typeof e==`string`?e:typeof e==`number`&&String(e),VZ=e=>{if(typeof e==`string`)return e;if(typeof e==`object`&&e&&`ref`in e){let t=MZ(e.ref);return e.mix==null?t:`color-mix(in srgb, ${e.onto?MZ(e.onto):`transparent`}, ${t} ${oTe(e.mix*100,0,100)}%)`}return!1},fTe=BZ,HZ=e=>typeof e==`string`?e:typeof e==`number`?`${e}px`:typeof e==`object`&&e&&`calc`in e?`calc(${e.calc.replace(/ ?[*/+] ?/g,` $& `).replace(/-?\b[a-z][a-z0-9]*\b(?![-(])/gi,e=>e[0]===`-`?e:` `+MZ(e)+` `)})`:typeof e==`object`&&e&&`ref`in e?MZ(e.ref):!1,pTe=BZ,UZ=(e,t)=>typeof e==`string`?e:e===!0?UZ({},t):e===!1?t===`columnBorder`?UZ({color:`transparent`},t):`none`:typeof e==`object`&&e&&`ref`in e?MZ(e.ref):GZ(e.style??`solid`)+` `+HZ(e.width??{ref:`borderWidth`})+` `+VZ(e.color??{ref:`borderColor`}),WZ=e=>[HZ(e.offsetX??0),HZ(e.offsetY??0),HZ(e.radius??0),HZ(e.spread??0),VZ(e.color??{ref:`foregroundColor`}),...e.inset?[`inset`]:[]].join(` `),mTe=e=>typeof e==`string`?e:e===!1?`none`:typeof e==`object`&&e&&`ref`in e?MZ(e.ref):Array.isArray(e)?e.map(WZ).join(`, `):WZ(e),GZ=BZ,KZ=e=>typeof e==`string`?e.includes(`,`)?e:qZ(e):typeof e==`object`&&e&&`googleFont`in e?KZ(e.googleFont):typeof e==`object`&&e&&`ref`in e?MZ(e.ref):Array.isArray(e)?e.map(e=>(typeof e==`object`&&`googleFont`in e&&(e=e.googleFont),qZ(e))).join(`, `):!1,qZ=e=>/^[\w-]+$|\w\(/.test(e)?e:JSON.stringify(e),hTe=BZ,JZ=e=>typeof e==`string`?e:typeof e==`object`&&e&&`url`in e?`url(${JSON.stringify(e.url)})`:typeof e==`object`&&e&&`svg`in e?JZ({url:`data:image/svg+xml,${encodeURIComponent(e.svg)}`}):typeof e==`object`&&e&&`ref`in e?MZ(e.ref):!1,gTe={color:VZ,colorScheme:fTe,length:HZ,scale:pTe,border:UZ,borderStyle:GZ,shadow:mTe,image:JZ,fontFamily:KZ,fontWeight:hTe,duration:(e,t,n)=>typeof e==`string`?e:typeof e==`number`?(e>=10&&n?.warn(104,{value:e,param:t}),`${e}s`):typeof e==`object`&&e&&`ref`in e?MZ(e.ref):!1},_Te=(e,t,n)=>gTe[dTe(e)](t,e,n),vTe=(e,t)=>new YZ({themeLogger:e,overridePrefix:t}),YZ=class e{constructor(e,t=[]){this.params=e,this.parts=t}withPart(t){return typeof t==`function`&&(t=t()),t instanceof AZ?new e(this.params,[...this.parts,t]):(this.params.themeLogger.preInitErr(259,`Invalid part`,{part:t}),this)}withoutPart(e){return this.withPart(OZ({feature:e}))}withParams(e,t=kZ){return this.withPart(OZ({modeParams:{[t]:e}}))}_startUse({styleContainer:e,cssLayer:t,nonce:n,loadThemeGoogleFonts:r,moduleCss:i}){if(SZ)return;bTe(),wZ(e,t,n,i);let a=yTe(this);if(a.length>0)for(let e of a)r&&xTe(e,n);for(let r of this.parts)r.use(e,t,n)}_getCssClass(){return this._cssClassCache??=XZ(this.parts).map(e=>e.use(void 0,void 0,void 0)).filter(Boolean).concat(this._getParamsClassName()).join(` `)}_getParamsClassName(){return this._paramsClassName??=`ag-theme-params-${++EZ().paramsId}`}_getModeParams(){let e=this._paramsCache;if(!e){let t={[kZ]:{...lTe}};for(let e of XZ(this.parts))for(let n of Object.keys(e.modeParams)){let r=e.modeParams[n];if(r){let e=t[n]??(t[n]={}),i=new Set;for(let t of Object.keys(r)){let n=r[t];n!==void 0&&(e[t]=n,i.add(t))}if(n===kZ)for(let e of Object.keys(t)){let n=t[e];if(e!==kZ)for(let e of i)delete n[e]}}}this._paramsCache=e=t}return e}_getParamsCss(){if(!this._paramsCssCache){let e=``,t=``,n=this._getModeParams(),{overridePrefix:r,themeLogger:i}=this.params,a=r?`--ag-${r}-`:void 0;for(let r of Object.keys(n)){let o=n[r];if(r!==kZ){let n=`:where([data-ag-theme-mode="${typeof CSS==`object`?CSS.escape(r):r}"]) & { 24`;e+=n,t+=n}for(let n of Object.keys(o).sort()){let r=o[n],s=_Te(n,r,i);if(s===!1)i.error(107,{key:n,value:r});else{let r=jZ(n),i=a?r.replace(`--ag-`,a):r,o=r.replace(`--ag-`,`--ag-inherited-`);e+=` ${r}: var(${o}, ${s}); 25`,t+=` ${o}: var(${i}); 26`}}r!==kZ&&(e+=`} 27`,t+=`} 28`)}let o=`:where(.${this._getParamsClassName()})`,s=`${o} { 29${e}} 30`;s+=`:has(> ${o}
30):not(${o}) { 31${t}} 32`,this._paramsCssCache=s}return this._paramsCssCache}},XZ=e=>{let t=new Map;for(let n of e)t.set(n.feature,n);let n=[];for(let r of e)(!r.feature||t.get(r.feature)===r)&&n.push(r);return n},yTe=e=>{let t=new Set,n=e=>{if(Array.isArray(e))e.forEach(n);else{let n=e?.googleFont;typeof n==`string`&&t.add(n)}};return Object.values(e._getModeParams()).flatMap(e=>Object.values(e)).forEach(n),Array.from(t).sort()},ZZ=!1,bTe=()=>{if(!ZZ){ZZ=!0;for(let e of Array.from(document.head.querySelectorAll(`style[data-ag-scope="legacy"]`)))e.remove()}},xTe=async(e,t)=>{CZ(`@import url('https://${STe}/css2?family=${encodeURIComponent(e)}:wght@100;200;300;400;500;600;700;800;900&display=swap'); 33`,document.head,`googleFont:${e}`,void 0,0,t)},STe=`fonts.googleapis.com`,QZ={changeKey:`listItemHeight`,type:`length`,defaultValue:24},CTe=class extends AG{constructor(){super(...arguments),this.beanName=`environment`,this.sizeEls=new Map,this.lastKnownValues=new Map,this.sizesMeasured=!1,this.globalCSS=[]}wireBeans(e){this.eRootDiv=e.eRootDiv}postConstruct(){let{gos:e,eRootDiv:t}=this;e.setInstanceDomData(t);let n=e.get(`themeStyleContainer`),r=typeof ShadowRoot<`u`,i=r&&t.getRootNode()instanceof ShadowRoot;this.eStyleContainer=(typeof n==`function`?n():n)??(i?t:document.head),!n&&!i&&r&&wTe(t,this.shadowRootError.bind(this),this.addDestroyFunc.bind(this)),this.cssLayer=e.get(`themeCssLayer`),this.styleNonce=e.get(`styleNonce`),this.addManagedPropertyListener(`theme`,()=>this.handleThemeChange()),this.handleThemeChange(),this.getSizeEl(QZ),this.initVariables(),this.addDestroyFunc(()=>rTe(this)),this.mutationObserver=new MutationObserver(()=>{this.fireStylesChangedEvent(`theme`)}),this.addDestroyFunc(()=>this.mutationObserver.disconnect())}applyThemeClasses(e,t=[]){let{theme:n}=this,r=n?n._getCssClass():this.applyLegacyThemeClasses();for(let t of Array.from(e.classList))t.startsWith(`ag-theme-`)&&e.classList.remove(t);if(r){let n=e.className;e.className=`${n}${n?` `:``}${r}${t?.length?` `+t.join(` `):``}`}}applyLegacyThemeClasses(){let e=``;this.mutationObserver.disconnect();let t=this.eRootDiv;for(;t;){let n=!1;for(let r of Array.from(t.classList))r.startsWith(`ag-theme-`)&&(n=!0,e=e?`${e} ${r}`:r);n&&this.mutationObserver.observe(t,{attributes:!0,attributeFilter:[`class`]}),t=t.parentElement}return e}addGlobalCSS(e,t){this.theme?CZ(e,this.eStyleContainer,t,this.cssLayer,0,this.styleNonce):this.globalCSS.push([e,t])}getDefaultListItemHeight(){return this.getCSSVariablePixelValue(QZ)}getCSSVariablePixelValue(e){let t=this.lastKnownValues.get(e);if(t!=null)return t;let n=this.measureSizeEl(e);return n===`detached`||n===`no-styles`?(e.cacheDefault&&this.lastKnownValues.set(e,e.defaultValue),e.defaultValue):(this.lastKnownValues.set(e,n),n)}measureSizeEl(e){let t=this.getSizeEl(e);if(t.offsetParent==null)return`detached`;let n=t.offsetWidth;return n===$Z?`no-styles`:(this.sizesMeasured=!0,n)}getMeasurementContainer(){let e=this.eMeasurementContainer;return e||(e=this.eMeasurementContainer=pG({tag:`div`,cls:`ag-measurement-container`}),this.eRootDiv.appendChild(e)),e}getSizeEl(e){let t=this.sizeEls.get(e);if(t)return t;let n=this.getMeasurementContainer();t=pG({tag:`div`});let r=this.setSizeElStyles(t,e);n.appendChild(t),this.sizeEls.set(e,t);let{type:i,noWarn:a}=e;if(i!==`length`&&i!==`border`)return t;let o=this.measureSizeEl(e);o===`no-styles`&&!a&&this.varError(r,e.defaultValue);let s=cG(this.beans,t,()=>{let t=this.measureSizeEl(e);t!==`detached`&&t!==`no-styles`&&(this.lastKnownValues.set(e,t),t!==o&&(o=t,this.fireStylesChangedEvent(e.changeKey)))});return this.addDestroyFunc(()=>s()),t}setSizeElStyles(e,t){let{changeKey:n,type:r}=t,i=jZ(n);return r===`border`?(i.endsWith(`-width`)&&(i=i.slice(0,-6)),e.className=`ag-measurement-element-border`,e.style.setProperty(`--ag-internal-measurement-border`,`var(${i}, solid ${$Z}px)`)):e.style.width=`var(${i}, ${$Z}px)`,i}handleThemeChange(){let{gos:e,theme:t}=this,n=e.get(`theme`),r;if(n===`legacy`)r=void 0;else{let e=n??this.getDefaultTheme();e instanceof YZ?r=e:this.themeError(e)}r!==t&&this.handleNewTheme(r),this.postProcessThemeChange(r,n)}handleNewTheme(e){let{gos:t,eRootDiv:n,globalCSS:r}=this,i=this.getAdditionalCss();if(e){wZ(this.eStyleContainer,this.cssLayer,this.styleNonce,i);for(let[e,t]of r)CZ(e,this.eStyleContainer,t,this.cssLayer,0,this.styleNonce);r.length=0}this.theme=e,e?._startUse({loadThemeGoogleFonts:t.get(`loadThemeGoogleFonts`),styleContainer:this.eStyleContainer,cssLayer:this.cssLayer,nonce:this.styleNonce,moduleCss:i}),nTe(this,e?._getParamsCss()??null,e?._getParamsClassName()??null,this.eStyleContainer,this.cssLayer,this.styleNonce),this.applyThemeClasses(n),this.fireStylesChangedEvent(`theme`)}fireStylesChangedEvent(e){this.eventSvc.dispatchEvent({type:`stylesChanged`,[`${e}Changed`]:!0})}}
33,$Z=15538,wTe=(e,t,n)=>{let r=60,i=setInterval(()=>{typeof ShadowRoot<`u`&&e.getRootNode()instanceof ShadowRoot&&(t(),clearInterval(i)),(e.isConnected||--r<0)&&clearInterval(i)},1e3);n(()=>clearInterval(i))},TTe
vendor: 28,397 bytes, line 33
33=`.ag-aria-description-container{border:0;z-index:9999;clip:rect(1px,1px,1px,1px);height:1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.ag-unselectable{-webkit-user-select:none;-moz-user-select:none;user-select:none}.ag-selectable{-webkit-user-select:text;-moz-user-select:text;user-select:text}.ag-shake-left-to-right{animation-direction:alternate;animation-duration:.2s;animation-iteration-count:infinite;animation-name:ag-shake-left-to-right}@keyframes ag-shake-left-to-right{0%{padding-left:6px;padding-right:2px}to{padding-left:2px;padding-right:6px}}.ag-body-horizontal-scroll-viewport,.ag-body-vertical-scroll-viewport,.ag-body-viewport,.ag-center-cols-viewport,.ag-floating-bottom-viewport,.ag-floating-top-viewport,.ag-header-viewport,.ag-sticky-bottom-viewport,.ag-sticky-top-viewport{flex:1 1 auto;height:100%;min-width:0;overflow:hidden;position:relative}.ag-viewport{position:relative}.ag-spanning-container{position:absolute;top:0;z-index:1}.ag-body-viewport,.ag-center-cols-viewport,.ag-floating-bottom-viewport,.ag-floating-top-viewport,.ag-header-viewport,.ag-sticky-bottom-viewport,.ag-sticky-top-viewport{overflow-x:auto;-ms-overflow-style:none!important;scrollbar-width:none!important}.ag-body-viewport::-webkit-scrollbar,.ag-center-cols-viewport::-webkit-scrollbar,.ag-floating-bottom-viewport::-webkit-scrollbar,.ag-floating-top-viewport::-webkit-scrollbar,.ag-header-viewport::-webkit-scrollbar,.ag-sticky-bottom-viewport::-webkit-scrollbar,.ag-sticky-top-viewport::-webkit-scrollbar{display:none!important}.ag-body-viewport{display:flex;overflow-x:hidden;&:where(.ag-layout-normal){overflow-y:auto;-webkit-overflow-scrolling:touch}}.ag-floating-bottom-container,.ag-floating-top-container,.ag-sticky-bottom-container,.ag-sticky-top-container{min-height:1px}.ag-center-cols-viewport{min-height:100%;width:100%}.ag-body-horizontal-scroll-viewport{overflow-x:scroll}.ag-body-vertical-scroll-viewport{overflow-y:scroll}.ag-body-container,.ag-body-horizontal-scroll-container,.ag-body-vertical-scroll-container,.ag-center-cols-container,.ag-floating-bottom-container,.ag-floating-bottom-full-width-container,.ag-floating-top-container,.ag-full-width-container,.ag-header-container,.ag-pinned-left-cols-container,.ag-pinned-left-sticky-bottom,.ag-pinned-right-cols-container,.ag-pinned-right-sticky-bottom,.ag-sticky-bottom-container,.ag-sticky-top-container{position:relative}.ag-floating-bottom-container,.ag-floating-top-container,.ag-header-container,.ag-pinned-left-floating-bottom,.ag-pinned-left-floating-top,.ag-pinned-right-floating-bottom,.ag-pinned-right-floating-top,.ag-sticky-bottom-container,.ag-sticky-top-container{height:100%;white-space:nowrap}.ag-center-cols-container,.ag-pinned-right-cols-container{display:block}.ag-body-horizontal-scroll-container{height:100%}.ag-body-vertical-scroll-container{width:100%}.ag-floating-bottom-full-width-container,.ag-floating-top-full-width-container,.ag-full-width-container,.ag-sticky-bottom-full-width-container,.ag-sticky-top-full-width-container{pointer-events:none;position:absolute;top:0}:where(.ag-ltr) .ag-floating-bottom-full-width-container,:where(.ag-ltr) .ag-floating-top-full-width-container,:where(.ag-ltr) .ag-full-width-container,:where(.ag-ltr) .ag-sticky-bottom-full-width-container,:where(.ag-ltr) .ag-sticky-top-full-width-container{left:0}:where(.ag-rtl) .ag-floating-bottom-full-width-container,:where(.ag-rtl) .ag-floating-top-full-width-container,:where(.ag-rtl) .ag-full-width-container,:where(.ag-rtl) .ag-sticky-bottom-full-width-container,:where(.ag-rtl) .ag-sticky-top-full-width-container{right:0}.ag-full-width-container{width:100%}.ag-floating-bottom-full-width-container,.ag-floating-top-full-width-container{display:inline-block;height:100%;overflow:hidden;width:100%}.ag-body{display:flex;flex:1 1 auto;flex-direction:row!important;min-height:0;position:relative}.ag-body-horizontal-scroll,.ag-body-vertical-scroll{display:flex;min-height:0;min-width:0;position:relative;&:where(.ag-scrollbar-invisible){bottom:0;position:absolute;&:where(.ag-apple-scrollbar){opacity:0;transition:opacity .4s;visibility:hidden;&:where(.ag-scrollbar-active),&:where(.ag-scrollbar-scrolling){opacity:1;visibility:visible}}}}.ag-body-horizontal-scroll{width:100%;&:where(.ag-scrollbar-invisible){left:0;right:0}}.ag-body-vertical-scroll{height:100%;&:where(.ag-scrollbar-invisible){top:0;z-index:10}}:where(.ag-ltr) .ag-body-vertical-scroll{&:where(.ag-scrollbar-invisible){right:0}}:where(.ag-rtl) .ag-body-vertical-scroll{&:where(.ag-scrollbar-invisible){left:0}}.ag-force-vertical-scroll{overflow-y:scroll!important}.ag-horizontal-left-spacer,.ag-horizontal-right-spacer{height:100%;min-width:0;overflow-x:scroll;&:where(.ag-scroller-corner){overflow-x:hidden}}:where(.ag-row-animation) .ag-row{transition:transform .4s,top .4s,opacity .2s;&:where(.ag-after-created){transition:transform .4s,top .4s,height .4s,opacity .2s}}:where(.ag-row-animation.ag-prevent-animation) .ag-row{transition:none!important;&:where(.ag-row.ag-after-created){transition:none!important}}:where(.ag-row-no-animation) .ag-row{transition:none}.ag-row-loading{align-items:center;display:flex}.ag-row-position-absolute{position:absolute}.ag-row-position-relative{position:relative}.ag-full-width-row{overflow:hidden;pointer-events:all}.ag-row-inline-editing{z-index:1}.ag-row-dragging{z-index:2}.ag-stub-cell{align-items:center;display:flex}.ag-cell{display:inline-block;height:100%;position:absolute;white-space:nowrap;&:focus-visible{box-shadow:none}}.ag-cell-value{flex:1 1 auto}.ag-cell-value:not(.ag-allow-overflow),.ag-group-value{overflow:hidden;text-overflow:ellipsis}.ag-cell-wrap-text{white-space:normal;word-break:break-word}:where(.ag-cell) .ag-icon{display:inline-block;vertical-align:middle}.ag-floating-top{display:flex;overflow:hidden;position:relative;white-space:nowrap;width:100%}:where(.ag-floating-top:not(.ag-invisible)){border-bottom:var(--ag-pinned-row-border)}.ag-floating-bottom{display:flex;overflow:hidden;position:relative;white-space:nowrap;width:100%}:where(.ag-floating-bottom:not(.ag-invisible)){border-top:var(--ag-pinned-row-border)}.ag-sticky-bottom,.ag-sticky-top{background-color:var(--ag-data-background-color);display:flex;height:0;overflow:hidden;position:absolute;width:100%;z-index:1}.ag-sticky-bottom{box-sizing:content-box!important;:where(.ag-pinned-left-sticky-bottom),:where(.ag-pinned-right-sticky-bottom),:where(.ag-sticky-bottom-container){border-top:var(--ag-row-border);box-sizing:border-box}}.ag-opacity-zero{opacity:0!important}.ag-cell-label-container{align-items:center;display:flex;flex-direction:row-reverse;height:100%;justify-content:space-between;width:100%}:where(.ag-right-aligned-header){.ag-cell-label-container{flex-direction:row}.ag-header-cell-text{text-align:end}}.ag-column-group-icons{display:block;:where(.ag-column-group-closed-icon),:where(.ag-column-group-opened-icon){cursor:pointer}}:where(.ag-ltr){direction:ltr;.ag-body,.ag-body-horizontal-scroll,.ag-body-viewport,.ag-floating-bottom,.ag-floating-top,.ag-header,.ag-sticky-bottom,.ag-sticky-top{flex-direction:row}}:where(.ag-rtl){direction:rtl;text-align:right;.ag-body,.ag-body-horizontal-scroll,.ag-body-viewport,.ag-floating-bottom,.ag-floating-top,.ag-header,.ag-sticky-bottom,.ag-sticky-top{flex-direction:row-reverse}.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{display:block}}:where(.ag-rtl){.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{transform:rotate(180deg)}}:where(.ag-rtl){.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{transform:rotate(-180deg)}}:where(.ag-ltr) .ag-row:not(.ag-row-level-0) .ag-pivot-leaf-group{margin-left:var(--ag-row-group-indent-size)}:where(.ag-rtl) .ag-row:not(.ag-row-level-0) .ag-pivot-leaf-group{margin-right:var(--ag-row-group-indent-size)}:where(.ag-ltr) .ag-row-group-leaf-indent{margin-left:calc(var(--ag-cell-widget-spacing) + var(--ag-icon-size))}:where(.ag-rtl) .ag-row-group-leaf-indent{margin-right:calc(var(--ag-cell-widget-spacing) + var(--ag-icon-size))}.ag-value-change-delta{padding:0 2px}.ag-value-change-delta-up{color:var(--ag-value-change-delta-up-color)}.ag-value-change-delta-down{color:var(--ag-value-change-delta-down-color)}.ag-value-change-value{background-color:transparent;border-radius:1px;padding-left:1px;padding-right:1px;transition:background-color 1s}.ag-value-change-value-highlight{background-color:var(--ag-value-change-value-highlight-background-color);transition:background-color .1s}.ag-cell-data-changed{background-color:var(--ag-value-change-value-highlight-background-color)!important}.ag-cell-data-changed-animation{background-color:transparent}.ag-cell-highlight{background-color:var(--ag-range-selection-highlight-color)!important}.ag-row,.ag-spanned-row{color:var(--ag-cell-text-color);font-family:var(--ag-cell-font-family);font-size:var(--ag-cell-font-size);font-weight:var(--ag-cell-font-weight);white-space:nowrap;--ag-internal-content-line-height:calc(min(var(--ag-row-height), var(--ag-line-height, 1000px)) - var(--ag-internal-row-border-width, 1px) - 2px)}.ag-row{background-color:var(--ag-data-background-color);border-bottom:var(--ag-row-border);height:var(--ag-row-height);width:100%;&.ag-row-editing-invalid{background-color:var(--ag-full-row-edit-invalid-background-color)}}:where(.ag-body-vertical-content-no-gap>div>div>div,.ag-body-vertical-content-no-gap>div>div>div>div)>.ag-row-last{border-bottom-color:transparent}.ag-group-contracted,.ag-group-expanded{cursor:pointer}.ag-cell,.ag-full-width-row .ag-cell-wrapper.ag-row-group{border:1px solid transparent;line-height:var(--ag-internal-content-line-height);-webkit-font-smoothing:subpixel-antialiased}:where(.ag-ltr) .ag-cell{border-right:var(--ag-column-border)}:where(.ag-rtl) .ag-cell{border-left:var(--ag-column-border)}.ag-spanned-cell-wrapper{background-color:var(--ag-data-background-color);position:absolute}.ag-spanned-cell-wrapper>.ag-spanned-cell{display:block;position:relative}:where(.ag-ltr) :where(.ag-body-horizontal-content-no-gap) .ag-column-last{border-right-color:transparent}:where(.ag-rtl) :where(.ag-body-horizontal-content-no-gap) .ag-column-last{border-left-color:transparent}.ag-cell-wrapper{align-items:center;display:flex;>:where(:not(.ag-cell-value,.ag-group-value)){align-items:center;display:flex;height:var(--ag-internal-content-line-height)}&:where(.ag-row-group){align-items:flex-start}:where(.ag-full-width-row) &:where(.ag-row-group){align-items:center;height:100%}}:where(.ag-ltr) .ag-cell-wrapper{padding-left:calc(var(--ag-indentation-level)*var(--ag-row-group-indent-size))}:where(.ag-rtl) .ag-cell-wrapper{padding-right:calc(var(--ag-indentation-level)*var(--ag-row-group-indent-size))}:where(.ag-cell-wrap-text:not(.ag-cell-auto-height)) .ag-cell-wrapper{align-items:normal;height:100%;:where(.ag-cell-value){height:100%}}:where(.ag-ltr) .ag-row>.ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}:where(.ag-rtl) .ag-row>.ag-cell-wrapper.ag-row-group{padding-right:calc(var(--ag-cell-horizontal-padding) + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}.ag-cell-focus:not(.ag-cell-range-selected):focus-within,.ag-cell-range-single-cell,.ag-cell-range-single-cell.ag-cell-range-handle,.ag-context-menu-open .ag-cell-focus:not(.ag-cell-range-selected),.ag-context-menu-open .ag-full-width-row.ag-row-focus .ag-cell-wrapper.ag-row-group,.ag-full-width-row.ag-row-focus:focus .ag-cell-wrapper.ag-row-group{border:1px solid;border-color:var(--ag-range-selection-border-color);border-style:var(--ag-range-selection-border-style);outline:initial}.ag-full-width-row.ag-row-focus:focus{box-shadow:none}:where(.ag-ltr) .ag-group-contracted,:where(.ag-ltr) .ag-group-expanded,:where(.ag-ltr) .ag-row-drag,:where(.ag-ltr) .ag-selection-checkbox{margin-right:var(--ag-cell-widget-spacing)}:where(.ag-rtl) .ag-group-contracted,:where(.ag-rtl) .ag-group-expanded,:where(.ag-rtl) .ag-row-drag,:where(.ag-rtl) .ag-selection-checkbox{margin-left:var(--ag-cell-widget-spacing)}.ag-drag-handle-disabled{opacity:.35;pointer-events:none}:where(.ag-ltr) .ag-group-child-count{margin-left:3px}:where(.ag-rtl) .ag-group-child-count{margin-right:3px}.ag-row-highlight-above:after,.ag-row-highlight-below:after,.ag-row-highlight-inside:after{background-color:var(--ag-row-drag-indicator-color);border-radius:calc(var(--ag-row-drag-indicator-width)/2);content:"";height:var(--ag-row-drag-indicator-width);pointer-events:none;position:absolute;width:calc(100% - 1px)}:where(.ag-ltr) .ag-row-highlight-above:after,:where(.ag-ltr) .ag-row-highlight-below:after,:where(.ag-ltr) .ag-row-highlight-inside:after{left:1px}:where(.ag-rtl) .ag-row-highlight-above:after,:where(.ag-rtl) .ag-row-highlight-below:after,:where(.ag-rtl) .ag-row-highlight-inside:after{right:1px}.ag-row-highlight-above:after{top:0}.ag-row-highlight-below:after{bottom:0}.ag-row-highlight-indent:after{display:block;width:auto}:where(.ag-ltr) .ag-row-highlight-indent:after{left:calc((var(--ag-cell-widget-spacing) + var(--ag-icon-size))*2 + var(--ag-cell-horizontal-padding) + var(--ag-row-highlight-level)*var(--ag-row-group-indent-size));right:1px}:where(.ag-rtl) .ag-row-highlight-indent:after{left:1px;right:calc((var(--ag-cell-widget-spacing) + var(--ag-icon-size))*2 + var(--ag-cell-horizontal-padding) + var(--ag-row-highlight-level)*var(--ag-row-group-indent-size))}.ag-row-highlight-inside:after{background-color:var(--ag-selected-row-background-color);border:1px solid var(--ag-range-selection-border-color);display:block;height:auto;inset:0;width:auto}.ag-body,.ag-floating-bottom,.ag-floating-top{background-color:var(--ag-data-background-color)}.ag-row-odd{background-color:var(--ag-odd-row-background-color)}.ag-row-selected:before{background-color:var(--ag-selected-row-background-color);content:"";display:block;inset:0;pointer-events:none;position:absolute}.ag-row-hover.ag-full-width-row.ag-row-group:before,.ag-row-hover:not(.ag-full-width-row):before{background-color:var(--ag-row-hover-color);content:"";display:block;inset:0;pointer-events:none;position:absolute}.ag-row-hover.ag-row-selected:before{background-color:var(--ag-row-hover-color);background-image:linear-gradient(var(--ag-selected-row-background-color),var(--ag-selected-row-background-color))}.ag-row.ag-full-width-row.ag-row-group>*{position:relative}.ag-column-hover{background-color:var(--ag-column-hover-color)}.ag-header-range-highlight{background-color:var(--ag-range-header-highlight-color)}.ag-right-aligned-cell{font-variant-numeric:tabular-nums}:where(.ag-ltr) .ag-right-aligned-cell{text-align:right}:where(.ag-rtl) .ag-right-aligned-cell{text-align:left}.ag-right-aligned-cell .ag-cell-value,.ag-right-aligned-cell .ag-group-value{margin-left:auto}:where(.ag-ltr) .ag-cell:not(.ag-cell-inline-editing),:where(.ag-ltr) .ag-full-width-row .ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px + var(--ag-row-group-indent-size)*var(--ag-indentation-level));padding-right:calc(var(--ag-cell-horizontal-padding) - 1px)}:where(.ag-rtl) .ag-cell:not(.ag-cell-inline-editing),:where(.ag-rtl) .ag-full-width-row .ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px);padding-right:calc(var(--ag-cell-horizontal-padding) - 1px + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}.ag-row>.ag-cell-wrapper{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px);padding-right:calc(var(--ag-cell-horizontal-padding) - 1px)}.ag-row-dragging{cursor:move;opacity:.5}.ag-details-row{background-color:var(--ag-data-background-color);padding:calc(var(--ag-spacing)*3.75)}.ag-layout-auto-height,.ag-layout-print{.ag-center-cols-container,.ag-center-cols-viewport{min-height:150px}}.ag-overlay-exporting-wrapper,.ag-overlay-loading-wrapper,.ag-overlay-modal-wrapper{background-color:var(--ag-modal-overlay-background-color)}.ag-skeleton-container{align-content:center;height:100%;width:100%}.ag-skeleton-effect{animation:ag-skeleton-loading 1.5s ease-in-out .5s infinite;background-color:var(--ag-row-loading-skeleton-effect-color);border-radius:.25rem;height:1em;width:100%}:where(.ag-ltr) .ag-right-aligned-cell .ag-skeleton-effect{margin-left:auto}:where(.ag-rtl) .ag-right-aligned-cell .ag-skeleton-effect{margin-right:auto}@keyframes ag-skeleton-loading{0%{background-color:var(--ag-row-loading-skeleton-effect-color)}50%{background-color:color-mix(in srgb,transparent,var(--ag-row-loading-skeleton-effect-color) 40%)}to{background-color:var(--ag-row-loading-skeleton-effect-color)}}.ag-loading{align-items:center;display:flex;height:100%}:where(.ag-ltr) .ag-loading{padding-left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-loading{padding-right:var(--ag-cell-horizontal-padding)}:where(.ag-ltr) .ag-loading-icon{padding-right:var(--ag-cell-widget-spacing)}:where(.ag-rtl) .ag-loading-icon{padding-left:var(--ag-cell-widget-spacing)}.ag-header{background-color:var(--ag-header-background-color);border-bottom:var(--ag-header-row-border);color:var(--ag-header-text-color);display:flex;font-family:var(--ag-header-font-family);font-size:var(--ag-header-font-size);font-weight:var(--ag-header-font-weight);overflow:hidden;white-space:nowrap;width:100%}.ag-header-row{height:var(--ag-header-height);position:absolute}.ag-floating-filter-button-button,.ag-header-cell-filter-button,.ag-header-cell-menu-button,.ag-header-expand-icon,.ag-panel-title-bar-button,:where(.ag-header-cell-sortable) .ag-header-cell-label,:where(.ag-header-group-cell-selectable) .ag-header-cell-comp-wrapper{cursor:pointer}:where(.ag-ltr) .ag-header-expand-icon{margin-left:4px}:where(.ag-rtl) .ag-header-expand-icon{margin-right:4px}.ag-header-row:where(:not(:first-child)){:where(.ag-header-cell:not(.ag-header-span-height.ag-header-span-total,.ag-header-parent-hidden)),:where(.ag-header-group-cell.ag-header-group-cell-with-group){border-top:var(--ag-header-row-border)}}.ag-header-row:where(:not(.ag-header-row-column-group)){overflow:hidden}:where(.ag-header.ag-header-allow-overflow) .ag-header-row{overflow:visible}.ag-header-cell{display:inline-flex;overflow:hidden}.ag-header-group-cell{contain:paint;display:flex}.ag-header-cell,.ag-header-group-cell{align-items:center;gap:var(--ag-cell-widget-spacing);height:100%;padding:0 var(--ag-cell-horizontal-padding);position:absolute}@property --ag-internal-moving-color{syntax:"<color>";inherits:false;initial-value:transparent}@property --ag-internal-hover-color{syntax:"<color>";inherits:false;initial-value:transparent}.ag-header-cell:where(:not(.ag-floating-filter)):before,.ag-header-group-cell:before{background-image:linear-gradient(var(--ag-internal-hover-color),var(--ag-internal-hover-color)),linear-gradient(var(--ag-internal-moving-color),var(--ag-internal-moving-color));content:"";inset:0;position:absolute;--ag-internal-moving-color:transparent;--ag-internal-hover-color:transparent;transition:--ag-internal-moving-color var(--ag-header-cell-background-transition-duration),--ag-internal-hover-color var(--ag-header-cell-background-transition-duration)}.ag-header-cell:where(:not(.ag-floating-filter)):where(:hover):before,.ag-header-group-cell:where(:hover):before{--ag-internal-hover-color:var(--ag-header-cell-hover-background-color)}.ag-header-cell:where(:not(.ag-floating-filter)):where(.ag-header-cell-moving):before,.ag-header-group-cell:where(.ag-header-cell-moving):before{--ag-internal-moving-color:var(--ag-header-cell-moving-background-color);--ag-internal-hover-color:var(--ag-header-cell-hover-background-color)}:where(.ag-header-cell:not(.ag-floating-filter)>*,.ag-header-group-cell>*){position:relative;z-index:1}.ag-header-cell-menu-button:where(:not(.ag-header-menu-always-show)){opacity:0;transition:opacity .2s}.ag-header-cell-filter-button,:where(.ag-header-cell.ag-header-active) .ag-header-cell-menu-button{opacity:1}.ag-header-cell-label,.ag-header-group-cell-label{align-items:center;align-self:stretch;display:flex;flex:1 1 auto;overflow:hidden;padding:5px 0}:where(.ag-ltr) .ag-sort-indicator-icon{padding-left:var(--ag-spacing)}:where(.ag-rtl) .ag-sort-indicator-icon{padding-right:var(--ag-spacing)}.ag-header-cell-label{text-overflow:ellipsis}.ag-header-group-cell-label.ag-sticky-label{flex:none;max-width:100%;overflow:visible;position:sticky}:where(.ag-ltr) .ag-header-group-cell-label.ag-sticky-label{left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-header-group-cell-label.ag-sticky-label{right:var(--ag-cell-horizontal-padding)}.ag-header-cell-text,.ag-header-group-text{overflow:hidden;text-overflow:ellipsis}.ag-header-cell-text{word-break:break-word}.ag-header-cell-comp-wrapper{width:100%}:where(.ag-header-group-cell) .ag-header-cell-comp-wrapper{display:flex}:where(.ag-header-cell:not(.ag-header-cell-auto-height)) .ag-header-cell-comp-wrapper{align-items:center;display:flex;height:100%}.ag-header-cell-wrap-text .ag-header-cell-comp-wrapper{white-space:normal}.ag-header-cell-comp-wrapper-limited-height>*{overflow:hidden}:where(.ag-right-aligned-header) .ag-header-cell-label{flex-direction:row-reverse}:where(.ag-header-cell:not(.ag-right-aligned-header)){.ag-header-col-ref{color:var(--ag-subtle-text-color)}}:where(.ag-ltr) :where(.ag-header-cell:not(.ag-right-aligned-header)){.ag-header-col-ref{margin-right:var(--ag-spacing)}.ag-header-label-icon,.ag-header-menu-icon{margin-left:var(--ag-spacing)}}:where(.ag-rtl) :where(.ag-header-cell:not(.ag-right-aligned-header)){.ag-header-col-ref{margin-left:var(--ag-spacing)}.ag-header-label-icon,.ag-header-menu-icon{margin-right:var(--ag-spacing)}}:where(.ag-header-cell.ag-right-aligned-header){.ag-header-col-ref{color:var(--ag-subtle-text-color)}}:where(.ag-ltr) :where(.ag-header-cell.ag-right-aligned-header){.ag-header-col-ref{margin-left:var(--ag-spacing)}.ag-header-label-icon,.ag-header-menu-icon{margin-right:var(--ag-spacing)}}:where(.ag-rtl) :where(.ag-header-cell.ag-right-aligned-header){.ag-header-col-ref{margin-right:var(--ag-spacing)}.ag-header-label-icon,.ag-header-menu-icon{margin-left:var(--ag-spacing)}}.ag-header-cell:after,.ag-header-group-cell:where(:not(.ag-header-span-height.ag-header-group-cell-no-group)):after{content:"";height:var(--ag-header-column-border-height);position:absolute;top:calc(50% - var(--ag-header-column-border-height)*.5);z-index:1}:where(.ag-ltr) .ag-header-cell:after,:where(.ag-ltr) .ag-header-group-cell:where(:not(.ag-header-span-height.ag-header-group-cell-no-group)):after{border-right:var(--ag-header-column-border);right:0}:where(.ag-rtl) .ag-header-cell:after,:where(.ag-rtl) .ag-header-group-cell:where(:not(.ag-header-span-height.ag-header-group-cell-no-group)):after{border-left:var(--ag-header-column-border);left:0}.ag-header-highlight-after:after,.ag-header-highlight-before:after{background-color:var(--ag-column-drag-indicator-color);border-radius:calc(var(--ag-column-drag-indicator-width)/2);content:"";height:100%;position:absolute;top:0;width:var(--ag-column-drag-indicator-width)}:where(.ag-ltr) .ag-header-highlight-before:after{left:0}:where(.ag-rtl) .ag-header-highlight-before:after{right:0}:where(.ag-ltr) .ag-header-highlight-after:after{right:0;:where(.ag-pinned-left-header) &{right:1px}}:where(.ag-rtl) .ag-header-highlight-after:after{left:0;:where(.ag-pinned-left-header) &{left:1px}}.ag-header-cell-resize{align-items:center;cursor:ew-resize;display:flex;height:100%;position:absolute;top:0;width:8px;z-index:2}:where(.ag-ltr) .ag-header-cell-resize{right:-3px}:where(.ag-rtl) .ag-header-cell-resize{left:-3px}.ag-header-cell-resize:after{background-color:var(--ag-header-column-resize-handle-color);content:"";height:var(--ag-header-column-resize-handle-height);position:absolute;top:calc(50% - var(--ag-header-column-resize-handle-height)*.5);width:var(--ag-header-column-resize-handle-width);z-index:1}:where(.ag-ltr) .ag-header-cell-resize:after{left:calc(50% - var(--ag-header-column-resize-handle-width))}:where(.ag-rtl) .ag-header-cell-resize:after{right:calc(50% - var(--ag-header-column-resize-handle-width))}:where(.ag-header-cell.ag-header-span-height) .ag-header-cell-resize:after{height:calc(100% - var(--ag-spacing)*4);top:calc(var(--ag-spacing)*2)}.ag-header-group-cell-no-group:where(.ag-header-span-height){display:none}.ag-sort-indicator-container{display:flex;gap:var(--ag-spacing)}.ag-layout-print{&.ag-body{display:block;height:unset}&.ag-root-wrapper{container-type:normal;display:inline-block}.ag-body-horizontal-scroll,.ag-body-vertical-scroll{display:none}&.ag-force-vertical-scroll{overflow-y:visible!important}}@media print{.ag-root-wrapper.ag-layout-print{container-type:normal;display:table;.ag-body-horizontal-scroll-viewport,.ag-body-viewport,.ag-center-cols-container,.ag-center-cols-viewport,.ag-root,.ag-root-wrapper-body,.ag-virtual-list-viewport{display:block!important;height:auto!important;overflow:hidden!important}.ag-cell,.ag-row{-moz-column-break-inside:avoid;break-inside:avoid}}}ag-grid,ag-grid-angular{display:block}.ag-root-wrapper{border:var(--ag-wrapper-border);border-radius:var(--ag-wrapper-border-radius);container-type:inline-size;display:flex;flex-direction:column;overflow:hidden;position:relative;&.ag-layout-normal{height:100%}}.ag-root-wrapper-body{display:flex;flex-direction:row;&.ag-layout-normal{flex:1 1 auto;height:0;min-height:0}}.ag-root{display:flex;flex-direction:column;position:relative;&.ag-layout-auto-height,&.ag-layout-normal{flex:1 1 auto;overflow:hidden;width:0}&.ag-layout-normal{height:100%}}.ag-drag-handle{color:var(--ag-drag-handle-color);cursor:grab;:where(.ag-icon){color:var(--ag-drag-handle-color)}}.ag-chart-menu-icon,.ag-chart-settings-next,.ag-chart-settings-prev,.ag-column-group-icons,.ag-column-select-header-icon,.ag-filter-toolpanel-expand,.ag-floating-filter-button-button,.ag-group-title-bar-icon,.ag-header-cell-filter-button,.ag-header-cell-menu-button,.ag-header-expand-icon,.ag-panel-title-bar-button,.ag-panel-title-bar-button-icon,.ag-set-filter-group-icons,:where(.ag-group-contracted) .ag-icon,:where(.ag-group-expanded) .ag-icon{background-color:var(--ag-icon-button-background-color);border-radius:var(--ag-icon-button-border-radius);box-shadow:0 0 0 var(--ag-icon-button-background-spread) var(--ag-icon-button-background-color);color:var(--ag-icon-button-color)}.ag-chart-menu-icon:hover,.ag-chart-settings-next:hover,.ag-chart-settings-prev:hover,.ag-column-group-icons:hover,.ag-column-select-header-icon:hover,.ag-filter-toolpanel-expand:hover,.ag-floating-filter-button-button:hover,.ag-group-title-bar-icon:hover,.ag-header-cell-filter-button:hover,.ag-header-cell-menu-button:hover,.ag-header-expand-icon:hover,.ag-panel-title-bar-button-icon:hover,.ag-panel-title-bar-button:hover,.ag-set-filter-group-icons:hover,:where(.ag-group-contracted) .ag-icon:hover,:where(.ag-group-expanded) .ag-icon:hover{background-color:var(--ag-icon-button-hover-background-color);box-shadow:0 0 0 var(--ag-icon-button-background-spread) var(--ag-icon-button-hover-background-color);color:var(--ag-icon-button-hover-color)}:where(.ag-filter-active),:where(.ag-filter-toolpanel-group-instance-header-icon),:where(.ag-filter-toolpanel-instance-header-icon){position:relative}:where(.ag-filter-active):after,:where(.ag-filter-toolpanel-group-instance-header-icon):after,:where(.ag-filter-toolpanel-instance-header-icon):after{background-color:var(--ag-icon-button-active-indicator-color);border-radius:50%;content:"";height:6px;position:absolute;top:-1px;width:6px}:where(.ag-ltr) :where(.ag-filter-active):after,:where(.ag-ltr) :where(.ag-filter-toolpanel-group-instance-header-icon):after,:where(.ag-ltr) :where(.ag-filter-toolpanel-instance-header-icon):after{right:-1px}:where(.ag-rtl) :where(.ag-filter-active):after,:where(.ag-rtl) :where(.ag-filter-toolpanel-group-instance-header-icon):after,:where(.ag-rtl) :where(.ag-filter-toolpanel-instance-header-icon):after{left:-1px}.ag-filter-active{background-image:linear-gradient(var(--ag-icon-button-active-background-color),var(--ag-icon-button-active-background-color));border-radius:1px;outline:solid var(--ag-icon-button-background-spread) var(--ag-icon-button-active-background-color);:where(.ag-icon-filter){clip-path:path("M8,0C8,4.415 11.585,8 16,8L16,16L0,16L0,0L8,0Z");color:var(--ag-icon-button-active-color)}}`,
33ETe={wrapperBorder:!0,rowBorder:!0,headerRowBorder:!0,footerRowBorder:{ref:`rowBorder`},columnBorder:{style:`solid`,width:1,color:`transparent`},headerColumnBorder:!1,headerColumnBorderHeight:`100%`,pinnedColumnBorder:!0,pinnedRowBorder:!0,sidePanelBorder:!0,sideBarPanelWidth:250,sideBarPanelAnimationDuration:0,sideBarBackgroundColor:{ref:`chromeBackgroundColor`},sideButtonBarBackgroundColor:{ref:`sideBarBackgroundColor`},sideButtonBarTopPadding:0,sideButtonSelectedUnderlineWidth:2,sideButtonSelectedUnderlineColor:`transparent`,sideButtonSelectedUnderlineTransitionDuration:0,sideButtonBackgroundColor:`transparent`,sideButtonTextColor:{ref:`textColor`},sideButtonHoverBackgroundColor:{ref:`sideButtonBackgroundColor`},sideButtonHoverTextColor:{ref:`sideButtonTextColor`},sideButtonSelectedBackgroundColor:IZ,sideButtonSelectedTextColor:{ref:`sideButtonTextColor`},sideButtonBorder:`solid 1px transparent`,sideButtonSelectedBorder:!0,sideButtonLeftPadding:{ref:`spacing`},sideButtonRightPadding:{ref:`spacing`},sideButtonVerticalPadding:{calc:`spacing * 3`},cellFontFamily:{ref:`fontFamily`},cellFontSize:{ref:`dataFontSize`},cellFontWeight:{ref:`fontWeight`},headerCellHoverBackgroundColor:`transparent`,headerCellMovingBackgroun
33dColor:{ref:`headerCellHoverBackgroundColor`},headerCellBackgroundTransitionDuration:`0.2s`,cellTextColor:{ref:`textColor`},rangeSelectionBorderStyle:`solid`,rangeSelectionBorderColor:RZ,rangeSelectionBackgroundColor:NZ(.2),rangeSelectionChartBackgroundColor:`#0058FF1A`,rangeSelectionChartCategoryBackgroundColor:`#00FF841A`,rangeSelectionHighlightColor:NZ(.5),rangeHeaderHighlightColor:cTe(.08),rowNumbersSelectedColor:NZ(.5),rowHoverColor:NZ(.08),columnHoverColor:NZ(.05),selectedRowBackgroundColor:NZ(.12),modalOverlayBackgroundColor:{ref:`backgroundColor`,mix:.66},dataBackgroundColor:IZ,oddRowBackgroundColor:{ref:`dataBackgroundColor`},wrapperBorderRadius:8,cellHorizontalPadding:{calc:`spacing * 2 * cellHorizontalPaddingScale`},cellWidgetSpacing:{calc:`spacing * 1.5`},cellHorizontalPaddingScale:1,rowGroupIndentSize:{calc:`cellWidgetSpacing + iconSize`},valueChangeDeltaUpColor:`#43a047`,valueChangeDeltaDownColor:`#e53935`,valueChangeValueHighlightBackgroundColor:`#16a08580`,rowHeight:{calc:`max(iconSize, cellFontSize) + spacing * 3.25 * rowVerticalPaddingScale`},rowVerticalPaddingScale:1,paginationPanelHeight:{ref:`rowHeight`,calc:`max(rowHeight, 22px)`},dragHandleColor:PZ(.7),headerColumnResizeHandleHeight:`30%`,headerColumnResizeHandleWidth:2,headerColumnResizeHandleColor:{ref:`borderColor`},iconButtonColor:{ref:`iconColor`},iconButtonBackgroundColor:`transparent`,iconButtonBackgroundSpread:4,iconButtonBorderRadius:1,iconButtonHoverColor:{ref:`iconButtonColor`},iconButtonHoverBackgroundColor:PZ(.1),iconButtonActiveColor:RZ,iconButtonActiveBackgroundColor:NZ(.28),iconButtonActiveIndicatorColor:RZ,setFilterIndentSize:{ref:`iconSize`},chartMenuPanelWidth:260,chartMenuLabelColor:PZ(.8),cellEditingBorder:{color:RZ},cellEditingShadow:{ref:`cardShadow`}
33,fullRowEditInvalidBackgroundColor:{ref:`invalidColor`,onto:`backgroundColor`,mix:.25},columnSelectIndentSize:{ref:`iconSize`},toolPanelSeparatorBorder:!0,columnDropCellBackgroundColor:PZ(.07),columnDropCellTextColor:{ref:`textColor`},columnDropCellDragHandleColor:{ref:`textColor`},columnDropCellBorder:{color:PZ(.13)},selectCellBackgroundColor:PZ(.07),selectCellBorder:{color:PZ(.13)},advancedFilterBuilderButtonBarBorder:!0,advancedFilterBuilderIndentSize:{calc:`spacing * 2 + iconSize`},advancedFilterBuilderJoinPillColor:`#f08e8d`,advancedFilterBuilderColumnPillColor:`#a6e194`,advancedFilterBuilderOptionPillColor:`#f3c08b`,advancedFilterBuilderValuePillColor:`#85c0e4`,filterPanelApplyButtonColor:IZ,filterPanelApplyButtonBackgroundColor:RZ,columnPanelApplyButtonColor:IZ,columnPanelApplyButtonBackgroundColor:RZ,filterPanelCardSubtleColor:{ref:`textColor`,mix:.7},filterPanelCardSubtleHoverColor:{ref:`textColor`},findMatchColor:LZ,findMatchBackgroundColor:`#ffff00`,findActiveMatchColor:LZ,findActiveMatchBackgroundColor:`#ffa500`,filterToolPanelGroupIndent:{ref:`spacing`},rowLoadingSkeletonEffectColor:PZ(.15),statusBarLabelColor:LZ,statusBarLabelFontWeight:500,statusBarValueColor:LZ,statusBarValueFontWeight:500,pinnedSourceRowTextColor:{ref:`textColor`},pinnedSourceRowBackgroundColor:{ref:`dataBackgroundColor`},pinnedSourceRowFontWeight:600,pinnedRowFontWeight:600,pinnedRowBackgroundColor:{ref:`dataBackgroundColor`},pinnedRowTextColor:{ref:`textColor`},rowDragIndicatorColor:{ref:`rangeSelectionBorderColor`},rowDragIndicatorWidth:2,columnDragIndicatorColor:{ref:`accentColor`},columnDragIndicatorWidth:2},DTe=`.ag-cell-batch-edit{background-color:var(--ag-cell-batch-edit-background-color);color:var(--ag-cell-batch-edit-text-color);display:inherit}.ag-row-batch-edit{background-color:var(--ag-row-batch-edit-background-color);color:var(--ag-row-batch-edit-text-color)}`,eQ={cellBatchEditBackgroundColor:`rgba(220 181 139 / 16%)`,cellBatchEditTextColor:`#422f00`,rowBatchEditBackgroundColor:{ref:`cellBatchEditBackgroundColor`},rowBatchEditTextColor:{ref:`cellBatchEditTextColor`}},OTe={...eQ,cellBatchEditTextColor:`#f3d0b3`},kTe=OZ({feature:`batchEditStyle`,params:eQ,css:DTe}),ATe=OZ({feature:`buttonStyle`,params:{buttonTextColor:`inherit`,buttonFontWeight:`normal`,buttonBackgroundColor:`transparent`,buttonBorder:!1,buttonBorderRadius:{ref:`borderRadius`},buttonHorizontalPadding:{calc:`spacing * 2`},buttonVerticalPadding:{ref:`spacing`},buttonHoverTextColor:{ref:`buttonTextColor`},buttonHoverBackgroundColor:{ref:`buttonBackgroundColor`},buttonHoverBorder:{ref:`buttonBorder`},buttonActiveTextColor:{ref:`buttonHoverTextColor`},buttonActiveBackgroundColor:{ref:`buttonHoverBackgroundColor`},buttonActiveBorder:{ref:`buttonHoverBorder`},buttonDisabledTextColor:{ref:`inputDisabledTextColor`},buttonDisabledBackgroundColor:{ref:`inputDisabledBackgroundColor`},buttonDisabledBorder:{ref:`inputDisabledBorder`},buttonBackgroundColor:IZ,buttonBorder:!0,buttonHoverBackgroundColor:{ref:`rowHoverColor`},buttonActiveBorder:{color:RZ}},css:`:where(.ag-button){background:none;border:none;color:inherit;cursor:pointer;font-family:inherit;font-size:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0;text-indent:inherit;text-shadow:inherit;text-transform:inherit;word-spacing:inherit;&:disabled{cursor:default}&:focus-visible{box-shadow:var(--ag-focus-shadow);outline:none}}.ag-standard-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--ag-button-background-color);border:var(--ag-button-border);border-radius:var(--ag-button-border-radius);color:var(--ag-button-text-color);cursor:pointer;font-weight:var(--ag-button-font-weight);padding:var(--ag-button-vertical-padding) var(--ag-button-horizontal-padding);&:active{background-color:var(--ag-button-active-background-color);border:var(--ag-button-active-border);color:var(--ag-button-active-text-color)}&:disabled{background-color:var(--ag-button-disabled-background-color);border:var(--ag-button-disabled-border);color:var(--ag-button-disabled-text-color)}}.ag-standard-button:hover{background-color:var(--ag-button-hover-background-color);border:var(--ag-button-hover-border);color:var(--ag-button-hover-text-color)}`}),tQ=OZ({feature:`columnDropStyle`,css:`.ag-column-drop-vertical-empty-message{align-items:center;border:dashed var(--ag-border-width);border-color:var(--ag-border-color);display:flex;inset:0;justify-content:center;margin:calc(var(--ag-spacing)*1.5) calc(var(--ag-spacing)*2);overflow:hidden;padding:calc(var(--ag-spacing)*2);position:absolute}`}),jTe=OZ({feature:`formulaStyle`,params:{formulaToken1Color:`#3269c6`,formulaToken1Backgroun
vendor: 5,227 bytes, line 33
33dColor:{ref:`formulaToken1Color`,mix:.08},formulaToken1Border:{color:{ref:`formulaToken1Color`}},formulaToken2Color:`#c0343f`,formulaToken2BackgroundColor:{ref:`formulaToken2Color`,mix:.06},formulaToken2Border:{color:{ref:`formulaToken2Color`}},formulaToken3Color:`#8156b8`,formulaToken3BackgroundColor:{ref:`formulaToken3Color`,mix:.08},formulaToken3Border:{color:{ref:`formulaToken3Color`}},formulaToken4Color:`#007c1f`,formulaToken4BackgroundColor:{ref:`formulaToken4Color`,mix:.06},formulaToken4Border:{color:{ref:`formulaToken4Color`}},formulaToken5Color:`#b03e85`,formulaToken5BackgroundColor:{ref:`formulaToken5Color`,mix:.08},formulaToken5Border:{color:{ref:`formulaToken5Color`}},formulaToken6Color:`#b74900`,formulaToken6BackgroundColor:{ref:`formulaToken6Color`,mix:.06},formulaToken6Border:{color:{ref:`formulaToken6Color`}},formulaToken7Color:`#247492`,formulaToken7BackgroundColor:{ref:`formulaToken7Color`,mix:.08},formulaToken7Border:{color:{ref:`formulaToken7Color`}}}}),MTe={warn:(...e)=>{gK(e[0],e[1])},error:(...e)=>{_K(e[0],e[1])},preInitErr:(...e)=>{vK(e[0],e[2],e[1])}},NTe=()=>vTe(MTe).withParams(ETe).withPart(ATe).withPart(tQ).withPart(kTe).withPart(jTe),PTe=OZ({feature:`checkboxStyle`,params:{checkboxBorderWidth:1,checkboxBorderRadius:{ref:`borderRadius`},checkboxUncheckedBackgroundColor:IZ,checkboxUncheckedBorderColor:FZ(.3),checkboxCheckedBackgroundColor:RZ,checkboxCheckedBorderColor:{ref:`checkboxCheckedBackgroundColor`},checkboxCheckedShapeImage:{svg:`<svg xmlns="http://www.w3.org/2000/svg" width="10" height="7" fill="none"><path stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.75" d="M1 3.5 3.5 6l5-5"/></svg>`},checkboxCheckedShapeColor:IZ,checkboxIndeterminateBackgroundColor:FZ(.3),checkboxIndeterminateBorderColor:{ref:`checkboxIndeterminateBackgroundColor`},checkboxIndeterminateShapeImage:{svg:`<svg xmlns="http://www.w3.org/2000/svg" width="10" height="2" fill="none"><rect width="10" height="2" fill="#000" rx="1"/></svg>`},checkboxIndeterminateShapeColor:IZ,radioCheckedShapeImage:{svg:`<svg xmlns="http://www.w3.org/2000/svg" width="6" height="6" fill="none"><circle cx="3" cy="3" r="3" fill="#000"/></svg>`}},css:`.ag-checkbox-input-wrapper,.ag-radio-button-input-wrapper{background-color:var(--ag-checkbox-unchecked-background-color);border:solid var(--ag-checkbox-border-width) var(--ag-checkbox-unchecked-border-color);flex:none;height:var(--ag-icon-size);position:relative;width:var(--ag-icon-size);&:where(.ag-checked){background-color:var(--ag-checkbox-checked-background-color);border-color:var(--ag-checkbox-checked-border-color)}&:where(.ag-checked):after{background-color:var(--ag-checkbox-checked-shape-color)}&:where(.ag-disabled){filter:grayscale();opacity:.5}}.ag-checkbox-input,.ag-radio-button-input{-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;display:block;height:var(--ag-icon-size);margin:0;opacity:0;width:var(--ag-icon-size)}.ag-checkbox-input-wrapper:after,.ag-radio-button-input-wrapper:after{content:"";display:block;inset:0;-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;pointer-events:none;position:absolute}.ag-checkbox-input-wrapper:where(:focus-within,:active),.ag-radio-button-input-wrapper:where(:focus-within,:active){box-shadow:var(--ag-focus-shadow)}.ag-checkbox-input-wrapper{border-radius:var(--ag-checkbox-border-radius);&:where(.ag-checked):after{-webkit-mask-image:var(--ag-checkbox-checked-shape-image);mask-image:var(--ag-checkbox-checked-shape-image)}&:where(.ag-indeterminate){background-color:var(--ag-checkbox-indeterminate-background-color);border-color:var(--ag-checkbox-indeterminate-border-color)}&:where(.ag-indeterminate):after{background-color:var(--ag-checkbox-indeterminate-shape-color);-webkit-mask-image:var(--ag-checkbox-indeterminate-shape-image);mask-image:var(--ag-checkbox-indeterminate-shape-image)}}.ag-cell-editing-error .ag-checkbox-input-wrapper:focus-within{box-shadow:var(--ag-focus-error-shadow)}.ag-radio-button-input-wrapper{border-radius:100%;&:where(.ag-checked):after{-webkit-mask-image:var(--ag-radio-checked-shape-image);mask-image:var(--ag-radio-checked-shape-image)}}`}),nQ=()=>({...zZ,...OTe,backgroundColor:`hsl(217, 0%, 17%)`,foregroundColor:`#FFF`,chromeBackgroundColor:FZ(.05),rowHoverColor:NZ(.15),selectedRowBackgroundColor:NZ(.2),menuBackgroundColor:FZ(.1),browserColorScheme:`dark`,popupShadow:`0 0px 20px #000A`,cardShadow:`0 1px 4px 1px #000A`,advancedFilterBuilderJoinPillColor:`#7a3a37`,advancedFilterBuilderColumnPillColor:`#355f2d`,advancedFilterBuilderOptionPillColor:`#5a3168`,advancedFilterBuilderValuePillColor:`#374c86`,filterPanelApplyButtonColor:LZ,columnPanelApplyButtonColor:LZ,findMatchColor:IZ,findActiveMatchColor:IZ,checkboxUncheckedBorderColor:FZ(.4),toggleButtonOffBackgroundColor:FZ(.4),rowBatchEditBackgroundColor:FZ(.1),formulaToken1Color:`#4da3e5`,formulaToken2Color:`#f55864`,formulaToken3Color:`#b688f2`,formulaToken4Color:`#24bb4a`,formulaToken5Color:`#e772ba`,formulaToken6Color:`#f69b5f`,formulaToken7Color:`#a3e6ff`}),FTe=OZ({feature:`colorScheme`,params:zZ,modeParams:{light:zZ,dark:nQ(),"dark-blue":{...nQ(),backgroundColor:`#1f2836`}}}),rQ
vendor: 5,556 bytes, line 33
33={aggregation:`<path d="M18 7V4H6l6 8-6 8h12v-3"/>`,arrows:`<polyline points="5 9 2 12 5 15"/><polyline points="9 5 12 2 15 5"/><polyline points="15 19 12 22 9 19"/><polyline points="19 9 22 12 19 15"/><line x1="2" x2="22" y1="12" y2="12"/><line x1="12" x2="12" y1="2" y2="22"/>`,asc:`<path d="m5 12 7-7 7 7"/><path d="M12 19V5"/>`,cancel:`<path d="m18 6-12 12"/><path d="m6 6 12 12"/>`,chart:`<line x1="18" x2="18" y1="20" y2="10"/><line x1="12" x2="12" y1="20" y2="4"/><line x1="6" x2="6" y1="20" y2="14"/>`,"color-picker":`<path d="m19 11-8-8-8.6 8.6a2 2 0 0 0 0 2.8l5.2 5.2c.8.8 2 .8 2.8 0L19 11Z"/><path d="m5 2 5 5"/><path d="M2 13h15"/><path d="M22 20a2 2 0 1 1-4 0c0-1.6 1.7-2.4 2-4 .3 1.6 2 2.4 2 4Z"/>`,columns:`<path d="M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18"/>`,contracted:`<path d="m9 18 6-6-6-6"/>`,copy:`<rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/>`,cross:`<path d="M18 6 6 18"/><path d="m6 6 12 12"/>`,csv:`<path d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"/><polyline points="14 2 14 8 20 8"/><path d="M8 13h2"/><path d="M8 17h2"/><path d="M14 13h2"/><path d="M14 17h2"/>`,cut:`<circle cx="6" cy="6" r="3"/><path d="M8.12 8.12 12 12"/><path d="M20 4 8.12 15.88"/><circle cx="6" cy="18" r="3"/><path d="M14.8 14.8 20 20"/>`,desc:`<path d="M12 5v14"/><path d="m19 12-7 7-7-7"/>`,down:`<path d="M12 5v14"/><path d="m19 12-7 7-7-7"/>`,excel:`<path d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"/><polyline points="14 2 14 8 20 8"/><path d="M8 13h2"/><path d="M8 17h2"/><path d="M14 13h2"/><path d="M14 17h2"/>`,expanded:`<path d="m15 18-6-6 6-6"/>`,eye:`<path d="M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z"/><circle cx="12" cy="12" r="3"/>`,"eye-slash":`<path d="M9.88 9.88a3 3 0 1 0 4.24 4.24"/><path d="M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68"/><path d="M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61"/><line x1="2" x2="22" y1="2" y2="22"/>`,filter:`<path d="M3 6h18"/><path d="M7 12h10"/><path d="M10 18h4"/>`,first:`<path d="m17 18-6-6 6-6"/><path d="M7 6v12"/>`,grip:`<circle cx="5" cy="8" r="0.5"/><circle cx="12" cy="8" r="0.5"/><circle cx="19" cy="8" r="0.5"/><circle cx="5" cy="16" r="0.5"/><circle cx="12" cy="16" r="0.5"/><circle cx="19" cy="16" r="0.5"/><g stroke="none" fill="currentColor"><circle cx="5" cy="8" r="1"/><circle cx="12" cy="8" r="1"/><circle cx="19" cy="8" r="1"/><circle cx="5" cy="16" r="1"/><circle cx="12" cy="16" r="1"/><circle cx="19" cy="16" r="1"/></g>`,group:`<path d="M16 12H3"/><path d="M16 18H3"/><path d="M10 6H3"/><path d="M21 18V8a2 2 0 0 0-2-2h-5"/><path d="m16 8-2-2 2-2"/>`,last:`<path d="m7 18 6-6-6-6"/><path d="M17 6v12"/>`,left:`<path d="m12 19-7-7 7-7"/><path d="M19 12H5"/>`,linked:`<path d="M9 17H7A5 5 0 0 1 7 7h2"/><path d="M15 7h2a5 5 0 1 1 0 10h-2"/><line x1="8" x2="16" y1="12" y2="12"/>`,loading:`<line x1="12" x2="12" y1="2" y2="6"/><line x1="12" x2="12" y1="18" y2="22"/><line x1="4.93" x2="7.76" y1="4.93" y2="7.76"/><line x1="16.24" x2="19.07" y1="16.24" y2="19.07"/><line x1="2" x2="6" y1="12" y2="12"/><line x1="18" x2="22" y1="12" y2="12"/><line x1="4.93" x2="7.76" y1="19.07" y2="16.24"/><line x1="16.24" x2="19.07" y1="7.76" y2="4.93"/>`,maximize:`<polyline points="15 3 21 3 21 9"/><polyline points="9 21 3 21 3 15"/><line x1="21" x2="14" y1="3" y2="10"/><line x1="3" x2="10" y1="21" y2="14"/>`,menu:`<line x1="4" x2="20" y1="12" y2="12"/><line x1="4" x2="20" y1="6" y2="6"/><line x1="4" x2="20" y1="18" y2="18"/>`,"menu-alt":`<circle cx="12" cy="5" r="0.75" fill="#D9D9D9"/><circle cx="12" cy="12" r="0.75" fill="#D9D9D9"/><circle cx="12" cy="19" r="0.75" fill="#D9D9D9"/>`,minimize:`<polyline points="4 14 10 14 10 20"/><polyline points="20 10 14 10 14 4"/><line x1="14" x2="21" y1="10" y2="3"/><line x1="3" x2="10" y1="21" y2="14"/>`,minus:`<circle cx="12" cy="12" r="10"/><path d="M8 12h8"/>`,next:`<path d="m9 18 6-6-6-6"/>`,none:`<path d="m7 15 5 5 5-5"/><path d="m7 9 5-5 5 5"/>`,"not-allowed":`<circle cx="12" cy="12" r="10"/><path d="m4.9 4.9 14.2 14.2"/>`,paste:`<path d="M15 2H9a1 1 0 0 0-1 1v2c0 .6.4 1 1 1h6c.6 0 1-.4 1-1V3c0-.6-.4-1-1-1Z"/><path d="M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2M16 4h2a2 2 0 0 1 2 2v2M11 14h10"/><path d="m17 10 4 4-4 4"/>`,pin:`<line x1="12" x2="12" y1="17" y2="22"/><path d="M5 17h14v-1.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V6h1a2 2 0 0 0 0-4H8a2 2 0 0 0 0 4h1v4.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24Z"/>`,pivot:`<path d="M15 3v18"/><rect width="18" height="18" x="3" y="3" rx="2"/><path d="M21 9H3"/><path d="M21 15H3"/>`,plus:`<circle cx="12" cy="12" r="10"/><path d="M8 12h8"/><path d="M12 8v8"/>`,previous:`<path d="m15 18-6-6 6-6"/>`,right:`<path d="M5 12h14"/><path d="m12 5 7 7-7 7"/>`,save:`<path d="M12 17V3"/><path d="m6 11 6 6 6-6"/><path d="M19 21H5"/>`,settings:`<path d="M20 7h-9"/><path d="M14 17H5"/><circle cx="17" cy="17" r="3"/><circle cx="7" cy="7" r="3"/>`,"small-left":`<path d="m15 18-6-6 6-6"/>`,"small-right":`<path d="m9 18 6-6-6-6"/>`,tick:`<path d="M20 6 9 17l-5-5"/>`,"tree-closed":`<path d="m9 18 6-6-6-6"/>`,"tree-indeterminate":`<path d="M5 12h14"/>`,"tree-open":`<path d="m6 9 6 6 6-6"/>`,unlinked:`<path d="M9 17H7A5 5 0 0 1 7 7"/><path d="M15 7h2a5 5 0 0 1 4 8"/><line x1="8" x2="12" y1="12" y2="12"/><line x1="2" x2="22" y1="2" y2="22"/>`,up:`<path d="m5 12 7-7 7 7"/><path d="M12 19V5"/>`},
33iQ
vendor: 12,394 bytes, line 33
33={aasc:`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M13.2012 8.07928C13.6346 8.0793 14.0128 8.15365 14.3359 8.30193C14.6609 8.45018 14.9141 8.65595 15.0947 8.9201C15.2754 9.18439 15.3683 9.49109 15.374 9.83904H14.1904C14.1676 9.60898 14.0695 9.4303 13.8965 9.30291C13.7235 9.1756 13.4889 9.1115 13.1924 9.1115C12.9909 9.1115 12.8204 9.1404 12.6816 9.19744C12.543 9.25255 12.4364 9.32917 12.3623 9.42791C12.2901 9.52678 12.2539 9.63933 12.2539 9.76482C12.2501 9.8692 12.272 9.9604 12.3193 10.0383C12.3688 10.1162 12.4369 10.1843 12.5225 10.2414C12.6079 10.2964 12.7064 10.3451 12.8184 10.3869C12.9304 10.4268 13.0505 10.4609 13.1777 10.4894L13.7031 10.6144C13.9578 10.6715 14.1914 10.7479 14.4043 10.8429C14.6173 10.938 14.8021 11.0547 14.958 11.1935C15.1138 11.3323 15.2348 11.4957 15.3203 11.6838C15.4077 11.8719 15.4522 12.088 15.4541 12.3312C15.4522 12.6885 15.3611 12.9986 15.1807 13.2609C15.0019 13.5214 14.7427 13.7248 14.4043 13.8693C14.0678 14.0118 13.6617 14.0832 13.1865 14.0832C12.7153 14.0832 12.3048 14.0107 11.9551 13.8664C11.6071 13.7219 11.3345 13.5071 11.1387 13.2238C10.9449 12.9387 10.8435 12.5862 10.834 12.1662H12.0283C12.0416 12.362 12.0984 12.5252 12.1973 12.6564C12.298 12.7857 12.4323 12.8838 12.5996 12.9504C12.7688 13.0149 12.96 13.047 13.1729 13.047C13.3817 13.047 13.563 13.0169 13.7168 12.9562C13.8727 12.8954 13.9935 12.8106 14.0791 12.7023C14.1647 12.5939 14.208 12.469 14.208 12.3283C14.2079 12.1974 14.1686 12.0875 14.0908 11.9982C14.0148 11.9089 13.9022 11.8324 13.7539 11.7697C13.6076 11.707 13.4276 11.6501 13.2148 11.5988L12.5791 11.4387C12.0869 11.3189 11.6982 11.1318 11.4131 10.8771C11.128 10.6224 10.9855 10.2793 10.9873 9.84783C10.9854 9.49418 11.0804 9.18439 11.2705 8.9201C11.4625 8.65603 11.7261 8.45015 12.0605 8.30193C12.3951 8.15369 12.7754 8.07928 13.2012 8.07928Z" fill="black"/><path fill-rule="evenodd" clip-rule="evenodd" d="M5.8125 14.0002H4.48926L4.05664 12.6681H1.94824L1.51465 14.0002H0.19043L2.20703 8.15935H3.79883L5.8125 14.0002ZM2.26172 11.7043H3.74316L3.02539 9.49334H2.98047L2.26172 11.7043Z" fill="black"/><path fill-rule="evenodd" clip-rule="evenodd" d="M8.45215 8.15935C8.88165 8.15935 9.24031 8.22251 9.52734 8.34978C9.81445 8.47717 10.0303 8.65477 10.1748 8.88103C10.3192 9.10536 10.3916 9.36368 10.3916 9.65642C10.3916 9.88452 10.3461 10.085 10.2549 10.258C10.1637 10.4289 10.0384 10.5696 9.87891 10.6799C9.72117 10.7882 9.54024 10.8657 9.33691 10.9113V10.9679C9.55917 10.9775 9.76716 11.0406 9.96094 11.1564C10.1568 11.2724 10.3158 11.4356 10.4375 11.6447C10.5591 11.8519 10.6201 12.099 10.6201 12.3859C10.6201 12.6958 10.5427 12.9727 10.3887 13.216C10.2366 13.4573 10.0113 13.6486 9.71289 13.7892C9.41443 13.9299 9.04655 14.0002 8.60938 14.0002H6.11426V8.15935H8.45215ZM7.34863 12.9904H8.35547C8.69943 12.9904 8.95057 12.9252 9.1084 12.7941C9.26621 12.661 9.34473 12.4834 9.34473 12.2629C9.34468 12.1014 9.30643 11.9587 9.22852 11.8351C9.15056 11.7116 9.03903 11.6145 8.89453 11.5441C8.75195 11.4738 8.58148 11.4387 8.38379 11.4387H7.34863V12.9904ZM7.34863 10.6037H8.26465C8.43369 10.6036 8.58376 10.5737 8.71484 10.5148C8.84793 10.454 8.95227 10.3683 9.02832 10.258C9.10628 10.1477 9.14551 10.0155 9.14551 9.8615C9.14546 9.65055 9.07008 9.48001 8.91992 9.35076C8.77165 9.22169 8.56064 9.15741 8.28711 9.1574H7.34863V10.6037Z" fill="black"/><path d="M7.16602 0.377127C7.44584 0.189493 7.82551 0.20905 8.08496 0.442557L11.418 3.44256C11.7257 3.71966 11.7507 4.19428 11.4736 4.50213C11.1966 4.80961 10.7228 4.83441 10.415 4.55779L7.60938 2.03338L5.11328 4.53045C4.82042 4.82326 4.34562 4.82322 4.05273 4.53045C3.75986 4.23757 3.75989 3.7628 4.05273 3.4699L7.05273 0.4699L7.16602 0.377127Z" fill="black"/></svg>`,adesc:`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10.3867 11.4697C10.6796 11.1771 11.1544 11.1769 11.4473 11.4697C11.7399 11.7626 11.7399 12.2374 11.4473 12.5303L8.44727 15.5303L8.33398 15.623C8.05425 15.8106 7.67449 15.7909 7.41504 15.5576L4.08203 12.5576C3.77415 12.2805 3.74927 11.8059 4.02637 11.498C4.30342 11.1907 4.77722 11.1657 5.08496 11.4424L7.89062 13.9668L10.3867 11.4697Z" fill="black"/><path d="M13.2012 3.0791C13.6346 3.07912 14.0128 3.1535 14.3359 3.30176C14.6611 3.45006 14.9141 3.65661 15.0947 3.9209C15.2752 4.18513 15.3683 4.49104 15.374 4.83887H14.1904C14.1676 4.60882 14.0695 4.43012 13.8965 4.30273C13.7235 4.17546 13.4889 4.11133 13.1924 4.11133C12.9909 4.11133 12.8204 4.14023 12.6816 4.19727C12.5431 4.25236 12.4364 4.32902 12.3623 4.42773C12.2901 4.52659 12.2539 4.63919 12.2539 4.76465C12.2501 4.86901 12.272 4.96023 12.3193 5.03809C12.3688 5.11604 12.4369 5.18417 12.5225 5.24121C12.6079 5.29623 12.7064 5.34496 12.8184 5.38672C12.9304 5.42661 13.0505 5.46075 13.1777 5.48926L13.7031 5.61426C13.9578 5.67128 14.1914 5.74776 14.4043 5.84277C14.6172 5.93784 14.8021 6.05457 14.958 6.19336C15.1139 6.33216 15.2348 6.49633 15.3203 6.68457C15.4076 6.8727 15.4522 7.08885 15.4541 7.33203C15.4521 7.68929 15.3612 7.99944 15.1807 8.26172C15.0019 8.52216 14.7427 8.72465 14.4043 8.86914C14.0678 9.01165 13.6617 9.08301 13.1865 9.08301C12.7153 9.08299 12.3048 9.01057 11.9551 8.86621C11.6072 8.72173 11.3345 8.50786 11.1387 8.22461C10.9447 7.9394 10.8435 7.58622 10.834 7.16602H12.0283C12.0416 7.36176 12.0985 7.52509 12.1973 7.65625C12.298 7.78554 12.4323 7.88365 12.5996 7.9502C12.7688 8.01477 12.96 8.04785 13.1729 8.04785C13.3817 8.04781 13.5629 8.01678 13.7168 7.95605C13.8727 7.89522 13.9935 7.81051 14.0791 7.70215C14.1646 7.59387 14.2079 7.46965 14.208 7.3291C14.208 7.19796 14.1687 7.08739 14.0908 6.99805C14.0148 6.90868 13.9022 6.83228 13.7539 6.76953C13.6076 6.70685 13.4276 6.64993 13.2148 6.59863L12.5791 6.43848C12.0868 6.31871 11.6982 6.13163 11.4131 5.87695C11.1279 5.62221 10.9855 5.27916 10.9873 4.84766C10.9854 4.49404 11.0804 4.18517 11.2705 3.9209C11.4625 3.65661 11.7259 3.45006 12.0605 3.30176C12.3951 3.15353 12.7754 3.0791 13.2012 3.0791Z" fill="black"/><path fill-rule="evenodd" clip-rule="evenodd" d="M5.8125 9H4.48926L4.05664 7.66797H1.94824L1.51465 9H0.19043L2.20703 3.15918H3.79883L5.8125 9ZM2.26172 6.7041H3.74316L3.02539 4.49414H2.98047L2.26172 6.7041Z" fill="black"/><path fill-rule="evenodd" clip-rule="evenodd" d="M8.45215 3.15918C8.88181 3.15918 9.24025 3.22322 9.52734 3.35059C9.81445 3.47798 10.0303 3.6546 10.1748 3.88086C10.3193 4.10518 10.3916 4.36351 10.3916 4.65625C10.3916 4.88432 10.3461 5.08484 10.2549 5.25781C10.1636 5.4289 10.0386 5.57039 9.87891 5.68066C9.72118 5.78898 9.54022 5.86549 9.33691 5.91113V5.96875C9.55913 5.9783 9.76719 6.04044 9.96094 6.15625C10.1568 6.27223 10.3158 6.43538 10.4375 6.64453C10.5591 6.85173 10.6201 7.09875 10.6201 7.38574C10.6201 7.69567 10.5427 7.97245 10.3887 8.21582C10.2366 8.45719 10.0113 8.64841 9.71289 8.78906C9.41442 8.9297 9.04658 8.99999 8.60938 9H6.11426V3.15918H8.45215ZM7.34863 7.99023H8.35547C8.69948 7.99023 8.95057 7.92504 9.1084 7.79395C9.26621 7.66085 9.34473 7.48325 9.34473 7.2627C9.34466 7.10125 9.3064 6.95844 9.22852 6.83496C9.15056 6.71143 9.03899 6.61427 8.89453 6.54395C8.75196 6.47365 8.58145 6.43848 8.38379 6.43848H7.34863V7.99023ZM7.34863 5.60352H8.26465C8.43369 5.60347 8.58376 5.57354 8.71484 5.51465C8.84791 5.45381 8.95228 5.36807 9.02832 5.25781C9.10623 5.14755 9.14551 5.01529 9.14551 4.86133C9.14542 4.65046 9.07002 4.48078 8.91992 4.35156C8.77163 4.22228 8.56087 4.15724 8.28711 4.15723H7.34863V5.60352Z" fill="black"/></svg>`,"chevron-down":`<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 6L8 10L4 6" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>`,"chevron-left":`<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10 12L6 8L10 4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>`,"chevron-right":`<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M6 12L10 8L6 4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>`,"chevron-up":`<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M4 10L8 6L12 10" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>`,"column-arrow":`<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="none" viewBox="0 0 32 32"><path fill-rule="evenodd" clip-rule="evenodd" d="M0 26C0 28.2092 1.79086 30 4 30H14C16.2091 30 18 28.2092 18 26V15H25.8786L24.4394 16.4393C23.8536 17.0251 23.8536 17.9749 24.4394 18.5607C25.0252 19.1464 25.9748 19.1464 26.5606 18.5607L30.5606 14.5607C31.1464 13.9749 31.1464 13.0251 30.5606 12.4393L26.5606 8.43934C25.9748 7.85356 25.0252 7.85356 24.4394 8.43934C23.8536 9.02512 23.8536 9.97488 24.4394 10.5607L25.8786 12H18V6C18 3.79086 16.2091 2 14 2H4C1.79086 2 0 3.79086 0 6V26ZM14 5H10.5V12H15V6C15 5.44772 14.5523 5 14 5ZM4 5H7.5V12H3V6C3 5.44772 3.44772 5 4 5ZM10.5 15H15V26C15 26.5522 14.5523 27 14 27H10.5V15ZM4 27H7.5V15H3V26C3 26.5522 3.44772 27 4 27Z" fill="currentColor"/></svg>`,edit:`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M3.5 10.6262V12.5012H5.375L10.905 6.97122L9.03 5.09622L3.5 10.6262ZM12.355 5.52122C12.4014 5.47497 12.4381 5.42002 12.4632 5.35953C12.4883 5.29905 12.5012 5.23421 12.5012 5.16872C12.5012 5.10324 12.4883 5.0384 12.4632 4.97791C12.4381 4.91742 12.4014 4.86248 12.355 4.81622L11.185 3.64622C11.1387 3.59987 11.0838 3.5631 11.0233 3.53801C10.9628 3.51291 10.898 3.5 10.8325 3.5C10.767 3.5 10.7022 3.51291 10.6417 3.53801C10.5812 3.5631 10.5263 3.59987 10.48 3.64622L9.565 4.56122L11.44 6.43622L12.355 5.52122Z" fill="currentColor"/></svg>`,"filter-add":`<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M5.12126 7.75L10.8517 7.75" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/><path d="M6.65934 11.748L9.32778 11.748" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/><path d="M12.2943 1.04872V6.19184M14.9886 3.74341H9.68478" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/><path d="M8.25488 3C8.04799 3.18323 7.91706 3.45099 7.91699 3.74902C7.91713 4.04868 8.04988 4.31681 8.25879 4.5H2C1.58579 4.5 1.25 4.16421 1.25 3.75C1.25 3.33579 1.58579 3 2 3H8.25488Z" fill="currentColor"/></svg>`,"pinned-bottom":`<svg xmlns="http://www.w3.org/2000/svg" fill="none" class="ag-icon" viewBox="0 0 16 16"><path fill="currentColor" d="M3.47 12.28A.75.75 0 0 1 4 11h8a.75.75 0 0 1 0 1.5H4a.75.75 0 0 1-.53-.22ZM12.731 5.256a.75.75 0 0 1-.2.524l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 1 1 1.06-1.06l2.72 2.72V2a.75.75 0 0 1 1.5 0v5.44l2.72-2.72a.75.75 0 0 1 1.26.536Z"/></svg>`,"pinned-top":`<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="none" viewBox="0 0 16 16"><path fill="currentColor" d="M12.53 3.72A.75.75 0 0 1 12 5H4a.75.75 0 0 1 0-1.5h8a.75.75 0 0 1 .53.22ZM3.269 10.744a.75.75 0 0 1 .2-.524l4-4a.75.75 0 0 1 1.06 0l4 4a.75.75 0 1 1-1.06 1.06L8.75 8.56V14a.75.75 0 0 1-1.5 0V8.56l-2.72 2.72a.75.75 0 0 1-1.26-.536Z"/></svg>`,"small-down":`<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="black" stroke="none" viewBox="0 0 32 32"><path d="M7.334 10.667 16 21.334l8.667-10.667H7.334Z"/></svg>`,"small-up":`<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="black" stroke="none" viewBox="0 0 32 32"><path d="M7.334 21.333 16 10.666l8.667 10.667H7.334Z"/></svg>`,"un-pin":`<svg xmlns="http://www.w3.org/2000/svg" fill="none" class="ag-icon" viewBox="0 0 16 16"><path fill="currentColor" d="M8 11a.75.75 0 0 0-.75.75v3.333a.75.75 0 1 0 1.5 0V11.75A.75.75 0 0 0 8 11Z"/><path fill="currentColor" d="M13.11 1.436a.75.75 0 0 0-1.22-.872l-10 14a.75.75 0 1 0 1.22.872L5.207 12.5h7.376a.75.75 0 0 0 .75-.75v-1.174a2.08 2.08 0 0 0-1.153-1.863l-1.185-.599-.005-.002a.58.58 0 0 1-.323-.522V5.165a2.083 2.083 0 0 0 1.854-2.904l.589-.825Zm-3.943 5.52v.634a2.08 2.08 0 0 0 1.153 1.863l1.185.6.005.002a.58.58 0 0 1 .323.522V11H6.28l2.887-4.044ZM9.277 1H5.25a2.084 2.084 0 0 0-.083 4.165v1.676l1.5-2.132v-.292a.75.75 0 0 0-.75-.75H5.25a.584.584 0 0 1 0-1.167h2.972L9.277 1Z"/></svg>`},
vendor: 5,149 bytes, lines 33-34
33ITe=(e={})=>{let t=``;for(let n of[...Object.keys(rQ),...Object.keys(iQ)]){let r=LTe(n,e.strokeWidth);t+=`.ag-icon-${n}::before { mask-image: url('data:image/svg+xml,${encodeURIComponent(r)}'); } 34`}return t},LTe=(e,t=1.5)=>{let n=iQ[e];if(n)return n;let r=rQ[e];if(!r)throw Error(`Missing icon data for ${e}`);return`<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke="black" stroke-width="${t}" viewBox="0 0 24 24"><style>* { vector-effect: non-scaling-stroke; }</style>`+r+`</svg>`},RTe=((e={})=>OZ({feature:`iconSet`,css:()=>ITe(e)}))(),zTe=`:where(.ag-input-field-input[type=number]:not(.ag-number-field-input-stepper)){-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield;&::-webkit-inner-spin-button,&::-webkit-outer-spin-button{-webkit-appearance:none;appearance:none;margin:0}}.ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){background-color:var(--ag-input-background-color);border:var(--ag-input-border);border-radius:var(--ag-input-border-radius);color:var(--ag-input-text-color);font-family:inherit;font-size:inherit;line-height:inherit;margin:0;min-height:var(--ag-input-height);padding:0;&:where(:disabled){background-color:var(--ag-input-disabled-background-color);border:var(--ag-input-disabled-border);color:var(--ag-input-disabled-text-color)}&:where(:focus){background-color:var(--ag-input-focus-background-color);border:var(--ag-input-focus-border);box-shadow:var(--ag-input-focus-shadow);color:var(--ag-input-focus-text-color);outline:none}&:where(:invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}&:where(.invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}&::-moz-placeholder{color:var(--ag-input-placeholder-text-color)}&::placeholder{color:var(--ag-input-placeholder-text-color)}}:where(.ag-ltr) .ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){padding-left:var(--ag-input-padding-start)}:where(.ag-rtl) .ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){padding-right:var(--ag-input-padding-start)}&:where(.ag-ltr,.ag-rtl) .ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){padding:0 var(--ag-input-padding-start)}:where(.ag-column-select-header-filter-wrapper),:where(.ag-filter-add-select),:where(.ag-filter-filter),:where(.ag-filter-toolpanel-search),:where(.ag-floating-filter-search-icon),:where(.ag-mini-filter){.ag-input-wrapper:before{background-color:currentcolor;color:var(--ag-input-icon-color);content:"";display:block;height:12px;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMS41Ij48cGF0aCBkPSJNNS4zIDlhMy43IDMuNyAwIDEgMCAwLTcuNSAzLjcgMy43IDAgMCAwIDAgNy41Wk0xMC41IDEwLjUgOC4zIDguMiIvPjwvc3ZnPg==");mask-image:url("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMS41Ij48cGF0aCBkPSJNNS4zIDlhMy43IDMuNyAwIDEgMCAwLTcuNSAzLjcgMy43IDAgMCAwIDAgNy41Wk0xMC41IDEwLjUgOC4zIDguMiIvPjwvc3ZnPg==");-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;opacity:.5;position:absolute;width:12px}}:where(.ag-ltr) :where(.ag-column-select-header-filter-wrapper),:where(.ag-ltr) :where(.ag-filter-add-select),:where(.ag-ltr) :where(.ag-filter-filter),:where(.ag-ltr) :where(.ag-filter-toolpanel-search),:where(.ag-ltr) :where(.ag-floating-filter-search-icon),:where(.ag-ltr) :where(.ag-mini-filter){.ag-input-wrapper:before{margin-left:var(--ag-spacing)}.ag-number-field-input,.ag-text-field-input{padding-left:calc(var(--ag-spacing)*1.5 + 12px)}}:where(.ag-rtl) :where(.ag-column-select-header-filter-wrapper),:where(.ag-rtl) :where(.ag-filter-add-select),:where(.ag-rtl) :where(.ag-filter-filter),:where(.ag-rtl) :where(.ag-filter-toolpanel-search),:where(.ag-rtl) :where(.ag-floating-filter-search-icon),:where(.ag-rtl) :where(.ag-mini-filter){.ag-input-wrapper:before{margin-right:var(--ag-spacing)}.ag-number-field-input,.ag-text-field-input{padding-right:calc(var(--ag-spacing)*1.5 + 12px)}}`,BTe=`.ag-input-field-input:where(input:not([type]),input[type=text],input[type=number],input[type=tel],input[type=date],input[type=datetime-local],textarea){&:focus{box-shadow:var(--ag-focus-shadow);&:where(.invalid),&:where(:invalid){box-shadow:var(--ag-focus-error-shadow)}}}
34`,VTe=OZ({feature:`inputStyle`,params:{inputBackgroundColor:`transparent`,inputBorder:!1,inputBorderRadius:0,inputTextColor:{ref:`textColor`},inputPlaceholderTextColor:{ref:`inputTextColor`,mix:.5},inputPaddingStart:0,inputHeight:{calc:`max(iconSize, fontSize) + spacing * 2`},inputFocusBackgroundColor:{ref:`inputBackgroundColor`},inputFocusBorder:{ref:`inputBorder`},inputFocusShadow:`none`,inputFocusTextColor:{ref:`inputTextColor`},inputDisabledBackgroundColor:{ref:`inputBackgroundColor`},inputDisabledBorder:{ref:`inputBorder`},inputDisabledTextColor:{ref:`inputTextColor`},inputInvalidBackgroundColor:{ref:`inputBackgroundColor`},inputInvalidBorder:{ref:`inputBorder`},inputInvalidTextColor:{ref:`inputTextColor`},inputIconColor:{ref:`inputTextColor`},pickerButtonBorder:!1,pickerButtonFocusBorder:{ref:`inputFocusBorder`},pickerButtonBackgroundColor:{ref:`backgroundColor`},pickerButtonFocusBackgroundColor:{ref:`backgroundColor`},pickerListBorder:!1,pickerListBackgroundColor:{ref:`backgroundColor`},colorPickerThumbSize:18,colorPickerTrackSize:12,colorPickerThumbBorderWidth:3,colorPickerTrackBorderRadius:12,colorPickerColorBorderRadius:4,inputBackgroundColor:IZ,inputBorder:!0,inputBorderRadius:{ref:`borderRadius`},inputPaddingStart:{ref:`spacing`},inputFocusBorder:{color:RZ},inputFocusShadow:{ref:`focusShadow`},inputDisabledBackgroundColor:FZ(.06),inputDisabledTextColor:{ref:`textColor`,mix:.5},inputInvalidBorder:{color:{ref:`invalidColor`}},pickerButtonBorder:!0,pickerListBorder:!0},css:()=>zTe+BTe}),HTe=OZ({feature:`tabStyle`,params:{tabBarBackgroundColor:`transparent`,tabBarHorizontalPadding:0,tabBarTopPadding:0,tabBackgroundColor:`transparent`,tabTextColor:{ref:`textColor`},tabHorizontalPadding:{ref:`spacing`},tabTopPadding:{ref:`spacing`},tabBottomPadding:{ref:`spacing`},tabSpacing:`0`,tabHoverBackgroundColor:{ref:`tabBackgroundColor`},tabHoverTextColor:{ref:`tabTextColor`},tabSelectedBackgroundColor:{ref:`tabBackgroundColor`},tabSelectedTextColor:{ref:`tabTextColor`},tabSelectedBorderWidth:{ref:`borderWidth`},tabSelectedBorderColor:`transparent`,tabSelectedUnderlineColor:`transparent`,tabSelectedUnderlineWidth:0,tabSelectedUnderlineTransitionDuration:0,tabBarBorder:!1,tabBarBorder:!0,tabBarBackgroundColor:PZ(.05),tabTextColor:{ref:`textColor`,mix:.7},tabSelectedTextColor:{ref:`textColor`},tabHoverTextColor:{ref:`textColor`},tabSelectedBorderColor:{ref:`borderColor`},tabSelectedBackgroundColor:IZ},css:`.ag-tabs-header{background-color:var(--ag-tab-bar-background-color);border-bottom:var(--ag-tab-bar-border);display:flex;flex:1;gap:var(--ag-tab-spacing);padding:var(--ag-tab-bar-top-padding) var(--ag-tab-bar-horizontal-padding) 0}.ag-tabs-header-wrapper{display:flex}.ag-tabs-close-button-wrapper{align-items:center;border:0;display:flex;padding:var(--ag-spacing)}:where(.ag-ltr) .ag-tabs-close-button-wrapper{border-right:solid var(--ag-border-width) var(--ag-border-color)}:where(.ag-rtl) .ag-tabs-close-button-wrapper{border-left:solid var(--ag-border-width) var(--ag-border-color)}.ag-tabs-close-button{background-color:unset;border:0;cursor:pointer;padding:0}.ag-tab{align-items:center;background-color:var(--ag-tab-background-color);border-left:var(--ag-tab-selected-border-width) solid transparent;border-right:var(--ag-tab-selected-border-width) solid transparent;color:var(--ag-tab-text-color);cursor:pointer;display:flex;flex:1;justify-content:center;padding:var(--ag-tab-top-padding) var(--ag-tab-horizontal-padding) var(--ag-tab-bottom-padding);position:relative}.ag-tab:hover{background-color:var(--ag-tab-hover-background-color);color:var(--ag-tab-hover-text-color)}.ag-tab.ag-tab-selected{background-color:var(--ag-tab-selected-background-color);color:var(--ag-tab-selected-text-color)}:where(.ag-ltr) .ag-tab.ag-tab-selected:where(:not(:first-of-type)){border-left-color:var(--ag-tab-selected-border-color)}:where(.ag-rtl) .ag-tab.ag-tab-selected:where(:not(:first-of-type)){border-right-color:var(--ag-tab-selected-border-color)}:where(.ag-ltr) .ag-tab.ag-tab-selected:where(:not(:last-of-type)){border-right-color:var(--ag-tab-selected-border-color)}
34:where(.ag-rtl) .ag-tab.ag-tab-selected:where(:not(:last-of-type)){border-left-color:var(--ag-tab-selected-border-color)}.ag-tab:after{background-color:var(--ag-tab-selected-underline-color);bottom:0;content:"";display:block;height:var(--ag-tab-selected-underline-width);left:0;opacity:0;position:absolute;right:0;transition:opacity var(--ag-tab-selected-underline-transition-duration)}.ag-tab.ag-tab-selected:after{opacity:1}`}),aQ=NTe().withPart(PTe).withPart(FTe).withPart(RTe).withPart(HTe).withPart(VTe).withPart(tQ).withParams({fontFamily:[{googleFont:`IBM Plex Sans`},`-apple-system`,`BlinkMacSystemFont`,`Segoe UI`,`Roboto`,`Oxygen-Sans`,`Ubuntu`]}),oQ=(e,t,n,r,i)=>({changeKey:e,type:t,defaultValue:n,noWarn:r,cacheDefault:i}),UTe=oQ(`cellHorizontalPadding`,`length`,16),WTe=oQ(`indentationLevel`,`length`,0,!0,!0),GTe=oQ(`rowGroupIndentSize`,`length`,0),sQ=oQ(`rowHeight`,`length`,42),cQ=oQ(`headerHeight`,`length`,48),lQ=oQ(`rowBorderWidth`,`border`,1),uQ=oQ(`pinnedRowBorderWidth`,`border`,1),KTe=oQ(`headerRowBorderWidth`,`border`,1);function qTe(e,t){for(let n of t.sort((e,t)=>e.moduleName.localeCompare(t.moduleName))){let t=n.css;t&&e.set(`module-${n.moduleName}`,t)}}var JTe=class extends CTe{initVariables(){this.addManagedPropertyListener(`rowHeight`,()=>this.refreshRowHeightVariable()),this.getSizeEl(sQ),this.getSizeEl(cQ),this.getSizeEl(lQ),this.get
vendor: 18,391 bytes, line 34
34SizeEl(uQ),this.refreshRowBorderWidthVariable()}getPinnedRowBorderWidth(){return this.getCSSVariablePixelValue(uQ)}getRowBorderWidth(){return this.getCSSVariablePixelValue(lQ)}getHeaderRowBorderWidth(){return this.getCSSVariablePixelValue(KTe)}getDefaultRowHeight(){return this.getCSSVariablePixelValue(sQ)}getDefaultHeaderHeight(){return this.getCSSVariablePixelValue(cQ)}getDefaultCellHorizontalPadding(){return this.getCSSVariablePixelValue(UTe)}getCellPaddingLeft(){let e=this.getDefaultCellHorizontalPadding(),t=this.getCSSVariablePixelValue(WTe),n=this.getCSSVariablePixelValue(GTe);return e-1+n*t}getCellPadding(){let e=this.getDefaultCellHorizontalPadding()-1;return this.getCellPaddingLeft()+e}getDefaultColumnMinWidth(){return Math.min(36,this.getDefaultRowHeight())}refreshRowHeightVariable(){let{eRootDiv:e}=this,t=e.style.getPropertyValue(`--ag-line-height`).trim(),n=this.gos.get(`rowHeight`);if(n==null||isNaN(n)||!isFinite(n))return t!==null&&e.style.setProperty(`--ag-line-height`,null),-1;let r=`${n}px`;return t==r?t==``?-1:Number.parseFloat(t):(e.style.setProperty(`--ag-line-height`,r),n)}fireStylesChangedEvent(e){e===`rowBorderWidth`&&this.refreshRowBorderWidthVariable(),super.fireStylesChangedEvent(e)}refreshRowBorderWidthVariable(){let e=this.getCSSVariablePixelValue(lQ);this.eRootDiv.style.setProperty(`--ag-internal-row-border-width`,`${e}px`)}postProcessThemeChange(e,t){e&&getComputedStyle(this.getMeasurementContainer()).getPropertyValue(`--ag-legacy-styles-loaded`)&&_K(t?106:239)}getAdditionalCss(){let e=new Map;return e.set(`core`,[TTe]),qTe(e,Array.from(Zve())),e}getDefaultTheme(){return aQ}varError(e,t){gK(9,{variable:{cssName:e,defaultValue:t}})}themeError(e){_K(240,{theme:e})}shadowRootError(){_K(293)}},YTe=class extends AG{constructor(){super(...arguments),this.beanName=`eventSvc`,this.eventServiceType=`global`,this.globalSvc=new oW}addListener(e,t,n){this.globalSvc.addEventListener(e,t,n)}removeListener(e,t,n){this.globalSvc.removeEventListener(e,t,n)}addGlobalListener(e,t=!1){this.globalSvc.addGlobalListener(e,t)}removeGlobalListener(e,t=!1){this.globalSvc.removeGlobalListener(e,t)}dispatchEvent(e){this.globalSvc.dispatchEvent(this.gos.addCommon(e))}dispatchEventOnce(e){this.globalSvc.dispatchEventOnce(this.gos.addCommon(e))}},XTe=class extends YTe{postConstruct(){let{globalListener:e,globalSyncListener:t}=this.beans;e&&this.addGlobalListener(e,!0),t&&this.addGlobalListener(t,!1)}};function dQ(e,t,n){let r=e.visibleCols.headerGroupRowCount;if(n>=r)return{column:t,headerRowIndex:n};let i=t.getParent();for(;i&&i.getProvidedColumnGroup().getLevel()>n;)i=i.getParent();let a=t.isSpanHeaderHeight();return!i||a&&i.isPadding()?{column:t,headerRowIndex:r}:{column:i,headerRowIndex:i.getProvidedColumnGroup().getLevel()}}var ZTe=class extends Q{constructor(){super(...arguments),this.beanName=`headerNavigation`,this.currentHeaderRowWithoutSpan=-1}postConstruct(){let e=this.beans;e.ctrlsSvc.whenReady(this,e=>{this.gridBodyCon=e.gridBodyCtrl});let t=fW(e);this.addManagedElementListeners(t,{mousedown:()=>{this.currentHeaderRowWithoutSpan=-1}})}getHeaderPositionForColumn(e,t){let n,{colModel:r,colGroupSvc:i,ctrlsSvc:a}=this.beans;if(typeof e==`string`?(n=r.getCol(e),n||=i?.getColumnGroup(e)??null):n=e,!n)return null;let o=a.getHeaderRowContainerCtrl()?.getAllCtrls(),s=XU(o||[]).type===`filter`,c=lY(this.beans)-1,l=-1,u=n;for(;u;)l++,u=u.getParent();let d=l;return t&&s&&d===c-1&&d++,d===-1?null:{headerRowIndex:d,column:n}}navigateVertically(e,t){let{focusSvc:n,visibleCols:r}=this.beans,{focusedHeader:i}=n;if(!i)return!1;let{headerRowIndex:a}=i,o=i.column,s=lY(this.beans),c=this.getHeaderRowType(a),l=r.headerGroupRowCount,{headerRowIndex:u,column:d,headerRowIndexWithoutSpan:f}=e===`UP`?QTe(c,o,a):$Te(o,a,l),p=!1;return u<0&&(u=0,d=o,p=!0),u>=s?(u=-1,this.currentHeaderRowWithoutSpan=-1):f!==void 0&&(this.currentHeaderRowWithoutSpan=f),!p&&!d?!1:n.focusHeaderPosition({headerPosition:{headerRowIndex:u,column:d},allowUserOverride:!0,event:t})}navigateHorizontally(e,t=!1,n){let{focusSvc:r,gos:i}=this.beans,a={...r.focusedHeader},o,s;this.currentHeaderRowWithoutSpan===-1?this.currentHeaderRowWithoutSpan=a.headerRowIndex:a.headerRowIndex=this.currentHeaderRowWithoutSpan,e===`LEFT`===i.get(`enableRtl`)?(s=`After`,o=this.findHeader(a,s)):(s=`Before`,o=this.findHeader(a,s));let c=i.getCallback(`tabToNextHeader`);if(t&&c){let e=r.focusHeaderPositionFromUserFunc({userFunc:c,headerPosition:o,direction:s});if(e){let{headerRowIndex:e}=r.focusedHeader||{};e!=null&&e!=a.headerRowIndex&&(this.currentHeaderRowWithoutSpan=e)}return e}return o||!t?r.focusHeaderPosition({headerPosition:o,direction:s,fromTab:t,allowUserOverride:!0,event:n}):this.focusNextHeaderRow(a,s,n)}focusNextHeaderRow(e,t,n){let r=this.beans,i=e.headerRowIndex,a=null,o,s=lY(r),c=this.beans.visibleCols.allCols;if(t===`Before`){if(i<=0)return!1;a=XU(c),o=i-1,--this.currentHeaderRowWithoutSpan}else a=c[0],o=i+1,this.currentHeaderRowWithoutSpan<s?this.currentHeaderRowWithoutSpan+=1:this.currentHeaderRowWithoutSpan=-1;let{column:l,headerRowIndex:u}=dQ(this.beans,a,o);return u>=s&&(u=-1),r.focusSvc.focusHeaderPosition({headerPosition:{column:l,headerRowIndex:u},direction:t,fromTab:!0,allowUserOverride:!0,event:n})}scrollToColumn(e,t=`After`){if(e.getPinned())return;let n;if(Aq(e)){let r=e.getDisplayedLeafColumns();n=t===`Before`?XU(r):r[0]}else n=e;this.gridBodyCon.scrollFeature.ensureColumnVisible(n)}findHeader(e,t){let{colGroupSvc:n,visibleCols:r}=this.beans,i=e.column;if(i instanceof jq){let e=i.getDisplayedLeafColumns();i=t===`Before`?e[0]:e[e.length-1]}let a=t===`Before`?r.getColBefore(i):r.getColAfter(i);if(!a)return;let o=r.headerGroupRowCount;if(e.headerRowIndex>=o)return{headerRowIndex:e.headerRowIndex,column:a};let s=n?.getColGroupAtLevel(a,e.headerRowIndex);return s?s.isPadding()&&a.isSpanHeaderHeight()?{headerRowIndex:r.headerGroupRowCount,column:a}:{headerRowIndex:e.headerRowIndex,column:s??a}:{headerRowIndex:a instanceof iq&&a.isSpanHeaderHeight()?r.headerGroupRowCount:e.headerRowIndex,column:a}}getHeaderRowType(e){let t=this.beans.ctrlsSvc.getHeaderRowContainerCtrl();if(t)return t.getRowType(e)}};function QTe(e,t,n){let r=n-1;if(e!==`filter`){let e=t instanceof iq&&t.isSpanHeaderHeight(),n=t.getParent();for(;n&&(n.getProvidedColumnGroup().getLevel()>r||e&&n.isPadding());)n=n.getParent();if(n)return e?{column:n,headerRowIndex:n.getProvidedColumnGroup().getLevel(),headerRowIndexWithoutSpan:r}:{column:n,headerRowIndex:r,headerRowIndexWithoutSpan:r}}return{column:t,headerRowIndex:r,headerRowIndexWithoutSpan:r}}function $Te(e,t,n){let r=t+1,i={column:e,headerRowIndex:r,headerRowIndexWithoutSpan:r};if(e instanceof jq){if(r>=n)return{column:e.getDisplayedLeafColumns()[0],headerRowIndex:n,headerRowIndexWithoutSpan:r};let t=e.getDisplayedChildren()[0];if(t instanceof jq&&t.isPadding()){let e=t.getDisplayedLeafColumns()[0];e.isSpanHeaderHeight()&&(t=e)}i.column=t,t instanceof iq&&t.isSpanHeaderHeight()&&(i.headerRowIndex=n,i.headerRowIndexWithoutSpan=r)}return i}var eEe=class extends Q{constructor(){super(...arguments),this.beanName=`focusSvc`,this.focusFallbackTimeout=null,this.needsFocusRestored=!1}wireBeans(e){this.colModel=e.colModel,this.visibleCols=e.visibleCols,this.rowRenderer=e.rowRenderer,this.navigation=e.navigation,this.filterManager=e.filterManager,this.overlays=e.overlays}postConstruct(){let e=this.clearFocusedCell.bind(this);this.addManagedEventListeners({columnPivotModeChanged:e,newColumnsLoaded:this.onColumnEverythingChanged.bind(this),columnGroupOpened:e,columnRowGroupChanged:e}),this.addDestroyFunc(Bbe(this.beans))}attemptToRecoverFocus(){this.needsFocusRestored=!0,this.focusFallbackTimeout!=null&&clearTimeout(this.focusFallbackTimeout),this.focusFallbackTimeout=window.setTimeout(this.setFocusRecovered.bind(this),100)}setFocusRecovered(){this.needsFocusRestored=!1,this.focusFallbackTimeout!=null&&(clearTimeout(this.focusFallbackTimeout),this.focusFallbackTimeout=null)}shouldTakeFocus(){return this.gos.get(`suppressFocusAfterRefresh`)?(this.setFocusRecovered(),!1):this.needsFocusRestored?(this.setFocusRecovered(),!0):this.doesRowOrCellHaveBrowserFocus()}onColumnEverythingChanged(){if(!this.focusedCell)return;let e=this.focusedCell.column;e!==this.colModel.getCol(e.getId())&&this.clearFocusedCell()}getFocusCellToUseAfterRefresh(){let{gos:e,focusedCell:t}=this;return e.get(`suppressFocusAfterRefresh`)||e.get(`suppressCellFocus`)||!t||!this.doesRowOrCellHaveBrowserFocus()?null:t}getFocusHeaderToUseAfterRefresh(){return this.gos.get(`suppressFocusAfterRefresh`)||!this.focusedHeader||!this.isDomDataPresentInHierarchy(dW(this.beans),xY)?null:this.focusedHeader}doesRowOrCellHaveBrowserFocus(){let e=dW(this.beans);return this.isDomDataPresentInHierarchy(e,BY,!0)?!0:this.isDomDataPresentInHierarchy(e,HY,!0)}isDomDataPresentInHierarchy(e,t,n){let r=e;for(;r;){let e=kK(this.gos,r,t);if(e)return e.destroyed&&n?(this.attemptToRecoverFocus(),!1):!0;r=r.parentNode}return!1}getFocusedCell(){return this.focusedCell}getFocusEventParams(e){let{rowIndex:t,rowPinned:n,column:r}=e,i={rowIndex:t,rowPinned:n,column:r,isFullWidthCell:!1},a=this.rowRenderer.getRowByPosition({rowIndex:t,rowPinned:n});return a&&(i.isFullWidthCell=a.isFullWidth()),i}clearFocusedCell(){if(this.focusedCell==null)return;let e=this.getFocusEventParams(this.focusedCell);this.focusedCell=null,this.eventSvc.dispatchEvent({type:`cellFocusCleared`,...e})}setFocusedCell(e){this.setFocusRecovered();let{column:t,rowIndex:n,rowPinned:r,forceBrowserFocus:i=!1,preventScrollOnBrowserFocus:a=!1,sourceEvent:o}=e,s=this.colModel.getCol(t);if(!s){this.focusedCell=null;return}this.focusedCell={rowIndex:n,rowPinned:tW(r),column:s};let c=this.getFocusEventParams(this.focusedCell);this.eventSvc.dispatchEvent({type:`cellFocused`,...c,...this.previousCellFocusParams&&{previousParams:this.previousCellFocusParams},forceBrowserFocus:i,preventScrollOnBrowserFocus:a,sourceEvent:o}),this.previousCellFocusParams=c}isCellFocused(e){return this.focusedCell!=null&&ZJ(e,this.focusedCell)}isHeaderWrapperFocused(e){if(this.focusedHeader==null)return!1;let{column:t,rowCtrl:{rowIndex:n,pinned:r}}=e,{column:i,headerRowIndex:a}=this.focusedHeader;return t===i&&n===a&&r==i.getPinned()}focusHeaderPosition(e){if(this.setFocusRecovered(),aY(this.beans))return!1;let{direction:t,fromTab:n,allowUserOverride:r,event:i,fromCell:a,rowWithoutSpanValue:o,scroll:s=!0}=e,{headerPosition:c}=e;if(a&&this.filterManager?.isAdvFilterHeaderActive())return this.focusAdvancedFilter(c);if(r){let e=this.focusedHeader,r=lY(this.beans);if(n){let n=this.gos.getCallback(`tabToNextHeader`);n&&(c=this.getHeaderPositionFromUserFunc({userFunc:n,direction:t,currentPosition:e,headerPosition:c,headerRowCount:r}))}else{let t=this.gos.getCallback(`navigateToNextHeader`);if(t&&i){let n=t({key:i.key,previousHeaderPosition:e,nextHeaderPosition:c,headerRowCount:r,event:i});c=n===null?e:n}}}return c?this.focusProvidedHeaderPosition({headerPosition:c,direction:t,event:i,fromCell:a,rowWithoutSpanValue:o,scroll:s}):!1}focusHeaderPositionFromUserFunc(e){if(aY(this.beans))return!1;let{userFunc:t,headerPosition:n,direction:r,event:i}=e,a=this.focusedHeader,o=lY(this.beans),s=this.getHeaderPositionFromUserFunc({userFunc:t,direction:r,currentPosition:a,headerPosition:n,headerRowCount:o});return!!s&&this.focusProvidedHeaderPosition({headerPosition:s,direction:r,event:i})}getHeaderPositionFromUserFunc(e){let{userFunc:t,direction:n,currentPosition:r,headerPosition:i,headerRowCount:a}=e,o=t({backwards:n===`Before`,previousHeaderPosition:r,nextHeaderPosition:i,headerRowCount:a});return o===!0?r:o===!1?null:o}focusProvidedHeaderPosition(e){let{headerPosition:t,direction:n,fromCell:r,rowWithoutSpanValue:i,event:a,scroll:o=!0}=e,{column:s,headerRowIndex:c}=t,{filterManager:l,ctrlsSvc:u,headerNavigation:d}=this.beans;if(this.focusedHeader&&Txe(e.headerPosition,this.focusedHeader))return!1;if(c===-1)return l?.isAdvFilterHeaderActive()?this.focusAdvancedFilter(t):this.focusGridView({column:s,event:a});o&&d?.scrollToColumn(s,n);let f=u.getHeaderRowContainerCtrl(s.getPinned())?.focusHeader(t.headerRowIndex,s,a)||!1;return d&&f&&(i!=null||r)&&(d.currentHeaderRowWithoutSpan=i??-1),f}focusFirstHeader(){if(this.overlays?.exclusive&&this.focusOverlay())return!0;let e=this.visibleCols.allCols[0];if(!e)return!1;let t=dQ(this.beans,e,0);return this.focusHeaderPosition({headerPosition:t,rowWithoutSpanValue:0})}focusLastHeader(e){if(this.overlays?.exclusive&&this.focusOverlay(!0))return!0;let t=lY(this.beans)-1,n=XU(this.visibleCols.allCols);return this.focusHeaderPosition({headerPosition:{headerRowIndex:t,column:n},rowWithoutSpanValue:-1,event:e})}focusPreviousFromFirstCell(e){return this.filterManager?.isAdvFilterHeaderActive()?this.focusAdvancedFilter(null):this.focusLastHeader(e)}isAnyCellFocused(){return!!this.focusedCell}isRowFocused(e,t){return this.focusedCell!=null&&this.focusedCell.rowIndex===e&&this.focusedCell.rowPinned===tW(t)}focusOverlay(e){let t=this.overlays?.isVisible()&&this.overlays.eWrapper?.getGui();return!!t&&gJ(t,e)}getDefaultTabToNextGridContainerTarget(e){let{backwards:t,focusableContainers:n}=e,r=t?-1:1,i,a=()=>(i===void 0&&(i=this.getGridBodyTabTarget(t)),i);for(let t=e.nextIndex;t>=0&&t<n.length;t+=r){let e=yxe(n[t],a);if(e)return e}return null}getGridBodyTabTarget(e){if(e)return this.getGridViewTabTarget({column:XU(this.visibleCols.allCols),backwards:!0});let t=this.visibleCols.allCols[0];return this.gos.get(`headerHeight`)===0||aY(this.beans)?this.getGridViewTabTarget({column:t}):t?dQ(this.beans,t,0):null}getGridViewTabTarget(e){let{backwards:t=!1}=e,n=e.column??this.focusedHeader?.column;if(!n||this.overlays?.exclusive)return null;if(oY(this.beans))return t&&!aY(this.beans)?{headerRowIndex:lY(this.beans)-1,column:n}:null;let r=t?$J(this.beans):QJ(this.beans);if(r?.rowIndex==null){if(this.overlays?.isVisible())return null;if(t&&!aY(this.beans)){let e=XU(this.visibleCols.allCols);if(e)return{headerRowIndex:lY(this.beans)-1,column:e}}return null}let i=eY(this.beans,r);return!i||n.isSuppressNavigable(i)||t&&this.rowRenderer.getRowByPosition(r)?.isFullWidth()?null:{rowIndex:r.rowIndex,rowPinned:r.rowPinned,column:n}}focusGridView(e){let{backwards:t=!1,canFocusOverlay:n=!0,event:r}=e;if(this.overlays?.exclusive)return n&&this.focusOverlay(t);if(oY(this.beans))return t&&!aY(this.beans)?this.focusLastHeader():n&&this.focusOverlay(t)?!0:!t&&sY(this.beans,t);let i=t?$J(this.beans):QJ(this.beans);if(i){let n=e.column??this.focusedHeader?.column,{rowIndex:a,rowPinned:o}=i,s=eY(this.beans,i);if(!n||!s||a==null)return!1;if(n.isSuppressNavigable(s)){let e=this.gos.get(`enableRtl`),t;return t=!r||r.key===$.TAB?e?$.LEFT:$.RIGHT:r.key,this.beans.navigation?.navigateToNextCell(null,t,{rowIndex:a,column:n,rowPinned:o||null},!0),!0}return this.navigation?.ensureCellVisible({rowIndex:a,column:n,rowPinned:o}),t&&this.rowRenderer.getRowByPosition(i)?.isFullWidth()&&this.navigation?.tryToFocusFullWidthRow(i,t)?!0:(this.setFocusedCell({rowIndex:a,column:n,rowPinned:tW(o),forceBrowserFocus:!0}),wq(n)||this.beans.rangeSvc?.setRangeToCell({rowIndex:a,rowPinned:o,column:n}),!0)}return!!(n&&this.focusOverlay(t)||t&&this.focusLastHeader())}focusAdvancedFilter(e){return this.advFilterFocusColumn=e?.column,this.beans.advancedFilter?.getCtrl().focusHeaderComp()??!1}focusNextFromAdvancedFilter(e,t){let n=(t?void 0:this.advFilterFocusColumn)??this.visibleCols.allCols?.[0];return e?this.focusHeaderPosition({headerPosition:{column:n,headerRowIndex:lY(this.beans)-1}}):this.focusGridView({column:n})}clearAdvancedFilterColumn(){this.advFilterFocusColumn=void 0}},tEe=class extends Q{constructor(){super(...arguments),this.beanName=`scrollVisibleSvc`}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.colAnimation=e.colAnimation}postConstruct(){let{gos:e}=this;this.horizontalScrollShowing=e.get(`alwaysShowHorizontalScroll`)===!0,this.verticalScrollShowing=e.get(`alwaysShowVerticalScroll`)===!0,this.getScrollbarWidth();let t=this.updateScrollVisible.bind(this);this.addManagedEventListeners({displayedColumnsChanged:t,displayedColumnsWidthChanged:t,newColumnsLoaded:t})}updateScrollVisible(){let{colAnimation:e}=this;e?.isActive()?e.executeLaterVMTurn(()=>{e.executeLaterVMTurn(()=>this.updateScrollVisibleImpl())}):this.updateScrollVisibleImpl()}updateScrollVisibleImpl(){let e=this.ctrlsSvc.get(`center`);if(!e||this.colAnimation?.isActive())return;let t={horizontalScrollShowing:e.isHorizontalScrollShowing(),verticalScrollShowing:this.verticalScrollShowing};this.setScrollsVisible(t),this.updateScrollGap()}updateScrollGap(){let e=this.ctrlsSvc.get(`center`),t=e.hasHorizontalScrollGap(),n=e.hasVerticalScrollGap();(this.horizontalScrollGap!==t||this.verticalScrollGap!==n)&&(this.horizontalScrollGap=t,this.verticalScrollGap=n,this.eventSvc.dispatchEvent({type:`scrollGapChanged`}))}setScrollsVisible(e){(this.horizontalScrollShowing!==e.horizontalScrollShowing||this.verticalScrollShowing!==e.verticalScrollShowing)&&(this.horizontalScrollShowing=e.horizontalScrollShowing,this.verticalScrollShowing=e.verticalScrollShowing,this.eventSvc.dispatchEvent({type:`scrollVisibilityChanged`}))}getScrollbarWidth(){if(this.scrollbarWidth==null){let e=this.gos.get(`scrollbarWidth`),t=typeof e==`number`&&e>=0?e:cJ();t!=null&&(this.scrollbarWidth=t,this.eventSvc.dispatchEvent({type:`scrollbarWidthChanged`}))}return this.scrollbarWidth}},nEe=class extends Q{constructor(){super(...arguments),this.beanName=`gridDestroySvc`,this.destroyCalled=!1}destroy(){if(this.destroyCalled)return;let{stateSvc:e,ctrlsSvc:t,context:n}=this.beans;this.eventSvc.dispatchEvent({type:`gridPreDestroyed`,state:e?.getState()??{}}),this.destroyCalled=!0,t.get(`gridCtrl`)?.destroyGridUi(),n.destroy(),super.destroy()}},rEe=`columnEverythingChanged.newColumnsLoaded.columnPivotModeChanged.pivotMaxColumnsExceeded.columnRowGroupChanged.expandOrCollapseAll.columnPivotChanged.gridColumnsChanged.columnValueChanged.columnMoved.columnVisible.columnPinned.columnGroupOpened.columnResized.displayedColumnsChanged.virtualColumnsChanged.columnHeaderMouseOver.columnHeaderMouseLeave.columnHeaderClicked.columnHeaderContextMenu.asyncTransactionsFlushed.rowGroupOpened.rowDataUpdated.pinnedRowDataChanged.pinnedRowsChanged.rangeSelectionChanged.cellSelectionChanged.chartCreated.chartRangeSelectionChanged.chartOptionsChanged.chartDe
34stroyed.toolPanelVisibleChanged.toolPanelSizeChanged.modelUpdated.cutStart.cutEnd.pasteStart.pasteEnd.fillStart.fillEnd.cellSelectionDeleteStart.cellSelectionDeleteEnd.rangeDeleteStart.rangeDeleteEnd.undoStarted.undoEnded.redoStarted.redoEnded.cellClicked.cellDoubleClicked.cellMouseDown.cellContextMenu.cellValueChanged.cellEditRequest.rowValueChanged.headerFocused.cellFocused.rowSelected.selectionChanged.tooltipShow.tooltipHide.cellKeyDown.cellMouseOver.cellMouseOut.filterChanged.filterModified.filterUiChanged.filterOpened.floatingFilterUiChanged.advancedFilterBuilderVisibleChanged.sortChanged.virtualRowRemoved.rowClicked.rowDoubleClicked.gridReady.gridPreDestroyed.gridSizeChanged.viewportChanged.firstDataRendered.dragStarted.dragStopped.dragCancelled.rowEditingStarted.rowEditingStopped.cellEditingStarted.cellEditingStopped.bodyScroll.bodyScrollEnd.paginationChanged.componentStateChanged.storeRefreshed.stateUpdated.columnMenuVisibleChanged.contextMenuVisibleChanged.rowDragEnter.rowDragMove.rowDragLeave.rowDragEnd.rowDragCancel.findChanged.rowResizeStarted.rowResizeEnded.columnsReset.bulkEditingStarted.bulkEditingStopped.batchEditingStarted.batchEditingStopped`.split(`.`),fQ=new Set([`gridPreDestroyed`,`fillStart`,`pasteStart`]),pQ=rEe.reduce((e,t)=>(e[t]=xye(t),e),{}),mQ={agSetColumnFilter:`SetFilter`,agSetColumnFloatingFilter:`SetFilter`,agMultiColumnFilter:`MultiFilter`,agMultiColumnFloatingFilter:`MultiFilter`,agGroupColumnFilter:`GroupFilter`,agGroupColumnFloatingFilter:`GroupFilter`,agGroupCellRenderer:`GroupCellRenderer`,agGroupRowRenderer:`GroupCellRenderer`,agRichSelect:`RichSelect`,agRichSelectCellEditor:`RichSelect`,agDetailCellRenderer:`SharedMasterDetail`,agSparklineCellRenderer:`Sparklines`,agDragAndDropImage:`SharedDragAndDrop`,agColumnHeader:`ColumnHeaderComp`,agColumnGroupHeader:`ColumnGroupHeaderComp`,agSortIndicator:`Sort`,agAnimateShowChangeCellRenderer:`HighlightChanges`,agAnimateSlideCellRenderer:`HighlightChanges`,agLoadingCellRenderer:`LoadingCellRenderer`,agSkeletonCellRenderer:`SkeletonCellRenderer`,agCheckboxCellRenderer:`CheckboxCellRenderer`,agLoadingOverlay:`Overlay`,agExportingOverlay:`Overlay`,agNoRowsOverlay:`Overlay`,agNoMatchingRowsOverlay:`Overlay`,agTooltipComponent:`Tooltip`,agReadOnlyFloatingFilter:`CustomFilter`,agTextColumnFilter:`TextFilter`,agNumberColumnFilter:`NumberFilter`,agBigIntColumnFilter:`BigIntFilter`,agDateColumnFilter:`DateFilter`,agDateInput:`DateFilter`,agTextColumnFloatingFilter:`TextFilter`,agNumberColumnFloatingFilter:`NumberFilter`,agBigIntColumnFloatingFilter:`BigIntFilter`,agDateColumnFloatingFilter:`DateFilter`,agFormulaCellEditor:`Formula`,agCellEditor:`TextEditor`,agSelectCellEditor:`SelectEditor`,agTextCellEditor:`TextEditor`,agNumberCellEditor:`NumberEditor`,agDateCellEditor:`DateEditor`,agDateStringCellEditor:`DateEditor`,agCheckboxCellEditor:`CheckboxEditor`,agLargeTextCellEditor:`LargeTextEditor`,agMenuItem:`MenuItem`,agColumnsToolPanel:`ColumnsToolPanel`,agFiltersToolPanel:`FiltersToolPanel`,agNewFiltersToolPanel:`NewFiltersToolPanel`,agAggregationComponent:`StatusBar`,agSelectedRowCountComponent:`StatusBar`,agTotalRowCountComponent:`StatusBar`,agFilteredRowCountComponent:`StatusBar`,agTotalAndFilteredRowCountComponent:`StatusBar`,agFindCellRenderer:`Find`};function hQ(e){return`"${e}"`}var iEe=()=>({checkboxSelection:{version:`32.2`,message:"Use `rowSelection.checkboxes` in `GridOptions` instead."},headerCheckboxSelection:{version:`32.2`,message:"Use `rowSelection.headerCheckbox = true` in `GridOptions` instead."},headerCheckboxSelectionFilteredOnly:{version:`32.2`,message:'Use `rowSelection.selectAll = "filtered"` in `GridOptions` instead.'},headerCheckboxSelectionCurrentPageOnly:{version:`32.2`,message:'Use `rowSelection.selectAll = "currentPage"` in `GridOptions` instead.'},showDisabledCheckboxes:{version:`32.2`,message:"Use `rowSelection.hideDisabledCheckboxes = true` in `GridOptions` instead."},rowGroupingHierarchy:{version:`34.3`,message:"Use `colDef.groupHierarchy` instead."}}),aEe={allowFormula:`Formula`,aggFunc:`SharedAggregation`,autoHeight:`RowAutoHeight`,cellClass:`CellStyle`,cellClassRules:`CellStyle`,cellEditor:({cellEditor:e,editable:t,groupRowEditable:n})=>t||n?typeof e==`string`?mQ[e]??`CustomEditor`:`CustomEditor`:null,cellRenderer:({cellRenderer:e})=>typeof e==`string`?mQ[e]:null,cellStyle:`CellStyle`,columnChooserParams:`ColumnMenu`,contextMenuItems:`ContextMenu`,dndSource:`DragAndDrop`,dndSourceOnRowDrag:`DragAndDrop`,editable:({editable:e,cellEditor:t})=>e&&!t?`TextEditor`:null,groupRowEditable:({groupRowEditable:e,cellEditor:t})=>e?t?`RowGroupingEdit`:[`RowGroupingEdit`,`TextEditor`]:null,groupRowValueSetter:({groupRowValueSetter:e})=>e?`RowGroupingEdit`:null,enableCellChangeFlash:`HighlightChanges`,enablePivot:`SharedPivot`,enableRowGroup:`SharedRowGrouping`,enableValue:`SharedAggregation`,filter:({filter:e})=>e&&typeof e!=`string`&&typeof e!=`boolean`?`CustomFilter`:typeof e==`string`?mQ[e]??`ColumnFilter`:`ColumnFilter`,floatingFilter:`ColumnFilter`,getQuickFilterText:`QuickFilter`,headerTooltip:`Tooltip`,headerTooltipValueGetter:`Tooltip`,mainMenuItems:`ColumnMenu`,menuTabs:e=>
vendor: 7,381 bytes, lines 34-35
34{let t=[`columnsMenuTab`,`generalMenuTab`];return e.menuTabs?.some(e=>t.includes(e))?`ColumnMenu`:null},pivot:`SharedPivot`,pivotIndex:`SharedPivot`,rowDrag:`RowDrag`,rowGroup:`SharedRowGrouping`,rowGroupIndex:`SharedRowGrouping`,tooltipField:`Tooltip`,tooltipValueGetter:`Tooltip`,tooltipComponentSelector:`Tooltip`,spanRows:`CellSpan`,groupHierarchy:`SharedRowGrouping`},oEe=()=>({autoHeight:{supportedRowModels:[`clientSide`,`serverSide`],validate:(e,{paginationAutoPageSize:t})=>t?`colDef.autoHeight is not supported with paginationAutoPageSize.`:null},allowFormula:{supportedRowModels:[`clientSide`]},cellRendererParams:{validate:e=>(e.rowGroup!=null||e.rowGroupIndex!=null||e.cellRenderer===`agGroupCellRenderer`)&&`checkbox`in e.cellRendererParams?'Since v33.0, `cellRendererParams.checkbox` has been deprecated. Use `rowSelection.checkboxLocation = "autoGroupColumn"` instead.':null},flex:{validate:(e,t)=>t.autoSizeStrategy?`colDef.flex is not supported with gridOptions.autoSizeStrategy`:null},headerCheckboxSelection:{supportedRowModels:[`clientSide`,`serverSide`],validate:(e,{rowSelection:t})=>t===`multiple`?null:`headerCheckboxSelection is only supported with rowSelection=multiple`},headerCheckboxSelectionCurrentPageOnly:{supportedRowModels:[`clientSide`],validate:(e,{rowSelection:t})=>t===`multiple`?null:`headerCheckboxSelectionCurrentPageOnly is only supported with rowSelection=multiple`},headerCheckboxSelectionFilteredOnly:{supportedRowModels:[`clientSide`],validate:(e,{rowSelection:t})=>t===`multiple`?null:`headerCheckboxSelectionFilteredOnly is only supported with rowSelection=multiple`},headerValueGetter:{validate:e=>{let t=e.headerValueGetter;return typeof t==`function`||typeof t==`string`?null:`headerValueGetter must be a function or a valid string expression`}},icons:{validate:({icons:e})=>{if(e){if(e.smallDown)return yK(262);if(e.smallLeft)return yK(263);if(e.smallRight)return yK(264)}return null}},sort:{validate:e=>cq(e.sort)||oq(e.sort)?null:`sort must be of type (SortDirection | SortDef), currently it is ${typeof e.sort==`object`?JSON.stringify(e.sort):pK(e.sort)}`},initialSort:{validate:e=>cq(e.initialSort)||oq(e.initialSort)?null:`initialSort must be of non-null type (SortDirection | SortDef), currently it is ${typeof e.initialSort==`object`?JSON.stringify(e.initialSort):pK(e.initialSort)}`},sortingOrder:{validate:e=>{let t=e.sortingOrder;if(Array.isArray(t)&&t.length>0){let e=t.filter(e=>!(cq(e)||oq(e)));if(e.length>0)return`sortingOrder must be an array of type non-null (SortDirection | SortDef)[], incorrect items are: [${e.map(e=>typeof e==`string`||e==null?pK(e):JSON.stringify(e)).join(`, `)}]`}else if(!Array.isArray(t)||!t.length)return`sortingOrder must be an array with at least one element, currently it is [${t}]`;return null}},type:{validate:e=>{let t=e.type;return t instanceof Array?t.some(e=>typeof e!=`string`)?`if colDef.type is supplied an array it should be of type 'string[]'`:null:typeof t==`string`?null:`colDef.type should be of type 'string' | 'string[]'`}},rowSpan:{validate:(e,{suppressRowTransform:t})=>t?null:`colDef.rowSpan requires suppressRowTransform to be enabled.`},spanRows:{dependencies:{editable:{required:[!1,void 0]},groupRowEditable:{required:[!1,void 0]},rowDrag:{required:[!1,void 0]},colSpan:{required:[void 0]},rowSpan:{required:[void 0]}},validate:(e,{rowSelection:t,cellSelection:n,suppressRowTransform:r,enableCellSpan:i,rowDragEntireRow:a,enableCellTextSelection:o})=>typeof t==`object`&&t?.mode===`singleRow`&&t?.enableClickSelection?`colDef.spanRows is not supported with rowSelection.clickSelection`:n?`colDef.spanRows is not supported with cellSelection.`:r?`colDef.spanRows is not supported with suppressRowTransform.`:i?a?`colDef.spanRows is not supported with rowDragEntireRow.`:o?`colDef.spanRows is not supported with enableCellTextSelection.`:null:`colDef.spanRows requires enableCellSpan to be enabled.`},groupHierarchy:{validate(e,{groupHierarchyConfig:t={}},n){let r=new Set([`year`,`quarter`,`month`,`formattedMonth`,`day`,`hour`,`minute`,`second`]),i=[];for(let a of e.groupHierarchy??[]){if(typeof a==`object`){n.validation?.validateColDef(a);continue}!r.has(a)&&!(a in t)&&i.push(hQ(a))}return i.length>0?`${`The following parts of colDef.groupHierarchy are not recognised: ${i.join(`, `)}.`} 35${`Choose one of ${[...r].map(hQ).join(`, `)}, or define your own parts in gridOptions.groupHierarchyConfig.`}`:null}}}),sEe={headerName:void 0,columnGroupShow:void 0,headerStyle:void 0,headerClass:void 0,toolPanelClass:void 0,headerValueGetter:void 0,pivotKeys:void 0,groupId:void 0,colId:void 0,sort:void 0,initialSort:void 0,field:void 0,type:void 0,cellDataType:void 0,tooltipComponent:void 0,tooltipField:void 0,headerTooltip:void 0,headerTooltipValueGetter:void 0,cellClass:void 0,showRowGroup:void 0,filter:void 0,initialAggFunc:void 0,defaultAggFunc:void 0,aggFunc:void 0,groupRowEditable:void 0,groupRowValueSetter:void 0,pinned:void 0,initialPinned:void 0,chartDataType:void 0,cellAriaRole:void 0,cellEditorPopupPosition:void 0,headerGroupComponent:void 0,headerGroupComponentParams:void 0,cellStyle:void 0,cellRenderer:void 0,cellRendererParams:void 0,cellEditor:void 0,cellEditorParams:void 0,filterParams:void 0,pivotValueColumn:void 0,headerComponent:void 0,headerComponentParams:void 0,floatingFilterComponent:void 0,floatingFilterComponentParams:void 0,tooltipComponentParams:void 0,refData:void 0,columnChooserParams:void 0,children:void 0,sortingOrder:void 0,allowedAggFuncs:void 0,menuTabs:void 0,pivotTotalColumnIds:void 0,cellClassRules:void 0,icons:void 0,sortIndex:void 0,initialSortIndex:void 0,flex:void 0,initialFlex:void 0,width:void 0,initialWidth:void 0,minWidth:void 0,maxWidth:void 0,rowGroupIndex:void 0,initialRowGroupIndex:void 0,pivotIndex:void 0,initialPivotIndex:void 0,suppressColumnsToolPanel:void 0,suppressFiltersToolPanel:void 0,openByDefault:void 0,marryChildren:void 0,suppressStickyLabel:void 0,hide:void 0,initialHide:void 0,rowGroup:void 0,initialRowGroup:void 0,pivot:void 0,initialPivot:void 0,checkboxSelection:void 0,showDisabledCheckboxes:void 0,headerCheckboxSelection:void 0,headerCheckboxSelectionFilteredOnly:void 0,headerCheckboxSelectionCurrentPageOnly:void 0,suppressHeaderMenuButton:void 0,suppressMovable:void 0,lockPosition:void 0,lockVisible:void 0,lockPinned:void 0,unSortIcon:void 0,suppressSizeToFit:void 0,suppressAutoSize:void 0,enableRowGroup:void 0,enablePivot:void 0,enableValue:void 0,editable:void 0,suppressPaste:void 0,suppressNavigable:void 0,enableCellChangeFlash:void 0,rowDrag:void 0,dndSource:void 0,autoHeight:void 0,wrapText:void 0,sortable:void 0,resizable:void 0,singleClickEdit:void 0,floatingFilter:void 0,cellEditorPopup:void 0,suppressFillHandle:void 0,wrapHeaderText:void 0,autoHeaderHeight:void 0,dndSourceOnRowDrag:void 0,valueGetter:void 0,valueSetter:void 0,filterValueGetter:void 0,keyCreator:void 0,valueFormatter:void 0,valueParser:void 0,comparator:void 0,equals:void 0,pivotComparator:void 0,suppressKeyboardEvent:void 0,suppressHeaderKeyboardEvent:void 0,colSpan:void 0,rowSpan:void 0,spanRows:void 0,getQuickFilterText:void 0,onCellValueChanged:void 0,onCellClicked:void 0,onCellDoubleClicked:void 0,onCellContextMenu:void 0,rowDragText:void 0,tooltipValueGetter:void 0,tooltipComponentSelector:void 0,cellRendererSelector:void 0,cellEditorSelector:void 0,suppressS
35panHeaderHeight:void 0,useValueFormatterForExport:void 0,useValueParserForImport:void 0,mainMenuItems:void 0,contextMenuItems:void 0,suppressFloatingFilterButton:void 0,suppressHeaderFilterButton:void 0,suppressHeaderContextMenu:void 0,loadingCellRenderer:void 0,loadingCellRendererParams:void 0,loadingCellRendererSelector:void 0,context:void 0,dateComponent:void 0,dateComponentParams:void 0,getFindText:void 0,rowGroupingHierarchy:void 0,groupHierarchy:void 0,allowFormula:void 0},cEe=()=>Object.keys(sEe),lEe=()=>({objectName:`colDef`,allProperties:cEe(),docsUrl:`column-properties/`,deprecations:iEe(),validations:oEe()}),uEe=`overlayLoadingTemplate.overlayNoRowsTemplate.gridId.quickFilterText.rowModelType.editType.domLayout.clipboardDelimiter.rowGroupPanelShow.multiSortKey.pivotColumnGroupTotals.pivotRowTotals.pivotPanelShow.fillHandleDirection.groupDisplayType.treeDataDisplayType.treeDataChildrenField.treeDataParentIdField.colResizeDefault.tooltipTrigger.serverSidePivotResultFieldSeparator.columnMenu.tooltipShowMode.invalidEditValueMode.grandTotalRow.themeCssLayer.findSearchValue.styleNonce.renderingMode`.split(`.`),dEe=`components.rowStyle.context.autoGroupColumnDef.localeText.icons.datasource.dragAndDropImageComponentParams.serverSideDatasource.viewportDatasource.groupRowRendererParams.aggFuncs.fullWidthCellRendererParams.defaultColGroupDef.defaultColDef.defaultCsvExportParams.defaultExcelExportParams.columnTypes.rowClassRules.detailCellRendererParams.loadingCellRendererParams.overlayComponentParams.loadingOverlayComponentParams.noRowsOverlayComponentParams.activeOverlayParams.popupParent.themeStyleContainer.statusBar.chartThemeOverrides.customChartThemes.chartToolPanelsDef.dataTypeDefinitions.advancedFilterParent.advancedFilterBuilderParams.advancedFilterParams.formulaDataSource.formulaFuncs.initialState.autoSizeStrategy.selectionColumnDef.findOptions.filterHandlers.groupHierarchyConfig`.split(`.`),fEe=[`sortingOrder`,`alignedGrids`,`rowData`,`columnDefs`,`excelStyles`,`pinnedTopRowData`,`pinnedBottomRowData`,`chartThemes`,`rowClass`,`paginationPageSizeSelector`,`suppressOverlays`],gQ=`rowHeight.detailRowHeight.rowBuffer.headerHeight.groupHeaderHeight.groupLockGroupColumns.floatingFiltersHeight.pivotHeaderHeight.pivotGroupHeaderHeight.groupDefaultExpanded.pivotDefaultExpanded.viewportRowModelPageSize.viewportRowModelBufferSize.autoSizePadding.maxBlocksInCache.maxConcurrentDatasourceRequests.tooltipShowDelay.tooltipSwitchShowDelay.tooltipHideDelay.cacheOverflowSize.paginationPageSize.cacheBlockSize.infiniteInitialRowCount.serverSideInitialRowCount.scrollbarWidth.asyncTransactionWaitMillis.blockLoadDebounceMillis.keepDetailRowsCount.undoRedoCellEditingLimit.cellFlashDuration.cellFadeDuration.tabIndex.pivotMaxGeneratedColumns.rowDragInsertDelay`.split(`.`),pEe=[`theme`,`rowSelection`],mEe=[`cellSelection`,`sideBar`,`rowNumbers`,`suppressGroupChangesColumnVisibility`,`groupAggFiltering`,`suppressStickyTotalRow`,`groupHideParentOfSingleChild`,`enableRowPinning`],_Q=`loadThemeGoogleFonts.suppressMakeColumnVisibleAfterUnGroup.suppressRowClickSelection.suppressCellFocus.suppressHeaderFocus.suppressHorizontalScroll.groupSelectsChildren.alwaysShowHorizontalScroll.alwaysShowVerticalScroll.debug.enableBrowserTooltips.enableCellExpressions.groupSuppressBlankHeader.suppressMenuHide.suppressRowDeselection.unSortIcon.suppressMultiSort.alwaysMultiSort.singleClickEdit.suppressLoadingOverlay.suppressNoRowsOverlay.suppressAutoSize.skipHeaderOnAutoSize.suppressColumnMoveAnimation.suppressMoveWhenColumnDragging.suppressMovableColumns.suppressFieldDotNotation.enableRangeSelection.enableRangeHandle.enableFillHandle.suppressClearOnFillReduction.deltaSort.suppressTouch.allowContextMenuWithControlKey.suppressContextMenu.suppressDragLeaveHidesColumns.suppressRowGroupHidesColumns.suppressMiddleClickScrolls.suppressPreventDefaultOnMouseWheel.suppressCopyRowsToClipboard.copyHeadersToClipboard.copyGroupHeadersToClipboard.pivotMode.suppressAggFuncInHeader.suppressColumnVirtualisation.alwaysAggregateAtRootLevel.suppressFocusAfterRefresh.functionsReadOnly.animateRows.groupSelectsFiltered.groupRemoveSingleChildren.groupRemoveLowestSingleChildren.enableRtl.enableCellSpan.suppressClickEdit.rowDragEntireRow.rowDragManaged.refreshAfterGroupEdit.suppressRowDrag.suppressMoveWhenRowDragging.rowDragMultiRow.enableGroupEdit.embedFullWidthRows.suppressPaginationPanel.groupHideOpenParents.groupHideColumnsUntilExpanded.groupAllowUnbalanced.pagination.paginationAutoPageSize.suppressScrollOnNewData.suppressScrollWhenPopupsAreOpen.purgeClosedRowNodes.cacheQuickFilter.includeHiddenColumnsInQuickFilter.ensureDomOrder.accentedSort.suppressChangeDetection.valueCache.valueCacheNeverExpires.aggregateOnlyChangedColumns.suppressAnimationFrame.suppressExcelExport.suppressCsvExport.includeHiddenColumnsInAdvancedFilter.suppressMultiRangeSelection.enterNavigatesVerticallyAfterEdit.enterNavigatesVertically.suppressPropertyNamesCheck.rowMultiSelectWithClick.suppressRowHoverHighlight.suppressRowTransform.suppressClipboardPaste.suppressLastEmptyLineOnPaste.enableCharts.suppressMaintainUnsortedOrder.enableCellTextSelection.suppressBrowserResizeObserver.suppressMaxRenderedRowRestriction.excludeChildrenWhenTreeDataFiltering.tooltipMouseTrack.tooltipInteraction.keepDetailRows.paginateChildRows.preventDefaultOnContextMenu.undoRedoCellEditing.allowDragFromColumnsToolPanel.pivotSuppressAutoColumn.suppressExpandablePivotGroups.debounceVerticalScrollbar.detailRowAutoHeight.serverSideSortAllLevels.serverSideEnableClientSideSort.serverSideOnlyRefreshFilteredGroups.suppressAggFilteredOnly.showOpenedGroup.suppressClipboardApi.suppressModelUpdateAfterUpdateTransaction.stopEditingWhenCellsLoseFocus.groupMaintainOrder.columnHoverHighlight.readOnlyEdit.suppressRowVirtualisation.enableCellEditingOnBackspace.resetRowDataOnUpdate.removePivotHeaderRowWhenSingleValueColumn.suppressCopySingleCellRanges.suppressGroupRowsSticky.suppressCutToClipboard.rowGroupPanelSuppressSort.allowShowChangeAfterFilter.enableAdvancedFilter.masterDetail.treeData.reactiveCustomComponents.applyQuickFilterBeforePivotOrAgg.suppressServerSideFullWidthLoadingRow.suppressAdvancedFilterEval.loading.maintainColumnOrder.enableStrictPivotColumnOrder.suppressSetFilterByDefault.enableFilterHandlers.suppressStartEditOnTab.hidePaddedHeaderRows.ssrmExpandAllAffectsAllRows.animateColumnResizing`.split(`.`),hEe=`doesExternalFilterPass.processPivotResultColDef.processPivotResultColGroupDef.getBusinessKeyForNode.isRowSelectable.rowDragText.groupRowRenderer.dragAndDropImageComponent.fullWidthCellRenderer.loadingCellRenderer.overlayComponent.loadingOverlayComponent.noRowsOverlayComponent.overlayComponentSelector.activeOverlay.detailCellRenderer.quickFilterParser.quickFilterMatcher.getLocaleText.isExternalFilterPresent.getRowHeight.getRowClass.getRowStyle.getFullRowEditValidationErrors.getContextMenuItems.getMainMenuItems.processRowPostCreate.processCellForClipboard.getGroupRowAgg.isFullWidthRow.sendToClipboard.focusGridInnerElement.navigateToNextHeader.tabToNextHeader.n
35avigateToNextCell.tabToNextCell.tabToNextGridContainer.processCellFromClipboard.getDocument.postProcessPopup.getChildCount.getDataPath.isRowMaster.postSortRows.processHeaderForClipboard.processUnpinnedColumns.processGroupHeaderForClipboard.paginationNumberFormatter.processDataFromClipboard.getServerSideGroupKey.isServerSideGroup.createChartContainer.getChartToolbarItems.fillOperation.isApplyServerSideTransaction.getServerSideGroupLevelParams.isServerSideGroupOpenByDefault.isGroupOpenByDefault.initialGroupOrderComparator.loadingCellRendererSelector.getRowId.chartMenuItems.groupTotalRow.alwaysPassFilter.isRowPinnable.isRowPinned.isRowValidDropPosition`.split(`.`),gEe=()=>[...fEe,...dEe,...uEe,...gQ,...hEe,..._Q,...mEe,...pEe],_Ee=()=>({suppressLoadingOverlay:{version:`32`,message:"Use `loading`=false instead."},enableFillHandle:{version:`32.2`,message:"Use `cellSelection.handle` instead."},enableRangeHandle:{version:`32.2`,message:"Use `cellSelection.handle` instead."},enableRangeSelection:{version:`32.2`,message:"Use `cellSelection = true` instead."},suppressMultiRangeSelection:{version:`32.2`,message:"Use `cellSelection.suppressMultiRanges` instead."},suppressClearOnFillReduction:{version:`32.2`,message:"Use `cellSelection.handle.suppressClearOnFillReduction` instead."},fillHandleDirection:{version:`32.2`,message:"Use `cellSelection.handle.direction` instead."},fillOperation:{version:`32.2`,message:"Use `cellSelection.handle.setFillValue` instead."},suppressRowClickSelection:{version:`32.2`,message:"Use `rowSelection.enableClickSelection` instead."},suppressRowDeselection:{version:`32.2`,message:"Use `rowSelection.enableClickSelection` instead."},rowMultiSelectWithClick:{version:`32.2`,message:"Use `rowSelection.enableSelectionWithoutKeys` instead."},groupSelectsChildren:{version:`32.2`,message:'Use `rowSelection.groupSelects = "descendants"` instead.'},groupSelectsFiltered:{version:`32.2`,message:'Use `rowSelection.groupSelects = "filteredDescendants"` instead.'},isRowSelectable:{version:`32.2`,message:"Use `selectionOptions.isRowSelectable` instead."},suppressCopySingleCellRanges:{version:`32.2`,message:"Use `rowSelection.copySelectedRows` instead."},suppressCopyRowsToClipboard:{version:`32.2`,message:"Use `rowSelection.copySelectedRows` instead."},onRangeSelectionChanged:{version:`32.2`,message:"Use `onCellSelectionChanged` instead."},onRangeDeleteStart:{version:`32.2`,message:"Use `onCellSelectionDeleteStart` instead."},onRangeDeleteEnd:{version:`32.2`,message:"Use `onCellSelectionDeleteEnd` instead."},suppressBrowserResizeObserver:{version:`32.2`,message:`The grid always uses the browser's ResizeObserver, this grid option has no effect.`},onColumnEverythingChanged:{version:`32.2`,message:"Either use `onDisplayedColumnsChanged` which is fired at the same time, or use one of the more specific column events."},groupRemoveSingleChildren:{version:`33`,message:"Use `groupHideParentOfSingleChild` instead."},groupRemoveLowestSingleChildren:{version:`33`,message:'Use `groupHideParentOfSingleChild: "leafGroupsOnly"` instead.'},suppressRowGroupHidesColumns:{version:`33`,message:'Use `suppressGroupChangesColumnVisibility: "suppressHideOnGroup"` instead.'},suppressMakeColumnVisibleAfterUnGroup:{version:`33`,message:'Use `suppressGroupChangesColumnVisibility: "suppressShowOnUngroup"` instead.'},unSortIcon:{version:`33`,message:"Use `defaultColDef.unSortIcon` instead."},sortingOrder:{version:`33`,message:"Use `defaultColDef.sortingOrder` instead."},suppressPropertyNamesCheck:{version:`33`,message:"`gridOptions` and `columnDefs` both have a `context` property that should be used for arbitrary user data. This means that column definitions and gridOptions should only contain valid properties making this property redundant."},suppressAdvancedFilterEval:{version:`34`,message:`Advanced filter no longer uses function evaluation, so this option has no effect.`}});function vQ(e,t,n){return typeof t==`number`||t==null?t==null||t>=n?null:`${e}: value should be greater than or equal to ${n}`:`${e}: value should be a number`}var vEe={alignedGrids:`AlignedGrids`,allowContextMenuWithControlKey:`ContextMenu`,autoSizeStrategy:`ColumnAutoSize`,cellSelection:`CellSelection`,columnHoverHighlight:`ColumnHover`,datasource:`InfiniteRowModel`,doesExternalFilterPass:`ExternalFilter`,editType:`EditCore`,invali
vendor: 192,699 bytes, lines 35-68
35dEditValueMode:`EditCore`,enableAdvancedFilter:`AdvancedFilter`,enableCellSpan:`CellSpan`,enableCharts:`IntegratedCharts`,enableRangeSelection:`CellSelection`,enableRowPinning:`PinnedRow`,findSearchValue:`Find`,getFullRowEditValidationErrors:`EditCore`,getContextMenuItems:`ContextMenu`,getLocaleText:`Locale`,getMainMenuItems:`ColumnMenu`,getRowClass:`RowStyle`,getRowStyle:`RowStyle`,groupTotalRow:`SharedRowGrouping`,grandTotalRow:`ClientSideRowModelHierarchy`,initialState:`GridState`,isExternalFilterPresent:`ExternalFilter`,isRowPinnable:`PinnedRow`,isRowPinned:`PinnedRow`,localeText:`Locale`,masterDetail:`SharedMasterDetail`,pagination:`Pagination`,pinnedBottomRowData:`PinnedRow`,pinnedTopRowData:`PinnedRow`,pivotMode:`SharedPivot`,pivotPanelShow:`RowGroupingPanel`,quickFilterText:`QuickFilter`,rowClass:`RowStyle`,rowClassRules:`RowStyle`,rowData:`ClientSideRowModel`,rowDragManaged:`RowDrag`,refreshAfterGroupEdit:[`RowGrouping`,`TreeData`],rowGroupPanelShow:`RowGroupingPanel`,rowNumbers:`RowNumbers`,rowSelection:`SharedRowSelection`,rowStyle:`RowStyle`,serverSideDatasource:`ServerSideRowModel`,sideBar:`SideBar`,statusBar:`StatusBar`,treeData:`SharedTreeData`,undoRedoCellEditing:`UndoRedoEdit`,valueCache:`ValueCache`,viewportDatasource:`ViewportRowModel`},yEe=()=>{let e={autoSizePadding:{validate({autoSizePadding:e}){return vQ(`autoSizePadding`,e,0)}},cacheBlockSize:{supportedRowModels:[`serverSide`,`infinite`],validate({cacheBlockSize:e}){return vQ(`cacheBlockSize`,e,1)}},cacheOverflowSize:{validate({cacheOverflowSize:e}){return vQ(`cacheOverflowSize`,e,1)}},datasource:{supportedRowModels:[`infinite`]},domLayout:{validate:e=>{let t=e.domLayout,n=[`autoHeight`,`normal`,`print`];return t&&!n.includes(t)?`domLayout must be one of [${n.join()}], currently it's ${t}`:null}},enableFillHandle:{dependencies:{enableRangeSelection:{required:[!0]}}},enableRangeHandle:{dependencies:{enableRangeSelection:{required:[!0]}}},enableCellSpan:{supportedRowModels:[`clientSide`,`serverSide`]},enableRangeSelection:{dependencies:{rowDragEntireRow:{required:[!1,void 0]}}},enableRowPinning:{supportedRowModels:[`clientSide`],validate({enableRowPinning:e,pinnedTopRowData:t,pinnedBottomRowData:n}){return e&&(t||n)?"Manual row pinning cannot be used together with pinned row data. Either set `enableRowPinning` to `false`, or remove `pinnedTopRowData` and `pinnedBottomRowData`.":null}},isRowPinnable:{supportedRowModels:[`clientSide`],validate({enableRowPinning:e,isRowPinnable:t,pinnedTopRowData:n,pinnedBottomRowData:r}){return t&&(n||r)?"Manual row pinning cannot be used together with pinned row data. Either remove `isRowPinnable`, or remove `pinnedTopRowData` and `pinnedBottomRowData`.":!e&&t?"`isRowPinnable` requires `enableRowPinning` to be set.":null}},isRowPinned:{supportedRowModels:[`clientSide`],validate({enableRowPinning:e,isRowPinned:t,pinnedTopRowData:n,pinnedBottomRowData:r}){return t&&(n||r)?"Manual row pinning cannot be used together with pinned row data. Either remove `isRowPinned`, or remove `pinnedTopRowData` and `pinnedBottomRowData`.":!e&&t?"`isRowPinned` requires `enableRowPinning` to be set.":null}},groupDefaultExpanded:{supportedRowModels:[`clientSide`]},groupHideColumnsUntilExpanded:{supportedRowModels:[`clientSide`],validate({groupHideColumnsUntilExpanded:e,groupHideOpenParents:t,groupDisplayType:n}){return e&&!t&&n!==`multipleColumns`?"`groupHideColumnsUntilExpanded = true` requires either `groupDisplayType = 'multipleColumns'` or `groupHideOpenParents = true`":null}},groupHideOpenParents:{supportedRowModels:[`clientSide`,`serverSide`],dependencies:{groupTotalRow:{required:[void 0,`bottom`]},treeData:{required:[void 0,!1],reason:`Tree Data has values at the group level so it doesn't make sense to hide them.`}}},groupHideParentOfSingleChild:{dependencies:{groupHideOpenParents:{required:[void 0,!1]}}},groupRemoveLowestSingleChildren:{dependencies:{groupHideOpenParents:{required:[void 0,!1]},groupRemoveSingleChildren:{required:[void 0,!1]}}},groupRemoveSingleChildren:{dependencies:{groupHideOpenParents:{required:[void 0,!1]},groupRemoveLowestSingleChildren:{required:[void 0,!1]}}},groupSelectsChildren:{dependencies:{rowSelection:{required:[`multiple`]}}},groupHierarchyConfig:{validate({groupHierarchyConfig:e={}},t,n){for(let t of Object.keys(e))n.validation?.validateColDef(e[t]);return null}},icons:{validate:({icons:e})=>{if(e){if(e.smallDown)return yK(262);if(e.smallLeft)return yK(263);if(e.smallRight)return yK(264)}return null}},infiniteInitialRowCount:{validate({infiniteInitialRowCount:e}){return vQ(`infiniteInitialRowCount`,e,1)}},initialGroupOrderComparator:{supportedRowModels:[`clientSide`]},ssrmExpandAllAffectsAllRows:{validate:e=>{if(typeof e.ssrmExpandAllAffectsAllRows==`boolean`){if(e.rowModelType!==`serverSide`)return`'ssrmExpandAllAffectsAllRows' is only supported with the Server Side Row Model.`;if(e.ssrmExpandAllAffectsAllRows&&typeof e.getRowId!=`function`)return`'getRowId' callback must be provided for Server Side Row Model grouping to work correctly.`}return null}},keepDetailRowsCount:{validate({keepDetailRowsCount:e}){return vQ(`keepDetailRowsCount`,e,1)}},paginationPageSize:{validate({paginationPageSize:e}){return vQ(`paginationPageSize`,e,1)}},paginationPageSizeSelector:{validate:e=>{let t=e.paginationPageSizeSelector;return typeof t==`boolean`||t==null||t.length?null:`'paginationPageSizeSelector' cannot be an empty array. 36 If you want to hide the page size selector, set paginationPageSizeSelector to false.`}},pivotMode:{dependencies:{treeData:{required:[!1,void 0],reason:`Pivot Mode is not supported with Tree Data.`}}},quickFilterText:{supportedRowModels:[`clientSide`]},rowBuffer:{validate({rowBuffer:e}){return vQ(`rowBuffer`,e,0)}},rowClass:{validate:e=>typeof e.rowClass==`function`?`rowClass should not be a function, please use getRowClass instead`:null},rowData:{supportedRowModels:[`clientSide`]},rowDragManaged:{supportedRowModels:[`clientSide`],dependencies:{pagination:{required:[!1,void 0]}}},rowSelection:{validate({rowSelection:e}){return e&&typeof e==`string`?'As of version 32.2.1, using `rowSelection` with the values "single" or "multiple" has been deprecated. Use the object value instead.':e&&typeof e!=`object`?"Expected `RowSelectionOptions` object for the `rowSelection` property.":e&&e.mode!==`multiRow`&&e.mode!==`singleRow`?`Selection mode "${e.mode}" is invalid. Use one of 'singleRow' or 'multiRow'.`:null}},rowStyle:{validate:e=>{let t=e.rowStyle;return t&&typeof t==`function`?`rowStyle should be an object of key/value styles, not be a function, use getRowStyle() instead`:null}},serverSideDatasource:{supportedRowModels:[`serverSide`]},serverSideInitialRowCount:{supportedRowModels:[`serverSide`],validate({serverSideInitialRowCount:e}){return vQ(`serverSideInitialRowCount`,e,1)}},serverSideOnlyRefreshFilteredGroups:{supportedRowModels:[`serverSide`]},serverSideSortAllLevels:{supportedRowModels:[`serverSide`]},sortingOrder:{validate:e=>{let t=e.sortingOrder;if(Array.isArray(t)&&t.length>0){let e=t.filter(e=>!aq(e));if(e.length>0)return`sortingOrder must be an array of type (SortDirection | SortDef)[], incorrect items are: ${e.map(e=>typeof e==`string`||e==null?pK(e):JSON.stringify(e))}]`}else if(!Array.isArray(t)||!t.length)return`sortingOrder must be an array with at least one element, currently it's ${t}`;return null}},tooltipHideDelay:{validate:e=>e.tooltipHideDelay&&e.tooltipHideDelay<0?`tooltipHideDelay should not be lower than 0`:null},tooltipShowDelay:{validate:e=>e.tooltipShowDelay&&e.tooltipShowDelay<0?`tooltipShowDelay should not be lower than 0`:null},tooltipSwitchShowDelay:{validate:e=>e.tooltipSwitchShowDelay&&e.tooltipSwitchShowDelay<0?`tooltipSwitchShowDelay should not be lower than 0`:null},treeData:{supportedRowModels:[`clientSide`,`serverSide`],validate:e=>{let t=e.rowModelType??`clientSide`;switch(t){case`clientSide`:{let{treeDataChildrenField:t,treeDataParentIdField:n,getDataPath:r,getRowId:i}=e;if(!t&&!n&&!r)return`treeData requires either 'treeDataChildrenField' or 'treeDataParentIdField' or 'getDataPath' in the clientSide row model.`;if(t){if(r)return`Cannot use both 'treeDataChildrenField' and 'getDataPath' at the same time.`;if(n)return`Cannot use both 'treeDataChildrenField' and 'treeDataParentIdField' at the same time.`}if(n){if(!i)return`getRowId callback not provided, tree data with parent id cannot be built.`;if(r)return`Cannot use both 'treeDataParentIdField' and 'getDataPath' at the same time.`}return null}case`serverSide`:{let n=`treeData requires 'isServerSideGroup' and 'getServerSideGroupKey' in the ${t} row model.`;return e.isServerSideGroup&&e.getServerSideGroupKey?null:n}}return null}},viewportDatasource:{supportedRowModels:[`viewport`]},viewportRowModelBufferSize:{validate({viewportRowModelBufferSize:e}){return vQ(`viewportRowModelBufferSize`,e,0)}},viewportRowModelPageSize:{validate({viewportRowModelPageSize:e}){return vQ(`viewportRowModelPageSize`,e,1)}},rowDragEntireRow:{dependencies:{cellSelection:{required:[void 0]}}},autoGroupColumnDef:{validate({autoGroupColumnDef:e,showOpenedGroup:t}){return e?.field&&t?`autoGroupColumnDef.field and showOpenedGroup are not supported when used together.`:e?.valueGetter&&t?`autoGroupColumnDef.valueGetter and showOpenedGroup are not supported when used together.`:null}},renderingMode:{validate:e=>{let t=e.renderingMode,n=[`default`,`legacy`];return t&&!n.includes(t)?`renderingMode must be one of [${n.join()}], currently it's ${t}`:null}},autoSizeStrategy:{validate:({autoSizeStrategy:e})=>{if(!e)return null;let t=[`fitCellContents`,`fitGridWidth`,`fitProvidedWidth`],n=e.type;return n!==`fitCellContents`&&n!==`fitGridWidth`&&n!==`fitProvidedWidth`?`Invalid Auto-size strategy. \`autoSizeStrategy\` must be one of ${t.map(e=>`"`+e+`"`).join(`, `)}, currently it's ${n}`:n===`fitProvidedWidth`&&typeof e.width!=`number`?`When using the 'fitProvidedWidth' auto-size strategy, must provide a numeric \`width\`. You provided ${e.width}`:null}}},t={};for(let e of _Q)t[e]={expectedType:`boolean`};for(let e of gQ)t[e]={expectedType:`number`};return LG(t,e),t},bEe=()=>({objectName:`gridOptions`,allProperties:[...gEe(),...Object.values(pQ)],propertyExceptions:[`api`],docsUrl:`grid-options/`,deprecations:_Ee(),validations:yEe()}),xEe=0,SEe=0,yQ=`__ag_grid_instance`,CEe=class extends Q{constructor(){super(...arguments),this.beanName=`gos`,this.domDataKey=`__AG_`+Math.random().toString(),this.instanceId=SEe++,this.gridReadyFired=!1,this.queueEvents=[],this.propEventSvc=new oW,this.globalEventHandlerFactory=e=>(t,n)=>{if(!this.isAlive())return;let r=fQ.has(t);if(r&&!e||!r&&e||!wEe(t))return;let i=(e,t)=>{let n=pQ[e],r=this.gridOptions[n];typeof r==`function`&&this.beans.frameworkOverrides.wrapOutgoing(()=>r(t))};if(this.gridReadyFired)i(t,n);else if(t===`gridReady`){i(t,n),this.gridReadyFired=!0;for(let e of this.queueEvents)i(e.eventName,e.event);this.queueEvents=[]}else this.queueEvents.push({eventName:t,event:n})}}wireBeans(e){this.gridOptions=e.gridOptions,this.validation=e.validation,this.api=e.gridApi,this.gridId=e.context.getId()}get gridOptionsContext(){return this.gridOptions.context}postConstruct(){this.validateGridOptions(this.gridOptions),this.eventSvc.addGlobalListener(this.globalEventHandlerFactory().bind(this),!0),this.eventSvc.addGlobalListener(this.globalEventHandlerFactory(!0).bind(this),!1),this.propEventSvc.setFrameworkOverrides(this.beans.frameworkOverrides),this.addManagedEventListeners({gridOptionsChanged:({options:e})=>{this.updateGridOptions({options:e,force:!0,source:`optionsUpdated`})}})}destroy(){super.destroy(),this.queueEvents=[]}get(e){return this.gridOptions[e]??HG[e]}getCallback(e){return this.mergeGridCommonParams(this.gridOptions[e])}exists(e){return nW(this.gridOptions[e])}mergeGridCommonParams(e){return e&&(t=>e(this.addCommon(t)))}updateGridOptions({options:e,force:t,source:n=`api`}){let r={id:xEe++,properties:[]},i=[],{gridOptions:a,validation:o}=this;for(let s of Object.keys(e)){let c=BG.applyGlobalGridOption(s,e[s]);o?.warnOnInitialPropertyUpdate(n,s);let l=t||typeof c==`object`&&n===`api`,u=a[s];if(l||u!==c){a[s]=c;let e={type:s,currentValue:c,previousValue:u,changeSet:r,source:n};i.push(e)}}this.validateGridOptions(this.gridOptions),r.properties=i.map(e=>e.type);for(let e of i)WG(this,`Updated property ${e.type} from`,e.previousValue,` to `,e.currentValue),this.propEventSvc.dispatchEvent(e)}addPropertyEventListener(e,t){this.propEventSvc.addEventListener(e,t)}removePropertyEventListener(e,t){this.propEventSvc.removeEventListener(e,t)}getDomDataKey(){return this.domDataKey}addCommon(e){return e.api=this.api,e.context=this.gridOptionsContext,e}validateOptions(e,t){for(let n of Object.keys(e)){let r=e[n];if(r==null||r===!1)continue;let i=t[n];typeof i==`function`&&(i=i(e,this.gridOptions,this.beans)),i&&this.assertModuleRegistered(i,n)}}validateGridOptions(e){this.validateOptions(e,vEe),this.validation?.processGridOptions(e)}validateColDef(e,t,n){(n||!this.beans.dataTypeSvc?.isColPendingInference(t))&&(this.validateOptions(e,aEe),this.validation?.validateColDef(e))}assertModuleRegistered(e,t){let n=Array.isArray(e)?e.some(e=>this.isModuleRegistered(e)):this.isModuleRegistered(e);return n||_K(200,{...this.getModuleErrorParams(),moduleName:e,reasonOrId:t}),n}getModuleErrorParams(){return{gridId:this.gridId,gridScoped:nK(),rowModelType:this.get(`rowModelType`),isUmd:rK()}}isModuleRegistered(e){return tK(e,this.gridId,this.get(`rowModelType`))}setInstanceDomData(e){e[yQ]=this.instanceId}isElementInThisInstance(e){let t=e;for(;t;){let e=t[yQ];if(nW(e))return e===this.instanceId;t=t.parentElement}return!1}};function wEe(e){return!!pQ[e]}var TEe=class extends Q{constructor(e,t){super(),this.column=e,this.eGui=t,this.lastMovingChanged=0}postConstruct(){this.addManagedElementListeners(this.eGui,{click:e=>e&&this.onClick(e)}),this.addManagedListeners(this.column,{movingChanged:()=>{this.lastMovingChanged=Date.now()}})}onClick(e){let{sortSvc:t,rangeSvc:n,gos:r}=this.beans;if(WK(r)&&!e.altKey)n?.handleColumnSelection(this.column,e);else if(this.column.isSortable()){let n=this.column.isMoving(),r=Date.now()-this.lastMovingChanged<50;n||r||t?.progressSortFromEvent(this.column,e)}}};function EEe(e,t){let n={"aria-hidden":`true`};return{tag:`div`,cls:`ag-cell-label-container`,role:`presentation`,children:[{tag:`span`,ref:`eMenu`,cls:`ag-header-icon ag-header-cell-menu-button`,attrs:n},{tag:`span`,ref:`eFilterButton`,cls:`ag-header-icon ag-header-cell-filter-button`,attrs:n},{tag:`div`,ref:`eLabel`,cls:`ag-header-cell-label`,role:`presentation`,children:[e?{tag:`span`,ref:`eColRef`,cls:`ag-header-col-ref`}:null,{tag:`span`,ref:`eText`,cls:`ag-header-cell-text`},{tag:`span`,ref:`eFilter`,cls:`ag-header-icon ag-header-label-icon ag-filter-icon`,attrs:n},t?{tag:`ag-sort-indicator`,ref:`eSortIndicator`}:null]}]}}var DEe=class extends Yq{constructor(){super(...arguments),this.eFilter=null,this.eFilterButton=null,this.eSortIndicator=null,this.eMenu=null,this.eLabel=null,this.eText=null,this.eColRef=null,this.eSortOrder=null,this.eSortAsc=null,this.eSortDesc=null,this.eSortMixed=null,this.eSortNone=null,this.eSortAbsoluteAsc=null,this.eSortAbsoluteDesc=null,this.isLoadingInnerComponent=!1}refresh(e){let t=this.params;if(this.params=e,this.workOutTemplate(e,!!this.beans?.sortSvc)!=this.currentTemplate||this.workOutShowMenu()!=this.currentShowMenu||e.enableSorting!=this.currentSort||e.column.formulaRef!=this.currentRef||this.currentSuppressMenuHide!=null&&this.shouldSuppressMenuHide()!=this.currentSuppressMenuHide||t.enableFilterButton!=e.enableFilterButton||t.enableFilterIcon!=e.enableFilterIcon)return!1;if(this.innerHeaderComponent){let t={...e};LG(t,e.innerHeaderComponentParams),this.innerHeaderComponent.refresh?.(t)}else this.setDisplayName(e);return!0}workOutTemplate(e,t){let{formula:n}=this.beans,r=e.template;return r?r?.trim?r.trim():r:EEe(!!n?.active,t)}init(e){this.params=e;let{sortSvc:t,touchSvc:n,rowNumbersSvc:r,userCompFactory:i}=this.beans,a=t?.getSortIndicatorSelector();this.currentTemplate=this.workOutTemplate(e,!!a),this.setTemplate(this.currentTemplate,a?[a]:void 0),this.eLabel&&(this.mouseListener??=this.createManagedBean(new TEe(e.column,this.eLabel))),n?.setupForHeader(this),this.setMenu(),this.setupSort(),this.setupColumnRefIndicator(),r?.setupForHeader(this),this.setupFilterIcon(),this.setupFilterButton(),this.workOutInnerHeaderComponent(i,e),this.setDisplayName(e)}workOutInnerHeaderComponent(e,t){let n=xbe(e,t,t);n&&(this.isLoadingInnerComponent=!0,n.newAgStackInstance().then(e=>{this.isLoadingInnerComponent=!1,e&&(this.isAlive()?(this.innerHeaderComponent=e,this.eText&&this.eText.appendChild(e.getGui())):this.destroyBean(e))}))}setDisplayName(e){let{displayName:t}=e,n=this.currentDisplayName;this.currentDisplayName=t,!(!this.eText||n===t||this.innerHeaderComponent||this.isLoadingInnerComponent)&&(this.eText.textContent=sW(t))}addInIcon(e,t,n){let r=pX(e,this.beans,n);r&&t.appendChild(r)}workOutShowMenu(){return this.params.enableMenu&&!!this.beans.menuSvc?.isHeaderMenuButtonEnabled()}shouldSuppressMenuHide(){return!!this.beans.menuSvc?.isHeaderMenuButtonAlwaysShowEnabled()}setMenu(){if(!this.eMenu)return;if(this.currentShowMenu=this.workOutShowMenu(),!this.currentShowMenu){JW(this.eMenu),this.eMenu=void 0;return}let{gos:e,eMenu:t,params:n}=this,r=$K(e);this.addInIcon(r?`menu`:`menuAlt`,t,n.column),t.classList.toggle(`ag-header-menu-icon`,!r);let i=this.shouldSuppressMenuHide();this.currentSuppressMenuHide=i,this.addManagedElementListeners(t,{click:()=>this.showColumnMenu(this.eMenu)}),this.toggleMenuAlwaysShow(i)}toggleMenuAlwaysShow(e){this.eMenu?.classList.toggle(`ag-header-menu-always-show`,e)}showColumnMenu(e){let{currentSuppressMenuHide:t,params:n}=this;t||this.toggleMenuAlwaysShow(!0),n.showColumnMenu(e,()=>{t||this.toggleMenuAlwaysShow(!1)})}onMenuKeyboardShortcut(e){let{params:t,gos:n,beans:r,eMenu:i,eFilterButton:a}=this,o=t.column,s=$K(n);if(e&&!s){if(r.menuSvc?.isFilterMenuInHeaderEnabled(o))return t.showFilter(a??i??this.getGui()),!0}else if(t.enableMenu)return this.showColumnMenu(i??a??this.getGui()),!0;return!1}setupSort(){let{sortSvc:e}=this.beans;if(!e)return;let{enableSorting:t,column:n}=this.params;if(this.currentSort=t,!this.eSortIndicator){this.eSortIndicator=this.createBean(e.createSortIndicator(!0));let{eSortIndicator:t,eSortOrder:n,eSortAsc:r,eSortDesc:i,eSortMixed:a,eSortNone:o,eSortAbsoluteAsc:s,eSortAbsoluteDesc:c}=this;t.attachCustomElements(n,r,i,a,o,s,c)}this.eSortIndicator.setupSort(n),this.currentSort&&e.setupHeader(this,n)}setupColumnRefIndicator(){let{eColRef:e,beans:{editModelSvc:t},params:n}=this;e&&(this.currentRef=n.column.formulaRef,e.textContent=this.currentRef,FW(e,!1),this.addManagedEventListeners({cellEditingStarted:()=>{let n=t?.getEditPositions(),r=!!this.currentRef&&!!n?.some(e=>e.column.isAllowFormula());FW(e,r)},cellEditingStopped:()=>{FW(e,!1)}}))}setupFilterIcon(){let{eFilter:e,params:t}=this;e&&this.configureFilter(t.enableFilterIcon,e,()=>{let n=t.column.isFilterActive();FW(e,n,{skipAriaHidden:!0})},`filterActive`)}setupFilterButton(){let{eFilterButton:e,params:t}=this;e&&(this.configureFilter(t.enableFilterButton,e,this.onFilterChangedButton.bind(this),`filter`)?this.addManagedElementListeners(e,{click:()=>t.showFilter(e)}):this.eFilterButton=void 0)}configureFilter(e,t,n,r){if(!e)return JW(t),!1;let i=this.params.column;return this.addInIcon(r,t,i),this.addManagedListeners(i,{filterChanged:n}),n(),!0}onFilterChangedButton(){let e=this.params.column.isFilterActive();this.eFilterButton.classList.toggle(`ag-filter-active`,e)}getAnchorElementForMenu(e){let{eFilterButton:t,eMenu:n}=this;return e?t??n??this.getGui():n??t??this.getGui()}destroy(){super.destroy(),this.innerHeaderComponent=this.destroyBean(this.innerHeaderComponent),this.mouseListener=this.destroyBean(this.mouseListener)}},OEe=class extends Q{constructor(e,t){super(),this.eLabel=e,this.columnGroup=t,this.isSticky=!1,this.left=null,this.right=null}postConstruct(){let{columnGroup:e,beans:t}=this,{ctrlsSvc:n}=t;n.whenReady(this,()=>{let t=this.refreshPosition.bind(this);e.getPinned()??this.addManagedEventListeners({bodyScroll:e=>{e.direction===`horizontal`&&this.updateSticky(e.left)}}),this.addManagedListeners(e,{leftChanged:t,displayedChildrenChanged:t}),this.addManagedEventListeners({columnResized:t}),this.refreshPosition()})}refreshPosition(){let{columnGroup:e,beans:t}=this,n=e.getLeft(),r=e.getActualWidth();if(n==null||r===0){this.left=null,this.right=null,this.setSticky(!1);return}this.left=n,this.right=n+r;let i=t.colViewport.getScrollPosition();i!=null&&this.updateSticky(i)}updateSticky(e){let{beans:t,left:n,right:r}=this;if(n==null||r==null){this.setSticky(!1);return}let{gos:i,visibleCols:a}=t,o=i.get(`enableRtl`)?a.bodyWidth-e:e;this.setSticky(n<o&&r>o)}setSticky(e){let{isSticky:t,eLabel:n}=this;t!==e&&(this.isSticky=e,n.classList.toggle(`ag-sticky-label`,e))}},kEe={tag:`div`,cls:`ag-header-group-cell-label`,role:`presentation`,children:[{tag:`span`,ref:`agLabel`,cls:`ag-header-group-text`,role:`presentation`},{tag:`span`,ref:`agOpened`,cls:`ag-header-icon ag-header-expand-icon ag-header-expand-icon-expanded`},{tag:`span`,ref:`agClosed`,cls:`ag-header-icon ag-header-expand-icon ag-header-expand-icon-collapsed`}]},AEe=class extends Yq{constructor(){super(kEe),this.agOpened=null,this.agClosed=null,this.agLabel=null,this.isLoadingInnerComponent=!1}init(e){let{userCompFactory:t,touchSvc:n}=this.beans;this.params=e,this.checkWarnings(),this.workOutInnerHeaderGroupComponent(t,e),this.setupLabel(e),this.addGroupExpandIcon(e),this.setupExpandIcons(),n?.setupForHeaderGroup(this)}checkWarnings(){this.params.template&&gK(89)}workOutInnerHeaderGroupComponent(e,t){let n=Cbe(e,t,t);n&&(this.isLoadingInnerComponent=!0,n.newAgStackInstance().then(e=>{this.isLoadingInnerComponent=!1,e&&(this.isAlive()?(this.innerHeaderGroupComponent=e,this.agLabel.appendChild(e.getGui())):this.destroyBean(e))}))}setupExpandIcons(){let{agOpened:e,agClosed:t,params:{columnGroup:n},beans:{colGroupSvc:r}}=this;this.addInIcon(`columnGroupOpened`,e),this.addInIcon(`columnGroupClosed`,t);let i=e=>{if(SJ(e))return;let t=!n.isExpanded();r.setColumnGroupOpened(n.getProvidedColumnGroup(),t,`uiColumnExpanded`)};this.addTouchAndClickListeners(t,i),this.addTouchAndClickListeners(e,i);let a=e=>{xJ(e)};this.addManagedElementListeners(t,{dblclick:a}),this.addManagedElementListeners(e,{dblclick:a}),this.addManagedElementListeners(this.getGui(),{dblclick:i}),this.updateIconVisibility();let o=n.getProvidedColumnGroup(),s=this.updateIconVisibility.bind(this);this.addManagedListeners(o,{expandedChanged:s,expandableChanged:s})}addTouchAndClickListeners(e,t){this.beans.touchSvc?.setupForHeaderGroupElement(this,e,t),this.addManagedElementListeners(e,{click:t})}updateIconVisibility(){let{agOpened:e,agClosed:t,params:{columnGroup:n}}=this;if(n.isExpandable()){let r=n.isExpanded();FW(e,r),FW(t,!r)}else FW(e,!1),FW(t,!1)}addInIcon(e,t){let n=pX(e,this.beans,null);n&&t.appendChild(n)}addGroupExpandIcon(e){if(!e.columnGroup.isExpandable()){let{agOpened:e,agClosed:t}=this;FW(e,!1),FW(t,!1)}}setupLabel(e){let{displayName:t,columnGroup:n}=e,{innerHeaderGroupComponent:r,isLoadingInnerComponent:i}=this,a=r||i;nW(t)&&!a&&(this.agLabel.textContent=sW(t)),n.getColGroupDef()?.suppressStickyLabel||this.createManagedBean(new OEe(this.getGui(),n))}destroy(){super.destroy(),this.innerHeaderGroupComponent&&=(this.destroyBean(this.innerHeaderGroupComponent),void 0)}},jEe={moduleName:`ColumnHeaderComp`,version:aK,userComponents:{agColumnHeader:DEe},icons:{menu:`menu`,menuAlt:`menu-alt`}},MEe={moduleName:`ColumnGroupHeaderComp`,version:aK,userComponents:{agColumnGroupHeader:AEe},icons:{columnGroupOpened:`expanded`,columnGroupClosed:`contracted`}},NEe={moduleName:`AnimationFrame`,version:aK,beans:[class extends Q{constructor(){super(...arguments),this.beanName=`animationFrameSvc`,this.p1={list:[],sorted:!1},this.p2={list:[],sorted:!1},this.f1={list:[],sorted:!1},this.destroyTasks=[],this.ticking=!1,this.scrollGoingDown=!0,this.lastScrollTop=0,this.taskCount=0}setScrollTop(e){this.scrollGoingDown=e>=this.lastScrollTop,e===0&&(this.scrollGoingDown=!0),this.lastScrollTop=e}postConstruct(){this.active=!this.gos.get(`suppressAnimationFrame`),this.batchFrameworkComps=this.beans.frameworkOverrides.batchFrameworkComps}verify(){this.active===!1&&gK(92)}createTask(e,t,n,r,i=!1){this.verify();let a=n;r&&this.batchFrameworkComps&&(a=`f1`);let o={task:e,index:t,createOrder:++this.taskCount,deferred:i};this.addTaskToList(this[a],o),this.schedule()}addTaskToList(e,t){e.list.push(t),e.sorted=!1}sortTaskList(e){if(e.sorted)return;let t=this.scrollGoingDown?1:-1;e.list.sort((e,n)=>e.deferred===n.deferred?e.index===n.index?n.createOrder-e.createOrder:t*(n.index-e.index):e.deferred?-1:1),e.sorted=!0}addDestroyTask(e){this.verify(),this.destroyTasks.push(e),this.schedule()}executeFrame(e){let{p1:t,p2:n,f1:r,destroyTasks:i,beans:a}=this,{ctrlsSvc:o,frameworkOverrides:s}=a,c=t.list,l=n.list,u=r.list,d=Date.now(),f=0,p=e<=0,m=o.getScrollFeature();for(;p||f<e;){if(!m.scrollGridIfNeeded()){let a;if(c.length)this.sortTaskList(t),a=c.pop().task;else if(l.length)this.sortTaskList(n),a=l.pop().task;else if(u.length)s.wrapOutgoing(()=>{for(;(p||f<e)&&!m.scrollGridIfNeeded()&&u.length;)this.sortTaskList(r),a=u.pop().task,a(),f=Date.now()-d}),a=()=>{};else if(i.length)a=i.pop();else break;a()}f=Date.now()-d}c.length||l.length||u.length||i.length?this.requestFrame():this.ticking=!1}flushAllFrames(){this.active&&this.executeFrame(-1)}schedule(){this.active&&(this.ticking||(this.ticking=!0,this.requestFrame()))}requestFrame(){let e=this.executeFrame.bind(this,60);lG(this.beans,e)}isQueueEmpty(){return!this.ticking}}]},PEe=class extends Q{constructor(){super(...arguments),this.beanName=`iconSvc`}createIconNoSpan(e,t){return pX(e,this.beans,t?.column)}},FEe=(e,t,n)=>t||e&&n,IEe={moduleName:`Touch`,version:aK,beans:[class extends Q{constructor(){super(...arguments),this.beanName=`touchSvc`}mockBodyContextMenu(e,t){this.mockContextMenu(e,e.eBodyViewport,t)}mockHeaderContextMenu(e,t){this.mockContextMenu(e,e.eGui,t)}mockRowContextMenu(e){oJ()&&this.mockContextMenu(e,e.element,(t,n,r)=>{let{rowCtrl:i,cellCtrl:a}=e.getControlsForEventTarget(r?.target??null);a?.column&&a.dispatchCellContextMenuEvent(r??null),this.beans.contextMenuSvc?.handleContextMenuMouseEvent(void 0,r,i,a)})}handleCellDoubleClick(e,t){return(()=>{if(!oJ()||_G(`dblclick`))return!1;let t=Date.now(),n=t-e.lastIPadMouseClickEvent<200;return e.lastIPadMouseClickEvent=t,n})()?(e.onCellDoubleClicked(t),t.preventDefault(),!0):!1}setupForHeader(e){let{gos:t,sortSvc:n,menuSvc:r}=this.beans;if(t.get(`suppressTouch`))return;let{params:i,eMenu:a,eFilterButton:o}=e,s=new YJ(e.getGui(),!0);e.addDestroyFunc(()=>s.destroy());let c=e.shouldSuppressMenuHide(),l=c&&nW(a)&&i.enableMenu,u=!!r?.isHeaderContextMenuEnabled(i.column),d=FEe(i.enableMenu,u,$K(t)),f=s;l&&(f=new YJ(a,!0),e.addDestroyFunc(()=>f.destroy()));let p=e=>i.showColumnMenuAfterMouseClick(e.touchStart);if(l&&i.enableMenu&&e.addManagedListeners(f,{tap:p}),d&&e.addManagedListeners(s,{longTap:p}),i.enableSorting&&e.addManagedListeners(s,{tap:e=>{let t=e.touchStart.target;c&&(a?.contains(t)||o?.contains(t))||n?.progressSort(i.column,!1,`uiColumnSorted`)}}),i.enableFilterButton&&o){let t=new YJ(o,!0);e.addManagedListeners(t,{tap:()=>i.showFilter(o)}),e.addDestroyFunc(()=>t.destroy())}}setupForHeaderGroup(e){let t=e.params;if(this.beans.menuSvc?.isHeaderContextMenuEnabled(t.columnGroup.getProvidedColumnGroup())){let n=new YJ(t.eGridHeader,!0);e.addManagedListeners(n,{longTap:e=>t.showColumnMenuAfterMouseClick(e.touchStart)}),e.addDestroyFunc(()=>n.destroy())}}setupForHeaderGroupElement(e,t,n){let r=new YJ(t,!0);e.addManagedListeners(r,{tap:n}),e.addDestroyFunc(()=>r.destroy())}mockContextMenu(e,t,n){if(!oJ())return;let r=new YJ(t);e.addManagedListeners(r,{longTap:e=>{TG(this.beans,e.touchEvent)&&n(void 0,e.touchStart,e.touchEvent)}}),e.addDestroyFunc(()=>r.destroy())}}]},LEe=class extends Q{constructor(){super(...arguments),this.beanName=`cellNavigation`}wireBeans(e){this.rowSpanSvc=e.rowSpanSvc}getNextCellToFocus(e,t,n=!1){return n?this.getNextCellToFocusWithCtrlPressed(e,t):this.getNextCellToFocusWithoutCtrlPressed(e,t)}getNextCellToFocusWithCtrlPressed(e,t){let n=e===$.UP,r=e===$.DOWN,i=e===$.LEFT,a,o,{pageBounds:s,gos:c,visibleCols:l,pinnedRowModel:u}=this.beans,{rowPinned:d}=t;if(n||r)o=d&&u?n?0:d===`top`?u.getPinnedTopRowCount()-1:u.getPinnedBottomRowCount()-1:n?s.getFirstRow():s.getLastRow(),a=t.column;else{let e=c.get(`enableRtl`);o=t.rowIndex,a=(i===e?[...l.allCols].reverse():l.allCols).find(e=>!wq(e)&&this.isCellGoodToFocusOn({rowIndex:o,rowPinned:null,column:e}))}return a?{rowIndex:o,rowPinned:d,column:a}:null}getNextCellToFocusWithoutCtrlPressed(e,t){let n=t,r=!1;for(;!r;){switch(e){case $.UP:n=this.getCellAbove(n);break;case $.DOWN:n=this.getCellBelow(n);break;case $.RIGHT:n=this.gos.get(`enableRtl`)?this.getCellToLeft(n):this.getCellToRight(n);break;case $.LEFT:n=this.gos.get(`enableRtl`)?this.getCellToRight(n):this.getCellToLeft(n);break;default:n=null,gK(8,{key:e})}r=!n||this.isCellGoodToFocusOn(n)}return n}isCellGoodToFocusOn(e){let t=e.column,n,{pinnedRowModel:r,rowModel:i}=this.beans;switch(e.rowPinned){case`top`:n=r?.getPinnedTopRow(e.rowIndex);break;case`bottom`:n=r?.getPinnedBottomRow(e.rowIndex);break;default:n=i.getRow(e.rowIndex)}return n?!this.isSuppressNavigable(t,n):!1}getCellToLeft(e){if(!e)return null;let t=this.beans.visibleCols.getColBefore(e.column);return t?{rowIndex:e.rowIndex,column:t,rowPinned:e.rowPinned}:null}getCellToRight(e){if(!e)return null;let t=this.beans.visibleCols.getColAfter(e.column);return t?{rowIndex:e.rowIndex,column:t,rowPinned:e.rowPinned}:null}getCellBelow(e){if(!e)return null;let t=this.rowSpanSvc?.getCellEnd(e)??e,n=rY(this.beans,t,!0);return n?{rowIndex:n.rowIndex,column:e.column,rowPinned:n.rowPinned}:null}getCellAbove(e){if(!e)return null;let t=this.rowSpanSvc?.getCellStart(e)??e,n=nY(this.beans,{rowIndex:t.rowIndex,rowPinned:t.rowPinned},!0);return n?{rowIndex:n.rowIndex,column:e.column,rowPinned:n.rowPinned}:null}getNextTabbedCell(e,t){return t?this.getNextTabbedCellBackwards(e):this.getNextTabbedCellForwards(e)}getNextTabbedCellForwards(e){let{visibleCols:t,pagination:n}=this.beans,r=t.allCols,i=e.rowIndex,a=e.rowPinned,o=t.getColAfter(e.column);if(!o){o=r[0];let t=rY(this.beans,e,!0);if(rW(t)||!t.rowPinned&&!(n?.isRowInPage(t.rowIndex)??!0))return null;i=t?t.rowIndex:null,a=t?t.rowPinned:null}return{rowIndex:i,column:o,rowPinned:a}}getNextTabbedCellBackwards(e){let{beans:t}=this,{visibleCols:n,pagination:r}=t,i=n.allCols,a=e.rowIndex,o=e.rowPinned,s=n.getColBefore(e.column);if(!s){s=XU(i);let n=nY(t,{rowIndex:e.rowIndex,rowPinned:e.rowPinned},!0);if(rW(n)||!n.rowPinned&&!(r?.isRowInPage(n.rowIndex)??!0))return null;a=n?n.rowIndex:null,o=n?n.rowPinned:null}return{rowIndex:a,column:s,rowPinned:o}}isSuppressNavigable(e,t){let{suppressNavigable:n}=e.colDef;return typeof n==`boolean`?n:typeof n==`function`&&n(e.createColumnFunctionCallbackParams(t))}};function REe(e){return e.focusSvc.getFocusedCell()}function zEe(e){return e.focusSvc.clearFocusedCell()}function BEe(e,t,n,r){e.focusSvc.setFocusedCell({rowIndex:t,column:n,rowPinned:r,forceBrowserFocus:!0})}function VEe(e,t){return e.navigation?.tabToNextCell(!1,t)??!1}function HEe(e,t){return e.navigation?.tabToNextCell(!0,t)??!1}function UEe(e,t,n=!1){let r=e.headerNavigation?.getHeaderPositionForColumn(t,n);r&&e.focusSvc.focusHeaderPosition({headerPosition:r})}function bQ(e){let t=e;return t?.getFrameworkComponentInstance==null?e:t.getFrameworkComponentInstance()}var WEe=class extends Q{constructor(){super(...arguments),this.beanName=`editModelSvc`,this.edits=new Map,this.cellValidations=new xQ,this.rowValidations=new SQ,this.suspendEdits=!1}suspend(e){this.suspendEdits=e}removeEdits({rowNode:e,column:t}){if(!this.hasEdits({rowNode:e})||!e)return;let n=this.getEditRow(e);t?n.delete(t):n.clear(),n.size===0&&this.edits.delete(e)}getEditRow(e,t={}){if(this.suspendEdits||this.edits.size===0)return;let n=e&&this.edits.get(e);if(n)return n;if(t.checkSiblings){let t=e.pinnedSibling;if(t)return this.getEditRow(t)}}getEditRowDataValue(e,{checkSiblings:t}={}){if(!e||this.edits.size===0)return;let n=this.getEditRow(e),r=e.pinnedSibling,i=t&&r&&this.getEditRow(r);if(!n&&!i)return;let a={...e.data},o=(e,t)=>e.forEach(({editorValue:e,pendingValue:n},r)=>{let i=e===void 0?n:e;i!==DQ&&(t[r.getColId()]=i)});return n&&o(n,a),i&&o(i,a),a}getEdit(e={},t){let{rowNode:n,column:r}=e,i=this.edits;if(this.suspendEdits||i.size===0||!n||!r)return;let a=i.get(n)?.get(r);if(a)return a;if(t?.checkSiblings){let e=n.pinnedSibling;if(e)return i.get(e)?.get(r)}}getEditMap(e=!0){if(this.suspendEdits||this.edits.size===0)return new Map;if(!e)return this.edits;let t=new Map;return this.edits.forEach((e,n)=>{let r=new Map;e.forEach(({editorState:e,...t},n)=>r.set(n,{...t})),t.set(n,r)}),t}setEditMap(e){this.edits.clear(),e.forEach((e,t)=>{let n=new Map;e.forEach((e,t)=>n.set(t,{...e})),this.edits.set(t,n)})}setEdit(e,t){let n=this.edits;(n.size===0||!n.has(e.rowNode))&&n.set(e.rowNode,new Map);let r={editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0},...this.getEdit(e),...t};return this.getEditRow(e.rowNode).set(e.column,r),r}clearEditValue(e){let{rowNode:t,column:n}=e;if(!t)return;let r=e=>{e.editorValue=void 0,e.pendingValue=e.sourceValue,e.state=`changed`};if(!n){this.getEditRow(t)?.forEach(r);return}let i=this.getEdit(e);i&&r(i)}getState(e){if(!this.suspendEdits)return this.getEdit(e)?.state}getEditPositions(e){if(this.suspendEdits||(e??this.edits).size===0)return[];let t=[];return(e??this.edits).forEach((e,n)=>{for(let r of e.keys()){let{editorState:i,...a}=e.get(r);t.push({rowNode:n,column:r,...a})}}),t}hasRowEdits(e,t){return this.suspendEdits||this.edits.size===0?!1:!!this.getEditRow(e,t)}hasEdits(e={},t={}){if(this.suspendEdits||this.edits.size===0)return!1;let{rowNode:n,column:r}=e,{withOpenEditor:i}=t;if(n){let a=this.getEditRow(n,t);return a?r?i?this.getEdit(e)?.state===`editing`:a.has(r):a.size===0?!1:!i||Array.from(a.values()).some(({state:e})=>e===`editing`):!1}return i?this.getEditPositions().some(({state:e})=>e===`editing`):this.edits.size>0}start(e){let t=this.getEditRow(e.rowNode)??new Map,{rowNode:n,column:r}=e;r&&!t.has(r)&&t.set(r,{editorValue:void 0,pendingValue:DQ,sourceValue:this.beans.valueSvc.getValue(r,n,`data`),state:`editing`,editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}}),this.edits.set(n,t)}stop(e,t,n){if(this.hasEdits(e)){if(t){let t=this.getEditRow(e.rowNode)?.get(e.column);t&&(t.pendingValue===DQ||t.pendingValue===t.sourceValue)?this.removeEdits(e):t&&n&&(t.editorValue=void 0)}else this.removeEdits(e)}}clear(){for(let e of this.edits.values())e.clear();this.edits.clear()}getCellValidationModel(){return this.cellValidations}getRowValidationModel(){return this.rowValidations}setCellValidationModel(e){this.cellValidations=e}setRowValidationModel(e){this.rowValidations=e}destroy(){super.destroy(),this.clear()}},xQ=class{constructor(){this.cellValidations=new Map}getCellValidation(e){let{rowNode:t,column:n}=e||{};return this.cellValidations?.get(t)?.get(n)}hasCellValidation(e){return!e?.rowNode||!e.column?this.cellValidations.size>0:!!this.getCellValidation(e)}setCellValidation(e,t){let{rowNode:n,column:r}=e;this.cellValidations.has(n)||this.cellValidations.set(n,new Map),this.cellValidations.get(n).set(r,t)}clearCellValidation(e){let{rowNode:t,column:n}=e;this.cellValidations.get(t)?.delete(n)}setCellValidationMap(e){this.cellValidations=e}getCellValidationMap(){return this.cellValidations}clearCellValidationMap(){this.cellValidations.clear()}},SQ=class{constructor(){this.rowValidations=new Map}getRowValidation(e){let{rowNode:t}=e||{};return this.rowValidations.get(t)}hasRowValidation(e){return e?.rowNode?!!this.getRowValidation(e):this.rowValidations.size>0}setRowValidation({rowNode:e},t){this.rowValidations.set(e,t)}clearRowValidation({rowNode:e}){this.rowValidations.delete(e)}setRowValidationMap(e){this.rowValidations=e}getRowValidationMap(){return this.rowValidations}clearRowValidationMap(){this.rowValidations.clear()}};function CQ(e,t={}){let{rowIndex:n,rowId:r,rowCtrl:i,rowPinned:a}=t;if(i)return i;let{rowModel:o,rowRenderer:s}=e,{rowNode:c}=t;return c||(r?c=mxe(e,r,a):n!=null&&(c=o.getRow(n))),c?s.getRowCtrlByNode(c):void 0}function wQ(e,t={}){let{cellCtrl:n,colId:r,columnId:i,column:a}=t;if(n)return n;let o=e.colModel.getCol(r??i??EQ(a)),s=t.rowCtrl??CQ(e,t),c=s?.getCellCtrl(o)??void 0;if(c)return c;let l=t.rowNode??s?.rowNode;if(l)return e.rowRenderer.getCellCtrls([l],[o])?.[0]}function TQ(e){let{editSvc:t}=e;t?.isBatchEditing()?(PQ(e,{persist:!0}),LQ(e)):t?.stopEditing(void 0,{source:`api`})}function GEe(e,t,n){let{gos:r,popupSvc:i}=t;if(!r.get(`stopEditingWhenCellsLoseFocus`))return;let a=e=>{let a=e.relatedTarget;if(sJ(a)===null){TQ(t);return}let o=n.some(e=>e.contains(a))&&r.isElementInThisInstance(a);o||=!!i&&(i.getActivePopups().some(e=>e.contains(a))||i.isElementWithinCustomPopup(a)),o||TQ(t)};for(let t of n)e.addManagedElementListeners(t,{focusout:a})}function EQ(e){if(e)return typeof e==`string`?e:e.getColId()}var DQ=Symbol(`unedited`),KEe=(e,t={})=>{let n=e.rowRenderer.getCellCtrls(t.rowNodes,t.columns),r=Array(n.length),i=0;for(let e=0,t=n.length;e<t;++e){let t=n[e].comp?.getCellEditor();t&&(r[i++]=bQ(t))}return r.length=i,r};function qEe(e,t,n,r,i,a){t.length===0&&n?.rowNode&&n?.column&&kQ(e,n,{key:r,event:i,cellStartedEdit:a});let{valueSvc:o,editSvc:s,editModelSvc:c}=e,{rowNode:l,column:u}=n??{};for(let d of t){let{rowNode:t,column:f}=d,p=wQ(e,d);if(!p){if(t&&f){let i=o.getValue(f,t,`data`),a=(n?.rowNode===t&&n?.column===f&&r||void 0)??s?.getCellDataValue(d)??o.getValueForDisplay({column:f,node:t,from:`edit`})?.value??i??DQ;c?.setEdit(d,{pendingValue:IQ(e,a,!1,f),sourceValue:i,state:`editing`})}continue}let m=a&&l===p.rowNode&&p.column===u;kQ(e,{rowNode:l,column:p.column},{key:m?r:null,event:m?i:null,cellStartedEdit:m&&a})}}function OQ({pendingValue:e,sourceValue:t}){return e===DQ&&(e=t),e!==t}function JEe(e){let t=new Map;for(let[n,r]of e){let e=new Map;for(let[t,n]of r)OQ(n)&&e.set(t,n);e.size>0&&t.set(n,e)}return t}function kQ(e,t,n){let{key:r,event:i,cellStartedEdit:a,silent:o}=n??{},{editModelSvc:s,gos:c,userCompFactory:l}=e,u=wQ(e,t),d=u?.comp?.getCellEditor(),f=jQ(e,t,r,a&&!o),p=s?.getEdit(t),m=f.value??p?.sourceValue;if(d){s?.setEdit(t,{editorValue:IQ(e,m,!0,t.column),state:`editing`}),d.refresh?.(f);return}let h=t.column.getColDef(),g=zq(l,h,f);if(!g)return;let{popupFromSelector:_,popupPositionFromSelector:v}=g,y=_??!!h.cellEditorPopup,b=v??h.cellEditorPopupPosition;if(NQ(g.params,i),!u)return;let{rangeFeature:x,rowCtrl:S,comp:C,onEditorAttachedFuncs:w}=u;s?.setEdit(t,{editorValue:IQ(e,m,!0,t.column),state:`editing`,editorState:{cellStartedEditing:void 0,cellStoppedEditing:void 0}}),u.editCompDetails=g,w.push(()=>x?.unsetComp()),C?.setEditDetails(g,y,b,c.get(`reactiveCustomComponents`)),S?.refreshRow({suppressFlash:!0}),YEe(e,t,i,m,o)}function YEe(e,t,n,r,i){let{editSvc:a,editModelSvc:o}=e,s=o?.getEdit(t);!i&&s?.state===`editing`&&!s?.editorState?.cellStartedEditing&&(a?.dispatchCellEvent(t,n,`cellEditingStarted`,{value:r}),o?.setEdit(t,{editorState:{cellStartedEditing:!0}}))}function AQ(e,t,n){let r={editorValueExists:!1};if(VQ(e)&&(t.getValidationErrors?.()?.length??0)>0||n?.isCancelling)return r;if(n?.isStopping){let e=t?.isCancelAfterEnd?.();if(e)return{...r,isCancelAfterEnd:e}}return{editorValue:t.getValue(),editorValueExists:!0}}function jQ(e,t,n,r){let{valueSvc:i,gos:a,editSvc:o}=e,s=e.gos.get(`enableGroupEdit`),c=wQ(e,t),l=t.rowNode?.rowIndex??void 0,u=o?.isBatchEditing(),d=e.colModel.getCol(t.column.getId()),{rowNode:f,column:p}=t,m=c.comp?.getCellEditor(),h=o?.getCellDataValue(t),g=h===void 0?m?AQ(e,m)?.editorValue:void 0:h,_=g===DQ?i.getValueForDisplay({column:d,node:f,from:`edit`})?.value:g,v=s?g:_;return p.isAllowFormula()&&e.formula?.isFormula(v)&&(v=e.formula?.normaliseFormula(v,!0)??v),eq(a,{value:v,eventKey:n??null,column:p,colDef:p.getColDef(),rowIndex:l,node:f,data:f.data,cellStartedEdit:!!r,onKeyDown:c?.onKeyDown.bind(c),stopEditing:n=>{o.stopEditing(t,{source:u?`ui`:`api`,suppressNavigateAfterEdit:n}),RQ(e,t,{})},eGridCell:c?.eGui,parseValue:e=>i.parseValue(d,f,e,c?.value),formatValue:c?.formatValue.bind(c),validate:()=>{o?.validateEdit()}})}function MQ(e,t){let{editModelSvc:n}=e;n?.getEditMap().forEach((e,r)=>{e.forEach((e,i)=>{(t||e.state!==`editing`&&e.pendingValue!==DQ)&&!OQ(e)&&(e.state!==`editing`||t)&&n?.removeEdits({rowNode:r,column:i})})})}function XEe(e,t){let n=t.comp?.getCellEditor();if(!n?.refresh)return;let{eventKey:r,cellStartedEdit:i}=t.editCompDetails.params,{column:a}=t,o=jQ(e,t,r,i),s=a.getColDef(),c=zq(e.userCompFactory,s,o);n.refresh(NQ(c.params,r))}function NQ(e,t){return t instanceof KeyboardEvent&&e.column.getColDef().cellEditor===`agNumberCellEditor`?e.suppressPreventDefault=[`-`,`+`,`.`,`e`].includes(t?.key??``)||e.suppressPreventDefault:t?.preventDefault?.(),e}function PQ(e,t){for(let n of e.editModelSvc?.getEditPositions()??[]){let r=wQ(e,n);if(!r)continue;let i=r.comp?.getCellEditor();if(!i)continue;let{editorValue:a,editorValueExists:o,isCancelAfterEnd:s}=AQ(e,i,t);if(s){let{cellStartedEditing:t,cellStoppedEditing:r}=e.editModelSvc?.getEdit(n)?.editorState||{};e.editModelSvc?.setEdit(n,{editorState:{isCancelAfterEnd:s,cellStartedEditing:t,cellStoppedEditing:r}})}FQ(e,n,a,void 0,!o,t)}}function FQ(e,t,n,r,i,a){let{editModelSvc:o,valueSvc:s}=e;if(!o)return;let{rowNode:c,column:l}=t;if(!(c&&l))return;let u=o.getEdit(t);if(u?.sourceValue===void 0){let n=u?IQ(e,u.editorValue,!1,l):DQ,r={sourceValue:s.getValue(l,c,`data`),pendingValue:n};a?.persist&&(r.state=`changed`),u=o.setEdit(t,r)}o.setEdit(t,{editorValue:i?IQ(e,u.sourceValue,!0,l):n}),a?.persist&&ZEe(e,t)}function IQ(e,t,n,r){let{formula:i}=e;return r.isAllowFormula()&&i?.isFormula(t)?i?.normaliseFormula(t,n)??t:t}function ZEe(e,t){let{editModelSvc:n}=e,r=n?.getEdit(t),i={pendingValue:IQ(e,r?.editorValue,!1,t.column)};!r?.editorState?.cellStoppedEditing&&r?.state!==`editing`&&(i.state=`changed`),n?.setEdit(t,i)}function LQ(e,t,n={}){if(t||=e.editModelSvc?.getEditPositions(),t)for(let r of t)RQ(e,r,n)}function RQ(e,t,n,r=wQ(e,t)){let i=e.editModelSvc,a=i?.getEdit(t),o;if(o=a&&a.state!==`editing`&&a.editorState?.cellStoppedEditing?a.state:`changed`,!r){a&&i?.setEdit(t,{state:o});return}let s=r.comp,c=s?.getCellEditor();if(s&&!c){r?.refreshCell(),a&&(i?.setEdit(t,{state:o}),BQ(e,t,e.gos.get(`enableGroupEdit`)?zQ(a,n?.cancel):{valueChanged:!1,newValue:void 0,oldValue:a.sourceValue},n));return}if(VQ(e)){let e=a&&c?.getValidationErrors?.(),n=i?.getCellValidationModel();e?.length?n?.setCellValidation(t,{errorMessages:e}):n?.clearCellValidation(t)}a&&i?.setEdit(t,{state:o}),s?.setEditDetails(),s?.refreshEditStyles(!1,!1),r?.refreshCell({force:!0,suppressFlash:!0});let l=i?.getEdit(t);if(l&&l.state!==`editing`){let r=n?.cancel;BQ(e,t,e.gos.get(`enableGroupEdit`)?zQ(l,r):QEe(l,a,r),n)}}function zQ(e,t){let{sourceValue:n,pendingValue:r}=e,i;return!t&&r!==DQ&&(i=r),{valueChanged:!t&&OQ(e),newValue:i,oldValue:n,value:n}}function QEe(e,t,n){if(n||e.editorState.isCancelAfterEnd)return{valueChanged:!1,newValue:void 0,oldValue:e.sourceValue};let r=e.editorValue;return(r==null||r===DQ)&&(r=t?.pendingValue),r===DQ&&(r=void 0),{valueChanged:OQ(e),newValue:r,oldValue:e.sourceValue}}function BQ(e,t,n,{silent:r,event:i}={}){let{editSvc:a,editModelSvc:o}=e,{editorState:s}=o?.getEdit(t)||{},{isCancelBeforeStart:c,cellStartedEditing:l,cellStoppedEditing:u}=s||{};!r&&!c&&l&&!u&&(a?.dispatchCellEvent(t,i,`cellEditingStopped`,n),o?.setEdit(t,{editorState:{cellStoppedEditing:!0}}))}function $Ee(e){if(!e)return!1;for(let t=0,n=e.length;t<n;++t){let n=e[t],r=n.cellEditorParams;if(r&&(n.editable||n.groupRowEditable)&&(r.minLength!==void 0||r.maxLength!==void 0||r.getValidationErrors!==void 0||r.min!==void 0||r.max!==void 0))return!0}return!1}function eDe(e){let t=e.rowRenderer.getCellCtrls();for(let e=0,n=t.length;e<n;++e){let n=t[e].comp?.getCellEditor();if(n){let e=bQ(n);if(e.getValidationElement||e.getValidationErrors)return!0}}return!1}function VQ(e){return!!e.gos.get(`getFullRowEditValidationErrors`)||$Ee(e.colModel.getColumnDefs())||eDe(e)}function HQ(e,t){if(!(t||VQ(e)))return;let n=new xQ,{ariaAnnounce:r,localeSvc:i,editModelSvc:a,gos:o}=e,s=o.get(`editType`)===`fullRow`,c=kG(i)(`ariaValidationErrorPrefix`,`Cell Editor Validation`),l=new Set;for(let t of e.rowRenderer.getCellCtrls()){let e=t.comp?.getCellEditor();if(!e)continue;let i=bQ(e),{rowNode:a,column:o}=t,s=i.getValidationErrors?.()??[],u=i.getValidationElement?.(!1)||!i.isPopup?.()&&t.eGui;if(u){let e=s!=null&&s.length>0,t=e?s.join(`. `):``;wW(u,e),e&&r.announceValue(`${c} ${s}`,`editorValidation`),u instanceof HTMLInputElement?u.setCustomValidity(t):u.classList.toggle(`invalid`,e)}s?.length>0&&n.setCellValidation({rowNode:a,column:o},{errorMessages:s}),l.add(t.rowCtrl)}if(PQ(e,{persist:!1}),a?.setCellValidationModel(n),s){let t=tDe(e);a?.setRowValidationModel(t)}for(let e of l.values()){e.rowEditStyleFeature?.applyRowStyles();for(let t of e.getAllCellCtrls())t.tooltipFeature?.refreshTooltip(!0),t.editorTooltipFeature?.refreshTooltip(!0),t.editStyleFeature?.applyCellStyles?.()}}var tDe=e=>{let t=new SQ,n=e.gos.get(`getFullRowEditValidationErrors`),r=e.editModelSvc?.getEditMap();if(!r)return t;for(let e of r.keys()){let i=r.get(e);if(!i)continue;let a=[],{rowIndex:o,rowPinned:s}=e;for(let e of i.keys()){let t=i.get(e);if(!t)continue;let{editorValue:n,pendingValue:r,sourceValue:c}=t,l=n??(r===DQ?void 0:r)??c;a.push({column:e,colId:e.getColId(),rowIndex:o,rowPinned:s,oldValue:c,newValue:l})}let c=n?.({editorsState:a})??[];c.length>0&&t.setRowValidation({rowNode:e},{errorMessages:c})}return t};function nDe(e){HQ(e,!0);let t=e.editModelSvc?.getCellValidationModel().getCellValidationMap();if(!t)return null;let n=[];return t.forEach((e,t)=>{e.forEach(({errorMessages:e},r)=>{n.push({column:r,rowIndex:t.rowIndex,rowPinned:t.rowPinned,messages:e??null})})}),n}function UQ(e){return!!(e.rowPinned&&e.pinnedSibling)}function WQ(e,t,n,r){let i=t===`top`;if(!n)return WQ(e,t,i?e.getPinnedTopRow(0):e.getPinnedBottomRow(0),r);if(!r){let r=i?e.getPinnedTopRowCount():e.getPinnedBottomRowCount();return WQ(e,t,n,i?e.getPinnedTopRow(r-1):e.getPinnedBottomRow(r-1))}let a=!1,o=!1,s=[];return e.forEachPinnedRow(t,e=>{if(e===n&&!a){a=!0,s.push(e);return}if(a&&e===r){o=!0,s.push(e);return}a&&!o&&s.push(e)}),s}function rDe(e,t,n,{rowNode:r,column:i},a){return eq(e.gos,{type:n,node:r,data:r.data,value:a,column:i,colDef:i.getColDef(),rowPinned:r.rowPinned,event:t,rowIndex:r.rowIndex})}function iDe(e,t=!1){return e===$.DELETE||!t&&e===$.BACKSPACE&&aJ()}var aDe=class extends Q{constructor(e,t,n,r){super(),this.cellCtrl=e,this.rowNode=n,this.rowCtrl=r,this.beans=t}init(){this.eGui=this.cellCtrl.eGui}onKeyDown(e){let t=e.key;if(!(t===$.ENTER&&wq(this.cellCtrl.column)&&this.beans.rowNumbersSvc?.handleKeyDownOnCell(this.cellCtrl.cellPosition,e)))switch(t){case $.ENTER:this.onEnterKeyDown(e);break;case $.F2:this.onF2KeyDown(e);break;case $.ESCAPE:this.onEscapeKeyDown(e);break;case $.TAB:this.onTabKeyDown(e);break;case $.BACKSPACE:case $.DELETE:this.onBackspaceOrDeleteKeyDown(t,e);break;case $.DOWN:case $.UP:case $.RIGHT:case $.LEFT:this.onNavigationKeyDown(e,t)}}onNavigationKeyDown(e,t){let{cellCtrl:n,beans:r}=this;if(!r.editSvc?.isEditing(n,{withOpenEditor:!0})){if(e.shiftKey&&n.isRangeSelectionEnabled())this.onShiftRangeSelect(e);else{let i=n.getFocusedCellPosition();r.navigation?.navigateToNextCell(e,t,i,!0)}e.preventDefault()}}onShiftRangeSelect(e){let{rangeSvc:t,navigation:n}=this.beans;if(!t)return;let r=t.extendLatestRangeInDirection(e);r&&(e.key===$.LEFT||e.key===$.RIGHT?n?.ensureColumnVisible(r.column):n?.ensureRowVisible(r.rowIndex))}onTabKeyDown(e){this.beans.navigation?.onTabKeyDown(this.cellCtrl,e)}onBackspaceOrDeleteKeyDown(e,t){let{cellCtrl:n,beans:r,rowNode:i}=this,{gos:a,rangeSvc:o,eventSvc:s,editSvc:c}=r;if(s.dispatchEvent({type:`keyShortcutChangedCellStart`}),iDe(e,a.get(`enableCellEditingOnBackspace`))&&!c?.isEditing(n,{withOpenEditor:!0})){if(o&&UK(a))o.clearCellRangeCellValues({dispatchWrapperEvents:!0,wrapperEventSource:`deleteKey`});else if(n.isCellEditable()){let e=r.valueSvc.getDeleteValue(n.column,i);i.setDataValue(n.column,e,`cellClear`)}}else c?.isEditing(n,{withOpenEditor:!0})||r.editSvc?.startEditing(n,{startedEdit:!0,event:t});s.dispatchEvent({type:`keyShortcutChangedCellEnd`})}onEnterKeyDown(e){let{cellCtrl:t,beans:n}=this,{editSvc:r,navigation:i}=n,a=r?.isEditing(t,{withOpenEditor:!0}),o=t.rowNode,s=r?.isRowEditing(o,{withOpenEditor:!0}),c=t=>{r?.startEditing(t,{startedEdit:!0,event:e,source:`edit`})&&e.preventDefault()};if(a||s){if(this.isCtrlEnter(e)){r?.applyBulkEdit(t,n?.rangeSvc?.getCellRanges()||[]);return}if(HQ(n),r?.checkNavWithValidation(void 0,e)===`block-stop`)return;r?.isEditing(t,{withOpenEditor:!0})?r?.stopEditing(t,{event:e,source:`edit`}):s&&!t.isCellEditable()?r?.stopEditing({rowNode:o},{event:e,source:`edit`}):c(t)}else if(n.gos.get(`enterNavigatesVertically`)){let n=e.shiftKey?$.UP:$.DOWN;i?.navigateToNextCell(null,n,t.cellPosition,!1)}else{if(r?.hasValidationErrors())return;r?.hasValidationErrors(t)&&r.revertSingleCellEdit(t,!0),c(t)}}isCtrlEnter(e){return(e.ctrlKey||e.metaKey)&&e.key===$.ENTER}onF2KeyDown(e){let{cellCtrl:t,beans:{editSvc:n}}=this;n?.isEditing()&&(HQ(this.beans),n?.checkNavWithValidation(void 0,e)===`block-stop`)||n?.startEditing(t,{startedEdit:!0,event:e})}onEscapeKeyDown(e){let{cellCtrl:t,beans:{editSvc:n}}=this;n?.checkNavWithValidation(t,e)===`block-stop`&&n.revertSingleCellEdit(t),setTimeout(()=>{n?.stopEditing(t,{event:e,cancel:!0})})}processCharacter(e){let t=e.target!==this.eGui,{beans:{editSvc:n},cellCtrl:r}=this;if(!t&&!n?.isEditing(r,{withOpenEditor:!0})){if(e.key===$.SPACE)this.onSpaceKeyDown(e);else if(n?.isCellEditable(r,`ui`)){if(n?.hasValidationErrors()&&!n?.hasValidationErrors(r))return;n?.startEditing(r,{startedEdit:!0,event:e,source:`api`,editable:!0}),r.editCompDetails?.params?.suppressPreventDefault||e.preventDefault()}}}onSpaceKeyDown(e){let{gos:t,editSvc:n}=this.beans,{rowNode:r}=this.cellCtrl;!n?.isEditing(this.cellCtrl,{withOpenEditor:!0})&&wK(t)&&this.beans.selectionSvc?.handleSelectionEvent(e,r,`spaceKey`),e.preventDefault()}},oDe=class extends Q{constructor(e,t,n){super(),this.cellCtrl=e,this.column=n,this.beans=t}onMouseEvent(e,t){if(!SJ(t))switch(e){case`click`:this.onCellClicked(t);break;case`pointerdown`:case`mousedown`:case`touchstart`:this.onMouseDown(t);break;case`dblclick`:this.onCellDoubleClicked(t);break;case`mouseout`:this.onMouseOut(t);break;case`mouseover`:this.onMouseOver(t)}}onCellClicked(e){if(this.beans.touchSvc?.handleCellDoubleClick(this,e))return;let{eventSvc:t,rangeSvc:n,editSvc:r,editModelSvc:i,frameworkOverrides:a,gos:o}=this.beans,s=e.ctrlKey||e.metaKey,{cellCtrl:c}=this,{column:l,cellPosition:u,rowNode:d}=c,f=LY(o,l,d,e);n&&s&&!f&&n.getCellRangeCount(u)>1&&n.intersectLastRange(!0);let p=c.createEvent(e,`cellClicked`);p.isEventHandlingSuppressed=f,t.dispatchEvent(p);let m=l.getColDef();if(m.onCellClicked&&window.setTimeout(()=>{a.wrapOutgoing(()=>{m.onCellClicked(p)})},0),!f&&i?.getState(c)!==`editing`){let t=r?.isEditing(),n=r?.isRangeSelectionEnabledWhileEditing(),a=i?.getCellValidationModel().getCellValidationMap().size??0,o=i?.getRowValidationModel().getRowValidationMap().size??0;if(t&&(n||a>0||o>0))return;r?.shouldStartEditing(c,e)?r?.startEditing(c,{event:e}):r?.shouldStopEditing(c,e)&&(this.beans.gos.get(`editType`)===`fullRow`?r?.stopEditing(c,{event:e,source:`edit`}):r?.stopEditing(void 0,{event:e,source:`edit`}))}}onCellDoubleClicked(e){let{column:t,beans:n,cellCtrl:r}=this,{eventSvc:i,frameworkOverrides:a,editSvc:o,editModelSvc:s,gos:c}=n,l=LY(c,r.column,r.rowNode,e),u=t.getColDef(),d=r.createEvent(e,`cellDoubleClicked`);if(d.isEventHandlingSuppressed=l,i.dispatchEvent(d),typeof u.onCellDoubleClicked==`function`&&window.setTimeout(()=>{a.wrapOutgoing(()=>{u.onCellDoubleClicked(d)})},0),!l&&o?.shouldStartEditing(r,e)&&s?.getState(r)!==`editing`){let t=o?.isEditing(),n=o?.isRangeSelectionEnabledWhileEditing(),i=s?.getCellValidationModel().getCellValidationMap().size??0,a=s?.getRowValidationModel().getRowValidationMap().size??0;if(t&&(n||i>0||a>0))return;o?.startEditing(r,{event:e})}}onMouseDown(e){let{shiftKey:t}=e,n=e.target,{cellCtrl:r,beans:i}=this,{eventSvc:a,rangeSvc:o,rowNumbersSvc:s,focusSvc:c,gos:l,editSvc:u}=i,{column:d,rowNode:f,cellPosition:p}=r,m=LY(l,d,f,e),h=()=>{let t=r.createEvent(e,`cellMouseDown`);t.isEventHandlingSuppressed=m,a.dispatchEvent(t)};if(m){h();return}if(this.isRightClickInExistingRange(e))return;let g=o&&!o.isEmpty(),_=this.containsWidget(n),v=wq(d);if(!(s&&v&&!s.handleMouseDownOnCell(p,e))){if(!t||!g){let t=u?.isEditing(r),i=l.get(`enableCellTextSelection`)&&e.defaultPrevented,a=(rJ()||i)&&!t&&!PW(n)&&!_;r.focusCell(a,e)}if(t&&g&&!c.isCellFocused(p)){e.preventDefault();let t=c.getFocusedCell();if(t){let{column:n,rowIndex:r,rowPinned:i}=t,a=!!u?.isRangeSelectionEnabledWhileEditing?.();u?.isEditing(t)&&!a&&u?.stopEditing(t),a||c.setFocusedCell({column:n,rowIndex:r,rowPinned:i,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0,sourceEvent:e})}}_||(o?.handleCellMouseDown(e,p),h())}}isRightClickInExistingRange(e){let{rangeSvc:t}=this.beans;if(t){let n=t.isCellInAnyRange(this.cellCtrl.cellPosition),r=wye(this.beans,e);if(n&&r)return!0}return!1}containsWidget(e){return RW(e,`ag-selection-checkbox`,3)||RW(e,`ag-drag-handle`,3)}onMouseOut(e){if(this.mouseStayingInsideCell(e))return;let{eventSvc:t,colHover:n}=this.beans;t.dispatchEvent(this.cellCtrl.createEvent(e,`cellMouseOut`)),n?.clearMouseOver()}onMouseOver(e){if(this.mouseStayingInsideCell(e))return;let{eventSvc:t,colHover:n}=this.beans;t.dispatchEvent(this.cellCtrl.createEvent(e,`cellMouseOver`)),n?.setMouseOver([this.column])}mouseStayingInsideCell(e){if(!e.target||!e.relatedTarget)return!1;let t=this.cellCtrl.eGui,n=t.contains(e.target),r=t.contains(e.relatedTarget);return n&&r}},sDe=class extends Q{constructor(e,t){super(),this.cellCtrl=e,this.beans=t,this.column=e.column,this.rowNode=e.rowNode}setupRowSpan(){this.rowSpan=this.column.getRowSpan(this.rowNode),this.addManagedListeners(this.beans.eventSvc,{newColumnsLoaded:()=>this.onNewColumnsLoaded()})}init(){this.eSetLeft=this.cellCtrl.getRootElement(),this.eContent=this.cellCtrl.eGui;let e=this.cellCtrl.getCellSpan();if(e||(this.setupColSpan(),this.setupRowSpan()),this.onLeftChanged(),this.onWidthChanged(),e||this._legacyApplyRowSpan(),e){let t=this.refreshSpanHeight.bind(this,e);t(),this.addManagedListeners(this.beans.eventSvc,{paginationChanged:t,recalculateRowBounds:t,pinnedHeightChanged:t})}}refreshSpanHeight(e){let t=e.getCellHeight();t!=null&&(this.eContent.style.height=`${t}px`)}onNewColumnsLoaded(){let e=this.column.getRowSpan(this.rowNode);this.rowSpan!==e&&(this.rowSpan=e,this._legacyApplyRowSpan(!0))}onDisplayColumnsChanged(){let e=this.getColSpanningList();ZU(this.colsSpanning,e)||(this.colsSpanning=e,this.onWidthChanged(),this.onLeftChanged())}setupColSpan(){this.column.getColDef().colSpan!=null&&(this.colsSpanning=this.getColSpanningList(),this.addManagedListeners(this.beans.eventSvc,{displayedColumnsChanged:this.onDisplayColumnsChanged.bind(this),displayedColumnsWidthChanged:this.onWidthChanged.bind(this)}))}onWidthChanged(){if(!this.eContent)return;let e=this.getCellWidth();this.eContent.style.width=`${e}px`}getCellWidth(){return this.colsSpanning?this.colsSpanning.reduce((e,t)=>e+t.getActualWidth(),0):this.column.getActualWidth()}getColSpanningList(){let{column:e,rowNode:t}=this,n=e.getColSpan(t),r=[];if(n===1)r.push(e);else{let t=e,i=e.getPinned();for(let e=0;t&&e<n&&(r.push(t),t=this.beans.visibleCols.getColAfter(t),t&&!rW(t)&&i===t.getPinned());e++);}return r}onLeftChanged(){if(!this.eSetLeft)return;let e=this.modifyLeftForPrintLayout(this.getCellLeft());this.eSetLeft.style.left=e+`px`}getCellLeft(){let e;return e=this.beans.gos.get(`enableRtl`)&&this.colsSpanning?XU(this.colsSpanning):this.column,e.getLeft()}modifyLeftForPrintLayout(e){if(!this.cellCtrl.printLayout||this.column.getPinned()===`left`)return e;let{visibleCols:t}=this.beans,n=t.getColsLeftWidth();return this.column.getPinned()===`right`?n+t.bodyWidth+(e||0):n+(e||0)}_legacyApplyRowSpan(e){if(this.rowSpan===1&&!e)return;let t=DK(this.beans)*this.rowSpan;this.eContent.style.height=`${t}px`,this.eContent.style.zIndex=`1`}destroy(){super.destroy()}},cDe=`ag-cell`,lDe=`ag-cell-auto-height`,uDe=`ag-cell-normal-height`,dDe=`ag-cell-focus`,fDe=`ag-cell-first-right-pinned`,pDe=`ag-cell-last-left-pinned`,mDe=`ag-cell-not-inline-editing`,hDe=`ag-cell-wrap-text`,gDe=0,GQ=class extends Q{constructor(e,t,n,r){super(),this.column=e,this.rowNode=t,this.rowCtrl=r,this.rangeFeature=void 0,this.rowResizeFeature=void 0,this.positionFeature=void 0,this.customStyleFeature=void 0,this.editStyleFeature=void 0,this.mouseListener=void 0,this.keyboardListener=void 0,this.suppressRefreshCell=!1,this.onCompAttachedFuncs=[],this.onEditorAttachedFuncs=[],this.focusEventWhileNotReady=null,this.hasBeenFocused=!1,this.hasEdit=!1,this.tooltipFeature=void 0,this.editorTooltipFeature=void 0,this.beans=n,this.gos=n.gos,this.editSvc=n.editSvc,this.hasEdit=!!n.editSvc;let{colId:i}=e;this.instanceId=i+`-`+gDe++,this.createCellPosition(),this.updateAndFormatValue(!1)}addFeatures(){let{beans:e}=this;this.positionFeature=new sDe(this,e),this.customStyleFeature=e.cellStyles?.createCellCustomStyleFeature(this),this.editStyleFeature=e.editSvc?.createCellStyleFeature(this),this.mouseListener=new oDe(this,e,this.column),this.keyboardListener=new aDe(this,e,this.rowNode,this.rowCtrl),this.enableTooltipFeature();let{rangeSvc:t}=e;t&&UK(e.gos)&&(this.rangeFeature=t.createCellRangeFeature(this)),wq(this.column)&&(this.rowResizeFeature=this.beans.rowNumbersSvc.createRowNumbersRowResizerFeature(this))}isCellSpanning(){return!1}getCellSpan(){}removeFeatures(){let e=this.beans.context;this.positionFeature=e.destroyBean(this.positionFeature),this.editorTooltipFeature=e.destroyBean(this.editorTooltipFeature),this.customStyleFeature=e.destroyBean(this.customStyleFeature),this.editStyleFeature=e.destroyBean(this.editStyleFeature),this.mouseListener=e.destroyBean(this.mouseListener),this.keyboardListener=e.destroyBean(this.keyboardListener),this.rangeFeature=e.destroyBean(this.rangeFeature),this.rowResizeFeature=e.destroyBean(this.rowResizeFeature),this.disableTooltipFeature()}enableTooltipFeature(e,t){this.tooltipFeature=this.beans.tooltipSvc?.enableCellTooltipFeature(this,e,t)}disableTooltipFeature(){this.tooltipFeature=this.beans.context.destroyBean(this.tooltipFeature)}enableEditorTooltipFeature(e){this.editorTooltipFeature&&this.disableEditorTooltipFeature(),this.editorTooltipFeature=this.beans.tooltipSvc?.setupCellEditorTooltip(this,e),HQ(this.beans)}disableEditorTooltipFeature(){this.editorTooltipFeature=this.beans.context.destroyBean(this.editorTooltipFeature)}setComp(e,t,n,r,i,a,o){this.comp=e,this.eGui=t,this.printLayout=i,o??=this,this.addDomData(o),this.addFeatures(),o.addDestroyFunc(()=>this.removeFeatures()),this.onSuppressCellFocusChanged(this.beans.gos.get(`suppressCellFocus`)),this.setupFocus(),this.applyStaticCssClasses(),this.setWrapText(),this.onFirstRightPinnedChanged(),this.onLastLeftPinnedChanged(),this.onColumnHover(),this.setupControlComps(),this.setupAutoHeight(r,o),this.refreshFirstAndLastStyles(),this.checkFormulaError(),this.refreshAriaRowIndex(),this.refreshAriaColIndex(),this.positionFeature?.init(),this.customStyleFeature?.setComp(e),this.editStyleFeature?.setComp(e),this.tooltipFeature?.refreshTooltip(),this.keyboardListener?.init(),this.rangeFeature?.setComp(e),this.rowResizeFeature?.refreshRowResizer();let s=a?this.isCellEditable():void 0,c=!s&&this.hasEdit&&this.editSvc?.isEditing(this,{withOpenEditor:!0});if(s||c?this.editSvc?.startEditing(this,{startedEdit:!1,source:`api`,silent:!0,continueEditing:!0,editable:s}):this.showValue(!1,!0),this.onCompAttachedFuncs.length){for(let e of this.onCompAttachedFuncs)e();this.onCompAttachedFuncs=[]}}checkFormulaError(){let e=!!this.beans.formula?.getFormulaError(this.column,this.rowNode);this.eGui.classList.toggle(`formula-error`,e)}setupAutoHeight(e,t){this.isAutoHeight=this.beans.rowAutoHeight?.setupCellAutoHeight(this,e,t)??!1}getCellAriaRole(){return this.column.getColDef().cellAriaRole??`gridcell`}isCellRenderer(){let e=this.column.getColDef();return e.cellRenderer!=null||e.cellRendererSelector!=null}getValueToDisplay(){return this.valueFormatted??this.value}getDeferLoadingCellRenderer(){let{beans:e,column:t}=this,{userCompFactory:n,ctrlsSvc:r,eventSvc:i}=e,a=t.getColDef(),o=this.createCellRendererParams();o.deferRender=!0;let s=Rq(n,a,o);if(r.getGridBodyCtrl()?.scrollFeature?.isScrolling()){let e,t=new Nq(t=>{e=t}),[n]=this.addManagedListeners(i,{bodyScrollEnd:()=>{e(),n()}});return{loadingComp:s,onReady:t}}return{loadingComp:s,onReady:Nq.resolve()}}showValue(e,t){let{beans:n,column:r,rowNode:i,rangeFeature:a}=this,{userCompFactory:o}=n,s=this.getValueToDisplay(),c,l=i.stub&&i.groupData?.[r.getId()]==null,u=r.getColDef();if(l||this.isCellRenderer()){let e=this.createCellRendererParams();c=!l||wq(r)?Lq(o,u,e):Rq(o,u,e)}if(!c&&!l&&n.findSvc?.isMatch(i,r)){let e=this.createCellRendererParams();c=Lq(o,{...r.getColDef(),cellRenderer:`agFindCellRenderer`},e)}if(this.hasEdit&&this.editSvc.isBatchEditing()&&this.editSvc.isRowEditing(i,{checkSiblings:!0})){let e=this.editSvc.prepDetailsDuringBatch(this,{compDetails:c,valueToDisplay:s});e&&(e.compDetails?c=e.compDetails:e.valueToDisplay&&(s=e.valueToDisplay))}this.comp.setRenderDetails(c,s,e),this.customRowDragComp?.refreshVisibility(),!t&&a&&lG(n,()=>a?.refreshRangeStyleAndHandle()),this.rowResizeFeature?.refreshRowResizer()}setupControlComps(){let e=this.column.getColDef();this.includeSelection=this.isIncludeControl(this.isCheckboxSelection(e),!0),this.includeRowDrag=this.isIncludeControl(e.rowDrag),this.includeDndSource=this.isIncludeControl(e.dndSource),this.comp.setIncludeSelection(this.includeSelection),this.comp.setIncludeDndSource(this.includeDndSource),this.comp.setIncludeRowDrag(this.includeRowDrag)}isForceWrapper(){return this.beans.gos.get(`enableCellTextSelection`)||this.column.isAutoHeight()}getCellValueClass(){let e=this.column.getColDef().cellRenderer===`agCheckboxCellRenderer`,t=``;return e&&(t=` ag-allow-overflow`),`ag-cell-value${t}`}isIncludeControl(e,t=!1){return(this.rowNode.rowPinned==null||t&&UQ(this.rowNode))&&!!e}isCheckboxSelection(e){let{rowSelection:t,groupDisplayType:n}=this.beans.gridOptions,r=VK(t),i=Cq(this.column);return n===`custom`&&r!==`selectionColumn`&&i?!1:e.checkboxSelection||i&&typeof t==`object`&&zK(t)}refreshShouldDestroy(){let e=this.column.getColDef(),t=this.includeSelection!=this.isIncludeControl(this.isCheckboxSelection(e),!0),n=this.includeRowDrag!=this.isIncludeControl(e.rowDrag),r=this.includeDndSource!=this.isIncludeControl(e.dndSource),i=this.isAutoHeight!=this.column.isAutoHeight();return t||n||r||i}onPopupEditorClosed(e){let{editSvc:t}=this.beans;if(!t?.isEditing(this,{withOpenEditor:!0}))return;let n=e instanceof KeyboardEvent,r=e instanceof MouseEvent,i=n&&e.key===$.ESCAPE;t.stopEditing(this,{source:t.isBatchEditing()?`ui`:`api`,cancel:i,event:n||r?e:void 0}),i&&this.focusCell(!0,e)}stopEditing(e=!1){let{editSvc:t}=this.beans;return t?.stopEditing(this,{cancel:e,source:t?.isBatchEditing()?`ui`:`api`})??!1}createCellRendererParams(){let{value:e,valueFormatted:t,column:n,rowNode:r,comp:i,eGui:a,beans:{valueSvc:o,gos:s,editSvc:c}}=this;return eq(s,{value:e,valueFormatted:t,getValue:()=>o.getValueForDisplay({column:n,node:r,from:`edit`}).value,setValue:e=>c?.setDataValue({rowNode:r,column:n},e)||r.setDataValue(n,e),formatValue:this.formatValue.bind(this),data:r.data,node:r,pinned:n.getPinned(),colDef:n.getColDef(),column:n,refreshCell:this.refreshCell.bind(this),eGridCell:a,eParentOfValue:i.getParentOfValue(),registerRowDragger:(e,t,n,r)=>this.registerRowDragger(e,t,r),setTooltip:(e,t)=>{s.assertModuleRegistered(`Tooltip`,3),this.tooltipFeature&&this.disableTooltipFeature(),this.enableTooltipFeature(e,t),this.tooltipFeature?.refreshTooltip()}})}onCellChanged(e){e.column===this.column&&this.refreshCell()}refreshOrDestroyCell(e){if(this.refreshShouldDestroy()?this.rowCtrl?.recreateCell(this):this.refreshCell(e),this.hasEdit&&this.editCompDetails){let{editSvc:e,comp:t}=this;!t?.getCellEditor()&&e.isEditing(this,{withOpenEditor:!0})&&e.startEditing(this,{startedEdit:!1,source:`api`,silent:!0})}}refreshCell(e){let{editStyleFeature:t,customStyleFeature:n,rowCtrl:{rowEditStyleFeature:r},beans:{cellFlashSvc:i,filterManager:a},column:o,comp:s,suppressRefreshCell:c,tooltipFeature:l}=this;if(c)return;let{field:u,valueGetter:d,showRowGroup:f,enableCellChangeFlash:p}=o.getColDef(),m=u==null&&d==null&&f==null,h=e?.newData??!1,g=m||e&&(e.force||h),_=!!s,v=this.updateAndFormatValue(_),y=g||v;if(_){if(y){this.showValue(!!h,!1);let o=a?.isSuppressFlashingCellsBecauseFiltering();!e?.suppressFlash&&!o&&p&&i?.flashCell(this),t?.applyCellStyles?.(),n?.applyUserStyles(),n?.applyClassesFromColDef(),r?.applyRowStyles(),this.checkFormulaError()}l?.refreshTooltip(),n?.applyCellClassRules()}}isCellEditable(){return this.column.isCellEditable(this.rowNode)}formatValue(e){return this.callValueFormatter(e)??e}callValueFormatter(e){return this.beans.valueSvc.formatValue(this.column,this.rowNode,e)}updateAndFormatValue(e){let t=this.value,n=this.valueFormatted,{value:r,valueFormatted:i}=this.beans.valueSvc.getValueForDisplay({column:this.column,node:this.rowNode,includeValueFormatted:!0,from:`edit`});return this.value=r,this.valueFormatted=i,!e||!this.valuesAreEqual(t,this.value)||this.valueFormatted!=n}valuesAreEqual(e,t){let n=this.column.getColDef();return n.equals?n.equals(e,t):e===t}addDomData(e){let t=this.eGui;AK(this.beans.gos,t,BY,this),e.addDestroyFunc(()=>AK(this.beans.gos,t,BY,null))}createEvent(e,t){let{rowNode:n,column:r,value:i,beans:a}=this;return rDe(a,e,t,{rowNode:n,column:r},i)}processCharacter(e){this.keyboardListener?.processCharacter(e)}onKeyDown(e){this.keyboardListener?.onKeyDown(e)}onMouseEvent(e,t){this.mouseListener?.onMouseEvent(e,t)}getColSpanningList(){return this.positionFeature?.getColSpanningList()??[]}onLeftChanged(){this.comp&&this.positionFeature?.onLeftChanged()}onDisplayedColumnsChanged(){this.eGui&&(this.refreshAriaColIndex(),this.refreshFirstAndLastStyles())}refreshFirstAndLastStyles(){let{comp:e,column:t,beans:n}=this;bY(e,t,n.visibleCols)}refreshAriaColIndex(){let e=this.beans.visibleCols.getAriaColIndex(this.column);OW(this.eGui,e)}onWidthChanged(){return this.positionFeature?.onWidthChanged()}getRowPosition(){let{rowIndex:e,rowPinned:t}=this.cellPosition;return{rowIndex:e,rowPinned:t}}updateRangeBordersIfRangeCount(){this.comp&&this.rangeFeature?.updateRangeBordersIfRangeCount()}onCellSelectionChanged(){this.comp&&this.rangeFeature?.onCellSelectionChanged()}isRangeSelectionEnabled(){return this.rangeFeature!=null}focusCell(e=!1,t){let n=this.editSvc?.allowedFocusTargetOnValidation(this);n&&n!==this||this.beans.focusSvc.setFocusedCell({...this.getFocusedCellPosition(),forceBrowserFocus:e,sourceEvent:t})}restoreFocus(e=!1){let{beans:{editSvc:t,focusSvc:n},comp:r}=this;if(!r||t?.isEditing(this)||!this.isCellFocused()||!n.shouldTakeFocus())return;let i=()=>{if(!this.isAlive())return;let e=r.getFocusableElement();this.isCellFocused()&&e.focus({preventScroll:!0})};if(e){setTimeout(i,0);return}i()}onRowIndexChanged(){this.createCellPosition(),this.refreshAriaRowIndex(),this.onCellFocused(),this.restoreFocus(),this.rangeFeature?.onCellSelectionChanged(),this.rowResizeFeature?.refreshRowResizer()}onSuppressCellFocusChanged(e){let t=this.eGui;t&&oG(t,`tabindex`,e?void 0:-1)}onFirstRightPinnedChanged(){if(!this.comp)return;let e=this.column.isFirstRightPinned();this.comp.toggleCss(fDe,e)}onLastLeftPinnedChanged(){if(!this.comp)return;let e=this.column.isLastLeftPinned();this.comp.toggleCss(pDe,e)}checkCellFocused(){return this.beans.focusSvc.isCellFocused(this.cellPosition)}isCellFocused(){let e=this.checkCellFocused();return this.hasBeenFocused||=e,e}setupFocus(){this.restoreFocus(!0),this.onCellFocused(this.focusEventWhileNotReady??void 0)}onCellFocused(e){let{beans:t}=this;if(oY(t))return;if(!this.comp){e&&(this.focusEventWhileNotReady=e);return}let n=this.isCellFocused(),r=t.editSvc?.isEditing(this)??!1;if(this.comp.toggleCss(dDe,n),n&&(e?.forceBrowserFocus||!this.hasBrowserFocus()&&this.beans.focusSvc.shouldTakeFocus())){let n=this.comp.getFocusableElement();if(r){let e=hJ(n,null,!0);e.length&&(n=e[0])}let i=!e||e.preventScrollOnBrowserFocus;n.focus({preventScroll:i}),sG(t,n)}n&&this.focusEventWhileNotReady&&(this.focusEventWhileNotReady=null),n&&e&&this.rowCtrl.announceDescription()}createCellPosition(){let{rowIndex:e,rowPinned:t}=this.rowNode;this.cellPosition={rowIndex:e,rowPinned:tW(t),column:this.column}}applyStaticCssClasses(){let{comp:e}=this;e.toggleCss(cDe,!0),e.toggleCss(mDe,!0);let t=this.column.isAutoHeight()==1;e.toggleCss(lDe,t),e.toggleCss(uDe,!t)}onColumnHover(){this.beans.colHover?.onCellColumnHover(this.column,this.comp)}onColDefChanged(){this.comp&&(this.column.isTooltipEnabled()?(this.disableTooltipFeature(),this.enableTooltipFeature()):this.disableTooltipFeature(),this.setWrapText(),this.editSvc?.isEditing(this)?this.editSvc?.handleColDefChanged(this):this.refreshOrDestroyCell({force:!0,suppressFlash:!0}))}setWrapText(){let e=this.column.getColDef().wrapText==1;this.comp.toggleCss(hDe,e)}dispatchCellContextMenuEvent(e){let t=this.column.getColDef(),n=this.createEvent(e,`cellContextMenu`),{beans:r}=this;r.eventSvc.dispatchEvent(n),t.onCellContextMenu&&window.setTimeout(()=>{r.frameworkOverrides.wrapOutgoing(()=>{t.onCellContextMenu(n)})},0)}getCellRenderer(){return this.comp?.getCellRenderer()??null}destroy(){this.onCompAttachedFuncs=[],this.onEditorAttachedFuncs=[],this.isCellFocused()&&this.hasBrowserFocus()&&this.beans.focusSvc.attemptToRecoverFocus(),super.destroy()}hasBrowserFocus(){return this.eGui?.contains(dW(this.beans))??!1}createSelectionCheckbox(){let e=this.beans.selectionSvc?.createCheckboxSelectionComponent();if(e)return this.beans.context.createBean(e),e.init({rowNode:this.rowNode,column:this.column}),e}createDndSource(){let e=this.beans.registry.createDynamicBean(`dndSourceComp`,!1,this.rowNode,this.column,this.eGui);return e&&this.beans.context.createBean(e),e}registerRowDragger(e,t,n){if(this.customRowDragComp){this.customRowDragComp.setDragElement(e,t);return}let r=this.createRowDragComp(e,t,n);r&&(this.customRowDragComp=r,this.addDestroyFunc(()=>{this.beans.context.destroyBean(r),this.customRowDragComp=null}),r.refreshVisibility())}createRowDragComp(e,t,n){let r=this.beans.rowDragSvc?.createRowDragCompForCell(this.rowNode,this.column,()=>this.value,e,t,n);if(r)return this.beans.context.createBean(r),r}cellEditorAttached(){for(let e of this.onEditorAttachedFuncs)e();this.onEditorAttachedFuncs=[]}setFocusedCellPosition(e){}getFocusedCellPosition(){return this.cellPosition}refreshAriaRowIndex(){if(!wq(this.column)||!this.eGui)return;let{ariaRowIndex:e}=this.rowCtrl;e!=null&&DW(this.eGui,e)}getRootElement(){return this.eGui}};function KQ(e,t,n,r,i,a){if(n==null&&t==null)return;let o={},s={},c=(e,t)=>{for(let n of e.split(` `))n.trim()!=``&&t(n)};if(n){let t=Object.keys(n);for(let i=0;i<t.length;i++){let a=t[i],l=n[a],u;typeof l==`string`?u=!e||e.evaluate(l,r):typeof l==`function`&&(u=l(r)),c(a,e=>{u?o[e]=!0:s[e]=!0})}}if(t&&a)for(let e of Object.keys(t))c(e,e=>{o[e]||(s[e]=!0)});a&&Object.keys(s).forEach(a),Object.keys(o).forEach(i)}function qQ(e){if(e.group)return e.level;let t=e.parent;return t?t.level+1:0}var _De=class extends Q{constructor(){super(...arguments),this.beanName=`rowStyleSvc`}processClassesFromGridOptions(e,t){let n=this.gos,r=t=>{if(typeof t==`string`)e.push(t);else if(Array.isArray(t))for(let n of t)e.push(n)},i=n.get(`rowClass`);i&&r(i);let a=n.getCallback(`getRowClass`);a&&r(a({data:t.data,node:t,rowIndex:t.rowIndex}))}preProcessRowClassRules(e,t){this.processRowClassRules(t,t=>{e.push(t)},()=>{})}processRowClassRules(e,t,n){let{gos:r,expressionSvc:i}=this.beans,a=eq(r,{data:e.data,node:e,rowIndex:e.rowIndex});KQ(i,void 0,r.get(`rowClassRules`),a,t,n)}processStylesFromGridOptions(e){let t=this.gos,n=t.get(`rowStyle`),r=t.getCallback(`getRowStyle`),i;if(r&&(i=r({data:e.data,node:e,rowIndex:e.rowIndex})),i||n)return Object.assign({},n,i)}},vDe=0,JQ=class extends Q{constructor(e,t,n,r,i){super(),this.rowNode=e,this.useAnimationFrameForCreate=r,this.printLayout=i,this.focusEventWhileNotReady=null,this.allRowGuis=[],this.active=!0,this.centerCellCtrls={list:[],map:{}},this.leftCellCtrls={list:[],map:{}},this.rightCellCtrls={list:[],map:{}},this.slideInAnimation={left:!1,center:!1,right:!1,fullWidth:!1},this.fadeInAnimation={left:!1,center:!1,right:!1,fullWidth:!1},this.rowDragComps=[],this.lastMouseDownOnDragger=!1,this.emptyStyle={},this.updateColumnListsPending=!1,this.rowId=null,this.ariaRowIndex=null,this.businessKey=null,this.beans=t,this.gos=t.gos,this.paginationPage=t.pagination?.getCurrentPage()??0,this.suppressRowTransform=this.gos.get(`suppressRowTransform`),this.instanceId=e.id+`-`+vDe++,this.rowId=cW(e.id),this.initRowBusinessKey(),this.rowFocused=t.focusSvc.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned),this.rowLevel=qQ(this.rowNode),this.setRowType(),this.setAnimateFlags(n),this.rowStyles=this.processStylesFromGridOptions(),this.rowEditStyleFeature=t.editSvc?.createRowStyleFeature(this),this.addListeners()}initRowBusinessKey(){this.businessKeyForNodeFunc=this.gos.get(`getBusinessKeyForNode`),this.updateRowBusinessKey()}updateRowBusinessKey(){if(typeof this.businessKeyForNodeFunc!=`function`)return;let e=this.businessKeyForNodeFunc(this.rowNode);this.businessKey=cW(e)}updateGui(e,t){e===`left`?this.leftGui=t:e===`right`?this.rightGui=t:e===`fullWidth`?this.fullWidthGui=t:this.centerGui=t}setComp(e,t,n,r){let{context:i,rowRenderer:a}=this.beans;r=_Y(this,i,r);let o={rowComp:e,element:t,containerType:n,compBean:r};this.allRowGuis.push(o),this.updateGui(n,o),this.initialiseRowComp(o);let s=this.rowNode,c=this.rowType===`FullWidthLoading`||s.stub,l=!s.data&&this.beans.rowModel.getType()===`infinite`;!c&&!l&&!s.rowPinned&&a.dispatchFirstDataRenderedEvent(),this.setupFocus()}unsetComp(e){this.allRowGuis=this.allRowGuis.filter(t=>t.containerType!==e),this.updateGui(e,void 0)}isCacheable(){return this.rowType===`FullWidthDetail`&&this.gos.get(`keepDetailRows`)}setCached(e){let t=e?`none`:``;for(let e of this.allRowGuis)e.element.style.display=t}initialiseRowComp(e){let t=this.gos;this.onSuppressCellFocusChanged(this.beans.gos.get(`suppressCellFocus`)),this.listenOnDomOrder(e),this.onRowHeightChanged(e),this.updateRowIndexes(e),this.setFocusedClasses(e),this.setStylesFromGridOptions(!1,e),wK(t)&&this.rowNode.selectable&&this.onRowSelected(e),this.updateColumnLists(!this.useAnimationFrameForCreate);let n=e.rowComp,r=this.getInitialRowClasses(e.containerType);for(let e of r)n.toggleCss(e,!0);this.executeSlideAndFadeAnimations(e),this.rowNode.group&&EW(e.element,!!this.rowNode.expanded),this.setRowCompRowId(n),this.setRowCompRowBusinessKey(n),AK(t,e.element,HY,this),e.compBean.addDestroyFunc(()=>AK(t,e.element,HY,null)),this.useAnimationFrameForCreate?this.beans.animationFrameSvc.createTask(this.addHoverFunctionality.bind(this,e),this.rowNode.rowIndex,`p2`,!1):this.addHoverFunctionality(e),this.isFullWidth()&&this.setupFullWidth(e),t.get(`rowDragEntireRow`)&&this.addRowDraggerToRow(e),this.useAnimationFrameForCreate&&this.beans.animationFrameSvc.addDestroyTask(()=>{this.isAlive()&&e.rowComp.toggleCss(`ag-after-created`,!0)}),this.executeProcessRowPostCreateFunc()}setRowCompRowBusinessKey(e){this.businessKey!=null&&e.setRowBusinessKey(this.businessKey)}setRowCompRowId(e){let t=cW(this.rowNode.id);this.rowId=t,t!=null&&e.setRowId(t)}executeSlideAndFadeAnimations(e){let{containerType:t}=e;this.slideInAnimation[t]&&(NG(()=>{this.onTopChanged()}),this.slideInAnimation[t]=!1),this.fadeInAnimation[t]&&(NG(()=>{e.rowComp.toggleCss(`ag-opacity-zero`,!1)}),this.fadeInAnimation[t]=!1)}addRowDraggerToRow(e){let t=this.beans.rowDragSvc?.createRowDragCompForRow(this.rowNode,e.element);if(!t)return;let n=this.createBean(t,this.beans.context);this.rowDragComps.push(n),e.compBean.addDestroyFunc(()=>{this.rowDragComps=this.rowDragComps.filter(e=>e!==n),this.rowEditStyleFeature=this.destroyBean(this.rowEditStyleFeature,this.beans.context),this.destroyBean(n,this.beans.context)})}setupFullWidth(e){let t=this.getPinnedForContainer(e.containerType),n=this.createFullWidthCompDetails(e.element,t);e.rowComp.showFullWidth(n)}getFullWidthCellRenderers(){return this.gos.get(`embedFullWidthRows`)?this.allRowGuis.map(e=>e?.rowComp?.getFullWidthCellRenderer()):[this.fullWidthGui?.rowComp?.getFullWidthCellRenderer()]}executeProcessRowPostCreateFunc(){let e=this.gos.getCallback(`processRowPostCreate`);e&&this.areAllContainersReady()&&e({eRow:this.centerGui.element,ePinnedLeftRow:this.leftGui?this.leftGui.element:void 0,ePinnedRightRow:this.rightGui?this.rightGui.element:void 0,node:this.rowNode,rowIndex:this.rowNode.rowIndex,addRenderedRowListener:this.addEventListener.bind(this)})}areAllContainersReady(){let{leftGui:e,centerGui:t,rightGui:n,beans:{visibleCols:r}}=this,i=!!e||!r.isPinningLeft(),a=!!t,o=!!n||!r.isPinningRight();return i&&a&&o}isNodeFullWidthCell(){if(this.rowNode.detail)return!0;let e=this.beans.gos.getCallback(`isFullWidthRow`);return e?e({rowNode:this.rowNode}):!1}setRowType(){let{rowNode:e,gos:t,beans:{colModel:n}}=this,r=e.stub&&!t.get(`suppressServerSideFullWidthLoadingRow`)&&!t.get(`groupHideOpenParents`),i=this.isNodeFullWidthCell(),a=t.get(`masterDetail`)&&e.detail,o=LK(t,e,n.isPivotMode());this.rowType=r?`FullWidthLoading`:a?`FullWidthDetail`:i?`FullWidth`:o?`FullWidthGroup`:`Normal`}updateColumnLists(e=!1,t=!1){if(this.isFullWidth())return;let{animationFrameSvc:n}=this.beans;if(!n?.active||e||this.printLayout){this.updateColumnListsImpl(t);return}this.updateColumnListsPending||=(n.createTask(()=>{this.active&&this.updateColumnListsImpl(!0)},this.rowNode.rowIndex,`p1`,!1),!0)}getNewCellCtrl(e){if(!this.beans.rowSpanSvc?.isCellSpanning(e,this.rowNode))return new GQ(e,this.rowNode,this.beans,this)}isCorrectCtrlForSpan(e){return!this.beans.rowSpanSvc?.isCellSpanning(e.column,this.rowNode)}createCellCtrls(e,t,n=null){let r={list:[],map:{}},i=(e,t,n)=>{n==null?r.list.push(t):r.list.splice(n,0,t),r.map[e]=t},a=[];for(let n of t){let t=n.getInstanceId(),r=e.map[t];r&&!this.isCorrectCtrlForSpan(r)&&(r.destroy(),r=void 0),r||=this.getNewCellCtrl(n),r&&i(t,r)}for(let t of e.list){let e=t.column.getInstanceId();r.map[e]??(this.isCellEligibleToBeRemoved(t,n)?t.destroy():a.push([e,t]))}if(a.length)for(let[e,t]of a){let n=r.list.findIndex(e=>e.column.getLeft()>t.column.getLeft());i(e,t,n===-1?void 0:Math.max(n-1,0))}let{focusSvc:o,visibleCols:s}=this.beans,c=o.getFocusedCell();if(c&&c.column.getPinned()==n){let e=c.column.getInstanceId();if(!r.map[e]&&s.allCols.includes(c.column)){let t=this.createFocusedCellCtrl();if(t){let n=r.list.findIndex(e=>e.column.getLeft()>t.column.getLeft());i(e,t,n===-1?void 0:Math.max(n-1,0))}}}return r}createFocusedCellCtrl(){let{focusSvc:e,rowSpanSvc:t}=this.beans,n=e.getFocusedCell();if(!n)return;let r=t?.getCellSpan(n.column,this.rowNode);if(r){if(r.firstNode!==this.rowNode||!r.doesSpanContain(n))return}else if(!e.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned))return;return this.getNewCellCtrl(n.column)}updateColumnListsImpl(e){this.updateColumnListsPending=!1,this.createAllCellCtrls(),this.setCellCtrls(e)}setCellCtrls(e){for(let t of this.allRowGuis){let n=this.getCellCtrlsForContainer(t.containerType);t.rowComp.setCellCtrls(n,e)}}getCellCtrlsForContainer(e){switch(e){case`left`:return this.leftCellCtrls.list;case`right`:return this.rightCellCtrls.list;case`fullWidth`:return[];case`center`:return this.centerCellCtrls.list}}createAllCellCtrls(){let e=this.beans.colViewport,t=this.beans.visibleCols;if(this.printLayout)this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,t.allCols),this.leftCellCtrls={list:[],map:{}},this.rightCellCtrls={list:[],map:{}};else{let n=e.getColsWithinViewport(this.rowNode);this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,n);let r=t.getLeftColsForRow(this.rowNode);this.leftCellCtrls=this.createCellCtrls(this.leftCellCtrls,r,`left`);let i=t.getRightColsForRow(this.rowNode);this.rightCellCtrls=this.createCellCtrls(this.rightCellCtrls,i,`right`)}}isCellEligibleToBeRemoved(e,t){let{column:n}=e;if(n.getPinned()!=t||!this.isCorrectCtrlForSpan(e))return!0;let{visibleCols:r,editSvc:i}=this.beans,a=i?.isEditing(e),o=e.isCellFocused();return a||o?!(r.allCols.indexOf(n)>=0):!0}getDomOrder(){return this.gos.get(`ensureDomOrder`)||CK(this.gos,`print`)}listenOnDomOrder(e){e.compBean.addManagedPropertyListeners([`domLayout`,`ensureDomOrder`],()=>{e.rowComp.setDomOrder(this.getDomOrder())})}setAnimateFlags(e){if(this.rowNode.sticky||!e)return;let t=nW(this.rowNode.oldRowTop),{visibleCols:n}=this.beans,r=n.isPinningLeft(),i=n.isPinningRight();if(t){let{slideInAnimation:e}=this;if(this.isFullWidth()&&!this.gos.get(`embedFullWidthRows`)){e.fullWidth=!0;return}e.center=!0,e.left=r,e.right=i}else{let{fadeInAnimation:e}=this;if(this.isFullWidth()&&!this.gos.get(`embedFullWidthRows`)){e.fullWidth=!0;return}e.center=!0,e.left=r,e.right=i}}isFullWidth(){return this.rowType!==`Normal`}refreshFullWidth(){let e=(e,t)=>!e||e.rowComp.refreshFullWidth(()=>this.createFullWidthCompDetails(e.element,t).params),t=e(this.fullWidthGui,null),n=e(this.centerGui,null),r=e(this.leftGui,`left`),i=e(this.rightGui,`right`);return t&&n&&r&&i}addListeners(){let{beans:e,gos:t,rowNode:n}=this,{expansionSvc:r,eventSvc:i,context:a,rowSpanSvc:o}=e;this.addManagedListeners(this.rowNode,{heightChanged:()=>this.onRowHeightChanged(),rowSelected:()=>this.onRowSelected(),rowIndexChanged:this.onRowIndexChanged.bind(this),topChanged:this.onTopChanged.bind(this),...r?.getRowExpandedListeners(this)??{}}),n.detail&&this.addManagedListeners(n.parent,{dataChanged:this.onRowNodeDataChanged.bind(this)}),this.addManagedListeners(n,{dataChanged:this.onRowNodeDataChanged.bind(this),cellChanged:this.postProcessCss.bind(this),rowHighlightChanged:this.onRowNodeHighlightChanged.bind(this),draggingChanged:this.postProcessRowDragging.bind(this),uiLevelChanged:this.onUiLevelChanged.bind(this),rowPinned:this.onRowPinned.bind(this)}),this.addManagedListeners(i,{paginationPixelOffsetChanged:this.onPaginationPixelOffsetChanged.bind(this),heightScaleChanged:this.onTopChanged.bind(this),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),virtualColumnsChanged:this.onVirtualColumnsChanged.bind(this),cellFocused:this.onCellFocusChanged.bind(this),cellFocusCleared:this.onCellFocusChanged.bind(this),paginationChanged:this.onPaginationChanged.bind(this),modelUpdated:this.refreshFirstAndLastRowStyles.bind(this),columnMoved:()=>this.updateColumnLists()}),o&&this.addManagedListeners(o,{spannedCellsUpdated:({pinned:e})=>{(!e||n.rowPinned)&&this.updateColumnLists()}}),this.addDestroyFunc(()=>{this.rowDragComps=this.destroyBeans(this.rowDragComps,a),this.tooltipFeature=this.destroyBean(this.tooltipFeature,a),this.rowEditStyleFeature=this.destroyBean(this.rowEditStyleFeature,a)}),this.addManagedPropertyListeners([`rowStyle`,`getRowStyle`,`rowClass`,`getRowClass`,`rowClassRules`],this.postProcessCss.bind(this)),this.addManagedPropertyListener(`rowDragEntireRow`,()=>{if(t.get(`rowDragEntireRow`)){for(let e of this.allRowGuis)this.addRowDraggerToRow(e);return}this.rowDragComps=this.destroyBeans(this.rowDragComps,a)}),this.addListenersForCellComps()}addListenersForCellComps(){this.addManagedListeners(this.rowNode,{rowIndexChanged:()=>{for(let e of this.getAllCellCtrls())e.onRowIndexChanged()},cellChanged:e=>{for(let t of this.getAllCellCtrls())t.onCellChanged(e)}})}onRowPinned(){for(let e of this.allRowGuis)e.rowComp.toggleCss(`ag-row-pinned-source`,!!this.rowNode.pinnedSibling)}onRowNodeDataChanged(e){this.refreshRow({suppressFlash:!e.update,newData:!e.update})}refreshRow(e){if(this.isFullWidth()!==!!this.isNodeFullWidthCell()){this.beans.rowRenderer.redrawRow(this.rowNode);return}if(this.isFullWidth()){this.refreshFullWidth()||this.beans.rowRenderer.redrawRow(this.rowNode);return}for(let t of this.getAllCellCtrls())t.refreshCell(e);for(let e of this.allRowGuis)this.setRowCompRowId(e.rowComp),this.updateRowBusinessKey(),this.setRowCompRowBusinessKey(e.rowComp);this.onRowSelected(),this.postProcessCss()}postProcessCss(){this.setStylesFromGridOptions(!0),this.postProcessClassesFromGridOptions(),this.postProcessRowClassRules(),this.rowEditStyleFeature?.applyRowStyles(),this.postProcessRowDragging()}onRowNodeHighlightChanged(){let e=this.beans.rowDropHighlightSvc,t=e?.row===this.rowNode?e.position:`none`,n=t===`above`,r=t===`inside`,i=t===`below`,a=t!==`none`,o=n||i,s=this.rowNode.uiLevel,c=o&&s>0,l=c?s.toString():`0`;for(let e of this.allRowGuis){let t=e.rowComp;t.toggleCss(`ag-row-highlight-above`,n),t.toggleCss(`ag-row-highlight-inside`,r),t.toggleCss(`ag-row-highlight-below`,i),t.toggleCss(`ag-row-highlight-indent`,c),a?e.element.style.setProperty(`--ag-row-highlight-level`,l):e.element.style.removeProperty(`--ag-row-highlight-level`)}}postProcessRowDragging(){let e=this.rowNode.dragging;for(let t of this.allRowGuis)t.rowComp.toggleCss(`ag-row-dragging`,e)}onDisplayedColumnsChanged(){this.updateColumnLists(!0),this.beans.rowAutoHeight?.requestCheckAutoHeight()}onVirtualColumnsChanged(){this.updateColumnLists(!1,!0)}getRowPosition(){return{rowPinned:tW(this.rowNode.rowPinned),rowIndex:this.rowNode.rowIndex}}onKeyboardNavigate(e){let t=this.findFullWidthInfoForEvent(e);if(!t)return;let{rowGui:n,column:r}=t;if(n.element!==e.target)return;let i=this.rowNode,{focusSvc:a,navigation:o}=this.beans,s=a.getFocusedCell(),c={rowIndex:i.rowIndex,rowPinned:i.rowPinned,column:s?.column??r};o?.navigateToNextCell(e,e.key,c,!0),e.preventDefault()}onTabKeyDown(e){if(e.defaultPrevented||SJ(e))return;let t=this.allRowGuis.find(t=>t.element.contains(e.target)),n=t?t.element:null,r=n===e.target,i=dW(this.beans),a=!1;n&&i&&(a=n.contains(i)&&i.classList.contains(`ag-cell`));let o=null;!r&&!a&&(o=_J(this.beans,n,!1,e.shiftKey)),(this.isFullWidth()&&r||!o)&&this.beans.navigation?.onTabKeyDown(this,e)}getFullWidthElement(){return this.fullWidthGui?this.fullWidthGui.element:null}getRowYPosition(){let e=this.allRowGuis.find(e=>XW(e.element))?.element;return e?e.getBoundingClientRect().top:0}onSuppressCellFocusChanged(e){let t=this.isFullWidth()&&e?void 0:this.gos.get(`tabIndex`);for(let e of this.allRowGuis)oG(e.element,`tabindex`,t)}setupFocus(){this.isFullWidth()&&(this.restoreFullWidthFocus(!0),this.onFullWidthRowFocused(this.focusEventWhileNotReady??void 0))}restoreFullWidthFocus(e=!1){let{focusSvc:t,editSvc:n}=this.beans;if(n?.isEditing(this)||!t.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned)||!t.shouldTakeFocus())return;let r=this.getFullWidthRowGuiForFocus();if(!r)return;let i=()=>{this.isAlive()&&t.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned)&&r.element.focus({preventScroll:!0})};if(e){setTimeout(i,0);return}i()}getFullWidthRowGuiForFocus(e){if(this.fullWidthGui)return this.fullWidthGui;let t=this.beans.focusSvc.getFocusedCell(),n=this.beans.colModel.getCol(e?.column??t?.column);if(!n)return;let r=n?.pinned;return r===`right`?this.rightGui:r===`left`?this.leftGui:this.centerGui}setFullWidthRowFocusedClass(e,t){this.forEachGui(void 0,n=>{n.element.classList.toggle(`ag-full-width-focus`,t&&n===e)})}onFullWidthRowFocused(e){let{focusSvc:t}=this.beans;if(!(this.isFullWidth()&&t.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned))){this.setFullWidthRowFocusedClass(void 0,!1);return}let n=this.getFullWidthRowGuiForFocus(e);if(!n){e&&(this.focusEventWhileNotReady=e),this.setFullWidthRowFocusedClass(void 0,!1);return}this.setFullWidthRowFocusedClass(n,!0),this.focusEventWhileNotReady=null,e?.forceBrowserFocus&&n.element.focus({preventScroll:!0})}recreateCell(e){this.centerCellCtrls=this.removeCellCtrl(this.centerCellCtrls,e),this.leftCellCtrls=this.removeCellCtrl(this.leftCellCtrls,e),this.rightCellCtrls=this.removeCellCtrl(this.rightCellCtrls,e),e.destroy(),this.updateColumnLists()}removeCellCtrl(e,t){let n={list:[],map:{}};for(let r of e.list)r!==t&&(n.list.push(r),n.map[r.column.getInstanceId()]=r);return n}onMouseEvent(e,t){switch(e){case`dblclick`:this.onRowDblClick(t);break;case`click`:this.onRowClick(t);break;case`pointerdown`:case`touchstart`:case`mousedown`:this.onRowMouseDown(t)}}createRowEvent(e,t){let{rowNode:n}=this;return eq(this.gos,{type:e,node:n,data:n.data,rowIndex:n.rowIndex,rowPinned:n.rowPinned,event:t})}createRowEventWithSource(e,t){let n=this.createRowEvent(e,t);return n.source=this,n}onRowDblClick(e){if(SJ(e))return;let t=this.createRowEventWithSource(`rowDoubleClicked`,e);t.isEventHandlingSuppressed=this.isSuppressMouseEvent(e),this.beans.eventSvc.dispatchEvent(t)}findFullWidthInfoForEvent(e){if(!e)return;let t=this.findFullWidthRowGui(e.target),n=this.getColumnForFullWidth(t);if(t&&n)return{rowGui:t,column:n}}findFullWidthRowGui(e){return this.allRowGuis.find(t=>t.element.contains(e))}getColumnForFullWidth(e){let{visibleCols:t}=this.beans;switch(e?.containerType){case`center`:return t.centerCols[0];case`left`:return t.leftCols[0];case`right`:return t.rightCols[0];default:return t.allCols[0]}}onRowMouseDown(e){if(this.lastMouseDownOnDragger=RW(e.target,`ag-row-drag`,3),!this.isFullWidth()||this.isSuppressMouseEvent(e))return;let{rangeSvc:t,focusSvc:n}=this.beans;t?.removeAllCellRanges();let r=this.findFullWidthInfoForEvent(e);if(!r)return;let{rowGui:i,column:a}=r,o=i.element,s=e.target,c=this.rowNode,l=e.defaultPrevented||rJ();o&&o.contains(s)&&PW(s)&&(l=!1),n.setFocusedCell({rowIndex:c.rowIndex,column:a,rowPinned:c.rowPinned,forceBrowserFocus:l})}isSuppressMouseEvent(e){let{gos:t,rowNode:n}=this;if(this.isFullWidth())return Gxe(t,this.findFullWidthRowGui(e.target)?.rowComp.getFullWidthCellRendererParams(),n,e);let r=VY(t,e.target);return r!=null&&LY(t,r.column,n,e)}onRowClick(e){if(SJ(e)||this.lastMouseDownOnDragger)return;let t=this.isSuppressMouseEvent(e),{eventSvc:n,selectionSvc:r}=this.beans,i=this.createRowEventWithSource(`rowClicked`,e);i.isEventHandlingSuppressed=t,n.dispatchEvent(i),!t&&r?.handleSelectionEvent(e,this.rowNode,`rowClicked`)}setupDetailRowAutoHeight(e){this.rowType===`FullWidthDetail`&&this.beans.masterDetailSvc?.setupDetailRowAutoHeight(this,e)}createFullWidthCompDetails(e,t){let{gos:n,rowNode:r}=this,i=eq(n,{fullWidth:!0,data:r.data,node:r,value:r.key,valueFormatted:r.key,eGridCell:e,eParentOfValue:e,pinned:t,addRenderedRowListener:this.addEventListener.bind(this),registerRowDragger:(e,t,n,r)=>this.addFullWidthRowDragging(e,t,n,r),setTooltip:(e,t)=>{n.assertModuleRegistered(`Tooltip`,3),this.setupFullWidthRowTooltip(e,t)}}),a=this.beans.userCompFactory;switch(this.rowType){case`FullWidthDetail`:return Dbe(a,i);case`FullWidthGroup`:{let{value:e,valueFormatted:t}=this.beans.valueSvc.getValueForDisplay({node:this.rowNode,includeValueFormatted:!0,from:`edit`});return i.value=e,i.valueFormatted=t,Ebe(a,i)}case`FullWidthLoading`:return Tbe(a,i);default:return wbe(a,i)}}setupFullWidthRowTooltip(e,t){this.fullWidthGui&&(this.tooltipFeature=this.beans.tooltipSvc?.setupFullWidthRowTooltip(this.tooltipFeature,this,e,t))}addFullWidthRowDragging(e,t,n=``,r){let{rowDragSvc:i,context:a}=this.beans;if(!i||!this.isFullWidth())return;let o=i.createRowDragComp(()=>n,this.rowNode,void 0,e,t,r);this.createBean(o,a),this.addDestroyFunc(()=>{this.destroyBean(o,a)})}onUiLevelChanged(){let e=qQ(this.rowNode);if(this.rowLevel!=e){let t=`ag-row-level-`+e,n=`ag-row-level-`+this.rowLevel;for(let e of this.allRowGuis)e.rowComp.toggleCss(t,!0),e.rowComp.toggleCss(n,!1)}this.rowLevel=e}isFirstRowOnPage(){return this.rowNode.rowIndex===this.beans.pageBounds.getFirstRow()}isLastRowOnPage(){return this.rowNode.rowIndex===this.beans.pageBounds.getLastRow()}refreshFirstAndLastRowStyles(){let e=this.isFirstRowOnPage(),t=this.isLastRowOnPage();if(this.firstRowOnPage!==e){this.firstRowOnPage=e;for(let t of this.allRowGuis)t.rowComp.toggleCss(`ag-row-first`,e)}if(this.lastRowOnPage!==t){this.lastRowOnPage=t;for(let e of this.allRowGuis)e.rowComp.toggleCss(`ag-row-last`,t)}}getAllCellCtrls(){return this.leftCellCtrls.list.length===0&&this.rightCellCtrls.list.length===0?this.centerCellCtrls.list:[...this.centerCellCtrls.list,...this.leftCellCtrls.list,...this.rightCellCtrls.list]}postProcessClassesFromGridOptions(){let e=[];if(this.beans.rowStyleSvc?.processClassesFromGridOptions(e,this.rowNode),e.length)for(let t of e)for(let e of this.allRowGuis)e.rowComp.toggleCss(t,!0)}postProcessRowClassRules(){this.beans.rowStyleSvc?.processRowClassRules(this.rowNode,e=>{for(let t of this.allRowGuis)t.rowComp.toggleCss(e,!0)},e=>{for(let t of this.allRowGuis)t.rowComp.toggleCss(e,!1)})}setStylesFromGridOptions(e,t){e&&(this.rowStyles=this.processStylesFromGridOptions()),this.forEachGui(t,e=>e.rowComp.setUserStyles(this.rowStyles))}getPinnedForContainer(e){return e===`left`||e===`right`?e:null}getInitialRowClasses(e){let t=this.getPinnedForContainer(e),n=this.isFullWidth(),{rowNode:r,beans:i}=this,a=[];a.push(`ag-row`),a.push(this.rowFocused?`ag-row-focus`:`ag-row-no-focus`),this.fadeInAnimation[e]&&a.push(`ag-opacity-zero`),a.push(r.rowIndex%2==0?`ag-row-even`:`ag-row-odd`),r.isRowPinned()&&(a.push(`ag-row-pinned`),i.pinnedRowModel?.isManual()&&a.push(`ag-row-pinned-manual`)),!r.isRowPinned()&&r.pinnedSibling&&a.push(`ag-row-pinned-source`),r.isSelected()&&a.push(`ag-row-selected`),r.footer&&a.push(`ag-row-footer`),a.push(`ag-row-level-`+this.rowLevel),r.stub&&a.push(`ag-row-loading`),n&&a.push(`ag-full-width-row`),i.expansionSvc?.addExpandedCss(a,r),r.dragging&&a.push(`ag-row-dragging`);let{rowStyleSvc:o}=i;return o&&(o.processClassesFromGridOptions(a,r),o.preProcessRowClassRules(a,r)),a.push(this.printLayout?`ag-row-position-relative`:`ag-row-position-absolute`),this.isFirstRowOnPage()&&a.push(`ag-row-first`),this.isLastRowOnPage()&&a.push(`ag-row-last`),n&&(t===`left`&&a.push(`ag-cell-last-left-pinned`),t===`right`&&a.push(`ag-cell-first-right-pinned`)),a}processStylesFromGridOptions(){return this.beans.rowStyleSvc?.processStylesFromGridOptions(this.rowNode)??this.emptyStyle}onRowSelected(e){this.beans.selectionSvc?.onRowCtrlSelected(this,e=>{(e===this.centerGui||e===this.fullWidthGui)&&this.announceDescription()},e)}announceDescription(){this.beans.selectionSvc?.announceAriaRowSelection(this.rowNode)}addHoverFunctionality(e){if(!this.active)return;let{element:t,compBean:n}=e,{rowNode:r,beans:i,gos:a}=this;n.addManagedListeners(t,{pointerenter:e=>{e.pointerType===`mouse`&&r.dispatchRowEvent(`mouseEnter`)},pointerleave:e=>{e.pointerType===`mouse`&&r.dispatchRowEvent(`mouseLeave`)}}),n.addManagedListeners(r,{mouseEnter:()=>{!i.dragSvc?.dragging&&!a.get(`suppressRowHoverHighlight`)&&(t.classList.add(`ag-row-hover`),r.setHovered(!0))},mouseLeave:()=>{this.resetHoveredStatus(t)}})}resetHoveredStatus(e){let t=e?[e]:this.allRowGuis.map(e=>e.element);for(let e of t)e.classList.remove(`ag-row-hover`);this.rowNode.setHovered(!1)}roundRowTopToBounds(e){let t=this.beans.ctrlsSvc.getScrollFeature().getApproximateVScollPosition(),n=this.applyPaginationOffset(t.top,!0)-100,r=this.applyPaginationOffset(t.bottom,!0)+100;return Math.min(Math.max(n,e),r)}forEachGui(e,t){if(e)t(e);else for(let e of this.allRowGuis)t(e)}isRowRendered(){return this.allRowGuis.length>0}onRowHeightChanged(e){if(this.rowNode.rowHeight==null)return;let t=this.rowNode.rowHeight,n=this.beans.environment.getDefaultRowHeight(),r=TK(this.gos)?EK(this.beans,this.rowNode).height:void 0,i=r?`${Math.min(n,r)-2}px`:void 0;this.forEachGui(e,e=>{e.element.style.height=`${t}px`,i&&e.element.style.setProperty(`--ag-line-height`,i)})}destroyFirstPass(e=!1){this.active=!1;let{rowNode:t}=this;if(!e&&jK(this.gos)&&!t.sticky){if(t.rowTop!=null){let e=this.roundRowTopToBounds(t.rowTop);this.setRowTop(e)}else for(let e of this.allRowGuis)e.rowComp.toggleCss(`ag-opacity-zero`,!0)}this.fullWidthGui?.element.contains(dW(this.beans))&&this.beans.focusSvc.attemptToRecoverFocus(),t.setHovered(!1);let n=this.createRowEvent(`virtualRowRemoved`);this.dispatchLocalEvent(n),this.beans.eventSvc.dispatchEvent(n),super.destroy()}destroySecondPass(){this.allRowGuis.length=0;let e=e=>{for(let t of e.list)t.destroy();return{list:[],map:{}}};this.centerCellCtrls=e(this.centerCellCtrls),this.leftCellCtrls=e(this.leftCellCtrls),this.rightCellCtrls=e(this.rightCellCtrls)}setFocusedClasses(e){this.forEachGui(e,e=>{e.rowComp.toggleCss(`ag-row-focus`,this.rowFocused),e.rowComp.toggleCss(`ag-row-no-focus`,!this.rowFocused)})}onCellFocusChanged(){let{focusSvc:e}=this.beans,t=e.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned);t!==this.rowFocused&&(this.rowFocused=t,this.setFocusedClasses())}onPaginationChanged(){let e=this.beans.pagination?.getCurrentPage()??0;this.paginationPage!==e&&(this.paginationPage=e,this.onTopChanged()),this.refreshFirstAndLastRowStyles()}onTopChanged(){this.setRowTop(this.rowNode.rowTop)}onPaginationPixelOffsetChanged(){this.onTopChanged()}applyPaginationOffset(e,t=!1){return this.rowNode.isRowPinned()||this.rowNode.sticky?e:e+this.beans.pageBounds.getPixelOffset()*(t?1:-1)}setRowTop(e){if(!this.printLayout&&nW(e)){let t=this.applyPaginationOffset(e),n=`${this.rowNode.isRowPinned()||this.rowNode.sticky?t:this.beans.rowContainerHeight.getRealPixelPosition(t)}px`;this.setRowTopStyle(n)}}getInitialRowTop(e){return this.suppressRowTransform?this.getInitialRowTopShared(e):void 0}getInitialTransform(e){return this.suppressRowTransform?void 0:`translateY(${this.getInitialRowTopShared(e)})`}getInitialRowTopShared(e){if(this.printLayout)return``;let t=this.rowNode,n;if(t.sticky)n=t.stickyRowTop;else{let r=this.slideInAnimation[e]?this.roundRowTopToBounds(t.oldRowTop):t.rowTop,i=this.applyPaginationOffset(r);n=t.isRowPinned()?i:this.beans.rowContainerHeight.getRealPixelPosition(i)}return n+`px`}setRowTopStyle(e){for(let t of this.allRowGuis)this.suppressRowTransform?t.rowComp.setTop(e):t.rowComp.setTransform(`translateY(${e})`)}getCellCtrl(e,t=!1){let n=null;for(let t of this.getAllCellCtrls())t.column==e&&(n=t);if(n!=null||t)return n;for(let t of this.getAllCellCtrls())t?.getColSpanningList().indexOf(e)>=0&&(n=t);return n}onRowIndexChanged(){this.rowNode.rowIndex!=null&&(this.onCellFocusChanged(),this.updateRowIndexes(),this.postProcessCss())}updateRowIndexes(e){let t=this.rowNode.getRowIndexString();if(t===null)return;let n=(this.beans.ctrlsSvc.getHeaderRowContainerCtrl()?.getRowCount()??0)+(this.beans.filterManager?.getHeaderRowCount()??0),r=this.rowNode.rowIndex%2==0,i=this.ariaRowIndex=n+this.rowNode.rowIndex+1;this.forEachGui(e,e=>{e.rowComp.setRowIndex(t),e.rowComp.toggleCss(`ag-row-even`,r),e.rowComp.toggleCss(`ag-row-odd`,!r),DW(e.element,i)})}},yDe=class extends Q{constructor(){super(),this.beanName=`navigation`,this.onPageDown=FG(this.onPageDown,100),this.onPageUp=FG(this.onPageUp,100)}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCon=e.gridBodyCtrl})}handlePageScrollingKey(e,t=!1){let n=e.key,r=e.altKey,i=e.ctrlKey||e.metaKey,a=!!this.beans.rangeSvc&&e.shiftKey,o=GSe(this.gos,e),s=!1;switch(n){case $.PAGE_HOME:case $.PAGE_END:!i&&!r&&(this.onHomeOrEndKey(n),s=!0);break;case $.LEFT:case $.RIGHT:case $.UP:case $.DOWN:if(!o)return!1;i&&!r&&!a&&(this.onCtrlUpDownLeftRight(n,o),s=!0);break;case $.PAGE_DOWN:case $.PAGE_UP:!i&&!r&&(s=this.handlePageUpDown(n,o,t))}return s&&e.preventDefault(),s}handlePageUpDown(e,t,n){return n&&(t=this.beans.focusSvc.getFocusedCell()),t?(e===$.PAGE_UP?this.onPageUp(t):this.onPageDown(t),!0):!1}navigateTo({scrollIndex:e,scrollType:t,scrollColumn:n,focusIndex:r,focusColumn:i,isAsync:a,rowPinned:o}){let{scrollFeature:s}=this.gridBodyCon;nW(n)&&!n.isPinned()&&s.ensureColumnVisible(n),nW(e)&&s.ensureIndexVisible(e,t),a||s.ensureIndexVisible(r);let{focusSvc:c}=this.beans;c.setFocusedCell({rowIndex:r,column:i,rowPinned:o,forceBrowserFocus:!0}),this.setRangeToCellIfSupported({rowIndex:r,rowPinned:o,column:i})}onPageDown(e){let t=this.beans,n=YQ(t),r=this.getViewportHeight(),{pageBounds:i,rowModel:a,rowAutoHeight:o}=t,s=i.getPixelOffset(),c=n.top+r,l=a.getRowIndexAtPixel(c+s);o?.active?this.navigateToNextPageWithAutoHeight(e,l):this.navigateToNextPage(e,l)}onPageUp(e){let t=this.beans,n=YQ(t),{pageBounds:r,rowModel:i,rowAutoHeight:a}=t,o=r.getPixelOffset(),s=n.top,c=i.getRowIndexAtPixel(s+o);a?.active?this.navigateToNextPageWithAutoHeight(e,c,!0):this.navigateToNextPage(e,c,!0)}navigateToNextPage(e,t,n=!1){let{pageBounds:r,rowModel:i}=this.beans,a=this.getViewportHeight(),o=r.getFirstRow(),s=r.getLastRow(),c=r.getPixelOffset(),l=i.getRow(e.rowIndex),u=n?l?.rowHeight-a-c:a-c,d=l?.rowTop+u,f=i.getRowIndexAtPixel(d+c);if(f===e.rowIndex){let r=n?-1:1;t=f=e.rowIndex+r}let p;n?(p=`bottom`,f<o&&(f=o),t<o&&(t=o)):(p=`top`,f>s&&(f=s),t>s&&(t=s)),this.isRowTallerThanView(i.getRow(f))&&(t=f,p=`top`),this.navigateTo({scrollIndex:t,scrollType:p,scrollColumn:null,focusIndex:f,focusColumn:e.column})}navigateToNextPageWithAutoHeight(e,t,n=!1){this.navigateTo({scrollIndex:t,scrollType:n?`bottom`:`top`,scrollColumn:null,focusIndex:t,focusColumn:e.column}),setTimeout(()=>{let r=this.getNextFocusIndexForAutoHeight(e,n);this.navigateTo({scrollIndex:t,scrollType:n?`bottom`:`top`,scrollColumn:null,focusIndex:r,focusColumn:e.column,isAsync:!0})},50)}getNextFocusIndexForAutoHeight(e,t=!1){let n=t?-1:1,r=this.getViewportHeight(),{pageBounds:i,rowModel:a}=this.beans,o=i.getLastRow(),s=0,c=e.rowIndex;for(;c>=0&&c<=o;){let e=a.getRow(c);if(e){let t=e.rowHeight??0;if(s+t>r)break;s+=t}c+=n}return Math.max(0,Math.min(c,o))}getViewportHeight(){let e=this.beans,t=YQ(e),n=this.beans.scrollVisibleSvc.getScrollbarWidth(),r=t.bottom-t.top;return e.ctrlsSvc.get(`center`).isHorizontalScrollShowing()&&(r-=n),r}isRowTallerThanView(e){if(!e)return!1;let t=e.rowHeight;return typeof t==`number`&&t>this.getViewportHeight()}onCtrlUpDownLeftRight(e,t){let n=this.beans.cellNavigation.getNextCellToFocus(e,t,!0);if(!n)return;let{rowIndex:r,rowPinned:i,column:a}=this.getNormalisedPosition(n)??n,o=a;this.navigateTo({scrollIndex:r,scrollType:null,scrollColumn:o,focusIndex:r,focusColumn:o,rowPinned:i})}onHomeOrEndKey(e){let t=e===$.PAGE_HOME,{visibleCols:n,pageBounds:r,rowModel:i}=this.beans,a=n.allCols,o=t?r.getFirstRow():r.getLastRow(),s=i.getRow(o);if(!s)return;let c=(t?a:[...a].reverse()).find(e=>!e.isSuppressNavigable(s)&&!wq(e));c&&this.navigateTo({scrollIndex:o,scrollType:null,scrollColumn:c,focusIndex:o,focusColumn:c})}onTabKeyDown(e,t){let n=t.shiftKey,r=this.tabToNextCellCommon(e,n,t),i=this.beans,{ctrlsSvc:a,pageBounds:o,focusSvc:s,gos:c}=i;if(r!==!1){r?t.preventDefault():r===null&&a.get(`gridCtrl`).allowFocusForNextCoreContainer(n);return}if(n){let{rowIndex:n,rowPinned:r}=e.getRowPosition();(r?n===0:n===o.getFirstRow())&&(c.get(`headerHeight`)===0||aY(i)?sY(i,!0,!0):(t.preventDefault(),s.focusPreviousFromFirstCell(t)))}else e instanceof GQ&&e.focusCell(!0),(s.focusOverlay(!1)||sY(i,n))&&t.preventDefault()}tabToNextCell(e,t){let n=this.beans,{focusSvc:r,rowRenderer:i}=n,a=r.getFocusedCell();if(!a)return!1;let o=tY(n,a);return!o&&(o=i.getRowByPosition(a),!o?.isFullWidth())?!1:!!this.tabToNextCellCommon(o,e,t,`api`)}tabToNextCellCommon(e,t,n,r=`ui`){let{editSvc:i,focusSvc:a}=this.beans,o,s=e instanceof GQ?e:e.getAllCellCtrls()?.[0];return o=i?.isEditing()?i?.moveToNextCell(s,t,n,r):this.moveToNextCellNotEditing(e,t,n),o===null?o:o||!!a.focusedHeader}moveToNextCellNotEditing(e,t,n){let r=this.beans.visibleCols.allCols,i;if(e instanceof JQ){if(i={...e.getRowPosition(),column:t?r[0]:XU(r)},this.gos.get(`embedFullWidthRows`)&&n){let t=e.findFullWidthInfoForEvent(n);t&&(i.column=t.column)}}else i=e.getFocusedCellPosition();let a=this.findNextCellToFocusOn(i,{backwards:t,startEditing:!1});if(a===!1)return null;if(a instanceof GQ)a.focusCell(!0);else if(a)return this.tryToFocusFullWidthRow(a,t);return nW(a)}findNextCellToFocusOn(e,{backwards:t,startEditing:n,skipToNextEditableCell:r}){let i=e,a=this.beans,{cellNavigation:o,gos:s,focusSvc:c,rowRenderer:l}=a;for(;;){e!==i&&(e=i),t||(i=this.getLastCellOfColSpan(i)),i=o.getNextTabbedCell(i,t);let u=s.getCallback(`tabToNextCell`);if(nW(u)){let r=u({backwards:t,editing:n,previousCellPosition:e,nextCellPosition:i||null});if(r===!0)i=e;else if(r===!1)return!1;else i={rowIndex:r.rowIndex,column:r.column,rowPinned:r.rowPinned}}if(!i)return null;if(i.rowIndex<0){let e=lY(a);return c.focusHeaderPosition({headerPosition:{headerRowIndex:e+i.rowIndex,column:i.column},fromCell:!0}),null}let d=s.get(`editType`)===`fullRow`;if(n&&(!d||r)&&!this.isCellEditable(i))continue;this.ensureCellVisible(i);let f=tY(a,i);if(!f){let e=l.getRowByPosition(i);if(!e||!e.isFullWidth()||n)continue;return{...e.getRowPosition(),column:i?.column}}if(!o.isSuppressNavigable(f.column,f.rowNode))return f.setFocusedCellPosition(i),this.setRangeToCellIfSupported(i),f}}isCellEditable(e){let t=this.lookupRowNodeForCell(e);return t?e.column.isCellEditable(t):!1}lookupRowNodeForCell({rowIndex:e,rowPinned:t}){let{pinnedRowModel:n,rowModel:r}=this.beans;return t===`top`?n?.getPinnedTopRow(e):t===`bottom`?n?.getPinnedBottomRow(e):r.getRow(e)}navigateToNextCell(e,t,n,r){let i=n,a=!1,o=this.beans,{cellNavigation:s,focusSvc:c,gos:l}=o;for(;i&&(i===n||!this.isValidNavigateCell(i));)l.get(`enableRtl`)?t===$.LEFT&&(i=this.getLastCellOfColSpan(i)):t===$.RIGHT&&(i=this.getLastCellOfColSpan(i)),i=s.getNextCellToFocus(t,i),a=rW(i);if(a&&e&&e.key===$.UP&&(i={rowIndex:-1,rowPinned:null,column:n.column}),r){let r=l.getCallback(`navigateToNextCell`);if(nW(r)){let a=r({key:t,previousCellPosition:n,nextCellPosition:i||null,event:e});i=nW(a)?{rowPinned:a.rowPinned,rowIndex:a.rowIndex,column:a.column}:null}}if(!i)return;if(i.rowIndex<0){let t=lY(o);c.focusHeaderPosition({headerPosition:{headerRowIndex:t+i.rowIndex,column:i.column??n.column},event:e||void 0,fromCell:!0});return}let u=this.getNormalisedPosition(i);u?this.focusPosition(u):this.tryToFocusFullWidthRow(i)}getNormalisedPosition(e){if(this.beans.spannedRowRenderer?.getCellByPosition(e))return e;this.ensureCellVisible(e);let t=tY(this.beans,e);return t?(e=t.getFocusedCellPosition(),this.ensureCellVisible(e),e):null}tryToFocusFullWidthRow(e,t){let{visibleCols:n,rowRenderer:r,focusSvc:i,eventSvc:a}=this.beans,o=n.allCols;if(!r.getRowByPosition(e)?.isFullWidth())return!1;let s=i.getFocusedCell(),c={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column||(t?XU(o):o[0])};this.focusPosition(c);let l=t??(s!=null&&fxe(c,s));return a.dispatchEvent({type:`fullWidthRowFocused`,rowIndex:c.rowIndex,rowPinned:c.rowPinned,column:c.column,isFullWidthCell:!0,fromBelow:l}),!0}focusPosition(e){let{focusSvc:t}=this.beans;t.setFocusedCell({rowIndex:e.rowIndex,column:e.column,rowPinned:e.rowPinned,forceBrowserFocus:!0}),this.setRangeToCellIfSupported(e)}setRangeToCellIfSupported(e){wq(e.column)||this.beans.rangeSvc?.setRangeToCell(e)}isValidNavigateCell(e){return!!eY(this.beans,e)}getLastCellOfColSpan(e){let t=tY(this.beans,e);if(!t)return e;let n=t.getColSpanningList();return n.length===1?e:{rowIndex:e.rowIndex,column:XU(n),rowPinned:e.rowPinned}}ensureCellVisible(e){let t=MK(this.gos),n=this.beans.rowModel.getRow(e.rowIndex),r=t&&n?.sticky,{scrollFeature:i}=this.gridBodyCon;!r&&rW(e.rowPinned)&&i.ensureIndexVisible(e.rowIndex),e.column.isPinned()||i.ensureColumnVisible(e.column)}ensureColumnVisible(e){let t=this.gridBodyCon.scrollFeature;e.isPinned()||t.ensureColumnVisible(e)}ensureRowVisible(e){this.gridBodyCon.scrollFeature.ensureIndexVisible(e)}};function YQ(e){return e.ctrlsSvc.getScrollFeature().getVScrollPosition()}var bDe={moduleName:`KeyboardNavigation`,version:aK,beans:[yDe,LEe,ZTe],apiFunctions:{getFocusedCell:REe,clearFocusedCell:zEe,setFocusedCell:BEe,setFocusedHeader:UEe,tabToNextCell:VEe,tabToPreviousCell:HEe}},xDe=class extends Q{constructor(){super(...arguments),this.beanName=`pageBoundsListener`}postConstruct(){this.addManagedEventListeners({modelUpdated:this.onModelUpdated.bind(this),recalculateRowBounds:this.calculatePages.bind(this)}),this.onModelUpdated()}onModelUpdated(e){this.calculatePages(),this.eventSvc.dispatchEvent({type:`paginationChanged`,animate:e?.animate??!1,newData:e?.newData??!1,newPage:e?.newPage??!1,newPageSize:e?.newPageSize??!1,keepRenderedRows:e?.keepRenderedRows??!1})}calculatePages(){let{pageBounds:e,pagination:t,rowModel:n}=this.beans;t?t.calculatePages():e.calculateBounds(0,n.getRowCount()-1)}},SDe=class extends Q{constructor(){super(...arguments),this.beanName=`pageBounds`,this.pixelOffset=0}getFirstRow(){return this.topRowBounds?.rowIndex??-1}getLastRow(){return this.bottomRowBounds?.rowIndex??-1}getCurrentPageHeight(){let{topRowBounds:e,bottomRowBounds:t}=this;return!e||!t?0:Math.max(t.rowTop+t.rowHeight-e.rowTop,0)}getCurrentPagePixelRange(){let{topRowBounds:e,bottomRowBounds:t}=this;return{pageFirstPixel:e?.rowTop??0,pageLastPixel:t?t.rowTop+t.rowHeight:0}}calculateBounds(e,t){let{rowModel:n}=this.beans,r=n.getRowBounds(e);r&&(r.rowIndex=e),this.topRowBounds=r;let i=n.getRowBounds(t);i&&(i.rowIndex=t),this.bottomRowBounds=i,this.calculatePixelOffset()}getPixelOffset(){return this.pixelOffset}calculatePixelOffset(){let e=this.topRowBounds?.rowTop??0;this.pixelOffset!==e&&(this.pixelOffset=e,this.eventSvc.dispatchEvent({type:`paginationPixelOffsetChanged`}))}},CDe=`.ag-pinned-left-floating-bottom,.ag-pinned-left-floating-top,.ag-pinned-right-floating-bottom,.ag-pinned-right-floating-top{min-width:0;overflow:hidden;position:relative}.ag-pinned-left-sticky-top,.ag-pinned-right-sticky-top{height:100%;overflow:hidden;position:relative}.ag-sticky-bottom-full-width-container,.ag-sticky-top-full-width-container{height:100%;overflow:hidden;width:100%}.ag-pinned-left-header,.ag-pinned-right-header{display:inline-block;height:100%;overflow:hidden;position:relative}.ag-body-horizontal-scroll:not(.ag-scrollbar-invisible){.ag-horizontal-left-spacer:not(.ag-scroller-corner){border-right:var(--ag-pinned-column-border)}.ag-horizontal-right-spacer:not(.ag-scroller-corner){border-left:var(--ag-pinned-column-border)}}.ag-pinned-right-header{border-left:var(--ag-pinned-column-border)}.ag-pinned-left-header{border-right:var(--ag-pinned-column-border)}.ag-cell.ag-cell-first-right-pinned:not(.ag-cell-range-left,.ag-cell-range-single-cell,.ag-cell-focus:not(.ag-cell-range-selected):focus-within){border-left:var(--ag-pinned-column-border)}.ag-cell.ag-cell-last-left-pinned:not(.ag-cell-range-right,.ag-cell-range-single-cell,.ag-cell-focus:not(.ag-cell-range-selected):focus-within){border-right:var(--ag-pinned-column-border)}.ag-pinned-left-header .ag-header-cell-resize:after{left:calc(50% - var(--ag-header-column-resize-handle-width))}.ag-pinned-right-header .ag-header-cell-resize:after{left:50%}.ag-pinned-left-header .ag-header-cell-resize{right:-3px}.ag-pinned-right-header .ag-header-cell-resize{left:-3px}`,wDe=class extends Q{constructor(e,t){super(),this.isLeft=e,this.elements=t,this.getWidth=e?()=>this.beans.pinnedCols.leftWidth:()=>this.beans.pinnedCols.rightWidth}postConstruct(){this.addManagedEventListeners({[`${this.isLeft?`left`:`right`}PinnedWidthChanged`]:this.onPinnedWidthChanged.bind(this)})}onPinnedWidthChanged(){let e=this.getWidth(),t=e>0;for(let n of this.elements)n&&(FW(n,t),nG(n,e))}},TDe={moduleName:`PinnedColumn`,version:aK,beans:[class extends Q{constructor(){super(...arguments),this.beanName=`pinnedCols`}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCtrl=e.gridBodyCtrl});let e=this.checkContainerWidths.bind(this);this.addManagedEventListeners({displayedColumnsChanged:e,displayedColumnsWidthChanged:e}),this.addManagedPropertyListener(`domLayout`,e)}checkContainerWidths(){let{gos:e,visibleCols:t,eventSvc:n}=this.beans,r=CK(e,`print`),i=r?0:t.getColsLeftWidth(),a=r?0:t.getDisplayedColumnsRightWidth();i!=this.leftWidth&&(this.leftWidth=i,n.dispatchEvent({type:`leftPinnedWidthChanged`})),a!=this.rightWidth&&(this.rightWidth=a,n.dispatchEvent({type:`rightPinnedWidthChanged`}))}keepPinnedColumnsNarrowerThanViewport(){let e=this.gridBodyCtrl.eBodyViewport,t=VW(e);if(t<=50)return;let n=this.getPinnedColumnsOverflowingViewport(t-50),r=this.gos.getCallback(`processUnpinnedColumns`),{columns:i,hasLockedPinned:a}=n,o=i;(o.length||a)&&(r&&(o=r({columns:o,viewportWidth:t})),o?.length&&(o=o.filter(e=>!wq(e)),this.setColsPinned(o,null,`viewportSizeFeature`)))}createPinnedWidthFeature(e,...t){return new wDe(e,t)}setColsPinned(e,t,n){let{colModel:r,colAnimation:i,visibleCols:a,gos:o}=this.beans;if(!r.cols||!e?.length)return;if(CK(o,`print`)){gK(37);return}i?.start();let s;s=t===!0||t===`left`?`left`:t===`right`?`right`:null;let c=[];for(let t of e){if(!t)continue;let e=r.getCol(t);e&&e.getPinned()!==s&&(this.setColPinned(e,s),c.push(e))}c.length&&(a.refresh(n),WX(this.eventSvc,c,n)),i?.finish()}initCol(e){let{pinned:t,initialPinned:n}=e.colDef;t===void 0?this.setColPinned(e,n):this.setColPinned(e,t)}setColPinned(e,t){e.pinned=t===!0||t===`left`?`left`:t===`right`?`right`:null,e.dispatchStateUpdatedEvent(`pinned`)}setupHeaderPinnedWidth(e){let{scrollVisibleSvc:t}=this.beans;if(e.pinned==null)return;let n=e.pinned===`left`,r=e.pinned===`right`;e.hidden=!0;let i=()=>{let i=n?this.leftWidth:this.rightWidth;if(i==null)return;let a=i==0,o=e.hidden!==a,s=this.gos.get(`enableRtl`),c=t.getScrollbarWidth(),l=t.verticalScrollShowing&&(s&&n||!s&&r)?i+c:i;e.comp.setPinnedContainerWidth(`${l}px`),e.comp.setDisplayed(!a),o&&(e.hidden=a,e.refresh())};e.addManagedEventListeners({leftPinnedWidthChanged:i,rightPinnedWidthChanged:i,scrollVisibilityChanged:i,scrollbarWidthChanged:i})}getHeaderResizeDiff(e,t){if(t.getPinned()){let{leftWidth:t,rightWidth:n}=this,r=VW(this.beans.ctrlsSvc.getGridBodyCtrl().eBodyViewport)-50;if(t+n+e>r){if(r>t+n)e=r-t-n;else return 0}}return e}getPinnedColumnsOverflowingViewport(e){let t=(this.rightWidth??0)+(this.leftWidth??0),n=!1;if(t<e)return{columns:[],hasLockedPinned:n};let{visibleCols:r}=this.beans,i=[...r.leftCols],a=[...r.rightCols],o=0,s=0,c=[],l=t-0-e;for(;(s<i.length||o<a.length)&&l>0;){if(o<a.length){let e=a[o++];if(e.colDef.lockPinned){n=!0;continue}l-=e.getActualWidth(),c.push(e)}if(s<i.length&&l>0){let e=i[s++];if(e.colDef.lockPinned){n=!0;continue}l-=e.getActualWidth(),c.push(e)}}return{columns:c,hasLockedPinned:n}}}],css:[CDe]},EDe=class extends AG{constructor(){super(),this.beanName=`ariaAnnounce`,this.descriptionContainer=null,this.pendingAnnouncements=new Map,this.lastAnnouncement=``,this.updateAnnouncement=PG(this,this.updateAnnouncement.bind(this),200)}postConstruct(){let e=this.beans,t=fW(e),n=this.descriptionContainer=t.createElement(`div`);n.classList.add(`ag-aria-description-container`),CW(n,`polite`),Sve(n,`additions text`),xve(n,!0),e.eRootDiv.appendChild(n)}announceValue(e,t){this.pendingAnnouncements.set(t,e),this.updateAnnouncement()}updateAnnouncement(){if(!this.descriptionContainer)return;let e=Array.from(this.pendingAnnouncements.values()).join(`. `);this.pendingAnnouncements.clear(),this.descriptionContainer.textContent=``,setTimeout(()=>{this.handleAnnouncementUpdate(e)},50)}handleAnnouncementUpdate(e){if(!this.isAlive()||!this.descriptionContainer)return;let t=e;if(t==null||t.replace(/[ .]/g,``)==``){this.lastAnnouncement=``;return}this.lastAnnouncement===t&&(t=`${t}\u200B`),this.lastAnnouncement=t,this.descriptionContainer.textContent=t}destroy(){super.destroy();let{descriptionContainer:e}=this;e&&(qW(e),e.remove()),this.descriptionContainer=null,this.pendingAnnouncements.clear()}},DDe={moduleName:`Aria`,version:aK,beans:[class extends EDe{}]},ODe=`:where(.ag-delay-render){.ag-cell,.ag-header-cell,.ag-header-group-cell,.ag-row,.ag-spanned-cell-wrapper{visibility:hidden}}`,XQ=`ag-delay-render`,kDe={moduleName:`ColumnDelayRender`,version:aK,beans:[class extends Q{constructor(){super(...arguments),this.beanName=`colDelayRenderSvc`,this.hideRequested=!1,this.alreadyRevealed=!1,this.timesRetried=0,this.requesters=new Set}hideColumns(e){this.alreadyRevealed||this.requesters.has(e)||(this.requesters.add(e),this.hideRequested||=(this.beans.ctrlsSvc.whenReady(this,e=>{e.gridBodyCtrl.eGridBody.classList.add(XQ)}),!0))}revealColumns(e){if(this.alreadyRevealed||!this.isAlive()||(this.requesters.delete(e),this.requesters.size>0))return;let{renderStatus:t,ctrlsSvc:n}=this.beans;if(t){if(!t.areHeaderCellsRendered()&&this.timesRetried<5){this.timesRetried++,setTimeout(()=>this.revealColumns(e));return}this.timesRetried=0}n.getGridBodyCtrl().eGridBody.classList.remove(XQ),this.alreadyRevealed=!0}}],css:[ODe]},ZQ=class extends Yq{constructor(){super()}},ADe={tag:`div`,cls:`ag-overlay-exporting-center`,children:[{tag:`span`,ref:`eExportingIcon`,cls:`ag-loading-icon`},{tag:`span`,ref:`eExportingText`,cls:`ag-exporting-text`}]},jDe=class extends ZQ{constructor(){super(...arguments),this.eExportingIcon=null,this.eExportingText=null}init(e){let{beans:t}=this;this.setTemplate(ADe);let n=pX(`overlayExporting`,t,null);n&&this.eExportingIcon.appendChild(n);let r=e.exporting?.overlayText??this.getLocaleTextFunc()(`exportingOoo`,`Exporting...`);this.eExportingText.textContent=r,t.ariaAnnounce.announceValue(r,`overlay`)}},MDe={tag:`div`,cls:`ag-overlay-loading-center`,children:[{tag:`span`,ref:`eLoadingIcon`,cls:`ag-loading-icon`},{tag:`span`,ref:`eLoadingText`,cls:`ag-loading-text`}]},NDe=class extends ZQ{constructor(){super(...arguments),this.eLoadingIcon=null,this.eLoadingText=null}init(e){let{beans:t,gos:n}=this,r=tW(n.get(`overlayLoadingTemplate`)?.trim());if(this.setTemplate(r??MDe),!r){let n=pX(`overlayLoading`,t,null);n&&this.eLoadingIcon.appendChild(n);let r=e.loading?.overlayText??this.getLocaleTextFunc()(`loadingOoo`,`Loading...`);this.eLoadingText.textContent=r,t.ariaAnnounce.announceValue(r,`overlay`)}}},PDe={tag:`span`,cls:`ag-overlay-no-matching-rows-center`},FDe=class extends ZQ{init(e){let{beans:t}=this;this.setTemplate(PDe);let n=e.noMatchingRows?.overlayText??this.getLocaleTextFunc()(`noMatchingRows`,`No Matching Rows`);this.getGui().textContent=n,t.ariaAnnounce.announceValue(n,`overlay`)}},IDe={tag:`span`,cls:`ag-overlay-no-rows-center`},LDe=class extends ZQ{init(e){let{beans:t,gos:n}=this,r=tW(n.get(`overlayNoRowsTemplate`)?.trim());if(this.setTemplate(r??IDe),!r){let n=e.noRows?.overlayText??this.getLocaleTextFunc()(`noRowsToShow`,`No Rows To Show`);this.getGui().textContent=n,t.ariaAnnounce.announceValue(n,`overlay`)}}};function RDe(e){e.overlays?.showLoadingOverlay()}function zDe(e){e.overlays?.showNoRowsOverlay()}function BDe(e){e.overlays?.hideOverlay()}var VDe=`.ag-overlay{inset:0;pointer-events:none;position:absolute;z-index:2}.ag-overlay-panel,.ag-overlay-wrapper{display:flex;height:100%;width:100%}.ag-overlay-wrapper{align-items:center;flex:none;justify-content:center;text-align:center}.ag-overlay-exporting-wrapper,.ag-overlay-loading-wrapper,.ag-overlay-modal-wrapper{pointer-events:all}.ag-overlay-exporting-center,.ag-overlay-loading-center{background:var(--ag-background-color);border:solid var(--ag-border-width) var(--ag-border-color);border-radius:var(--ag-border-radius);box-shadow:var(--ag-popup-shadow);display:flex;padding:var(--ag-spacing)}`,HDe={tag:`div`,cls:`ag-overlay`,role:`presentation`,children:[{tag:`div`,cls:`ag-overlay-panel`,role:`presentation`,children:[{tag:`div`,ref:`eOverlayWrapper`,cls:`ag-overlay-wrapper`,role:`presentation`}]}]},QQ=class extends Yq{constructor(){super(HDe),this.eOverlayWrapper=null,this.activeOverlay=null,this.activePromise=null,this.activeCssClass=null,this.elToFocusAfter=null,this.overlayExclusive=!1,this.oldWrapperPadding=null,this.registerCSS(VDe)}handleKeyDown(e){if(e.key!==$.TAB||e.defaultPrevented||SJ(e))return;let{beans:t,eOverlayWrapper:n}=this;if(n&&_J(t,n,!1,e.shiftKey))return;let r=!1;r=e.shiftKey?t.focusSvc.focusGridView({column:XU(t.visibleCols.allCols),backwards:!0,canFocusOverlay:!1}):sY(t,!1),r&&e.preventDefault()}updateLayoutClasses(e,t){let n=this.eOverlayWrapper;if(!n)return;let r=n.classList,{AUTO_HEIGHT:i,NORMAL:a,PRINT:o}=TY;r.toggle(i,t.autoHeight),r.toggle(a,t.normal),r.toggle(o,t.print)}postConstruct(){this.createManagedBean(new EY(this)),this.setDisplayed(!1,{skipAriaHidden:!0}),this.beans.overlays.setWrapperComp(this,!1),this.addManagedElementListeners(this.getFocusableElement(),{keydown:this.handleKeyDown.bind(this)}),this.addManagedEventListeners({gridSizeChanged:this.refreshWrapperPadding.bind(this)})}setWrapperTypeClass(e){let t=this.eOverlayWrapper?.classList;if(!t){this.activeCssClass=null;return}this.activeCssClass&&t.toggle(this.activeCssClass,!1),this.activeCssClass=e,t.toggle(e,!0)}showOverlay(e,t,n){if(this.destroyActiveOverlay(),this.elToFocusAfter=null,this.activePromise=e,this.overlayExclusive=n,!e)return this.refreshWrapperPadding(),Nq.resolve();if(this.setWrapperTypeClass(t),this.setDisplayed(!0,{skipAriaHidden:!0}),this.refreshWrapperPadding(),n&&this.isGridFocused()){let e=dW(this.beans);e&&!pW(this.beans)&&(this.elToFocusAfter=e)}return e.then(t=>{let r=this.eOverlayWrapper;if(!r){this.destroyBean(t);return}if(this.activePromise!==e){this.activeOverlay!==t&&(this.destroyBean(t),t=null);return}this.activePromise=null,t&&(this.activeOverlay!==t&&(r.appendChild(t.getGui()),this.activeOverlay=t),n&&this.isGridFocused()&&gJ(r))}),e}refreshWrapperPadding(){if(!this.eOverlayWrapper){this.oldWrapperPadding=null;return}let e=!!this.activeOverlay||!!this.activePromise,t=0;e&&!this.overlayExclusive&&(t=this.beans.ctrlsSvc.get(`gridHeaderCtrl`)?.headerHeight||0),t!==this.oldWrapperPadding&&(this.oldWrapperPadding=t,this.eOverlayWrapper.style.setProperty(`padding-top`,`${t}px`))}destroyActiveOverlay(){this.activePromise=null;let e=this.activeOverlay;if(!e){this.overlayExclusive=!1,this.elToFocusAfter=null,this.refreshWrapperPadding();return}let t=this.elToFocusAfter;this.elToFocusAfter=null,this.activeOverlay=null,this.overlayExclusive=!1,t&&!this.isGridFocused()&&(t=null),this.destroyBean(e);let n=this.eOverlayWrapper;n&&qW(n),t?.focus?.({preventScroll:!0}),this.refreshWrapperPadding()}hideOverlay(){this.destroyActiveOverlay(),this.setDisplayed(!1,{skipAriaHidden:!0})}isGridFocused(){let e=dW(this.beans);return!!e&&this.beans.eGridDiv.contains(e)}destroy(){this.elToFocusAfter=null,this.destroyActiveOverlay(),this.beans.overlays.setWrapperComp(this,!0),super.destroy(),this.eOverlayWrapper=null}},UDe={selector:`AG-OVERLAY-WRAPPER`,component:QQ},WDe=[`refresh`],$Q=e=>({name:e,optionalMethods:WDe}),e$={id:`agLoadingOverlay`,overlayType:`loading`,comp:$Q(`loadingOverlayComponent`),wrapperCls:`ag-overlay-loading-wrapper`,exclusive:!0,compKey:`loadingOverlayComponent`,paramsKey:`loadingOverlayComponentParams`,isSuppressed:e=>{let t=e.get(`loading`);return t===!1||e.get(`suppressLoadingOverlay`)===!0&&t!==!0}},t$={id:`agNoRowsOverlay`,overlayType:`noRows`,comp:$Q(`noRowsOverlayComponent`),wrapperCls:`ag-overlay-no-rows-wrapper`,compKey:`noRowsOverlayComponent`,paramsKey:`noRowsOverlayComponentParams`,isSuppressed:e=>e.get(`suppressNoRowsOverlay`)},n$={id:`agNoMatchingRowsOverlay`,overlayType:`noMatchingRows`,comp:$Q(`noMatchingRowsOverlayComponent`),wrapperCls:`ag-overlay-no-matching-rows-wrapper`},r$={id:`agExportingOverlay`,overlayType:`exporting`,comp:$Q(`exportingOverlayComponent`),wrapperCls:`ag-overlay-exporting-wrapper`,exclusive:!0},i$={id:`activeOverlay`,comp:$Q(`activeOverlay`),wrapperCls:`ag-overlay-modal-wrapper`,exclusive:!0},GDe=e=>e?{agLoadingOverlay:e$,agNoRowsOverlay:t$,agNoMatchingRowsOverlay:n$,agExportingOverlay:r$}[e]??i$:null,KDe=e=>e?{loading:e$,noRows:t$,noMatchingRows:n$,exporting:r$}[e]:null,qDe={moduleName:`Overlay`,version:aK,userComponents:{agLoadingOverlay:NDe,agNoRowsOverlay:LDe,agNoMatchingRowsOverlay:FDe,agExportingOverlay:jDe},apiFunctions:{showLoadingOverlay:RDe,showNoRowsOverlay:zDe,hideOverlay:BDe},icons:{overlayLoading:`loading`,overlayExporting:`loading`},beans:[class extends Q{constructor(){super(...arguments),this.beanName=`overlays`,this.eWrapper=void 0,this.exclusive=!1,this.oldExclusive=!1,this.currentDef=null,this.showInitialOverlay=!0,this.userForcedNoRows=!1,this.exportsInProgress=0,this.newColumnsLoadedCleanup=null}postConstruct(){let e=this.gos;this.showInitialOverlay=xK(e);let t=()=>{this.userForcedNoRows||this.updateOverlay(!1)},[n,r,i,a]=this.addManagedEventListeners({newColumnsLoaded:t,rowCountReady:()=>{this.disableInitialOverlay(),t(),r()},rowDataUpdated:t,modelUpdated:t});this.newColumnsLoadedCleanup=n,this.addManagedPropertyListeners([`loading`,`activeOverlay`,`activeOverlayParams`,`overlayComponentParams`,`loadingOverlayComponentParams`,`noRowsOverlayComponentParams`],e=>this.onPropChange(new Set(e.changeSet?.properties)))}destroy(){this.doHideOverlay(),super.destroy(),this.eWrapper=void 0}setWrapperComp(e,t){this.isAlive()&&(t?this.eWrapper===e&&(this.eWrapper=void 0):this.eWrapper=e,this.updateOverlay(!1))}isVisible(){return!!this.currentDef}showLoadingOverlay(){this.showInitialOverlay=!1;let e=this.gos;if(!this.eWrapper||e.get(`activeOverlay`)||this.isDisabled(e$))return;let t=e.get(`loading`);(t||t===void 0)&&this.doShowOverlay(e$)}showNoRowsOverlay(){this.showInitialOverlay=!1;let e=this.gos;!this.eWrapper||e.get(`activeOverlay`)||e.get(`loading`)||this.isDisabled(t$)||(this.userForcedNoRows=!0,this.doShowOverlay(t$))}async showExportOverlay(e){let{gos:t,beans:n}=this;if(!this.eWrapper||t.get(`activeOverlay`)||t.get(`loading`)||this.isDisabled(r$)||this.userForcedNoRows&&this.currentDef===t$){e();return}let r=this.getDesiredDefWithOverride(r$);if(!r){e();return}this.exportsInProgress++,this.focusedCell=n.focusSvc.getFocusedCell(),await this.doShowOverlay(r),await new Promise(e=>setTimeout(()=>e()));let i=Date.now();try{e()}finally{let e=Date.now()-i,t=Math.max(0,300-e),r=()=>{this.exportsInProgress--,this.exportsInProgress===0&&(this.updateOverlay(!1),vxe(n,this.focusedCell),this.focusedCell=null)};t>0?setTimeout(()=>r(),t):r()}}hideOverlay(){let e=this.gos;this.showInitialOverlay=!1;let t=this.userForcedNoRows;if(this.userForcedNoRows=!1,e.get(`loading`)){gK(99);return}if(e.get(`activeOverlay`)){gK(296);return}if(this.currentDef===n$){gK(297);return}this.doHideOverlay(),t&&this.getOverlayDef()!==t$&&this.updateOverlay(!1)}getOverlayWrapperSelector(){return UDe}getOverlayWrapperCompClass(){return QQ}onPropChange(e){let t=e.has(`activeOverlay`);if((t||e.has(`loading`))&&this.updateOverlay(t))return;let n=this.currentDef,r=this.eWrapper?.activeOverlay;if(r&&n){let t=e.has(`activeOverlayParams`);if(n===i$)t&&r.refresh?.(this.makeCompParams(!0));else{let t=n.paramsKey;(e.has(`overlayComponentParams`)||t&&e.has(t))&&r.refresh?.(this.makeCompParams(!1,t,n.overlayType))}}}updateOverlay(e){let t=this.eWrapper;if(!t)return this.currentDef=null,!1;let n=this.getDesiredDefWithOverride();return n===this.currentDef?n===i$&&e&&n?(t.hideOverlay(),this.doShowOverlay(n),!0):(n||this.disableInitialOverlay(),!1):n?(this.doShowOverlay(n),!0):(this.disableInitialOverlay(),this.doHideOverlay())}getDesiredDefWithOverride(e){let{gos:t}=this,n=GDe(t.get(`activeOverlay`));return n||(n=e??this.getOverlayDef(),n&&this.isDisabled(n)&&(n=null)),n}getOverlayDef(){let{gos:e,beans:t}=this,{rowModel:n}=t,r=e.get(`loading`);if(r!==void 0){if(this.disableInitialOverlay(),r)return e$}else if(this.showInitialOverlay){if(!this.isDisabled(e$)&&(!e.get(`columnDefs`)||!e.get(`rowData`)))return e$;this.disableInitialOverlay()}else this.disableInitialOverlay();return KDe(n.getOverlayType())}disableInitialOverlay(){this.showInitialOverlay=!1,this.newColumnsLoadedCleanup?.(),this.newColumnsLoadedCleanup=null}doShowOverlay(e){let{gos:t,beans:n}=this,{userCompFactory:r}=n;this.currentDef=e;let i=e!==i$,a=!!e.exclusive;this.exclusive=a;let o;(e.paramsKey&&t.get(e.paramsKey)||e.compKey&&t.get(e.compKey))&&(o=e.paramsKey);let s;i&&(t.get(`overlayComponent`)||t.get(`overlayComponentSelector`))&&(s=r.getCompDetailsFromGridOptions({name:`overlayComponent`,optionalMethods:[`refresh`]},void 0,this.makeCompParams(!1,e.paramsKey,e.overlayType))),s??=r.getCompDetailsFromGridOptions(e.comp,i?e.id:void 0,this.makeCompParams(!i,o,e.overlayType),!1);let c=s?.newAgStackInstance()??null,l=this.eWrapper?this.eWrapper.showOverlay(c,e.wrapperCls,a):Nq.resolve();return this.eWrapper?.refreshWrapperPadding(),this.setExclusive(a),l}makeCompParams(e,t,n){let{gos:r}=this;return eq(r,(e?r.get(`activeOverlayParams`):{...r.get(`overlayComponentParams`),...t&&r.get(t)||null,overlayType:n})??{})}doHideOverlay(){let e=!1;this.currentDef&&(this.currentDef=null,e=!0),this.exclusive=!1;let t=this.eWrapper;return t&&(t.hideOverlay(),t.refreshWrapperPadding(),this.setExclusive(!1)),e}setExclusive(e){this.oldExclusive!==e&&(this.oldExclusive=e,this.eventSvc.dispatchEvent({type:`overlayExclusiveChanged`}))}isDisabled(e){let{gos:t}=this;return e.overlayType&&t.get(`suppressOverlays`)?.includes(e.overlayType)||e.isSuppressed?.(t)===!0}}]},JDe=class extends Q{constructor(){super(...arguments),this.beanName=`rowContainerHeight`,this.scrollY=0,this.uiBodyHeight=0}postConstruct(){this.addManagedEventListeners({bodyHeightChanged:this.updateOffset.bind(this)}),this.maxDivHeight=Lbe(),WG(this.gos,`RowContainerHeightService - maxDivHeight = `+this.maxDivHeight)}updateOffset(){if(!this.stretching)return;let e=this.beans.ctrlsSvc.getScrollFeature().getVScrollPosition().top,t=this.getUiBodyHeight();(e!==this.scrollY||t!==this.uiBodyHeight)&&(this.scrollY=e,this.uiBodyHeight=t,this.calculateOffset())}calculateOffset(){this.setUiContainerHeight(this.maxDivHeight),this.pixelsToShave=this.modelHeight-this.uiContainerHeight,this.maxScrollY=this.uiContainerHeight-this.uiBodyHeight;let e=this.scrollY/this.maxScrollY,t=e*this.pixelsToShave;WG(this.gos,`RowContainerHeightService - Div Stretch Offset = ${t} (${this.pixelsToShave} * ${e})`),this.setDivStretchOffset(t)}setUiContainerHeight(e){e!==this.uiContainerHeight&&(this.uiContainerHeight=e,this.eventSvc.dispatchEvent({type:`rowContainerHeightChanged`}))}clearOffset(){this.setUiContainerHeight(this.modelHeight),this.pixelsToShave=0,this.setDivStretchOffset(0)}setDivStretchOffset(e){let t=typeof e==`number`?Math.floor(e):null;this.divStretchOffset!==t&&(this.divStretchOffset=t,this.eventSvc.dispatchEvent({type:`heightScaleChanged`}))}setModelHeight(e){this.modelHeight=e,this.stretching=e!=null&&this.maxDivHeight>0&&e>this.maxDivHeight,this.stretching?this.calculateOffset():this.clearOffset()}getRealPixelPosition(e){return e-this.divStretchOffset}getUiBodyHeight(){let e=this.beans.ctrlsSvc.getScrollFeature().getVScrollPosition();return e.bottom-e.top}getScrollPositionForPixel(e){if(this.pixelsToShave<=0)return e;let t=e/(this.modelHeight-this.getUiBodyHeight());return this.maxScrollY*t}},YDe=400,XDe=class extends Q{constructor(){super(...arguments),this.beanName=`rowRenderer`,this.destroyFuncsForColumnListeners=[],this.rowCtrlsByRowIndex={},this.zombieRowCtrls={},this.allRowCtrls=[],this.topRowCtrls=[],this.bottomRowCtrls=[],this.refreshInProgress=!1,this.dataFirstRenderedFired=!1,this.setupRangeSelectionListeners=()=>{let e=()=>{for(let e of this.getAllCellCtrls())e.onCellSelectionChanged()},t=()=>{for(let e of this.getAllCellCtrls())e.updateRangeBordersIfRangeCount()},n=()=>{this.eventSvc.addListener(`cellSelectionChanged`,e),this.eventSvc.addListener(`columnMoved`,t),this.eventSvc.addListener(`columnPinned`,t),this.eventSvc.addListener(`columnVisible`,t)},r=()=>{this.eventSvc.removeListener(`cellSelectionChanged`,e),this.eventSvc.removeListener(`columnMoved`,t),this.eventSvc.removeListener(`columnPinned`,t),this.eventSvc.removeListener(`columnVisible`,t)};this.addDestroyFunc(()=>r()),this.addManagedPropertyListeners([`enableRangeSelection`,`cellSelection`],()=>{UK(this.gos)?n():r()}),UK(this.gos)&&n()}}wireBeans(e){this.pageBounds=e.pageBounds,this.colModel=e.colModel,this.pinnedRowModel=e.pinnedRowModel,this.rowModel=e.rowModel,this.focusSvc=e.focusSvc,this.rowContainerHeight=e.rowContainerHeight,this.ctrlsSvc=e.ctrlsSvc,this.editSvc=e.editSvc}postConstruct(){this.ctrlsSvc.whenReady(this,e=>{this.gridBodyCtrl=e.gridBodyCtrl,this.initialise()})}initialise(){this.addManagedEventListeners({paginationChanged:this.onPageLoaded.bind(this),pinnedRowDataChanged:this.onPinnedRowDataChanged.bind(this),pinnedRowsChanged:this.onPinnedRowsChanged.bind(this),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),bodyScroll:this.onBodyScroll.bind(this),bodyHeightChanged:this.redraw.bind(this,{})}),this.addManagedPropertyListeners([`domLayout`,`embedFullWidthRows`],()=>this.onDomLayoutChanged()),this.addManagedPropertyListeners([`suppressMaxRenderedRowRestriction`,`rowBuffer`],()=>this.redraw()),this.addManagedPropertyListener(`suppressCellFocus`,e=>this.onSuppressCellFocusChanged(e.currentValue)),this.addManagedPropertyListeners([`groupSuppressBlankHeader`,`getBusinessKeyForNode`,`fullWidthCellRenderer`,`fullWidthCellRendererParams`,`suppressStickyTotalRow`,`groupRowRenderer`,`groupRowRendererParams`,`loadingCellRenderer`,`loadingCellRendererParams`,`detailCellRenderer`,`detailCellRendererParams`,`enableRangeSelection`,`enableCellTextSelection`],()=>this.redrawRows()),this.addManagedPropertyListener(`cellSelection`,({currentValue:e,previousValue:t})=>{(!t&&e||t&&!e)&&this.redrawRows()});let{stickyRowSvc:e,gos:t,showRowGroupCols:n}=this.beans;if(n&&this.addManagedPropertyListener(`showOpenedGroup`,()=>{let e=n.columns;e.length&&this.refreshCells({columns:e,force:!0})}),e)this.stickyRowFeature=e.createStickyRowFeature(this,this.createRowCon.bind(this),this.destroyRowCtrls.bind(this));else{let e=this.gridBodyCtrl;e.setStickyTopHeight(0),e.setStickyBottomHeight(0)}this.registerCellEventListeners(),this.initialiseCache(),this.printLayout=CK(t,`print`),this.embedFullWidthRows=this.printLayout||t.get(`embedFullWidthRows`),this.redrawAfterModelUpdate()}initialiseCache(){if(this.gos.get(`keepDetailRows`)){let e=this.getKeepDetailRowsCount()??3;this.cachedRowCtrls=new ZDe(e)}}getKeepDetailRowsCount(){return this.gos.get(`keepDetailRowsCount`)}getStickyTopRowCtrls(){return this.stickyRowFeature?.stickyTopRowCtrls??[]}getStickyBottomRowCtrls(){return this.stickyRowFeature?.stickyBottomRowCtrls??[]}updateAllRowCtrls(){let e=Object.values(this.rowCtrlsByRowIndex),t=Object.values(this.zombieRowCtrls),n=this.cachedRowCtrls?.getEntries()??[];this.allRowCtrls=t.length>0||n.length>0?[...e,...t,...n]:e}isCellBeingRendered(e,t){let n=this.rowCtrlsByRowIndex[e];return!t||!n?!!n:n.isFullWidth()?!0:!!this.beans.spannedRowRenderer?.getCellByPosition({rowIndex:e,column:t,rowPinned:null})||!!n.getCellCtrl(t)||!n.isRowRendered()}updateCellFocus(e){for(let t of this.getAllCellCtrls())t.onCellFocused(e);for(let t of this.getFullWidthRowCtrls())t.onFullWidthRowFocused(e)}onCellFocusChanged(e){if(e?.rowIndex!=null&&!e.rowPinned){let t=this.beans.colModel.getCol(e.column)??void 0;this.isCellBeingRendered(e.rowIndex,t)||this.redraw()}this.updateCellFocus(e)}onSuppressCellFocusChanged(e){for(let t of this.getAllCellCtrls())t.onSuppressCellFocusChanged(e);for(let t of this.getFullWidthRowCtrls())t.onSuppressCellFocusChanged(e)}registerCellEventListeners(){this.addManagedEventListeners({cellFocused:e=>this.onCellFocusChanged(e),cellFocusCleared:()=>this.updateCellFocus(),flashCells:e=>{let{cellFlashSvc:t}=this.beans;if(t)for(let n of this.getAllCellCtrls())t.onFlashCells(n,e)},columnHoverChanged:()=>{for(let e of this.getAllCellCtrls())e.onColumnHover()},displayedColumnsChanged:()=>{for(let e of this.getAllCellCtrls())e.onDisplayedColumnsChanged()},displayedColumnsWidthChanged:()=>{if(this.printLayout)for(let e of this.getAllCellCtrls())e.onLeftChanged()}}),this.setupRangeSelectionListeners(),this.refreshListenersToColumnsForCellComps(),this.addManagedEventListeners({gridColumnsChanged:this.refreshListenersToColumnsForCellComps.bind(this)}),this.addDestroyFunc(this.removeGridColumnListeners.bind(this))}removeGridColumnListeners(){for(let e of this.destroyFuncsForColumnListeners)e();this.destroyFuncsForColumnListeners.length=0}refreshListenersToColumnsForCellComps(){this.removeGridColumnListeners();let e=this.colModel.getCols();for(let t of e){let e=e=>{for(let n of this.getAllCellCtrls())n.column===t&&e(n)},n=()=>{e(e=>e.onLeftChanged())},r=()=>{e(e=>e.onWidthChanged())},i=()=>{e(e=>e.onFirstRightPinnedChanged())},a=()=>{e(e=>e.onLastLeftPinnedChanged())},o=()=>{e(e=>e.onColDefChanged())};t.__addEventListener(`leftChanged`,n),t.__addEventListener(`widthChanged`,r),t.__addEventListener(`firstRightPinnedChanged`,i),t.__addEventListener(`lastLeftPinnedChanged`,a),t.__addEventListener(`colDefChanged`,o),this.destroyFuncsForColumnListeners.push(()=>{t.__removeEventListener(`leftChanged`,n),t.__removeEventListener(`widthChanged`,r),t.__removeEventListener(`firstRightPinnedChanged`,i),t.__removeEventListener(`lastLeftPinnedChanged`,a),t.__removeEventListener(`colDefChanged`,o)})}}onDomLayoutChanged(){let e=CK(this.gos,`print`),t=e||this.gos.get(`embedFullWidthRows`),n=t!==this.embedFullWidthRows||this.printLayout!==e;this.printLayout=e,this.embedFullWidthRows=t,n&&this.redrawAfterModelUpdate({domLayoutChanged:!0})}datasourceChanged(){this.firstRenderedRow=0,this.lastRenderedRow=-1;let e=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(e)}onPageLoaded(e){let t={recycleRows:e.keepRenderedRows,animate:e.animate,newData:e.newData,newPage:e.newPage,onlyBody:!0};this.redrawAfterModelUpdate(t)}getAllCellsNotSpanningForColumn(e){let t=[];for(let n of this.getAllRowCtrls()){let r=n.getCellCtrl(e,!0)?.eGui;r&&t.push(r)}return t}refreshFloatingRowComps(e=!0){this.refreshFloatingRows(this.topRowCtrls,`top`,e),this.refreshFloatingRows(this.bottomRowCtrls,`bottom`,e)}refreshFloatingRows(e,t,n){let{pinnedRowModel:r,beans:i,printLayout:a}=this,o=Object.fromEntries(e.map(e=>[e.rowNode.id,e]));r?.forEachPinnedRow(t,(s,c)=>{let l=e[c];l&&r.getPinnedRowById(l.rowNode.id,t)===void 0&&(l.destroyFirstPass(),l.destroySecondPass()),s.id in o&&n?(e[c]=o[s.id],delete o[s.id]):e[c]=new JQ(s,i,!1,!1,a)}),e.length=(t===`top`?r?.getPinnedTopRowCount():r?.getPinnedBottomRowCount())??0}onPinnedRowDataChanged(){this.redrawAfterModelUpdate({recycleRows:!0})}onPinnedRowsChanged(){this.redrawAfterModelUpdate({recycleRows:!0})}redrawRow(e,t=!1){if(e.sticky)this.stickyRowFeature?.refreshStickyNode(e);else if(this.cachedRowCtrls?.has(e)){this.cachedRowCtrls.removeRow(e);return}else{let t=t=>{let n=t[e.rowIndex];n&&n.rowNode===e&&(n.destroyFirstPass(),n.destroySecondPass(),t[e.rowIndex]=this.createRowCon(e,!1,!1))};switch(e.rowPinned){case`top`:t(this.topRowCtrls);break;case`bottom`:t(this.bottomRowCtrls);break;default:t(this.rowCtrlsByRowIndex),this.updateAllRowCtrls()}}t||this.dispatchDisplayedRowsChanged(!1)}redrawRows(e){let{editSvc:t}=this.beans;if(t?.isEditing()&&(t.isBatchEditing()?t.cleanupEditors():t.stopEditing(void 0,{source:`api`})),e!=null){for(let t of e??[])this.redrawRow(t,!0);this.dispatchDisplayedRowsChanged(!1);return}this.redrawAfterModelUpdate()}redrawAfterModelUpdate(e={}){this.getLockOnRefresh();let t=this.beans.focusSvc?.getFocusCellToUseAfterRefresh();this.updateContainerHeights(),this.scrollToTopIfNewData(e);let n=!e.domLayoutChanged&&!!e.recycleRows,r=e.animate&&jK(this.gos),i=n?this.getRowsToRecycle():null;n||this.removeAllRowComps(),this.workOutFirstAndLastRowsToRender();let{stickyRowFeature:a,gos:o}=this;if(a){a.checkStickyRows();let e=a.extraTopHeight+a.extraBottomHeight;e&&this.updateContainerHeights(e)}this.recycleRows(i,r),this.gridBodyCtrl.updateRowCount(),e.onlyBody||this.refreshFloatingRowComps(o.get(`enableRowPinning`)?n:void 0),this.dispatchDisplayedRowsChanged(),t!=null&&this.restoreFocusedCell(t),this.releaseLockOnRefresh()}scrollToTopIfNewData(e){let t=e.newData||e.newPage,n=this.gos.get(`suppressScrollOnNewData`);t&&!n&&(this.gridBodyCtrl.scrollFeature.scrollToTop(),this.stickyRowFeature?.resetOffsets())}updateContainerHeights(e=0){let{rowContainerHeight:t}=this;if(this.printLayout){t.setModelHeight(null);return}let n=this.pageBounds.getCurrentPageHeight();n===0&&(n=1),t.setModelHeight(n+e)}getLockOnRefresh(){if(this.refreshInProgress)throw Error(yK(252));this.refreshInProgress=!0,this.beans.frameworkOverrides.getLockOnRefresh?.()}releaseLockOnRefresh(){this.refreshInProgress=!1,this.beans.frameworkOverrides.releaseLockOnRefresh?.()}isRefreshInProgress(){return this.refreshInProgress}restoreFocusedCell(e){if(!e)return;let t=this.beans.focusSvc,n=this.findPositionToFocus(e);if(!n){t.focusHeaderPosition({headerPosition:{headerRowIndex:lY(this.beans)-1,column:e.column}});return}if(e.rowIndex!==n.rowIndex||e.rowPinned!=n.rowPinned){t.setFocusedCell({...n,preventScrollOnBrowserFocus:!0,forceBrowserFocus:!0});return}t.doesRowOrCellHaveBrowserFocus()||this.updateCellFocus(eq(this.gos,{...n,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0,type:`cellFocused`}))}findPositionToFocus(e){let{pagination:t,pageBounds:n}=this.beans,r=e;for(r.rowPinned==null&&t&&n&&!t.isRowInPage(r.rowIndex)&&(r={rowPinned:null,rowIndex:n.getFirstRow()});r;){if(r.rowPinned==null&&n){if(r.rowIndex<n.getFirstRow()){if(r=nY(this.beans,{rowPinned:null,rowIndex:0}),!r)return null}else r.rowIndex>n.getLastRow()&&(r={rowPinned:null,rowIndex:n.getLastRow()})}let t=this.getRowByPosition(r);if(t?.isAlive())return{...t.getRowPosition(),column:e.column};r=nY(this.beans,r)}return null}getAllCellCtrls(){let e=[],t=this.getAllRowCtrls(),n=t.length;for(let r=0;r<n;r++){let n=t[r].getAllCellCtrls(),i=n.length;for(let t=0;t<i;t++)e.push(n[t])}return e}getAllRowCtrls(){let{spannedRowRenderer:e}=this.beans,t=this.getStickyTopRowCtrls(),n=this.getStickyBottomRowCtrls();return[...this.topRowCtrls,...this.bottomRowCtrls,...t,...n,...e?.getCtrls(`top`)??[],...e?.getCtrls(`bottom`)??[],...e?.getCtrls(`center`)??[],...Object.values(this.rowCtrlsByRowIndex)]}addRenderedRowListener(e,t,n){let r=this.rowCtrlsByRowIndex[t];r&&r.addEventListener(e,n)}refreshCells({rowNodes:e,columns:t,force:n,suppressFlash:r}={}){let i={force:n,newData:!1,suppressFlash:r};for(let n of this.getCellCtrls(e,t))n.refreshOrDestroyCell(i);this.refreshFullWidth(e)}refreshRows(e={}){for(let t of this.getRowCtrls(e.rowNodes))t.refreshRow(e);this.refreshFullWidth(e.rowNodes)}getRowCtrlByNode(e){let t=e.rowIndex;if(t==null)return;let n=e.rowPinned;if(n===`top`){let n=this.topRowCtrls[t];return n?.rowNode===e?n:void 0}if(n===`bottom`){let n=this.bottomRowCtrls[t];return n?.rowNode===e?n:void 0}let r=this.rowCtrlsByRowIndex[t];return r?.rowNode===e?r:this.getStickyRowCtrlByNode(e)}getStickyRowCtrlByNode(e){let t=this.stickyRowFeature;if(t){for(let n of t.stickyTopRowCtrls)if(n.rowNode===e)return n;for(let n of t.stickyBottomRowCtrls)if(n.rowNode===e)return n}}refreshRowByNode(e){e&&this.getRowCtrlByNode(e)?.refreshRow()}refreshFullWidth(e){if(!e)return;let t=!1;for(let n of this.getRowCtrls(e))n.isFullWidth()&&(n.refreshFullWidth()||(t=!0,this.redrawRow(n.rowNode,!0)));t&&this.dispatchDisplayedRowsChanged(!1)}getRowCtrls(e){let t=a$(e),n=this.getAllRowCtrls();return!e||!t?n:n.filter(e=>{let n=e.rowNode;return o$(n,t)})}getCellCtrls(e,t){let n;nW(t)&&(n={},t.forEach(e=>{let t=this.colModel.getCol(e);nW(t)&&(n[t.getId()]=!0)}));let r=[];for(let t of this.getRowCtrls(e))for(let e of t.getAllCellCtrls()){let t=e.column.getId();(!n||n[t])&&r.push(e)}return r}destroy(){this.removeAllRowComps(!0),super.destroy()}removeAllRowComps(e=!1){let t=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(t,e),this.stickyRowFeature?.destroyStickyCtrls()}getRowsToRecycle(){let e=[];for(let t of Object.keys(this.rowCtrlsByRowIndex))this.rowCtrlsByRowIndex[t].rowNode.id??e.push(t);this.removeRowCtrls(e);let t={};for(let e of Object.values(this.rowCtrlsByRowIndex)){let n=e.rowNode;t[n.id]=e}return this.rowCtrlsByRowIndex={},t}removeRowCtrls(e,t=!1){for(let n of e){let e=this.rowCtrlsByRowIndex[n];e&&(e.destroyFirstPass(t),e.destroySecondPass()),delete this.rowCtrlsByRowIndex[n]}}onBodyScroll(e){e.direction===`vertical`&&this.redraw({afterScroll:!0})}redraw(e={}){let{focusSvc:t,animationFrameSvc:n}=this.beans,{afterScroll:r}=e,i,a=this.stickyRowFeature;a&&(i=t?.getFocusCellToUseAfterRefresh()||void 0);let o=this.firstRenderedRow,s=this.lastRenderedRow;this.workOutFirstAndLastRowsToRender();let c=!1;if(a){c=a.checkStickyRows();let e=a.extraTopHeight+a.extraBottomHeight;e&&this.updateContainerHeights(e)}let l=this.firstRenderedRow!==o||this.lastRenderedRow!==s;if((!r||c||l)&&(this.getLockOnRefresh(),this.recycleRows(null,!1,r),this.releaseLockOnRefresh(),this.dispatchDisplayedRowsChanged(r&&!c),i!=null)){let e=t?.getFocusCellToUseAfterRefresh();i!=null&&e==null&&(n?.flushAllFrames(),this.restoreFocusedCell(i))}}removeRowCompsNotToDraw(e,t){let n={};for(let t of e)n[t]=!0;let r=Object.keys(this.rowCtrlsByRowIndex).filter(e=>!n[e]);this.removeRowCtrls(r,t)}calculateIndexesToDraw(e){let t=[];for(let e=this.firstRenderedRow;e<=this.lastRenderedRow;e++)t.push(e);let n=this.beans.pagination,r=this.beans.focusSvc?.getFocusedCell()?.rowIndex;r!=null&&(r<this.firstRenderedRow||r>this.lastRenderedRow)&&(!n||n.isRowInPage(r))&&r<this.rowModel.getRowCount()&&t.push(r);let i=e=>{let n=e.rowNode.rowIndex;n!=null&&n!==r&&(n<this.firstRenderedRow||n>this.lastRenderedRow)&&this.doNotUnVirtualiseRow(e)&&t.push(n)};for(let e of Object.values(this.rowCtrlsByRowIndex))i(e);if(e)for(let t of Object.values(e))i(t);t.sort((e,t)=>e-t);let a=[];for(let e=0;e<t.length;e++){let n=t[e],r=this.rowModel.getRow(n);r&&!r.sticky&&a.push(n)}return a}recycleRows(e,t=!1,n=!1){let r=this.calculateIndexesToDraw(e);(this.printLayout||n)&&(t=!1),this.removeRowCompsNotToDraw(r,!t);for(let i of r)this.createOrUpdateRowCtrl(i,e,t,n);if(e){let{animationFrameSvc:r}=this.beans;r?.active&&n&&!this.printLayout?r.addDestroyTask(()=>{this.destroyRowCtrls(e,t),this.updateAllRowCtrls(),this.dispatchDisplayedRowsChanged()}):this.destroyRowCtrls(e,t)}this.updateAllRowCtrls()}dispatchDisplayedRowsChanged(e=!1){this.eventSvc.dispatchEvent({type:`displayedRowsChanged`,afterScroll:e})}onDisplayedColumnsChanged(){let{visibleCols:e}=this.beans,t=e.isPinningLeft(),n=e.isPinningRight();(this.pinningLeft!==t||n!==this.pinningRight)&&(this.pinningLeft=t,this.pinningRight=n,this.embedFullWidthRows&&this.redrawFullWidthEmbeddedRows())}redrawFullWidthEmbeddedRows(){let e=[];for(let t of this.getFullWidthRowCtrls()){let n=t.rowNode.rowIndex;e.push(n.toString())}this.refreshFloatingRowComps(),this.removeRowCtrls(e),this.redraw({afterScroll:!0})}getFullWidthRowCtrls(e){let t=a$(e);return this.getAllRowCtrls().filter(e=>{if(!e.isFullWidth())return!1;let n=e.rowNode;return!(t!=null&&!o$(n,t))})}createOrUpdateRowCtrl(e,t,n,r){let i,a=this.rowCtrlsByRowIndex[e];if(a||(i=this.rowModel.getRow(e),nW(i)&&nW(t)&&t[i.id]&&i.alreadyRendered&&(a=t[i.id],t[i.id]=null)),!a){if(i||=this.rowModel.getRow(e),nW(i))a=this.createRowCon(i,n,r);else return}i&&(i.alreadyRendered=!0),this.rowCtrlsByRowIndex[e]=a}destroyRowCtrls(e,t){let n=[];if(e){for(let r of Object.values(e))if(r){if(this.cachedRowCtrls&&r.isCacheable()){this.cachedRowCtrls.addRow(r);continue}if(r.destroyFirstPass(!t),t){let e=r.instanceId;this.zombieRowCtrls[e]=r,n.push(()=>{r.destroySecondPass(),delete this.zombieRowCtrls[e]})}else r.destroySecondPass()}}t&&(n.push(()=>{this.isAlive()&&(this.updateAllRowCtrls(),this.dispatchDisplayedRowsChanged())}),window.setTimeout(()=>{for(let e of n)e()},YDe))}getRowBuffer(){return this.gos.get(`rowBuffer`)}getRowBufferInPixels(){return this.getRowBuffer()*DK(this.beans)}workOutFirstAndLastRowsToRender(){let{rowContainerHeight:e,pageBounds:t,rowModel:n}=this;e.updateOffset();let r,i;if(!n.isRowsToRender())r=0,i=-1;else if(this.printLayout)this.beans.environment.refreshRowHeightVariable(),r=t.getFirstRow(),i=t.getLastRow();else{let a=this.getRowBufferInPixels(),o=this.ctrlsSvc.getScrollFeature(),s=this.gos.get(`suppressRowVirtualisation`),c=!1,l,u;do{let n=t.getPixelOffset(),{pageFirstPixel:r,pageLastPixel:i}=t.getCurrentPagePixelRange(),d=e.divStretchOffset,f=o.getVScrollPosition(),p=f.top,m=f.bottom;s?(l=r+d,u=i+d):(l=Math.max(p+n-a,r)+d,u=Math.min(m+n+a,i)+d),this.firstVisibleVPixel=Math.max(p+n,r)+d,this.lastVisibleVPixel=Math.min(m+n,i)+d,c=this.ensureAllRowsInRangeHaveHeightsCalculated(l,u)}while(c);let d=n.getRowIndexAtPixel(l),f=n.getRowIndexAtPixel(u),p=t.getFirstRow(),m=t.getLastRow();d<p&&(d=p),f>m&&(f=m),r=d,i=f}let a=CK(this.gos,`normal`),o=this.gos.get(`suppressMaxRenderedRowRestriction`),s=Math.max(this.getRowBuffer(),500);a&&!o&&i-r>s&&(i=r+s);let c=r!==this.firstRenderedRow,l=i!==this.lastRenderedRow;(c||l)&&(this.firstRenderedRow=r,this.lastRenderedRow=i,this.eventSvc.dispatchEvent({type:`viewportChanged`,firstRow:r,lastRow:i}))}dispatchFirstDataRenderedEvent(){this.dataFirstRenderedFired||(this.dataFirstRenderedFired=!0,lG(this.beans,()=>{this.beans.eventSvc.dispatchEvent({type:`firstDataRendered`,firstRow:this.firstRenderedRow,lastRow:this.lastRenderedRow})}))}ensureAllRowsInRangeHaveHeightsCalculated(e,t){let n=this.pinnedRowModel?.ensureRowHeightsValid(),r=this.stickyRowFeature?.ensureRowHeightsValid(),{pageBounds:i,rowModel:a}=this,o=a.ensureRowHeightsValid(e,t,i.getFirstRow(),i.getLastRow());return(o||r)&&this.eventSvc.dispatchEvent({type:`recalculateRowBounds`}),r||o||n?(this.updateContainerHeights(),!0):!1}doNotUnVirtualiseRow(e){let t=e.rowNode,n=this.focusSvc.isRowFocused(t.rowIndex,t.rowPinned),r=this.editSvc?.isEditing(e),i=t.detail;return n||r||i?!!this.isRowPresent(t):!1}isRowPresent(e){return this.rowModel.isRowPresent(e)?this.beans.pagination?.isRowInPage(e.rowIndex)??!0:!1}createRowCon(e,t,n){let r=this.cachedRowCtrls?.getRow(e)??null;if(r)return r;let i=n&&!this.printLayout&&!!this.beans.animationFrameSvc?.active;return new JQ(e,this.beans,t,i,this.printLayout)}getRenderedNodes(){let e=Object.values(this.rowCtrlsByRowIndex).map(e=>e.rowNode),t=this.getStickyTopRowCtrls().map(e=>e.rowNode),n=this.getStickyBottomRowCtrls().map(e=>e.rowNode);return[...t,...e,...n]}getRowByPosition(e){let t,{rowIndex:n}=e;switch(e.rowPinned){case`top`:t=this.topRowCtrls[n];break;case`bottom`:t=this.bottomRowCtrls[n];break;default:t=this.rowCtrlsByRowIndex[n],t||(t=this.getStickyTopRowCtrls().find(e=>e.rowNode.rowIndex===n)||null,t||=this.getStickyBottomRowCtrls().find(e=>e.rowNode.rowIndex===n)||null)}return t}isRangeInRenderedViewport(e,t){if(e==null||t==null)return!1;let n=e>this.lastRenderedRow;return!(t<this.firstRenderedRow)&&!n}},ZDe=class{constructor(e){this.entriesMap={},this.entriesList=[],this.maxCount=e}addRow(e){if(this.entriesMap[e.rowNode.id]=e,this.entriesList.push(e),e.setCached(!0),this.entriesList.length>this.maxCount){let e=this.entriesList[0];e.destroyFirstPass(),e.destroySecondPass(),this.removeFromCache(e)}}getRow(e){if(e?.id==null)return null;let t=this.entriesMap[e.id];return t?(this.removeFromCache(t),t.setCached(!1),t.rowNode==e?t:null):null}has(e){return this.entriesMap[e.id]!=null}removeRow(e){let t=e.id,n=this.entriesMap[t];delete this.entriesMap[t],$U(this.entriesList,n)}removeFromCache(e){let t=e.rowNode.id;delete this.entriesMap[t],$U(this.entriesList,e)}getEntries(){return this.entriesList}};function a$(e){if(!e)return;let t={top:{},bottom:{},normal:{}};for(let n of e){let e=n.id;switch(n.rowPinned){case`top`:t.top[e]=n;break;case`bottom`:t.bottom[e]=n;break;default:t.normal[e]=n}}return t}function o$(e,t){let n=e.id;switch(e.rowPinned){case`top`:return t.top[n]!=null;case`bottom`:return t.bottom[n]!=null;default:return t.normal[n]!=null}}var QDe=class extends Q{constructor(){super(...arguments),this.beanName=`rowNodeSorter`,this.accentedSort=!1,this.primaryColumnsSortGroups=!1,this.pivotActive=!1}postConstruct(){this.firstLeaf=xK(this.gos)?EX:$De,this.addManagedPropertyListeners([`accentedSort`,`autoGroupColumnDef`,`treeData`],this.updateOptions.bind(this));let e=this.updatePivotModeState.bind(this);this.addManagedEventListeners({columnPivotModeChanged:e,columnPivotChanged:e}),this.updateOptions(),e()}updateOptions(){this.accentedSort=!!this.gos.get(`accentedSort`),this.primaryColumnsSortGroups=NK(this.gos)}updatePivotModeState(){this.pivotActive=this.beans.colModel.isPivotActive()}doFullSortInPlace(e,t){return e.sort((e,n)=>this.compareRowNodes(t,e,n))}compareRowNodes(e,t,n){if(t===n)return 0;let r=this.accentedSort;for(let i=0,a=e.length;i<a;++i){let a=e[i],o=a.sort===`desc`,s=this.getValue(t,a.column),c=this.getValue(n,a.column),l,u=this.getComparator(a,t);if(u?l=u(s,c,t,n,o):(a.type===`absolute`&&(s=s$(s),c=s$(c)),l=pve(s,c,r)),l)return a.sort===`asc`?l:-l}return 0}getComparator(e,t){let n=e.column.getColDef(),r=this.getComparatorFromColDef(n,e);if(r)return r;if(!n.showRowGroup)return;let i=!t.group&&n.field;if(!i)return;let a=this.beans.colModel.getColDefCol(i);if(a)return this.getComparatorFromColDef(a.getColDef(),e)}getComparatorFromColDef(e,t){let n=e.comparator;if(n!=null)return typeof n==`object`?n[dq(t.type)]:n}getValue(e,t){let n=this.beans;if(this.primaryColumnsSortGroups){if(e.rowGroupColumn===t)return this.getGroupDataValue(e,t);if(e.group&&t.getColDef().showRowGroup)return}let r=n.valueSvc.getValue(t,e,`data`);if(t.isAllowFormula()){let i=n.formula;if(i?.isFormula(r))return i.resolveValue(t,e)}return r}getGroupDataValue(e,t){if(IK(this.gos,this.pivotActive)){let n=this.firstLeaf(e);return n&&this.beans.valueSvc.getValue(t,n,`data`)}let n=this.beans.showRowGroupCols?.getShowRowGroupCol(t.getId());return n?e.groupData?.[n.getId()]:void 0}},$De=e=>{if(e.data)return e;let t=e.childrenAfterGroup;for(;t?.length;){let e=t[0];if(e.data)return e;t=e.childrenAfterGroup}},s$=e=>{if(!e)return e;if(typeof e==`bigint`)return e<0n?-e:e;let t=Number(e);return isNaN(t)?e:Math.abs(t)};function eOe(e){e.sortSvc?.onSortChanged(`api`)}var c$=(e,t)=>({tag:`span`,ref:`eSort${e}`,cls:`ag-sort-indicator-icon ag-sort-${t} ag-hidden`,attrs:{"aria-hidden":`true`}}),tOe={tag:`span`,cls:`ag-sort-indicator-container`,children:[c$(`Order`,`order`),c$(`Asc`,`ascending-icon`),c$(`Desc`,`descending-icon`),c$(`Mixed`,`mixed-icon`),c$(`AbsoluteAsc`,`absolute-ascending-icon`),c$(`AbsoluteDesc`,`absolute-descending-icon`),c$(`None`,`none-icon`)]},l$=class extends Yq{constructor(e){super(),this.eSortOrder=null,this.eSortAsc=null,this.eSortDesc=null,this.eSortMixed=null,this.eSortNone=null,this.eSortAbsoluteAsc=null,this.eSortAbsoluteDesc=null,e||this.setTemplate(tOe)}attachCustomElements(e,t,n,r,i,a,o){this.eSortOrder=e,this.eSortAsc=t,this.eSortDesc=n,this.eSortMixed=r,this.eSortNone=i,this.eSortAbsoluteAsc=a,this.eSortAbsoluteDesc=o}setupSort(e,t=!1,n){if(this.column=e,this.suppressOrder=t,this.getSortDefOverride=n,this.setupMultiSortIndicator(),!e.isSortable()&&!e.getColDef().showRowGroup)return;this.addInIcon(`sortAscending`,this.eSortAsc,e),this.addInIcon(`sortDescending`,this.eSortDesc,e),this.addInIcon(`sortUnSort`,this.eSortNone,e),this.addInIcon(`sortAbsoluteAscending`,this.eSortAbsoluteAsc,e),this.addInIcon(`sortAbsoluteDescending`,this.eSortAbsoluteDesc,e);let r=this.updateIcons.bind(this),i=this.onSortChanged.bind(this);this.addManagedPropertyListener(`unSortIcon`,r),this.addManagedEventListeners({newColumnsLoaded:r,sortChanged:i,columnRowGroupChanged:i}),this.onSortChanged()}addInIcon(e,t,n){if(t==null)return;let r=pX(e,this.beans,n);r&&t.appendChild(r)}onSortChanged(){this.updateIcons(),this.suppressOrder||this.updateSortOrder()}updateIcons(){let{eSortAsc:e,eSortDesc:t,eSortAbsoluteAsc:n,eSortAbsoluteDesc:r,eSortNone:i,column:a,gos:o,beans:s}=this,c=kye(a,s,this.getSortDefOverride),l=c.isDefaultSortAllowed,u=c.isAbsoluteSortAllowed,{isAbsoluteSort:d,isDefaultSort:f,isAscending:p,isDescending:m,direction:h}=c;e&&FW(e,p&&f&&l,{skipAriaHidden:!0}),t&&FW(t,m&&f&&l,{skipAriaHidden:!0}),i&&FW(i,!(!a.getColDef().unSortIcon&&!o.get(`unSortIcon`))&&!h,{skipAriaHidden:!0}),n&&FW(n,p&&d&&u,{skipAriaHidden:!0}),r&&FW(r,m&&d&&u,{skipAriaHidden:!0})}setupMultiSortIndicator(){let{eSortMixed:e,column:t,gos:n}=this;this.addInIcon(`sortUnSort`,e,t);let r=t.getColDef().showRowGroup;NK(n)&&r&&(this.addManagedEventListeners({sortChanged:this.updateMultiSortIndicator.bind(this),columnRowGroupChanged:this.updateMultiSortIndicator.bind(this)}),this.updateMultiSortIndicator())}updateMultiSortIndicator(){let{eSortMixed:e,beans:t,column:n}=this;e&&FW(e,t.sortSvc.getDisplaySortForColumn(n)?.direction===`mixed`,{skipAriaHidden:!0})}updateSortOrder(){let{eSortOrder:e,column:t,beans:{sortSvc:n}}=this;if(!e)return;let r=n.getColumnsWithSortingOrdered(),i=n.getDisplaySortIndexForColumn(t)??-1,a=r.some(e=>n.getDisplaySortIndexForColumn(e)??!1);FW(e,i>=0&&a,{skipAriaHidden:!0}),i>=0?e.textContent=(i+1).toString():qW(e)}refresh(){this.onSortChanged()}},nOe={selector:`AG-SORT-INDICATOR`,component:l$},u$={moduleName:`Sort`,version:aK,beans:[class extends Q{constructor(){super(...arguments),this.beanName=`sortSvc`}progressSort(e,t,n){let r=this.getNextSortDirection(e);this.setSortForColumn(e,r,t,n)}progressSortFromEvent(e,t){let n=this.gos.get(`multiSortKey`)===`ctrl`?t.ctrlKey||t.metaKey:t.shiftKey;this.progressSort(e,n,`uiColumnSorted`)}setSortForColumn(e,t,n,r){let{gos:i,showRowGroupCols:a}=this.beans,o=NK(i),s=[e];if(o&&e.getColDef().showRowGroup){let t=(a?.getSourceColumnsForGroupColumn?.(e))?.filter(e=>e.isSortable());t&&(s=[e,...t])}for(let e of s)this.setColSort(e,t,r);let c=(n||i.get(`alwaysMultiSort`))&&!i.get(`suppressMultiSort`),l=[];if(!c){let e=this.clearSortBarTheseColumns(s,r);l.push(...e)}this.updateSortIndex(e),l.push(...s),this.dispatchSortChangedEvents(r,l)}updateSortIndex(e){let{gos:t,colModel:n,showRowGroupCols:r}=this.beans,i=NK(t),a=r?.getShowRowGroupCol(e.getId()),o=i&&a||e,s=this.getColumnsWithSortingOrdered();n.forAllCols(e=>this.setColSortIndex(e,null));let c=s.filter(e=>i&&e.getColDef().showRowGroup?!1:e!==o);(o.getSortDef()?[...c,o]:c).forEach((e,t)=>this.setColSortIndex(e,t))}onSortChanged(e,t){this.dispatchSortChangedEvents(e,t)}isSortActive(){let e=!1;return this.beans.colModel.forAllCols(t=>{if(t.getSortDef())return e=!0,!0}),e}dispatchSortChangedEvents(e,t){let n={type:`sortChanged`,source:e};t&&(n.columns=t),this.eventSvc.dispatchEvent(n)}clearSortBarTheseColumns(e,t){let n=[];return this.beans.colModel.forAllCols(r=>{e.includes(r)||(r.getSortDef()&&n.push(r),this.setColSort(r,void 0,t))}),n}getNextSortDirection(e,t){let n=e.getSortingOrder(),r=t===void 0?e.getSortDef():aq(t),i=n.findIndex(e=>lq(e,r))+1;return i>=n.length&&(i=0),aq(n[i])}getIndexedSortMap(){let{gos:e,colModel:t,showRowGroupCols:n,rowGroupColsSvc:r}=this.beans,i=[];if(t.forAllCols(e=>{e.getSortDef()&&i.push(e)}),t.isPivotMode()){let t=NK(e);i=i.filter(e=>{let r=!!e.getAggFunc(),i=!e.isPrimary(),a=t?n?.getShowRowGroupCol(e.getId()):e.getColDef().showRowGroup;return r||i||a})}let a=r?.columns.filter(e=>!!e.getSortDef())??[],o={};i.forEach((e,t)=>o[e.getId()]=t),i.sort((e,t)=>{let n=e.getSortIndex(),r=t.getSortIndex();return n!=null&&r!=null?n-r:n==null&&r==null?o[e.getId()]>o[t.getId()]?1:-1:r==null?-1:1});let s=NK(e)&&!!a.length;s&&(i=[...new Set(i.map(e=>n?.getShowRowGroupCol(e.getId())??e))]);let c=new Map;if(i.forEach((e,t)=>c.set(e,t)),s)for(let e of a){let t=n.getShowRowGroupCol(e.getId());c.set(e,c.get(t))}return c}getColumnsWithSortingOrdered(){return[...this.getIndexedSortMap().entries()].sort(([,e],[,t])=>e-t).map(([e])=>e)}collectSortItems(e=!1){let t=[],n=this.getColumnsWithSortingOrdered();for(let r of n){let n=r.getSortDef()?.direction;if(!n)continue;let i={sort:n,type:dq(r.getSortDef()?.type)};e?i.colId=r.getId():i.column=r,t.push(i)}return t}getSortModel(){return this.collectSortItems(!0)}getSortOptions(){return this.collectSortItems()}canColumnDisplayMixedSort(e){let t=NK(this.gos),n=!!e.getColDef().showRowGroup;return t&&n}getDisplaySortForColumn(e){let t=this.beans.showRowGroupCols?.getSourceColumnsForGroupColumn(e);if(!this.canColumnDisplayMixedSort(e)||!t?.length)return e.getSortDef();let n=e.getColDef().field!=null||e.getColDef().valueGetter?[e,...t]:t,r=n[0].getSortDef();return n.every(e=>lq(e.getSortDef(),r))?r:{type:dq(e.getSortDef()?.type),direction:`mixed`}}getDisplaySortIndexForColumn(e){return this.getIndexedSortMap().get(e)}setupHeader(e,t){let n=()=>{let{type:n,direction:r}=aq(t.getSortDef());if(e.toggleCss(`ag-header-cell-sorted-asc`,r===`asc`),e.toggleCss(`ag-header-cell-sorted-desc`,r===`desc`),e.toggleCss(`ag-header-cell-sorted-abs-asc`,n===`absolute`&&r===`asc`),e.toggleCss(`ag-header-cell-sorted-abs-desc`,n===`absolute`&&r===`desc`),e.toggleCss(`ag-header-cell-sorted-none`,!r),t.getColDef().showRowGroup){let n=!(this.beans.showRowGroupCols?.getSourceColumnsForGroupColumn(t))?.every(e=>r==e.getSortDef()?.direction);e.toggleCss(`ag-header-cell-sorted-mixed`,n)}};e.addManagedEventListeners({sortChanged:n,columnPinned:n,columnRowGroupChanged:n,displayedColumnsChanged:n})}initCol(e){let{sortIndex:t,initialSortIndex:n}=e.colDef,r=Oq(e.colDef);r&&e.setSortDef(r,!0),t===void 0?n!==null&&(e.sortIndex=n):t!==null&&(e.sortIndex=t)}updateColSort(e,t,n){t!==void 0&&this.setColSort(e,aq(t),n)}setColSort(e,t,n){lq(e.getSortDef(),t)||(e.setSortDef(aq(t),t===void 0),e.dispatchColEvent(`sortChanged`,n)),e.dispatchStateUpdatedEvent(`sort`)}setColSortIndex(e,t){e.sortIndex=t,e.dispatchStateUpdatedEvent(`sortIndex`)}createSortIndicator(e){return new l$(e)}getSortIndicatorSelector(){return nOe}},QDe],apiFunctions:{onSortChanged:eOe},userComponents:{agSortIndicator:l$},icons:{sortAscending:`asc`,sortDescending:`desc`,sortUnSort:`none`,sortAbsoluteAscending:`aasc`,sortAbsoluteDescending:`adesc`}},rOe=class extends Q{constructor(){super(...arguments),this.beanName=`syncSvc`,this.waitingForColumns=!1}postConstruct(){this.addManagedPropertyListener(`columnDefs`,e=>this.setColumnDefs(e))}start(){this.beans.ctrlsSvc.whenReady(this,()=>{let e=this.gos.get(`columnDefs`);e?this.setColumnsAndData(e):this.waitingForColumns=!0,this.gridReady()})}setColumnsAndData(e){let{colModel:t,rowModel:n}=this.beans;t.setColumnDefs(e??[],`gridInitializing`),n.start()}gridReady(){let{eventSvc:e,gos:t}=this;e.dispatchEvent({type:`gridReady`}),WG(t,`initialised successfully, enterprise = ${t.isModuleRegistered(`EnterpriseCore`)}`)}setColumnDefs(e){let t=this.gos.get(`columnDefs`);if(t){if(this.waitingForColumns){this.waitingForColumns=!1,this.setColumnsAndData(t);return}this.beans.colModel.setColumnDefs(t,Eq(e.source))}}};function iOe(e){e.valueCache?.expire()}function aOe(e,t){let{colKey:n,rowNode:r,useFormatter:i,from:a=`edit`}=t,o=e.colModel.getColDefCol(n)??e.colModel.getCol(n);if(!o)return null;let s=e.valueSvc.getValueForDisplay({column:o,node:r,includeValueFormatted:i,from:a});return i?s.valueFormatted??sW(s.value):s.value}var oOe=`paste`,sOe=class extends Q{constructor(){super(...arguments),this.beanName=`changeDetectionSvc`,this.deferredDepth=0,this.batchedPath=null,this.batchedNodes=null}destroy(){super.destroy(),this.batchedPath=null,this.batchedNodes=null}postConstruct(){this.csrm=jJ(this.beans),this.addManagedEventListeners({cellValueChanged:this.onCellValueChanged.bind(this)})}beginDeferred(){this.deferredDepth++}endDeferred(){if(this.deferredDepth===0||--this.deferredDepth>0)return;let e=this.batchedPath,t=this.batchedNodes;this.batchedPath=null,this.batchedNodes=null,e&&this.csrm?.doAggregate(e);let{rowRenderer:n}=this.beans;if(t)for(let e of t)d$(n,e);if(e){let t=e.getSortedRows();for(let e=0,r=t.length;e<r;++e)d$(n,t[e])}(this.batchedPath||this.batchedNodes)&&(this.deferredDepth=1,this.endDeferred())}onCellValueChanged(e){let{gos:t,rowModel:n,changedPathFactory:r}=this.beans;if(e.source===oOe||t.get(`suppressChangeDetection`)||!n.rootNode)return;let i=e.node.primaryRow;if(this.csrm){let n=this.batchedPath;n||(n=r?.newPath(t.get(`aggregateOnlyChangedColumns`))??null,this.batchedPath=n);let a=i;i.group||((this.batchedNodes??=new Set).add(i),a=i.parent),n?.addCell(a,e.column.getColId())}else(this.batchedNodes??=new Set).add(i);this.deferredDepth===0&&(this.deferredDepth=1,this.endDeferred())}},d$=(e,t)=>{let{sibling:n,pinnedSibling:r}=t;e.refreshRowByNode(t),e.refreshRowByNode(n),e.refreshRowByNode(r),e.refreshRowByNode(n?.pinnedSibling),e.refreshRowByNode(r?.sibling)},cOe=class extends Q{constructor(){super(...arguments),this.beanName=`expressionSvc`,this.cache={}}evaluate(e,t){if(typeof e==`string`)return this.evaluateExpression(e,t);_K(15,{expression:e})}evaluateExpression(e,t){try{return this.createExpressionFunction(e)(t.value,t.context,t.oldValue,t.newValue,t.value,t.node,t.data,t.colDef,t.rowIndex,t.api,t.getValue,t.column,t.columnGroup)}catch(n){return _K(16,{expression:e,params:t,e:n}),null}}createExpressionFunction(e){let t=this.cache;if(t[e])return t[e];let n=this.createFunctionBody(e),r=Function(`x, ctx, oldValue, newValue, value, node, data, colDef, rowIndex, api, getValue, column, columnGroup`,n);return t[e]=r,r}createFunctionBody(e){return e.includes(`return`)?e:`return `+e+`;`}},lOe={moduleName:`ValueCache`,version:aK,beans:[class extends Q{constructor(){super(...arguments),this.beanName=`valueCache`,this.cacheVersion=0}postConstruct(){let e=this.gos;this.active=e.get(`valueCache`),this.neverExpires=e.get(`valueCacheNeverExpires`)}onDataChanged(){this.neverExpires||this.expire()}expire(){this.cacheVersion++}setValue(e,t,n){if(this.active){let r=this.cacheVersion;e.__cacheVersion!==r&&(e.__cacheVersion=r,e.__cacheData={}),e.__cacheData[t]=n}}getValue(e,t){if(this.active&&e.__cacheVersion===this.cacheVersion)return e.__cacheData[t]}}],apiFunctions:{expireValueCache:iOe}},uOe={moduleName:`Expression`,version:aK,beans:[cOe]},dOe={moduleName:`ChangeDetection`,version:aK,beans:[sOe]},fOe={moduleName:`CellApi`,version:aK,apiFunctions:{getCellValue:aOe}},pOe={moduleName:`CommunityCore`,version:aK,beans:[nEe,_Se,Qwe,rbe,JDe,KCe,XTe,CEe,QCe,SDe,xDe,XDe,class extends Q{constructor(){super(...arguments),this.beanName=`valueSvc`,this.initialised=!1,this.isSsrm=!1}wireBeans(e){this.expressionSvc=e.expressionSvc,this.colModel=e.colModel,this.valueCache=e.valueCache,this.dataTypeSvc=e.dataTypeSvc,this.editSvc=e.editSvc,this.formulaDataSvc=e.formulaDataSvc,this.rowGroupColsSvc=e.rowGroupColsSvc}postConstruct(){this.initialised||this.init()}init(){let{gos:e,valueCache:t}=this;this.executeValueGetter=t?this.executeValueGetterWithValueCache.bind(this):this.executeValueGetterWithoutValueCache.bind(this),this.isSsrm=SK(e),this.cellExpressions=e.get(`enableCellExpressions`),this.isTreeData=e.get(`treeData`),this.initialised=!0;let n=e=>this.callColumnCellValueChangedHandler(e);this.eventSvc.addListener(`cellValueChanged`,n,!0),this.addDestroyFunc(()=>this.eventSvc.removeListener(`cellValueChanged`,n,!0)),this.addManagedPropertyListener(`treeData`,e=>this.isTreeData=e.currentValue)}getValueForDisplay(e){let t=this.beans,n=e.column,r=e.node,i=t.showRowGroupColValueSvc,a=!n&&r.group,o=n?.colDef.showRowGroup,s=!this.isTreeData||r.footer;if(i&&s&&(a||o)){let t=i.getGroupValue(r,n,this.displayIgnoresAggData(r));return t==null?{value:null,valueFormatted:null}:{value:t.value,valueFormatted:e.includeValueFormatted?i.formatAndPrefixGroupColValue(t,n,e.exporting):null}}if(!n)return{value:r.key,valueFormatted:null};let c=this.getValue(n,r,e.from,this.displayIgnoresAggData(r)),l=c,u=t.formula;n.isAllowFormula()&&u?.isFormula(c)&&(e.useRawFormula?(c=u.normaliseFormula(c,!0),l=u.resolveValue(n,r)):(c=u.resolveValue(n,r),l=c));let d=e.includeValueFormatted&&!(e.exporting&&n.colDef.useValueFormatterForExport===!1);return{value:c,valueFormatted:d?this.formatValue(n,r,l):null}}getValue(e,t,n,r=!1){if(this.initialised||this.init(),!t)return;let i=e.colDef,a=t.group;if(!a){let t=i.pivotValueColumn;t&&(e=t)}let o=this.editSvc?.getPendingEditValue(t,e,n);if(o!==void 0)return o;let s=this.resolveValue(e,t,r,a);if(s===void 0){if(a){let e=i.showRowGroup;if(typeof e==`string`){let n=this.rowGroupColsSvc?.getColumnIndex(e);if(n!=null&&n>t.level)return null}}return}if(this.cellExpressions&&lW(s)){let n=s.substring(1);s=this.executeValueGetter(n,t.data,e,t)}return s}displayIgnoresAggData(e){return!e.group||e.footer||e.level===-1||!e.sibling||this.gos.get(`groupSuppressBlankHeader`)||e.leafGroup&&this.colModel.isPivotMode()?!1:!!e.expanded}resolveValue(e,t,n,r){let i=e.colDef,a=e.colId,o=!r&&this.formulaDataSvc;if(o&&o.hasDataSource()&&i.allowFormula===!0){let n=o.getFormula({column:e,rowNode:t});if(lW(n))return n}let s=r&&!n?t.aggData:void 0,c=this.isTreeData;if(c&&s?.[a]!==void 0)return s[a];let l=t.data,u=i.field,d=i.valueGetter;if(c){if(d)return this.executeValueGetter(d,l,e,t);if(u&&l)return hZ(l,u,e.isFieldContainsDots())}let f=t.groupData;if(f&&a in f)return f[a];if(s?.[a]!==void 0)return s[a];let p=i.showRowGroup,m=typeof p!=`string`||!r,h=this.isSsrm,g=h&&n&&!!i.aggFunc;if(d&&!g)return m?this.executeValueGetter(d,l,e,t):void 0;if(h&&t.footer&&t.field&&(p===!0||p===t.field))return hZ(l,t.field,e.isFieldContainsDots());if(u&&l&&!g)return m?hZ(l,u,e.isFieldContainsDots()):void 0}parseValue(e,t,n,r){let i=e.getColDef();if(i.allowFormula&&this.beans.formula?.isFormula(n))return n;let a=i.valueParser;if(nW(a)){let o=eq(this.gos,{node:t,data:t?.data,oldValue:r,newValue:n,colDef:i,column:e});return typeof a==`function`?a(o):this.expressionSvc?.evaluate(a,o)}return n}getDeleteValue(e,t){return nW(e.getColDef().valueParser)?this.parseValue(e,t,``,this.getValueForDisplay({column:e,node:t,from:`edit`}).value)??null:null}formatValue(e,t,n,r,i=!0){let{expressionSvc:a}=this.beans,o=null,s,c=e.getColDef();if(r?s=r:i&&(s=c.valueFormatter),s){let r=t?t.data:null,i=eq(this.gos,{value:n,node:t,data:r,colDef:c,column:e});o=typeof s==`function`?s(i):a?a.evaluate(s,i):null}else if(c.refData)return c.refData[n]||``;return o==null&&Array.isArray(n)&&(o=n.join(`, `)),o}setValue(e,t,n,r){let i=t.getColDef();if(!e.data&&this.canCreateRowNodeData(e,i)&&(e.data={}),!this.isSetValueSupported(t,e,n,i))return!1;let a=this.getValue(t,e,`data`),o=eq(this.gos,{node:e,data:e.data,oldValue:a,newValue:n,colDef:i,column:t}),s=!1;if(e.data){let a=this.handleExternalFormulaChange({column:t,eventSource:r,newValue:n,setterParams:o,rowNode:e});if(a!==null)return a;s=this.computeValueChange({column:t,rowNode:e,newValue:n,params:o,rowData:e.data,valueSetter:i.valueSetter,field:i.field})??!0}let c=this.beans.changeDetectionSvc;c?.beginDeferred();try{if(e.group){let i=this.beans.rowGroupingEditValueSvc?.setGroupDataValue(e,t,n,a,r,s||n!==a);if(i!==void 0)return!s&&!i?!1:this.finishValueChange(e,t,o,r,n)}return s?this.finishValueChange(e,t,o,r):!1}finally{c?.endDeferred()}}canCreateRowNodeData(e,t){return!e.group||!(t.groupRowValueSetter!=null||t.groupRowEditable!=null||t.pivotValueColumn)}finishValueChange(e,t,n,r,i){e.resetQuickFilterAggregateText(),this.valueCache?.onDataChanged();let a=i===void 0?this.getValue(t,e,`data`):i;return this.dispatchCellValueChangedEvent(e,n,a,r),e.pinnedSibling&&this.dispatchCellValueChangedEvent(e.pinnedSibling,n,a,r),!0}isSetValueSupported(e,t,n,r){let{field:i,valueSetter:a}=r,o=this.beans.formula,s=e.isAllowFormula()&&o?.isFormula(n),c=!!this.formulaDataSvc?.hasDataSource();return rW(i)&&rW(a)&&!(c&&s)?t.group&&(r.groupRowValueSetter||r.groupRowEditable)?!0:(gK(17),!1):this.dataTypeSvc&&!this.dataTypeSvc.checkType(e,n)?(gK(135),!1):!0}handleExternalFormulaChange(e){let{column:t,rowNode:n,newValue:r,eventSource:i,setterParams:a}=e,o=this.beans.formula,s=this.formulaDataSvc;if(!s?.hasDataSource()||!t.isAllowFormula())return null;let c=o?.isFormula(r),l=s.getFormula({column:t,rowNode:n});if(c){if(l===r)return!1;s.setFormula({column:t,rowNode:n,formula:r});let e=o?.resolveValue(t,n),c=t.getColDef();if(nW(c.valueSetter)||!rW(c.field)){let r={...a,newValue:e};this.computeValueChange({column:t,rowNode:n,newValue:e,params:r,rowData:n.data,valueSetter:c.valueSetter,field:c.field})}return this.finishValueChange(n,t,a,i)}return l!==void 0&&s.setFormula({column:t,rowNode:n,formula:void 0}),null}computeValueChange(e){let{valueSetter:t,params:n,rowData:r,field:i,column:a,newValue:o}=e;return nW(t)?typeof t==`function`?t(n):this.expressionSvc?.evaluate(t,n):!!r&&this.setValueUsingField(r,i,o,a.isFieldContainsDots())}dispatchCellValueChangedEvent(e,t,n,r){this.eventSvc.dispatchEvent({type:`cellValueChanged`,event:null,rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:t.column,colDef:t.colDef,data:e.data,node:e,oldValue:t.oldValue,newValue:n,newRawValue:t.newValue,value:n,source:r})}callColumnCellValueChangedHandler(e){let t=e.colDef.onCellValueChanged;typeof t==`function`&&this.beans.frameworkOverrides.wrapOutgoing(()=>{t(e)})}setValueUsingField(e,t,n,r){if(!t)return!1;let i=!1;if(!r)i=e[t]===n,i||(e[t]=n);else{let r=t.split(`.`),a=e;for(;r.length>0&&a;){let e=r.shift();r.length===0?(i=a[e]===n,i||(a[e]=n)):a=a[e]}}return!i}executeValueGetterWithValueCache(e,t,n,r){let i=n.getColId(),a=this.valueCache.getValue(r,i);if(a!==void 0)return a;let o=this.executeValueGetterWithoutValueCache(e,t,n,r);return this.valueCache.setValue(r,i,o),o}executeValueGetterWithoutValueCache(e,t,n,r){let i=eq(this.gos,{data:t,node:r,column:n,colDef:n.getColDef(),getValue:e=>this.getValueCallback(r,e)}),a;return a=typeof e==`function`?e(i):this.expressionSvc?.evaluate(e,i),a}getValueCallback(e,t){let n=this.colModel.getColDefCol(t);return n?this.getValue(n,e,`data`):null}getKeyForNode(e,t){let n=this.getValue(e,t,`data`),r=e.getColDef().keyCreator,i=n;return r&&(i=r(eq(this.gos,{value:n,colDef:e.getColDef(),column:e,node:t,data:t.data}))),typeof i==`string`||i==null?i:(i=String(i),i===`[object Object]`&&gK(121),i)}},eEe,JTe,tEe,eTe,rOe,Kwe,qwe,PEe],icons:{selectOpen:`small-down`,smallDown:`small-down`,colorPicker:`color-picker`,smallUp:`small-up`,checkboxChecked:`small-up`,checkboxIndeterminate:`checkbox-indeterminate`,checkboxUnchecked:`checkbox-unchecked`,radioButtonOn:`radio-button-on`,radioButtonOff:`radio-button-off`,smallLeft:`small-left`,smallRight:`small-right`},apiFunctions:{getGridId:vSe,destroy:ySe,isDestroyed:bSe,getGridOption:xSe,setGridOption:SSe,updateGridOptions:fX,isModuleRegistered:CSe},dependsOn:[Wwe,CCe,jCe,u$,jEe,qCe,MEe,qDe,dOe,NEe,bDe,TDe,DDe,IEe,Ywe,Gwe,uOe,cwe,kDe]};function f$(e){let{inputValue:t,allSuggestions:n,hideIrrelevant:r,filterByPercentageOfBestMatch:i}=e,a=(n??[]).map((e,n)=>({value:e,relevance:mOe(t,e),idx:n}));if(a.sort((e,t)=>e.relevance-t.relevance),r&&(a=a.filter(e=>e.relevance<Math.max(e.value.length,t.length))),a.length>0&&i&&i>0){let e=a[0].relevance*i;a=a.filter(t=>e-t.relevance<0)}let o=[],s=[];for(let e of a)o.push(e.value),s.push(e.idx);return{values:o,indices:s}}function mOe(e,t){let n=e.length,r=t.length;if(r===0)return n||0;let i=e.toLocaleLowerCase(),a=t.toLocaleLowerCase(),o;e.length<t.length&&(o=a,a=i,i=o,o=t,t=e,e=o);let s=new Uint16Array(r+1),c=new Uint16Array(r+1);for(let e=0;e<=r;e++)s[e]=e;let l=0,u=n/2-10;for(let d=1;d<=n;d++){let n=e[d-1],f=i[d-1];c[0]=d;for(let o=1;o<=r;o++){let r=t[o-1];if(f!==a[o-1]){let e=c[o-1],t=s[o],n=s[o-1],r=e<t?e:t;n<r&&(r=n),c[o]=r+1|0;continue}if(l++,n===r&&l++,d>1&&o>1){let n=e[d-2],r=i[d-2],s=t[o-2];r===a[o-2]&&(l++,n===s&&l++)}d<u&&l++,c[o]=s[o-1]}o=s,s=c,c=o}return s[r]/(l+1)}var p$={AdvancedFilter:1,AiToolkit:1,AllEnterprise:1,BatchEdit:1,CellSelection:1,Clipboard:1,ColumnMenu:1,ColumnsToolPanel:1,ContextMenu:1,ExcelExport:1,FiltersToolPanel:1,Find:1,GridCharts:1,IntegratedCharts:1,GroupFilter:1,MasterDetail:1,Menu:1,MultiFilter:1,NewFiltersToolPanel:1,Pivot:1,RangeSelection:1,RichSelect:1,RowNumbers:1,RowGrouping:1,RowGroupingEdit:1,RowGroupingPanel:1,ServerSideRowModelApi:1,ServerSideRowModel:1,SetFilter:1,SideBar:1,Sparklines:1,StatusBar:1,TreeData:1,ViewportRowModel:1,Formula:1},m$=[`TextFilter`,`NumberFilter`,`BigIntFilter`,`DateFilter`,`SetFilter`,`MultiFilter`,`GroupFilter`,`CustomFilter`],hOe={EditCore:[`TextEditor`,`NumberEditor`,`DateEditor`,`CheckboxEditor`,`LargeTextEditor`,`SelectEditor`,`RichSelect`,`CustomEditor`],CheckboxCellRenderer:[`AllCommunity`],ClientSideRowModelHierarchy:[`RowGrouping`,`Pivot`,`TreeData`],ColumnFilter:m$,ColumnGroupHeaderComp:[`AllCommunity`],ColumnGroup:[`AllCommunity`],ColumnHeaderComp:[`AllCommunity`],ColumnMove:[`AllCommunity`],ColumnResize:[`AllCommunity`],CommunityCore:[`AllCommunity`],CsrmSsrmSharedApi:[`ClientSideRowModelApi`,`ServerSideRowModelApi`],RowModelSharedApi:[`ClientSideRowModelApi`,`ServerSideRowModelApi`],EnterpriseCore:[`AllEnterprise`],FilterCore:[...m$,`QuickFilter`,`ExternalFilter`,`AdvancedFilter`],GroupCellRenderer:[`RowGrouping`,`Pivot`,`TreeData`,`MasterDetail`,`ServerSideRowModel`],KeyboardNavigation:[`AllCommunity`],LoadingCellRenderer:[`ServerSideRowModel`],MenuCore:[`ColumnMenu`,`ContextMenu`],MenuItem:[`ColumnMenu`,`ContextMenu`,`MultiFilter`,`IntegratedCharts`,`ColumnsToolPanel`],Overlay:[`AllCommunity`],PinnedColumn:[`AllCommunity`],SharedAggregation:[`RowGrouping`,`Pivot`,`TreeData`,`ServerSideRowModel`],SharedDragAndDrop:[`AllCommunity`],SharedMasterDetail:[`MasterDetail`,`ServerSideRowModel`],SharedMenu:[...m$,`ColumnMenu`,`ContextMenu`],SharedPivot:[`Pivot`,`ServerSideRowModel`],SharedRowGrouping:[`RowGrouping`,`ServerSideRowModel`],SharedRowSelection:[`RowSelection`,`ServerSideRowModel`],SkeletonCellRenderer:[`ServerSideRowModel`],Sort:[`AllCommunity`],SsrmInfiniteSharedApi:[`InfiniteRowModel`,`ServerSideRowModelApi`],SharedTreeData:[`TreeData`,`ServerSideRowModel`]},gOe={InfiniteRowModel:`infinite`,ClientSideRowModelApi:`clientSide`,ClientSideRowModel:`clientSide`,ServerSideRowModelApi:`serverSide`,ServerSideRowModel:`serverSide`,ViewportRowModel:`viewport`};function _Oe(e,t){let n=[];for(let r of Array.isArray(e)?e:[e]){let e=hOe[r];if(e)for(let r of e){let e=gOe[r];(!e||e===t)&&n.push(r)}else n.push(r)}return n}var h$=()=>`No AG Grid modules are registered! It is recommended to start with all Community features via the AllCommunityModule: 37 38 import { ModuleRegistry, AllCommunityModule } from 'ag-grid-community'; 39 40 ModuleRegistry.registerModules([ AllCommunityModule ]); 41 `,vOe=e=>{let t=e.map(e=>`import { ${g$(e)} } from '${p$[e]?`ag-grid-enterprise`:`ag-grid-community`}';`);return e.some(e=>e===`IntegratedCharts`||e===`Sparklines`)&&t.push(`import { AgChartsEnterpriseModule } from 'ag-charts-enterprise';`),`import { ModuleRegistry } from 'ag-grid-community'; 42${t.join(` 43`)} 44 45ModuleRegistry.registerModules([ ${e.map(e=>g$(e,!0)).join(`, `)} ]); 46 47For more info see: ${uK}/modules/`};function g$(e,t=!1){return t&&(e===`IntegratedCharts`||e===`Sparklines`)?`${e}Module.with(AgChartsEnterpriseModule)`:`${e}Module`}function yOe(e,t){let n=t.filter(e=>e===`IntegratedCharts`||e===`Sparklines`),r=``;return!globalThis?.agCharts&&n.length>0?r=`Unable to use ${e} as either the ag-charts-community or ag-charts-enterprise script needs to be included alongside ag-grid-enterprise. 48`:t.some(e=>p$[e])&&(r+=`Unable to use ${e} as that requires the ag-grid-enterprise script to be included. 49`),r}function _$({moduleName:e,rowModelType:t}){return`To use the ${e}Module you must set the gridOption "rowModelType='${t}'"`}var v$=({reasonOrId:e,moduleName:t,gridScoped:n,gridId:r,rowModelType:i,additionalText:a,isUmd:o})=>{let s=_Oe(t,i),c=typeof e==`string`?e:COe[e];if(o)return yOe(c,s);let l=s.filter(e=>e===`IntegratedCharts`||e===`Sparklines`),u=l.length>0?`${l.map(e=>g$(e)).join()} must be initialised with an AG Charts module. One of 'AgChartsCommunityModule' / 'AgChartsEnterpriseModule'.`:``;return`${`Unable to use ${c} as ${s.length>1?`one of `+s.map(e=>g$(e)).join(`, `):g$(s[0])} is not registered${n?` for gridId: `+r:``}. ${u} Check if you have registered the module: 50`} 51${vOe(s)}`+(a?` 52 53${a}`:``)},y$=e=>`${e} must be initialised with an AG Charts module. One of 'AgChartsCommunityModule' / 'AgChartsEnterpriseModule'. 54 55import { AgChartsEnterpriseModule } from 'ag-charts-enterprise'; 56import { ModuleRegistry } from 'ag-grid-community'; 57import { ${e} } from 'ag-grid-enterprise'; 58 59ModuleRegistry.registerModules([${e}.with(AgChartsEnterpriseModule)]); 60 `,bOe=e=>`AG Grid: Unable to use the Clipboard API (navigator.clipboard.${e}()). The reason why it could not be used has been logged in the previous line. For this reason the grid has defaulted to using a workaround which doesn't perform as well. Either fix why Clipboard API is blocked, OR stop this message from appearing by setting grid property suppressClipboardApi=true (which will default the grid to using the workaround rather than the API.`,xOe={1:()=>"`rowData` must be an array",2:({nodeId:e})=>`Duplicate node id '${e}' detected from getRowId callback, this could cause issues in your grid.`,3:()=>`Calling gridApi.resetRowHeights() makes no sense when using Auto Row Height.`,4:({id:e})=>`Could not find row id=${e}, data item was not found for this id`,5:({data:e})=>[`Could not find data item as object was not found.`,e,` Consider using getRowId to help the Grid find matching row data`],6:()=>`'groupHideOpenParents' only works when specifying specific columns for 'colDef.showRowGroup'`,7:()=>`Pivoting is not supported with aligned grids as it may produce different columns in each grid.`,8:({key:e})=>`Unknown key for navigation ${e}`,9:({variable:e})=>`No value for ${e?.cssName}. This usually means that the grid has been initialised before styles have been loaded. The default value of ${e?.defaultValue} will be used and updated when styles load.`,10:({eventType:e})=>`As of v33, the '${e}' event is deprecated. Use the global 'modelUpdated' event to determine when row children have changed.`,11:()=>`No gridOptions provided to createGrid`,12:({colKey:e})=>[`column `,e,` not found`],13:()=>`Could not find rowIndex, this means tasks are being executed on a rowNode that has been removed from the grid.`,14:({groupPrefix:e})=>`Row IDs cannot start with ${e}, this is a reserved prefix for AG Grid's row grouping feature.`,15:({expression:e})=>[`value should be either a string or a function`,e],16:({expression:e,params:t,e:n})=>[`Processing of the expression failed`,`Expression = `,e,`Params = `,t,`Exception = `,n],17:()=>`you need either field or valueSetter set on colDef for editing to work`,18:()=>`alignedGrids contains an undefined option.`,19:()=>`alignedGrids - No api found on the linked grid.`,20:()=>`You may want to configure via a callback to avoid setup race conditions: 61 "alignedGrids: () => [linkedGrid]"`,21:()=>`pivoting is not supported with aligned grids. You can only use one of these features at a time in a grid.`,22:({key:e})=>`${e} is an initial property and cannot be updated.`,23:()=>"The return of `getRowHeight` cannot be zero. If the intention is to hide rows, use a filter instead.",24:()=>`row height must be a number if not using standard row model`,25:({id:e})=>[`The getRowId callback must return a string. The ID `,e,` is being cast to a string.`],26:({fnName:e,preDestroyLink:t})=>`Grid API function ${e}() cannot be called as the grid has been destroyed. 62 Either clear local references to the grid api, when it is destroyed, or check gridApi.isDestroyed() to avoid calling methods against a destroyed grid. 63 To run logic when the grid is about to be destroyed use the gridPreDestroy event. See: ${t}`,27:({fnName:e,module:t})=>`API function '${e}' not registered to module '${t}'`,28:()=>`setRowCount cannot be used while using row grouping.`,29:()=>`tried to call sizeColumnsToFit() but the grid is coming back with zero width, maybe the grid is not visible yet on the screen?`,30:({toIndex:e})=>[`tried to insert columns in invalid location, toIndex = `,e,`remember that you should not count the moving columns when calculating the new index`],31:()=>`infinite loop in resizeColumnSets`,32:()=>`applyColumnState() - the state attribute should be an array, however an array was not found. Please provide an array of items (one for each col you want to change) for state.`,33:()=>`stateItem.aggFunc must be a string. if using your own aggregation functions, register the functions first before using them in get/set state. This is because it is intended for the column state to be stored and retrieved as simple JSON.`,34:({key:e})=>`the column type '${e}' is a default column type and cannot be overridden.`,35:()=>`Column type definitions 'columnTypes' with a 'type' attribute are not supported because a column type cannot refer to another column type. Only column definitions 'columnDefs' can use the 'type' attribute to refer to a column type.`,36:({t:e})=>`colDef.type '`+e+`' does not correspond to defined gridOptions.columnTypes`,37:()=>`Changing the column pinning status is not allowed with domLayout='print'`,38:({iconName:e})=>`provided icon '${e}' needs to be a string or a function`,39:()=>`Applying column order broke a group where columns should be married together. Applying new order has been discarded.`,40:({e,method:t})=>`${e} 64${bOe(t)}`,41:()=>`Browser did not allow document.execCommand('copy'). Ensure 'api.copySelectedRowsToClipboard() is invoked via a user event, i.e. button click, otherwise the browser will prevent it for security reasons.`,42:()=>`Browser does not support document.execCommand('copy') for clipboard operations`,43:({iconName:e})=>`As of v33, icon '${e}' is deprecated. Use the icon CSS name instead.`,44:()=>`Data type definition hierarchies (via the "extendsDataType" property) cannot contain circular references.`,45:({parentCellDataType:e})=>`The data type definition ${e} does not exist.`,46:()=>`The "baseDataType" property of a data type definition must match that of its parent.`,47:({cellDataType:e})=>`Missing data type definition - "${e}"`,48:({property:e,inferred:t,colId:n})=>`Cell data type is "object"${t?` (inferred)`:``} but no Value ${e} has been provided${n?` for column "${n}"`:``}. Please either provide an object data type definition with a Value ${e}, or set: 65 - "colDef.value${e}"${t&&e===`Parser`?` 66 - "colDef.cellDataType = 'object'"`:``}`,49:({methodName:e})=>`Framework component is missing the method ${e}()`,50:({compName:e})=>`Could not find component ${e}, did you forget to configure this component?`,51:()=>`Export cancelled. Export is not allowed as per your configuration.`,52:()=>"There is no `window` associated with the current `document`",53:()=>`unknown value type during csv conversion`,54:()=>`Could not find document body, it is needed for drag and drop and context menu.`,55:()=>`addRowDropZone - A container target needs to be provided`,56:()=>"addRowDropZone - target already exists in the list of DropZones. Use `removeRowDropZone` before adding it again.",57:()=>`unable to show popup filter, filter instantiation failed`,58:()=>`no values found for select cellEditor`,59:()=>`cannot select pinned rows`,60:()=>`cannot select node until it has finished loading`,61:()=>"since version v32.2.0, rowNode.isFullWidthCell() has been deprecated. Instead check `rowNode.detail` followed by the user provided `isFullWidthRow` grid option.",62:({colId:e})=>`setFilterModel() - no column found for colId: ${e}`,63:({colId:e})=>`setFilterModel() - unable to fully apply model, filtering disabled for colId: ${e}`,64:({colId:e})=>`setFilterModel() - unable to fully apply model, unable to create filter for colId: ${e}`,65:()=>`filter missing setModel method, which is needed for setFilterModel`,66:()=>`filter API missing getModel method, which is needed for getFilterModel`,67:()=>`Filter is missing isFilterActive() method`,68:()=>`Column Filter API methods have been disabled as Advanced Filters are enabled.`,69:({guiFromFilter:e})=>`getGui method from filter returned ${e}; it should be a DOM element.`,70:({newFilter:e})=>`Grid option quickFilterText only supports string inputs, received: ${typeof e}`,71:()=>`debounceMs is ignored when apply button is present`,72:({keys:e})=>[`ignoring FilterOptionDef as it doesn't contain one of `,e],73:()=>`invalid FilterOptionDef supplied as it doesn't contain a 'displayKey'`,74:()=>`no filter options for filter`,75:()=>`Unknown button type specified`,76:({filterModelType:e})=>[`Unexpected type of filter "`,e,`", it looks like the filter was configured with incorrect Filter Options`],77:()=>`Filter model is missing 'conditions'`,78:()=>`Filter Model contains more conditions than "filterParams.maxNumConditions". Additional conditions have been ignored.`,79:()=>`"filterParams.maxNumConditions" must be greater than or equal to zero.`,80:()=>`"filterParams.numAlwaysVisibleConditions" must be greater than or equal to zero.`,81:()=>`"filterParams.numAlwaysVisibleConditions" cannot be greater than "filterParams.maxNumConditions".`,82:({param:e})=>`DateFilter ${e} is not a number`,83:()=>`DateFilter minValidYear should be <= maxValidYear`,84:()=>`DateFilter minValidDate should be <= maxValidDate`,85:()=>`DateFilter should not have both minValidDate and minValidYear parameters set at the same time! minValidYear will be ignored.`,86:()=>`DateFilter should not have both maxValidDate and maxValidYear parameters set at the same time! maxValidYear will be ignored.`,87:()=>`DateFilter parameter minValidDate should always be lower than or equal to parameter maxValidDate.`,88:({index:e})=>`Invalid row index for ensureIndexVisible: ${e}`,89:()=>`A template was provided for Header Group Comp - templates are only supported for Header Comps (not groups)`,90:()=>`datasource is missing getRows method`,91:()=>`Filter is missing method doesFilterPass`,92:()=>`AnimationFrameService called but animation frames are off`,93:()=>"cannot add multiple ranges when `cellSelection.suppressMultiRanges = true`",94:({paginationPageSizeOption:e,pageSizeSet:t,pageSizesSet:n,pageSizeOptions:r})=>`'paginationPageSize=${e}'${t?``:` (default value)`}, but ${e} is not included in${n?``:` the default`} paginationPageSizeSelector=[${r?.join(`, `)}].`,95:({paginationPageSizeOption:e,paginationPageSizeSelector:t})=>`Either set '${t}' to an array that includes ${e} or to 'false' to disable the page size selector.`,96:({id:e,data:t})=>[`Duplicate ID`,e,`found for pinned row with data`,t,"When `getRowId` is defined, it must return unique IDs for all pinned rows. Use the `rowPinned` parameter."],97:({colId:e})=>`cellEditor for column ${e} is missing getGui() method`,98:()=>`popup cellEditor does not work with fullRowEdit - you cannot use them both - either turn off fullRowEdit, or stop using popup editors.`,99:()=>"Since v32, `api.hideOverlay()` does not hide the loading overlay when `loading=true`. Set `loading=false` instead.",101:({propertyName:e,componentName:t,agGridDefaults:n,jsComps:r})=>{let i=[],a=f$({inputValue:t,allSuggestions:[...Object.keys(n??[]).filter(e=>![`agCellEditor`,`agGroupRowRenderer`,`agSortIndicator`].includes(e)),...Object.keys(r??[]).filter(e=>!!r[e])],hideIrrelevant:!0,filterByPercentageOfBestMatch:.8}).values;return i.push(`Could not find '${t}' component. It was configured as "${e}: '${t}'" but it wasn't found in the list of registered components. 67`),a.length>0&&i.push(` Did you mean: [${a.slice(0,3)}]? 68`),i.push(`If using a custom component check it has been registered correctly.`),i},102:()=>`selectAll: 'filtered' only works when gridOptions.rowModelType='clientSide'`,103:()=>"Invalid selection state. When using client-side row model, the state must conform to `string[]`.",104:({value:e,param:t})=>`Numeric value ${e} passed to ${t} param will be interpreted as ${e} seconds. If this is intentional use "${e}s" to silence this warning.`,105:({e})=>[`chart rendering failed`,e],106:()=>`Theming API and Legacy Themes are both used in the same page. A Theming API theme has been provided to the 'theme' grid option, but the file (ag-grid.css) is also included and will cause styling issues. Remove ag-grid.css from the page. See the migration guide: ${uK}/theming-migration/`,107:({key:e,value:t})=>`Invalid value for theme param ${e} - ${t}`,108:({e})=>[`chart update failed`,e],109:({inputValue:e,allSuggestions:t})=>{let n=f$
vendor: 8,596 bytes, lines 68-70
68({inputValue:e,allSuggestions:t,hideIrrelevant:!0,filterByPercentageOfBestMatch:.8}).values;return[`Could not find '${e}' aggregate function. It was configured as "aggFunc: '${e}'" but it wasn't found in the list of registered aggregations.`,n.length>0?` Did you mean: [${n.slice(0,3)}]?`:``,`If using a custom aggregation function check it has been registered correctly.`].join(` 69`)},110:()=>`groupHideOpenParents only works when specifying specific columns for colDef.showRowGroup`,111:()=>"Invalid selection state. When `groupSelects` is enabled, the state must conform to `IServerSideGroupSelectionState`.",113:()=>`Set Filter cannot initialise because you are using a row model that does not contain all rows in the browser. Either use a different filter type, or configure Set Filter such that you provide it with values`,114:({component:e})=>`Could not find component with name of ${e}. Is it in Vue.components?`,116:()=>"Invalid selection state. The state must conform to `IServerSideSelectionState`.",117:()=>`selectAll must be of boolean type.`,118:()=>`Infinite scrolling must be enabled in order to set the row count.`,119:()=>`Unable to instantiate filter`,120:()=>`MultiFloatingFilterComp expects MultiFilter as its parent`,121:()=>`a column you are grouping or pivoting by has objects as values. If you want to group by complex objects then either a) use a colDef.keyCreator (see AG Grid docs) or b) to toString() on the object to return a key`,122:()=>`could not find the document, document is empty`,123:()=>`Advanced Filter is only supported with the Client-Side Row Model or Server-Side Row Model.`,124:()=>`No active charts to update.`,125:({chartId:e})=>`Unable to update chart. No active chart found with ID: ${e}.`,126:()=>`unable to restore chart as no chart model is provided`,127:({allRange:e})=>`unable to create chart as ${e?`there are no columns in the grid`:`no range is selected`}.`,128:({feature:e})=>`${e} is only available if using 'multiRow' selection mode.`,129:({feature:e,rowModel:t})=>`${e} is only available if using 'clientSide' or 'serverSide' rowModelType, you are using ${t}.`,130:()=>`cannot multi select unless selection mode is "multiRow"`,132:()=>"Row selection features are not available unless `rowSelection` is enabled.",133:({iconName:e})=>`icon '${e}' function should return back a string or a dom object`,134:({iconName:e})=>`Did not find icon '${e}'`,135:()=>`Data type of the new value does not match the cell data type of the column`,136:()=>`Unable to update chart as the 'type' is missing. It must be either 'rangeChartUpdate', 'pivotChartUpdate', or 'crossFilterChartUpdate'.`,137:({type:e,currentChartType:t})=>`Unable to update chart as a '${e}' update type is not permitted on a ${t}.`,138:({chartType:e})=>`invalid chart type supplied: ${e}`,139:({customThemeName:e})=>`a custom chart theme with the name ${e} has been supplied but not added to the 'chartThemes' list`,140:({name:e})=>`no stock theme exists with the name '${e}' and no custom chart theme with that name was supplied to 'customChartThemes'`,141:()=>`cross filtering with row grouping is not supported.`,142:()=>`cross filtering is only supported in the client side row model.`,143:({panel:e})=>`'${e}' is not a valid Chart Tool Panel name`,144:({type:e})=>`Invalid charts data panel group name supplied: '${e}'`,145:({group:e})=>`As of v32, only one charts customize panel group can be expanded at a time. '${e}' will not be expanded.`,146:({comp:e})=>`Unable to instantiate component '${e}' as its module hasn't been loaded. Add 'ValidationModule' to see which module is required.`,147:({group:e})=>`Invalid charts customize panel group name supplied: '${e}'`,148:({group:e})=>`invalid chartGroupsDef config '${e}'`,149:({group:e,chartType:t})=>`invalid chartGroupsDef config '${e}.${t}'`,150:()=>`'seriesChartTypes' are required when the 'customCombo' chart type is specified.`,151:({chartType:e})=>`invalid chartType '${e}' supplied in 'seriesChartTypes', converting to 'line' instead.`,152:({colId:e})=>`no 'seriesChartType' found for colId = '${e}', defaulting to 'line'.`,153:({chartDataType:e})=>`unexpected chartDataType value '${e}' supplied, instead use 'category', 'series' or 'excluded'`,154:({colId:e})=>`cross filtering requires a 'agSetColumnFilter' or 'agMultiColumnFilter' to be defined on the column with id: ${e}`,155:({option:e})=>`'${e}' is not a valid Chart Toolbar Option`,156:({panel:e})=>`Invalid panel in chartToolPanelsDef.panels: '${e}'`,157:({unrecognisedGroupIds:e})=>[`unable to find group(s) for supplied groupIds:`,e],158:()=>`can not expand a column item that does not represent a column group header`,159:()=>"Invalid params supplied to createExcelFileForExcel() - `ExcelExportParams.data` is empty.",160:()=>`Export cancelled. Export is not allowed as per your configuration.`,161:()=>`The Excel Exporter is currently on Multi Sheet mode. End that operation by calling 'api.getMultipleSheetAsExcel()' or 'api.exportMultipleSheetsAsExcel()'`,162:({id:e,dataType:t})=>`Unrecognized data type for excel export [${e}.dataType=${t}]`,163:({featureName:e})=>`Excel table export does not work with ${e}. The exported Excel file will not contain any Excel tables. 70 Please turn off ${e} to enable Excel table exports.`,164:()=>`Unable to add data table to Excel sheet: A table already exists.`,165:()=>`Unable to add data table to Excel sheet: Missing required parameters.`,166:({unrecognisedGroupIds:e})=>[`unable to find groups for these supplied groupIds:`,e],167:({unrecognisedColIds:e})=>[`unable to find columns for these supplied colIds:`,e],168:()=>`detailCellRendererParams.template should be function or string`,169:()=>`Reference to eDetailGrid was missing from the details template. Please add data-ref="eDetailGrid" to the template.`,170:({providedStrategy:e})=>`invalid cellRendererParams.refreshStrategy = ${e} supplied, defaulting to refreshStrategy = 'rows'.`,171:()=>`could not find detail grid options for master detail, please set gridOptions.detailCellRendererParams.detailGridOptions`,172:()=>`could not find getDetailRowData for master / detail, please set gridOptions.detailCellRendererParams.getDetailRowData`,173:({group:e})=>`invalid chartGroupsDef config '${e}'`,174:({group:e,chartType:t})=>`invalid chartGroupsDef config '${e}.${t}'`,175:({menuTabName:e,itemsToConsider:t})=>[`Trying to render an invalid menu item '${e}'. Check that your 'menuTabs' contains one of `,t],176:({key:e})=>`unknown menu item type ${e}`,177:()=>`valid values for cellSelection.handle.direction are 'x', 'y' and 'xy'. Default to 'xy'.`,178:({colId:e})=>`column ${e} is not visible`,179:()=>`totalValueGetter should be either a function or a string (expression)`,180:()=>`agRichSelectCellEditor requires cellEditorParams.values to be set`,181:()=>"agRichSelectCellEditor cannot have `multiSelect` and `allowTyping` set to `true`. AllowTyping has been turned off.",182:()=>`you cannot mix groupDisplayType = "multipleColumns" with treeData, only one column can be used to display groups when doing tree data`,183:()=>`Group Column Filter only works on group columns. Please use a different filter.`,184:({parentGroupData:e,childNodeData:t})=>[`duplicate group keys for row data, keys should be unique`,[e,t]],185:({data:e})=>[`getDataPath() should not return an empty path`,[e]],186:({rowId:e,rowData:t,duplicateRowsData:n})=>[`duplicate group keys for row data, keys should be unique`,e,t,...n??[]],187:({rowId:e,firstData:t,secondData:n})=>[`Duplicate node id ${e}. Row IDs are provided via the getRowId() callback. Please modify the getRowId() callback code to provide unique row id values.`,`first instance`,t,`second instance`,n],188:e=>`getRowId callback must be provided for Server Side Row Model ${e?.feature||`selection`} to work correctly.`,189:({startRow:e})=>`invalid value ${e} for startRow, the value should be >= 0`,190:({rowGroupId:e,data:t})=>[`null and undefined values are not allowed for server side row model keys`,e?`column = ${e}`:``,`data is `,t],194:({method:e})=>`calling gridApi.${e}() is only possible when using rowModelType=\`clientSide\`.`,195:({justCurrentPage:e})=>`selecting just ${e?`current page`:`filtered`} only works when gridOptions.rowModelType='clientSide'`,196:({key:e})=>`Provided ids must be of string type. Invalid id provided: ${e}`,197:()=>"`toggledNodes` must be an array of string ids.",199:()=>"getSelectedNodes and getSelectedRows functions cannot be used with select all functionality with the server-side row model. Use `api.getServerSideSelectionState()` instead.",200:v
70$,201:({rowModelType:e})=>`Could not find row model for rowModelType = ${e}`,202:()=>"`getSelectedNodes` and `getSelectedRows` functions cannot be used with `groupSelectsChildren` and the server-side row model. Use `api.getServerSideSelectionState()` instead.",203:()=>`Server Side Row Model does not support Dynamic Row Height and Cache Purging. Either a) remove getRowHeight() callback or b) remove maxBlocksInCache property. Purging has been disabled.`,204:()=>`Server Side Row Model does not support Auto Row Height and Cache Purging. Either a) remove colDef.autoHeight or b) remove maxBlocksInCache property. Purging has been disabled.`,205:({duplicateIdText:e})=>`Unable to display rows as duplicate row ids (${e}) were returned by the getRowId callback. Please modify the getRowId callback to provide unique ids.`,206:()=>`getRowId callback must be implemented for transactions to work. Transaction was ignored.`,207:()=>`The Set Filter Parameter "defaultToNothingSelected" value was ignored because it does not work when "excelMode" is used.`,208:()=>`Set Filter Value Formatter must return string values. Please ensure the Set Filter Value Formatter returns string values for complex objects.`,209:()=>`Set Filter Key Creator is returning null for provided values and provided values are primitives. Please provide complex objects. See ${uK
vendor: 5,006 bytes, lines 70-74
70}/filter-set-filter-list/#filter-value-types`,210:()=>`Set Filter has a Key Creator, but provided values are primitives. Did you mean to provide complex objects?`,211:()=>`property treeList=true for Set Filter params, but you did not provide a treeListPathGetter or values of type Date.`,212:()=>`please review all your toolPanel components, it seems like at least one of them doesn't have an id`,213:()=>`Advanced Filter does not work with Filters Tool Panel. Filters Tool Panel has been disabled.`,214:({key:e})=>`unable to lookup Tool Panel as invalid key supplied: ${e}`,215:({key:e,defaultByKey:t})=>`the key ${e} is not a valid key for specifying a tool panel, valid keys are: ${Object.keys(t??{}).join(`,`)}`,216:({name:e})=>`Missing component for '${e}'`,217:({invalidColIds:e})=>[`unable to find grid columns for the supplied colDef(s):`,e],218:({property:e,defaultOffset:t})=>`${e} must be a number, the value you provided is not a valid number. Using the default of ${t}px.`,219:({property:e})=>`Property ${e} does not exist on the target object.`,220:({lineDash:e})=>`'${e}' is not a valid 'lineDash' option.`,221:()=>`agAggregationComponent should only be used with the client and server side row model.`,222:()=>`agFilteredRowCountComponent should only be used with the client side row model.`,223:()=>`agSelectedRowCountComponent should only be used with the client and server side row model.`,224:()=>`agTotalAndFilteredRowCountComponent should only be used with the client side row model.`,225:()=>`agTotalRowCountComponent should only be used with the client side row model.`,226:()=>`viewport is missing init method.`,227:()=>`menu item icon must be DOM node or string`,228:({menuItemOrString:e})=>`unrecognised menu item ${e}`,230:()=>`detailCellRendererParams.template is not supported by AG Grid React. To change the template, provide a Custom Detail Cell Renderer. See https://www.ag-grid.com/react-data-grid/master-detail-custom-detail/`,231:()=>"As of v32, using custom components with `reactiveCustomComponents = false` is deprecated.",232:()=>`Using both rowData and v-model. rowData will be ignored.`,233:({methodName:e})=>`Framework component is missing the method ${e}()`,234:()=>`Group Column Filter does not work with the colDef property "field". This property will be ignored.`,235:()=>`Group Column Filter does not work with the colDef property "filterValueGetter". This property will be ignored.`,236:()=>`Group Column Filter does not work with the colDef property "filterParams". This property will be ignored.`,237:()=>`Group Column Filter does not work with Tree Data enabled. Please disable Tree Data, or use a different filter.`,238:()=>`setRowCount can only accept a positive row count.`,239:()=>'Theming API and CSS File Themes are both used in the same page. In v33 we released the Theming API as the new default method of styling the grid. See the migration docs https://www.ag-grid.com/react-data-grid/theming-migration/. Because no value was provided to the `theme` grid option it defaulted to themeQuartz. But the file (ag-grid.css) is also included and will cause styling issues. Either pass the string "legacy" to the theme grid option to use v32 style themes, or remove ag-grid.css from the page to use Theming API.',240:({theme:e})=>`theme grid option must be a Theming API theme object or the string "legacy", received: ${e}`,243:()=>`Failed to deserialize state - each provided state object must be an object.`,244:()=>"Failed to deserialize state - `selectAllChildren` must be a boolean value or undefined.",245:()=>"Failed to deserialize state - `toggledNodes` must be an array.",246:()=>"Failed to deserialize state - Every `toggledNode` requires an associated string id.",247:()=>`Row selection state could not be parsed due to invalid data. Ensure all child state has toggledNodes or does not conform with the parent rule. 71Please rebuild the selection state and reapply it.`,248:()=>`SetFloatingFilter expects SetFilter as its parent`,249:()=>`Must supply a Value Formatter in Set Filter params when using a Key Creator`,250:()=>"Must supply a Key Creator in Set Filter params when `treeList = true` on a group column, and Tree Data or Row Grouping is enabled.",251:({chartType:e})=>`AG Grid: Unable to create chart as an invalid chartType = '${e}' was supplied.`,252:()=>`cannot get grid to draw rows when it is in the middle of drawing rows. 72Your code probably called a grid API method while the grid was in the render stage. 73To overcome this, put the API call into a timeout, e.g. instead of api.redrawRows(), call setTimeout(function() { api.redrawRows(); }, 0). 74To see what part of your code that caused the refresh check this stacktrace.`,253:({version:e})=>[`Illegal version string: `,e],254:()=>`Cannot create chart: no chart themes available.`,255:({point:e})=>`Lone surrogate U+${e?.toString(16).toUpperCase()} is not a scalar value`,256:()=>`Unable to initialise. See validation error, or load ValidationModule if missing.`,257:()=>y
vendor: 70,427 bytes, lines 74-77
74$(`IntegratedChartsModule`),258:()=>y$(`SparklinesModule`),259:({part:e})=>`the argument to theme.withPart must be a Theming API part object, received: ${e}`,260:({propName:e,compName:t,gridScoped:n,gridId:r,rowModelType:i})=>v$({reasonOrId:`AG Grid '${e}' component: ${t}`,moduleName:mQ[t],gridId:r,gridScoped:n,rowModelType:i}),261:()=>"As of v33, `column.isHovered()` is deprecated. Use `api.isColumnHovered(column)` instead.",262:()=>`As of v33, icon key "smallDown" is deprecated. Use "advancedFilterBuilderSelect" for Advanced Filter Builder dropdown, "selectOpen" for Select cell editor and dropdowns (e.g. Integrated Charts menu), "richSelectOpen" for Rich Select cell editor.`,263:()=>`As of v33, icon key "smallLeft" is deprecated. Use "panelDelimiterRtl" for Row Group Panel / Pivot Panel, "subMenuOpenRtl" for sub-menus.`,264:()=>`As of v33, icon key "smallRight" is deprecated. Use "panelDelimiter" for Row Group Panel / Pivot Panel, "subMenuOpen" for sub-menus.`,265:({colId:e})=>`Unable to infer chart data type for column '${e}' if first data entry is null. Please specify "chartDataType", or a "cellDataType" in the column definition. For more information, see ${uK}/integrated-charts-range-chart#coldefchartdatatype .`,266:()=>`As of v33.1, using "keyCreator" with the Rich Select Editor has been deprecated. It now requires the "formatValue" callback to convert complex data to strings.`,267:()=>"Detail grids can not use a different theme to the master grid, the `theme` detail grid option will be ignored.",268:()=>`Transactions aren't supported with tree data when using treeDataChildrenField`,269:()=>"When `masterSelects: 'detail'`, detail grids must be configured with multi-row selection",270:({id:e,parentId:t})=>`Cycle detected for row with id='${e}' and parent id='${t}'. Resetting the parent for row with id='${e}' and showing it as a root-level node.`,271:({id:e,parentId:t})=>`Parent row not found for row with id='${e}' and parent id='${t}'. Showing row with id='${e}' as a root-level node.`,272:()=>h$(),273:({providedId:e,usedId:t})=>`Provided column id '${e}' was already in use, ensure all column and group ids are unique. Using '${t}' instead.`,274:({prop:e})=>{let t=`Since v33, ${e} has been deprecated.`;switch(e){case`maxComponentCreationTimeMs`:t+=` This property is no longer required and so will be removed in a future version.`;break;case`setGridApi`:t+=` This method is not called by AG Grid. To access the GridApi see: https://ag-grid.com/react-data-grid/grid-interface/#grid-api `;break;case`children`:t+=` For multiple versions AgGridReact does not support children.`}return t},275:_$,276:()=>"Row Numbers Row Resizer cannot be used when Grid Columns have `autoHeight` enabled.",277:({colId:e})=>`'enableFilterHandlers' is set to true, but column '${e}' does not have 'filter.doesFilterPass' or 'filter.handler' set.`,278:({colId:e})=>`Unable to create filter handler for column '${e}'`,279:e=>{},280:({colId:e})=>`'name' must be provided for custom filter components for column '${e}`,281:({colId:e})=>`Filter for column '${e}' does not have 'filterParams.buttons', but the new Filters Tool Panel has buttons configured. Either configure buttons for the filter, or disable buttons on the Filters Tool Panel.`,282:()=>"New filter tool panel requires `enableFilterHandlers: true`.",283:()=>"As of v34, use the same method on the filter handler (`api.getColumnFilterHandler(colKey)`) instead.",284:()=>"As of v34, filters are active when they have a model. Use `api.getColumnFilterModel()` instead.",285:()=>"As of v34, use (`api.getColumnFilterModel()`) instead.",286:()=>"As of v34, use (`api.setColumnFilterModel()`) instead.",287:()=>"`api.doFilterAction()` requires `enableFilterHandlers = true",288:()=>"`api.getColumnFilterModel(key, true)` requires `enableFilterHandlers = true",289:({rowModelType:e})=>`Row Model '${e}' is not supported with Batch Editing`,290:({rowIndex:e,rowPinned:t})=>`Row with index '${e}' and pinned state '${t}' not found`,291:()=>`License Key being set multiple times with different values. This can result in an incorrect license key being used,`,292:({colId:e})=>`The Multi Filter for column '${e}' has buttons configured against the child filters. When 'enableFilterHandlers=true', buttons must instead be provided against the parent Multi Filter params. The child filter buttons will be ignored.`,293:()=>`The grid was initialised detached from the DOM and was then inserted into a Shadow Root. Theme styles are probably broken. Pass the themeStyleContainer grid option to let the grid know where in the document to insert theme CSS.`,294:()=>"When using the `agRichSelectCellEditor` setting `filterListAsync = true` requires `allowTyping = true` and the `values()` callback must return a Promise of filtered values.",295:({blockedService:e})=>`colDef.allowFormula is not supported with ${e}. Formulas has been turned off.`,296:()=>"Since v35, `api.hideOverlay()` does not hide the overlay when `activeOverlay` is set. Set `activeOverlay=null` instead.",297:()=>'`api.hideOverlay()` does not hide the no matching rows overlay as it is only controlled by grid state. Set `suppressOverlays=["noMatchingRows"] to not show it.',298:()=>`Columns Tool Panel 'buttons' requires 'apply' to enable Deferred Updates.`};function SOe(e,t){let n=xOe[e];if(!n)return[`Missing error text for error id ${e}!`];let r=n(t),i=` 75See ${hK(e,t)}`;return Array.isArray(r)?r.concat(i):[r,i]}var COe={1:`Charting Aggregation`,2:`pivotResultFields`,3:`setTooltip`},b$=class{constructor(e=`javascript`){this.frameworkName=e,this.renderingEngine=`vanilla`,this.batchFrameworkComps=!1,this.wrapIncoming=e=>e(),this.wrapOutgoing=e=>e(),this.baseDocLink=`${UG}/${this.frameworkName}-data-grid`,tye(this.baseDocLink)}frameworkComponent(e){return null}isFrameworkComponent(e){return!1}getDocLink(e){return this.baseDocLink+(e?`/`+e:``)}},x$=new WeakMap,S$=new WeakMap,wOe=1,TOe=class{create(e,t,n,r,i,a){let o=BG.applyGlobalGridOptions(t),s=o.gridId??String(wOe++),c=this.getRegisteredModules(i,s,o.rowModelType),l=this.createBeansList(o.rowModelType,c,s),u=this.createProvidedBeans(e,o,i);if(!l)return;let d=new sxe({providedBeanInstances:u,beanClasses:l,id:s,beanInitComparator:lxe,beanDestroyComparator:uxe,derivedBeans:[cxe],destroyCallback:()=>{S$.delete(f),x$.delete(e),Yve(s),a?.()}});this.registerModuleFeatures(d,c),n(d),d.getBean(`syncSvc`).start(),r?.(d);let f=d.getBean(`gridApi`);return x$.set(e,f),S$.set(f,e),f}getRegisteredModules(e,t,n){return eK(pOe,void 0,!0),e?.modules?.forEach(e=>eK(e,t)),Xve(t,C$(n))}registerModuleFeatures(e,t){let n=e.getBean(`registry`),r=e.getBean(`apiFunctionSvc`);for(let e of t){n.registerModule(e);let t=e.apiFunctions;if(t){let e=Object.keys(t);for(let n of e)r?.addFunction(n,t[n])}}}createProvidedBeans(e,t,n){let r=n?n.frameworkOverrides:null;rW(r)&&(r=new b$);let i={gridOptions:t,eGridDiv:e,eRootDiv:e,globalListener:n?n.globalListener:null,globalSyncListener:n?n.globalSyncListener:null,frameworkOverrides:r,withinStudio:n?.withinStudio};return n?.providedBeanInstances&&Object.assign(i,n.providedBeanInstances),i}createBeansList(e,t,n){let r={clientSide:`ClientSideRowModel`,infinite:`InfiniteRowModel`,serverSide:`ServerSideRowModel`,viewport:`ViewportRowModel`},i=C$(e),a=r[i];if(!a){vK(201,{rowModelType:i},`Unknown rowModelType ${i}.`);return}if(!$ve()){vK(272,void 0,h$());return}if(!e){let e=Object.entries(r).filter(([e,t])=>tK(t,n,e));if(e.length==1){let[t,n]=e[0];if(t!==i){let e={moduleName:n,rowModelType:t};vK(275,e,_$(e));return}}}if(!tK(a,n,i)){let e=rK(),t=`rowModelType = '${i}'`,r=e?`Unable to use ${t} as that requires the ag-grid-enterprise script to be included. 76`:`Missing module ${a}Module for rowModelType ${i}.`;vK(200,{reasonOrId:t,moduleName:a,gridScoped:nK(),gridId:n,rowModelType:i,isUmd:e},r);return}let o=new Set;for(let e of t)for(let t of e.beans??[])o.add(t);return Array.from(o)}};function C$(e){return e??`clientSide`}function EOe(e,t=!1){let n=[],r=[],i=[],a=[],o=[],s=[],c=[],l=[],u=[],d=0;for(let t=0;t<e.length;t++){let{colId:f,sort:p,sortType:m,sortIndex:h,rowGroup:g,rowGroupIndex:_,aggFunc:v,pivot:y,pivotIndex:b,pinned:x,hide:S,width:C,flex:w}=e[t];u.push(f),p&&(n[h??d++]={colId:f,sort:p,type:m}),g&&(r[_??0]=f),typeof v==`string`&&i.push({colId:f,aggFunc:v}),y&&(a[b??0]=f),x&&(x===`right`?s:o).push(f),S&&c.push(f),(w!=null||C)&&l.push({colId:f,flex:w??void 0,width:C===null?void 0:C})}return{sort:n.length?{sortModel:w$(n)}:void 0,rowGroup:r.length?{groupColIds:w$(r)}:void 0,aggregation:i.length?{aggregationModel:i}:void 0,pivot:a.length||t?{pivotMode:t,pivotColIds:w$(a)}:void 0,columnPinning:o.length||s.length?{leftColIds:o,rightColIds:s}:void 0,columnVisibility:c.length?{hiddenColIds:c}:void 0,columnSizing:l.length?{columnSizingModel:l}:void 0,columnOrder:u.length?{orderedColIds:u}:void 0}}function w$(e){return e.filter(e=>e!=null)}function DOe(e){let t=[];for(let{groupId:n,open:r}of e)r&&t.push(n);return t.length?{openColumnGroupIds:t}:void 0}var OOe={moduleName:`AlignedGrids`,version:aK,beans:[class extends Q{constructor(){super(...arguments),this.beanName=`alignedGridsSvc`,this.consuming=!1}getAlignedGridApis(){let e=this.gos.get(`alignedGrids`)??[],t=typeof e==`function`;return typeof e==`function`&&(e=e()),e.map(e=>{if(!e){_K(18),t||_K(20);return}if(this.isGridApi(e))return e;let n=e;return`current`in n?n.current?.api:(n.api||_K(19),n.api)}).filter(e=>!!e&&!e.isDestroyed())}isGridApi(e){return!!e&&!!e.dispatchEvent}postConstruct(){let e=this.fireColumnEvent.bind(this);this.addManagedEventListeners({columnMoved:e,columnVisible:e,columnPinned:e,columnGroupOpened:e,columnResized:e,bodyScroll:this.fireScrollEvent.bind(this),alignedGridColumn:({event:e})=>this.onColumnEvent(e),alignedGridScroll:({event:e})=>this.onScrollEvent(e)})}fireEvent(e){if(!this.consuming)for(let t of this.getAlignedGridApis())t.isDestroyed()||t.dispatchEvent(e)}onEvent(e){this.consuming=!0,e(),this.consuming=!1}fireColumnEvent(e){this.fireEvent({type:`alignedGridColumn`,event:e})}fireScrollEvent(e){e.direction===`horizontal`&&this.fireEvent({type:`alignedGridScroll`,event:e})}onScrollEvent(e){this.onEvent(()=>{this.beans.ctrlsSvc.getScrollFeature().setHorizontalScrollPosition(e.left,!0)})}extractDataFromEvent(e,t){let n=[];return e.columns?e.columns.forEach(e=>{n.push(t(e))}):e.column&&n.push(t(e.column)),n}getMasterColumns(e){return this.extractDataFromEvent(e,e=>e)}getColumnIds(e){return this.extractDataFromEvent(e,e=>e.getColId())}onColumnEvent(e){this.onEvent(()=>{switch(e.type){case`columnMoved`:case`columnVisible`:case`columnPinned`:case`columnResized`:this.processColumnEvent(e);break;case`columnGroupOpened`:this.processGroupOpenedEvent(e);break;case`columnPivotChanged`:gK(21)}})}processGroupOpenedEvent(e){let{colGroupSvc:t}=this.beans;if(t)for(let n of e.columnGroups){let e=null;n&&(e=t.getProvidedColGroup(n.getGroupId())),(!n||e)&&t.setColumnGroupOpened(e,n.isExpanded(),`alignedGridChanged`)}}processColumnEvent(e){let t=e.column,n=null,r=this.beans,{colResize:i,ctrlsSvc:a,colModel:o}=r;if(t&&(n=o.getColDefCol(t.getColId())),t&&!n)return;let s=this.getMasterColumns(e);switch(e.type){case`columnMoved`:YX(r,{state:e.api.getColumnState().map(e=>({colId:e.colId})),applyOrder:!0},`alignedGridChanged`);break;case`columnVisible`:YX(r,{state:e.api.getColumnState().map(e=>({colId:e.colId,hide:e.hide}))},`alignedGridChanged`);break;case`columnPinned`:YX(r,{state:e.api.getColumnState().map(e=>({colId:e.colId,pinned:e.pinned}))},`alignedGridChanged`);break;case`columnResized`:{let t=e,n={};for(let e of s)n[e.getId()]={key:e.getColId(),newWidth:e.getActualWidth()};for(let e of t.flexColumns??[])n[e.getId()]&&delete n[e.getId()];i?.setColumnWidths(Object.values(n),!1,t.finished,`alignedGridChanged`);break}}let c=a.getGridBodyCtrl().isVerticalScrollShowing();for(let e of this.getAlignedGridApis())e.setGridOption(`alwaysShowVerticalScroll`,c)}}],dependsOn:[xZ]};function kOe(e,t={}){let n=t?t.rowNodes:void 0;e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.redrawRows(n))}function T$(e,t,n,r,i){t&&(r&&t.parent&&t.parent.level!==-1&&T$(e,t.parent,n,r,i),t.setExpanded(n,void 0,i))}function AOe(e,t){return e.rowModel.getRowNode(t)}function jOe(e,t,n,r){e.rowRenderer.addRenderedRowListener(t,n,r)}function MOe(e){return e.rowRenderer.getRenderedNodes()}function NOe(e,t,n){e.rowModel.forEachNode(t,n)}function POe(e){return e.rowRenderer.firstRenderedRow}function FOe(e){return e.rowRenderer.lastRenderedRow}function IOe(e,t){return e.rowModel.getRow(t)}function LOe(e){return e.rowModel.getRowCount()}function ROe(e){return e.ctrlsSvc.getScrollFeature().getVScrollPosition()}function zOe(e){return e.ctrlsSvc.getScrollFeature().getHScrollPosition()}function E$(e,t,n=`auto`){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureColumnVisible(t,n),`ensureVisible`)}function D$(e,t,n){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureIndexVisible(t,n),`ensureVisible`)}function BOe(e,t,n=null){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureNodeVisible(t,n),`ensureVisible`)}var VOe={moduleName:`RowApi`,version:aK,apiFunctions:{redrawRows:kOe,setRowNodeExpanded:T$,getRowNode:AOe,addRenderedRowListener:jOe,getRenderedNodes:MOe,forEachNode:NOe,getFirstDisplayedRowIndex:POe,getLastDisplayedRowIndex:FOe,getDisplayedRowAtIndex:IOe,getDisplayedRowCount:LOe}},HOe={moduleName:`ScrollApi`,version:aK,apiFunctions:{getVerticalPixelRange:ROe,getHorizontalPixelRange:zOe,ensureColumnVisible:E$,ensureIndexVisible:D$,ensureNodeVisible:BOe}};function UOe(e){e.expansionSvc?.expandAll(!0)}function WOe(e){e.expansionSvc?.expandAll(!1)}function O$(e){e.rowModel?.onRowHeightChanged()}function k$(e){if(e.rowAutoHeight?.active){gK(3);return}e.rowModel?.resetRowHeights()}function GOe(e){e.expansionSvc?.resetExpansion()}function KOe(e,t,n){let r=Wbe(e);if(r){if(e.rowGroupColsSvc?.columns.length===0){if(t<0){_K(238);return}r.setRowCount(t,n);return}_K(28);return}MJ(e)?.setRowCount(t,n)}function qOe(e){return SK(e.gos)?e.rowModel.getBlockStates():e.rowNodeBlockLoader?.getBlockState()??{}}function JOe(e){return e.rowModel.isLastRowIndexKnown()}var YOe={moduleName:`CsrmSsrmSharedApi`,version:aK,apiFunctions:{expandAll:UOe,collapseAll:WOe,resetRowGroupExpansion:GOe}},XOe={moduleName:`RowModelSharedApi`,version:aK,apiFunctions:{onRowHeightChanged:O$,resetRowHeights:k$}},ZOe={moduleName:`SsrmInfiniteSharedApi`,version:aK,apiFunctions:{setRowCount:KOe,getCacheBlockState:qOe,isLastRowIndexKnown:JOe}},A$=(e,t)=>{for(let n=0,r=e.length;n<r;++n){let r=e[n],i=r.childrenAfterGroup;i!==null&&(A$(i,t),t(r))}},j$=(e,t,n,r)=>{if(n!=null){let e=n.getSortedRows();for(let t=0,n=e.length;t<n;++t){let n=e[t];n.childrenAfterGroup!==null&&!n.destroyed&&r(n)}return}if(e==null)return;let i=e.childrenAfterGroup;i!==null&&(t&&A$(i,r),r(e))},QOe=class extends Q{constructor(e){super(),this.rootNode=e,this.nextId=0,this.allNodesMap={},M$(e)}getRowNode(e){return this.allNodesMap[e]}setNewRowData(e){this.dispatchRowDataUpdateStarted(e),this.destroyAllNodes();let t=M$(this.rootNode),n=Array(e.length);t._leafs=n;let r=0,i=this.beans.groupStage?.getNestedDataGetter(),a=i?new Set:null,o=(e,t)=>{let s=e.level+1;for(let c=0,l=t.length;c<l;++c){let l=t[c];if(!l)continue;let u=this.createRowNode(l,s,r);if(n[r++]=u,a&&!a.has(l)){a.add(l),u.treeParent=e;let t=i(l);t&&o(u,t)}}};o(t,e),n.length=r}destroyAllNodes(){let{selectionSvc:e,pinnedRowModel:t,groupStage:n}=this.beans;e?.reset(`rowDataChanged`),t?.isManual()&&t.reset(),n?.clearNonLeafs();let r=this.rootNode._leafs;if(r)for(let e=0,t=r.length;e<t;++e)r[e]._destroy(!1);this.allNodesMap=Object.create(null),this.nextId=0}setImmutableRowData(e,t){let{rootNode:n,gos:r}=this;this.dispatchRowDataUpdateStarted(t);let i=RK(r),a=e.changedRowNodes,{adds:o,updates:s}=a,c=new Set,l=[],u=this.beans.groupStage?.getNestedDataGetter(),d=r.get(`suppressMaintainUnsortedOrder`)?void 0:!1,f=-1,p=!1,m=(e,t)=>{if(!d&&d!==void 0){let t=e.sourceRowIndex;d=t<=f,f=t}e.data!==t&&(e.updateData(t),o.has(e)||s.add(e),!e.selectable&&e.isSelected()&&l.push(e))},h=(e,t,n)=>{for(let r=0,a=t.length;r<a;++r){let a=t[r];if(!a)continue;let s=this.getRowNode(i({data:a,level:n}));if(s?(m(s,a),p||=!!u&&s.treeParent!==e):(s=this.createRowNode(a,n),o.add(s)),!u||c.has(s)){c.add(s);continue}c.add(s),s.treeParent=e;let l=u(a);l&&h(s,l,n+1)}};h(n,t,0);let g=this.deleteUnusedNodes(c,a,l,!!e.animate)||d||o.size>0;if(g){let e=n._leafs??=[];d===void 0?rke(e,c,a):nke(e,c)&&(a.reordered=!0)}(g||p||s.size)&&(e.rowDataUpdated=!0,this.deselect(l))}deleteUnusedNodes(e,{removals:t},n,r){let i=this.rootNode._leafs;for(let a=0,o=i.length;a<o;a++){let o=i[a];e.has(o)||this.destroyNode(o,r)&&(t.push(o),o.isSelected()&&n.push(o))}return t.length>0}updateRowData(e,t,n){if(this.dispatchRowDataUpdateStarted(e.add),this.beans.groupStage?.getNestedDataGetter())return gK(268),{remove:[],update:[],add:[]};let r=[],i=RK(this.gos),a=this.executeRemove(i,e,t,r,n),o=this.executeUpdate(i,e,t,r),s=this.executeAdd(e,t);return this.deselect(r),{remove:a,update:o,add:s}}executeRemove(e,{remove:t},{adds:n,updates:r,removals:i},a,o){let s=this.rootNode._leafs,c=s?.length,l=t?.length;if(!l||!c)return[];let u=0,d=c,f=0,p=Array(l);for(let s=0;s<l;++s){let c=this.lookupNode(e,t[s]);if(!c)continue;let l=c.sourceRowIndex;l<d&&(d=l),l>f&&(f=l),p[u++]=c,this.destroyNode(c,o)&&(c.isSelected()&&a.push(c),n.delete(c)||(r.delete(c),i.push(c)))}return p.length=u,u&&tke(s,d,f),p}executeUpdate(e,{update:t},{adds:n,updates:r},i){let a=t?.length;if(!a)return[];let o=Array(a),s=0;for(let c=0;c<a;c++){let a=t[c],l=this.lookupNode(e,a);l&&(l.updateData(a),!l.selectable&&l.isSelected()&&i.push(l),o[s++]=l,n.has(l)||r.add(l))}return o.length=s,o}executeAdd(e,t){var n;let r=(n=this.rootNode)._leafs??(n._leafs=[]),i=r.length,a=e.add,o=a?.length;if(!o)return[];let s=i+o,c=this.sanitizeAddIndex(r,e.addIndex);if(c<i){for(let e=i-1,t=s-1;e>=c;--e){let n=r[e];n.sourceRowIndex=t,r[t--]=n}t.reordered=!0}r.length=s;let l=Array(o),u=t.adds;for(let e=0;e<o;e++){let t=this.createRowNode(a[e],0,c);u.add(t),r[c]=t,l[e]=t,c++}return l}dispatchRowDataUpdateStarted(e){this.eventSvc.dispatchEvent({type:`rowDataUpdateStarted`,firstRowData:e?.length?e[0]:null})}deselect(e){let t=`rowDataChanged`,n=this.beans.selectionSvc;e.length&&n?.setNodesSelected({newValue:!1,nodes:e,suppressFinishActions:!0,source:t}),n?.updateGroupsFromChildrenSelections?.(t),e.length&&this.eventSvc.dispatchEvent({type:`selectionChanged`,source:t,selectedNodes:n?.getSelectedNodes()??null,serverSideState:null})}createRowNode(e,t,n){let r=new NJ(this.beans);r.parent=this.rootNode,r.level=t,r.group=!1,n!=null&&(r.sourceRowIndex=n),r.setDataAndId(e,String(this.nextId++));let i=r.id,a=this.allNodesMap;return a[i]&&gK(2,{nodeId:i}),a[i]=r,r}destroyNode(e,t){if(!e._destroy(t))return!1;let n=e.id,r=this.allNodesMap;return r[n]===e&&delete r[n],!0}lookupNode(e,t){if(!e)return eke(this.rootNode._leafs,t);let n=e({data:t,level:0});return this.allNodesMap[n]||(_K(4,{id:n}),null)}sanitizeAddIndex(e,t){let n=e.length;if(typeof t!=`number`||t<0||t>=n||Number.isNaN(t))return n;t=Math.ceil(t);let r=this.gos;return t>0&&r.get(`treeData`)&&r.get(`getDataPath`)&&(t=$Oe(e,t)),t}},$Oe=(e,t)=>{for(let n=0,r=e.length;n<r;n++)if(e[n]?.rowIndex==t-1)return n+1;return t},M$=e=>{e.group=!0,e.level=-1,e._expanded=!0,e.id=`ROOT_NODE_ID`,e._leafs?.length!==0&&(e._leafs=[]);let t=[],n=[],r=[],i=[];e.childrenAfterGroup=t,e.childrenAfterSort=n,e.childrenAfterAggFilter=r,e.childrenAfterFilter=i;let a=e.sibling;return a&&(a.childrenAfterGroup=t,a.childrenAfterSort=n,a.childrenAfterAggFilter=r,a.childrenAfterFilter=i,a.childrenMapped=e.childrenMapped),e.updateHasChildren(),e},eke=(e,t)=>{if(e)for(let n=0,r=e.length;n<r;n++){let r=e[n];if(r.data===t)return r}return _K(5,{data:t}),null},tke=(e,t,n)=>{t=Math.max(0,t);for(let r=t,i=e.length;r<i;++r){let i=e[r];r<=n&&i.destroyed||(i.sourceRowIndex=t,e[t++]=i)}e.length=t},nke=(e,t)=>{e.length=t.size;let n=0,r=!1,i=!1;for(let a of t){let t=a.sourceRowIndex;t===n?i||=r:(t>=0?i=!0:r=!0,a.sourceRowIndex=n,e[n]=a),++n}return i},rke=(e,t,{adds:n})=>{let r=e.length,i=t.size;i>r&&(e.length=i);let a=0;for(let t=0;t<r;++t){let n=e[t];n.destroyed||(a!==t&&(n.sourceRowIndex=a,e[a]=n),++a)}for(let t of n)t.sourceRowIndex<0&&(t.sourceRowIndex=a,e[a++]=t);e.length=a};function N$(e){let t=e.sibling;t&&(t.childrenAfterFilter=e.childrenAfterFilter)}var ike=class extends Q{constructor(){super(...arguments),this.beanName=`filterStage`,this.step=`filter`,this.refreshProps=[`excludeChildrenWhenTreeDataFiltering`]}wireBeans(e){this.filterManager=e.filterManager}execute(e){let t=!!this.filterManager?.isChildFilterPresent();this.beans.formula?.active?this.softFilter(t,e):this.filterNodes(t,e)}filterNodes(e,t){let n=(t,n)=>{t.childrenAfterFilter=t.hasChildren()&&e&&!n?t.childrenAfterGroup.filter(e=>{let t=e.childrenAfterFilter&&e.childrenAfterFilter.length>0,n=e.data&&this.filterManager.doesRowPassFilter({rowNode:e});return t||n}):t.childrenAfterGroup,N$(t)};if(this.doingTreeDataFiltering()){let e=(t,r)=>{if(t.childrenAfterGroup)for(let i=0;i<t.childrenAfterGroup.length;i++){let a=t.childrenAfterGroup[i],o=r||this.filterManager.doesRowPassFilter({rowNode:a});a.childrenAfterGroup?e(t.childrenAfterGroup[i],o):n(a,o)}n(t,r)};e(this.beans.rowModel.rootNode,!1)}else j$(this.beans.rowModel.rootNode,this.beans.rowModel.hierarchical,t,e=>n(e,!1))}softFilter(e,t){let n=t=>{if(t.childrenAfterFilter=t.childrenAfterGroup,t.hasChildren())for(let n of t.childrenAfterGroup)n.softFiltered=e&&!(n.data&&this.filterManager.doesRowPassFilter({rowNode:n}));N$(t)},r=this.beans.rowModel;j$(r.rootNode,r.hierarchical,t,n)}doingTreeDataFiltering(){let{gos:e}=this;return!!this.beans.groupStage?.treeData&&!e.get(`excludeChildrenWhenTreeDataFiltering`)}},ake=4,oke=(e,t,n,r,i)=>{let a=t.childrenAfterSort,o=t.childrenAfterAggFilter;if(!o)return a&&a.length>0?a:[];let s=o.length;if(s<=1)return a?.length===s&&(s===0||a[0]===o[0])?a:o.slice();if(!a||s<=ake)return e.doFullSortInPlace(o.slice(),i);let c=new Map,{updates:l,adds:u}=n,d=[];for(let e=0;e<s;++e){let t=o[e];l.has(t)||u.has(t)||r?.hasRow(t)?(c.set(t,~e),d.push(t)):c.set(t,e)}let f=d.length;return f===0?s===a.length?a:cke(a,c,d):(d.sort((t,n)=>e.compareRowNodes(i,t,n)||~c.get(t)-~c.get(n)),f===s?d:ske(e,i,d,a,c,s))},ske=(e,t,n,r,i,a)=>{let o=Array(a),s=0,c=n[s],l,u=-1,d=0,f=0,p=n.length,m=r.length;for(;;){if(u<0){if(d>=m)break;if(l=r[d++],u=i.get(l)??-1,u<0)continue}if((e.compareRowNodes(t,c,l)||~i.get(c)-u)<0){if(o[f++]=c,++s>=p)break;c=n[s]}else o[f++]=l,u=-1}for(;s<p;)o[f++]=n[s++];if(u<0)return o;for(o[f++]=l;d<m;){let e=r[d++];i.get(e)>=0&&(o[f++]=e)}return o},cke=(e,t,n)=>{let r=0;n.length=t.size;for(let i=0,a=e.length;i<a;++i){let a=e[i];t.has(a)&&(n[r++]=a)}return n.length=r,n},P$=e=>{let t=e.childrenAfterSort,n=e.sibling;if(n&&(n.childrenAfterSort=t),t)for(let e=0,n=t.length-1;e<=n;e++){let r=t[e],i=e===0,a=e===n;r.firstChild!==i&&(r.firstChild=i,r.dispatchRowEvent(`firstChildChanged`)),r.lastChild!==a&&(r.lastChild=a,r.dispatchRowEvent(`lastChildChanged`)),r.childIndex!==e&&(r.childIndex=e,r.dispatchRowEvent(`childIndexChanged`))}},lke=class extends Q{constructor(){super(...arguments),this.beanName=`sortStage`,this.step=`sort`,this.refreshProps=[`postSortRows`,`groupDisplayType`,`accentedSort`]}execute(e,t){let n=this.beans.sortSvc.getSortOptions(),r=n.length>0&&!!t&&this.gos.get(`deltaSort`),{gos:i,colModel:a,rowGroupColsSvc:o,rowNodeSorter:s,rowRenderer:c,showRowGroupCols:l}=this.beans,u=i.get(`groupMaintainOrder`),d=a.getCols().some(e=>e.isRowGroupActive()),f=o?.columns,p=a.isPivotMode(),m=i.getCallback(`postSortRows`),h=!1,g;if(j$(this.beans.rowModel.rootNode,this.beans.rowModel.hierarchical,e,i=>{let a=p&&i.leafGroup,o=u&&d&&!i.leafGroup;o&&(g??=this.shouldSortContainsGroupCols(n),o&&=!g);let c=null;if(o){let e=!1;if(f){let t=i.level+1;t<f.length&&(e=f[t].wasSortExplicitlyRemoved)}e||(c=uke(i))}else!n.length||a||(c=r&&t?oke(s,i,t,e,n):s.doFullSortInPlace(i.childrenAfterAggFilter.slice(),n));if(c||=i.childrenAfterAggFilter?.slice()??[],h||=i.childrenAfterSort?.[0]!==c[0],i.childrenAfterSort=c,P$(i),m){let e={nodes:i.childrenAfterSort};m(e)}}),h&&i.get(`groupHideOpenParents`)){let e=l?.columns;e?.length&&c.refreshCells({columns:e,force:!0})}}shouldSortContainsGroupCols(e){let t=e.length;if(!t)return!1;if(NK(this.gos)){for(let n=0;n<t;++n){let t=e[n].column;if(t.isPrimary()&&t.isRowGroupActive())return!0}return!1}for(let n=0;n<t;++n)if(e[n].column.getColDef().showRowGroup)return!0;return!1}},uke=e=>{let t=e.childrenAfterSort,n=e.childrenAfterAggFilter,r=t?.length,i=n?.length;if(!r||!i)return null;let a=Array(i),o=new Set;for(let e=0;e<i;++e)o.add(n[e]);let s=0;for(let e=0;e<r;++e){let n=t[e];o.delete(n)&&(a[s++]=n)}if(o.size===0&&s===r)return t;for(let e of o)a[s++]=e;return a.length=s,a},dke=class extends Q{constructor(){super(...arguments),this.beanName=`rowModel`,this.rootNode=null,this.rowCountReady=!1,this.hierarchical=!1,this.nodeManager=void 0,this.rowsToDisplay=[],this.formulaRows=[],this.stages=null,this.asyncTransactions=null,this.asyncTransactionsTimer=0,this.started=!1,this.refreshingData=!1,this.rowDataUpdatedPending=!1,this.refreshingModel=!1,this.pendingNewData=!1,this.noKeepRenderedRows=!1,this.noKeepUndoRedoStack=!1,this.noAnimate=!1,this.rowNodesCountReady=!1,this.stagesRefreshProps=new Map,this.onRowHeightChanged_debounced=PG(this,this.onRowHeightChanged.bind(this),100)}postConstruct(){let e=this.beans,t=new NJ(e);this.rootNode=t,this.nodeManager=this.createBean(new QOe(t));let n=()=>{this.beans.groupStage?.invalidateGroupCols(),this.refreshModel({step:`group`,afterColumnsChanged:!0,keepRenderedRows:!0,animate:!this.gos.get(`suppressAnimationFrame`)})};this.addManagedEventListeners({newColumnsLoaded:n,columnRowGroupChanged:n,columnValueChanged:this.onValueChanged.bind(this),columnPivotChanged:()=>this.refreshModel({step:`pivot`}),columnPivotModeChanged:()=>this.refreshModel({step:`group`}),filterChanged:this.onFilterChanged.bind(this),sortChanged:this.onSortChanged.bind(this),stylesChanged:this.onGridStylesChanges.bind(this),gridReady:this.onGridReady.bind(this),rowExpansionStateChanged:this.onRowGroupOpened.bind(this)}),this.addPropertyListeners()}addPropertyListeners(){let{beans:e,stagesRefreshProps:t}=this,n=[e.groupStage,e.filterStage,e.pivotStage,e.aggStage,e.sortStage,e.filterAggStage,e.flattenStage].filter(e=>!!e);this.stages=n;for(let e=n.length-1;e>=0;--e){let r=n[e];for(let n of r.refreshProps)t.set(n,e)}this.addManagedPropertyListeners([...t.keys(),`rowData`],e=>{let t=e.changeSet?.properties;t&&this.onPropChange(t)}),this.addManagedPropertyListener(`rowHeight`,()=>this.resetRowHeights())}start(){this.started=!0,this.rowNodesCountReady?this.refreshModel({step:`group`,rowDataUpdated:!0,newData:!0}):this.setInitialData()}setInitialData(){this.gos.get(`rowData`)&&this.onPropChange([`rowData`])}ensureRowHeightsValid(e,t,n,r){let i,a=!1;do{i=!1;let o=this.getRowIndexAtPixel(e),s=this.getRowIndexAtPixel(t),c=Math.max(o,n),l=Math.min(s,r);for(let e=c;e<=l;e++){let t=this.getRow(e);if(t.rowHeightEstimated){let e=EK(this.beans,t);t.setRowHeight(e.height),i=!0,a=!0}}i&&this.setRowTopAndRowIndex()}while(i);return a}onPropChange(e){let{nodeManager:t,gos:n,beans:r}=this,i=r.groupStage;if(!t)return;let a=new Set(e),o=i?.onPropChange(a),s;a.has(`rowData`)?s=n.get(`rowData`):o&&(s=i?.extractData()),s&&!Array.isArray(s)&&(s=null,gK(1));let c={step:`nothing`,changedProps:a};if(s){let e=!o&&!this.isEmpty()&&s.length>0&&n.exists(`getRowId`)&&!n.get(`resetRowDataOnUpdate`);this.refreshingData=!0,e?(c.keepRenderedRows=!0,c.animate=!n.get(`suppressAnimationFrame`),c.changedRowNodes=new TX,t.setImmutableRowData(c,s)):(c.rowDataUpdated=!0,c.newData=!0,t.setNewRowData(s),this.rowNodesCountReady=!0)}let l=c.rowDataUpdated?`group`:this.getRefreshedStage(e);l&&(c.step=l,this.refreshModel(c))}getRefreshedStage(e){let{stages:t,stagesRefreshProps:n}=this;if(!t)return null;let r=t.length,i=r;for(let t=0,r=e.length;t<r&&i;++t)i=Math.min(i,n.get(e[t])??i);return i<r?t[i].step:null}setRowTopAndRowIndex(e){let{beans:t,rowsToDisplay:n}=this,r=t.environment.getDefaultRowHeight(),i=0,a=CK(this.gos,`normal`);for(let o=0,s=n.length;o<s;++o){let s=n[o],c=s.id;if(c!=null&&e?.add(c),s.rowHeight==null){let e=EK(t,s,a,r);s.setRowHeight(e.height,e.estimated)}s.setRowTop(i),s.setRowIndex(o),i+=s.rowHeight}if(this.beans.formula?.active){let e=this.formulaRows;for(let t=0,n=e.length;t<n;++t){let n=e[t];n.formulaRowIndex=t}}}clearRowTopAndRowIndex(e,t){let n=e=>{e?.id!=null&&!t.has(e.id)&&e.clearRowTopAndRowIndex()},r=t=>{n(t),n(t.detailNode),n(t.sibling);let i=t.childrenAfterGroup;if(t.hasChildren()&&i&&(!e||t.level===-1||t.expanded))for(let e=0,t=i.length;e<t;++e)r(i[e])},i=this.rootNode;i&&r(i)}isLastRowIndexKnown(){return!0}getRowCount(){return this.rowsToDisplay.length}getTopLevelRowCount(){let{rootNode:e,rowsToDisplay:t}=this;if(!e||!t.length)return 0;if(t[0]===e)return 1;let n=+!!e.sibling?.displayed;return(e.childrenAfterSort?.length??0)+n}getTopLevelRowDisplayedIndex(e){let{beans:t,rootNode:n,rowsToDisplay:r}=this;if(!n||!r.length||r[0]===n)return e;let i=n.childrenAfterSort,a=e=>{let t=i[e];if(this.gos.get(`groupHideOpenParents`))for(;t.expanded&&t.childrenAfterSort&&t.childrenAfterSort.length>0;)t=t.childrenAfterSort[0];return t.rowIndex},o=t.footerSvc;return o?o?.getTopDisplayIndex(r,e,i,a):a(e)}getTopLevelIndexFromDisplayedIndex(e){let{rootNode:t,rowsToDisplay:n}=this;if(!t||!n.length||n[0]===t)return e;let r=this.getRow(e);r.footer&&(r=r.sibling);let i=r.parent;for(;i&&i!==t;)r=i,i=r.parent;let a=t.childrenAfterSort?.indexOf(r)??-1;return a>=0?a:e}getRowBounds(e){let t=this.rowsToDisplay[e];return t?{rowTop:t.rowTop,rowHeight:t.rowHeight}:null}onRowGroupOpened(){this.refreshModel({step:`map`,keepRenderedRows:!0,animate:jK(this.gos)})}onFilterChanged({afterDataChange:e,columns:t}){if(!e){let e=t.length===0||t.some(e=>e.isPrimary())?`filter`:`filter_aggregates`;this.refreshModel({step:e,keepRenderedRows:!0,animate:jK(this.gos)})}}onSortChanged(){this.refreshModel({step:`sort`,keepRenderedRows:!0,animate:jK(this.gos)})}getType(){return`clientSide`}onValueChanged(){this.refreshModel({step:this.beans.colModel.isPivotActive()?`pivot`:`aggregate`})}isSuppressModelUpdateAfterUpdateTransaction(e){if(!this.gos.get(`suppressModelUpdateAfterUpdateTransaction`))return!1;let{changedRowNodes:t,newData:n,rowDataUpdated:r}=e;return!(!t||n||!r||t.removals.length||t.adds.size)}reMapRows(){if(this.refreshingModel||this.refreshingData){this.noKeepRenderedRows=!0,this.noKeepUndoRedoStack=!0,this.noAnimate=!0;return}this.refreshModel({step:`map`,keepRenderedRows:!1,keepUndoRedoStack:!1,animate:!1})}refreshModel(e){let{nodeManager:t,eventSvc:n,started:r}=this;if(!t)return;let i=!!e.rowDataUpdated;if(r&&i&&n.dispatchEvent({type:`rowDataUpdated`}),this.deferRefresh(e)){this.setPendingRefreshFlags(e),this.rowDataUpdatedPending||=i;return}this.rowDataUpdatedPending&&(this.rowDataUpdatedPending=!1,e.step=`group`),this.updateRefreshParams(e);let a=!1;this.refreshingModel=!0;try{this.executeRefresh(e,i),a=!0}finally{this.refreshingData=!1,this.refreshingModel=!1,a||this.setPendingRefreshFlags(e)}this.clearPendingRefreshFlags(),n.dispatchEvent({type:`modelUpdated`,animate:e.animate,keepRenderedRows:e.keepRenderedRows,newData:e.newData,newPage:!1,keepUndoRedoStack:e.keepUndoRedoStack})}executeRefresh(e,t){let{beans:n,rootNode:r}=this;n.masterDetailSvc?.refreshModel(e),t&&e.step!==`group`&&n.colFilter?.refreshModel();let i=e.changedPath;switch(i?.addRow(r),e.step===`group`&&(this.doGrouping(r,e),i??=e.changedPath),i??=n.changedPathFactory?.ensureRowsPath(e,r),e.step){case`group`:case`filter`:this.doFilter(i);case`pivot`:this.doPivot(i)&&(i=void 0,e.changedPath=void 0);case`aggregate`:this.doAggregate(i);case`filter_aggregates`:this.doFilterAggregates(i);case`sort`:this.doSort(i,e.changedRowNodes);case`map`:this.doRowsToDisplay()}let a=new Set;this.setRowTopAndRowIndex(a),this.clearRowTopAndRowIndex(i,a),this.updateRefreshParams(e)}deferRefresh(e){return this.refreshingModel||this.beans.colModel.changeEventsDispatching?!0:this.isSuppressModelUpdateAfterUpdateTransaction(e)?(this.started&&(this.refreshingData=!1),!0):!this.started}setPendingRefreshFlags(e){this.pendingNewData||=!!e.newData,this.noKeepRenderedRows||=!e.keepRenderedRows,this.noKeepUndoRedoStack||=!e.keepUndoRedoStack,this.noAnimate||=!e.animate}clearPendingRefreshFlags(){this.pendingNewData=!1,this.noKeepRenderedRows=!1,this.noKeepUndoRedoStack=!1,this.noAnimate=!1}updateRefreshParams(e){e.newData=this.pendingNewData||!!e.newData,e.keepRenderedRows=!this.noKeepRenderedRows&&!!e.keepRenderedRows,e.keepUndoRedoStack=!this.noKeepUndoRedoStack&&!!e.keepUndoRedoStack,e.animate=!this.noAnimate&&!!e.animate}isEmpty(){return!this.rootNode?._leafs?.length||!this.beans.colModel?.ready}isRowsToRender(){return this.rowsToDisplay.length>0}getOverlayType(){let{beans:e,gos:t}=this;if(this.rootNode?._leafs?.length){if(e.filterManager?.isAnyFilterPresent()&&this.getRowCount()===0)return`noMatchingRows`}else if(this.rowCountReady||(t.get(`rowData`)?.length??0)==0)return`noRows`;return null}getNodesInRangeForSelection(e,t){let n=!1,r=!1,i=[],a=ZK(this.gos);return this.forEachNodeAfterFilterAndSort(o=>{if(!r){if(n&&(o===t||o===e)&&(r=!0,a&&o.group)){F$(i,o);return}if(!n){if(o!==t&&o!==e)return;n=!0,t===e&&(r=!0)}(!o.group||!a)&&i.push(o)}}),i}getTopLevelNodes(){return this.rootNode?.childrenAfterGroup??null}getRow(e){return this.rowsToDisplay[e]}getFormulaRow(e){return this.formulaRows[e]}isRowPresent(e){return this.rowsToDisplay.indexOf(e)>=0}getRowIndexAtPixel(e){let t=this.rowsToDisplay,n=t.length;if(this.isEmpty()||n===0)return-1;let r=0,i=n-1;if(e<=0)return 0;if(t[i].rowTop<=e)return i;let a=-1,o=-1;for(;;){let n=Math.floor((r+i)/2),s=t[n];if(this.isRowInPixel(s,e)||(s.rowTop<e?r=n+1:s.rowTop>e&&(i=n-1),a===r&&o===i))return n;a=r,o=i}}isRowInPixel(e,t){let n=e.rowTop,r=n+e.rowHeight;return n<=t&&r>t}forEachLeafNode(e){let t=this.rootNode?._leafs;if(t)for(let n=0,r=t.length;n<r;++n)e(t[n],n)}forEachNode(e,t=!1){this.depthFirstSearchRowNodes(e,t)}forEachDisplayedNode(e){let t=this.rowsToDisplay;for(let n=0,r=t.length;n<r;++n)e(t[n],n)}forEachNodeAfterFilter(e,t=!1){this.depthFirstSearchRowNodes(e,t,e=>e.childrenAfterAggFilter)}forEachNodeAfterFilterAndSort(e,t=!1){this.depthFirstSearchRowNodes(e,t,e=>e.childrenAfterSort)}forEachPivotNode(e,t,n){let{colModel:r,rowGroupColsSvc:i}=this.beans;if(!r.isPivotMode())return;if(!i?.columns.length){e(this.rootNode,0);return}let a=n?`childrenAfterSort`:`childrenAfterGroup`;this.depthFirstSearchRowNodes(e,t,e=>e.leafGroup?null:e[a])}depthFirstSearchRowNodes(e,t=!1,n=e=>e.childrenAfterGroup,r=this.rootNode,i=0){let a=i;if(!r)return a;let o=r===this.rootNode;if(o||e(r,a++),r.hasChildren()&&!r.footer){let i=o||this.hierarchical?n(r):null;if(i){let s=this.beans.footerSvc;a=s?.addTotalRows(a,r,e,t,o,`top`)??a;for(let r of i)a=this.depthFirstSearchRowNodes(e,t,n,r,a);return s?.addTotalRows(a,r,e,t,o,`bottom`)??a}}return a}doAggregate(e){this.rootNode&&this.beans.aggStage?.execute(e)}doFilterAggregates(e){let t=this.rootNode,n=this.beans.filterAggStage;if(n&&this.hierarchical){n.execute(e);return}t.childrenAfterAggFilter=t.childrenAfterFilter;let r=t.sibling;r&&(r.childrenAfterAggFilter=t.childrenAfterFilter)}doSort(e,t){let n=this.beans.sortStage;if(n){n.execute(e,t);return}j$(this.rootNode,this.hierarchical,e,e=>{e.childrenAfterSort=e.childrenAfterAggFilter.slice(0),P$(e)})}doGrouping(e,t){let n=this.beans.groupStage?.execute(t);if(n===void 0){let t=e._leafs;e.childrenAfterGroup=t,e.updateHasChildren();let n=e.sibling;n&&(n.childrenAfterGroup=t)}(n||t.rowDataUpdated)&&this.beans.colFilter?.refreshModel(),!this.rowCountReady&&this.rowNodesCountReady&&(this.rowCountReady=!0,this.eventSvc.dispatchEventOnce({type:`rowCountReady`}))}doFilter(e){let t=this.beans.filterStage;if(t){t.execute(e);return}j$(this.rootNode,this.hierarchical,e,e=>{e.childrenAfterFilter=e.childrenAfterGroup,N$(e)})}doPivot(e){return this.beans.pivotStage?.execute(e)??!1}getRowNode(e){let t=this.nodeManager?.getRowNode(e);return typeof t==`object`?t:this.beans.groupStage?.getNonLeaf(e)}batchUpdateRowData(e,t){if(!this.asyncTransactionsTimer){this.asyncTransactions=[];let e=this.gos.get(`asyncTransactionWaitMillis`);this.asyncTransactionsTimer=setTimeout(()=>this.executeBatchUpdateRowData(),e)}this.asyncTransactions.push({rowDataTransaction:e,callback:t})}flushAsyncTransactions(){let e=this.asyncTransactionsTimer;e&&(clearTimeout(e),this.executeBatchUpdateRowData())}executeBatchUpdateRowData(){let{nodeManager:e,beans:t,eventSvc:n,asyncTransactions:r}=this;if(!e)return;t.valueCache?.onDataChanged();let i=[],a=[],o=new TX,s=!this.gos.get(`suppressAnimationFrame`);for(let{rowDataTransaction:t,callback:n}of r??[]){this.rowNodesCountReady=!0,this.refreshingData=!0;let r=e.updateRowData(t,o,s);i.push(r),n&&a.push(n.bind(null,r))}this.commitTransactions(o,s),a.length>0&&setTimeout(()=>{for(let e=0,t=a.length;e<t;e++)a[e]()},0),i.length>0&&n.dispatchEvent({type:`asyncTransactionsFlushed`,results:i}),this.asyncTransactionsTimer=0,this.asyncTransactions=null}updateRowData(e){let t=this.nodeManager;if(!t)return null;this.beans.valueCache?.onDataChanged(),this.rowNodesCountReady=!0;let n=new TX,r=!this.gos.get(`suppressAnimationFrame`);this.refreshingData=!0;let i=t.updateRowData(e,n,r);return this.commitTransactions(n,r),i}commitTransactions(e,t){this.refreshModel({step:`group`,rowDataUpdated:!0,keepRenderedRows:!0,animate:t,changedRowNodes:e})}doRowsToDisplay(){let{rootNode:e,beans:t}=this;if(t.formula?.active){let t=e?.childrenAfterSort??[];this.formulaRows=t,this.rowsToDisplay=t.filter(e=>!e.softFiltered);for(let e of this.rowsToDisplay)e.setUiLevel(0);return}let n=t.flattenStage;if(n){this.rowsToDisplay=n.execute();return}let r=this.rootNode.childrenAfterSort??[];for(let e of r)e.setUiLevel(0);this.rowsToDisplay=r}onRowHeightChanged(){this.refreshModel({step:`map`,keepRenderedRows:!0,keepUndoRedoStack:!0})}resetRowHeights(){let e=this.rootNode;if(!e)return;let t=this.resetRowHeightsForAllRowNodes();e.setRowHeight(e.rowHeight,!0);let n=e.sibling;n?.setRowHeight(n.rowHeight,!0),t&&this.onRowHeightChanged()}resetRowHeightsForAllRowNodes(){let e=!1;return this.forEachNode(t=>{t.setRowHeight(t.rowHeight,!0);let n=t.detailNode;n?.setRowHeight(n.rowHeight,!0);let r=t.sibling;r?.setRowHeight(r.rowHeight,!0),e=!0}),e}onGridStylesChanges(e){e.rowHeightChanged&&!this.beans.rowAutoHeight?.active&&this.resetRowHeights()}onGridReady(){this.started||this.setInitialData()}destroy(){super.destroy(),this.nodeManager=this.destroyBean(this.nodeManager),this.started=!1,this.rootNode=null,this.rowsToDisplay=[],this.asyncTransactions=null,this.stages=null,this.stagesRefreshProps.clear(),clearTimeout(this.asyncTransactionsTimer)}onRowHeightChangedDebounced(){this.onRowHeightChanged_debounced()}},F$=(e,t)=>{let n=t.childrenAfterGroup;if(n)for(let t=0,r=n.length;t<r;++t){let r=n[t];r.data&&e.push(r),r.group&&F$(e,r)}};function fke(e){e.expansionSvc?.onGroupExpandedOrCollapsed()}function pke(e,t){let n=jJ(e);n&&((!t||t===`everything`)&&(t=`group`),n.refreshModel({step:t,keepRenderedRows:!0,animate:!e.gos.get(`suppressAnimationFrame`)}))}function mke(e){return jJ(e)?.isEmpty()??!0}function hke(e,t){jJ(e)?.forEachLeafNode(t)}function gke(e,t){jJ(e)?.forEachNodeAfterFilter(t)}function _ke(e,t){jJ(e)?.forEachNodeAfterFilterAndSort(t)}function vke(e,t){return e.frameworkOverrides.wrapIncoming(()=>jJ(e)?.updateRowData(t))}function yke(e,t,n){e.frameworkOverrides.wrapIncoming(()=>jJ(e)?.batchUpdateRowData(t,n))}function bke(e){e.frameworkOverrides.wrapIncoming(()=>jJ(e)?.flushAsyncTransactions())}function xke(e){return e.selectionSvc?.getBestCostNodeSelection()}var Ske={moduleName:`ClientSideRowModel`,version:aK,rowModels:[`clientSide`],beans:[dke,lke],dependsOn:[u$]},Cke={moduleName:`ClientSideRowModelApi`,version:aK,apiFunctions:{onGroupExpandedOrCollapsed:fke,refreshClientSideRowModel:pke,isRowDataEmpty:mke,forEachLeafNode:hke,forEachNodeAfterFilter:gke,forEachNodeAfterFilterAndSort:_ke,applyTransaction:vke,applyTransactionAsync:yke,flushAsyncTransactions:bke,getBestCostNodeSelection:xke,resetRowHeights:k$,onRowHeightChanged:O$},dependsOn:[YOe,XOe]},wke=`:where(.ag-ltr) :where(.ag-animate-autosize){.ag-cell,.ag-header-cell,.ag-header-group-cell{transition:width .2s ease-in-out,left .2s ease-in-out}}:where(.ag-rtl) :where(.ag-animate-autosize){.ag-cell,.ag-header-cell,.ag-header-group-cell{transition:width .2s ease-in-out,right .2s ease-in-out}}`;function Tke(e,t){typeof t==`number`?e.colAutosize?.sizeColumnsToFit(t,`api`):e.colAutosize?.sizeColumnsToFitGridBody(t)}function I$({colAutosize:e,visibleCols:t},n,r){Array.isArray(n)?e?.autoSizeCols({colKeys:n,skipHeader:r,source:`api`}):e?.autoSizeCols({...n,colKeys:n.colIds??t.allCols,source:`api`})}function Eke(e,t){t&&typeof t==`object`?I$(e,t):e.colAutosize?.autoSizeAllColumns({source:`api`,skipHeader:t})}var Dke=class extends Q{constructor(){super(...arguments),this.beanName=`colAutosize`,this.timesDelayed=0,this.shouldQueueResizeOperations=!1,this.resizeOperationQueue=[]}postConstruct(){let{gos:e}=this,t=e.get(`autoSizeStrategy`);if(t){let n=!1,r=t.type;if(r===`fitGridWidth`||r===`fitProvidedWidth`)n=!0;else if(r===`fitCellContents`){this.addManagedEventListeners({firstDataRendered:()=>this.onFirstDataRendered(t)});let r=e.get(`rowData`);n=r!=null&&r.length>0&&xK(e)}n&&this.beans.colDelayRenderSvc?.hideColumns(r)}}autoSizeCols(e){let{eventSvc:t,visibleCols:n,colModel:r}=this.beans;z$(this.beans,!0),this.innerAutoSizeCols(e).then(i=>{let a=e=>GX(t,Array.from(e),!0,`autosizeColumns`);if(!e.scaleUpToFitGridWidth)return z$(this.beans,!1),a(i);let o=L$(this.beans),s=e=>n.leftCols.some(t=>Dq(t,e)),c=e=>n.rightCols.some(t=>Dq(t,e)),l=e.colKeys.filter(e=>!r.getCol(e)?.getColDef().suppressAutoSize&&!wq(e)&&!s(e)&&!c(e));this.sizeColumnsToFit(o,e.source,!0,{defaultMaxWidth:e.defaultMaxWidth,defaultMinWidth:e.defaultMinWidth,columnLimits:e.columnLimits?.map(e=>({...e,key:e.colId})),colKeys:l,onlyScaleUp:!0,animate:!1}),z$(this.beans,!1),a(i)})}innerAutoSizeCols(e){return new Promise((t,n)=>{if(this.shouldQueueResizeOperations)return this.pushResizeOperation(()=>this.innerAutoSizeCols(e).then(t,n));let{colKeys:r,skipHeader:i,skipHeaderGroups:a,stopAtGroup:o,defaultMaxWidth:s,defaultMinWidth:c,columnLimits:l=[],source:u=`api`}=e,{animationFrameSvc:d,renderStatus:f,colModel:p,autoWidthCalc:m,visibleCols:h}=this.beans;if(d?.flushAllFrames(),this.timesDelayed<5&&f&&(!f.areHeaderCellsRendered()||!f.areCellsRendered())){this.timesDelayed++,setTimeout(()=>{this.isAlive()&&this.innerAutoSizeCols(e).then(t,n)});return}this.timesDelayed=0;let g=new Set,_=-1,v=Object.fromEntries(l.map(({colId:e,...t})=>[e,t])),y=i??this.gos.get(`skipHeaderOnAutoSize`),b=a??y;for(;_!==0;){_=0;let e=[];for(let t of r){if(!t||Uye(t))continue;let n=p.getCol(t);if(!n||g.has(n)||n.getColDef().suppressAutoSize)continue;let r=m.getPreferredWidthForColumn(n,y);if(r>0){let e=v[n.colId]??{};e.minWidth??=c,e.maxWidth??=s;let t=Oke(n,r,e);n.setActualWidth(t,u),g.add(n),_++}e.push(n)}e.length&&h.refresh(u)}b||this.autoSizeColumnGroupsByColumns(r,u,o),t(g)})}autoSizeColumn(e,t,n){this.autoSizeCols({colKeys:[e],skipHeader:n,skipHeaderGroups:!0,source:t})}autoSizeColumnGroupsByColumns(e,t,n){let{colModel:r,ctrlsSvc:i}=this.beans,a=new Set,o=r.getColsForKeys(e);for(let e of o){let t=e.getParent();for(;t&&t!=n;)t.isPadding()||a.add(t),t=t.getParent()}let s;for(let e of a){for(let t of i.getHeaderRowContainerCtrls())if(s=t.getHeaderCtrlForColumn(e),s)break;s?.resizeLeafColumnsToFit(t)}}autoSizeAllColumns(e){if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.autoSizeAllColumns(e));return}this.autoSizeCols({colKeys:this.beans.visibleCols.allCols,...e})}addColumnAutosizeListeners(e,t){let n=this.gos.get(`skipHeaderOnAutoSize`),r=()=>{this.autoSizeColumn(t,`uiColumnResized`,n)};e.addEventListener(`dblclick`,r);let i=new YJ(e);return i.addEventListener(`doubleTap`,r),()=>{e.removeEventListener(`dblclick`,r),i.destroy()}}addColumnGroupResize(e,t,n){let r=this.gos.get(`skipHeaderOnAutoSize`),i=()=>{let e=[],i=t.getDisplayedLeafColumns();for(let t of i)t.getColDef().suppressAutoSize||e.push(t.getColId());e.length>0&&this.autoSizeCols({colKeys:e,skipHeader:r,stopAtGroup:t,source:`uiColumnResized`}),n()};return e.addEventListener(`dblclick`,i),()=>e.removeEventListener(`dblclick`,i)}sizeColumnsToFitGridBody(e,t){if(!this.isAlive())return;let n=L$(this.beans);if(n>0){this.sizeColumnsToFit(n,`sizeColumnsToFit`,!1,e);return}t===void 0?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,100)},0):t===100?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,500)},100):t===500?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,-1)},500):gK(29)}sizeColumnsToFit(e,t=`sizeColumnsToFit`,n,r){if(this.shouldQueueResizeOperations){this.pushResizeOperation(()=>this.sizeColumnsToFit(e,t,n,r));return}let{beans:i}=this,a=r?.animate??!0;a&&z$(i,!0);let o={};for(let{key:e,...t}of r?.columnLimits??[])o[typeof e==`string`?e:e.getColId()]=t;let s=i.visibleCols.allCols;if(e<=0||!s.length)return;let c=bq(s);if(r?.onlyScaleUp&&c>e||e===c&&s.every(e=>{if(e.colDef.suppressSizeToFit)return!0;let t=o?.[e.getId()],n=t?.minWidth??r?.defaultMinWidth,i=t?.maxWidth??r?.defaultMaxWidth,a=e.getActualWidth();return(n==null||a>=n)&&(i==null||a<=i)}))return;let l=[],u=[];for(let e of s){let t=r?.colKeys?.some(t=>Dq(e,t))??!0;e.getColDef().suppressSizeToFit||!t?u.push(e):l.push(e)}let d=l.slice(0),f=!1,p=e=>{$U(l,e),u.push(e)},m={};for(let e of l){r?.onlyScaleUp&&(m[e.getColId()]=e.getActualWidth()),e.resetActualWidth(t);let n=o?.[e.getId()],i=n?.minWidth??r?.defaultMinWidth??-1/0,a=n?.maxWidth??r?.defaultMaxWidth??1/0,s=e.getActualWidth(),c=Math.max(Math.min(s,a),i);c!=s&&e.setActualWidth(c,t,!0)}for(;!f;){f=!0;let n=e-bq(u);if(n<=0)for(let e of l){let n=o?.[e.getId()]?.minWidth??r?.defaultMinWidth??e.minWidth;e.setActualWidth(n,t,!0)}else{let e=n/bq(l),i=n;for(let n=l.length-1;n>=0;n--){let a=l[n],s=a.getColId(),c=m[s],u=o?.[s],d=u?.minWidth??r?.defaultMinWidth??c,h=u?.maxWidth??r?.defaultMaxWidth,g=Math.max(d??-1/0,a.getMinWidth()),_=Math.min(h??1/0,a.getMaxWidth()),v=Math.round(a.getActualWidth()*e);v<g?(v=g,p(a),f=!1):v>_?(v=_,p(a),f=!1):n===0&&(v=i),a.setActualWidth(v,t,!0),i-=v}}}for(let e of d)e.fireColumnWidthChangedEvent(t);let h=i.visibleCols;h.setLeftValues(t),h.updateBodyWidths(),!n&&(GX(this.eventSvc,d,!0,t),a&&z$(i,!1))}applyAutosizeStrategy(){let{gos:e,colDelayRenderSvc:t}=this.beans,n=e.get(`autoSizeStrategy`);(n?.type===`fitGridWidth`||n?.type===`fitProvidedWidth`)&&setTimeout(()=>{if(!this.isAlive())return;let e=n.type;if(e===`fitGridWidth`){let{columnLimits:e,defaultMinWidth:t,defaultMaxWidth:r}=n,i=e?.map(({colId:e,minWidth:t,maxWidth:n})=>({key:e,minWidth:t,maxWidth:n}));this.sizeColumnsToFitGridBody({defaultMinWidth:t,defaultMaxWidth:r,columnLimits:i})}else e===`fitProvidedWidth`&&this.sizeColumnsToFit(n.width,`sizeColumnsToFit`);t?.revealColumns(e)})}onFirstDataRendered({colIds:e,...t}){setTimeout(()=>{if(!this.isAlive())return;let n=`autosizeColumns`;e?this.autoSizeCols({...t,source:n,colKeys:e}):this.autoSizeAllColumns({...t,source:n}),this.beans.colDelayRenderSvc?.revealColumns(t.type)})}processResizeOperations(){this.shouldQueueResizeOperations=!1;for(let e of this.resizeOperationQueue)e();this.resizeOperationQueue=[]}pushResizeOperation(e){this.resizeOperationQueue.push(e)}destroy(){this.resizeOperationQueue.length=0,super.destroy()}};function Oke(e,t,n={}){let r=n.minWidth??e.getMinWidth();t<r&&(t=r);let i=n.maxWidth??e.getMaxWidth();return t>i&&(t=i),t}function L$({ctrlsSvc:e,scrollVisibleSvc:t}){let n=e.getGridBodyCtrl(),r=n.isVerticalScrollShowing()?t.getScrollbarWidth():0;return VW(n.eGridBody)-r}var R$=`ag-animate-autosize`;function z$({ctrlsSvc:e,gos:t},n){if(!t.get(`animateColumnResizing`)||t.get(`enableRtl`)||!e.isAlive())return;let r=e.getGridBodyCtrl().eGridBody.classList;n?r.add(R$):r.remove(R$)}var kke={moduleName:`ColumnAutoSize`,version:aK,beans:[Dke],apiFunctions:{sizeColumnsToFit:Tke,autoSizeColumns:I$,autoSizeAllColumns:Eke},dependsOn:[HX],css:[wke]};function Ake(e,t){return!!e.colHover?.isHovered(t)}var jke=class extends Q{constructor(e,t){super(),this.columns=e,this.element=t,this.destroyManagedListeners=[],this.enableFeature=e=>{let{beans:t,gos:n,element:r,columns:i}=this,a=t.colHover;if(e??!!n.get(`columnHoverHighlight`))this.destroyManagedListeners=this.addManagedElementListeners(r,{mouseover:a.setMouseOver.bind(a,i),mouseout:a.clearMouseOver.bind(a)});else{for(let e of this.destroyManagedListeners)e();this.destroyManagedListeners=[]}}}postConstruct(){this.addManagedPropertyListener(`columnHoverHighlight`,({currentValue:e})=>{this.enableFeature(e)}),this.enableFeature()}destroy(){super.destroy(),this.destroyManagedListeners=null}},Mke=`ag-column-hover`,Nke={moduleName:`ColumnHover`,version:aK,beans:[class extends Q{constructor(){super(...arguments),this.beanName=`colHover`}postConstruct(){this.addManagedPropertyListener(`columnHoverHighlight`,({currentValue:e})=>{e||this.clearMouseOver()})}setMouseOver(e){this.updateState(e)}clearMouseOver(){this.updateState(null)}isHovered(e){if(!this.gos.get(`columnHoverHighlight`))return!1;let t=this.selectedColumns;return!!t&&t.indexOf(e)>=0}addHeaderColumnHoverListener(e,t,n){let r=()=>{let e=this.isHovered(n);t.toggleCss(`ag-column-hover`,e)};e.addManagedEventListeners({columnHoverChanged:r}),r()}onCellColumnHover(e,t){if(!t)return;let n=this.isHovered(e);t.toggleCss(Mke,n)}addHeaderFilterColumnHoverListener(e,t,n,r){this.createHoverFeature(e,[n],r);let i=()=>{let e=this.isHovered(n);t.toggleCss(`ag-column-hover`,e)};e.addManagedEventListeners({columnHoverChanged:i}),i()}createHoverFeature(e,t,n){e.createManagedBean(new jke(t,n))}updateState(e){this.selectedColumns=e,this.eventSvc.dispatchEvent({type:`columnHoverChanged`})}}],apiFunctions:{isColumnHovered:Ake}},Pke={moduleName:`SharedExport`,version:aK,beans:[class extends Q{constructor(){super(...arguments),this.beanName=`gridSerializer`}wireBeans(e){this.visibleCols=e.visibleCols,this.colModel=e.colModel,this.rowModel=e.rowModel,this.pinnedRowModel=e.pinnedRowModel}serialize(e,t={}){let{allColumns:n,columnKeys:r,skipRowGroups:i,exportRowNumbers:a}=t,o=this.getColumnsToExport({allColumns:n,skipRowGroups:i,columnKeys:r,exportRowNumbers:a});return[this.prepareSession(o),this.prependContent(t),this.exportColumnGroups(t,o),this.exportHeaders(t,o),this.processPinnedTopRows(t,o),this.processRows(t,o),this.processPinnedBottomRows(t,o),this.appendContent(t)].reduce((e,t)=>t(e),e).parse()}processRow(e,t,n,r){let i=t.shouldRowBeSkipped||(()=>!1),a=t.rowPositions!=null||!!t.onlySelected,o=this.gos.get(`groupHideOpenParents`)&&!a,s=this.colModel.isPivotMode()?r.leafGroup:!r.group,c=!!r.footer,l=r.allChildrenCount===1&&r.childrenAfterGroup?.length===1&&fye(this.gos,r);if(!s&&!c&&(t.skipRowGroups||l||o)||t.onlySelected&&!r.isSelected()||t.skipPinnedTop&&r.rowPinned===`top`||t.skipPinnedBottom&&r.rowPinned===`bottom`||r.stub||r.level===-1&&!s&&!c||i(eq(this.gos,{node:r})))return;let u=e.onNewBodyRow(r);if(n.forEach((e,t)=>{u.onColumn(e,t,r)}),t.getCustomContentBelowRow){let n=t.getCustomContentBelowRow(eq(this.gos,{node:r}));n&&e.addCustomContent(n)}}appendContent(e){return t=>{let n=e.appendContent;return n&&t.addCustomContent(n),t}}prependContent(e){return t=>{let n=e.prependContent;return n&&t.addCustomContent(n),t}}prepareSession(e){return t=>(t.prepare(e),t)}exportColumnGroups(e,t){return n=>{if(!e.skipColumnGroupHeaders){let r=new KX,{colGroupSvc:i}=this.beans,a=i?i.createColumnGroups({columns:t,idCreator:r,pinned:null,isStandaloneStructure:!0}):t;this.recursivelyAddHeaderGroups(a,n,e.processGroupHeaderCallback)}return n}}exportHeaders(e,t){return n=>{if(!e.skipColumnHeaders){let e=n.onNewHeaderRow();t.forEach((t,n)=>{e.onColumn(t,n,void 0)})}return n}}processPinnedTopRows(e,t){return n=>{let r=this.processRow.bind(this,n,e,t);return e.rowPositions?e.rowPositions.filter(e=>e.rowPinned===`top`).sort((e,t)=>e.rowIndex-t.rowIndex).map(e=>this.pinnedRowModel?.getPinnedTopRow(e.rowIndex)).forEach(r):this.pinnedRowModel?.isManual()||this.pinnedRowModel?.forEachPinnedRow(`top`,r),n}}processRows(e,t){return n=>{let r=this.rowModel,i=xK(this.gos,r),a=SK(this.gos,r),o=!i&&e.onlySelected,s=this.processRow.bind(this,n,e,t),{exportedRows:c=`filteredAndSorted`}=e;if(e.rowPositions)e.rowPositions.filter(e=>e.rowPinned==null).sort((e,t)=>e.rowIndex-t.rowIndex).map(e=>r.getRow(e.rowIndex)).forEach(s);else if(this.colModel.isPivotMode())i?r.forEachPivotNode(s,!0,c===`filteredAndSorted`):a?r.forEachNodeAfterFilterAndSort(s,!0):r.forEachNode(s);else if(e.onlySelectedAllPages||o){let e=this.beans.selectionSvc?.getSelectedNodes()??[];this.replicateSortedOrder(e),e.forEach(s)}else c===`all`?r.forEachNode(s):i||a?r.forEachNodeAfterFilterAndSort(s,!0):r.forEachNode(s);return n}}replicateSortedOrder(e){let{sortSvc:t,rowNodeSorter:n}=this.beans;if(!t||!n)return;let r=t.getSortOptions(),i=(e,t)=>e.rowIndex!=null&&t.rowIndex!=null?e.rowIndex-t.rowIndex:e.level===t.level?e.parent?.id===t.parent?.id?n.compareRowNodes(r,e,t)||(e.rowIndex??-1)-(t.rowIndex??-1):i(e.parent,t.parent):e.level>t.level?i(e.parent,t):i(e,t.parent);e.sort(i)}processPinnedBottomRows(e,t){return n=>{let r=this.processRow.bind(this,n,e,t);return e.rowPositions?e.rowPositions.filter(e=>e.rowPinned===`bottom`).sort((e,t)=>e.rowIndex-t.rowIndex).map(e=>this.pinnedRowModel?.getPinnedBottomRow(e.rowIndex)).forEach(r):this.pinnedRowModel?.isManual()||this.pinnedRowModel?.forEachPinnedRow(`bottom`,r),n}}getColumnsToExport(e){let{allColumns:t=!1,skipRowGroups:n=!1,exportRowNumbers:r=!1,columnKeys:i}=e,{colModel:a,gos:o,visibleCols:s}=this,c=a.isPivotMode(),l=e=>Cq(e)?!1:!wq(e)||r;if(i?.length)return a.getColsForKeys(i).filter(l);let u=o.get(`treeData`),d=[];return d=t&&!c?a.getCols():s.allCols,d=d.filter(e=>l(e)&&(n&&!u?!Sq(e):!0)),d}recursivelyAddHeaderGroups(e,t,n){let r=[];for(let t of e){let e=t;if(e.getChildren)for(let t of e.getChildren()??[])r.push(t)}e.length>0&&Aq(e[0])&&this.doAddHeaderHeader(t,e,n),r&&r.length>0&&this.recursivelyAddHeaderGroups(r,t,n)}doAddHeaderHeader(e,t,n){let r=e.onNewHeaderGroupingRow(),i=0;for(let e of t){let t=e,a;a=n?n(eq(this.gos,{columnGroup:t})):this.beans.colNames.getDisplayNameForColumnGroup(t,`header`);let o=(t.isExpandable()?t.getLeafColumns():[]).reduce((e,t,n,r)=>{let i=XU(e);return t.getColumnGroupShow()===`open`?(!i||i[1]!=null)&&(i=[n],e.push(i)):i&&i[1]==null&&(i[1]=n-1),n===r.length-1&&i&&i[1]==null&&(i[1]=n),e},[]);r.onColumn(t,a||``,i++,t.getLeafColumns().length-1,o)}}}]},Fke=class extends Q{getFileName(e){let t=this.getDefaultFileExtension();return e?.length||(e=this.getDefaultFileName()),e.includes(`.`)?e:`${e}.${t}`}getData(e){return this.beans.gridSerializer.serialize(this.createSerializingSession(e),e)}getDefaultFileName(){return`export.${this.getDefaultFileExtension()}`}};function Ike(e,t){let n=document.defaultView||window;if(!n){gK(52);return}let r=document.createElement(`a`),i=n.URL.createObjectURL(t);r.setAttribute(`href`,i),r.setAttribute(`download`,e),r.style.display=`none`,document.body.appendChild(r),r.dispatchEvent(new MouseEvent(`click`,{bubbles:!1,cancelable:!0,view:n})),r.remove(),n.setTimeout(()=>{n.URL.revokeObjectURL(i)},0)}var Lke=class{constructor(e){this.valueFrom=`data`;let{colModel:t,rowGroupColsSvc:n,colNames:r,valueSvc:i,gos:a,processCellCallback:o,processHeaderCallback:s,processGroupHeaderCallback:c,processRowGroupCallback:l,valueFrom:u}=e;this.colModel=t,this.rowGroupColsSvc=n,this.colNames=r,this.valueSvc=i,this.gos=a,this.processCellCallback=o,this.processHeaderCallback=s,this.processGroupHeaderCallback=c,this.processRowGroupCallback=l,u&&(this.valueFrom=u)}prepare(e){}extractHeaderValue(e){return this.getHeaderName(this.processHeaderCallback,e)??``}extractRowCellValue(e){let{column:t,node:n,currentColumnIndex:r,accumulatedRowIndex:i,type:a,useRawFormula:o}=e,s=r===0&&LK(this.gos,n,this.colModel.isPivotMode());if(this.processRowGroupCallback&&(this.gos.get(`treeData`)||n.group)&&(t.isRowGroupDisplayed(n.rowGroupColumn?.getColId()??``)||s))return{value:this.processRowGroupCallback(eq(this.gos,{column:t,node:n}))??``};if(this.processCellCallback)return{value:this.processCellCallback(eq(this.gos,{accumulatedRowIndex:i,column:t,node:n,value:this.valueSvc.getValueForDisplay({column:t,node:n,from:this.valueFrom}).value,type:a,parseValue:e=>this.valueSvc.parseValue(t,n,e,this.valueSvc.getValue(t,n,this.valueFrom)),formatValue:e=>this.valueSvc.formatValue(t,n,e)??e}))??``};let c=this.gos.get(`treeData`),l=this.valueSvc,u=n.level===-1&&n.footer,d=t.colDef.showRowGroup===!0&&(n.group||c);if(!u&&(s||d)){let e=``,r=n;for(;r&&r.level!==-1;){let{value:n,valueFormatted:i}=l.getValueForDisplay({column:s?void 0:t,node:r,includeValueFormatted:!0,exporting:!0,from:this.valueFrom});e=` -> ${i??n??``}${e}`,r=r.parent}return{value:e,valueFormatted:e}}let{value:f,valueFormatted:p}=l.getValueForDisplay({column:t,node:n,includeValueFormatted:!0,exporting:!0,useRawFormula:o,from:this.valueFrom});return{value:f??``,valueFormatted:p}}getHeaderName(e,t){return e?e(eq(this.gos,{column:t})):this.colNames.getDisplayNameForColumn(t,`csv`,!0)}},B$=`\r 77`,Rke=class extends Lke{constructor(e){super(e),this.config=e,this.isFirstLine=!0,this.result=``;let{suppressQuotes:t,columnSeparator:n}=e;this.suppressQuotes=t,this.columnSeparator=n}addCustomContent(e){e&&(typeof e==`string`?(/^\s*\n/.test(e)||this.beginNewLine(),e=e.replace(/\r?\n/g,B$),this.result+=e):e.forEach(e=>{this.beginNewLine(),e.forEach((e,t)=>{t!==0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(e.data.value||``),e.mergeAcross&&this.appendEmptyCells(e.mergeAcross)})}))}onNewHeaderGroupingRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderGroupingRowColumn.bind(this)}}onNewHeaderGroupingRowColumn(e,t,n,r){n!=0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(t),this.appendEmptyCells(r)}appendEmptyCells(e){for(let t=1;t<=e;t++)this.result+=this.columnSeparator+this.putInQuotes(``)}onNewHeaderRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderRowColumn.bind(this)}}onNewHeaderRowColumn(e,t){t!=0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(this.extractHeaderValue(e))}onNewBodyRow(){return this.beginNewLine(),{onColumn:this.onNewBodyRowColumn.bind(this)}}onNewBodyRowColumn(e,t,n){t!=0&&(this.result+=this.columnSeparator);let r=this.extractRowCellValue({column:e,node:n,currentColumnIndex:t,accumulatedRowIndex:t,type:`csv`,useRawFormula:!1});this.result+=this.putInQuotes(r.valueFormatted??r.value)}putInQuotes(e){if(this.suppressQuotes)return e;if(e==null)return`""`;let t;return typeof e==`string`?t=e:typeof e.toString==`function`?t=e.toString():(gK(53),t=``),`"`+t.replace(/"/g,`""`)+`"`}parse(){return this.result}beginNewLine(){this.isFirstLine||(this.result+=B$),this.isFirstLine=!1}},zke=class extends Fke{constructor(){super(...arguments),this.beanName=`csvCreator`}getMergedParams(e){let t=this.gos.get(`defaultCsvExportParams`);return Object.assign({},t,e)}export(e){if(this.isExportSuppressed()){gK(51);return}let t=()=>{let t=this.getMergedParams(e),n=this.getData(t),r=new Blob([``,n],{type:`text/plain`}),i=t.fileName,a=typeof i==`function`?i(eq(this.gos,{})):i;Ike(this.getFileName(a),r)},{overlays:n}=this.beans;n?n.showExportOverlay(t):t()}exportDataAsCsv(e){this.export(e)}getDataAsCsv(e,t=!1){let n=t?Object.assign({},e):this.getMergedParams(e);return this.getData(n)}getDefaultFileExtension(){return`csv`}createSerializingSession(e){let{colModel:t,colNames:n,rowGroupColsSvc:r,valueSvc:i,gos:a}=this.beans,{processCellCallback:o,processHeaderCallback:s,processGroupHeaderCallback:c,processRowGroupCallback:l,suppressQuotes:u,columnSeparator:d,valueFrom:f}=e;return new Rke({colModel:t,colNames:n,valueSvc:i,gos:a,processCellCallback:o||void 0,processHeaderCallback:s||void 0,processGroupHeaderCallback:c||void 0,processRowGroupCallback:l||void 0,suppressQuotes:u||!1,columnSeparator:d||`,`,rowGroupColsSvc:r,valueFrom:f})}isExportSuppressed(){return this.gos.get(`suppressCsvExport`)}};function Bke(e,t){return e.csvCreator?.getDataAsCsv(t)}function Vke(e,t){e.csvCreator?.exportDataAsCsv(t)}var Hke={moduleName:`CsvExport`,version:aK,beans:[zke],apiFunctions:{getDataAsCsv:Bke,exportDataAsCsv:Vke},dependsOn:[Pke]},V$=class extends AG{constructor(e,t){super(),this.ctrl=e,t&&(this.beans=t)}postConstruct(){this.refreshTooltip()}setBrowserTooltip(e,t){let n=`title`,r=this.ctrl.getGui();r&&(e!=null&&(e!=``||t)?r.setAttribute(n,e):r.removeAttribute(n))}updateTooltipText(){let{getTooltipValue:e}=this.ctrl;e&&(this.tooltip=e())}createTooltipFeatureIfNeeded(){if(this.tooltipManager==null){let e=this.beans.registry.createDynamicBean(`tooltipStateManager`,!0,this.ctrl,()=>this.tooltip);e&&(this.tooltipManager=this.createBean(e,this.beans.context))}}attemptToShowTooltip(){this.tooltipManager?.prepareToShowTooltip()}attemptToHideTooltip(){this.tooltipManager?.hideTooltip()}setTooltipAndRefresh(e){this.tooltip=e,this.refreshTooltip()}refreshTooltip(e){this.browserTooltips=this.beans.gos.get(`enableBrowserTooltips`),this.updateTooltipText(),this.browserTooltips?(this.setBrowserTooltip(this.tooltip),this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context)):(this.setBrowserTooltip(e?``:null,e),this.createTooltipFeatureIfNeeded())}destroy(){this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context),super.destroy()}},Uke=1e3,Wke=1e3,H$=100,U$,W$=!1,Gke=class extends AG{constructor(e,t){super(),this.tooltipCtrl=e,this.getTooltipValue=t,this.interactionEnabled=!1,this.isInteractingWithTooltip=!1,this.state=0,this.tooltipInstanceCount=0,this.tooltipMouseTrack=!1}wireBeans(e){this.popupSvc=e.popupSvc}postConstruct(){this.gos.get(`tooltipInteraction`)&&(this.interactionEnabled=!0),this.tooltipTrigger=this.getTooltipTrigger(),this.tooltipMouseTrack=this.gos.get(`tooltipMouseTrack`);let e=this.tooltipCtrl.getGui();this.tooltipTrigger===0&&this.addManagedListeners(e,{mouseenter:this.onMouseEnter.bind(this),mouseleave:this.onMouseLeave.bind(this)}),this.tooltipTrigger===1&&this.addManagedListeners(e,{focusin:this.onFocusIn.bind(this),focusout:this.onFocusOut.bind(this)}),this.addManagedListeners(e,{mousemove:this.onMouseMove.bind(this)}),this.interactionEnabled||this.addManagedListeners(e,{mousedown:this.onMouseDown.bind(this),keydown:this.onKeyDown.bind(this)})}getGridOptionsTooltipDelay(e){let t=this.gos.get(e);return Math.max(200,t)}getTooltipDelay(e){return this.tooltipCtrl[`getTooltip${e}DelayOverride`]?.()??this.getGridOptionsTooltipDelay(`tooltip${e}Delay`)}destroy(){this.setToDoNothing(),super.destroy()}getTooltipTrigger(){let e=this.gos.get(`tooltipTrigger`);return!e||e===`hover`?0:1}onMouseEnter(e){this.interactionEnabled&&this.interactiveTooltipTimeoutId&&(this.unlockService(),this.startHideTimeout()),!oJ()&&(W$?this.showTooltipTimeoutId=window.setTimeout(()=>{this.prepareToShowTooltip(e)},H$):this.prepareToShowTooltip(e))}onMouseMove(e){this.lastMouseEvent&&=e,this.tooltipMouseTrack&&this.state===2&&this.tooltipComp&&this.positionTooltip()}onMouseDown(){this.setToDoNothing()}onMouseLeave(){this.interactionEnabled?this.lockService():this.setToDoNothing()}onFocusIn(){this.prepareToShowTooltip()}onFocusOut(e){let t=e.relatedTarget,n=this.tooltipCtrl.getGui(),r=this.tooltipComp?.getGui();this.isInteractingWithTooltip||n.contains(t)||this.interactionEnabled&&r?.contains(t)||this.setToDoNothing()}onKeyDown(){this.isInteractingWithTooltip&&=!1,this.setToDoNothing()}prepareToShowTooltip(e){if(this.state!=0||W$)return;let t=0;e&&(t=this.isLastTooltipHiddenRecently()?this.getTooltipDelay(`SwitchShow`):this.getTooltipDelay(`Show`)),this.lastMouseEvent=e||null,this.showTooltipTimeoutId=window.setTimeout(this.showTooltip.bind(this),t),this.state=1}isLastTooltipHiddenRecently(){return Date.now()-U$<Uke}setToDoNothing(e){!e&&this.state===2&&this.hideTooltip(),this.onBodyScrollEventCallback&&=(this.onBodyScrollEventCallback(),void 0),this.clearEventHandlers(),this.onDocumentKeyDownCallback&&=(this.onDocumentKeyDownCallback(),void 0),this.clearTimeouts(),this.state=0,this.lastMouseEvent=null}showTooltip(){let e=this.getTooltipValue(),t=this.tooltipCtrl;if(!nW(e)||t.shouldDisplayTooltip&&!t.shouldDisplayTooltip()){this.setToDoNothing();return}let n=this.gos.addCommon({location:t.getLocation?.()??`UNKNOWN`,value:e,hideTooltipCallback:()=>this.hideTooltip(!0),...t.getAdditionalParams?.()});this.state=2,this.tooltipInstanceCount++;let r=this.newTooltipComponentCallback.bind(this,this.tooltipInstanceCount);this.createTooltipComp(n,r)}hideTooltip(e){(e||!this.isInteractingWithTooltip)&&(this.tooltipComp&&(this.destroyTooltipComp(),U$=Date.now()),this.eventSvc.dispatchEvent({type:`tooltipHide`,parentGui:this.tooltipCtrl.getGui()}),e&&(this.isInteractingWithTooltip=!1),this.setToDoNothing(!0))}newTooltipComponentCallback(e,t){if(this.state!==2||this.tooltipInstanceCount!==e){this.destroyBean(t);return}let n=t.getGui();this.tooltipComp=t,n.classList.contains(`ag-tooltip`)||n.classList.add(`ag-tooltip-custom`),this.tooltipTrigger===0&&n.classList.add(`ag-tooltip-animate`),this.interactionEnabled&&n.classList.add(`ag-tooltip-interactive`);let r=this.getLocaleTextFunc(),i=this.popupSvc?.addPopup({eChild:n,ariaLabel:r(`ariaLabelTooltip`,`Tooltip`)});if(i&&(this.tooltipPopupDestroyFunc=i.hideFunc),this.positionTooltip(),this.tooltipTrigger===1){let e=()=>this.setToDoNothing();[this.onBodyScrollEventCallback]=this.addManagedEventListeners({bodyScroll:e}),this.setEventHandlers(e)}this.interactionEnabled&&([this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener]=this.addManagedElementListeners(n,{mouseenter:this.onTooltipMouseEnter.bind(this),mouseleave:this.onTooltipMouseLeave.bind(this)}),[this.onDocumentKeyDownCallback]=this.addManagedElementListeners(fW(this.beans),{keydown:e=>{n.contains(e?.target)||this.onKeyDown()}}),this.tooltipTrigger===1&&([this.tooltipFocusInListener,this.tooltipFocusOutListener]=this.addManagedElementListeners(n,{focusin:this.onTooltipFocusIn.bind(this),focusout:this.onTooltipFocusOut.bind(this)}))),this.eventSvc.dispatchEvent({type:`tooltipShow`,tooltipGui:n,parentGui:this.tooltipCtrl.getGui()}),this.startHideTimeout()}onTooltipMouseEnter(){this.isInteractingWithTooltip=!0,this.unlockService()}onTooltipMouseLeave(){this.isTooltipFocused()||(this.isInteractingWithTooltip=!1,this.lockService())}onTooltipFocusIn(){this.isInteractingWithTooltip=!0}isTooltipFocused(){let e=this.tooltipComp?.getGui(),t=dW(this.beans);return!!e&&e.contains(t)}onTooltipFocusOut(e){let t=this.tooltipCtrl.getGui();this.isTooltipFocused()||(this.isInteractingWithTooltip=!1,t.contains(e.relatedTarget)?this.startHideTimeout():this.hideTooltip())}positionTooltip(){let e={type:`tooltip`,ePopup:this.tooltipComp.getGui(),nudgeY:18,skipObserver:this.tooltipMouseTrack};this.lastMouseEvent?this.popupSvc?.positionPopupUnderMouseEvent({...e,mouseEvent:this.lastMouseEvent}):this.popupSvc?.positionPopupByComponent({...e,eventSource:this.tooltipCtrl.getGui(),position:`under`,keepWithinBounds:!0,nudgeY:5})}destroyTooltipComp(){this.tooltipComp.getGui().classList.add(`ag-tooltip-hiding`);let e=this.tooltipPopupDestroyFunc,t=this.tooltipComp,n=this.tooltipTrigger===0?Wke:0;window.setTimeout(()=>{e(),this.destroyBean(t)},n),this.clearTooltipListeners(),this.tooltipPopupDestroyFunc=void 0,this.tooltipComp=void 0}clearTooltipListeners(){for(let e of[this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener,this.tooltipFocusInListener,this.tooltipFocusOutListener])e&&e();this.tooltipMouseEnterListener=this.tooltipMouseLeaveListener=this.tooltipFocusInListener=this.tooltipFocusOutListener=null}lockService(){W$=!0,this.interactiveTooltipTimeoutId=window.setTimeout(()=>{this.unlockService(),this.setToDoNothing()},H$)}unlockService(){W$=!1,this.clearInteractiveTimeout()}startHideTimeout(){this.clearHideTimeout(),this.hideTooltipTimeoutId=window.setTimeout(this.hideTooltip.bind(this),this.getTooltipDelay(`Hide`))}clearShowTimeout(){this.showTooltipTimeoutId&&=(window.clearTimeout(this.showTooltipTimeoutId),void 0)}clearHideTimeout(){this.hideTooltipTimeoutId&&=(window.clearTimeout(this.hideTooltipTimeoutId),void 0)}clearInteractiveTimeout(){this.interactiveTooltipTimeoutId&&=(window.clearTimeout(this.interactiveTooltipTimeoutId),void 0)}clearTimeouts(){this.clearShowTimeout(),this.clearHideTimeout(),this.clearInteractiveTimeout()}},Kke=class extends V${constructor(e,t,n){super(e,n),this.highlightTracker=t,this.onHighlight=this.onHighlight.bind(this)}postConstruct(){super.postConstruct(),this.wireHighlightListeners()}wireHighlightListeners(){this.addManagedPropertyListener(`tooltipTrigger`,({currentValue:e})=>{this.setTooltipMode(e)}),this.setTooltipMode(this.gos.get(`tooltipTrigger`)),this.highlightTracker.addEventListener(`itemHighlighted`,this.onHighlight)}onHighlight(e){this.tooltipMode===1&&(e.highlighted?this.attemptToShowTooltip():this.attemptToHideTooltip())}setTooltipMode(e=`focus`){this.tooltipMode=+(e===`focus`)}destroy(){this.highlightTracker.removeEventListener(`itemHighlighted`,this.onHighlight),super.destroy()}},qke=class extends kJ{constructor(){super({tag:`div`,cls:`ag-tooltip`})}init(e){let{value:t}=e,n=this.getGui();n.textContent=sW(t);let r=e.location.replace(/([a-z])([A-Z0-9])/g,`$1-$2`).toLowerCase();n.classList.add(`ag-${r}-tooltip`)}},Jke=`.ag-tooltip{background-color:var(--ag-tooltip-background-color);border:var(--ag-tooltip-border);border-radius:var(--ag-border-radius);color:var(--ag-tooltip-text-color);padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);position:absolute;white-space:normal;z-index:99999;&:where(.ag-cell-editor-tooltip),&:where(.ag-cell-formula-tooltip){background-color:var(--ag-tooltip-error-background-color);border:var(--ag-tooltip-error-border);color:var(--ag-tooltip-error-text-color);font-weight:500}}.ag-tooltip-custom{position:absolute;z-index:99999}
77.ag-tooltip-custom:where(:not(.ag-tooltip-interactive)),.ag-tooltip:where(:not(.ag-tooltip-interactive)){pointer-events:none}.ag-tooltip-animate{transition:opacity 1s;&:where(.ag-tooltip-hiding){opacity:0}}`,G$=0,Yke=200,Xke=class extends AG{constructor(){super(...arguments),this.beanName=`popupSvc`,this.popupList=[]}postConstruct(){this.addManagedEventListeners({stylesChanged:this.handleThemeChange.bind(this)})}getPopupParent(){return this.gos.get(`popupParent`)||this.getDefaultPopupParent()}positionPopupUnderMouseEvent(e){let{ePopup:t,nudgeX:n,nudgeY:r,skipObserver:i}=e;this.positionPopup({ePopup:t,nudgeX:n,nudgeY:r,keepWithinBounds:!0,skipObserver:i,updatePosition:()=>this.calculatePointerAlign(e.mouseEvent),postProcessCallback:()=>this.callPostProcessPopup(e.additionalParams,e.type,e.ePopup,null,e.mouseEvent)})}calculatePointerAlign(e){let t=this.getParentRect();return{x:e.clientX-t.left,y:e.clientY-t.top}}positionPopupByComponent(e){let{ePopup:t,nudgeX:n,nudgeY:r,keepWithinBounds:i,eventSource:a,alignSide:o=`left`,position:s=`over`,type:c}=e,l=a.getBoundingClientRect(),u=this.getParentRect();this.setAlignedTo(a,t),this.positionPopup({ePopup:t,nudgeX:n,nudgeY:r,keepWithinBounds:i,updatePosition:()=>{let n=l.left-u.left;o===`right`&&(n-=t.offsetWidth-l.width);let i;return s===`over`?(i=l.top-u.top,this.setAlignedStyles(t,`over`)):(this.setAlignedStyles(t,`under`),i=this.shouldRenderUnderOrAbove(t,l,u,e.nudgeY||0)===`under`?l.top-u.top+l.height:l.top-t.offsetHeight-(r||0)*2-u.top),{x:n,y:i}},postProcessCallback:()=>this.callPostProcessPopup(e.additionalParams,c,t,a,null)})}positionPopupForMenu(e){let{eventSource:t,ePopup:n,event:r}=e,i=t.getBoundingClientRect(),a=this.getParentRect();this.setAlignedTo(t,n);let o=!1;this.positionPopup({ePopup:n,keepWithinBounds:!0,updatePosition:()=>{let e=this.keepXYWithinBounds(n,i.top-a.top,0),t=n.clientWidth>0?n.clientWidth:200;o||=(n.style.minWidth=`${t}px`,!0);let r=a.right-a.left-t,s;return this.gos.get(`enableRtl`)?(s=l(),s<0&&(s=c(),this.setAlignedStyles(n,`left`)),s>r&&(s=0,this.setAlignedStyles(n,`right`))):(s=c(),s>r&&(s=l(),this.setAlignedStyles(n,`right`)),s<0&&(s=0,this.setAlignedStyles(n,`left`))),{x:s,y:e};function c(){return i.right-a.left-2}function l(){return i.left-a.left-t}},postProcessCallback:()=>this.callPostProcessPopup(e.additionalParams,`subMenu`,n,t,r instanceof MouseEvent?r:void 0)})}shouldRenderUnderOrAbove(e,t,n,r){let i=n.bottom-t.bottom,a=t.top-n.top,o=e.offsetHeight+r;return i>o?`under`:a>o||a>i?`above`:`under`}setAlignedStyles(e,t){let n=this.getPopupIndex(e);if(n===-1)return;let{alignedToElement:r}=this.popupList[n];if(r){for(let t of[`right`,`left`,`over`,`above`,`under`])r.classList.remove(`ag-has-popup-positioned-${t}`),e.classList.remove(`ag-popup-positioned-${t}`);t&&(r.classList.add(`ag-has-popup-positioned-${t}`),e.classList.add(`ag-popup-positioned-${t}`))}}setAlignedTo(e,t){let n=this.getPopupIndex(t);if(n!==-1){let t=this.popupList[n];t.alignedToElement=e}}positionPopup(e){let{ePopup:t,keepWithinBounds:n,nudgeX:r,nudgeY:i,skipObserver:a,updatePosition:o}=e,s={width:0,height:0},c=(a=!1)=>{let{x:c,y:l}=o();a&&t.clientWidth===s.width&&t.clientHeight===s.height||(s.width=t.clientWidth,s.height=t.clientHeight,r&&(c+=r),i&&(l+=i),n&&(c=this.keepXYWithinBounds(t,c,1),l=this.keepXYWithinBounds(t,l,0)),t.style.left=`${c}px`,t.style.top=`${l}px`,e.postProcessCallback&&e.postProcessCallback())};if(c(),!a){let e=cG(this.beans,t,()=>c(!0));setTimeout(()=>e(),Yke)}}getParentRect(){let e=fW(this.beans),t=this.getPopupParent();return t===e.body?t=e.documentElement:getComputedStyle(t).position===`static`&&(t=t.offsetParent),WW(t)}keepXYWithinBounds(e,t,n){let r=n===0,i=r?`clientHeight`:`clientWidth`,a=r?`top`:`left`,o=r?`height`:`width`,s=r?`scrollTop`:`scrollLeft`,c=fW(this.beans),l=c.documentElement,u=this.getPopupParent(),d=e.getBoundingClientRect(),f=u.getBoundingClientRect(),p=c.documentElement.getBoundingClientRect(),m=u===c.body,h=Math.ceil(d[o]),g=m?(r?HW:UW)(l)+l[s]:u[i];m&&(g-=Math.abs(p[a]-f[a]));let _=g-h;return Math.min(Math.max(t,0),Math.max(_,0))}addPopup(e){let{eChild:t,ariaLabel:n,ariaOwns:r,alwaysOnTop:i,positionCallback:a,anchorToElement:o}=e,s=this.getPopupIndex(t);if(s!==-1)return{hideFunc:this.popupList[s].hideFunc};this.initialisePopupPosition(t);let c=this.createPopupWrapper(t,!!i,n,r),l=this.addEventListenersToPopup({...e,wrapperEl:c});return a&&a(),this.addPopupToPopupList(t,c,l,o),{hideFunc:l}}initialisePopupPosition(e){let t=this.getPopupParent().getBoundingClientRect();nW(e.style.top)||(e.style.top=`${t.top*-1}px`),nW(e.style.left)||(e.style.left=`${t.left*-1}px`)}createPopupWrapper(e,t,n,r){let i=this.getPopupParent(),{environment:a,gos:o}=this.beans,s=pG({tag:`div`});return a.applyThemeClasses(s),s.classList.add(`ag-popup`),e.classList.add(o.get(`enableRtl`)?`ag-rtl`:`ag-ltr`,`ag-popup-child`),e.hasAttribute(`role`)||bW(e,`dialog`),n?xW(e,n):r&&(e.id||=`popup-component-${G$}`,AW(r,e.id)),s.appendChild(e),i.appendChild(s),t?this.setAlwaysOnTop(e,!0):this.bringPopupToFront(e),s}
vendor: 39,988 bytes, line 77
77addEventListenersToPopup(e){let t=this.beans,n=fW(t),{wrapperEl:r,eChild:i,closedCallback:a,afterGuiAttached:o,closeOnEsc:s,modal:c,ariaOwns:l}=e,u=!1,d=e=>{r.contains(dW(t))&&e.key===$.ESCAPE&&!this.isStopPropagation(e)&&m({keyboardEvent:e})},f=e=>m({mouseEvent:e}),p=e=>m({touchEvent:e}),m=(e={})=>{let{mouseEvent:t,touchEvent:o,keyboardEvent:s,forceHide:c}=e;(c||!this.isEventFromCurrentPopup({mouseEvent:t,touchEvent:o},i)&&!u)&&(u=!0,r.remove(),n.removeEventListener(`keydown`,d),n.removeEventListener(`mousedown`,f),n.removeEventListener(`touchstart`,p),n.removeEventListener(`contextmenu`,f),this.eventSvc.removeListener(`dragStarted`,f),a&&a(t||o||s),this.removePopupFromPopupList(i,l))};return o&&o({hidePopup:m}),window.setTimeout(()=>{s&&n.addEventListener(`keydown`,d),c&&(n.addEventListener(`mousedown`,f),this.eventSvc.addListener(`dragStarted`,f),n.addEventListener(`touchstart`,p),n.addEventListener(`contextmenu`,f))},0),m}addPopupToPopupList(e,t,n,r){this.popupList.push({element:e,wrapper:t,hideFunc:n,instanceId:G$,isAnchored:!!r}),r&&this.setPopupPositionRelatedToElement(e,r),G$+=1}getPopupIndex(e){return this.popupList.findIndex(t=>t.element===e)}setPopupPositionRelatedToElement(e,t){let n=this.getPopupIndex(e);if(n===-1)return;let r=this.popupList[n];if(r.stopAnchoringPromise&&r.stopAnchoringPromise.then(e=>e&&e()),r.stopAnchoringPromise=void 0,r.isAnchored=!1,!t)return;let i=this.keepPopupPositionedRelativeTo({element:t,ePopup:e,hidePopup:r.hideFunc});return r.stopAnchoringPromise=i,r.isAnchored=!0,i}removePopupFromPopupList(e,t){this.setAlignedStyles(e,null),this.setPopupPositionRelatedToElement(e,null),t&&AW(t,null),this.popupList=this.popupList.filter(t=>t.element!==e)}keepPopupPositionedRelativeTo(e){let t=this.getPopupParent(),n=t.getBoundingClientRect(),{element:r,ePopup:i}=e,a=r.getBoundingClientRect(),o=e=>Number.parseInt(e.substring(0,e.length-1),10),s=(e,t)=>{let r=n[e]-a[e],s=o(i.style[e]);return{initialDiff:r,lastDiff:r,initial:s,last:s,direction:t}},c=s(`top`,0),l=s(`left`,1),u=this.beans.frameworkOverrides;return new Nq(n=>{u.wrapIncoming(()=>{ebe(()=>{let n=t.getBoundingClientRect(),a=r.getBoundingClientRect();if(a.top==0&&a.left==0&&a.height==0&&a.width==0){e.hidePopup();return}let s=(e,t)=>{let r=o(i.style[t]);e.last!==r&&(e.initial=r,e.last=r);let s=n[t]-a[t];if(s!=e.lastDiff){let n=this.keepXYWithinBounds(i,e.initial+e.initialDiff-s,e.direction);i.style[t]=`${n}px`,e.last=n}e.lastDiff=s};s(c,`top`),s(l,`left`)},200).then(e=>{n(()=>{e!=null&&window.clearInterval(e)})})},`popupPositioning`)})}isEventFromCurrentPopup(e,t){let{mouseEvent:n,touchEvent:r}=e,i=n||r;if(!i)return!1;let a=this.getPopupIndex(t);if(a===-1)return!1;for(let e=a;e<this.popupList.length;e++){let t=this.popupList[e];if(vG(t.element,i))return!0}return this.isElementWithinCustomPopup(i.target)}isElementWithinCustomPopup(e){let t=fW(this.beans);for(;e&&e!==t.body;){if(e.classList.contains(`ag-custom-component-popup`)||e.parentElement===null)return!0;e=e.parentElement}return!1}getWrapper(e){for(;!e.classList.contains(`ag-popup`)&&e.parentElement;)e=e.parentElement;return e.classList.contains(`ag-popup`)?e:null}setAlwaysOnTop(e,t){let n=this.getWrapper(e);n&&(n.classList.toggle(`ag-always-on-top`,!!t),t&&this.bringPopupToFront(n))}bringPopupToFront(e){let t=this.getPopupParent(),n=Array.prototype.slice.call(t.querySelectorAll(`.ag-popup`)),r=n.length,i=this.getWrapper(e);if(!i||r<=1||!t.contains(e))return;let a=[],o=[];for(let e of n)e!==i&&(e.classList.contains(`ag-always-on-top`)?o.push(e):a.push(e));let s=[],c=o.length,l=i.classList.contains(`ag-always-on-top`)||!c?[...a,...o,i]:[...a,i,...o];for(let e=0;e<=r;e++){let r=l[e];if(n[e]===l[e]||r===i)continue;let a=r.querySelectorAll(`div`);for(let e of a)e.scrollTop!==0&&s.push([e,e.scrollTop]);e===0?t.prepend(r):l[e-1].after(r)}for(;s.length;){let e=s.pop();e[0].scrollTop=e[1]}}handleThemeChange(e){if(e.themeChanged){let e=this.beans.environment;for(let t of this.popupList)e.applyThemeClasses(t.wrapper)}}},K$={moduleName:`Popup`,version:aK,beans:[class extends Xke{getDefaultPopupParent(){return this.beans.ctrlsSvc.get(`gridCtrl`).getGui()}callPostProcessPopup(e,t,n,r,i){let a=this.gos.getCallback(`postProcessPopup`);if(a){let{column:o,rowNode:s}=e??{};a({column:o,rowNode:s,ePopup:n,type:t,eventSource:r,mouseEvent:i})}}getActivePopups(){return this.popupList.map(e=>e.element)}hasAnchoredPopup(){return this.popupList.some(e=>e.isAnchored)}isStopPropagation(e){return SJ(e)}}]};function q$(e){return e.get(`tooltipShowMode`)===`whenTruncated`}var Zke=(e,t)=>{let n=e;return typeof n.getTranslatedMessage==`function`?n.getTranslatedMessage(t):e.message},J$=(e,t,n)=>{let{editModelSvc:r}=e,i=r?.getCellValidationModel()?.getCellValidation(t)?.errorMessages,a=r?.getRowValidationModel().getRowValidation(t)?.errorMessages,o=i||a;return o?.length?o.join(n(`tooltipValidationErrorSeparator`,`. `)):void 0},Qke=(e,t)=>{if(q$(e.gos)){if(t.isCellRenderer()){let e=t.column.getColDef();return e.showRowGroup||e.cellRenderer===`agGroupCellRenderer`?QW(()=>{let e=t.eGui;return e.querySelector(`.ag-group-value`)||e.querySelector(`.ag-cell-value`)||e}):void 0}return QW(()=>{let e=t.eGui;return e.children.length===0?e:e.querySelector(`.ag-cell-value`)})}},$ke=(e,t,n)=>{let{editSvc:r}=e,{column:i}=t,a=Qke(e,t),o=()=>r?.isEditing(t)?!1:a?i.isTooltipEnabled()?a():!1:!0;return{shouldDisplayDefault:o,shouldDisplayColumnTooltip:o,shouldDisplayCustomTooltip:n??o}},eAe=({beans:e,ctrl:t,value:n,displayFunctions:r,translate:i})=>{let{editSvc:a,formula:o,gos:s}=e,{column:c,rowNode:l}=t;if(o?.active&&c.isAllowFormula()){let e=o.getFormulaError(c,l);if(e)return{value:Zke(e,i),location:`cellFormula`,shouldDisplay:()=>!!o?.getFormulaError(c,l)}}if(!a?.isEditing(t)){let n=J$(e,t,i);if(n)return{value:n,location:`cellEditor`,shouldDisplay:()=>!a?.isEditing(t)&&!!J$(e,t,i)}}let{shouldDisplayCustomTooltip:u,shouldDisplayColumnTooltip:d}=r;if(n!=null)return{value:n,location:`cell`,shouldDisplay:u};let f=c.getColDef(),p=l.data;if(f.tooltipField&&nW(p))return{value:hZ(p,f.tooltipField,c.isTooltipFieldContainsDots()),location:`cell`,shouldDisplay:d};let m=f.tooltipValueGetter;return m?{value:m(eq(s,{location:`cell`,colDef:c.getColDef(),column:c,rowIndex:t.cellPosition.rowIndex,node:l,data:l.data,value:t.value,valueFormatted:t.valueFormatted})),location:`cell`,shouldDisplay:d}:null},Y$={moduleName:`Tooltip`,version:aK,beans:[class extends Q{constructor(){super(...arguments),this.beanName=`tooltipSvc`}setupHeaderTooltip(e,t,n,r){e&&t.destroyBean(e);let i=this.gos,a=q$(i),{column:o,eGui:s}=t,c=o.getColDef();!r&&a&&!c.headerComponent&&(r=QW(()=>s.querySelector(`.ag-header-cell-text`)));let l=`header`,u=this.beans.colNames.getDisplayNameForColumn(o,`header`,!0),d=n??u,f={getGui:()=>s,getLocation:()=>l,getTooltipValue:()=>n??c?.headerTooltipValueGetter?.(eq(i,{location:l,colDef:c,column:o,value:d,valueFormatted:u}))??c?.headerTooltip,shouldDisplayTooltip:r,getAdditionalParams:()=>({column:o,colDef:o.getColDef()})},p=this.createTooltipFeature(f);return p&&(p=t.createBean(p),t.setRefreshFunction(`tooltip`,()=>p.refreshTooltip())),p}setupHeaderGroupTooltip(e,t,n,r){e&&t.destroyBean(e);let i=this.gos,a=q$(i),{column:o,eGui:s}=t,c=o.getColGroupDef();!r&&a&&!c?.headerGroupComponent&&(r=QW(()=>s.querySelector(`.ag-header-group-text`)));let l=`headerGroup`,u=this.beans.colNames.getDisplayNameForColumnGroup(o,`header`),d=n??u,f={getGui:()=>s,getLocation:()=>l,getTooltipValue:()=>n??c?.headerTooltipValueGetter?.(eq(i,{location:l,colDef:c,column:o,value:d,valueFormatted:u}))??c?.headerTooltip,shouldDisplayTooltip:r,getAdditionalParams:()=>{let e={column:o};return c&&(e.colDef=c),e}},p=this.createTooltipFeature(f);return p&&t.createBean(p)}enableCellTooltipFeature(e,t,n){let{beans:r}=this,{column:i,rowNode:a}=e,o=$ke(r,e,n),s=this.getLocaleTextFunc(),c=null,l=()=>(c=eAe({beans:r,ctrl:e,value:t,displayFunctions:o,translate:s}),c);return this.createTooltipFeature({getGui:()=>e.eGui,getLocation:()=>c?.location??`cell`,getTooltipValue:()=>l()?.value,shouldDisplayTooltip:()=>{let e=c??l();return e?!e.shouldDisplay||e.shouldDisplay():!1},getAdditionalParams:()=>({column:i,colDef:i.getColDef(),rowIndex:e.cellPosition.rowIndex,node:a,data:a.data,valueFormatted:e.valueFormatted})},r)}setupFullWidthRowTooltip(e,t,n,r){let i={getGui:()=>t.getFullWidthElement(),getTooltipValue:()=>n,getLocation:()=>`fullWidthRow`,shouldDisplayTooltip:r},a=this.beans,o=a.context;e&&t.destroyBean(e,o);let s=this.createTooltipFeature(i,a);if(s)return t.createBean(s,o)}setupCellEditorTooltip(e,t){let{beans:n}=this,{context:r}=n,i=t.getValidationElement?.(!0)||!t.isPopup?.()&&e.eGui;if(!i)return;let a=this.createTooltipFeature({getGui:()=>i,getTooltipValue:()=>J$(n,e,this.getLocaleTextFunc()),getLocation:()=>`cellEditor`,shouldDisplayTooltip:()=>{let{editModelSvc:e}=n,t=e?.getRowValidationModel()?.getRowValidationMap(),r=e?.getCellValidationModel()?.getCellValidationMap(),i=!!t&&t.size>0,a=!!r&&r.size>0;return i||a}},n);if(a)return e.createBean(a,r)}initCol(e){let{colDef:t}=e;e.tooltipEnabled=nW(t.tooltipField)||nW(t.tooltipValueGetter)||nW(t.tooltipComponent)}createTooltipFeature(e,t){return this.beans.registry.createDynamicBean(`tooltipFeature`,!1,e,t)}}],dynamicBeans:{tooltipFeature:V$,highlightTooltipFeature:Kke,tooltipStateManager:class extends Gke{createTooltipComp(e,t){Abe(this.beans.userCompFactory,e)?.newAgStackInstance().then(t)}setEventHandlers(e){[this.onColumnMovedEventCallback]=this.addManagedEventListeners({columnMoved:e})}clearEventHandlers(){this.onColumnMovedEventCallback?.(),this.onColumnMovedEventCallback=void 0}}},userComponents:{agTooltipComponent:qke},dependsOn:[K$],css:[Jke]},X$=class{constructor(e){this.cellValueChanges=e}},Z$=class extends X${constructor(e,t,n,r){super(e),this.initialRange=t,this.finalRange=n,this.ranges=r}},tAe=10,Q$=class{constructor(e){this.actionStack=[],this.maxStackSize=e||tAe,this.actionStack=Array(this.maxStackSize)}pop(){return this.actionStack.pop()}push(e){e.cellValueChanges&&e.cellValueChanges.length>0&&(this.actionStack.length===this.maxStackSize&&this.actionStack.shift(),this.actionStack.push(e))}clear(){this.actionStack=[]}getCurrentStackSize(){return this.actionStack.length}},nAe=class extends Q{constructor(){super(...arguments),this.beanName=`undoRedo`,this.cellValueChanges=[],this.activeCellEdit=null,this.activeRowEdit=null,this.isPasting=!1,this.isRangeInAction=!1,this.batchEditing=!1,this.bulkEditing=!1,this.onCellValueChanged=e=>{let t={column:e.column,rowIndex:e.rowIndex,rowPinned:e.rowPinned},n=this.activeCellEdit!==null&&ZJ(this.activeCellEdit,t),r=this.activeRowEdit!==null&&pxe(this.activeRowEdit,t);if(!(n||r||this.isPasting||this.isRangeInAction))return;let{rowPinned:i,rowIndex:a,column:o,oldValue:s,value:c}=e,l={rowPinned:i,rowIndex:a,columnId:o.getColId(),newValue:c,oldValue:s};this.cellValueChanges.push(l)},this.clearStacks=()=>{this.undoStack.clear(),this.redoStack.clear()}}postConstruct(){let{gos:e,ctrlsSvc:t}=this.beans;if(!e.get(`undoRedoCellEditing`))return;let n=e.get(`undoRedoCellEditingLimit`);if(n<=0)return;this.undoStack=new Q$(n),this.redoStack=new Q$(n),this.addListeners();let r=this.clearStacks.bind(this);this.addManagedEventListeners({cellValueChanged:this.onCellValueChanged.bind(this),modelUpdated:e=>{e.keepUndoRedoStack||this.clearStacks()},columnPivotModeChanged:r,newColumnsLoaded:r,columnGroupOpened:r,columnRowGroupChanged:r,columnMoved:r,columnPinned:r,columnVisible:r,rowDragEnd:r}),t.whenReady(this,e=>{this.gridBodyCtrl=e.gridBodyCtrl})}getCurrentUndoStackSize(){return this.undoStack?.getCurrentStackSize()??0}getCurrentRedoStackSize(){return this.redoStack?.getCurrentStackSize()??0}undo(e){let{eventSvc:t,undoStack:n,redoStack:r}=this;t.dispatchEvent({type:`undoStarted`,source:e});let i=this.undoRedo(n,r,`initialRange`,`oldValue`,`undo`);t.dispatchEvent({type:`undoEnded`,source:e,operationPerformed:i})}redo(e){let{eventSvc:t,undoStack:n,redoStack:r}=this;t.dispatchEvent({type:`redoStarted`,source:e});let i=this.undoRedo(r,n,`finalRange`,`newValue`,`redo`);t.dispatchEvent({type:`redoEnded`,source:e,operationPerformed:i})}undoRedo(e,t,n,r,i){if(!e)return!1;let a=e.pop();return a?.cellValueChanges?(this.processAction(a,e=>e[r],i),a instanceof Z$?this.processRange(a.ranges||[a[n]]):this.processCell(a.cellValueChanges),t.push(a),!0):!1}processAction(e,t,n){let{changeDetectionSvc:r}=this.beans;r?.beginDeferred();try{for(let r of e.cellValueChanges){let{rowIndex:e,rowPinned:i,columnId:a}=r,o={rowIndex:e,rowPinned:i},s=eY(this.beans,o);s?.displayed&&s.setDataValue(a,t(r),n)}}finally{r?.endDeferred()}}processRange(e){let t,n=this.beans.rangeSvc;n.removeAllCellRanges(!0),e.forEach((r,i)=>{if(!r)return;let a=r.startRow,o=r.endRow;i===e.length-1&&(t={rowPinned:a.rowPinned,rowIndex:a.rowIndex,columnId:r.startColumn.getColId()},this.setLastFocusedCell(t));let s={rowStartIndex:a.rowIndex,rowStartPinned:a.rowPinned,rowEndIndex:o.rowIndex,rowEndPinned:o.rowPinned,columnStart:r.startColumn,columns:r.columns};n.addCellRange(s)})}processCell(e){let t=e[0],{rowIndex:n,rowPinned:r}=t,i={rowIndex:n,rowPinned:r},a=eY(this.beans,i),o={rowPinned:t.rowPinned,rowIndex:a.rowIndex,columnId:t.columnId};this.setLastFocusedCell(o)}setLastFocusedCell(e){let{rowIndex:t,columnId:n,rowPinned:r}=e,{colModel:i,focusSvc:a,rangeSvc:o}=this.beans,s=i.getCol(n);if(!s)return;let{scrollFeature:c}=this.gridBodyCtrl;c.ensureIndexVisible(t),c.ensureColumnVisible(s);let l={rowIndex:t,column:s,rowPinned:r};a.setFocusedCell({...l,forceBrowserFocus:!0}),o?.setRangeToCell(l)}addListeners(){this.addManagedEventListeners({rowEditingStarted:e=>{this.activeRowEdit={rowIndex:e.rowIndex,rowPinned:e.rowPinned}},rowEditingStopped:()=>{let e=new X$(this.cellValueChanges);this.pushActionsToUndoStack(e),this.activeRowEdit=null},cellEditingStarted:e=>{this.activeCellEdit={column:e.column,rowIndex:e.rowIndex,rowPinned:e.rowPinned}},cellEditingStopped:e=>{if(this.activeCellEdit=null,e.valueChanged&&!this.activeRowEdit&&!this.isPasting&&!this.isRangeInAction){let e=new X$(this.cellValueChanges);this.pushActionsToUndoStack(e)}},pasteStart:()=>{this.isPasting=!0},pasteEnd:()=>{let e=new X$(this.cellValueChanges);this.pushActionsToUndoStack(e),this.isPasting=!1},fillStart:()=>{this.isRangeInAction=!0},fillEnd:e=>{let t=new Z$(this.cellValueChanges,e.initialRange,e.finalRange);this.pushActionsToUndoStack(t),this.isRangeInAction=!1},keyShortcutChangedCellStart:()=>{this.isRangeInAction=!0},keyShortcutChangedCellEnd:()=>{let e,{rangeSvc:t,gos:n}=this.beans;e=t&&UK(n)?new Z$(this.cellValueChanges,void 0,void 0,[...t.getCellRanges()]):new X$(this.cellValueChanges),this.pushActionsToUndoStack(e),this.isRangeInAction=!1},batchEditingStarted:()=>this.startBigChange(`batchEditing`),batchEditingStopped:({changes:e})=>this.stopBigChange(`batchEditing`,e),bulkEditingStarted:()=>this.startBigChange(`bulkEditing`),bulkEditingStopped:({changes:e})=>this.stopBigChange(`bulkEditing`,e)})}startBigChange(e){this.updateBigChange(e,!0)}updateBigChange(e,t){e===`bulkEditing`?this.bulkEditing=t:this.batchEditing=t}stopBigChange(e,t){if(e===`bulkEditing`&&!this.bulkEditing||e===`batchEditing`&&!this.batchEditing||(this.updateBigChange(e,!1),t?.length===0))return;let n=new X$(t??[]);this.pushActionsToUndoStack(n),this.cellValueChanges=[]}pushActionsToUndoStack(e){this.undoStack.push(e),this.cellValueChanges=[],this.redoStack.clear()}},rAe=`.ag-cell-inline-editing{border:var(--ag-cell-editing-border)!important;border-radius:var(--ag-border-radius);box-shadow:var(--ag-cell-editing-shadow);padding:0;z-index:1;.ag-cell-edit-wrapper,.ag-cell-editor,.ag-cell-wrapper,:where(.ag-cell-editor) .ag-input-field-input,:where(.ag-cell-editor) .ag-wrapper{height:100%;line-height:normal;min-height:100%;width:100%}&.ag-cell-editing-error{border-color:var(--ag-invalid-color)!important}}:where(.ag-popup-editor) .ag-large-text{background-color:var(--ag-background-color);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dropdown-shadow);padding:0}.ag-large-text-input{display:block;height:auto;padding:var(--ag-cell-horizontal-padding)}:where(.ag-rtl .ag-large-text-input) .ag-text-area-input{resize:none}:where(.ag-ltr) .ag-checkbox-edit{padding-left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-checkbox-edit{padding-right:var(--ag-cell-horizontal-padding)}:where(.ag-row.ag-row-editing-invalid .ag-cell-inline-editing){opacity:.8}.ag-popup-editor{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}`,iAe={tag:`div`,cls:`ag-cell-wrapper ag-cell-edit-wrapper ag-checkbox-edit`,children:[{tag:`ag-checkbox`,ref:`eEditor`,role:`presentation`}]},aAe=class extends AJ{constructor(){super(iAe,[rZ]),this.eEditor=null}initialiseEditor(e){this.agSetEditValue(e.value),this.eEditor.getInputElement().setAttribute(`tabindex`,`-1`),this.addManagedListeners(this.eEditor,{fieldValueChanged:e=>this.setAriaLabel(e.selected)})}agSetEditValue(e){this.params.value=e;let t=e??void 0;this.eEditor.setValue(t,!0),this.setAriaLabel(t)}getValue(){return this.eEditor.getValue()}focusIn(){this.eEditor.getFocusableElement().focus()}afterGuiAttached(){this.params.cellStartedEdit&&this.focusIn()}isPopup(){return!1}setAriaLabel(e){let t=this.getLocaleTextFunc(),n=jW(t,e),r=t(`ariaToggleCellValue`,`Press SPACE to toggle cell value`);this.eEditor.setInputAriaLabel(`${r} (${n})`)}getValidationElement(e){return e?this.params.eGridCell:this.eEditor.getInputElement()}getValidationErrors(){let{params:e}=this,{getValidationErrors:t}=e,n=this.getValue();return t?t({value:n,internalErrors:null,cellEditorParams:e}):null}},$$=class extends tZ{constructor(e,t=`ag-text-field`,n=`text`){super(e,t,n)}postConstruct(){super.postConstruct(),this.config.allowedCharPattern&&this.preventDisallowedCharacters()}setValue(e,t){let n=this.eInput;return n.value!==e&&(n.value=nW(e)?e:``),super.setValue(e,t)}setStartValue(e){this.setValue(e,!0)}setCustomValidity(e){let t=this.eInput,n=e.length>0;t.setCustomValidity(e),n&&t.reportValidity(),wW(t,n)}preventDisallowedCharacters(){let e=RegExp(`[${this.config.allowedCharPattern}]`);this.addManagedListeners(this.eInput,{keydown:t=>{IY(t)&&t.key&&!e.test(t.key)&&t.preventDefault()},paste:t=>{(t.clipboardData?.getData(`text`))?.split(``).some(t=>!e.test(t))&&t.preventDefault()}})}},e1={selector:`AG-INPUT-TEXT-FIELD`,component:$$},t1={selector:`AG-INPUT-DATE-FIELD`,component:class extends $${constructor(e){super(e,`ag-date-field`,`date`)}postConstruct(){super.postConstruct();let e=rJ();this.addManagedListeners(this.eInput,{wheel:this.onWheel.bind(this),mousedown:()=>{this.isDisabled()||e||this.eInput.focus()}}),this.eInput.step=`any`}onWheel(e){dW(this.beans)===this.eInput&&e.preventDefault()}setMin(e){let t=e instanceof Date?cZ(e??null,!!this.includeTime)??void 0:e;return this.min===t?this:(this.min=t,oG(this.eInput,`min`,t),this)}setMax(e){let t=e instanceof Date?cZ(e??null,!!this.includeTime)??void 0:e;return this.max===t?this:(this.max=t,oG(this.eInput,`max`,t),this)}setStep(e){return this.step===e?this:(this.step=e,oG(this.eInput,`step`,e),this)}setIncludeTime(e){return this.includeTime===e?this:(this.includeTime=e,super.setInputType(e?`datetime-local`:`date`),e&&this.setStep(1),this)}getDate(){if(this.eInput.validity.valid)return mZ(this.getValue())??void 0}setDate(e,t){this.setValue(cZ(e??null,this.includeTime),t)}}},n1=class extends AJ{constructor(e){super(),this.cellEditorInput=e,this.eEditor=null}initialiseEditor(e){let{cellEditorInput:t}=this;this.setTemplate({tag:`div`,cls:`ag-cell-edit-wrapper`,children:[t.getTemplate()]},t.getAgComponents());let{eEditor:n}=this,{cellStartedEdit:r,eventKey:i,suppressPreventDefault:a}=e;n.getInputElement().setAttribute(`title`,``),t.init(n,e);let o,s=!0;r?(this.focusAfterAttached=!0,i===$.BACKSPACE||i===$.DELETE?o=``:i&&i.length===1?a?s=!1:o=i:(o=t.getStartValue(),i!==$.F2&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,o=t.getStartValue()),s&&o!=null&&n.setStartValue(o),this.addGuiEventListener(`keydown`,e=>{let{key:t}=e;(t===$.PAGE_UP||t===$.PAGE_DOWN)&&e.preventDefault()})}afterGuiAttached(){let e=this.getLocaleTextFunc(),t=this.eEditor;if(t.setInputAriaLabel(e(`ariaInputEditor`,`Input Editor`)),!this.focusAfterAttached)return;rJ()||t.getFocusableElement().focus();let n=t.getInputElement();this.highlightAllOnFocus?n.select():this.cellEditorInput.setCaret?.()}focusIn(){let{eEditor:e}=this,t=e.getFocusableElement(),n=e.getInputElement();t.focus(),n.select()}getValue(){return this.cellEditorInput.getValue()}agSetEditValue(e){this.params.value=e;let t=this.cellEditorInput.getStartValue();this.eEditor.setStartValue(t??null)}isPopup(){return!1}getValidationElement(){return this.eEditor.getInputElement()}getValidationErrors(){return this.cellEditorInput.getValidationErrors()}},oAe={tag:`ag-input-date-field`,ref:`eEditor`,cls:`ag-cell-editor`},sAe=class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t}getTemplate(){return oAe}getAgComponents(){return[t1]}init(e,t){this.eEditor=e,this.params=t;let{min:n,max:r,step:i,colDef:a}=t;n!=null&&e.setMin(n),r!=null&&e.setMax(r),i!=null&&e.setStep(i),this.includeTime=t.includeTime??this.getDataTypeService()?.getDateIncludesTimeFlag?.(a.cellDataType),this.includeTime!=null&&e.setIncludeTime(this.includeTime)}getValidationErrors(){let e=this.eEditor.getInputElement().valueAsDate,{params:t}=this,{min:n,max:r,getValidationErrors:i}=t,a=[],o=this.getLocaleTextFunc();if(e instanceof Date&&!isNaN(e.getTime())){if(n){let t=n instanceof Date?n:new Date(n);if(e<t){let e=t.toLocaleDateString();a.push(o(`minDateValidation`,`Date must be after ${e}`,[e]))}}if(r){let t=r instanceof Date?r:new Date(r);if(e>t){let e=t.toLocaleDateString();a.push(o(`maxDateValidation`,`Date must be before ${e}`,[e]))}}}return a.length||(a=null),i?i({value:e,cellEditorParams:t,internalErrors:a}):a}getValue(){let{eEditor:e,params:t}=this,n=e.getDate();return!nW(n)&&!nW(t.value)?t.value:n??null}getStartValue(){let{value:e}=this.params;if(e instanceof Date)return cZ(e,this.includeTime??!1)}},cAe=class extends n1{constructor(){super(new sAe(()=>this.beans.dataTypeSvc,()=>this.getLocaleTextFunc()))}},lAe={tag:`ag-input-date-field`,ref:`eEditor`,cls:`ag-cell-editor`},uAe=class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t}getTemplate(){return lAe}getAgComponents(){return[t1]}init(e,t){this.eEditor=e,this.params=t;let{min:n,max:r,step:i,colDef:a}=t;n!=null&&e.setMin(n),r!=null&&e.setMax(r),i!=null&&e.setStep(i),this.includeTime=t.includeTime??this.getDataTypeService()?.getDateIncludesTimeFlag?.(a.cellDataType),this.includeTime!=null&&e.setIncludeTime(this.includeTime)}getValidationErrors(){let{eEditor:e,params:t}=this,n=e.getInputElement().value,r=this.formatDate(this.parseDate(n??void 0)),{min:i,max:a,getValidationErrors:o}=t,s=[];if(r){let e=new Date(r),t=this.getLocaleTextFunc();if(i){let n=new Date(i);if(e<n){let e=n.toLocaleDateString();s.push(t(`minDateValidation`,`Date must be after ${e}`,[e]))}}if(a){let n=new Date(a);if(e>n){let e=n.toLocaleDateString();s.push(t(`maxDateValidation`,`Date must be before ${e}`,[e]))}}}return s.length||(s=null),o?o({value:this.getValue(),cellEditorParams:t,internalErrors:s}):s}getValue(){let{params:e,eEditor:t}=this,n=this.formatDate(t.getDate());return!nW(n)&&!nW(e.value)?e.value:e.parseValue(n??``)}getStartValue(){return cZ(this.parseDate(this.params.value??void 0)??null,this.includeTime??!1)}parseDate(e){let t=this.getDataTypeService();return t?t.getDateParserFunction(this.params.column)(e):mZ(e)??void 0}formatDate(e){let t=this.getDataTypeService();return t?t.getDateFormatterFunction(this.params.column)(e):cZ(e??null,this.includeTime??!1)??void 0}},dAe=class extends n1{constructor(){super(new uAe(()=>this.beans.dataTypeSvc,()=>this.getLocaleTextFunc()))}},fAe={selector:`AG-INPUT-TEXT-AREA`,component:class extends tZ{constructor(e){super(e,`ag-text-area`,null,`textarea`)}setValue(e,t){let n=super.setValue(e,t);return this.eInput.value=e,n}setCols(e){return this.eInput.cols=e,this}setRows(e){return this.eInput.rows=e,this}}},pAe={tag:`div`,cls:`ag-large-text`,children:[{tag:`ag-input-text-area`,ref:`eEditor`,cls:`ag-large-text-input`}]},mAe=class extends AJ{constructor(){super(pAe,[fAe]),this.eEditor=null}initialiseEditor(e){let{eEditor:t}=this,{cellStartedEdit:n,eventKey:r,maxLength:i,cols:a,rows:o}=e;this.focusAfterAttached=n,t.getInputElement().setAttribute(`title`,``),t.setMaxLength(i||200).setCols(a||60).setRows(o||10);let s;n?(this.focusAfterAttached=!0,r===$.BACKSPACE||r===$.DELETE?s=``:r&&r.length===1?s=r:(s=this.getStartValue(e),r!==$.F2&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,s=this.getStartValue(e)),s!=null&&t.setValue(s,!0),this.addGuiEventListener(`keydown`,this.onKeyDown.bind(this)),this.activateTabIndex()}getStartValue(e){let{value:t}=e;return t?.toString()??t}agSetEditValue(e){this.params.value=e;let t=this.getStartValue(this.params);this.eEditor.setValue(t??``,!0)}onKeyDown(e){let t=e.key;(t===$.LEFT||t===$.UP||t===$.RIGHT||t===$.DOWN||e.shiftKey&&t===$.ENTER)&&e.stopPropagation()}afterGuiAttached(){let{eEditor:e,focusAfterAttached:t,highlightAllOnFocus:n}=this,r=this.getLocaleTextFunc();e.setInputAriaLabel(r(`ariaInputEditor`,`Input Editor`)),t&&(e.getFocusableElement().focus(),n&&e.getInputElement().select())}getValue(){let{eEditor:e,params:t}=this,{value:n}=t,r=e.getValue();return!nW(r)&&!nW(n)?n:t.parseValue(r)}getValidationElement(){return this.eEditor.getInputElement()}getValidationErrors(){let{params:e}=this,{maxLength:t,getValidationErrors:n}=e,r=this.getLocaleTextFunc(),i=this.getValue(),a=[];return typeof i==`string`&&t!=null&&i.length>t&&a.push(r(`maxLengthValidation`,`Must be ${t} characters or fewer.`,[String(t)])),a.length||(a=null),n?n({value:i,internalErrors:a,cellEditorParams:e}):a}},r1=class extends $${constructor(e){super(e,`ag-number-field`,`number`)}postConstruct(){super.postConstruct();let e=this.eInput;this.addManagedListeners(e,{blur:()=>{let t=Number.parseFloat(e.value),n=isNaN(t)?``:this.normalizeValue(t.toString());this.value!==n&&this.setValue(n)},wheel:this.onWheel.bind(this)}),e.step=`any`;let{precision:t,min:n,max:r,step:i}=this.config;typeof t==`number`&&this.setPrecision(t),typeof n==`number`&&this.setMin(n),typeof r==`number`&&this.setMax(r),typeof i==`number`&&this.setStep(i)}onWheel(e){dW(this.beans)===this.eInput&&e.preventDefault()}normalizeValue(e){return e===``?``:(this.precision!=null&&(e=this.adjustPrecision(e)),e)}adjustPrecision(e,t){let n=this.precision;if(n==null)return e;if(t){let t=Number.parseFloat(e).toFixed(n);return Number.parseFloat(t).toString()}let r=String(e).split(`.`);if(r.length>1){if(r[1].length<=n)return e;if(n>0)return`${r[0]}.${r[1].slice(0,n)}`}return r[0]}setMin(e){return this.min===e?this:(this.min=e,oG(this.eInput,`min`,e),this)}setMax(e){return this.max===e?this:(this.max=e,oG(this.eInput,`max`,e),this)}setPrecision(e){return this.precision=e,this}setStep(e){return this.step===e?this:(this.step=e,oG(this.eInput,`step`,e),this)}setValue(e,t){return this.setValueOrInputValue(e=>super.setValue(e,t),()=>this,e)}setStartValue(e){return this.setValueOrInputValue(e=>super.setValue(e,!0),e=>{this.eInput.value=e},e)}setValueOrInputValue(e,t,n){if(nW(n)){let r=this.isScientificNotation(n);if(r&&this.eInput.validity.valid)return e(n);if(!r){n=this.adjustPrecision(n);let e=this.normalizeValue(n);r=n!=e}if(r)return t(n)}return e(n)}getValue(e=!1){let t=this.eInput;if(!t.validity.valid&&!e)return;let n=t.value;return this.isScientificNotation(n)?this.adjustPrecision(n,!0):super.getValue()}isScientificNotation(e){return typeof e==`string`&&e.includes(`e`)}},hAe={selector:`AG-INPUT-NUMBER-FIELD`,component:r1},gAe={tag:`ag-input-number-field`,ref:`eEditor`,cls:`ag-cell-editor`},_Ae=class{constructor(e){this.getLocaleTextFunc=e}getTemplate(){return gAe}getAgComponents(){return[hAe]}init(e,t){this.eEditor=e,this.params=t;let{max:n,min:r,precision:i,step:a}=t;n!=null&&e.setMax(n),r!=null&&e.setMin(r),i!=null&&e.setPrecision(i),a!=null&&e.setStep(a);let o=e.getInputElement();t.preventStepping?e.addManagedElementListeners(o,{keydown:this.preventStepping}):t.showStepperButtons&&o.classList.add(`ag-number-field-input-stepper`)}getValidationErrors(){let{params:e}=this,{min:t,max:n,getValidationErrors:r}=e,i=this.eEditor.getInputElement().valueAsNumber,a=this.getLocaleTextFunc(),o=[];return typeof i==`number`&&(t!=null&&i<t&&o.push(a(`minValueValidation`,`Must be greater than or equal to ${t}.`,[String(t)])),n!=null&&i>n&&o.push(a(`maxValueValidation`,`Must be less than or equal to ${n}.`,[String(n)]))),o.length||(o=null),r?r({value:i,cellEditorParams:e,internalErrors:o}):o}preventStepping(e){(e.key===$.UP||e.key===$.DOWN)&&e.preventDefault()}getValue(){let{eEditor:e,params:t}=this,n=e.getValue();if(!nW(n)&&!nW(t.value))return t.value;let r=t.parseValue(n);if(r==null)return r;if(typeof r==`string`){if(r===``)return null;r=Number(r)}return isNaN(r)?null:r}getStartValue(){return this.params.value}setCaret(){rJ()&&this.eEditor.getInputElement().focus({preventScroll:!0})}},vAe=class extends n1{constructor(){super(new _Ae(()=>this.getLocaleTextFunc()))}},yAe=`.ag-list-item{align-items:center;display:flex;height:var(--ag-list-item-height);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;&.ag-active-item{background-color:var(--ag-row-hover-color)}}`,bAe=`ag-active-item`,xAe=(e,t)=>({tag:`div`,cls:`ag-list-item ag-${e}-list-item`,attrs:{role:`option`},children:[{tag:`span`,cls:`ag-list-item-text ag-${e}-list-item-text`,ref:`eText`,children:t}]}),SAe=class extends qq{constructor(e,t,n){super(xAe(e,t)),this.label=t,this.value=n,this.eText=null}postConstruct(){this.createTooltip(),this.addEventListeners()}setHighlighted(e){let t=this.getGui();t.classList.toggle(bAe,e),kW(t,e),this.dispatchLocalEvent({type:`itemHighlighted`,highlighted:e})}getHeight(){return this.getGui().clientHeight}setIndex(e,t){let n=this.getGui();Tve(n,e),wve(n,t)}createTooltip(){let e=this.createOptionalManagedBean(this.beans.registry.createDynamicBean(`highlightTooltipFeature`,!1,{getTooltipValue:()=>this.label,getGui:()=>this.getGui(),getLocation:()=>`UNKNOWN`,shouldDisplayTooltip:()=>$W(this.eText)},this));e&&(this.tooltipFeature=e)}addEventListeners(){let e=this.getParentComponent();e&&(this.addGuiEventListener(`mouseover`,()=>{e.highlightItem(this)}),this.addGuiEventListener(`mousedown`,t=>{t.preventDefault(),t.stopPropagation(),e.setValue(this.value)}))}},CAe=class extends qq{constructor(e=`default`){super({tag:`div`,cls:`ag-list ag-${e}-list`}),this.cssIdentifier=e,this.options=[],this.listItems=[],this.highlightedItem=null,this.registerCSS(yAe)}postConstruct(){let e=this.getGui();this.addManagedElementListeners(e,{mouseleave:()=>this.clearHighlighted()})}handleKeyDown(e){let t=e.key;switch(t){case $.ENTER:if(!this.highlightedItem)this.setValue(this.getValue());else{let e=this.listItems.indexOf(this.highlightedItem);this.setValueByIndex(e)}break;case $.DOWN:case $.UP:e.preventDefault(),this.navigate(t);break;case $.PAGE_DOWN:case $.PAGE_UP:case $.PAGE_HOME:case $.PAGE_END:e.preventDefault(),this.navigateToPage(t)}}addOptions(e){for(let t of e)this.addOption(t);return this}addOption(e){let{value:t,text:n}=e,r=n??t;return this.options.push({value:t,text:r}),this.renderOption(t,r),this.updateIndices(),this}clearOptions(){this.options=[],this.reset(!0);for(let e of this.listItems)e.destroy();qW(this.getGui()),this.listItems=[],this.refreshAriaRole()}updateOptions(e){let t=this.options!==e;return t&&(this.clearOptions(),this.addOptions(e)),t}setValue(e,t){if(this.value===e)return this.fireItemSelected(),this;if(e==null)return this.reset(t),this;let n=this.options.findIndex(t=>t.value===e);if(n!==-1){let e=this.options[n];this.value=e.value,this.displayValue=e.text,this.highlightItem(this.listItems[n]),t||this.fireChangeEvent()}return this}setValueByIndex(e){return this.setValue(this.options[e].value)}getValue(){return this.value}getDisplayValue(){return this.displayValue}refreshHighlighted(){this.clearHighlighted();let e=this.options.findIndex(e=>e.value===this.value);e!==-1&&this.highlightItem(this.listItems[e])}highlightItem(e){let t=e.getGui();if(!XW(t))return;this.clearHighlighted(),e.setHighlighted(!0),this.highlightedItem=e;let{scrollTop:n,clientHeight:r}=this.getGui(),{offsetTop:i,offsetHeight:a}=t;(i+a>n+r||i<n)&&t.scrollIntoView({block:`nearest`})}hideItemTooltip(){this.highlightedItem?.tooltipFeature?.attemptToHideTooltip()}destroy(){this.hideItemTooltip(),super.destroy()}reset(e){this.value=null,this.displayValue=null,this.clearHighlighted(),e||this.fireChangeEvent()}clearHighlighted(){this.highlightedItem?.setHighlighted(!1),this.highlightedItem=null}renderOption(e,t){let n=new SAe(this.cssIdentifier,t,e);n.setParentComponent(this);let r=this.createManagedBean(n);this.listItems.push(r),this.getGui().appendChild(r.getGui())}navigate(e){let t=e===$.DOWN,n,{listItems:r,highlightedItem:i}=this;if(!i)n=t?r[0]:XU(r);else{let e=r.indexOf(i)+(t?1:-1);e=Math.min(Math.max(e,0),r.length-1),n=r[e]}this.highlightItem(n)}navigateToPage(e){let{listItems:t,highlightedItem:n}=this;if(!n||t.length===0)return;let r=t.indexOf(n),i=this.options.length-1,a=t[0].getHeight(),o=Math.floor(this.getGui().clientHeight/a),s=-1;e===$.PAGE_HOME?s=0:e===$.PAGE_END?s=i:e===$.PAGE_DOWN?s=Math.min(r+o,i):e===$.PAGE_UP&&(s=Math.max(r-o,0)),s!==-1&&this.highlightItem(t[s])}refreshAriaRole(){bW(this.getGui(),this.options.length===0?`presentation`:`listbox`)}updateIndices(){this.refreshAriaRole();let e=this.listItems,t=e.length;e.forEach((e,n)=>{e.setIndex(n+1,t)})}fireChangeEvent(){this.dispatchLocalEvent({type:`fieldValueChanged`}),this.fireItemSelected()}fireItemSelected(){this.dispatchLocalEvent({type:`selectedItem`})}},wAe=`.ag-picker-field-display{flex:1 1 auto}.ag-picker-field{align-items:center;display:flex}.ag-picker-field-icon{border:0;cursor:pointer;display:flex;margin:0;padding:0}.ag-picker-field-wrapper{background-color:var(--ag-picker-button-background-color);border:var(--ag-picker-button-border);border-radius:5px;min-height:max(var(--ag-list-item-height),calc(var(--ag-spacing)*4));overflow:hidden;&:where(.invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}}.ag-picker-field-wrapper:where(.ag-picker-has-focus),.ag-picker-field-wrapper:where(:focus-within){background-color:var(--ag-picker-button-focus-background-color);border:var(--ag-picker-button-focus-border);box-shadow:var(--ag-focus-shadow);&:where(.invalid){box-shadow:var(--ag-focus-error-shadow)}}.ag-picker-field-wrapper:disabled{opacity:.5}`,TAe={tag:`div`,cls:`ag-picker-field`,role:`presentation`,children:[{tag:`div`,ref:`eLabel`},{tag:`div`,ref:`eWrapper`,cls:`ag-wrapper ag-picker-field-wrapper ag-picker-collapsed`,children:[{tag:`div`,ref:`eDisplayField`,cls:`ag-picker-field-display`},{tag:`div`,ref:`eIcon`,cls:`ag-picker-field-icon`,attrs:{"aria-hidden":`true`}}]}]},EAe=class extends eZ{constructor(e){if(super(e,e?.template||TAe,e?.agComponents||[],e?.className),this.isPickerDisplayed=!1,this.skipClick=!1,this.pickerGap=4,this.hideCurrentPicker=null,this.eLabel=null,this.eWrapper=null,this.eDisplayField=null,this.eIcon=null,this.registerCSS(wAe),this.ariaRole=e?.ariaRole,this.onPickerFocusIn=this.onPickerFocusIn.bind(this),this.onPickerFocusOut=this.onPickerFocusOut.bind(this),!e)return;let{pickerGap:t,maxPickerHeight:n,variableWidth:r,minPickerWidth:i,maxPickerWidth:a}=e;t!=null&&(this.pickerGap=t),this.variableWidth=!!r,n!=null&&this.setPickerMaxHeight(n),i!=null&&this.setPickerMinWidth(i),a!=null&&this.setPickerMaxWidth(a)}postConstruct(){super.postConstruct(),this.setupAria();let e=`ag-${this.getCompId()}-display`;this.eDisplayField.setAttribute(`id`,e);let t=this.getAriaElement();this.addManagedElementListeners(t,{keydown:this.onKeyDown.bind(this)}),this.addManagedElementListeners(this.eLabel,{mousedown:this.onLabelOrWrapperMouseDown.bind(this)}),this.addManagedElementListeners(this.eWrapper,{mousedown:this.onLabelOrWrapperMouseDown.bind(this)});let{pickerIcon:n,inputWidth:r}=this.config;if(n){let e=this.beans.iconSvc.createIconNoSpan(n);e&&this.eIcon.appendChild(e)}r!=null&&this.setInputWidth(r)}setupAria(){let e=this.getAriaElement();e.setAttribute(`tabindex`,this.gos.get(`tabIndex`).toString()),EW(e,!1),this.ariaRole&&bW(e,this.ariaRole)}onLabelOrWrapperMouseDown(e){if(e){let t=this.getFocusableElement();if(t!==this.eWrapper&&e?.target===t)return;e.preventDefault(),this.getFocusableElement().focus()}if(this.skipClick){this.skipClick=!1;return}this.isDisabled()||(this.isPickerDisplayed?this.hidePicker():this.showPicker())}onKeyDown(e){switch(e.key){case $.UP:case $.DOWN:case $.ENTER:case $.SPACE:e.preventDefault(),this.onLabelOrWrapperMouseDown();break;case $.ESCAPE:this.isPickerDisplayed&&(e.preventDefault(),e.stopPropagation(),this.hideCurrentPicker&&this.hideCurrentPicker())}}showPicker(){this.isPickerDisplayed=!0,this.pickerComponent||=this.createPickerComponent();let e=this.pickerComponent.getGui();e.addEventListener(`focusin`,this.onPickerFocusIn),e.addEventListener(`focusout`,this.onPickerFocusOut),this.hideCurrentPicker=this.renderAndPositionPicker(),this.toggleExpandedStyles(!0)}renderAndPositionPicker(){let e=this.pickerComponent.getGui();this.gos.get(`suppressScrollWhenPopupsAreOpen`)||([this.destroyMouseWheelFunc]=this.addManagedEventListeners({bodyScroll:()=>{this.hidePicker()}}));let t=this.getLocaleTextFunc(),{config:{pickerAriaLabelKey:n,pickerAriaLabelValue:r,modalPicker:i=!0},maxPickerHeight:a,minPickerWidth:o,maxPickerWidth:s,variableWidth:c,beans:l,eWrapper:u}=this,d={modal:i,eChild:e,closeOnEsc:!0,closedCallback:()=>{let e=pW(l);this.beforeHidePicker(),e&&this.isAlive()&&this.getFocusableElement().focus()},ariaLabel:t(n,r),anchorToElement:u};e.style.position=`absolute`;let f=l.popupSvc,p=f.addPopup(d);c?(o&&(e.style.minWidth=o),e.style.width=iG(UW(u)),s&&(e.style.maxWidth=s)):tG(e,s??UW(u));let m=a??`${BW(f.getPopupParent())}px`;return e.style.setProperty(`max-height`,m),this.alignPickerToComponent(),p.hideFunc}alignPickerToComponent(){if(!this.pickerComponent)return;let{pickerGap:e,config:{pickerType:t},beans:{popupSvc:n,gos:r},eWrapper:i,pickerComponent:a}=this,o=r.get(`enableRtl`)?`right`:`left`;n.positionPopupByComponent({type:t,eventSource:i,ePopup:a.getGui(),position:`under`,alignSide:o,keepWithinBounds:!0,nudgeY:e})}beforeHidePicker(){this.destroyMouseWheelFunc&&=(this.destroyMouseWheelFunc(),void 0),this.toggleExpandedStyles(!1);let e=this.pickerComponent.getGui();e.removeEventListener(`focusin`,this.onPickerFocusIn),e.removeEventListener(`focusout`,this.onPickerFocusOut),this.isPickerDisplayed=!1,this.pickerComponent=void 0,this.hideCurrentPicker=null}toggleExpandedStyles(e){if(!this.isAlive())return;EW(this.getAriaElement(),e);let t=this.eWrapper.classList;t.toggle(`ag-picker-expanded`,e),t.toggle(`ag-picker-collapsed`,!e)}onPickerFocusIn(){this.togglePickerHasFocus(!0)}onPickerFocusOut(e){this.pickerComponent?.getGui().contains(e.relatedTarget)||this.togglePickerHasFocus(!1)}togglePickerHasFocus(e){this.pickerComponent&&this.eWrapper.classList.toggle(`ag-picker-has-focus`,e)}hidePicker(){this.hideCurrentPicker&&(this.hideCurrentPicker(),this.dispatchLocalEvent({type:`pickerHidden`}))}setInputWidth(e){return tG(this.eWrapper,e),this}getFocusableElement(){return this.eWrapper}setPickerGap(e){return this.pickerGap=e,this}setPickerMinWidth(e){return typeof e==`number`&&(e=`${e}px`),this.minPickerWidth=e??void 0,this}setPickerMaxWidth(e){return typeof e==`number`&&(e=`${e}px`),this.maxPickerWidth=e??void 0,this}setPickerMaxHeight(e){return typeof e==`number`&&(e=`${e}px`),this.maxPickerHeight=e??void 0,this}destroy(){this.hidePicker(),super.destroy()}},DAe=`.ag-select{align-items:center;display:flex;&.ag-disabled{opacity:.5}}
77.ag-select:where(:not(.ag-cell-editor,.ag-label-align-top)){min-height:var(--ag-list-item-height)}:where(.ag-select){.ag-picker-field-wrapper{cursor:default;padding-left:var(--ag-spacing);padding-right:var(--ag-spacing)}&.ag-disabled .ag-picker-field-wrapper:focus{box-shadow:none}.ag-picker-field-display{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ag-picker-field-icon{align-items:center;display:flex}}.ag-select-list{background-color:var(--ag-picker-list-background-color);border:var(--ag-picker-list-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dropdown-shadow);overflow:hidden auto}.ag-select-list-item{cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none}:where(.ag-ltr) .ag-select-list-item{padding-left:var(--ag-spacing)}:where(.ag-rtl) .ag-select-list-item{padding-right:var(--ag-spacing)}.ag-select-list-item-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}`,i1=class extends EAe{constructor(e){super({pickerAriaLabelKey:`ariaLabelSelectField`,pickerAriaLabelValue:`Select Field`,pickerType:`ag-list`,className:`ag-select`,pickerIcon:`selectOpen`,ariaRole:`combobox`,...e}),this.registerCSS(DAe)}postConstruct(){this.tooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean(`tooltipFeature`,!1,{shouldDisplayTooltip:QW(()=>this.eDisplayField),getGui:()=>this.getGui()})),super.postConstruct(),this.createListComponent(),this.eWrapper.tabIndex=this.gos.get(`tabIndex`);let{options:e,value:t,placeholder:n}=this.config;e!=null&&this.addOptions(e),t!=null&&this.setValue(t,!0),n&&t==null&&(this.eDisplayField.textContent=n),this.addManagedElementListeners(this.eWrapper,{focusout:this.onWrapperFocusOut.bind(this)})}onWrapperFocusOut(e){this.eWrapper.contains(e.relatedTarget)||this.hidePicker()}createListComponent(){let e=this.createBean(new CAe(`select`));this.listComponent=e,e.setParentComponent(this);let t=e.getAriaElement(),n=`ag-select-list-${e.getCompId()}`;t.setAttribute(`id`,n),Nve(this.getAriaElement(),t),e.addManagedElementListeners(e.getGui(),{mousedown:e=>{e?.preventDefault()}}),e.addManagedListeners(e,{selectedItem:()=>{this.hidePicker(),this.dispatchLocalEvent({type:`selectedItem`})},fieldValueChanged:()=>{this.listComponent&&(this.setValue(this.listComponent.getValue(),!1,!0),this.hidePicker())}})}createPickerComponent(){return this.listComponent}beforeHidePicker(){this.listComponent?.hideItemTooltip(),super.beforeHidePicker()}onKeyDown(e){let{key:t}=e;switch(t===$.TAB&&this.hidePicker(),t){case $.ENTER:case $.UP:case $.DOWN:case $.PAGE_UP:case $.PAGE_DOWN:case $.PAGE_HOME:case $.PAGE_END:e.preventDefault(),this.isPickerDisplayed?this.listComponent?.handleKeyDown(e):super.onKeyDown(e);break;case $.ESCAPE:super.onKeyDown(e);break;case $.SPACE:this.isPickerDisplayed?e.preventDefault():super.onKeyDown(e)}}showPicker(){let e=this.listComponent;e&&(super.showPicker(),e.refreshHighlighted())}addOptions(e){for(let t of e)this.addOption(t);return this}addOption(e){return this.listComponent.addOption(e),this}clearOptions(){return this.listComponent?.clearOptions(),this.setValue(void 0,!0),this}updateOptions(e){return this.listComponent?.updateOptions(e)&&this.setValue(void 0,!0),this}setValue(e,t,n){let{listComponent:r,config:{placeholder:i},eDisplayField:a,tooltipFeature:o}=this;if(this.value===e||!r||(n||r.setValue(e,!0),r.getValue()===this.getValue()))return this;let s=r.getDisplayValue();return s==null&&i&&(s=i),a.textContent=s,o?.setTooltipAndRefresh(s??null),super.setValue(e,t)}destroy(){this.listComponent=this.destroyBean(this.listComponent),super.destroy()}},OAe={selector:`AG-SELECT`,component:i1},kAe={tag:`div`,cls:`ag-cell-edit-wrapper`,children:[{tag:`ag-select`,ref:`eEditor`,cls:`ag-cell-editor`}]},AAe=class extends AJ{constructor(){super(kAe,[OAe]),this.eEditor=null,this.startedByEnter=!1}wireBeans(e){this.valueSvc=e.valueSvc}initialiseEditor(e){this.focusAfterAttached=e.cellStartedEdit;let{eEditor:t,valueSvc:n,gos:r}=this,{values:i,value:a,eventKey:o}=e;if(rW(i)){gK(58);return}this.startedByEnter=o!=null&&o===$.ENTER;let s=!1;
vendor: 50,348 bytes, line 77
77i.forEach(r=>{let i={value:r};i.text=n.formatValue(e.column,null,r)??r,t.addOption(i),s||=a===r}),s?t.setValue(e.value??void 0,!0):e.values.length&&t.setValue(e.values[0],!0);let{valueListGap:c,valueListMaxWidth:l,valueListMaxHeight:u}=e;c!=null&&t.setPickerGap(c),u!=null&&t.setPickerMaxHeight(u),l!=null&&t.setPickerMaxWidth(l),r.get(`editType`)!==`fullRow`&&this.addManagedListeners(this.eEditor,{selectedItem:()=>e.stopEditing()})}afterGuiAttached(){this.focusAfterAttached&&this.eEditor.getFocusableElement().focus(),this.startedByEnter&&setTimeout(()=>{this.isAlive()&&this.eEditor.showPicker()})}focusIn(){this.eEditor.getFocusableElement().focus()}agSetEditValue(e){this.params.value=e,this.eEditor.setValue(e??void 0,!0)}getValue(){return this.eEditor.getValue()}isPopup(){return!1}getValidationElement(){return this.eEditor.getAriaElement()}getValidationErrors(){let{params:e}=this,{values:t,getValidationErrors:n}=e,r=this.getValue(),i=[];if(t&&r!=null&&!t.includes(r)){let e=this.getLocaleTextFunc();i.push(e(`invalidSelectionValidation`,`Invalid selection.`))}else i=null;return n?n({value:r,internalErrors:i,cellEditorParams:e}):i}},jAe={tag:`ag-input-text-field`,ref:`eEditor`,cls:`ag-cell-editor`},MAe=class{constructor(e){this.getLocaleTextFunc=e}getTemplate(){return jAe}getAgComponents(){return[e1]}init(e,t){this.eEditor=e,this.params=t;let n=t.maxLength;n!=null&&e.setMaxLength(n)}getValidationErrors(){let{params:e}=this,{maxLength:t,getValidationErrors:n}=e,r=this.getValue(),i=this.getLocaleTextFunc(),a=[];return t!=null&&typeof r==`string`&&r.length>t&&a.push(i(`maxLengthValidation`,`Must be ${t} characters or fewer.`,[String(t)])),a.length||(a=null),n?n({value:r,cellEditorParams:e,internalErrors:a}):a}getValue(){let{eEditor:e,params:t}=this,n=e.getValue();return!nW(n)&&!nW(t.value)?t.value:t.parseValue(n)}getStartValue(){let e=this.params;return e.useFormatter||e.column.getColDef().refData?e.formatValue(e.value):e.value}setCaret(){rJ()&&this.eEditor.getInputElement().focus({preventScroll:!0});let e=this.eEditor,t=e.getValue(),n=nW(t)&&t.length||0;n&&e.getInputElement().setSelectionRange(n,n)}},a1=class extends n1{constructor(){super(new MAe(()=>this.getLocaleTextFunc()))}};function NAe(e){e.undoRedo?.undo(`api`)}function PAe(e){e.undoRedo?.redo(`api`)}function FAe(e,t){return e.editModelSvc?.getEditRowDataValue(t,{checkSiblings:!0})}function IAe(e){let t=e.editModelSvc?.getEditMap(),n=[];return t?.forEach((e,t)=>{let{rowIndex:r,rowPinned:i}=t;e.forEach((e,t)=>{let{editorValue:a,pendingValue:o,sourceValue:s,state:c}=e,l=OQ(e),u=a??o;u===DQ&&(u=void 0);let d={newValue:u,oldValue:s,state:c,column:t,colId:t.getColId(),colKey:t.getColId(),rowIndex:r,rowPinned:i},f=c===`editing`;(f||!f&&l)&&n.push(d)})}),n}function LAe(e,t=!1){let{editSvc:n}=e;if(n?.isBatchEditing()){if(t)for(let t of e.editModelSvc?.getEditPositions()??[])t.state===`editing`&&n.revertSingleCellEdit(t);else PQ(e,{persist:!0});LQ(e,void 0,{cancel:t})}else n?.stopEditing(void 0,{cancel:t,source:`edit`,forceStop:!t,forceCancel:t})}function RAe(e,t){let n=wQ(e,t);return!!e.editSvc?.isEditing(n)}function zAe(e,t){let{key:n,colKey:r,rowIndex:i,rowPinned:a}=t,{editSvc:o,colModel:s}=e,c=s.getCol(r);if(!c){gK(12,{colKey:r});return}let l=eY(e,{rowIndex:i,rowPinned:a||null,column:c});if(!l){gK(290,{rowIndex:i,rowPinned:a});return}o?.isCellEditable({rowNode:l,column:c},`api`)&&(a??D$(e,i),E$(e,r),o?.startEditing({rowNode:l,column:c},{event:n?new KeyboardEvent(`keydown`,{key:n}):void 0,source:`api`,editable:!0}))}function BAe(e){return e.editSvc?.validateEdit()||null}function VAe(e){return e.undoRedo?.getCurrentUndoStackSize()??0}function HAe(e){return e.undoRedo?.getCurrentRedoStackSize()??0}var UAe={tag:`div`,cls:`ag-popup-editor`,attrs:{tabindex:`-1`}},WAe=class extends kJ{constructor(e){super(UAe),this.params=e}postConstruct(){AK(this.gos,this.getGui(),`popupEditorWrapper`,!0),this.addKeyDownListener()}addKeyDownListener(){let e=this.getGui(),t=this.params;this.addManagedElementListeners(e,{keydown:e=>{UY(this.gos,e,t.node,t.column,!0)||t.onKeyDown(e)}})}};function GAe(e,{column:t},n,r,i=`ui`){if(n instanceof KeyboardEvent&&(n.key===$.TAB||n.key===$.ENTER||n.key===$.F2||n.key===$.BACKSPACE&&r))return!0;if(n?.shiftKey&&e.rangeSvc?.getCellRanges().length!=0)return!1;let a=t?.getColDef(),o=KAe(e.gos,a),s=n?.type;return s===`click`&&n?.detail===1&&o===1||s===`dblclick`&&n?.detail===2&&o===2||i===`api`&&!!r}function KAe(e,t){return e.get(`suppressClickEdit`)===!0?0:e.get(`singleClickEdit`)===!0||t?.singleClickEdit?1:2}function o1(e,t){return e.editModelSvc?.hasEdits(t,{withOpenEditor:!0})??!1}function s1(e,t){let n=t.column,r=t.rowNode,i=n.getColDef();if(!r)return o1(e,t);let a=i.editable;return r.group&&i.groupRowEditable!=null?e.rowGroupingEditValueSvc?.isGroupCellEditable(r,n)?!0:o1(e,t):n.isColumnFunc(r,a)?!0:o1(e,t)}function qAe(e,t,n=`ui`){let r=s1(e,t);if(r||n===`ui`)return r;let{rowNode:i,column:a}=t;for(let t of e.colModel.getCols())if(t!==a&&s1(e,{rowNode:i,column:t}))return!0;return!1}var c1=(e,t=!1)=>{if(e!==void 0)return OQ(e)||t&&e.state===`editing`};function l1(e,t,n=!1){return c1(e.editModelSvc?.getEdit(t),n)}var u1=(e,t,n)=>{if(e)for(let r=0,i=e.length;r<i;++r){let i=e[r];if(i.data&&(c1(t?.getEdit({rowNode:i,column:n}))||c1(t?.getEdit({rowNode:i.pinnedSibling,column:n})))||u1(i.childrenAfterGroup,t,n))return!0}};function d1(e,t){let{column:n,rowNode:r}=t;return e.gos.get(`groupTotalRow`)&&!r?.footer?!1:u1(r?.childrenAfterGroup,e.editModelSvc,n)}function f1(e,{rowNode:t,column:n}){if(t=t.pinnedSibling,t)return c1(e.editModelSvc?.getEdit({rowNode:t,column:n}))}var JAe=class extends Q{constructor(e,t){super(),this.cellCtrl=e,this.beans=t,this.editSvc=t.editSvc,this.editModelSvc=t.editModelSvc}setComp(e){this.cellComp=e,this.applyCellStyles()}applyCellStyles(){let{cellCtrl:e,editSvc:t,beans:n}=this;if(t?.isBatchEditing()&&t.isEditing()){let t=l1(n,e)||d1(n,e)||f1(n,e);this.applyBatchingStyle(t)}else this.applyBatchingStyle(!1);let r=!!this.editModelSvc?.getCellValidationModel().hasCellValidation(this.cellCtrl);this.cellComp.toggleCss(`ag-cell-editing-error`,r)}applyBatchingStyle(e){this.cellComp.toggleCss(`ag-cell-editing`,e??!1),this.cellComp.toggleCss(`ag-cell-batch-edit`,(e&&this.editSvc?.isBatchEditing())??!1)}},YAe=class extends Q{constructor(e,t){super(),this.rowCtrl=e,this.beans=t,this.gos=t.gos,this.editSvc=t.editSvc,this.editModelSvc=t.editModelSvc}applyRowStyles(){let{rowCtrl:e,editModelSvc:t,beans:n}=this,r=e.rowNode,i=t?.getEditRow(r),a=this.editModelSvc?.getRowValidationModel().hasRowValidation({rowNode:r});if(!i&&r.pinnedSibling&&(r=r.pinnedSibling,i=t?.getEditRow(r)),i){let e=Array.from(i.keys()).some(e=>{let t={rowNode:r,column:e};return l1(n,t,!0)||d1(n,t)||f1(n,t)});this.applyStyle(a,e);return}this.applyStyle(a)}applyStyle(e=!1,t=!1){let n=!!this.editSvc?.isBatchEditing(),r=this.gos.get(`editType`)===`fullRow`;this.rowCtrl?.forEachGui(void 0,({rowComp:i})=>{i.toggleCss(`ag-row-editing`,r&&t),i.toggleCss(`ag-row-batch-edit`,r&&t&&n),i.toggleCss(`ag-row-inline-editing`,t),i.toggleCss(`ag-row-not-inline-editing`,!t),i.toggleCss(`ag-row-editing-invalid`,r&&t&&e)})}},XAe=({rowModel:e,pinnedRowModel:t,editModelSvc:n},r)=>{let i=new Set;e.forEachNode(e=>r.has(e)&&i.add(e)),t?.forEachPinnedRow(`top`,e=>r.has(e)&&i.add(e)),t?.forEachPinnedRow(`bottom`,e=>r.has(e)&&i.add(e));for(let e of r)i.has(e)||n.removeEdits({rowNode:e});return i},ZAe=({editModelSvc:e},t,n)=>{for(let r of t)e?.getEditRow(r)?.forEach((t,i)=>!n.has(i)&&e.removeEdits({rowNode:r,column:i}))},QAe=e=>()=>{let t=new Set(e.colModel.getCols()),n=e.editModelSvc.getEditMap(!0);ZAe(e,XAe(e,new Set(n.keys())),t)},$Ae=new Set([`undo`,`redo`,`paste`,`bulk`,`rangeSvc`]),eje=new Set([`ui`,`api`]),p1={paste:`api`,rangeSvc:`api`,fillHandle:`api`,cellClear:`api`,bulk:`api`},tje=new Set(Object.keys(p1)),nje=new Set([`paste`,`rangeSvc`,`cellClear`,`redo`,`undo`]),m1={cancel:!0,source:`api`},rje={cancel:!1,source:`api`},h1={checkSiblings:!0},g1={force:!0,suppressFlash:!0},ije={force:!0},aje=class extends Q{constructor(){super(...arguments),this.beanName=`editSvc`,this.committing=!1,this.batch=!1,this.batchStartDispatched=!1,this.stopping=!1,this.rangeSelectionWhileEditing=0}postConstruct(){let{beans:e}=this;this.model=e.editModelSvc,this.valueSvc=e.valueSvc,this.rangeSvc=e.rangeSvc,this.addManagedPropertyListener(`editType`,({currentValue:e})=>{this.stopEditing(void 0,m1),this.createStrategy(e)});let t=QAe(e),n=()=>{let t=this.model.getCellValidationModel().getCellValidationMap().size>0,n=this.model.getRowValidationModel().getRowValidationMap().size>0;return t||n?this.stopEditing(void 0,m1):this.isEditing()&&(this.batch?LQ(e,this.model.getEditPositions()):this.stopEditing(void 0,rje)),!1};this.addManagedEventListeners({columnPinned:t,columnVisible:t,columnRowGroupChanged:t,rowExpansionStateChanged:t,pinnedRowsChanged:t,displayedRowsChanged:t,sortChanged:n,filterChanged:n,cellFocused:this.onCellFocused.bind(this)})}isBatchEditing(){return this.batch}startBatchEditing(){this.batch||(this.batch=!0,this.batchStartDispatched=!1,this.stopEditing(void 0,m1))}stopBatchEditing(e){this.batch&&(e&&this.stopEditing(void 0,e),this.batchStartDispatched&&this.dispatchBatchStopped(new Map,!1),this.batch=!1,this.batchStartDispatched=!1)}ensureBatchStarted(){this.batch&&!this.batchStartDispatched&&(this.batchStartDispatched=!0,this.dispatchBatchEvent(`batchEditingStarted`,new Map))}createStrategy(e){let{beans:t,gos:n,strategy:r}=this,i=_1(n,e);if(r){if(r.beanName===i)return r;this.destroyStrategy()}return this.strategy=this.createOptionalManagedBean(t.registry.createDynamicBean(i,!0))}destroyStrategy(){this.strategy&&=(this.strategy.destroy(),this.destroyBean(this.strategy))}shouldStartEditing(e,t,n,r=`ui`){let i=GAe(this.beans,e,t,n,r);return i&&(this.strategy??=this.createStrategy()),i}shouldStopEditing(e,t,n=`ui`){return this.strategy?.shouldStop(e,t,n)??null}shouldCancelEditing(e,t,n=`ui`){return this.strategy?.shouldCancel(e,t,n)??null}validateEdit(){return nDe(this.beans)}isEditing(e,t){return this.model.hasEdits(e??void 0,t??h1)}isRowEditing(e,t){return!!e&&this.model.hasRowEdits(e,t)}enableRangeSelectionWhileEditing(){this.beans.rangeSvc&&this.gos.get(`cellSelection`)&&this.rangeSelectionWhileEditing++}disableRangeSelectionWhileEditing(){this.rangeSelectionWhileEditing=Math.max(0,this.rangeSelectionWhileEditing-1)}isRangeSelectionEnabledWhileEditing(){return this.rangeSelectionWhileEditing>0}startEditing(e,t){let{startedEdit:n=!0,event:r=null,source:i=`ui`,ignoreEventKey:a=!1,silent:o}=t;if(this.strategy??=this.createStrategy(),!(t.editable??this.isCellEditable(e,`api`)))return;let s=wQ(this.beans,e);if(s&&!s.comp){t.editable=void 0,s.onCompAttachedFuncs.push(()=>this.startEditing(e,t));return}let c=this.shouldStartEditing(e,r,n,i);if(c===!1&&i!==`api`){this.isEditing(e)&&this.stopEditing();return}!this.batch&&this.shouldStopEditing(e,void 0,i)&&!t.continueEditing&&this.stopEditing(void 0,{source:i}),c&&this.ensureBatchStarted(),this.strategy.start({position:e,event:r,source:i,ignoreEventKey:a,startedEdit:n,silent:o})}stopEditing(e,t){let n=this.prepareStopContext(e,t);if(!n)return!1;this.stopping=!0;let r=!1,{edits:i}=n;try{let a=this.processStopRequest(n);return r||=a.res,i=a.edits,this.finishStopEditing({...n,edits:i,params:t,position:e,res:r}),r}finally{this.rangeSelectionWhileEditing=0,this.stopping=!1}}prepareStopContext(e,t){let{event:n=null,cancel:r=!1,source:i=`ui`,forceCancel:a=!1,forceStop:o=!1,commit:s=!1}=t||{};if(tje.has(i)&&this.batch)return e?.rowNode&&e?.column&&this.bulkRefreshCell(e),null;let c=this.committing?p1[i]:i;if(!(this.committing||this.isEditing(e)||this.batch&&this.model.hasEdits(e,h1))||!this.strategy||this.stopping)return null;let l=wQ(this.beans,e);l&&(l.onEditorAttachedFuncs=[]);let u=!r&&(!!this.shouldStopEditing(e,n,c)||(this.committing||i===`paste`)&&!this.batch)||o,d=r&&!!this.shouldCancelEditing(e,n,c)||a;return{cancel:r,cellCtrl:l,edits:this.model.getEditMap(!0),event:n??null,forceCancel:a,forceStop:o,commit:s,position:e,source:i,treatAsSource:c,willCancel:d,willStop:u}}processStopRequest(e){let{event:t,position:n,willCancel:r,willStop:i}=e;return i||r?this.handleStopOrCancel(e):this.shouldHandleMidBatchKey(t,n)?{res:!1,edits:this.handleMidBatchKey(t,n,e)}:(PQ(this.beans,{persist:!0}),this.batch&&this.strategy?.cleanupEditors(n),{res:!1,edits:this.model.getEditMap()})}handleStopOrCancel(e){let{beans:t,model:n}=this,{cancel:r,commit:i,edits:a,event:o,source:s,willCancel:c,willStop:l}=e;PQ(t,{persist:!this.batch||!c,isCancelling:c||r,isStopping:l});let u=n.getEditMap(),d=!c&&(!this.batch||i)?this.processEdits(u,s):[];r?this.strategy?.stopCancelled(e.forceCancel):this.strategy?.stopCommitted(o,i),this.clearValidationIfNoOpenEditors();for(let e of d)n.clearEditValue(e);this.bulkRefreshMap(a);for(let e of n.getEditPositions(u)){let n=wQ(t,e),r=OQ(e);n?.refreshCell({force:!0,suppressFlash:!r})}return{res:l,edits:u}}shouldHandleMidBatchKey(e,t){return e instanceof KeyboardEvent&&this.batch&&!!this.strategy?.midBatchInputsAllowed(t)&&this.isEditing(t,{withOpenEditor:!0})}handleMidBatchKey(e,t,n){let{beans:r,model:i}=this,{cellCtrl:a,edits:o}=n,{key:s}=e,c=s===$.ENTER,l=s===$.ESCAPE,u=s===$.TAB;if(c||u||l){if(c||u)PQ(r,{persist:!0});else if(l&&a){let{rowNode:e,column:t}=a;if(this.batch&&e&&t){let n={rowNode:e,column:t};LQ(r,[n],{silent:!0}),this.model.stop(n,!0,!0),wQ(r,n)?.refreshCell(g1)}else this.revertSingleCellEdit(a)}return this.batch?this.strategy?.cleanupEditors():LQ(r,i.getEditPositions(),{event:e,cancel:l}),e.preventDefault(),this.bulkRefreshMap(o,{suppressFlash:!0}),i.getEditMap()}return o}finishStopEditing({cellCtrl:e,edits:t,params:n,position:r,res:i,commit:a,forceCancel:o,willCancel:s,willStop:c}){let l=this.beans;i&&r&&(!this.batch||a)&&this.model.removeEdits(r),this.navigateAfterEdit(n,e?.cellPosition),MQ(l),this.clearValidationIfNoOpenEditors();let{rowRenderer:u,formula:d}=l;if(s&&u.refreshRows({rowNodes:Array.from(t.keys())}),this.batch){d?d.refreshFormulas(!0):u.refreshRows({suppressFlash:!0,force:!0});let e=c&&a;(e||s&&o)&&this.dispatchBatchStopped(t,e)}}dispatchBatchStopped(e,t){let n;t&&(n=JEe(e),n.size>0&&this.ensureBatchStarted()),this.batchStartDispatched&&(this.batchStartDispatched=!1,this.dispatchBatchEvent(`batchEditingStopped`,n??new Map))}clearValidationIfNoOpenEditors(){this.model.hasEdits(void 0,{withOpenEditor:!0})||(this.model.getCellValidationModel().clearCellValidationMap(),this.model.getRowValidationModel().clearRowValidationMap())}navigateAfterEdit(e,t){if(!e||!t)return;let{event:n,suppressNavigateAfterEdit:r}=e;if(!(n instanceof KeyboardEvent)||r)return;let{key:i,shiftKey:a}=n,o=this.gos.get(`enterNavigatesVerticallyAfterEdit`);if(i!==$.ENTER||!o)return;let s=a?$.UP:$.DOWN;this.beans.navigation?.navigateToNextCell(null,s,t,!1)}processEdits(e,t){let n=Array.from(e.keys()),r=this.model.getCellValidationModel().getCellValidationMap().size>0||this.model.getRowValidationModel().getRowValidationMap().size>0,i=[],{changeDetectionSvc:a}=this.beans;a?.beginDeferred();try{for(let a of n){let n=e.get(a);for(let e of n.keys()){let o=n.get(e),s={rowNode:a,column:e};if(OQ(o)&&!r){let n=wQ(this.beans,s);this.setNodeDataValue(a,e,o.pendingValue,n,t)||i.push(s)}}}}finally{a?.endDeferred()}return i}setNodeDataValue(e,t,n,r,i=`edit`){let a=eje.has(i)?`edit`:i;r&&(r.suppressRefreshCell=!0),this.committing=!0;try{return e.setDataValue(t,n,a)}finally{this.committing=!1,r&&(r.suppressRefreshCell=!1)}}syncEditAfterCommit(e,t){let n=this.model.getEdit(e);n&&n.state!==`editing`&&(t?this.beans.editModelSvc?.setEdit(e,{sourceValue:n.pendingValue}):this.model.clearEditValue(e))}setEditMap(e,t){this.strategy??=this.createStrategy(),this.strategy?.setEditMap(e,t),this.bulkRefreshMap(e);let n=g1;t?.forceRefreshOfEditCellsOnly&&(n={...oje(e),...g1}),this.beans.rowRenderer.refreshCells(n)}dispatchEditValuesChanged({rowNode:e,column:t},n={}){if(!e||!t||!n)return;let{pendingValue:r,sourceValue:i}=n,{rowIndex:a,rowPinned:o,data:s}=e;this.beans.eventSvc.dispatchEvent({type:`cellEditValuesChanged`,node:e,rowIndex:a,rowPinned:o,column:t,source:`api`,data:s,newValue:r,oldValue:i,value:r,colDef:t.getColDef()})}bulkRefreshCell(e,t){xK(this.gos,this.beans.rowModel)&&this.refCell(e,this.model.getEdit(e),t)}bulkRefreshMap(e,t){xK(this.gos,this.beans.rowModel)&&e.forEach((e,n)=>{for(let r of e.keys())this.refCell({rowNode:n,column:r},e.get(r),t)})}refCell({rowNode:e,column:t},n,r={}){let{beans:i,gos:a}=this,o=new Set([e]),s=new Set,c=e.pinnedSibling;c&&o.add(c);let l=e.sibling;l&&s.add(l);let u=e.parent;for(;u;)u.sibling?.footer&&a.get(`groupTotalRow`)||!u.parent&&u.sibling&&a.get(`grandTotalRow`)?s.add(u.sibling):s.add(u),u=u.parent;for(let e of o)this.dispatchEditValuesChanged({rowNode:e,column:t},n);for(let e of o)wQ(i,{rowNode:e,column:t})?.refreshCell(r);for(let e of s){let n=wQ(i,{rowNode:e,column:t});n&&(n.refreshCell(r),!r.force&&this.batch&&n.editStyleFeature?.applyCellStyles?.())}}stopAllEditing(e=!1,t=`ui`){this.isEditing()&&this.stopEditing(void 0,{cancel:e,source:t})}isCellEditable(e,t=`ui`){let{gos:n,beans:r}=this,i=e.rowNode;if(i.group&&e.column.getColDef().groupRowEditable==null){if(n.get(`treeData`)){if(!i.data&&!n.get(`enableGroupEdit`))return!1}else if(!n.get(`enableGroupEdit`))return!1}let a=_1(n)===`fullRow`?qAe(r,e,t):s1(r,e);return a&&(this.strategy??=this.createStrategy()),a}cellEditingInvalidCommitBlocks(){return this.gos.get(`invalidEditValueMode`)===`block`}checkNavWithValidation(e,t,n=!0){if(this.hasValidationErrors(e)){let r=wQ(this.beans,e);return this.cellEditingInvalidCommitBlocks()?(t?.preventDefault?.(),n&&(r&&!r.hasBrowserFocus()&&r.focusCell(),r?.comp?.getCellEditor()?.focusIn?.()),`block-stop`):(r&&this.revertSingleCellEdit(r),`revert-continue`)}return`continue`}revertSingleCellEdit(e,t=!1){let n=wQ(this.beans,e);n?.comp?.getCellEditor()&&(LQ(this.beans,[e],{silent:!0}),this.model.clearEditValue(e),kQ(this.beans,e,{silent:!0}),HQ(this.beans),n?.refreshCell(g1),t&&(n?.focusCell(),n?.comp?.getCellEditor()?.focusIn?.()))}hasValidationErrors(e){HQ(this.beans);let t=wQ(this.beans,e);t&&(t.refreshCell(g1),t.rowCtrl.rowEditStyleFeature?.applyRowStyles());let n=!1;return e?.rowNode?(n||=this.model.getRowValidationModel().hasRowValidation({rowNode:e.rowNode}),e.column&&(n||=this.model.getCellValidationModel().hasCellValidation({rowNode:e.rowNode,column:e.column}))):(n||=this.model.getCellValidationModel().getCellValidationMap().size>0,n||=this.model.getRowValidationModel().getRowValidationMap().size>0),n}moveToNextCell(e,t,n,r=`ui`){let i,a=this.isEditing(),o=a&&this.checkNavWithValidation(void 0,n)===`block-stop`;return e instanceof GQ&&a&&(i=this.strategy?.moveToNextEditingCell(e,t,n,r,o)),i===null?i:(i||=!!this.beans.focusSvc.focusedHeader,i===!1&&!o&&this.stopEditing(),i)}getPendingEditValue(e,t,n){if(n===`data`||n===`batch`&&!this.batch)return;let r=this.model.getEdit({rowNode:e,column:t},h1);if(!r||this.stopping&&!this.batch&&!r.editorState?.cellStartedEditing)return;if(n===`edit`){let e=r.editorValue;if(e!=null&&e!==DQ)return e}let i=r.pendingValue;if(i!==DQ)return i}getCellDataValue(e){let t=this.model.getEdit(e,h1);if(t){let e=t.pendingValue;if(e!==DQ)return e;let n=t.sourceValue;if(n!=null)return n}return this.valueSvc.getValue(e.column,e.rowNode,`data`)}addStopEditingWhenGridLosesFocus(e){GEe(this,this.beans,e)}createPopupEditorWrapper(e){return new WAe(e)}batchResetToSourceValue(e){if(!this.batch)return!1;let t=this.model.getEdit(e);if(!t)return!1;let{pendingValue:n,sourceValue:r,state:i}=t;return n===r||i===`editing`?!1:(this.dispatchEditValuesChanged(e,{...t,pendingValue:r}),this.beans.editModelSvc?.removeEdits(e),wQ(this.beans,e)?.refreshCell(g1),!0)}setDataValue(e,t,n){try{let r=this.batch,i=this.isEditing(r?void 0:e);if((!i||this.committing)&&!r&&!nje.has(n)||!i&&!r&&n===`paste`||n===`batch`&&!r)return;if(n===`edit`){if(i&&this.applyEditorValue(e,t))return!0;if(!r)return}if(this.strategy??=this.createStrategy(),n===`batch`||n===`edit`)return this.applyDirectValue(e,t,n);let a=this.beans,o;if(o=r?`ui`:this.committing?n??`api`:`api`,!n||$Ae.has(n))return this.applyDirectValue(e,t,n);let s=this.applyExistingEdit(e,t,n,o);return s===void 0?(FQ(a,e,t,n,void 0,{persist:!0}),this.ensureBatchStarted(),this.stopEditing(e,{source:o,suppressNavigateAfterEdit:!0}),!0):s}finally{this.committing=!1}}applyExistingEdit(e,t,n,r){let i=this.model.getEdit(e);if(i)return i.pendingValue===t?!1:i.sourceValue===t?(this.beans.editModelSvc?.removeEdits(e),this.ensureBatchStarted(),this.dispatchEditValuesChanged(e,{...i,pendingValue:t}),!0):(FQ(this.beans,e,t,n,void 0,{persist:!0}),this.ensureBatchStarted(),this.stopEditing(e,{source:r,suppressNavigateAfterEdit:!0}),!0)}applyEditorValue(e,t){let n=this.beans,r=wQ(n,e),i=r?.comp?.getCellEditor();return!r||!i?!1:(FQ(n,e,t,`edit`,void 0,{persist:!0}),r.editStyleFeature?.applyCellStyles?.(),`agSetEditValue`in i?(i.agSetEditValue(t),!0):i.refresh&&r.editCompDetails?(i.refresh({...r.editCompDetails.params,value:t}),!0):(r.hasBrowserFocus()&&r.onEditorAttachedFuncs.push(()=>{let t=wQ(this.beans,e);t?.focusCell(!0),t?.comp?.getCellEditor()?.focusIn?.()}),LQ(n,[e],{silent:!0,cancel:!0}),kQ(n,e,{silent:!0}),HQ(n),wQ(n,e)?.refreshCell(g1),!0))}applyDirectValue(e,t,n){let r=this.beans;if(this.batch){if(n===`batch`&&wQ(r,e)?.comp?.getCellEditor()){let{editModelSvc:n,valueSvc:i}=r,{rowNode:a,column:o}=e;n?.getEdit(e)?.sourceValue===void 0&&n?.setEdit(e,{sourceValue:i.getValue(o,a,`data`)}),n?.setEdit(e,{pendingValue:t})}else FQ(r,e,t,n,void 0,{persist:!0}),n!==`batch`&&this.cleanupEditors();return MQ(r),this.ensureBatchStarted(),this.bulkRefreshCell(e),!0}FQ(r,e,t,n,void 0,{persist:!0});let i=wQ(r,e),a=this.setNodeDataValue(e.rowNode,e.column,t,i,n);return this.syncEditAfterCommit(e,a),MQ(r),wQ(r,e)?.refreshCell(a?ije:g1),a}handleColDefChanged(e){XEe(this.beans,e)}destroy(){this.model.clear(),this.destroyStrategy(),super.destroy()}prepDetailsDuringBatch(e,t){let{model:n}=this;if(!this.batch||!n.hasRowEdits(e.rowNode,h1))return;let{rowNode:r}=e,{compDetails:i,valueToDisplay:a}=t;if(i){let{params:e}=i;return e.data=n.getEditRowDataValue(r,h1),{compDetails:i}}return{valueToDisplay:a}}cleanupEditors(){this.strategy?.cleanupEditors()}dispatchCellEvent(e,t,n,r){this.strategy?.dispatchCellEvent(e,t,n,r)}dispatchBatchEvent(e,t){this.eventSvc.dispatchEvent(this.createBatchEditEvent(e,t))}createBatchEditEvent(e,t){return eq(this.gos,{type:e,...e===`batchEditingStopped`?{changes:this.toEventChangeList(t)}:{}})}toEventChangeList(e){return this.model.getEditPositions(e).map(e=>({rowIndex:e.rowNode.rowIndex,rowPinned:e.rowNode.rowPinned,columnId:e.column.getColId(),newValue:e.pendingValue,oldValue:e.sourceValue}))}applyBulkEdit({rowNode:e,column:t},n){if(!n||n.length===0)return;let{beans:r,rangeSvc:i,valueSvc:a}=this,{formula:o}=r;PQ(r,{persist:!0});let s=this.model.getEditMap(!0),c=s.get(e)?.get(t)?.pendingValue,l=!1;this.batch||(this.eventSvc.dispatchEvent({type:`bulkEditingStarted`}),l=!0);let u=o?.isFormula(c)??!1;n.forEach(e=>{let t=e.columns.some(e=>e?.isAllowFormula());if(i?.forEachRowInRange(e,n=>{let i=eY(r,n);if(i===void 0)return;let l=s.get(i)??new Map,d=c;for(let t of e.columns){if(!t)continue;let e=!!u&&t.isAllowFormula();if(this.isCellEditable({rowNode:i,column:t},`api`)){let e=a.getValue(t,i,`data`,!0),n=a.parseValue(t,i??null,d,e);Number.isNaN(n)&&(n=null),l.set(t,{editorValue:void 0,pendingValue:n,sourceValue:e,state:`changed`,editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}})}e&&(d=o?.updateFormulaByOffset({value:d,columnDelta:1}))}l.size>0&&s.set(i,l),u&&t&&(c=o?.updateFormulaByOffset({value:c,rowDelta:1}))}),this.setEditMap(s),this.batch){this.cleanupEditors(),MQ(r),this.ensureBatchStarted();return}this.committing=!0;try{this.stopEditing(void 0,{source:`bulk`})}finally{this.committing=!1,l&&this.eventSvc.dispatchEvent({type:`bulkEditingStopped`,changes:this.toEventChangeList(s)})}});let d=wQ(r,{rowNode:e,column:t});d&&d.focusCell(!0)}createCellStyleFeature(e){return new JAe(e,this.beans)}createRowStyleFeature(e){return new YAe(e,this.beans)}setEditingCells(e,t){let{beans:n}=this,{colModel:r,valueSvc:i}=n,a=new Map;for(let{colId:o,column:s,colKey:c,rowIndex:l,rowPinned:u,newValue:d,state:f}of e){let e=o?r.getCol(o):c?r.getCol(c):s;if(!e)continue;let p=eY(n,{rowIndex:l,rowPinned:u});if(!p)continue;let m=i.getValue(e,p,`data`,!0);if(!t?.forceRefreshOfEditCellsOnly&&!OQ({pendingValue:d,sourceValue:m})&&f!==`editing`)continue;let h=a.get(p);h||(h=new Map,a.set(p,h)),d===void 0&&(d=DQ),h.set(e,{editorValue:void 0,pendingValue:d,sourceValue:m,state:f??`changed`,editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}})}this.setEditMap(a,t)}onCellFocused(e){let t=wQ(this.beans,e);if(!t||!this.isEditing(t,h1))return;let n=this.model.getEdit(t);if(!n||!OQ(n))return;let r=this.getLocaleTextFunc()(`ariaPendingChange`,`Pending Change`);this.beans.ariaAnnounce?.announceValue(r,`pendingChange`)}allowedFocusTargetOnValidation(e){return wQ(this.beans,e)}};function oje(e){return{rowNodes:e?Array.from(e.keys()):void 0,columns:e?[...new Set(Array.from(e.values()).flatMap(e=>Array.from(e.keys())))]:void 0}}function _1(e,t){return t??e.get(`editType`)??`singleCell`}var v1=class extends Q{postConstruct(){this.model=this.beans.editModelSvc,this.editSvc=this.beans.editSvc,this.addManagedEventListeners({cellFocused:this.onCellFocusChanged?.bind(this),cellFocusCleared:this.onCellFocusChanged?.bind(this)})}clearEdits(e){this.model.clearEditValue(e)}onCellFocusChanged(e){let t,n=e.previousParams,{editSvc:r,beans:i}=this,a=e.type===`cellFocused`?e.sourceEvent:null;n&&(t=wQ(i,n));let{gos:o,editModelSvc:s}=i,c=e.type===`cellFocusCleared`;if(r.isEditing(void 0,{withOpenEditor:!0})){let{column:t,rowIndex:l,rowPinned:u}=e,d={column:t,rowNode:eY(i,{rowIndex:l,rowPinned:u})},f=o.get(`invalidEditValueMode`)===`block`;if(f)return;let p=!f,m=!!s?.getCellValidationModel().hasCellValidation(d),h=p&&m;(n||c)&&!r.stopEditing(void 0,{cancel:h,source:c&&p?`api`:void 0,event:a})&&(r.isBatchEditing()?r.cleanupEditors():r.stopEditing(void 0,{source:`api`}))}t?.refreshCell({suppressFlash:!0,force:!0})}stopCancelled(e){let t=this.editSvc.isBatchEditing()&&!e;for(let e of this.model.getEditPositions())RQ(this.beans,e,{cancel:!0},wQ(this.beans,e)),this.model.stop(e,t,!0);return!0}stopCommitted(e,t){let n=this.model.getEditPositions(),r={all:[],pass:[],fail:[]};for(let e of n)r.all.push(e),(this.model.getCellValidationModel().getCellValidation(e)?.errorMessages?.length??0)>0?r.fail.push(e):r.pass.push(e);let i=this.processValidationResults(r),a=this.editSvc.isBatchEditing()&&!t;for(let t of i.destroy)RQ(this.beans,t,{event:e},wQ(this.beans,t)),this.model.stop(t,a,!1);for(let e of i.keep){let t=wQ(this.beans,e);!this.editSvc.cellEditingInvalidCommitBlocks()&&t&&this.editSvc.revertSingleCellEdit(t)}return!0}cleanupEditors({rowNode:e}={},t){PQ(this.beans,{persist:!1});let n=this.model.getEditPositions(),r=[];if(e)for(let t of n)t.rowNode!==e&&r.push(t);else for(let e of n)r.push(e);LQ(this.beans,r),MQ(this.beans,t)}setFocusOutOnEditor(e){e.comp?.getCellEditor()?.focusOut?.()}setFocusInOnEditor(e){let t=e.comp,n=t?.getCellEditor();if(n?.focusIn)n.focusIn();else{let n=this.beans.gos.get(`editType`)===`fullRow`;e.focusCell(n),e.onEditorAttachedFuncs.push(()=>t?.getCellEditor()?.focusIn?.())}}setupEditors(e){let{event:t,ignoreEventKey:n=!1,startedEdit:r,position:i,cells:a=this.model.getEditPositions()}=e,o=t instanceof KeyboardEvent&&!n&&t.key||void 0;qEe(this.beans,a,i,o,t,r)}dispatchCellEvent(e,t,n,r){let i=wQ(this.beans,e);i&&this.eventSvc.dispatchEvent({...i.createEvent(t??null,n),...r})}dispatchRowEvent(e,t,n){if(n)return;let r=CQ(this.beans,e);r&&this.eventSvc.dispatchEvent(r.createRowEvent(t))}shouldStop(e,t,n=`ui`){let r=this.editSvc.isBatchEditing();return r&&n===`api`?!0:r&&(n===`ui`||n===`edit`)?!1:n===`api`?!0:t instanceof KeyboardEvent&&!r?t.key===$.ENTER:null}shouldCancel(e,t,n=`ui`){let r=this.editSvc.isBatchEditing();return!!(t instanceof KeyboardEvent&&!r&&t.key===$.ESCAPE||r&&n===`api`||n===`api`)}setEditMap(e,t){t?.update||this.editSvc.stopEditing(void 0,{cancel:!0,source:`api`});let n=[];if(e.forEach((e,t)=>{e.forEach((e,r)=>{e.state===`editing`&&n.push({...e,rowNode:t,column:r})})}),t?.update&&(e=new Map([...this.model.getEditMap(),...e])),this.model?.setEditMap(e),n.length>0){let e=n.at(-1),t=e.pendingValue===DQ?void 0:e.pendingValue;this.start({position:e,event:new KeyboardEvent(`keydown`,{key:t}),source:`api`});let r=wQ(this.beans,e);r&&this.setFocusInOnEditor(r)}}destroy(){this.cleanupEditors(),super.destroy()}},y1={moduleName:`EditCore`,version:aK,beans:[WEe,aje],apiFunctions:{getEditingCells:IAe,getEditRowValues:FAe,getCellEditorInstances:KEe,startEditingCell:zAe,stopEditing:LAe,isEditing:RAe,validateEdit:BAe},dynamicBeans:{singleCell:class extends v1{constructor(){super(...arguments),this.beanName=`singleCell`}shouldStop(e,t,n=`ui`){let r=super.shouldStop(e,t,n);if(r!==null)return r;let i=e?.rowNode,a=e?.column,o=this.rowNode,s=this.column;return(!o||!s)&&i&&a?null:o!==i||s!==a||!o&&!s&&this.model.hasEdits(void 0,{withOpenEditor:!0})}midBatchInputsAllowed(e){return this.model.hasEdits(e)}start(e){let{position:t,startedEdit:n,event:r,ignoreEventKey:i}=e;(this.rowNode!==t.rowNode||this.column!==t.column)&&super.cleanupEditors(),this.rowNode=t.rowNode,this.column=t.column,this.model.start(t),this.setupEditors({cells:[t],position:t,startedEdit:n,event:r,ignoreEventKey:i})}dispatchRowEvent(e,t,n){}processValidationResults(e){return e.fail.length>0&&this.editSvc.cellEditingInvalidCommitBlocks()?{destroy:[],keep:e.all}:{destroy:e.all,keep:[]}}stopCancelled(e){return super.stopCancelled(e),this.clearPosition()}stopCommitted(e,t){return super.stopCommitted(e,t),this.clearPosition()}clearPosition(){return this.rowNode=void 0,this.column=void 0,!0}onCellFocusChanged(e){let{colModel:t,editSvc:n}=this.beans,{rowIndex:r,column:i,rowPinned:a}=e,o=eY(this.beans,{rowIndex:r,rowPinned:a}),s=EQ(i),c=t.getCol(s),l=e.previousParams;if(l){let e=EQ(l.column);if(l?.rowIndex===r&&e===s&&l?.rowPinned===a)return}(e.type!=`cellFocused`||!n?.isRangeSelectionEnabledWhileEditing()&&!n?.isEditing({rowNode:o,column:c},{withOpenEditor:!0}))&&super.onCellFocusChanged(e)}moveToNextEditingCell(e,t,n,r=`ui`,i=!1){let a=this.beans.focusSvc.getFocusedCell();a&&(e=tY(this.beans,a)??e);let o=e.cellPosition,s,c=this.beans.gos.get(`editType`)===`fullRow`;c&&this.model.suspend(!0),i||(e.eGui.focus(),this.editSvc?.stopEditing(e,{source:this.editSvc?.isBatchEditing()?`ui`:`api`,event:n}));try{s=this.beans.navigation?.findNextCellToFocusOn(o,{backwards:t,startEditing:!0})}finally{c&&this.model.suspend(!1)}if(s===!1)return null;if(s==null)return!1;let l=s.cellPosition,u=e.isCellEditable(),d=s.isCellEditable(),f=l&&o.rowIndex===l.rowIndex&&o.rowPinned===l.rowPinned;u&&!i&&this.setFocusOutOnEditor(e);let p=this.gos.get(`suppressStartEditOnTab`),m=!1;if(!f&&!i&&(super.cleanupEditors(s,!0),p?s.focusCell(!0,n):(m=!0,this.editSvc.startEditing(s,{startedEdit:!0,event:n,source:r,ignoreEventKey:!0,editable:d}))),d&&!i){if(s.focusCell(!1,n),p)s.focusCell(!0,n);else if(!s.comp?.getCellEditor()){if(!m){let e=this.editSvc?.isEditing(s,{withOpenEditor:!0});kQ(this.beans,s,{event:n,cellStartedEdit:!0,silent:e})}this.setFocusInOnEditor(s),this.cleanupEditors(s)}}else d&&i&&this.setFocusInOnEditor(s),s.focusCell(!0,n);return e.rowCtrl?.refreshRow({suppressFlash:!0,force:!0}),!0}destroy(){super.destroy(),this.rowNode=void 0,this.column=void 0}},fullRow:class extends v1{constructor(){super(...arguments),this.beanName=`fullRow`,this.startedRows=new Set}shouldStop(e,t,n=`ui`){let{rowNode:r,beans:i}=this,{rowNode:a}=e||{};if(!CQ(i,{rowNode:r}))return!0;let o=super.shouldStop({rowNode:r},t,n);return o===null?r?a!==r:!1:o}midBatchInputsAllowed({rowNode:e}){return e?this.model.hasEdits({rowNode:e}):!1}clearEdits(e){this.model.clearEditValue(e)}start(e){let{position:t,silent:n,startedEdit:r,event:i,ignoreEventKey:a}=e,{rowNode:o}=t,{beans:s,model:c,startedRows:l}=this;this.rowNode!==o&&super.cleanupEditors(t);let u=s.visibleCols.allCols,d=[],f=[];for(let e of u)e.isCellEditable(o)&&f.push(e);if(f.length!=0){l.has(o)||(this.dispatchRowEvent({rowNode:o},`rowEditingStarted`,n),l.add(o));for(let e of f){let t={rowNode:o,column:e};d.push(t),c.start(t)}this.rowNode=o,this.setupEditors({cells:d,position:t,startedEdit:r,event:i,ignoreEventKey:a})}}processValidationResults(e){return e.fail.length>0&&this.editSvc.cellEditingInvalidCommitBlocks()?{destroy:[],keep:e.all}:{destroy:e.all,keep:[]}}stopCancelled(e){let{rowNode:t,model:n}=this;return t&&!n.hasRowEdits(t)?!1:(super.stopCancelled(e),this.cleanupEditors({rowNode:t},!0),this.rowNode=void 0,!0)}stopCommitted(e,t){let{rowNode:n,beans:r,model:i,editSvc:a}=this;if(n&&!i.hasRowEdits(n))return!1;let o=[];if(i.getEditMap().forEach((e,t)=>{if(e&&e.size!==0){for(let n of e.values())if(OQ(n)){o.push(t);break}}}),HQ(r),a.checkNavWithValidation({rowNode:n})===`block-stop`)return!1;if(super.stopCommitted(e,t),t||!a.isBatchEditing())for(let e of o)this.dispatchRowEvent({rowNode:e},`rowValueChanged`);return this.cleanupEditors({rowNode:n},!0),this.rowNode=void 0,!0}onCellFocusChanged(e){let{rowIndex:t}=e,n=e.previousParams;if(n?.rowIndex===t||e.sourceEvent instanceof KeyboardEvent)return;let{beans:r,gos:i,model:a}=this;if(r.editSvc?.isRangeSelectionEnabledWhileEditing())return;let o=wQ(r,n);i.get(`invalidEditValueMode`)===`block`&&o&&(a.getCellValidationModel().getCellValidation(o)||a.getRowValidationModel().getRowValidation(o))||super.onCellFocusChanged(e)}cleanupEditors(e={},t){super.cleanupEditors(e,t);let{startedRows:n}=this;for(let e of n)this.dispatchRowEvent({rowNode:e},`rowEditingStopped`),this.destroyEditorsForRow(e);n.clear()}destroyEditorsForRow(e){let t=CQ(this.beans,{rowNode:e});if(!t)return;let n={};for(let e of t.getAllCellCtrls())e.comp?.getCellEditor()&&RQ(this.beans,e,n,e)}moveToNextEditingCell(e,t,n,r=`ui`,i=!1){let{beans:a,model:o,gos:s,editSvc:c}=this,l=e.cellPosition,u;o.suspend(!0);try{u=a.navigation?.findNextCellToFocusOn(l,{backwards:t,startEditing:!0,skipToNextEditableCell:!1})}finally{o.suspend(!1)}if(u===!1)return null;if(u==null)return!1;let d=u.cellPosition,f=e.isCellEditable(),p=u.isCellEditable(),m=d&&l.rowIndex===d.rowIndex&&l.rowPinned===d.rowPinned;f&&this.setFocusOutOnEditor(e),this.restoreEditors();let h=s.get(`suppressStartEditOnTab`);return p&&!i?h?u.focusCell(!0,n):(u.comp?.getCellEditor()||kQ(a,u,{event:n,cellStartedEdit:!0}),this.setFocusInOnEditor(u),u.focusCell(!1,n)):(p&&i&&this.setFocusInOnEditor(u),u.focusCell(!0,n)),!m&&!i&&(c?.stopEditing({rowNode:e.rowNode},{event:n,forceStop:!0}),c?.isRowEditing(e.rowNode,{withOpenEditor:!0})&&this.cleanupEditors(u,!0),h?u.focusCell(!0,n):c.startEditing(u,{startedEdit:!0,event:n,source:r,ignoreEventKey:!0,editable:p||void 0})),e.rowCtrl?.refreshRow({suppressFlash:!0,force:!0}),!0}restoreEditors(){let{beans:e,model:t}=this;t.getEditMap().forEach((t,n)=>t.forEach(({state:t},r)=>{if(t!==`editing`)return;let i=wQ(e,{rowNode:n,column:r});i&&!i.comp?.getCellEditor()&&kQ(e,i,{silent:!0})}))}destroy(){super.destroy(),this.rowNode=void 0,this.startedRows.clear()}}},dependsOn:[K$,Y$],css:[rAe]},sje={moduleName:`UndoRedoEdit`,version:aK,beans:[nAe],apiFunctions:{undoCellEditing:NAe,redoCellEditing:PAe,getCurrentUndoSize:VAe,getCurrentRedoSize:HAe},dependsOn:[y1]},cje={moduleName:`TextEditor`,version:aK,userComponents:{agCellEditor:a1,agTextCellEditor:a1},dependsOn:[y1]},lje={moduleName:`NumberEditor`,version:aK,userComponents:{agNumberCellEditor:{classImp:vAe}},dependsOn:[y1]},uje={moduleName:`DateEditor`,version:aK,userComponents:{agDateCellEditor:cAe,agDateStringCellEditor:dAe},dependsOn:[y1]},dje={moduleName:`CheckboxEditor`,version:aK,userComponents:{agCheckboxCellEditor:aAe},dependsOn:[y1]},fje={moduleName:`SelectEditor`,version:aK,userComponents:{agSelectCellEditor:AAe},dependsOn:[y1]},pje={moduleName:`LargeTextEditor`,version:aK,userComponents:{agLargeTextCellEditor:mAe},dependsOn:[y1]},mje={moduleName:`CustomEditor`,version:aK,dependsOn:[y1]},b1={agSetColumnFilter:`agSetColumnFilterHandler`,agMultiColumnFilter:`agMultiColumnFilterHandler`,agGroupColumnFilter:`agGroupColumnFilterHandler`,agNumberColumnFilter:`agNumberColumnFilterHandler`,agBigIntColumnFilter:`agBigIntColumnFilterHandler`,agDateColumnFilter:`agDateColumnFilterHandler`,agTextColumnFilter:`agTextColumnFilterHandler`},hje=new Set(Object.values(b1));function x1(e,t){let n=e.filterUi;if(!n)return null;if(n.created)return n.promise;if(t)return null;let r=n.create(n.refreshed),i=n;return i.created=!0,i.promise=r,r}function gje(e,t,n,r,i,a,o){return t.refresh?.({...n,model:r,source:a,additionalEventAttributes:o}),e().then(e=>{if(e){let{filter:t,filterParams:n}=e;S1(t,n,r,i,a,o)}})}function S1(e,t,n,r,i,a){e?.refresh?.({...t,model:n,state:r,source:i,additionalEventAttributes:a})}function C1(e,t,n,r){let i=e();i?.created&&i.promise.then(e=>{let a=t();S1(e,i.filterParams,a,n()??{model:a},`ui`,r)})}function w1(e){let t,n=!1,r,{action:i,filterParams:a,getFilterUi:o,getModel:s,getState:c,updateState:l,updateModel:u,processModelToApply:d}=e;switch(i){case`apply`:{let e=c();r=e?.model??null,d&&(r=d(r)),t={state:e?.state,model:r},n=!0;break}case`clear`:t={model:null},a?.buttons?.includes(`apply`)||(n=!0,r=null);break;case`reset`:t={model:null},n=!0,r=null;break;case`cancel`:t={model:s()}}l(t),n?u(r):C1(o,s,c,{fromAction:i})}function T1(e,t){return e[t]??null}var _je=class extends SY{constructor(){super(...arguments),this.iconCreated=!1}wireComp(e,t,n,r,i){this.comp=e;let a=_Y(this,this.beans.context,i);this.eButtonShowMainFilter=n,this.eFloatingFilterBody=r,this.setGui(t,a),this.setupActive(),this.refreshHeaderStyles(),this.setupWidth(a),this.setupLeft(a),this.setupHover(a),this.setupFocus(a),this.setupAria(),this.setupFilterButton(),this.setupUserComp(),this.setupSyncWithFilter(a),this.setupUi(),a.addManagedElementListeners(this.eButtonShowMainFilter,{click:this.showParentFilter.bind(this)}),this.setupFilterChangedListener(a);let o=()=>this.onColDefChanged(a);a.addManagedListeners(this.column,{colDefChanged:o}),a.addManagedEventListeners({filterSwitched:({column:e})=>{e===this.column&&o()}}),a.addDestroyFunc(()=>{this.eButtonShowMainFilter=null,this.eFloatingFilterBody=null,this.userCompDetails=null,this.clearComponent()})}resizeHeader(){}moveHeader(){}getHeaderClassParams(){let{column:e,beans:t}=this,n=e.colDef;return eq(t.gos,{colDef:n,column:e,floatingFilter:!0})}setupActive(){let e=this.column.getColDef(),t=!!e.filter,n=!!e.floatingFilter;this.active=t&&n}setupUi(){if(this.comp.setButtonWrapperDisplayed(!this.suppressFilterButton&&this.active),this.comp.addOrRemoveBodyCssClass(`ag-floating-filter-full-body`,this.suppressFilterButton),this.comp.addOrRemoveBodyCssClass(`ag-floating-filter-body`,!this.suppressFilterButton),!this.active||this.iconCreated)return;let e=pX(`filter`,this.beans,this.column);e&&(this.iconCreated=!0,this.eButtonShowMainFilter.appendChild(e))}setupFocus(e){e.createManagedBean(new wJ(this.eGui,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)}))}setupAria(){let e=this.getLocaleTextFunc();xW(this.eButtonShowMainFilter,e(`ariaFilterMenuOpen`,`Open Filter Menu`))}onTabKeyDown(e){let{beans:t}=this;if(dW(t)===this.eGui)return;let n=_J(t,this.eGui,null,e.shiftKey);if(n){t.headerNavigation?.scrollToColumn(this.column),e.preventDefault(),n.focus();return}let r=this.findNextColumnWithFloatingFilter(e.shiftKey);r&&t.focusSvc.focusHeaderPosition({headerPosition:{headerRowIndex:this.rowCtrl.rowIndex,column:r},event:e})&&e.preventDefault()}findNextColumnWithFloatingFilter(e){let t=this.beans.visibleCols,n=this.column;do if(n=e?t.getColBefore(n):t.getColAfter(n),!n)break;while(!n.getColDef().filter||!n.getColDef().floatingFilter);return n}handleKeyDown(e){super.handleKeyDown(e);let t=this.getWrapperHasFocus();switch(e.key){case $.UP:case $.DOWN:case $.LEFT:case $.RIGHT:if(t)return;xJ(e);case $.ENTER:t&&gJ(this.eGui)&&e.preventDefault();break;case $.ESCAPE:t||this.eGui.focus()}}onFocusIn(e){if(this.eGui.contains(e.relatedTarget))return;let t=!!e.relatedTarget&&!e.relatedTarget.classList.contains(`ag-floating-filter`),n=!!e.relatedTarget&&RW(e.relatedTarget,`ag-floating-filter`);if(t&&n&&e.target===this.eGui){let e=this.lastFocusEvent,t=!!(e&&e.key===$.TAB);if(e&&t){let t=e.shiftKey;gJ(this.eGui,t)}}this.focusThis()}setupHover(e){this.beans.colHover?.addHeaderFilterColumnHoverListener(e,this.comp,this.column,this.eGui)}setupLeft(e){let t=new vY(this.column,this.eGui,this.beans);e.createManagedBean(t)}setupFilterButton(){this.suppressFilterButton=!this.beans.menuSvc?.isFloatingFilterButtonEnabled(this.column),this.highlightFilterButtonWhenActive=!$K(this.gos)}setupUserComp(){if(!this.active)return;let e=this.beans.colFilter?.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter());e&&this.setCompDetails(e)}setCompDetails(e){this.userCompDetails=e,this.comp.setCompDetails(e)}showParentFilter(){let e=this.suppressFilterButton?this.eFloatingFilterBody:this.eButtonShowMainFilter;this.beans.menuSvc?.showFilterMenu({column:this.column,buttonElement:e,containerType:`floatingFilter`,positionBy:`button`})}setupSyncWithFilter(e){if(!this.active)return;let{beans:{colFilter:t},column:n,gos:r}=this,i=e=>{if(e?.source===`filterDestroyed`&&(!this.isAlive()||!t?.isAlive()))return;let i=this.comp.getFloatingFilterComp();i&&i.then(i=>{if(i){if(r.get(`enableFilterHandlers`)){let t=e,n=`filter`;t?.afterFloatingFilter?n=`ui`:t?.afterDataChange?n=`dataChanged`:e?.source===`api`&&(n=`api`),this.updateFloatingFilterParams(this.userCompDetails,n);return}let a=t?.getCurrentFloatingFilterParentModel(n),o=e?{...e,columns:e.columns??[],source:e.source===`api`?`api`:`columnFilter`}:null;i.onParentModelChanged(a,o)}})};[this.destroySyncListener]=e.addManagedListeners(n,{filterChanged:i}),t?.isFilterActive(n)&&i(null)}setupWidth(e){let t=()=>{let e=`${this.column.getActualWidth()}px`;this.comp.setWidth(e)};e.addManagedListeners(this.column,{widthChanged:t}),t()}setupFilterChangedListener(e){this.active&&([this.destroyFilterChangedListener]=e.addManagedListeners(this.column,{filterChanged:this.updateFilterButton.bind(this)}),this.updateFilterButton())}updateFilterButton(){if(!this.suppressFilterButton&&this.comp){let e=!!this.beans.filterManager?.isFilterAllowed(this.column);this.comp.setButtonWrapperDisplayed(e),this.highlightFilterButtonWhenActive&&e&&this.eButtonShowMainFilter.classList.toggle(`ag-filter-active`,this.column.isFilterActive())}}onColDefChanged(e){let t=this.active;this.setupActive();let n=!t&&this.active;t&&!this.active&&(this.destroySyncListener(),this.destroyFilterChangedListener());let r=this.beans.colFilter,i=this.active?r?.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter()):null,a=this.comp.getFloatingFilterComp();!a||!i?this.updateCompDetails(e,i,n):a.then(t=>{!t||r?.areFilterCompsDifferent(this.userCompDetails??null,i)?this.updateCompDetails(e,i,n):this.updateFloatingFilterParams(i,`colDef`)})}updateCompDetails(e,t,n){this.isAlive()&&(this.setCompDetails(t),this.setupFilterButton(),this.setupUi(),n&&(this.setupSyncWithFilter(e),this.setupFilterChangedListener(e)))}updateFloatingFilterParams(e,t){if(!e)return;let n=e.params;this.comp.getFloatingFilterComp()?.then(e=>{typeof e?.refresh==`function`&&(this.gos.get(`enableFilterHandlers`)&&(n={...n,model:T1(this.beans.colFilter?.model??{},this.column.getColId()),source:t}),e.refresh(n))})}addResizeAndMoveKeyboardListeners(){}destroy(){super.destroy(),this.destroySyncListener=null,this.destroyFilterChangedListener=null}};function vje(e,t){let n=e.colModel.getCol(t);if(!n){_K(12,{colKey:t});return}e.menuSvc?.showColumnMenu({column:n,positionBy:`auto`})}function yje(e){e.menuSvc?.hidePopupMenu()}var bje=class extends Q{constructor(){super(...arguments),this.beanName=`menuSvc`}postConstruct(){let{enterpriseMenuFactory:e,filterMenuFactory:t}=this.beans;this.activeMenuFactory=e??t}showColumnMenu(e){this.showColumnMenuCommon(this.activeMenuFactory,e,`columnMenu`)}showFilterMenu(e){this.showColumnMenuCommon(D1(this.beans),e,e.containerType,!0)}showHeaderContextMenu(e,t,n){this.activeMenuFactory?.showMenuAfterContextMenuEvent(e,t,n)}hidePopupMenu(){this.beans.contextMenuSvc?.hideActiveMenu(),this.activeMenuFactory?.hideActiveMenu()}hideFilterMenu(){D1(this.beans)?.hideActiveMenu()}isColumnMenuInHeaderEnabled(e){let{suppressHeaderMenuButton:t}=e.getColDef();return!t&&!!this.activeMenuFactory?.isMenuEnabled(e)&&($K(this.gos)||!!this.beans.enterpriseMenuFactory)}isFilterMenuInHeaderEnabled(e){return!e.getColDef().suppressHeaderFilterButton&&!!this.beans.filterManager?.isFilterAllowed(e)}isHeaderContextMenuEnabled(e){return!(e&&rq(e)?e.getColDef():e?.getColGroupDef())?.suppressHeaderContextMenu&&this.gos.get(`columnMenu`)===`new`}isHeaderMenuButtonAlwaysShowEnabled(){return this.isSuppressMenuHide()}isHeaderMenuButtonEnabled(){let e=!this.isSuppressMenuHide();return!(oJ()&&e)}isHeaderFilterButtonEnabled(e){return this.isFilterMenuInHeaderEnabled(e)&&!$K(this.gos)&&!this.isFloatingFilterButtonDisplayed(e)}isFilterMenuItemEnabled(e){return!!this.beans.filterManager?.isFilterAllowed(e)&&!$K(this.gos)&&!this.isFilterMenuInHeaderEnabled(e)&&!this.isFloatingFilterButtonDisplayed(e)}isFloatingFilterButtonEnabled(e){return!e.getColDef().suppressFloatingFilterButton}isFloatingFilterButtonDisplayed(e){return!!e.getColDef().floatingFilter&&this.isFloatingFilterButtonEnabled(e)}isSuppressMenuHide(){let e=this.gos,t=e.get(`suppressMenuHide`);return $K(e)?e.exists(`suppressMenuHide`)?t:!1:t}showColumnMenuCommon(e,t,n,r){let{positionBy:i,onClosedCallback:a}=t,o=t.column;if(i===`button`){let{buttonElement:i}=t;e?.showMenuAfterButtonClick(o,i,n,a,r)}else if(i===`mouse`){let{mouseEvent:i}=t;e?.showMenuAfterMouseEvent(o,i,n,a,r)}else if(o){let t=this.beans,i=t.ctrlsSvc;i.getScrollFeature().ensureColumnVisible(o,`auto`),lG(t,()=>{let t=i.getHeaderRowContainerCtrl(o.getPinned())?.getHeaderCtrlForColumn(o);t&&e?.showMenuAfterButtonClick(o,t.getAnchorElementForMenu(r),n,a,r)})}}};function E1(e,t,n){e.menuVisible!==t&&(e.menuVisible=t,e.dispatchColEvent(`menuVisibleChanged`,n))}function D1(e){let{enterpriseMenuFactory:t,filterMenuFactory:n,gos:r}=e;return t&&$K(r)?t:n}var xje={moduleName:`SharedMenu`,version:aK,beans:[bje],apiFunctions:{showColumnMenu:vje,hidePopupMenu:yje}},Sje=`.ag-set-filter{--ag-indentation-level:0}.ag-set-filter-item{align-items:center;display:flex;height:100%}:where(.ag-ltr) .ag-set-filter-item{padding-left:calc(var(--ag-widget-container-horizontal-padding) + var(--ag-indentation-level)*var(--ag-set-filter-indent-size))}:where(.ag-rtl) .ag-set-filter-item{padding-right:calc(var(--ag-widget-container-horizontal-padding) + var(--ag-indentation-level)*var(--ag-set-filter-indent-size))}.ag-set-filter-item-checkbox{display:flex;height:100%;width:100%}.ag-set-filter-group-icons{display:block;:where(.ag-set-filter-group-closed-icon),:where(.ag-set-filter-group-indeterminate-icon),:where(.ag-set-filter-group-opened-icon){cursor:pointer}}:where(.ag-ltr) .ag-set-filter-group-icons{margin-right:var(--ag-widget-container-horizontal-padding)}:where(.ag-rtl) .ag-set-filter-group-icons{margin-left:var(--ag-widget-container-horizontal-padding)}.ag-filter-body-wrapper{display:flex;flex-direction:column}:where(.ag-menu:not(.ag-tabs) .ag-filter) .ag-filter-body-wrapper{min-width:180px}.ag-filter-filter{flex:1 1 0px}.ag-filter-condition{display:flex;justify-content:center}.ag-floating-filter-body{display:flex;flex:1 1 auto;height:100%;position:relative}.ag-floating-filter-full-body{align-items:center;display:flex;flex:1 1 auto;height:100%;overflow:hidden;width:100%}.ag-floating-filter-input{align-items:center;display:flex;width:100%;>:where(.ag-date-floating-filter-wrapper),>:where(.ag-floating-filter-input),>:where(.ag-input-field){flex:1 1 auto}:where(.ag-input-field-input[type=date]),:where(.ag-input-field-input[type=datetime-local]){width:1px}}.ag-floating-filter-button{display:flex;flex:none}.ag-date-floating-filter-wrapper{display:flex}.ag-set-floating-filter-input :where(.ag-input-field-input)[disabled]{pointer-events:none}.ag-floating-filter-button-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;height:var(--ag-icon-size);width:var(--ag-icon-size)}.ag-filter-loading{align-items:unset;background-color:var(--ag-chrome-background-color);height:100%;padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);position:absolute;width:100%;z-index:1;:where(.ag-menu) &{background-color:var(--ag-menu-background-color)}}.ag-filter-separator{border-top:solid var(--ag-border-width) var(--menu-separator-color)}:where(.ag-filter-select) .ag-picker-field-wrapper{width:0}.ag-filter-condition-operator{height:17px}:where(.ag-ltr) .ag-filter-condition-operator-or{margin-left:calc(var(--ag-spacing)*2)}:where(.ag-rtl) .ag-filter-condition-operator-or{margin-right:calc(var(--ag-spacing)*2)}.ag-set-filter-select-all{padding-top:var(--ag-widget-container-vertical-padding)}.ag-filter-no-matches,.ag-set-filter-list{height:calc(var(--ag-list-item-height)*6)}.ag-filter-no-matches{padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}.ag-set-filter-tree-list{height:calc(var(--ag-list-item-height)*10)}.ag-set-filter-filter{margin-left:var(--ag-widget-container-horizontal-padding);margin-right:var(--ag-widget-container-horizontal-padding);margin-top:var(--ag-widget-container-vertical-padding)}.ag-filter-to{margin-top:var(--ag-widget-vertical-spacing)}.ag-mini-filter{margin:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}:where(.ag-ltr) .ag-set-filter-add-group-indent{margin-left:calc(var(--ag-icon-size) + var(--ag-widget-container-horizontal-padding))}:where(.ag-rtl) .ag-set-filter-add-group-indent{margin-right:calc(var(--ag-icon-size) + var(--ag-widget-container-horizontal-padding))}
77:where(.ag-filter-menu) .ag-set-filter-list{min-width:200px}.ag-filter-virtual-list-item:focus-visible{box-shadow:inset var(--ag-focus-shadow)}.ag-filter-apply-panel{display:flex;justify-content:flex-end;overflow:hidden;padding:var(--ag-widget-vertical-spacing) var(--ag-widget-container-horizontal-padding) var(--ag-widget-container-vertical-padding)}.ag-filter-apply-panel-button{line-height:1.5}:where(.ag-ltr) .ag-filter-apply-panel-button{margin-left:calc(var(--ag-spacing)*2)}:where(.ag-rtl) .ag-filter-apply-panel-button{margin-right:calc(var(--ag-spacing)*2)}.ag-simple-filter-body-wrapper{display:flex;flex-direction:column;gap:var(--ag-widget-vertical-spacing);min-height:calc(var(--ag-list-item-height) + var(--ag-widget-container-vertical-padding) + var(--ag-widget-vertical-spacing));overflow-y:auto;padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);padding-bottom:var(--ag-widget-container-vertical-padding);:where(.ag-resizer-wrapper){margin:0}}.ag-multi-filter-menu-item{margin:var(--ag-spacing) 0}.ag-multi-filter-group-title-bar{background-color:transparent;color:var(--ag-header-text-color);font-weight:500;padding:calc(var(--ag-spacing)*1.5) var(--ag-spacing)}.ag-group-filter-field-select-wrapper{display:flex;flex-direction:column;gap:var(--ag-widget-vertical-spacing);padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}`;function Cje(e){let t=e.filterManager;return!!t?.isColumnFilterPresent()||!!t?.isAggregateFilterPresent()}function wje(e,t){return e.filterManager?.getColumnFilterInstance(t)??Promise.resolve(void 0)}function Tje(e,t){let n=e.colModel.getColDefCol(t);if(n)return e.colFilter?.destroyFilter(n,`api`)}function Eje(e,t){e.frameworkOverrides.wrapIncoming(()=>e.filterManager?.setFilterModel(t))}function Dje(e){return e.filterManager?.getFilterModel()??{}}function Oje(e,t,n){let{gos:r,colModel:i,colFilter:a}=e;n&&!r.get(`enableFilterHandlers`)&&(gK(288),n=!1);let o=i.getColDefCol(t);return o?a?.getModelForColumn(o,n)??null:null}function kje(e,t,n){return e.filterManager?.setColumnFilterModel(t,n)??Promise.resolve()}function Aje(e,t){let n=e.colModel.getCol(t);if(!n){_K(12,{colKey:t});return}e.menuSvc?.showFilterMenu({column:n,containerType:`columnFilter`,positionBy:`auto`})}function jje(e){e.menuSvc?.hideFilterMenu()}function Mje(e,t){let n=e.colModel.getCol(t);if(!n){_K(12,{colKey:t});return}return e.colFilter?.getHandler(n,!0)}function Nje(e,t){let{colModel:n,colFilter:r,gos:i}=e;if(!i.get(`enableFilterHandlers`)){gK(287);return}let{colId:a,action:o}=t;if(a){let e=n.getColById(a);e&&r?.updateModel(e,o)}else r?.updateAllModels(o)}var O1={january:`January`,february:`February`,march:`March`,april:`April`,may:`May`,june:`June`,july:`July`,august:`August`,september:`September`,october:`October`,november:`November`,december:`December`},k1=[`january`,`february`,`march`,`april`,`may`,`june`,`july`,`august`,`september`,`october`,`november`,`december`];function Pje(e,t){return e==null?-1:t==null?1:Number.parseFloat(e)-Number.parseFloat(t)}function Fje(e,t){if(e==null)return-1;if(t==null)return 1;let n=aZ(e),r=aZ(t);return n!=null&&r!=null?n===r?0:n>r?1:-1:String(e).localeCompare(String(t))}function A1(e){return e instanceof Date&&!isNaN(e.getTime())}var j1={number:()=>void 0,bigint:()=>void 0,boolean:()=>({maxNumConditions:1,debounceMs:0,filterOptions:[`empty`,{displayKey:`true`,displayName:`True`,predicate:(e,t)=>t,numberOfInputs:0},{displayKey:`false`,displayName:`False`,predicate:(e,t)=>t===!1,numberOfInputs:0}]}),date:()=>({isValidDate:A1}),dateString:({dataTypeDefinition:e})=>({comparator:(t,n)=>{let r=e.dateParser(n);return n==null||r<t?-1:+(r>t)},isValidDate:t=>typeof t==`string`&&A1(e.dateParser(t))}),dateTime:e=>j1.date(e),dateTimeString:e=>j1.dateString(e),object:()=>void 0,text:()=>void 0},M1={number:()=>({comparator:Pje}),bigint:()=>({comparator:Fje}),boolean:({t:e})=>({valueFormatter:t=>nW(t.value)?e(String(t.value),t.value?`True`:`False`):e(`blanks`,`(Blanks)`)}),date:({formatValue:e,t})=>({valueFormatter:n=>{let r=e(n);return nW(r)?r:t(`blanks`,`(Blanks)`)},treeList:!0,treeListFormatter:(e,n)=>{if(e===`NaN`)return t(`invalidDate`,`Invalid Date`);if(n===1&&e!=null){let n=k1[Number(e)-1];return t(n,O1[n])}return e??t(`blanks`,`(Blanks)`)},treeListPathGetter:e=>lZ(e,!1)}),dateString:({formatValue:e,dataTypeDefinition:t,t:n})=>({valueFormatter:t=>{let r=e(t);return nW(r)?r:n(`blanks`,`(Blanks)`)},treeList:!0,treeListPathGetter:e=>lZ(t.dateParser(e??void 0),!1),treeListFormatter:(e,t)=>{if(t===1&&e!=null){let t=k1[Number(e)-1];return n(t,O1[t])}return e??n(`blanks`,`(Blanks)`)}}),dateTime:e=>{let t=M1.date(e);return t.treeListPathGetter=lZ,t},dateTimeString(e){let t=e.dataTypeDefinition.dateParser,n=M1.dateString(e);return n.treeListPathGetter=e=>lZ(t(e??void 0)),n},object:({formatValue:e,t})=>({valueFormatter:n=>{let r=e(n);return nW(r)?r:t(`blanks`,`(Blanks)`)}}),text:()=>void 0};function Ije(e,t,n,r,i,a,o){let s=t,c=n,l=e===`agSetColumnFilter`;!c&&r.baseDataType===`object`&&!l&&(c=({column:e,node:t})=>i({column:e,node:t,value:a.valueSvc.getValue(e,t,`data`)}));let u=(l?M1:j1)[r.baseDataType],d=u({dataTypeDefinition:r,formatValue:i,t:o});return s=typeof t==`object`?{...d,...t}:d,{filterParams:s,filterValueGetter:c}}var Lje={boolean:`agTextColumnFilter`,date:`agDateColumnFilter`,dateString:`agDateColumnFilter`,dateTime:`agDateColumnFilter`,dateTimeString:`agDateColumnFilter`,bigint:`agBigIntColumnFilter`,number:`agNumberColumnFilter`,object:`agTextColumnFilter`,text:`agTextColumnFilter`},Rje={boolean:`agTextColumnFloatingFilter`,date:`agDateColumnFloatingFilter`,dateString:`agDateColumnFloatingFilter`,dateTime:`agDateColumnFloatingFilter`,dateTimeString:`agDateColumnFloatingFilter`,bigint:`agBigIntColumnFloatingFilter`,number:`agNumberColumnFloatingFilter`,object:`agTextColumnFloatingFilter`,text:`agTextColumnFloatingFilter`};function zje(e,t=!1){return(t?Rje:Lje)[e??`text`]}function Bje(e,t,n){if(t==null)return null;let r=null,{compName:i,jsComp:a,fwComp:o}=Bq(e,t);return i?r={agSetColumnFilter:`agSetColumnFloatingFilter`,agMultiColumnFilter:`agMultiColumnFloatingFilter`,agGroupColumnFilter:`agGroupColumnFloatingFilter`,agNumberColumnFilter:`agNumberColumnFloatingFilter`,agBigIntColumnFilter:`agBigIntColumnFloatingFilter`,agDateColumnFilter:`agDateColumnFloatingFilter`,agTextColumnFilter:`agTextColumnFloatingFilter`}[i]:a==null&&o==null&&t.filter===!0&&(r=n()),r}var Vje={filterHandler:()=>({doesFilterPass:()=>!0})};function N1(e,t,n,r){if(!e.isPrimary())return!0;let i=!n;return!e.isValueActive()||!i?!1:t?!0:r}var Hje=class extends Q{constructor(){super(...arguments),this.beanName=`colFilter`,this.allColumnFilters=new Map,this.allColumnListeners=new Map,this.activeAggregateFilters=[],this.activeColumnFilters=[],this.processingFilterChange=!1,this.modelUpdates=[],this.columnModelUpdates=[],this.state=new Map,this.handlerMap={...b1},this.isGlobalButtons=!1,this.activeFilterComps=new Set}
vendor: 138,440 bytes, lines 77-78
77postConstruct(){this.addManagedEventListeners({gridColumnsChanged:this.onColumnsChanged.bind(this),dataTypesInferred:this.processFilterModelUpdateQueue.bind(this)}),this.addManagedPropertyListener(`pivotMode`,this.onPivotModeChanged.bind(this));let e=this.gos,t={...e.get(`initialState`)?.filter?.filterModel??{}};this.initialModel=t,this.model={...t},e.get(`enableFilterHandlers`)||delete this.handlerMap.agMultiColumnFilter}refreshModel(){this.onNewRowsLoaded(`rowDataUpdated`)}setModel(e,t=`api`,n){let{colModel:r,dataTypeSvc:i,filterManager:a}=this.beans;if(i?.isPendingInference){this.modelUpdates.push({model:e,source:t});return}let o=[],s=this.getModel(!0);if(e){let t=new Set(Object.keys(e));this.allColumnFilters.forEach((n,r)=>{let i=e[r];o.push(this.setModelOnFilterWrapper(n,i)),t.delete(r)}),t.forEach(t=>{let n=r.getColDefCol(t)||r.getCol(t);if(!n){gK(62,{colId:t});return}if(!n.isFilterAllowed()){gK(63,{colId:t});return}let i=this.getOrCreateFilterWrapper(n,!0);if(!i){gK(64,{colId:t});return}o.push(this.setModelOnFilterWrapper(i,e[t],!0))})}else this.model={},this.allColumnFilters.forEach(e=>{o.push(this.setModelOnFilterWrapper(e,null))});Nq.all(o).then(()=>{let e=this.getModel(!0),r=[];this.allColumnFilters.forEach((t,n)=>{aW(s?s[n]:null,e?e[n]:null)||r.push(t.column)}),r.length>0?a?.onFilterChanged({columns:r,source:t}):n&&this.updateActive(`filterChanged`)})}getModel(e){let t={},{allColumnFilters:n,initialModel:r,beans:{colModel:i}}=this;if(n.forEach((e,n)=>{let r=this.getModelFromFilterWrapper(e);nW(r)&&(t[n]=r)}),!e)for(let e of Object.keys(r)){let a=r[e];nW(a)&&!n.has(e)&&i.getCol(e)?.isFilterAllowed()&&(t[e]=a)}return t}setState(e,t,n=`api`){if(this.state.clear(),t)for(let e of Object.keys(t)){let n=t[e];this.state.set(e,{model:T1(this.model,e),state:n})}this.setModel(e,n,!0)}getState(){let e=this.state;if(!e.size)return;let t={},n=!1;return e.forEach((e,r)=>{let i=e.state;i!=null&&(n=!0,t[r]=i)}),n?t:void 0}getModelFromFilterWrapper(e){let t=e.column.getColId();if(e.isHandler)return T1(this.model,t);let n=e.filter;return n?typeof n.getModel==`function`?n.getModel():(gK(66),null):T1(this.initialModel,t)}isFilterPresent(){return this.activeColumnFilters.length>0}isAggFilterPresent(){return!!this.activeAggregateFilters.length}disableFilters(){this.initialModel={};let{allColumnFilters:e}=this;return e.size?(e.forEach(e=>this.disposeFilterWrapper(e,`advancedFilterEnabled`)),!0):!1}updateActiveFilters(){let e=e=>e?e.isFilterActive?e.isFilterActive():(gK(67),!1):!1,{colModel:t,gos:n}=this.beans,r=!!PK(n),i=[],a=[],o=(e,n,o)=>{n&&(N1(e,t.isPivotMode(),t.isPivotActive(),r)?i.push(o):a.push(o))},s=[];return this.allColumnFilters.forEach(t=>{let n=t.column,r=n.getColId();if(t.isHandler)s.push(Nq.resolve().then(()=>{o(n,this.isHandlerActive(n),{colId:r,isHandler:!0,handler:t.handler,handlerParams:t.handlerParams})}));else{let i=x1(t);i&&s.push(i.then(t=>{o(n,e(t),{colId:r,isHandler:!1,comp:t})}))}}),Nq.all(s).then(()=>{this.activeAggregateFilters=i,this.activeColumnFilters=a})}updateFilterFlagInColumns(e,t){let n=[];return this.allColumnFilters.forEach(r=>{let i=r.column;if(r.isHandler)n.push(Nq.resolve().then(()=>{this.setColFilterActive(i,this.isHandlerActive(i),e,t)}));else{let a=x1(r);a&&n.push(a.then(n=>{this.setColFilterActive(i,n.isFilterActive(),e,t)}))}}),this.beans.groupFilter?.updateFilterFlags(e,t),Nq.all(n)}doFiltersPass(e,t,n){let{data:r,aggData:i}=e,a=n?this.activeAggregateFilters:this.activeColumnFilters,o=n?i:r,s=this.model;for(let n=0;n<a.length;n++){let r=a[n],{colId:i,isHandler:c}=r;if(i!==t){if(c){let{handler:t,handlerParams:n}=r;if(!t.doesFilterPass({node:e,data:o,model:T1(s,i),handlerParams:n}))return!1}else{let t=r.comp;if(typeof t.doesFilterPass!=`function`){_K(91);continue}if(!t.doesFilterPass({node:e,data:o}))return!1}}}return!0}getHandlerParams(e){let t=this.allColumnFilters.get(e.getColId());return t?.isHandler?t.handlerParams:void 0}callOnFilterChangedOutsideRenderCycle(e){let{rowRenderer:t,filterManager:n}=this.beans,r=()=>{this.isAlive()&&n?.onFilterChanged(e)};t.isRefreshInProgress()?setTimeout(r,0):r()}updateBeforeFilterChanged(e={}){let{column:t,additionalEventAttributes:n}=e,r=t?.getColId();return this.updateActiveFilters().then(()=>this.updateFilterFlagInColumns(`filterChanged`,n).then(()=>{this.allColumnFilters.forEach(e=>{let{column:t,isHandler:n}=e;r!==t.getColId()&&(n&&e.handler.onAnyFilterChanged?.(),x1(e,n)?.then(e=>{typeof e?.onAnyFilterChanged==`function`&&e.onAnyFilterChanged()}))}),this.processingFilterChange=!0}))}updateAfterFilterChanged(){this.processingFilterChange=!1}isSuppressFlashingCellsBecauseFiltering(){return!(this.gos.get(`allowShowChangeAfterFilter`)??!1)&&this.processingFilterChange}onNewRowsLoaded(e){let t=[];this.allColumnFilters.forEach(e=>{let n=e.isHandler;n&&e.handler.onNewRowsLoaded?.();let r=x1(e,n);r&&t.push(r.then(e=>{e.onNewRowsLoaded?.()}))}),Nq.all(t).then(()=>this.updateActive(e,{afterDataChange:!0}))}updateActive(e,t){this.updateFilterFlagInColumns(e,t).then(()=>this.updateActiveFilters())}createGetValue(e,t){let{filterValueSvc:n,colModel:r}=this.beans;return(i,a)=>{let o=a?r.getCol(a):e;return o?n.getValue(o,i,t):void 0}}isFilterActive(e){let t=this.cachedFilter(e);if(t?.isHandler)return this.isHandlerActive(e);let n=t?.filter;return n?n.isFilterActive():T1(this.initialModel,e.getColId())!=null}isHandlerActive(e){let t=nW(T1(this.model,e.getColId()));if(t)return t;let n=this.beans.groupFilter;return n?.isGroupFilter(e)?n.isFilterActive(e):!1}getOrCreateFilterUi(e){let t=this.getOrCreateFilterWrapper(e,!0);return t?x1(t):null}getFilterUiForDisplay(e){let t=this.getOrCreateFilterWrapper(e,!0);if(!t)return null;let n=x1(t);return n?n.then(e=>({comp:e,params:t.filterUi.filterParams,isHandler:t.isHandler})):null}getHandler(e,t){let n=this.getOrCreateFilterWrapper(e,t);return n?.isHandler?n.handler:void 0}getOrCreateFilterWrapper(e,t){if(!e.isFilterAllowed())return;let n=this.cachedFilter(e);return!n&&t&&(n=this.createFilterWrapper(e),this.setColumnFilterWrapper(e,n)),n}cachedFilter(e){return this.allColumnFilters.get(e.getColId())}getDefaultFilter(e,t=!1){return this.getDefaultFilterFromDataType(()=>this.beans.dataTypeSvc?.getBaseDataType(e),t)}getDefaultFilterFromDataType(e,t=!1){return yye(this.gos)?t?`agSetColumnFloatingFilter`:`agSetColumnFilter`:zje(e(),t)}getDefaultFloatingFilter(e){return this.getDefaultFilter(e,!0)}createFilterComp(e,t,n,r,i,a){let o=()=>{let o=r(this.createFilterCompParams(e,i,a),i);return Obe(this.beans.userCompFactory,t,o,n)},s=o();return s?{compDetails:s,createFilterUi:e=>(e?o():s).newAgStackInstance()}:null}createFilterInstance(e,t,n,r){let i=this.beans.selectableFilter;i?.isSelectable(t)&&(t=i.getFilterDef(e,t));let{handler:a,handlerParams:o,handlerGenerator:s}=this.createHandler(e,t,n)??{},c=this.createFilterComp(e,t,n,r,!!a,`init`);if(!c)return{compDetails:null,createFilterUi:null,handler:a,handlerGenerator:s,handlerParams:o};let{compDetails:l,createFilterUi:u}=c;return this.isGlobalButtons&&(l.params?.buttons?.length||gK(281,{colId:e.getColId()})),{compDetails:l,handler:a,handlerGenerator:s,handlerParams:o,createFilterUi:u}}createBaseFilterParams(e,t){let{filterManager:n,rowModel:r}=this.beans;return eq(this.gos,{column:e,colDef:e.getColDef(),getValue:this.createGetValue(e),doesRowPassOtherFilter:t?()=>!0:t=>n?.doesRowPassOtherFilters(e.getColId(),t)??!0,rowModel:r})}createFilterCompParams(e,t,n,r){let i=this.filterChangedCallbackFactory(e),a=this.createBaseFilterParams(e,r);if(a.filterChangedCallback=i,a.filterModifiedCallback=r?()=>{}:t=>this.filterModified(e,t),t){let t=a,r=e.getColId(),o=T1(this.model,r);t.model=o,t.state=this.state.get(r)??{model:o},t.onModelChange=(t,n)=>{this.updateStoredModel(r,t),this.refreshHandlerAndUi(e,t,`ui`,!1,n).then(()=>{i({...n,source:`columnFilter`})})},t.onStateChange=t=>{this.updateState(e,t),this.updateOrRefreshFilterUi(e)},t.onAction=(t,n,r)=>{this.updateModel(e,t,n),this.dispatchLocalEvent({type:`filterAction`,column:e,action:t,event:r})},t.getHandler=()=>this.getHandler(e,!0),t.onUiChange=t=>this.filterUiChanged(e,t),t.source=n}return a}createFilterUiForHandler(e,t){return t?{created:!1,create:t,filterParams:e.params,compDetails:e}:null}createFilterUiLegacy(e,t,n){let r=t(),i={created:!0,create:t,filterParams:e.params,compDetails:e,promise:r};return r.then(n),i}createFilterWrapper(e){let{compDetails:t,handler:n,handlerGenerator:r,handlerParams:i,createFilterUi:a}=this.createFilterInstance(e,e.getColDef(),this.getDefaultFilter(e),e=>e),o=e.getColId();if(n)return delete this.initialModel[o],n.init?.({...i,source:`init`,model:T1(this.model,o)}),{column:e,isHandler:!0,handler:n,handlerGenerator:r,handlerParams:i,filterUi:this.createFilterUiForHandler(t,a)};if(a){let n={column:e,filterUi:null,isHandler:!1};return n.filterUi=this.createFilterUiLegacy(t,a,e=>{n.filter=e??void 0}),n}return{column:e,filterUi:null,isHandler:!1}}createHandlerFunc(e,t,n){let{gos:r,frameworkOverrides:i,registry:a}=this.beans,o,s=e=>{let t=e.filter;return Pq(t)?t.handler||(o=t.doesFilterPass,o?()=>({doesFilterPass:o}):void 0):typeof t==`string`?t:void 0},c=r.get(`enableFilterHandlers`),l=c?s(t):void 0,u=e=>()=>this.createBean(a.createDynamicBean(e,!0)),d,f;if(typeof l==`string`){let e=r.get(`filterHandlers`)?.[l];e==null?hje.has(l)&&(d=u(l),f=l):d=e}else d=l;if(!d){let e,{compName:r,jsComp:a,fwComp:o}=Bq(i,t);r?e=r:a==null&&o==null&&t.filter===!0&&(e=n),f=this.handlerMap[e],f&&(d=u(f))}return d?{filterHandler:d,handlerNameOrCallback:o??f}:c?(xK(r)&&gK(277,{colId:e.getColId()}),Vje):void 0}createHandler(e,t,n){let r=this.createHandlerFunc(e,t,n);if(!r)return;let i=Vq(this.beans.userCompFactory,t,this.createFilterCompParams(e,!0,`init`)),{handlerNameOrCallback:a,filterHandler:o}=r,{handler:s,handlerParams:c}=this.createHandlerFromFunc(e,o,i);return{handler:s,handlerParams:c,handlerGenerator:a??o}}createHandlerFromFunc(e,t,n){let r=e.getColDef();return{handler:t(eq(this.gos,{column:e,colDef:r})),handlerParams:this.createHandlerParams(e,n)}}createHandlerParams(e,t){let n=e.getColDef(),r=e.getColId(),i=this.filterChangedCallbackFactory(e);return eq(this.gos,{colDef:n,column:e,getValue:this.createGetValue(e),doesRowPassOtherFilter:e=>this.beans.filterManager?.doesRowPassOtherFilters(r,e)??!0,onModelChange:(t,n)=>{this.updateStoredModel(r,t),this.refreshHandlerAndUi(e,t,`handler`,!1,n).then(()=>{i({...n,source:`columnFilter`})})},onModelAsStringChange:()=>{e.dispatchColEvent(`filterChanged`,`filterChanged`),this.dispatchLocalEvent({type:`filterModelAsStringChanged`,column:e})},filterParams:t})}onColumnsChanged(){let e=[],{colModel:t,filterManager:n,groupFilter:r}=this.beans;this.allColumnFilters.forEach((n,r)=>{let i;i=n.column.isPrimary()?t.getColDefCol(r):t.getCol(r),!(i&&i===n.column)&&(e.push(n.column),this.disposeFilterWrapper(n,`columnChanged`),this.disposeColumnListener(r))});let i=r&&e.every(e=>r.isGroupFilter(e));e.length>0&&!i&&n?.onFilterChanged({columns:e,source:`api`})}isFilterAllowed(e){if(!e.isFilterAllowed())return!1;let t=this.beans.groupFilter;return!t?.isGroupFilter(e)||t.isFilterAllowed(e)}getFloatingFilterCompDetails(e,t){let{userCompFactory:n,frameworkOverrides:r,selectableFilter:i,gos:a}=this.beans,o=t=>{this.getOrCreateFilterUi(e)?.then(e=>{t(bQ(e))})},s=e.getColDef(),c=i?.isSelectable(s)?i.getFilterDef(e,s):s,l=Bje(r,c,()=>this.getDefaultFloatingFilter(e))??`agReadOnlyFloatingFilter`,u=a.get(`enableFilterHandlers`),d=eq(a,{column:e,filterParams:Vq(n,c,this.createFilterCompParams(e,u,`init`,!0)),currentParentModel:()=>this.getCurrentFloatingFilterParentModel(e),parentFilterInstance:o,showParentFilter:t});if(u){let t=d,n=e.getColId(),r=this.filterChangedCallbackFactory(e);t.onUiChange=t=>this.floatingFilterUiChanged(e,t),t.model=T1(this.model,n),t.onModelChange=(t,i)=>{this.updateStoredModel(n,t),this.refreshHandlerAndUi(e,t,`floating`,!0,i).then(()=>{r({...i,source:`columnFilter`})})},t.getHandler=()=>this.getHandler(e,!0),t.source=`init`}return jbe(n,s,d,l)}getCurrentFloatingFilterParentModel(e){return this.getModelFromFilterWrapper(this.cachedFilter(e)??{column:e})}destroyFilterUi(e,t,n,r){let i=`paramsUpdated`;if(e.isHandler){let a=t.getColId();delete this.initialModel[a],this.state.delete(a);let o=e.filterUi;e.filterUi=this.createFilterUiForHandler(n,r);let s=this.eventSvc;o?.created?o.promise.then(e=>{this.destroyBean(e),s.dispatchEvent({type:`filterDestroyed`,source:i,column:t})}):s.dispatchEvent({type:`filterHandlerDestroyed`,source:i,column:t})}else this.destroyFilter(t,i)}destroyFilter(e,t=`api`){let n=e.getColId(),r=this.allColumnFilters.get(n);this.disposeColumnListener(n),delete this.initialModel[n],r&&this.disposeFilterWrapper(r,t).then(t=>{t&&this.isAlive()&&this.beans.filterManager?.onFilterChanged({columns:[e],source:`api`})})}disposeColumnListener(e){let t=this.allColumnListeners.get(e);t&&(this.allColumnListeners.delete(e),t())}disposeFilterWrapper(e,t){let n=!1,{column:r,isHandler:i,filterUi:a}=e,o=r.getColId();i&&(n=this.isHandlerActive(r),this.destroyBean(e.handler),delete this.model[o],this.state.delete(o));let s=()=>{this.setColFilterActive(r,!1,`filterDestroyed`),this.allColumnFilters.delete(o),this.eventSvc.dispatchEvent({type:`filterDestroyed`,source:t,column:r})};if(a){if(a.created)return a.promise.then(e=>(n=i?n:!!e?.isFilterActive(),this.destroyBean(e),s(),n));s()}return Nq.resolve(n)}filterChangedCallbackFactory(e){return t=>{this.callOnFilterChangedOutsideRenderCycle({additionalEventAttributes:t,columns:[e],column:e,source:t?.source??`columnFilter`})}}filterParamsChanged(e,t=`api`){let n=this.allColumnFilters.get(e);if(!n)return;let r=this.beans,i=n.column,a=i.getColDef(),o=i.isFilterAllowed(),s=this.getDefaultFilter(i),c=r.selectableFilter,l=c?.isSelectable(a)?c.getFilterDef(i,a):a,u=o?this.createHandlerFunc(i,l,this.getDefaultFilter(i)):void 0,d=!!u,f=n.isHandler;if(f!=d){this.destroyFilter(i,`paramsUpdated`);return}let{compDetails:p,createFilterUi:m}=(o?this.createFilterComp(i,l,s,e=>e,d,`colDef`):null)??{compDetails:null,createFilterUi:null},h=p?.params??Vq(r.userCompFactory,l,this.createFilterCompParams(i,d,`colDef`));if(f){let r=u?.handlerNameOrCallback??u?.filterHandler,a=T1(this.model,e);if(n.handlerGenerator!=r){let o=n.handler,{handler:s,handlerParams:c}=this.createHandlerFromFunc(i,u.filterHandler,h);n.handler=s,n.handlerParams=c,n.handlerGenerator=r,delete this.model[e],s.init?.({...c,source:`init`,model:null}),this.destroyBean(o),a!=null&&this.beans.filterManager?.onFilterChanged({columns:[i],source:t})}else{let e=this.createHandlerParams(i,p?.params);n.handlerParams=e,n.handler.refresh?.({...e,source:`colDef`,model:a})}}if(this.areFilterCompsDifferent(n.filterUi?.compDetails??null,p)||!n.filterUi||!p){this.destroyFilterUi(n,i,p,m);return}n.filterUi.filterParams=h,x1(n,f)?.then(e=>{(!e?.refresh||e.refresh(h))===!1?this.destroyFilterUi(n,i,p,m):this.dispatchLocalEvent({type:`filterParamsChanged`,column:i,params:h})})}refreshHandlerAndUi(e,t,n,r,i){let a=this.cachedFilter(e);if(!a)return r&&this.getOrCreateFilterWrapper(e,!0),Nq.resolve();if(!a.isHandler)return Nq.resolve();let{filterUi:o,handler:s,handlerParams:c}=a;return gje(()=>{if(o){let{created:e,filterParams:t}=o;if(e)return o.promise.then(e=>e?{filter:e,filterParams:t}:void 0);o.refreshed=!0}return Nq.resolve(void 0)},s,c,t,this.state.get(e.getColId())??{model:t},n,i)}setColumnFilterWrapper(e,t){let n=e.getColId();this.allColumnFilters.set(n,t),this.allColumnListeners.set(n,this.addManagedListeners(e,{colDefChanged:()=>this.filterParamsChanged(n)})[0])}areFilterCompsDifferent(e,t){if(!t||!e)return!0;let{componentClass:n}=e,{componentClass:r}=t;return!(n===r||n?.render&&r?.render&&n.render===r.render)}hasFloatingFilters(){return this.beans.colModel.getCols().some(e=>e.getColDef().floatingFilter)}getFilterInstance(e){let t=this.beans.colModel.getColDefCol(e);if(!t)return Promise.resolve(void 0);let n=this.getOrCreateFilterUi(t);return n?new Promise(e=>{n.then(t=>{e(bQ(t))})}):Promise.resolve(null)}processFilterModelUpdateQueue(){this.modelUpdates.forEach(({model:e,source:t})=>this.setModel(e,t)),this.modelUpdates=[],this.columnModelUpdates.forEach(({key:e,model:t,resolve:n})=>{this.setModelForColumn(e,t).then(()=>n())}),this.columnModelUpdates=[]}getModelForColumn(e,t){if(t){let{state:t,model:n}=this,r=e.getColId(),i=t.get(r);return i?i.model??null:T1(n,r)}let n=this.cachedFilter(e);return n?this.getModelFromFilterWrapper(n):null}setModelForColumn(e,t){if(this.beans.dataTypeSvc?.isPendingInference){let n=()=>{},r=new Promise(e=>{n=e});return this.columnModelUpdates.push({key:e,model:t,resolve:n}),r}return new Promise(n=>{this.setModelForColumnLegacy(e,t).then(e=>n(e))})}getStateForColumn(e){return this.state.get(e)??{model:T1(this.model,e)}}setModelForColumnLegacy(e,t){let n=this.beans.colModel.getColDefCol(e),r=n?this.getOrCreateFilterWrapper(n,!0):null;return r?this.setModelOnFilterWrapper(r,t):Nq.resolve()}setColDefPropsForDataType(e,t,n){let r=e.filter,i=r===!0?this.getDefaultFilterFromDataType(()=>t.baseDataType):r;if(typeof i!=`string`)return;let a,o,s=this.beans,{filterParams:c,filterValueGetter:l}=e;i===`agMultiColumnFilter`?{filterParams:a,filterValueGetter:o}=s.multiFilter?.getParamsForDataType(c,l,t,n)??{}:{filterParams:a,filterValueGetter:o}=Ije(i,c,l,t,n,s,this.getLocaleTextFunc()),e.filterParams=a,o&&(e.filterValueGetter=o)}setColFilterActive(e,t,n,r){e.filterActive!==t&&(e.filterActive=t,e.dispatchColEvent(`filterActiveChanged`,n)),e.dispatchColEvent(`filterChanged`,n,r)}setModelOnFilterWrapper(e,t,n){return new Nq(r=>{if(e.isHandler){let i=e.column,a=i.getColId(),o=this.model[a];if(this.updateStoredModel(a,t),n&&t===o){r();return}this.refreshHandlerAndUi(i,t,`api`).then(()=>r());return}let i=x1(e);if(i){i.then(e=>{if(typeof e?.setModel!=`function`){gK(65),r();return}(e.setModel(t)||Nq.resolve()).then(()=>r())});return}r()})}updateStoredModel(e,t){nW(t)?this.model[e]=t:delete this.model[e];let n={model:t,state:this.state.get(e)?.state};this.state.set(e,n)}filterModified(e,t){this.getOrCreateFilterUi(e)?.then(n=>{this.eventSvc.dispatchEvent({type:`filterModified`,column:e,filterInstance:n,...t})})}filterUiChanged(e,t){this.gos.get(`enableFilterHandlers`)&&this.eventSvc.dispatchEvent({type:`filterUiChanged`,column:e,...t})}floatingFilterUiChanged(e,t){this.gos.get(`enableFilterHandlers`)&&this.eventSvc.dispatchEvent({type:`floatingFilterUiChanged`,column:e,...t})}updateModel(e,t,n){let r=e.getColId(),i=this.cachedFilter(e),a=()=>i?.filterUi;w1({action:t,filterParams:i?.filterUi?.filterParams,getFilterUi:a,getModel:()=>T1(this.model,r),getState:()=>this.state.get(r),updateState:t=>this.updateState(e,t),updateModel:e=>a()?.filterParams?.onModelChange(e,{...n,fromAction:t}),processModelToApply:i?.isHandler?i.handler.processModelToApply?.bind(i.handler):void 0})}updateAllModels(e,t){let n=[];this.allColumnFilters.forEach((t,r)=>{let i=this.beans.colModel.getColDefCol(r);i&&w1({action:e,filterParams:t.filterUi?.filterParams,getFilterUi:()=>t.filterUi,getModel:()=>T1(this.model,r),getState:()=>this.state.get(r),updateState:e=>this.updateState(i,e),updateModel:t=>{this.updateStoredModel(r,t),this.dispatchLocalEvent({type:`filterAction`,column:i,action:e}),n.push(this.refreshHandlerAndUi(i,t,`ui`))},processModelToApply:t?.isHandler?t.handler.processModelToApply?.bind(t.handler):void 0})}),n.length&&Nq.all(n).then(()=>{this.callOnFilterChangedOutsideRenderCycle({source:`columnFilter`,additionalEventAttributes:t,columns:[]})})}updateOrRefreshFilterUi(e){let t=e.getColId();C1(()=>this.cachedFilter(e)?.filterUi,()=>T1(this.model,t),()=>this.state.get(t))}updateState(e,t){this.state.set(e.getColId(),t),this.dispatchLocalEvent({type:`filterStateChanged`,column:e,state:t})}canApplyAll(){let{state:e,model:t,activeFilterComps:n}=this;for(let e of n)if(e.source===`COLUMN_MENU`)return!1;let r=!1;for(let n of e.keys()){let i=e.get(n);if(i.valid===!1)return!1;(i.model??null)!==T1(t,n)&&(r=!0)}return r}hasUnappliedModel(e){let{model:t,state:n}=this;return(n.get(e)?.model??null)!==T1(t,e)}setGlobalButtons(e){this.isGlobalButtons=e,this.dispatchLocalEvent({type:`filterGlobalButtons`,isGlobal:e})}shouldKeepStateOnDetach(e,t){if(t===`newFiltersToolPanel`)return!0;let n=this.beans.filterPanelSvc;return n?.isActive?!!n.getState(e.getColId()):!1}onPivotModeChanged(e){let{colModel:t,pivotColsSvc:n}=this.beans,r=!!PK(this.gos),i=e.currentValue,a=i?this.activeColumnFilters:this.activeAggregateFilters,o=i?this.activeAggregateFilters:this.activeColumnFilters,s=[];for(let e of a){let a=t.getColById(e.colId),c=i&&!!n?.columns.length;a&&i===N1(a,i,c,r)&&(o.push(e),s.push(e))}fve(a,s)}destroy(){super.destroy(),this.allColumnFilters.forEach(e=>this.disposeFilterWrapper(e,`gridDestroyed`)),this.allColumnListeners.clear(),this.state.clear(),this.activeFilterComps.clear()}};function Uje(e){return!!e.filterManager?.isAnyFilterPresent()}function Wje(e,t=`api`){e.filterManager?.onFilterChanged({source:t})}var Gje=class extends Q{constructor(){super(...arguments),this.beanName=`filterManager`,this.advFilterModelUpdateQueue=[]}wireBeans(e){this.quickFilter=e.quickFilter,this.advancedFilter=e.advancedFilter,this.colFilter=e.colFilter}postConstruct(){let e=this.refreshFiltersForAggregations.bind(this),t=this.updateAdvFilterColumns.bind(this);this.addManagedEventListeners({columnValueChanged:e,columnPivotChanged:e,columnPivotModeChanged:e,newColumnsLoaded:t,columnVisible:t,advancedFilterEnabledChanged:({enabled:e})=>this.onAdvFilterEnabledChanged(e),dataTypesInferred:this.processFilterModelUpdateQueue.bind(this)}),this.externalFilterPresent=this.isExternalFilterPresentCallback(),this.addManagedPropertyListeners([`isExternalFilterPresent`,`doesExternalFilterPass`],()=>{this.onFilterChanged({source:`api`})}),this.updateAggFiltering(),this.addManagedPropertyListener(`groupAggFiltering`,()=>{this.updateAggFiltering(),this.onFilterChanged()}),this.quickFilter&&this.addManagedListeners(this.quickFilter,{quickFilterChanged:()=>this.onFilterChanged({source:`quickFilter`})});let{gos:n}=this;this.alwaysPassFilter=n.get(`alwaysPassFilter`),this.addManagedPropertyListener(`alwaysPassFilter`,()=>{this.alwaysPassFilter=n.get(`alwaysPassFilter`),this.onFilterChanged({source:`api`})})}isExternalFilterPresentCallback(){let e=this.gos.getCallback(`isExternalFilterPresent`);return typeof e==`function`&&e({})}doesExternalFilterPass(e){let t=this.gos.get(`doesExternalFilterPass`);return typeof t==`function`&&t(e)}setFilterState(e,t,n=`api`){this.isAdvFilterEnabled()||this.colFilter?.setState(e,t,n)}setFilterModel(e,t=`api`,n){if(this.isAdvFilterEnabled()){n||this.warnAdvFilters();return}this.colFilter?.setModel(e,t)}getFilterModel(){return this.colFilter?.getModel()??{}}getFilterState(){return this.colFilter?.getState()}isColumnFilterPresent(){return!!this.colFilter?.isFilterPresent()}isAggregateFilterPresent(){return!!this.colFilter?.isAggFilterPresent()}isChildFilterPresent(){return this.isColumnFilterPresent()||this.isQuickFilterPresent()||this.externalFilterPresent||this.isAdvFilterPresent()}isAnyFilterPresent(){return this.isChildFilterPresent()||this.isAggregateFilterPresent()}isAdvFilterPresent(){return this.isAdvFilterEnabled()&&this.advancedFilter.isFilterPresent()}onAdvFilterEnabledChanged(e){e?this.colFilter?.disableFilters()&&this.onFilterChanged({source:`advancedFilter`}):this.advancedFilter?.isFilterPresent()&&(this.advancedFilter.setModel(null),this.onFilterChanged({source:`advancedFilter`}))}isAdvFilterEnabled(){return!!this.advancedFilter?.isEnabled()}isAdvFilterHeaderActive(){return this.isAdvFilterEnabled()&&this.advancedFilter.isHeaderActive()}refreshFiltersForAggregations(){PK(this.gos)&&this.isAnyFilterPresent()&&this.onFilterChanged()}onFilterChanged(e={}){let{source:t,additionalEventAttributes:n,columns:r=[]}=e;this.externalFilterPresent=this.isExternalFilterPresentCallback(),(this.colFilter?this.colFilter.updateBeforeFilterChanged(e):Nq.resolve()).then(()=>{let e={source:t,type:`filterChanged`,columns:r};n&&LG(e,n),this.eventSvc.dispatchEvent(e),this.colFilter?.updateAfterFilterChanged()})}isSuppressFlashingCellsBecauseFiltering(){return!!this.colFilter?.isSuppressFlashingCellsBecauseFiltering()}isQuickFilterPresent(){return!!this.quickFilter?.isFilterPresent()}updateAggFiltering(){this.aggFiltering=!!PK(this.gos)}isAggregateQuickFilterPresent(){return this.isQuickFilterPresent()&&this.shouldApplyQuickFilterAfterAgg()}isNonAggregateQuickFilterPresent(){return this.isQuickFilterPresent()&&!this.shouldApplyQuickFilterAfterAgg()}shouldApplyQuickFilterAfterAgg(){return(this.aggFiltering||this.beans.colModel.isPivotMode())&&!this.gos.get(`applyQuickFilterBeforePivotOrAgg`)}doesRowPassOtherFilters(e,t){return this.doesRowPassFilter({rowNode:t,colIdToSkip:e})}doesRowPassAggregateFilters(e){let{rowNode:t}=e;return this.alwaysPassFilter?.(t)?!0:!(this.isAggregateQuickFilterPresent()&&!this.quickFilter.doesRowPass(t)||this.isAggregateFilterPresent()&&!this.colFilter.doFiltersPass(t,e.colIdToSkip,!0))}doesRowPassFilter(e){let{rowNode:t}=e;return this.alwaysPassFilter?.(t)?!0:!(this.isNonAggregateQuickFilterPresent()&&!this.quickFilter.doesRowPass(t)||this.externalFilterPresent&&!this.doesExternalFilterPass(t)||this.isColumnFilterPresent()&&!this.colFilter.doFiltersPass(t,e.colIdToSkip)||this.isAdvFilterPresent()&&!this.advancedFilter.doesFilterPass(t))}isFilterAllowed(e){return!this.isAdvFilterEnabled()&&!!this.colFilter?.isFilterAllowed(e)}getAdvFilterModel(){return this.isAdvFilterEnabled()?this.advancedFilter.getModel():null}setAdvFilterModel(e,t=`api`){if(this.isAdvFilterEnabled()){if(this.beans.dataTypeSvc?.isPendingInference){this.advFilterModelUpdateQueue.push(e);return}this.advancedFilter.setModel(e??null),this.onFilterChanged({source:t})}}toggleAdvFilterBuilder(e,t){this.isAdvFilterEnabled()&&this.advancedFilter.getCtrl().toggleFilterBuilder({source:t,force:e})}updateAdvFilterColumns(){this.isAdvFilterEnabled()&&this.advancedFilter.updateValidity()&&this.onFilterChanged({source:`advancedFilter`})}hasFloatingFilters(){return!this.isAdvFilterEnabled()&&!!this.colFilter?.hasFloatingFilters()}getColumnFilterInstance(e){return this.isAdvFilterEnabled()?(this.warnAdvFilters(),Promise.resolve(void 0)):this.colFilter?.getFilterInstance(e)??Promise.resolve(void 0)}warnAdvFilters(){gK(68)}setupAdvFilterHeaderComp(e){this.advancedFilter?.getCtrl().setupHeaderComp(e)}getHeaderRowCount(){return+!!this.isAdvFilterHeaderActive()}getHeaderHeight(){return this.isAdvFilterHeaderActive()?this.advancedFilter.getCtrl().getHeaderHeight():0}processFilterModelUpdateQueue(){for(let e of this.advFilterModelUpdateQueue)this.setAdvFilterModel(e);this.advFilterModelUpdateQueue=[]}setColumnFilterModel(e,t){return this.isAdvFilterEnabled()?(this.warnAdvFilters(),Promise.resolve()):this.colFilter?.setModelForColumn(e,t)??Promise.resolve()}};function Kje(e){return{tag:`div`,cls:e}}var qje=class extends Yq{constructor(e){let{className:t=`ag-filter-apply-panel`}=e??{};super(Kje(t)),this.listeners=[],this.validationMessage=null,this.className=t}updateButtons(e,t){let n=this.buttons;if(this.buttons=e,n===e)return;let r=this.getGui();qW(r);let i;this.destroyListeners();let a=document.createDocumentFragment(),o=this.className,s=({type:e,label:n})=>{let r=t=>{this.dispatchLocalEvent({type:e,event:t})};[`apply`,`clear`,`reset`,`cancel`].includes(e)||gK(75);let s=e===`apply`,c=rX({tag:`button`,attrs:{type:s&&t?`submit`:`button`},ref:`${e}FilterButton`,cls:`ag-button ag-standard-button ${o}-button${s?` `+o+`-apply-button`:``}`,children:n});this.activateTabIndex([c]),s&&(i=c);let l=e=>{e.key===$.ENTER&&(e.preventDefault(),r(e))},u=this.listeners;c.addEventListener(`click`,r),u.push(()=>c.removeEventListener(`click`,r)),c.addEventListener(`keydown`,l),u.push(()=>c.removeEventListener(`keydown`,l)),a.append(c)};for(let t of e)s(t);this.eApply=i;let c=this.validationTooltipFeature;i&&!c?this.validationTooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean(`tooltipFeature`,!1,{getGui:()=>this.eApply,getLocation:()=>`advancedFilter`,getTooltipShowDelayOverride:()=>1e3})):!i&&c&&(this.validationTooltipFeature=this.destroyBean(c)),r.append(a)}getApplyButton(){return this.eApply}updateValidity(e,t=null){let n=this.eApply;n&&(LW(n,!e),this.validationMessage=t,this.validationTooltipFeature?.setTooltipAndRefresh(this.validationMessage))}destroyListeners(){for(let e of this.listeners)e();this.listeners=[]}destroy(){this.destroyListeners(),super.destroy()}},Jje=class extends Yq{constructor(e,t,n,r,i,a){super(),this.column=e,this.wrapper=t,this.eventParent=n,this.updateModel=r,this.isGlobalButtons=i,this.enableGlobalButtonCheck=a,this.hidePopup=null,this.applyActive=!1}postConstruct(){let{comp:e,params:t}=this.wrapper,n=t,r=n.useForm,i=r?`form`:`div`;this.setTemplate({tag:i,cls:`ag-filter-wrapper`}),r&&this.addManagedElementListeners(this.getGui(),{submit:e=>{e?.preventDefault()},keydown:this.handleKeyDown.bind(this)}),this.appendChild(e.getGui()),this.params=n,this.resetButtonsPanel(n),this.addManagedListeners(this.eventParent,{filterParamsChanged:({column:e,params:t})=>{e===this.column&&this.resetButtonsPanel(t,this.params)},filterStateChanged:({column:e,state:t})=>{e===this.column&&this.eButtons?.updateValidity(t.valid!==!1)},filterAction:({column:e,action:t,event:n})=>{e===this.column&&this.afterAction(t,n)},...this.enableGlobalButtonCheck?{filterGlobalButtons:({isGlobal:e})=>{if(e!==this.isGlobalButtons){this.isGlobalButtons=e;let t=this.params;this.resetButtonsPanel(t,t,!0)}}}:void 0})}afterGuiAttached(e){e&&(this.hidePopup=e.hidePopup)}resetButtonsPanel(e,t,n){let{buttons:r,readOnly:i}=t??{},{buttons:a,readOnly:o,useForm:s}=e;if(!n&&i===o&&aW(r,a))return;let c=a&&a.length>0&&!e.readOnly&&!this.isGlobalButtons,l=this.eButtons;if(c){let e=a.map(e=>{let t=`${e}Filter`;return{type:e,label:TJ(this,t)}});if(this.applyActive=DJ(this.params),!l){l=this.createBean(new qje),this.appendChild(l.getGui());let e=this.column,t=t=>({event:n})=>{this.updateModel(e,t,{fromButtons:!0}),this.afterAction(t,n)};l?.addManagedListeners(l,{apply:t(`apply`),clear:t(`clear`),reset:t(`reset`),cancel:t(`cancel`)}),this.eButtons=l}l.updateButtons(e,s)}else this.applyActive=!1,l&&(JW(l.getGui()),this.eButtons=this.destroyBean(l))}close(e){let t=this.hidePopup;if(!t)return;let n=e,r=n?.key,i;(r===$.ENTER||r===$.SPACE)&&(i={keyboardEvent:n}),t(i),this.hidePopup=null}afterAction(e,t){let{params:n,applyActive:r}=this,i=n?.closeOnApply;switch(e){case`apply`:t?.preventDefault(),i&&r&&this.close(t);break;case`reset`:i&&r&&this.close();break;case`cancel`:i&&this.close(t)}}handleKeyDown(e){!e.defaultPrevented&&e.key===$.ENTER&&this.applyActive&&(this.updateModel(this.column,`apply`,{fromButtons:!0}),this.afterAction(`apply`,e))}destroy(){this.hidePopup=null,this.eButtons=this.destroyBean(this.eButtons)}},Yje=`:where(.ag-menu:not(.ag-tabs) .ag-filter)>:not(.ag-filter-wrapper){min-width:180px}`,Xje={tag:`div`,cls:`ag-filter`},Zje=class extends Yq{constructor(e,t,n){super(Xje),this.column=e,this.source=t,this.enableGlobalButtonCheck=n,this.wrapper=null}postConstruct(){this.beans.colFilter?.activeFilterComps.add(this),this.createFilter(!0),this.addManagedEventListeners({filterDestroyed:this.onFilterDestroyed.bind(this)})}hasFilter(){return this.wrapper!=null}getFilter(){return this.wrapper?.then(e=>e.comp)??null}afterInit(){return this.wrapper?.then(()=>{})??Nq.resolve()}afterGuiAttached(e){this.afterGuiAttachedParams=e,this.wrapper?.then(t=>{this.comp?.afterGuiAttached(e),t?.comp?.afterGuiAttached?.(e)})}afterGuiDetached(){this.wrapper?.then(e=>{e?.comp?.afterGuiDetached?.()})}createFilter(e){let{column:t,source:n,beans:{colFilter:r}}=this,i=r.getFilterUiForDisplay(t)??null;this.wrapper=i,i?.then(i=>{if(!i)return;let{isHandler:a,comp:o}=i,s;if(a){let e=!!this.enableGlobalButtonCheck,n=this.createBean(new Jje(t,i,r,r.updateModel.bind(r),e&&r.isGlobalButtons,e));this.comp=n,s=n.getGui()}else this.registerCSS(Yje),s=o.getGui(),nW(s)||gK(69,{guiFromFilter:s});this.appendChild(s),e?this.eventSvc.dispatchEvent({type:`filterOpened`,column:t,source:n,eGui:this.getGui()}):o.afterGuiAttached?.(this.afterGuiAttachedParams)})}onFilterDestroyed(e){let{source:t,column:n}=e;(t===`api`||t===`paramsUpdated`)&&n.getId()===this.column.getId()&&this.beans.colModel.getColDefCol(this.column)&&(qW(this.getGui()),this.comp=this.destroyBean(this.comp),this.createFilter())}destroy(){this.beans.colFilter?.activeFilterComps.delete(this),this.eventSvc.dispatchEvent({type:`filterClosed`,column:this.column}),this.wrapper=null,this.comp=this.destroyBean(this.comp),this.afterGuiAttachedParams=void 0,super.destroy()}},Qje=class extends Q{constructor(){super(...arguments),this.beanName=`filterMenuFactory`}wireBeans(e){this.popupSvc=e.popupSvc}hideActiveMenu(){this.hidePopup?.()}showMenuAfterMouseEvent(e,t,n,r){(!e||e.isColumn)&&this.showPopup(e,r=>{this.popupSvc?.positionPopupUnderMouseEvent({additionalParams:{column:e},type:n,mouseEvent:t,ePopup:r})},n,t.target,$K(this.gos),r)}showMenuAfterButtonClick(e,t,n,r){if(e&&!e.isColumn)return;let i=-1,a=`left`,o=$K(this.gos);!o&&this.gos.get(`enableRtl`)&&(i=1,a=`right`);let s=o?void 0:4*i,c=o?void 0:4;this.showPopup(e,r=>{this.popupSvc?.positionPopupByComponent({type:n,eventSource:t,ePopup:r,nudgeX:s,nudgeY:c,alignSide:a,keepWithinBounds:!0,position:`under`,additionalParams:{column:e}})},n,t,o,r)}showPopup(e,t,n,r,i,a){let o=e?this.createBean(new Zje(e,`COLUMN_MENU`)):void 0;if(this.activeMenu=o,!o?.hasFilter()||!e){_K(57);return}let s=rX({tag:`div`,cls:`ag-menu${i?``:` ag-filter-menu`}`,role:`presentation`});[this.tabListener]=this.addManagedElementListeners(s,{keydown:e=>this.trapFocusWithin(e,s)}),s.appendChild(o?.getGui());let c,l=()=>o?.afterGuiDetached(),u=bye(this.gos)?r??this.beans.ctrlsSvc.getGridBodyCtrl().eGridBody:void 0,d=t=>{E1(e,!1,`contextMenu`);let i=t instanceof KeyboardEvent;this.tabListener&&=this.tabListener(),i&&r&&XW(r)&&vJ(r)?.focus({preventScroll:!0}),l(),this.destroyBean(this.activeMenu),this.dispatchVisibleChangedEvent(!1,n,e),a?.()},f=this.getLocaleTextFunc(),p=i&&n!==`columnFilter`?f(`ariaLabelColumnMenu`,`Column Menu`):f(`ariaLabelColumnFilter`,`Column Filter`),m=this.popupSvc?.addPopup({modal:!0,eChild:s,closeOnEsc:!0,closedCallback:d,positionCallback:()=>t(s),anchorToElement:u,ariaLabel:p});m&&(this.hidePopup=c=m.hideFunc),o.afterInit().then(()=>{t(s),o.afterGuiAttached({container:n,hidePopup:c})}),E1(e,!0,`contextMenu`),this.dispatchVisibleChangedEvent(!0,n,e)}trapFocusWithin(e,t){e.key!==$.TAB||e.defaultPrevented||_J(this.beans,t,!1,e.shiftKey)||(e.preventDefault(),gJ(t,e.shiftKey))}dispatchVisibleChangedEvent(e,t,n){this.eventSvc.dispatchEvent({type:`columnMenuVisibleChanged`,visible:e,switchingTab:!1,key:t,column:n??null,columnGroup:null})}isMenuEnabled(e){return e.isFilterAllowed()&&(e.getColDef().menuTabs??[`filterMenuTab`]).includes(`filterMenuTab`)}showMenuAfterContextMenuEvent(){}destroy(){this.destroyBean(this.activeMenu),super.destroy()}},$je=class extends Q{constructor(){super(...arguments),this.beanName=`filterValueSvc`}getValue(e,t,n){if(!t)return;let r=e.getColDef(),{selectableFilter:i,valueSvc:a,formula:o}=this.beans,s=n??i?.getFilterValueGetter(e.getColId())??r.filterValueGetter;if(s)return this.executeFilterValueGetter(s,t.data,e,t,r);let c=a.getValue(e,t,`data`);return e.isAllowFormula()&&o?.isFormula(c)?o.resolveValue(e,t):c}executeFilterValueGetter(e,t,n,r,i){let{expressionSvc:a,valueSvc:o}=this.beans,s=eq(this.gos,{data:t,node:r,column:n,colDef:i,getValue:o.getValueCallback.bind(o,r)});return typeof e==`function`?e(s):a?.evaluate(e,s)}},eMe={tag:`div`,cls:`ag-floating-filter-input`,role:`presentation`,children:[{tag:`ag-input-text-field`,ref:`eFloatingFilterText`}]},tMe=class extends Yq{constructor(){super(eMe,[e1]),this.eFloatingFilterText=null}init(e){this.params=e;let t=this.beans.colNames.getDisplayNameForColumn(e.column,`header`,!0);if(this.eFloatingFilterText.setDisabled(!0).setInputAriaLabel(`${t} ${this.getLocaleTextFunc()(`ariaFilterInput`,`Filter Input`)}`),this.gos.get(`enableFilterHandlers`)){let t=e,n=t.getHandler();if(n.getModelAsString){let e=n.getModelAsString(t.model);this.eFloatingFilterText.setValue(e)}}}onParentModelChanged(e){if(e==null){this.eFloatingFilterText.setValue(``);return}this.params.parentFilterInstance(t=>{if(t.getModelAsString){let n=t.getModelAsString(e);this.eFloatingFilterText.setValue(n)}})}refresh(e){this.init(e)}},nMe=class extends nZ{constructor(e){super(e,`ag-radio-button`,`radio`)}isSelected(){return this.eInput.checked}toggle(){this.eInput.disabled||this.isSelected()||this.setValue(!0)}addInputListeners(){super.addInputListeners(),this.addManagedEventListeners({checkboxChanged:this.onChange.bind(this)})}onChange(e){let t=this.eInput;e.selected&&e.name&&t.name&&t.name===e.name&&e.id&&t.id!==e.id&&this.setValue(!1,!0)}},P1=class{constructor(){this.customFilterOptions={}}init(e,t){this.filterOptions=e.filterOptions??t,this.mapCustomOptions(),this.defaultOption=this.getDefaultItem(e.defaultOption)}refresh(e,t){let n=e.filterOptions??t;this.filterOptions!==n&&(this.filterOptions=n,this.customFilterOptions={},this.mapCustomOptions()),this.defaultOption=this.getDefaultItem(e.defaultOption)}mapCustomOptions(){let{filterOptions:e}=this;if(e){for(let t of e)if(typeof t!=`string`){if(![[`displayKey`],[`displayName`],[`predicate`,`test`]].every(e=>e.some(e=>t[e]!=null)?!0:(gK(72,{keys:e}),!1))){this.filterOptions=e.filter(e=>e===t)||[];continue}this.customFilterOptions[t.displayKey]=t}}}getDefaultItem(e){let{filterOptions:t}=this;if(e)return e;if(t.length>=1){let e=t[0];if(typeof e==`string`)return e;if(e.displayKey)return e.displayKey;gK(73)}else gK(74)}getCustomOption(e){return this.customFilterOptions[e]}};function F1(e,t,n){return n==null?e.splice(t):e.splice(t,n)}function I1(e){return e==null||typeof e==`string`&&e.trim().length===0}function rMe(e){return e===`AND`||e===`OR`?e:`AND`}function iMe(e,t,n){if(e==null)return;let{predicate:r}=e;if(r!=null&&!t.some(e=>e==null))return r(t,n)}function aMe(e,t){let n=e.length;return n>t&&(e.splice(t),gK(78),n=t),n}var oMe=new Set([`empty`,`notBlank`,`blank`,`today`,`yesterday`,`tomorrow`,`thisWeek`,`lastWeek`,`nextWeek`,`thisMonth`,`lastMonth`,`nextMonth`,`thisQuarter`,`lastQuarter`,`nextQuarter`,`thisYear`,`lastYear`,`nextYear`,`yearToDate`,`last7Days`,`last30Days`,`last90Days`,`last6Months`,`last12Months`,`last24Months`]);function L1(e,t){let n=t.getCustomOption(e);if(n){let{numberOfInputs:e}=n;return e??1}return e&&oMe.has(e)?0:e===`inRange`?2:1}var R1=class extends Ube{constructor(e,t,n){super(e,`simple-filter`),this.mapValuesFromModel=t,this.defaultOptions=n,this.eTypes=[],this.eJoinPanels=[],this.eJoinAnds=[],this.eJoinOrs=[],this.eConditionBodies=[],this.listener=()=>this.onUiChanged(),this.lastUiCompletePosition=null,this.joinOperatorId=0}setParams(e){super.setParams(e);let t=new P1;this.optionsFactory=t,t.init(e,this.defaultOptions),this.commonUpdateSimpleParams(e),this.createOption(),this.createMissingConditionsAndOperators()}updateParams(e,t){this.optionsFactory.refresh(e,this.defaultOptions),super.updateParams(e,t),this.commonUpdateSimpleParams(e)}commonUpdateSimpleParams(e){this.setNumConditions(e),this.defaultJoinOperator=rMe(e.defaultJoinOperator),this.filterPlaceholder=e.filterPlaceholder,this.createFilterListOptions(),oG(this.getGui(),`tabindex`,this.isReadOnly()?`-1`:null)}onFloatingFilterChanged(e,t){this.setTypeFromFloatingFilter(e),this.setValueFromFloatingFilter(t),this.onUiChanged(`immediately`,!0)}setTypeFromFloatingFilter(e){this.eTypes.forEach((t,n)=>{let r=n===0?e:this.optionsFactory.defaultOption;t.setValue(r,!0)})}getModelFromUi(){let e=this.getUiCompleteConditions();return e.length===0?null:this.maxNumConditions>1&&e.length>1?{filterType:this.filterType,operator:this.getJoinOperator(),conditions:e}:e[0]}getConditionTypes(){return this.eTypes.map(e=>e.getValue())}getConditionType(e){return this.eTypes[e].getValue()}getJoinOperator(){let{eJoinOrs:e,defaultJoinOperator:t}=this;return e.length===0?t:e[0].getValue()===!0?`OR`:`AND`}areNonNullModelsEqual(e,t){let n=!e.operator,r=!t.operator;if(!n&&r||n&&!r)return!1;let i;if(n){let n=e,r=t;i=this.areSimpleModelsEqual(n,r)}else{let n=e,r=t;i=n.operator===r.operator&&ZU(n.conditions,r.conditions,(e,t)=>this.areSimpleModelsEqual(e,t))}return i}setModelIntoUi(e,t){if(e==null)return this.resetUiToDefaults(t),Nq.resolve();if(e.operator){let t=e,n=t.conditions;n??(n=[],gK(77));let r=aMe(n,this.maxNumConditions),i=this.getNumConditions();if(r<i)this.removeConditionsAndOperators(r);else if(r>i)for(let e=i;e<r;e++)this.createJoinOperatorPanel(),this.createOption();let a=t.operator===`OR`;this.eJoinAnds.forEach(e=>e.setValue(!a,!0)),this.eJoinOrs.forEach(e=>e.setValue(a,!0)),n.forEach((e,t)=>{this.eTypes[t].setValue(e.type,!0),this.setConditionIntoUi(e,t)})}else{let t=e;this.getNumConditions()>1&&this.removeConditionsAndOperators(1),this.eTypes[0].setValue(t.type,!0),this.setConditionIntoUi(t,0)}return this.lastUiCompletePosition=this.getNumConditions()-1,this.createMissingConditionsAndOperators(),this.updateUiVisibility(),t||this.params.onUiChange(this.getUiChangeEventParams()),Nq.resolve()}setNumConditions(e){let t=e.maxNumConditions??2;t<1&&(gK(79),t=1),this.maxNumConditions=t;let n=e.numAlwaysVisibleConditions??1;n<1&&(gK(80),n=1),n>t&&(gK(81),n=t),this.numAlwaysVisibleConditions=n}createOption(){let e=this.getGui(),t=this.createManagedBean(new i1);this.eTypes.push(t),t.addCss(`ag-filter-select`),e.appendChild(t.getGui());let n=this.createEValue();this.eConditionBodies.push(n),e.appendChild(n),this.putOptionsIntoDropdown(t),this.resetType(t);let r=this.getNumConditions()-1;this.forEachPositionInput(r,e=>this.resetInput(e)),this.addChangedListeners(t,r)}createJoinOperatorPanel(){let e=rX({tag:`div`,cls:`ag-filter-condition`});this.eJoinPanels.push(e);let t=this.createJoinOperator(this.eJoinAnds,e,`and`),n=this.createJoinOperator(this.eJoinOrs,e,`or`);this.getGui().appendChild(e);let r=this.eJoinPanels.length-1,i=this.joinOperatorId++;this.resetJoinOperatorAnd(t,r,i),this.resetJoinOperatorOr(n,r,i),this.isReadOnly()||(t.onValueChange(this.listener),n.onValueChange(this.listener))}createJoinOperator(e,t,n){let r=this.createManagedBean(new nMe);e.push(r);let i=`ag-filter-condition-operator`;return r.addCss(i),r.addCss(`${i}-${n}`),t.appendChild(r.getGui()),r}createFilterListOptions(){this.filterListOptions=this.optionsFactory.filterOptions.map(e=>typeof e==`string`?this.createBoilerplateListOption(e):this.createCustomListOption(e))}putOptionsIntoDropdown(e){let{filterListOptions:t}=this;for(let n of t)e.addOption(n);e.setDisabled(t.length<=1)}createBoilerplateListOption(e){return{value:e,text:this.translate(e)}}createCustomListOption(e){let{displayKey:t}=e,n=this.optionsFactory.getCustomOption(e.displayKey);return{value:t,text:n?this.getLocaleTextFunc()(n.displayKey,n.displayName):this.translate(t)}}createBodyTemplate(){return null}getAgComponents(){return[]}updateUiVisibility(){let e=this.getJoinOperator();this.updateNumConditions(),this.updateConditionStatusesAndValues(this.lastUiCompletePosition,e)}updateNumConditions(){let e=-1,t=!0;for(let n=0;n<this.getNumConditions();n++)this.isConditionUiComplete(n)?e=n:t=!1;if(this.shouldAddNewConditionAtEnd(t))this.createJoinOperatorPanel(),this.createOption();else{let t=this.lastUiCompletePosition??this.getNumConditions()-2;if(e<t){this.removeConditionsAndOperators(t+1);let n=e+1,r=t-n;r>0&&this.removeConditionsAndOperators(n,r),this.createMissingConditionsAndOperators()}}this.lastUiCompletePosition=e}updateConditionStatusesAndValues(e,t){this.eTypes.forEach((t,n)=>{let r=this.isConditionDisabled(n,e);t.setDisabled(r||this.filterListOptions.length<=1),n===1&&(LW(this.eJoinPanels[0],r),this.eJoinAnds[0].setDisabled(r),this.eJoinOrs[0].setDisabled(r))}),this.eConditionBodies.forEach((e,t)=>{FW(e,this.isConditionBodyVisible(t))});let n=(t??this.getJoinOperator())===`OR`;for(let e of this.eJoinAnds)e.setValue(!n,!0);for(let e of this.eJoinOrs)e.setValue(n,!0);this.forEachInput((t,n,r,i)=>{this.setElementDisplayed(t,n<i),this.setElementDisabled(t,this.isConditionDisabled(r,e))}),this.resetPlaceholder()}shouldAddNewConditionAtEnd(e){return e&&this.getNumConditions()<this.maxNumConditions&&!this.isReadOnly()}removeConditionsAndOperators(e,t){if(e>=this.getNumConditions())return;let{eTypes:n,eConditionBodies:r,eJoinPanels:i,eJoinAnds:a,eJoinOrs:o}=this;this.removeComponents(n,e,t),this.removeElements(r,e,t),this.removeEValues(e,t);let s=Math.max(e-1,0);this.removeElements(i,s,t),this.removeComponents(a,s,t),this.removeComponents(o,s,t)}removeElements(e,t,n){let r=F1(e,t,n);for(let e of r)JW(e)}removeComponents(e,t,n){let r=F1(e,t,n);for(let e of r)JW(e.getGui()),this.destroyBean(e)}afterGuiAttached(e){if(super.afterGuiAttached(e),this.resetPlaceholder(),!e?.suppressFocus){let e;if(!this.isReadOnly()){let t=this.getInputs(0)[0];e=t instanceof tZ&&this.isConditionBodyVisible(0)?t.getInputElement():this.eTypes[0]?.getFocusableElement()}(e??this.getGui()).focus({preventScroll:!0})}}shouldKeepInvalidInputState(){return!1}afterGuiDetached(){super.afterGuiDetached();let e=this.params;if(this.beans.colFilter?.shouldKeepStateOnDetach(e.column)||this.shouldKeepInvalidInputState())return;e.onStateChange({model:e.model});let t=-1,n=-1,r=!1,i=this.getJoinOperator();for(let e=this.getNumConditions()-1;e>=0;e--)if(this.isConditionUiComplete(e))t===-1&&(t=e,n=e);else{let i=e>=this.numAlwaysVisibleConditions&&!this.isConditionUiComplete(e-1),a=e<t;(i||a)&&(this.removeConditionsAndOperators(e,1),r=!0,a&&n--)}let a=!1;this.getNumConditions()<this.numAlwaysVisibleConditions&&(this.createMissingConditionsAndOperators(),a=!0),this.shouldAddNewConditionAtEnd(n===this.getNumConditions()-1)&&(this.createJoinOperatorPanel(),this.createOption(),a=!0),a&&this.updateConditionStatusesAndValues(n,i),r&&this.updateJoinOperatorsDisabled(),this.lastUiCompletePosition=n}getModelAsString(e){return this.params.getHandler()?.getModelAsString?.(e)??``}resetPlaceholder(){let e=this.getLocaleTextFunc(),{filterPlaceholder:t,eTypes:n}=this;this.forEachInput((r,i,a,o)=>{if(!(r instanceof tZ))return;let s=i===0&&o>1?`inRangeStart`:i===0?`filterOoo`:`inRangeEnd`,c=i===0&&o>1?e(`ariaFilterFromValue`,`Filter from value`):i===0?e(`ariaFilterValue`,`Filter Value`):e(`ariaFilterToValue`,`Filter to Value`),l=n[a].getValue(),u=OJ(this,t,s,l);r.setInputPlaceholder(u),r.setInputAriaLabel(c)})}setElementValue(e,t,n){e instanceof tZ&&e.setValue(t==null?null:String(t),!0)}setElementDisplayed(e,t){Gq(e)&&FW(e.getGui(),t)}setElementDisabled(e,t){Gq(e)&&LW(e.getGui(),t)}attachElementOnChange(e,t){e instanceof tZ&&e.onValueChange(t)}forEachInput(e){this.getConditionTypes().forEach((t,n)=>{this.forEachPositionTypeInput(n,t,e)})}forEachPositionInput(e,t){let n=this.getConditionType(e);this.forEachPositionTypeInput(e,n,t)}forEachPositionTypeInput(e,t,n){let r=L1(t,this.optionsFactory),i=this.getInputs(e);for(let t=0;t<i.length;t++){let a=i[t];a!=null&&n(a,t,e,r)}}isConditionDisabled(e,t){return this.isReadOnly()?!0:e!==0&&e>t+1}isConditionBodyVisible(e){return L1(this.getConditionType(e),this.optionsFactory)>0}isConditionUiComplete(e){return!(e>=this.getNumConditions()||this.getConditionType(e)===`empty`||this.getValues(e).some(e=>e==null)||this.positionHasInvalidInputs(e))}getNumConditions(){return this.eTypes.length}getUiCompleteConditions(){let e=[];for(let t=0;t<this.getNumConditions();t++)this.isConditionUiComplete(t)&&e.push(this.createCondition(t));return e}createMissingConditionsAndOperators(){if(!this.isReadOnly())for(let e=this.getNumConditions();e<this.numAlwaysVisibleConditions;e++)this.createJoinOperatorPanel(),this.createOption()}resetUiToDefaults(e){this.removeConditionsAndOperators(this.isReadOnly()?1:this.numAlwaysVisibleConditions),this.eTypes.forEach(e=>this.resetType(e)),this.eJoinAnds.forEach((e,t)=>this.resetJoinOperatorAnd(e,t,this.joinOperatorId+t)),this.eJoinOrs.forEach((e,t)=>this.resetJoinOperatorOr(e,t,this.joinOperatorId+t)),this.joinOperatorId++,this.forEachInput(e=>this.resetInput(e)),this.resetPlaceholder(),this.createMissingConditionsAndOperators(),this.lastUiCompletePosition=null,this.updateUiVisibility(),e||this.params.onUiChange(this.getUiChangeEventParams())}resetType(e){let t=this.getLocaleTextFunc()(`ariaFilteringOperator`,`Filtering operator`);e.setValue(this.optionsFactory.defaultOption,!0).setAriaLabel(t).setDisabled(this.isReadOnly()||this.filterListOptions.length<=1)}resetJoinOperatorAnd(e,t,n){this.resetJoinOperator(e,t,this.defaultJoinOperator===`AND`,this.translate(`andCondition`),n)}resetJoinOperatorOr(e,t,n){this.resetJoinOperator(e,t,this.defaultJoinOperator===`OR`,this.translate(`orCondition`),n)}resetJoinOperator(e,t,n,r,i){this.updateJoinOperatorDisabled(e.setValue(n,!0).setName(`ag-simple-filter-and-or-${this.getCompId()}-${i}`).setLabel(r),t)}updateJoinOperatorsDisabled(){let e=(e,t)=>this.updateJoinOperatorDisabled(e,t);this.eJoinAnds.forEach(e),this.eJoinOrs.forEach(e)}updateJoinOperatorDisabled(e,t){e.setDisabled(this.isReadOnly()||t>0)}resetInput(e){this.setElementValue(e,null),this.setElementDisabled(e,this.isReadOnly())}setConditionIntoUi(e,t){let n=this.mapValuesFromModel(e,this.optionsFactory);this.forEachInput((e,r,i)=>{i===t&&this.setElementValue(e,n[r]==null?null:n[r])})}setValueFromFloatingFilter(e){this.forEachInput((t,n,r)=>{this.setElementValue(t,n===0&&r===0?e:null,!0)})}addChangedListeners(e,t){this.isReadOnly()||(e.onValueChange(this.listener),this.forEachPositionInput(t,e=>{this.attachElementOnChange(e,this.listener)}))}hasInvalidInputs(){return!1}positionHasInvalidInputs(e){return!1}isReadOnly(){return!!this.params.readOnly}},z1=[`equals`,`notEqual`,`greaterThan`,`greaterThanOrEqual`,`lessThan`,`lessThanOrEqual`,`inRange`,`blank`,`notBlank`];function B1(e){return e?.allowedCharPattern??null}function V1(e,t){let{filter:n,filterTo:r,type:i}=e||{};return[aZ(n),aZ(r)].slice(0,L1(i,t))}var sMe=class extends R1{constructor(){super(`bigintFilter`,V1,z1),this.eValuesFrom=[],this.eValuesTo=[],this.filterType=`bigint`,this.defaultDebounceMs=500}afterGuiAttached(e){super.afterGuiAttached(e),this.refreshInputValidation()}shouldKeepInvalidInputState(){return!iJ()&&this.hasInvalidInputs()&&this.getConditionTypes().includes(`inRange`)}refreshInputValidation(){for(let e=0;e<this.eValuesFrom.length;e++){let t=this.eValuesFrom[e],n=this.eValuesTo[e];this.refreshInputPairValidation(t,n)}}refreshInputPairValidation(e,t,n=!1){let{bigintParser:r}=this.params,i=this.getParsedValue(e,r),a=this.getParsedValue(t,r),o=this.isInvalidValue(e,i),s=this.isInvalidValue(t,a),c=n?e:t,l=n?t:e,u=n?o:s,d=n?s:o,f=``;if(u)f=this.getLocaleTextFunc()(`invalidBigInt`,`Invalid BigInt`);else if(!o&&!s){let r=cMe(i,a,n);r&&(f=this.translate(r,[String(n?t.getValue():e.getValue())]))}c.setCustomValidity(f),d||l.setCustomValidity(``),f.length>0&&this.beans.ariaAnnounce.announceValue(f,`dateFilter`)}getState(){return{isInvalid:this.hasInvalidInputs()}}areStatesEqual(e,t){return(e?.isInvalid??!1)===(t?.isInvalid??!1)}refresh(e){let t=super.refresh(e),{state:n,additionalEventAttributes:r}=e,i=this.state,a=r?.fromAction;return(a&&a!=`apply`||n.model!==i.model||!this.areStatesEqual(n.state,i.state))&&this.refreshInputValidation(),t}setElementValue(e,t,n){super.setElementValue(e,t,n),t===null&&e.setCustomValidity(``)}createEValue(){let{params:e,eValuesFrom:t,eValuesTo:n}=this,r=B1(e),i=rX({tag:`div`,cls:`ag-filter-body`,role:`presentation`}),a=this.createFromToElement(i,t,`from`,r),o=this.createFromToElement(i,n,`to`,r),s=(e,t,n)=>()=>this.refreshInputPairValidation(e,t,n),c=s(a,o,!0);a.onValueChange(c),a.addGuiEventListener(`focusin`,c);let l=s(a,o,!1);return o.onValueChange(l),o.addGuiEventListener(`focusin`,l),i}createFromToElement(e,t,n,r){let i=this.createManagedBean(r?new $$({allowedCharPattern:r}):new $$);return i.addCss(`ag-filter-${n}`),i.addCss(`ag-filter-filter`),t.push(i),e.appendChild(i.getGui()),i}removeEValues(e,t){let n=n=>this.removeComponents(n,e,t);n(this.eValuesFrom),n(this.eValuesTo)}getValues(e){let t=[];return this.forEachPositionInput(e,(e,n,r,i)=>{n<i&&t.push(aZ(e.getValue()??null))}),t}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}createCondition(e){let t=this.getConditionType(e),n={filterType:this.filterType,type:t},r=this.getValues(e);return r.length>0&&(n.filter=String(r[0])),r.length>1&&(n.filterTo=String(r[1])),n}removeConditionsAndOperators(e,t){if(!this.hasInvalidInputs())return super.removeConditionsAndOperators(e,t)}getInputs(e){let{eValuesFrom:t,eValuesTo:n}=this;return e>=t.length?[null,null]:[t[e],n[e]]}hasInvalidInputs(){let e=!1;return this.forEachInput(t=>e||=!t.getInputElement().validity.valid),e}positionHasInvalidInputs(e){let t=!1;return this.forEachPositionInput(e,e=>t||=!e.getInputElement().validity.valid),t}canApply(e){return!this.hasInvalidInputs()}getParsedValue(e,t){let n=e.getValue();return n==null||typeof n==`string`&&n.trim()===``?null:t?t(n):aZ(n)}isInvalidValue(e,t){let n=e.getValue();return n!=null&&String(n).trim()!==``&&t===null}};function cMe(e,t,n){return e!=null&&t!=null&&e>=t?`strict${n?`Max`:`Min`}ValueValidation`:null}var H1=class extends Q{constructor(e,t){super(),this.mapValuesFromModel=e,this.defaultOptions=t}init(e){let t=e.filterParams,n=new P1;this.optionsFactory=n,n.init(t,this.defaultOptions),this.filterModelFormatter=this.createManagedBean(new this.FilterModelFormatterClass(n,t)),this.updateParams(e),this.validateModel(e)}refresh(e){if(e.source===`colDef`){let t=e.filterParams,n=this.optionsFactory;n.refresh(t,this.defaultOptions),this.filterModelFormatter.updateParams({optionsFactory:n,filterParams:t}),this.updateParams(e)}this.validateModel(e)}updateParams(e){this.params=e}doesFilterPass(e){let t=e.model;if(t==null)return!0;let{operator:n}=t,r=[];if(n){let e=t;r.push(...e.conditions??[])}else r.push(t);let i=n&&n===`OR`?`some`:`every`,a=this.params.getValue(e.node);return r[i](t=>this.individualConditionPasses(e,t,a))}getModelAsString(e,t){return this.filterModelFormatter.getModelAsString(e,t)??``}validateModel(e){let{model:t,filterParams:{filterOptions:n,maxNumConditions:r}}=e;if(t==null)return;let i=Hq(t)?t.conditions:[t],a=n?.map(e=>typeof e==`string`?e:e.displayKey)??this.defaultOptions;if(i&&!i.every(e=>a.find(t=>t===e.type)!==void 0)){this.params={...e,model:null},e.onModelChange(null);return}let o=!1,s=this.filterType;if((i&&!i.every(e=>e.filterType===s)||t.filterType!==s)&&(i=i.map(e=>({...e,filterType:s})),o=!0),typeof r==`number`&&i&&i.length>r&&(i=i.slice(0,r),o=!0),o){let n=i.length>1?{...t,filterType:s,conditions:i}:{...i[0],filterType:s};this.params={...e,model:n},e.onModelChange(n)}}individualConditionPasses(e,t,n){let r=this.optionsFactory,i=this.mapValuesFromModel(t,r);return iMe(r.getCustomOption(t.type),i,n)??(n==null?this.evaluateNullValue(t.type):this.evaluateNonNullValue(i,n,t,e))}},U1=class extends H1{evaluateNullValue(e){let{includeBlanksInEquals:t,includeBlanksInNotEqual:n,includeBlanksInGreaterThan:r,includeBlanksInLessThan:i,includeBlanksInRange:a}=this.params.filterParams;switch(e){case`equals`:if(t)return!0;break;case`notEqual`:if(n)return!0;break;case`greaterThan`:case`greaterThanOrEqual`:if(r)return!0;break;case`lessThan`:case`lessThanOrEqual`:if(i)return!0;break;case`inRange`:if(a)return!0;break;case`blank`:return!0;case`notBlank`:return!1}return!1}evaluateNonNullValue(e,t,n){let r=n.type;if(!this.isValid(t))return r===`notEqual`||r===`notBlank`;let i=this.comparator(),a=e[0]==null?0:i(e[0],t);switch(r){case`equals`:return a===0;case`notEqual`:return a!==0;case`greaterThan`:return a>0;case`greaterThanOrEqual`:return a>=0;case`lessThan`:return a<0;case`lessThanOrEqual`:return a<=0;case`inRange`:{let n=i(e[1],t);return this.params.filterParams.inRangeInclusive?a>=0&&n<=0:a>0&&n<0}case`blank`:return I1(t);case`notBlank`:return!I1(t);default:return gK(76,{filterModelType:r}),!0}}},W1={equals:`Equals`,notEqual:`NotEqual`,greaterThan:`GreaterThan`,greaterThanOrEqual:`GreaterThanOrEqual`,lessThan:`LessThan`,lessThanOrEqual:`LessThanOrEqual`,inRange:`InRange`},lMe={contains:`Contains`,notContains:`NotContains`,equals:`TextEquals`,notEqual:`TextNotEqual`,startsWith:`StartsWith`,endsWith:`EndsWith`,inRange:`InRange`},G1=class extends Q{constructor(e,t,n){super(),this.optionsFactory=e,this.filterParams=t,this.valueFormatter=n}getModelAsString(e,t){let n=this.getLocaleTextFunc(),r=t===`filterToolPanel`;if(!e)return r?TJ(this,`filterSummaryInactive`):null;if(e.operator!=null){let n=e,r=(n.conditions??[]).map(e=>this.getModelAsString(e,t)),i=n.operator===`AND`?`andCondition`:`orCondition`;return r.join(` ${TJ(this,i)} `)}if(e.type===`blank`||e.type===`notBlank`)return r?TJ(this,e.type===`blank`?`filterSummaryBlank`:`filterSummaryNotBlank`):n(e.type,e.type);{let t=e,{displayKey:i,displayName:a,numberOfInputs:o}=this.optionsFactory.getCustomOption(t.type)||{};return i&&a&&o===0?n(i,a):this.conditionToString(t,r,t.type===`inRange`||o===2,i,a)}}updateParams(e){let{optionsFactory:t,filterParams:n}=e;this.optionsFactory=t,this.filterParams=n}conditionForToolPanel(e,t,n,r,i,a){let o,s=this.getTypeKey(e);return s&&(o=TJ(this,s)),i&&a&&(o=this.getLocaleTextFunc()(i,a)),o==null?null:t?`${o} ${TJ(this,`filterSummaryInRangeValues`,[n(),r()])}`:`${o} ${n()}`}getTypeKey(e){let t=this.filterTypeKeys[e];return t?`filterSummary${t}`:null}formatValue(e){let t=this.valueFormatter;return t?t(e??null)??``:String(e)}},K1=class extends G1{constructor(e,t){super(e,t,t.bigintFormatter),this.filterTypeKeys=W1}conditionToString(e,t,n,r,i){let{filter:a,filterTo:o,type:s}=e,c=this.formatValue.bind(this),l=aZ(a),u=aZ(o);if(t){let e=this.conditionForToolPanel(s,n,()=>c(l),()=>c(u),r,i);if(e!=null)return e}return n?`${c(l)}-${c(u)}`:a==null?`${s}`:c(l)}},uMe=class extends U1{constructor(){super(V1,z1),this.filterType=`bigint`,this.FilterModelFormatterClass=K1}comparator(){return(e,t)=>e===t?0:e<t?1:-1}isValid(e){return aZ(e)!==null}},q1=class extends Q{constructor(e){super(),this.params=e,this.eInput=null,this.onValueChanged=()=>{}}setupGui(e){this.eInput=this.createManagedBean(new $$(this.params?.config));let t=this.eInput.getGui();e.appendChild(t);let n=e=>this.onValueChanged(e);this.addManagedListeners(t,{input:n,keydown:n})}setEditable(e){this.eInput.setDisabled(!e)}getValue(){return this.eInput.getValue()}setValue(e,t){this.eInput.setValue(e,t)}setValueChangedListener(e){this.onValueChanged=e}setParams({ariaLabel:e,autoComplete:t,placeholder:n}){let{eInput:r}=this;r.setInputAriaLabel(e),t!==void 0&&r.setAutoComplete(t),r.toggleCss(`ag-floating-filter-search-icon`,!!n),r.setInputPlaceholder(n)}};function J1(e){let t=e?.trim();return t===``?e:t}function Y1(e,t){let{filter:n,filterTo:r,type:i}=e||{};return[n||null,r||null].slice(0,L1(i,t))}var X1=class extends Yq{constructor(){super(...arguments),this.defaultDebounceMs=0}setLastTypeFromModel(e){if(!e){this.lastType=this.optionsFactory.defaultOption;return}let t=e.operator,n;n=t?e.conditions[0]:e,this.lastType=n.type}canWeEditAfterModelFromParentFilter(e){if(!e)return this.isTypeEditable(this.lastType);if(e.operator)return!1;let t=e;return this.isTypeEditable(t.type)}init(e){this.params=e;let t=this.gos.get(`enableFilterHandlers`);if(this.reactive=t,this.setParams(e),t){let t=e;this.onModelUpdated(t.model)}}setParams(e){let t=new P1;this.optionsFactory=t,t.init(e.filterParams,this.defaultOptions),this.filterModelFormatter=this.createManagedBean(new this.FilterModelFormatterClass(t,e.filterParams)),this.setSimpleParams(e,!1)}setSimpleParams(e,t=!0){let n=this.optionsFactory.defaultOption;t||(this.lastType=n),this.readOnly=!!e.filterParams.readOnly;let r=this.isTypeEditable(n);this.setEditable(r)}refresh(e){this.params=e;let t=e,n=this.reactive;if((!n||t.source===`colDef`)&&this.updateParams(e),n){let{source:e,model:n}=t;if(e===`dataChanged`||e===`ui`)return;this.onModelUpdated(n)}}updateParams(e){let t=this.optionsFactory;t.refresh(e.filterParams,this.defaultOptions),this.setSimpleParams(e),this.filterModelFormatter.updateParams({optionsFactory:t,filterParams:e.filterParams})}onParentModelChanged(e,t){t?.afterFloatingFilter||t?.afterDataChange||this.onModelUpdated(e)}isTypeEditable(e){return!!e&&!this.readOnly&&L1(e,this.optionsFactory)===1}getAriaLabel(e){return`${this.beans.colNames.getDisplayNameForColumn(e,`header`,!0)} ${this.getLocaleTextFunc()(`ariaFilterInput`,`Filter Input`)}`}},dMe={tag:`div`,ref:`eFloatingFilterInputContainer`,cls:`ag-floating-filter-input`,role:`presentation`},Z1=class extends X1{constructor(){super(...arguments),this.eFloatingFilterInputContainer=null,this.defaultDebounceMs=500}postConstruct(){this.setTemplate(dMe)}onModelUpdated(e){this.setLastTypeFromModel(e),this.setEditable(this.canWeEditAfterModelFromParentFilter(e)),this.inputSvc.setValue(this.filterModelFormatter.getModelAsString(e))}setParams(e){this.setupFloatingFilterInputService(e),super.setParams(e),this.setTextInputParams(e)}setupFloatingFilterInputService(e){this.inputSvc=this.createFloatingFilterInputService(e),this.inputSvc.setupGui(this.eFloatingFilterInputContainer)}setTextInputParams(e){let{inputSvc:t,defaultDebounceMs:n,readOnly:r}=this,{filterPlaceholder:i,column:a,browserAutoComplete:o,filterParams:s}=e,c=this.lastType??this.optionsFactory.defaultOption,l=e.filterParams.filterPlaceholder,u=i===!0?OJ(this,l,`filterOoo`,c):i||void 0;if(t.setParams({ariaLabel:this.getAriaLabel(a),autoComplete:o??!1,placeholder:u}),this.applyActive=DJ(s),!r){let e=EJ(s,n);t.setValueChangedListener(PG(this,this.syncUpWithParentFilter.bind(this),e))}}updateParams(e){super.updateParams(e),this.setTextInputParams(e)}recreateFloatingFilterInputService(e){let{inputSvc:t}=this,n=t.getValue();qW(this.eFloatingFilterInputContainer),this.destroyBean(t),this.setupFloatingFilterInputService(e),t.setValue(n,!0)}syncUpWithParentFilter(e){let t=e.key===$.ENTER,n=this.reactive;if(n&&this.params.onUiChange(),this.applyActive&&!t)return;let{inputSvc:r,params:i,lastType:a}=this,o=r.getValue();if(i.filterParams.trimInput&&(o=J1(o),r.setValue(o,!0)),n){let e=i,t=e.model,n=this.convertValue(o),r=n==null?null:{...t??{filterType:this.filterType,type:a??this.optionsFactory.defaultOption},filter:n};e.onModelChange(r,{afterFloatingFilter:!0})}else i.parentFilterInstance(e=>{e?.onFloatingFilterChanged(a||null,o||null)})}convertValue(e){return e||null}setEditable(e){this.inputSvc.setEditable(e)}},fMe=class extends Z1{constructor(){super(...arguments),this.FilterModelFormatterClass=K1,this.filterType=`bigint`,this.defaultOptions=z1}updateParams(e){let t=e.filterParams;B1(t)!==this.allowedCharPattern&&this.recreateFloatingFilterInputService(e),this.bigintParser=t?.bigintParser,super.updateParams(e)}createFloatingFilterInputService(e){let t=e.filterParams;this.allowedCharPattern=B1(t),this.bigintParser=t?.bigintParser;let n=this.allowedCharPattern?{allowedCharPattern:this.allowedCharPattern}:void 0;return this.createManagedBean(new q1({config:n}))}convertValue(e){return e==null||e===``?null:this.bigintParser?this.bigintParser(e):aZ(e)}},Q1=`.ag-input-field-input`,$1=class{constructor(e,t,n,r,i,a){this.context=e,this.eParent=i,this.alive=!0,this.debouncedReport=PG({isAlive:()=>this.alive},e0,500),this.timeoutHandle=null,kbe(t,n,r)?.newAgStackInstance().then(t=>{if(!this.alive){e.destroyBean(t);return}if(this.dateComp=t,!t)return;i.appendChild(t.getGui()),t?.afterGuiAttached?.();let{tempValue:n,disabled:r}=this;n&&t.setDate(n),r!=null&&t.setDisabled?.(r),a?.(this)})}destroy(){this.alive=!1,this.dateComp=this.context.destroyBean(this.dateComp)}getDate(){return this.dateComp?this.dateComp.getDate():this.tempValue}setDate(e){let t=this.dateComp;t?t.setDate(e):this.tempValue=e}setDisabled(e){let t=this.dateComp;t?t.setDisabled?.(e):this.disabled=e}setDisplayed(e){FW(this.eParent,e)}setInputPlaceholder(e){this.dateComp?.setInputPlaceholder?.(e)}setInputAriaLabel(e){this.dateComp?.setInputAriaLabel?.(e)}afterGuiAttached(e){this.dateComp?.afterGuiAttached?.(e)}updateParams(e){this.dateComp?.refresh?.(e)}setCustomValidity(e,t=!1){let n=this.dateComp?.getGui().querySelector(Q1);if(n&&`setCustomValidity`in n){let r=e.length>0;n.setCustomValidity(e),r?t?this.timeoutHandle=this.debouncedReport(n):e0(n):this.timeoutHandle&&window.clearTimeout(this.timeoutHandle),wW(n,r)}}getValidity(){return this.dateComp?.getGui().querySelector(Q1)?.validity}};function e0(e){e.reportValidity()}var t0=[`equals`,`notEqual`,`lessThan`,`greaterThan`,`inRange`,`blank`,`notBlank`];function n0(e,t){let{dateFrom:n,dateTo:r,type:i}=e||{};return[n&&mZ(n,void 0,!0)||null,r&&mZ(r,void 0,!0)||null].slice(0,L1(i,t))}var r0=1e3,i0=1/0,pMe=class extends R1{constructor(){super(`dateFilter`,n0,t0),this.eConditionPanelsFrom=[],this.eConditionPanelsTo=[],this.dateConditionFromComps=[],this.dateConditionToComps=[],this.minValidYear=r0,this.maxValidYear=i0,this.minValidDate=null,this.maxValidDate=null,this.filterType=`date`}afterGuiAttached(e){super.afterGuiAttached(e),this.dateConditionFromComps[0].afterGuiAttached(e),this.refreshInputValidation()}shouldKeepInvalidInputState(){return!iJ()&&this.hasInvalidInputs()&&this.getConditionTypes().includes(`inRange`)}commonUpdateSimpleParams(e){super.commonUpdateSimpleParams(e);let t=(t,n)=>{let r=e[t];if(r!=null){if(isNaN(r))gK(82,{param:t});else return r==null?n:Number(r)}return n},n=t(`minValidYear`,r0),r=t(`maxValidYear`,i0);this.minValidYear=n,this.maxValidYear=r,n>r&&gK(83);let{minValidDate:i,maxValidDate:a}=e,o=i instanceof Date?i:mZ(i);this.minValidDate=o;let s=a instanceof Date?a:mZ(a);this.maxValidDate=s,o&&s&&o>s&&gK(84)}refreshInputValidation(){for(let e=0;e<this.dateConditionFromComps.length;e++)this.refreshInputPairValidation(e,!1,!0)}refreshInputPairValidation(e,t=!1,n=!1){let{dateConditionFromComps:r,dateConditionToComps:i,beans:a}=this,o=r[e],s=i[e],c=L1(this.getConditionType(e),this.optionsFactory),l=o.getDate(),u=s.getDate(),d=c>=2?mMe(l,u,t):null,f=d?this.translate(d,[String(t?u:l)]):``,p=!iJ()&&!n;(t?o:s).setCustomValidity(f,p),(t?s:o).setCustomValidity(``,p),f.length>0&&a.ariaAnnounce.announceValue(f,`dateFilter`)}createDateCompWrapper(e,t,n){let{beans:{userCompFactory:r,context:i,gos:a},params:o}=this,s=n===`from`,c=new $1(i,r,o.colDef,eq(a,{onDateChanged:()=>{this.refreshInputPairValidation(t,s),this.onUiChanged()},onFocusIn:()=>this.refreshInputPairValidation(t,s),filterParams:o,location:`filter`}),e);return this.addDestroyFunc(()=>c.destroy()),c}getState(){return{isInvalid:this.hasInvalidInputs()}}areStatesEqual(e,t){return(e?.isInvalid??!1)===(t?.isInvalid??!1)}setElementValue(e,t){e.setDate(t),t||e.setCustomValidity(``)}setElementDisplayed(e,t){e.setDisplayed(t)}setElementDisabled(e,t){e.setDisabled(t)}createEValue(){let e=rX({tag:`div`,cls:`ag-filter-body`});return this.createFromToElement(e,this.eConditionPanelsFrom,this.dateConditionFromComps,`from`),this.createFromToElement(e,this.eConditionPanelsTo,this.dateConditionToComps,`to`),e}createFromToElement(e,t,n,r){let i=rX({tag:`div`,cls:`ag-filter-${r} ag-filter-date-${r}`});t.push(i),e.appendChild(i),n.push(this.createDateCompWrapper(i,t.length-1,r))}removeEValues(e,t){this.removeDateComps(this.dateConditionFromComps,e,t),this.removeDateComps(this.dateConditionToComps,e,t),F1(this.eConditionPanelsFrom,e,t),F1(this.eConditionPanelsTo,e,t)}removeDateComps(e,t,n){let r=F1(e,t,n);for(let e of r)e.destroy()}isValidDateValue(e){if(e===null)return!1;let{minValidDate:t,maxValidDate:n,minValidYear:r,maxValidYear:i}=this;if(t){if(e<t)return!1}else if(e.getUTCFullYear()<r)return!1;if(n){if(e>n)return!1}else if(e.getUTCFullYear()>i)return!1;return!0}hasInvalidInputs(){let e=!1;return this.forEachInput(t=>e||=t.getDate()!=null&&!(t.getValidity()?.valid??!0)),e}positionHasInvalidInputs(e){let t=!1;return this.forEachPositionInput(e,e=>t||=!(e.getValidity()?.valid??!0)),t}canApply(e){return!this.hasInvalidInputs()}isConditionUiComplete(e){if(!super.isConditionUiComplete(e))return!1;let t=!0;return this.forEachPositionInput(e,(e,n,r,i)=>{!t||n>=i||(t&&=this.isValidDateValue(e.getDate()))}),t}areSimpleModelsEqual(e,t){return e.dateFrom===t.dateFrom&&e.dateTo===t.dateTo&&e.type===t.type}createCondition(e){let t=this.getConditionType(e),n={},{params:r,filterType:i}=this,a=this.getValues(e),o=r.useIsoSeparator?`T`:` `;return a.length>0&&(n.dateFrom=cZ(a[0],!0,o)),a.length>1&&(n.dateTo=cZ(a[1],!0,o)),{dateFrom:null,dateTo:null,filterType:i,type:t,...n}}removeConditionsAndOperators(e,t){if(!this.hasInvalidInputs())return super.removeConditionsAndOperators(e,t)}resetPlaceholder(){let e=this.getLocaleTextFunc(),t=this.translate(`dateFormatOoo`),n=e(`ariaFilterValue`,`Filter Value`);this.forEachInput(e=>{e.setInputPlaceholder(t),e.setInputAriaLabel(n)})}getInputs(e){let{dateConditionFromComps:t,dateConditionToComps:n}=this;return e>=t.length?[null,null]:[t[e],n[e]]}getValues(e){let t=[];return this.forEachPositionInput(e,(e,n,r,i)=>{n<i&&t.push(e.getDate())}),t}translate(e,t){let n=e;return e===`lessThan`?n=`before`:e===`greaterThan`&&(n=`after`),super.translate(n,t)}};function mMe(e,t,n){return e!=null&&t!=null&&e>=t?`${n?`max`:`min`}DateValidation`:null}var a0=class extends G1{constructor(e,t){super(e,t,e=>{let{dataTypeSvc:n,valueSvc:r}=this.beans,i=t.column,a=n?.getDateFormatterFunction(i),o=a?a(e??void 0):e;return r.formatValue(i,null,o)}),this.filterTypeKeys=W1}conditionToString(e,t,n,r,i){let{type:a}=e,o=mZ(e.dateFrom),s=mZ(e.dateTo),c=this.filterParams.inRangeFloatingFilterDateFormat,l=t?this.formatValue.bind(this):e=>Pwe(e,c),u=()=>o===null?`null`:l(o),d=()=>s===null?`null`:l(s);if(o==null&&s==null)return TJ(this,a);if(t){let e=this.conditionForToolPanel(a,n,u,d,r,i);if(e!=null)return e}return n?`${u()}-${d()}`:o==null?`${a}`:l(o)}};function hMe(e,t){let n=t;return n<e?-1:+(n>e)}var gMe=class extends U1{constructor(){super(n0,t0),this.filterType=`date`,this.FilterModelFormatterClass=a0,this.filterTypeToRangeCache=new Map}getOrRefreshRangeCacheItem(e,t){let{filterTypeToRangeCache:n}=this,r=Date.now(),i=n.get(e);if(i&&i.expires<r&&(i=void 0),!i){let[a,o]=t(new Date(r),new Date(r));i={from:a,to:o,expires:u0(new Date(r)).getTime()-r},n.set(e,i)}return i}comparator(){return this.params.filterParams.comparator??hMe}isValid(e){let t=this.params.filterParams.isValidDate;return!t||t(e)}evaluateNonNullValue(e,t,n){let r=n.type,i=this.comparator();if(!this.isValid(t))return r===`notEqual`||r===`notBlank`;let a=r,o=CMe[a];if(o){let{from:e,to:n}=this.getOrRefreshRangeCacheItem(a,o);return i(e,t)>=0&&i(n,t)<0}return super.evaluateNonNullValue(e,t,n)}},_Me=1,o0=null,vMe=()=>{if(o0!=null)return o0;let e,t=typeof navigator>`u`?void 0:navigator.languages?.[0]??navigator.language;if(t&&typeof Intl<`u`&&typeof Intl.Locale==`function`)try{e=new Intl.Locale(t).getWeekInfo?.()?.firstDay}catch{e=void 0}return o0=e==null?_Me:e%7,o0},s0=e=>(e.setHours(0,0,0,0),e),c0=e=>{let t=(e.getDay()-vMe()+7)%7;return e.setDate(e.getDate()-t),s0(e)},l0=(e,t=1)=>(e.setDate(e.getDate()-t),e),u0=e=>(e.setDate(e.getDate()+1),s0(e)),d0=e=>(c0(e),e.setDate(e.getDate()+6),u0(e)),f0=e=>(e.setDate(1),s0(e)),p0=e=>(e.setDate(1),e.setMonth(e.getMonth()+1),s0(e)),m0=e=>{let t=Math.floor(e.getMonth()/3);return e.setMonth(t*3),f0(e)},h0=e=>{let t=Math.floor(e.getMonth()/3);return e.setMonth(t*3+2),p0(e)},g0=e=>(e.setMonth(0,1),s0(e)),_0=e=>(e.setMonth(12,0),u0(e)),v0=e=>l0(e),y0=e=>v0(c0(e)),b0=e=>v0(f0(e)),x0=e=>v0(m0(e)),S0=(e,t)=>[s0(e),u0(t)],yMe=(e,t)=>S0(v0(e),v0(t)),C0=(e,t)=>[c0(e),d0(t)],bMe=(e,t)=>C0(y0(e),y0(t)),w0=(e,t)=>[f0(e),p0(t)],xMe=(e,t)=>w0(b0(e),b0(t)),T0=(e,t)=>[m0(e),h0(t)],SMe=(e,t)=>T0(x0(e),x0(t)),E0=(e,t)=>[g0(e),_0(t)],CMe={today:S0,yesterday:yMe,tomorrow:(e,t)=>(e.setDate(e.getDate()+1),t.setDate(t.getDate()+1),S0(e,t)),thisWeek:C0,lastWeek:bMe,nextWeek:(e,t)=>(e.setDate(e.getDate()+7),t.setDate(t.getDate()+7),C0(e,t)),thisMonth:w0,lastMonth:xMe,nextMonth:(e,t)=>(e.setMonth(e.getMonth()+1),t.setMonth(t.getMonth()+1),w0(e,t)),thisQuarter:T0,lastQuarter:SMe,nextQuarter:(e,t)=>(e.setMonth(e.getMonth()+3),t.setMonth(t.getMonth()+3),T0(e,t)),thisYear:E0,lastYear:(e,t)=>(e.setFullYear(e.getFullYear()-1),t.setFullYear(t.getFullYear()-1),E0(e,t)),nextYear:(e,t)=>(e.setFullYear(e.getFullYear()+1),t.setFullYear(t.getFullYear()+1),E0(e,t)),yearToDate:(e,t)=>[g0(e),u0(t)],last7Days:(e,t)=>[s0(l0(e,7)),u0(t)],last30Days:(e,t)=>[s0(l0(e,30)),u0(t)],last90Days:(e,t)=>[s0(l0(e,90)),u0(t)],last6Months:(e,t)=>(e.setFullYear(e.getFullYear()-1),e.setMonth(e.getMonth()+6),[s0(e),u0(t)]),last12Months:(e,t)=>(e.setFullYear(e.getFullYear()-1),[s0(e),u0(t)]),last24Months:(e,t)=>(e.setFullYear(e.getFullYear()-2),[s0(e),u0(t)]),setStartOfDay:s0,setStartOfWeek:c0,setStartOfNextDay:u0,setStartOfNextWeek:d0,setStartOfMonth:f0,setStartOfNextMonth:p0,setStartOfQuarter:m0,setStartOfNextQuarter:h0,setStartOfYear:g0,setStartOfNextYear:_0,setPreviousDay:v0,setPreviousWeek:y0,setPreviousMonth:b0,setPreviousQuarter:x0},wMe={tag:`div`,cls:`ag-floating-filter-input`,role:`presentation`,children:[{tag:`ag-input-text-field`,ref:`eReadOnlyText`},{tag:`div`,ref:`eDateWrapper`,cls:`ag-date-floating-filter-wrapper`}]},TMe=class extends X1{constructor(){super(wMe,[e1]),this.eReadOnlyText=null,this.eDateWrapper=null,this.FilterModelFormatterClass=a0,this.filterType=`date`,this.defaultOptions=t0}setParams(e){super.setParams(e),this.createDateComponent();let t=this.getLocaleTextFunc();this.eReadOnlyText.setDisabled(!0).setInputAriaLabel(t(`ariaDateFilterInput`,`Date Filter Input`))}updateParams(e){super.updateParams(e),this.dateComp.updateParams(this.getDateComponentParams()),this.updateCompOnModelChange(e.currentParentModel())}updateCompOnModelChange(e){let t=!this.readOnly&&this.canWeEditAfterModelFromParentFilter(e);if(this.setEditable(t),t){let t=e?mZ(e.dateFrom):null;this.dateComp.setDate(t),this.eReadOnlyText.setValue(``)}else this.eReadOnlyText.setValue(this.filterModelFormatter.getModelAsString(e)),this.dateComp.setDate(null)}setEditable(e){FW(this.eDateWrapper,e),FW(this.eReadOnlyText.getGui(),!e)}onModelUpdated(e){super.setLastTypeFromModel(e),this.updateCompOnModelChange(e)}onDateChanged(){let e=this.dateComp.getDate();if(this.reactive){let t=this.params;t.onUiChange();let n=t.model,r=cZ(e),i=r==null?null:{...n??{filterType:this.filterType,type:this.lastType??this.optionsFactory.defaultOption},dateFrom:r};t.onModelChange(i,{afterFloatingFilter:!0})}else this.params.parentFilterInstance(t=>{t?.onFloatingFilterChanged(this.lastType||null,e)})}getDateComponentParams(){let{filterParams:e}=this.params,t=EJ(e,this.defaultDebounceMs);return eq(this.gos,{onDateChanged:PG(this,this.onDateChanged.bind(this),t),filterParams:e,location:`floatingFilter`})}createDateComponent(){let{beans:{context:e,userCompFactory:t},eDateWrapper:n,params:{column:r}}=this;this.dateComp=new $1(e,t,r.getColDef(),this.getDateComponentParams(),n,e=>{e.setInputAriaLabel(this.getAriaLabel(r))}),this.addDestroyFunc(()=>this.dateComp.destroy())}},EMe={tag:`div`,cls:`ag-filter-filter`,children:[{tag:`ag-input-text-field`,ref:`eDateInput`,cls:`ag-date-filter`}]},DMe=class extends Yq{constructor(){super(EMe,[e1]),this.eDateInput=null,this.isApply=!1,this.applyOnFocusOut=!1}init(e){this.params=e,this.setParams(e);let t=this.eDateInput.getInputElement();this.addManagedListeners(t,{mouseDown:()=>{this.eDateInput.isDisabled()||this.usingSafariDatePicker||t.focus({preventScroll:!0})},input:this.handleInput.bind(this,!1),change:this.handleInput.bind(this,!0),focusout:this.handleFocusOut.bind(this),focusin:this.handleFocusIn.bind(this)})}handleInput(e){if(!this.eDateInput.isDisabled()){if(this.isApply){this.applyOnFocusOut=!e,e&&this.params.onDateChanged();return}e||this.params.onDateChanged()}}handleFocusOut(){this.applyOnFocusOut&&(this.applyOnFocusOut=!1,this.params.onDateChanged())}handleFocusIn(){this.params.onFocusIn?.()}setParams(e){let t=this.eDateInput.getInputElement(),n=this.shouldUseBrowserDatePicker(e);this.usingSafariDatePicker=n&&rJ();let{minValidYear:r,maxValidYear:i,minValidDate:a,maxValidDate:o,buttons:s,includeTime:c,colDef:l}=e.filterParams||{},u=this.beans.dataTypeSvc,d=c??u?.getDateIncludesTimeFlag?.(l.cellDataType)??!1;n?d?(t.type=`datetime-local`,t.step=`1`):t.type=`date`:t.type=`text`;let f=D0(a,r,!0),p=D0(o,i,!1);f&&p&&f.getTime()>p.getTime()&&gK(87),f&&(t.min=cZ(f,d)),p&&(t.max=cZ(p,d)),this.isApply=e.location===`floatingFilter`&&!!s?.includes(`apply`)}refresh(e){this.params=e,this.setParams(e)}getDate(){return mZ(this.eDateInput.getValue())}setDate(e){let t=this.params.filterParams.colDef.cellDataType,n=this.beans.dataTypeSvc?.getDateIncludesTimeFlag(t)??!1;this.eDateInput.setValue(cZ(e,n))}setInputPlaceholder(e){this.eDateInput.setInputPlaceholder(e)}setInputAriaLabel(e){this.eDateInput.setAriaLabel(e)}setDisabled(e){this.eDateInput.setDisabled(e)}afterGuiAttached(e){e?.suppressFocus||this.eDateInput.getInputElement().focus({preventScroll:!0})}shouldUseBrowserDatePicker(e){return e?.filterParams?.browserDatePicker??!0}};function D0(e,t,n){return e&&t&&gK(n?85:86),e instanceof Date?e:e?mZ(e):t?mZ(`${t}-${n?`01-01`:`12-31`}`):null}var O0=[`equals`,`notEqual`,`greaterThan`,`greaterThanOrEqual`,`lessThan`,`lessThanOrEqual`,`inRange`,`blank`,`notBlank`];function k0(e){return e?.allowedCharPattern??null}function A0(e){return e==null||isNaN(e)?null:e}function j0(e,t){let{filter:n,filterTo:r,type:i}=e||{};return[A0(n),A0(r)].slice(0,L1(i,t))}var OMe=class extends R1{constructor(){super(`numberFilter`,j0,O0),this.eValuesFrom=[],this.eValuesTo=[],this.filterType=`number`,this.defaultDebounceMs=500}afterGuiAttached(e){super.afterGuiAttached(e),this.refreshInputValidation()}shouldKeepInvalidInputState(){return!iJ()&&this.hasInvalidInputs()&&this.getConditionTypes().includes(`inRange`)}refreshInputValidation(){for(let e=0;e<this.eValuesFrom.length;e++){let t=this.eValuesFrom[e],n=this.eValuesTo[e];this.refreshInputPairValidation(t,n)}}refreshInputPairValidation(e,t,n=!1){let r=this.params.numberParser,i=N0(r,e),a=N0(r,t),o=kMe(i,a,n),s=o?this.translate(o,[String(n?a:i)]):``;(n?e:t).setCustomValidity(s),(n?t:e).setCustomValidity(``),s.length>0&&this.beans.ariaAnnounce.announceValue(s,`dateFilter`)}getState(){return{isInvalid:this.hasInvalidInputs()}}areStatesEqual(e,t){return(e?.isInvalid??!1)===(t?.isInvalid??!1)}refresh(e){let t=super.refresh(e),{state:n,additionalEventAttributes:r}=e,i=this.state,a=r?.fromAction;return(a&&a!=`apply`||n.model!==i.model||!this.areStatesEqual(n.state,i.state))&&this.refreshInputValidation(),t}setElementValue(e,t,n){let{numberFormatter:r}=this.params,i=!n&&r?r(t??null):t;super.setElementValue(e,i),i===null&&e.setCustomValidity(``)}createEValue(){let{params:e,eValuesFrom:t,eValuesTo:n}=this,r=k0(e),i=rX({tag:`div`,cls:`ag-filter-body`,role:`presentation`}),a=this.createFromToElement(i,t,`from`,r),o=this.createFromToElement(i,n,`to`,r),s=(e,t,n)=>()=>this.refreshInputPairValidation(e,t,n),c=s(a,o,!0);a.onValueChange(c),a.addGuiEventListener(`focusin`,c);let l=s(a,o,!1);return o.onValueChange(l),o.addGuiEventListener(`focusin`,l),i}createFromToElement(e,t,n,r){let i=this.createManagedBean(r?new $$({allowedCharPattern:r}):new r1);return i.addCss(`ag-filter-${n}`),i.addCss(`ag-filter-filter`),t.push(i),e.appendChild(i.getGui()),i}removeEValues(e,t){let n=n=>this.removeComponents(n,e,t);n(this.eValuesFrom),n(this.eValuesTo)}getValues(e){let t=[];return this.forEachPositionInput(e,(e,n,r,i)=>{n<i&&t.push(A0(M0(this.params.numberParser,e.getValue())))}),t}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}createCondition(e){let t=this.getConditionType(e),n={filterType:this.filterType,type:t},r=this.getValues(e);return r.length>0&&(n.filter=r[0]),r.length>1&&(n.filterTo=r[1]),n}removeConditionsAndOperators(e,t){if(!this.hasInvalidInputs())return super.removeConditionsAndOperators(e,t)}getInputs(e){let{eValuesFrom:t,eValuesTo:n}=this;return e>=t.length?[null,null]:[t[e],n[e]]}hasInvalidInputs(){let e=!1;return this.forEachInput(t=>e||=!t.getInputElement().validity.valid),e}positionHasInvalidInputs(e){let t=!1;return this.forEachPositionInput(e,e=>t||=!e.getInputElement().validity.valid),t}canApply(e){return!this.hasInvalidInputs()}};function M0(e,t){if(typeof t==`number`)return t;let n=tW(t);return n!=null&&n.trim()===``&&(n=null),e?e(n):n==null||n.trim()===`-`?null:Number.parseFloat(n)}function N0(e,t){return A0(M0(e,t.getValue(!0)))}function kMe(e,t,n){return e!=null&&t!=null&&e>=t?`strict${n?`Max`:`Min`}ValueValidation`:null}var P0=class extends G1{constructor(e,t){super(e,t,t.numberFormatter),this.filterTypeKeys=W1}conditionToString(e,t,n,r,i){let{filter:a,filterTo:o,type:s}=e,c=this.formatValue.bind(this);if(t){let e=this.conditionForToolPanel(s,n,()=>c(a),()=>c(o),r,i);if(e!=null)return e}return n?`${c(a)}-${c(o)}`:a==null?`${s}`:c(a)}},AMe=class extends U1{constructor(){super(j0,O0),this.filterType=`number`,this.FilterModelFormatterClass=P0}comparator(){return(e,t)=>e===t?0:e<t?1:-1}isValid(e){return!isNaN(e)}},jMe=class extends Q{constructor(){super(...arguments),this.onValueChanged=()=>{},this.numberInputActive=!0}setupGui(e){this.eNumberInput=this.createManagedBean(new r1),this.eTextInput=this.createManagedBean(new $$),this.eTextInput.setDisabled(!0);let t=this.eNumberInput.getGui(),n=this.eTextInput.getGui();e.appendChild(t),e.appendChild(n),this.setupListeners(t,e=>this.onValueChanged(e)),this.setupListeners(n,e=>this.onValueChanged(e))}setEditable(e){this.numberInputActive=e,this.eNumberInput.setDisplayed(this.numberInputActive),this.eTextInput.setDisplayed(!this.numberInputActive)}setAutoComplete(e){this.eNumberInput.setAutoComplete(e),this.eTextInput.setAutoComplete(e)}getValue(){return this.getActiveInputElement().getValue()}setValue(e,t){this.getActiveInputElement().setValue(e,t)}getActiveInputElement(){return this.numberInputActive?this.eNumberInput:this.eTextInput}setValueChangedListener(e){this.onValueChanged=e}setupListeners(e,t){this.addManagedListeners(e,{input:t,keydown:t})}setParams({ariaLabel:e,autoComplete:t,placeholder:n}){this.setAriaLabel(e),t!==void 0&&this.setAutoComplete(t),this.setPlaceholder(this.eNumberInput,n),this.setPlaceholder(this.eTextInput,n)}setPlaceholder(e,t){e.toggleCss(`ag-floating-filter-search-icon`,!!t),e.setInputPlaceholder(t)}setAriaLabel(e){this.eNumberInput.setInputAriaLabel(e),this.eTextInput.setInputAriaLabel(e)}},MMe=class extends Z1{constructor(){super(...arguments),this.FilterModelFormatterClass=P0,this.filterType=`number`,this.defaultOptions=O0}updateParams(e){k0(e.filterParams)!==this.allowedCharPattern&&this.recreateFloatingFilterInputService(e),super.updateParams(e)}createFloatingFilterInputService(e){return this.allowedCharPattern=k0(e.filterParams),this.allowedCharPattern?this.createManagedBean(new q1({config:{allowedCharPattern:this.allowedCharPattern}})):this.createManagedBean(new jMe)}convertValue(e){return e?Number(e):null}},F0=[`contains`,`notContains`,`equals`,`notEqual`,`startsWith`,`endsWith`,`blank`,`notBlank`],NMe=class extends R1{constructor(){super(`textFilter`,Y1,F0),this.filterType=`text`,this.eValuesFrom=[],this.eValuesTo=[],this.defaultDebounceMs=500}createCondition(e){let t=this.getConditionType(e),n={filterType:this.filterType,type:t},r=this.getValues(e);return r.length>0&&(n.filter=r[0]),r.length>1&&(n.filterTo=r[1]),n}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}getInputs(e){let{eValuesFrom:t,eValuesTo:n}=this;return e>=t.length?[null,null]:[t[e],n[e]]}getValues(e){let t=[];return this.forEachPositionInput(e,(e,n,r,i)=>{n<i&&t.push(tW(e.getValue()))}),t}createEValue(){let e=rX({tag:`div`,cls:`ag-filter-body`,role:`presentation`}),{eValuesFrom:t,eValuesTo:n}=this;return this.createFromToElement(e,t,`from`),this.createFromToElement(e,n,`to`),e}createFromToElement(e,t,n){let r=this.createManagedBean(new $$);r.addCss(`ag-filter-${n}`),r.addCss(`ag-filter-filter`),t.push(r),e.appendChild(r.getGui())}removeEValues(e,t){let n=n=>this.removeComponents(n,e,t),{eValuesFrom:r,eValuesTo:i}=this;n(r),n(i)}},I0=class extends G1{constructor(){super(...arguments),this.filterTypeKeys=lMe}conditionToString(e,t,n,r,i){let{filter:a,filterTo:o,type:s}=e;if(t){let e=e=>()=>TJ(this,`filterSummaryTextQuote`,[e]),t=this.conditionForToolPanel(s,n,e(a),e(o),r,i);if(t!=null)return t}return n?`${a}-${o}`:a==null?`${s}`:`${a}`}},PMe=({filterOption:e,value:t,filterText:n})=>{if(n==null)return!1;switch(e){case`contains`:return t.includes(n);case`notContains`:return!t.includes(n);case`equals`:return t===n;case`notEqual`:return t!=n;case`startsWith`:return t.indexOf(n)===0;case`endsWith`:{let e=t.lastIndexOf(n);return e>=0&&e===t.length-n.length}default:return!1}},FMe=e=>e,IMe=e=>e==null?null:e.toString().toLowerCase(),LMe=class extends H1{constructor(){super(Y1,F0),this.filterType=`text`,this.FilterModelFormatterClass=I0}updateParams(e){super.updateParams(e);let t=e.filterParams;this.matcher=t.textMatcher??PMe,this.formatter=t.textFormatter??(t.caseSensitive?FMe:IMe)}evaluateNullValue(e){return e?[`notEqual`,`notContains`,`blank`].indexOf(e)>=0:!1}evaluateNonNullValue(e,t,n,r){let i=e.map(e=>this.formatter(e))||[],a=this.formatter(t),{api:o,colDef:s,column:c,context:l,filterParams:{textFormatter:u}}=this.params;if(n.type===`blank`)return I1(t);if(n.type===`notBlank`)return!I1(t);let d={api:o,colDef:s,column:c,context:l,node:r.node,data:r.data,filterOption:n.type,value:a,textFormatter:u};return i.some(e=>this.matcher({...d,filterText:e}))}processModelToApply(e){if(e&&this.params.filterParams.trimInput){let t=e=>{let t={...e},{filter:n,filterTo:r}=e;return n&&(t.filter=J1(n)??null),r&&(t.filterTo=J1(r)??null),t};return Hq(e)?{...e,conditions:e.conditions.map(t)}:t(e)}return e}},RMe=class extends Z1{constructor(){super(...arguments),this.FilterModelFormatterClass=I0,this.filterType=`text`,this.defaultOptions=F0}createFloatingFilterInputService(){return this.createManagedBean(new q1)}};function zMe(e){return!!e.quickFilter?.isFilterPresent()}function BMe(e){return e.quickFilter?.getText()}function VMe(e){e.quickFilter?.resetCache()}var HMe=class extends Q{constructor(){super(...arguments),this.beanName=`quickFilter`,this.quickFilter=null,this.quickFilterParts=null}postConstruct(){let e=this.resetCache.bind(this),t=this.gos;this.addManagedEventListeners({columnPivotModeChanged:e,newColumnsLoaded:e,columnRowGroupChanged:e,columnVisible:()=>{t.get(`includeHiddenColumnsInQuickFilter`)||this.resetCache()}}),this.addManagedPropertyListener(`quickFilterText`,e=>this.setFilter(e.currentValue)),this.addManagedPropertyListeners([`includeHiddenColumnsInQuickFilter`,`applyQuickFilterBeforePivotOrAgg`],()=>this.onColumnConfigChanged()),this.quickFilter=this.parseFilter(t.get(`quickFilterText`)),this.parser=t.get(`quickFilterParser`),this.matcher=t.get(`quickFilterMatcher`),this.setFilterParts(),this.addManagedPropertyListeners([`quickFilterMatcher`,`quickFilterParser`],()=>this.setParserAndMatcher())}refreshCols(){let{autoColSvc:e,colModel:t,gos:n,pivotResultCols:r}=this.beans,i=t.isPivotMode(),a=e?.getColumns(),o=t.getColDefCols(),s=(i&&!n.get(`applyQuickFilterBeforePivotOrAgg`)?r?.getPivotResultCols()?.list:o)??[];a&&(s=s.concat(a)),this.colsToUse=n.get(`includeHiddenColumnsInQuickFilter`)?s:s.filter(e=>e.isVisible()||e.isRowGroupActive())}isFilterPresent(){return this.quickFilter!==null}doesRowPass(e){let t=this.gos.get(`cacheQuickFilter`);return this.matcher?this.doesRowPassMatcher(t,e):this.quickFilterParts.every(n=>t?this.doesRowPassCache(e,n):this.doesRowPassNoCache(e,n))}resetCache(){this.beans.rowModel.forEachNode(e=>e.quickFilterAggregateText=null)}getText(){return this.gos.get(`quickFilterText`)}setFilterParts(){let{quickFilter:e,parser:t}=this;this.quickFilterParts=e?t?t(e):e.split(` `):null}parseFilter(e){return nW(e)?e.toUpperCase():null}setFilter(e){if(e!=null&&typeof e!=`string`){gK(70,{newFilter:e});return}let t=this.parseFilter(e);this.quickFilter!==t&&(this.quickFilter=t,this.setFilterParts(),this.dispatchLocalEvent({type:`quickFilterChanged`}))}setParserAndMatcher(){let e=this.gos.get(`quickFilterParser`),t=this.gos.get(`quickFilterMatcher`),n=e!==this.parser||t!==this.matcher;this.parser=e,this.matcher=t,n&&(this.setFilterParts(),this.dispatchLocalEvent({type:`quickFilterChanged`}))}onColumnConfigChanged(){this.refreshCols(),this.resetCache(),this.isFilterPresent()&&this.dispatchLocalEvent({type:`quickFilterChanged`})}doesRowPassNoCache(e,t){return this.colsToUse.some(n=>{let r=this.getTextForColumn(n,e);return nW(r)&&r.includes(t)})}doesRowPassCache(e,t){return this.checkGenerateAggText(e),e.quickFilterAggregateText.includes(t)}doesRowPassMatcher(e,t){let n;e?(this.checkGenerateAggText(t),n=t.quickFilterAggregateText):n=this.getAggText(t);let{quickFilterParts:r,matcher:i}=this;return i(r,n)}checkGenerateAggText(e){e.quickFilterAggregateText||=this.getAggText(e)}getTextForColumn(e,t){let n=this.beans.filterValueSvc.getValue(e,t),r=e.getColDef();if(r.getQuickFilterText){let i=eq(this.gos,{value:n,node:t,data:t.data,column:e,colDef:r});n=r.getQuickFilterText(i)}return nW(n)?n.toString().toUpperCase():null}getAggText(e){let t=[];for(let n of this.colsToUse){let r=this.getTextForColumn(n,e);nW(r)&&t.push(r)}return t.join(` 78`)}},L0={moduleName:`FilterCore`,version:aK,beans:[Gje],apiFunctions:{isAnyFilterPresent:Uje,onFilterChanged:Wje},css:[Sje],dependsOn:[{moduleName:`ClientSideRowModelFilter`,version:aK,rowModels:[`clientSide`],beans:[ike]}]},R0={moduleName:`FilterValue`,version:aK,beans:[$je]},z0={moduleName:`ColumnFilter`,version:aK,beans:[Hje,Qje],dynamicBeans:{headerFilterCellCtrl:_je},icons:{filter:`filter`,filterActive:`filter`},apiFunctions:{isColumnFilterPresent:Cje,getColumnFilterInstance:wje,destroyFilter:Tje,setFilterModel:Eje,getFilterModel:Dje,getColumnFilterModel:Oje,setColumnFilterModel:kje,showColumnFilter:Aje,hideColumnFilter:jje,getColumnFilterHandler:Mje,doFilterAction:Nje},dependsOn:[L0,K$,R0,xje]},UMe={moduleName:`CustomFilter`,version:aK,userComponents:{agReadOnlyFloatingFilter:tMe},dependsOn:[z0]},WMe={moduleName:`TextFilter`,version:aK,dependsOn:[z0],userComponents:{agTextColumnFilter:{classImp:NMe,params:{useForm:!0}},agTextColumnFloatingFilter:RMe},dynamicBeans:{agTextColumnFilterHandler:LMe}},GMe={moduleName:`NumberFilter`,version:aK,dependsOn:[z0],userComponents:{agNumberColumnFilter:{classImp:OMe,params:{useForm:!0}},agNumberColumnFloatingFilter:MMe},dynamicBeans:{agNumberColumnFilterHandler:AMe}},KMe={moduleName:`BigIntFilter`,version:aK,dependsOn:[z0],userComponents:{agBigIntColumnFilter:{classImp:sMe,params:{useForm:!0}},agBigIntColumnFloatingFilter:fMe},dynamicBeans:{agBigIntColumnFilterHandler:uMe}},qMe={moduleName:`DateFilter`,version:aK,dependsOn:[z0],userComponents:{agDateColumnFilter:{classImp:pMe,params:{useForm:!0}},agDateInput:DMe,agDateColumnFloatingFilter:TMe},dynamicBeans:{agDateColumnFilterHandler:gMe}},JMe={moduleName:`QuickFilter`,version:aK,apiFunctions:{isQuickFilterPresent:zMe,getQuickFilter:BMe,resetQuickFilter:VMe},dependsOn:[{moduleName:`QuickFilterCore`,version:aK,rowModels:[`clientSide`],beans:[HMe],dependsOn:[L0,R0]}]},YMe={moduleName:`ExternalFilter`,version:aK,dependsOn:[L0]},XMe=class extends Q{constructor(e,t,n){super(),this.id=e,this.parentCache=t,this.params=n,this.state=`needsLoading`,this.version=0,this.startRow=e*n.blockSize,this.endRow=this.startRow+n.blockSize}load(){this.state=`loading`,this.loadFromDatasource()}setStateWaitingToLoad(){this.version++,this.state=`needsLoading`}pageLoadFailed(e){this.isRequestMostRecentAndLive(e)&&(this.state=`failed`),this.dispatchLocalEvent({type:`loadComplete`})}pageLoaded(e,t,n){this.successCommon(e,{rowData:t,rowCount:n})}isRequestMostRecentAndLive(e){let t=e===this.version,n=this.isAlive();return t&&n}successCommon(e,t){this.dispatchLocalEvent({type:`loadComplete`}),this.isRequestMostRecentAndLive(e)&&(this.state=`loaded`,this.processServerResult(t))}postConstruct(){this.rowNodes=[];let{params:{blockSize:e,rowHeight:t},startRow:n,beans:r,rowNodes:i}=this;for(let a=0;a<e;a++){let e=n+a,o=new NJ(r);o.setRowHeight(t),o.uiLevel=0,o.setRowIndex(e),o.setRowTop(t*e),i.push(o)}}getBlockStateJson(){let{id:e,startRow:t,endRow:n,state:r}=this;return{id:``+e,state:{blockNumber:e,startRow:t,endRow:n,pageStatus:r}}}setDataAndId(e,t,n){nW(t)?e.setDataAndId(t,n.toString()):e.setDataAndId(void 0,void 0)}loadFromDatasource(){let e=this.createLoadParams();if(rW(this.params.datasource.getRows)){gK(90);return}window.setTimeout(()=>{this.params.datasource.getRows(e)},0)}createLoadParams(){let{startRow:e,endRow:t,version:n,params:{sortModel:r,filterModel:i},gos:a}=this;return eq(a,{startRow:e,endRow:t,successCallback:this.pageLoaded.bind(this,n),failCallback:this.pageLoadFailed.bind(this,n),sortModel:r,filterModel:i})}forEachNode(e,t,n){this.rowNodes.forEach((r,i)=>{this.startRow+i<n&&e(r,t.value++)})}getRow(e,t=!1){t||(this.lastAccessed=this.params.lastAccessedSequence.value++);let n=e-this.startRow;return this.rowNodes[n]}processServerResult(e){let{rowNodes:t,beans:n}=this;t.forEach((r,i)=>{let a=e.rowData?e.rowData[i]:void 0;!r.id&&r.alreadyRendered&&a&&(t[i]=new NJ(n),t[i].setRowIndex(r.rowIndex),t[i].setRowTop(r.rowTop),t[i].setRowHeight(r.rowHeight),r._destroy(!0)),this.setDataAndId(t[i],a,this.startRow+i)});let r=e.rowCount!=null&&e.rowCount>=0?e.rowCount:void 0;this.parentCache.pageLoaded(this,r)}destroy(){let e=this.rowNodes;for(let t=0,n=e.length;t<n;t++)e[t]._destroy(!1);e.length=0,super.destroy()}},ZMe=2,QMe=class extends Q{constructor(e){super(),this.params=e,this.lastRowIndexKnown=!1,this.blocks={},this.blockCount=0,this.rowCount=e.initialRowCount}getRow(e,t=!1){let n=Math.floor(e/this.params.blockSize),r=this.blocks[n];if(!r){if(t)return;r=this.createBlock(n)}return r.getRow(e)}createBlock(e){let t=this.params,n=this.createBean(new XMe(e,this,t));return this.blocks[n.id]=n,this.blockCount++,this.purgeBlocksIfNeeded(n),t.rowNodeBlockLoader.addBlock(n),n}refreshCache(){if(this.blockCount==0){this.purgeCache();return}for(let e of this.getBlocksInOrder())e.setStateWaitingToLoad();this.params.rowNodeBlockLoader.checkBlockToLoad()}destroy(){for(let e of this.getBlocksInOrder())this.destroyBlock(e);super.destroy()}getRowCount(){return this.rowCount}isLastRowIndexKnown(){return this.lastRowIndexKnown}pageLoaded(e,t){this.isAlive()&&(WG(this.gos,`InfiniteCache - onPageLoaded: page = ${e.id}, lastRow = ${t}`),this.checkRowCount(e,t),this.onCacheUpdated())}purgeBlocksIfNeeded(e){let t=this.getBlocksInOrder().filter(t=>t!=e);t.sort((e,t)=>t.lastAccessed-e.lastAccessed);let n=this.params.maxBlocksInCache>0,r=n?this.params.maxBlocksInCache-1:null,i=ZMe-1;t.forEach((e,t)=>{if(e.state===`needsLoading`&&t>=i||n&&t>=r){if(this.isBlockCurrentlyDisplayed(e)||this.isBlockFocused(e))return;this.removeBlockFromCache(e)}})}isBlockFocused(e){let t=this.beans.focusSvc.getFocusCellToUseAfterRefresh();if(!t||t.rowPinned!=null)return!1;let{startRow:n,endRow:r}=e;return t.rowIndex>=n&&t.rowIndex<r}isBlockCurrentlyDisplayed(e){let{startRow:t,endRow:n}=e;return this.beans.rowRenderer.isRangeInRenderedViewport(t,n-1)}removeBlockFromCache(e){e&&this.destroyBlock(e)}checkRowCount(e,t){if(typeof t==`number`&&t>=0)this.rowCount=t,this.lastRowIndexKnown=!0;else if(!this.lastRowIndexKnown){let{blockSize:t,overflowSize:n}=this.params,r=(e.id+1)*t+n;this.rowCount<r&&(this.rowCount=r)}}setRowCount(e,t){this.rowCount=e,nW(t)&&(this.lastRowIndexKnown=t),this.lastRowIndexKnown||this.rowCount%this.params.blockSize===0&&this.rowCount++,this.onCacheUpdated()}forEachNodeDeep(e){let t={value:0};for(let n of this.getBlocksInOrder())n.forEachNode(e,t,this.rowCount)}getBlocksInOrder(){return Object.values(this.blocks).sort((e,t)=>e.id-t.id)}destroyBlock(e){delete this.blocks[e.id],this.destroyBean(e),this.blockCount--,this.params.rowNodeBlockLoader.removeBlock(e)}onCacheUpdated(){this.isAlive()&&(this.destroyAllBlocksPastVirtualRowCount(),this.eventSvc.dispatchEvent({type:`storeUpdated`}))}destroyAllBlocksPastVirtualRowCount(){let e=[];for(let t of this.getBlocksInOrder())t.id*this.params.blockSize>=this.rowCount&&e.push(t);if(e.length>0)for(let t of e)this.destroyBlock(t)}purgeCache(){for(let e of this.getBlocksInOrder())this.removeBlockFromCache(e);this.lastRowIndexKnown=!1,this.rowCount===0&&(this.rowCount=this.params.initialRowCount),this.onCacheUpdated()}getRowNodesInRange(e,t){let n=[],r=-1,i=!1,a={value:0},o=!1;for(let s of this.getBlocksInOrder())if(!o){if(i&&r+1!==s.id){o=!0;continue}r=s.id,s.forEachNode(r=>{let a=r===e||r===t;(i||a)&&n.push(r),a&&(i=!i)},a,this.rowCount)}return o||i?[]:n}},$Me=class extends Q{constructor(){super(...arguments),this.beanName=`rowModel`,this.rootNode=null,this.hierarchical=!1}getRowBounds(e){return{rowHeight:this.rowHeight,rowTop:this.rowHeight*e}}ensureRowHeightsValid(){return!1}postConstruct(){if(this.gos.get(`rowModelType`)!==`infinite`)return;let e=this.beans,t=new NJ(e);this.rootNode=t,t.level=-1,this.rowHeight=DK(e),this.addEventListeners(),this.addDestroyFunc(()=>this.destroyCache())}start(){this.setDatasource(this.gos.get(`datasource`))}destroy(){this.destroyDatasource(),super.destroy(),this.rootNode=null}destroyDatasource(){this.datasource&&=(this.destroyBean(this.datasource),this.beans.rowRenderer.datasourceChanged(),null)}addEventListeners(){this.addManagedEventListeners({filterChanged:this.reset.bind(this),sortChanged:this.reset.bind(this),newColumnsLoaded:this.onColumnEverything.bind(this),storeUpdated:this.dispatchModelUpdatedEvent.bind(this)}),this.addManagedPropertyListener(`datasource`,()=>this.setDatasource(this.gos.get(`datasource`))),this.addManagedPropertyListener(`cacheBlockSize`,()=>this.resetCache()),this.addManagedPropertyListener(`rowHeight`,()=>{this.rowHeight=DK(this.beans),this.cacheParams.rowHeight=this.rowHeight,this.updateRowHeights()})}onColumnEverything(){let e;e=!this.cacheParams||!aW(this.cacheParams.sortModel,this.beans.sortSvc?.getSortModel()??[]),e&&this.reset()}getType(){return`infinite`}setDatasource(e){this.destroyDatasource(),this.datasource=e,e&&this.reset()}isEmpty(){return!this.infiniteCache}isRowsToRender(){return!!this.infiniteCache}getOverlayType(){return this.infiniteCache?.getRowCount()===0?this.beans.filterManager?.isAnyFilterPresent()?`noMatchingRows`:`noRows`:null}getNodesInRangeForSelection(e,t){return this.infiniteCache?.getRowNodesInRange(e,t)??[]}reset(){this.datasource&&(RK(this.gos)??this.beans.selectionSvc?.reset(`rowDataChanged`),this.resetCache())}dispatchModelUpdatedEvent(){this.eventSvc.dispatchEvent({type:`modelUpdated`,newPage:!1,newPageSize:!1,newData:!1,keepRenderedRows:!0,animate:!1})}resetCache(){this.destroyCache();let e=this.beans,{filterManager:t,sortSvc:n,rowNodeBlockLoader:r,eventSvc:i,gos:a}=e;this.cacheParams={datasource:this.datasource,filterModel:t?.getFilterModel()??{},sortModel:n?.getSortModel()??[],rowNodeBlockLoader:r,initialRowCount:a.get(`infiniteInitialRowCount`),maxBlocksInCache:a.get(`maxBlocksInCache`),rowHeight:DK(e),overflowSize:a.get(`cacheOverflowSize`),blockSize:a.get(`cacheBlockSize`),lastAccessedSequence:{value:0}},this.infiniteCache=this.createBean(new QMe(this.cacheParams)),i.dispatchEventOnce({type:`rowCountReady`}),this.dispatchModelUpdatedEvent()}updateRowHeights(){this.forEachNode(e=>{e.setRowHeight(this.rowHeight),e.setRowTop(this.rowHeight*e.rowIndex)}),this.dispatchModelUpdatedEvent()}destroyCache(){this.infiniteCache=this.destroyBean(this.infiniteCache)}getRow(e){let t=this.infiniteCache;if(t&&!(e>=t.getRowCount()))return t.getRow(e)}getRowNode(e){let t;return this.forEachNode(n=>{n.id===e&&(t=n)}),t}forEachNode(e){this.infiniteCache?.forEachNodeDeep(e)}getTopLevelRowCount(){return this.getRowCount()}getTopLevelRowDisplayedIndex(e){return e}getRowIndexAtPixel(e){if(this.rowHeight!==0){let t=Math.floor(e/this.rowHeight),n=this.getRowCount()-1;return t>n?n:t}return 0}getRowCount(){return this.infiniteCache?this.infiniteCache.getRowCount():0}isRowPresent(e){return!!this.getRowNode(e.id)}refreshCache(){this.infiniteCache?.refreshCache()}purgeCache(){this.infiniteCache?.purgeCache()}isLastRowIndexKnown(){return this.infiniteCache?.isLastRowIndexKnown()??!1}setRowCount(e,t){this.infiniteCache?.setRowCount(e,t)}resetRowHeights(){}onRowHeightChanged(){}};function eNe(e){MJ(e)?.refreshCache()}function tNe(e){MJ(e)?.purgeCache()}function nNe(e){return MJ(e)?.getRowCount()}var rNe={moduleName:`InfiniteRowModel`,version:aK,apiFunctions:{refreshInfiniteCache:eNe,purgeInfiniteCache:tNe,getInfiniteRowCount:nNe},dependsOn:[{moduleName:`InfiniteRowModelCore`,version:aK,rowModels:[`infinite`],beans:[$Me,class extends Q{constructor(){super(...arguments),this.beanName=`rowNodeBlockLoader`,this.activeBlockLoadsCount=0,this.blocks=[],this.active=!0}postConstruct(){this.maxConcurrentRequests=pye(this.gos);let e=this.gos.get(`blockLoadDebounceMillis`);e&&e>0&&(this.checkBlockToLoadDebounce=PG(this,this.performCheckBlocksToLoad.bind(this),e))}addBlock(e){this.blocks.push(e),e.addEventListener(`loadComplete`,this.loadComplete.bind(this)),this.checkBlockToLoad()}removeBlock(e){$U(this.blocks,e)}destroy(){super.destroy(),this.active=!1}loadComplete(){this.activeBlockLoadsCount--,this.checkBlockToLoad()}checkBlockToLoad(){this.checkBlockToLoadDebounce?this.checkBlockToLoadDebounce():this.performCheckBlocksToLoad()}performCheckBlocksToLoad(){if(!this.active)return;if(this.printCacheStatus(),this.maxConcurrentRequests!=null&&this.activeBlockLoadsCount>=this.maxConcurrentRequests){WG(this.gos,`RowNodeBlockLoader - checkBlockToLoad: max loads exceeded`);return}let e=this.maxConcurrentRequests==null?1:this.maxConcurrentRequests-this.activeBlockLoadsCount,t=this.blocks.filter(e=>e.state===`needsLoading`).slice(0,e);this.activeBlockLoadsCount+=t.length;for(let e of t)e.load();this.printCacheStatus()}getBlockState(){let e={};return this.blocks.forEach(t=>{let{id:n,state:r}=t.getBlockStateJson();e[n]=r}),e}printCacheStatus(){WG(this.gos,`RowNodeBlockLoader - printCacheStatus: activePageLoadsCount = ${this.activeBlockLoadsCount}, blocks = ${JSON.stringify(this.getBlockState())}`)}}]},ZOe]},iNe=class extends Q{constructor(){super(...arguments),this.beanName=`apiEventSvc`,this.syncListeners=new Map,this.asyncListeners=new Map,this.syncGlobalListeners=new Set,this.globalListenerPairs=new Map}postConstruct(){this.wrapSvc=this.beans.frameworkOverrides.createGlobalEventListenerWrapper?.()}addListener(e,t){let n=this.wrapSvc?.wrap(e,t)??t,r=!fQ.has(e),i=r?this.asyncListeners:this.syncListeners;i.has(e)||i.set(e,new Set),i.get(e).add(n),this.eventSvc.addListener(e,n,r)}removeListener(e,t){let n=this.wrapSvc?.unwrap(e,t)??t,r=!!this.asyncListeners.get(e)?.delete(n);r||this.syncListeners.get(e)?.delete(n),this.eventSvc.removeListener(e,n,r)}addGlobalListener(e){let t=this.wrapSvc?.wrapGlobal(e)??e,n=(e,n)=>{fQ.has(e)&&t(e,n)},r=(e,n)=>{fQ.has(e)||t(e,n)};this.globalListenerPairs.set(e,{syncListener:n,asyncListener:r});let i=this.eventSvc;i.addGlobalListener(n,!1),i.addGlobalListener(r,!0)}removeGlobalListener(e){let{eventSvc:t,wrapSvc:n,globalListenerPairs:r}=this,i=n?.unwrapGlobal(e)??e;if(r.has(i)){let{syncListener:n,asyncListener:a}=r.get(i);t.removeGlobalListener(n,!1),t.removeGlobalListener(a,!0),r.delete(e)}else this.syncGlobalListeners.delete(i),t.removeGlobalListener(i,!1)}destroyEventListeners(e,t){e.forEach((e,n)=>{e.forEach(e=>this.eventSvc.removeListener(n,e,t)),e.clear()}),e.clear()}destroyGlobalListeners(e,t){for(let n of e)this.eventSvc.removeGlobalListener(n,t);e.clear()}destroy(){super.destroy(),this.destroyEventListeners(this.syncListeners,!1),this.destroyEventListeners(this.asyncListeners,!0),this.destroyGlobalListeners(this.syncGlobalListeners,!1);let{globalListenerPairs:e,eventSvc:t}=this;e.forEach(({syncListener:e,asyncListener:n})=>{t.removeGlobalListener(e,!1),t.removeGlobalListener(n,!0)}),e.clear()}};function aNe(e,t,n){e.apiEventSvc?.addListener(t,n)}function oNe(e,t,n){e.apiEventSvc?.removeListener(t,n)}function sNe(e,t){e.apiEventSvc?.addGlobalListener(t)}function cNe(e,t){e.apiEventSvc?.removeGlobalListener(t)}var lNe={moduleName:`EventApi`,version:aK,apiFunctions:{addEventListener:aNe,addGlobalListener:sNe,removeEventListener:oNe,removeGlobalListener:cNe},beans:[iNe]},uNe={moduleName:`Locale`,version:aK,beans:[class extends Q{constructor(){super(...arguments),this.beanName=`localeSvc`}getLocaleTextFunc(){let e=this.gos,t=e.getCallback(`getLocaleText`);return t?Lve(t):Rve(e.get(`localeText`))}}]};function dNe(e){return e.stateSvc?.getState()??{}}function fNe(e,t,n){return e.stateSvc?.setState(t,n)}function B0(e){return e={...e},e.version||(e.version=`32.1.0`),e.version===`32.1.0`&&(e=pNe(e)),e.version=aK,e}function pNe(e){return e.cellSelection=mNe(e,`rangeSelection`),e}function mNe(e,t){if(e&&typeof e==`object`)return e[t]}var hNe={moduleName:`GridState`,version:aK,beans:[class extends Q{constructor(){super(...arguments),this.beanName=`stateSvc`,this.updateRowGroupExpansionStateTimer=0,this.suppressEvents=!0,this.queuedUpdateSources=new Set,this.dispatchStateUpdateEventDebounced=PG(this,()=>this.dispatchQueuedStateUpdateEvents(),0),this.onRowGroupOpenedDebounced=PG(this,()=>this.updateGroupExpansionState(),0),this.onRowSelectedDebounced=PG(this,()=>{this.staleStateKeys.delete(`rowSelection`),this.updateCachedState(`rowSelection`,this.getRowSelectionState())},0),this.staleStateKeys=new Set}postConstruct(){let{gos:e,ctrlsSvc:t,colDelayRenderSvc:n}=this.beans;this.isClientSideRowModel=xK(e);let r=B0(e.get(`initialState`)??{}),i=r.partialColumnState;delete r.partialColumnState,this.cachedState=r;let a=this.suppressEventsAndDispatchInitEvent.bind(this);t.whenReady(this,()=>a(()=>this.setupStateOnGridReady(r))),(r.columnOrder||r.columnVisibility||r.columnSizing||r.columnPinning||r.columnGroup)&&n?.hideColumns(`columnState`);let[o,s,c]=this.addManagedEventListeners({newColumnsLoaded:({source:e})=>{e===`gridInitializing`&&(o(),a(()=>{this.setupStateOnColumnsInitialised(r,!!i),n?.revealColumns(`columnState`)}))},rowCountReady:()=>{s?.(),a(()=>this.setupStateOnRowCountReady(r))},firstDataRendered:()=>{c?.(),a(()=>this.setupStateOnFirstDataRendered(r))}})}destroy(){super.destroy(),clearTimeout(this.updateRowGroupExpansionStateTimer),this.queuedUpdateSources.clear()}getState(){return this.staleStateKeys.size&&this.refreshStaleState(),this.cachedState}setState(e,t){let n=B0(e);delete n.partialColumnState,this.cachedState=n,this.startSuppressEvents();let r=t?new Set(t):void 0;this.setGridReadyState(n,`api`,r),this.setColumnsInitialisedState(n,`api`,!!r,r),this.setRowCountState(n,`api`,r),setTimeout(()=>{this.isAlive()&&this.setFirstDataRenderedState(n,`api`,r),this.stopSuppressEvents(`api`)})}setGridReadyState(e,t,n){t===`api`&&!n?.has(`sideBar`)&&this.beans.sideBar?.comp?.setState(e.sideBar),this.updateCachedState(`sideBar`,this.getSideBarState())}setupStateOnGridReady(e){this.setGridReadyState(e,`gridInitializing`);let t=()=>this.updateCachedState(`sideBar`,this.getSideBarState());this.addManagedEventListeners({toolPanelVisibleChanged:t,sideBarUpdated:t})}updateColumnAndGroupState(){this.updateColumnState([`aggregation`,`columnOrder`,`columnPinning`,`columnSizing`,`columnVisibility`,`pivot`,`rowGroup`,`sort`]),this.updateCachedState(`columnGroup`,this.getColumnGroupState())}setColumnsInitialisedState(e,t,n,r){this.setColumnState(e,t,n,r),this.setColumnGroupState(e,t,r),this.updateColumnAndGroupState()}setupStateOnColumnsInitialised(e,t){this.setColumnsInitialisedState(e,`gridInitializing`,t);let n=e=>()=>this.updateColumnState([e]);this.addManagedEventListeners({columnValueChanged:n(`aggregation`),columnMoved:n(`columnOrder`),columnPinned:n(`columnPinning`),columnResized:n(`columnSizing`),columnVisible:n(`columnVisibility`),columnPivotChanged:n(`pivot`),columnPivotModeChanged:n(`pivot`),columnRowGroupChanged:n(`rowGroup`),sortChanged:n(`sort`),newColumnsLoaded:({source:e})=>{this.updateColumnAndGroupState(),e!==`gridInitializing`&&this.isClientSideRowModel&&this.onRowGroupOpenedDebounced()},columnGroupOpened:()=>this.updateCachedState(`columnGroup`,this.getColumnGroupState())})}setRowCountState(e,t,n){let{filter:r,rowGroupExpansion:i,ssrmRowGroupExpansion:a,rowSelection:o,pagination:s,rowPinning:c}=e,l=(e,r)=>!n?.has(e)&&(r||t===`api`);l(`filter`,r)&&this.setFilterState(r),(l(`rowGroupExpansion`,i)||l(`ssrmRowGroupExpansion`,a))&&this.setRowGroupExpansionState(a,i,t),l(`rowSelection`,o)&&this.setRowSelectionState(o,t),l(`pagination`,s)&&this.setPaginationState(s,t),l(`rowPinning`,c)&&this.setRowPinningState(c);let u=this.updateCachedState.bind(this);u(`filter`,this.getFilterState()),this.updateGroupExpansionState(),u(`rowSelection`,this.getRowSelectionState()),u(`pagination`,this.getPaginationState())}setupStateOnRowCountReady(e){this.setRowCountState(e,`gridInitializing`);let t=this.updateCachedState.bind(this),n=()=>{this.updateRowGroupExpansionStateTimer=0,this.updateGroupExpansionState()},r=()=>t(`filter`,this.getFilterState()),{gos:i,colFilter:a,selectableFilter:o}=this.beans;this.addManagedEventListeners({filterChanged:r,rowExpansionStateChanged:this.onRowGroupOpenedDebounced,expandOrCollapseAll:n,columnRowGroupChanged:n,rowDataUpdated:()=>{(i.get(`groupDefaultExpanded`)!==0||i.get(`isGroupOpenByDefault`))&&(this.updateRowGroupExpansionStateTimer||=setTimeout(n))},selectionChanged:()=>{this.staleStateKeys.add(`rowSelection`),this.onRowSelectedDebounced()},paginationChanged:e=>{(e.newPage||e.newPageSize)&&t(`pagination`,this.getPaginationState())},pinnedRowsChanged:()=>t(`rowPinning`,this.getRowPinningState())}),a&&this.addManagedListeners(a,{filterStateChanged:r}),o&&this.addManagedListeners(o,{selectedFilterChanged:r})}setFirstDataRenderedState(e,t,n){let{scroll:r,cellSelection:i,focusedCell:a,columnOrder:o}=e,s=(e,r)=>!n?.has(e)&&(r||t===`api`);s(`focusedCell`,a)&&this.setFocusedCellState(a),s(`cellSelection`,i)&&this.setCellSelectionState(i),s(`scroll`,r)&&this.setScrollState(r),this.setColumnPivotState(!!o?.orderedColIds,t);let c=this.updateCachedState.bind(this);c(`sideBar`,this.getSideBarState()),c(`focusedCell`,this.getFocusedCellState());let l=this.getRangeSelectionState();c(`rangeSelection`,l),c(`cellSelection`,l),c(`scroll`,this.getScrollState())}setupStateOnFirstDataRendered(e){this.setFirstDataRenderedState(e,`gridInitializing`);let t=this.updateCachedState.bind(this),n=()=>t(`focusedCell`,this.getFocusedCellState());this.addManagedEventListeners({cellFocused:n,cellFocusCleared:n,cellSelectionChanged:e=>{if(e.finished){let e=this.getRangeSelectionState();t(`rangeSelection`,e),t(`cellSelection`,e)}},bodyScrollEnd:()=>t(`scroll`,this.getScrollState())})}getColumnState(){let e=this.beans;return EOe(ZX(e),e.colModel.isPivotMode())}setColumnState(e,t,n,r){let{sort:i,rowGroup:a,aggregation:o,pivot:s,columnPinning:c,columnVisibility:l,columnSizing:u,columnOrder:d}=e,f=!1,p=(e,n)=>{let i=!r?.has(e)&&!!(n||t===`api`);return f||=i,i},m={},h=e=>{let t=m[e];return t||(t={colId:e},m[e]=t,t)},g={},_=p(`sort`,i);_&&i?.sortModel.forEach(({colId:e,sort:t,type:n},r)=>{let i=h(e);i.sort=t,i.sortIndex=r,i.sortType=n}),(_||!n)&&(g.sort=null,g.sortIndex=null);let v=p(`rowGroup`,a);v&&a?.groupColIds.forEach((e,t)=>{let n=h(e);n.rowGroup=!0,n.rowGroupIndex=t}),(v||!n)&&(g.rowGroup=null,g.rowGroupIndex=null);let y=p(`aggregation`,o);y&&o?.aggregationModel.forEach(({colId:e,aggFunc:t})=>{h(e).aggFunc=t}),(y||!n)&&(g.aggFunc=null);let b=p(`pivot`,s);b&&(s?.pivotColIds.forEach((e,t)=>{let n=h(e);n.pivot=!0,n.pivotIndex=t}),this.gos.updateGridOptions({options:{pivotMode:!!s?.pivotMode},source:t})),(b||!n)&&(g.pivot=null,g.pivotIndex=null);let x=p(`columnPinning`,c);if(x){for(let e of c?.leftColIds??[])h(e).pinned=`left`;for(let e of c?.rightColIds??[])h(e).pinned=`right`}(x||!n)&&(g.pinned=null);let S=p(`columnVisibility`,l);if(S)for(let e of l?.hiddenColIds??[])h(e).hide=!0;(S||!n)&&(g.hide=null);let C=p(`columnSizing`,u);if(C)for(let{colId:e,flex:t,width:n}of u?.columnSizingModel??[]){let r=h(e);r.flex=t??null,r.width=n}(C||!n)&&(g.flex=null);let w=d?.orderedColIds,T=!!w?.length&&!r?.has(`columnOrder`),E=T?w.map(e=>h(e)):Object.values(m);(E.length||f)&&(this.columnStates=E,YX(this.beans,{state:E,applyOrder:T,defaultState:g},t))}setColumnPivotState(e,t){let n=this.columnStates;this.columnStates=void 0;let r=this.columnGroupStates;this.columnGroupStates=void 0;let i=this.beans,{pivotResultCols:a,colGroupSvc:o}=i;if(a?.isPivotResultColsPresent()){if(n){let r=[];for(let e of n)a.getPivotResultCol(e.colId)&&r.push(e);YX(i,{state:r,applyOrder:e},t)}r&&o?.setColumnGroupState(r,t)}}getColumnGroupState(){let e=this.beans.colGroupSvc;if(e)return DOe(e.getColumnGroupState())}setColumnGroupState(e,t,n){let r=this.beans.colGroupSvc;if(!r||n?.has(`columnGroup`)||t!==`api`&&!Object.prototype.hasOwnProperty.call(e,`columnGroup`))return;let i=new Set(e.columnGroup?.openColumnGroupIds),a=r.getColumnGroupState().map(({groupId:e})=>{let t=i.has(e);return t&&i.delete(e),{groupId:e,open:t}});for(let e of i)a.push({groupId:e,open:!0});a.length&&(this.columnGroupStates=a),r.setColumnGroupState(a,t)}getFilterState(){let{filterManager:e,selectableFilter:t}=this.beans,n=e?.getFilterModel();n&&Object.keys(n).length===0&&(n=void 0);let r=e?.getFilterState(),i=e?.getAdvFilterModel()??void 0,a=t?.getState();return n||i||r||a?{filterModel:n,columnFilterState:r,advancedFilterModel:i,selectableFilters:a}:void 0}setFilterState(e){let{filterManager:t,selectableFilter:n}=this.beans,{filterModel:r,columnFilterState:i,advancedFilterModel:a,selectableFilters:o}=e??{filterModel:null,columnFilterState:null,advancedFilterModel:null};o!==void 0&&n?.setState(o??{}),(r!==void 0||i!==void 0)&&t?.setFilterState(r??null,i??null,`columnFilter`),a!==void 0&&t?.setAdvFilterModel(a??null,`advancedFilter`)}getRangeSelectionState(){let e=this.beans.rangeSvc?.getCellRanges().map(e=>{let{id:t,type:n,startRow:r,endRow:i,columns:a,startColumn:o}=e;return{id:t,type:n,startRow:r,endRow:i,colIds:a.map(e=>e.getColId()),startColId:o.getColId()}});return e?.length?{cellRanges:e}:void 0}setCellSelectionState(e){let{gos:t,rangeSvc:n,colModel:r,visibleCols:i}=this.beans;if(!UK(t)||!n)return;let a=[];for(let t of e?.cellRanges??[]){let e=[];for(let n of t.colIds){let t=r.getCol(n);t&&e.push(t)}if(!e.length)continue;let n=r.getCol(t.startColId);if(!n){let t=i.allCols,r=new Set(e);n=t.find(e=>r.has(e))}a.push({...t,columns:e,startColumn:n})}n.setCellRanges(a)}getScrollState(){if(!this.isClientSideRowModel)return;let e=this.beans.ctrlsSvc.getScrollFeature(),{left:t}=e?.getHScrollPosition()??{left:0},{top:n}=e?.getVScrollPosition()??{top:0};return n||t?{top:n,left:t}:void 0}setScrollState(e){if(!this.isClientSideRowModel)return;let{top:t,left:n}=e??{top:0,left:0},{frameworkOverrides:r,rowRenderer:i,animationFrameSvc:a,ctrlsSvc:o}=this.beans;r.wrapIncoming(()=>{o.get(`center`).setCenterViewportScrollLeft(n),o.getScrollFeature()?.setVerticalScrollPosition(t),i.redraw({afterScroll:!0}),a?.flushAllFrames()})}getSideBarState(){return this.beans.sideBar?.comp?.getState()}getFocusedCellState(){if(!this.isClientSideRowModel)return;let e=this.beans.focusSvc.getFocusedCell();if(e){let{column:t,rowIndex:n,rowPinned:r}=e;return{colId:t.getColId(),rowIndex:n,rowPinned:r}}}setFocusedCellState(e){if(!this.isClientSideRowModel)return;let{focusSvc:t,colModel:n}=this.beans;if(!e){t.clearFocusedCell();return}let{colId:r,rowIndex:i,rowPinned:a}=e;t.setFocusedCell({column:n.getCol(r),rowIndex:i,rowPinned:a,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}getPaginationState(){let{pagination:e,gos:t}=this.beans;if(!e)return;let n=e.getCurrentPage(),r=t.get(`paginationAutoPageSize`)?void 0:e.getPageSize();if(n||r)return{page:n,pageSize:r}}setPaginationState(e,t){let{pagination:n,gos:r}=this.beans;if(!n)return;let{pageSize:i,page:a}=e??{page:0,pageSize:r.get(`paginationPageSize`)},o=t===`gridInitializing`;i&&!r.get(`paginationAutoPageSize`)&&n.setPageSize(i,o?`initialState`:`pageSizeSelector`),typeof a==`number`&&(o?n.setPage(a):n.goToPage(a))}getRowSelectionState(){let e=this.beans.selectionSvc;if(!e)return;let t=e.getSelectionState();return!t||!Array.isArray(t)&&(t.selectAll===!1||t.selectAllChildren===!1)&&!t?.toggledNodes?.length?void 0:t}setRowSelectionState(e,t){this.beans.selectionSvc?.setSelectionState(e,t,t===`api`)}updateGroupExpansionState(){let{expansionSvc:e,gos:t}=this.beans,n=e?.getExpansionState(),r=t.get(`ssrmExpandAllAffectsAllRows`);this.updateCachedState(`ssrmRowGroupExpansion`,r?n:void 0),this.updateCachedState(`rowGroupExpansion`,r?void 0:n)}getRowPinningState(){return this.beans.pinnedRowModel?.getPinnedState()}setRowPinningState(e){let t=this.beans.pinnedRowModel;e?t?.setPinnedState(e):t?.reset()}setRowGroupExpansionState(e,t,n){let r=e??t??{expandedRowGroupIds:[],collapsedRowGroupIds:[]};this.beans.expansionSvc?.setExpansionState(r,n)}updateColumnState(e){let t=this.getColumnState(),n=!1,r=this.cachedState;for(let e of Object.keys(t)){let i=t[e];aW(i,r[e])||(n=!0)}this.cachedState={...r,...t},n&&this.dispatchStateUpdateEvent(e)}updateCachedState(e,t){let n=this.cachedState[e];this.setCachedStateValue(e,t),aW(t,n)||this.dispatchStateUpdateEvent([e])}setCachedStateValue(e,t){this.cachedState={...this.cachedState,[e]:t}}refreshStaleState(){let e=this.staleStateKeys;for(let t of e)t===`rowSelection`&&this.setCachedStateValue(t,this.getRowSelectionState());e.clear()}dispatchStateUpdateEvent(e){if(!this.suppressEvents){for(let t of e)this.queuedUpdateSources.add(t);this.dispatchStateUpdateEventDebounced()}}dispatchQueuedStateUpdateEvents(){let e=this.queuedUpdateSources,t=Array.from(e);e.clear(),this.eventSvc.dispatchEvent({type:`stateUpdated`,sources:t,state:this.cachedState})}startSuppressEvents(){this.suppressEvents=!0,this.beans.colAnimation?.setSuppressAnimation(!0)}stopSuppressEvents(e){setTimeout(()=>{this.suppressEvents=!1,this.queuedUpdateSources.clear(),this.isAlive()&&(this.beans.colAnimation?.setSuppressAnimation(!1),this.dispatchStateUpdateEvent([e]))})}suppressEventsAndDispatchInitEvent(e){this.startSuppressEvents(),e(),this.stopSuppressEvents(`gridInitializing`)}}],apiFunctions:{getState:dNe,setState:fNe}};function gNe(e){return e.rowModel.isLastRowIndexKnown()}function _Ne(e){return e.pagination?.getPageSize()??100}function vNe(e){return e.pagination?.getCurrentPage()??0}function yNe(e){return e.pagination?.getTotalPages()??1}function bNe(e){return e.pagination?e.pagination.getMasterRowCount():e.rowModel.getRowCount()}function xNe(e){e.pagination?.goToNextPage()}function SNe(e){e.pagination?.goToPreviousPage()}function CNe(e){e.pagination?.goToFirstPage()}function wNe(e){e.pagination?.goToLastPage()}function TNe(e,t){e.pagination?.goToPage(t)}var ENe=class extends Q{constructor(){super(...arguments),this.beanName=`paginationAutoPageSizeSvc`}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.centerRowsCtrl=e.center;let t=this.checkPageSize.bind(this);this.addManagedEventListeners({bodyHeightChanged:t,scrollVisibilityChanged:t}),this.addManagedPropertyListener(`paginationAutoPageSize`,this.onPaginationAutoSizeChanged.bind(this)),this.checkPageSize()})}notActive(){return!this.gos.get(`paginationAutoPageSize`)||this.centerRowsCtrl==null}onPaginationAutoSizeChanged(){this.notActive()?this.beans.pagination.unsetAutoCalculatedPageSize():this.checkPageSize()}checkPageSize(){if(this.notActive())return;let e=this.centerRowsCtrl.viewportSizeFeature.getBodyHeight();if(e>0){let t=this.beans,n=()=>{let n=Math.max(DK(t),1),r=Math.floor(e/n);t.pagination.setPageSize(r,`autoCalculated`)};this.isBodyRendered?PG(this,n,50)():(n(),this.isBodyRendered=!0)}else this.isBodyRendered=!1}};function DNe(e,t){if(typeof e!=`number`)return``;let n=t(),r=n(`thousandSeparator`,`,`),i=n(`decimalSeparator`,`.`);return e.toString().replace(`.`,i).replace(/(\d)(?=(\d{3})+(?!\d))/g,`$1${r}`)}var V0=`paginationPageSizeSelector`,ONe={tag:`span`,cls:`ag-paging-page-size`},kNe={selector:`AG-PAGE-SIZE-SELECTOR`,component:class extends Yq{constructor(){super(ONe),this.hasEmptyOption=!1,this.handlePageSizeItemSelected=()=>{if(!this.selectPageSizeComp)return;let e=this.selectPageSizeComp.getValue();if(!e)return;let t=Number(e);isNaN(t)||t<1||t===this.pagination.getPageSize()||(this.pagination.setPageSize(t,`pageSizeSelector`),this.hasEmptyOption&&this.toggleSelectDisplay(!0),this.selectPageSizeComp.getFocusableElement().focus())}}wireBeans(e){this.pagination=e.pagination}postConstruct(){this.addManagedPropertyListener(V0,()=>{this.onPageSizeSelectorValuesChange()}),this.addManagedEventListeners({paginationChanged:e=>this.handlePaginationChanged(e)})}handlePaginationChanged(e){if(!this.selectPageSizeComp||!e?.newPageSize)return;let t=this.pagination.getPageSize();this.getPageSizeSelectorValues().includes(t)?this.selectPageSizeComp.setValue(t.toString()):this.hasEmptyOption?this.selectPageSizeComp.setValue(``):this.toggleSelectDisplay(!0)}toggleSelectDisplay(e){this.selectPageSizeComp&&!e&&this.reset(),e&&(this.reloadPageSizesSelector(),this.selectPageSizeComp)}reset(){qW(this.getGui()),this.selectPageSizeComp&&=this.destroyBean(this.selectPageSizeComp)}onPageSizeSelectorValuesChange(){this.selectPageSizeComp&&this.shouldShowPageSizeSelector()&&this.reloadPageSizesSelector()}shouldShowPageSizeSelector(){return this.gos.get(`pagination`)&&!this.gos.get(`suppressPaginationPanel`)&&!this.gos.get(`paginationAutoPageSize`)&&this.gos.get(V0)!==!1}reloadPageSizesSelector(){let e=this.getPageSizeSelectorValues(),t=this.pagination.getPageSize(),n=!t||!e.includes(t);if(n){let n=this.gos.exists(`paginationPageSize`),r=this.gos.get(V0)!==!0;gK(94,{pageSizeSet:n,pageSizesSet:r,pageSizeOptions:e,paginationPageSizeOption:t}),r||gK(95,{paginationPageSizeOption:t,paginationPageSizeSelector:V0}),e.unshift(``)}let r=String(n?``:t);this.selectPageSizeComp?(ZU(this.pageSizeOptions,e)||(this.selectPageSizeComp.clearOptions().addOptions(this.createPageSizeSelectOptions(e)),this.pageSizeOptions=e),this.selectPageSizeComp.setValue(r,!0)):this.createPageSizeSelectorComp(e,r),this.hasEmptyOption=n}createPageSizeSelectOptions(e){return e.map(e=>({value:String(e)}))}createPageSizeSelectorComp(e,t){let n=this.getLocaleTextFunc(),r=n(`pageSizeSelectorLabel`,`Page Size:`),i=n(`ariaPageSizeSelectorLabel`,`Page Size`);this.selectPageSizeComp=this.createManagedBean(new i1).addOptions(this.createPageSizeSelectOptions(e)).setValue(t).setAriaLabel(i).setLabel(r).onValueChange(()=>this.handlePageSizeItemSelected()),this.appendChild(this.selectPageSizeComp)}getPageSizeSelectorValues(){let e=[20,50,100],t=this.gos.get(V0);return!Array.isArray(t)||!t?.length?e:[...t].sort((e,t)=>e-t)}destroy(){this.toggleSelectDisplay(!1),super.destroy()}}},ANe=`.ag-paging-panel{align-items:center;border-top:var(--ag-footer-row-border);display:flex;flex-wrap:wrap-reverse;gap:calc(var(--ag-spacing)*4);justify-content:flex-end;min-height:var(--ag-pagination-panel-height);padding:calc(var(--ag-spacing)*.5) var(--ag-cell-horizontal-padding);row-gap:calc(var(--ag-spacing)*.5);@container (width < 600px){justify-content:center}}:where(.ag-paging-page-size) .ag-wrapper{min-width:50px}.ag-paging-page-summary-panel,.ag-paging-row-summary-panel{margin:calc(var(--ag-spacing)*.5)}.ag-paging-page-summary-panel{align-items:center;display:flex;gap:var(--ag-cell-widget-spacing);.ag-disabled &{pointer-events:none}}.ag-paging-button{cursor:pointer;position:relative;&.ag-disabled{cursor:default;opacity:.5}}.ag-paging-number,.ag-paging-row-summary-panel-number{font-weight:500}.ag-paging-description{line-height:0}`,jNe={selector:`AG-PAGINATION`,component:class extends pSe{constructor(){super(),this.btFirst=null,this.btPrevious=null,this.btNext=null,this.btLast=null,this.lbRecordCount=null,this.lbFirstRowOnPage=null,this.lbLastRowOnPage=null,this.lbCurrent=null,this.lbTotal=null,this.pageSizeComp=null,this.previousAndFirstButtonsDisabled=!1,this.nextButtonDisabled=!1,this.lastButtonDisabled=!1,this.areListenersSetup=!1,this.allowFocusInnerElement=!1,this.registerCSS(ANe)}wireBeans(e){this.rowModel=e.rowModel,this.pagination=e.pagination,this.ariaAnnounce=e.ariaAnnounce}postConstruct(){let e=this.gos.get(`enableRtl`);this.setTemplate(this.getTemplate(),[kNe]);let{btFirst:t,btPrevious:n,btNext:r,btLast:i}=this;this.activateTabIndex([t,n,r,i]),t.insertAdjacentElement(`afterbegin`,pX(e?`last`:`first`,this.beans)),n.insertAdjacentElement(`afterbegin`,pX(e?`next`:`previous`,this.beans)),r.insertAdjacentElement(`afterbegin`,pX(e?`previous`:`next`,this.beans)),i.insertAdjacentElement(`afterbegin`,pX(e?`first`:`last`,this.beans)),this.addManagedPropertyListener(`pagination`,this.onPaginationChanged.bind(this)),this.addManagedPropertyListener(`suppressPaginationPanel`,this.onPaginationChanged.bind(this)),this.addManagedPropertyListeners([`paginationPageSizeSelector`,`paginationAutoPageSize`,`suppressPaginationPanel`],()=>this.onPageSizeRelatedOptionsChange()),this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector()),this.initialiseTabGuard({onTabKeyDown:()=>{},focusInnerElement:e=>this.allowFocusInnerElement?this.tabGuardFeature.getTabGuardCtrl().focusInnerElement(e):_xe(this.beans,e),forceFocusOutWhenTabGuardsAreEmpty:!0}),this.onPaginationChanged()}setAllowFocus(e){this.allowFocusInnerElement=e}getFocusableContainerName(){return`pagination`}onPaginationChanged(){let e=this.gos.get(`pagination`)&&!this.gos.get(`suppressPaginationPanel`);this.setDisplayed(e),e&&(this.setupListeners(),this.enableOrDisableButtons(),this.updateLabels(),this.onPageSizeRelatedOptionsChange())}onPageSizeRelatedOptionsChange(){this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector())}setupListeners(){if(!this.areListenersSetup){this.addManagedEventListeners({paginationChanged:this.onPaginationChanged.bind(this)});for(let e of[{el:this.btFirst,fn:this.onBtFirst.bind(this)},{el:this.btPrevious,fn:this.onBtPrevious.bind(this)},{el:this.btNext,fn:this.onBtNext.bind(this)},{el:this.btLast,fn:this.onBtLast.bind(this)}]){let{el:t,fn:n}=e;this.addManagedListeners(t,{click:n,keydown:e=>{(e.key===$.ENTER||e.key===$.SPACE)&&(e.preventDefault(),n())}})}gxe(this.beans,this,this.getGui()),this.areListenersSetup=!0}}onBtFirst(){this.previousAndFirstButtonsDisabled||this.pagination.goToFirstPage()}formatNumber(e){let t=this.gos.getCallback(`paginationNumberFormatter`);return t?t({value:e}):DNe(e,this.getLocaleTextFunc.bind(this))}getTemplate(){let e=this.getLocaleTextFunc(),t=`ag-${this.getCompId()}`;return{tag:`div`,cls:`ag-paging-panel ag-unselectable`,attrs:{id:`${t}`},children:[{tag:`ag-page-size-selector`,ref:`pageSizeComp`},{tag:`span`,cls:`ag-paging-row-summary-panel`,children:[{tag:`span`,ref:`lbFirstRowOnPage`,cls:`ag-paging-row-summary-panel-number`,attrs:{id:`${t}-first-row`}},{tag:`span`,attrs:{id:`${t}-to`},children:e(`to`,`to`)},{tag:`span`,ref:`lbLastRowOnPage`,cls:`ag-paging-row-summary-panel-number`,attrs:{id:`${t}-last-row`}},{tag:`span`,attrs:{id:`${t}-of`},children:e(`of`,`of`)},{tag:`span`,ref:`lbRecordCount`,cls:`ag-paging-row-summary-panel-number`,attrs:{id:`${t}-row-count`}}]},{tag:`span`,cls:`ag-paging-page-summary-panel`,role:`presentation`,children:[{tag:`div`,ref:`btFirst`,cls:`ag-button ag-paging-button`,role:`button`,attrs:{"aria-label":e(`firstPage`,`First Page`)}},{tag:`div`,ref:`btPrevious`,cls:`ag-button ag-paging-button`,role:`button`,attrs:{"aria-label":e(`previousPage`,`Previous Page`)}},{tag:`span`,cls:`ag-paging-description`,children:[{tag:`span`,attrs:{id:`${t}-start-page`},children:e(`page`,`Page`)},{tag:`span`,ref:`lbCurrent`,cls:`ag-paging-number`,attrs:{id:`${t}-start-page-number`}},{tag:`span`,attrs:{id:`${t}-of-page`},children:e(`of`,`of`)},{tag:`span`,ref:`lbTotal`,cls:`ag-paging-number`,attrs:{id:`${t}-of-page-number`}}]},{tag:`div`,ref:`btNext`,cls:`ag-button ag-paging-button`,role:`button`,attrs:{"aria-label":e(`nextPage`,`Next Page`)}},{tag:`div`,ref:`btLast`,cls:`ag-button ag-paging-button`,role:`button`,attrs:{"aria-label":e(`lastPage`,`Last Page`)}}]}]}}onBtNext(){this.nextButtonDisabled||this.pagination.goToNextPage()}onBtPrevious(){this.previousAndFirstButtonsDisabled||this.pagination.goToPreviousPage()}onBtLast(){this.lastButtonDisabled||this.pagination.goToLastPage()}enableOrDisableButtons(){let e=this.pagination.getCurrentPage(),t=this.rowModel.isLastRowIndexKnown(),n=this.pagination.getTotalPages();this.previousAndFirstButtonsDisabled=e===0,this.toggleButtonDisabled(this.btFirst,this.previousAndFirstButtonsDisabled),this.toggleButtonDisabled(this.btPrevious,this.previousAndFirstButtonsDisabled);let r=this.isZeroPagesToDisplay(),i=e===n-1;this.nextButtonDisabled=i||r,this.lastButtonDisabled=!t||r||e===n-1,this.toggleButtonDisabled(this.btNext,this.nextButtonDisabled),this.toggleButtonDisabled(this.btLast,this.lastButtonDisabled)}toggleButtonDisabled(e,t){Cve(e,t),e.classList.toggle(`ag-disabled`,t)}isZeroPagesToDisplay(){let e=this.rowModel.isLastRowIndexKnown(),t=this.pagination.getTotalPages();return e&&t===0}updateLabels(){let e=this.rowModel.isLastRowIndexKnown(),t=this.pagination.getTotalPages(),n=this.pagination.getMasterRowCount(),r=e?n:null,i=this.pagination.getCurrentPage(),a=this.pagination.getPageSize(),o,s;this.isZeroPagesToDisplay()?o=s=0:(o=a*i+1,s=o+a-1,e&&s>r&&(s=r));let c=o+a-1,l=!e&&n<c,u=this.formatNumber(o);this.lbFirstRowOnPage.textContent=u;let d,f=this.getLocaleTextFunc();d=l?f(`pageLastRowUnknown`,`?`):this.formatNumber(s),this.lbLastRowOnPage.textContent=d;let p=t>0?i+1:0,m=this.formatNumber(p);this.lbCurrent.textContent=m;let h,g;if(e)h=this.formatNumber(t),g=this.formatNumber(r);else{let e=f(`more`,`more`);h=e,g=e}this.lbTotal.textContent=h,this.lbRecordCount.textContent=g,this.announceAriaStatus(u,d,g,m,h)}announceAriaStatus(e,t,n,r,i){let a=this.getLocaleTextFunc(),o=a(`page`,`Page`),s=a(`to`,`to`),c=a(`of`,`of`),l=`${e} ${s} ${t} ${c} ${n}`,u=`${o} ${r} ${c} ${i}`;l!==this.ariaRowStatus&&(this.ariaRowStatus=l,this.ariaAnnounce?.announceValue(l,`paginationRow`)),u!==this.ariaPageStatus&&(this.ariaPageStatus=u,this.ariaAnnounce?.announceValue(u,`paginationPage`))}}},MNe=100,NNe={moduleName:`Pagination`,version:aK,beans:[class extends Q{constructor(){super(...arguments),this.beanName=`pagination`,this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=0,this.masterRowCount=0}postConstruct(){let e=this.gos;this.active=e.get(`pagination`),this.pageSizeFromGridOptions=e.get(`paginationPageSize`),this.paginateChildRows=this.isPaginateChildRows(),this.addManagedPropertyListener(`pagination`,this.onPaginationGridOptionChanged.bind(this)),this.addManagedPropertyListener(`paginationPageSize`,this.onPageSizeGridOptionChanged.bind(this))}getPaginationSelector(){return jNe}isPaginateChildRows(){let e=this.gos;return e.get(`groupHideParentOfSingleChild`)||e.get(`groupRemoveSingleChildren`)||e.get(`groupRemoveLowestSingleChildren`)?!0:e.get(`paginateChildRows`)}onPaginationGridOptionChanged(){this.active=this.gos.get(`pagination`),this.calculatePages(),this.dispatchPaginationChangedEvent({keepRenderedRows:!0})}onPageSizeGridOptionChanged(){this.setPageSize(this.gos.get(`paginationPageSize`),`gridOptions`)}goToPage(e){let t=this.currentPage;if(!this.active||t===e||typeof t!=`number`)return;let{editSvc:n}=this.beans;n?.isEditing()&&(n.isBatchEditing()?n.cleanupEditors():n.stopEditing(void 0,{source:`api`})),this.currentPage=e,this.calculatePages(),this.dispatchPaginationChangedEvent({newPage:!0})}goToPageWithIndex(e){if(!this.active)return;let t=e;this.paginateChildRows||(t=this.beans.rowModel.getTopLevelIndexFromDisplayedIndex?.(e)??e),this.goToPage(Math.floor(t/this.pageSize))}isRowInPage(e){return!this.active||e>=this.topDisplayedRowIndex&&e<=this.bottomDisplayedRowIndex}getCurrentPage(){return this.currentPage}goToNextPage(){this.goToPage(this.currentPage+1)}goToPreviousPage(){this.goToPage(this.currentPage-1)}goToFirstPage(){this.goToPage(0)}goToLastPage(){let e=this.beans.rowModel.getRowCount(),t=Math.floor(e/this.pageSize);this.goToPage(t)}getPageSize(){return this.pageSize}getTotalPages(){return this.totalPages}setPage(e){this.currentPage=e}get pageSize(){return nW(this.pageSizeAutoCalculated)&&this.gos.get(`paginationAutoPageSize`)?this.pageSizeAutoCalculated:nW(this.pageSizeFromPageSizeSelector)?this.pageSizeFromPageSizeSelector:nW(this.pageSizeFromInitialState)?this.pageSizeFromInitialState:nW(this.pageSizeFromGridOptions)?this.pageSizeFromGridOptions:MNe}calculatePages(){this.active?this.paginateChildRows?this.calculatePagesAllRows():this.calculatePagesMasterRowsOnly():this.calculatedPagesNotActive(),this.beans.pageBounds.calculateBounds(this.topDisplayedRowIndex,this.bottomDisplayedRowIndex)}unsetAutoCalculatedPageSize(){if(this.pageSizeAutoCalculated===void 0)return;let e=this.pageSizeAutoCalculated;this.pageSizeAutoCalculated=void 0,this.pageSize!==e&&(this.calculatePages(),this.dispatchPaginationChangedEvent({newPageSize:!0}))}setPageSize(e,t){let n=this.pageSize;switch(t){case`autoCalculated`:this.pageSizeAutoCalculated=e;break;case`pageSizeSelector`:this.pageSizeFromPageSizeSelector=e,this.currentPage!==0&&this.goToFirstPage();break;case`initialState`:this.pageSizeFromInitialState=e;break;case`gridOptions`:this.pageSizeFromGridOptions=e,this.pageSizeFromInitialState=void 0,this.pageSizeFromPageSizeSelector=void 0,this.currentPage!==0&&this.goToFirstPage()}n!==this.pageSize&&(this.calculatePages(),this.dispatchPaginationChangedEvent({newPageSize:!0,keepRenderedRows:!0}))}setZeroRows(){this.masterRowCount=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=-1,this.currentPage=0,this.totalPages=0}adjustCurrentPageIfInvalid(){let e=this.totalPages;this.currentPage>=e&&(this.currentPage=e-1);let t=this.currentPage;(!isFinite(t)||isNaN(t)||t<0)&&(this.currentPage=0)}calculatePagesMasterRowsOnly(){let e=this.beans.rowModel,t=e.getTopLevelRowCount();if(this.masterRowCount=t,t<=0){this.setZeroRows();return}let n=this.pageSize,r=t-1;this.totalPages=Math.floor(r/n)+1,this.adjustCurrentPageIfInvalid();let i=this.currentPage,a=n*i,o=n*(i+1)-1;if(o>r&&(o=r),this.topDisplayedRowIndex=e.getTopLevelRowDisplayedIndex(a),o===r)this.bottomDisplayedRowIndex=e.getRowCount()-1;else{let t=e.getTopLevelRowDisplayedIndex(o+1);this.bottomDisplayedRowIndex=t-1}}getMasterRowCount(){return this.masterRowCount}calculatePagesAllRows(){let e=this.beans.rowModel.getRowCount();if(this.masterRowCount=e,e===0){this.setZeroRows();return}let{pageSize:t,currentPage:n}=this,r=e-1;this.totalPages=Math.floor(r/t)+1,this.adjustCurrentPageIfInvalid(),this.topDisplayedRowIndex=t*n,this.bottomDisplayedRowIndex=t*(n+1)-1,this.bottomDisplayedRowIndex>r&&(this.bottomDisplayedRowIndex=r)}calculatedPagesNotActive(){this.setPageSize(void 0,`autoCalculated`),this.totalPages=1,this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=this.beans.rowModel.getRowCount()-1}dispatchPaginationChangedEvent(e){let{keepRenderedRows:t=!1,newPage:n=!1,newPageSize:r=!1}=e;this.eventSvc.dispatchEvent({type:`paginationChanged`,animate:!1,newData:!1,newPage:n,newPageSize:r,keepRenderedRows:t})}},ENe],icons:{first:`first`,previous:`previous`,next:`next`,last:`last`},apiFunctions:{paginationIsLastPageFound:gNe,paginationGetPageSize:_Ne,paginationGetCurrentPage:vNe,paginationGetTotalPages:yNe,paginationGetRowCount:bNe,paginationGoToNextPage:xNe,paginationGoToPreviousPage:SNe,paginationGoToFirstPage:CNe,paginationGoToLastPage:wNe,paginationGoToPage:TNe},dependsOn:[K$]},PNe=`.ag-row-pinned-source{background-color:var(--ag-pinned-source-row-background-color);color:var(--ag-pinned-source-row-text-color);font-weight:var(--ag-pinned-source-row-font-weight)}.ag-row-pinned-manual{background-color:var(--ag-pinned-row-background-color);color:var(--ag-pinned-row-text-color);font-weight:var(--ag-pinned-row-font-weight)}`;function FNe(e){return e.pinnedRowModel?.getPinnedTopRowCount()??0}function INe(e){return e.pinnedRowModel?.getPinnedBottomRowCount()??0}function LNe(e,t){return e.pinnedRowModel?.getPinnedTopRow(t)}function RNe(e,t){return e.pinnedRowModel?.getPinnedBottomRow(t)}function zNe(e,t,n){return e.pinnedRowModel?.forEachPinnedRow(t,n)}var BNe={moduleName:`PinnedRow`,version:aK,beans:[nxe],css:[PNe],apiFunctions:{getPinnedTopRowCount:FNe,getPinnedBottomRowCount:INe,getPinnedTopRow:LNe,getPinnedBottomRow:RNe,forEachPinnedRow:zNe},icons:{rowPin:`pin`,rowPinTop:`pinned-top`,rowPinBottom:`pinned-bottom`,rowUnpin:`un-pin`}},VNe=`â`,HNe=`â`,UNe={tag:`span`,children:[{tag:`span`,ref:`eDelta`,cls:`ag-value-change-delta`},{tag:`span`,ref:`eValue`,cls:`ag-value-change-value`}]},WNe=class extends Yq{constructor(){super(UNe),this.eValue=null,this.eDelta=null,this.refreshCount=0}init(e){this.refresh(e,!0)}showDelta(e,t){let n=Math.abs(t),r=e.formatValue(n),i=nW(r)?r:n,a=t>=0,o=this.eDelta;o.textContent=a?VNe+i:HNe+i,o.classList.toggle(`ag-value-change-delta-up`,a),o.classList.toggle(`ag-value-change-delta-down`,!a)}setTimerToRemoveDelta(){this.refreshCount++;let e=this.refreshCount;this.beans.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.hideDeltaValue()},2e3)})}hideDeltaValue(){this.eValue.classList.remove(`ag-value-change-value-highlight`),qW(this.eDelta)}refresh(e,t=!1){let{value:n,valueFormatted:r}=e,{eValue:i,lastValue:a,beans:o}=this;if(n===a||(nW(r)?i.textContent=r:nW(n)?i.textContent=n:qW(i),o.filterManager?.isSuppressFlashingCellsBecauseFiltering()))return!1;let s=n&&typeof n==`object`&&`toNumber`in n?n.toNumber():n,c=a&&typeof a==`object`&&`toNumber`in a?a.toNumber():a;if(s===c)return!1;if(typeof s==`number`&&typeof c==`number`){let t=s-c;this.showDelta(e,t)}return a&&i.classList.add(`ag-value-change-value-highlight`),t||this.setTimerToRemoveDelta(),this.lastValue=n,!0}},GNe=`.ag-value-slide-out{opacity:1}:where(.ag-ltr) .ag-value-slide-out{margin-right:5px;transition:opacity 3s,margin-right 3s}:where(.ag-rtl) .ag-value-slide-out{margin-left:5px;transition:opacity 3s,margin-left 3s}:where(.ag-ltr,.ag-rtl) .ag-value-slide-out{transition-timing-function:linear}.ag-value-slide-out-end{opacity:0}
78:where(.ag-ltr) .ag-value-slide-out-end{margin-right:10px}:where(.ag-rtl) .ag-value-slide-out-end{margin-left:10px}`,KNe={tag:`span`,children:[{tag:`span`,ref:`eCurrent`,cls:`ag-value-slide-current`}]},qNe=class extends Yq{constructor(){super(KNe),this.eCurrent=null,this.refreshCount=0,this.registerCSS(GNe)}init(e){this.refresh(e,!0)}addSlideAnimation(){this.refreshCount++;let e=this.refreshCount;this.ePrevious?.remove();let{beans:t,eCurrent:n}=this,r=rX({tag:`span`,cls:`ag-value-slide-previous ag-value-slide-out`});this.ePrevious=r,r.textContent=n.textContent,this.getGui().insertBefore(r,n),t.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e===this.refreshCount&&this.ePrevious.classList.add(`ag-value-slide-out-end`)},50),window.setTimeout(()=>{e===this.refreshCount&&(this.ePrevious?.remove(),this.ePrevious=null)},3e3)})}refresh(e,t=!1){let n=e.value;if(rW(n)&&(n=``),n===this.lastValue||this.beans.filterManager?.isSuppressFlashingCellsBecauseFiltering())return!1;t||this.addSlideAnimation(),this.lastValue=n;let r=this.eCurrent;return nW(e.valueFormatted)?r.textContent=e.valueFormatted:nW(e.value)?r.textContent=n:qW(r),!0}},JNe=class extends Q{constructor(){super(...arguments),this.beanName=`cellFlashSvc`,this.nextAnimationTime=null,this.nextAnimationCycle=null,this.animations={highlight:new Map,"data-changed":new Map}}animateCell(e,t,n=this.beans.gos.get(`cellFlashDuration`),r=this.beans.gos.get(`cellFadeDuration`)){let i=this.animations[t];i.delete(e);let a=Date.now(),o=a+n,s={phase:`flash`,flashEndTime:o,fadeEndTime:a+n+r};i.set(e,s);let c=`ag-cell-${t}`,l=`${c}-animation`,{comp:u,eGui:{style:d}}=e;u.toggleCss(c,!0),u.toggleCss(l,!1),d.removeProperty(`transition`),d.removeProperty(`transition-delay`),this.nextAnimationTime&&o+15<this.nextAnimationTime&&(clearTimeout(this.nextAnimationCycle),this.nextAnimationCycle=null,this.nextAnimationTime=null),this.nextAnimationCycle||(this.beans.frameworkOverrides.wrapIncoming(()=>{this.nextAnimationCycle=setTimeout(this.advanceAnimations.bind(this),n)}),this.nextAnimationTime=o)}advanceAnimations(){let e=Date.now(),t=null;for(let n of Object.keys(this.animations)){let r=this.animations[n],i=`ag-cell-${n}`,a=`${i}-animation`;for(let[n,o]of r){if(!n.isAlive()||!n.comp){r.delete(n);continue}let{phase:s,flashEndTime:c,fadeEndTime:l}=o,u=s===`flash`?c:l;if(!(e+15>=u)){t=Math.min(u,t??1/0);continue}let{comp:d,eGui:{style:f}}=n;switch(s){case`flash`:d.toggleCss(i,!1),d.toggleCss(a,!0),f.transition=`background-color ${l-c}ms`,f.transitionDelay=`${c-e}ms`,t=Math.min(l,t??1/0),o.phase=`fade`;break;case`fade`:d.toggleCss(i,!1),d.toggleCss(a,!1),f.removeProperty(`transition`),f.removeProperty(`transition-delay`),r.delete(n)}}}t==null?(this.nextAnimationTime=null,this.nextAnimationCycle=null):t&&(this.nextAnimationCycle=setTimeout(this.advanceAnimations.bind(this),t-e),this.nextAnimationTime=t)}onFlashCells(e,t){if(!e.comp)return;let n=dxe(e.cellPosition);t.cells[n]&&this.animateCell(e,`highlight`)}flashCell(e,t){this.animateCell(e,`data-changed`,t?.flashDuration,t?.fadeDuration)}destroy(){for(let e of Object.keys(this.animations))this.animations[e].clear()}};function YNe(e,t={}){let{cellFlashSvc:n}=e;n&&e.frameworkOverrides.wrapIncoming(()=>{for(let r of e.rowRenderer.getCellCtrls(t.rowNodes,t.columns))n.flashCell(r,t)})}var XNe={moduleName:`HighlightChanges`,version:aK,beans:[JNe],userComponents:{agAnimateShowChangeCellRenderer:WNe,agAnimateSlideCellRenderer:qNe},apiFunctions:{flashCells:YNe}};function ZNe(e,t,n){if(!t)return;let r=e.ctrlsSvc.getGridBodyCtrl().eGridBody,i=`aria-${t}`;n===null?r.removeAttribute(i):r.setAttribute(i,n)}function QNe(e,t={}){e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.refreshCells(t))}function $Ne(e){e.frameworkOverrides.wrapIncoming(()=>{for(let t of e.ctrlsSvc.getHeaderRowContainerCtrls())t.refresh()})}function ePe(e){return e.animationFrameSvc?.isQueueEmpty()??!0}function tPe(e){e.animationFrameSvc?.flushAllFrames()}function nPe(e){return{rowHeight:DK(e),headerHeight:fY(e)}}function rPe(e,t={}){let n=[];for(let r of e.rowRenderer.getCellCtrls(t.rowNodes,t.columns)){let e=r.getCellRenderer();e!=null&&n.push(bQ(e))}if(t.columns?.length)return n;let r=[],i=a$(t.rowNodes);for(let t of e.rowRenderer.getAllRowCtrls()){if(i&&!o$(t.rowNode,i)||!t.isFullWidth())continue;let e=t.getFullWidthCellRenderers();for(let t=0;t<e.length;t++){let n=e[t];n!=null&&r.push(bQ(n))}}return[...r,...n]}var iPe={moduleName:`RenderApi`,version:aK,apiFunctions:{setGridAriaProperty:ZNe,refreshCells:QNe,refreshHeader:$Ne,isAnimationFrameQueueEmpty:ePe,flushAllAnimationFrames:tPe,getSizesForCurrentTheme:nPe,getCellRendererInstances:rPe}},aPe={moduleName:`RowAutoHeight`,version:aK,beans:[class extends Q{constructor(){super(...arguments),this.beanName=`rowAutoHeight`,this.wasEverActive=!1,this._debouncedCalculateRowHeights=PG(this,this.calculateRowHeights.bind(this),1)}requestCheckAutoHeight(){this.wasEverActive&&this._debouncedCalculateRowHeights()}calculateRowHeights(){let{visibleCols:e,rowModel:t,rowSpanSvc:n,pinnedRowModel:r}=this.beans,i=e.autoHeightCols,a=!1,o=e=>{let t=e.__autoHeights,r=EK(this.beans,e).height;for(let a of i){let i=t?.[a.getColId()],o=n?.getCellSpan(a,e);if(o){if(o.getLastNode()!==e)continue;if(i=n?.getCellSpan(a,e)?.getLastNodeAutoHeight(),!i)return}if(i==null){if(this.colSpanSkipCell(a,e))continue;return}r=Math.max(i,r)}r!==e.rowHeight&&(e.setRowHeight(r),a=!0)};r?.forEachPinnedRow?.(`top`,o),r?.forEachPinnedRow?.(`bottom`,o),t.forEachDisplayedNode?.(o),a&&t.onRowHeightChanged?.()}setRowAutoHeight(e,t,n){if(e.__autoHeights??={},t==null){delete e.__autoHeights[n.getId()];return}let r=e.__autoHeights[n.getId()];e.__autoHeights[n.getId()]=t,r!==t&&this.requestCheckAutoHeight()}
vendor: 49,226 bytes, lines 78-80
78colSpanSkipCell(e,t){let{colModel:n,colViewport:r,visibleCols:i}=this.beans;if(!n.colSpanActive)return!1;let a=[];switch(e.getPinned()){case`left`:a=i.getLeftColsForRow(t);break;case`right`:a=i.getRightColsForRow(t);break;case null:a=r.getColsWithinViewport(t)}return!a.includes(e)}setupCellAutoHeight(e,t,n){if(!e.column.isAutoHeight()||!t)return!1;this.wasEverActive=!0;let r=t.parentElement,{rowNode:i,column:a}=e,o=this.beans,s=c=>{if(this.beans.editSvc?.isEditing(e)||!e.isAlive()||!n.isAlive())return;let{paddingTop:l,paddingBottom:u,borderBottomWidth:d,borderTopWidth:f}=zW(r),p=l+u+d+f,m=t.offsetHeight+p;if(c<5&&(!fW(o)?.contains(t)||m==0)){window.setTimeout(()=>s(c+1),0);return}this.setRowAutoHeight(i,m,a)},c=()=>s(0);c();let l=cG(o,t,c);return n.addDestroyFunc(()=>{l(),this.setRowAutoHeight(i,void 0,a)}),!0}setAutoHeightActive(e){this.active=e.list.some(e=>e.isVisible()&&e.isAutoHeight())}areRowsMeasured(){if(!this.active)return!0;let e=this.beans.rowRenderer.getAllRowCtrls(),t=null;for(let{rowNode:n}of e)if((!t||this.beans.colModel.colSpanActive)&&(t=this.beans.colViewport.getColsWithinViewport(n).filter(e=>e.isAutoHeight())),t.length!==0){if(!n.__autoHeights)return!1;for(let e of t){let t=n.__autoHeights[e.getColId()];if(!t||n.rowHeight<t)return!1}}return!0}}]},oPe=class{constructor(e,t){this.col=e,this.firstNode=t,this.cellSpan=!0,this.spannedNodes=new Set,this.addSpannedNode(t)}reset(){this.spannedNodes.clear(),this.addSpannedNode(this.firstNode)}addSpannedNode(e){this.spannedNodes.add(e),this.lastNode=e}getLastNode(){return this.lastNode}getCellHeight(){return this.lastNode.rowTop+this.lastNode.rowHeight-this.firstNode.rowTop-1}doesSpanContain(e){return e.column!==this.col||e.rowPinned!=this.firstNode.rowPinned?!1:this.firstNode.rowIndex<=e.rowIndex&&e.rowIndex<=this.lastNode.rowIndex}getLastNodeAutoHeight(){let e=this.firstNode.__autoHeights?.[this.col.getColId()];if(e==null)return;let t=0;for(let e of this.spannedNodes)e!==this.lastNode&&(t+=e.rowHeight);return e-t}},sPe=class extends Q{constructor(e){super(),this.column=e}buildCache(e){let{column:t,beans:{gos:n,pinnedRowModel:r,rowModel:i,valueSvc:a,pagination:o}}=this,{colDef:s}=t,c=this.getNodeMap(e),l=new Map,u=n.getCallback(`isFullWidthRow`),d=s.equals,f=s.spanRows,p=typeof f==`function`,m=null,h=null,g,_=(e,t)=>{m=e,h=null,g=t},v=e=>{let r=!e.isExpandable()&&!e.group&&!e.detail&&(!u||!u({rowNode:e}));if(e.rowIndex==null||!r){_(null,null);return}if(m==null||e.level!==m.level||e.footer||h&&e.rowIndex-1!==h?.getLastNode().rowIndex){_(e,a.getValue(t,e,`data`));return}let i=a.getValue(t,e,`data`);if(p){let r=eq(n,{valueA:g,nodeA:m,valueB:i,nodeB:e,column:t,colDef:s});if(!f(r)){_(e,i);return}}else if(d?!d(g,i):g!==i){_(e,i);return}if(!h){let e=c?.get(m);e?.firstNode===m?(e.reset(),h=e):h=new oPe(t,m),l.set(m,h)}h.addSpannedNode(e),l.set(e,h)};switch(e){case`center`:i.forEachDisplayedNode?.(e=>{(!o||o.isRowInPage(e.rowIndex))&&v(e)}),this.centerValueNodeMap=l;break;case`top`:r?.forEachPinnedRow(`top`,v),this.topValueNodeMap=l;break;case`bottom`:r?.forEachPinnedRow(`bottom`,v),this.bottomValueNodeMap=l}}isCellSpanning(e){return!!this.getCellSpan(e)}getCellSpan(e){return this.getNodeMap(e.rowPinned).get(e)}getNodeMap(e){switch(e){case`top`:return this.topValueNodeMap;case`bottom`:return this.bottomValueNodeMap;default:return this.centerValueNodeMap}}},cPe=class extends Q{constructor(){super(...arguments),this.beanName=`rowSpanSvc`,this.spanningColumns=new Map,this.debouncePinnedEvent=PG(this,this.dispatchCellsUpdatedEvent.bind(this,!0),0),this.debounceModelEvent=PG(this,this.dispatchCellsUpdatedEvent.bind(this,!1),0),this.pinnedTimeout=null,this.modelTimeout=null}postConstruct(){let e=this.onRowDataUpdated.bind(this),t=this.buildPinnedCaches.bind(this);this.addManagedEventListeners({paginationChanged:this.buildModelCaches.bind(this),pinnedRowDataChanged:t,pinnedRowsChanged:t,rowNodeDataChanged:e,cellValueChanged:e})}register(e){let{gos:t}=this.beans;if(!t.get(`enableCellSpan`)||this.spanningColumns.has(e))return;let n=this.createManagedBean(new sPe(e));this.spanningColumns.set(e,n),n.buildCache(`top`),n.buildCache(`bottom`),n.buildCache(`center`),this.debouncePinnedEvent(),this.debounceModelEvent()}dispatchCellsUpdatedEvent(e){this.dispatchLocalEvent({type:`spannedCellsUpdated`,pinned:e})}deregister(e){this.spanningColumns.delete(e)}onRowDataUpdated({node:e}){let{spannedRowRenderer:t}=this.beans;if(e.rowPinned){if(this.pinnedTimeout!=null)return;this.pinnedTimeout=window.setTimeout(()=>{this.pinnedTimeout=null,this.buildPinnedCaches(),t?.createCtrls(`top`),t?.createCtrls(`bottom`)},0);return}this.modelTimeout??=window.setTimeout(()=>{this.modelTimeout=null,this.buildModelCaches(),t?.createCtrls(`center`)},0)}buildModelCaches(){this.modelTimeout!=null&&clearTimeout(this.modelTimeout),this.spanningColumns.forEach(e=>e.buildCache(`center`)),this.debounceModelEvent()}buildPinnedCaches(){this.pinnedTimeout!=null&&clearTimeout(this.pinnedTimeout),this.spanningColumns.forEach(e=>{e.buildCache(`top`),e.buildCache(`bottom`)}),this.debouncePinnedEvent()}isCellSpanning(e,t){let n=this.spanningColumns.get(e);return n?n.isCellSpanning(t):!1}getCellSpanByPosition(e){let{pinnedRowModel:t,rowModel:n}=this.beans,r=e.column,i=e.rowIndex,a=this.spanningColumns.get(r);if(!a)return;let o;switch(e.rowPinned){case`top`:o=t?.getPinnedTopRow(i);break;case`bottom`:o=t?.getPinnedBottomRow(i);break;default:o=n.getRow(i)}if(o)return a.getCellSpan(o)}getCellStart(e){let t=this.getCellSpanByPosition(e);return t?{...e,rowIndex:t.firstNode.rowIndex}:e}getCellEnd(e){let t=this.getCellSpanByPosition(e);return t?{...e,rowIndex:t.getLastNode().rowIndex}:e}getCellSpan(e,t){let n=this.spanningColumns.get(e);if(n)return n.getCellSpan(t)}forEachSpannedColumn(e,t){for(let[n,r]of this.spanningColumns)r.isCellSpanning(e)&&t(n,r.getCellSpan(e))}destroy(){super.destroy(),this.spanningColumns.clear()}},lPe=class extends GQ{constructor(e,t,n){super(e.col,e.firstNode,n,t),this.cellSpan=e,this.SPANNED_CELL_CSS_CLASS=`ag-spanned-cell`}setComp(e,t,n,r,i,a,o){this.eWrapper=n,super.setComp(e,t,n,r,i,a,o),this.setAriaRowSpan()}isCellSpanning(){return!0}getCellSpan(){return this.cellSpan}refreshAriaRowIndex(){let{eGui:e,rowNode:t}=this;e&&t.rowIndex!=null&&DW(e,t.rowIndex)}setAriaRowSpan(){Dve(this.eGui,this.cellSpan.spannedNodes.size)}setFocusedCellPosition(e){this.focusedCellPosition=e}getFocusedCellPosition(){return this.focusedCellPosition??this.cellPosition}checkCellFocused(){let e=this.beans.focusSvc.getFocusedCell();return!!e&&this.cellSpan.doesSpanContain(e)}applyStaticCssClasses(){super.applyStaticCssClasses(),this.comp.toggleCss(this.SPANNED_CELL_CSS_CLASS,!0)}onCellFocused(e){let{beans:t}=this;if(oY(t)){this.focusedCellPosition=void 0;return}let n=this.isCellFocused();n||(this.focusedCellPosition=void 0),e&&n&&(this.focusedCellPosition={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column}),super.onCellFocused(e)}getRootElement(){return this.eWrapper}},uPe=class extends JQ{getInitialRowClasses(e){return[`ag-spanned-row`]}getNewCellCtrl(e){let t=this.beans.rowSpanSvc?.getCellSpan(e,this.rowNode);if(t&&t.firstNode===this.rowNode)return new lPe(t,this,this.beans)}isCorrectCtrlForSpan(e){let t=this.beans.rowSpanSvc?.getCellSpan(e.column,this.rowNode);return!t||t.firstNode!==this.rowNode?!1:e.getCellSpan()===t}onRowHeightChanged(){}refreshFirstAndLastRowStyles(){}addHoverFunctionality(){}resetHoveredStatus(){}},dPe={moduleName:`CellSpan`,version:aK,beans:[cPe,class extends Q{constructor(){super(...arguments),this.beanName=`spannedRowRenderer`,this.topCtrls=new Map,this.bottomCtrls=new Map,this.centerCtrls=new Map}postConstruct(){this.addManagedEventListeners({displayedRowsChanged:this.createAllCtrls.bind(this)})}createAllCtrls(){this.createCtrls(`top`),this.createCtrls(`bottom`),this.createCtrls(`center`)}createCtrls(e){let{rowSpanSvc:t}=this.beans,n=this.getCtrlsMap(e),r=n.size,i=this.getAllRelevantRowControls(e),a=new Map,o=!1;for(let e of i)e.isAlive()&&t?.forEachSpannedColumn(e.rowNode,(e,t)=>{if(a.has(t.firstNode))return;let r=n.get(t.firstNode);if(r){a.set(t.firstNode,r),n.delete(t.firstNode);return}o=!0;let i=new uPe(t.firstNode,this.beans,!1,!1,!1);a.set(t.firstNode,i)});this.setCtrlsMap(e,a);let s=a.size===r;if(o||!s){for(let e of n.values())e.destroyFirstPass(!0),e.destroySecondPass();this.dispatchLocalEvent({type:`spannedRowsUpdated`,ctrlsKey:e})}}getAllRelevantRowControls(e){let{rowRenderer:t}=this.beans;switch(e){case`top`:return t.topRowCtrls;case`bottom`:return t.bottomRowCtrls;case`center`:return t.allRowCtrls}}getCellByPosition(e){let{rowSpanSvc:t}=this.beans,n=t?.getCellSpanByPosition(e);if(!n)return;let r=this.getCtrlsMap(e.rowPinned).get(n.firstNode);if(r)return r.getAllCellCtrls().find(t=>t.column===e.column)}getCtrls(e){return[...this.getCtrlsMap(e).values()]}destroyRowCtrls(e){for(let t of this.getCtrlsMap(e).values())t.destroyFirstPass(!0),t.destroySecondPass();this.setCtrlsMap(e,new Map)}getCtrlsMap(e){switch(e){case`top`:return this.topCtrls;case`bottom`:return this.bottomCtrls;default:return this.centerCtrls}}setCtrlsMap(e,t){switch(e){case`top`:this.topCtrls=t;break;case`bottom`:this.bottomCtrls=t;break;default:this.centerCtrls=t}}destroy(){super.destroy(),this.destroyRowCtrls(`top`),this.destroyRowCtrls(`bottom`),this.destroyRowCtrls(`center`)}}]},fPe=class extends Q{constructor(){super(...arguments),this.beanName=`selectionColSvc`}postConstruct(){this.addManagedPropertyListener(`rowSelection`,e=>{this.onSelectionOptionsChanged(e.currentValue,e.previousValue,Eq(e.source))}),this.addManagedPropertyListener(`selectionColumnDef`,this.updateColumns.bind(this))}addColumns(e){let t=this.columns;t!=null&&(e.list=t.list.concat(e.list),e.tree=t.tree.concat(e.tree),Gye(e))}createColumns(e,t){let n=()=>{xq(this.beans,this.columns?.tree),this.columns=null},r=e.treeDepth,i=(this.columns?.treeDepth??-1)==r,a=this.generateSelectionCols();if(Wye(a,this.columns?.list??[])&&i)return;n();let{colGroupSvc:o}=this.beans,s=o?.findDepth(e.tree)??0,c=o?.balanceTreeForAutoCols(a,s)??[];this.columns={list:a,tree:c,treeDepth:s,map:{}},t(e=>{if(!e)return null;let t=e.filter(e=>!Cq(e));return[...a,...t]})}updateColumns(e){let t=Eq(e.source),{beans:n}=this;for(let r of this.columns?.list??[]){let i=this.createSelectionColDef(e.currentValue);r.setColDef(i,null,t),YX(n,{state:[qye(i,r.colId)]},t)}}getColumn(e){return this.columns?.list.find(t=>Dq(t,e))??null}getColumns(){return this.columns?.list??null}isSelectionColumnEnabled(){let{gos:e,beans:t}=this,n=e.get(`rowSelection`);if(typeof n!=`object`||!wK(e))return!1;let r=(t.autoColSvc?.getColumns()?.length??0)>0;if(n.checkboxLocation===`autoGroupColumn`&&r)return!1;let i=!!zK(n),a=BK(n);return i||a}createSelectionColDef(e){let{gos:t}=this,n=e??t.get(`selectionColumnDef`),r=t.get(`enableRtl`),{rowSpan:i,spanRows:a,...o}=n??{};return{width:50,resizable:!1,suppressHeaderMenuButton:!0,sortable:!1,suppressMovable:!0,lockPosition:r?`right`:`left`,comparator(e,t,n,r){let i=n.isSelected();return i===r.isSelected()?0:i?1:-1},editable:!1,suppressFillHandle:!0,suppressAutoSize:!0,pinned:null,...o,colId:Hye,chartDataType:`excluded`}}generateSelectionCols(){if(!this.isSelectionColumnEnabled())return[];let e=this.createSelectionColDef(),t=e.colId;this.gos.validateColDef(e,t,!0);let n=new iq(e,null,t,!1);return this.createBean(n),[n]}onSelectionOptionsChanged(e,t,n){let r=(t&&typeof t!=`string`?zK(t):void 0)!==(e&&typeof e!=`string`?zK(e):void 0),i=(t&&typeof t!=`string`?BK(t):void 0)!==(e&&typeof e!=`string`?BK(e):void 0),a=VK(e)!==VK(t);(r||i||a)&&this.beans.colModel.refreshAll(n)}destroy(){xq(this.beans,this.columns?.tree),super.destroy()}refreshVisibility(e,t,n){if(!this.columns?.list.length)return;let r=e.length+t.length+n.length;if(r===0)return;let i=this.columns.list[0];i.isVisible()&&(this.beans.rowNumbersSvc?.getColumn(`ag-Grid-RowNumbersColumn`)?2:1)===r&&(()=>{let r;switch(i.pinned){case`left`:case!0:r=e;break;case`right`:r=n;break;default:r=t}r&&$U(r,i)})()}},pPe=`:where(.ag-selection-checkbox) .ag-checkbox-input-wrapper:before{content:"";cursor:pointer;inset:-8px;position:absolute}`;function mPe(e,t){if(!t.nodes.every(e=>e.rowPinned&&!UQ(e)?(gK(59),!1):e.id!==void 0||(gK(60),!1)))return;let{nodes:n,source:r,newValue:i}=t;e.selectionSvc?.setNodesSelected({nodes:n,source:r??`api`,newValue:i})}function hPe(e,t,n=`apiSelectAll`){e.selectionSvc?.selectAllRowNodes({source:n,selectAll:t})}function gPe(e,t,n=`apiSelectAll`){e.selectionSvc?.deselectAllRowNodes({source:n,selectAll:t})}function _Pe(e,t=`apiSelectAllFiltered`){e.selectionSvc?.selectAllRowNodes({source:t,selectAll:`filtered`})}function vPe(e,t=`apiSelectAllFiltered`){e.selectionSvc?.deselectAllRowNodes({source:t,selectAll:`filtered`})}function yPe(e,t=`apiSelectAllCurrentPage`){e.selectionSvc?.selectAllRowNodes({source:t,selectAll:`currentPage`})}function bPe(e,t=`apiSelectAllCurrentPage`){e.selectionSvc?.deselectAllRowNodes({source:t,selectAll:`currentPage`})}function xPe(e){return e.selectionSvc?.getSelectedNodes()??[]}function SPe(e){return e.selectionSvc?.getSelectedRows()??[]}var CPe={tag:`div`,cls:`ag-selection-checkbox`,role:`presentation`,children:[{tag:`ag-checkbox`,ref:`eCheckbox`,role:`presentation`}]},wPe=class extends Yq{constructor(){super(CPe,[rZ]),this.eCheckbox=null}postConstruct(){this.eCheckbox.setPassive(!0)}onDataChanged(){this.onSelectionChanged()}onSelectableChanged(){this.showOrHideSelect()}onSelectionChanged(){let e=this.getLocaleTextFunc(),{rowNode:t,eCheckbox:n}=this,r=t.isSelected(),i=jW(e,r),[a,o]=t.selectable?[`ariaRowToggleSelection`,`Press Space to toggle row selection`]:[`ariaRowSelectionDisabled`,`Row Selection is disabled for this row`],s=e(a,o);n.setValue(r,!0),n.setInputAriaLabel(`${s} (${i})`)}init(e){if(this.rowNode=e.rowNode,this.column=e.column,this.overrides=e.overrides,this.onSelectionChanged(),this.addManagedListeners(this.eCheckbox.getWrapperElement(),{dblclick:xJ,click:e=>{xJ(e),!this.eCheckbox.isDisabled()&&this.beans.selectionSvc?.handleSelectionEvent(e,this.rowNode,`checkboxSelected`)}}),this.addManagedListeners(this.rowNode,{rowSelected:this.onSelectionChanged.bind(this),dataChanged:this.onDataChanged.bind(this),selectableChanged:this.onSelectableChanged.bind(this)}),this.addManagedPropertyListener(`rowSelection`,({currentValue:e,previousValue:t})=>{(typeof e==`object`?HK(e):void 0)!==(typeof t==`object`?HK(t):void 0)&&this.onSelectableChanged()}),KK(this.gos)||typeof this.getIsVisible()==`function`){let e=this.showOrHideSelect.bind(this);this.addManagedEventListeners({displayedColumnsChanged:e}),this.addManagedListeners(this.rowNode,{dataChanged:e,cellChanged:e}),this.showOrHideSelect()}this.eCheckbox.getInputElement().setAttribute(`tabindex`,`-1`)}showOrHideSelect(){let{column:e,rowNode:t,overrides:n,gos:r}=this,i=t.selectable,a=this.getIsVisible(),o;if(typeof a==`function`){let r=n?.callbackParams;if(!e)o=a({...r,node:t,data:t.data});else{let n=e.createColumnFunctionCallbackParams(t);o=a({...r,...n})}}else o=a??!1;let s=i&&!o||!i&&o,c=i||o,l=r.get(`rowSelection`),u=l&&typeof l!=`string`?!HK(l):!!e?.getColDef().showDisabledCheckboxes;this.setVisible(c&&(!s||u)),this.setDisplayed(c&&(!s||u)),c&&this.eCheckbox.setDisabled(s),n?.removeHidden&&this.setDisplayed(c)}getIsVisible(){let e=this.overrides;if(e)return e.isVisible;let t=this.gos.get(`rowSelection`);return t&&typeof t!=`string`?zK(t):this.column?.getColDef()?.checkboxSelection}},TPe=class{constructor(e,t){this.rowModel=e,this.pinnedRowModel=t,this.selectAll=!1,this.rootId=null,this.endId=null,this.cachedRange=[]}reset(){this.rootId=null,this.endId=null,this.cachedRange.length=0}setRoot(e){this.rootId=e.id,this.endId=null,this.cachedRange.length=0}setEndRange(e){this.endId=e.id,this.cachedRange.length=0}getRange(){if(this.cachedRange.length===0){let e=this.getRoot(),t=this.getEnd();if(e==null||t==null)return this.cachedRange;this.cachedRange=this.getNodesInRange(e,t)??[]}return this.cachedRange}isInRange(e){return this.rootId!==null&&this.getRange().some(t=>t.id===e.id)}getRoot(e){if(this.rootId)return this.getRowNode(this.rootId);if(e)return this.setRoot(e),e}getEnd(){if(this.endId)return this.getRowNode(this.endId)}getRowNode(e){let t,{rowModel:n,pinnedRowModel:r}=this;return t??=n.getRowNode(e),r?.isManual()&&(t??=r.getPinnedRowById(e,`top`),t??=r.getPinnedRowById(e,`bottom`)),t}truncate(e){let t=this.getRange();if(t.length===0)return{keep:[],discard:[]};let n=t[0].id===this.rootId,r=t.findIndex(t=>t.id===e.id);if(r>-1){let i=t.slice(0,r),a=t.slice(r+1);return this.setEndRange(e),n?{keep:i,discard:a}:{keep:a,discard:i}}return{keep:t,discard:[]}}extend(e,t=!1){let n=this.getRoot();if(n==null){let n=this.getRange().slice();return t&&e.depthFirstSearch(e=>!e.group&&n.push(e)),n.push(e),this.setRoot(e),{keep:n,discard:[]}}let r=this.getNodesInRange(n,e);if(!r)return this.setRoot(e),{keep:[e],discard:[]};if(r.find(e=>e.id===this.endId))return this.setEndRange(e),{keep:this.getRange(),discard:[]};{let t=this.getRange().slice();return this.setEndRange(e),{keep:this.getRange(),discard:t}}}getNodesInRange(e,t){let{pinnedRowModel:n,rowModel:r}=this;if(!n?.isManual())return r.getNodesInRangeForSelection(e,t);if(e.rowPinned===`top`&&!t.rowPinned)return WQ(n,`top`,e,void 0).concat(r.getNodesInRangeForSelection(r.getRow(0),t)??[]);if(e.rowPinned===`bottom`&&!t.rowPinned){let i=WQ(n,`bottom`,void 0,e),a=r.getRowCount(),o=r.getRow(a-1);return(r.getNodesInRangeForSelection(t,o)??[]).concat(i)}if(!e.rowPinned&&!t.rowPinned)return r.getNodesInRangeForSelection(e,t);if(e.rowPinned===`top`&&t.rowPinned===`top`)return WQ(n,`top`,e,t);if(e.rowPinned===`bottom`&&t.rowPinned===`top`){let i=WQ(n,`top`,t,void 0),a=WQ(n,`bottom`,void 0,e),o=r.getRow(0),s=r.getRow(r.getRowCount()-1);return i.concat(r.getNodesInRangeForSelection(o,s)??[]).concat(a)}if(!e.rowPinned&&t.rowPinned===`top`)return WQ(n,`top`,t,void 0).concat(r.getNodesInRangeForSelection(r.getRow(0),e)??[]);if(e.rowPinned===`top`&&t.rowPinned===`bottom`){let i=WQ(n,`top`,e,void 0),a=WQ(n,`bottom`,void 0,t),o=r.getRow(0),s=r.getRow(r.getRowCount()-1);return i.concat(r.getNodesInRangeForSelection(o,s)??[]).concat(a)}if(e.rowPinned===`bottom`&&t.rowPinned===`bottom`)return WQ(n,`bottom`,e,t);if(!e.rowPinned&&t.rowPinned===`bottom`){let i=WQ(n,`bottom`,void 0,t),a=r.getRow(r.getRowCount());return(r.getNodesInRangeForSelection(e,a)??[]).concat(i)}return null}},EPe=class extends Q{constructor(e){super(),this.column=e,this.cbSelectAllVisible=!1,this.processingEventFromCheckbox=!1}onSpaceKeyDown(e){let t=this.cbSelectAll;t.isDisplayed()&&!t.getGui().contains(dW(this.beans))&&(e.preventDefault(),t.setValue(!t.getValue()))}getCheckboxGui(){return this.cbSelectAll.getGui()}setComp(e){this.headerCellCtrl=e;let t=this.createManagedBean(new nZ);this.cbSelectAll=t,t.addCss(`ag-header-select-all`),bW(t.getGui(),`presentation`),this.showOrHideSelectAll();let n=this.updateStateOfCheckbox.bind(this);this.addManagedEventListeners({newColumnsLoaded:()=>this.showOrHideSelectAll(),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),selectionChanged:n,paginationChanged:n,modelUpdated:n}),this.addManagedPropertyListener(`rowSelection`,({currentValue:e,previousValue:t})=>{let n=e=>typeof e==`string`||!e||e.mode===`singleRow`?void 0:e.selectAll;n(e)!==n(t)&&this.showOrHideSelectAll(),this.updateStateOfCheckbox()}),this.addManagedListeners(t,{fieldValueChanged:this.onCbSelectAll.bind(this)}),t.getInputElement().setAttribute(`tabindex`,`-1`),this.refreshSelectAllLabel()}onDisplayedColumnsChanged(e){this.isAlive()&&this.showOrHideSelectAll(e.source===`uiColumnMoved`)}showOrHideSelectAll(e=!1){let t=this.isCheckboxSelection();this.cbSelectAllVisible=t,this.cbSelectAll.setDisplayed(t),t&&(this.checkRightRowModelType(`selectAllCheckbox`),this.checkSelectionType(`selectAllCheckbox`),this.updateStateOfCheckbox()),this.refreshSelectAllLabel(e)}updateStateOfCheckbox(){if(!this.cbSelectAllVisible||this.processingEventFromCheckbox)return;this.processingEventFromCheckbox=!0;let e=this.getSelectAllMode(),t=this.beans.selectionSvc,n=this.cbSelectAll,r=t.getSelectAllState(e);n.setValue(r);let i=t.hasNodesToSelect(e);n.setDisabled(!i),this.refreshSelectAllLabel(),this.processingEventFromCheckbox=!1}refreshSelectAllLabel(e=!1){let t=this.getLocaleTextFunc(),{headerCellCtrl:n,cbSelectAll:r,cbSelectAllVisible:i}=this,a=jW(t,r.getValue()),o=t(`ariaRowSelectAll`,`Press Space to toggle all rows selection`);n.setAriaDescriptionProperty(`selectAll`,i?`${o} (${a})`:null),r.setInputAriaLabel(t(`ariaHeaderSelection`,`Column with Header Selection`)),e||n.announceAriaDescription()}checkSelectionType(e){return JK(this.gos)?!0:(gK(128,{feature:e}),!1)}checkRightRowModelType(e){let{gos:t,rowModel:n}=this.beans;return xK(t)||SK(t)?!0:(gK(129,{feature:e,rowModel:n.getType()}),!1)}onCbSelectAll(){if(this.processingEventFromCheckbox||!this.cbSelectAllVisible)return;let e=this.cbSelectAll.getValue(),t=this.getSelectAllMode(),n=`uiSelectAll`;t===`currentPage`?n=`uiSelectAllCurrentPage`:t===`filtered`&&(n=`uiSelectAllFiltered`);let r={source:n,selectAll:t},i=this.beans.selectionSvc;e?i.selectAllRowNodes(r):i.deselectAllRowNodes(r)}isCheckboxSelection(){let{column:e,gos:t,beans:n}=this,r=typeof t.get(`rowSelection`)==`object`?`headerCheckbox`:`headerCheckboxSelection`;return H0(n,e)&&this.checkRightRowModelType(r)&&this.checkSelectionType(r)}getSelectAllMode(){let e=XK(this.gos,!1);if(e)return e;let{headerCheckboxSelectionCurrentPageOnly:t,headerCheckboxSelectionFilteredOnly:n}=this.column.getColDef();return t?`currentPage`:n?`filtered`:`all`}destroy(){super.destroy(),this.cbSelectAll=void 0,this.headerCellCtrl=void 0}};function H0({gos:e,selectionColSvc:t},n){let r=e.get(`rowSelection`),i=n.getColDef(),{headerCheckboxSelection:a}=i,o=!1;if(typeof r==`object`){let e=Cq(n),i=Sq(n);(VK(r)===`autoGroupColumn`&&i||e&&t?.isSelectionColumnEnabled())&&(o=BK(r))}else o=typeof a==`function`?a(eq(e,{column:n,colDef:i})):!!a;return o}var DPe=class extends Q{postConstruct(){let{gos:e,beans:t}=this;this.selectionCtx=new TPe(t.rowModel,t.pinnedRowModel),this.addManagedPropertyListeners([`isRowSelectable`,`rowSelection`],()=>{let t=KK(e);t!==this.isRowSelectable&&(this.isRowSelectable=t,this.updateSelectable())}),this.isRowSelectable=KK(e),this.addManagedEventListeners({cellValueChanged:e=>this.updateRowSelectable(e.node),rowNodeDataChanged:e=>this.updateRowSelectable(e.node)})}destroy(){super.destroy(),this.selectionCtx.reset()}createCheckboxSelectionComponent(){return new wPe}createSelectAllFeature(e){if(H0(this.beans,e))return new EPe(e)}isMultiSelect(){return JK(this.gos)}onRowCtrlSelected(e,t,n){let r=!!e.rowNode.isSelected();e.forEachGui(n,e=>{e.rowComp.toggleCss(`ag-row-selected`,r);let n=e.element;kW(n,r),n.contains(dW(this.beans))&&t(e)})}announceAriaRowSelection(e){if(this.isRowSelectionBlocked(e))return;let t=e.isSelected(),n=this.beans.editSvc?.isEditing({rowNode:e});if(!e.selectable||n)return;let r=this.getLocaleTextFunc()(t?`ariaRowDeselect`:`ariaRowSelect`,`Press SPACE to ${t?`deselect`:`select`} this row`);this.beans.ariaAnnounce?.announceValue(r,`rowSelection`)}isRowSelectionBlocked(e){return!e.selectable||e.rowPinned&&!UQ(e)||!wK(this.gos)}updateRowSelectable(e,t){let n=e.rowPinned&&e.pinnedSibling?e.pinnedSibling.selectable:this.isRowSelectable?.(e)??!0;return this.setRowSelectable(e,n,t),n}setRowSelectable(e,t,n){if(e.selectable!==t){if(e.selectable=t,e.dispatchRowEvent(`selectableChanged`),n)return;if(ZK(this.gos)){let t=this.calculateSelectedFromChildren(e);this.setNodesSelected({nodes:[e],newValue:t??!1,source:`selectableChanged`});return}e.isSelected()&&!e.selectable&&this.setNodesSelected({nodes:[e],newValue:!1,source:`selectableChanged`})}}calculateSelectedFromChildren(e){let t=!1,n=!1;if(!e.childrenAfterGroup?.length)return e.selectable?e.__selected:null;for(let r=0;r<e.childrenAfterGroup.length;r++){let i=e.childrenAfterGroup[r],a=i.isSelected();if(!i.selectable){let e=this.calculateSelectedFromChildren(i);if(e===null)continue;a=e}switch(a){case!0:t=!0;break;case!1:n=!0;break;default:return}}if(!(t&&n))return t?!0:n?!1:e.selectable?e.__selected:null}selectRowNode(e,t,n,r=`api`){if(t&&e.destroyed)return!1;let i=!e.selectable&&t,a=e.__selected===t;if(i||a)return!1;e.__selected=t,e.dispatchRowEvent(`rowSelected`);let o=e.sibling;o&&o.footer&&o.__localEventService&&o.dispatchRowEvent(`rowSelected`);let s=e.pinnedSibling;return s?.rowPinned&&s.__localEventService&&s.dispatchRowEvent(`rowSelected`),this.eventSvc.dispatchEvent({...qbe(e,this.gos,`rowSelected`),event:n||null,source:r}),!0}isCellCheckboxSelection(e,t){let n=this.gos.get(`rowSelection`);if(n&&typeof n!=`string`){let r=Cq(e)&&zK(n);return e.isColumnFunc(t,r)}return e.isColumnFunc(t,e.colDef.checkboxSelection)}inferNodeSelections(e,t,n,r){let{gos:i,selectionCtx:a}=this,o=e.isSelected(),s=ZK(i),c=hye(i),l=gye(i),u=this.isMultiSelect(),d=r===`rowClicked`;if(d&&!(c||l))return null;if(t&&n&&u){let t=a.getRoot();if(!t)return null;if(t.isSelected()){let t=a.isInRange(e)?a.truncate(e):a.extend(e,s);return{deselect:t.discard,select:t.keep,reset:!1}}return{select:[],deselect:a.extend(e,s).keep,reset:!1}}if(t&&u){let t=a.selectAll?this.beans.rowModel.getRow(0):void 0,n=a.getRoot(t),r=a.isInRange(e)?a.truncate(e):a.extend(e,s);return{select:r.keep,deselect:r.discard,reset:a.selectAll||!(!n||n.isSelected())}}if(n){if(d){let t=!o;return t&&!c||!t&&!l?null:(a.setRoot(e),{node:e,newValue:t,clearSelection:!1})}return a.setRoot(e),{node:e,newValue:!o,clearSelection:!u}}{a.setRoot(e);let t=_ye(i),n=YK(i)===`filteredDescendants`,r=d&&(!t||!c);if(n&&o===void 0&&xK(i))return{node:e,newValue:!1,checkFilteredNodes:!0,clearSelection:!u||r};if(d){let n=o?!t:c;return n===o&&!r||n&&!c||!n&&!l?null:{node:e,newValue:n,clearSelection:!u||r,keepDescendants:e.group&&s}}return{node:e,newValue:!o,clearSelection:!u||r}}}},OPe=class extends DPe{constructor(){super(...arguments),this.beanName=`selectionSvc`,this.selectedNodes=new Map,this.detailSelection=new Map,this.masterSelectsDetail=!1}postConstruct(){super.postConstruct();let{gos:e}=this;this.mode=qK(e),this.groupSelectsDescendants=ZK(e),this.groupSelectsFiltered=YK(e)===`filteredDescendants`,this.masterSelectsDetail=QK(e)===`detail`,this.addManagedPropertyListeners([`groupSelectsChildren`,`groupSelectsFiltered`,`rowSelection`],()=>{let t=ZK(e),n=qK(e),r=YK(e)===`filteredDescendants`;this.masterSelectsDetail=QK(e)===`detail`,(t!==this.groupSelectsDescendants||r!==this.groupSelectsFiltered||n!==this.mode)&&(this.deselectAllRowNodes({source:`api`}),this.groupSelectsDescendants=t,this.groupSelectsFiltered=r,this.mode=n)}),this.addManagedEventListeners({rowSelected:this.onRowSelected.bind(this)})}destroy(){super.destroy(),this.resetNodes()}handleSelectionEvent(e,t,n){if(this.isRowSelectionBlocked(t))return 0;let r=this.inferNodeSelections(t,e.shiftKey,e.metaKey||e.ctrlKey,n);if(r==null)return 0;if(this.selectionCtx.selectAll=!1,`select`in r)return r.reset?this.resetNodes():this.selectRange(r.deselect,!1,n),this.selectRange(r.select,!0,n);{let t=r.checkFilteredNodes?W0(r.node):r.newValue;return this.setNodesSelected({nodes:[r.node],newValue:t,clearSelection:r.clearSelection,keepDescendants:r.keepDescendants,event:e,source:n})}}setNodesSelected({newValue:e,clearSelection:t,suppressFinishActions:n,nodes:r,event:i,source:a,keepDescendants:o=!1}){if(r.length===0)return 0;let{gos:s}=this;if(!wK(s)&&e)return gK(132),0;if(r.length>1&&!this.isMultiSelect())return gK(130),0;let c=0;for(let t=0;t<r.length;t++){let n=r[t],o=n.primaryRow;if(o.rowPinned&&!UQ(o)){gK(59);continue}if(o.id===void 0){gK(60);continue}e&&n.destroyed||(this.groupSelectsFiltered&&o.group&&!s.get(`treeData`)||this.selectRowNode(o,e,i,a)&&(this.detailSelection.delete(o.id),c++),this.groupSelectsDescendants&&o.childrenAfterGroup?.length&&(c+=this.selectChildren(o,e,a)))}return n||(r.length===1&&a===`api`&&this.selectionCtx.setRoot(r[0].primaryRow),e&&(t||!this.isMultiSelect())&&(c+=this.clearOtherNodes(r[0].primaryRow,o,a)),c>0&&(this.updateGroupsFromChildrenSelections(a),this.dispatchSelectionChanged(a))),c}selectRange(e,t,n){let r=0;return e.forEach(e=>{let i=e.primaryRow;i.group&&this.groupSelectsDescendants||this.selectRowNode(i,t,void 0,n)&&r++}),r>0&&(this.updateGroupsFromChildrenSelections(n),this.dispatchSelectionChanged(n)),r}selectChildren(e,t,n){let r=this.groupSelectsFiltered?e.childrenAfterAggFilter:e.childrenAfterGroup;return r?this.setNodesSelected({newValue:t,clearSelection:!1,suppressFinishActions:!0,source:n,nodes:r}):0}getSelectedNodes(){return Array.from(this.selectedNodes.values())}getSelectedRows(){let e=[];return this.selectedNodes.forEach(t=>t.data&&e.push(t.data)),e}getSelectionCount(){return this.selectedNodes.size}filterFromSelection(e){let t=new Map;this.selectedNodes.forEach((n,r)=>{e(n)&&t.set(r,n)}),this.selectedNodes=t}updateGroupsFromChildrenSelections(e,t){if(!this.groupSelectsDescendants)return!1;let{gos:n,rowModel:r}=this.beans;if(!xK(n,r))return!1;let i=r.rootNode;if(!i)return!1;let a=!1;return j$(i,this.beans.rowModel.hierarchical,t,t=>{if(t!==i){let n=this.calculateSelectedFromChildren(t);a=this.selectRowNode(t,n!==null&&n,void 0,e)||a}}),a}clearOtherNodes(e,t,n){let r=new Map,i=0;return this.selectedNodes.forEach(a=>{let o=a.id==e.id;if((!t||!APe(e,a))&&!o){let e=this.selectedNodes.get(a.id);i+=this.setNodesSelected({nodes:[e],newValue:!1,clearSelection:!1,suppressFinishActions:!0,source:n}),this.groupSelectsDescendants&&a.parent&&r.set(a.parent.id,a.parent)}}),r.forEach(e=>{let t=this.calculateSelectedFromChildren(e);this.selectRowNode(e,t!==null&&t,void 0,n)}),i}onRowSelected(e){let t=e.node;this.groupSelectsDescendants&&t.group||(t.isSelected()?this.selectedNodes.set(t.id,t):this.selectedNodes.delete(t.id))}syncInRowNode(e,t){this.syncInOldRowNode(e,t),this.syncInNewRowNode(e)}createDaemonNode(e){if(!e.id)return;let t=new NJ(this.beans);return t.id=e.id,t.data=e.data,t.__selected=e.__selected,t.level=e.level,t}syncInOldRowNode(e,t){t&&e.id!==t.id&&this.selectedNodes.get(t.id)==e&&this.selectedNodes.set(t.id,t)}syncInNewRowNode(e){this.selectedNodes.has(e.id)?(e.__selected=!0,this.selectedNodes.set(e.id,e)):e.__selected=!1}reset(e){let t=this.getSelectionCount();this.resetNodes(),t&&this.dispatchSelectionChanged(e)}resetNodes(){this.selectedNodes.forEach(e=>{this.selectRowNode(e,!1)}),this.selectedNodes.clear()}getBestCostNodeSelection(){let{gos:e,rowModel:t}=this.beans;if(!xK(e,t))return;let n=t.getTopLevelNodes();if(n===null)return;let r=[];function i(e){for(let t=0,n=e.length;t<n;t++){let n=e[t];n.isSelected()?r.push(n):n.group&&n.childrenAfterGroup&&i(n.childrenAfterGroup)}}return i(n),r}isEmpty(){return this.getSelectionCount()===0}deselectAllRowNodes({source:e,selectAll:t}){let n=xK(this.gos),r=!1,i=t=>{let n=this.selectRowNode(t.primaryRow,!1,void 0,e);r||=n};if(t===`currentPage`||t===`filtered`){if(!n){_K(102);return}this.getNodesToSelect(t).forEach(i)}else this.selectedNodes.forEach(i),this.reset(e);if(this.selectionCtx.selectAll=!1,n&&this.groupSelectsDescendants){let t=this.updateGroupsFromChildrenSelections(e);r||=t}r&&this.dispatchSelectionChanged(e)}getSelectedCounts(e){let t=0,n=0;return this.getNodesToSelect(e).forEach(e=>{this.groupSelectsDescendants&&e.group||(e.isSelected()?t++:e.selectable&&n++)}),{selectedCount:t,notSelectedCount:n}}getSelectAllState(e){let{selectedCount:t,notSelectedCount:n}=this.getSelectedCounts(e);return U0(t,n)??null}hasNodesToSelect(e){return this.getNodesToSelect(e).filter(e=>e.selectable).length>0}getNodesToSelect(e){if(!this.canSelectAll())return[];let t=[],n=e=>t.push(e);if(e===`currentPage`)return this.forEachNodeOnPage(e=>{if(!e.group){n(e);return}if(!e.footer&&!e.expanded){let t=e=>{n(e);let r=e.childrenAfterFilter;if(r)for(let e=0,n=r.length;e<n;++e)t(r[e])};t(e);return}this.groupSelectsDescendants||n(e)}),t;let r=this.beans.rowModel;return e===`filtered`?(r.forEachNodeAfterFilter(n),t):(r.forEachNode(n),t)}forEachNodeOnPage(e){let{pageBounds:t,rowModel:n}=this.beans,r=t.getFirstRow(),i=t.getLastRow();for(let t=r;t<=i;t++){let r=n.getRow(t);r&&e(r)}}selectAllRowNodes(e){let{gos:t,selectionCtx:n}=this;if(!wK(t)){gK(132);return}if(mye(t)&&!JK(t)){gK(130);return}if(!this.canSelectAll())return;let{source:r,selectAll:i}=e,a=!1;if(this.getNodesToSelect(i).forEach(e=>{let t=this.selectRowNode(e.primaryRow,!0,void 0,r);a||=t}),n.selectAll=!0,xK(t)&&this.groupSelectsDescendants){let e=this.updateGroupsFromChildrenSelections(r);a||=e}a&&this.dispatchSelectionChanged(r)}getSelectionState(){return this.isEmpty()?null:Array.from(this.selectedNodes.keys())}setSelectionState(e,t,n){if(e||=[],!Array.isArray(e)){_K(103);return}let r=new Set(e),i=[];this.beans.rowModel.forEachNode(e=>{r.has(e.id)&&i.push(e)}),n&&this.resetNodes(),this.setNodesSelected({newValue:!0,nodes:i,source:t})}canSelectAll(){return xK(this.beans.gos)}updateSelectable(e){let{gos:t,rowModel:n}=this.beans;if(!wK(t))return;let r=`selectableChanged`,i=xK(t)&&this.groupSelectsDescendants,a=[];if(i){let t=n.rootNode;t&&j$(t,n.hierarchical,e,e=>{let t=!1;for(let n of e.childrenAfterGroup)t||=n.selectable,!n.group&&!this.updateRowSelectable(n,!0)&&n.isSelected()&&a.push(n);this.setRowSelectable(e,t,!0)})}else n.forEachNode(e=>{!this.updateRowSelectable(e,!0)&&e.isSelected()&&a.push(e)});a.length&&this.setNodesSelected({nodes:a,newValue:!1,source:r}),!e&&i&&this.updateGroupsFromChildrenSelections?.(r)}updateSelectableAfterGrouping(e){this.updateSelectable(e),this.groupSelectsDescendants&&this.updateGroupsFromChildrenSelections?.(`rowGroupChanged`,e)&&this.dispatchSelectionChanged(`rowGroupChanged`)}refreshMasterNodeState(e,t){if(!this.masterSelectsDetail)return;let n=e.detailNode?.detailGridInfo?.api;if(!n)return;let r=kPe(n);e.isSelected()!==r&&this.selectRowNode(e,r,t,`masterDetail`)&&this.dispatchSelectionChanged(`masterDetail`),r||this.detailSelection.set(e.id,new Set(n.getSelectedNodes().map(e=>e.id)))}setDetailSelectionState(e,t,n){if(this.masterSelectsDetail){if(!JK(t)){gK(269);return}switch(e.isSelected()){case!0:n.selectAll();break;case!1:n.deselectAll();break;case void 0:{let t=this.detailSelection.get(e.id);if(t){let e=[];for(let r of t){let t=n.getRowNode(r);t&&e.push(t)}n.setNodesSelected({nodes:e,newValue:!0,source:`masterDetail`})}break}}}}dispatchSelectionChanged(e){this.eventSvc.dispatchEvent({type:`selectionChanged`,source:e,selectedNodes:this.getSelectedNodes(),serverSideState:null})}};function kPe(e){let t=0,n=0;return e.forEachNode(e=>{e.isSelected()?t++:e.selectable&&n++}),U0(t,n)}function U0(e,t){if(e===0&&t===0)return!1;if(!(e>0&&t>0))return e>0}function APe(e,t){let n=t.parent;for(;n;){if(n===e)return!0;n=n.parent}return!1}function W0(e){let t=e.isSelected()===!1,n=e.childrenAfterFilter?.some(W0)??!1;return t||n}var jPe={moduleName:`RowSelection`,version:aK,rowModels:[`clientSide`,`infinite`,`viewport`],beans:[OPe],dependsOn:[{moduleName:`SharedRowSelection`,version:aK,beans:[fPe],css:[pPe],apiFunctions:{setNodesSelected:mPe,selectAll:hPe,deselectAll:gPe,selectAllFiltered:_Pe,deselectAllFiltered:vPe,selectAllOnCurrentPage:yPe,deselectAllOnCurrentPage:bPe,getSelectedNodes:xPe,getSelectedRows:SPe}}]},MPe=class extends Q{constructor(e,t){super(),this.cellCtrl=e,this.staticClasses=[],this.beans=t,this.column=e.column}setComp(e){this.cellComp=e,this.applyUserStyles(),this.applyCellClassRules(),this.applyClassesFromColDef()}applyCellClassRules(){let{column:e,cellComp:t}=this,n=e.colDef,r=n.cellClassRules,i=this.getCellClassParams(e,n);KQ(this.beans.expressionSvc,r===this.cellClassRules?void 0:this.cellClassRules,r,i,e=>t.toggleCss(e,!0),e=>t.toggleCss(e,!1)),this.cellClassRules=r}applyUserStyles(){let e=this.column,t=e.colDef,n=t.cellStyle;if(!n)return;let r;r=typeof n==`function`?n(this.getCellClassParams(e,t)):n,r&&this.cellComp.setUserStyles(r)}applyClassesFromColDef(){let{column:e,cellComp:t}=this,n=e.colDef,r=this.getCellClassParams(e,n);for(let e of this.staticClasses)t.toggleCss(e,!1);let i=this.beans.cellStyles.getStaticCellClasses(n,r);this.staticClasses=i;for(let e of i)t.toggleCss(e,!0)}getCellClassParams(e,t){let{value:n,rowNode:r}=this.cellCtrl;return eq(this.beans.gos,{value:n,data:r.data,node:r,colDef:t,column:e,rowIndex:r.rowIndex})}},NPe={moduleName:`CellStyle`,version:aK,beans:[class extends Q{constructor(){super(...arguments),this.beanName=`cellStyles`}processAllCellClasses(e,t,n,r){KQ(this.beans.expressionSvc,void 0,e.cellClassRules,t,n,r),this.processStaticCellClasses(e,t,n)}getStaticCellClasses(e,t){let{cellClass:n}=e;if(!n)return[];let r;return r=typeof n==`function`?n(t):n,typeof r==`string`&&(r=[r]),r||[]}createCellCustomStyleFeature(e){return new MPe(e,this.beans)}processStaticCellClasses(e,t,n){this.getStaticCellClasses(e,t).forEach(e=>{n(e)})}}]},PPe={moduleName:`RowStyle`,version:aK,beans:[_De]},FPe={enableBrowserTooltips:!0,tooltipTrigger:!0,tooltipMouseTrack:!0,tooltipShowMode:!0,tooltipInteraction:!0,defaultColGroupDef:!0,suppressAutoSize:!0,skipHeaderOnAutoSize:!0,autoSizeStrategy:!0,components:!0,stopEditingWhenCellsLoseFocus:!0,undoRedoCellEditing:!0,undoRedoCellEditingLimit:!0,excelStyles:!0,cacheQuickFilter:!0,customChartThemes:!0,chartThemeOverrides:!0,chartToolPanelsDef:!0,loadingCellRendererSelector:!0,localeText:!0,keepDetailRows:!0,keepDetailRowsCount:!0,detailRowHeight:!0,detailRowAutoHeight:!0,tabIndex:!0,valueCache:!0,valueCacheNeverExpires:!0,enableCellExpressions:!0,suppressTouch:!0,suppressBrowserResizeObserver:!0,suppressPropertyNamesCheck:!0,debug:!0,dragAndDropImageComponent:!0,overlayComponent:!0,suppressOverlays:!0,loadingOverlayComponent:!0,suppressLoadingOverlay:!0,noRowsOverlayComponent:!0,paginationPageSizeSelector:!0,paginateChildRows:!0,pivotPanelShow:!0,pivotSuppressAutoColumn:!0,suppressExpandablePivotGroups:!0,aggFuncs:!0,allowShowChangeAfterFilter:!0,ensureDomOrder:!0,enableRtl:!0,suppressColumnVirtualisation:!0,suppressMaxRenderedRowRestriction:!0,suppressRowVirtualisation:!0,rowDragText:!0,groupLockGroupColumns:!0,suppressGroupRowsSticky:!0,rowModelType:!0,cacheOverflowSize:!0,infiniteInitialRowCount:!0,serverSideInitialRowCount:!0,maxBlocksInCache:!0,maxConcurrentDatasourceRequests:!0,blockLoadDebounceMillis:!0,serverSideOnlyRefreshFilteredGroups:!0,serverSidePivotResultFieldSeparator:!0,viewportRowModelPageSize:!0,viewportRowModelBufferSize:!0,debounceVerticalScrollbar:!0,suppressAnimationFrame:!0,suppressPreventDefaultOnMouseWheel:!0,scrollbarWidth:!0,icons:!0,suppressRowTransform:!0,gridId:!0,enableGroupEdit:!0,initialState:!0,processUnpinnedColumns:!0,createChartContainer:!0,getLocaleText:!0,getRowId:!0,reactiveCustomComponents:!0,renderingMode:!0,columnMenu:!0,suppressSetFilterByDefault:!0,getDataPath:!0,enableCellSpan:!0,enableFilterHandlers:!0,filterHandlers:!0},G0=`clientSide`,K0=`serverSide`,q0=`infinite`,IPe={onGroupExpandedOrCollapsed:[G0],refreshClientSideRowModel:[G0],isRowDataEmpty:[G0],forEachLeafNode:[G0],forEachNodeAfterFilter:[G0],forEachNodeAfterFilterAndSort:[G0],resetRowHeights:[G0,K0],applyTransaction:[G0],applyTransactionAsync:[G0],flushAsyncTransactions:[G0],getBestCostNodeSelection:[G0],getServerSideSelectionState:[K0],setServerSideSelectionState:[K0],applyServerSideTransaction:[K0],applyServerSideTransactionAsync:[K0],applyServerSideRowData:[K0],retryServerSideLoads:[K0],flushServerSideAsyncTransactions:[K0],refreshServerSide:[K0],getServerSideGroupLevelState:[K0],refreshInfiniteCache:[q0],purgeInfiniteCache:[q0],getInfiniteRowCount:[q0],isLastRowIndexKnown:[q0,K0],expandAll:[G0,K0],collapseAll:[G0,K0],onRowHeightChanged:[G0,K0],setRowCount:[q0,K0],getCacheBlockState:[q0,K0]},LPe={showLoadingOverlay:{version:`v32`,message:'`showLoadingOverlay` is deprecated. Use the grid option "loading"=true instead or setGridOption("loading", true).'},clearRangeSelection:{version:`v32.2`,message:"Use `clearCellSelection` instead."},getInfiniteRowCount:{version:`v32.2`,old:`getInfiniteRowCount()`,new:`getDisplayedRowCount()`},selectAllFiltered:{version:`v33`,old:`selectAllFiltered()`,new:`selectAll("filtered")`},deselectAllFiltered:{version:`v33`,old:`deselectAllFiltered()`,new:`deselectAll("filtered")`},selectAllOnCurrentPage:{version:`v33`,old:`selectAllOnCurrentPage()`,new:`selectAll("currentPage")`},deselectAllOnCurrentPage:{version:`v33`,old:`deselectAllOnCurrentPage()`,new:`deselectAll("currentPage")`}};function RPe(e,t,n){let r=LPe[e];if(r){let{version:n,new:i,old:a,message:o}=r,s=a??e;return(...e)=>{let r=i?`Please use ${i} instead. `:``;return GG(`Since ${n} api.${s} is deprecated. ${r}${o??``}`),t.apply(t,e)}}let i=IPe[e];return i?(...r)=>{let a=n.rowModel.getType();if(!i.includes(a)){KG(`api.${e} can only be called when gridOptions.rowModelType is ${i.join(` or `)}`);return}return t.apply(t,r)}:t}var zPe={detailCellRendererCtrl:`SharedMasterDetail`,dndSourceComp:`DragAndDrop`,fillHandle:`CellSelection`,groupCellRendererCtrl:`GroupCellRenderer`,headerFilterCellCtrl:`ColumnFilter`,headerGroupCellCtrl:`ColumnGroup`,rangeHandle:`CellSelection`,tooltipFeature:`Tooltip`,highlightTooltipFeature:`Tooltip`,tooltipStateManager:`Tooltip`,groupStrategy:`RowGrouping`,treeGroupStrategy:`TreeData`,rowNumberRowResizer:`RowNumbers`,singleCell:`EditCore`,fullRow:`EditCore`,agSetColumnFilterHandler:`SetFilter`,agMultiColumnFilterHandler:`MultiFilter`,agGroupColumnFilterHandler:`GroupFilter`,agNumberColumnFilterHandler:`NumberFilter`,agBigIntColumnFilterHandler:`BigIntFilter`,agDateColumnFilterHandler:`DateFilter`,agTextColumnFilterHandler:`TextFilter`},BPe={expanded:1,contracted:1,"tree-closed":1,"tree-open":1,"tree-indeterminate":1,pin:1,"eye-slash":1,arrows:1,left:1,right:1,group:1,aggregation:1,pivot:1,"not-allowed":1,chart:1,cross:1,cancel:1,tick:1,first:1,previous:1,next:1,last:1,linked:1,unlinked:1,"color-picker":1,loading:1,menu:1,"menu-alt":1,filter:1,"filter-add":1,columns:1,maximize:1,minimize:1,copy:1,cut:1,paste:1,grip:1,save:1,csv:1,excel:1,"small-down":1,"small-left":1,"small-right":1,"small-up":1,asc:1,desc:1,aasc:1,adesc:1,none:1,up:1,down:1,plus:1,minus:1,settings:1,"checkbox-checked":1,"checkbox-indeterminate":1,"checkbox-unchecked":1,"radio-button-on":1,"radio-button-off":1,eye:1,"column-arrow":1,"un-pin":1,"pinned-top":1,"pinned-bottom":1,"chevron-up":1,"chevron-down":1,"chevron-left":1,"chevron-right":1,edit:1},VPe={chart:`MenuCore`,cancel:`EnterpriseCore`,first:`Pagination`,previous:`Pagination`,next:`Pagination`,last:`Pagination`,linked:`IntegratedCharts`,loadingMenuItems:`MenuCore`,unlinked:`IntegratedCharts`,menu:`ColumnHeaderComp`,legacyMenu:`ColumnMenu`,filter:`ColumnFilter`,filterActive:`ColumnFilter`,filterAdd:`NewFiltersToolPanel`,filterCardCollapse:`NewFiltersToolPanel`,filterCardExpand:`NewFiltersToolPanel`,filterCardEditing:`NewFiltersToolPanel`,filterTab:`ColumnMenu`,filtersToolPanel:`FiltersToolPanel`,columns:[`MenuCore`],columnsToolPanel:[`ColumnsToolPanel`],maximize:`EnterpriseCore`,minimize:`EnterpriseCore`,save:`MenuCore`,columnGroupOpened:`ColumnGroupHeaderComp`,columnGroupClosed:`ColumnGroupHeaderComp`,accordionOpen:`EnterpriseCore`,accordionClosed:`EnterpriseCore`,accordionIndeterminate:`EnterpriseCore`,columnSelectClosed:[`ColumnsToolPanel`,`ColumnMenu`],columnSelectOpen:[`ColumnsToolPanel`,`ColumnMenu`],columnSelectIndeterminate:[`ColumnsToolPanel`,`ColumnMenu`],columnMovePin:`SharedDragAndDrop`,columnMoveHide:`SharedDragAndDrop`,columnMoveMove:`SharedDragAndDrop`,columnMoveLeft:`SharedDragAndDrop`,columnMoveRight:`SharedDragAndDrop`,columnMoveGroup:`SharedDragAndDrop`,columnMoveValue:`SharedDragAndDrop`,columnMovePivot:`SharedDragAndDrop`,dropNotAllowed:`SharedDragAndDrop`,ensureColumnVisible:[`ColumnsToolPanel`,`ColumnMenu`],groupContracted:`GroupCellRenderer`,groupExpanded:`GroupCellRenderer`,setFilterGroupClosed:`SetFilter`,setFilterGroupOpen:`SetFilter`,setFilterGroupIndeterminate:`SetFilter`,setFilterLoading:`SetFilter`,close:`EnterpriseCore`,check:`MenuItem`,colorPicker:`CommunityCore`,groupLoading:`LoadingCellRenderer`,overlayLoading:`Overlay`,overlayExporting:`Overlay`,menuAlt:`ColumnHeaderComp`,menuPin:`MenuCore`,menuValue:`MenuCore`,menuAddRowGroup:[`MenuCore`,`ColumnsToolPanel`],menuRemoveRowGroup:[`MenuCore`,`ColumnsToolPanel`],clipboardCopy:`MenuCore`,clipboardCut:`MenuCore`,clipboardPaste:`MenuCore`,pivotPanel:[`ColumnsToolPanel`,`RowGroupingPanel`],rowGroupPanel:[`ColumnsToolPanel`,`RowGroupingPanel`],valuePanel:`ColumnsToolPanel`,columnDrag:`EnterpriseCore`,rowDrag:[`RowDrag`,`DragAndDrop`],csvExport:`MenuCore`,excelExport:`MenuCore`,smallDown:`CommunityCore`,selectOpen:`CommunityCore`,richSelectOpen:`RichSelect`,richSelectRemove:`RichSelect`,richSelectLoading:`RichSelect`,smallLeft:`CommunityCore`,smallRight:`CommunityCore`,subMenuOpen:`MenuItem`,subMenuOpenRtl:`MenuItem`,panelDelimiter:`RowGroupingPanel`,panelDelimiterRtl:`RowGroupingPanel`,smallUp:`CommunityCore`,sortAscending:[`MenuCore`,`Sort`],sortDescending:[`MenuCore`,`Sort`],sortAbsoluteAscending:[`MenuCore`,`Sort`],sortAbsoluteDescending:[`MenuCore`,`Sort`],sortUnSort:[`MenuCore`,`Sort`],advancedFilterBuilder:`AdvancedFilter`,advancedFilterBuilderDrag:`AdvancedFilter`,advancedFilterBuilderInvalid:`AdvancedFilter`,advancedFilterBuilderMoveUp:`AdvancedFilter`,advancedFilterBuilderMoveDown:`AdvancedFilter`,advancedFilterBuilderAdd:`AdvancedFilter`,advancedFilterBuilderRemove:`AdvancedFilter`,advancedFilterBuilderSelectOpen:`AdvancedFilter`,chartsMenu:`IntegratedCharts`,chartsMenuEdit:`IntegratedCharts`,chartsMenuAdvancedSettings:`IntegratedCharts`,chartsMenuAdd:`IntegratedCharts`,chartsColorPicker:`IntegratedCharts`,chartsThemePrevious:`IntegratedCharts`,chartsThemeNext:`IntegratedCharts`,chartsDownload:`IntegratedCharts`,checkboxChecked:`CommunityCore`,checkboxIndeterminate:`CommunityCore`,checkboxUnchecked:`CommunityCore`,radioButtonOn:`CommunityCore`,radioButtonOff:`CommunityCore`,rowPin:`PinnedRow`,rowUnpin:`PinnedRow`,rowPinBottom:`PinnedRow`,rowPinTop:`PinnedRow`},HPe=new Set([`colorPicker`,`smallUp`,`checkboxChecked`,`checkboxIndeterminate`,`checkboxUnchecked`,`radioButtonOn`,`radioButtonOff`,`smallDown`,`smallLeft`,`smallRight`]),UPe=class extends Q{constructor(){super(...arguments),this.beanName=`validation`}wireBeans(e){this.gridOptions=e.gridOptions,eye(SOe)}warnOnInitialPropertyUpdate(e,t){e===`api`&&FPe[t]&&gK(22,{key:t})}processGridOptions(e){this.processOptions(e,bEe())}validateApiFunction(e,t){return RPe(e,t,this.beans)}missingUserComponent(e,t,n,r){let i=mQ[t];i?this.gos.assertModuleRegistered(i,`AG Grid '${e}' component: ${t}`):gK(101,{propertyName:e,componentName:t,agGridDefaults:n,jsComps:r})}missingDynamicBean(e){let t=zPe[e];return t?yK(200,{...this.gos.getModuleErrorParams(),moduleName:t,reasonOrId:e}):void 0}checkRowEvents(e){GPe.has(e)&&gK(10,{eventType:e})}validateIcon(e){if(HPe.has(e)&&gK(43,{iconName:e}),BPe[e])return;let t=VPe[e];if(t){_K(200,{reasonOrId:`icon '${e}'`,moduleName:t,gridScoped:nK(),gridId:this.beans.context.getId(),rowModelType:this.gos.get(`rowModelType`),additionalText:`Alternatively, use the CSS icon name directly.`});return}gK(134,{iconName:e})}isProvidedUserComp(e){return!!mQ[e]}validateColDef(e){this.processOptions(e,lEe())}processOptions(e,t){let{validations:n,deprecations:r,allProperties:i,propertyExceptions:a,objectName:o,docsUrl:s}=t;i&&this.gridOptions.suppressPropertyNamesCheck!==!0&&this.checkProperties(e,[...a??[],...Object.keys(r)],i,o,s);let c=new Set;if(Object.keys(e).forEach(t=>{let i=r[t];if(i){let{message:e,version:n}=i;c.add(`As of v${n}, ${String(t)} is deprecated. ${e??``}`)}let a=e[t];if(a==null||a===!1)return;let o=n[t];if(!o)return;let{dependencies:s,validate:l,supportedRowModels:u,expectedType:d}=o;if(d){let e=typeof a;if(e!==d){c.add(`${String(t)} should be of type '${d}' but received '${e}' (${a}).`);return}}if(u){let e=this.gridOptions.rowModelType??`clientSide`;if(!u.includes(e)){c.add(`${String(t)} is not supported with the '${e}' row model. It is only valid with: ${u.join(`, `)}.`);return}}if(s){let n=this.checkForRequiredDependencies(t,s,e);if(n){c.add(n);return}}if(l){let t=l(e,this.gridOptions,this.beans);if(t){c.add(t);return}}}),c.size>0)for(let e of c)GG(e)}checkForRequiredDependencies(e,t,n){let r=Object.entries(t).filter(([e,t])=>{let r=n[e];return!t.required.includes(r)});return r.length===0?null:r.map(([t,n])=>`'${String(e)}' requires '${t}' to be one of [${n.required.map(e=>e===null?`null`:e===void 0?`undefined`:e).join(`, `)}]. ${n.reason??``}`).join(` 79 `)}checkProperties(e,t,n,r,i){let a=WPe(Object.getOwnPropertyNames(e),[`__ob__`,`__v_skip`,`__metadata__`,...t,...n],n),o=Object.keys(a);for(let e of o){let t=`invalid ${r} property '${e}' did you mean any of these: ${a[e].slice(0,8).join(`, `)}.`;n.includes(`context`)&&(t+=` 80If you are trying to annotate ${r} with application data, use the '${r}.context' property instead.`),GG(t)}o.length>0&&i&&GG(`to see all the valid ${r} properties please check: ${this.beans.frameworkOverrides.getDocLink(i)}`)}};function WPe(e,t,n){let r={},i=e.filter(e=>!t.some(t=>t===e));if(i.length>0)for(let e of i)r[e]=f$({inputValue:e,allSuggestions:n}).values;return r}
80var GPe=new Set([`firstChildChanged`,`lastChildChanged`,`childIndexChanged`]),J0={moduleName:`AllCommunity`,version:aK,dependsOn:[Ske,Hke,rNe,{moduleName:`Validation`,version:aK,beans:[UPe]},cje,lje,uje,dje,fje,pje,mje,sje,WMe,GMe,KMe,qMe,UMe,JMe,YMe,hNe,OOe,NNe,xZ,VOe,HOe,iPe,kke,eCe,BNe,jPe,lOe,NPe,Nke,PPe,lNe,fOe,XNe,Y$,uNe,aPe,$Se,Cke,dPe]},KPe=class{wrap(e,t,n,r){let i=this.createWrapper(e,r);for(let e of t??[])this.createMethod(i,e,!0);for(let e of n??[])this.createMethod(i,e,!1);return i}createMethod(e,t,n){e.addMethod(t,this.createMethodProxy(e,t,n))}createMethodProxy(e,t,n){return function(){return e.hasMethod(t)?e.callMethod(t,arguments):(n&&gK(49,{methodName:t}),null)}}},qPe=class extends aX{constructor(e){super(e,CJ)}},Y0=V.createContext({}),X0=V.createContext(`default`),Z0=(e,t,n,r)=>{if(!e||e.componentFromFramework||t.isDestroyed())return;let i=e.newAgStackInstance(),a,o,s=!1;return i.then(e=>{if(s){t.destroyBean(e);return}a=e,o=a.getGui(),n.appendChild(o),Q0(r,a)}),()=>{s=!0,a&&(o?.remove(),t.destroyBean(a),r&&Q0(r,void 0))}},Q0=(e,t)=>{if(e){if(e instanceof Function)e(t);else{let n=e;n.current=t}}},$0=(...e)=>e.filter(e=>e!=null&&e!==``).join(` `),e2=class e{constructor(...e){this.classesMap={};for(let t of e)this.classesMap[t]=!0}setClass(t,n){if(!!this.classesMap[t]==n)return this;let r=new e;return r.classesMap={...this.classesMap},r.classesMap[t]=n,r}toString(){return Object.keys(this.classesMap).filter(e=>this.classesMap[e]).join(` `)}},t2=e=>typeof e==`function`&&!(e.prototype&&e.prototype.isReactComponent)||typeof e==`object`&&e.$$typeof===(typeof Symbol==`function`&&Symbol.for?Symbol.for(`react.memo`):60115),n2=`19.2.8`.split(`.`)[0],r2=n2===`16`||n2===`17`;function JPe(){return n2===`19`}var i2=!1;function YPe(e){return i2||setTimeout(()=>i2=!1,0),i2=!0,e()}var a2=(e,t)=>
80{!r2&&e&&!i2?ak.flushSync(t):t()},XPe=e=>{r2?e():V.startTransition(e)};function ZPe(e,t,n){return V.useSyncExternalStore?V.useSyncExternalStore(e,t):n}function o2(e,t,n){if(t==null||e==null)return t;if(e===t||t.length===0&&e.length===0)return e;if(n||e.length===0&&t.length>0||e.length>0&&t.length===0)return t;let r=[],i=[],a=new Map,o=new Map;for(let e=0;e<t.length;e++){let n=t[e];o.set(n.instanceId,n)}for(let t=0;t<e.length;t++){let n=e[t];a.set(n.instanceId,n),o.has(n.instanceId)&&r.push(n)}for(let e=0;e<t.length;e++){let n=t[e],r=n.instanceId;a.has(r)||i.push(n)}return r.length===e.length&&i.length===0?e:r.length===0&&i.length===t.length?t:r.length===0?i:i.length===0?r:[...r,...i]}var s2=(0,V.forwardRef)((e,t)=>{let{registry:n,context:r}=(0,V.useContext)(Y0),i=(0,V.useRef)(null),a=(0,V.useRef)(null),o=(0,V.useRef)(null),s=(0,V.useRef)(null),c=(0,V.useRef)(null),l=(0,V.useRef)(),[u,d]=(0,V.useState)(),[f,p]=(0,V.useState)(),[m,h]=(0,V.useState)(),[g,_]=(0,V.useState)(()=>new e2),[v,y]=(0,V.useState)(()=>new e2(`ag-hidden`)),[b,x]=(0,V.useState)(()=>new e2(`ag-hidden`)),[S,C]=(0,V.useState)(()=>new e2(`ag-invisible`));(0,V.useImperativeHandle)(t,()=>({refresh(){return!1}})),(0,V.useLayoutEffect)(()=>Z0(u,r,a.current),[u]);let w=(0,V.useCallback)(t=>{if(i.current=t,!t||r.isDestroyed()){l.current=r.destroyBean(l.current);return}let a={setInnerRenderer:(e,t)=>{d(e),h(t)},setChildCount:e=>p(e),toggleCss:(e,t)=>_(n=>n.setClass(e,t)),setContractedDisplayed:e=>x(t=>t.setClass(`ag-hidden`,!e)),setExpandedDisplayed:e=>y(t=>t.setClass(`ag-hidden`,!e)),setCheckboxVisible:e=>C(t=>t.setClass(`ag-invisible`,!e)),setCheckboxSpacing:e=>C(t=>t.setClass(`ag-group-checkbox-spacing`,e))},u=n.createDynamicBean(`groupCellRendererCtrl`,!0);u&&(l.current=r.createBean(u),l.current.init(a,t,o.current,s.current,c.current,s2,e))},[]),T=(0,V.useMemo)(()=>`ag-cell-wrapper ${g.toString()}`,[g]),E=(0,V.useMemo)(()=>`ag-group-expanded ${v.toString()}`,[v]),D=(0,V.useMemo)(()=>`ag-group-contracted ${b.toString()}`,[b]),O=(0,V.useMemo)(()=>`ag-group-checkbox ${S.toString()}`,[S]),k=u?.componentFromFramework,A=k?u.componentClass:void 0,j=u==null&&m!=null,M=sW(m);return V.createElement(`span`,{className:T,ref:w,...e.colDef?{}:{role:l.current?.getCellAriaRole()}},V.createElement(`span`,{className:E,ref:s}),V.createElement(`span`,{className:D,ref:c}),V.createElement(`span`,{className:O,ref:o}),V.createElement(`span`,{className:`ag-group-value`,ref:a},j?M:k?V.createElement(A,{...u.params}):null),V.createElement(`span`,{className:`ag-group-child-count`},f))}),c2=s2,l2=(0,V.createContext)({setMethods:()=>{}}),QPe=(0,V.memo)(e=>{let{initialProps:t,addUpdateCallback:n,CustomComponentClass:r,setMethods:i}=e,[{key:a,...o},s]=(0,V.useState)(t);return(0,V.useEffect)(()=>{n(e=>s(e))},[]),V.createElement(l2.Provider,{value:{setMethods:i}},V.createElement(r,{key:a,...o}))}),$Pe=0;function u2(){return`agPortalKey_${++$Pe}`}var d2=class{constructor(e,t,n,r){this.portal=null,this.oldPortal=null,this.reactComponent=e,this.portalManager=t,this.componentType=n,this.suppressFallbackMethods=!!r,this.statelessComponent=this.isStateless(this.reactComponent),this.key=u2(),this.portalKey=u2(),this.instanceCreated=this.isStatelessComponent()?Nq.resolve(!1):new Nq(e=>{this.resolveInstanceCreated=e})}getGui(){return this.eParentElement}getRootElement(){return this.eParentElement.firstChild}destroy(){this.componentInstance&&typeof this.componentInstance.destroy==`function`&&this.componentInstance.destroy();let e=this.portal;e&&this.portalManager.destroyPortal(e)}createParentElement(e){let t=this.portalManager.getComponentWrappingElement(),n=document.createElement(t||`div`);return n.classList.add(`ag-react-container`),e.reactContainer=n,n}statelessComponentRendered(){return this.eParentElement.childElementCount>0||this.eParentElement.childNodes.length>0}getFrameworkComponentInstance(){return this.componentInstance}isStatelessComponent(){return this.statelessComponent}getReactComponentName(){return this.reactComponent.name}getMemoType(){return this.hasSymbol()?Symbol.for(`react.memo`):60115}hasSymbol(){return typeof Symbol==`function`&&Symbol.for}isStateless(e){return typeof e==`function`&&!(e.prototype&&e.prototype.isReactComponent)||typeof e==`object`&&e.$$typeof===this.getMemoType()}hasMethod(e){let t=this.getFrameworkComponentInstance();return!!t&&t[e]!=null||this.fallbackMethodAvailable(e)}callMethod(e,t){let n=this.getFrameworkComponentInstance();if(this.isStatelessComponent())return this.fallbackMethod(e,t&&t[0]?t[0]:{});if(!n){setTimeout(()=>this.callMethod(e,t));return}let r=n[e];if(r)return r.apply(n,t);if(this.fallbackMethodAvailable(e))return this.fallbackMethod(e,t&&t[0]?t[0]:{})}addMethod(e,t){this[e]=t}init(e){return this.eParentElement=this.createParentElement(e),this.createOrUpdatePortal(e),new Nq(e=>this.createReactComponent(e))}createOrUpdatePortal(e){this.isStatelessComponent()||(this.ref=e=>{this.componentInstance=e,this.resolveInstanceCreated?.(!0),this.resolveInstanceCreated=void 0},e.ref=this.ref),this.reactElement=this.createElement(this.reactComponent,{...e,key:this.key}),this.portal=(0,ak.createPortal)(this.reactElement,this.eParentElement,this.portalKey)}createElement(e,t){return(0,V.createElement)(e,t)}createReactComponent(e){this.portalManager.mountReactPortal(this.portal,this,e)}rendered(){return this.isStatelessComponent()&&this.statelessComponentRendered()||!(this.isStatelessComponent()||!this.getFrameworkComponentInstance())}refreshComponent(e){this.oldPortal=this.portal,this.createOrUpdatePortal(e),this.portalManager.updateReactPortal(this.oldPortal,this.portal)}fallbackMethod(e,t){let n=this[`${e}Component`];if(!this.suppressFallbackMethods&&n)return n.bind(this)(t)}fallbackMethodAvailable(e){return!this.suppressFallbackMethods&&!!this[`${e}Component`]}};function f2(e,t,n){for(let r of e){let e=t[r];e&&(n[r]=e)}}var p2=class extends d2{constructor(){super(...arguments),this.awaitUpdateCallback=new Nq(e=>{this.resolveUpdateCallback=e}),this.wrapperComponent=QPe}init(e){return this.sourceParams=e,super.init(this.getProps())}addMethod(){}getInstance(){return this.instanceCreated.then(()=>this.componentInstance)}getFrameworkComponentInstance(){return this}createElement(e,t){return super.createElement(this.wrapperComponent,{initialProps:t,CustomComponentClass:e,setMethods:e=>this.setMethods(e),addUpdateCallback:e=>{this.updateCallback=()=>(e(this.getProps()),new Nq(e=>{setTimeout(()=>{e()})})),this.resolveUpdateCallback()}})}setMethods(e){this.providedMethods=e,f2(this.getOptionalMethods(),this.providedMethods,this)}getOptionalMethods(){return[]}getProps(){return{...this.sourceParams,key:this.key,ref:this.ref}}
80refreshProps(){return this.updateCallback?this.updateCallback():new Nq(e=>this.awaitUpdateCallback.then(()=>{this.updateCallback().then(()=>e())}))}},eFe=class extends p2{refresh(e){return this.sourceParams=e,this.refreshProps(),!0}},tFe=class extends p2{refresh(e){this.sourceParams=e,this.refreshProps()}},nFe=class extends p2{constructor(){super(...arguments),this.date=null,this.onDateChange=e=>this.updateDate(e)}getDate(){return this.date}setDate(e){this.date=e,this.refreshProps()}refresh(e){this.sourceParams=e,this.refreshProps()}getOptionalMethods(){return[`afterGuiAttached`,`setInputPlaceholder`,`setInputAriaLabel`,`setDisabled`]}updateDate(e){this.setDate(e),this.sourceParams.onDateChanged()}getProps(){let e=super.getProps();return e.date=this.date,e.onDateChange=this.onDateChange,delete e.onDateChanged,e}},rFe=class extends p2{constructor(){super(...arguments),this.label=``,this.icon=null,this.shake=!1}setIcon(e,t){this.icon=e,this.shake=t,this.refreshProps()}setLabel(e){this.label=e,this.refreshProps()}getProps(){let e=super.getProps(),{label:t,icon:n,shake:r}=this;return e.label=t,e.icon=n,e.shake=r,e}},iFe=class extends p2{constructor(){super(...arguments),this.model=null,this.onModelChange=e=>this.updateModel(e),this.onUiChange=()=>this.sourceParams.filterModifiedCallback(),this.expectingNewMethods=!0,this.hasBeenActive=!1,this.awaitSetMethodsCallback=new Nq(e=>{this.resolveSetMethodsCallback=e})}isFilterActive(){return this.model!=null}doesFilterPass(e){return this.providedMethods.doesFilterPass(e)}getModel(){return this.model}setModel(e){return this.expectingNewMethods=!0,this.model=e,this.hasBeenActive||=this.isFilterActive(),this.refreshProps()}refresh(e){return this.sourceParams=e,this.refreshProps(),!0}afterGuiAttached(e){let t=this.providedMethods;t?t.afterGuiAttached?.(e):this.awaitSetMethodsCallback.then(()=>this.providedMethods?.afterGuiAttached?.(e))}getOptionalMethods(){return[`afterGuiDetached`,`onNewRowsLoaded`,`getModelAsString`,`onAnyFilterChanged`]}setMethods(e){this.expectingNewMethods===!1&&this.hasBeenActive&&this.providedMethods?.doesFilterPass!==e?.doesFilterPass&&setTimeout(()=>{this.sourceParams.filterChangedCallback()}),this.expectingNewMethods=!1,super.setMethods(e),this.resolveSetMethodsCallback(),this.resolveFilterPassCallback?.(),this.resolveFilterPassCallback=void 0}updateModel(e){this.resolveFilterPassCallback?.();let t=new Nq(e=>{this.resolveFilterPassCallback=e});this.setModel(e).then(()=>{t.then(()=>{this.sourceParams.filterChangedCallback()})})}getProps(){let e=super.getProps();return e.model=this.model,e.onModelChange=this.onModelChange,e.onUiChange=this.onUiChange,delete e.filterChangedCallback,e}},aFe=class extends p2{constructor(){super(...arguments),this.awaitSetMethodsCallback=new Nq(e=>{this.resolveSetMethodsCallback=e})}refresh(e){return this.sourceParams=e,this.refreshProps(),!0}afterGuiAttached(e){let t=this.providedMethods;t?t.afterGuiAttached?.(e):this.awaitSetMethodsCallback.then(()=>this.providedMethods?.afterGuiAttached?.(e))}getOptionalMethods(){return[`afterGuiDetached`,`onNewRowsLoaded`,`onAnyFilterChanged`]}setMethods(e){super.setMethods(e),this.resolveSetMethodsCallback()}};function m2(e,t){e.parentFilterInstance(n=>{(n.setModel(t)||Nq.resolve()).then(()=>{e.filterParams.filterChangedCallback()})})}var oFe=class{constructor(e,t){this.floatingFilterParams=e,this.refreshProps=t,this.model=null,this.onModelChange=e=>this.updateModel(e)}getProps(){return{...this.floatingFilterParams,model:this.model,onModelChange:this.onModelChange}}onParentModelChanged(e){this.model=e,this.refreshProps()}refresh(e){this.floatingFilterParams=e,this.refreshProps()}setMethods(e){f2(this.getOptionalMethods(),e,this)}getOptionalMethods(){return[`afterGuiAttached`]}updateModel(e){this.model=e,this.refreshProps(),m2(this.floatingFilterParams,e)}},sFe=class extends p2{constructor(){super(...arguments),this.model=null,this.onModelChange=e=>this.updateModel(e)}onParentModelChanged(e){this.model=e,this.refreshProps()}refresh(e){this.sourceParams=e,this.refreshProps()}getOptionalMethods(){return[`afterGuiAttached`]}
80updateModel(e){this.model=e,this.refreshProps(),m2(this.sourceParams,e)}getProps(){let e=super.getProps();return e.model=this.model,e.onModelChange=this.onModelChange,e}},cFe=class extends p2{refresh(e){this.sourceParams=e,this.refreshProps()}getOptionalMethods(){return[`afterGuiAttached`]}},lFe=class extends p2{refresh(e){return this.sourceParams=e,this.refreshProps(),!0}},uFe=class extends p2{constructor(){super(...arguments),this.active=!1,this.expanded=!1,this.onActiveChange=e=>this.updateActive(e)}setActive(e){this.awaitSetActive(e)}setExpanded(e){this.expanded=e,this.refreshProps()}getOptionalMethods(){return[`select`,`configureDefaults`]}awaitSetActive(e){return this.active=e,this.refreshProps()}updateActive(e){let t=this.awaitSetActive(e);e&&t.then(()=>this.sourceParams.onItemActivated())}getProps(){let e=super.getProps();return e.active=this.active,e.expanded=this.expanded,e.onActiveChange=this.onActiveChange,delete e.onItemActivated,e}},dFe=class extends p2{refresh(e){return this.sourceParams=e,this.refreshProps(),!0}},fFe=class extends p2{constructor(){super(...arguments),this.onStateChange=e=>this.updateState(e)}refresh(e){return this.sourceParams=e,this.refreshProps(),!0}getState(){return this.state}updateState(e){this.state=e,this.refreshProps(),this.sourceParams.onStateUpdated()}getProps(){let e=super.getProps();return e.state=this.state,e.onStateChange=this.onStateChange,e}};function h2(){gK(231)}var pFe=1e3,mFe=class{constructor(e,t,n){this.destroyed=!1,this.portals=[],this.hasPendingPortalUpdate=!1,this.wrappingElement=t||`div`,this.refresher=e,this.maxComponentCreationTimeMs=n||pFe}getPortals(){return this.portals}destroy(){this.destroyed=!0}destroyPortal(e){this.portals=this.portals.filter(t=>t!==e),this.batchUpdate()}getComponentWrappingElement(){return this.wrappingElement}mountReactPortal(e,t,n){this.portals=[...this.portals,e],this.waitForInstance(t,n),this.batchUpdate()}updateReactPortal(e,t){this.portals[this.portals.indexOf(e)]=t,this.batchUpdate()}batchUpdate(){this.hasPendingPortalUpdate||=(setTimeout(()=>{this.destroyed||(this.refresher(),this.hasPendingPortalUpdate=!1)}),!0)}waitForInstance(e,t,n=Date.now()){if(this.destroyed){t(null);return}if(e.rendered())t(e);else{if(Date.now()-n>=this.maxComponentCreationTimeMs&&!this.hasPendingPortalUpdate){a2(!0,()=>this.refresher()),e.rendered()&&t(e);return}window.setTimeout(()=>{this.waitForInstance(e,t,n)})}}},g2=V.createContext([]),_2=V.createContext(void 0);function v2({modules:e,licenseKey:t,children:n}){let r=(0,V.useContext)(g2),i=(0,V.useContext)(_2),a=(0,V.useRef)(e),o=(0,V.useRef)(r),s=(0,V.useRef)([...r,...e]),c=!ZU(o.current,r);c&&(o.current=r);let l=!ZU(a.current,e);l&&(a.current=e),(c||l)&&(s.current=[...o.current,...a.current]);let u=t??i;return V.createElement(g2.Provider,{value:s.current},V.createElement(_2.Provider,{value:u},n))}var hFe=(0,V.memo)(({ctrl:e})=>{let t=e.isAlive(),{context:n}=(0,V.useContext)(Y0),[r,i]=(0,V.useState)(),[a,o]=(0,V.useState)(),s=(0,V.useRef)(),c=(0,V.useRef)(null),l=(0,V.useRef)(null),u=(0,V.useRef)(null),d=(0,V.useRef)(),f=(0,V.useRef)();t&&!f.current&&(f.current=new Kq(()=>c.current));let p=(0,V.useCallback)(t=>{if(c.current=t,!t||!e.isAlive()||n.isDestroyed()){s.current=n.destroyBean(s.current);return}s.current=n.createBean(new gY);let r=()=>{let t=e.getSelectAllGui();t&&(l.current?.insertAdjacentElement(`afterend`,t),s.current.addDestroyFunc(()=>t.remove()))},a={setWidth:e=>{c.current&&(c.current.style.width=e)},toggleCss:(e,t)=>f.current.toggleCss(e,t),setUserStyles:e=>o(e),setAriaSort:e=>{c.current&&(e?Ave(c.current,e):jve(c.current))},setUserCompDetails:e=>i(e),getUserCompInstance:()=>d.current||void 0,refreshSelectAllGui:r,removeSelectAllGui:()=>e.getSelectAllGui()?.remove()};e.setComp(a,t,l.current,u.current,s.current),r()},[]);(0,V.useLayoutEffect)(()=>Z0(r,n,u.current,d),[r]),(0,V.useEffect)(()=>{e.setDragSource(c.current)},[r]);let m=(0,V.useMemo)(()=>!!(r?.componentFromFramework&&t2(r.componentClass)),[r]),h=r?.componentFromFramework,g=r?.componentClass;return V.createElement(`div`,{ref:p,style:a,className:`ag-header-cell`,role:`columnheader`},V.createElement(`div`,{ref:l,className:`ag-header-cell-resize`,role:`presentation`}),V.createElement(`div`,{ref:u,className:`ag-header-cell-comp-wrapper`,role:`presentation`},h?m?V.createElement(g,{...r.params}):V.createElement(g,{...r.params,ref:d}):null))}),gFe=class{constructor(e,t){this.floatingFilterParams=e,this.refreshPro
80ps=t}getProps(){return this.floatingFilterParams}refresh(e){this.floatingFilterParams=e,this.refreshProps()}setMethods(e){f2(this.getOptionalMethods(),e,this)}getOptionalMethods(){return[`afterGuiAttached`]}},_Fe=(0,V.memo)(({ctrl:e})=>{let{context:t,gos:n}=(0,V.useContext)(Y0),[r,i]=(0,V.useState)(),[a,o]=(0,V.useState)(()=>new e2(`ag-header-cell`,`ag-floating-filter`)),[s,c]=(0,V.useState)(()=>new e2),[l,u]=(0,V.useState)(()=>new e2(`ag-floating-filter-button`,`ag-hidden`)),[d,f]=(0,V.useState)(`false`),[p,m]=(0,V.useState)(),[,h]=(0,V.useState)(1),g=(0,V.useRef)(),_=(0,V.useRef)(null),v=(0,V.useRef)(null),y=(0,V.useRef)(null),b=(0,V.useRef)(null),x=(0,V.useRef)(),S=(0,V.useRef)(),C=e=>{e!=null&&x.current?.(e)},w=(0,V.useCallback)(n=>{if(_.current=n,!n||!e.isAlive()||t.isDestroyed()){g.current=t.destroyBean(g.current);return}g.current=t.createBean(new gY),S.current=new Nq(e=>{x.current=e}),e.setComp({toggleCss:(e,t)=>o(n=>n.setClass(e,t)),setUserStyles:e=>i(e),addOrRemoveBodyCssClass:(e,t)=>c(n=>n.setClass(e,t)),setButtonWrapperDisplayed:e=>{u(t=>t.setClass(`ag-hidden`,!e)),f(e?`false`:`true`)},setWidth:e=>{_.current&&(_.current.style.width=e)},setCompDetails:e=>m(e),getFloatingFilterComp:()=>S.current?S.current:null,setMenuIcon:e=>b.current?.appendChild(e)},n,b.current,v.current,g.current)},[]);(0,V.useLayoutEffect)(()=>Z0(p,t,v.current,C),[p]);let T=(0,V.useMemo)(()=>a.toString(),[a]),E=(0,V.useMemo)(()=>s.toString(),[s]),D=(0,V.useMemo)(()=>l.toString(),[l]),O=(0,V.useMemo)(()=>!!(p&&p.componentFromFramework&&t2(p.componentClass)),[p]),k=(0,V.useMemo)(()=>n.get(`reactiveCustomComponents`),[]),A=(0,V.useMemo)(()=>n.get(`enableFilterHandlers`),[]),[j,M]=(0,V.useState)();(0,V.useEffect)(()=>{if(p?.componentFromFramework){if(k){let e=new(A?gFe:oFe)(p.params,()=>h(e=>e+1));C(e),M(e)}else h2()}},[p]);let ee=j?.getProps(),te=p?.componentFromFramework,ne=p?.componentClass;return V.createElement(`div`,{ref:w,style:r,className:T,role:`gridcell`},V.createElement(`div`,{ref:v,className:E,role:`presentation`},te?k?ee&&V.createElement(l2.Provider,{value:{setMethods:e=>j.setMethods(e)}},V.createElement(ne,{...ee})):V.createElement(ne,{...p.params,ref:O?()=>{}:C}):null),V.createElement(`div`,{ref:y,"aria-hidden":d,className:D,role:`presentation`},V.createElement(`button`,{ref:b,type:`button`,className:`ag-button ag-floating-filter-button-button`,tabIndex:-1})))}),vFe=(0,V.memo)(({ctrl:e})=>{let{context:t}=(0,V.useContext)(Y0),[n,r]=(0,V.useState)(),[i,a]=(0,V.useState)(()=>new e2),[o,s]=(0,V.useState)(()=>new e2),[c,l]=(0,V.useState)(`false`),[u,d]=(0,V.useState)(),[f,p]=(0,V.useState)(),m=(0,V.useRef)(),h=(0,V.useRef)(null),g=(0,V.useRef)(null),_=(0,V.useRef)(null),v=(0,V.useRef)(),y=(0,V.useCallback)(n=>{if(h.current=n,!n||!e.isAlive()||t.isDestroyed()){m.current=t.destroyBean(m.current);return}m.current=t.createBean(new gY),e.setComp({setWidth:e=>{h.current&&(h.current.style.width=e)},toggleCss:(e,t)=>a(n=>n.setClass(e,t)),setUserStyles:e=>r(e),setHeaderWrapperHidden:e=>{let t=_.current;t&&(e?t.style.setProperty(`display`,`none`):t.style.removeProperty(`display`))},setHeaderWrapperMaxHeight:e=>{let t=_.current;t&&(e==null?t.style.removeProperty(`max-height`):t.style.setProperty(`max-height`,`${e}px`),t.classList.toggle(`ag-header-cell-comp-wrapper-limited-height`,e!=null))},setUserCompDetails:e=>p(e),setResizableDisplayed:e=>{s(t=>t.setClass(`ag-hidden`,!e)),l(e?`false`:`true`)},setAriaExpanded:e=>d(e),getUserCompInstance:()=>v.current||void 0},n,g.current,_.current,m.current)},[]);(0,V.useLayoutEffect)(()=>Z0(f,t,_.current),[f]),(0,V.useEffect)(()=>{h.current&&e.setDragSource(h.current)},[f]);let b=(0,V.useMemo)(()=>!!(f?.componentFromFramework&&t2(f.componentClass)),[f]),x=(0,V.useMemo)(()=>`ag-header-group-cell `+i.toString(),[i]),S=(0,V.useMemo)(()=>`ag-header-cell-resize `+o.toString(),[o]),C=f?.componentFromFramework,w=f?.componentClass;return V.createElement(`div`,{ref:y,style:n,className:x,role:`columnheader`,"aria-expanded":u},V.createElement(`div`,{ref:_,className:`ag-header-cell-comp-wrapper`,role:`presentation`},C?b?V.createElement(w,{...f.params}):V.createElement(w,{...f.params,ref:v}):null),V.createElement(`div`,{ref:g,"aria-hidden":c,className:S}))}),yFe=(0,V.memo)(({ctrl:e})=>{let{gos:t,context:n}=(0,V.useContext)(Y0),{topOffset:r,rowHeight:i}=(0,V.useMemo)(()=>e.getTopAndHeight(),[]),a=(0,V.useMemo)(()=>t.get(`tabIndex`),[]),[o,s]=(0,V.useState)(()=>e.getAriaRowIndex()),c=e.headerRowClass,[l,u]=(0,V.useState)(()=>i+`px`),[d,f]=(0,V.useState)(()=>r+`px`),p=(0,V.useRef)(null),[m,h]=(0,V.useState)(()=>e.getUpdatedHeaderCtrls()),g=(0,V.useRef)(),_=(0,V.useRef)(null),v=(0,V.useCallback)(t=>{if(_.current=t,!t||!e.isAlive()||n.isDestroyed()){g.current=n.destroyBean(g.current);return}g.current=n.createBean(new gY),e.setComp({setHeight:e=>u(e),setTop:e=>f(e),setHeaderCtrls:(e,t,n)=>{let r=p.current,i=o2(r,e,t);i!==r&&(p.current=i,a2(n,()=>h(i)))},setWidth:e=>{_.current&&(_.current.style.width=e)},setRowIndex:e=>{s(e)}},g.current,!1)},[]),y=(0,V.useMemo)(()=>({height:l,top:d}),[l,d]),b=(0,V.useCallback)(t=>{switch(e.type){case`group`:return V.createElement(vFe,{ctrl:t,key:t.
80instanceId});case`filter`:return V.createElement(_Fe,{ctrl:t,key:t.instanceId});default:return V.createElement(hFe,{ctrl:t,key:t.instanceId})}},[]);return V.createElement(`div`,{ref:v,className:c,role:`row`,style:y,tabIndex:a,"aria-rowindex":o},m.map(b))}),y2=(0,V.memo)(({pinned:e})=>{let[t,n]=(0,V.useState)(!0),[r,i]=(0,V.useState)([]),{context:a}=(0,V.useContext)(Y0),o=(0,V.useRef)(null),s=(0,V.useRef)(null),c=(0,V.useRef)(),l=e===`left`,u=e===`right`,d=!l&&!u,f=(0,V.useCallback)(t=>{if(o.current=t,!t||a.isDestroyed()){c.current=a.destroyBean(c.current);return}c.current=a.createBean(new Fxe(e));let r={setDisplayed:n,setCtrls:e=>i(e),setCenterWidth:e=>{s.current&&(s.current.style.width=e)},setViewportScrollLeft:e=>{o.current&&(o.current.scrollLeft=e)},setPinnedContainerWidth:e=>{o.current&&(o.current.style.width=e,o.current.style.minWidth=e,o.current.style.maxWidth=e)}};c.current.setComp(r,o.current)},[]),p=t?``:`ag-hidden`,m=()=>r.map(e=>V.createElement(yFe,{ctrl:e,key:e.instanceId}));return l?V.createElement(`div`,{ref:f,className:`ag-pinned-left-header `+p,"aria-hidden":!t,role:`rowgroup`},m()):u?V.createElement(`div`,{ref:f,className:`ag-pinned-right-header `+p,"aria-hidden":!t,role:`rowgroup`},m()):d?V.createElement(`div`,{ref:f,className:`ag-header-viewport `+p,role:`rowgroup`,tabIndex:-1},V.createElement(`div`,{ref:s,className:`ag-header-container`,role:`presentation`},m())):null}),bFe=(0,V.memo)(()=>{let[e,t]=(0,V.useState)(()=>new e2),[n,r]=(0,V.useState)(),{context:i}=(0,V.useContext)(Y0),a=(0,V.useRef)(null),o=(0,V.useRef)(),s=(0,V.useCallback)(e=>{if(a.current=e,!e||i.isDestroyed()){o.current=i.destroyBean(o.current);return}o.current=i.createBean(new Dxe),o.current.setComp({toggleCss:(e,n)=>t(t=>t.setClass(e,n)),setHeightAndMinHeight:e=>r(e)},e,e)},[]),c=(0,V.useMemo)(()=>`ag-header `+e.toString(),[e]),l=(0,V.useMemo)(()=>({height:n,minHeight:n}),[n]);return V.createElement(`div`,{ref:s,className:c,style:l,role:`presentation`},V.createElement(y2,{pinned:`left`}),V.createElement(y2,{pinned:null}),V.createElement(y2,{pinned:`right`}))}),b2=(e,t)=>{(0,V.useEffect)(()=>{let n=t.current;if(n){let t=n.parentElement;if(t){let r=document.createComment(e);return t.insertBefore(r,n),()=>{r.remove()}}}},[e])},xFe=class{constructor(e,t){this.cellEditorParams=e,this.refreshProps=t,this.instanceCreated=new Nq(e=>{this.resolveInstanceCreated=e}),this.onValueChange=e=>this.updateValue(e),this.value=e.value}getProps(){return{...this.cellEditorParams,initialValue:this.cellEditorParams.value,value:this.value,onValueChange:this.onValueChange}}getValue(){return this.value}refresh(e){this.cellEditorParams=e,this.refreshProps()}setMethods(e){f2(this.getOptionalMethods(),e,this)}getInstance(){return this.instanceCreated.then(()=>this.componentInstance)}setRef(e){this.componentInstance=e,this.resolveInstanceCreated?.(),this.resolveInstanceCreated=void 0}getOptionalMethods(){return[`isCancelBeforeStart`,`isCancelAfterEnd`,`focusIn`,`focusOut`,`afterGuiAttached`,`getValidationErrors`,`getValidationElement`]}updateValue(e){this.value=e,this.refreshProps()}},SFe=e=>{let t=(0,V.useRef)(e),n=(0,V.useRef)(),r=(0,V.useRef)(!1),i=(0,V.useRef)(!1),[,a]=(0,V.useState)(0);r.current&&(i.current=!0),(0,V.useEffect)(()=>(r.current||=(n.current=t.current(),!0),a(e=>e+1),()=>{i.current&&n.current?.()}),[])},x2=(0,V.memo)(e=>{let[t,n]=(0,V.useState)(),r=(0,V.useContext)(Y0),{context:i,popupSvc:a,gos:o,editSvc:s}=r,{editDetails:c,cellCtrl:l,eParentCell:u}=e;return SFe(()=>{let{compDetails:t}=c,r=o.get(`stopEditingWhenCellsLoseFocus`),d,f;if(!i.isDestroyed()){f=i.createBean(s.createPopupEditorWrapper(t.params));let o=f.getGui();if(e.jsChildComp){let t=e.jsChildComp.getGui();t&&o.appendChild(t)}let{column:p,rowNode:m}=l,h={column:p,rowNode:m,type:`popupCellEditor`,eventSource:u,ePopup:o,position:c.popupPosition,keepWithinBounds:!0},g=a?.positionPopupByComponent.bind(a,h),_=a?.addPopup({modal:r,eChild:o,closeOnEsc:!0,closedCallback:e=>{l.onPopupEditorClosed(e)},anchorToElement:u,positionCallback:g,ariaOwns:u});d=_?_.hideFunc:void 0,n(f),e.jsChildComp?.afterGuiAttached?.()}return()=>{d?.(),i.destroyBean(f)}}),(0,V.useLayoutEffect)(()=>()=>{l.isCellFocused()&&t?.getGui().contains(dW(r))&&u.focus({preventScroll:!0})},[t]),t&&e.wrappedContent?(0,ak.createPortal)(e.wrappedContent,t.getGui()):null}),CFe=(e,t,n)=>{let{compProxy:r}=e;n(r);let i=r.getProps(),a=t2(t);return V.createElement(l2.Provider,{value:{setMethods:e=>r.setMethods(e)}},a?V.createElement(t,{...i}):V.createElement(t,{...i,ref:e=>r.setRef(e)}))}
80,S2=(e,t,n)=>e.compProxy?CFe(e,t,n):V.createElement(t,{...e.compDetails.params,ref:n}),wFe=(e,t,n,r,i)=>{let a=e.compDetails,o=a.componentClass,s=a.componentFromFramework&&!e.popup,c=a.componentFromFramework&&e.popup,l=!a.componentFromFramework&&e.popup;return s?S2(e,o,t):c?V.createElement(x2,{editDetails:e,cellCtrl:r,eParentCell:n,wrappedContent:S2(e,o,t)}):l&&i?V.createElement(x2,{editDetails:e,cellCtrl:r,eParentCell:n,jsChildComp:i}):null},C2=(e,t,n,r,i,a,o=!1)=>{let{context:s}=(0,V.useContext)(Y0),c=(0,V.useCallback)(()=>{let e=i.current;if(!e)return;let t=e.getGui();t&&t.parentElement&&t.remove(),s.destroyBean(e),i.current=void 0},[]);(0,V.useEffect)(()=>{let r=e!=null&&!o,s=e?.compDetails&&!e.compDetails.componentFromFramework;if(!(r&&s&&!(t&&n==null))){c();return}let l=e.compDetails;if(i.current){let t=i.current,n=t.refresh!=null&&e.force==0&&t.refresh(l.params);if(n===!0||n===void 0)return;c()}l.newAgStackInstance().then(e=>{if(!e)return;let r=e.getGui();r&&((t?n:a.current).appendChild(r),i.current=e)})},[e,t,r,o]),(0,V.useEffect)(()=>c,[])},TFe=({cellCtrl:e,parent:t})=>{let n=(0,V.useRef)(),r=(0,V.useMemo)(()=>{let{loadingComp:t}=e.getDeferLoadingCellRenderer();return t?{value:void 0,compDetails:t,force:!1}:void 0},[e]);if(C2(r,!1,void 0,1,n,t),r?.compDetails?.componentFromFramework){let e=r.compDetails.componentClass;return V.createElement(e,{...r.compDetails.params})}return V.createElement(V.Fragment,null)},EFe=(0,V.memo)(({cellCtrl:e,printLayout:t,editingCell:n})=>{let{context:r}=(0,V.useContext)(Y0),{column:{colIdSanitised:i},instanceId:a}=e,o=(0,V.useRef)(),[s,c]=(0,V.useState)(()=>e.isCellRenderer()?void 0:{compDetails:void 0,value:e.getValueToDisplay(),force:!1}),[l,u]=(0,V.useState)(),[d,f]=(0,V.useState)(1),[p,m]=(0,V.useState)(),[h,g]=(0,V.useState)(!1),[_,v]=(0,V.useState)(!1),[y,b]=(0,V.useState)(!1),x=(0,V.useRef)(null),[S,C]=(0,V.useState)(),w=(0,V.useMemo)(()=>e.isForceWrapper(),[e]),T=(0,V.useMemo)(()=>e.getCellAriaRole(),[e]),E=(0,V.useRef)(null),D=(0,V.useRef)(null),O=(0,V.useRef)(null),k=(0,V.useRef)(),A=(0,V.useRef)(),j=(0,V.useRef)(),M=(0,V.useRef)([]),ee=(0,V.useRef)(),te=(0,V.useRef)(),[ne,re]=(0,V.useState)(0),ie=(0,V.useCallback)(e=>{te.current=e,re(e=>e+1)},[]),ae=s!=null&&(h||y||_)&&(l==null||!!l.popup),oe=w||ae,se=(0,V.useMemo)(()=>e.getCellValueClass(),[e]),N=(0,V.useCallback)(t=>{if(A.current=t,t){let n=t.isCancelBeforeStart&&t.isCancelBeforeStart();setTimeout(()=>{n?(e.stopEditing(!0),e.focusCell(!0)):(e.cellEditorAttached(),e.enableEditorTooltipFeature(t))})}},[e]),ce=(0,V.useRef)();ce.current||=new Kq(()=>E.current);let le=!!l&&!l.popup;C2(s,oe,te.current,ne,k,E,le);let ue=(0,V.useRef)();(0,V.useLayoutEffect)(()=>{let e=ue.current,t=s;if(ue.current=s,e==null||e.compDetails==null||t==null||t.compDetails==null)return;ee.current?.refreshVisibility();let n=e.compDetails,r=t.compDetails;n.componentClass==r.componentClass&&O.current?.refresh!=null&&O.current.refresh(r.params)!=1&&f(e=>e+1)},[s]),(0,V.useLayoutEffect)(()=>{if(!l||l.compDetails.componentFromFramework||r.isDestroyed())return;let t=l.compDetails,n=l.popup===!0,i=t.newAgStackInstance();return i.then(e=>{if(!e)return;let t=e.getGui();N(e),n||((w?j:E).current?.appendChild(t),e.afterGuiAttached?.()),C(e)}),()=>{i.then(t=>{let n=t.getGui();e.disableEditorTooltipFeature(),r.destroyBean(t),N(void 0),C(void 0),n?.remove()})}},[l]);let de=(0,V.useCallback)(t=>{if(j.current=t,!t||r.isDestroyed()||!e.isAlive()){let e=M.current;M.current=[];for(let t of e)t();return}let n,i=e=>{e&&(t.insertAdjacentElement(`afterbegin`,e.getGui()),M.current.push(()=>{JW(e.getGui()),r.destroyBean(e),ee.current===n&&(ee.current=void 0)}))};h&&i(e.createSelectionCheckbox()),y&&i(e.createDndSource()),_&&(n=e.createRowDragComp(),ee.current=n,n&&(i(n),n.refreshVisibility()))},[e,r,y,_,h]),fe=(0,V.useCallback)(()=>{let i=!e.isCellSpanning()||D.current,a=E.current;if(!a||!i||!e||!e.isAlive()||r.isDestroyed()){o.current=r.destroyBean(o.current);return}o.current=r.createBean(new gY);let s={toggleCss:(e,t)=>ce.current.toggleCss(e,t),setUserStyles:e=>m(e),getFocusableElement:()=>E.current,setIncludeSelection:e=>g(e),setIncludeRowDrag:e=>v(e),setIncludeDndSource:e=>b(e),setRowResizerElement:e=>{x.current&&JW(x.current),x.current=e,e&&E.current&&E.current.appendChild(e)},getCellEditor:()=>A.current??null,getCellRenderer:()=>O.current??k.current,getParentOfValue:()=>te.current??j.current??E.current,setRenderDetails:(t,n,r)=>{let i=()=>{c(e=>
80e?.compDetails!==t||e?.value!==n||e?.force!==r?{value:n,compDetails:t,force:r}:e)};if(t?.params?.deferRender&&!e.rowNode.group){let{loadingComp:t,onReady:n}=e.getDeferLoadingCellRenderer();if(t){c({value:void 0,compDetails:t,force:!1}),n.then(()=>XPe(i));return}}i()},setEditDetails:(t,n,r,i)=>{if(t){let e;t.componentFromFramework&&(i?e=new xFe(t.params,()=>f(e=>e+1)):h2()),u({compDetails:t,popup:n,popupPosition:r,compProxy:e}),n||c(void 0)}else e.hasBrowserFocus()&&s.getFocusableElement().focus({preventScroll:!0}),A.current=void 0,u(void 0)},refreshEditStyles:(e,t)=>{if(!E.current)return;let{current:n}=ce;n.toggleCss(`ag-cell-value`,!oe),n.toggleCss(`ag-cell-inline-editing`,!!e&&!t),n.toggleCss(`ag-cell-popup-editing`,!!e&&!!t),n.toggleCss(`ag-cell-not-inline-editing`,!e||!!t)}},l=j.current||void 0;e.setComp(s,a,D.current??void 0,l,t,n,o.current)},[]),pe=(0,V.useCallback)(e=>{E.current=e,fe()},[]),me=(0,V.useCallback)(e=>{D.current=e,fe()},[]),he=(0,V.useMemo)(()=>!!(s?.compDetails?.componentFromFramework&&t2(s.compDetails.componentClass)),[s]);(0,V.useLayoutEffect)(()=>{if(!E.current)return;let{current:e}=ce;e.toggleCss(`ag-cell-value`,!oe),e.toggleCss(`ag-cell-inline-editing`,!!l&&!l.popup),e.toggleCss(`ag-cell-popup-editing`,!!l&&!!l.popup),e.toggleCss(`ag-cell-not-inline-editing`,!l||!!l.popup)});let ge=()=>{let{compDetails:t,value:n}=s;if(!t)return n?.toString?.()??n;if(t.componentFromFramework){let n=t.componentClass;return V.createElement(V.Suspense,{fallback:V.createElement(TFe,{cellCtrl:e,parent:E})},he?V.createElement(n,{...t.params,key:d}):V.createElement(n,{...t.params,key:d,ref:O}))}},_e=()=>{let t=()=>s==null?null:oe?V.createElement(`span`,{role:`presentation`,id:`cell-${a}`,className:se,ref:ie},ge()):ge(),n=t=>wFe(t,N,E.current,e,S);return l==null?t():l.popup?V.createElement(V.Fragment,null,t(),n(l)):n(l)},ve=()=>V.createElement(`div`,{ref:pe,style:p,role:T,"col-id":i},oe?V.createElement(`div`,{className:`ag-cell-wrapper`,role:`presentation`,ref:de},_e()):_e());return e.isCellSpanning()?V.createElement(`div`,{ref:me,className:`ag-spanned-cell-wrapper`,role:`presentation`},ve()):ve()}),w2=(0,V.memo)(({rowCtrl:e,containerType:t})=>{let{context:n,gos:r,editSvc:i}=(0,V.useContext)(Y0),a=(0,V.useContext)(X0)==="default",o=(0,V.useRef)(),s=(0,V.useRef)(e.getDomOrder()),c=e.isFullWidth(),l=e.rowNode.dis
80played,[u,d]=(0,V.useState)(()=>l?e.rowNode.getRowIndexString():null),[f,p]=(0,V.useState)(()=>e.rowId),[m,h]=(0,V.useState)(()=>e.businessKey),[g,_]=(0,V.useState)(()=>e.rowStyles),v=(0,V.useRef)(null),[y,b]=(0,V.useState)(()=>null),[x,S]=(0,V.useState)(),[C,w]=(0,V.useState)(()=>l?e.getInitialRowTop(t):void 0),[T,E]=(0,V.useState)(()=>l?e.getInitialTransform(t):void 0),D=(0,V.useRef)(null),O=(0,V.useRef)(),k=(0,V.useRef)(),A=(0,V.useRef)(!1),[j,M]=(0,V.useState)(0);(0,V.useEffect)(()=>{if(A.current||!x||j>10)return;let t=D.current?.firstChild;t?(e.setupDetailRowAutoHeight(t),A.current=!0):M(e=>e+1)},[x,j]);let ee=(0,V.useRef)();ee.current||=new Kq(()=>D.current);let te=(0,V.useRef)(()=>{}),ne=ZPe((0,V.useCallback)(e=>(te.current=e,()=>{te.current=()=>{}}),[]),()=>v.current,[]),re=a?ne:y,ie=(0,V.useCallback)(r=>{if(D.current=r,o.current=r?n.createBean(new gY):n.destroyBean(o.current),!r){e.unsetComp(t);return}if(!e.isAlive()||n.isDestroyed())return;let i={setTop:w,setTransform:E,toggleCss:(e,t)=>ee.current.toggleCss(e,t),setDomOrder:e=>s.current=e,setRowIndex:d,setRowId:p,setRowBusinessKey:h,setUserStyles:_,setCellCtrls:(e,t)=>{let n=v.current,r=o2(n,e,s.current);r!==n&&(v.current=r,a?te.current():a2(t,()=>b(r)))},showFullWidth:e=>{k.current=e.params,S(e)},getFullWidthCellRenderer:()=>O.current,getFullWidthCellRendererParams:()=>k.current,refreshFullWidth:e=>{let t=e();return k.current=t,ce.current?(S(e=>({...e,params:t})),!0):!O.current||!O.current.refresh?!1:O.current.refresh(t)}};e.setComp(i,r,t,o.current)},[]);(0,V.useLayoutEffect)(()=>Z0(x,n,D.current,O),[x]);let ae=(0,V.useMemo)(()=>{let e={top:C,transform:T};return Object.assign(e,g),e},[C,T,g]),oe=c&&x?.componentFromFramework,se=!c&&re!=null,N=(0,V.useMemo)(()=>!!(x?.componentFromFramework&&t2(x.componentClass)),[x]),ce=(0,V.useRef)(!1);return(0,V.useEffect)(()=>{ce.current=N&&!!x&&!!r.get(`reactiveCustomComponents`)},[N,x]),V.createElement(`div`,{ref:ie,role:`row`,style:ae,"row-index":u,"row-id":f,"row-business-key":m},se?re?.map(t=>V.createElement(EFe,{cellCtrl:t,editingCell:i?.isEditing(t,{withOpenEditor:!0})??!1,printLayout:e.printLayout,key:t.instanceId})):oe?(()=>{let e=x.componentClass;return N?V.createElement(e,{...x.params}):V.createElement(e,{...x.params,ref:O})})():null)}),DFe=(0,V.memo)(({name:e})=>{let{context:t,gos:n}=(0,V.useContext)(Y0),r=(0,V.useMemo)(()=>eX(e),[e]),i=(0,V.useRef)(null),a=(0,V.useRef)(null),o=(0,V.useRef)(null),s=(0,V.useRef)([]),c=(0,V.useRef)([]),[l,u]=(0,V.useState)(()=>[]),d=!!n.get(`enableCellSpan`)&&!!r.getSpannedRowCtrls,f=(0,V.useRef)([]),p=(0,V.useRef)([]),[m,h]=(0,V.useState)(()=>[]),g=(0,V.useRef)(!1),_=(0,V.useRef)(),v=(0,V.useMemo)(()=>$0(`ag-viewport`,QY(e)),[e]),y=(0,V.useMemo)(()=>$0($Y(e)),[e]),b=(0,V.useMemo)(()=>$0(`ag-spanning-container`,Xxe(e)),[e]),x=r.type===`center`||d,S=x?i:a;b2(` AG Row Container `+e+` `,S);let C=(0,V.useCallback)(()=>{let e=!x||i.current!=null,t=a.current!=null,n=!d||o.current!=null;return e&&t&&n},[]),w=(0,V.useCallback)(()=>i.current==null&&a.current==null&&o.current==null,[]),T=(0,V.useCallback)(()=>{if(w()&&(_.current=t.destroyBean(_.current)),!t.isDestroyed()&&C()){let n=e=>{let t=o2(c.current,s.current,g.current);t!==c.current&&(c.current=t,a2(e,()=>u(t)))},r=e=>{let t=o2(p.current,f.current,g.current);t!==p.current&&(p.current=t,a2(e,()=>h(t)))};_.current=t.createBean(new oSe(e)),_.current.setComp({setHorizontalScroll:e=>{i.current&&(i.current.scrollLeft=e)},setViewportHeight:e=>{i.current&&(i.current.style.height=e)},setRowCtrls:({rowCtrls:e,useFlushSync:t})=>{let r=!!t&&s.current.length>0&&e.length>0;s.current=e,n(r)},setSpannedRowCtrls:(e,t)=>{let n=!!t&&f.current.length>0&&e.length>0;f.current=e,r(n)},setDomOrder:e=>{g.current!=e&&(g.current=e,n(!1))},setContainerWidth:e=>{a.current&&(a.current.style.width=e)},setOffsetTop:e=>{a.current&&(a.current.style.transform=`translateY(${e})`)}},a.current,o.current??void 0,i.current)}},[C,w]),E=(0,V.useCallback)(e=>{a.current=e,T()},[T]),D=(0,V.useCallback)(e=>{o.current=e,T()},[T]),O=(0,V.useCallback)(e=>{i.current=e,T()},[T]),k=()=>V.createElement(`div`,{className:y,ref:E,role:x?`presentation`:`rowgroup`},l.map(e=>V.createElement(w2,{rowCtrl:e,containerType:r.type,key:e.instanceId})));return x?V.createElement(`div`,{className:v,ref:O,role:`rowgroup`},k(),d?V.createElement(`div`,{className:b,ref:D,role:`presentation`},m.map(e=>V.createElement(w2,{rowCtrl:e,containerType:r.type,key:e.instanceId}))):null):k()}),OFe=(0,V.memo)(()=>{let e=(0,V.useContext)(Y0),{context:t,overlays:n}=e,[r,i]=(0,V.useState)(``),[a,o]=(0,V.useState)(0),[s,c]=(0,V.useState)(0),[l,u]=(0,V.useState)(`0px`),[d,f]=(0,V.useState)(`0px`),[p,m]=(0,V.useState)(`100%`),[h,g]=(0,V.useState)(`0px`),[_,v]=(0,V.useState)(`0px`),[y,b]=(0,V.useState)(`100%`),[x,S]=(0,V.useState)(!0),[C,w]=(0,V.useState)(!0),[T,E]=(0,V.useState)(null),[D,O]=(0,V.useState)(``),[k,A]=(0,V.useState)(null),[j,M]=(0,V.useState)(`ag-layout-normal`),ee=(0,V.useRef)();ee.current||=new Kq(()=>te.current);let te=(0,V.useRef)(null),ne=(0,V.useRef)(null),re=(0,V.useRef)(null),ie=(0,V.useRef)(null),ae=(0,V.useRef)(null),oe=(0,V.useRef)(null),se=(0,V.useRef)(null),N=(0,V.useRef)([]),ce=(0,V.useRef)([]);b2(` AG Grid Body `,te),b2(` AG Pinned Top `,ne),b2(` AG Sticky Top `,re),b2(` AG Middle `,oe),b2(` AG Pinned Bottom `,se);let le=(0,V.useCallback)(r=>{if(te.current=r,!r||t.isDestroyed()){N.current=t.destroyBeans(N.current);for(let e of ce.current)e();ce.current=[];return}let a=(e,t)=>{e.appendChild(t),ce.current.push(()=>t.remove())},s=e=>{let n=t.createBean(new e);return N.current.push(n),n}
80,l=(e,t,n)=>{a(e,document.createComment(n)),a(e,s(t).getGui())};l(r,Lxe,` AG Fake Horizontal Scroll `);let d=n?.getOverlayWrapperCompClass();d&&l(r,d,` AG Overlay Wrapper `),ae.current&&l(ae.current,zxe,` AG Fake Vertical Scroll `);let p={setRowAnimationCssOnBodyViewport:i,setColumnCount:e=>{te.current&&Ove(te.current,e)},setRowCount:e=>{te.current&&Eve(te.current,e)},setTopHeight:o,setBottomHeight:c,setStickyTopHeight:u,setStickyTopTop:f,setStickyTopWidth:m,setTopInvisible:S,setBottomInvisible:w,setColumnMovingCss:(e,t)=>ee.current.toggleCss(e,t),updateLayoutClasses:M,setAlwaysVerticalScrollClass:E,setPinnedTopBottomOverflowY:O,setCellSelectableCss:(e,t)=>A(t?e:null),setBodyViewportWidth:e=>{oe.current&&(oe.current.style.width=e)},registerBodyViewportResizeListener:t=>{if(oe.current){let n=cG(e,oe.current,t);ce.current.push(()=>n())}},setStickyBottomHeight:g,setStickyBottomBottom:v,setStickyBottomWidth:b,setGridRootRole:e=>r.setAttribute(`role`,e)},h=t.createBean(new uSe);N.current.push(h),h.setComp(p,r,oe.current,ne.current,se.current,re.current,ie.current)},[]),ue=(0,V.useMemo)(()=>$0(`ag-root`,`ag-unselectable`,j),[j]),de=(0,V.useMemo)(()=>$0(`ag-body-viewport`,r,j,T,k),[r,j,T,k]),fe=(0,V.useMemo)(()=>$0(`ag-body`,j),[j]),pe=(0,V.useMemo)(()=>$0(`ag-floating-top`,x?`ag-invisible`:null,k),[k,x]),me=(0,V.useMemo)(()=>$0(`ag-sticky-top`,k),[k]),he=(0,V.useMemo)(()=>$0(`ag-sticky-bottom`,h===`0px`?`ag-invisible`:null,k),[k,h]),ge=(0,V.useMemo)(()=>$0(`ag-floating-bottom`,C?`ag-invisible`:null,k),[k,C]),_e=(0,V.useMemo)(()=>({height:a,minHeight:a,overflowY:D}),[a,D]),ve=(0,V.useMemo)(()=>({height:l,top:d,width:p}),[l,d,p]),ye=(0,V.useMemo)(()=>({height:h,bottom:_,width:y}),[h,_,y]),be=(0,V.useMemo)(()=>({height:s,minHeight:s,overflowY:D}),[s,D]),xe=e=>V.createElement(DFe,{name:e,key:`${e}-container`}),Se=({section:e,children:t,className:n,style:r})=>V.createElement(`div`,{ref:e,className:n,role:`presentation`,style:r},t.map(xe));return V.createElement(`div`,{ref:le,className:ue},V.createElement(bFe,null),Se({section:ne,className:pe,style:_e,children:[`topLeft`,`topCenter`,`topRight`,`topFullWidth`]}),V.createElement(`div`,{className:fe,ref:ae,role:`presentation`},Se({section:oe,className:de,children:[`left`,`center`,`right`,`fullWidth`]})),Se({section:re,className:me,style:ve,children:[`stickyTopLeft`,`stickyTopCenter`,`stickyTopRight`,`stickyTopFullWidth`]}),Se({section:ie,className:he,style:ye,children:[`stickyBottomLeft`,`stickyBottomCenter`,`stickyBottomRight`,`stickyBottomFullWidth`]}),Se({section:se,className:ge,style:be,children:[`bottomLeft`,`bottomCenter`,`bottomRight`,`bottomFullWidth`]}))}),kFe=(0,V.forwardRef)((e,t)=>{let{children:n,eFocusableElement:r,onTabKeyDown:i,gridCtrl:a,forceFocusOutWhenTabGuardsAreEmpty:o,isEmpty:s}=e,{context:c}=(0,V.useContext)(Y0),l=(0,V.useRef)(null),u=(0,V.useRef)(null),d=(0,V.useRef)(),f=e=>{let t=e==null?void 0:parseInt(e,10).toString();for(let e of[l,u])t===void 0?e.current?.removeAttribute(`tabindex`):e.current?.setAttribute(`tabindex`,t)};(0,V.useImperativeHandle)(t,()=>({forceFocusOutOfContainer(e){d.current?.forceFocusOutOfContainer(e)}}));let p=(0,V.useCallback)(()=>{let e=l.current,t=u.current;if(!e&&!t||c.isDestroyed()){d.current=c.destroyBean(d.current);return}if(e&&t){let n={setTabIndex:f};d.current=c.createBean(new qPe({comp:n,eTopGuard:e,eBottomGuard:t,eFocusableElement:r,onTabKeyDown:i,forceFocusOutWhenTabGuardsAreEmpty:o,focusInnerElement:e=>a.focusInnerElement(e),isEmpty:s}))}},[]),m=(0,V.useCallback)(e=>{l.current=e,p()},[p]),h=(0,V.useCallback)(e=>{u.current=e,p()},[p]),g=e=>{let t=e===`top`?iX.TAB_GUARD_TOP:iX.TAB_GUARD_BOTTOM;return V.createElement(`div`,{className:`${iX.TAB_GUARD} ${t}`,role:`presentation`,ref:e===`top`?m:h})};return V.createElement(V.Fragment,null,g(`top`),n,g(`bottom`))}),AFe=(0,V.memo)(kFe),jFe=(0,V.memo)(({context:e})=>{let[t,n]=(0,V.useState)(``),[r,i]=(0,V.useState)(``),[a,o]=(0,V.useState)(null),[s,c]=(0,V.useState)(null),[l,u]=(0,V.useState)(!1),[d,f]=(0,V.useState)(),p=(0,V.useRef)(),m=(0,V.useRef)(null),h=(0,V.useRef)(),[g,_]=(0,V.useState)(null),v=(0,V.useRef)(()=>void 0),y=(0,V.useRef)(),b=(0,V.useRef)([]),x=(0,V.useCallback)(()=>void 0,[]);b2(` AG Grid `,m);let S=(0,V.useCallback)(t=>{if(m.current=t,p.current=t?e.createBean(new hSe):e.destroyBean(p.current),!t||e.isDestroyed())return;let r=p.current;v.current=r.focusInnerElement.bind(r);let a={destroyGridUi:()=>{},setRtlClass:n,forceFocusOutOfContainer:e=>{if(!e&&y.current?.isDisplayed()){y.current.forceFocusOutOfContainer(e);return}h.current?.forceFocusOutOfContainer(e)},updateLayoutClasses:i,getFocusableContainers:()=>{let e=[],t=[],n=m.current?.querySelector(`.ag-root`);for(let n of b.current){if(!n.isDisplayed())continue;let r=n.getFocusableContainerName();if(r===`rowGroupToolbar`||r===`pivotToolbar`){e.push(n);continue}t.push(n)}let r=[...e];return n&&r.push({getGui:()=>n,getFocusableContainerName:()=>`gridBody`}),r.push(...t),r},setCursor:o,setUserSelect:c};r.setComp(a,t,t),u(!0)},[]);(0,V.useEffect)(()=>{let t=p.current,n=m.current;
80if(!d||!t||!g||!n||e.isDestroyed())return;let r=[];b.current=[],y.current=void 0;let{watermarkSelector:i,paginationSelector:a,sideBarSelector:o,statusBarSelector:s,gridHeaderDropZonesSelector:c}=t.getOptionalSelectors(),l=[];if(c){let t=e.createBean(new c.component),i=t.getGui();n.insertAdjacentElement(`afterbegin`,i),l.push(i),r.push(t),b.current.push(...t.getFocusableContainers?.()??[])}if(o){let t=e.createBean(new o.component),n=t.getGui(),i=g.querySelector(`.ag-tab-guard-bottom`);i&&(i.insertAdjacentElement(`beforebegin`,n),l.push(n)),r.push(t),b.current.push(t)}let u=t=>{let i=e.createBean(new t),a=i.getGui();return n.insertAdjacentElement(`beforeend`,a),l.push(a),r.push(i),i};if(s){let e=u(s.component);b.current.push(e)}if(a){let e=u(a.component);y.current=e,b.current.push(e)}return i&&u(i.component),()=>{e.destroyBeans(r),b.current=[],y.current=void 0;for(let e of l)e.remove()}},[d,g,e]);let C=(0,V.useMemo)(()=>$0(`ag-root-wrapper`,t,r),[t,r]),w=(0,V.useMemo)(()=>$0(`ag-root-wrapper-body`,`ag-focus-managed`,r),[r]),T=(0,V.useMemo)(()=>({userSelect:s??``,WebkitUserSelect:s??``,cursor:a??``}),[s,a]),E=(0,V.useCallback)(e=>{h.current=e,f(e!==null)},[]),D=(0,V.useCallback)(()=>!p.current?.isFocusable(),[]);return V.createElement(`div`,{ref:S,className:C,style:T,role:`presentation`},V.createElement(`div`,{className:w,ref:_,role:`presentation`},l&&g&&!e.isDestroyed()&&V.createElement(Y0.Provider,{value:e.getBeans()},V.createElement(AFe,{ref:E,eFocusableElement:g,onTabKeyDown:x,gridCtrl:p.current,forceFocusOutWhenTabGuardsAreEmpty:!0,isEmpty:D},V.createElement(OFe,null)))))}),MFe=class extends Q{postConstruct(){if(this.beans.colAutosize){let e=this.queueResizeOperationsForTick.bind(this);this.addManagedEventListeners({rowExpansionStateChanged:e,expandOrCollapseAll:e,cellValueChanged:e,rowNodeDataChanged:e,rowDataUpdated:e})}}queueResizeOperationsForTick(){let e=this.beans.colAutosize;e.shouldQueueResizeOperations=!0,setTimeout(()=>{e.processResizeOperations()},0)}areHeaderCellsRendered(){return this.beans.ctrlsSvc.getHeaderRowContainerCtrls().every(e=>e.getAllCtrls().every(e=>e.areCellsRendered()))}areCellsRendered(){return this.beans.rowRenderer.getAllRowCtrls().every(e=>e.isRowRendered()&&e.getAllCellCtrls().every(e=>!!e.eGui))}},NFe=typeof window>`u`?V.useEffect:V.useLayoutEffect,T2={setGridApi:void 0,maxComponentCreationTimeMs:void 0,children:void 0},PFe={gridOptions:void 0,modules:void 0,containerStyle:void 0,className:void 0,passGridApi:void 0,componentWrappingElement:void 0,...T2},E2=new Set(Object.keys(PFe)),FFe=new Set(Object.keys(T2)),D2=e=>{let t=(0,V.useContext)(g2),n=(0,V.useContext)(_2),r=(0,V.useRef)(),i=(0,V.useRef)(null),a=(0,V.useRef)(null),o=(0,V.useRef)([]),s=(0,V.useRef)([]),c=(0,V.useRef)(e),l=(0,V.useRef)(),u=(0,V.useRef)(),d=(0,V.useRef)(!1),[f,p]=(0,V.useState)(void 0),[,m]=(0,V.useState)(0),h=(0,V.useRef)(),g=e=>{let t=i.current?.classList,n=(e=``)=>e.trim().split(/\s+/g).filter(Boolean);if(h.current!==e){for(let e of n(h.current))t?.contains(e)&&t.remove(e);for(let r of n(e))t?.contains(r)||t?.add(r);h.current=e}};NFe(()=>{g(e.className)},[e.className]);let _=(0,V.useCallback)(c=>{if(i.current=c,g(e.className),!c){for(let e of o.current)e();o.current.length=0;return}let f=[...e.modules??[],...t??[]];n&&iK(f)?.setLicenseKey(n),a.current||(a.current=new mFe(()=>m(e=>e+1),e.componentWrappingElement,e.maxComponentCreationTimeMs),o.current.push(()=>{a.current?.destroy(),a.current=null}));let h=Sye(e.gridOptions,e,Object.keys(e).filter(e=>!E2.has(e))),_=new zFe(()=>{if(d.current){let e=()=>l.current?.shouldQueueUpdates()?void 0:s.current.shift(),t=e();for(;t;)t(),t=e()}});l.current=_;let v=new MFe,y={providedBeanInstances:{frameworkCompWrapper:new LFe(a.current,h),renderStatus:v},modules:f,frameworkOverrides:_,setThemeOnGridDiv:!0},b=t=>{p(t),t.createBean(v),o.current.push(()=>{t.destroy()}),t.getBean(`ctrlsSvc`).whenReady({addDestroyFunc:e=>{o.current.push(e)}},()=>{if(t.isDestroyed())return;let n=r.current;n&&e.passGridApi?.(n)})},x=e=>{e.getBean(`ctrlsSvc`).whenReady({addDestroyFunc:e=>{o.current.push(e)}},()=>{for(let e of s.current)e();s.current.length=0,d.current=!0})},S=new TOe;h.gridId??=u.current,r.current=S.create(c,h,b,x,y),o.current.push(()=>{r.current=void 0}),r.current&&(u.current=r.current.getGridId())},[]),v=(0,V.useMemo)(()=>({height:`100%`,...e.containerStyle||{}}),[e.containerStyle]),y=(0,V.useCallback)(e=>{d.current&&!l.current?.shouldQueueUpdates()?e():s.current.push(e)},[]);(0,V.useEffect)(()=>{let t=IFe(c.current,e);c.current=e,y(()=>{r.current&&Cye(t,r.current)})},[e]);let b=!V.useSyncExternalStore||tq(e,`renderingMode`)===`legacy`?`legacy`:`default`;return V.createElement(`div`,{style:v,ref:_},V.createElement(X0.Provider,{value:b},f&&!f.isDestroyed()?V.createElement(jFe,{key:f.instanceId,context:f}):null,a.current?.getPortals()??null))};function IFe(e,t){let n={};for(let r of Object.keys(t)){if(E2.has(r)){FFe.has(r)&&gK(274,{prop:r});continue}let i=t[r];e[r]!==i&&(n[r]=i)}return n}var LFe=class extends KPe{constructor(e,t){super(),this.parent=e,this.gridOptions=t}createWrapper(e,t){let n=this.gridOptions;if(tq(n,`reactiveCustomComponents`)){let r=(e=>{switch(e){case`filter`:return tq(n,`enableFilterHandlers`)?aFe:iFe;case`floatingFilterComponent`:return tq(n,`enableFilterHandlers`)?cFe:sFe;
80case`dateComponent`:return nFe;case`dragAndDropImageComponent`:return rFe;case`loadingOverlayComponent`:case`noRowsOverlayComponent`:case`activeOverlay`:return tFe;case`statusPanel`:return dFe;case`toolPanel`:return fFe;case`menuItem`:return uFe;case`cellRenderer`:return eFe;case`innerHeaderComponent`:return lFe}})(t.name);if(r)return new r(e,this.parent,t)}else switch(t.name){case`filter`:case`floatingFilterComponent`:case`dateComponent`:case`dragAndDropImageComponent`:case`loadingOverlayComponent`:case`noRowsOverlayComponent`:case`activeOverlay`:case`statusPanel`:case`toolPanel`:case`menuItem`:case`cellRenderer`:h2()}let r=!t.cellRenderer&&t.name!==`toolPanel`;return new d2(e,this.parent,t,r)}},RFe=(0,V.forwardRef)((e,t)=>{let n=(0,V.useContext)(Y0),{registry:r,context:i,gos:a,rowModel:o}=n,[s,c]=(0,V.useState)(()=>new e2),[l,u]=(0,V.useState)(()=>new e2),[d,f]=(0,V.useState)(),[p,m]=(0,V.useState)(),h=(0,V.useRef)(),g=(0,V.useRef)(null),_=(0,V.useRef)(),v=(0,V.useMemo)(()=>Qve(e.api.getGridId(),d?.rowModelType??`clientSide`),[e]),y=(0,V.useMemo)(()=>s.toString()+` ag-details-row`,[s]),b=(0,V.useMemo)(()=>l.toString()+` ag-details-grid`,[l]);t&&(0,V.useImperativeHandle)(t,()=>({refresh(){return h.current?.refresh()??!1}})),e.template&&gK(230);let x=(0,V.useCallback)(t=>{if(g.current=t,!t||i.isDestroyed()){h.current=i.destroyBean(h.current),_.current?.();return}let s={toggleCss:(e,t)=>c(n=>n.setClass(e,t)),toggleDetailGridCss:(e,t)=>u(n=>n.setClass(e,t)),setDetailGrid:e=>f(e),setRowData:e=>m(e),getGui:()=>g.current},l=r.createDynamicBean(`detailCellRendererCtrl`,!0);if(l&&(i.createBean(l),l.init(s,e),h.current=l,a.get(`detailRowAutoHeight`))){let r=()=>{if(g.current==null)return;let t=g.current.clientHeight;t!=null&&t>0&&setTimeout(()=>{e.node.setRowHeight(t),(xK(a,o)||SK(a,o))&&o.onRowHeightChanged()},0)};_.current=cG(n,t,r),r()}},[]),S=(0,V.useCallback)(e=>{h.current?.registerDetailWithMaster(e)},[]);return V.createElement(`div`,{className:y,ref:x},d&&V.createElement(D2,{className:b,...d,modules:v,rowData:p,passGridApi:S}))}),zFe=class extends b${constructor(e){super(`react`),this.processQueuedUpdates=e,this.queueUpdates=!1,this.renderingEngine=`react`,this.frameworkComponents={agGroupCellRenderer:c2,agGroupRowRenderer:c2,agDetailCellRenderer:RFe},this.wrapIncoming=(e,t)=>t===`ensureVisible`?YPe(e):e()}frameworkComponent(e){return this.frameworkComponents[e]}isFrameworkComponent(e){if(!e)return!1;let t=e.prototype;return!(t&&`getGui`in t)}getLockOnRefresh(){this.queueUpdates=!0}releaseLockOnRefresh(){this.queueUpdates=!1,this.processQueuedUpdates()}shouldQueueUpdates(){return this.queueUpdates}runWhenReadyAsync(){return JPe()}},O2=class extends V.Component{constructor(){super(...arguments),this.apiListeners=[],this.setGridApi=e=>{this.api=e;for(let t of this.apiListeners)t(e)}}registerApiListener(e){this.apiListeners.push(e)}componentWillUnmount(){this.apiListeners.length=0}render(){return V.createElement(D2,{...this.props,passGridApi:this.setGridApi})}},k2=({label:e,items:t,variant:n=`white`,size:r=`sm`,disabled:i=!1,placement:a=`bottom end`,className:o=``})=>{let[s,c]=(0,V.useState)(!1),l=()=>c(!1),u=(0,H.default)(`flex items-center gap-1.5`,G.buttons.sizes[r],G.buttons.styles[n],sA(r,`button`),{"opacity-50 cursor-not-allowed":i},o);return(0,U.jsxs)(LH,{isOpen:s,onOpenChange:c,children:[(0,U.jsxs)(XB,{className:u,isDisabled:i,children:[e,(0,U.jsx)(IE,{variant:`sm`})]}),(0,U.jsx)(PH,{placement:a,offset:4,children:(0,U.jsx)(`div`,{className:`bg-white border border-black-100 rounded-md shadow-lg py-1 min-w-[160px]`,children:t.map(e=>(0,U.jsxs)(V.Fragment,{children:[e.hasSeparator&&(0,U.jsx)(`div`,{className:`my-1 border-t border-black-100`}),(0,U.jsx)(`button`,{type:`button`,className:(0,H.default)(`flex items-center justify-between gap-4 w-full px-3 py-2 text-gray-900 cursor-pointer select-none hover:bg-gray-50 focus:bg-gray-50 outline-none`,e.className,{"opacity-50 cursor-not-allowed pointer-events-none":e.disabled}),disabled:e.disabled,onClick:()=>e.onClick?.(l),children:e.label})]},e.id))})})]})},A2=({checked:e,onChange:t,disabled:n,className:r,children:i,ariaLabel:a})=>(0,U.jsxs)(W_e,{"aria-label":a,isSelected:e,onChange:t,isDisabled:n,className:(0,H.default)(`group flex items-center gap-2`,`text-sm font-medium text-black`,`data-[disabled]:opacity-50 data-[disabled]:cursor-not-allowed`,r),children:[(0,U.jsx)(`div`,{className:(0,H.default)(`relative inline-flex h-6 w-11 items-center rounded-[99px]`,`transition-colors duration-200 ease-in-out`,`bg-black-300`,`group-data-[selected]:bg-blue-500`,`group-data-[disabled]:bg-indigo-200`,`group-data-[disabled]:cursor-not-allowed`),children:(0,U.jsx)(`span`,{className:(0,H.default)(`inline-block h-4 w-4 transform bg-white rounded-[99px]`,`transition-transform duration-200 ease-in-out`,`translate-x-1`,`group-data-[selected]:translate-x-6`)})}),i&&(0,U.jsx)(`span`,{children:i})]});function BFe(e,t){let n=String(t??``),r=e.match(/^(>=|<=|>|<)(.+)$/);if(!r)return!1;let i=Number(r[2]);if(Number.isNaN(i))return!1;let a=Number(n);if(Number.isNaN(a))return!1;switch(r[1]){case`>`:return a>i;case`<`:return a<i;case`>=`:return a>=i;case`<=`:return a<=i}return!1}function VFe(e,t){return RegExp(`^${e.split(`*`).map(e=>e.replace(/[.+?^${}()|[\]\\]/g,`\\$&`)).join(`.*`)}$`,`i`).test(t)}function HFe(e,t,n){try{return new RegExp(e,t).test(n)}catch{return!1}}function j2(e,t){let n=String(t??``);if(e.match(/^(>=|<=|>|<)(.+)$/))return BFe(e,t);let r=e.match(/^\/(.+)\/([gimsuy]*)$/);return r?HFe(r[1],r[2],n):e.includes(`*`)?VFe(e,n):n.localeCompare(e,void 0,{sensitivity:`base`})===0}function UFe(e){let t=[],n=[];for(let r of e.trim().split(/\s+/))if(r.includes(`:`)){let[e,n]=r.split(`:`,2);t.push({field:e,value:n})}else n.push(r.trim());return{columnFilters:t,quickFilter:n.join(` `)}}var M2=e=>e.trim().replace(/[^a-zA-Z0-9]/g,``).toLowerCase(),WFe=(e,t,n=!1)=>{let r=(0,V.useMemo)(()=>t.reduce((e,t)=>
80{let n=M2(t.field??``);n&&(e[n]=t);let r=M2(t.headerName??``);return r&&(e[r]=t),e},{}),[t]),{columnFilters:i,quickFilter:a}=(0,V.useMemo)(()=>UFe(e),[e]),o=(0,V.useRef)(i);return o.current=i,{columnFilters:i,quickFilter:a,isExternalFilterPresent:()=>o.current.length>0,doesExternalFilterPass:(0,V.useCallback)(e=>!e.data||o.current.every(({field:t,value:i})=>{if(n&&M2(t)===`selected`)return j2(i,e.isSelected());let a=r[M2(t)];return a?j2(i,e.getDataValue(a.field??t)):!1}),[t,o,n])}},GFe=aQ,KFe=()=>(0,U.jsx)(`div`,{className:`flex items-center justify-center h-full pt-12`,children:(0,U.jsx)(SE,{variant:`lg`})}),qFe=({sort:e})=>(0,U.jsxs)(`span`,{className:`ag-sort-indicator-container`,children:[(0,U.jsx)(`span`,{className:(0,H.default)(`ag-sort-indicator-icon ag-sort-ascending-icon`,{"ag-hidden":e!==`asc`}),children:(0,U.jsx)(AD,{variant:`sm`,className:`h-3 w-3`,strokeWidth:`3`,color:`currentColor`})}),(0,U.jsx)(`span`,{className:(0,H.default)(`ag-sort-indicator-icon ag-sort-descending-icon`,{"ag-hidden":e!==`desc`}),children:(0,U.jsx)(jD,{variant:`sm`,className:`h-3 w-3`,strokeWidth:`3`,color:`currentColor`})}),(0,U.jsx)(`span`,{className:(0,H.default)(`ag-sort-indicator-icon ag-sort-none-icon`,{"ag-hidden":e!=null}),children:(0,U.jsx)(RD,{variant:`sm`,className:`h-4 w-4`,strokeWidth:`2`,color:`currentColor`})})]}),N2={theme:GFe,loadingOverlayComponent:KFe,defaultColDef:{autoHeight:!0,sortingOrder:[`asc`,`desc`],unSortIcon:!0,tooltipComponent:({value:e})=>(0,U.jsx)(`div`,{className:`shadow rounded-md break-normal text-sm text-left bg-black text-white px-3 py-2 w-96 transition-none`,children:e}),headerComponent:({displayName:e,column:t,progressSort:n,enableSorting:r})=>{let i=t.getColDef().headerTooltip,[a,o]=(0,V.useState)(t.getSort());(0,V.useEffect)(()=>{let e=()=>o(t.getSort());return t.addEventListener(`sortChanged`,e),()=>t.removeEventListener(`sortChanged`,e)},[t]);let s=e=>{r&&n?.(e.shiftKey)};return(0,U.jsx)(`div`,{className:(0,H.default)(`ag-cell-label-container`,{"ag-header-cell-sorted-asc":a===`asc`,"ag-header-cell-sorted-desc":a===`desc`}),onClick:s,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),s(e))},role:r?`button`:void 0,tabIndex:r?0:void 0,"aria-label":r?`Sort by ${e}`:void 0,children:(0,U.jsxs)(`div`,{className:`ag-header-cell-label`,children:[(0,U.jsx)(`span`,{className:`ag-header-cell-text`,children:e}),i&&(0,U.jsx)(`span`,{className:`ag-header-cell-tooltip-icon`,children:(0,U.jsx)(tD,{variant:`sm`,color:`currentColor`})}),r&&(0,U.jsx)(qFe,{sort:a})]})})},lockPinned:!0},tooltipShowDelay:250,tooltipInteraction:!0,enableCellTextSelection:!0,animateRows:!1,animateColumnResizing:!1,suppressColumnMoveAnimation:!0,suppressDragLeaveHidesColumns:!0,domLayout:`autoHeight`,autoSizeStrategy:{type:`fitCellContents`,scaleUpToFitGridWidth:!0,skipHeader:!0},colResizeDefault:`shift`,onGridSizeChanged:({api:e})=>{e.sizeColumnsToFit()},suppressScrollOnNewData:!0},JFe=(e,t,n)=>e?{rowSelection:e===`multiRow`?{mode:`multiRow`,selectAll:`filtered`}:{mode:`singleRow`},selectionColumnDef:{suppressSizeToFit:!0},...n?{getRowId:({data:e})=>n(e)}:{},onSelectionChanged:({api:e})=>{t&&t(e.getSelectedRows())}}:{},YFe=(e,t,n)=>{if(!t||!n)return;let r=[];e.forEachNode(e=>{e.data&&n(e.data)&&r.push(e)}),e.setNodesSelected({nodes:r,newValue:!0})},P2=({isLoading:e,currentPage:t,totalPages:n,totalResults:r,getPreviousPage:i,getNextPage:a})=>(0,U.jsxs)(`div`,{className:`flex flex-row items-center gap-2 text-gray-500`,children:[(0,U.jsxs)(`div`,{className:`flex items-center gap-2 whitespace-nowrap`,children:[`Page `,t,` of`,` `,(0,U.jsx)(SE,{show:e,className:`inline-block`,variant:`sm`}),!e&&(n||1)]}),(0,U.jsxs)(`div`,{className:`flex flex-row items-center gap-2`,children:[(0,U.jsx)(cA,{variant:`white`,icon:(0,U.jsx)(jE,{color:`#111920`,variant:`sm`}),size:`xs`,disabled:e||t<=1,onClick:e=>{e.preventDefault(),i()}}),(0,U.jsx)(cA,{variant:`white`,icon:(0,U.jsx)(AE,{color:`#111920`,variant:`sm`}),size:`xs`,disabled:e||t>=(n??0),onClick:e=>{e.preventDefault(),a()}}),(0,U.jsx)(`div`,{className:`whitespace-nowrap`,children:(0,U.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,U.jsx)(SE,{show:e,className:`inline-block`,variant:`sm`}),!e&&(r??0),` results`]})})]})]}),F2=({colDefs:e,onVisibilityChange:t})=>{let n=e=>e.colId||e.field,r=(0,V.useMemo)(()=>e.filter(e=>e.hide!==!0&&e.headerName),[e]),[i,a]=(0,V.useState)(r.reduce((e,t)=>
80t.hide===!0?e:{...e,[n(t)]:t.initialHide!==!0},{})),o=(e,n)=>{a(t=>({...t,[e]:n})),t(e,n)};return(0,U.jsx)(k2,{variant:`white`,label:(0,U.jsx)(BE,{color:`#111920`,variant:`sm`}),items:[...r.map((e,t)=>{let r=n(e);return{id:r,label:(0,U.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,U.jsx)(A2,{disabled:t===0,ariaLabel:`Toggle visibility of ${e.headerName}`,checked:i[r],onChange:e=>o(r,e)}),(0,U.jsx)(`span`,{children:e.headerName})]})}})]})},I2=(e,t)=>[e,e?cl(t):t].join(``);function L2({rowData:e,colDefs:t,searchable:n=!0,isLoading:r=!1,className:i,rowSelection:a,onSelectionChanged:o,isRowSelected:s,rowId:c,pageSize:l=25,syncQueryParams:u=!1,queryParamPrefix:d=``,defaultSearch:f}){let p=(0,V.useRef)(null),[m,h]=(0,V.useState)(1),[g,_]=(0,V.useState)(void 0),[v,y]=(0,V.useState)(void 0),[b,x]=(0,V.useState)(f??``),{columnFilters:S,quickFilter:C,isExternalFilterPresent:w,doesExternalFilterPass:T}=WFe(b,t,!!a);(0,V.useEffect)(()=>{p.current?.api&&p.current.api.onFilterChanged()},[S]);let[E,D]=(0,V.useState)(void 0),[O,k]=(0,V.useState)(void 0),[A,j]=Ee(),M=I2(d,`page`),ee=Number.parseInt(A.get(M)||`1`,10),te=I2(d,`sortBy`),ne=A.get(te)||void 0,re=I2(d,`sortDir`),ie=A.get(re),ae=I2(d,`search`),oe=A.get(ae)||``,se=(0,V.useMemo)(()=>{if(!u)return;let e=ee-1,t=ne,n=ie;return{pagination:{page:e,pageSize:l},sort:t&&n?{sortModel:[{colId:t,sort:n}]}:void 0,partialColumnState:!0}},[]),[N,ce]=(0,V.useState)(new Date().getTime().toString());(0,V.useEffect)(()=>{ce(new Date().getTime().toString())},[e.length]),(0,V.useEffect)(()=>{u&&(h(ee),_(ne),y(ie),A.has(ae)&&x(oe))},[]),(0,V.useEffect)(()=>{u&&j(e=>{let t=new URLSearchParams(e);return Object.entries({[M]:m>1?m.toString():``,[te]:g||``,[re]:v||``,[ae]:b===(f??``)?``:b}).forEach(([e,n])=>{n===``?t.delete(e):t.set(e,n.toString())}),t},{replace:!0})},[m,g,v,b]);let le=(e,t)=>{p.current?.api&&(p.current.api.setColumnsVisible([e],t),p.current.api.sizeColumnsToFit())},ue=(0,V.useMemo)(()=>({...N2,...JFe(a,o,c),loading:r,rowData:e,columnDefs:t,suppressHorizontalScroll:r||!e.length,pagination:!0,paginationPageSize:l,suppressPaginationPanel:!0,initialState:se,quickFilterText:C,isExternalFilterPresent:w,doesExternalFilterPass:T,onFirstDataRendered:({api:e})=>{YFe(e,a,s),D(e.getDisplayedRowCount()),k(Math.ceil(e.getDisplayedRowCount()/l)),h(t=>Math.min(Math.max(1,t),Math.ceil(e.getDisplayedRowCount()/l)))},onFilterChanged:({api:e})=>{D(e.getDisplayedRowCount()),k(Math.ceil(e.getDisplayedRowCount()/l))},onPaginationChanged:({api:e,newPage:t})=>{t&&h(e.paginationGetCurrentPage()+1)},onSortChanged:({api:e})=>{let t=e.getColumnState().find(e=>e.sort);t?(_(t.colId),y(t.sort)):(_(void 0),y(void 0))}}),[e,t,r,l,C,a,o,s,c]);return(0,U.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,U.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,U.jsx)(P2,{isLoading:r,currentPage:m,totalPages:O,totalResults:E,getPreviousPage:()=>p.current?.api.paginationGoToPreviousPage(),getNextPage:()=>p.current?.api.paginationGoToNextPage()}),(0,U.jsxs)(`div`,{className:`flex items-center gap-2`,children:[n&&(0,U.jsx)(YH,{search:b,onChange:e=>x(e.target.value),placeholder:`Search...`}),(0,U.jsx)(F2,{colDefs:t,onVisibilityChange:le})]})]}),(0,U.jsx)(v2,{modules:[J0],children:(0,U.jsx)(`div`,{className:(0,H.default)(`min-w-0 w-full h-full ag-theme-aptible`,i),children:(0,U.jsx)(O2,{ref:p,...ue},`${N}-${e.length}`)})}),(O??1)>1&&(0,U.jsx)(P2,{isLoading:r,currentPage:m,totalPages:O,totalResults:E,getPreviousPage:()=>p.current?.api.paginationGoToPreviousPage(),getNextPage:()=>p.current?.api.paginationGoToNextPage()})]})}function R2({rowData:e,colDefs:t,searchable:n=!0,isLoading:r,className:i,page:a,totalPages:o,totalItems:s,onPrev:c,onNext:l,onSearch:u=()=>{},onSort:d}){let f=(0,V.useRef)(null),[p,m]=(0,V.useState)(``),h=e=>{let t=e.target.value;m(t),u(t)},g=(e,t)=>{f.current&&(f.current.api.setColumnsVisible([e],t),f.current.api.sizeColumnsToFit())},_=(0,V.useMemo)(()=>({...N2,loading:r,rowData:e,columnDefs:t,suppressHorizontalScroll:r||!e.length,defaultColDef:{...N2.defaultColDef,...d?{comparator:()=>0}:{}},onSortChanged:({api:e})=>
80{if(!d)return;let t=e.getColumnState().find(e=>e.sort);d(t?{field:t.colId,direction:t.sort}:null)}}),[e,t,r,d]);return(0,U.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,U.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,U.jsx)(P2,{isLoading:r,currentPage:a,totalPages:o,totalResults:s,getPreviousPage:c,getNextPage:l}),(0,U.jsxs)(`div`,{className:`flex items-center gap-2`,children:[n&&(0,U.jsx)(YH,{search:p,onChange:h,placeholder:`Search...`}),(0,U.jsx)(F2,{colDefs:t,onVisibilityChange:g})]})]}),(0,U.jsx)(v2,{modules:[J0],children:(0,U.jsx)(`div`,{className:(0,H.default)(`min-w-0 w-full h-full ag-theme-aptible`,i),children:(0,U.jsx)(O2,{ref:f,..._})})}),(o??1)>1&&(0,U.jsx)(P2,{isLoading:r,currentPage:a,totalPages:o,totalResults:s,getPreviousPage:c,getNextPage:l})]})}var XFe=async e=>{typeof navigator>`u`||navigator.clipboard!==void 0&&await navigator.clipboard.writeText(e)},z2=({text:e,children:t})=>(0,U.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,U.jsx)(`div`,{children:t||e}),(0,U.jsx)(B2,{text:e})]}),B2=({text:e,label:t=`Copy`,successIconOnCopy:n=!1,color:r=`#888C90`,...i})=>{let[a,o]=(0,V.useState)(!1),s=t=>{t.preventDefault(),t.stopPropagation(),XFe(e).then(()=>{o(!0)})};(0,V.useEffect)(()=>{if(!a)return;let e=setTimeout(()=>{o(!1)},1500);return()=>clearTimeout(e)},[a]);let c=n&&a;return(0,U.jsx)(aA,{text:a?`Copied!`:t,...i,fluid:!0,children:c?(0,U.jsx)(UE,{variant:`sm`,className:`active:opacity-50`,color:r,onClick:e=>s(e)}):(0,U.jsx)(iD,{variant:`sm`,className:`active:opacity-50`,color:r,onClick:e=>s(e)})})},V2={pending:`text-brown border-brown bg-orange-100`,error:`text-red border-red-300 bg-red-100`,progress:`text-indigo border-indigo-300 bg-indigo-100`,success:`text-forest border-lime-300 bg-lime-100`},ZFe=Object.fromEntries(Object.entries({default:{border:`border-black-300`,bg:`bg-black-50`,hoverBg:`hover:bg-black-100`,hoverBorder:`hover:border-black-600`},pending:{text:`text-orange-700`,border:`border-orange-500`,bg:`bg-orange-100`,hoverBg:`hover:bg-orange-200`,hoverBorder:`hover:border-orange-600`},progress:{text:`text-indigo-600`,border:`border-indigo`,bg:`bg-indigo-100`,hoverBg:`hover:bg-indigo-150`,hoverBorder:`hover:border-indigo-600`},error:{text:`text-red-400`,border:`border-red-300`,bg:`bg-red-100`,hoverBg:`hover:bg-red-150`,hoverBorder:`hover:border-red-400`},success:{text:`text-lime-700`,border:`border-lime-300`,bg:`bg-lime-100`,hoverBg:`hover:bg-lime-200`,hoverBorder:`hover:border-lime-500`}}).map(([e,t])=>[e,(0,H.default)(t.text,t.border,t.bg,t.hoverBg,t.hoverBorder)])),H2=({children:e,className:t=``,variant:n=`default`,icon:r=null,title:i=``})=>{let a=(0,H.default)(`rounded-full border`,`text-[12px] leading-none font-medium tracking-[0.04em] text-black-500`,`h-[16px] px-[8px] py-[2px] flex gap-[2px] justify-center items-center w-fit`,`[&_svg]:w-[12px] [&_svg]:h-[12px] [&_svg]:stroke-2`,ZFe[n]);return(0,U.jsxs)(`div`,{className:`${a} ${t}`,children:[r,(0,U.jsx)(`div`,{title:i,children:e})]})},QFe=({status:e,from:t})=>{let n=Df(t),r=(0,H.default)(`rounded-full border-2`,`text-sm font-semibold `,`px-2 flex justify-between items-center w-fit`);return e===`running`||e===`queued`?(0,U.jsxs)(`div`,{className:(0,H.default)(r,V2.pending),role:`status`,children:[(0,U.jsx)(BE,{color:`currentColor`,className:`mr-1`,variant:`sm`}),(0,U.jsxs)(`div`,{children:[e===`running`?`Building`:`Queued`,` `,n]})]}):e===`failed`||e===`canceled`?(0,U.jsxs)(`div`,{className:(0,H.default)(r,V2.error),role:`status`,children:[(0,U.jsx)(JE,{color:`currentColor`,variant:`sm`}),(0,U.jsxs)(`div`,{children:[e===`canceled`?`Canceled`:`Failed`,` `,n]})]}):e===`succeeded`?(0,U.jsxs)(`div`,{className:(0,H.default)(r,V2.success),role:`status`,children:[(0,U.jsx)(HE,{color:`currentColor`,className:`mr-1`,variant:`sm`}),`Deployed `,n]}):(0,U.jsxs)(`div`,{className:(0,H.default)(r,V2.progress),role:`status`,children:[(0,U.jsx)(tD,{color:`currentColor`,className:`mr-1`,variant:`sm`}),`Not deployed`]})},$Fe=({value:e})=>(0,U.jsx)(aA,{text:e,fluid:!0,placement:`top`,children:(0,U.jsx)(YU,{className:`text-ellipsis whitespace-nowrap max-w-[30ch] overflow-hidden inline-block`,children:e})}),U2=({label:e,description:t,href:n,tooltip:r,icon:i})=>{let a=(0,U.jsx)(`span`,{children:e});return n&&(a=(0,U.jsx)(P,{to:n,className:G.type[`table link`],children:a})),r&&(a=(0,U.jsx)(aA,{text:r,fluid:!0,children:(0,U.jsx)(`span`,{className:`border-b border-dotted border-gray-400`,children:a})})),(0,U.jsxs)(`div`,{className:`flex flex-row items-center truncate`,children:[i,(0,U.jsxs)(`div`,{className:`flex flex-col flex-grow`,children:[(0,U.jsx)(`div`,{className:G.type.darker,children:a}),t&&(0,U.jsx)(`div`,{className:G.type[`normal lighter`],children:t})]})]})},W2=({id:e,hideIcon:t=!1})=>{let n=B(t=>rf(t,{id:e}));return(0,U.jsx)(U2,{label:n.handle,href:Qi(n.id),icon:t?null:(0,U.jsx)(`img`,{src:`/resource-types/logo-app.png`,className:`w-[32px] h-[32px] mr-2 align-middle`,"aria-label":`App`})})},G2=({id:e,hideIcon:t=!1})=>{let n=B(t=>tu(t,{id:e})),r=B(e=>zl(e,{id:n.stackId}));return(0,U.jsx)(U2,{label:n.handle,description:`${r.organizationId?`Dedicated Stack `:`Shared Stack `}(${r.region})`,href:Na(n.id),icon:t?null:(0,U.jsx)(`img`,{src:`/resource-types/logo-environment.png`,className:`w-[32px] h-[32px] mr-2 align-middle`,"aria-label":`Environment`})})},eIe=({id:e,hideIcon:t=!1})=>{let n=B(t=>zl(t,{id:e})),r=Gl(n),i=`/resource-types/logo-stack.png`;return r===`self_hosted`?i=`/resource-types/logo-aws.png`:r===`dedicated`&&(i=`/resource-types/logo-dedicated-stack.png`),(0,U.jsx)(U2,{label:n.name,description:`${Ql(n)} (${n.region})`,href:Co(n.id),icon:t?null:(0,U.jsx)(`img`,{src:i,className:`w-[32px] h-[32px] mr-2 align-middle`,"aria-label":`Stack`})})},K2=({services:e})=>{let t=Cu(e);return(0,U.jsx)(U2,{label:`${e.length} Service${e.length===1?``:`s`}`,description:`${t.totalMemoryLimit/1024} GB · ${t.totalCPU} CPU`})},q2=({value:e,decimalPlaces:t=2})=>(0,U.jsx)(U2,{label:ub(e,t)}),J2=({value:e,label:t,valueToVariantMap:n})=>(0,U.jsx)(H2,{variant:n[e],children:t||e}),Y2=({date:e})=>(0,U.jsx)(U2,{label:Iie(e),tooltip:Af(e,`local`)}),X2=({db:e})=>(0,U.jsx)(`img`,{src:`/database-types/logo-${e.type}.png`,className:`w-[32px] h-[32px] mr-2 mt-1 align-middle`,"aria-label":`${e.type} Database`}),tIe=({id:e,hideIcon:t=!1})=>{let n=B(t=>lp(t,{id:e})),r=B(e=>ph(e,{id:n.databaseImageId}));return(0,U.jsx)(U2,{label:n.handle,href:ga(n.id),description:r.description,icon:t?null:(0,U.jsx)(X2,{db:n})})},Z2=({id:e,hideIcon:t=!1})=>{let n=B(t=>Eu(t,{id:e})),r=B(e=>rf(e,{id:n.appId})),i=B(e=>lp(e,{id:n.databaseId})),a=n.appId?ta(n.appId,n.id):ga(n.databaseId),o=(0,U.jsx)(`img`,{src:`/resource-types/logo-service.png`,className:`w-[32px] h-[32px] mr-2 align-middle`,"aria-label":`Service`});return i.handle&&(o=(0,U.jsx)(X2,{db:i})),(0,U.jsx)(U2,{label:r.handle?`${r.handle} / ${n.processType}`:n.processType,href:a,icon:t?null:o})},nIe=({id:e})=>{let t=B(t=>Lp(t,{id:e}));return(0,U.jsx)(U2,{label:(0,U.jsxs)(`div`,{className:`flex`,children:[(0,U.jsx)(`span`,{children:Am(t)}),(0,U.jsx)(B2,{text:Am(t),className:`ml-2`})]}),href:wa(t.id),icon:(0,U.jsx)(`img`,{src:`/resource-types/logo-vhost.png`,className:`w-[32px] h-[32px] mr-2 align-middle`,"aria-label":`Endpoint`})})},Q2=({image:e,digest:t,repoUrl:n})=>{let r=t.replace(`sha256:`,``).slice(0,11),i=n||``;return e?(0,U.jsxs)(`div`,{className:`inline-block`,children:[(0,U.jsx)(YU,{children:(0,U.jsx)(wA,{href:i,linkIf:!!i.match(/^https?:\/\//),children:e})}),r&&(0,U.jsxs)(U.Fragment,{children:[` `,`@ `,(0,U.jsxs)(YU,{children:[`sha256:`,r]})]})]}):(0,U.jsx)(`em`,{children:`Unknown`})},$2=({gitRef:e,commitSha:t,commitUrl:n,className:r})=>{let i=t.trim(),a=i.slice(0,7),o=e?.trim()||``,s=n||``,c=(0,V.useMemo)(()=>(0,U.jsx)(YU,{className:`whitespace-nowrap`,children:(0,U.jsxs)(wA,{href:s,linkIf:!!s.match(/^https?:\/\//),children:[(0,U.jsx)(bD,{color:`#595E63`,variant:`sm`,className:`inline mr-1`}),a]})}),[s,a]);return i?(0,U.jsx)(`div`,{className:`inline-block whitespace-nowrap ${r}`,children:o&&i&&o!==i?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(YU,{children:o||a}),` @ `,c]}):c}):(0,U.jsx)(`em`,{children:`Not Provided`})},e4=({message:e})=>
80{if(!e)return(0,U.jsx)(`em`,{children:`Not Provided`});let t=e.trim().split(` 81`)[0];return(0,U.jsx)(`div`,{className:`inline-block`,children:(0,U.jsx)(aA,{text:(0,U.jsx)(`pre`,{className:`overflow-hidden max-w-[150ch] text-ellipsis`,children:e}),fluid:!0,placement:`top`,children:(0,U.jsxs)(`p`,{className:`leading-8 text-ellipsis whitespace-nowrap max-w-[30ch] overflow-hidden inline-block`,children:[t,e.length>t.length?` ...`:``]})})})};function t4({at:e}){return(0,U.jsx)(Y2,{date:e})}function rIe({unknown:e=!1}){return(0,U.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[!e&&(0,U.jsx)(ZE,{variant:`sm`,color:`#E9B64D`,className:`shrink-0`,"aria-hidden":!0}),(0,U.jsx)(`span`,{className:G.type[`table lead text`],children:e?`N/A`:`Never deployed`})]})}var iIe=({app:e})=>(0,U.jsxs)(P,{to:Qi(e.id),className:`flex`,children:[(0,U.jsx)(`img`,{src:`/resource-types/logo-app.png`,className:`w-[32px] h-[32px] mr-2 align-middle`,"aria-label":`App`}),(0,U.jsx)(`p`,{className:`${G.type[`table link`]} leading-8`,children:e.handle})]}),n4={handle:{field:`handle`,headerName:`Handle`,cellRenderer:({data:e})=>(0,U.jsx)(W2,{id:e.id})},id:{field:`id`,headerName:`ID`,sort:`desc`,valueGetter:({data:e})=>Number.parseInt(e?.id||`0`,10)},environment:{field:`envHandle`,headerName:`Environment`,cellRenderer:({data:e})=>(0,U.jsx)(G2,{id:e.environmentId,hideIcon:!0})},services:{field:`totalServices`,headerName:`Services`,cellRenderer:({data:e})=>(0,U.jsx)(K2,{services:e.services})},createdAt:{field:`createdAt`,headerName:`Created At (UTC)`,initialHide:!0,cellRenderer:({data:e})=>(0,U.jsx)(Y2,{date:e.createdAt})},cost:{field:`cost`,headerName:`Est. Monthly Cost`,headerTooltip:` 82 This is an estimate of the cost of running the current resources for 83 one month. It is updated automatically as resources are added or 84 scaled. Please note: it does not represent your actual usage for the 85 month and does not reflect contract discounts, custom rates, or 86 allocations. 87 `,cellRenderer:({data:e})=>(0,U.jsx)(q2,{value:e.cost})},gitRef:{field:`gitRef`,headerName:`Git Ref`,cellRenderer:({data:e})=>(0,U.jsx)($2,{gitRef:e.currentDeployment.gitRef,commitSha:e.currentDeployment.gitCommitSha,commitUrl:e.currentDeployment.gitCommitUrl})},commitMessage:{field:`gitCommitSha`,headerName:`Commit Message`,cellRenderer:({data:e})=>(0,U.jsx)(e4,{message:e.currentDeployment.gitCommitMessage})},dockerImage:{field:`dockerImageName`,headerName:`Docker Image`,cellRenderer:({data:e})=>{u(Xv({id:e.currentImageId}));let t=B(t=>Zv(t,{id:e.currentImageId}));return(0,U.jsx)(Q2,{image:e.currentDeployment.dockerImage||t.dockerRepo,digest:t.dockerRef,repoUrl:e.currentDeployment.dockerRepositoryUrl})}},lastDeployed:{field:`lastDeployed`,headerName:`Last Deploy (UTC)`,cellRenderer:({data:e})=>{let t=I(Cl);return t.isInitialLoading||t.isLoading?(0,U.jsx)(`div`,{className:`flex items-center gap-1.5`,children:(0,U.jsx)(`span`,{className:G.type[`table lead text`],children:`-`})}):e.lastDeployed?(0,U.jsx)(t4,{at:e.lastDeployed}):(0,U.jsx)(rIe,{unknown:!!e?.deletedAt})}},deploymentActions:{field:`id`,headerName:`Actions`,cellRenderer:({data:e})=>(0,U.jsx)(dA,{to:da(e.currentDeployment.id),size:`sm`,variant:`primary`,children:`View`})}},aIe=[n4.handle,n4.id,n4.environment,n4.services,n4.lastDeployed,n4.createdAt,n4.cost],oIe=()=>{let{isLoading:e,isInitialLoading:t}=Er([hf,fu,Ru,Cl]),n=B(e=>uS(e,{}));return(0,U.jsxs)(W,{size:`xl`,children:[(0,U.jsxs)(W,{variant:`horizontal`,className:`items-center justify-between`,children:[(0,U.jsx)(NU,{description:`Apps are how you deploy your code, scale services, and manage endpoints.`,children:`Apps`}),(0,U.jsxs)(dA,{to:Ga(),children:[(0,U.jsx)(qE,{variant:`sm`,className:`mr-2`}),` New App`]})]}),(0,U.jsx)(L2,{rowData:n,syncQueryParams:!0,colDefs:aIe,isLoading:!n.length&&(e||t)})]})},sIe=[n4.handle,n4.id,n4.services,n4.cost],cIe=({envId:e})=>{let{isLoading:t,isInitialLoading:n}=Er([hf,du({id:e}),zu({id:e}),Cl]),r=B(t=>hS(t,{envId:e}));return(0,U.jsxs)(W,{size:`lg`,children:[(0,U.jsx)(`div`,{className:`flex justify-end`,children:(0,U.jsxs)(dA,{to:Qte(e),children:[(0,U.jsx)(qE,{variant:`sm`,className:`mr-2`}),` New App`]})}),(0,U.jsx)(L2,{rowData:r,colDefs:sIe,isLoading:!r.length&&(t||n)})]})},lIe=[n4.handle,n4.id,n4.environment,n4.services,n4.cost],uIe=({certId:e,envId:t})=>{let{isLoading:n,isInitialLoading:r}=Er([hf,du({id:t}),zu({id:t}),Cl]),i=B(n=>pS(n,{certId:e,envId:t}));return(0,U.jsx)(L2,{rowData:i,colDefs:lIe,isLoading:!i.length&&(n||r)})},dIe=[n4.handle,n4.id,n4.environment,n4.services,n4.cost],fIe=({resourceId:e})=>{let{isLoading:t,isInitialLoading:n}=Er([hf,fu]),r=B(t=>mS(t,{resourceId:e}));return(0,U.jsx)(L2,{rowData:r,colDefs:dIe,isLoading:!r.length&&(t||n)})},pIe=[n4.handle,n4.id,n4.gitRef,n4.commitMessage,n4.dockerImage,n4.lastDeployed,n4.deploymentActions],mIe=({s
87ourceId:e})=>{let{isLoading:t,isInitialLoading:n}=u(hf()),r=B(t=>gS(t,{sourceId:e}));return(0,U.jsx)(L2,{rowData:r,colDefs:pIe,isLoading:!r.length&&(t||n)})},hIe=[n4.handle,n4.id,n4.environment,n4.services,n4.cost,{field:`why`,headerName:`Reason`,cellRenderer:({data:e})=>e.why?(0,U.jsx)(aA,{placement:`left`,text:e.why,fluid:!0,children:(0,U.jsx)(YU,{children:e.why})}):null}],gIe=({apps:e})=>{let t=B(e=>uS(e,{})),n=(0,V.useMemo)(()=>e.flatMap(e=>{let n=t.find(t=>t.id===e.resource.id);return n?[{...n,why:e.why}]:[]}),[e,t]);return(0,U.jsx)(L2,{rowData:n,colDefs:hIe,pageSize:25})},r4=({labelWhenClosed:e,labelWhenOpen:t,open:n,onToggle:r,children:i,labelClassName:a})=>(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`button`,{type:`button`,onClick:r,className:`font-semibold flex items-center cursor-pointer text-left py-2${a?` ${a}`:``}`,"aria-expanded":n,children:[n?(0,U.jsx)(IE,{className:`shrink-0`}):(0,U.jsx)(PE,{className:`shrink-0`}),(0,U.jsx)(`span`,{className:`ml-0.5`,children:n?t:e})]}),n&&i!=null?i:null]}),i4=({className:e})=>(0,U.jsx)(H2,{className:(0,H.default)(`w-max`,e),variant:`progress`,icon:(0,U.jsx)(xD,{variant:`sm`}),children:`Over-provisioned`}),a4=({className:e})=>(0,U.jsx)(H2,{className:(0,H.default)(`w-max`,e),variant:`error`,icon:(0,U.jsx)(SD,{variant:`sm`}),children:`Under-provisioned`}),o4=({className:e})=>(0,U.jsx)(H2,{className:(0,H.default)(`w-max`,e),icon:(0,U.jsx)(CD,{variant:`sm`}),children:`Right-sized`}),s4=({className:e})=>(0,U.jsx)(H2,{className:(0,H.default)(`w-max`,e),variant:`success`,icon:(0,U.jsx)(CD,{variant:`sm`}),children:`Autoscaling ON`}),c4=e=>e>1?e.toFixed(1):`< 1`,_Ie=(e,t)=>{let n=e.autoscaling===`horizontal`;return{header:(0,U.jsxs)(U.Fragment,{children:[cl(e.autoscaling),` Autoscaling:`,` `,(0,U.jsx)(`span`,{className:`text-lime`,children:`ON`})]}),values:n?[{label:`Min. Containers:`,value:e.minContainers??``},{label:`Max Containers:`,value:e.maxContainers??``},{label:`Scale Down CPU Threshold:`,value:e.minCpuThreshold??``},{label:`Scale Up CPU Threshold:`,value:e.maxCpuThreshold??``}]:[{label:`Minimum Memory:`,value:e.minimumMemory},{label:`Maximum Memory:`,value:e.maximumMemory??`Not set`}],link:{label:`View settings`,to:t}}},vIe=e=>{let t=new Date(e);return`${t.toLocaleDateString(`en-US`,{year:`numeric`,month:`short`,day:`numeric`,timeZone:`UTC`})} at ${t.toLocaleTimeString(`en-US`,{hour:`2-digit`,minute:`2-digit`,hour12:!1,timeZone:`UTC`})} UTC`},l4=(e,t,n)=>{let r=e.recommendedContainerMemoryLimitMb/1024,i=Fl(e.recommendedInstanceClass),a=n===`scale_up`?`Scale up to a ${r} GB container using the ${i} profile to improve reliability and performance.`:`Scale down to a ${r} GB container using the ${i} profile.`,o=Il(t);return{recommendationLine:a,cpuBullet:`${c4(e.cpuUsage*100)}% / ${o}%`,memoryBullet:`${c4(e.ramUsage/e.containerMemoryLimitMbAtTime*100)}% / 100% (${(e.ramUsage/1024).toFixed(1)} GB / ${(e.containerMemoryLimitMbAtTime/1024).toFixed(1)} GB)`}},u4=(e,t,n,r)=>{let{cpuBullet:i,memoryBullet:a}=l4(e,t,n),o=vIe(e.createdAt),s=t.databaseId!==``,c=s&&op(t.processType),l=s&&sp(t.processType),u=`Last evaluated on ${o}, based on prior 14 days.${c&&l?` Note: For safety and reliability, we apply a ${c}x multiplier to memory recommendations for ${l} databases.`:``}`;return{header:(0,U.jsxs)(U.Fragment,{children:[`Scale: `,(0,U.jsx)(`span`,{className:n===`scale_up`?`text-red-300`:`text-indigo`,children:n===`scale_up`?`Under-Provisioned`:`Over-Provisioned`})]}),values:[{label:`CPU Usage (p95):`,value:i},{label:`RAM Usage (peak):`,value:a}],description:u,link:{label:`Scale`,to:r}}},d4=e=>Math.round(e||0).toLocaleString(`en`,{style:`currency`,currency:`USD`,minimumFractionDigits:0,maximumFractionDigits:0}),f4=e=>`Save up to ${d4(e)}/mo.`,yIe=`Recommendations update once daily and may not reflect the most recent usage changes.`;function bIe(e){let t=e.databaseId!==``,n=t&&op(e.processType),r=t&&sp(e.processType);return`${yIe}${n&&r?` Note that, for safety and reliability, we apply a ${n}x multiplier to memory recommendations for ${r} databases.`:``}`}var xIe=({recommendation:e,service:t,state:n,tooltipData:r})=>{let{recommendationLine:i}=l4(e,t,n);return(0,U.jsxs)(`div`,{className:`mb-2`,children:[(0,U.jsxs)(`div`,{className:`flex items-center gap-1.5 text-md font-semibold text-gray-900`,children:[(0,U.jsx)(`span`,{children:`Scaling Recommendation`}),(0,U.jsx)(aA,{text:bIe(t),children:(0,U.jsx)(`span`,{className:`inline-flex cursor-help`,children:(0,U.jsx)(tD,{variant:`sm`,className:`opacity-50 hover:opacity-100`})})})]}),(0,U.jsxs)(`div`,{className:`text-black-500`,children:[i,` `,(0,U.jsx)(aA,{...r,className:`inline-block align-baseline`,children:(0,U.jsx)(`span`,{className:`curs
87or-help text-gray-500 hover:text-gray-700 border-b border-dotted border-gray-400`,children:`See usage stats`})})]})]})},SIe=`https://aptible.com/docs/core-concepts/scaling/container-right-sizing-recommendations`,CIe=({title:e,pill:t,description:n,pillTooltipProps:r,expanded:i,onToggle:a,children:o})=>{let s=(0,U.jsx)(`div`,{className:`inline-block`,children:r?(0,U.jsx)(aA,{...r,children:(0,U.jsx)(`span`,{className:`cursor-help`,children:t})}):t});return(0,U.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,U.jsxs)(`div`,{className:`flex items-center justify-between gap-4`,children:[(0,U.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,U.jsx)(`span`,{className:`text-md font-semibold text-gray-900`,children:e}),(0,U.jsxs)(`div`,{className:`flex flex-col items-start gap-0.5`,children:[s,n??null]})]}),(0,U.jsx)(r4,{labelWhenClosed:`See recommendation`,labelWhenOpen:`Hide recommendation`,open:i,onToggle:a})]}),i?(0,U.jsx)(`div`,{className:`flex flex-col gap-3`,children:o}):null]})},wIe=({children:e})=>(0,U.jsx)(Z,{children:(0,U.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,U.jsx)(`h1`,{className:`text-lg text-gray-500`,children:`Insights and Recommendations`}),e]})}),p4=e=>`containerEfficiencyExpanded-${e}`;function m4(e){if(typeof sessionStorage>`u`)return!0;try{return sessionStorage.getItem(p4(e))!==`false`}catch{return!0}}function TIe(e,t){try{sessionStorage.setItem(p4(e),String(t))}catch{}}var h4=({serviceId:e,onAcceptRecommendation:t})=>{let[n,r]=(0,V.useState)(()=>m4(e));(0,V.useEffect)(()=>{r(m4(e))},[e]);let i=B(t=>Eu(t,{id:e})),a=B(t=>Sx(t,{id:e})),o=B(t=>L.manualScaleRecommendations.selectTableAsList(t).find(t=>t.serviceId===e)||L.manualScaleRecommendations.empty);if(a===`none`)return null;let s=a===`scale_down`&&o.costSavings>0,c=u4(o,i,a,i.appId?ra(i.appId,e):xa(i.databaseId));return(0,U.jsx)(wIe,{children:(0,U.jsxs)(CIe,{title:`Container Efficiency`,pill:a===`scale_up`?(0,U.jsx)(a4,{}):(0,U.jsx)(i4,{}),description:s?(0,U.jsx)(`span`,{className:`text-green-400 text-xs`,children:f4(o.costSavings)}):void 0,pillTooltipProps:c,expanded:n,onToggle:()=>{r(t=>{let n=!t;return TIe(e,n),n})},children:[(0,U.jsx)(xIe,{recommendation:o,service:i,state:a,tooltipData:c}),(0,U.jsxs)(`div`,{className:`flex items-center justify-between gap-4 border-t border-black-100 pt-3`,children:[(0,U.jsxs)(W,{variant:`horizontal`,className:`items-center gap-2`,children:[(0,U.jsx)(K,{onClick:t,size:`sm`,children:`Autofill Changes`}),(0,U.jsx)(dA,{to:i.appId?na(i.appId,e):ba(i.databaseId),variant:`white`,size:`sm`,children:`View Metrics`})]}),(0,U.jsx)(uA,{href:SIe})]})]})})},EIe=({serviceId:e})=>{let t=B(t=>Eu(t,{id:e})),n=B(ns),r=B(t=>Sx(t,{id:e})),i=B(t=>L.manualScaleRecommendations.selectTableAsList(t).find(t=>t.serviceId===e)||L.manualScaleRecommendations.empty),a=N();if(r===`none`)return(0,U.jsx)(aA,{header:(0,U.jsxs)(U.Fragment,{children:[`Rightsized: `,(0,U.jsx)(`span`,{className:`text-lime`,children:`True`})]}),description:`Based on the last 14 days of metrics, updated once daily.`,children:(0,U.jsx)(`span`,{className:`cursor-help`,children:(0,U.jsx)(o4,{})})});let o=t.appId?ra(t.appId,e):xa(t.databaseId),s=r===`scale_up`?`up`:`down`,c=()=>{a(o),Ys(`scale-service-click-${s}`,JSON.stringify({orgId:n.id,orgName:n.name,serviceId:e,direction:s}))},l=u4(i,t,r,o);return(0,U.jsxs)(`div`,{className:`flex flex-col items-start gap-0.5`,children:[(0,U.jsx)(aA,{...l,children:(0,U.jsx)(`button`,{type:`button`,onClick:c,className:`cursor-pointer`,children:r===`scale_up`?(0,U.jsx)(a4,{}):(0,U.jsx)(i4,{})})}),i.costSavings>0&&(0,U.jsx)(`div`,{className:`text-green-400 text-xs`,children:f4(i.costSavings)})]})},g4=({service:e})=>{let t=B(t=>Bm(t,{id:e.serviceSizingPolicyId})),n=B(t=>Rm(t,{id:e.serviceSizingPolicyId})),r=e.appId?ra(e.appId,e.id):xa(e.databaseId);return(0,U.jsxs)(`div`,{children:[t?(0,U.jsx)(aA,{..._Ie(n,r),children:(0,U.jsx)(P,{to:r,className:`inline-block no-underline hover:no-underline`,children:(0,U.jsx)(s4,{className:`cursor-pointer`})})}):null,t?null:(0,U.jsx)(EIe,{serviceId:e.id})]})},DIe=({data:e})=>{let t=B(t=>ky(t,{serviceId:e.id})),n=B(t=>Oy(t,{serviceId:e.id}));if(n===null)return(0,U.jsx)(`span`,{className:G.type[`normal lighter`],children:`N/A`});let r=t===null?(0,U.jsx)(`span`,{className:G.type.darker,children:n}):(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`div`,{className:G.type.darker,children:t.handle}),(0,U.jsxs)(`div`,{className:G.type[`normal lighter`],children:[t.size,` GB`]})]});return(0,U.jsx)(P,{to:aa(e.appId,e.id),className:`hover:underline`,children:r})},_4=()=>(u(dy()),u(jy()),null),v4={service:{field:`processType`,headerName:`Service`,width:300,resizable:!0,suppressAutoSize:!1,suppressSizeToFit:!1,cellRenderer:({data:e})=>(0,U.jsx)(Z2,{id:e.id}),valueGetter:({data:e})=>e?`${e.resourceHandle} ${e.processType}`:``},command:{field:`command`,headerName:`Command`,initialHide:!0,resizable:!0,suppressAutoSize:!1,suppressSizeToFit:!1,cellRenderer:({data:e})=>(0,U.jsx)($Fe,{value:e.command})},id:{field:`id`,headerName:`ID`,sortable:!0,sort:`asc`,width:100,resizable:!0},environment:{field:`envHandle`,headerName:`Environment`,cellRenderer:({data:e})=>(0,U.jsx)(G2,{id:e.environmentId,hideIcon:!0})},details:{field:`containerCount`,headerName:`Details`,cellRenderer:({data:e})=>{let t=wu(e);return(0,U.jsxs)(`div`,{className:G.type.darker,children:[(0,U.jsxs)(`div`,{children:[e.containerCount,` Container`,e.containerCount===1?``:`s`]}),(0,U.jsxs)(`div`,{className:G.type[`normal lighter`],children:[t.containerSizeGB,` GB · `,t.cpuShare,` CPU`]})]})}},diskStorage:{colId:`diskStorage`,field:`diskStorageSort`,headerName:`Disk Storage`,cellRenderer:({data:e})=>(0,U.jsx)(DIe,{data:e})},efficiency:{field:`savings`,headerName:`Container Efficiency`,cellRenderer:({data:e})=>(0,U.jsx)(g4,{service:e})},scaleRecommendation:{field:`scaleRec`,headerName:`Scale Recommendation`,valueGetter:({data:e})=>e?.scaleRec===`none`?null:e?.scaleRec,hide:!0},cost:{field:`cost`,headerName:`Est. Monthly Cost`,headerTooltip:` 88 This is an estimate of the cost of running the current resources for 89 one month. It is updated automatically as resources are added or 90 scaled. Please note: it does not represent your actual usage for the 91 month and does not reflect contract discounts, custom rates, or 92 allocations. 93 `,cellRenderer:({data:e})=>(0,U.jsx)(q2,{value:e.cost})},scaleAction:{colId:`scaleAction`,headerName:`Actions`,sortable:!1,width:90,resizable:!1,suppressAutoSize:!0,suppressSizeToFit:!0,cellRenderer:({data:e})=>(0,U.jsx)(dA,{size:`sm`,to:ra(e.appId,e.id),variant:`primary`,children:`Scale`})},createdAt:{field:`createdAt`,headerName:`Created At (UTC)`,initialSort:`desc`,sortable:!0,width:180,resizable:!0,suppressAutoSize:!1,suppressSizeToFit:!1,cellRenderer:({data:e})=>(0,U.jsx)(Y2,{date:e.createdAt})}},OIe=[v4.service,v4.id,v4.command,v4.environment,v4.details,v4.diskStorage,v4.createdAt,v4.efficie
93ncy,v4.scaleRecommendation,v4.cost,v4.scaleAction];function kIe(){let e=B($o);u(rb({orgId:e}));let{isLoading:t,isInitialLoading:n}=Er([Ru]),r=B(e=>cS(e));return(0,U.jsxs)(W,{size:`xl`,children:[(0,U.jsx)(_4,{}),(0,U.jsx)(NU,{description:`Services determine the number of containers of your app and the memory and CPU limits for your app.`,children:`Services`}),(0,U.jsx)(L2,{rowData:r,colDefs:OIe,isLoading:!r.length&&(t||n),syncQueryParams:!0})]})}var AIe=({data:e,stack:t})=>{let n=B(t=>Bm(t,{id:e.serviceSizingPolicyId}));return(t.verticalAutoscaling||t.horizontalAutoscaling)&&n?(0,U.jsxs)(W,{variant:`horizontal`,size:`sm`,className:`items-center`,children:[(0,U.jsx)(`div`,{children:`Unavailable`}),(0,U.jsx)(aA,{fluid:!0,className:`inline-block`,text:`Cost cannot be estimated when autoscaling is enabled.`,children:(0,U.jsx)(tD,{variant:`sm`,className:`opacity-50 hover:opacity-100`})})]}):(0,U.jsx)(q2,{value:e.cost})};function jIe({appId:e}){let t=B(t=>rf(t,{id:e})),n=B(e=>tu(e,{id:t.environmentId})),r=B(e=>zl(e,{id:n.stackId}));u(Bu({id:t.id,withDeleted:!0,waitForBootup:!0})),u(Hm({id:t.environmentId}));let i=B(t=>lS(t,{appId:e})).filter(e=>!e.deletedAt),a=(0,V.useMemo)(()=>[v4.service,v4.id,v4.command,v4.details,v4.diskStorage,{field:`cost`,headerName:`Est. Monthly Cost`,headerTooltip:v4.cost.headerTooltip,cellRenderer:({data:e})=>(0,U.jsx)(AIe,{data:e,stack:r})},v4.createdAt,v4.efficiency,v4.scaleRecommendation,{colId:`scaleAction`,headerName:`Actions`,sortable:!1,width:160,resizable:!1,suppressAutoSize:!0,suppressSizeToFit:!0,cellRenderer:({data:e})=>(0,U.jsxs)(W,{size:`sm`,variant:`horizontal`,children:[(0,U.jsx)(dA,{size:`sm`,to:na(t.id,e.id),variant:`primary`,children:`Metrics`}),(0,U.jsx)(dA,{size:`sm`,to:ra(t.id,e.id),variant:`primary`,children:`Scale`})]})}],[t.id,r]);return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(_4,{}),(0,U.jsx)(L2,{rowData:i,colDefs:a})]})}var MIe=({children:e})=>(0,U.jsx)(`code`,{className:`bg-gray-200 font-mono text-black pt-0.5 pb-1 px-1.5 rounded-md text-[0.9rem]`,children:e}),y4=({app:e,selectedId:t,onSelect:n,disabled:r=()=>!1})=>{let i=B(t=>Hu(t,{appId:e.id}));return(0,U.jsx)(QA,{name:`service`,selected:t,onSelect:n,children:i.map(e=>e?.deletedAt?null:(0,U.jsxs)(ZA,{value:e.id,disabled:r(e),children:[e.processType,` `,(0,U.jsx)(MIe,{children:bu(e)})]},e.id)).filter(e=>!!e)})},b4=(e=0,t=`text-white`,n=`text-lime`)=>(r,i)=>({text:r,className:i===e-1?t:n}),x4=e=>e.map(b4(e.length)),NIe=e=>e.map(b4(e.length,`text-black`)),S4=({text:e,className:t=``,allowCopy:n=!0})=>(0,U.jsxs)(`div`,{className:`relative`,children:[(0,U.jsx)(`pre`,{className:`p-4 rounded-lg text-sm pr-14 bg-black text-lime overflow-x-scroll ${t}`,children:e}),n?(0,U.jsx)(B2,{placement:`left`,text:e,className:`absolute right-2 top-4`}):null]}),C4=({segments:e,className:t=`bg-black`,allowCopy:n=!1})=>e.length===0?null:(0,U.jsxs)(`div`,{className:`relative`,children:[(0,U.jsx)(`pre`,{className:`p-4 rounded-lg text-sm pr-14 ${t}`,children:e.map(({text:e,className:t},n)=>(0,U.jsx)(`span`,{className:t,children:e},`${n}-${e}`))}),n?(0,U.jsx)(B2,{placement:`left`,text:e.map(e=>e.text).join(``),className:`absolute right-2 top-4`}):null]}),w4=({segments:e,className:t=`bg-black`,allowCopy:n=!1})=>e.length===0?null:(0,U.jsxs)(`div`,{className:`relative`,children:[(0,U.jsx)(`code`,{className:`p-4 rounded-lg text-sm pr-14 overflow-x-auto block [overflow-wrap:anywhere] ${t}`,children:e.map(({text:t,className:n},r)=>(0,U.jsxs)(`span`,{className:n,children:[t,r===e.length-1?``:` `]},`${r}-${t}`))}),n?(0,U.jsx)(B2,{placement:`left`,text:e.map(e=>e.text).join(` `),className:`absolute right-2 top-4`}):null]}),T4=({configId:e,envId:t})=>{let[n,r]=(0,V.useState)(!1),i=B(t=>sg(t,{id:e})),a=tg(i.env),o=(0,V.useMemo)(()=>ug({id:e,withSensitiveExtras:!0}),[e]),s=w(o);return e?(0,U.jsx)(U.Fragment,{children:n?(0,U.jsxs)(W,{size:`sm`,children:[(0,U.jsx)(`div`,{children:(0,U.jsx)(yA,{envId:t,variant:`white`,onClick:()=>r(!1),children:`Hide`})}),s.isLoading||i.id===``?(0,U.jsx)(`div`,{className:`text-gray-500`,children:`Loading configuration...`}):a===``?(0,U.jsx)(`div`,{className:`text-gray-500`,children:`There are no environment variables for this app.`}):(0,U.jsx)(C4,{allowCopy:!0,segments:[{text:a,className:`text-white`}]})]}):(0,U.jsx)(`div`,{children:(0,U.jsx)(yA,{envId:t,variant:`white`,onClick:()=>{s.trigger(),r(!0)},children:`Show`})})}):(0,U.jsx)(`div`,{className:`text-gray-500`,children:`This app has no configuration yet.`})},PIe=e=>{if(e.length===0)return[`unknown`,new Date().toISOString()];let t=[...e].sort((e,t)=>
93new Date(e.updatedAt).getTime()-new Date(t.updatedAt).getTime()),n=0;for(let e=0;e<t.length;e+=1){let r=t[e];if(r.status===`queued`)return[`queued`,r.updatedAt];if(r.status===`running`)return[`running`,r.updatedAt];if(r.status===`failed`||r.status===`canceled`)return[r.status,r.updatedAt];r.status===`succeeded`&&(n+=1)}return n===t.length?t.length===0?[`succeeded`,new Date().toISOString()]:[`succeeded`,t[t.length-1].updatedAt]:[`unknown`,new Date().toISOString()]},E4=e=>{switch(e){case`queued`:return`pending`;case`running`:return`progress`;case`succeeded`:return`success`;case`failed`:case`canceled`:return`error`;default:return`default`}},D4=({status:e})=>{let t=Qd(e);return(0,U.jsx)(H2,{variant:E4(e),children:t})},O4=({children:e,trigger:t,placement:n=`top`,className:r=``,onOpenChange:i})=>(0,U.jsxs)(LH,{onOpenChange:i,children:[(0,U.jsx)(XB,{className:`cursor-pointer`,children:t}),(0,U.jsx)(PH,{placement:n,offset:10,className:r,children:(0,U.jsx)(RH,{className:`bg-[#E7E8E8] text-black border border-[#E7E8E8] rounded-md px-3 py-2 pr-2 text-sm shadow-[0px_1px_8px_0px_#00000033] outline-none max-w-xs`,children:({close:t})=>(0,U.jsxs)(`div`,{className:`flex gap-5`,children:[(0,U.jsx)(`div`,{className:`flex-1`,children:e}),(0,U.jsx)(`button`,{type:`button`,onClick:t,className:`self-start cursor-pointer`,children:(0,U.jsx)(JE,{variant:`sm`})})]})})})]}),k4=`https://www.aptible.com/docs/core-concepts/managed-databases/managing-databases/database-backups#point-in-time-recovery-for-postgresql`,A4=({database:e,image:t,trigger:n,placement:r=`top`})=>{let i;return i=e.enableBackups?e.type===`postgresql`&&e.pitrStatus===`unsupported`?(0,U.jsxs)(`span`,{children:[`Point-in-time recovery is unsupported for this database version. Only PostgreSQL version 13 or newer is supported. See`,` `,(0,U.jsx)(`a`,{href:k4,target:`_blank`,rel:`noreferrer`,className:`underline`,children:`PITR docs`}),` `,`for more information.`]}):e.pitrStatus===`restricted`?(0,U.jsxs)(`span`,{children:[`Point-in-time recovery (PITR) is unsupported for this database due to its extremely high write volume. See`,` `,(0,U.jsx)(`a`,{href:k4,target:`_blank`,rel:`noreferrer`,className:`underline`,children:`PITR docs`}),` `,`for more information on limitations.`]}):e.pitrStatus===`pending_restart`?(0,U.jsx)(`span`,{children:`Please restart this database. Once restarted, PITR will be automatically enabled.`}):fh(t)&&!t.pitrSupported?(0,U.jsxs)(`span`,{children:[`Point-in-time recovery is unsupported for this database type. See`,` `,(0,U.jsx)(`a`,{href:k4,target:`_blank`,rel:`noreferrer`,className:`underline`,children:`PITR docs`}),` `,`for more information.`]}):(0,U.jsx)(`span`,{children:`Point-in-time recovery is disabled.`}):(0,U.jsx)(`span`,{children:`Point-in-time recovery (PITR) requires backups to be enabled.`}),(0,U.jsx)(O4,{placement:r,trigger:n,children:i})},FIe=({database:e})=>{let t=B(t=>ph(t,{id:e.databaseImageId}));return u(yh({id:e.databaseImageId})),(0,U.jsx)(`div`,{className:`flex`,children:(0,U.jsxs)(P,{to:ga(e.id),className:`flex`,children:[(0,U.jsx)(`img`,{src:`/database-types/logo-${e.type}.png`,className:`w-[32px] h-[32px] mr-2 mt-1 align-middle`,"aria-label":`${e.type} Database`}),(0,U.jsxs)(`p`,{className:`flex flex-col`,children:[(0,U.jsx)(`span`,{className:G.type[`table link`],children:e.handle}),(0,U.jsx)(`span`,{className:G.type[`normal lighter`],children:t.description})]})]})})},j4={handle:{field:`handle`,headerName:`Handle`,initialWidth:200,suppressSizeToFit:!0,cellRenderer:({data:e})=>(0,U.jsx)(tIe,{id:e.id})},id:{field:`id`,headerName:`ID`,cellDataType:`number`,valueGetter:({data:e})=>Number.parseInt(e?.id||`0`,10),sort:`desc`},environment:{field:`envHandle`,headerName:`Environment`,cellRenderer:({data:e})=>(0,U.jsx)(G2,{id:e.environmentId,hideIcon:!0})},diskSize:{field:`diskSize`,headerName:`Disk Size`,cellRenderer:({data:e})=>(0,U.jsxs)(`span`,{children:[e.diskSize,` GB`]})},containerSize:{field:`containerSize`,headerName:`Container Size`,cellRenderer:({data:e})=>(0,U.jsxs)(`span`,{children:[e.containerSize,` GB · `,e.containerCpu,` CPU`]})},backups:{field:`enableBackups`,headerName:`Backups`,cellRenderer:({data:e})=>{let t=B(t=>ph(t,{id:e.databaseImageId})),n=fh(t)&&!t.pitrSupported?`#6B7280`:`#AD1A1A`;return(0,U.jsxs)(`div`,{className:`flex flex-col gap-1 text-sm`,children:[(0,U.jsx)(`div`,{children:e.enableBackups?`Enabled`:`Disabled`}),e.type===`postgresql`&&(0,U.jsx)(`div`,{className:`flex items-center gap-1`,children:e.enablePitr?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(HE,{variant:`sm`,color:`#00633F`}),(0,U.jsx)(`span`,{children:`PITR`})]}):(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(JE,{variant:`sm`,color:n}),(0,U.jsx)(A4,{database:e,image:t,trigger:(0,U.jsx)(`span`,{className:`underline cursor-pointer`,children:`PITR`})})]})})]})}},savings:{field:`savings`,headerName:`Container Efficiency`,initialWidth:220,cellRenderer:({data:e})=>{let t=B(t=>Eu(t,{id:e.serviceId}));return(0,U.jsx)(g4,{service:t})}},scaleRecommendation:{field:`scaleRec`,headerName:`Scale Recommendation`,valueGetter:({data:e})=>e?.scaleRec===`none`?null:e?.scaleRec,hide:!0},createdAt:{field:`createdAt`,headerName:`Created At (UTC)`,initialHide:!0,cellRenderer:({data:e})=>(0,U.jsx)(Y2,{date:e.createdAt})},cost:{field:`cost`,headerName:`Est. Monthly Cost`,initialWidth:240,headerTooltip:`This is an estimate of the cost of running the current resources for one month. It is updated automatically as resources are added or scaled. Please note: it does not represent your actual usage for the month and does not reflect contract discounts, custom rates, or allocations.`,cellRenderer:({data:e})=>(0,U.jsx)(q2,{value:e.cost})},actions:{colId:`actions`,headerName:`Actions`,sortable:!1,width:90,resizable:!1,suppressAutoSize:!0,suppressSizeToFit:!0,cellRenderer:({data:e})=>(0,U.jsx)(P,{to:xa(e.id),className:`hover:no-underline flex justify-end mr-4`,children:(0,U.jsx)(K,{variant:`primary`,size:`sm`,children:`Scale`})})}},IIe=[j4.handle,j4.id,j4.environment,j4.diskSize,j4.containerSize,j4.backups,j4.createdAt,j4.savings,j4.scaleRecommendation,j4.cost,j4.actions],LIe=()=>{let{isLoading:e,isInitialLoading:t}=Er([yp,Ru,fu,vh,nb({orgId:B($o)}),bx]),n=B(e=>SS(e,{}));return(0,U.jsxs)(W,{size:`xl`,children:[(0,U.jsxs)(W,{variant:`horizontal`,className:`items-center justify-between`,children:[(0,U.jsx)(NU,{description:`Databases provide data persistence and are automatically configured and managed.`,children:`Databases`}),(0,U.jsxs)(dA,{to:Ua(),children:[(0,U.jsx)(qE,{variant:`sm`,className:`mr-2`}),` New Database`]})]}),(0,U.jsx)(L2,{rowData:n,colDefs:IIe,syncQueryParams:!0,isLoading:!n.length&&(e||t)})]})},RIe=[j4.handle,j4.id,j4.diskSize,j4.containerSize,j4.backups,j4.cost,j4.savings,j4.scaleRecommendation,j4.actions],zIe=({envId:e})=>{let t=B($o);u(nb({orgId:t})),u(du({id:e}));let n=N(),r=()=>{n($te(e))},i=B(t=>wS(t,{envId:e}));return(0,U.jsxs)(W,{size:`xl`,children:[(0,U.jsx)(`div`,{className:`flex justify-end`,children:(0,U.jsxs)(hA,{envId:e,onClick:r,children:[(0,U.jsx)(qE,{variant:`sm`,className:`mr-2`}),`New Database`]})}),(0,U.jsx)(L2,{rowData:i,colDefs:RIe})]})},BIe=[j4.handle,j4.id,j4.environment,j4.diskSize,j4.containerSize,j4.cost,{field:`why`,headerName:`Reason`,cellRenderer:({data:e})=>e.why?(0,U.jsx)(aA,{placement:`left`,text:e.why,fluid:!0,children:(0,U.jsx)(YU,{children:e.why})}):null}],VIe=({databases:e})=>{let t=B(e=>SS(e,{})),n=(0,V.useMemo)(()=>e.flatMap(e=>{let n=t.find(t=>
93t.id===e.resource.id);return n?[{...n,why:e.why}]:[]}),[e,t]);return(0,U.jsx)(L2,{rowData:n,colDefs:BIe,pageSize:25})},HIe=({manual:e,final:t})=>{let n=(0,H.default)(`rounded-full border-2`,`text-sm font-semibold `,`px-2 flex justify-between items-center w-fit`),r=``;return r=e?`Manual`:t?`Final`:`Auto`,(0,U.jsx)(`div`,{className:(0,H.default)(n,e?`bg-indigo-100 text-indigo-400 border-indigo-300`:`bg-lime-100 text-green-400 border-lime-300`,t?`!bg-orange-100 !text-brown !border-brown`:`bg-indigo-100 text-green-400 border-indigo-300`),children:(0,U.jsx)(`div`,{children:r})})},UIe=({envId:e,id:t})=>{let n=l(),r=Fv({id:t}),i=I(r);return(0,U.jsx)(gA,{envId:e,variant:`delete`,size:`sm`,onClick:()=>{n(r)},isLoading:i.isLoading,requireConfirm:!0,children:`Delete`})},WIe=({data:e})=>{let t=ap({rates:B(L.costRates.select),backups:[e]});return(0,U.jsx)(`div`,{className:G.type.darker,children:(0,U.jsx)(vU,{cost:t})})},GIe=({data:e})=>{let t=N();return(0,U.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,U.jsx)(hA,{envId:e.environmentId,onClick:()=>{t(jte(e.id))},size:`sm`,children:`Restore`}),(0,U.jsx)(UIe,{id:e.id,envId:e.environmentId})]})},KIe={field:`id`,headerName:`ID`,sortable:!1,initialWidth:170,suppressSizeToFit:!0,cellRenderer:({data:e})=>(0,U.jsx)(`div`,{className:G.type[`normal lighter`],children:e.copiedFromId?`Copy of ${e.copiedFromId}`:e.id})},qIe={field:`databaseHandle`,headerName:`Database`,sortable:!1,cellRenderer:({data:e})=>(0,U.jsx)(P,{className:`text-black group-hover:text-indigo hover:text-indigo`,to:ga(e.databaseId),children:e.databaseHandle})},JIe={field:`size`,headerName:`Size`,sortable:!1,cellRenderer:({data:e})=>(0,U.jsxs)(`div`,{className:`text-gray-900`,children:[e.size,` GB`]})},YIe={field:`awsRegion`,headerName:`Region`,sortable:!1,cellRenderer:({data:e})=>(0,U.jsx)(`div`,{className:`text-gray-900`,children:e.awsRegion})},XIe={field:`createdAt`,headerName:`Created At (UTC)`,sortable:!1,cellRenderer:({data:e})=>(0,U.jsx)(Y2,{date:e.createdAt})},ZIe={field:`createdByEmail`,headerName:`Creator`,sortable:!1,cellRenderer:({data:e})=>(0,U.jsx)(`div`,{className:`text-gray-900`,children:e.createdByEmail})},QIe={field:`createdFromOperationId`,headerName:`Operation ID`,sortable:!1,initialHide:!0,cellRenderer:({data:e})=>(0,U.jsx)(P,{className:`text-black group-hover:text-indigo hover:text-indigo`,to:po(e.createdFromOperationId),children:e.createdFromOperationId})},$Ie={colId:`cost`,headerName:`Est. Monthly Cost`,headerTooltip:gU,sortable:!1,cellRenderer:WIe},eLe={colId:`actions`,headerName:`Actions`,sortable:!1,initialWidth:190,suppressSizeToFit:!0,resizable:!1,cellRenderer:GIe},tLe=e=>({colId:`type`,headerName:`Type`,sortable:!1,cellRenderer:({data:t})=>(0,U.jsx)(`div`,{className:`text-gray-900`,children:(0,U.jsx)(HIe,{manual:t.manual,final:e})})}),M4=({paginated:e,showDatabase:t=!0,showFinal:n=!1})=>{let r=I(Fv),i=e.data.filter(e=>!e?.deletedAt),a=(0,V.useMemo)(()=>[KIe,t?qIe:null,tLe(n),JIe,YIe,XIe,ZIe,QIe,$Ie,eLe].filter(e=>e!==null),[t,n]);return(0,U.jsxs)(W,{children:[(0,U.jsx)(TA,{...r}),(0,U.jsx)(R2,{rowData:i,colDefs:a,isLoading:e.isLoading,searchable:!1,page:e.page,totalPages:e.totalPages,totalItems:e.totalItems,onPrev:e.prev,onNext:e.next})]})},N4=()=>{let e=0;return()=>(e+=1,e)};function nLe(e){return e.toString(16).padStart(2,`0`)}function rLe(e){let t=new Uint8Array((e||40)/2);return crypto.getRandomValues(t),Array.from(t,nLe).join(``)}var P4=50,F4=`(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}`,iLe=RegExp(`^${F4}$`),aLe=RegExp(`^${`${F4}\\/(3[0-2]|[12]?[0-9])`}$`);function oLe(e){return iLe.test(e)}function sLe(e){return aLe.test(e)}function I4(e){let t=[];if(e.length>P4&&t.push(`${e.length} is greater than the max IP Allowlist size of ${P4}`),e.forEach(e=>{oLe(e)||sLe(e)||t.push(`[${e}] is not a valid IPv4 address or CIDR`)}),t.length!==0)return t.join(`, `)}function L4(e=``){if(!e)return;let t=Number(e);if(Number.isNaN(t)||t<=0||t>=65535)return`Port must be a number between 1 and 65535`}var R4=`Lowercase alphanumerics, periods, hyphens, underscores, and less than 64 characters`,cLe=new RegExp(/^[0-9a-z._-]{1,64}$/);function z4(e=``){if(e===``)return`Must provide a handle (${R4})`;if(e.length>64)return`[${e}] is ${e.length-64} characters too long (max: 64)`;if(!cLe.test(e))return`[${e}] is not a valid handle ${R4}`}var B4=`Lowercase alphanumerics, hyphens, and less than 64 characters`,lLe=new RegExp(/^[0-9a-z-]{1,26}$/);function uLe(e=``){if(e===``)return`Must provide a stack name ${B4}`;if(e.length>26)return`[${e}] is ${e.length-26} characters too long (max: 26)`;if(!lLe.test(e))return`[${e}] is not a valid stack name ${B4}`}var dLe=[[`must be at least 10 characters`,/^.{0,9}$/],[`must be shorter than 72 characters`,/^.{72,}$/],[`must contain at least one uppercase letter`,/^[^A-Z]+$/],[`must contain at least one lowercase letter`,/^[^a-z]+$/],[`must contain at least one digit or special character`,/^[^0-9!@#$%^&*()]+$/]];function fLe(e){let t=[];return dLe.forEach(n=>{let[r,i]=n;e.match(i)&&t.push(r)}),new TextEncoder().encode(e).length>72&&t.push(`Too long: Passwords are limited to 72 bytes`),t.join(`, `)}var pLe=/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/;function V4(e){if(e===``)return`Email must not be empty`;if(!e.toLowerCase().match(pLe))return`Must provide valid email`}function H4(e,t){if(e===``)return`${t} must not be empty`}function U4(e){if(!/^[a-zA-Z0-9\s]+$/.test(e))return`Cannot have symbols in name`}function W4(e){return e.replace(/</g,`<`).replace(/>/g,`>`)}
93function G4(e=0){if(e<10)return`Disk size must be at least 10 GB`;if(e>16384)return`Disk size cannot exceed 16384 GB`}var K4=N4();function q4(e,t){if(t.type===`add`)return{...e,[t.payload.id]:t.payload};if(t.type===`reset`)return{};if(t.type===`rm`){let n={...e};return delete n[t.payload],n}return e}var mLe=e=>{let t=z4(e.name);if(t)return{item:e,message:t}},J4=({value:e,onChange:t,feedbackMessage:n,feedbackVariant:r=`info`})=>(0,U.jsx)(J,{label:`Database Handle`,htmlFor:`dbname`,className:`flex-1`,feedbackVariant:r,feedbackMessage:n,children:(0,U.jsx)(X,{name:`dbname`,value:e,onChange:e=>{t(e.currentTarget.value)}})}),Y4=({value:e,onChange:t})=>(0,U.jsx)(J,{label:`Environment Variable`,htmlFor:`envvar`,className:`flex-1`,children:(0,U.jsx)(X,{name:`envvar`,value:e,onChange:e=>{t(e.currentTarget.value)}})}),hLe=({db:e,images:t,propChange:n,onDelete:r,namePrefix:i,showEnv:a=!0})=>{let o=r=>{let a=r.value,o=t.find(e=>e.id===a),s=`${i}-${o?.type||``}`;n({...e,imgId:a,name:s,dbType:o?.type||``})},s=(0,U.jsxs)(`div`,{className:`flex justify-between gap-3 mt-4`,children:[(0,U.jsx)(J4,{value:e.name,onChange:t=>n({...e,name:t})}),a?(0,U.jsx)(Y4,{value:e.env,onChange:t=>n({...e,env:t})}):null]}),c=[{value:``,label:`Choose a Database`},...t.map(e=>({label:e.description,value:e.id}))],l=c.find(t=>t.value===e.imgId);return(0,U.jsxs)(`div`,{className:`mb-4`,children:[(0,U.jsx)(`h4`,{className:`${G.type.h4}`,children:`New Database`}),(0,U.jsxs)(`p`,{className:`text-black-500 mb-2`,children:[`Choose a database type and handle.`,` `,a?`The environment variable here will be injected into your app with the connection URL.`:``]}),(0,U.jsxs)(`div`,{className:`flex mb-2`,children:[(0,U.jsx)(XA,{ariaLabel:`new-db`,onSelect:o,value:l?.value,options:c,className:`flex-1 mr-2`}),(0,U.jsx)(K,{variant:`delete`,onClick:r,children:`Delete`})]}),e.imgId?s:null,(0,U.jsx)(`hr`,{className:`my-4`})]})},gLe=({namePrefix:e,dbImages:t,dbMap:n,dbDispatch:r,isLoading:i,showEnv:a=!0})=>{let[o]=Ee(),[s,c]=(0,V.useState)(!1),l=o.get(`dbs`)||``,u=[...t].sort((e,t)=>e.id.localeCompare(t.id)).map(e=>e.id).join(`-`);return(0,V.useEffect)(()=>{if(s||!l||!e||t.length===0)return;let n=l.split(`,`);n.length!==0&&n.forEach(n=>{let[i,a,o]=n.split(`:`),s=t.find(e=>e.type===a&&e.version===o);s&&(r({type:`add`,payload:{env:i.toLocaleUpperCase(),id:`${K4()}`,imgId:s.id,name:`${e}-${s.type}`,dbType:s.type||``,enableBackups:!0}}),c(!0))})},[l,u,e]),(0,U.jsxs)(`div`,{children:[Object.values(n).sort((e,t)=>e.id.localeCompare(t.id)).map(n=>(0,U.jsx)(hLe,{images:t,db:n,propChange:e=>{r({type:`add`,payload:e})},onDelete:()=>r({type:`rm`,payload:n.id}),namePrefix:e,showEnv:a},n.id)),(0,U.jsxs)(K,{type:`button`,onClick:()=>{r({type:`add`,payload:{id:`${K4()}`,imgId:``,name:e,env:`DATABASE_URL`,dbType:``,enableBackups:!0}})},variant:`secondary`,isLoading:i,children:[(0,U.jsx)(qE,{className:`mr-2`,color:`#fff`,variant:`sm`}),` New Database`]})]})},X4=({envId:e,onSelect:t,value:n,id:r,ariaLabel:i=`db-selector`,className:a=``,dbTypeFilters:o=[]})=>{let s=[{value:``,label:`Choose a Database`},...B(t=>o.length>0?_p(t,{envId:e,types:o}):gp(t,{envId:e})).map(e=>({label:`${e.handle} (${e.type})`,value:e.id}))];return(0,U.jsx)(XA,{id:r,ariaLabel:i,onSelect:t,value:n,options:s,className:a})},Z4=({className:e,icon:t,children:n})=>(0,U.jsxs)(`div`,{className:(0,H.default)(`flex items-center gap-1 text-sm font-semibold w-fit`,e),children:[(0,U.jsx)(`span`,{children:n}),t]}),_Le=e=>`Save ${d4(e)}/mo.`,Q4=({enp:e})=>{let t=B(L.costRates.select),n=N();if(e.shared)return(0,U.jsx)(H2,{icon:(0,U.jsx)(CD,{variant:`sm`}),children:`Enabled`});if(e.platform!==`alb`||e3(Am(e)))return(0,U.jsx)(`span`,{children:`N/A`});let r=(t.vhost_cost_per_hour-t.shared_vhost_cost_per_hour)*730;return(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`button`,{type:`button`,className:`cursor-pointer`,onClick:()=>n(Oa(e.id)),children:(0,U.jsx)(H2,{variant:`progress`,children:`Available`})}),(0,U.jsx)(`div`,{className:`text-green-400 text-xs mt-1`,children:_Le(r)})]})},$4=({status:e})=>e===`provisioning`||e===`deprovisioning`||e===`pending`?(0,U.jsx)(Z4,{className:`text-brown`,icon:(0,U.jsx)(BE,{variant:`sm`,color:`currentColor`}),children:cl(e)}):e===`deprovision_failed`||e===`provision_failed`||e===`deprovisioned`?(0,U.jsx)(Z4,{className:`text-red`,icon:(0,U.jsx)(JE,{variant:`sm`,color:`currentColor`}),children:cl(e.replace(`_`,` `))}):e===`provisioned`?(0,U.jsx)(Z4,{className:`text-forest`,icon:(0,U.jsx)(WE,{variant:`sm`,color:`currentColor`}),children:`Provisioned`}):(0,U.jsx)(Z4,{className:`text-indigo`,icon:(0,U.jsx)(tD,{variant:`sm`,color:`currentColor`}),children:`Unknown`}),e3=e=>e.startsWith(`*`);function t3({enp:e}){let t=Am(e);return e.status===`provisioning`?(0,U.jsx)(`p`,{className:`text-gray-500 leading-normal`,children:`Pending`}):!e3(t)&&(e.type===`http`||e.type===`http_proxy_protocol`)?(0,U.jsx)(`div`,{className:`leading-normal`,children:(0,U.jsx)(CA,{className:`text-black group-hover:text-indigo hover:text-indigo`,href:`https://${t}`,variant:`default`,children:t})}):(0,U.jsx)(`p`,{className:`leading-normal`,children:t})}var vLe=({envId:e,endpointId:t})=>{let n=l(),r=N(),i=pm({id:t}),a=I(i),[o,s]=(0,V.useState)(``);T(a,()=>{r(Aa())});let c=Am(B(e=>Lp(e,{id:t}))),u=o!==c;return(0,U.jsxs)(Z,{className:`mb-8`,children:[(0,U.jsxs)(`h1`,{className:`text-lg text-red-500 font-semibold flex items-center gap-2 mb-4`,children:[(0,U.jsx)(ZE,{color:`#AD1A1A`}),`Deprovision Endpoint`]}),(0,U.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),!u&&n(i)},children:[(0,U.jsxs)(`p`,{children:[`This will permanently deprovision `,(0,U.jsx)(`strong`,{children:c}),` endpoint. This action cannot be undone. If you want to proceed, type the`,` `,(0,U.jsx)(`strong`,{children:c}),` below to continue.`]}),(0,U.jsxs)(`div`,{className:`flex mt-4`,children:[(0,U.jsx)(X,{className:`flex-1`,type:`text`,value:o,onChange:e=>s(e.currentTarget.value),id:`delete-confirm`}),(0,U.jsxs)(gA,{type:`submit`,envId:e,variant:`delete`,isLoading:a.isLoading,disabled:u,className:`h-15 w-60 mb-0 ml-4 flex`,children:[(0,U.jsx)(RE,{color:`#FFF`,className:`mr-2`}),`Deprovision Endpoint`]})]})]})]})},yLe=({endpoint:e})=>(0,U.jsxs)(P,{className:`flex items-center gap-1 text-black group-hover:text-indigo hover:text-indigo`,to:wa(e.id),children:[(0,U.jsx)(`img`,{src:`/resource-types/logo-vhost.png`,className:`w-[32px] h-[32px] mr-2 align-middle`,"aria-label":`Endpoint`}),(0,U.jsx)(`p`,{className:`${G.type[`table link`]} leading-8`,children:Am(e)})]}),n3={url:{field:`url`,headerName:`URL`,cellRenderer:({data:e})=>(0,U.jsx)(nIe,{id:e.id})},serviceData:{colId:`serviceData`,sortable:!0,width:350,resizable:!0,suppressAutoSize:!1,suppressSizeToFit:!1,headerName:`Resource`,cellRenderer:({data:e})=>(0,U.jsx)(Z2,{id:e.serviceId}),valueGetter:({data:e})=>e?`${e.resourceHandle} ${e.serviceProcessType}`:``},id:{field:`id`,headerName:`ID`,initialHide:!0},hostname:{field:`hostname`,headerName:`Hostname`,width:400,cellRenderer:({data:e})=>(0,U.jsxs)(`div`,{className:`flex`,children:[(0,U.jsx)(`span`,{children:e.hostname}),(0,U.jsx)(B2,{text:e.hostname,className:`ml-2`})]})},environment:{field:`environmentId`,headerName:`Environment`,cellRenderer:({data:e})=>(0,U.jsx)(G2,{id:e.environmentId,hideIcon:!0})},type:{field:`type`,headerName:`Type`},status:{field:`status`,headerName:`Status`,initialHide:!0,minWidth:150,cellRenderer:({data:e})=>(0,U.jsx)($4,{status:e.status})},placement:{field:`placement`,headerName:`Placement`},platform:{field:`platform`,headerName:`Platform`,initialHide:!0,cellRenderer:({data:e})=>(0,U.jsx)(`span`,{children:e.platform.toUpperCase()})},shared:{field:`shared`,headerName:`Shared`,headerTooltip:`Shared endpoints share a load balancer across apps. When enabled, Aptible gives you a reduced per-endpoint rate. Highly recommended for non-production resources. Only available for HTTP endpoints on ALB.`,valueGetter:({data:e})=>!e||e.platform!==`alb`||e3(Am(e))?`N/A`:e.shared?`Enabled`:`Available`,cellRenderer:({data:e})=>(0,U.jsx)(Q4,{enp:e})},acme:{field:`acmeStatus`,headerName:`ACME Status`,initialHide:!0,cellRenderer:({data:e})=>{let t=N();return vm(e)?(0,U.jsx)(K,{variant:`primary`,size:`sm`,onClick:()=>t(Ea(e.id)),children:`Setup`}):(0,U.jsx)(`span`,{children:`Completed`})}},createdAt:{field:`createdAt`,headerName:`Created At (UTC)`,initialSort:`desc`,cellRenderer:({data:e})=>(0,U.jsx)(Y2,{date:e.createdAt})},cost:{field:`cost`,headerName:`Est. Monthly Cost`,headerTooltip:` 94 This is an estimate of the cost of running the current resources for 95 one month. It is updated automatically as resources are added or 96 scaled. Please note: it does not represent your actual usage for the 97 month and does not reflect contract discounts, custom rates, or 98 allocations. 99 `,cellRenderer:({data:e})=>(0,U.jsx)(q2,{value:e.cost})}},bLe=[n3.url,n3.serviceData,n3.environment,n3.hostname,n3.type,n3.status,n3.placement,n3.platform,n3.shared,n3.acme,n3.createdAt,n3.cost];function xLe(){let{isLoading:e,isInitialLoading:t}=Er([om]),n=B(e=>Yp(e));return(0,U.jsxs)(W,{size:`xl`,children:[(0,U.jsx)(NU,{description:`Endpoints let you expose your Apps on Aptible to clients over the public internet or your Stack's internal network.`,children:`Endpoints`}),(0,U.jsx)(L2,{rowData:n,colDefs:bLe,isLoading:!n.length&&(e||t)})]})}var SLe=[n3.url,n3.serviceData,n3.hostname,n3.type,n3.status,n3.placement,n3.platform,n3.shared,n3.acme,n3.createdAt,n3.cost];function CLe({envId:e}){let t=B(t=>Xp(t,{envId:e}));return(0,U.jsx)(L2,{rowData:t,colDefs:SLe})}var wLe=[n3.url,n3.serviceData,n3.hostname,n3.status,n3.placement,n3.platform,n3.shared,n3.acme,n3.createdAt,n3.cost];function TLe({appId:e}){let t=N(),n=B(t=>rf(t,{id:e})),r=B(t=>Zp(t,{appId:e}));return(0,U.jsxs)(W,{size:`xl`,children:[(0,U.jsx)(`div`,{className:`flex justify-end`,children:(0,U.jsxs)(hA,{envId:n.environmentId,onClick:()=>t(tte(n.id)),children:[(0,U.jsx)(qE,{variant:`sm`,className:`mr-2`}),` New Endpoint`]})}),(0,U.jsx)(L2,{rowData:r,colDefs:wLe})]})}n3.url,n3.serviceData,n3.hostname,n3.status,n3.placement,n3.platform,n3.shared,n3.acme,n3.createdAt,n3.cost;var ELe=[n3.url,n3.serviceData,n3.hostname,n3.status,n3.placement,n3.platform,n3.shared,n3.acme,n3.createdAt,n3.cost];function DLe({certId:e}){u(Yf({certId:e}));let t=B(t=>Qp(t,{certId:e}));return(0,U.jsx)(L2,{rowData:t,colDefs:ELe})}var OLe=[n3.url,n3.serviceData,n3.hostname,n3.status,n3.placement,n3.platform,n3.shared,n3.acme,n3.createdAt,n3.cost];function kLe({serviceId:e,dbId:t}){let n=N(),r=B(e=>lp(e,{id:t})),i=B(t=>$p(t,{serviceId:e}));return(0,U.jsxs)(W,{size:`xl`,children:[(0,U.jsx)(`div`,{className:`flex justify-end`,children:(0,U.jsxs)(hA,{envId:r.environmentId,onClick:()=>n(Tte(t)),children:[(0,U.jsx)(qE,{variant:`sm`,className:`mr-2`}),` New Endpoint`]})}),(0,U.jsx)(L2,{rowData:i,colDefs:OLe})]})}function ALe({database:e}){return u(im({id:e.serviceId})),(0,U.jsx)(kLe,{serviceId:e.serviceId,dbId:e.id})}var jLe=({envId:e,credentialId:t,externalHost:n=``,portMapping:r=[]})=>{let i=l(),[a,o]=(0,V.useState)(!1),s=qv({id:t,withSensitiveExtras:!0}),c=I(s),u=B(e=>Wv(e,{id:t})),d=!!(u.id&&u.connectionUrl);T(c,()=>{o(!0)});let f=()=>{!d&&!a&&!c.isLoading?i(s):o(!a)},p=a?`Hide`:`Show`;c.isLoading&&(p=`Loading...`);let m=u.connectionUrl?Jv(u.connectionUrl,n,r):``;return(0,U.jsxs)(`div`,{className:`flex gap-4`,children:[a?(0,U.jsx)(w4,{segments:x4([m]),allowCopy:!0}):null,(0,U.jsx)(`div`,{children:(0,U.jsx)(vA,{envId:e,className:a?`mt-2 px-0`:`px-0`,size:`sm`,variant:`white`,onClick:f,disabled:c.isLoading,children:c.isLoading?(0,U.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,U.jsx)(SE,{variant:`sm`}),p]}):p})})]})},MLe=({cred:e,envId:t,externalHost:n=``,portMapping:r=[]})=>(0,U.jsxs)(`div`,{className:`flex flex-col gap-2 mb-4`,children:[(0,U.jsxs)(`h3`,{className:G.type.h3,children:[e.type,` `,e.default?`(default)`:``]}),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`p`,{className:`text-base font-semibold text-gray-900`,children:`Connection URL`}),(0,U.jsx)(`div`,{className:`mt-1`,children:(0,U.jsx)(jLe,{envId:t,credentialId:e.id,externalHost:n,portMapping:r})})]})]}),r3=({dbId:e,externalHost:t=``})=>{let n=B(t=>Uv(t,{dbId:e}));u(Kv({dbId:e}));let r=B(t=>lp(t,{id:e}));return(0,U.jsxs)(Z,{children:[(0,U.jsxs)(`h1`,{className:`text-lg text-red-500 font-semibold flex items-center gap-2 mb-4`,children:[(0,U.jsx)(ZE,{color:`#AD1A1A`}),`Credentials - This information is sensitive: keep it safe!`]}),n.map(e=>(0,U.jsx)(MLe,{cred:e,envId:r.environmentId,externalHost:t,portMapping:r.portMapping},e.id))]})};function i3({cpuShare:e,containerSize:t}){return(0,U.jsx)(J,{splitWidthInputs:!0,description:`CPU Share is determined by the selected Memory Limit and Container Profile.`,label:`CPU
99Share per Container`,htmlFor:`cpu-share`,children:(0,U.jsx)(X,{className:`flex disabled w-full`,name:`number-containers`,type:`text`,disabled:!0,value:e*t,"data-testid":`number-containers`,id:`number-containers`})})}function a3({scaler:e,dispatchScaler:t,minSize:n=0}){let r=ef(e.containerProfile).filter(e=>e>=n).map(e=>({label:`${e/1024} GB`,value:`${e}`}));return(0,U.jsx)(J,{splitWidthInputs:!0,description:`Specify the memory you wish to allow per container.`,label:`Memory per Container`,htmlFor:`memory-container`,children:(0,U.jsx)(XA,{id:`memory-container`,value:`${e.containerSize}`,onSelect:e=>t({type:`containerSize`,payload:Number.parseInt(e.value)}),options:r})})}function o3({scaler:e,dispatchScaler:t,error:n}){return(0,U.jsx)(J,{splitWidthInputs:!0,description:`Increase max disk space in GBs. Space can only be increased once a day.`,label:`Disk Size`,htmlFor:`disk-size`,feedbackMessage:n,feedbackVariant:n?`danger`:`info`,children:(0,U.jsx)(X,{className:`flex w-full`,name:`disk-size`,type:`number`,value:e.diskSize,min:`10`,onChange:e=>{t({type:`diskSize`,payload:Math.min(16384,Number.parseInt(e.currentTarget.value,10))})},"data-testid":`disk-size`,id:`disk-size`})})}function NLe({scaler:e,dispatchScaler:t}){return(0,U.jsx)(J,{splitWidthInputs:!0,description:`The maximum IOPS is 16,000, but you must meet a minimum ratio of 1 GB disk size per 500 IOPS. For example, to reach 16,000 IOPS, you must have at least a 32 GB or larger disk.`,label:`IOPS`,htmlFor:`iops`,children:(0,U.jsx)(X,{className:`flex w-full`,name:`iops`,type:`number`,value:e.iops,min:`0`,onChange:e=>{t({type:`iops`,payload:Number.parseInt(e.currentTarget.value,10)})},"data-testid":`iops`,id:`iops`})})}function s3({envId:e,scaler:t,dispatchScaler:n}){let r=B(t=>tu(t,{id:e})),i=B(e=>ql(e,{id:r.stackId})),a=Object.keys(i).map(e=>({label:Su(e).name,value:e}));return(0,U.jsx)(J,{splitWidthInputs:!0,description:`Optimize container performance with a custom profile.`,label:`Container Profile`,htmlFor:`container-profile`,children:(0,U.jsx)(XA,{id:`container-profile`,ariaLabel:`container-profile`,disabled:Object.keys(i).length<=1,value:t.containerProfile,onSelect:e=>{n({type:`containerProfile`,payload:e.value})},options:a})})}var c3=({environmentId:e,addLinkToEnvironmentPolicy:t=!1})=>(0,U.jsx)(q,{variant:`error`,children:(0,U.jsxs)(`p`,{children:[(0,U.jsx)(`strong`,{children:`Settings are not configured for use with Point-in-time Recovery for PostgreSQL`}),(0,U.jsx)(`br`,{}),`The `,(0,U.jsx)(`strong`,{children:`Daily Backups Retained`}),` value must be greater than the `,(0,U.jsx)(`strong`,{children:`Days of PITR Data Retained`}),` value. Otherwise, PITR may be unsuccessful in certain circumstances.`,(0,U.jsx)(`a`,{href:`https://www.aptible.com/docs/core-concepts/managed-databases/managing-databases/point-in-time-recovery`,target:`_blank`,rel:`noreferrer`,children:`\xA0View documentation.`}),(0,U.jsx)(`br`,{}),e&&t?(0,U.jsxs)(U.Fragment,{children:[`Edit the settings for these values on`,(0,U.jsx)(P,{to:Ba(e),children:`\xA0the environment's backups settings page`}),`.`]}):null]})}),l3=D(su,Bl,L.costs.selectTable,L.costRates.select,(e,t,n,r)=>e.map(e=>{let i=Rl(t,{id:e.stackId}),a=Zy(n,r,e);return{...e,stackName:i.name,cost:a}}).sort((e,t)=>t.id.localeCompare(e.id,void 0,{numeric:!0}))),PLe=D(l3,(e,t)=>t.stackId,(e,t)=>e.filter(e=>e.stackId===t)),FLe=({env:e})=>(0,U.jsxs)(P,{to:Pa(e.id),className:`flex`,children:[(0,U.jsx)(`img`,{src:`/resource-types/logo-environment.png`,className:`w-[32px] h-[32px] mr-2 align-middle`,"aria-label":`Environment`}),(0,U.jsx)(`p`,{className:`${G.type[`table link`]} leading-8`,children:e.handle})]}),u3={handle:{field:`handle`,headerName:`Environment`,cellRenderer:({data:e})=>(0,U.jsx)(G2,{id:e.id})},id:{field:`id`,headerName:`ID`,valueGetter:({data:e})=>Number.parseInt(e?.id||`0`,10)},totalAppCount:{field:`totalAppCount`,headerName:`Apps`,initialWidth:100,cellRenderer:({data:e})=>(0,U.jsx)(P,{to:Pa(e.id),className:G.type[`table link`],children:e.totalAppCount})},totalDatabaseCount:{field:`totalDatabaseCount`,headerName:`Databases`,initialWidth:100,cellRenderer:({data:e})=>(0,U.jsx)(P,{to:Fa(e.id),className:G.type[`table link`],children:e.totalDatabaseCount})},createdAt:{field:`createdAt`,headerName:`Created At (UTC)`,initialHide:!0,cellRenderer:({data:e})=>(0,U.jsx)(Y2,{date:e.createdAt})},cost:{field:`cost`,headerName:`Est. Monthly Cost`,sort:`desc`,headerTooltip:` 100 This is an estimate of the cost of running the current resources for 101 one month. It is updated automatically as resources are added or 102 scaled. Please note: it does not represent your actual usage for the 103 month and does not reflect contract discounts, custom rates, or 104 allocations. 105 `,cellRenderer:({data:e})=>(0,U.jsx)(q2,{value:e.cost})}},d3=[u3.handle,u3.id,u3.totalAppCount,u3.totalDatabaseCount,u3.createdAt,u3.cost];function ILe(){let e=B($o),{isLoading:t,isInitialLoading:n}=Er([fu,ab({orgId:e}),eb({orgId:e})]),r=N(),i=()=>r(Ya(``)),a=B(l3);return(0,U.jsxs)(W,{size:`xl`,children:[(0,U.jsxs)(W,{variant:`horizontal`,className:`items-center justify-between`,children:[(0,U.jsx)(NU,{description:`Environments in Stacks group resources and share networks with others on the same Stack.`,children:`Environments`}),(0,U.jsxs)(pA,{onClick:i,tooltipProps:{placement:`left`},children:[(0,U.jsx)(qE,{variant:`sm`,className:`mr-2`}),`New Environment`]})]}),(0,U.jsx)(L2,{rowData:a,colDefs:d3,isLoading:!a.length&&(t||n),syncQueryParams:!0})]})}var LLe=()=>(0,U.jsxs)(`div`,{className:`border border-gray-200 rounded-lg bg-white p-10 text-center`,children:[(0,U.jsx)(`h3`,{className:`text-lg font-semibold text-gray-900 mb-2`,children:`No Environments`}),(0,U.jsxs)(`p`,{className:`text-gray-600 max-w-lg mx-auto`,children:[`This stack has no environments or running resources. Create an environment and provision an app or database to get started.`,` `,(0,U.jsx)(`a`,{href:`https://www.aptible.com/docs/core-concepts/architecture/environments#environments`,target:`_blank`,rel:`noreferrer`,className:`text-indigo-600 hover:underline`,children:`Learn more about Environments`})]})]});function RLe({stackId:e}){let t=B($o),{isLoading:n,isInitialLoading:r}=Er([fu,ab({orgId:t}),eb({orgId:t})]),i=N(),a=()=>i(Ya(`stack_id=${e}`)),o=B(t=>PLe(t,{stackId:e})),s=!n&&!r&&o.length===0;return(0,U.jsxs)(W,{size:`lg`,children:[(0,U.jsx)(`div`,{className:`flex justify-end`,children:(0,U.jsxs)(pA,{onClick:a,tooltipProps:{placement:`left`},children:[(0,U.jsx)(qE,{variant:`sm`,className:`mr-2`}),`New Environment`]})}),s?(0,U.jsx)(LLe,{}):(0,U.jsx)(L2,{rowData:o,colDefs:d3,isLoading:!o.length&&(n||r),syncQueryParams:!0})]})}var zLe={daily:e=>{let t=`Number of daily backups`,n=e.daily;if(Number.isNaN(n))return`${t} must be a number`;if(n<=0)return`${t} backups must be > 0`;if(n%1!=0)return`${t} must be whole number`},monthly:e=>{let t=`Number of monthly backups`,n=e.monthly;if(Number.isNaN(n))return`${t} must be a number`;if(n<0)return`${t} must be >= 0`;if(n%1!=0)return`${t} must be whole number`},yearly:e=>{let t=`Number of yearly backups`,n=e.yearly;if(Number.isNaN(n))return`${t} must be a number`;if(n<0)return`${t} must be >= 0`;if(n%1!=0)return`${t} must be whole number`},pitrDays:e=>{let t=`Number of PITR days`,n=e.pitrDays;if(Number.isNaN(n))return`${t} must be a number`;if(n<0)return`${t} must be >= 0`;if(n>1)return`Only 1 day of PITR data may be retained during beta`;if(n%1!=0)return`${t} must be whole number`}},BLe=({envId:e})=>{let{isLoading:t}=u(zv({envId:e})),n=B(t=>Lv(t,{envId:e})),[r,i]=(0,V.useState)(!1),a=[{key:`Daily backups retained`,value:n.daily},{key:`Monthly backups retained`,value:n.monthly},{key:`Yearly backups retained`,value:n.yearly}],o=[{key:`Copy backups to another region`,value:n.makeCopy?`Yes`:`No`},{key:`Keep final backup for deprovisioned databases`,value:n.keepFinal?`Yes`:`No`}],s=[{key:`Point-in-time Recovery for PostgreSQL`,value:n.pitrDays>0?`Enabled`:`Disabled`},{key:`Days of PITR data retained`,value:n.pitrDays}];return t&&!r?null:r?(0,U.jsx)(VLe,{envId:e,onClose:()=>i(!1)}):(0,U.jsxs)(wU,{children:[n.daily<=n.pitrDays?(0,U.jsx)(c3,{}):null,(0,U.jsx)(TU,{title:`Backup Retention Policy`}),(0,U.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-3 gap-8`,children:[(0,U.jsx)(`div`,{className:`flex flex-col gap-4 pr-4`,children:a.map(e=>(0,U.jsx)(DU,{title:e.key,children:e.value},e.key))}),(0,U.jsx)(`div`,{className:`flex flex-col gap-4 pr-4`,children:o.map(e=>(0,U.jsx)(DU,{title:e.key,children:e.value},e.key))}),(0,U.jsx)(`div`,{className:`flex flex-col gap-4 pr-4`,children:s.map(e=>(0,U.jsx)(DU,{title:e.key,children:(0,U.jsxs)(`div`,{children:[e.value,e.helpText&&(0,U.jsxs)(`div`,{className:`text-sm mt-1 text-black`,children:[(0,U.jsx)(`div`,{children:e.helpText}),e.docsUrl&&(0,U.jsx)(`div`,{children:(0,U.jsx)(P,{to:e.docsUrl,target:`_blank`,children:`View Docs`})})]})]})},e.key))})]}),(0,U.jsx)(`hr`,{className:`my-2`}),(0,U.jsx)(`div`,{children:(0,U.jsxs)(bA,{envId:e,onClick:()=>i(!0),variant:`white`,type:`button`,children:[(0,U.jsx)(ME,{variant:`sm`,className:`mr-2`}),`Edit Policy`]})})]})},VLe=({envId:e,onClose:t})=>{let n=N(),r=l();u(zv({envId:e}));let i=B(t=>Lv(t,{envId:e}));u(xp({envId:e}));let a=B(t=>vp(t,{envId:e})),[o,s]=(0,V.useState)(i.daily),[c,d]=(0,V.useState)(i.monthly),[f,p]=(0,V.useState)(i.yearly),[m,h]=(0,V.useState)(i.pitrDays),[g,_]=(0,V.useState)(i.makeCopy?`yes`:`no`),[v,y]=(0,V.useState)(i.keepFinal?`yes`:`no`),[b,x]=(0,V.useState)(!1),[S,C]=QS(zLe),w={daily:o,monthly:c,yearly:f,pitrDays:m,makeCopy:g===`yes`,keepFinal:v===`yes`,id:i.id,envId:e},E=Bv(w),D=Vv({pitrDays:m,envId:e}),O=I(Bv),k=I(D),A=(0,V.useMemo)(()=>a.length>0,[a]),j=e=>{e.preventDefault(),C(w)&&(r(E),m!==i.pitrDays&&r(D))};
105T(k,()=>{n(za(e))});let M=()=>{s(i.daily),d(i.monthly),p(i.yearly),h(i.pitrDays),_(i.makeCopy?`yes`:`no`),y(i.keepFinal?`yes`:`no`)};return(0,V.useEffect)(()=>{M()},[i]),(0,V.useEffect)(()=>{x(o<i.daily||c<i.monthly||f<i.yearly||m<i.pitrDays||g===`no`&&i.makeCopy||v===`no`&&i.keepFinal)},[i,o,c,f,m,g,v]),(0,U.jsx)(Z,{children:(0,U.jsxs)(W,{children:[(0,U.jsx)(`h3`,{className:G.type.h3,children:`Backup Retention Policy`}),(0,U.jsx)(TA,{...O}),(0,U.jsxs)(`form`,{onSubmit:j,className:`flex flex-col gap-2`,children:[(0,U.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-3 gap-20`,children:[(0,U.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,U.jsxs)(J,{label:`Daily backups retained`,htmlFor:`daily`,labelProps:{className:`text-lg font-semibold text-gray-900`},feedbackMessage:S.daily,feedbackVariant:S.daily?`danger`:`info`,children:[(0,U.jsx)(X,{id:`daily`,type:`number`,value:o,onChange:e=>s(Number.parseInt(e.currentTarget.value,10))}),(0,U.jsx)(`p`,{className:`text-sm mt-1 text-black`,children:`Recommendation for production environments: 14-30 daily; non-production environments: 1-14 daily`})]}),(0,U.jsxs)(J,{label:`Monthly backups retained`,htmlFor:`monthly`,labelProps:{className:`text-lg font-semibold text-gray-900`},feedbackMessage:S.monthly,feedbackVariant:S.monthly?`danger`:`info`,children:[(0,U.jsx)(X,{id:`monthly`,type:`number`,value:c,onChange:e=>{d(Number.parseInt(e.currentTarget.value,10))}}),(0,U.jsx)(`p`,{className:`text-sm mt-1 text-black`,children:`Recommendation for production environments: 12 monthly; non-production environments: 0 monthly`})]}),(0,U.jsxs)(J,{label:`Yearly backups retained`,htmlFor:`yearly`,labelProps:{className:`text-lg font-semibold text-gray-900`},feedbackMessage:S.yearly,feedbackVariant:S.yearly?`danger`:`info`,children:[(0,U.jsx)(X,{id:`yearly`,type:`number`,value:f,onChange:e=>{p(Number.parseInt(e.currentTarget.value,10))}}),(0,U.jsx)(`p`,{className:`text-sm mt-1 text-black`,children:`Recommendation for production environments: 5 yearly; non-production environments: 0 yearly`})]})]}),(0,U.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,U.jsxs)(J,{label:`Copy backups to another region`,htmlFor:`make-copy`,labelProps:{className:`text-lg font-semibold text-gray-900`},children:[(0,U.jsxs)(QA,{name:`make-copy`,selected:g,onSelect:e=>_(e),children:[(0,U.jsx)(ZA,{value:`yes`,children:`Yes`}),(0,U.jsx)(ZA,{value:`no`,children:`No`})]}),(0,U.jsx)(`p`,{className:`text-sm mt-1 text-black`,children:`When enabled, Aptible will copy all the backups within that Environment to another region`})]}),(0,U.jsxs)(J,{label:`Keep final backup for deprovisioned databases`,htmlFor:`keep-final`,labelProps:{className:`text-lg font-semibold text-gray-900`},children:[(0,U.jsxs)(QA,{name:`keep-final`,selected:v,onSelect:e=>y(e),children:[(0,U.jsx)(ZA,{value:`yes`,children:`Yes`}),(0,U.jsx)(ZA,{value:`no`,children:`No`})]}),(0,U.jsx)(`p`,{className:`text-sm mt-1 text-black`,children:`When enabled, Aptible will retain the last backup of a Database after you deprovision it`})]})]}),(0,U.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,U.jsx)(J,{label:`Point-in-time Recovery for PostgreSQL`,htmlFor:`pitr-enabled-indicator`,labelProps:{className:`text-lg font-semibold text-gray-900`},description:m===0?(0,U.jsx)(`p`,{children:`Configure PITR days below to enable.`}):void 0,children:(0,U.jsx)(A2,{checked:m>0,disabled:!0,onChange:()=>{},className:`text-sm`,children:`Enabled`})}),(0,U.jsxs)(J,{label:`Days of PITR data retained`,htmlFor:`pitr-days`,labelProps:{className:`text-lg font-semibold text-gray-900`},feedbackMessage:S.pitrDays,feedbackVariant:S.pitrDays?`danger`:`info`,children:[(0,U.jsx)(X,{id:`pitr-days`,type:`number`,min:+!!A,value:m,disabled:m>0,onChange:e=>{h(Number.parseInt(e.currentTarget.value,10))}}),(0,U.jsxs)(`p`,{className:`text-sm mt-1 text-black`,children:[`Need more than one day?`,` `,(0,U.jsx)(P,{to:Po(),target:`_blank`,className:`underline`,children:`Let us know`}),` `]})]})]})]}),(0,U.jsx)(`hr`,{className:`my-2`}),b?(0,U.jsx)(q,{variant:`warning`,children:`Warning: Reducing the number of retained backups, including disabling copies or final backups, will automatically delete existing, automated backups that do not match the new policy. This may result in the permanent loss of backup data and could violate your organization's internal
105compliance controls.`}):null,o<=m?(0,U.jsx)(c3,{}):null,(0,U.jsxs)(`div`,{className:`flex gap-2`,children:[(0,U.jsx)(bA,{type:`submit`,envId:e,isLoading:O.isLoading,children:`Save Policy`}),(0,U.jsx)(K,{type:`button`,onClick:t,variant:`white`,children:`Cancel`})]})]})]})})};function f3({scope:e}){return(0,U.jsx)(KA,{className:`w-[100px] text-center`,children:(0,U.jsxs)(aA,{className:`flex justify-evenly`,text:F_[e],children:[P_[e],` `]})})}function p3({perm:e,isOwnerRole:t=!1}){let n=B(t=>L.permissions.selectById(t,{id:e.inheritedFrom}));return t?(0,U.jsx)(aA,{className:`flex justify-evenly`,fluid:!0,text:`Inherited from Owner Role permissions`,children:(0,U.jsx)(UE,{className:`inline-block`,color:`#4361FF`,title:`Owner Check`})}):I_(e)?(0,U.jsx)(UE,{className:`inline-block`,color:`#00633F`,title:`${P_[e.scope]} Check`}):L_(e)?(0,U.jsx)(aA,{className:`flex justify-evenly`,fluid:!0,text:`Inherited from "${P_[n.scope]}" permission`,children:(0,U.jsx)(UE,{className:`inline-block`,color:`#4361FF`,title:`${P_[e.scope]} Check`})}):(0,U.jsx)(JE,{className:`inline-block`,color:`#AD1A1A`,title:`${P_[e.scope]} Denied`})}function m3({envId:e,orgId:t}){let n=B(e=>Kg(e,{orgId:t})),r=B(tl);u(ol({orgId:t})),u(Zg({orgId:t}));let i=B(t=>E_(t,{envId:e}));return(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`h3`,{className:`text-lg text-gray-500 mb-4`,children:`Permissions`}),(0,U.jsxs)(VA,{children:[(0,U.jsxs)(HA,{children:[(0,U.jsx)(KA,{children:`Role`}),(0,U.jsx)(KA,{variant:`center`,children:`Members`}),(0,U.jsx)(f3,{scope:`admin`}),(0,U.jsx)(f3,{scope:`read`}),(0,U.jsx)(f3,{scope:`basic_read`}),(0,U.jsx)(f3,{scope:`deploy`}),(0,U.jsx)(f3,{scope:`destroy`}),(0,U.jsx)(f3,{scope:`observability`}),(0,U.jsx)(f3,{scope:`sensitive`}),(0,U.jsx)(f3,{scope:`tunnel`})]}),(0,U.jsx)(UA,{children:n.map(e=>(0,U.jsx)(HLe,{role:e,envPerms:i,users:r[e.id]},e.id))})]})]})}function HLe({envPerms:e,role:t,users:n}){let r=e.filter(e=>e.roleId===t.id),i=Wg(t),a=R_(r);return(0,U.jsxs)(WA,{children:[(0,U.jsx)(Y,{children:(0,U.jsx)(P,{to:_i(t.id),className:G.type[`table link`],children:t.name})}),(0,U.jsx)(Y,{variant:`center`,children:n.length===0?(0,U.jsx)(YU,{children:`0`}):(0,U.jsx)(aA,{className:`flex justify-evenly`,text:n.map(e=>e.name).join(`, `),children:(0,U.jsx)(YU,{children:n.length})})}),(0,U.jsx)(Y,{variant:`center`,children:(0,U.jsx)(p3,{perm:a.admin,isOwnerRole:i})}),(0,U.jsx)(Y,{variant:`center`,children:(0,U.jsx)(p3,{perm:a.read,isOwnerRole:i})}),(0,U.jsx)(Y,{variant:`center`,children:(0,U.jsx)(p3,{perm:a.basic_read,isOwnerRole:i})}),(0,U.jsx)(Y,{variant:`center`,children:(0,U.jsx)(p3,{perm:a.deploy,isOwnerRole:i})}),(0,U.jsx)(Y,{variant:`center`,children:(0,U.jsx)(p3,{perm:a.destroy,isOwnerRole:i})}),(0,U.jsx)(Y,{variant:`center`,children:(0,U.jsx)(p3,{perm:a.observability,isOwnerRole:i})}),(0,U.jsx)(Y,{variant:`center`,children:(0,U.jsx)(p3,{perm:a.sensitive,isOwnerRole:i})}),(0,U.jsx)(Y,{variant:`center`,children:(0,U.jsx)(p3,{perm:a.tunnel,isOwnerRole:i})})]})}var ULe=()=>{let e=l(),t=B(Ko),n=B(on),r=I(wc);return t===``?(0,U.jsx)(xE,{}):(0,U.jsx)(`form`,{onSubmit:r=>{r.preventDefault(),e(wc({userId:t,origin:n}))},children:(0,U.jsxs)(`div`,{className:`flex flex-col justify-between`,children:[(0,U.jsx)(TA,{...r}),(0,U.jsx)(K,{className:`semibold`,disabled:t===``,isLoading:r.isLoading,type:`submit`,children:`Resend Verification Email`})]})})},WLe=ln(`modal-portal`),h3=({children:e})=>(0,U.jsx)(`div`,{className:`fixed top-0 left-0 w-screen h-screen flex justify-center items-center bg-opacity-50 bg-black z-10`,children:(0,U.jsx)(`div`,{children:e})}),GLe=()=>{let e=B(L.modal.select);switch(WLe(e),e.type){case Ke.NONE:return null;default:return null}},g3=({title:e,children:t,onChange:n,onOpen:r,onClose:i})=>{let a=(0,V.useRef)(!1),[o,s]=(0,V.useState)(!1);return(0,V.useEffect)(()=>{o&&(a.current=!0),a.current&&(n?.(o),o?r?.():i?.())},[o]),(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`div`,{className:`py-4`,children:[(0,U.jsxs)(`div`,{className:`flex cursor-pointer`,onKeyUp:()=>s(!o),onClick:()=>s(!o),children:[o?(0,U.jsx)(IE,{className:`w-[30px]`}):(0,U.jsx)(PE,{className:`w-[30px]`}),(0,U.jsx)(`span`,{className:`flex-1 font-bold`,children:e})]}),o?(0,U.jsxs)(`div`,{className:`flex mt-2`,children:[(0,U.jsx)(`div`,{className:`w-[30px]`}),(0,U.jsx)(`div`,{className:`flex-1`,children:t})]}):null]}),(0,U.jsx)(`hr`,{className:`my-1`})]})},KLe=()=>(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`h4`,{className:`${G.type.h4} py-4`,children:`How It Works`}),(0,U.jsx)(`hr`,{className:`my-1`}),(0,U.jsxs)(`div`,{children:[(0,U.jsxs)(g3,{title:`How do I deploy an App with GitHub?`,children:[(0,U.jsxs)(`p`,{className:`mb-2`,children:[`Click `,(0,U.jsx)(`strong`,{children:`Deploy from GitHub`}),` and we'll guide you through each step:`]}),(0,U.jsxs)(`ol`,{className:`list-decimal list-inside`,children:[(0,U.jsx)(`li`,{children:`Sign up for an Aptible account`}),(0,U.jsx)(`li`,{children:`Create an environment`}),(0,U.jsxs)(`li`,{children:[`Add our`,` `,(0,U.jsx)(CA,{href:`https://github.com/marketplace/actions/deploy-to-aptible`,children:`GitHub Action`}),` `,`to your repository`]}),(0,U.jsx)(`li`,{children:`Configure your App (e.g. databases, environment variables, services and commands)`}),(0,U.jsx)(`li`,{children:`Push your changes to GitHub`})]})]}),(0,U.jsxs)(g3,{title:`How do I deploy an App with Git Push?`,children:[(0,U.jsxs)(`p`,{className:`mb-2`,children:[`Click `,(0,U.jsx)(`strong`,{children:`Deploy with Git Push`}),` and we'll guide you through each step:`]}),(0,U.jsxs)(`ol`,{className:`list-decimal list-inside`,children:[(0,U.jsx)(`li`,{children:`Sign up for an Aptible account`}),(0,U.jsx)(`li`,{children:`Add an SSH key`}),(0,U.jsx)(`li`,{children:`Create an environment`}),(0,U.jsx)(`li`,{children:`Deploy a starter template or your own custom code`}),(0,U.jsx)(`li`,{children:`Configure your App (e.g. databases, environment variables, services and commands)`}),(0,U.jsxs)(`li`,{children:[`Push your code to Aptible using `,(0,U.jsx)(YU,{children:`git push`})]})]})]}),(0,U.jsx)(g3,{title:`Is my App a good fit for Aptible?`,children:(0,U.jsxs)(`p`,{className:`my-2`,children:[`Broadly speaking, if your App is containerized, and aligns well with the`,` `,(0,U.jsx)(CA,{href:`https://12factor.net/`,variant:`info`,children:`Twelve-Factor`}),` `,`App model, you will find Aptible's features to be familiar and in-line with your expectations.`]})}),(0,U.jsx)(g3,{title:`What if my App isn't containerized?`,children:(0,U.jsx)(`p`,{className:`my-2`,children:`Aptible scans the code you push up and automatically builds a Docker image for you.`})})]})]}),qLe=e=>({none:``,starter:`Get started in a limited trial environment`,growth:`Gain user traction and deliver more functionality`,scale:`Run mission-critical apps at scale without worry`,development:`Develop your prototype with a seamless path to production`,production:`Go to production in your own private network with everything you need to meet compliance requirements`,enterprise:`Leverage Aptible at scale with enterprise features and support for additional compliance frameworks`})[e],_3=[`none`,`starter`,`development`,`growth`,`scale`,`production`,`enterprise`];function JLe(e,t){let n=_3.indexOf(e),r=_3.indexOf(t);return n===-1||r===-1?!1:r<n}var v3=({children:e,title:t=``})=>(0,U.jsxs)(`div`,{className:`flex justify-between`,children:[(0,U.jsx)(`div`,{className:`w-1/3`,children:t}),e]}),y3=({children:e,className:t=``})=>(0,U.jsx)(`div`,{className:`text-center w-1/3 ${t}`,children:e}),YLe=({available:e,contactUs:t,onClick:n,selected:r,paymentRequired:i,onSelectPlanWhenPaymentRequired:a,planId:o,planName:s})=>{let c=I(Tg);return t?(0,U.jsx)(lA,{href:`https://aptible.com/contact`,className:`w-full`,children:`Contact Us`}):r?(0,U.jsx)(`h3`,{className:`text-center my-4 w-full text-md font-semibold text-orange-300 uppercase`,children:`Current Plan`}):!e&&i&&a&&o&&s?(0,U.jsx)(K,{className:`w-full`,onClick:()=>a(o,s),isLoading:c.isLoading,children:`Select plan`}
105):!e&&i?(0,U.jsx)(dA,{to:Eee(),className:`w-full`,children:`Add Payment Method`}):e?(0,U.jsx)(K,{className:`w-full`,onClick:n,isLoading:c.isLoading,requireConfirm:!0,children:`Select Plan`}):(0,U.jsx)(`h3`,{className:`text-center my-4 w-full text-md font-normal text-gray-400`,children:`Unavailable`})},b3=({price:e})=>(0,U.jsx)(`div`,{className:`flex justify-between mb-2`,children:(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`p`,{children:`Starts at`}),(0,U.jsx)(`h3`,{className:G.type.h4,children:e})]})}),x3=({children:e})=>(0,U.jsx)(`li`,{children:(0,U.jsxs)(`div`,{className:`flex my-1 pt-2`,children:[(0,U.jsx)(`div`,{children:(0,U.jsx)(UE,{color:`green`,className:`mr-1 pt-1`})}),(0,U.jsx)(`div`,{className:`pt-1`,children:e})]})}),XLe=({plan:e})=>e.name===`starter`?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(b3,{price:`Free for 30 days`}),(0,U.jsxs)(v3,{children:[(0,U.jsx)(y3,{className:`font-semibold`,children:`Includes`}),(0,U.jsx)(y3,{className:`font-semibold`,children:`Available`})]}),(0,U.jsxs)(v3,{title:`Compute`,children:[(0,U.jsx)(y3,{children:`-`}),(0,U.jsx)(y3,{children:`3 GB`})]}),(0,U.jsxs)(v3,{title:`DB Storage`,children:[(0,U.jsx)(y3,{children:`-`}),(0,U.jsx)(y3,{children:`20 GB`})]}),(0,U.jsxs)(v3,{title:`Endpoints`,children:[(0,U.jsx)(y3,{children:`-`}),(0,U.jsx)(y3,{children:`1`})]}),(0,U.jsxs)(`ul`,{children:[(0,U.jsx)(x3,{children:`Deploy on Shared Stacks (Networking and Compute shared with other Aptible customers)`}),(0,U.jsx)(x3,{children:`Deploy in US East (N. Virginia)`})]})]}):e.name===`growth`?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(b3,{price:`$185/month`}),(0,U.jsxs)(v3,{children:[(0,U.jsx)(y3,{className:`font-semibold`,children:`Includes`}),(0,U.jsx)(y3,{className:`font-semibold`,children:`Available`})]}),(0,U.jsxs)(v3,{title:`Compute`,children:[(0,U.jsx)(y3,{children:`3 GB`}),(0,U.jsx)(y3,{children:`11 GB`})]}),(0,U.jsxs)(v3,{title:`DB Storage`,children:[(0,U.jsx)(y3,{children:`10 GB`}),(0,U.jsx)(y3,{children:`60 GB`})]}),(0,U.jsxs)(v3,{title:`Endpoints`,children:[(0,U.jsx)(y3,{children:`1`}),(0,U.jsx)(y3,{children:`3`})]}),(0,U.jsxs)(`ul`,{children:[(0,U.jsx)(x3,{children:`15% discount on included resources`}),(0,U.jsx)(x3,{children:`Up to 2 concurrent SSH Sessions for temporary container access`}),(0,U.jsx)(x3,{children:`Deploy in 1 region (of your choice)`}),(0,U.jsx)(x3,{children:`Support: Choose from Standard or Premium`}),(0,U.jsx)(x3,{children:`Dedicated Stacks (Isolated Tenancy) Available`}),(0,U.jsx)(x3,{children:`Available HIPAA BAA`})]})]}):e.name===`scale`?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(b3,{price:`$599/month`}),(0,U.jsxs)(v3,{children:[(0,U.jsx)(y3,{className:`font-semibold`,children:`Includes`}),(0,U.jsx)(y3,{className:`font-semibold`,children:`Available`})]}),(0,U.jsxs)(v3,{title:`Compute`,children:[(0,U.jsx)(y3,{children:`10 GB`}),(0,U.jsx)(y3,{children:`40 GB`})]}),(0,U.jsxs)(v3,{title:`DB Storage`,children:[(0,U.jsx)(y3,{children:`100 GB`}),(0,U.jsx)(y3,{children:`200 GB`})]}),(0,U.jsxs)(v3,{title:`Endpoints`,children:[(0,U.jsx)(y3,{children:`4`}),(0,U.jsx)(y3,{children:`20`})]}),(0,U.jsxs)(`ul`,{children:[(0,U.jsx)(x3,{children:`20% discount on included resources`}),(0,U.jsx)(x3,{children:`Up to 3 concurrent SSH Sessions for temporary container access`}),(0,U.jsx)(x3,{children:`Support: Choose from Standard or Premium`}),(0,U.jsx)(x3,{children:`Dedicated Stacks (Isolated Tenancy) available`}),(0,U.jsx)(x3,{children:`Available HIPAA BAA`})]})]}):e.name===`development`?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(b3,{price:`$0/month`}),(0,U.jsxs)(`ul`,{children:[(0,U.jsx)(x3,{children:`Deploy on Shared Stacks (Networking and Compute shared with other Aptible customers)`}),(0,U.jsx)(x3,{children:`Deploy in US East (N. Virginia)`}),(0,U.jsx)(x3,{children:`No limits on available Compute, Database Storage, or Endpoints`}),(0,U.jsx)(x3,{children:`Standard Support`})]})]}):e.name===`production`?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(b3,{price:`$499/month`}),(0,U.jsxs)(`ul`,{children:[(0,U.jsx)(x3,{children:`Deploy in 15+ regions`}),(0,U.jsx)(x3,{children:`Custom Domains for Apps`}),(0,U.jsx)(x3,{children:`Dedicated Stacks (isolated tenancy) available`}),(0,U.jsx)(x3,{children:`Available HIPAA BAA`}),(0,U.jsx)(x3,{children:`Support: Choose from Standard or Premium`})]})]}):(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(b3,{price:`Custom Pricing`}),(0,U.jsxs)(`ul`,{children:[(0,U.jsx)(x3,{children:`99.95% Uptime SLA`}),(0,U.jsx)(x3,{children:`Advanced networking features like IPsec VPNs`}
105),(0,U.jsx)(x3,{children:`Option to self-host in your AWS`}),(0,U.jsx)(x3,{children:`Available HITRUST inheritance and security & compliance consulting`}),(0,U.jsx)(x3,{children:`Support: Choose from Standard, Premium, Enterprise (24/7 response)`}),(0,U.jsx)(x3,{children:`Custom pricing and payment options with annual commitments and payments`})]})]}),ZLe=({plan:e,available:t,selected:n,currentPlanName:r,onSelectPlan:i,paymentRequired:a,onSelectPlanWhenPaymentRequired:o})=>{let s=n?`border-orange-200`:`border-black-100`,c=n?`text-orange-400`:`text-black`,l=n?`bg-orange-100 border-orange-200`:`bg-gray-100 border-gray-200`,u=e.name===`enterprise`||JLe(r,e.name);return(0,U.jsxs)(`div`,{className:`w-full rounded-lg overflow-hidden bg-white pt-8 px-0 mx-0 border ${s} relative mt-4`,children:[(0,U.jsxs)(`div`,{className:`mb-8 mx-auto`,style:{height:135,minWidth:225},children:[(0,U.jsxs)(`div`,{style:{height:95},children:[(0,U.jsx)(`h2`,{className:`text-center ${G.type.h2} ${c}`,children:e.name===`starter`?`Trial`:cl(e.name)}),(0,U.jsx)(`p`,{className:`text-center mt-4 text-sm mx-auto max-w-full md:max-w-[30ch]`,children:qLe(e.name)})]}),(0,U.jsx)(`div`,{className:`mx-4 my-4`,children:(0,U.jsx)(YLe,{available:t,contactUs:u,selected:n,onClick:i,paymentRequired:a,onSelectPlanWhenPaymentRequired:o,planId:e.id,planName:e.name})})]}),(0,U.jsx)(`div`,{className:`px-4 h-full pt-4 pb-14 border-t ${l} text-sm`,children:(0,U.jsx)(XLe,{plan:e})})]})},QLe=({activePlan:e,selected:t,onSelectPlan:n,paymentRequired:r,onSelectPlanWhenPaymentRequired:i})=>{let a=B(vg),o=[a.development,a.production,a.enterprise],s=o;t===`starter`?s=[a.starter].concat(o):t===`growth`?s=[a.growth].concat(o):t===`scale`&&(s=[a.scale].concat(o));let c=`lg:grid-cols-3`;return s.length>3&&(c=`lg:grid-cols-4`),(0,U.jsx)(`div`,{className:`grid ${c} md:grid-cols-2 grid-cols-1 gap-4 lg:mx-0 mx-10`,children:s.map(a=>(0,U.jsx)(ZLe,{plan:a,available:!r&&e.availablePlans.includes(a.name),selected:a.name===t,currentPlanName:t,onSelectPlan:()=>n({planId:a.id,name:a.name}),paymentRequired:r,onSelectPlanWhenPaymentRequired:i},a.name))})},$Le=({plan:e})=>{let t=`list-none pl-0 m-0 pt-0 pb-2`;return e.name===`development`?(0,U.jsxs)(`ul`,{className:t,children:[(0,U.jsx)(x3,{children:`Deploy on Shared Stacks (Networking and Compute shared with other Aptible customers)`}),(0,U.jsx)(x3,{children:`Deploy in US East (N. Virginia)`}),(0,U.jsx)(x3,{children:`No limits on available Compute, Database Storage, or Endpoints`}),(0,U.jsx)(x3,{children:`Standard Support`})]}):e.name===`production`?(0,U.jsxs)(`ul`,{className:t,children:[(0,U.jsx)(x3,{children:`Deploy in 15+ regions`}),(0,U.jsx)(x3,{children:`Custom Domains for Apps`}),(0,U.jsx)(x3,{children:`Dedicated Stacks (isolated tenancy) available`}),(0,U.jsx)(x3,{children:`Available HIPAA BAA`}),(0,U.jsx)(x3,{children:`Support: Choose from Standard or Premium`})]}):(0,U.jsx)(`ul`,{className:t,children:(0,U.jsx)(x3,{children:`You have access to all features included in your plan.`})})},eRe=({text:e})=>{let t=e.split(`-- :`);if(t.length===1)return(0,U.jsx)(`div`,{children:(0,U.jsx)(`span`,{className:`text-lime`,children:t[0]})});let n=t[0].replace(`+0000`,``).replace(/\d\d\d\d-\d\d-\d\d/,``).trim(),r=t[1].trim();return(0,U.jsxs)(`div`,{className:`text-sm`,children:[(0,U.jsxs)(`span`,{className:`text-black-200`,children:[n,`: `]}),(0,U.jsx)(()=>n.endsWith(`ERROR`)?(0,U.jsx)(`span`,{className:`text-red-300 break-all`,children:r}):n.endsWith(`WARN`)?(0,U.jsx)(`span`,{className:`text-orange-400 break-all`,children:r}):(0,U.jsx)(`span`,{className:`text-lime break-all`,children:r}),{})]})},S3=`relative font-mono bg-black p-2 rounded-lg text-black-200 overflow-x`,C3=({allowCopy:e,text:t})=>(0,U.jsxs)(`div`,{className:S3,children:[e?(0,U.jsx)(B2,{placement:`left`,text:t,className:`absolute right-2 top-4`}):null,t.split(` 106`).map((e,t)=>(0,U.jsx)(eRe,{text:e},`log-${t}`))]}),w3=({op:e})=>{let t=Wd({id:e.id}),n=w(t),r=B(e=>L.cache.selectById(e,{id:t.payload.key}));return(0,V.useEffect)(()=>{(e.status===`succeeded`||e.status===`failed`)&&n.trigger()},[e.status]),e.status===`queued`||e.status===`running`?(0,U.jsxs)(`div`,{className:S3,children:[`Operation `,e.status,`, logs will display after operation completes.`]}):n.isInitialLoading?(0,U.jsx)(`div`,{className:S3,children:`Fetching logs...`}):!r||typeof r!=`string`?(0,U.jsx)(`div`,{className:S3,children:`No data found`}):(0,U.jsx)(C3,{allowCopy:!0,text:r})};function tRe(){return{accessor:(e,t)=>
vendor: 42,669 bytes, lines 106-109
106typeof e==`function`?{...t,accessorFn:e}:{...t,accessorKey:e},display:e=>e,group:e=>e}}function T3(e,t){return typeof e==`function`?e(t):e}function E3(e,t){return n=>{t.setState(t=>({...t,[e]:T3(n,t[e])}))}}function D3(e){return e instanceof Function}function nRe(e){return Array.isArray(e)&&e.every(e=>typeof e==`number`)}function rRe(e,t){let n=[],r=e=>{e.forEach(e=>{n.push(e);let i=t(e);i!=null&&i.length&&r(i)})};return r(e),n}function O3(e,t,n){let r=[],i;return a=>{let o;n.key&&n.debug&&(o=Date.now());let s=e(a);if(!(s.length!==r.length||s.some((e,t)=>r[t]!==e)))return i;r=s;let c;if(n.key&&n.debug&&(c=Date.now()),i=t(...s),n==null||n.onChange==null||n.onChange(i),n.key&&n.debug&&n!=null&&n.debug()){let e=Math.round((Date.now()-o)*100)/100,t=Math.round((Date.now()-c)*100)/100,r=t/16,i=(e,t)=>{for(e=String(e);e.length<t;)e=` `+e;return e};console.info(`%câ± ${i(t,5)} /${i(e,5)} ms`,` 107 font-size: .6rem; 108 font-weight: bold; 109 color: hsl(${Math.max(0,Math.min(120-120*r,120))}deg 100% 31%);`,n?.key)}return i}}function k3(e,t,n,r){return{debug:()=>e?.debugAll??e[t],key:!1,onChange:r}}function iRe(e,t,n,r){let i={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(r),renderValue:()=>i.getValue()??e.options.renderFallbackValue,getContext:O3(()=>[e,n,t,i],(e,t,n,r)=>({table:e,column:t,row:n,cell:r,getValue:r.getValue,renderValue:r.renderValue}),k3(e.options,`debugCells`,`cell.getContext`))};return e._features.forEach(r=>{r.createCell==null||r.createCell(i,n,t,e)},{}),i}function aRe(e,t,n,r){let i={...e._getDefaultColumnDef(),...t},a=i.accessorKey,o=i.id??(a?typeof String.prototype.replaceAll==`function`?a.replaceAll(`.`,`_`):a.replace(/\./g,`_`):void 0)??(typeof i.header==`string`?i.header:void 0),s;if(i.accessorFn?s=i.accessorFn:a&&(s=a.includes(`.`)?e=>{let t=e;for(let e of a.split(`.`))t=t?.[e];return t}:e=>e[i.accessorKey]),!o)throw Error();let c={id:`${String(o)}`,accessorFn:s,parent:r,depth:n,columnDef:i,columns:[],getFlatColumns:O3(()=>[!0],()=>[c,...c.columns?.flatMap(e=>e.getFlatColumns())],k3(e.options,`debugColumns`,`column.getFlatColumns`)),getLeafColumns:O3(()=>[e._getOrderColumnsFn()],e=>{var t;return(t=c.columns)!=null&&t.length?e(c.columns.flatMap(e=>e.getLeafColumns())):[c]},k3(e.options,`debugColumns`,`column.getLeafColumns`))};for(let t of e._features)t.createColumn==null||t.createColumn(c,e);return c}var A3=`debugHeaders`;function j3(e,t,n){let r={id:n.id??t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{let e=[],t=n=>{n.subHeaders&&n.subHeaders.length&&n.subHeaders.map(t),e.push(n)};return t(r),e},getContext:()=>({table:e,header:r,column:t})};return e._features.forEach(t=>{t.createHeader==null||t.createHeader(r,e)}),r}var oRe={createTable:e=>{e.getHeaderGroups=O3(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,i)=>{let a=r?.map(e=>n.find(t=>t.id===e)).filter(Boolean)??[],o=i?.map(e=>n.find(t=>t.id===e)).filter(Boolean)??[],s=n.filter(e=>!(r!=null&&r.includes(e.id))&&!(i!=null&&i.includes(e.id)));return M3(t,[...a,...s,...o],e)},k3(e.options,A3,`getHeaderGroups`)),e.getCenterHeaderGroups=O3(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,i)=>(n=n.filter(e=>!(r!=null&&r.includes(e.id))&&!(i!=null&&i.includes(e.id))),M3(t,n,e,`center`)),k3(e.options,A3,`getCenterHeaderGroups`)),e.getLeftHeaderGroups=O3(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,r)=>M3(t,r?.map(e=>n.find(t=>t.id===e)).filter(Boolean)??[],e,`left`),k3(e.options,A3,`getLeftHeaderGroups`)),e.getRightHeaderGroups=O3(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,r)=>M3(t,r?.map(e=>n.find(t=>t.id===e)).filter(Boolean)??[],e,`right`),k3(e.options,A3,`getRightHeaderGroups`)),e.getFooterGroups=O3(()=>[e.getHeaderGroups()],e=>[...e].reverse(),k3(e.options,A3,`getFooterGroups`)),e.getLeftFooterGroups=O3(()=>[e.getLeftHeaderGroups()],e=>[...e].reverse(),k3(e.options,A3,`getLeftFooterGroups`)),e.getCenterFooterGroups=O3(()=>[e.getCenterHeaderGroups()],e=>[...e].reverse(),k3(e.options,A3,`getCenterFooterGroups`)),e.getRightFooterGroups=O3(()=>[e.getRightHeaderGroups()],e=>[...e].reverse(),k3(e.options,A3,`getRightFooterGroups`)),e.getFlatHeaders=O3(()=>[e.getHeaderGroups()],e=>e.map(e=>e.headers).flat(),k3(e.options,A3,`getFlatHeaders`)),e.getLeftFlatHeaders=O3(()=>[e.getLeftHeaderGroups()],e=>e.map(e=>e.headers).flat(),k3(e.options,A3,`getLeftFlatHeaders`)),e.getCenterFlatHeaders=O3(()=>[e.getCenterHeaderGroups()],e=>e.map(e=>e.headers).flat(),k3(e.options,A3,`getCenterFlatHeaders`)),e.getRightFlatHeaders=O3(()=>[e.getRightHeaderGroups()],e=>e.map(e=>e.headers).flat(),k3(e.options,A3,`getRightFlatHeaders`)),e.getCenterLeafHeaders=O3(()=>[e.getCenterFlatHeaders()],e=>e.filter(e=>{var t;return!((t=e.subHeaders)!=null&&t.length)}),k3(e.options,A3,`getCenterLeafHeaders`)),e.getLeftLeafHeaders=O3(()=>[e.getLeftFlatHeaders()],e=>e.filter(e=>{var t;return!((t=e.subHeaders)!=null&&t.length)}),k3(e.options,A3,`getLeftLeafHeaders`)),e.getRightLeafHeaders=O3(()=>[e.getRightFlatHeaders()],e=>e.filter(e=>{var t;return!((t=e.subHeaders)!=null&&t.length)}),k3(e.options,A3,`getRightLeafHeaders`)),e.getLeafHeaders=O3(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(e,t,n)=>[...e[0]?.headers??[],...t[0]?.headers??[],...n[0]?.headers??[]].map(e=>e.getLeafHeaders()).flat(),k3(e.options,A3,`getLeafHeaders`))}};function M3(e,t,n,r){let i=0,a=function(e,t){t===void 0&&(t=1),i=Math.max(i,t),e.filter(e=>e.getIsVisible()).forEach(e=>{var n;(n=e.columns)!=null&&n.length&&a(e.columns,t+1)},0)};a(e);let o=[],s=(e,t)=>{let i={depth:t,id:[r,`${t}`].filter(Boolean).join(`_`),headers:[]},a=[];e.forEach(e=>{let o=[...a].reverse()[0],s=e.column.depth===i.depth,c,l=!1;if(s&&e.column.parent?c=e.column.parent:(c=e.column,l=!0),o&&o?.column===c)o.subHeaders.push(e);else{let i=j3(n,c,{id:[r,t,c.id,e?.id].filter(Boolean).join(`_`),isPlaceholder:l,placeholderId:l?`${a.filter(e=>e.column===c).length}`:void 0,depth:t,index:a.length});i.subHeaders.push(e),a.push(i)}i.headers.push(e),e.headerGroup=i}),o.push(i),t>0&&s(a,t-1)};s(t.map((e,t)=>j3(n,e,{depth:i,index:t})),i-1),o.reverse();let c=e=>e.filter(e=>e.column.getIsVisible()).map(e=>{let t=0,n=0,r=[0];e.subHeaders&&e.subHeaders.length?(r=[],c(e.subHeaders).forEach(e=>{let{colSpan:n,rowSpan:i}=e;t+=n,r.push(i)})):t=1;let i=Math.min(...r);return n+=i,e.colSpan=t,e.rowSpan=n,{colSpan:t,rowSpan:n}});return c(o[0]?.headers??[]),o}var sRe=(e,t,n,r,i,a,o)=>{let s={id:t,index:r,original:n,depth:i,parentId:o,_valuesCache:{},_uniqueValuesCache:{},getValue:t=>{if(s._valuesCache.hasOwnProperty(t))return s._valuesCache[t];let n=e.getColumn(t);if(n!=null&&n.accessorFn)return s._valuesCache[t]=n.accessorFn(s.original,r),s._valuesCache[t]},getUniqueValues:t=>{if(s._uniqueValuesCache.hasOwnProperty(t))return s._uniqueValuesCache[t];let n=e.getColumn(t);if(n!=null&&n.accessorFn)return n.columnDef.getUniqueValues?(s._uniqueValuesCache[t]=n.columnDef.getUniqueValues(s.original,r),s._uniqueValuesCache[t]):(s._uniqueValuesCache[t]=[s.getValue(t)],s._uniqueValuesCache[t])},renderValue:t=>s.getValue(t)??e.options.renderFallbackValue,subRows:a??[],getLeafRows:()=>rRe(s.subRows,e=>e.subRows),getParentRow:()=>s.parentId?e.getRow(s.parentId,!0):void 0,getParentRows:()=>{let e=[],t=s;for(;;){let n=t.getParentRow();if(!n)break;e.push(n),t=n}return e.reverse()},getAllCells:O3(()=>[e.getAllLeafColumns()],t=>t.map(t=>iRe(e,s,t,t.id)),k3(e.options,`debugRows`,`getAllCells`)),_getAllCellsByColumnId:O3(()=>[s.getAllCells()],e=>e.reduce((e,t)=>(e[t.column.id]=t,e),{}),k3(e.options,`debugRows`,`getAllCellsByColumnId`))};for(let t=0;t<e._features.length;t++){let n=e._features[t];n==null||n.createRow==null||n.createRow(s,e)}return s},cRe={createColumn:(e,t)=>{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},N3=(e,t,n)=>{var r,i;let a=n==null||(r=n.toString())==null?void 0:r.toLowerCase();return!!((i=e.getValue(t))!=null&&(i=i.toString())!=null&&(i=i.toLowerCase())!=null&&i.includes(a))};N3.autoRemove=e=>U3(e);var P3=(e,t,n)=>{var r;return!!((r=e.getValue(t))!=null&&(r=r.toString())!=null&&r.includes(n))};P3.autoRemove=e=>U3(e);var F3=(e,t,n)=>{var r;return((r=e.getValue(t))==null||(r=r.toString())==null?void 0:r.toLowerCase())===n?.toLowerCase()};F3.autoRemove=e=>U3(e);var I3=(e,t,n)=>e.getValue(t)?.includes(n);I3.autoRemove=e=>U3(e);var L3=(e,t,n)=>!n.some(n=>{var r;return!((r=e.getValue(t))!=null&&r.includes(n))});L3.autoRemove=e=>U3(e)||!(e!=null&&e.length);var R3=(e,t,n)=>n.some(n=>e.getValue(t)?.includes(n));R3.autoRemove=e=>U3(e)||!(e!=null&&e.length);var z3=(e,t,n)=>e.getValue(t)===n;z3.autoRemove=e=>U3(e);var B3=(e,t,n)=>e.getValue(t)==n;B3.autoRemove=e=>U3(e);var V3=(e,t,n)=>{let[r,i]=n,a=e.getValue(t);return a>=r&&a<=i};V3.resolveFilterValue=e=>{let[t,n]=e,r=typeof t==`number`?t:parseFloat(t),i=typeof n==`number`?n:parseFloat(n),a=t===null||Number.isNaN(r)?-1/0:r,o=n===null||Number.isNaN(i)?1/0:i;if(a>o){let e=a;a=o,o=e}return[a,o]},V3.autoRemove=e=>U3(e)||U3(e[0])&&U3(e[1]);var H3={includesString:N3,includesStringSensitive:P3,equalsString:F3,arrIncludes:I3,arrIncludesAll:L3,arrIncludesSome:R3,equals:z3,weakEquals:B3,inNumberRange:V3};function U3(e){return e==null||e===``}var lRe={getDefaultColumnDef:()=>({filterFn:`auto`}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:E3(`columnFilters`,e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{let n=t.getCoreRowModel().flatRows[0]?.getValue(e.id);return typeof n==`string`?H3.includesString:typeof n==`number`?H3.inNumberRange:typeof n==`boolean`||typeof n==`object`&&n?H3.equals:Array.isArray(n)?H3.arrIncludes:H3.weakEquals},e.getFilterFn=()=>D3(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn===`auto`?e.getAutoFilterFn():t.options.filterFns?.[e.columnDef.filterFn]??H3[e.columnDef.filterFn],e.getCanFilter=()=>(e.columnDef.enableColumnFilter??!0)&&(t.options.enableColumnFilters??!0)&&(t.options.enableFilters??!0)&&!!e.accessorFn,e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return(n=t.getState().columnFilters)==null||(n=n.find(t=>t.id===e.id))==null?void 0:n.value},e.getFilterIndex=()=>t.getState().columnFilters?.findIndex(t=>t.id===e.id)??-1,e.setFilterValue=n=>{t.setColumnFilters(t=>{let r=e.getFilterFn(),i=t?.find(t=>t.id===e.id),a=T3(n,i?i.value:void 0);if(W3(r,a,e))return t?.filter(t=>t.id!==e.id)??[];let o={id:e.id,value:a};return i?t?.map(t=>t.id===e.id?o:t)??[]:t!=null&&t.length?[...t,o]:[o]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{let n=e.getAllLeafColumns();e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(e=>T3(t,e)?.filter(e=>{let t=n.find(t=>t.id===e.id);return!(t&&W3(t.getFilterFn(),e.value,t))}))},e.resetColumnFilters=t=>{e.setColumnFilters(t?[]:e.initialState?.columnFilters??[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function W3(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||t===void 0||typeof t==`string`&&!t}var G3={sum:(e,t,n)=>n.reduce((t,n)=>{let r=n.getValue(e);return t+(typeof r==`number`?r:0)},0),min:(e,t,n)=>{let r;return n.forEach(t=>{let n=t.getValue(e);n!=null&&(r>n||r===void 0&&n>=n)&&(r=n)}),r},max:(e,t,n)=>{let r;return n.forEach(t=>{let n=t.getValue(e);n!=null&&(r<n||r===void 0&&n>=n)&&(r=n)}),r},extent:(e,t,n)=>{let r,i;return n.forEach(t=>{let n=t.getValue(e);n!=null&&(r===void 0?n>=n&&(r=i=n):(r>n&&(r=n),i<n&&(i=n)))}),[r,i]},mean:(e,t)=>{let n=0,r=0;if(t.forEach(t=>{let i=t.getValue(e);i!=null&&(i=+i)>=i&&(++n,r+=i)}),n)return r/n},median:(e,t)=>{if(!t.length)return;let n=t.map(t=>t.getValue(e));if(!nRe(n))return;if(n.length===1)return n[0];let r=Math.floor(n.length/2),i=n.sort((e,t)=>e-t);return n.length%2==0?(i[r-1]+i[r])/2:i[r]},unique:(e,t)=>Array.from(new Set(t.map(t=>t.getValue(e))).values()),uniqueCount:(e,t)=>new Set(t.map(t=>t.getValue(e))).size,count:(e,t)=>t.length},uRe={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t;return((t=e.getValue())==null||t.toString==null?void 0:t.toString())??null},aggregationFn:`auto`}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:E3(`grouping`,e),groupedColumnMode:`reorder`}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(t=>t!=null&&t.includes(e.id)?t.filter(t=>t!==e.id):[...t??[],e.id])},e.getCanGroup=()=>(e.columnDef.enableGrouping??!0)&&(t.options.enableGrouping??!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue),e.getIsGrouped=()=>t.getState().grouping?.includes(e.id),e.getGroupedIndex=()=>t.getState().grouping?.indexOf(e.id),e.getToggleGroupingHandler=()=>{let t=e.getCanGroup();return()=>{t&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{let n=t.getCoreRowModel().flatRows[0]?.getValue(e.id);if(typeof n==`number`)return G3.sum;if(Object.prototype.toString.call(n)===`[object Date]`)return G3.extent},e.getAggregationFn=()=>{if(!e)throw Error();return D3(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn===`auto`?e.getAutoAggregationFn():t.options.aggregationFns?.[e.columnDef.aggregationFn]??G3[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{e.setGrouping(t?[]:e.initialState?.grouping??[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];let r=t.getColumn(n);return r!=null&&r.columnDef.getGroupingValue?(e._groupingValuesCache[n]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,r)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var t;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((t=n.subRows)!=null&&t.length)}}};function dRe(e,t,n){if(!(t!=null&&t.length)||!n)return e;let r=e.filter(e=>!t.includes(e.id));return n===`remove`?r:[...t.map(t=>e.find(e=>e.id===t)).filter(Boolean),...r]}var fRe={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:E3(`columnOrder`,e)}),createColumn:(e,t)=>{e.getIndex=O3(e=>[Z3(t,e)],t=>t.findIndex(t=>t.id===e.id),k3(t.options,`debugColumns`,`getIndex`)),e.getIsFirstColumn=n=>Z3(t,n)[0]?.id===e.id,e.getIsLastColumn=n=>{let r=Z3(t,n);return r[r.length-1]?.id===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{e.setColumnOrder(t?[]:e.initialState.columnOrder??[])},e._getOrderColumnsFn=O3(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(e,t,n)=>r=>{let i=[];if(!(e!=null&&e.length))i=r;else{let t=[...e],n=[...r];for(;n.length&&t.length;){let e=t.shift(),r=n.findIndex(t=>t.id===e);r>-1&&i.push(n.splice(r,1)[0])}i=[...i,...n]}return dRe(i,t,n)},k3(e.options,`debugTable`,`_getOrderColumnsFn`))}},K3=()=>({left:[],right:[]}),pRe={getInitialState:e=>({columnPinning:K3(),...e}),getDefaultOptions:e=>({onColumnPinningChange:E3(`columnPinning`,e)}),createColumn:(e,t)=>{e.pin=n=>{let r=e.getLeafColumns().map(e=>e.id).filter(Boolean);t.setColumnPinning(e=>n===`right`?{left:(e?.left??[]).filter(e=>!(r!=null&&r.includes(e))),right:[...(e?.right??[]).filter(e=>!(r!=null&&r.includes(e))),...r]}:n===`left`?{left:[...(e?.left??[]).filter(e=>!(r!=null&&r.includes(e))),...r],right:(e?.right??[]).filter(e=>!(r!=null&&r.includes(e)))}:{left:(e?.left??[]).filter(e=>!(r!=null&&r.includes(e))),right:(e?.right??[]).filter(e=>!(r!=null&&r.includes(e)))})},e.getCanPin=()=>e.getLeafColumns().some(e=>(e.columnDef.enablePinning??!0)&&(t.options.enableColumnPinning??t.options.enablePinning??!0)),e.getIsPinned=()=>{let n=e.getLeafColumns().map(e=>e.id),{left:r,right:i}=t.getState().columnPinning,a=n.some(e=>r?.includes(e)),o=n.some(e=>i?.includes(e));return a?`left`:o?`right`:!1},e.getPinnedIndex=()=>{var n;let r=e.getIsPinned();return r?((n=t.getState().columnPinning)==null||(n=n[r])==null?void 0:n.indexOf(e.id))??-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=O3(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(e,t,n)=>{let r=[...t??[],...n??[]];return e.filter(e=>!r.includes(e.column.id))},k3(t.options,`debugRows`,`getCenterVisibleCells`)),e.getLeftVisibleCells=O3(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(e,t)=>(t??[]).map(t=>e.find(e=>e.column.id===t)).filter(Boolean).map(e=>({...e,position:`left`})),k3(t.options,`debugRows`,`getLeftVisibleCells`)),e.getRightVisibleCells=O3(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(e,t)=>(t??[]).map(t=>e.find(e=>e.column.id===t)).filter(Boolean).map(e=>({...e,position:`right`})),k3(t.options,`debugRows`,`getRightVisibleCells`))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>e.setColumnPinning(t?K3():e.initialState?.columnPinning??K3()),e.getIsSomeColumnsPinned=t=>{let n=e.getState().columnPinning;return t?!!n[t]?.length:!!(n.left?.length||n.right?.length)},e.getLeftLeafColumns=O3(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(e,t)=>(t??[]).map(t=>e.find(e=>e.id===t)).filter(Boolean),k3(e.options,`debugColumns`,`getLeftLeafColumns`)),e.getRightLeafColumns=O3(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(e,t)=>(t??[]).map(t=>e.find(e=>e.id===t)).filter(Boolean),k3(e.options,`debugColumns`,`getRightLeafColumns`)),e.getCenterLeafColumns=O3(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(e,t,n)=>{let r=[...t??[],...n??[]];return e.filter(e=>!r.includes(e.id))},k3(e.options,`debugColumns`,`getCenterLeafColumns`))}};function mRe(e){return e||(typeof document<`u`?document:null)}var q3={size:150,minSize:20,maxSize:2**53-1},J3=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),hRe={getDefaultColumnDef:()=>q3,getInitialState:e=>({columnSizing:{},columnSizingInfo:J3(),...e}),getDefaultOptions:e=>({columnResizeMode:`onEnd`,columnResizeDirection:`ltr`,onColumnSizingChange:E3(`columnSizing`,e),onColumnSizingInfoChange:E3(`columnSizingInfo`,e)}),createColumn:(e,t)=>{e.getSize=()=>{let n=t.getState().columnSizing[e.id];return Math.min(Math.max(e.columnDef.minSize??q3.minSize,n??e.columnDef.size??q3.size),e.columnDef.maxSize??q3.maxSize)},e.getStart=O3(e=>[e,Z3(t,e),t.getState().columnSizing],(t,n)=>n.slice(0,e.getIndex(t)).reduce((e,t)=>e+t.getSize(),0),k3(t.options,`debugColumns`,`getStart`)),e.getAfter=O3(e=>[e,Z3(t,e),t.getState().columnSizing],(t,n)=>n.slice(e.getIndex(t)+1).reduce((e,t)=>e+t.getSize(),0),k3(t.options,`debugColumns`,`getAfter`)),e.resetSize=()=>{t.setColumnSizing(t=>{let{[e.id]:n,...r}=t;return r})},e.getCanResize=()=>(e.columnDef.enableResizing??!0)&&(t.options.enableColumnResizing??!0),e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let t=0,n=e=>{e.subHeaders.length?e.subHeaders.forEach(n):t+=e.column.getSize()??0};return n(e),t},e.getStart=()=>{if(e.index>0){let t=e.headerGroup.headers[e.index-1];return t.getStart()+t.getSize()}return 0},e.getResizeHandler=n=>{let r=t.getColumn(e.column.id),i=r?.getCanResize();return a=>{if(!r||!i||(a.persist==null||a.persist(),X3(a)&&a.touches&&a.touches.length>1))return;let o=e.getSize(),s=e?e.getLeafHeaders().map(e=>[e.column.id,e.column.getSize()]):[[r.id,r.getSize()]],c=X3(a)?Math.round(a.touches[0].clientX):a.clientX,l={},u=(e,n)=>{typeof n==`number`&&(t.setColumnSizingInfo(e=>{let r=t.options.columnResizeDirection===`rtl`?-1:1,i=(n-(e?.startOffset??0))*r,a=Math.max(i/(e?.startSize??0),-.999999);return e.columnSizingStart.forEach(e=>{let[t,n]=e;l[t]=Math.round(Math.max(n+n*a,0)*100)/100}),{...e,deltaOffset:i,deltaPercentage:a}}),(t.options.columnResizeMode===`onChange`||e===`end`)&&t.setColumnSizing(e=>({...e,...l})))},d=e=>u(`move`,e),f=e=>{u(`end`,e),t.setColumnSizingInfo(e=>({...e,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},p=mRe(n),m={moveHandler:e=>d(e.clientX),upHandler:e=>{p?.removeEventListener(`mousemove`,m.moveHandler),p?.removeEventListener(`mouseup`,m.upHandler),f(e.clientX)}},h={moveHandler:e=>(e.cancelable&&(e.preventDefault(),e.stopPropagation()),d(e.touches[0].clientX),!1),upHandler:e=>{p?.removeEventListener(`touchmove`,h.moveHandler),p?.removeEventListener(`touchend`,h.upHandler),e.cancelable&&(e.preventDefault(),e.stopPropagation()),f(e.touches[0]?.clientX)}},g=gRe()?{passive:!1}:!1;X3(a)?(p?.addEventListener(`touchmove`,h.moveHandler,g),p?.addEventListener(`touchend`,h.upHandler,g)):(p?.addEventListener(`mousemove`,m.moveHandler,g),p?.addEventListener(`mouseup`,m.upHandler,g)),t.setColumnSizingInfo(e=>({...e,startOffset:c,startSize:o,deltaOffset:0,deltaPercentage:0,columnSizingStart:s,isResizingColumn:r.id}))}}},createTable:e=>{e.setColumnSizing=t=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{e.setColumnSizing(t?{}:e.initialState.columnSizing??{})},e.resetHeaderSizeInfo=t=>{e.setColumnSizingInfo(t?J3():e.initialState.columnSizingInfo??J3())},e.getTotalSize=()=>e.getHeaderGroups()[0]?.headers.reduce((e,t)=>e+t.getSize(),0)??0,e.getLeftTotalSize=()=>e.getLeftHeaderGroups()[0]?.headers.reduce((e,t)=>e+t.getSize(),0)??0,e.getCenterTotalSize=()=>e.getCenterHeaderGroups()[0]?.headers.reduce((e,t)=>e+t.getSize(),0)??0,e.getRightTotalSize=()=>e.getRightHeaderGroups()[0]?.headers.reduce((e,t)=>e+t.getSize(),0)??0}},Y3=null;function gRe(){if(typeof Y3==`boolean`)return Y3;let e=!1;try{let t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener(`test`,n,t),window.removeEventListener(`test`,n)}catch{e=!1}return Y3=e,Y3}function X3(e){return e.type===`touchstart`}var _Re={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:E3(`columnVisibility`,e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(t=>({...t,[e.id]:n??!e.getIsVisible()}))},e.getIsVisible=()=>{let n=e.columns;return(n.length?n.some(e=>e.getIsVisible()):t.getState().columnVisibility?.[e.id])??!0},e.getCanHide=()=>(e.columnDef.enableHiding??!0)&&(t.options.enableHiding??!0),e.getToggleVisibilityHandler=()=>t=>{e.toggleVisibility==null||e.toggleVisibility(t.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=O3(()=>[e.getAllCells(),t.getState().columnVisibility],e=>e.filter(e=>e.column.getIsVisible()),k3(t.options,`debugRows`,`_getAllVisibleCells`)),e.getVisibleCells=O3(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(e,t,n)=>[...e,...t,...n],k3(t.options,`debugRows`,`getVisibleCells`))},createTable:e=>{let t=(t,n)=>O3(()=>[n(),n().filter(e=>e.getIsVisible()).map(e=>e.id).join(`_`)],e=>e.filter(e=>e.getIsVisible==null?void 0:e.getIsVisible()),k3(e.options,`debugColumns`,t));e.getVisibleFlatColumns=t(`getVisibleFlatColumns`,()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t(`getVisibleLeafColumns`,()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t(`getLeftVisibleLeafColumns`,()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t(`getRightVisibleLeafColumns`,()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t(`getCenterVisibleLeafColumns`,()=>e.getCenterLeafColumns()),e.setColumnVisibility=t=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(t),e.resetColumnVisibility=t=>{e.setColumnVisibility(t?{}:e.initialState.columnVisibility??{})},e.toggleAllColumnsVisible=t=>{t??=!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((e,n)=>({...e,[n.id]:t||!(n.getCanHide!=null&&n.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(e=>!(e.getIsVisible!=null&&e.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(e=>e.getIsVisible==null?void 0:e.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>t=>{e.toggleAllColumnsVisible(t.target?.checked)}}};function Z3(e,t){return t?t===`center`?e.getCenterVisibleLeafColumns():t===`left`?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}var vRe={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,`__global__`),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,`__global__`),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,`__global__`),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},yRe={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:E3(`globalFilter`,e),globalFilterFn:`auto`,getColumnCanGlobalFilter:t=>{var n;let r=(n=e.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[t.id])==null?void 0:n.getValue();return typeof r==`string`||typeof r==`number`}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>(e.columnDef.enableGlobalFilter??!0)&&(t.options.enableGlobalFilter??!0)&&(t.options.enableFilters??!0)&&((t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))??!0)&&!!e.accessorFn},createTable:e=>{e.getGlobalAutoFilterFn=()=>H3.includesString,e.getGlobalFilterFn=()=>{let{globalFilterFn:t}=e.options;return D3(t)?t:t===`auto`?e.getGlobalAutoFilterFn():e.options.filterFns?.[t]??H3[t]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},bRe={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:E3(`expanded`,e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{if(!t){e._queue(()=>{t=!0});return}if(e.options.autoResetAll??e.options.autoResetExpanded??!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}},e.setExpanded=t=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(t),e.toggleAllRowsExpanded=t=>{t??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=t=>{e.setExpanded(t?{}:e.initialState?.expanded??{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(e=>e.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>t=>{t.persist==null||t.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{let t=e.getState().expanded;return t===!0||Object.values(t).some(Boolean)},e.getIsAllRowsExpanded=()=>{let t=e.getState().expanded;return typeof t==`boolean`?t===!0:!(!Object.keys(t).length||e.getRowModel().flatRows.some(e=>!e.getIsExpanded()))},e.getExpandedDepth=()=>{let t=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(e=>{let n=e.split(`.`);t=Math.max(t,n.length)}),t},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded(r=>{let i=r===!0||!!(r!=null&&r[e.id]),a={};if(r===!0?Object.keys(t.getRowModel().rowsById).forEach(e=>{a[e]=!0}):a=r,n??=!i,!i&&n)return{...a,[e.id]:!0};if(i&&!n){let{[e.id]:t,...n}=a;return n}return r})},e.getIsExpanded=()=>{let n=t.getState().expanded;return!!((t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))??(n===!0||n?.[e.id]))},e.getCanExpand=()=>{var n;return(t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))??((t.options.enableExpanding??!0)&&!!((n=e.subRows)!=null&&n.length))},e.getIsAllParentsExpanded=()=>{let n=!0,r=e;for(;n&&r.parentId;)r=t.getRow(r.parentId,!0),n=r.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{let t=e.getCanExpand();return()=>{t&&e.toggleExpanded()}}}},Q3=0,$3=10,e6=()=>({pageIndex:Q3,pageSize:$3}),xRe={getInitialState:e=>({...e,pagination:{...e6(),...e?.pagination}}),getDefaultOptions:e=>({onPaginationChange:E3(`pagination`,e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{if(!t){e._queue(()=>{t=!0});return}if(e.options.autoResetAll??e.options.autoResetPageIndex??!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=t=>e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(e=>T3(t,e)),e.resetPagination=t=>{e.setPagination(t?e6():e.initialState.pagination??e6())},e.setPageIndex=t=>{e.setPagination(n=>{let r=T3(t,n.pageIndex),i=e.options.pageCount===void 0||e.options.pageCount===-1?2**53-1:e.options.pageCount-1;return r=Math.max(0,Math.min(r,i)),{...n,pageIndex:r}})},e.resetPageIndex=t=>{var n;e.setPageIndex(t?Q3:((n=e.initialState)==null||(n=n.pagination)==null?void 0:n.pageIndex)??Q3)},e.resetPageSize=t=>{var n;e.setPageSize(t?$3:((n=e.initialState)==null||(n=n.pagination)==null?void 0:n.pageSize)??$3)},e.setPageSize=t=>{e.setPagination(e=>{let n=Math.max(1,T3(t,e.pageSize)),r=e.pageSize*e.pageIndex,i=Math.floor(r/n);return{...e,pageIndex:i,pageSize:n}})},e.setPageCount=t=>e.setPagination(n=>{let r=T3(t,e.options.pageCount??-1);return typeof r==`number`&&(r=Math.max(-1,r)),{...n,pageCount:r}}),e.getPageOptions=O3(()=>[e.getPageCount()],e=>{let t=[];return e&&e>0&&(t=[...Array(e)].fill(null).map((e,t)=>t)),t},k3(e.options,`debugTable`,`getPageOptions`)),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{let{pageIndex:t}=e.getState().pagination,n=e.getPageCount();return n===-1||n!==0&&t<n-1},e.previousPage=()=>e.setPageIndex(e=>e-1),e.nextPage=()=>e.setPageIndex(e=>e+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>e.options.pageCount??Math.ceil(e.getRowCount()/e.getState().pagination.pageSize),e.getRowCount=()=>e.options.rowCount??e.getPrePaginationRowModel().rows.length}},t6=()=>({top:[],bottom:[]}),SRe={getInitialState:e=>({rowPinning:t6(),...e}),getDefaultOptions:e=>({onRowPinningChange:E3(`rowPinning`,e)}),createRow:(e,t)=>{e.pin=(n,r,i)=>{let a=r?e.getLeafRows().map(e=>{let{id:t}=e;return t}):[],o=i?e.getParentRows().map(e=>{let{id:t}=e;return t}):[],s=new Set([...o,e.id,...a]);t.setRowPinning(e=>n===`bottom`?{top:(e?.top??[]).filter(e=>!(s!=null&&s.has(e))),bottom:[...(e?.bottom??[]).filter(e=>!(s!=null&&s.has(e))),...Array.from(s)]}:n===`top`?{top:[...(e?.top??[]).filter(e=>!(s!=null&&s.has(e))),...Array.from(s)],bottom:(e?.bottom??[]).filter(e=>!(s!=null&&s.has(e)))}:{top:(e?.top??[]).filter(e=>!(s!=null&&s.has(e))),bottom:(e?.bottom??[]).filter(e=>!(s!=null&&s.has(e)))})},e.getCanPin=()=>{let{enableRowPinning:n,enablePinning:r}=t.options;return typeof n==`function`?n(e):n??r??!0},e.getIsPinned=()=>{let n=[e.id],{top:r,bottom:i}=t.getState().rowPinning,a=n.some(e=>r?.includes(e)),o=n.some(e=>i?.includes(e));return a?`top`:o?`bottom`:!1},e.getPinnedIndex=()=>{let n=e.getIsPinned();return n?((n===`top`?t.getTopRows():t.getBottomRows())?.map(e=>{let{id:t}=e;return t}))?.indexOf(e.id)??-1:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>e.setRowPinning(t?t6():e.initialState?.rowPinning??t6()),e.getIsSomeRowsPinned=t=>{let n=e.getState().rowPinning;return t?!!n[t]?.length:!!(n.top?.length||n.bottom?.length)},e._getPinnedRows=(t,n,r)=>(e.options.keepPinnedRows??!0?(n??[]).map(t=>{let n=e.getRow(t,!0);return n.getIsAllParentsExpanded()?n:null}):(n??[]).map(e=>t.find(t=>t.id===e))).filter(Boolean).map(e=>({...e,position:r})),e.getTopRows=O3(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,`top`),k3(e.options,`debugRows`,`getTopRows`)),e.getBottomRows=O3(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,`bottom`),k3(e.options,`debugRows`,`getBottomRows`)),e.getCenterRows=O3(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(e,t,n)=>{let r=new Set([...t??[],...n??[]]);return e.filter(e=>!r.has(e.id))},k3(e.options,`debugRows`,`getCenterRows`))}},CRe={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:E3(`rowSelection`,e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>e.setRowSelection(t?{}:e.initialState.rowSelection??{}),e.toggleAllRowsSelected=t=>{e.setRowSelection(n=>{t=t===void 0?!e.getIsAllRowsSelected():t;let r={...n},i=e.getPreGroupedRowModel().flatRows;return t?i.forEach(e=>{e.getCanSelect()&&(r[e.id]=!0)}):i.forEach(e=>{delete r[e.id]}),r})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{let r=t===void 0?!e.getIsAllPageRowsSelected():t,i={...n};return e.getRowModel().rows.forEach(t=>{n6(i,t.id,r,!0,e)}),i}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=O3(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?r6(e,n):{rows:[],flatRows:[],rowsById:{}},k3(e.options,`debugTable`,`getSelectedRowModel`)),e.getFilteredSelectedRowModel=O3(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?r6(e,n):{rows:[],flatRows:[],rowsById:{}},k3(e.options,`debugTable`,`getFilteredSelectedRowModel`)),e.getGroupedSelectedRowModel=O3(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?r6(e,n):{rows:[],flatRows:[],rowsById:{}},k3(e.options,`debugTable`,`getGroupedSelectedRowModel`)),e.getIsAllRowsSelected=()=>{let t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState(),r=!!(t.length&&Object.keys(n).length);return r&&t.some(e=>e.getCanSelect()&&!n[e.id])&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{let t=e.getPaginationRowModel().flatRows.filter(e=>e.getCanSelect()),{rowSelection:n}=e.getState(),r=!!t.length;return r&&t.some(e=>!n[e.id])&&(r=!1),r},e.getIsSomeRowsSelected=()=>{let t=Object.keys(e.getState().rowSelection??{}).length;return t>0&&t<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{let t=e.getPaginationRowModel().flatRows;return!e.getIsAllPageRowsSelected()&&t.filter(e=>e.getCanSelect()).some(e=>e.getIsSelected()||e.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,r)=>{let i=e.getIsSelected();t.setRowSelection(a=>{if(n=n===void 0?!i:n,e.getCanSelect()&&i===n)return a;let o={...a};return n6(o,e.id,n,r?.selectChildren??!0,t),o})},e.getIsSelected=()=>{let{rowSelection:n}=t.getState();return i6(e,n)},e.getIsSomeSelected=()=>{let{rowSelection:n}=t.getState();return a6(e,n)===`some`},e.getIsAllSubRowsSelected=()=>{let{rowSelection:n}=t.getState();return a6(e,n)===`all`},e.getCanSelect=()=>typeof t.options.enableRowSelection==`function`?t.options.enableRowSelection(e):t.options.enableRowSelection??!0,e.getCanSelectSubRows=()=>typeof t.options.enableSubRowSelection==`function`?t.options.enableSubRowSelection(e):t.options.enableSubRowSelection??!0,e.getCanMultiSelect=()=>typeof t.options.enableMultiRowSelection==`function`?t.options.enableMultiRowSelection(e):t.options.enableMultiRowSelection??!0,e.getToggleSelectedHandler=()=>{let t=e.getCanSelect();return n=>{t&&e.toggleSelected(n.target?.checked)}}}},n6=(e,t,n,r,i)=>{var a;let o=i.getRow(t,!0);n?(o.getCanMultiSelect()||Object.keys(e).forEach(t=>delete e[t]),o.getCanSelect()&&(e[t]=!0)):delete e[t],r&&(a=o.subRows)!=null&&a.length&&o.getCanSelectSubRows()&&o.subRows.forEach(t=>n6(e,t.id,n,r,i))};function r6(e,t){let n=e.getState().rowSelection,r=[],i={},a=function(e,t){return e.map(e=>{var t;let o=i6(e,n);if(o&&(r.push(e),i[e.id]=e),(t=e.subRows)!=null&&t.length&&(e={...e,subRows:a(e.subRows)}),o)return e}).filter(Boolean)};return{rows:a(t.rows),flatRows:r,rowsById:i}}function i6(e,t){return t[e.id]??!1}function a6(e,t,n){var r;if(!((r=e.subRows)!=null&&r.length))return!1;let i=!0,a=!1;return e.subRows.forEach(e=>{if((!a||i)&&(e.getCanSelect()&&(i6(e,t)?a=!0:i=!1),e.subRows&&e.subRows.length)){let n=a6(e,t);n===`all`?a=!0:(n===`some`&&(a=!0),i=!1)}}),i?`all`:a?`some`:!1}var o6=/([0-9]+)/gm,wRe=(e,t,n)=>l6(c6(e.getValue(n)).toLowerCase(),c6(t.getValue(n)).toLowerCase()),TRe=(e,t,n)=>l6(c6(e.getValue(n)),c6(t.getValue(n))),ERe=(e,t,n)=>s6(c6(e.getValue(n)).toLowerCase(),c6(t.getValue(n)).toLowerCase()),DRe=(e,t,n)=>s6(c6(e.getValue(n)),c6(t.getValue(n))),ORe=(e,t,n)=>{let r=e.getValue(n),i=t.getValue(n);return r>i?1:r<i?-1:0},kRe=(e,t,n)=>s6(e.getValue(n),t.getValue(n));function s6(e,t){return e===t?0:e>t?1:-1}function c6(e){return typeof e==`number`?isNaN(e)||e===1/0||e===-1/0?``:String(e):typeof e==`string`?e:``}function l6(e,t){let n=e.split(o6).filter(Boolean),r=t.split(o6).filter(Boolean);for(;n.length&&r.length;){let e=n.shift(),t=r.shift(),i=parseInt(e,10),a=parseInt(t,10),o=[i,a].sort();if(isNaN(o[0])){if(e>t)return 1;if(t>e)return-1;continue}if(isNaN(o[1]))return isNaN(i)?-1:1;if(i>a)return 1;if(a>i)return-1}return n.length-r.length}var u6={alphanumeric:wRe,alphanumericCaseSensitive:TRe,text:ERe,textCaseSensitive:DRe,datetime:ORe,basic:kRe},ARe=[oRe,_Re,fRe,pRe,cRe,lRe,vRe,yRe,{getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:`auto`,sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:E3(`sorting`,e),isMultiSortEvent:e=>e.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{let n=t.getFilteredRowModel().flatRows.slice(10),r=!1;for(let t of n){let n=t?.getValue(e.id);if(Object.prototype.toString.call(n)===`[object Date]`)return u6.datetime;if(typeof n==`string`&&(r=!0,n.split(o6).length>1))return u6.alphanumeric}return r?u6.text:u6.basic},e.getAutoSortDir=()=>typeof t.getFilteredRowModel().flatRows[0]?.getValue(e.id)==`string`?`asc`:`desc`,e.getSortingFn=()=>{if(!e)throw Error();return D3(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn===`auto`?e.getAutoSortingFn():t.options.sortingFns?.[e.columnDef.sortingFn]??u6[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{let i=e.getNextSortingOrder(),a=n!=null;t.setSorting(o=>{let s=o?.find(t=>t.id===e.id),c=o?.findIndex(t=>t.id===e.id),l=[],u,d=a?n:i===`desc`;return u=o!=null&&o.length&&e.getCanMultiSort()&&r?s?`toggle`:`add`:o!=null&&o.length&&c!==o.length-1?`replace`:s?`toggle`:`replace`,u===`toggle`&&(a||i||(u=`remove`)),u===`add`?(l=[...o,{id:e.id,desc:d}],l.splice(0,l.length-(t.options.maxMultiSortColCount??2**53-1))):l=u===`toggle`?o.map(t=>t.id===e.id?{...t,desc:d}:t):u===`remove`?o.filter(t=>t.id!==e.id):[{id:e.id,desc:d}],l})},e.getFirstSortDir=()=>e.columnDef.sortDescFirst??t.options.sortDescFirst??e.getAutoSortDir()===`desc`?`desc`:`asc`,e.getNextSortingOrder=n=>{let r=e.getFirstSortDir(),i=e.getIsSorted();return i?i!==r&&(t.options.enableSortingRemoval??!0)&&(!n||(t.options.enableMultiRemove??!0))?!1:i===`desc`?`asc`:`desc`:r},e.getCanSort=()=>(e.columnDef.enableSorting??!0)&&(t.options.enableSorting??!0)&&!!e.accessorFn,e.getCanMultiSort=()=>e.columnDef.enableMultiSort??t.options.enableMultiSort??!!e.accessorFn,e.getIsSorted=()=>{let n=t.getState().sorting?.find(t=>t.id===e.id);return n?n.desc?`desc`:`asc`:!1},e.getSortIndex=()=>t.getState().sorting?.findIndex(t=>t.id===e.id)??-1,e.clearSorting=()=>{t.setSorting(t=>t!=null&&t.length?t.filter(t=>t.id!==e.id):[])},e.getToggleSortingHandler=()=>{let n=e.getCanSort();return r=>{n&&(r.persist==null||r.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(r):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{e.setSorting(t?[]:e.initialState?.sorting??[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},uRe,bRe,xRe,SRe,CRe,hRe];function jRe(e){let t=[...ARe,...e._features??[]],n={_features:t},r=n._features.reduce((e,t)=>
109Object.assign(e,t.getDefaultOptions==null?void 0:t.getDefaultOptions(n)),{}),i=e=>n.options.mergeOptions?n.options.mergeOptions(r,e):{...r,...e},a={...e.initialState??{}};n._features.forEach(e=>{a=(e.getInitialState==null?void 0:e.getInitialState(a))??a});let o=[],s=!1,c={_features:t,options:{...r,...e},initialState:a,_queue:e=>{o.push(e),s||(s=!0,Promise.resolve().then(()=>{for(;o.length;)o.shift()();s=!1}).catch(e=>setTimeout(()=>{throw e})))},reset:()=>{n.setState(n.initialState)},setOptions:e=>{let t=T3(e,n.options);n.options=i(t)},getState:()=>n.options.state,setState:e=>{n.options.onStateChange==null||n.options.onStateChange(e)},_getRowId:(e,t,r)=>(n.options.getRowId==null?void 0:n.options.getRowId(e,t,r))??`${r?[r.id,t].join(`.`):t}`,getCoreRowModel:()=>(n._getCoreRowModel||=n.options.getCoreRowModel(n),n._getCoreRowModel()),getRowModel:()=>n.getPaginationRowModel(),getRow:(e,t)=>{let r=(t?n.getPrePaginationRowModel():n.getRowModel()).rowsById[e];if(!r&&(r=n.getCoreRowModel().rowsById[e],!r))throw Error();return r},_getDefaultColumnDef:O3(()=>[n.options.defaultColumn],e=>(e??={},{header:e=>{let t=e.header.column.columnDef;return t.accessorKey?t.accessorKey:t.accessorFn?t.id:null},cell:e=>{var t;return((t=e.renderValue())==null||t.toString==null?void 0:t.toString())??null},...n._features.reduce((e,t)=>Object.assign(e,t.getDefaultColumnDef==null?void 0:t.getDefaultColumnDef()),{}),...e}),k3(e,`debugColumns`,`_getDefaultColumnDef`)),_getColumnDefs:()=>n.options.columns,getAllColumns:O3(()=>[n._getColumnDefs()],e=>{let t=function(e,r,i){return i===void 0&&(i=0),e.map(e=>{let a=aRe(n,e,i,r),o=e;return a.columns=o.columns?t(o.columns,a,i+1):[],a})};return t(e)},k3(e,`debugColumns`,`getAllColumns`)),getAllFlatColumns:O3(()=>[n.getAllColumns()],e=>e.flatMap(e=>e.getFlatColumns()),k3(e,`debugColumns`,`getAllFlatColumns`)),_getAllFlatColumnsById:O3(()=>[n.getAllFlatColumns()],e=>e.reduce((e,t)=>(e[t.id]=t,e),{}),k3(e,`debugColumns`,`getAllFlatColumnsById`)),getAllLeafColumns:O3(()=>[n.getAllColumns(),n._getOrderColumnsFn()],(e,t)=>t(e.flatMap(e=>e.getLeafColumns())),k3(e,`debugColumns`,`getAllLeafColumns`)),getColumn:e=>n._getAllFlatColumnsById()[e]};Object.assign(n,c);for(let e=0;e<n._features.length;e++){let t=n._features[e];t==null||t.createTable==null||t.createTable(n)}return n}function MRe(){return e=>O3(()=>[e.options.data],t=>{let n={rows:[],flatRows:[],rowsById:{}},r=function(t,i,a){i===void 0&&(i=0);let o=[];for(let c=0;c<t.length;c++){let l=sRe(e,e._getRowId(t[c],c,a),t[c],c,i,void 0,a?.id);if(n.flatRows.push(l),n.rowsById[l.id]=l,o.push(l),e.options.getSubRows){var s;l.originalSubRows=e.options.getSubRows(t[c],c),(s=l.originalSubRows)!=null&&s.length&&(l.subRows=r(l.originalSubRows,i+1,l))}}return o};return n.rows=r(t),n},k3(e.options,`debugTable`,`getRowModel`,()=>e._autoResetPageIndex()))}function d6(e,t){return e?NRe(e)?V.createElement(e,t):e:null}function NRe(e){return PRe(e)||typeof e==`function`||FRe(e)}function PRe(e){return typeof e==`function`&&(()=>{let t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function FRe(e){return typeof e==`object`&&typeof e.$$typeof==`symbol`&&[`react.memo`,`react.forward_ref`].includes(e.$$typeof.description)}function IRe(e){let t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=V.useState(()=>({current:jRe(t)})),[r,i]=V.useState(()=>n.current.initialState);return n.current.setOptions(t=>({...t,...e,state:{...r,...e.state},onStateChange:t=>{i(t),e.onStateChange==null||e.onStateChange(t)}})),n.current}var LRe=[`app`,`backup`,`certificates`,`credentials`,`database`,`ephemeral_session`,`environment`,`horizontal_scale`,`image`,`llm_key`,`log_drain`,`metric_drain`,`plan`,`service`,`service_deployment_update`,`unknown`,`vhost`],RRe=e=>{switch(e.toLowerCase()){case`activityexport`:return(0,U.jsx)(aD,{});case`app`:return(0,U.jsx)(OD,{});case`backup`:case`database`:return(0,U.jsx)(MD,{});case`endpoint`:return(0,U.jsx)(fD,{});case`environment`:return(0,U.jsx)(FD,{});case`externalawsaccount`:case`externalawsresource`:return(0,U.jsx)(DD,{});case`llmkey`:return(0,U.jsx)(mD,{});case`logdrain`:return(0,U.jsx)(BD,{});case`membership`:case`role`:case`user`:return(0,U.jsx)(kD,{});case`metricdrain`:return(0,U.jsx)(ND,{});case`operation`:return(0,U.jsx)(PD,{});case`orgnanization`:return(0,U.jsx)(HD,{});case`service`:case`service_sizing_policy`:case`service_sizing_policy_membership`:return(0,U.jsx)(pD,{});case`vpntunnel`:return(0,U.jsx)(hD,{});default:return(0,U.jsx)(UD,{})}},zRe=e=>{let t=LRe.includes(e)?`/resource-types/logo-${e}.png`:`/resource-types/logo-unknown.png`;return(0,U.jsx)(`img`,{src:t,className:`w-[32px] h-[32px] mr-2 mt-1 align-middle`,"aria-label":e})};function f6(e){let[t,n]=(0,V.useState)(!1),r=(0,V.useRef)(null),i=(0,V.useRef)(null);return(0,V.useEffect)(()=>()=>{r.current?.disconnect(),i.current?.disconnect()},[]),{ref:(0,V.useCallback)(t=>{if(r.current?.disconnect(),i.current?.disconnect(),!t)return;let a=()=>{let r=e===`width`?t.scrollWidth>t.clientWidth:t.scrollHeight>t.clientHeight;n(e=>e===r?e:r)};
109a(),r.current=new ResizeObserver(()=>{a()}),r.current.observe(t),i.current=new MutationObserver(()=>{requestAnimationFrame(a)}),i.current.observe(t,{childList:!0,characterData:!0,subtree:!0})},[e]),isTruncated:t}}var p6=tRe(),m6=(e,t)=>{if(!t||!e)return e;let n=RegExp(`(${t.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)})`,`gi`);return e.split(n).map((e,t)=>n.test(e)?(0,U.jsx)(`mark`,{style:{backgroundColor:`#FEF08A`,padding:`0`,margin:`0`},children:e},t):e)};function BRe({activity:e,query:t}){let n=hce(e),r=n?`Operation:`:`Activity:`,i=n??e.id,a=fo(e.id),o=e.title||zC(e.activityType),{ref:s,isTruncated:c}=f6(`width`),{ref:l,isTruncated:u}=f6(`width`);return(0,U.jsxs)(`div`,{className:`min-w-0`,children:[(0,U.jsxs)(`div`,{className:`relative group/opTitle min-w-0`,children:[(0,U.jsx)(P,{to:a,className:(0,H.default)(G.type[`table link`],`block`),children:(0,U.jsx)(`div`,{ref:s,className:`truncate`,children:o})}),c&&(0,U.jsx)(`div`,{className:`hidden group-hover/opTitle:block absolute bottom-full left-0 mb-1 px-2 py-1 bg-black/85 text-white text-sm rounded whitespace-normal z-50 max-w-sm`,children:m6(o,t||``)})]}),(0,U.jsxs)(`div`,{className:`flex items-center gap-1 text-gray-500 text-sm group/opid min-w-0`,children:[(0,U.jsxs)(`div`,{className:`relative group/opIdText min-w-0`,children:[(0,U.jsxs)(`div`,{ref:l,className:`truncate border-b border-dotted border-gray-400 group-hover/opid:text-indigo`,children:[(0,U.jsxs)(`span`,{children:[r,` `]}),(0,U.jsx)(`span`,{children:m6(i,t||``)})]}),u&&(0,U.jsxs)(`div`,{className:`hidden group-hover/opIdText:block absolute bottom-full left-0 mb-1 px-2 py-1 bg-black/85 text-white text-sm rounded whitespace-normal z-50 max-w-sm`,children:[r,` `,m6(i,t||``)]})]}),(0,U.jsx)(`span`,{className:`invisible group-hover/opid:visible inline-flex shrink-0`,children:(0,U.jsx)(B2,{text:i})})]})]})}function VRe({activity:e,query:t}){let{ref:n,isTruncated:r}=f6(`width`);return e.summary?(0,U.jsxs)(`div`,{className:`relative group/summary min-w-0`,children:[(0,U.jsx)(`div`,{ref:n,className:`text-sm text-gray-700 truncate`,children:m6(e.summary,t||``)}),r&&(0,U.jsx)(`div`,{className:`hidden group-hover/summary:block absolute bottom-full left-0 mb-1 px-2 py-1 bg-black/85 text-white text-sm rounded whitespace-normal z-50 max-w-sm`,children:m6(e.summary,t||``)})]}):null}function h6({activity:e,query:t}){let{ref:n,isTruncated:r}=f6(`width`),{ref:i,isTruncated:a}=f6(`width`),o=B(t=>U_(t,{resourceId:e.primaryResourceId,resourceType:e.primaryResourceType})),s=e?.targetResources?.find(t=>t?.id===e?.primaryResourceId)?.identifier||``;if(e.activityType===`database.tunnel`){let t=BC(e.targetResources||[],`database`);t&&(s=t.identifier)}let c=_ce(e),l=e.primaryResourceType.toLocaleLowerCase();l===`account`&&(l=`environment`);let u=o!==null&&`deletedAt`in o&&o?.deletedAt,d=!!o&&!u||[`app`,`database`,`endpoint`].includes(l.toLocaleLowerCase());return(0,U.jsxs)(`div`,{className:`flex min-w-0`,children:[(0,U.jsx)(`div`,{className:`mr-2 pt-1 shrink-0`,children:RRe(l)}),(0,U.jsxs)(`div`,{className:`min-w-0`,children:[(0,U.jsxs)(`div`,{className:`relative group/targetName min-w-0`,children:[d&&c?(0,U.jsx)(P,{to:c,className:(0,H.default)(G.type[`table link`],`block`),children:(0,U.jsx)(`div`,{ref:n,className:`text-sm whitespace-nowrap truncate`,children:m6(s,t||``)})}):(0,U.jsx)(`div`,{className:G.type[`table lead text`],children:(0,U.jsx)(`div`,{ref:n,className:`text-sm whitespace-nowrap truncate`,children:m6(s,t||``)})}),r&&(0,U.jsx)(`div`,{className:`hidden group-hover/targetName:block absolute bottom-full left-0 mb-1 px-2 py-1 bg-black/85 text-white text-sm rounded whitespace-normal z-50 max-w-sm`,children:m6(s,t||``)})]}),(0,U.jsxs)(`div`,{className:`relative group/targetType min-w-0`,children:[(0,U.jsx)(`div`,{ref:i,className:`text-gray-500 truncate`,children:m6(g6(l,e.primaryResourceType),t||``)}),a&&(0,U.jsx)(`div`,{className:`hidden group-hover/targetType:block absolute bottom-full left-0 mb-1 px-2 py-1 bg-black/85 text-white text-sm rounded whitespace-normal z-50 max-w-sm`,children:m6(g6(l,e.primaryResourceType),t||``)})]})]})]})}function g6(e,t){switch(e){case`activityexport`:case`externalawsaccount`:case`externalawsresource`:case`llmkey`:case`logdrain`:case`metricdrain`:case`service_sizing_policy`:case`service_sizing_policy_membership`:case`servicesizingpolicy`:case`servicesizingpolicymembership`:case`vpntunnel`:return t;case`persistentdisk`:return`Persistent Disk`;case`diskattachment`:return`Disk Attachment`;default:return cl(e)}}function HRe({activity:e}){let t=e.accountId||``,n=B(e=>tu(e,{id:t})),r=B(e=>zl(e,{id:n.stackId})),i=B(RC),{ref:a,isTruncated:o}=f6(`width`),{ref:s,isTruncated:c}=f6(`width`),l=i.find(t=>t.value===e.accountId),u=e.accountId&&l?.deleted===!0;if(!e.accountId)return(0,U.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,U.jsx)(`div`,{className:`w-4 shrink-0`}),(0,U.jsx)(`span`,{className:`text-gray-500`,children:`None`})]});if(u){let t;return t=n.id?n.handle:l?.title||`Environment ${e.accountId}`,(0,U.jsx)(aA,{text:`This environment has been deleted`,children:(0,U.jsxs)(`div`,{className:`flex items-center gap-1 cursor-default`,children:[(0,U.jsx)(`div`,{className:`w-4 shrink-0`,children:(0,U.jsx)(YE,{variant:`sm`,title:`This environment has been deleted`,className:`stroke-black fill-red-300`})}),(0,U.jsx)(`span`,{children:t})]})})}let d=`${r.organizationId?`Dedicated Stack `:`Shared Stack `}(${r.region})`;return(0,U.jsx)(`div`,{className:`flex items-center gap-1`,children:(0,U.jsxs)(`div`,{className:`min-w-0`,children:[(0,U.jsxs)(`div`,{className:`relative group/envHandle min-w-0`,children:[(0,U.jsx)(P,{to:Na(n.id),className:(0,H.default)(G.type[`table link`],`block`),children:(0,U.jsx)(`div`,{ref:a,className:`truncate`,children:n.handle})}),o&&(0,U.jsx)(`div`,{className:`hidden group-hover/envHandle:block absolute bottom-full right-0 mb-1 px-2 py-1 bg-black/85 text-white text-sm rounded whitespace-normal z-50 max-w-sm`,children:n.handle})]}),(0,U.jsxs)(`div`,{className:`relative group/envStack`,children:[(0,U.jsx)(`div`,{ref:s,className:(0,H.default)(G.type[`normal lighter`],`truncate`),children:d}),c&&(0,U.jsx)(`div`,{className:`hidden group-hover/envStack:block absolute bottom-full right-0 mb-1 px-2 py-1 bg-black/85 text-white text-sm rounded whitespace-normal z-50 max-w-sm`,children:d})]})]})})}function URe({activity:e,tz:t}){let n=Lie(e.occurredAt,t),r=t===`utc`?`local`:`utc`,i=Af(e.occurredAt,r),a=typeof e.description?.duration_seconds==`number`?e.description.duration_seconds:null;return(0,U.jsxs)(`div`,{className:`relative group/tz`,children:[(0,U.jsxs)(`div`,{className:`flex flex-col cursor-default`,children:[(0,U.jsx)(`div`,{className:G.type[`table lead text`],children:n}),a===null?null:(0,U.jsxs)(`div`,{className:`text-xs text-gray-500`,children:[`Duration: `,jf(a)]})]}),(0,U.jsx)(`div`,{className:`hidden group-hover/tz:block absolute bottom-full right-0 mb-1 px-2 py-1 bg-black/85 text-white text-sm rounded whitespace-nowrap z-50`,children:i})]})}function WRe({activity:e}){let{ref:t,isTruncated:n}=f6(`width`),{ref:r,isTruncated:i}=f6(`width`);return(0,U.jsxs)(`div`,{className:`min-w-0`,children:[(0,U.jsxs)(`div`,{className:`relative group/actorName`,children:[(0,U.jsx)(`div`,{ref:t,className:(0,H.default)(G.type[`table lead text`],`truncate`),children:e.userName||`System`}),n&&(0,U.jsx)(`div`,{className:`hidden group-hover/actorName:block absolute bottom-full left-0 mb-1 px-2 py-1 bg-black/85 text-white text-sm rounded whitespace-normal z-50 max-w-sm`,children:e.userName||`System`})]}),e.userEmail?(0,U.jsxs)(`div`,{className:`relative group/actorEmail`,children:[(0,U.jsx)(`div`,{ref:r,className:`text-gray-500 whitespace-nowrap truncate`,children:e.userEmail}),i&&(0,U.jsx)(`div`,{className:`hidden group-hover/actorEmail:block absolute bottom-full left-0 mb-1 px-2 py-1 bg-black/85 text-white text-sm rounded whitespace-normal z-50 max-w-sm`,children:e.userEmail})]}):null]})}var _6=[p6.display({id:`operation`,header:`Operation`,cell:e=>(0,U.jsx)(BRe,{activity:e.row.original,query:e.table.options.meta?.q}),size:200,minSize:40,maxSize:2e3}),p6.display({id:`target`,header:`Target`,cell:e=>(0,U.jsx)(h6,{activity:e.row.original,query:e.table.options.meta?.q}),size:200,minSize:60,maxSize:2e3}),p6.display({id:`additionalInfo`,header:`Additional Info`,cell:e=>(0,U.jsx)(VRe,{activity:e.row.original,query:e.table.options.meta?.q}),size:250,minSize:40,maxSize:2e3}),p6.display({id:`status`,header:`Status`,cell:e=>{let t=e.row.original;return(0,U.jsx)(D4,{status:t.status})},size:120,minSize:105,maxSize:2e3}),p6.display({id:`actor`,header:`Actor`,cell:e=>(0,U.jsx)(WRe,{activity:e.row.original}),size:180,minSize:40,maxSize:2e3}),p6.display({id:`environment`,header:`Environment`,cell:e=>(0,U.jsx)(HRe,{activity:e.row.original}),size:180,minSize:56,maxSize:2e3}),p6.display({id:`occurredAt`,header:e=>`Occurred At (${e.table.options.meta.tz===`utc`?`UTC`:`Local`})`,cell:e=>{let t=e.table.options.meta;return(0,U.jsx)(URe,{activity:e.row.original,tz:t.tz})},size:180,minSize:40,maxSize:2e3}),p6.display({id:`details`,header:``,cell:e=>{let t=`/activity/${e.row.original.id}`;return(0,U.jsxs)(`div`,{className:`relative group/activityDetail`,children:[(0,U.jsx)(P,{to:t,className:`flex justify-center items-center p-1 hover:bg-gray-200 rounded mr-3`,children:(0,U.jsx)(PE,{className:`w-5 h-5 stroke-black group-hover:stroke-indigo hover:stroke-indigo`})}),(0,U.jsx)(`div`,{className:`hidden group-hover/activityDetail:block absolute bottom-full right-0 mb-1 px-2 py-1 bg-black/85 text-white text-sm rounded whitespace-normal z-50 max-w-sm`,children:`Details`})]})},size:56,minSize:40,enableResizing:!1}
109)],v6=[{id:`operation`,label:`Operation`,disabled:!0},{id:`target`,label:`Target`},{id:`additionalInfo`,label:`Additional Info`},{id:`status`,label:`Status`},{id:`actor`,label:`Actor`},{id:`environment`,label:`Environment`},{id:`occurredAt`,label:`Occurred At`},{id:`details`,label:`Details`,hidden:!0}],GRe=[`operation`,`target`,`additionalInfo`,`status`,`actor`,`environment`,`occurredAt`,`details`],KRe={operation:!0,target:!0,additionalInfo:!0,status:!0,actor:!0,environment:!0,occurredAt:!0,details:!0},qRe=.3,JRe=40,YRe=56,y6=150;function XRe(e,t,n,r){if(e<=0)return n;let i=e*qRe,a={},o=e,s=[];for(let e of _6){let i=e.id;if(i&&!(r&&r[i]===!1)){if(e.enableResizing===!1)o-=e.size??YRe;else if(t.has(i)){let t=n[i]??e.size??y6;a[i]=t,o-=t}else s.push({id:i,weight:e.size??y6,minSize:e.minSize??JRe})}}if(s.length===0)return a;if(o<=0){for(let e of s)a[e.id]=e.minSize;return a}let c=s.reduce((e,t)=>e+t.weight,0),l={},u=[],d=[],f=0;for(let e of s){let t=e.weight/c*o;t<e.minSize?(l[e.id]=e.minSize,u.push(e.id),f+=e.minSize):t>i?(l[e.id]=i,u.push(e.id),f+=i):(l[e.id]=t,d.push(e.id))}if(u.length>0&&d.length>0){let e=o-f,t=s.filter(e=>d.includes(e.id)).reduce((e,t)=>e+t.weight,0);for(let n of d){let r=s.find(e=>e.id===n);r&&(l[n]=Math.max(r.minSize,Math.min(r.weight/t*e,i)))}}for(let[e,t]of Object.entries(l))a[e]=t;return a}function ZRe({children:e}){let{ref:t,isTruncated:n}=f6(`width`);return(0,U.jsxs)(`div`,{className:`relative group/header min-w-0`,children:[(0,U.jsx)(`div`,{ref:t,className:`truncate`,children:e}),n&&(0,U.jsx)(`div`,{className:`hidden group-hover/header:block absolute top-full left-0 mt-1 px-2 py-1 bg-black/85 text-white text-sm font-normal rounded whitespace-nowrap z-50`,children:e})]})}function QRe({activities:e,isLoading:t,tz:n,columnVisibility:r,onColumnVisibilityChange:i,hasPendingChanges:a=!1,columnOrder:o,onColumnOrderChange:s,q:c}){let l={tz:n,q:c},u=(0,V.useRef)(null),d=(0,V.useRef)(null),f=(0,V.useRef)(new Set),[p,m]=(0,V.useState)(0),[h,g]=(0,V.useState)({});(0,V.useLayoutEffect)(()=>{let e=u.current;if(!e)return;let t=new ResizeObserver(e=>{let t=e[0]?.contentRect.width??0;m(t)});t.observe(e),m(e.clientWidth);let n=()=>{m(e.clientWidth)},r=()=>{document.visibilityState===`visible`&&n()};return window.addEventListener(`resize`,n),document.addEventListener(`visibilitychange`,r),()=>{t.disconnect(),window.removeEventListener(`resize`,n),document.removeEventListener(`visibilitychange`,r)}},[]);let _=r?Object.entries(r).filter(([,e])=>e).map(([e])=>e).sort().join(`,`):``;(0,V.useEffect)(()=>{p<=0||g(e=>XRe(p,f.current,e,r))},[p,_]);let v=(0,V.useCallback)(e=>{let t=d.current?.getState().columnSizingInfo.isResizingColumn;t&&f.current.add(t),g(t=>typeof e==`function`?e(t):e)},[]),y=IRe({data:e,columns:_6,columnResizeMode:`onChange`,getCoreRowModel:MRe(),meta:l,state:{columnSizing:h,...r?{columnVisibility:r}:{},...o?{columnOrder:o}:{}},onColumnSizingChange:v,onColumnVisibilityChange:i?e=>{i(typeof e==`function`?e(r??{}):e)}:void 0,onColumnOrderChange:s?e=>{s(typeof e==`function`?e(o??[]):e)}:void 0});d.current=y;let b=y.getCenterTotalSize();return(0,U.jsx)(`div`,{ref:u,className:`overflow-x-auto w-full shadow ring-1 ring-black ring-opacity-5 rounded-lg overscroll-x-contain`,children:(0,U.jsxs)(`table`,{className:`divide-y divide-gray-300`,style:{width:Math.max(p,b),tableLayout:`fixed`},children:[(0,U.jsx)(`thead`,{className:`bg-gray-50`,children:y.getHeaderGroups().map(e=>(0,U.jsx)(`tr`,{children:e.headers.map(e=>(0,U.jsxs)(`th`,{scope:`col`,className:`relative pl-4 pr-2 py-3 text-sm font-normal text-gray-500 align-top text-left ${e.column.getCanResize()?`hover:bg-gray-100`:``}`,style:{width:e.getSize()},children:[e.isPlaceholder?null:(0,U.jsx)(ZRe,{children:d6(e.column.columnDef.header,e.getContext())}),e.column.getCanResize()?(0,U.jsx)(`div`,{onMouseDown:e.getResizeHandler(),onTouchStart:e.getResizeHandler(),onDoubleClick:()=>e.column.resetSize(),className:`absolute right-0 top-0 h-full w-2 cursor-col-resize select-none touch-none ${e.column.getIsResizing()?`bg-indigo-600 opacity-100`:`bg-gray-400 opacity-0 hover:opacity-100`}`}):null]},e.id))},e.id))}
109),(0,U.jsx)(`tbody`,{className:`divide-y divide-gray-200 bg-white`,children:t&&e.length===0?(0,U.jsx)(`tr`,{children:(0,U.jsx)(`td`,{colSpan:y.getVisibleLeafColumns().length,className:`text-sm text-gray-500 pl-4 py-0 text-left`,children:(0,U.jsx)(`div`,{className:`flex min-h-[200px] items-center justify-center`,children:(0,U.jsx)(SE,{color:`#4F46E5`})})})}):e.length===0?(0,U.jsx)(`tr`,{children:(0,U.jsx)(`td`,{colSpan:y.getVisibleLeafColumns().length,className:`text-sm text-gray-500 pl-4 py-0 text-left`,children:(0,U.jsxs)(`div`,{className:`flex min-h-[200px] flex-col items-center justify-center text-center text-base leading-relaxed text-gray-600`,children:[(0,U.jsx)(`div`,{className:`font-semibold text-gray-900`,children:`No activities found matching the applied filters.`}),a?(0,U.jsx)(`div`,{children:`You have unapplied filter changes. Click "Apply Filters" to get updated results.`}):(0,U.jsx)(`div`,{children:`Try adjusting your filters for a broader search.`})]})})}):y.getRowModel().rows.map(e=>(0,U.jsx)(`tr`,{className:`group hover:bg-gray-50`,children:e.getVisibleCells().map(e=>(0,U.jsx)(`td`,{className:`text-sm text-gray-500 pl-4 pr-2 py-3 text-left`,style:{width:e.column.getSize()},children:d6(e.column.columnDef.cell,e.getContext())},e.id))},`${e.id}-${c||``}`))})]})})}function $Re(e){return(0,U.jsx)(AH,{target:e,className:({isDropTarget:e})=>(0,H.default)(`h-0.5 mx-2 rounded-full outline-none`,e?`bg-indigo-500`:`bg-transparent`)})}function eze({showSelectAll:e,showClear:t,disabled:n,onSelectAll:r,onClear:i}){return e||t?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`div`,{className:(0,H.default)(`flex items-center px-2 py-2`,e&&t?`justify-between`:`justify-end`),children:[e?(0,U.jsx)(`button`,{type:`button`,className:(0,H.default)(`text-sm font-medium`,n?`text-indigo-200 cursor-not-allowed`:`text-indigo-400 hover:text-gray-600`),onClick:r,disabled:n,children:`Select All`}):null,t?(0,U.jsx)(`button`,{type:`button`,className:(0,H.default)(`text-sm font-medium`,n?`text-indigo-200 cursor-not-allowed`:`text-indigo-400 hover:text-indigo-600`),onClick:i,disabled:n,children:`Clear`}):null]}),(0,U.jsx)(`div`,{className:`h-px bg-gray-200 my-2`})]}):null}function b6({options:e,selectedValues:t,onSelectionChange:n,onOrderChange:r,noTriggerDisplayText:i=!1,getTriggerDisplayText:a,disabled:o=!1,className:s=``,dropdownClassName:c,ariaLabel:l,showSelectAllButton:u=!0,showClearButton:d=!0,chevronIcon:f}){let[p,m]=(0,V.useState)(!1),h=(0,V.useRef)(null),g=(0,V.useRef)(!1),_=e=>{if(g.current)return;let t=e.relatedTarget;h.current&&(!t||!h.current.contains(t))&&m(!1)},v=()=>{h.current?.focus()},y=e=>{e.key===`Escape`&&m(!1)},b=new Set(t),x=e=>{let r=new Set(t);r.has(e)?r.delete(e):r.add(e),n(Array.from(r))},S=()=>{n(e.map(e=>e.value))},C=()=>{n(e.filter(e=>e.disabled).map(e=>e.value))},w=i?``:a?a(t,e.length):t.length===0?`Select`:t.length===1?e.find(e=>e.value===t[0])?.label??`1 selected`:`${t.length} selected`,{dragAndDropHooks:T}=G_e({getItems(e){return[...e].map(e=>({"text/plain":String(e)}))},onReorder(t){let n=[...t.keys][0],i=e.map(e=>e.value),a=i.indexOf(n);if(a<0)return;let o=[...i];o.splice(a,1);let s;if(t.target.dropPosition===`before`){s=t.target.key;let e=o.indexOf(s);o.splice(e,0,n)}else if(t.target.dropPosition===`after`){s=t.target.key;let e=o.indexOf(s);o.splice(e+1,0,n)}r(o)},onDragStart(){g.current=!0},onDragEnd(){g.current=!1},renderDropIndicator:$Re}),E=(0,H.default)(`relative`,`text-black`,`border`,`hover:border-black-300 hover:bg-black-100`,`focus:ring-gray-500 focus:border-gray-500`,`active:text-black`,`disabled:bg-black-50 disabled:border-black-100 disabled:text-black`,`rounded-md shadow-sm`,`px-2.5 py-1.5`,i||`pr-10`,`w-full text-left`,s);return(0,U.jsxs)(`div`,{ref:h,className:`relative w-full`,tabIndex:-1,onBlur:_,onMouseDown:v,onKeyDown:y,children:[(0,U.jsxs)(`button`,{"aria-label":l,"aria-haspopup":`listbox`,"aria-expanded":p,className:E,disabled:o,onClick:()=>m(e=>!e),type:`button`,children:[i||(0,U.jsx)(`span`,{className:`block truncate`,children:w}),(0,U.jsx)(`span`,{className:(0,H.default)(i||`absolute right-3 top-1/2 -translate-y-1/2`,`pointer-events-none text-gray-700`),children:f||(0,U.jsx)(IE,{variant:`sm`})})]}),p?(0,U.jsxs)(`div`,{className:(0,H.default)(`absolute z-10 mt-1 min-w-full w-max`,`bg-white border border-gray-200 rounded-md shadow-lg`,`p-2`,c),children:[(0,U.jsx)(eze,{showSelectAll:u,showClear:d,disabled:o,onSelectAll:S,onClear:C}),(0,U.jsx)(`div`,{className:`overflow-auto py-1`,children:(0,U.jsx)(I_e,{"aria-label":`Reorderable column list`,selectionMode:`none`,items:e.map(e=>({id:e.value,label:e.label,value:e.value,disabled:e.disabled})),dragAndDropHooks:T,className:`outline-none`,children:e=>{let t=b.has(e.value);return(0,U.jsxs)(R_e,{id:e.id,textValue:e.label,className:(0,H.default)(`flex items-center`,`rounded`,`my-0.5`,`pr-2`,`outline-none`,`focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:ring-inset`,`hover:bg-gray-50`,`cursor-grab active:cursor-grabbing`,e.disabled?`opacity-50`:``),children:[(0,U.jsx)(XB,{slot:`drag`,"aria-label":`Reorder ${e.label}`,className:(0,H.default)(`p-1 rounded shrink-0 touch-none select-none`,`text-gray-300 hover:text-gray-500`,`bg-transparent border-none outline-none`),children:(0,U.jsx)(WD,{"aria-hidden":`true`,className:`w-3.5 h-3.5`})}),(0,U.jsx)(`button`,{type:`button`,className:(0,H.default)(`flex items-center flex-1 min-w-0`,`px-1 py-1.5 text-left text-sm text-gray-700`,`focus:outline-none`,`focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:ring-inset rounded`),onClick:()=>x(e.value),disabled:e.disabled,children:(0,U.jsx)(`div`,{className:`pointer-events-none`,children:(0,U.jsx)(ZH,{label:e.label,checked:t,onChange:()=>{},variant:`default`,variantSize:`sm`,disabled:e.disabled,labelClassName:`ml-2`})})})]})}})})]}):null]})}function tze({columns:e,columnVisibility:t,onColumnVisibilityChange:n,columnOrder:r,onColumnOrderChange:i}){let a=(0,V.useMemo)(()=>new Map(e.map(e=>[e.id,e])),[e]),o=(0,V.useMemo)(()=>r.filter(e=>a.has(e)&&!a.get(e)?.hidden).map(e=>{let t=a.get(e);return{label:t.label,value:t.id,key:t.id,disabled:t.disabled}}),[a,r]),s=(0,V.useMemo)(()=>r.filter(e=>!a.get(e)?.hidden).filter(e=>t[e]!==!1),[a,r,t]);return(0,U.jsx)(b6,{ariaLabel:`Reorder columns`,options:o,selectedValues:s,onSelectionChange:t=>{let r=new Set(t),i={};for(let t of e)i[t.id]=r.has(t.id);i.details=!0,n(i)},onOrderChange:e=>{i([...e,`details`])}
109,noTriggerDisplayText:!0,chevronIcon:(0,U.jsx)(BE,{variant:`sm`}),className:`flex gap-2 text-sm`,dropdownClassName:`text-sm right-0`})}var x6=40,nze=256,rze=5;function ize(e){let t=(0,V.useRef)(null),[n,r]=(0,V.useState)(0),i=(0,V.useCallback)(()=>{t.current&&r(t.current.scrollTop)},[]),a=e*x6,o=Math.max(0,Math.floor(n/x6)-rze),s=Math.ceil(nze/x6)+10,c=Math.min(e-1,o+s),l=o*x6,u=Math.max(0,(e-c-1)*x6);return{virtualItems:(0,V.useMemo)(()=>{let e=[];for(let t=o;t<=c;t++)e.push({index:t});return e},[o,c]),topPadding:l,bottomPadding:u,totalHeight:a,handleScroll:i,scrollContainerRef:t}}function S6({option:e,checked:t,onToggle:n,renderOptionLabel:r,getOptionTitle:i,checkBoxVariant:a,checkBoxVariantSize:o,disabledOptionTooltip:s}){let c=(0,U.jsx)(`button`,{type:`button`,title:i?.(e),className:(0,H.default)(`w-full`,`rounded`,`my-0.5`,`px-2 py-2`,`text-left`,`hover:bg-gray-50`,`focus:outline-none`,`focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:ring-inset`,e.disabled?`opacity-50 cursor-not-allowed hover:bg-transparent`:null),onClick:()=>n(e.value),disabled:e.disabled,children:(0,U.jsx)(`div`,{className:`pointer-events-none`,children:(0,U.jsx)(ZH,{label:r?r(e):e.label,checked:t,onChange:()=>n(e.value),variant:a,variantSize:o,disabled:e.disabled,labelClassName:`ml-2`})})},e.key||e.value);return e.disabled&&s?(0,U.jsx)(aA,{text:s,placement:`top`,referenceClassName:`block w-full cursor-not-allowed`,children:c}):c}function C6({id:e,options:t,className:n=``,ariaLabel:r=`combobox`,disabled:i=!1,placeholder:a=`Select`,value:o,defaultValue:s,onChange:c,showAllButton:l=!0,showSelectAllButton:u=!0,selectAllVisibleLimit:d,disableSelectAll:f=!1,allLabel:p=`All`,searchPlaceholder:m=`Search...`,disableSearch:h=!1,renderOptionLabel:g,getOptionTitle:_,getTriggerDisplayText:v,dropdownClassName:y,checkBoxVariant:b=`default`,checkBoxVariantSize:x=`base`,disableVirtualization:S=!1,customContent:C,disabledOptionTooltip:w}){let[T,E]=(0,V.useState)(!1),D=(0,V.useRef)(null),O=(0,V.useRef)(null),[k,A]=(0,V.useState)(``),j=Array.isArray(o),[M,ee]=(0,V.useState)(s??[]),te=(j?o:M)||[],ne=te.length===0,re=(0,H.default)(`relative`,`border`,`border-gray-300 text-black`,`hover:border-gray-500`,`focus:ring-gray-500 focus:border-gray-500`,`active:text-black`,`disabled:bg-black-50 disabled:border-black-100 disabled:text-black`,`rounded-md shadow-sm`,`px-3 py-2 pr-10`,`w-full text-left`,n),ie=(0,V.useMemo)(()=>{let e=k.trim().toLowerCase();return e===``?t:t.filter(t=>t.label.toLowerCase().includes(e))},[t,k]),ae=e=>{let t=e.relatedTarget;D.current&&(!t||!D.current.contains(t))&&E(!1)},oe=()=>{D.current?.focus()},se=e=>{e.key===`Escape`&&E(!1)},N=()=>{A(``),O.current?.focus()},ce=e=>{let n=t.filter(t=>e.some(e=>e===t.value));c?.(e,n),j||ee(e)},le=()=>{if(k.trim()){let e=new Set(ie.filter(e=>!e.disabled).map(e=>e.value)),t=new Set([...te,...e]);ce(Array.from(t))}else{let e=t.filter(e=>!e.disabled).map(e=>e.value);ce(e)}},ue=()=>{ce([])},de=e=>{let t=new Set(te);t.has(e)?t.delete(e):t.add(e),ce(Array.from(t))},fe=(0,V.useMemo)(()=>{if(v)return v(te);if(ne)return``;let e=te.length;if(e===1){let e=t.find(e=>e.value===te[0]);return e?e.label:`1 selected`}return`${e} selected`},[ne,te,t]),pe=(0,V.useMemo)(()=>fe,[fe]),me=!S&&ie.length>=50,{virtualItems:he,topPadding:ge,bottomPadding:_e,handleScroll:ve,scrollContainerRef:ye}=ize(me?ie.length:0);(0,V.useEffect)(()=>{ye.current&&(ye.current.scrollTop=0)},[k]);let be=(0,V.useMemo)(()=>t.filter(e=>!e.disabled).length,[t]),xe=(0,V.useMemo)(()=>ie.filter(e=>!e.disabled).length,[ie]),Se=k.trim()!==``,P=u&&(d===void 0?!0:Se?xe<=d:be<=d);return(0,U.jsxs)(`div`,{ref:D,className:`relative w-full`,tabIndex:-1,onBlur:ae,onMouseDown:oe,onKeyDown:se,children:[(0,U.jsxs)(`button`,{id:e,"aria-label":r,"aria-haspopup":`listbox`,"aria-expanded":T,className:re,disabled:i,onClick:()=>E(e=>!e),type:`button`,children:[(0,U.jsx)(`span`,{className:`block truncate`,children:pe||a}),(0,U.jsx)(`span`,{className:`absolute right-3 top-1/2 -translate-y-1/2 pointer-events-none text-gray-700`,children:(0,U.jsx)(IE,{variant:`sm`})})]}),T?(0,U.jsxs)(`div`,{role:`listbox`,"aria-multiselectable":!0,className:(0,H.default)(`absolute z-10 mt-1 min-w-full`,`bg-white border border-gray-200 rounded-md shadow-lg`,`p-2`,y),children:[!h&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`div`,{className:`relative`,children:[(0,U.jsx)(VE,{className:`absolute top-[10px] left-[10px]`,color:`#595E63`,variant:`sm`}),(0,U.jsx)(X,{type:`text`,placeholder:m,value:k,onChange:e=>A(e.currentTarget.value),className:`pl-9 pr-9 w-full`,autoFocus:!0,ref:O}),k.trim()===``?null:(0,U.jsx)(`button`,{type:`button`,"aria-label":`Clear search`,className:(0,H.default)(`absolute`,`top-1/2 -translate-y-1/2 right-[10px]`,`text-gray-500 hover:text-gray-700`,`focus:outline-none focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:ring-inset rounded`),onClick:N,children:(0,U.jsx)(JE,{variant:`sm`,color:`#6B7280`})})]}),(0,U.jsx)(`div`,{className:`h-px bg-gray-200 my-2`})]}),l?(0,U.jsxs)(`div`,{className:(0,H.default)(`flex items-center px-2 py-2`,P?`justify-between`:`justify-end`),children:[P?(0,U.jsx)(`button`,{type:`button`,className:(0,H.default)(`text-sm font-medium`,i||f?`text-indigo-200 cursor-not-allowed`:`text-indigo-400 hover:text-gray-600`),onClick:le,disabled:i||f,children:`Select All`}):null,(0,U.jsx)(`button`,{type:`button`,className:(0,H.default)(`text-sm font-medium`,i?`text-indigo-200 cursor-not-allowed`:`text-indigo-400 hover:text-indigo-600`),onClick:ue,disabled:i,children:`Clear`})]}):null,C?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`div`,{className:`h-px bg-gray-200 my-2`}),(0,U.jsx)(`div`,{className:`px-2 py-2`,children:C})]}):null,(0,U.jsx)(`div`,{className:`h-px bg-gray-200 my-2`}),(0,U.jsx)(`div`,{ref:ye,onScroll:me?ve:void 0,className:`max-h-64 overflow-auto pr-1 pl-2 py-1`,children:ie.length===0?(0,U.jsx)(`div`,{className:`text-sm text-gray-500 px-1 py-2`,children:`No results`}):me?(0,U.jsxs)(U.Fragment,{children:[ge>0&&(0,U.jsx)(`div`,{style:{height:ge},"aria-hidden":!0}),he.map(({index:e})=>{let t=ie[e],n=te.some(e=>e===t.value);return(0,U.jsx)(S6,{option:t,checked:n,onToggle:de,renderOptionLabel:g,getOptionTitle:_,checkBoxVariant:b,checkBoxVariantSize:x,disabledOptionTooltip:w},t.key||t.value)}),_e>0&&(0,U.jsx)(`div`,{style:{height:_e},"aria-hidden":!0})]}):ie.map(e=>{let t=te.some(t=>t===e.value);return(0,U.jsx)(S6,{option:e,checked:t,onToggle:de,renderOptionLabel:g,getOptionTitle:_,checkBoxVariant:b,checkBoxVariantSize:x,disabledOptionTooltip:w},e.key||e.value)})})]}):null]})}var aze=({environmentId:e})=>{let t=B(t=>tu(t,{id:e})),n=B(e=>zl(e,{id:t.stackId}));return(0,U.jsx)(Y,{className:`2xl:flex-cell-md sm:flex-cell-sm`,children:(0,U.jsxs)(`div`,{children:[(0,U.jsx)(P,{to:Na(t.id),className:G.type[`table link`],children:t.handle}),(0,U.jsxs)(`div`,{className:G.type[`normal lighter`],children:[n.organizationId?`Dedicated Stack `:`Shared Stack `,`(`,n.region,`)`]})]})})},w6=({op:e})=>
109{if(e.type!==`configure`)return null;let t=Object.keys(e.env).join(`, `);return(0,U.jsx)(aA,{text:t,children:(0,U.jsx)(tD,{variant:`sm`})})},oze=({op:e})=>(0,U.jsxs)(Y,{className:`flex-1`,children:[(0,U.jsxs)(W,{variant:`horizontal`,className:`items-center`,size:`xs`,children:[(0,U.jsx)(P,{to:po(e.id),className:G.type[`table link`],children:ll(e.type)}),(0,U.jsx)(w6,{op:e})]}),(0,U.jsxs)(`div`,{children:[`ID: `,e.id]})]}),sze=({op:e})=>(0,U.jsx)(Y,{children:(0,U.jsx)(D4,{status:e.status})}),cze=({op:e})=>{let t=$d(e);return(0,U.jsx)(Y,{children:(0,U.jsxs)(`div`,{className:`flex`,children:[zRe(e.resourceType),(0,U.jsxs)(`div`,{children:[t?(0,U.jsx)(P,{to:t,className:G.type[`table link`],children:e.resourceHandle}):(0,U.jsx)(`div`,{children:e.resourceHandle}),e.resourceDesc?(0,U.jsx)(`div`,{children:e.resourceDesc}):null,(0,U.jsx)(`div`,{children:Gu(e.resourceType)})]})]})})},T6=({serviceId:e})=>{let t=B(t=>Eu(t,{id:e})),n=B(e=>rf(e,{id:t.appId})),r=B(e=>lp(e,{id:t.databaseId}));return(0,U.jsx)(Y,{children:(0,U.jsx)(P,{className:G.type[`table link`],to:t.appId?Qi(t.appId):ga(t.databaseId),children:t.appId?n.handle:r.handle})})},lze=({enpId:e})=>{let t=B(t=>Lp(t,{id:e}));return(0,U.jsx)(T6,{serviceId:t.serviceId})},uze=({op:e})=>e.resourceType===`service`?(0,U.jsx)(T6,{serviceId:e.resourceId}):e.resourceType===`vhost`?(0,U.jsx)(lze,{enpId:e.resourceId}):(0,U.jsx)(Y,{children:` `}),dze=({op:e})=>(0,U.jsx)(Y,{children:(0,U.jsx)(P,{to:po(e.id),className:`hover:no-underline flex justify-end mr-4`,children:(0,U.jsx)(K,{variant:`primary`,size:`sm`,children:`Logs`})})}),fze=({op:e})=>(0,U.jsx)(Y,{children:(0,U.jsx)(`div`,{children:Of(e.updatedAt)})}),pze=({op:e})=>(0,U.jsxs)(Y,{children:[(0,U.jsx)(`div`,{children:e.userName}),e.note?(0,U.jsx)(aA,{fluid:!0,text:e.note,children:(0,U.jsxs)(`div`,{className:`max-w-[300px] truncate`,children:[`Note: `,e.note]})}):null]}),mze=({op:e})=>(0,U.jsxs)(WA,{children:[(0,U.jsx)(cze,{op:e}),(0,U.jsx)(sze,{op:e}),(0,U.jsx)(oze,{op:e}),(0,U.jsx)(uze,{op:e}),(0,U.jsx)(aze,{environmentId:e.environmentId}),(0,U.jsx)(pze,{op:e}),(0,U.jsx)(fze,{op:e}),(0,U.jsx)(dze,{op:e})]}),hze=e=>(0,U.jsx)(YE,{variant:`sm`,title:`Deleted`,className:`stroke-black fill-red-300`,...e}),gze=[`queued`,`running`,`failed`,`succeeded`],_ze=[`backup`,`configure`,`configure_backup_policy`,`copy`,`create`,`deploy`,`deprovision`,`execute`,`horizontal_scale`,`logs`,`modify`,`provision`,`purge`,`rebuild`,`reload`,`renew`,`replicate`,`revoke`,`restart`,`restore`,`scale`,`scan`,`service_deployment_update`],vze=[{label:`App`,value:`App`},{label:`Backup`,value:`Backup`},{label:`Certificate`,value:`Certificate`},{label:`Configuration`,value:`Configuration`},{label:`Database`,value:`Database`},{label:`DatabaseCredential`,value:`DatabaseCredential`},{label:`EphemeralSession`,value:`EphemeralSession`},{label:`Environment`,value:`Account`},{label:`LLM Key`,value:`LlmKey`},{label:`Image`,value:`Image`},{label:`LogDrain`,value:`LogDrain`},{label:`MetricDrain`,value:`MetricDrain`},{label:`Service`,value:`Service`},{label:`Vhost`,value:`Vhost`}];function yze({paginated:e,showTitle:t=!0,isLoading:n=!1,showResourceTypeFilter:r=!1}){let[i,a]=Ee(),o=i.get(`resource_type`)||`all`,s=i.get(`operation_type`)||`all`,c=i.get(`operation_status`)||`all`,l=[{label:`All`,value:`all`},...gze.map(e=>({label:ll(e),value:e}))],u=[{label:`All`,value:`all`},..._ze.map(e=>({label:ll(e),value:e}))],d=[{label:`All`,value:`all`},...vze],[f,p]=(0,V.useState)(o),[m,h]=(0,V.useState)(s),[g,_]=(0,V.useState)(c),v=()=>{a({resource_type:f,operation_type:m,operation_status:g})},y=()=>{p(`all`),h(`all`),_(`all`),a({})};return(0,U.jsxs)(W,{children:[(0,U.jsxs)(W,{size:`sm`,children:[(0,U.jsx)(NU,{visible:t,description:`This global Activity page show real-time changes to resources within the last week.`,children:`Activity`}),(0,U.jsxs)(PU,{children:[t?null:(0,U.jsx)(IU,{children:`Operations show real-time changes to resources, such as Apps and Databases.`}),(0,U.jsxs)(W,{variant:`horizontal`,size:`lg`,className:`items-center mt-1`,children:[(0,U.jsxs)(IU,{children:[e.totalItems,` Operations`]}),(0,U.jsx)(RU,{...e,isLoading:n||e.isLoading})]})]})]}),(0,U.jsx)(Z,{children:(0,U.jsx)(`form`,{onSubmit:e=>{e.preventDefault(),v()},children:(0,U.jsxs)(W,{children:[(0,U.jsxs)(W,{variant:`horizontal`,children:[r?(0,U.jsxs)(`div`,{className:`flex-1`,children:[(0,U.jsx)(RA,{htmlFor:`resource-type-selector`,children:`Resource Type`}),(0,U.jsx)(XA,{id:`resource-type-selector`,value:f,options:d,onSelect:e=>p(e.value),className:`w-full`})]}):null,(0,U.jsxs)(`div`,{className:`flex-1`,children:[(0,U.jsx)(RA,{htmlFor:`operation-type-selector`,children:`Operation Type`}),(0,U.jsx)(XA,{id:`operation-type-selector`,value:m,options:u,onSelect:e=>h(e.value),className:`w-full`})]}),(0,U.jsxs)(`div`,{className:`flex-1`,children:[(0,U.jsx)(RA,{htmlFor:`operation-status-selector`,children:`Operation Status`}),(0,U.jsx)(XA,{id:`operation-status-selector`,options:l,value:g,onSelect:e=>_(e.value),className:`w-full`})]})]}),(0,U.jsx)(`hr`,{}),(0,U.jsx)(W,{variant:`horizontal`,className:`items-center justify-between`,children:(0,U.jsxs)(W,{variant:`horizontal`,size:`sm`,children:[(0,U.jsx)(K,{type:`submit`,children:`Filter`}),(0,U.jsx)(K,{variant:`white`,onClick:y,children:`Reset`})]})})]})})}),(0,U.jsxs)(VA,{children:[(0,U.jsxs)(HA,{children:[(0,U.jsx)(KA,{children:`Resource`}),(0,U.jsx)(KA,{children:`Status`}),(0,U.jsx)(KA,{children:`Type`}),(0,U.jsx)(KA,{children:`Related To`}),(0,U.jsx)(KA,{children:`Environment`}),(0,U.jsx)(KA,{children:`User`}),(0,U.jsx)(KA,{children:`Last Updated`}),(0,U.jsx)(KA,{variant:`right`,children:`Actions`})]}),(0,U.jsxs)(UA,{children:[e.data.length===0?(0,U.jsx)(GA,{colSpan:8}):null,e.data.map(e=>(0,U.jsx)(mze,{op:e},e.id))]})]}),e.totalPages>1&&(0,U.jsx)(RU,{...e,isLoading:n||e.isLoading})]})}function bze(){let e=dw(`UTC`);return{start:e.subtract({days:6}),end:e}}function xze({orgId:e}){let t=_E({orgId:e});u(uce());let n=B(RC),r=(0,V.useMemo)(()=>n.map(e=>({value:e.value,label:e.title})).sort((e,t)=>
109e.label.localeCompare(t.label)),[n]),i=(0,V.useMemo)(()=>new Set(n.filter(e=>e.deleted).map(e=>e.value)),[n]),a=i.size>0,o=(0,V.useCallback)(e=>{let t=i.has(e.value);return a?(0,U.jsxs)(`span`,{className:`flex items-center gap-1.5 w-full`,children:[(0,U.jsx)(`span`,{className:`w-4 shrink-0 flex items-center justify-center`,children:t?(0,U.jsx)(hze,{}):null}),(0,U.jsx)(`span`,{children:e.label})]}):e.label},[i,a]),s=(0,V.useCallback)(e=>i.has(e.value)?`This environment has been deleted`:void 0,[i]);return(0,U.jsx)(E6,{...t,envOptions:r,renderEnvOptionLabel:o,getEnvOptionTitle:s})}function Sze({envId:e}){let t=_E({orgId:B(ns).id,fixedFilters:{envs:[e]}});return(0,U.jsx)(E6,{...t,showTitle:!1})}function Cze({appId:e}){let t=B(ns),n=B(t=>rf(t,{id:e})).environmentId,r=_E({orgId:t.id,fixedFilters:{resourceType:`App`,resourceId:e,envs:n?[n]:[]}});return(0,U.jsx)(E6,{...r,showTitle:!1})}function wze({dbId:e}){let t=B(ns),n=B(t=>lp(t,{id:e})).environmentId,r=_E({orgId:t.id,fixedFilters:{resourceType:`Database`,resourceId:e,envs:n?[n]:[]}});return(0,U.jsx)(E6,{...r,showTitle:!1})}function Tze({enpId:e}){let t=B(ns),n=B(t=>Lp(t,{id:e})),r=B(e=>Eu(e,{id:n.serviceId})).environmentId,i=_E({orgId:t.id,fixedFilters:{resourceType:`Endpoint`,resourceId:e,envs:r?[r]:[]}});return(0,U.jsx)(E6,{...i,showTitle:!1})}var Eze=()=>{let{search:e,onChange:t}=_C(`q`,650,`activity-filter-query`),n=B(VU).collapsed;return(0,U.jsxs)(`div`,{className:`relative w-full sm:w-[250px] h-[36px] min-w-[180px] flex-shrink-0 ${n?`max-[860px]:hidden`:`max-[1040px]:hidden`}`,children:[(0,U.jsx)(YH,{search:e,onChange:t,placeholder:`Search activity...`,className:`w-full h-full`}),e.trim()===``?null:(0,U.jsx)(`button`,{type:`button`,"aria-label":`Clear search`,className:`absolute top-1/2 -translate-y-1/2 right-[10px] text-gray-500 hover:text-gray-700 focus:outline-none focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:ring-inset rounded`,onClick:()=>{t({currentTarget:{value:``}})},children:(0,U.jsx)(JE,{variant:`sm`,color:`#6B7280`})})]})};function E6({activities:e,isLoading:t,dateRange:n,onDateRangeChange:r,pagination:i,onPageChange:a,dateWarning:o,onDismissWarning:s,typeOptions:c,statusOptions:l,actorOptions:u,envOptions:d=[],renderEnvOptionLabel:f,getEnvOptionTitle:p,stagedTypes:m,stagedStatuses:h,stagedActors:g,stagedEnvs:_=[],stagedReadOnly:v,onTypesChange:y,onStatusesChange:b,onActorsChange:x,onEnvsChange:S,onReadOnlyChange:C,onApplyFilters:w,onResetFilters:T,hasPendingChanges:E,showEnvFilter:D=!0,hideFilters:O=!1,hidePagination:k=!1,showTitle:A=!0,initialColumnVisibility:j,appliedExportFilters:M}){let[ee]=Ee(),te=ee.get(`q`)||void 0,[ne,re]=(0,V.useState)(`utc`);(0,V.useEffect)(()=>{let e=e=>{(e.metaKey||e.ctrlKey)&&e.key===`f`&&Ys(`key-f-triggered-on-activity-table`)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[]);let ie=(0,V.useMemo)(()=>c.map(e=>({...e,disabled:!v&&e.readOnly===!0})),[c,v]),ae=D?v6:v6.map(e=>e.id===`environment`?{...e,hidden:!0}:e),[oe,se]=(0,V.useState)({...KRe,...!D&&{environment:!1},...j}),[N,ce]=(0,V.useState)(GRe),le=(0,V.useMemo)(()=>bze(),[]),ue=n.start.compare(le.start)!==0||n.end.compare(le.end)!==0,de=m.length>0||h.length>0||g.length>0||D&&_.length>0||ue||v,fe=(0,V.useMemo)(()=>({page:i.page,totalPages:i.totalPages,isLoading:t,prev:()=>{i.page>1&&a(i.page-1)},next:()=>{i.page<i.totalPages&&a(i.page+1)}}),[i,t,a]),pe=(0,V.useMemo)(()=>({organizationId:``,occurredAfter:``,occurredBefore:``}),[]),me=wle(M||pe),he=me.status===`error`?`error`:me.status===`ready`?`ready`:me.status===`idle`?`idle`:`exporting`;return(0,U.jsxs)(W,{children:[A?(0,U.jsx)(W,{size:`sm`,children:(0,U.jsx)(NU,{visible:!0,description:`Activity shows real-time changes across your organization.`,children:`Activity`})}):null,o?(0,U.jsx)(q,{variant:`warning`,children:(0,U.jsxs)(`div`,{className:`flex items-center justify-between w-full`,children:[(0,U.jsx)(`span`,{children:o}),(0,U.jsx)(`button`,{type:`button`,onClick:s,className:`ml-4 p-1 hover:bg-yellow-200 rounded`,"aria-label":`Dismiss warning`,children:(0,U.jsx)(JE,{variant:`sm`})})]})}):null,(0,U.jsx)(SA,{status:he,onCancel:me.cancel,errorMessage:me.error,progress:me.exportData.progress,downloadUrl:me.downloadUrl}),O?null:(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`div`,{className:`flex flex-wrap gap-3 lg:gap-4 w-full max-w-full`,children:[(0,U.jsxs)(`div`,{className:`flex-1 max-w-full basis-[calc(33.333%-0.75rem)] xl:basis-auto`,children:[(0,U.jsx)(RA,{htmlFor:`date-range-activity-selector`,children:`Date Range`}),(0,U.jsx)(cU,{id:`date-range-activity-selector`,useUTC:!0,value:n,onChange:r,className:`w-full`})]}),(0,U.jsxs)(`div`,{className:`flex-1 max-w-full basis-[calc(33.333%-0.75rem)] xl:basis-auto`,children:[(0,U.jsx)(RA,{htmlFor:`operation-type-selector`,children:`Operation Type`}),(0,U.jsx)(C6,{id:`operation-type-selector`,ariaLabel:`Operation Type`,value:m,options:ie,onChange:e=>y(e),placeholder:`All Operation Types`,className:`w-full`,customContent:(0,U.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,U.jsx)(A2,{checked:v,onChange:C,ariaLabel:`Show Read-Only`}),(0,U.jsx)(`span`,{className:`text-sm text-gray-700`,children:`Show Read-Only`}),(0,U.jsx)(aA,{text:`Read-Only activities tend to be very high volume, and are hidden by default.`,placement:`top`,children:(0,U.jsx)(tD,{variant:`sm`,className:`opacity-50 hover:opacity-100`})})]})})]}),(0,U.jsxs)(`div`,{className:`flex-1 max-w-full basis-[calc(33.333%-0.75rem)] xl:basis-auto`,children:[(0,U.jsx)(RA,{htmlFor:`status-selector`,children:`Status`}),(0,U.jsx)(C6,{id:`status-selector`,ariaLabel:`Status`,value:h,options:l,onChange:e=>b(e),placeholder:`All Statuses`,className:`w-full`})]}),(0,U.jsxs)(`div`,{className:`flex-1 max-w-full basis-[calc(33.333%-0.75rem)] xl:basis-auto`,children:[(0,U.jsx)(RA,{htmlFor:`actor-selector`,children:`Actor`}),(0,U.jsx)(C6,{id:`actor-selector`,ariaLabel:`Actor`,value:g,options:u,onChange:e=>x(e),placeholder:`All Actors`,className:`w-full`})]}),D?(0,U.jsxs)(`div`,{className:`flex-1 max-w-full basis-[calc(33.333%-0.75rem)] xl:basis-auto`,children:[(0,U.jsx)(RA,{htmlFor:`environment-selector`,children:`Environment`}),(0,U.jsx)(C6,{id:`environment-selector`,ariaLabel:`Environment`,value:_,options:d,onChange:e=>S?.(e),placeholder:`All Environments`,className:`w-full`,renderOptionLabel:f,getOptionTitle:p,dropdownClassName:`min-w-[350px] right-0`})]}):null,(0,U.jsxs)(`div`,{className:`flex items-end gap-2 pb-0.5 flex-shrink-0 basis-full xl:basis-auto`,children:[de?(0,U.jsx)(K,{variant:`white`,size:`sm`,onClick:T,children:`Reset`}):null,E?(0,U.jsx)(aA,{text:`You have unapplied filter changes`,placement:`top`,fluid:!0,children:(0,U.jsx)(K,{variant:`primary`,size:`sm`,onClick:w,className:`shadow-lg shadow-yellow-400/50 ring-2 ring-yellow-400/60`,children:`Apply Filters`})}):(0,U.jsx)(K,{variant:`primary`,size:`sm`,onClick:w,disabled:!0,children:`Apply Filters`})]})]}),(0,U.jsx)(`hr`,{}),(0,U.jsx)(W,{variant:`horizontal`,size:`lg`,className:`items-center mt-1`,children:(0,U.jsx)(IU,{className:`w-full`,children:(0,U.jsxs)(`div`,{className:`flex w-full items-center justify-between gap-4`,children:[(0,U.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,U.jsx)(RU,{...fe,isLoading:!1}),t&&e.length===0?`Loading results...`:`${i.totalCount||e.length} Results`,t&&e.length>0?(0,U.jsx)(SE,{}):null]}),(0,U.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,U.jsx)(Eze,{}),(0,U.jsx)(`span`,{className:`text-xs ${ne===`utc`?`text-black font-medium`:`text-gray-400`}`,children:`UTC`}),(0,U.jsx)(A2,{ariaLabel:`Toggle timezone`,checked:ne===`local`,onChange:()=>re(e=>e===`utc`?`local`:`utc`)}),(0,U.jsx)(`span`,{className:`text-xs ${ne===`local`?`text-black font-medium`:`text-gray-400`}`,children:`Local`}),(0,U.jsx)(sfe,{onExport:me.startExport,isExporting:he===`exporting`,disabled:e.length===0}),(0,U.jsx)(tze,{columns:ae,columnVisibility:oe,onColumnVisibilityChange:se,columnOrder:N,onColumnOrderChange:ce})]})]})})})]}),(0,U.jsx)(`div`,{className:`min-w-0`,children:(0,U.jsx)(QRe,{activities:e,isLoading:t,tz:ne,columnVisibility:oe,onColumnVisibilityChange:se,hasPendingChanges:E,columnOrder:N,onColumnOrderChange:ce,q:te})}),!k&&fe.totalPages>1&&(0,U.jsx)(RU,{...fe,isLoading:!1})]})}function Dze({orgId:e}){JS({action:(0,V.useMemo)(()=>Sd({orgId:e}),[e]),cancel:(0,V.useMemo)(()=>xd(),[])});let t=I(Sd),n=Yse(e);return(0,U.jsx)(yze,{paginated:n,isLoading:t.isLoading,showTitle:!0,showResourceTypeFilter:!0})}var Oze=({envId:e,scope:t,children:n})=>B(n=>O_(n,{envId:e,scope:t}))?(0,U.jsx)(U.Fragment,{children:n}):null,kze={default:`bg-black-50 border-black-200 text-black-500`,success:`bg-green-100 border-green-200 text-forest`},D6=({children:e,className:t=``,variant:n=`default`,onRemove:r})=>(0,U.jsxs)(`div`,{className:(0,H.default)(`rounded border h-[20px] px-2 py-1 flex gap-1.5 justify-center items-center w-fit box-border`,`font-mono text-xs leading-none uppercase`,kze[n],t),children:[(0,U.jsx)(`span`,{children:e}),r?(0,U.jsx)(`button`,{type:`button`,"aria-label":`Remove`,onClick:r,className:`flex items-center justify-center`,children:(0,U.jsx)(JE,{variant:`sm`,className:`w-3 h-3`})}):null]}),O6=({enabled:e,className:t})=>(0,U.jsx)(Z4,{className:(0,H.default)(e?`text-forest`:`text-red`,t),icon:e?(0,U.jsx)(WE,{variant:`sm`,color:`currentColor`}):(0,U.jsx)(JE,{variant:`sm`,color:`currentColor`}),children:e?`Enabled`:`Disabled`}),k6=({children:e})=>(0,U.jsx)(`div`,{className:`mt-4 first:mt-0`,children:(0,U.jsx)(`div`,{className:`bg-white pt-4 pb-5 px-5 shadow rounded-lg border border-black-100`,children:e})}),Aze=({appId:e,children:t,status:n,handle:r})=>{let i=B(t=>Kp(t,{appId:e})),a=B(t=>fd(t,{appId:e})),o=B(t=>rf(t,{id:e})),s=B(e=>tu(e,{id:o.environmentId})),c=B(e=>tu(e,{id:o.environmentId}));return(0,U.jsxs)(k6,{children:[(0,U.jsxs)(`div`,{className:`border-b border-black-100 pb-4 `,children:[(0,U.jsxs)(`div`,{className:`flex items-start`,children:[(0,U.jsx)(`div`,{children:(0,U.jsx)(`img`,{alt:`default project logo`,src:`/resource-types/logo-app.png`,style:{width:32,height:32},className:`mr-3 max-w-none mt-2`})}),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`h4`,{className:`break-words ${G.type.h4}`,children:r}),(0,U.jsx)(`div`,{className:`text-black-500 text-sm pb-1`,children:Vp(i)&&i.status===`provisioned`?(0,U.jsx)(t3,{enp:i}):`Pending HTTP Endpoint`})]})]}),(0,U.jsxs)(`div`,{className:`flex items-center mt-1 gap-1`,children:[n,(0,U.jsx)(H2,{icon:(0,U.jsx)(nD,{color:`#595E63`,variant:`sm`}),children:(0,U.jsx)(P,{to:Pa(c.id),children:s.handle})}),(0,U.jsx)(H2,{icon:(0,U.jsx)(eD,{color:`#595E63`,variant:`sm`}),title:a.gitRef,children:Gre(a.gitRef)||`Pending`})]})]}),t]})},A6=()=>{let e=N(),t=B(ns),n=B(qo);return(0,U.jsxs)(`div`,{onClick:()=>e(zi()),onKeyUp:()=>e(zi()),role:`button`,className:(0,H.default)([`border border-gray-200 bg-white rounded-lg cursor-pointer`,`px-2 py-1`,`flex items-center`,`hover:bg-black-50`]),children:[(0,U.jsx)(lD,{className:`p-1 mr-2 border border-black-100 rounded-md`,variant:`lg`}),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`div`,{className:`text-black`,children:t.name.slice(0,20)}),(0,U.jsx)(`div`,{className:`text-gray-500 text-sm`,children:n.name.slice(0,20)})]})]})},j6=({children:e})=>(0,U.jsx)(`div`,{className:`mb-4`,children:e}),M6=e=>e===`succeeded`?`success`:e===`failed`?`error`:e===`running`||e===`queued`?`progress`:`default`,N6=({resourceId:e,resourceType:t})=>{let n=B(n=>od(n,{resourceId:e,resourceType:t}));if(!n||!{configure:[`failed`,`running`,`queued`],configure_backup_policy:[`failed`,`running`,`queued`],deploy:[`failed`,`running`,`queued`],deprovision:[`failed`,`running`,`queued`,`succeeded`],provision:[`failed`,`running`,`queued`],restart:[`failed`,`running`,`queued`],scale:[`failed`,`running`,`queued`]}[n.type]?.includes(n.status))return null;let r=n.type===`configure`||n.type===`configure_backup_policy`?`configuring`:`${n.type}ing`;return[`failed`,`succeeded`].includes(n.status)?(0,U.jsx)(j6,{children:(0,U.jsx)(q,{variant:M6(n.status),children:(0,U.jsxs)(`p`,{children:[cl(n.status),` `,r,` `,(0,U.jsx)(`b`,{children:t}),` (`,Of(n.createdAt),`) -`,` `,(0,U.jsx)(P,{className:`underline`,to:po(n.id
109),children:`View operation`})]})})}):[`running`,`queued`].includes(n.status)?(0,U.jsx)(j6,{children:(0,U.jsx)(q,{variant:M6(n.status),children:(0,U.jsxs)(`p`,{children:[cl(r),` `,(0,U.jsx)(`b`,{children:t}),` (`,Of(n.createdAt),`) -`,` `,(0,U.jsx)(P,{className:`underline`,to:po(n.id),children:`View operation`})]})})}):null},P6=({logDrainId:e,envId:t,fieldValue:n,label:r,renderValue:i})=>{let a=l(),[o,s]=(0,V.useState)(!1),c=B(e=>O_(e,{scope:`sensitive`,envId:t})),u=ih({id:e,withSensitiveExtras:!0}),d=I(u),f=!!(B(t=>Ym(t,{id:e})).id&&n);T(d,()=>{s(!0)});let p=()=>{!f&&!o&&!d.isLoading?a(u):s(!o)},m=(0,U.jsx)(vD,{variant:`sm`});if(d.isLoading?m=(0,U.jsx)(SE,{variant:`sm`}):o&&(m=(0,U.jsx)(yD,{variant:`sm`})),!c)return(0,U.jsxs)(`div`,{className:`flex items-center gap-2 min-w-0`,children:[(0,U.jsx)(`div`,{className:`flex items-center gap-2 min-w-0 flex-shrink`,children:(0,U.jsx)(YU,{children:r})}),(0,U.jsx)(aA,{text:`You do not have "${cl(`sensitive`)}" permissions for this environment (id:${t})`,children:(0,U.jsx)(K,{variant:`white`,size:`sm`,disabled:!0,className:`px-2 py-1 flex-shrink-0`,"aria-label":`Show sensitive data (requires sensitive permissions)`,children:m})})]});let h=`Show sensitive data`;return d.isLoading?h=`Loading sensitive data`:o&&(h=`Hide sensitive data`),(0,U.jsxs)(`div`,{className:`flex items-center gap-2 min-w-0`,children:[(0,U.jsx)(`div`,{className:`flex items-center gap-2 min-w-0 flex-shrink`,children:!o||!n?(0,U.jsx)(YU,{children:r}):(0,U.jsxs)(U.Fragment,{children:[i?(0,U.jsx)(`div`,{className:`max-w-[180px] truncate`,children:i(n)}):(0,U.jsx)(aA,{text:n,children:(0,U.jsx)(`div`,{className:`max-w-[180px] truncate`,children:(0,U.jsx)(YU,{children:n})})}),(0,U.jsx)(B2,{text:n})]})}),(0,U.jsx)(K,{variant:`white`,size:`sm`,onClick:p,disabled:d.isLoading,className:`px-2 py-1 flex-shrink-0`,"aria-label":h,children:m})]})},jze=()=>(0,U.jsx)(`div`,{children:(0,U.jsxs)(`div`,{className:`flex border-t border-black-100 py-4 mt-7`,children:[(0,U.jsxs)(`p`,{className:`grow text-gray-500 text-sm uppercase`,children:[`Aptible, Inc. © `,new Date().getFullYear()]}),(0,U.jsx)(`div`,{className:`flex md:flex-row flex-col`,children:(0,U.jsxs)(`a`,{href:`https://www.aptible.com/changelog`,target:`_blank`,className:`flex-none text-gray-500 hover:text-indigo text-sm pl-4 uppercase hidden md:block`,rel:`noreferrer`,children:[`Changelog`,` `,(0,U.jsx)(rD,{className:`inline h-4 -ml-1 -mt-1 opacity-60`})]})})]})}),F6=e=>e===`self_hosted`?`/resource-types/logo-aws.png`:e===`dedicated`?`/resource-types/logo-dedicated-stack.png`:`/resource-types/logo-stack.png`,Mze=({stack:e})=>{let t=Gl(e);return(0,U.jsx)(`div`,{children:(0,U.jsxs)(P,{to:Co(e.id),className:`text-black group-hover:text-indigo hover:text-indigo flex items-center`,children:[(0,U.jsx)(`img`,{src:F6(t),alt:`stack icon`,className:`w-[32px] h-[32px] mr-2`}),t===`self_hosted`?(0,U.jsxs)(`p`,{className:`flex flex-col`,children:[(0,U.jsx)(`span`,{className:G.type[`table link`],children:e.name}),(0,U.jsx)(`span`,{className:G.type[`normal lighter`],children:e.awsAccountId})]}):(0,U.jsx)(`span`,{className:G.type[`table link`],children:e.name})]})})},Nze=({done:e=!1})=>(0,U.jsx)(`div`,{className:`w-[20px] h-[4px] border mr-3 ${e?`bg-black border-black`:`bg-gray-100 border-gray-100`}`,children:` `}),I6=({cur:e,total:t=4,prev:n=``,next:r=``})=>{let i=B(an),a=[];for(let n=1;n<=t;n+=1)a.push((0,U.jsx)(Nze,{done:e>=n},`step-${n}`));let o=(0,U.jsx)(`div`,{className:`flex items-center`,children:a});return i.isProduction&&e!==-1?(0,U.jsx)(`div`,{className:`mb-4 flex justify-center`,children:o}):(0,U.jsxs)(`div`,{className:`mb-4 flex justify-center`,children:[o,(0,U.jsxs)(`div`,{className:`ml-4`,children:[n?(0,U.jsx)(P,{"aria-disabled":!n,to:n,className:`pr-2`,children:`Prev`}):null,r?(0,U.jsx)(P,{"aria-disabled":!r,to:r,children:`Next`}):null]})]})},L6=({onSuccess:e=()=>{}})=>{let t=B(Ko),n=l(),[r,i]=(0,V.useState)(Df(new Date().toISOString())),[a,o]=(0,V.useState)(``),s=I(eC);return T(s,()=>{o(``),e()}),(0,U.jsxs)(`div`,{children:[(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`h4`,{className:G.type.h4,children:`Step 1. Copy Public SSH Key`}),(0,U.jsx)(`p`,{className:`text-gray-600 mb-2`,children:`Copy your public key to the clipboard. If you're not sure what your public key is, the following command will automatically print your SSH key from the ssh-agent or the default SSH directory:`}),(0,U.jsx)(w4,{allowCopy:!0,segments:[{text:`ssh-add`,className:`text-lime`},{text:`-L`,className:`text-white`},{text:`||`,className:`text-indigo`},{text:`cat`,className:`text-lime`},{text:`~/.ssh/*.pub`,className:`text-white`}]})]}),(0,U.jsxs)(`div`,{className:`my-4`,children:[(0,U.jsx)(`h4`,{className:G.type.h4,children:`If you donât already have an SSH Public Key, generate a new SSH key using this command`}),(0,U.jsxs)(`p`,{className:`text-gray-600 mb-2`,children:[`Need help generating a new key?`,` `,(0,U.jsx)(`a`,{href:`https://www.aptible.com/docs/public-key-authentication`,children:`View our docs`})]}),(0,U.jsx)(w4,{allowCopy:!0,segments:[{text:`ssh-keygen -t ed25519 -C`,className:`text-lime`}
109,{text:`"[email protected]"`,className:`text-white`}]})]}),(0,U.jsx)(`div`,{className:`mt-2`,children:(0,U.jsx)(`form`,{onSubmit:e=>{e.preventDefault(),n(eC({userId:t,name:r,key:a}))},children:(0,U.jsxs)(W,{size:`sm`,children:[(0,U.jsx)(J,{label:`Step 2. Name Your Key`,htmlFor:`key-name`,feedbackVariant:`info`,children:(0,U.jsx)(X,{id:`key-name`,name:`key-name`,value:r,onChange:e=>i(e.currentTarget.value)})}),(0,U.jsx)(J,{label:`Step 3. Paste Public SSH Key`,htmlFor:`public-key`,feedbackVariant:`info`,children:(0,U.jsx)(`textarea`,{id:`public-key`,name:`public-key`,className:G.type.textarea,value:a,onChange:e=>o(e.currentTarget.value)})}),s.isError?(0,U.jsx)(TA,{...s}):null,(0,U.jsx)(`div`,{children:(0,U.jsx)(K,{type:`submit`,disabled:!a,isLoading:s.isLoading,children:`Save Key`})})]})})})]})},R6=({cert:e})=>(0,U.jsx)(H2,{variant:e.trusted?`success`:`error`,children:e.trusted?`Trusted`:`Untrusted`}),z6=({cert:e})=>e.acme?(0,U.jsx)(H2,{variant:`success`,children:`Managed HTTPS`}):null,B6=({cert:e})=>{let t=new Date(e.notAfter)<=new Date;return(0,U.jsxs)(`div`,{children:[(0,U.jsxs)(`div`,{className:G.type.darker,children:[Df(e.notBefore),` - `,Df(e.notAfter)]}),t?(0,U.jsx)(`div`,{className:`text-sm text-red`,children:`Expired`}):null]})},V6=({cert:e})=>(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`div`,{className:G.type.darker,children:e.issuerOrganization}),(0,U.jsxs)(`div`,{className:G.type[`small lighter`],children:[`Fingerprint: `,e.sha256Fingerprint.slice(0,8)]})]}),H6=({label:e,info:t,docsUrl:n})=>(0,U.jsxs)(`span`,{className:`flex items-center gap-1`,children:[e,(0,U.jsx)(O4,{trigger:(0,U.jsx)(tD,{className:`w-4 h-4 text-black-300`}),children:(0,U.jsxs)(`span`,{children:[t,n?(0,U.jsxs)(U.Fragment,{children:[` `,(0,U.jsx)(`a`,{href:n,target:`_blank`,rel:`noreferrer`,className:`underline`,children:`Learn more`})]}):null]})})]}),Pze=({value:e,onChange:t,error:n})=>(0,U.jsx)(J,{label:`IP Allowlist`,htmlFor:`ip-allowlist`,description:`Only traffic from the following sources is allowed. Add more sources (IPv4 addresses and CIDRs) by separating them with spaces or newlines.`,feedbackMessage:n,feedbackVariant:n?`danger`:`info`,children:(0,U.jsx)(XH,{id:`ip-allowlist`,"aria-label":`ip-allowlist`,value:e,onChange:e=>t(e.currentTarget.value)})}),Fze=({value:e,onChange:t})=>(0,U.jsx)(J,{label:(0,U.jsx)(H6,{label:`Force SSL`,info:`Redirect all HTTP requests to HTTPS, and enable the Strict-Transport-Security header (HSTS).`,docsUrl:`https://www.aptible.com/docs/core-concepts/apps/connecting-to-apps/app-endpoints/https-endpoints/https-redirect`}),htmlFor:`force-ssl`,children:(0,U.jsx)(XA,{ariaLabel:`Force SSL`,id:`force-ssl`,value:e,options:[{label:`Accept platform default (currently off)`,value:``},{label:`On`,value:`true`},{label:`Off`,value:`false`}],onSelect:e=>t(e.value)})}),Ize=({value:e,onChange:t,options:n})=>(0,U.jsx)(J,{label:(0,U.jsx)(H6,{label:`SSL Protocols Override`,info:`Specify a list of allowed SSL protocols.`,docsUrl:`https://www.aptible.com/docs/core-concepts/apps/connecting-to-apps/app-endpoints/https-endpoints/https-protocols`}),htmlFor:`ssl-protocols-override`,children:(0,U.jsx)(XA,{ariaLabel:`SSL Protocols Override`,id:`ssl-protocols-override`,value:e,options:n,onSelect:e=>t(e.value)})}),Lze=({value:e,onChange:t})=>(0,U.jsx)(J,{label:(0,U.jsx)(H6,{label:`SSL Ciphers Override`,info:`Specify the allowed SSL ciphers.`,docsUrl:`https://www.aptible.com/docs/core-concepts/apps/connecting-to-apps/app-endpoints/https-endpoints/https-protocols`}),htmlFor:`ssl-ciphers-override`,children:(0,U.jsx)(X,{id:`ssl-ciphers-override`,name:`ssl-ciphers-override`,type:`text`,placeholder:`Accept platform default`,value:e,onChange:e=>t(e.currentTarget.value)})}),Rze=({value:e,onChange:t})=>(0,U.jsx)(J,{label:(0,U.jsx)(H6,{label:`Disable Weak Cipher Suites`,info:`Prevents acceptance of SSLv3 and RC4 cipher traffic. Applies to legacy ELB endpoints only (weak ciphers are already disabled on ALB).`,docsUrl:`https://www.aptible.com/docs/core-concepts/apps/connecting-to-apps/app-endpoints/https-endpoints/https-protocols`}),htmlFor:`disable-weak-cipher-suites`,children:(0,U.jsx)(XA,{ariaLabel:`Disable Weak Cipher Suites`,id:`disable-weak-cipher-suites`,value:e,options:[{label:`Accept platform default`,value:``},{label:`Enabled`,value:`true`},{label:`Disabled`,value:`false`}],onSelect:e=>t(e.value)})}
109),zze=({value:e,onChange:t})=>(0,U.jsx)(J,{label:(0,U.jsx)(H6,{label:`Strict Health Checks`,info:`Require containers to respond to health checks with a 200 OK HTTP response.`,docsUrl:`https://www.aptible.com/docs/core-concepts/apps/connecting-to-apps/app-endpoints/https-endpoints/health-checks`}),htmlFor:`strict-health-checks`,children:(0,U.jsx)(XA,{ariaLabel:`Strict Health Checks`,id:`strict-health-checks`,value:e,options:[{label:`Accept platform default (currently off)`,value:``},{label:`On`,value:`true`},{label:`Off`,value:`false`}],onSelect:e=>t(e.value)})}),Bze=({value:e,onChange:t,error:n})=>(0,U.jsx)(J,{label:(0,U.jsx)(H6,{label:`Release Healthcheck Timeout`,info:`Timeout (seconds) to wait for your app to respond to a release health check.`,docsUrl:`https://www.aptible.com/docs/core-concepts/apps/connecting-to-apps/app-endpoints/https-endpoints/health-checks`}),htmlFor:`release-healthcheck-timeout`,feedbackMessage:n,feedbackVariant:n?`danger`:`info`,children:(0,U.jsx)(X,{id:`release-healthcheck-timeout`,name:`release-healthcheck-timeout`,type:`number`,placeholder:`Accept platform default (currently 180s)`,value:e,onChange:e=>t(e.currentTarget.value),min:1,max:900})}),Vze=({value:e,onChange:t,error:n})=>(0,U.jsx)(J,{label:(0,U.jsx)(H6,{label:`Idle Timeout`,info:`Timeout (seconds) to enforce idle timeouts while sending and receiving responses.`,docsUrl:`https://www.aptible.com/docs/core-concepts/apps/connecting-to-apps/app-endpoints/overview`}),htmlFor:`idle-timeout`,feedbackMessage:n,feedbackVariant:n?`danger`:`info`,children:(0,U.jsx)(X,{id:`idle-timeout`,name:`idle-timeout`,type:`number`,placeholder:`Accept platform default (currently 60s)`,value:e,onChange:e=>t(e.currentTarget.value),min:30,max:2400})}),Hze=({value:e,onChange:t})=>(0,U.jsx)(J,{label:(0,U.jsx)(H6,{label:`Show ELB Health Checks in Logs`,info:`Show all runtime health check requests in the endpoint's logs.`,docsUrl:`https://www.aptible.com/docs/core-concepts/apps/connecting-to-apps/app-endpoints/https-endpoints/endpoint-logs`}),htmlFor:`show-elb-healthchecks`,children:(0,U.jsx)(XA,{ariaLabel:`Show ELB Health Checks`,id:`show-elb-healthchecks`,value:e,options:[{label:`Accept platform default (currently off)`,value:``},{label:`On`,value:`true`},{label:`Off`,value:`false`}],onSelect:e=>t(e.value)})}),Uze=({value:e,onChange:t,error:n})=>(0,U.jsx)(J,{label:(0,U.jsx)(H6,{label:`Maintenance Page URL`,info:`The URL of a maintenance page to cache and serve when requests time out, or your app is unhealthy.`,docsUrl:`https://www.aptible.com/docs/core-concepts/apps/connecting-to-apps/app-endpoints/https-endpoints/maintenance-page`}),htmlFor:`maintenance-page-url`,feedbackMessage:n,feedbackVariant:n?`danger`:`info`,children:(0,U.jsx)(X,{id:`maintenance-page-url`,name:`maintenance-page-url`,type:`text`,placeholder:`An unbranded maintenance page will be served`,value:e,onChange:e=>t(e.currentTarget.value)})}),U6=({applies:e,sslProtocolsOptions:t,ipAllowlist:n,onIpAllowlistChange:r,ipAllowlistError:i,forceSSL:a,onForceSSLChange:o,sslProtocolsOverride:s,onSslProtocolsOverrideChange:c,sslCiphersOverride:l,onSslCiphersOverrideChange:u,disableWeakCipherSuites:d,onDisableWeakCipherSuitesChange:f,tokenFormSlot:p})=>{let[m,h]=(0,V.useState)(!1);return(0,U.jsx)(`div`,{className:`py-4`,children:(0,U.jsx)(r4,{labelWhenClosed:`Security`,labelWhenOpen:`Security`,open:m,onToggle:()=>h(e=>!e),labelClassName:`text-md`,children:(0,U.jsxs)(`div`,{className:`mt-4 ml-6 flex flex-col gap-4`,children:[(0,U.jsx)(Pze,{value:n,onChange:r,error:i}),e(`FORCE_SSL`)?(0,U.jsx)(Fze,{value:a,onChange:o}):null,e(`SSL_PROTOCOLS_OVERRIDE`)?(0,U.jsx)(Ize,{value:s,onChange:c,options:t}):null,e(`SSL_CIPHERS_OVERRIDE`)?(0,U.jsx)(Lze,{value:l,onChange:u}):null,e(`DISABLE_WEAK_CIPHER_SUITES`)?(0,U.jsx)(Rze,{value:d,onChange:f}):null,p]})})})},W6=({applies:e,strictHealthChecks:t,onStrictHealthChecksChange:n,releaseHealthcheckTimeout:r,onReleaseHealthcheckTimeoutChange:i,releaseHealthcheckTimeoutError:a,idleTimeout:o,onIdleTimeoutChange:s,idleTimeoutError:c,showElbHealthchecks:l,onShowElbHealthchecksChange:u,maintenancePageUrl:d,onMaintenancePageUrlChange:f,maintenancePageUrlError:p,lbAlgorithmSlot:m})=>{let[h,g]=(0,V.useState)(!1);return(0,U.jsx)(`div`,{className:`py-4`,children:(0,U.jsx)(r4,{labelWhenClosed:`Healthchecks and Request handling`,labelWhenOpen:`Healthchecks and Request handling`,open:h,onToggle:()=>g(e=>!e),labelClassName:`text-md`,children:(0,U.jsxs)(`div`,{className:`mt-4 ml-6 flex flex-col gap-4`,children:[m,e(`STRICT_HEALTH_CHECKS`)?(0,U.jsx)(zze,{value:t,onChange:n}):null,e(`RELEASE_HEALTHCHECK_TIMEOUT`)?(0,U.jsx)(Bze,{value:r,onChange:i,error:a}):null,e(`IDLE_TIMEOUT`)?(0,U.jsx)(Vze,{value:o,onChange:s,error:c}
109):null,e(`SHOW_ELB_HEALTHCHECKS`)?(0,U.jsx)(Hze,{value:l,onChange:u}):null,e(`MAINTENANCE_PAGE_URL`)?(0,U.jsx)(Uze,{value:d,onChange:f,error:p}):null]})})})},G6=({envId:e,onSelect:t,selectedId:n,className:r=``})=>{u(Zf({id:e}));let i=B(t=>Uf(t,{envId:e})).filter(e=>!e.acme),a=[{label:i.length>0?`Select an Existing Certificate`:`No custom certificates found`,value:``}];return i.forEach(e=>{a.push({label:rp(e),value:e.id})}),(0,U.jsx)(XA,{id:`existing-cert`,ariaLabel:`existing-cert`,options:a,onSelect:t,value:n,className:r,disabled:!i.length})},Wze=Df(new Date().toISOString());function K6({csv:e,title:t}){let n=(0,V.useRef)(null);return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(cA,{icon:(0,U.jsx)(aD,{variant:`sm`}),onClick:()=>{if(n.current){let t=new Blob([e()],{type:`text/csv`}),r=URL.createObjectURL(t);n.current.setAttribute(`href`,r),n.current.click()}},variant:`white`,children:`CSV`}),(0,U.jsx)(`a`,{ref:n,style:{display:`none`},download:`${t}_${Wze}.csv`,href:`data:text/csv`,"aria-label":`download`,children:`download`})]})}var q6=({viewMetricTab:e,setViewMetricTab:t})=>(0,U.jsxs)(`div`,{className:`flex`,children:[(0,U.jsxs)(K,{className:`rounded-r-none ${e===`chart`?`pointer-events-none !bg-black-100`:``}`,variant:`white`,size:`md`,disabled:e===`chart`,onClick:()=>t(`chart`),children:[(0,U.jsx)(uD,{className:`inline h-5 mr-1 mt-0`}),`Charts`]}),(0,U.jsxs)(K,{className:`rounded-l-none ${e===`table`?`pointer-events-none !bg-black-100`:``}`,variant:`white`,size:`md`,disabled:e===`table`,onClick:()=>t(`table`),children:[(0,U.jsx)(cD,{className:`inline h-5 mr-1 mt-0`}),`Table`]})]}),J6=({viewHorizon:e,setViewHorizon:t})=>(0,U.jsxs)(`div`,{className:`flex`,children:[(0,U.jsx)(K,{className:`rounded-r-none hover:z-10 ${e===`1h`?`pointer-events-none !bg-black-100`:``}`,variant:`white`,size:`md`,disabled:e===`1h`,onClick:()=>t(`1h`),children:`1H`}),(0,U.jsx)(K,{className:`rounded-none -ml-[1px] -mr-[1px] hover:z-10 ${e===`1d`?`pointer-events-none !bg-black-100`:``}`,variant:`white`,size:`md`,disabled:e===`1d`,onClick:()=>t(`1d`),children:`1D`}),(0,U.jsx)(K,{className:`rounded-l-none hover:z-10 ${e===`1w`?`pointer-events-none !bg-black-100`:``}`,variant:`white`,size:`md`,disabled:e===`1w`,onClick:()=>t(`1w`),children:`1W`})]}),Y6=`cookieConsent`;(0,cn.default)(`cookie-notice`);var X6=e=>Gze()[e],Z6=(e,t,n)=>{let r=new Date;r.setDate(r.getDate()+n);let i=`${e}=${t}; expires=${r.toUTCString()}; `,a=window.location.hostname.split(`.`).slice(-2).join(`.`);i+=`domain=.${a}; path=/; SameSite=Lax`,window.document.cookie=i},Gze=()=>{let e={},t=window.document.cookie.split(`;`);for(let n of t){let t=n.split(`=`);t.length===2&&(e[t[0].trim()]=t[1].trim())}return e},Kze=()=>{let[e,t]=(0,V.useState)(!1);return(0,V.useEffect)(()=>{X6(Y6)===void 0&&t(!0)},[]),(0,U.jsx)(`div`,{children:e&&(0,U.jsxs)(`div`,{className:`sm:fixed bottom-5 right-5 w-96 px-8 py-8 z-50 bg-white border border-gray-200 rounded-lg`,children:[(0,U.jsx)(`p`,{className:`text-sm`,children:`This site uses cookies to store information on your computer. Some are essential to make our site work; others help us improve the user experience. By using the site, you consent to the placement of these cookies.`}),(0,U.jsxs)(`div`,{className:`my-5 columns-2`,children:[(0,U.jsx)(`div`,{children:(0,U.jsx)(K,{className:`mt-2`,size:`sm`,variant:`secondary`,onClick:()=>{Z6(Y6,`1`,90),t(!1)},children:`Dismiss`})}),(0,U.jsx)(`div`,{children:(0,U.jsxs)(`p`,{className:`text-sm`,children:[`Read our `,(0,U.jsx)(`br`,{}),(0,U.jsx)(`a`,{href:`https://aptible.com/legal/privacy/`,children:`Privacy Statement`})]})})]})]})})},qze=r({deserializeContainerMetricsResponse:()=>$6,fetchAllMetricsByServiceId:()=>c8,fetchContainersByServiceId:()=>i8,fetchMetricByServiceId:()=>a8,fetchMetricTunnelDataForContainer:()=>r8,metricHorizonAsSeconds:()=>Q6,metricsKey:()=>o8,selectContainerMetricsAsList:()=>e8,selectMetricDataAsFlatTableByContainer:()=>t8,selectMetricDataByChart:()=>n8,selectMetricsByContainer:()=>Xze,selectMetricsByMetricContainerHorizon:()=>Zze,selectMetricsLoaded:()=>s8}),Q6=e=>({"1h":3600,"1d":86400,"1w":604800})[e],Jze={Memory:[`memory_all`],CPU:[`cpu_pct`],"File System":[`fs`],IOPS:[`iops`],"Load Average":[`la`]}
109,Yze=({containerId:e,metricName:t,metricLabel:n,metricHorizon:r})=>`${e}-${t}-${n}-${r}`,$6=({containerId:e,metricName:t,metricHorizon:n,payload:r,serviceId:i})=>{let a={},o=r.columns.find(e=>e?.[0]===`time_0`);if(!o)return a;let s=o.slice(1);return r.columns.forEach(r=>{let o=``,c={containerId:e,id:o,serviceId:i,metricName:t,metricLabel:``,metricTimeRange:n,values:[]};r.forEach((r,i)=>{r!==`time_0`&&r!==`time_1`&&(i===0&&typeof r==`string`?(o=Yze({containerId:e,metricName:t,metricLabel:r,metricHorizon:n}),c.metricLabel=r):r!==null&&typeof r==`number`&&c.values.push({date:s?.[i]||``,value:r}))}),c.id=o,o!==``&&(a[o]=c)}),a},e8=L.containerMetrics.selectTableAsList,Xze=D(e8,(e,t)=>t.containerId,(e,t)=>e.find(e=>e.containerId===t)),Zze=D(e8,(e,t)=>t.containerId,(e,t)=>t.metricName,(e,t)=>t.metricHorizon,(e,t,n,r)=>e.find(e=>e.containerId===t&&e.metricName===n&&e.metricTimeRange===r)),t8=D(e8,(e,t)=>t.containerIds,(e,t)=>t.metricHorizon,(e,t,n)=>{let r={time:[]};return e.filter(e=>t.includes(e.containerId)&&e.metricTimeRange===n).forEach((e,t)=>{t===0&&(r.time=e.values.map(e=>e.date)),r[`${e.metricName} - ${e.metricLabel}`]=e.values.map(e=>e.value)}),r}),n8=D(e8,(e,t)=>t.containerIds,(e,t)=>t.metricNames,(e,t)=>t.metricHorizon,(e,t,n,r)=>{let i=``;for(let[e,t]of Object.entries(Jze))if(n.filter(e=>t.includes(e)).length>0){i=e;break}if(i===``)return{title:i};let a={title:i},o=e.filter(e=>t.includes(e.containerId)&&n.includes(e.metricName)&&e.metricTimeRange===r);if(o.length===0)return a;let s=[];return o.forEach(e=>{let t={label:`${e.metricName} - ${e.metricLabel}`,pointRadius:0,pointHoverRadius:5,data:[]};e.values.forEach(e=>{t.data.push({x:e.date,y:e.value})}),s.push(t)}),a.datasets=s,a}),r8=gr.get(`/proxy/:containerId?horizon=:metricHorizon&ts=${Date.now()}&metric=:metricName&requestedTicks=300`,{supervisor:ur()},function*(e,t){let n=o8(e.payload.serviceId,e.payload.metricHorizon),r=`${e.key}-${e.payload.containerId}-${e.payload.metricName}-${n}`;if(yield*L.update(L.loaders.start({id:r})),yield*t(),!e.json.ok){yield*L.update(L.loaders.error({id:r,message:e.json.error.message}));return}let i=$6({payload:e.json.value,...e.payload});yield*L.update([L.containerMetrics.add(i),L.loaders.success({id:r})])}),i8=qn.create(`fetch-containers-by-service-id`,function*(e,t){let{serviceId:n}=e.payload,r=e.key;yield*L.update(L.loaders.start({id:r}));let i=yield*Te(()=>Y_.run(Y_({serviceId:e.payload.serviceId})));if(!i.json.ok)return yield*L.update(L.loaders.error({id:r})),yield*t(),i;let a=(yield*p(e=>q_(e,{id:n,date:Ff(-7).toISOString()}))).map(e=>e.id).map(e=>()=>tv.run(tv({releaseId:e})));yield*yield*S(a),yield*L.update(L.loaders.success({id:r})),yield*t()}),a8=qn.create(`fetch-metric-by-service-id`,function*(e,t){let n=e.key;yield*L.update(L.loaders.start({id:n}));let{serviceId:r,metricHorizon:i,metricName:a}=e.payload,o=yield*p(e=>Eu(e,{id:r})),s=(yield*p(e=>q_(e,{id:r,date:Ff(-7).toISOString()}))).map(e=>e.id),c=[`app`,`database`],l=Q6(i),u=yield*p(e=>ev(e,{layers:c,releaseIds:s,horizonInSeconds:l,currentReleaseId:o.currentReleaseId})),d=u.length,f=0;for(;f<=d-1;){let e=[],t=Math.min(d-f,20);for(let n=0;n<t;n+=1){let t=u[f];f+=1,t&&e.push(()=>r8.run(r8({containerId:t.id,metricName:a,metricHorizon:i,serviceId:r})))}yield*yield*S(e),yield*un(250)}yield*L.update(L.loaders.success({id:n})),yield*t()}),o8=(e,t)=>`${e}-${t}`,s8=D(L.loaders.selectTable,(e,t)=>t.serviceId,(e,t)=>t.metricHorizon,(e,t,n)=>Object.keys(e).filter(r=>{if(!r.includes(o8(t,n)))return!1;let i=e[r];return i?i.status===`success`:!1}).length),c8=qn.create(`fetch-all-metrics-by-service-id`,{supervisor:j},function*(e,t){let{serviceId:n,metrics:r,metricHorizon:i}=e.payload,a=e.key;yield*L.update(L.loaders.start({id:a})),yield*Te(()=>i8.run(i8({serviceId:n})));let o=[];r.forEach(e=>{o.push(()=>a8.run(a8({serviceId:n,metricName:e,metricHorizon:i})))}),yield*yield*S(o),yield*L.update(L.loaders.success({id:a})),yield*t()});Ve.register(Re,je,Ae,ze,Fe,He,We,Me,Ie);var Qze=e=>({"1h":`minute`,"1d":`minute`,"1w":`day`})[e],$ze=({showLegend:e=!0,keyId:t,chart:{labels:n,datasets:r,title:i},xAxisUnit:a,yAxisLabel:o,yAxisUnit:s})=>r&&i?(0,U.jsx)(Ue,{datasetIdKey:t,data:{labels:n,datasets:r},options:{responsive:!0,maintainAspectRatio:!1,animation:{duration:0,easing:`linear`},plugins:{colors:{forceOverride:!0}
109,legend:{display:e,labels:{usePointStyle:!0,boxHeight:5,boxWidth:3,padding:20}},title:{font:{size:16,weight:`normal`},color:`#595E63`,align:`start`,display:!0,text:i,padding:e?void 0:{top:10,bottom:30}}},interaction:{mode:`nearest`,axis:`xy`,intersect:!1},scales:{x:{border:{color:`#111920`},grid:{display:!1},ticks:{color:`#111920`,maxRotation:0,minRotation:0,autoSkip:!0,maxTicksLimit:5},adapters:{date:{zone:`UTC`}},time:{tooltipFormat:`yyyy-MM-dd HH:mm:ss 'UTC'`,unit:a,displayFormats:{minute:`HH:mm 'UTC'`,day:`MMM dd`}},type:`time`},y:{min:0,border:{display:!1},title:o?{display:!0,text:o}:void 0,ticks:{callback:s?(e,t,n)=>`${e}${s}`:void 0,color:`#111920`}}}}}):null,l8=({containers:e,limit:t,metricNames:n,metricHorizon:r,helpText:i,yAxisLabel:a,yAxisUnit:o})=>{let s=e.map(e=>e.id).sort(),c=B(e=>n8(e,{containerIds:s,metricNames:n,metricHorizon:r}));return c.title===``||c.datasets?.length===0?null:(0,U.jsxs)(`div`,{className:`bg-white px-5 pt-1 pb-5 shadow rounded-lg border border-black-100 relative min-h-[400px] bg-[url('/thead-bg.png')] bg-[length:100%_46px] bg-no-repeat`,children:[i||t?(0,U.jsx)(`div`,{className:`relative w-full`,children:(0,U.jsxs)(`div`,{className:`flex absolute right-0 top-2.5 gap-2`,children:[t?(0,U.jsxs)(`span`,{className:`text-sm text-gray-500 top-2.5`,children:[`Limit: `,t]}):null,i?(0,U.jsx)(`div`,{className:`right-5 top-2.5`,children:(0,U.jsx)(aA,{text:i,children:(0,U.jsx)(tD,{className:`h-5 mt-0.5 opacity-50 hover:opacity-100 cursor-pointer`})})}):null]})}):null,(0,U.jsx)($ze,{showLegend:(c.datasets?.length||0)<=4,keyId:`${s.join(`-`)}-${n.join(`-`)}-${r}`,xAxisUnit:Qze(r),yAxisLabel:a,yAxisUnit:o,chart:c})]})},u8=({containers:e,metricHorizon:t})=>{let n=e.map(e=>e.id),r=B(e=>t8(e,{containerIds:n,metricHorizon:t})),i=Object.keys(r).filter(e=>e.includes(`time`)).concat(Object.keys(r).sort().filter(e=>!e.includes(`time`))),a=[];for(let e=0;e<Object.values(r)[0].length;e+=1)a.push((0,U.jsx)(WA,{children:i.map(t=>(0,U.jsx)(Y,{className:`text-gray-900`,children:r[t][e]},`${e}-${t}`))},`${e}`));return(0,U.jsxs)(VA,{children:[(0,U.jsx)(HA,{children:i.map(e=>(0,U.jsx)(KA,{children:e},e))}),(0,U.jsx)(UA,{children:a})]})},d8=({variant:e=`horizontal`,data:t})=>{let n;switch(e){case`horizontal`:n=`flex justify-between keyval`;break;case`horizontal-inline`:n=`flex keyval`;break;case`vertical`:n=`keyval`}return(0,U.jsx)(`dl`,{children:t.map(t=>(0,U.jsxs)(`div`,{className:n,children:[(0,U.jsxs)(`dt`,{className:`font-bold`,children:[t.key,`: `]}),(0,U.jsx)(`dd`,{className:e===`horizontal-inline`?`pl-2`:``,children:t.value})]},t.key))})},eBe=r({selectFeedback:()=>f8,selectFreeformFeedbackGiven:()=>nBe,selectPreDeploySurveyAnswered:()=>tBe,setFeedback:()=>rBe}),f8=L.feedback.select,tBe=e=>f8(e).preDeploySurveyAnswered,nBe=e=>f8(e).freeformFeedbackGiven,rBe=qn.create(`set-feedback`,function*(e,t){yield*L.update(L.feedback.set(e.payload)),yield*t()}),iBe=({app:e})=>{let t=l(),n=N(),[r,i]=(0,V.useState)(!1),[a,o]=(0,V.useState)(!1),{envs:s,envList:c,setEnvs:u,errors:d,validate:f}=nC(``),p=rg(c),m=yf({appId:e.id,type:`configure`,env:p}),h=I(m);return T(h,()=>{a&&n(oa(e.id))}),r?(0,U.jsx)(`form`,{onSubmit:e=>{e.preventDefault(),f()&&(o(!0),t(m))},children:(0,U.jsxs)(W,{children:[(0,U.jsx)(p8,{envs:s,setEnvs:u,errors:d,previewEnv:p}),(0,U.jsxs)(W,{variant:`horizontal`,children:[(0,U.jsx)(vA,{envId:e.environmentId,type:`submit`,isLoading:h.isLoading,children:`Save Changes`}),(0,U.jsx)(K,{onClick:()=>{i(!1),u(``)},variant:`white`,children:`Cancel`})]})]})}):(0,U.jsx)(`div`,{children:(0,U.jsxs)(vA,{envId:e.environmentId,variant:`white`,onClick:()=>i(!0),children:[(0,U.jsx)(ME,{variant:`sm`,className:`mr-2`}),`Edit`]})})};function p8({envs:e,setEnvs:t,errors:n,previewEnv:r}){let i=(0,U.jsxs)(`div`,{children:[(0,U.jsxs)(`p`,{children:[`Specify any ENV variables you wish to add or modify, one per line. We use`,` `,(0,U.jsx)(CA,{variant:`info`,href:`https://github.com/motdotla/dotenv`,children:`dotenv`}),` `,`to parse these variables.`]}),(0,U.jsxs)(`ol`,{className:`list-disc list-inside`,children:[(0,U.jsxs)(`li`,{children:[`Each line corresponds to a separate variable with the format`,` `,(0,U.jsx)(YU,{children:`ENV_VAR="value"`}),` or `,(0,U.jsx)(YU,{children:`ENV_VAR='value'`}),`.`]}),(0,U.jsxs)(`li`,{children:[`If you want to delete an environment variable, set it to an empty string, with or without double quotes: `,(0,U.jsx)(YU,{children:`ENV_VAR=""`}),`.`]}),(0,U.jsx)(`li`,{children:`Multi-line environment variables may be set by wrapping in double quotes.`})]})]});return(0,U.jsxs)(W,{children:[(0,U.jsxs)(q,{variant:`warning`,children:[`Warning: This UI uses dotenv to parse ENV variables. Dotenv parsing differs slightly from shell, so if you're most familiar with setting ENV variables in shell, e.g. via the `,(0,U.jsx)(YU,{children:`aptible config:set`}),` CLI command, note that this parser may behave differently with multi-line variables or special characters. We recommend first setting variables on a staging app or a different ENV key within a production app if unsure how the variable will be parsed.`]}),(0,U.jsx)(J,{label:`Environment Variables`,htmlFor:`envs`,feedbackVariant:n.length>0?`danger`:`info`,feedbackMessage:n.map(e=>e.message).join(`. `),description:i,children:(0,U.jsx)(`textarea`,{id:`envs`,name:`envs`,className:G.type.textarea,value:e,onCh
109ange:e=>t(e.currentTarget.value)})}),(0,U.jsx)(`hr`,{}),(0,U.jsx)(`div`,{className:G.type.h4,children:`Preview`}),(0,U.jsx)(S4,{className:`max-w-screen-md`,allowCopy:!1,text:JSON.stringify(r,null,2)})]})}var aBe=e=>e===`release`?`on: 110 release: 111 types: [published] 112 workflow_dispatch: {}`:e===`manual`?`on: 113 workflow_dispatch: {}`:e===`master`?`on: 114 push: 115 branches: [master] 116 workflow_dispatch: {}`:`on: 117 push: 118 branches: [main] 119 workflow_dispatch: {}`,oBe=({aptibleType:e,type:t,appHandle:n,envHandle:r})=>`name: aptible 120 121${aBe(t)} 122 123jobs: 124 deploy: 125 runs-on: ubuntu-latest 126 steps: 127 - uses: actions/checkout@v4 128 with: 129 fetch-depth: 0 130 - name: Deploy to Aptible 131 uses: aptible/aptible-deploy-action@v5 132 with: 133 type: ${e} 134 app: ${n} 135 environment: ${r} 136 username: \${{ secrets.APTIBLE_USERNAME }} 137 password: \${{ secrets.APTIBLE_PASSWORD }}`,m8=({app:e})=>{let t=B(t=>tu(t,{id:e.environmentId})),n=B(t=>sg(t,{id:e.currentConfigurationId})).env.APTIBLE_DOCKER_IMAGE?`docker`:`git`,[r,i]=(0,V.useState)(`main`);return(0,U.jsxs)(W,{children:[(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`h4`,{className:G.type.h4,children:`1. Create directory in your code repo if it doesn't exist already`}),(0,U.jsx)(w4,{segments:x4([`mkdir -p`,`.github/workflows`]),allowCopy:!0})]}),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`h4`,{className:G.type.h4,children:`When do you want to trigger a deployment?`}),(0,U.jsxs)(QA,{name:`deployment-type`,selected:r,onSelect:e=>{i(e)},children:[(0,U.jsx)(ZA,{value:`main`,children:`Push to main`}),(0,U.jsx)(ZA,{value:`master`,children:`Push to master`}),(0,U.jsx)(ZA,{value:`release`,children:`GitHub release`}),(0,U.jsx)(ZA,{value:`manual`,children:`Manually Trigger`})]})]}),(0,U.jsxs)(`div`,{children:[(0,U.jsxs)(`h4`,{className:G.type.h4,children:[`2. Copy and Paste into `,(0,U.jsx)(YU,{children:`.github/workflows/aptible.yml`})]}),(0,U.jsx)(S4,{text:oBe({aptibleType:n,envHandle:t.handle,appHandle:e.handle,type:r}),allowCopy:!0})]}),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`h4`,{className:G.type.h4,children:`3. Add secrets to GitHub repository`}),(0,U.jsxs)(`p`,{children:[`We require your Aptible username and password to deploy your App.`,` `,(0,U.jsx)(CA,{href:`https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions`,children:`Add GitHub secrets`}),` `,`to your repo or organization. Additionally, we recommend`,` `,(0,U.jsx)(CA,{href:`https://www.aptible.com/docs/ci-deploy-user`,children:`creating a robot user`}),`.`]})]})]})};function sBe({app:e,deployment:t}){let n=B(e=>Zv(e,{id:t.imageId})),r=B(e=>Dl(e,{id:t.sourceId}));return(0,U.jsxs)(WA,{children:[(0,U.jsx)(Y,{children:(0,U.jsx)(P,{to:da(t.id),className:G.type[`table link`],children:t.id})}),(0,U.jsx)(Y,{children:(0,U.jsx)(D4,{status:t.status})}),(0,U.jsxs)(Y,{children:[!r.id&&(0,U.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,U.jsx)(`em`,{children:`Not Provided`}),(0,U.jsx)(aA,{text:`Source information for this deployment is not available. See the Sources documentation for instructions on connecting your apps to your source repositories.`,children:(0,U.jsx)(tD,{className:`opacity-50 hover:opacity-100`,variant:`sm`})})]}),r.id&&(0,U.jsx)(P,{to:Lo(t.sourceId),className:G.type[`table link`],children:r.displayName})]}),(0,U.jsx)(Y,{children:(0,U.jsx)($2,{gitRef:t.gitRef,commitSha:t.gitCommitSha,commitUrl:t.gitCommitUrl})}),(0,U.jsx)(Y,{children:(0,U.jsx)(e4,{message:t.gitCommitMessage})}),(0,U.jsx)(Y,{children:(0,U.jsx)(Q2,{image:t.dockerImage||n.dockerRepo,digest:n.dockerRef,repoUrl:t.dockerRepositoryUrl})}),(0,U.jsx)(Y,{children:Of(t.createdAt)}),(0,U.jsx)(Y,{variant:`right`,children:(0,U.jsx)(dA,{to:da(t.id),size:`sm`,className:`w-15`,variant:`primary`,children:`View`})})]})}function cBe({deployments:e,app:t}){return(0,U.jsxs)(VA,{children:[(0,U.jsxs)(HA,{children:[(0,U.jsx)(Y,{children:`ID`}),(0,U.jsx)(Y,{children:`Status`}),(0,U.jsx)(Y,{children:`Source`}),(0,U.jsx)(Y,{children:`Git Ref`}),(0,U.jsx)(Y,{children:`Commit Message`}),(0,U.jsx)(Y,{children:`Docker Image`}),(0,U.jsx)(Y,{children:`Date`}),(0,U.jsx)(Y,{variant:`right`,children:`Actions`})]}),(0,U.jsxs)(UA,{children:[e.length===0?(0,U.jsx)(GA,{colSpan:7,children:`No deployments found`}):null,e.map(e=>(0,U.jsx)(sBe,{app:t,deployment:e},e.id))]})]})}function lBe({deployment:e}){let t=B(t=>rf(t,{id:e.appId}));u(Xv({id:e.imageId}));let n=B(t=>Zv(t,{id:e.imageId}));return(0,U.jsxs)(WA,{children:[(0,U.jsx)(Y,{children:(0,U.jsx)(P,{to:da(e.id),className:G.type[`table link`],children:e.id})}),(0,U.jsx)(Y,{children:(0,U.jsx)(D4,{status:e.status})}),(0,U.jsx)(Y,{className:`flex-1`,children:(0,U.jsx)(P,{to:Qi(t.id),className:`flex`,children:(0,U.jsx)(`p`,{className:`${G.type[`table link`]} leading-8`,children:t.handle})})}),(0,U.jsx)(Y,{children:(0,U.jsx)($2,{gitRef:e.gitRef,commitSha:e.gitCommitSha,c
137ommitUrl:e.gitCommitUrl})}),(0,U.jsx)(Y,{children:(0,U.jsx)(e4,{message:e.gitCommitMessage})}),(0,U.jsx)(Y,{children:(0,U.jsx)(Q2,{image:e.dockerImage,digest:n.dockerRef,repoUrl:e.dockerRepositoryUrl})}),(0,U.jsx)(Y,{children:Of(e.createdAt)}),(0,U.jsx)(Y,{variant:`right`,children:(0,U.jsx)(dA,{to:da(e.id),size:`sm`,className:`w-15`,variant:`primary`,children:`View`})})]})}function uBe({sourceId:e}){u(Ml({id:e}));let t=rC(B(t=>bl(t,{sourceId:e})));return(0,U.jsx)(W,{children:(0,U.jsxs)(VA,{children:[(0,U.jsxs)(HA,{children:[(0,U.jsx)(KA,{children:`ID`}),(0,U.jsx)(KA,{children:`Status`}),(0,U.jsx)(KA,{children:`App`}),(0,U.jsx)(KA,{children:`Git Ref`}),(0,U.jsx)(KA,{children:`Commit Message`}),(0,U.jsx)(KA,{children:`Docker Image`}),(0,U.jsx)(KA,{children:`Date`}),(0,U.jsx)(KA,{variant:`right`,children:`Actions`})]}),(0,U.jsxs)(UA,{children:[t.data.length===0?(0,U.jsx)(GA,{colSpan:8}):null,t.data.map(e=>(0,U.jsx)(lBe,{deployment:e},e.id))]})]})})}var h8=e=>{let{source:t,...n}=e,r=`/resource-types/logo-source.png`,i=`Git Source`;return t.url.match(/github\.com/i)?(r=`/resource-types/logo-github.png`,i=`GitHub Source`):t.url.match(/gitlab\.com/i)&&(r=`/resource-types/logo-gitlab.png`,i=`GitLab Source`),(0,U.jsx)(`img`,{src:r,...n,"aria-label":e[`aria-label`]||i,alt:e.alt||i})};function g8({service:e,disk:t,endpoints:n=[],backups:r=[],persistentDiskCost:i=0}){let a=t==null?[]:[t],o=B(L.costRates.select),s=ap({rates:o,services:[e],disks:a,endpoints:n,backups:r})+i,c=ip(o,e.instanceClass),l=ap({rates:o,services:[e]}),u=ap({rates:o,backups:r}),d=ap({rates:o,disks:a}),f=r.reduce((e,t)=>e+t.size,0),p=n.filter(e=>e.shared),m=n.filter(e=>!e.shared),h=ap({rates:o,endpoints:p}),g=ap({rates:o,endpoints:m});return(0,U.jsxs)(`div`,{className:`mt-2 mb-4 flex`,children:[(0,U.jsxs)(`div`,{className:`grow basis-1`,children:[(0,U.jsx)(RA,{children:`Estimated Cost Breakdown`}),(0,U.jsxs)(`div`,{className:`grid grid-cols-[auto,1fr] gap-x-3 text-black-500`,children:[(0,U.jsxs)(`div`,{children:[e.containerCount,` x `,e.containerMemoryLimitMb/1024,` `,`GB container x `,db(c),` per GB/hour`]}),(0,U.jsxs)(`div`,{children:[`= `,ub(l),`/month`]}),t==null?null:(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`div`,{children:[t.size,` GB disk x `,db(o.disk_cost_gb_per_month),` `,`per GB/month`,t.provisionedIops>3e3?` + ${t.provisionedIops-3e3} IOPS x ${db(o.disk_iops_cost_per_month)} per month`:``]}),(0,U.jsxs)(`div`,{children:[`= `,ub(d),`/month`]})]}),i>0?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`div`,{children:`Persistent disk`}),(0,U.jsxs)(`div`,{children:[`= `,ub(i),`/month`]})]}):null,m.length>0?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`div`,{children:[m.length,` endpoint`,m.length>1?`s`:``,` x`,` `,db(o.vhost_cost_per_hour),` per hour`]}),(0,U.jsxs)(`div`,{children:[`= `,ub(g),`/month`]})]}):null,p.length>0?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`div`,{children:[p.length,` shared endpoint`,p.length>1?`s`:``,` x`,` `,db(o.shared_vhost_cost_per_hour),` per hour`]}),(0,U.jsxs)(`div`,{children:[`= `,ub(h),`/month`]})]}):null,r.length>0?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`div`,{children:[f,` GB backups x`,` `,db(o.backup_cost_gb_per_month),` per GB/month`]}),(0,U.jsxs)(`div`,{children:[`= `,ub(u),`/month`]})]}):null]})]}),(0,U.jsxs)(`div`,{className:`grow basis-1`,children:[(0,U.jsxs)(`div`,{className:`flex items-center gap-1.5 mb-1`,children:[(0,U.jsx)(RA,{children:`Estimated Monthly Cost`}),(0,U.jsx)(_U,{})]}),(0,U.jsx)(`p`,{className:`text-lg text-green-400`,children:ub(s)}),(0,U.jsx)(`p`,{className:`text-sm text-black-500 mt-1 max-w-sm`,children:X_e})]})]})}var _8=[{label:`N/A`,value:`NA`},...[{label:`Alberta`,value:`AB`},{label:`Alabama`,value:`AL`},{label:`Alaska`,value:`AK`},{label:`American Samoa`,value:`AS`},{label:`Arizona`,value:`AZ`},{label:`Arkansas`,value:`AR`},{label:`British Columbia`,value:`BC`},{label:`California`,value:`CA`},{label:`Colorado`,value:`CO`},{label:`Connecticut`,value:`CT`},{label:`Delaware`,value:`DE`},{label:`District Of Columbia`,value:`DC`},{label:`Federated States Of Micronesia`,value:`FM`},{label:`Florida`,value:`FL`},{label:`Georgia`,value:`GA`},{label:`Guam`,value:`GU`},{label:`Hawaii`,value:`HI`},{label:`Idaho`,value:`ID`},{label:`Illinois`,value:`IL`},{label:`Indiana`,value:`IN`},{label:`Iowa`,value:`IA`},{label:`Kansas`,value:`KS`},{label:`Kentucky`,value:`KY`},{label:`Louisiana`,value:`LA`},{label:`Maine`,value:`ME`},{label:`Marshall Islands`,value:`MH`},{label:`Manitoba`,value:`MB`},{label:`Maryland`,value:`MD`},{label:`Massachusetts`,value:`MA`},{label:`Michigan`,value:`MI`}
137,{label:`Minnesota`,value:`MN`},{label:`Mississippi`,value:`MS`},{label:`Missouri`,value:`MO`},{label:`Montana`,value:`MT`},{label:`Nebraska`,value:`NE`},{label:`Nevada`,value:`NV`},{label:`New Brunswick`,value:`NB`},{label:`New Hampshire`,value:`NH`},{label:`Newfoundland and Labrador`,value:`NL`},{label:`New Jersey`,value:`NJ`},{label:`New Mexico`,value:`NM`},{label:`New York`,value:`NY`},{label:`North Carolina`,value:`NC`},{label:`North Dakota`,value:`ND`},{label:`Northern Mariana Islands`,value:`MP`},{label:`Northwest Territories`,value:`NT`},{label:`Ohio`,value:`OH`},{label:`Nova Scotia`,value:`NS`},{label:`Nunavut`,value:`NU`},{label:`Ontario`,value:`ON`},{label:`Oklahoma`,value:`OK`},{label:`Oregon`,value:`OR`},{label:`Palau`,value:`PW`},{label:`Pennsylvania`,value:`PA`},{label:`Prince Edward Island`,value:`PE`},{label:`Puerto Rico`,value:`PR`},{label:`Quebec`,value:`QC`},{label:`Rhode Island`,value:`RI`},{label:`South Carolina`,value:`SC`},{label:`South Dakota`,value:`SD`},{label:`Saskatchewan`,value:`SK`},{label:`Tennessee`,value:`TN`},{label:`Texas`,value:`TX`},{label:`Utah`,value:`UT`},{label:`Vermont`,value:`VT`},{label:`Virgin Islands`,value:`VI`},{label:`Virginia`,value:`VA`},{label:`Washington`,value:`WA`},{label:`West Virginia`,value:`WV`},{label:`Wisconsin`,value:`WI`},{label:`Wyoming`,value:`WY`},{label:`Yukon`,value:`YT`}].sort((e,t)=>e.label.localeCompare(t.label))],dBe=_8,v8=[{value:`AF`,label:`Afghanistan`},{value:`AX`,label:`Ã
land Islands`},{value:`AL`,label:`Albania`},{value:`DZ`,label:`Algeria`},{value:`AS`,label:`American Samoa`},{value:`AD`,label:`Andorra`},{value:`AO`,label:`Angola`},{value:`AI`,label:`Anguilla`},{value:`AQ`,label:`Antarctica`},{value:`AG`,label:`Antigua and Barbuda`},{value:`AR`,label:`Argentina`},{value:`AM`,label:`Armenia`},{value:`AW`,label:`Aruba`},{value:`AU`,label:`Australia`},{value:`AT`,label:`Austria`},{value:`AZ`,label:`Azerbaijan`},{value:`BS`,label:`Bahamas`},{value:`BH`,label:`Bahrain`},{value:`BD`,label:`Bangladesh`},{value:`BB`,label:`Barbados`},{value:`BY`,label:`Belarus`},{value:`BE`,label:`Belgium`},{value:`BZ`,label:`Belize`},{value:`BJ`,label:`Benin`},{value:`BM`,label:`Bermuda`},{value:`BT`,label:`Bhutan`},{value:`BO`,label:`Bolivia, Plurinational State of`},{value:`BQ`,label:`Bonaire, Sint Eustatius and Saba`},{value:`BA`,label:`Bosnia and Herzegovina`},{value:`BW`,label:`Botswana`},{value:`BV`,label:`Bouvet Island`},{value:`BR`,label:`Brazil`},{value:`IO`,label:`British Indian Ocean Territory`},{value:`BN`,label:`Brunei Darussalam`},{value:`BG`,label:`Bulgaria`},{value:`BF`,label:`Burkina Faso`},{value:`BI`,label:`Burundi`},{value:`CV`,label:`Cabo Verde`},{value:`KH`,label:`Cambodia`},{value:`CM`,label:`Cameroon`},{value:`CA`,label:`Canada`},{value:`KY`,label:`Cayman Islands`},{value:`CF`,label:`Central African Republic`},{value:`TD`,label:`Chad`},{value:`CL`,label:`Chile`},{value:`CN`,label:`China`},{value:`CX`,label:`Christmas Island`},{value:`CC`,label:`Cocos (Keeling) Islands`},{value:`CO`,label:`Colombia`},{value:`KM`,label:`Comoros`},{value:`CG`,label:`Congo`},{value:`CD`,label:`Congo, Democratic Republic of the`},{value:`CK`,label:`Cook Islands`},{value:`CR`,label:`Costa Rica`},{value:`HR`,label:`Croatia`},{value:`CU`,label:`Cuba`},{value:`CW`,label:`Curaçao`},{value:`CY`,label:`Cyprus`},{value:`CZ`,label:`Czechia`},{value:`CI`,label:`Côte d'Ivoire`},{value:`DK`,label:`Denmark`},{value:`DJ`,label:`Djibouti`},{value:`DM`,label:`Dominica`},{value:`DO`,label:`Dominican Republic`},{value:`EC`,label:`Ecuador`},{value:`EG`,label:`Egypt`},{value:`SV`,label:`El Salvador`},{value:`GQ`,label:`Equatorial Guinea`},{value:`ER`,label:`Eritrea`},{value:`EE`,label:`Estonia`},{value:`SZ`,label:`Eswatini`},{value:`ET`,label:`Ethiopia`},{value:`FK`,label:`Falkland Islands (Malvinas)`},{value:`FO`,label:`Faroe Islands`},{value:`FJ`,label:`Fiji`},{value:`FI`,label:`Finland`},{value:`FR`,label:`France`},{value:`GF`,label:`French Guiana`},{value:`PF`,label:`French Polynesia`},{value:`TF`,label:`French Southern Territories`},{value:`GA`,label:`Gabon`},{value:`GM`,label:`Gambia`},{value:`GE`,label:`Georgia`},{value:`DE`,label:`Germany`},{value:`GH`,label:`Ghana`},{value:`GI`,label:`Gibraltar`},{value:`GR`,label:`Greece`},{value:`GL`,label:`Greenland`},{value:`GD`,label:`Grenada`},{value:`GP`,label:`Guadeloupe`},{value:`GU`,label:`Guam`},{value:`GT`,label:`Guatemala`},{value:`GG`,label:`Guernsey`},{value:`GN`,label:`Guinea`},{value:`GW`,label:`Guinea-Bissau`},{value:`GY`,label:`Guyana`},{value:`HT`,label:`Haiti`},{value:`HM`,label:`Heard Island and McDonald Islands`},{value:`VA`,label:`Holy See`},{value:`HN`,label:`Honduras`},{value:`HK`,label:`Hong Kong`},{value:`HU`,label:`Hungary`},{value:`IS`,label:`Iceland`},{value:`IN`,label:`India`},{value:`ID`,label:`Indonesia`}
137,{value:`IR`,label:`Iran, Islamic Republic of`},{value:`IQ`,label:`Iraq`},{value:`IE`,label:`Ireland`},{value:`IM`,label:`Isle of Man`},{value:`IL`,label:`Israel`},{value:`IT`,label:`Italy`},{value:`JM`,label:`Jamaica`},{value:`JP`,label:`Japan`},{value:`JE`,label:`Jersey`},{value:`JO`,label:`Jordan`},{value:`KZ`,label:`Kazakhstan`},{value:`KE`,label:`Kenya`},{value:`KI`,label:`Kiribati`},{value:`KP`,label:`Korea, Democratic People's Republic of`},{value:`KR`,label:`Korea, Republic of`},{value:`KW`,label:`Kuwait`},{value:`KG`,label:`Kyrgyzstan`},{value:`LA`,label:`Lao People's Democratic Republic`},{value:`LV`,label:`Latvia`},{value:`LB`,label:`Lebanon`},{value:`LS`,label:`Lesotho`},{value:`LR`,label:`Liberia`},{value:`LY`,label:`Libya`},{value:`LI`,label:`Liechtenstein`},{value:`LT`,label:`Lithuania`},{value:`LU`,label:`Luxembourg`},{value:`MO`,label:`Macao`},{value:`MG`,label:`Madagascar`},{value:`MW`,label:`Malawi`},{value:`MY`,label:`Malaysia`},{value:`MV`,label:`Maldives`},{value:`ML`,label:`Mali`},{value:`MT`,label:`Malta`},{value:`MH`,label:`Marshall Islands`},{value:`MQ`,label:`Martinique`},{value:`MR`,label:`Mauritania`},{value:`MU`,label:`Mauritius`},{value:`YT`,label:`Mayotte`},{value:`MX`,label:`Mexico`},{value:`FM`,label:`Micronesia, Federated States of`},{value:`MD`,label:`Moldova, Republic of`},{value:`MC`,label:`Monaco`},{value:`MN`,label:`Mongolia`},{value:`ME`,label:`Montenegro`},{value:`MS`,label:`Montserrat`},{value:`MA`,label:`Morocco`},{value:`MZ`,label:`Mozambique`},{value:`MM`,label:`Myanmar`},{value:`NA`,label:`Namibia`},{value:`NR`,label:`Nauru`},{value:`NP`,label:`Nepal`},{value:`NL`,label:`Netherlands`},{value:`NC`,label:`New Caledonia`},{value:`NZ`,label:`New Zealand`},{value:`NI`,label:`Nicaragua`},{value:`NE`,label:`Niger`},{value:`NG`,label:`Nigeria`},{value:`NU`,label:`Niue`},{value:`NF`,label:`Norfolk Island`},{value:`MK`,label:`North Macedonia`},{value:`MP`,label:`Northern Mariana Islands`},{value:`NO`,label:`Norway`},{value:`OM`,label:`Oman`},{value:`PK`,label:`Pakistan`},{value:`PW`,label:`Palau`},{value:`PS`,label:`Palestine, State of`},{value:`PA`,label:`Panama`},{value:`PG`,label:`Papua New Guinea`},{value:`PY`,label:`Paraguay`},{value:`PE`,label:`Peru`},{value:`PH`,label:`Philippines`},{value:`PN`,label:`Pitcairn`},{value:`PL`,label:`Poland`},{value:`PT`,label:`Portugal`},{value:`PR`,label:`Puerto Rico`},{value:`QA`,label:`Qatar`},{value:`RO`,label:`Romania`},{value:`RU`,label:`Russian Federation`},{value:`RW`,label:`Rwanda`},{value:`RE`,label:`Réunion`},{value:`BL`,label:`Saint Barthélemy`},{value:`SH`,label:`Saint Helena, Ascension and Tristan da Cunha`},{value:`KN`,label:`Saint Kitts and Nevis`},{value:`LC`,label:`Saint Lucia`},{value:`MF`,label:`Saint Martin (French part)`},{value:`PM`,label:`Saint Pierre and Miquelon`},{value:`VC`,label:`Saint Vincent and the Grenadines`},{value:`WS`,label:`Samoa`},{value:`SM`,label:`San Marino`},{value:`ST`,label:`Sao Tome and Principe`},{value:`SA`,label:`Saudi Arabia`},{value:`SN`,label:`Senegal`},{value:`RS`,label:`Serbia`},{value:`SC`,label:`Seychelles`},{value:`SL`,label:`Sierra Leone`},{value:`SG`,label:`Singapore`},{value:`SX`,label:`Sint Maarten (Dutch part)`},{value:`SK`,label:`Slovakia`},{value:`SI`,label:`Slovenia`},{value:`SB`,label:`Solomon Islands`},{value:`SO`,label:`Somalia`},{value:`ZA`,label:`South Africa`},{value:`GS`,label:`South Georgia and the South Sandwich Islands`},{value:`SS`,label:`South Sudan`},{value:`ES`,label:`Spain`},{value:`LK`,label:`Sri Lanka`},{value:`SD`,label:`Sudan`},{value:`SR`,label:`Suriname`},{value:`SJ`,label:`Svalbard and Jan Mayen`},{value:`SE`,label:`Sweden`},{value:`CH`,label:`Switzerland`},{value:`SY`,label:`Syrian Arab Republic`},{value:`TW`,label:`Taiwan, Province of China`},{value:`TJ`,label:`Tajikistan`},{value:`TZ`,label:`Tanzania, United Republic of`},{value:`TH`,label:`Thailand`},{value:`TL`,label:`Timor-Leste`},{value:`TG`,label:`Togo`},{value:`TK`,label:`Tokelau`},{value:`TO`,label:`Tonga`},{value:`TT`,label:`Trinidad and Tobago`},{value:`TN`,label:`Tunisia`},{value:`TR`,label:`Turkey`},{value:`TM`,label:`Turkmenistan`},{value:`TC`,label:`Turks and Caicos Islands`},{value:`TV`,label:`Tuvalu`},{value:`UG`,label:`Uganda`},{value:`UA`,label:`Ukraine`},{value:`AE`,label:`United Arab Emirates`},{value:`GB`,label:`United Kingdom`},{value:`UM`,label:`United States Minor Outlying Islands`},{value:`US`,label:`United States`},{value:`UY`,label:`Uruguay`},{value:`UZ`,label:`Uzbekistan`},{value:`VU`,label:`Vanuatu`},{value:`VE`,label:`Venezuela, Bolivarian Republic of`},{value:`VN`,label:`Viet Nam`},{value:`VG`,label:`Virgin Islands, British`},{value:`VI`,label:`Virgin Islands, U.S.`},{value:`WF`,label:`Wallis and Futuna`},{value:`EH`,label:`Western Sahara`},{value:`YE`,label:`Yemen`},{value:`ZM`,label:`Zambia`},{value:`ZW`,label:`Zimbabwe`}],fBe=({serviceId:e})=>{let{latest:t,prev:n}=B(t=>ud(t,{id:e})),r=t.status===`unknown`,i=t.status===`succeeded`||t.status===`failed`,a=Rd({id:e}),o=I(a);JS({action:(0,V.useMemo)(()=>a,[e]),cancel:(0,V.useMemo)(()=>Ld(),[])});let s=Uu(t),c=(0,U.jsx)(`span`,{className:`font-bold`,children:s});if(n.id!==``){let e=Uu(n);e!==``&&(c=(0,U.jsxs)(U.Fragment,{children:[`from `,(0,U.jsx)(`span`,{children:e}),` `,s===``?``:(0,U.jsxs)(U.Fragment,{children:[`to `,(0,U.jsx)(`span`,{className:`font-bold`,children:s})]})]}))}return o.isInitialLoading||r?null:i?(0,U.jsxs)(q,{variant:`info`,children:[(0,U.jsx)(`span`,{className:`font-bold`,children:`Last Scale:`}),` `,Of(t.createdAt),` `,c]}):(0,U.jsxs)(q,{variant:`progress`,children:[(0,U.jsx)(`span`,{className:`font-bold`,children:`Scale in Progress`}),` `,Uu(t)]})};(0,V.createContext)({timezone:`UTC`,setTimezone:()=>{},formatDateTime:()=>``,convertToDisplayTimezone:e=>typeof e==`string`?Be.fromISO(e):e,currentTimezoneDisplay:``});
137var y8=({widthClass:e=`w-16`,heightClass:t=`h-10`,className:n=``})=>(0,U.jsx)(`div`,{className:`${t} ${e} bg-gray-200 rounded animate-pulse ${n}`}),pBe=mr.get(`/pylon_identity_hash`,{supervisor:dr()},mr.cache()),b8=`f3e4a789-b693-4c63-a5ed-167c3c14e07a`,mBe=()=>{let e=me(),t=B(qo),n=B(ns),r=e.pathname===Po()&&!!t.id&&es(n);return(0,V.useLayoutEffect)(()=>{if(!r){if(window.Pylon)try{window.Pylon(`hide`)}catch{}let e=document.createElement(`style`);return e.id=`pylon-hide-style`,e.textContent=` 138 [id*="pylon"], 139 [class*="pylon"], 140 iframe[src*="pylon"], 141 iframe[src*="usepylon"] { 142 display: none !important; 143 visibility: hidden !important; 144 opacity: 0 !important; 145 } 146 `,document.head.appendChild(e),()=>{let e=document.getElementById(`pylon-hide-style`);e&&e.remove()}}let e=document.getElementById(`pylon-hide-style`);e&&e.remove()},[r]),(0,V.useEffect)(()=>{if(window.Pylon&&!r){let e=()=>{if((window.location.pathname!==Po()||!t.id||!es(n))&&window.Pylon)try{window.Pylon(`hide`)}catch{}};try{window.Pylon(`onShow`,e)}catch{}return()=>{try{window.Pylon(`onShow`,null)}catch{}}}},[r,t.id,n.id]),(0,V.useEffect)(()=>()=>{if(window.Pylon)try{window.Pylon(`hide`)}catch{}},[]),null},hBe=()=>{let e=B(qo),t=B(ns),[n,r]=(0,V.useState)(!1),i=(0,V.useRef)(!0),a=c(pBe({userId:e.id,email:e.email})),o=a.data?.email_hash,s=!a.isLoading;return(0,V.useEffect)(()=>(i.current=!0,()=>{if(i.current=!1,window.Pylon)try{window.Pylon(`hide`)}catch{}}),[]),(0,V.useEffect)(()=>{if(!n||!window.Pylon)return;let e=Date.now();window.Pylon(`onShow`,()=>{if(window.location.pathname!==Po()||!i.current){window.Pylon&&window.Pylon(`hide`);return}if(Date.now()-e<1e3&&window.Pylon){window.Pylon(`hide`);try{window.Pylon(`onShow`,null)}catch{}}else if(window.Pylon)try{window.Pylon(`onShow`,null)}catch{}});let t=setTimeout(()=>{if(window.Pylon)try{window.Pylon(`onShow`,null)}catch{}},1100);return()=>{if(clearTimeout(t),window.Pylon)try{window.Pylon(`hide`),window.Pylon(`onShow`,null)}catch{}}},[n]),(0,V.useEffect)(()=>{if(s)try{window.pylon={chat_settings:{app_id:b8,email:e.email,name:e.name,account_id:t.id,account_external_id:t.id,...o&&{email_hash:o}}};let a=document.getElementById(`pylon-widget`);if(a){if(o)a.remove(),window.Pylon=void 0,r(!1),document.querySelectorAll(`[id*="pylon"], [class*="pylon"], iframe[src*="pylon"], iframe[src*="usepylon"]`).forEach(e=>e.remove());else{window.Pylon&&!n&&r(!0);return}}let s=()=>{if(document.getElementById(`pylon-widget`))return;let e=document.createElement(`script`);e.setAttribute(`type`,`text/javascript`),e.setAttribute(`async`,`true`),e.setAttribute(`id`,`pylon-widget`),e.setAttribute(`src`,`https://widget.usepylon.com/widget/${b8}`),e.onerror=()=>{console.error(`Failed to load Pylon chat widget`)},e.onload=()=>{if(i.current)r(!0);else if(window.Pylon)try{window.Pylon(`hide`)}catch{}};let t=document.getElementsByTagName(`script`)[0];t?.parentNode&&t.parentNode.insertBefore(e,t)};return document.readyState===`complete`?s():window.addEventListener(`load`,s,!1),()=>{window.removeEventListener(`load`,s,!1)}}catch(e){console.error(`Error initializing Pylon chat widget:`,e)}},[e.email,e.name,t.id,o,s]),null},gBe=()=>{let e=B(qo),t=B(ns),n=me().pathname===Po(),r=es(t),i=n&&!!e.id&&r;return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(mBe,{}),i?(0,U.jsx)(hBe,{}):null]})},x8=40,_Be=256,vBe=5,yBe=50;function bBe(e,t){if(!t.trim())return e;let n=e.toLowerCase(),r=t.toLowerCase(),i=[],a=0,o=n.indexOf(r);for(;o!==-1;)o>a&&i.push(e.slice(a,o)),i.push((0,U.jsx)(`mark`,{className:`bg-yellow-400 text-gray-900 font-medium p-1 rounded`,children:e.slice(o,o+t.length)},`${o}-${a}`)),a=o+t.length,o=n.indexOf(r,a);return a<e.length&&i.push(e.slice(a)),i.length>0?i:e}function xBe(e){let t=(0,V.useRef)(null),[n,r]=(0,V.useState)(0),i=(0,V.useCallback)(()=>{t.current&&r(t.current.scrollTop)},[]),a=e*x8,o=Math.max(0,Math.floor(n/x8)-vBe),s=Math.ceil(_Be/x8)+10,c=Math.min(e-1,o+s),l=o*x8,u=Math.max(0,(e-c-1)*x8);return{virtualItems:(0,V.useMemo)(()=>{let e=[];for(let t=o;t<=c;t++)e.push({index:t});return e},[o,c]),topPadding:l,bottomPadding:u,totalHeight:a,handleScroll:i,scrollContainerRef:t}}function S8({option:e,selected:t,onSelect:n,renderOptionLabel:r,getOptionTitle:i,searchQuery:a}){let o=r?r(e):a?bBe(e.label,a):e.label;return(0,U.jsx)(`button`,{type:`button`,title:i?.(e),className:(0,H.default)(`w-full`,`rounded`,`my-0.5`,`px-3 py-2`,`text-left`,`hover:bg-gray-50`,`focus:outline-none`,`focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:ring-inset`,t?`bg-indigo-50 text-indigo-600 font-medium`:`text-gray-900`,e.disabled?`opacity-50 cursor-not-allowed hover:bg-transparent`:null),onClick:()=>n(e.value),disabled:e.disabled,children:o},e.key||e.value)}function C8({id:e,options:t,className:n=``,ariaLabel:r=`combobox`,disabled:i=!1,placeholder:a=`Select`,value:o,defaultValue:s,onChange:c,searchPlaceholder:l=`Search...`,disableSearch:u=!1,renderOptionLabel:d,getOptionTitle:f,getTriggerDis
146playText:p,dropdownClassName:m,disableVirtualization:h=!1}){let[g,_]=(0,V.useState)(!1),v=(0,V.useRef)(null),y=(0,V.useRef)(null),[b,x]=(0,V.useState)(``),S=o!==void 0,[C,w]=(0,V.useState)(s),T=S?o:C,E=(0,H.default)(`relative`,`border`,`border-gray-300 text-black`,`hover:border-gray-500`,`focus:ring-gray-500 focus:border-gray-500`,`active:text-black`,`disabled:bg-black-50 disabled:border-black-100 disabled:text-black`,`rounded-md shadow-sm`,`px-3 py-2 pr-10`,`w-full text-left`,n),D=(0,V.useMemo)(()=>{let e=b.trim().toLowerCase();return e===``?t:t.filter(t=>t.label.toLowerCase().includes(e))},[t,b]),O=e=>{let t=e.relatedTarget;v.current&&(!t||!v.current.contains(t))&&_(!1)},k=()=>{v.current?.focus()},A=e=>{e.key===`Escape`&&_(!1)},j=()=>{x(``),y.current?.focus()},M=e=>{let n=e?t.find(t=>t.value===e):void 0;c?.(e,n),S||w(e),_(!1)},ee=e=>{M(e)},te=(0,V.useMemo)(()=>{if(p)return p(T);if(!T)return``;let e=t.find(e=>e.value===T);return e?e.label:``},[T,t,p]),ne=!h&&D.length>=yBe,{virtualItems:re,topPadding:ie,bottomPadding:ae,handleScroll:oe,scrollContainerRef:se}=xBe(ne?D.length:0);return(0,V.useEffect)(()=>{se.current&&(se.current.scrollTop=0)},[b]),(0,U.jsxs)(`div`,{ref:v,className:`relative w-full`,tabIndex:-1,onBlur:O,onMouseDown:k,onKeyDown:A,children:[(0,U.jsxs)(`button`,{id:e,"aria-label":r,"aria-haspopup":`listbox`,"aria-expanded":g,className:E,disabled:i,onClick:()=>_(e=>!e),type:`button`,children:[(0,U.jsx)(`span`,{className:`block truncate`,children:te||a}),(0,U.jsx)(`span`,{className:`absolute right-3 top-1/2 -translate-y-1/2 pointer-events-none text-gray-700`,children:(0,U.jsx)(IE,{variant:`sm`})})]}),g?(0,U.jsxs)(`div`,{role:`listbox`,className:(0,H.default)(`absolute z-10 mt-1 min-w-full`,`bg-white border border-gray-200 rounded-md shadow-lg`,`p-2`,m),children:[!u&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`div`,{className:`relative`,children:[(0,U.jsx)(VE,{className:`absolute top-[10px] left-[10px]`,color:`#595E63`,variant:`sm`}),(0,U.jsx)(X,{type:`text`,placeholder:l,value:b,onChange:e=>x(e.currentTarget.value),className:`pl-9 pr-9 w-full`,autoFocus:!0,ref:y}),b.trim()===``?null:(0,U.jsx)(`button`,{type:`button`,"aria-label":`Clear search`,className:(0,H.default)(`absolute`,`top-1/2 -translate-y-1/2 right-[10px]`,`text-gray-500 hover:text-gray-700`,`focus:outline-none focus-visible:ring-2 focus-visible:ring-gray-500 focus-visible:ring-inset rounded`),onClick:j,children:(0,U.jsx)(JE,{variant:`sm`,color:`#6B7280`})})]}),(0,U.jsx)(`div`,{className:`h-px bg-gray-200 my-2`})]}),(0,U.jsx)(`div`,{ref:se,onScroll:ne?oe:void 0,className:`max-h-64 overflow-auto pr-1 pl-2 py-1`,children:D.length===0?(0,U.jsx)(`div`,{className:`text-sm text-gray-500 px-1 py-2`,children:`No results`}):ne?(0,U.jsxs)(U.Fragment,{children:[ie>0&&(0,U.jsx)(`div`,{style:{height:ie},"aria-hidden":!0}),re.map(({index:e})=>{let t=D[e],n=T===t.value;return(0,U.jsx)(S8,{option:t,selected:n,onSelect:ee,renderOptionLabel:d,getOptionTitle:f,searchQuery:b},t.key||t.value)}),ae>0&&(0,U.jsx)(`div`,{style:{height:ae},"aria-hidden":!0})]}):D.map(e=>{let t=T===e.value;return(0,U.jsx)(S8,{option:e,selected:t,onSelect:ee,renderOptionLabel:d,getOptionTitle:f,searchQuery:b},e.key||e.value)})})]}):null]})}var w8=()=>(0,U.jsxs)(`span`,{className:`text-gray-600`,children:[`Contact an`,` `,(0,U.jsx)(P,{to:hi(),className:`text-gray-800 underline`,children:`Account Owner`}),` `,`to upgrade.`]}),SBe=()=>{let e=B(ns);u(xg()),u(Sg({orgId:e.id}));let t=B(bg),n=B(e=>_g(e,{id:t.planId})),r=B(t=>__(t,{orgId:e.id})),{hasTrialNoPayment:i,expiresIn:a}=JU(),o=i,s=n.name===`development`;return!o&&!s?null:(0,U.jsxs)(`div`,{className:`flex flex-col`,children:[o&&(0,U.jsx)(q,{variant:`warning`,className:`rounded-none text-sm`,showIcon:!1,children:(0,U.jsxs)(`div`,{className:`flex w-full items-center justify-center gap-4`,children:[(0,U.jsx)(ZE,{color:`#E9B64D`,variant:`base`,className:`shrink-0`}),(0,U.jsxs)(`span`,{className:`font-bold`,children:[`You're on a free trial.`,a?` Your trial ends ${a}.`:``]}),r?(0,U.jsx)(dA,{to:Di(),variant:`white`,size:`sm`,className:`shrink-0`,children:`Upgrade plan`}):(0,U.jsx)(w8,{})]})}),s&&(0,U.jsx)(q,{variant:`warning`,className:`rounded-none text-sm`,showIcon:!1,children:(0,U.jsxs)(`div`,{className:`flex w-full items-center justify-center gap-4`,children:[(0,U.jsx)(ZE,{color:`#E9B64D`,variant:`base`,className:`shrink-0`}),(0,U.jsx)(`span`,{className:`font-bold`,children:`You're on the Development plan (not intended for production workloads or PHI).`}),r?(0,U.jsx)(dA,{to:Di(),variant:`white`,size:`sm`,className:`shrink-0`,children:`Upgrade to Production`}):(0,U.jsx)(w8,{})]})})]})},T8=[[`Claude Opus`,`Claude Sonnet`,`GPT`,`Nova`],[`Llama`,`Qwen`]],CBe=({label:e})=>(0,U.jsx)(`span`,{className:`inline-flex items-center px-[9px] py-[4px] rounded-full border border-[#cdbdff] bg-[#efeaff] text-[12px] leading-[16.5px] text-[#270294] whitespace-nowrap`,children:e}),E8=()=>(0,U.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,U.jsx)(`p`,{className:`text-[10px] font-semibold uppercase tracking-[0.5px] text-black-500`,children:`Seamlessly switch models`}),(0,U.jsx)(`div`,{className:`flex flex-col gap-2`,children:T8.map((e,t)=>(0,U.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[e.map(e=>(0,U.jsx)(CBe,{label:e},e)),t===T8.length-1&&(0,U.jsxs)(`a`,{href:`https://www.aptible.com/docs/supported-models`,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center gap-[2px] text-[12px] leading-[16.5px] text-indigo-500 whitespace-nowrap`,children:[`View all supported models`,(0,U.jsx)(rD,{variant:`sm`})]})]},t))})]}),D8=({question:e,children:t})=>{let[n,r]=(0,V.useState)(!1);return(0,U.jsxs)(`div`,{className:`border-b border-gray-200 py-3`,children:[(0,U.jsxs)(`button`,{type:`button`,onClick:()=>r(e=>!e),className:`w-full flex items-center gap-1 text-left font-semibold text-gray-900`,"aria-expanded":n,children:[n?(0,U.jsx)(IE,{className:`shrink-0`}):(0,U.jsx)(PE,{className:`shrink-0`}),(0,U.jsx)(`span`,{children:e})]}),n&&(0,U.jsx)(`p`,{className:`mt-2 ml-6 text-sm text-gray-600 leading-relaxed`,children:t})]})},O8=()=>(0,U.jsxs)(`div`,{className:`bg-white/90 shadow p-12 lg:block hidden lg:w-[500px] h-fit min-h-screen`,children:[(0,U.jsx)(`div`,{className:`text-xl text-black font-bold`,children:`Secure, compliant infrastru
146cture and AI usage from day one`}),(0,U.jsx)(`div`,{className:`text-lg text-gold font-bold pt-5 pb-1`,children:`Isolated, controlled infrastructure`}),(0,U.jsx)(`p`,{children:`Run workloads in dedicated, shared-nothing AWS environments. Maintain full control over networking, IAM, and encryption.`}),(0,U.jsx)(`hr`,{className:`mt-5 mb-4`}),(0,U.jsx)(`div`,{className:`text-lg text-gold font-bold pb-1`,children:`Security and compliance by default`}),(0,U.jsx)(`p`,{children:`Enforce fine-grained access controls, meet regulatory requirements, and scale without re-architecting or reinventing compliance as you grow.`}),(0,U.jsx)(`hr`,{className:`mt-5 mb-4`}),(0,U.jsx)(`div`,{className:`text-lg text-gold font-bold pb-1`,children:`Secure, auditable AI usage`}),(0,U.jsx)(`p`,{children:`Proxy and audit every LLM API call across your team. Enforce access controls and usage policies so AI stays compliant by default.`}),(0,U.jsx)(`div`,{className:`mt-4`,children:(0,U.jsx)(E8,{})}),(0,U.jsxs)(`div`,{className:`mt-8`,children:[(0,U.jsxs)(D8,{question:`What does the trial include?`,children:[`The trial includes a 30-day trial of the Aptible Infrastructure platform to deploy secure web apps and databases, plus $10 in LLM credits to use with LLM Gateway.`,` `,(0,U.jsx)(`a`,{href:`https://www.aptible.com/docs/reference/pricing#trials`,className:`underline`,target:`_blank`,rel:`noopener noreferrer`,children:`See full usage limits here`}),`.`]}),(0,U.jsx)(D8,{question:`Can I use the LLM Gateway as a standalone product?`,children:`Yes, LLM Gateway works as a standalone product - no Aptible infrastructure plan required. Sign up with a business email and you'll get $10 in credits to get started.`})]})]}),wBe={sm:`h-1`,md:`h-2`,lg:`h-3`},TBe={default:`#4361FF`,info:`#3B82F6`,success:`#22C55E`,warning:`#F59E0B`,error:`#EF4444`},k8=({value:e,maxValue:t,className:n=``,color:r,variant:i=`default`,height:a=`md`})=>{let o=r||TBe[i];return(0,U.jsx)(zge,{value:e,maxValue:t,className:n,"aria-label":`Progress`,children:({percentage:e})=>(0,U.jsx)(`div`,{className:`${wBe[a]} border border-black overflow-hidden`,children:(0,U.jsx)(`div`,{className:`h-full transition-all duration-300`,style:{width:`${e}%`,backgroundColor:o}})})})},A8=({label:e,value:t,maxValue:n,unit:r=`USD`,resetDate:i,color:a,variant:o=`default`,className:s=``,isLoading:c=!1})=>{let l=(0,V.useCallback)(e=>r===`USD`?ub(e):`${e} ${r}`,[r]);return(0,U.jsxs)(`div`,{className:s,children:[(0,U.jsxs)(`h3`,{className:`text-base font-semibold text-gray-900 mb-2`,children:[e,(0,U.jsx)(SE,{variant:`xs`,className:`inline-block ml-2`,show:c})]}),(0,U.jsx)(`div`,{className:`text-2xl mb-2`,children:l(n)}),(0,U.jsx)(k8,{value:t,maxValue:n,color:a,variant:o,className:`mb-2`}),(0,U.jsxs)(`div`,{className:`flex items-center justify-between text-sm text-gray-500`,children:[(0,U.jsxs)(`div`,{children:[l(t),` used`]}),i&&(0,U.jsxs)(`div`,{children:[`Resets on `,kf(i)]})]})]})},EBe=({policy:e,isLoading:t})=>{let[n,r]=(0,V.useState)(``);u(Qb());let{meta:{models:i=[]},isLoading:a,isInitialLoading:o}=I(Qb),s=i.map(e=>e.id),c=e?.models??[],l=c.length>0?c:s,d=n.trim().toLowerCase(),f=[];if(f=d===``?l:l.filter(e=>e.toLowerCase().includes(d)),t||a||o)return(0,U.jsx)(SE,{});let p=``;return l.length===0?p=`No models available`:f.length===0&&(p=`No models match search`),(0,U.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,U.jsxs)(`h4`,{className:`text-base font-semibold text-gray-900`,children:[`Allowed Models (`,f.length,`)`]}),(0,U.jsxs)(`div`,{className:`border border-gray-200 rounded-md p-4`,children:[(0,U.jsx)(YH,{id:`allowed-models-search`,placeholder:`Search...`,search:n??``,onChange:e=>r(e.target.value),className:`w-full mb-4`}),(0,U.jsx)(`div`,{className:`mt-1 max-h-48 flex-col gap-1 overflow-y-auto`,children:p?(0,U.jsx)(`span`,{className:`text-gray-600`,children:p}):f.map(e=>(0,U.jsx)(`div`,{className:`pb-2`,children:(0,U.jsx)(`span`,{className:`border-b border-dotted border-gray-400 pb-0.5 text-black`,children:e})},e))})]})]})},DBe={openai:`OpenAI`,google:`Google Gemini`};function j8(e){return DBe[e]??e.charAt(0).toUpperCase()+e.slice(1)}function M8(e){let t=e.indexOf(`/`);return t===-1?``:e.slice(0,t)}function N8(e){let t=e.indexOf(`/`);return t===-1?e:e.slice(t+1)}var OBe=({envId:e,orgId:t,initialSpendLimit:n,initialModels:r,onClose:i})=>{let a=l();u(Qb());let o=I(Qb),s=o.meta?.models??[],[c,d]=(0,V.useState)([]),f=(0,V.useRef)(!1);(0,V.useEffect)(()=>
146{if(s.length===0)return;let e=new Set(s.map(e=>e.id)),t=new Set(s.map(e=>M8(e.id)).filter(e=>!!e));for(let n of t)e.add(`${n}/*`);f.current?d(t=>t.filter(t=>e.has(t))):(f.current=!0,d(r.filter(t=>e.has(t))))},[s,r]);let p=(0,V.useMemo)(()=>{let e=new Map;for(let t of s){let n=M8(t.id);if(!n)continue;let r=e.get(n)??[];r.push(t),e.set(n,r)}return Array.from(e.entries()).sort(([e],[t])=>e.localeCompare(t))},[s]),m=(0,V.useMemo)(()=>{let e=new Map;for(let[t,n]of p){let r=n.map(e=>({value:e.id,label:N8(e.id)}));e.set(t,[{value:`${t}/*`,label:`*`},...r])}return e},[p]),h={envId:e,orgId:t,spendLimit:n,models:c},g=I(fx);T(g,()=>{a(dx({envId:e,orgId:t})),i()});let _=e=>{e.preventDefault(),a(fx(h))},v=e=>t=>{d(n=>[...n.filter(t=>M8(t)!==e),...t])};return(0,U.jsx)(Z,{children:(0,U.jsxs)(W,{children:[(0,U.jsx)(`h3`,{className:G.type.h3,children:`LLM Usage & Access Policy`}),(0,U.jsx)(TA,{...g}),(0,U.jsxs)(`form`,{onSubmit:_,className:`flex flex-col gap-4`,children:[(0,U.jsxs)(`div`,{className:`grid grid-cols-1 lg:grid-cols-2 gap-8`,children:[(0,U.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,U.jsx)(`h4`,{className:`text-lg font-semibold text-gray-900`,children:`Select Allowed Models`}),o.isLoading?(0,U.jsx)(`p`,{className:`text-sm text-gray-500`,children:`Loading models...`}):p.length===0?(0,U.jsx)(`p`,{className:`text-sm text-gray-500`,children:`No models available.`}):p.map(([e])=>{let t=m.get(e)??[],n=c.filter(t=>
146M8(t)===e);return(0,U.jsx)(J,{label:j8(e),htmlFor:`models-${e}`,labelProps:{className:`text-base font-semibold text-gray-900`},children:(0,U.jsx)(C6,{id:`models-${e}`,ariaLabel:`Select ${j8(e)} models`,options:t,value:n,onChange:t=>v(e)(t),placeholder:`None`,getTriggerDisplayText:e=>e.length===0?`None`:e.map(e=>t.find(t=>t.value===e)?.label??N8(e)).join(`, `),showSelectAllButton:!0,showAllButton:!0})},e)})]}),(0,U.jsx)(`div`,{className:`pt-0 lg:pt-7`,children:(0,U.jsxs)(`div`,{className:`flex flex-col gap-4 rounded-md border border-gray-200 p-4`,children:[(0,U.jsx)(`h4`,{className:`text-lg font-semibold text-gray-900`,children:`Selected`}),(0,U.jsx)(`div`,{className:`flex max-h-48 flex-wrap gap-2 overflow-y-auto min-h-[2rem]`,children:c.map(e=>(0,U.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-md border border-gray-300 bg-gray-50 px-2 py-1 text-sm`,children:[(0,U.jsx)(`span`,{children:e}),(0,U.jsx)(`button`,{type:`button`,"aria-label":`Remove ${e}`,className:`text-gray-500 hover:text-gray-700 focus:outline-none focus-visible:ring-2 focus-visible:ring-gray-500 rounded`,onClick:()=>d(t=>t.filter(t=>t!==e)),children:(0,U.jsx)(JE,{variant:`sm`})})]},e))})]})})]}),(0,U.jsx)(`hr`,{className:`my-2`}),(0,U.jsxs)(`div`,{className:`flex gap-2`,children:[(0,U.jsx)(bA,{type:`submit`,envId:e,isLoading:g.isLoading,children:`Save Policy`}),(0,U.jsx)(K,{type:`button`,onClick:i,variant:`white`,children:`Cancel`})]})]})]})})},kBe=({envId:e,orgId:t})=>{let{isLoading:n,isInitialLoading:r}=I(dx),i=B(t=>cx(t,{envId:e})),a=i.length>0?i[0]:null,[o,s]=(0,V.useState)(!1);return(0,U.jsx)(`div`,{className:`mb-6`,children:o?(0,U.jsx)(OBe,{envId:e,orgId:t??``,initialSpendLimit:a?.spendLimit??null,initialModels:a?.models??[],onClose:()=>s(!1)}):(0,U.jsxs)(wU,{children:[(0,U.jsx)(TU,{title:`LLM Usage & Access Policy`,isLoading:n||r}),(0,U.jsx)(EBe,{policy:a,isLoading:n||r}),(0,U.jsx)(`hr`,{className:`my-2`}),(0,U.jsx)(`div`,{children:(0,U.jsxs)(bA,{envId:e,onClick:()=>s(!0),variant:`white`,type:`button`,children:[(0,U.jsx)(ME,{variant:`sm`,className:`mr-2`}),`Edit Policy`]})})]})})},P8=({currentStep:e})=>(0,U.jsx)(`div`,{className:`flex gap-1.5 mb-6`,children:[1,2,3].map(t=>(0,U.jsx)(`div`,{className:`flex-1 h-1.5 rounded-full ${t<=e?`bg-yellow-400`:`bg-gray-200`}`},t))}),ABe={environmentId:e=>{if(e.environmentId===``)return`Must select an environment`},handle:e=>z4(e.handle),note:e=>{if(e.note.length>256)return`Note must be 256 characters or less`}},jBe={name:e=>z4(e.name),stackId:e=>{if(!e.stackId)return`Must select a region`}},F8=({isOpen:e,onClose:t,onSuccess:n,defaultEnvironmentId:r=``})=>{let i=l(),a=B(su),[o,s]=(0,V.useState)(r),[c,d]=(0,V.useState)(``),[f,p]=(0,V.useState)(``),[m,h]=(0,V.useState)(!1),g=B($o),_=a.length>0,v=B(Ko),[y]=KS(),[b,x]=(0,V.useState)(!1),[S,C]=(0,V.useState)(`create-key`),[w,E]=(0,V.useState)(!1);(0,V.useEffect)(()=>{if(!e)return;let t=!_;x(t),C(t?`create-env`:`create-key`),E(!y.allowAiGatewayAccess&&!m),r||s(a.length===1?a[0].id:``)},[e]);let[D,O]=(0,V.useState)(``),[k,A]=(0,V.useState)(``);u(Jl());let j=B(Vl).filter(e=>e.organizationId===``),M=[{label:`Select a region`,value:``},...Array.from(new Map(j.map(e=>[e.region,e])).values()).sort((e,t)=>e.region.localeCompare(t.region)).map(e=>({label:e.region,value:e.id}))],[ee,te]=QS(jBe),ne=I(_u);T(ne,()=>{s(`${ne.meta?.id??``}`),C(`create-key`)});let re=e=>{e.preventDefault(),te({name:D,stackId:k})&&i(_u({name:D,stackId:k,orgId:g}))};(0,V.useEffect)(()=>{y.allowAiGatewayAccess&&h(!0)},[y.allowAiGatewayAccess]);let[ie,ae]=QS(ABe),oe=I(Xb);T(oe,()=>{let e=oe.meta?.llmKey||``;N(),n(e,b)});let se=e=>{e.preventDefault(),ae({environmentId:o,handle:c,note:f})&&i(Xb({envId:o,handle:c,note:f,orgId:g}))},N=()=>{x(!_),C(_?`create-key`:`create-env`),O(``),A(``),s(r),d(``),p(``),t()};return e?S===`create-env`?(0,U.jsx)(h3,{children:(0,U.jsxs)(kU,{isOpen:e,className:`min-w-[600px]`,children:[(0,U.jsx)(AU,{icon:(0,U.jsx)(ID,{variant:`sm`}),title:`Create Environment`,onClose:N}),(0,U.jsxs)(LA,{onSubmit:re,children:[(0,U.jsxs)(MU,{className:`pb-0`,children:[(0,U.jsx)(P8,{currentStep:1}),(0,U.jsxs)(`p`,{className:`text-gray-600 text-sm mb-4`,children:[`To get started, you'll need to create an Environment to organize your keys and any app resources you wish to add later.`,` `,(0,U.jsx)(CA,{href:`https://www.aptible.com/docs/environments`,children:`Learn more about Environments`})]}),(0,U.jsxs)(J,{label:(0,U.jsxs)(U.Fragment,{children:[`Stack Region `,(0,U.jsx)(`span`,{className:`text-red-500`,children:`*`})]}),htmlFor:`env-region`,className:`mb-4`,feedbackMessage:ee.stackId,feedbackVariant:ee.stackId?`danger`:`default`,children:[(0,U.jsx)(XA,{id:`env-region`,value:k,options:M,onSelect:e=>A(e.value),ariaLabel:`Region`}),(0,U.jsx)(zA,{children:(0,U.jsxs)(`span`,{className:`text-gray-500 text-base`,children:[`The region determines the shared stack on which we'll create your environment.`,` `,(0,U.jsx)(CA,{href:`https://www.aptible.com/docs/stacks`,children:`Learn more about Stacks and supported regions`})]})})]}),(0,U.jsx)(J,{label:(0,U.jsxs)(U.Fragment,{children:[`Environment Name `,(0,U.jsx)(`span`,{className:`text-red-500`,children:`*`})]}),htmlFor:`env-name`,className:`mb-4`,feedbackMessage:ee.name,feedbackVariant:ee.name?`danger`:`default`,children:(0,U.jsx)(X,{id:`env-name`,name:`env-name`,value:D,onChange:e=>O(e.target.value),placeholder:`e.g., my-environment`})}),(0,U.jsx)(TA,{className:`mt-4`,...ne})]}),(0,U.jsx)(jU,{actions:[(0,U.jsx)(K,{variant:`white`,onClick:N,children:`Cancel`},`cancel`),(0,U.jsx)(K,{type:`submit`,disabled:!D.trim()||!k,isLoading:ne.isLoading,children:`Next`},`next`)]})]})]})}):(0,U.jsx)(h3,{children:(0,U.jsxs)(kU,{isOpen:e,className:`min-w-[600px]`,children:[(0,U.jsx)(AU,{icon:(0,U.jsx)(mD,{variant:`sm`}),title:`Create LLM Key`,onClose:N}),(0,U.jsxs)(LA,{onSubmit:se,children:[(0,U.jsxs)(MU,{className:`pb-0`,children:[b&&(0,U.jsx)(P8,{currentStep:2}),!r&&(0,U.jsxs)(J,{label:(0,U.jsxs)(U.Fragment,{children:[`Environment `,(0,U.jsx)(`span`,{className:`text-red-500`,children:`*`})]}),htmlFor:`environment`,className:`mb-4`,feedbackMessage:ie.environmentId,feedbackVariant:ie.environmentId?`danger`:`default`,children:[(0,U.jsx)(ej,{id:`environment`,value:o,onSelect:e=>s(e.value),ariaLabel:`Environment`}),(0,U.jsx)(zA,{children:b?`Apps and their resources must be hosted on dedicated stacks in order to be HIPAA compliant, but you can generate LLM keys anyw
146here.`:(0,U.jsx)(`span`,{className:`text-gray-500 text-base`,children:`Key usage limits and model access policies are defined within Environment settings.`})})]}),(0,U.jsx)(J,{label:(0,U.jsxs)(U.Fragment,{children:[`Handle `,(0,U.jsx)(`span`,{className:`text-red-500`,children:`*`})]}),htmlFor:`handle`,className:`mb-4`,feedbackMessage:ie.handle,feedbackVariant:ie.handle?`danger`:`default`,children:(0,U.jsx)(X,{id:`handle`,name:`handle`,value:c,onChange:e=>d(e.target.value),placeholder:`e.g., production-llm-key`,maxLength:64})}),(0,U.jsx)(J,{label:`Note`,htmlFor:`note`,className:`mb-4`,feedbackMessage:ie.note,feedbackVariant:ie.note?`danger`:`default`,children:(0,U.jsx)(X,{id:`note`,name:`note`,type:`text`,value:f,onChange:e=>p(e.target.value),placeholder:`e.g., Production API access`,maxLength:256})}),w&&(0,U.jsx)(`div`,{className:`flex gap-1 flex-col`,children:(0,U.jsx)(ZH,{checked:m,disabled:m,onChange:e=>{e.currentTarget.checked&&(h(!0),i(ds({userId:v,agreementType:`llm_phi_acknowledgement`,agreementVersion:`1`})))},labelClassName:`ml-3`,label:(0,U.jsxs)(U.Fragment,{children:[`I have read and agree to the `,(0,U.jsx)(DA,{}),` and understand that`,` `,(0,U.jsx)(`b`,{children:`a BAA is required before sending any PHI through the gateway.`})]})})}),(0,U.jsx)(TA,{className:`mt-4`,...oe})]}),(0,U.jsx)(jU,{actions:[(0,U.jsx)(K,{variant:`white`,onClick:N,children:`Cancel`},`cancel`),(0,U.jsx)(K,{type:`submit`,disabled:!m||!c.trim()||!o,isLoading:oe.isLoading,children:`Create LLM Key`},`submit`)]})]})]})}):null},I8=({isOpen:e,llmKey:t,onClose:n,showProgress:r=!1})=>e?(0,U.jsx)(h3,{children:(0,U.jsxs)(kU,{isOpen:e,className:`min-w-[600px]`,children:[(0,U.jsx)(AU,{icon:(0,U.jsx)(UE,{variant:`sm`,color:`#00633f`}),title:`LLM Key Created`,onClose:n}),(0,U.jsxs)(MU,{children:[r&&(0,U.jsx)(P8,{currentStep:3}),(0,U.jsx)(q,{variant:`warning`,className:`mb-4`,children:`Be sure to copy your key now, as you will not be able to access it again once you close this window.`}),(0,U.jsx)(J,{label:`LLM Key`,htmlFor:`llm-key`,className:`mb-4`,children:(0,U.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,U.jsx)(X,{id:`llm-key`,type:`text`,value:t,readOnly:!0,className:`flex-1 font-mono text-sm text-center`}),(0,U.jsx)(B2,{text:t})]})}),(0,U.jsx)(J,{label:`Endpoint URL`,htmlFor:`endpoint-url`,className:`mb-4`,children:(0,U.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,U.jsx)(X,{id:`endpoint-url`,type:`text`,value:`https://llm-gateway-api.aptible.com`,readOnly:!0,className:`flex-1 font-mono text-sm text-center`}),(0,U.jsx)(B2,{text:`https://llm-gateway-api.aptible.com`})]})})]})]})}):null,MBe=({isOpen:e,onClose:t,config:n})=>{let r=l(),[i,a]=(0,V.useState)(n.spendLimit),o=B($o),[s,c]=(0,V.useState)(),u=I(Nb);return T(u,t),(0,V.useEffect)(()=>{e||(a(n.spendLimit),c(void 0))},[e,n.spendLimit]),e?(0,U.jsx)(h3,{children:(0,U.jsxs)(kU,{isOpen:e,onClose:t,className:`min-w-[600px]`,children:[(0,U.jsx)(AU,{icon:(0,U.jsx)(BE,{variant:`sm`}),title:`LLM Gateway Settings`,onClose:t}),(0,U.jsx)(MU,{children:(0,U.jsxs)(`form`,{id:`edit-gateway-settings`,noValidate:!0,onSubmit:e=>{if(e.preventDefault(),!i){c(`Spend limit is required.`);return}if(i>1e4){c(`Spend limit cannot exceed $10,000.`);return}c(void 0),r(Nb({orgId:o,id:n.id,spendLimit:i}))},children:[(0,U.jsx)(J,{label:`Monthly Spend Limit (USD)`,htmlFor:`spend-limit`,feedbackMessage:s?(0,U.jsxs)(U.Fragment,{children:[s,` Need help?`,` `,(0,U.jsx)(P,{to:Po(),children:`Contact support`})]}):null,feedbackVariant:s?`danger`:`default`,children:(0,U.jsx)(X,{id:`spend-limit`,type:`number`,min:0,max:1e4,value:i,onChange:e=>a(e.target.value?Number.parseFloat(e.target.value):void 0),disabled:n.trial})}),(0,U.jsx)(TA,{className:`mt-4`,...u})]})}),(0,U.jsx)(jU,{actions:[(0,U.jsx)(K,{variant:`white`,onClick:t,children:`Cancel`},`cancel`),(0,U.jsx)(K,{type:`submit`,form:`edit-gateway-settings`,isLoading:u.isLoading,disabled:n.trial,children:`Save`},`save`)]})]})}):null},L8=(e,t=1)=>new Intl.NumberFormat(`en`,{notation:`compact`,maximumFractionDigits:t}).format(e),R8=`banner-dismissed-`,z8=({title:e,children:t,icon:n,feature:r,defaultExpanded:i=!1,className:a=``,extraActions:o,dismissable:s=!0,persistDismissed:c=!0})=>{let[l,u]=(0,V.useState)(()=>!s||!c?!1:X6(`${R8}${r}`)===`1`),[d,f]=(0,V.useState)(i);if(l)return null;let p=()=>{s&&u(!0),c&&Z6(`${R8}${r}`,`1`,365)},m=d?NE:IE;return(0,U.jsxs)(`div`,{role:`region`,"aria-label":e,className:(0,H.default)(`rounded border border-indigo bg-indigo-100 px-4 py-4 text-black`,a),children:[(0,U.jsxs)(`button`,{type:`button`,"aria-expanded":d,className:`flex w-full items-center`,onClick:()=>f(!d),children:[n?(0,U.jsx)(`div`,{className:`mr-3`,children:n}):null,(0,U.jsx)(`span`,{className:`flex-1 text-left text-lg font-semibold`,children:e}),(0,U.jsx)(m,{color:`black`,variant:`base`})]}),d?(0,U.jsxs)(`div`,{className:(0,H.default)(`mt-2`,n?`ml-9`:`ml-0`),children:[(0,U.jsx)(`div`,{children:t}),(0,U.jsxs)(W,{variant:`horizontal`,size:`sm`,className:`items-center gap-2 mt-2`,children:[s?(0,U.jsx)(K,{variant:`white`,size:`sm`,onClick:p,children:`Dismiss`}):null,o||null]})]}):null]})};function B8(e,t){if(t===0)return`default`;let n=e/t*100;return n>=100?`error`:n>=80?`warning`:`default`}function V8(){let e=B(kb),{totalSpend:t}=B(lx);return{config:e,totalSpend:e?.currentUsage?.spend??t}}var NBe=({isLoading:e})=>{let{config:t,totalSpend:n}=V8(),r=t?.spendLimit??0;return(0,U.jsx)(Z,{size:`md`,children:(0,U.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,U.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,U.jsxs)(`h3`,{className:`text-base font-semibold text-gray-900`,children:[`Trial Credit Spend`,(0,U.jsx)(SE,{variant:`xs`,className:`inline-block ml-2`,show:e})]}
146),(0,U.jsx)(aA,{fluid:!0,text:`Spend limit cannot be edited while on a trial plan`,children:(0,U.jsx)(hD,{variant:`sm`,className:`opacity-60`})})]}),(0,U.jsxs)(`div`,{className:`flex flex-col`,children:[(0,U.jsx)(k8,{value:n,maxValue:r,variant:B8(n,r),className:`mb-2`,height:`lg`}),(0,U.jsxs)(`div`,{className:`flex items-start justify-between text-sm text-gray-500`,children:[(0,U.jsxs)(`div`,{className:`${G.type.darker} text-base`,children:[ub(n),` used`]}),(0,U.jsxs)(`div`,{className:`flex flex-col gap-1 items-end`,children:[(0,U.jsxs)(`span`,{className:`${G.type.darker} text-base`,children:[`Limit: `,ub(r)]}),(0,U.jsxs)(`div`,{children:[`Ready to sign up for more credits?`,` `,(0,U.jsx)(P,{className:`underline`,to:Po({subject:`Upgrade to paid LLM Gateway plan`,message:Ure(`To upgrade to a paid LLM Gateway plan, submit this form and the Aptible Support team will be in touch soon. 147 148 The LLM Gateway is $400/month plus usage fees. Learn more about pricing here: https://www.aptible.com/pricing`)}),children:`Contact us`})]})]})]})]})]})})},PBe=({isLoading:e,orgId:t,onEditClick:n})=>{let{config:r,totalSpend:i}=V8(),a=B(e=>__(e,{orgId:t})),o=r?.spendLimit??0,s=r?.currentUsage?.budgetResetAt??Be.now().plus({months:1}).startOf(`month`).toISO();return(0,U.jsx)(Z,{size:`md`,children:(0,U.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,U.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,U.jsxs)(`h3`,{className:`text-base font-semibold text-gray-900`,children:[`Monthly Spend (MTD)`,(0,U.jsx)(SE,{variant:`xs`,className:`inline-block ml-2`,show:e})]}),a?(0,U.jsx)(aA,{fluid:!0,text:`Edit the monthly spend limit`,children:(0,U.jsx)(`div`,{className:`cursor-pointer text-gray-500 hover:text-gray-900`,"aria-label":`Edit the monthly spend limit`,onClick:n,onKeyUp:e=>{[`Enter`,` `].includes(e.key)&&n()},children:(0,U.jsx)(BE,{variant:`sm`,color:`currentColor`,className:`w-4 h-4`})})}):(0,U.jsx)(aA,{fluid:!0,text:`Only account owners can edit the monthly spend limit`,children:(0,U.jsx)(hD,{variant:`sm`,className:`ml-1 opacity-60`})})]}),(0,U.jsxs)(`div`,{className:`flex flex-col`,children:[(0,U.jsx)(k8,{value:i,maxValue:o,variant:B8(i,o),className:`mb-2`,height:`lg`}),(0,U.jsxs)(`div`,{className:`flex items-start justify-between text-sm text-gray-500`,children:[(0,U.jsxs)(`div`,{className:`${G.type.darker} text-base`,children:[ub(i),` used`]}),(0,U.jsxs)(`div`,{className:`flex flex-col gap-1 items-end`,children:[(0,U.jsxs)(`span`,{className:`${G.type.darker} text-base`,children:[`Limit: `,ub(o)]}),(0,U.jsxs)(`div`,{children:[`Refreshes `,kf(s)]})]})]})]})]})})},FBe=({isLoading:e})=>{let{totalTokens:t,totalInputTokens:n,totalOutputTokens:r}=B(lx);return(0,U.jsx)(Z,{size:`md`,children:(0,U.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,U.jsxs)(`h4`,{className:`text-base font-semibold text-gray-900 flex space-x-1 items-center w-fit`,children:[(0,U.jsx)(`span`,{children:`Token Usage`}),(0,U.jsx)(aA,{text:`This is the total number of tokens used across all keys for the current month.`,children:e?(0,U.jsx)(SE,{variant:`xs`,className:`inline-block ml-2`}):(0,U.jsx)(tD,{className:`inline-block opacity-50 hover:opacity-100`,variant:`sm`})})]}),(0,U.jsx)(`div`,{className:`text-2xl`,children:t.toLocaleString()}),(0,U.jsxs)(`div`,{className:`text-sm text-gray-500`,children:[n.toLocaleString(),` input /`,` `,r.toLocaleString(),` output`]})]})})},IBe=({isLoading:e})=>{let{totalRequests:t,totalSuccessfulRequests:n,totalFailedRequests:r}=B(lx);return(0,U.jsx)(Z,{size:`md`,children:(0,U.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,U.jsxs)(`h4`,{className:`text-base font-semibold text-gray-900 flex space-x-1 items-center w-fit`,children:[(0,U.jsx)(`span`,{children:`Total Requests`}),(0,U.jsx)(aA,{text:`This is the total number of requests made across all keys for the current month.`,children:e?(0,U.jsx)(SE,{variant:`xs`,className:`inline-block ml-2`}):(0,U.jsx)(tD,{className:`inline-block opacity-50 hover:opacity-100`,variant:`sm`})})]}
148),(0,U.jsx)(`div`,{className:`text-2xl`,children:t.toLocaleString()}),(0,U.jsxs)(`div`,{className:`text-sm text-gray-500`,children:[n.toLocaleString(),` successful /`,` `,r.toLocaleString(),` failed`]})]})})},LBe=({orgId:e})=>{let[t,n]=(0,V.useState)(!1),{isLoading:r}=Er([Ab,ux]),i=B(kb),a=i?.trial??!1;return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`div`,{className:`grid grid-cols-3 gap-4`,children:[a?(0,U.jsx)(NBe,{isLoading:r}):(0,U.jsx)(PBe,{isLoading:r,orgId:e,onEditClick:()=>n(!0)}),(0,U.jsx)(FBe,{isLoading:r}),(0,U.jsx)(IBe,{isLoading:r})]}),i&&(0,U.jsx)(MBe,{isOpen:t,onClose:()=>n(!1),config:i})]})},H8=({isOpen:e,onClose:t,llmKey:n})=>{let r=l(),i=I(Zb),a=B($o),[o,s]=(0,V.useState)(``);return T(i,t),(0,V.useEffect)(()=>{e&&s(``)},[e]),!e||!n?null:(0,U.jsx)(h3,{children:(0,U.jsxs)(kU,{isOpen:e,onClose:t,className:`min-w-[500px]`,children:[(0,U.jsx)(AU,{title:`Revoke LLM Key`,onClose:t}),(0,U.jsxs)(MU,{children:[(0,U.jsxs)(`p`,{className:`text-gray-700 mb-4`,children:[`This will permanently revoke `,(0,U.jsx)(`strong`,{children:n.handle}),`. Any applications using this key will immediately lose access to the AI Gateway. This action cannot be undone.`]}),(0,U.jsx)(J,{label:`Type "${n.handle}" to confirm`,htmlFor:`revoke-confirm`,children:(0,U.jsx)(X,{id:`revoke-confirm`,type:`text`,value:o,onChange:e=>s(e.target.value),placeholder:n.handle})})]}),(0,U.jsx)(jU,{actions:[(0,U.jsx)(K,{variant:`white`,onClick:t,children:`Cancel`},`cancel`),(0,U.jsx)(K,{variant:`delete`,disabled:o!==n.handle,isLoading:i.isLoading,onClick:()=>r(Zb({id:n.id,orgId:a})),children:`Revoke Key`},`revoke`)]})]})})},U8={handle:{field:`handle`,headerName:`Key`,cellRenderer:({data:e})=>(0,U.jsx)(U2,{label:e.handle,href:qi(e.id),description:e.note??void 0,icon:(0,U.jsx)(`img`,{src:`/resource-types/logo-llm_key.png`,className:`w-[32px] h-[32px] mr-2 align-middle`,"aria-label":`LLM Key`})})},id:{field:`id`,headerName:`ID`,minWidth:80,valueGetter:({data:e})=>Number.parseInt(e?.id||`0`,10)},status:{field:`status`,headerName:`Status`,cellRenderer:({data:e})=>(0,U.jsx)(J2,{value:e.status===`ACTIVE`?`Active`:`Revoked`,valueToVariantMap:{Active:`success`,Revoked:`error`}})},environment:{field:`envHandle`,headerName:`Environment`,cellRenderer:({data:e})=>(0,U.jsx)(G2,{id:e.environmentId,hideIcon:!0})},createdBy:{field:`createdBy`,headerName:`Created By`,valueGetter:({data:e})=>e?.createdBy.name,cellRenderer:({data:e})=>(0,U.jsx)(U2,{label:e.createdBy.name,description:e.createdBy.email})},createdAt:{field:`createdAt`,headerName:`Created At (UTC)`,cellRenderer:({data:e})=>(0,U.jsx)(Y2,{date:e.createdAt})},requests:{field:`totalRequests`,headerName:`Requests`,initialHide:!0,cellRenderer:({data:e})=>(0,U.jsx)(aA,{fluid:!0,text:(0,U.jsxs)(`div`,{className:`grid grid-cols-2 gap-1`,children:[(0,U.jsx)(`div`,{className:`font-semibold`,children:`Successful`}),(0,U.jsx)(`div`,{className:`text-right`,children:e.currentUsage.successfulRequests.toLocaleString()}),(0,U.jsx)(`div`,{className:`font-semibold`,children:`Failed`}),(0,U.jsx)(`div`,{className:`text-right`,children:e.currentUsage.failedRequests.toLocaleString()})]}),children:(0,U.jsx)(`span`,{className:`border-b border-dotted border-gray-400`,children:L8(e.totalRequests)})})},tokens:{field:`totalTokens`,headerName:`Tokens`,initialHide:!0,cellRenderer:({data:e})=>(0,U.jsx)(aA,{fluid:!0,text:(0,U.jsxs)(`div`,{className:`grid grid-cols-2 gap-1`,children:[(0,U.jsx)(`div`,{className:`font-semibold`,children:`Input`}),(0,U.jsx)(`div`,{className:`text-right`,children:e.currentUsage.inputTokens.toLocaleString()}),(0,U.jsx)(`div`,{className:`font-semibold`,children:`Output`}),(0,U.jsx)(`div`,{className:`text-right`,children:e.currentUsage.outputTokens.toLocaleString()})]}),children:(0,U.jsx)(`span`,{className:`border-b border-dotted border-gray-400`,children:L8(e.totalTokens)})})},spend:{field:`spend`,headerName:`Spend`,sort:`desc`,cellRenderer:({data:e})=>(0,U.jsx)(q2,{value:e.spend})}},W8=`LLM keys provide secure access to the Aptible LLM Gateway for your applications.`,RBe=()=>{let e=B($o),t=B(ns),n=B(rs),[r,i]=(0,V.useState)(!1),[a,o]=(0,V.useState)(!1),[s,c]=(0,V.useState)(``),[l,u]=(0,V.useState)(!1),[d,f]=(0,V.useState)(null),{isLoading:p,isInitialLoading:m}=Er([Ab,qb]),h=!!B(kb)?.id,g=B(ES),_=g.length>0,v=()=>{Ys(`new-llm-key-button-clicked`,JSON.stringify({page:`organization`,orgId:t.id,org
148Name:t.name})),i(!0)},y=(e,t)=>{c(e),u(t),o(!0)},b=()=>{o(!1),c(``),u(!1)},x=(0,V.useMemo)(()=>[U8.handle,U8.id,U8.status,U8.environment,U8.createdBy,U8.createdAt,U8.requests,U8.tokens,U8.spend,{colId:`actions`,headerName:`Actions`,sortable:!1,width:100,resizable:!1,suppressAutoSize:!0,suppressSizeToFit:!0,cellRenderer:({data:e})=>(0,U.jsx)(K,{variant:`delete`,size:`sm`,disabled:e.status===`REVOKED`,onClick:()=>f(e),children:`Revoke`})}],[]);return p||m?(0,U.jsxs)(W,{children:[(0,U.jsx)(W,{size:`sm`,children:(0,U.jsx)(NU,{description:W8,children:`LLM Gateway`})}),(0,U.jsx)(`div`,{className:`flex justify-center py-12`,children:(0,U.jsx)(SE,{show:!0})})]}):h?(0,U.jsxs)(W,{children:[(0,U.jsxs)(W,{variant:`horizontal`,className:`items-center justify-between`,children:[(0,U.jsx)(NU,{description:W8,children:`LLM Gateway`}),n?null:(0,U.jsxs)(K,{onClick:v,children:[(0,U.jsx)(mD,{variant:`sm`,className:`mr-2`}),` Create LLM Key`]})]}),!p&&!_&&(0,U.jsx)(z8,{title:`Welcome to the LLM Gateway!`,defaultExpanded:!0,feature:`ai-gateway-welcome`,dismissable:!1,persistDismissed:!1,icon:(0,U.jsx)(`div`,{className:`text-2xl`,children:`ð`}),extraActions:(0,U.jsx)(dA,{variant:`white`,size:`sm`,to:Po(),children:`Contact Support`}),children:(0,U.jsx)(`div`,{className:`flex-1`,children:(0,U.jsxs)(`p`,{className:`${G.type.darker} max-w-[95%]`,children:[`You're on your way to using LLMs safely and securely in a compliant environment. Need help getting started?`,` `,(0,U.jsx)(CA,{className:`underline`,href:`https://www.aptible.com/docs/core-concepts/ai-gateway`,children:`Check out the docs`}),`, or contact us if you'd like some assistance getting setup.`]})})}),!p&&!_&&(0,U.jsx)(q,{variant:`warning`,children:(0,U.jsxs)(`p`,{className:`${G.type.darker} mt-0.5`,children:[`A signed BAA with Aptible is required before you can safely send any PHI through the gateway. Don't have one?`,` `,(0,U.jsx)(P,{to:Po(),className:`underline`,children:`Contact us`}),`.`]})}),(0,U.jsx)(LBe,{orgId:e}),(0,U.jsx)(L2,{rowData:g,colDefs:x,syncQueryParams:!0,defaultSearch:`status:active`}),(0,U.jsx)(F8,{isOpen:r,onClose:()=>i(!1),onSuccess:y}),(0,U.jsx)(I8,{isOpen:a,llmKey:s,onClose:b,showProgress:l}),(0,U.jsx)(H8,{isOpen:d!==null,onClose:()=>f(null),llmKey:d})]}):(0,U.jsx)(ae,{to:Hi(),replace:!0})},zBe=({envId:e})=>{u(du({id:e}));let t=B($o),n=B(ns),r=B(rs),[i,a]=(0,V.useState)(!1),[o,s]=(0,V.useState)(!1),[c,l]=(0,V.useState)(``),[d,f]=(0,V.useState)(!1),[p,m]=(0,V.useState)(null);u(Ab({orgId:t})),u(Jb({envId:e,orgId:t})),u(dx({envId:e,orgId:t}));let{isLoading:h,isInitialLoading:g}=Er([Ab,Jb,dx]),_=!!B(kb)?.id,v=B(t=>DS(t,{envId:e})),y=(0,V.useMemo)(()=>[U8.handle,U8.id,U8.status,U8.createdBy,U8.createdAt,U8.requests,U8.tokens,U8.spend,{colId:`actions`,headerName:`Actions`,sortable:!1,width:100,resizable:!1,suppressAutoSize:!0,suppressSizeToFit:!0,cellRenderer:({data:e})=>(0,U.jsx)(K,{variant:`delete`,size:`sm`,disabled:e.status===`REVOKED`,onClick:()=>m(e),children:`Revoke`})}],[]);return h||g?(0,U.jsx)(`div`,{className:`flex justify-center py-12`,children:(0,U.jsx)(SE,{show:!0})}):_?(0,U.jsxs)(W,{size:`lg`,children:[(0,U.jsx)(kBe,{envId:e,orgId:t??``}),(0,U.jsx)(`div`,{className:`flex justify-end`,children:r?null:(0,U.jsxs)(K,{onClick:()=>{Ys(`new-llm-key-button-clicked`,JSON.stringify({page:`environment`,orgId:n.id,orgName:n.name})),a(!0)},children:[(0,U.jsx)(mD,{variant:`sm`,className:`mr-2`}),` Create LLM Key`]})}),(0,U.jsx)(L2,{rowData:v,colDefs:y,syncQueryParams:!0,isLoading:!v.length&&(h||g)}),(0,U.jsx)(F8,{isOpen:i,onClose:()=>a(!1),onSuccess:(e,t)=>{l(e),f(t),s(!0)},defaultEnvironmentId:e}),(0,U.jsx)(I8,{isOpen:o,llmKey:c,onClose:()=>{s(!1),l(``),f(!1)},showProgress:d}),(0,U.jsx)(H8,{isOpen:p!==null,onClose:()=>m(null),llmKey:p})]}):(0,U.jsx)(ae,{to:Hi(),replace:!0})};function G8({as:e=`h3`,label:t,tooltip:n,isLoading:r=!1,className:i=``}){return(0,U.jsxs)(e,{className:`${G.type[`micro label`]} flex items-center gap-1 ${i}`,children:[t,n==null?null:(0,U.jsx)(_U,{text:n,ariaLabel:`More information: ${t}`}),(0,U.jsx)(SE,{variant:`xs`,show:r})]})}function K8({icon:e,label:t,tooltip:n,isLoading:r=!1,spanFull:i=!1,copyText:a,children:o}){return(0,U.jsxs)(`div`,{className:`min-w-0 px-4 py-3 first:pl-4 flex items-center gap-2 xl:flex-1 ${i?`sm:col-span-2`:``}`,children:[e?(0,U.jsx)(`div`,{className:`w-[32px] h-[32px] shrink-0`,children:e}):null,(0,U.jsxs)(`div`,{className:`min-w-0`,children:[(0,U.jsx)(G8,{label:t,tooltip:n,isLoading:r}),(0,U.jsx)(`div`,{className:`mt-1 min-w-0`,children:a?(0,U.jsxs)(`div`,{className:`flex items-center gap-2 min-w-0`,children:[(0,U.jsx)(`div`,{className:`${G.type[`detail value`]} break-words min-w-0`,children:o}),(0,U.jsx)(B2,{text:a,className:`shrink-0`})]}):(0,U.jsx)(`div`,{className:`${G.type[`detail value`]} break-words`,children:o})})]})]})}var q8=`flex flex-col divide-y divide-black-100 sm:grid sm:grid-cols-2 sm:divide-y-0 sm:[&>*:nth-child(2n)]:border-l sm:[&>*:nth-child(2n)]:border-black-100 sm:max-xl:[&>*:nth-child(n+3)]:!border-t sm:max-xl:[&>*:nth-child(n+3)]:!border-black-100 xl:flex xl:flex-row xl:items-stretch xl:divide-x xl:divide-black-100`;function J8({icon:e,nameLabel:t=`Name`,name:n,nameCopyText:r,id:i,url:a,dateLabel:o=`Created`,createdAt:s,costLabel:c=`Est. Monthly Cost`,cost:l,costTooltip:u,isLoading:d=!1}){return(0,U.jsx)(Z,{size:`none`,children:(0,U.jsxs)(`div`,{className:q8,children:[(0,U.jsx)(K8,{icon:e,label:t,isLoading:d,copyText:r,children:n}),(0,U.jsx)(K8,{label:`ID`,isLoading:d,children:i}
148),a==null?null:(0,U.jsx)(K8,{label:`URL`,isLoading:d,children:a}),(0,U.jsx)(K8,{label:o,isLoading:d,children:s==null?(0,U.jsx)(SE,{}):(0,U.jsx)(t4,{at:s})}),(0,U.jsx)(K8,{label:c,tooltip:u,isLoading:d,spanFull:a!=null,children:(0,U.jsx)(vU,{cost:l??null})})]})})}function BBe(e){return e===3?`lg:grid-cols-3 lg:[&>*:nth-child(-n+3)]:border-t-0 lg:[&>*:nth-child(n+4)]:border-t lg:[&>*:nth-child(n+4)]:border-black-100 lg:[&>*:not(:nth-child(3n+1))]:border-l lg:[&>*:not(:nth-child(3n+1))]:border-black-100 lg:[&>*:not(:nth-child(3n+1))]:pl-4 lg:[&>*:not(:nth-child(3n))]:pr-4`:e>=4?`lg:grid-cols-4 lg:[&>*:nth-child(-n+4)]:border-t-0 lg:[&>*:nth-child(n+5)]:border-t lg:[&>*:nth-child(n+5)]:border-black-100 lg:[&>*:not(:nth-child(4n+1))]:border-l lg:[&>*:not(:nth-child(4n+1))]:border-black-100 lg:[&>*:not(:nth-child(4n+1))]:pl-4 lg:[&>*:not(:nth-child(4n))]:pr-4`:`lg:grid-cols-2 lg:[&>*:nth-child(-n+2)]:border-t-0 lg:[&>*:nth-child(n+3)]:border-t lg:[&>*:nth-child(n+3)]:border-black-100 lg:[&>*:not(:nth-child(2n+1))]:border-l lg:[&>*:not(:nth-child(2n+1))]:border-black-100 lg:[&>*:not(:nth-child(2n+1))]:pl-4 lg:[&>*:not(:nth-child(2n))]:pr-4`}function Y8({title:e=`Details`,columns:t=2,children:n}){let r=V.Children.toArray(n).filter(Boolean).length%t,i=r===0?0:t-r;return(0,U.jsxs)(Z,{size:`md`,className:`flex flex-col gap-2`,children:[(0,U.jsx)(`h3`,{className:G.type[`micro label strong`],children:e}),(0,U.jsxs)(`div`,{className:`grid grid-cols-1 [&>*:not(:first-child)]:border-t [&>*:not(:first-child)]:border-black-100 ${BBe(t)}`,children:[n,Array.from({length:i},(e,t)=>(0,U.jsx)(`div`,{"aria-hidden":!0},`filler-${t}`))]})]})}function X8({title:e,titleTooltip:t,children:n,isLoading:r=!1,className:i=``}){return(0,U.jsxs)(`div`,{className:`flex flex-col gap-0.5 py-3 sm:flex-row sm:items-center sm:justify-between sm:gap-4 sm:py-2 ${i}`,children:[(0,U.jsx)(G8,{as:`h4`,label:e,tooltip:t,isLoading:r,className:`whitespace-nowrap`}),(0,U.jsx)(`div`,{className:`${G.type[`detail value`]} break-words sm:text-right`,children:n})]})}var Z8=`banner-dismissed-`,VBe=({dismissKey:e,badge:t,icon:n,title:r,description:i,link:a})=>{let[o,s]=(0,V.useState)(()=>X6(`${Z8}${e}`)===`1`);return o||!r&&!i?null:(0,U.jsxs)(`div`,{className:`relative overflow-hidden rounded-lg bg-indigo-100 border border-indigo-200 p-4`,children:[(0,U.jsx)(`div`,{className:`absolute inset-0 announcement-banner-bg`}),(0,U.jsx)(`button`,{type:`button`,"aria-label":`Dismiss`,onClick:()=>{s(!0),Z6(`${Z8}${e}`,`1`,365)},className:`absolute top-2 right-2 flex items-center justify-center w-7 h-7 text-indigo-300 hover:text-indigo-400`,children:(0,U.jsx)(JE,{variant:`sm`,color:`#7C91FF`})}),(0,U.jsxs)(`div`,{className:`relative pr-8`,children:[(0,U.jsx)(`span`,{className:`inline-flex items-center rounded-full px-3 py-1 bg-indigo-200 border border-indigo-300 text-[10px] font-semibold tracking-wide text-indigo-600 uppercase`,children:t}),(0,U.jsxs)(`h3`,{className:`mt-2 text-base font-semibold text-black flex items-center gap-1.5`,children:[n,r]}),(0,U.jsxs)(`p`,{className:`mt-1 text-sm text-black-600`,children:[i,a?(0,U.jsxs)(U.Fragment,{children:[` `,(0,U.jsxs)(CA,{href:a.href,className:`font-medium underline text-indigo-400`,children:[a.label,` â`]})]}):null]})]})]})},Q8=ln(`auth-required`),HBe=[Fr(),Nr(),Lr(),Dr(),Ti()],$8=({children:e})=>{let t=B(Yo);return B(qo).id!==``&&!t?(Q8(`user not verified, redirecting to verify`),(0,U.jsx)(ae,{to:Ti(),replace:!0})):e?(0,U.jsx)(U.Fragment,{children:e}):(0,U.jsx)(se,{})},UBe=({children:e})=>{let t=B(Cs),n=B(ws);return t.id!==``&&!n?(Q8(`user has no payment method, redirecting to plans`),(0,U.jsx)(ae,{to:Di(),replace:!0})):e?(0,U.jsx)(U.Fragment,{children:e}):(0,U.jsx)(se,{})},e5=({children:e,redirectTo:t=Nr()})=>{let n=me(),r=l(),i=B(e=>L.loaders.selectById(e,{id:zS})),a=B(An);return(0,V.useLayoutEffect)(()=>{i.status===`success`&&a===``&&!HBe.includes(n.pathname)&&(Q8(`setting redirect path ${n.pathname}`),r(WS(n.pathname)))},[n.pathname,a,i.status,r]),a===``&&i.lastSuccess>0?(Q8(`user not authenticated, redirecting to login`),(0,U.jsx)(ae,{to:t,replace:!0})):a===``?(0,U.jsx)(`div`,{className:`flex h-screen w-screen items-center justify-center`,children:(0,U.jsx)(xE,{text:`Loading token`})}):e?(0,U.jsx)(U.Fragment,{children:e}):(0,U.jsx)(se,{})},WBe=({children:e})=>{let{blocked:t}=yE();return t?(Q8(`sso enforced but token is not sso-derived, redirecting`),(0,U.jsx)(ae,{to:Pee(),replace:!0})):e?(0,U.jsx)(U.Fragment,{children:e}):(0,U.jsx)(se,{})},GBe=({children:e})=>(0,U.jsx)(e5,{children:(0,U.jsx)($8,{children:(0,U.jsx)(UBe,{children:(0,U.jsx)(WBe,{children:e?(0,U.jsx)(U.Fragment,{children:e}):(0,U.jsx)(se,{})})})})}),t5=({children:e})=>{let t=me();return B(Bn)?(0,U.jsx)(`div`,{className:`w-full h-full`,children:e||(0,U.jsx)(se,{})}):(0,U.jsx)(ae,{to:eee(t.pathname),replace:!0})},n5=767;function KBe(){let[e,t]=(0,V.useState)(window.innerWidth);return(0,V.useLayoutEffect)(()=>{function e(){t(window.innerWidth)}return window.addEventListener(`resize`,e),e(),()=>window.removeEventListener(`resize`,e)},[]),e}function r5({children:e,header:t,className:n=``,padding:r=!0,mainWrapperDivClassName:i=``,forceCollapseBelow:a=n5,allowResponsiveToggle:o=!1}){let s=B(VU).collapsed,c=KBe(),l=c<=a,u=o&&l&&c>n5,[d,f]=(0,V.useState)(!1);(0,V.useLayoutEffect)(()=>{u||f(!1)},[u]);let p=l?!d:s,m=p?56:256,h=u?()=>f(e=>!e):void 0;return(0,U.jsxs)(`div`,{className:`flex h-full ${n}`,children:[(0,U.jsx)(`div`,{className:`flex flex-col fixed inset-y-0`,style:{width:m},children:(0,U.jsx)(ave,{collapsedOverride:l?p:void 0,disableToggle:l&&!u,onToggleCollapsed:h})}),(0,U.jsxs)(`div`,{className:(0,H.default)(`h-full w-full flex flex-col`,i),style:{marginLeft:m},children:[(0,U.jsx)(SBe,{}),(0,U.jsxs)(`main`,{className:`flex h-full flex-col ${r?`px-7 py-4`:``}`,children:[(0,U.jsxs)(W,{className:`flex-1`,children:[t||null,e||(0,U.jsx)(se,{})]}),(0,U.jsx)(jze,{})]})]})]})}function qBe({llmKey:e,isLoading:t}){let{currentUsage:{totalRequests:n,successfulRequests:r,failedRequests:i,spend:a,inputTokens:o,outputTokens:s,totalTokens:c}}=e;return(0,U.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,U.jsx)(J8,{isLoading:t,icon:(0,U.jsx)(`img`,{src:`/resource-types/logo-llm_key.png`,className:`w-[32px] h-[32px]`,"aria-label":`LLM Key`}),nameLabel:`LLM Key`,name:e.handle,id:e.id,createdAt:e.createdAt,costLabel:`Spend (MTD)`,cost:a}),(0,U.jsxs)(Y8,{columns:2,children:[(0,U.jsx)(X8,{title:`Total Requests`,isLoading:t,children:(0,U.jsx)(aA,{fluid:!0,text:(0,U.jsxs)(`div`,{className:`grid grid-cols-2 gap-1`,children:[(0,U.jsx)(`div`,{className:`font-semibold`,children:`Successful`}),(0,U.jsx)(`div`,{className:`text-right`,children:r.toLocaleStr
148ing()}),(0,U.jsx)(`div`,{className:`font-semibold`,children:`Failed`}),(0,U.jsx)(`div`,{className:`text-right`,children:i.toLocaleString()})]}),children:(0,U.jsx)(`span`,{className:`border-b border-dotted border-gray-400`,children:n.toLocaleString()})})}),(0,U.jsx)(X8,{title:`Status`,isLoading:t,children:(0,U.jsx)(H2,{variant:e.status===`ACTIVE`?`success`:`error`,children:e.status===`ACTIVE`?`Active`:`Revoked`})}),(0,U.jsx)(X8,{title:`Note`,isLoading:t,children:e.note?e.note:(0,U.jsx)(`span`,{className:`text-gray-500 italic`,children:`(No description)`})}),(0,U.jsx)(X8,{title:`Total Tokens`,isLoading:t,children:(0,U.jsx)(aA,{fluid:!0,text:(0,U.jsxs)(`div`,{className:`grid grid-cols-2 gap-1`,children:[(0,U.jsx)(`div`,{className:`font-semibold`,children:`Input`}),(0,U.jsx)(`div`,{className:`text-right`,children:o.toLocaleString()}),(0,U.jsx)(`div`,{className:`font-semibold`,children:`Output`}),(0,U.jsx)(`div`,{className:`text-right`,children:s.toLocaleString()})]}),children:(0,U.jsx)(`span`,{className:`border-b border-dotted border-gray-400`,children:c.toLocaleString()})})}),(0,U.jsx)(X8,{title:`Created By`,isLoading:t,children:(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`div`,{children:e.createdBy.name}),(0,U.jsx)(`div`,{className:`text-gray-500 text-sm`,children:e.createdBy.email})]})})]})]})}function JBe(){let{id:e=``}=F();JS({action:(0,V.useMemo)(()=>Ud({id:e}),[e]),cancel:(0,V.useMemo)(()=>Hd(),[])});let t=u(Yb({id:e})),n=B(t=>Wb(t,{id:e})),r=B(e=>tu(e,{id:n.environmentId})),i=Cr([t,u(du({id:n.environmentId}))]),a=[{name:r.handle,to:Va(r.id),label:`Environment`,crumbVariant:mU.UPPERCASE}],o=[{name:`Request Logs`,href:Ji(e)},{name:`Models`,href:zee(e)}];return(0,U.jsx)(U.Fragment,{children:(0,U.jsx)(CU,{...i,breadcrumbs:a,titleLabel:`LLM Key`,title:n.handle,detailsBox:(0,U.jsx)(qBe,{llmKey:n,isLoading:i.isLoading}),tabs:o,lastBreadcrumbTo:qi(n.id)})})}var YBe=()=>(0,U.jsx)(r5,{header:(0,U.jsx)(JBe,{}),mainWrapperDivClassName:`overflow-x-hidden`,children:(0,U.jsx)(se,{})}),XBe=r({getResourceStatId:()=>f5,selectAllResourcesAsList:()=>i5,selectResourceStatsAsList:()=>o5,selectResourceStatsById:()=>s5,selectResourcesByLastAccessed:()=>l5,selectResourcesByLastAccessedInCurrentOrg:()=>u5,selectResourcesByMostVisited:()=>d5,selectResourcesForSearch:()=>a5,setResourceStats:()=>p5,sortResourceStatsByLastAccessed:()=>c5}),i5=D(Vl,su,uf,mp,Jp,(e,t,n,r,i)=>{let a=[];return e.forEach(e=>{a.push({type:`stack`,id:e.id,data:e})}),t.forEach(e=>{a.push({type:`environment`,id:e.id,data:e})}),n.forEach(e=>{a.push({type:`app`,id:e.id,data:e})}),r.forEach(e=>{a.push({type:`database`,id:e.id,data:e})}
148),i.forEach(e=>{a.push({type:`endpoint`,id:e.id,data:e})}),a}),a5=D(i5,(e,t)=>t.search,(e,t)=>{let n=t.toLocaleLowerCase();return t===``?[]:e.filter(e=>{let t=!1;if(e.type===`stack`)t=e.data?.name.includes(n)||!1;else if(e.type===`endpoint`){let r=Am(e.data);t=r?r.includes(n):!1}else t=e.data?.handle.includes(n)||!1;let r=e.id===n,i=e.type===n;return t||r||i})}),o5=L.resourceStats.selectTableAsList,s5=L.resourceStats.selectById,c5=e=>[...e].sort((e,t)=>{let n=new Date(t.lastAccessed).getTime(),r=new Date(e.lastAccessed).getTime();return n===r?t.count-e.count:n-r}),l5=D(o5,c5),u5=D(o5,Vl,su,uf,mp,Jp,(e,t,n,r,i,a)=>{let o=new Set(t.map(e=>e.id)),s=new Set(n.map(e=>e.id)),c=new Set(r.map(e=>e.id)),l=new Set(i.map(e=>e.id)),u=new Set(a.map(e=>e.id));return c5(e.filter(e=>{switch(e.type){case`stack`:return o.has(e.id);case`environment`:return s.has(e.id);case`app`:return c.has(e.id);case`database`:return l.has(e.id);case`endpoint`:return u.has(e.id);default:return!1}}))}),d5=D(o5,e=>[...e].sort((e,t)=>{let n=new Date(t.lastAccessed).getTime(),r=new Date(e.lastAccessed).getTime();return t.count===e.count?n-r:t.count-e.count})),f5=e=>`${e.type}-${e.id}`,p5=qn.create(`add-recent-resource`,function*(e,t){let n=f5(e.payload),r=yield*p(e=>s5(e,{id:n})),i=new Date().toISOString();r?yield*L.update(L.resourceStats.patch({[n]:{count:r.count+1,lastAccessed:i,deletedAt:e.payload.deletedAt}})):yield*L.update(L.resourceStats.add({[n]:{...e.payload,count:1,lastAccessed:i,deletedAt:e.payload.deletedAt}})),yield*t()}),ZBe=e=>e===`succeeded`?`success`:e===`failed`||e===`canceled`?`error`:`progress`,QBe=e=>e===`succeeded`?`Success`:e===`failed`?`Fail`:e===`canceled`?`Canceled`:e.charAt(0).toUpperCase()+e.slice(1);function $Be({deployment:e}){let t=xl(e);return t===`image`?(0,U.jsx)(Q2,{image:e.dockerImage,digest:``}):t===`git`||t===`companion-repo`?(0,U.jsx)($2,{gitRef:e.gitRef,commitSha:e.gitCommitSha,commitUrl:e.gitCommitUrl}):(0,U.jsx)(`em`,{className:`text-black-500`,children:`No image or commit on record`})}function eVe({operationId:e}){let t=N();return(0,U.jsxs)(`div`,{className:`text-xs text-black-500`,children:[`Activity ID:`,` `,(0,U.jsx)(`button`,{type:`button`,className:`text-indigo hover:underline`,onClick:n=>{n.preventDefault(),n.stopPropagation(),t(po(e))},children:e})]})}function m5({deployment:e}){return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`div`,{className:`flex flex-col gap-1 flex-1`,children:[(0,U.jsx)($Be,{deployment:e}),(0,U.jsxs)(`div`,{className:`text-xs text-black-500`,children:[`Last deployed: `,Of(e.createdAt)]}),(0,U.jsx)(eVe,{operationId:e.operationId})]}),(0,U.jsx)(H2,{variant:ZBe(e.status),children:QBe(e.status)})]})}function h5({deployment:e,label:t}){return(0,U.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[t,(0,U.jsx)(`div`,{className:`border border-black-100 rounded-lg p-4 flex items-start gap-1 bg-white`,children:(0,U.jsx)(m5,{deployment:e})})]})}function tVe({deployment:e,isSelected:t,onSelect:n}){return(0,U.jsxs)(`label`,{className:(0,H.default)(`border rounded-lg p-4 flex items-start gap-3 bg-white cursor-pointer`,t?`border-indigo ring-1 ring-indigo`:`border-black-100`),children:[(0,U.jsx)(`input`,{type:`radio`,name:`rollback-target`,className:`mt-1`,value:e.id,checked:t,onChange:n}),(0,U.jsx)(m5,{deployment:e})]})}function nVe({isOpen:e,onClose:t,appName:n,currentDeployment:r,candidates:i,initialTargetId:a=``,renderEnvChanges:o}){let[s,c]=(0,V.useState)(`select`),[u,d]=(0,V.useState)(!0),[f,p]=(0,V.useState)(()=>i.find(e=>e.id===a)?.id??i[0]?.id??``),[m,h]=(0,V.useState)(()=>i.findIndex(e=>e.id===a)>0),g=l(),_=N(),v=m?i:i.slice(0,1),y=i.length-v.length,b=i.find(e=>e.id===f),x=b?Sl(b):null,S=x!==null,C=dg({appId:b?.appId??r.appId,target:x,configurationId:b?.configurationId??``,currentConfigurationId:r.configurationId,restoreEnv:u}),w=I(C);return T(w,()=>{t(),_(po(w.meta.opId))}),e?(0,U.jsx)(h3,{children:(0,U.jsxs)(kU,{isOpen:e,onClose:t,children:[(0,U.jsx)(AU,{title:`Rollback to previous deployment`,icon:(0,U.jsx)(sD,{variant:`sm`}),onClose:t}),(0,U.jsxs)(LA,{onSubmit:e=>
148{if(e.preventDefault(),S){if(s===`select`){c(`confirm`);return}g(C)}},children:[(0,U.jsxs)(MU,{className:`flex flex-col gap-6`,children:[(0,U.jsx)(TA,{...w}),(0,U.jsx)(q,{variant:`warning`,children:(0,U.jsx)(`ul`,{className:`list-disc pl-4 text-sm`,children:(0,U.jsx)(`li`,{children:`This only reverts app code and its configuration. Ensure dependencies are compatible.`})})}),s===`select`?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`p`,{className:`text-sm text-black`,children:[`Rollback `,(0,U.jsx)(`strong`,{className:`font-semibold`,children:n}),` `,`to a previous container image:`]}),(0,U.jsx)(h5,{deployment:r,label:(0,U.jsx)(D6,{variant:`default`,children:`Current`})}),i.length===0?(0,U.jsx)(q,{variant:`warning`,children:`This app has no earlier successful deployment to roll back to.`}):(0,U.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,U.jsx)(D6,{variant:`default`,children:`Choose a deployment to restore`}),(0,U.jsx)(`div`,{className:`flex flex-col gap-2`,children:v.map(e=>(0,U.jsx)(tVe,{deployment:e,isSelected:e.id===f,onSelect:()=>p(e.id)},e.id))}),y>0?(0,U.jsx)(`button`,{type:`button`,className:`text-left text-[11px] text-indigo hover:underline w-fit`,onClick:()=>h(!0),children:`See more`}):null,(0,U.jsx)(`div`,{className:`mt-2`,children:(0,U.jsx)(ZH,{checked:u,onChange:e=>d(e.currentTarget.checked),label:`Also restore environment variables from this deployment`,labelClassName:`ml-2`})}),u&&b&&o?(0,U.jsx)(`div`,{className:`mt-2`,children:o(b.configurationId)}):null]})]}):null,s===`confirm`&&b?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`p`,{className:`text-sm text-black`,children:[`Rolling back`,` `,(0,U.jsx)(`strong`,{className:`font-semibold`,children:n}),` will start a new deployment using this image. Prerelease commands and deploy hooks come from the selected image, so any migrations it defines will run again.`]}),(0,U.jsx)(h5,{deployment:b,label:(0,U.jsx)(D6,{variant:`success`,children:`Selected to restore`})})]}):null]}),(0,U.jsx)(jU,{actions:[s===`confirm`?(0,U.jsx)(K,{variant:`white`,onClick:()=>c(`select`),disabled:w.isLoading,children:`Back`},`back`):(0,U.jsx)(K,{variant:`white`,onClick:t,disabled:w.isLoading,children:`Cancel`},`cancel`),(0,U.jsx)(K,{type:`submit`,isLoading:w.isLoading,disabled:!S,children:s===`select`?`Continue`:`Rollback`},`submit`)]})]})]})}):null}function g5({value:e,emphasized:t}){return e===``?(0,U.jsx)(`span`,{className:`text-black-300`,children:`""`}):(0,U.jsx)(`span`,{className:`break-all ${t?`text-black`:`text-black-500`}`,children:e})}function rVe({group:e}){return(0,U.jsxs)(`div`,{className:`flex items-start gap-4 py-3 first:pt-0 last:pb-0`,children:[(0,U.jsx)(`div`,{className:`w-[76px] shrink-0`,children:(0,U.jsx)(H2,{variant:e.variant,children:e.label})}),(0,U.jsx)(`div`,{className:`flex flex-col gap-1 flex-1 min-w-0`,children:e.rows.map(({key:e,from:t,to:n})=>(0,U.jsxs)(`div`,{className:`font-mono text-xs flex items-baseline gap-2 flex-wrap`,children:[(0,U.jsxs)(`span`,{className:`font-semibold text-black`,children:[e,`:`]}),(0,U.jsx)(g5,{value:t,emphasized:!1}),(0,U.jsx)(`span`,{className:`text-black-300`,"aria-label":`becomes`,children:`â`}),(0,U.jsx)(g5,{value:n,emphasized:!0})]},e))})]})}function iVe(e,t){let{removed:n,changed:r,restored:i}=og(e,t),a=n=>({key:n,from:String(t[n]??``),to:String(e[n]??``)});return[{label:`Change`,variant:`progress`,rows:r.map(a)},{label:`Add`,variant:`success`,rows:i.map(a)},{label:`Remove`,variant:`error`,rows:n.map(a)}].filter(e=>e.rows.length>0)}function aVe({targetConfigurationId:e,currentConfigurationId:t}){let[n,r]=(0,V.useState)(!1),i=ug({id:e,withSensitiveExtras:!0}),a=ug({id:t,withSensitiveExtras:!0}),o=u(i),s=u(a),c=B(t=>sg(t,{id:e})),l=B(e=>sg(e,{id:t}));if(o.isLoading||s.isLoading)return(0,U.jsxs)(`div`,{className:`flex items-center gap-2 text-sm text-black-500`,children:[(0,U.jsx)(SE,{}),` Checking which environment variables would changeâ¦`]});if(o.isError||s.isError)return(0,U.jsx)(q,{variant:`warning`,children:`Couldn't load the environment variables for these deployments, so the list of changes can't be shown. Restoring will still replace the app's current variables with the ones from the selected deployment.`});let d=iVe(c.env,l.env);if(d.length===0)return(0,U.jsx)(`p`,{className:`text-sm text-black-500`,children:`No environment variables would change.`});let f=d.reduce((e,t)=>
148e+t.rows.length,0);return(0,U.jsxs)(`div`,{className:`border border-black-100 rounded-lg bg-white p-4`,children:[(0,U.jsxs)(`div`,{className:`flex items-center justify-between gap-4`,children:[(0,U.jsxs)(`p`,{className:`text-sm text-black`,children:[f,` Environment Variable`,f===1?``:`s`,` will be impacted`]}),(0,U.jsxs)(K,{variant:`white`,size:`xs`,onClick:()=>r(!n),children:[n?(0,U.jsx)(yD,{variant:`sm`,className:`mr-1`}):(0,U.jsx)(vD,{variant:`sm`,className:`mr-1`}),n?`Hide values`:`Show values`]})]}),n?(0,U.jsx)(`div`,{className:`flex flex-col divide-y divide-black-100 border-t border-black-100 mt-4 pt-4`,children:d.map(e=>(0,U.jsx)(rVe,{group:e},e.label))}):null]})}var oVe=3;function sVe(e,t){let n=new Set;return e.filter(e=>{let r=`${e.imageId}:${e.configurationId}`;return e.id===t||e.status!==`succeeded`||e.imageId===``||n.has(r)?!1:(n.add(r),!0)})}function cVe({app:e}){let[t,n]=(0,V.useState)(!1),r=Tl({id:e.id});u(r);let i=B(t=>yl(t,{appId:e.id})),a=B(t=>gl(t,{id:e.currentDeploymentId})),o=Er([r]),s=!o.isLoading&&!o.isInitialLoading&&a.id!==``,c=sVe(i,e.currentDeploymentId).slice(0,oVe);return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(vA,{envId:e.environmentId,variant:`white`,size:`sm`,disabled:!s,onClick:()=>n(!0),children:[(0,U.jsx)(sD,{variant:`sm`,className:`mr-1`}),`Rollback`]}),t?(0,U.jsx)(nVe,{isOpen:!0,onClose:()=>n(!1),appName:e.handle,currentDeployment:a,candidates:c,renderEnvChanges:e=>(0,U.jsx)(aVe,{targetConfigurationId:e,currentConfigurationId:a.configurationId})}):null]})}function lVe({status:e}){let t=e===`succeeded`?(0,U.jsx)(HE,{variant:`sm`}):e===`failed`||e===`canceled`?(0,U.jsx)(JE,{variant:`sm`}):null;return(0,U.jsx)(H2,{variant:E4(e),icon:t,children:Qd(e)})}function _5({label:e,children:t}){return(0,U.jsxs)(`div`,{className:`flex flex-col gap-0.5`,children:[(0,U.jsx)(G8,{as:`h4`,label:e}),(0,U.jsx)(`div`,{className:`${G.type[`detail value`]} break-words`,children:t})]})}var uVe={"git-based":`Git Push`,"image-based":`Direct Docker Image`,"companion-repo":`Companion Repo`,unknown:`Unknown`};function dVe({app:e}){let t=wl({id:e.currentDeploymentId});u(t);let n=B(t=>gl(t,{id:e.currentDeploymentId})),r=B(t=>mf(t,{id:e.id})),i=Xv({id:n.imageId});u(i);let a=B(e=>Zv(e,{id:n.imageId})),o=jl({id:n.sourceId});u(o);let s=B(e=>Dl(e,{id:n.sourceId})),c=Er([t,i,o]);if(c.isLoading||c.isInitialLoading||n.id===``||n.imageId!==``&&a.id===``||n.sourceId!==``&&s.id===``)return(0,U.jsx)(Z,{size:`md`,className:`flex items-center justify-center py-8`,children:(0,U.jsx)(SE,{})});let l=uVe[r];return(0,U.jsxs)(Z,{size:`md`,className:`flex flex-col gap-4`,children:[(0,U.jsxs)(`div`,{className:`flex items-center justify-between flex-wrap gap-2`,children:[(0,U.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,U.jsx)(`h3`,{className:`text-base font-semibold text-gray-900`,children:`Last Deployment`}),(0,U.jsx)(P,{to:po(n.operationId),className:`text-sm text-indigo hover:underline`,children:`View Operation`})]}),(0,U.jsx)(P,{to:oa(e.id),className:`text-sm text-indigo hover:underline`,children:`See all activity for this app â`})]}),(0,U.jsx)(`hr`,{className:`border-black-100`}),(0,U.jsxs)(`div`,{className:`flex items-start gap-4`,children:[(0,U.jsxs)(`div`,{className:`grid grid-cols-1 lg:grid-cols-2 gap-4 flex-1 min-w-0`,children:[(0,U.jsx)(_5,{label:`ID`,children:n.id}),(0,U.jsx)(_5,{label:`Deployment Type`,children:l}),(0,U.jsx)(_5,{label:`Git Ref`,children:(0,U.jsx)($2,{gitRef:n.gitRef,commitSha:n.gitCommitSha,commitUrl:n.gitCommitUrl})}),(0,U.jsx)(_5,{label:`Status`,children:(0,U.jsx)(lVe,{status:n.status})}),(0,U.jsx)(_5,{label:`Docker Image`,children:(0,U.jsx)(Q2,{image:n.dockerImage,digest:a.dockerRef,repoUrl:n.dockerRepositoryUrl})}),(0,U.jsx)(_5,{label:`Timestamp`,children:(0,U.jsx)(t4,{at:n.createdAt})}),(0,U.jsx)(_5,{label:`Commit Message`,children:(0,U.jsx)(e4,{message:n.gitCommitMessage})}),(0,U.jsx)(_5,{label:`Source`,children:(0,U.jsx)(P,{to:Lo(s.id),children:s.displayName})})]}),(0,U.jsx)(cVe,{app:e})]})]})}function fVe({app:e,isLoading:t}){let n=e.id!==``&&!e.deletedAt&&!e.currentDeploymentId,r=Qa(e.id),i=B($o);u(tb({orgId:i}));let{isLoading:a}=I(tb),o=B(t=>L.costs.selectById(t,{id:Ky(`App`,e.id)}));return(0,U.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[!!e.deletedAt&&(0,U.jsxs)(q,{className:`mt-2 mb-4`,variant:`warning`,children:[`This app w
148as deprovisioned on `,Of(e.deletedAt),`.`]}),n?(0,U.jsx)(q,{variant:`warning`,className:`mb-4`,children:(0,U.jsxs)(`span`,{className:G.type.darker,children:[`This app hasn't been deployed yet.`,` `,(0,U.jsx)(P,{to:r,className:`underline`,children:`Resume deployment`})]})}):null,(0,U.jsx)(J8,{isLoading:t,icon:(0,U.jsx)(`img`,{src:`/resource-types/logo-app.png`,className:`w-[32px] h-[32px]`,"aria-label":`App`}),nameLabel:`App`,name:e.handle,id:e.id,createdAt:e.createdAt,cost:a||o.id===``?null:o.estCost,costTooltip:gU}),e.currentDeploymentId?(0,U.jsx)(dVe,{app:e}):null]})}var pVe=({id:e})=>(JS({action:(0,V.useMemo)(()=>Md({id:e}),[e]),cancel:(0,V.useMemo)(()=>jd(),[])}),(0,U.jsx)(N6,{resourceId:e,resourceType:`app`}));function mVe(){let{id:e=``}=F(),t=l(),n=u(_f({id:e,withDeleted:!0,waitForBootup:!0})),r=u(Bu({id:e,withDeleted:!0,waitForBootup:!0})),i=B(t=>rf(t,{id:e})),a=B(e=>tu(e,{id:i.environmentId})),o=u(nm({appId:e})),s=B(t=>Hu(t,{appId:e})),c=B(t=>Wp(t,{appId:e})),d=Cr([n,r,o]);(0,V.useEffect)(()=>{t(p5({id:e,type:`app`,deletedAt:i?.deletedAt}))},[i?.deletedAt]);let f=[];a.id?f.push({name:a.handle,to:Pa(a.id),label:`Environment`,crumbVariant:mU.UPPERCASE}):f.push({name:`Unknown Environment`,to:`#`,label:`Environment`,crumbVariant:mU.UPPERCASE});let p=B(e=>O_(e,{envId:i.environmentId,scope:`read`})),m=[];return i.deletedAt||m.push({name:`Deployments`,href:ua(e)},{name:`Services`,href:$i(e),count:d.isInitialLoading?null:s.length},{name:`Endpoints`,href:sa(e),count:d.isInitialLoading?null:c.length},{name:`Disk Storage`,href:Zee(e)}),m.push({name:`Activity`,href:oa(e)}),i.deletedAt||(m.push({name:`Configuration`,href:Gee(e)}),p&&m.push({name:`Dependencies`,href:ste(e)}),m.push({name:`CI/CD`,href:ca(e)},{name:`Settings`,href:rte(e)})),(0,U.jsxs)(U.Fragment,{children:[i.id&&!i.deletedAt?(0,U.jsx)(pVe,{id:e}):null,(0,U.jsx)(CU,{...d,breadcrumbs:f,titleLabel:`App`,title:i.handle,detailsBox:(0,U.jsx)(fVe,{app:i,isLoading:d.isLoading}),tabs:m,lastBreadcrumbTo:Qi(i.id)})]})}var hVe=()=>(0,U.jsx)(r5,{header:(0,U.jsx)(mVe,{}),mainWrapperDivClassName:`overflow-x-hidden`,children:(0,U.jsx)(se,{})}),gVe=({database:e})=>{let t=B(t=>ph(t,{id:e.databaseImageId}));if(!t.eolAt)return null;let n=new Date(t.eolAt),r=new Date;n.setDate(n.getDate()+90);let i=`Active maintenance for the ${t.description} database version will end on ${Df(n.toISOString())}.`,a=`The ${t.description} database version is deprecated and no longer maintained.`;return(0,U.jsx)(q,{variant:`info`,children:(0,U.jsxs)(`p`,{children:[(0,U.jsx)(`b`,{children:n>r?i:a}),` We recommend upgrading to a`,` `,(0,U.jsx)(CA,{href:`https://www.aptible.com/docs/core-concepts/managed-databases/supported-databases/overview`,children:`newer version for continued support.`}),` `,`Refer to the`,` `,(0,U.jsx)(CA,{href:`https://www.aptible.com/changelog/database-end-of-life-policy-updates`,children:`changelog`}),` `,`for more details.`]})})};function _Ve({database:e,databasePrimary:t,service:n,isLoading:r}){u(im({id:e.serviceId})),u(Mv({id:e.id})),u(J_({id:n.currentReleaseId})),u(zv({envId:e.environmentId}));let i=Cu([n]);u(ey({id:e.diskId}));let a=B(t=>ty(t,{id:e.diskId}));u(vh());let o=B(t=>ph(t,{id:e.databaseImageId})),s=fh(o)&&!o.pitrSupported?e.type===`postgresql`?`Version unsupported`:`Database unsupported`:`Disabled`,c=B($o);u(nb({orgId:c}));let{isLoading:l}=I(nb),d=B(t=>L.costs.selectById(t,{id:Ky(`Database`,e.id)}));return(0,U.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[!!e.deletedAt&&(0,U.jsxs)(q,{className:`mt-2 mb-4`,variant:`warning`,children:[`This database was deprovisioned on`,` `,Of(e.deletedAt),`.`]}),(0,U.jsx)(J8,{isLoading:r,icon:e.type===``?(0,U.jsx)(SE,{}):(0,U.jsx)(`img`,{src:`/database-types/logo-${e.type}.png`,className:`w-[32px] h-[32px]`,"aria-label":`${e.type} Database`}),name:e.handle,id:e.id,createdAt:e.createdAt,cost:l||d.id===``?null:d.estCost,costTooltip:gU}),!e.deletedAt&&(0,U.jsxs)(Y8,{columns:2,children:[(0,U.jsx)(X8,{title:`Database Type`,isLoading:o.id===``,children:o.description}),(0,U.jsx)(X8,{title:`Profile`,isLoading:n.id===``,children:Pl[n.instanceClass]?.name}),(0,U.jsx)(X8,{title:`Disk Size`,isLoading:a.id===``,children:`${a.size} GB`}),(0,U.jsx)(X8,{title:`Memory Limit`,isLoading:n.id===``,children:`${i.totalMemoryLimit/1024} GB`}),(0,U.jsx)(X8,{title:`Disk Type`,isLoading:a.id===``,children:a.ebsVolumeType}
148),(0,U.jsx)(X8,{title:`CPU Share`,isLoading:n.id===``,children:i.totalCPU}),(0,U.jsx)(X8,{title:`Disk IOPS`,isLoading:a.id===``,children:a.provisionedIops}),(0,U.jsx)(X8,{title:`Point-in-Time Recovery`,children:e.id===``?(0,U.jsx)(SE,{}):e.enablePitr?(0,U.jsx)(O6,{enabled:!0}):(0,U.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,U.jsx)(Z4,{className:fh(o)&&!o.pitrSupported?`text-gray-500`:`text-red`,icon:(0,U.jsx)(JE,{variant:`sm`,color:`currentColor`}),children:s}),(0,U.jsx)(A4,{database:e,image:o,trigger:(0,U.jsx)(tD,{className:`inline-block opacity-50 hover:opacity-100`,variant:`sm`})})]})}),(0,U.jsx)(X8,{title:`Disk Encryption`,isLoading:a.id===``,children:`AES-${a.keyBytes*8}`}),(0,U.jsx)(X8,{title:`Container Efficiency`,isLoading:n.id===``,children:(0,U.jsx)(g4,{service:n})}),t.id&&(0,U.jsx)(X8,{title:`Replicates`,children:(0,U.jsx)(P,{to:ga(t.id),className:`flex`,children:t.handle})})]})]})}var vVe=({id:e})=>(JS({action:(0,V.useMemo)(()=>Fd({id:e}),[e]),cancel:(0,V.useMemo)(()=>Pd(),[])}),(0,U.jsx)(N6,{resourceId:e,resourceType:`database`}));function yVe(){let{id:e=``}=F(),t=l(),n=B(t=>lp(t,{id:e})),r=B(e=>lp(e,{id:n.initializeFrom})),i=B(e=>Eu(e,{id:n.serviceId})),a=B(e=>tu(e,{id:n.environmentId})),o=Cr([u(bp({id:e,withDeleted:!0,waitForBootup:!0})),u(Lu({id:n.serviceId})),u(im({id:n.serviceId}))]),s=B(e=>Gp(e,{serviceId:n.serviceId}));u(yh({id:n.databaseImageId}));let c=B(e=>ph(e,{id:n.databaseImageId}));(0,V.useEffect)(()=>{t(p5({id:e,type:`database`,deletedAt:n?.deletedAt}))},[n?.deletedAt]);let d=[];a.id?d.push({name:a.handle,to:Fa(a.id),label:`Environment`,crumbVariant:mU.UPPERCASE}):d.push({name:`Unknown Environment`,to:`#`,label:`Environment`,crumbVariant:mU.UPPERCASE});let f=[];return n.deletedAt||f.push({name:`Metrics`,href:ba(e)},{name:`Scale`,href:xa(e)},{name:`Endpoints`,href:_a(e),count:o.isInitialLoading?null:s.length}),f.push({name:`Activity`,href:va(e)},{name:`Backups`,href:ya(e),enabled:n.enableBackups}),n.deletedAt||(f.push({name:`Cluster`,href:vte(e)},{name:`Connection URLs`,href:Sa(e)}),c.pitrSupported&&n.enablePitr&&f.push({name:`Recovery`,href:Dte(e)}),f.push({name:`Settings`,href:Ste(e)})),(0,U.jsxs)(U.Fragment,{children:[!n.deletedAt&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(vVe,{id:e}),(0,U.jsx)(gVe,{database:n}),n.pitrStatus===`pending_restart`&&(0,U.jsx)(q,{variant:`warning`,showIcon:!0,children:`This database needs to be restarted to support Point-in-time recovery. Once restarted, PITR will be automatically enabled.`})]}),(0,U.jsx)(CU,{...o,breadcrumbs:d,titleLabel:`Database`,title:n?n.handle:`Loading...`,detailsBox:(0,U.jsx)(_Ve,{database:n,databasePrimary:r,service:i,isLoading:o.isLoading}),tabs:f,lastBreadcrumbTo:ga(n.id)})]})}var bVe=()=>(0,U.jsx)(r5,{header:(0,U.jsx)(yVe,{}),mainWrapperDivClassName:`overflow-x-hidden`,children:(0,U.jsx)(se,{})});function xVe({environment:e,isLoading:t,cost:n}){return(0,U.jsx)(`div`,{className:`flex flex-col gap-4`,children:(0,U.jsx)(J8,{isLoading:t,icon:(0,U.jsx)(`img`,{src:`/resource-types/logo-environment.png`,className:`w-[32px] h-[32px]`,"aria-label":`Environment`}),nameLabel:`Environment`,name:e.handle,id:e.id,createdAt:e.createdAt,cost:n,costTooltip:gU})})}var SVe=({id:e})=>(JS({action:(0,V.useMemo)(()=>kd({envId:e}),[e]),cancel:(0,V.useMemo)(()=>Od(),[])}),(0,U.jsx)(N6,{resourceId:e,resourceType:`environment`}));function CVe({id:e}){let t=l();(0,V.useEffect)(()=>{t(p5({id:e,type:`environment`}))},[]);let n=rm({id:e}),r=u(du({id:e})),i=u(hf()),a=u(yp()),o=u(rh({id:e})),s=u(Eh({id:e})),c=u(n);u(Td({id:e,page:1,...bd}));let d=(0,V.useMemo)(()=>Cr([r,i,a,o,s,c]),[r,i,a,o,s,c]),f=B(t=>cb(t,{id:e})),{isLoading:p}=I(eb),m=B(t=>tu(t,{id:e})),h=B(e=>zl(e,{id:m.stackId})),g=B(e=>qp(e,{envId:m.id})),_=B(t=>cf(t,{envId:e})),v=B(t=>gp(t,{envId:e})),y=B(t=>$m(t,{envId:e})),b=B(t=>Th(t,{envId:e})),x=[{name:h.name,to:Co(h.id),label:`Stack`,crumbVariant:mU.UPPERCASE}],S=[{name:`Apps`,href:`/environments/${e}/apps`,count:d.isInitialLoading?null:_.length},{name:`Databases`,href:`/environments/${e}/databases`,count:d.isInitialLoading?null:v.length},{name:`Integrations`,href:`/environments/${e}/integrations`,count:d.isInitialLoading?null:y.length+b.length},{name:`Endpoints`,href:`/environments/${e}/endpoints`,count:d.isInitialLoading?null:g.length},{name:`Certificates`,href:`/environments/${e}/certificates`},{name:`Activity`,href:`/environments/${e}/activity`},{name:`Backups`,href:`/environments/${e}/backups`},{name:`Disk Storage`,href:qte(e)},{name:`LLM Gateway`,href:`/environments/${e}/llm-keys`,badge:{variant:`beta`,feature:`llm-keys`}},{name:`Settings`,href:`/environments/${e}/settings`}];return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(SVe,{id:e}),(0,U.jsx)(CU,{...d,breadcrumbs:x,detailsBox:(0,U.jsx)(xVe,{isLoading:d.isLoading,environment:m,cost:p?null:f}),titleLabel:`Environment`,title:m.handle,tabs:S,lastBreadcrumbTo:Na(m.id)})]})}var v5=({children:e})=>{let{id:t=``}=F(),[n]=Ee(),r=t||n.get(`environment_id`)||``;return(0,U.jsx)(r5,{header:(0,U.jsx)(CVe,{id:r}),mainWrapperDivClassName:`overflow-x-hidden`,children:e||(0,U.jsx)(se,{})})},y5=({children:e,className:t=``})=>{let n=`h-full bg-no-repeat bg-center bg-cover hero-bg ${t}`;return(0,U.jsx)(`div`,{className:n,children:e})},b5=({showLogo:e=!0,showOrgPicker:t=!1,children:n,width:r=500})=>(0,U.jsx)(y5,{children:(0,U.jsx)(`main`,{className:`flex-1`,children:(0,U.jsx)(`div`,{className:e?`py-16`:`py-10`,children:(0,U.jsx)(`div`,{className:`max-w-7xl mx-auto px-4 sm:px-6 md:px-8`,children:(0,U.jsx)(`div`,{className:e?`py-4`:`py-0`,children:(0,U.jsx)(`div`,{className:`flex justify-center container mx-auto`,children:(0,U.jsxs)(`div`,{style:{width:r},children:[e?(0,U.jsxs)(`div`,{className:`flex flex-col items-center mb-5`,children:[(0,U.jsx)(BU,{width:160}),t?(0,U.jsx)(`div`,{className:`w-[260px] mt-4`,children:(0,U.jsx)(A6,{})}):null]}):null,(0,U.jsx)(`div`,{className:e?`mt-16`:`mt-0`,children:n||(0,U.jsx)(se,{})})]})})})})})})});function x5({error:e}){let t=typeof e==`string`?e:e.message;return(0,U.jsx)(b5,{children:(0,U.jsx)(`div`,{className:`mt-8 sm:mx-auto sm:w-full sm:max-w-md h-screen`,children:(0,U.jsxs)(`div`,{className:`bg-white py-8 px-10 shadow rounded-lg`,children:[(0,U.jsxs)(`h1`,{className:`text-lg font-semibold text-red mb-`,children:[(0,U.jsx)(ZE,{className:`inline -mt-1 mr-2`,color:`#AD1A1A`,style:{width:21,height:21}}),`Something's gone wrong`]}),(0,U.jsx)(`p`,{className:`my-5`,children:t}),(0,U.jsx)(`hr`,{}),(0,U.jsxs)(`div`,{className:`flex mt-4 -mb-6`,children:[(0,U.jsx)(K,{className:`w-40 mb-4 flex`,onClick:()=>{history.back()},children:(0,U.jsx)(`span`,{className:`text-sm`,children:`Back`})}),(0,U.jsx)(K,{className:`w-40 ml-4 mb-4 flex`,onClick:()=>{location.href=`/login`},variant:`white`,children:(0,U.jsx)(`span`,{className:`text-sm`,children:`Login`})})]})]})})})}var wVe=({children:e})=>(0,U.jsx)(te,{fallback:({error:e})=>(0,U.jsx)(x5,{error:e}),children:e}),TVe=()=>{let e=Oe(),t=e instanceof Error?e:e.toString();return e&&ie(e),(0,U.jsx)(`div`,{children:(0,U.jsx)(x5,{error:t})})};function EVe({op:e,resourceHandle:t,isLoading:n}){let r=$d(e);return(0,U.jsxs)(wU,{children:[(0,U.jsx)(TU,{title:`Operation Details`,isLoading:n,icon:(0,U.jsx)(`img`,{src:`/resource-types/logo-activity.png`,className:`w-[32px] h-[32px] mr-3`,"aria-label":`Operation`})}),(0,U.jsxs)(EU,{children:[(0,U.jsx)(DU,{title:`Type`,children:(0,U.jsxs)(W,{variant:`horizontal`,size:`xs`,className:`items-center`,children:[cl(e.type),(0,U.jsx)(w6,{op:e})]})}),(0,U.jsx)(DU,{title:`Created`,children:Of(e.createdAt)}),(0,U.jsx)(DU,{title:`Status`,children:(0,U.jsx)(D4,{status:e.status})}),(0,U.jsx)(DU,{title:`Last Updated`,children:Of(e.updatedAt)}),(0,U.jsxs)(DU,{title:`Resource`,children:[r?(0,U.jsx)(P,{to:r,children:t}):t,(0,U.jsx)(`div`,{className:`text-gray-500`,children:Gu(e.resourceType)})]}),(0,U.jsxs)(DU,{title:`User`,children:[e.userName,(0,U.jsxs)(`div`,{className:`text-gray-500`,children:[`Note: `,e.note||`N/A`]})]})]})]})}function DVe(){let{id:e=``}=F(),t=B(t=>Ju(t,{id:e})),n=B(e=>H_(e,{id:t.id})),r=u(Gd({id:e})),i=Cr([r,I(Jd({id:t.id}))]);return(0,U.jsx)(CU,{...r,breadcrumbs:[],titleLabel:`Operation`,title:`Operation: ${t.id}`,lastBreadcrumbTo:po(t.id),detailsBox:(0,U.jsx)(EVe,{op:t,resourceHandle:n,isLoading:i.isLoading})})}var OVe=()=>(0,U.jsx)(r5,{header:(0,U.jsx)(DVe,{}),children:(0,U.jsx)(se,{})}),S5=({children:e})=>{let t=B($o),n=B(e=>__(e,{orgId:t}));return!B(e=>L.loaders.selectById(e,{id:`fetch-required-data`})).isLoading&&!n?(0,U.jsx)(ae,{to:Dr()}):e||(0,U.jsx)(se,{})},C5=({children:e})=>{let t=B($o),n=B(e=>v_(e,{orgId:t}));return!B(e=>L.loaders.selectById(e,{id:`fetch-required-data`})).isLoading&&!n?(0,U.jsx)(ae,{to:Dr()}):e||(0,U.jsx)(se,{})},w5=({children:e})=>{let t=B(z_);return B(e=>L.loaders.selectById(e,{id:`${BS}`})).isSuccess?t?e||(0,U.jsx)(se,{}):(0,U.jsx)(ae,{to:Dr()}):(0,U.jsx)(`div`,{className:`flex w-full h-full items-center justify-center`,children:(0,U.jsx)(xE,{})})};function kVe({stack:e,isLoading:t,cost:n}){let r=Gl(e);return(0,U.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,U.jsx)(J8,{isLoading:t,icon:(0,U.jsx)(`img`,{alt:`Stack icon`,src:F6(r)}),nameLabel:`Stack`,name:e.name,id:e.id,createdAt:e.createdAt,cost:n,costTooltip:gU}),(0,U.jsxs)(Y8,{columns:2,children:[(0,U.jsx)(X8,{title:`Tenancy`,children:(0,U.jsx)(aA,{text:r===`shared`?`For non-production use only. Does not support compliance frameworks or Aptible's SLA.`:`For production workloads. Supports HIPAA and other compliance frameworks, includes VPN and VPC Peering.`,children:(0,U.jsx)(`span`,{className:`border-b border-dotted border-gray-400 cursor-default`,children:Ql(e)})})}),r===`shared`?null:(0,U.jsx)(X8,{title:`Network CIDR`,titleTooltip:`The internal network range (CIDR block) for this stack's VPC. Use this when configuring VPC peering, route tables, and security groups.`,children:e.vpcCidr?(0,U.jsx)(z2,{text:e.vpcCidr}):`Not available`}),(0,U.jsx)(X8,{title:`Region`,children:e.region}),(0,U.jsx)(X8,{title:`Outbound IP Addresses`,titleTooltip:`When sharing outbound IP addresses with vendors/partners for whitelisting, make sure to add all the provided IP addresses to the whitelist.`,children:(0,U.jsx)(z2,{text:e.outboundIpAddresses.join(`, `)})})]})]})}function AVe(){let{id:e=``}=F(),t=l();
148(0,V.useEffect)(()=>{t(p5({id:e,type:`stack`}))},[]);let n=Cr([u(Yl({id:e})),u(fu())]),r=B(t=>zl(t,{id:e})),i=B(t=>hu(t,{stackId:e})),a=[],o=Gl(r),s=[{name:`Environments`,href:Co(e),count:n.isInitialLoading?null:i.length}];o!==`shared`&&s.push({name:`VPN Tunnels`,href:One(e)},{name:`VPC Peering`,href:wo(e)}),s.push({name:`Settings`,href:Nne(e)});let c=B(t=>lb(t,{id:e})),{isLoading:d}=I($y);return r.exposeIntrusionDetectionReports&&s.push({name:`Managed HIDS`,href:jne(e)}),(0,U.jsx)(CU,{...n,breadcrumbs:a,titleLabel:`Stack`,title:r.name,detailsBox:(0,U.jsx)(kVe,{stack:r,isLoading:n.isLoading,cost:d?null:c}),tabs:s,lastBreadcrumbTo:So(r.id)})}var jVe=()=>(0,U.jsx)(r5,{header:(0,U.jsx)(AVe,{}),children:(0,U.jsx)(se,{})});function MVe({enp:e,app:t,service:n,isLoading:r}){let i=Mm(e),a=Dm(e,B(e=>Zv(e,{id:t.currentImageId})).exposedPorts),o=ap({rates:B(L.costRates.select),endpoints:[{shared:e.shared}]});return(0,U.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[!!e.deletedAt&&(0,U.jsxs)(q,{className:`mt-2 mb-4`,variant:`warning`,children:[`This endpoint was deprovisioned on `,Of(e.deletedAt),`.`]}),(0,U.jsx)(J8,{isLoading:r,icon:(0,U.jsx)(`img`,{src:`/resource-types/logo-vhost.png`,className:`w-[32px] h-[32px]`,"aria-label":`Endpoint`}),nameLabel:`Hostname`,name:i.hostname,nameCopyText:i.hostname,id:e.id,url:(0,U.jsxs)(`div`,{className:`flex flex-row items-center gap-2 min-w-0`,children:[(0,U.jsx)(`div`,{className:`min-w-0 break-words`,children:(0,U.jsx)(t3,{enp:e})}),(0,U.jsx)(B2,{text:i.url,className:`shrink-0`})]}),dateLabel:`Provisioned`,createdAt:e.createdAt,cost:o,costTooltip:gU}),(0,U.jsxs)(Y8,{columns:2,children:[(0,U.jsx)(X8,{title:`Type`,children:(0,U.jsx)(YU,{children:e.type})}),(0,U.jsx)(X8,{title:`Placement`,children:i.placement}),(0,U.jsx)(X8,{title:`Service Process`,children:(0,U.jsx)(YU,{children:n.processType})}),wm(e)?(0,U.jsx)(X8,{title:`Ports`,children:a}):(0,U.jsx)(X8,{title:`Port`,children:a}),(0,U.jsx)(X8,{title:`Service ID`,children:(0,U.jsx)(z2,{text:n.id})}),(0,U.jsx)(X8,{title:`Using Header Auth`,children:i.token_header}),(0,U.jsx)(X8,{title:`Resource`,children:(0,U.jsx)(P,{to:sa(t.id),children:t.handle})}),(0,U.jsx)(X8,{title:`Status`,children:(0,U.jsx)($4,{status:e.deletedAt?`deprovisioned`:e.status})}),(0,U.jsx)(X8,{title:`Shared`,children:(0,U.jsx)(Q4,{enp:e})}),(0,U.jsx)(X8,{title:`IP Allowlist`,children:i.ipAllowlist})]})]})}function NVe({enp:e,db:t,isLoading:n}){let r=Mm(e),i=ap({rates:B(L.costRates.select),endpoints:[{shared:e.shared}]});return(0,U.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[!!e.deletedAt&&(0,U.jsxs)(q,{className:`mt-2 mb-4`,variant:`warning`,children:[`This endpoint was deprovisioned on `,Of(e.deletedAt),`.`]}),(0,U.jsx)(J8,{isLoading:n,icon:(0,U.jsx)(`img`,{src:`/resource-types/logo-vhost.png`,className:`w-[32px] h-[32px]`,"aria-label":`Endpoint`}),nameLabel:`Hostname`,name:r.hostname,nameCopyText:r.hostname,id:e.id,url:(0,U.jsxs)(`div`,{className:`flex flex-row items-center gap-2 min-w-0`,children:[(0,U.jsx)(`div`,{className:`min-w-0 break-words`,children:(0,U.jsx)(t3,{enp:e})}),(0,U.jsx)(B2,{text:Am(e),className:`shrink-0`})]}),dateLabel:`Provisioned`,createdAt:e.createdAt,cost:i,costTooltip:gU}),(0,U.jsxs)(Y8,{columns:2,children:[(0,U.jsx)(X8,{title:`Status`,children:(0,U.jsx)($4,{status:e.deletedAt?`deprovisioned`:e.status})}),(0,U.jsx)(X8,{title:`Resource`,children:(0,U.jsx)(P,{to:_a(t.id),children:t.handle})}),(0,U.jsx)(X8,{title:`IP Allowlist`,children:r.ipAllowlist}),(0,U.jsx)(X8,{title:`Placement`,children:r.placement})]})]})}function PVe({enp:e,service:t,isError:n,message:r,meta:i,isLoading:a}){u(_f({id:t.appId}));let o=B(e=>rf(e,{id:t.appId}));u(Xv({id:o.currentImageId}));let s=$i(o.id),c=[{name:`Activity`,href:Ta(e.id)}];e.deletedAt||c.push({name:`Settings`,href:Oa(e.id)}),e.acme&&e.status===`provisioned`&&c.push({name:`DNS Configuration`,href:Ea(e.id)});let l=[];return o.id?l.push({name:o.handle,to:s,label:`App`,crumbVariant:mU.UPPERCASE}):l.push({name:`Unknown App`,to:`#`,label:`App`,crumbVariant:mU.UPPERCASE}),(0,U.jsxs)(U.Fragment,{children:[vm(e)?(0,U.jsxs)(q,{variant:`warning`,className:`mb-4`,children:[`Further steps required to setup custom domain!`,` `,(0,U.jsx)(P,{to:Ea(e.id),className:`underline`,children:`Finish setup`})]}):null,(0,U.jsx)(CU,{isError:n,message:r,meta:i,tabs:c,breadcrumbs:l,titleLabel:`Endpoint`,title:`ID: ${e.id}`,lastBreadcrumbTo:wa(e.id),detailsBox:(0,U.jsx)(MVe,{enp:e,app:o,service:t,isLoading:a})})]})}function FVe({enp:e,service:t,isError:n,message:r,meta:i,isLoading:a}){u(bp({id:t.databaseId}));let o=B(e=>lp(e,{id:t.databaseId})),s=ga(o.id),c=[{name:`Activity`,href:Ta(e.id)}];e.deletedAt||c.push({name:`Connection URL`,href:Ite(e.id)},{name:`Settings`,href:Oa(e.id)});let l=[];return o.id?l.push({name:o.handle,to:s,label:`Database`,crumbVariant:mU.UPPERCASE}):l.push({name:`Unknown Database`,to:`#`,label:`Database`,crumbVariant:mU.UPPERCASE}),(0,U.jsx)(CU,{isError:n,message:r,meta:i,tabs:c,breadcrumbs:l,titleLabel:`Endpoint`,title:`ID: ${e.id}`,lastBreadcrumbTo:wa(e.id),detailsBox:(0,U.jsx)(NVe,{enp:e,db:o,isLoading:a})})}function IVe(){let{id:e=``}=F(),t=l(),n=(0,V.useMemo)(()=>
148cm({id:e,withDeleted:!0}),[e]),r=(0,V.useMemo)(()=>sm(),[]),i=I(n);JS({action:n,cancel:r});let a=B(t=>Lp(t,{id:e}));(0,V.useEffect)(()=>{t(p5({id:e,type:`endpoint`,deletedAt:a?.deletedAt}))},[a?.deletedAt]),u(Lu({id:a.serviceId,withDeleted:!0}));let o=B(e=>Eu(e,{id:a.serviceId}));return o.appId?(0,U.jsx)(PVe,{...i,enp:a,service:o}):o.databaseId?(0,U.jsx)(FVe,{...i,enp:a,service:o}):(0,U.jsx)(xE,{text:`Loading endpoint information...`})}var LVe=()=>(0,U.jsx)(r5,{header:(0,U.jsx)(IVe,{}),mainWrapperDivClassName:`overflow-x-hidden`,children:(0,U.jsx)(se,{})});function RVe({cert:e,isLoading:t}){return(0,U.jsxs)(wU,{children:[(0,U.jsx)(TU,{title:`Certificate Details`,isLoading:t,icon:(0,U.jsx)(`img`,{src:`/resource-types/logo-vhost.png`,className:`w-[32px] h-[32px] mr-3`,"aria-label":`Certificate`}),docsUrl:`https://www.aptible.com/docs/custom-certificate`}),(0,U.jsxs)(EU,{children:[(0,U.jsx)(DU,{title:`ID`,children:e.id}),(0,U.jsx)(DU,{title:`Certificate`,children:e.commonName}),(0,U.jsx)(DU,{title:`Date Range`,children:(0,U.jsx)(B6,{cert:e})}),(0,U.jsx)(DU,{title:`Issuer`,children:(0,U.jsx)(V6,{cert:e})}),(0,U.jsx)(DU,{title:`Trust Status`,children:(0,U.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,U.jsx)(R6,{cert:e}),(0,U.jsx)(z6,{cert:e})]})})]})]})}function zVe(){let{id:e=``}=F(),t=(0,V.useMemo)(()=>Gf({id:e}),[e]);JS({action:t,cancel:(0,V.useMemo)(()=>Wf(),[])});let n=B(t=>Vf(t,{id:e}));u(du({id:n.environmentId}));let r=B(e=>tu(e,{id:n.environmentId})),i=I(t),a=[{name:r.handle,to:Ra(n.environmentId),label:`Environment`,crumbVariant:mU.UPPERCASE}],o=[{name:`Apps`,href:ko(n.id)},{name:`Endpoints`,href:Vne(n.id)},{name:`Settings`,href:Une(n.id)}];return(0,U.jsx)(CU,{...i,breadcrumbs:a,titleLabel:`Certificate`,title:n.commonName,detailsBox:(0,U.jsx)(RVe,{cert:n,isLoading:i.isLoading}),tabs:o})}var BVe=()=>(0,U.jsx)(r5,{header:(0,U.jsx)(zVe,{}),children:(0,U.jsx)(se,{})}),VVe=1349;function T5({children:e}){return(0,U.jsx)(r5,{forceCollapseBelow:VVe,allowResponsiveToggle:!0,children:(0,U.jsxs)(`div`,{className:`flex h-full pb-7 gap-7 flex-col md:flex-row`,children:[(0,U.jsx)(`div`,{className:`w-full md:w-52`,children:(0,U.jsx)(uve,{})}),(0,U.jsx)(`div`,{className:`w-full flex-1`,children:e||(0,U.jsx)(se,{})})]})})}var HVe=(e,t)=>{if(t.length>0)return t.some(e=>[`http`,`http_proxy_protocol`,`grpc`].includes(e.type))?`Zero-Downtime`:`Minimal-Downtime`;let n=[];return e.forceZeroDowntime?n.push(`Zero-Downtime`):n.push(`Zero-Overlap`),e.naiveHealthCheck&&n.push(`Simple Healthcheck`),n.join(`, `)},UVe=({service:e})=>{u(dy()),u(jy());let t=B(t=>Oy(t,{serviceId:e.id}));return(0,U.jsx)(X8,{title:`Disk Storage`,children:e.id===``?(0,U.jsx)(SE,{}):t??`N/A`})};function WVe({app:e,service:t,endpoints:n,env:r,isLoading:i}){u(im({id:t.id}));let a=wu(t),[o,s]=(0,V.useState)(!0),c=HVe(t,n),l=B(e=>L.costs.selectById(e,{id:Ky(`Service`,t.id)})),d=B(e=>G_(e,{id:t.currentReleaseId}));return(0,U.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,U.jsx)(J8,{isLoading:i,icon:(0,U.jsx)(`img`,{src:`/resource-types/logo-service.png`,className:`w-[32px] h-[32px]`,"aria-label":`Service`}),nameLabel:`Service`,name:t.processType,id:t.id,dateLabel:`Last Deploy`,createdAt:d.id===``?null:d.createdAt,cost:l.id===``?null:l.estCost,costTooltip:gU}),(0,U.jsxs)(Y8,{columns:2,children:[(0,U.jsx)(X8,{title:`Type`,isLoading:t.id===``,children:(0,U.jsx)(YU,{children:t.processType})}),(0,U.jsx)(X8,{title:`Container Count`,isLoading:t.id===``,children:t.containerCount}),(0,U.jsx)(X8,{title:`Resource`,isLoading:e.id===``,children:(0,U.jsx)(P,{to:Qi(e.id),children:e.handle})}),(0,U.jsx)(X8,{title:`Container Size`,isLoading:t.id===``,children:`${a.containerSizeGB} GB`}),(0,U.jsx)(X8,{title:`Environment`,isLoading:r.id===``,children:(0,U.jsx)(P,{to:Na(r.id),children:r.handle})}),(0,U.jsx)(X8,{title:`CPU Share`,isLoading:t.id===``,children:a.cpuShare}),(0,U.jsx)(X8,{title:`Deployment Strategy`,isLoading:t.id===``,children:(0,U.jsx)(P,{to:ia(e.id,t.id),children:c})}),(0,U.jsx)(X8,{title:`Container Profile`,isLoading:t.id===``,children:a.containerProfile.name}),(0,U.jsx)(UVe,{service:t}
148),(0,U.jsx)(X8,{title:`Container Efficiency`,isLoading:t.id===``,children:(0,U.jsx)(g4,{service:t})})]}),t.command?(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`div`,{className:`-ml-2 flex justify-between items-center pt-1`,children:(0,U.jsx)(`div`,{className:`flex flex-1`,children:(0,U.jsxs)(`div`,{className:`font-semibold flex items-center cursor-pointer`,onClick:()=>s(!o),onKeyUp:()=>s(!o),children:[o?(0,U.jsx)(IE,{variant:`sm`}):(0,U.jsx)(PE,{variant:`sm`}),(0,U.jsx)(`p`,{children:`Show Command`})]})})}),o?(0,U.jsx)(w4,{segments:x4(t.command.split(` `)),allowCopy:!0}):null]}):null]})}function GVe(){let{id:e=``,serviceId:t=``}=F(),n=l(),r=u(_f({id:e,withDeleted:!0})),i=u(Bu({id:e,withDeleted:!0})),a=B(t=>rf(t,{id:e})),o=B(e=>Eu(e,{id:t}));u(J_({id:o.currentReleaseId}));let s=B(e=>Gp(e,{serviceId:t})),c=B(e=>tu(e,{id:a.environmentId})),d=Cr([r,i]);(0,V.useEffect)(()=>{n(p5({id:e,type:`app`,deletedAt:a?.deletedAt}))},[a?.deletedAt]);let f=[{name:c.handle,to:Pa(c.id),label:`Environment`,crumbVariant:mU.UPPERCASE},{name:a.handle,to:$i(a.id),label:`App`,crumbVariant:mU.UPPERCASE}],p=[{name:`Metrics`,href:na(e,t)},{name:`Scale`,href:ra(e,t)},{name:`Disk Storage`,href:aa(e,t)},{name:`Settings`,href:ia(e,t)}];return(0,U.jsx)(CU,{...d,breadcrumbs:f,titleLabel:`Service`,title:t?o.processType:a.handle,detailsBox:(0,U.jsx)(WVe,{app:a,service:o,endpoints:s,env:c,isLoading:d.isLoading}),tabs:p,lastBreadcrumbTo:ta(a.id,o.id)})}var KVe=()=>(0,U.jsx)(r5,{header:(0,U.jsx)(GVe,{}),children:(0,U.jsx)(se,{})});function qVe({role:e}){return(0,U.jsxs)(wU,{children:[(0,U.jsx)(TU,{title:`Role Details`,docsUrl:`https://www.aptible.com/docs/access-permissions`}),(0,U.jsxs)(EU,{children:[(0,U.jsx)(DU,{title:`ID`,children:e.id}),(0,U.jsx)(DU,{title:`Type`,children:zg(e)}),(0,U.jsx)(DU,{title:`Created Date`,children:Df(e.createdAt)})]})]})}function JVe(){let{id:e=``}=F(),t=B(t=>Hg(t,{id:e})),n=[{name:`Members`,href:vi(e)}];return[`owner`,`platform_owner`,`billing_owner`,`activity_log_viewer`].includes(t.type)||n.push({name:`Environments`,href:vee(e)},{name:`Settings`,href:bee(e)}),(0,U.jsx)(CU,{isError:!1,meta:{},message:``,breadcrumbs:[],titleLabel:`Role`,title:t.name,detailsBox:(0,U.jsx)(qVe,{role:t}),tabs:n,lastBreadcrumbTo:_i(t.id)})}var E5=({children:e})=>(0,U.jsxs)(`div`,{children:[(0,U.jsx)(JVe,{}),e]}),D5=({children:e})=>{let t=B(Rn)?r5:b5;return(0,U.jsxs)(t,{children:[(0,U.jsx)(`div`,{className:`flex flex-col items-center`,children:(0,U.jsxs)(`div`,{className:`max-w-[600px]`,children:[(0,U.jsxs)(`div`,{className:`text-center mt-10`,children:[(0,U.jsx)(`h1`,{className:G.type.h1,children:`Deploy your App`}),(0,U.jsx)(`p`,{className:`my-6 text-gray-600 w-full mx-auto`,children:`Skip the AWS setup and launch apps and databases right away. Deploy to a dedicated stack for secure, compliant, production-ready environments from day one.`})]}),(0,U.jsx)(Z,{className:`w-full mx-auto`,children:(0,U.jsx)(W,{children:e})}),(0,U.jsx)(`div`,{className:`mt-6 w-full mx-auto`,children:(0,U.jsx)(KLe,{})})]})}),(0,U.jsx)(`div`,{className:`hero-bg absolute w-full h-full top-0 left-0 z-[-999]`})]})};function YVe({source:e}){return(0,U.jsxs)(wU,{children:[(0,U.jsx)(TU,{title:`Source Details`,icon:(0,U.jsx)(h8,{source:e,className:`w-[32px] h-[32px] mr-3`}),docsUrl:`https://www.aptible.com/docs/apps`}),(0,U.jsxs)(EU,{children:[(0,U.jsx)(DU,{title:`ID`,children:e.id}),(0,U.jsx)(DU,{title:`Name`,children:(0,U.jsx)(z2,{text:e.displayName})}),(0,U.jsx)(DU,{title:`Created`,children:Of(e.createdAt)}),(0,U.jsx)(DU,{title:`Repository URL`,children:(0,U.jsx)(wA,{href:e.url,linkIf:!!e.url?.match(/^https?:\/\//),children:(0,U.jsx)(z2,{text:e.url})})}),(0,U.jsx)(DU,{title:`Last Deployed`,children:Of(e.createdAt)})]})]})}function XVe(){let{id:e=``}=F(),t=u(jl({id:e})),n=B(t=>Dl(t,{id:e})),r=[{name:`Apps`,href:Ro(e)},{name:`Deployments`,href:ere(e)}];return(0,U.jsx)(CU,{...t,breadcrumbs:[],titleLabel:`Source`,title:n.displayName,detailsBox:(0,U.jsx)(YVe,{source:n}),tabs:r})}function ZVe(){return(0,U.jsx)(r5,{header:(0,U.jsx)(XVe,{}),children:(0,U.jsx)(se,{})})}var QVe=`Only organization owners can sync accounts. Ask an org owner to run this sync or grant you owner access.`;function $Ve({account:e,isLoading:t}){let n=l(),r=B($o),i=B(e=>S_(e,{orgId:r})),a=B(t=>sd(t,{id:e.id})),o=s_({id:e.id}),s=I(o),c=a.id||s.meta?.operationId||``,u=s.isLoading||a.status===`queued`||a.status===`running`,d=!i||u||e.id===``;T(s,()=>{s.meta?.operationId&&n(Gd({id:s.meta.operationId}))});let f=(0,U.jsxs)(K,{variant:`white`,size:`sm`,disabled:d,onClick:()=>n(o),children:[(0,U.jsx)(oD,{variant:`sm`,className:`inline mr-2 h-5 mt-0`}),`Sync`]});return(0,U.jsxs)(wU,{children:[(0,U.jsx)(TU,{otherButtonsBeforeDocs:(0,U.jsx)(`div`,{className:`mr-2`,children:i?f:(0,U.jsx)(aA,{text:QVe,children:f})}),docsUrl:`#`,title:`Account Details`,isLoading:t,icon:(0,U.jsx)(DD,{})}),(0,U.jsxs)(EU,{children:[(0,U.jsx)(DU,{title:`Account ID`,children:(0,U.jsxs)(CA,{href:`https://${e.awsAccountId}.signin.aws.amazon.com/console`,children:[(0,U.jsx)(`span`,{className:`leading-5 pt-1`,children:e.awsAccountId}),(0,U.jsx)(rD,{variant:`sm`,className:`inline pt-0 ml-1 h-5 mb-1 stroke-current`})]})}),(0,U.jsx)(DU,{title:`Last Synced`,children:u?(0,U.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,U.jsx)(D4,{status:a.status}),(0,U.jsx)(`span`,{children:`Syncing...`})]}):e.lastDiscoveryAt?Of(e.lastDiscoveryAt):(0,U.jsx)(`em`,{children:`Not yet synced`})}),(0,U.jsxs)(DU,{title:`Latest Sync Operation`,children:[c?(0,U.jsx)(P,{to:po(c),children:c}):(0,U.jsx)(`span`,{children:`None`}),c?(0,U.jsx)(`div`,{className:`text-gray-500`,children:(0,U.jsx)(D4,{status:a.status})}):null]}),(0,U.jsx)(DU,{title:`Created`,children:Of(e.createdAt)})]})]})}function eHe(){let{id:e=``}=F(),t=B(t=>l_(t,{id:e})),n=u(a_({id:e})),r=I(a_({id:e}));yC([e]),u(Ed({id:e,page:1,resourceType:`ExternalAwsAccount`,operationType:`sync`,operationStatus:``,startDate:``,endDate:``}));let i=[{name:`Resources`,href:$r(e)},{name:`Settings`,href:aee(e)}];return(0,U.jsx)(CU,{...n,breadcrumbs:[{name:`Account Integrations`,to:Xr()}],title:t.accountName||t.id,detailsBox:(0,U.jsx)($Ve,{account:t,isLoading:r.isLoading}),tabs:i,lastBreadcrumbTo:Qr(e)})}var tHe=()=>(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(eHe,{}),(0,U.jsx)(se,{})]});function nHe({account:e,resource:t,isLoading:n}){let r=t.metadata?.engine||`unknown`,i=r===`unknown`?`/resource-types/logo-unknown.png`:`/database-types/logo-${r===`postgres`?`postgresql`:r}.png`;return(0,U.jsxs)(wU,{children:[(0,U.jsx)(TU,{docsUrl:`#`,title:`Database Details`,isLoading:n,icon:t.id===``?(0,U.jsx)(SE,{}):(0,U.jsx)(`img`,{src:i,className:`w-[32px] h-[32px] mr-3`,"aria-label":`${r} Database`})}),(0,U.jsxs)(EU,{columns:4,children:[(0,U.jsx)(DU,{title:`ID`,children:t.id===``?(0,U.jsx)(SE,{}):t.id}),(0,U.jsx)(DU,{title:`Disk IOPS`,children:Object.keys(t.metadata)?.length===0?(0,U.jsx)(SE,{}):hb(t.metadata?.storage_type||``,t.metadata?.allocated_storage)}),(0,U.jsx)(DU,{title:`Memory Limit`,children:Object.keys(t.metadata)?.length===0?(0,U.jsx)(SE,{}):mb(t.metadata?.db_instance_class||``).memory}),(0,U.jsx)(DU,{title:`AWS RDS Database ID`,children:Object.keys(t.metadata)?.length===0?(0,U.jsx)(SE,{}):(0,U.jsxs)(CA,{href:`https://${t.region}.console.aws.amazon.com/rds/home?region=${t.region}#database:id=${t.metadata?.db_instance_identifier};is-cluster=false`,children:[(0,U.jsx)(`span`,{className:`leading-5 pt-1`,children:t.metadata?.dbi_resource_id}),(0,U.jsx)(rD,{variant:`sm`,className:`inline pt-0 ml-1 h-5 mb-1 stroke-current`})]})}),(0,U.jsx)(DU,{title:`Type`,children:Object.keys(t.metadata)?.length===0?(0,U.jsx)(SE,{}):r}),(0,U.jsx)(DU,{title:`Disk Type`,children:Object.keys(t.metadata)?.length===0?(0,U.jsx)(SE,{}):t.metadata?.storage_type?.toUpperCase()||`Unknown`}
148),(0,U.jsx)(DU,{title:`CPU Share`,children:Object.keys(t.metadata)?.length===0?(0,U.jsx)(SE,{}):mb(t.metadata?.db_instance_class||``).cpu}),(0,U.jsx)(DU,{title:`AWS Account ID`,children:Object.keys(t.metadata)?.length===0?(0,U.jsx)(SE,{}):(0,U.jsx)(P,{to:$r(e.id),children:e.awsAccountId})}),(0,U.jsx)(DU,{title:`Disk Size`,children:Object.keys(t.metadata)?.length===0?(0,U.jsx)(SE,{}):t.metadata?.allocated_storage&&`${t.metadata?.allocated_storage} GB`||`Unknown`}),(0,U.jsx)(DU,{title:`Disk Encryption`,children:Object.keys(t.metadata)?.length===0?(0,U.jsx)(SE,{}):gb(t.metadata?.storage_encrypted||!1)}),(0,U.jsx)(DU,{title:`Provider`,children:(0,U.jsxs)(CA,{href:`https://${e.awsAccountId}.signin.aws.amazon.com/console`,children:[(0,U.jsx)(DD,{className:`inline mr-2`}),(0,U.jsx)(`span`,{className:`leading-5 pt-1`,children:e.awsAccountId}),(0,U.jsx)(rD,{variant:`sm`,className:`inline pt-0 ml-1 h-5 mb-1 stroke-current`})]})}),(0,U.jsx)(DU,{title:`AWS Account Name`,children:e.id===``?(0,U.jsx)(SE,{}):e.accountName})]})]})}function rHe(){let{id:e=``}=F(),t=B(t=>bb(t,{id:e})),n=B(e=>l_(e,{id:t.externalAwsAccountId})),r=u(vb({id:e}));u(a_({id:t.externalAwsAccountId}));let i=I(vb({id:e})),a=[{name:`Connected Apps`,href:bo(e)},{name:`Settings`,href:Tne(e)}];return(0,U.jsx)(CU,{...r,breadcrumbs:[{name:`Account Integrations`,to:Xr()},{name:n.accountName,to:$r(n.id)}],title:t.resourceName||t.id,detailsBox:(0,U.jsx)(nHe,{account:n,resource:t,isLoading:i.isLoading}),tabs:a,lastBreadcrumbTo:bo(t.id)})}var iHe=()=>(0,U.jsx)(r5,{header:(0,U.jsx)(rHe,{}),children:(0,U.jsx)(se,{})});function aHe({activity:e}){let t=B(t=>U_(t,{resourceId:e.primaryResourceId,resourceType:e.primaryResourceType})),n=t!==null&&`deletedAt`in t&&t.deletedAt;if(!t||!n)return null;let r=t!=null&&`handle`in t&&t?.handle&&t?.deletedAt?` (${t.handle})`:``,i=Of(t?.deletedAt);return(0,U.jsxs)(q,{className:`my-2`,variant:`warning`,children:[`The target resource`,r,` for this activity was deprovisioned`,t?.deletedAt?` as of ${i}.`:`.`]})}function oHe({activity:e}){return!e.userName&&!e.userEmail?(0,U.jsx)(U.Fragment,{children:`N/A`}):(0,U.jsx)(`span`,{children:e.userName||e.userEmail})}function sHe({activity:e}){let t=l(),n=e.externalId??``,r=(0,V.useMemo)(()=>Kd({id:n}),[n]),i=I(r),[a,o]=(0,V.useState)(!1),[s,c]=(0,V.useState)(``);if((0,V.useEffect)(()=>{e.description?.cancelled&&o(!0)},[e.description?.cancelled]),(0,V.useEffect)(()=>{if(i.isSuccess||i.meta?.alreadyCancelled){o(!0),c(``);return}i.isError&&(o(!1),c(i.message||`Failed to cancel operation`))},[i.isSuccess,i.isError,i.message]),!e.id||e.status!==`queued`&&e.status!==`running`)return null;let u=e.title||zC(e.activityType),d=!!n;return(0,U.jsx)(q,{className:`mb-2`,variant:`progress`,showIcon:!1,children:(0,U.jsxs)(`div`,{className:`flex items-center justify-between w-full`,children:[(0,U.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,U.jsx)(SE,{color:`#364ECC`,variant:`base`}),(0,U.jsxs)(`span`,{children:[cl(e.status),`: `,u]})]}),d&&(0,U.jsxs)(`div`,{className:`flex items-center gap-2`,children:[s&&(0,U.jsx)(`span`,{className:`text-red-300 text-sm`,children:s}),(0,U.jsxs)(_A,{envId:e.accountId||``,variant:`delete`,size:`sm`,onClick:()=>{!d||a||i.isLoading||(c(``),t(r))},disabled:a||i.isLoading,children:[(0,U.jsx)(JE,{variant:`sm`,color:`white`,className:`mr-1`}),a?`Cancelation requested`:`Cancel Operation`]})]})]})})}function cHe({status:e}){let t=e===`succeeded`,n=e===`failed`||e===`canceled`;return(0,U.jsxs)(`div`,{className:`flex items-center gap-1 text-sm font-semibold w-fit ${t?`text-forest`:n?`text-red`:`text-black-500`}`,children:[t?(0,U.jsx)(WE,{variant:`sm`,color:`currentColor`}):n?(0,U.jsx)(JE,{variant:`sm`,color:`currentColor`}):null,(0,U.jsx)(`span`,{children:Qd(e)})]})}function lHe({activity:e}){return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(sHe,{activity:e}),(0,U.jsx)(aHe,{activity:e}),(0,U.jsx)(Z,{size:`none`,children:(0,U.jsxs)(`div`,{className:q8,children:[(0,U.jsx)(K8,{icon:(0,U.jsx)(`img`,{src:`/resource-types/logo-activity.png`,className:`w-[28px] h-[28px] rounded`,style:{backgroundColor:`#343B41`},"aria-label":`Activity`}),label:`Activity Type`,children:zC(e.activityType)}),(0,U.jsx)(K8,{label:`ID`,children:e.id}),(0,U.jsx)(K8,{label:`Target`,children:(0,U.jsx)(h6,{activity:e})}),(0,U.jsx)(K8,{label:`Occurred At`,children:Of(e.occurredAt)}),(0,U.jsx)(K8,{label:`Actor`,children:(0,U.jsx)(oHe,{activity:e})}),(0,U.jsx)(K8,{label:`Status`,children:(0,U.jsx)(cHe,{status:e.status})})]})})]})}var uHe=new Set([`app.deploy`,`app.configure`]);function dHe(){let{id:e=``}=F(),t=B(t=>PC(t,{id:e})),n=u(FC({id:e})),r=t.primaryResourceType.toLowerCase()===`app`?t.primaryResourceId:VC(t.targetResources,`app`)??``,i=uHe.has(t.activityType)&&r!==``?[{name:`Logs`,href:fo(e),end:!0},{name:`Configuration`,href:yne(e)}]:[];return(0,U.jsx)(CU,{...n,breadcrumbs:[],titleLabel:`Activity ID`,title:t.i
148d?t.id:`Loading...`,detailsBox:(0,U.jsx)(lHe,{activity:t}),tabs:i})}var fHe=()=>(0,U.jsx)(r5,{header:(0,U.jsx)(dHe,{}),children:(0,U.jsx)(se,{})}),pHe=`signup_intent`;function mHe(e){Ys(pHe,JSON.stringify(e))}var hHe=[{heading:`Managed Infrastructure`,options:[{value:`deploy`,label:`Deploy apps and databases`,description:`Run workloads on secure, compliant infrastructure`}]},{heading:`Managed AI`,options:[{value:`ai-gateway`,label:`LLM Gateway`,description:`Proxy and govern LLM API calls with security controls`}]}],gHe=({value:e,label:t,description:n,isSelected:r,onToggle:i})=>(0,U.jsx)(`div`,{className:[`rounded-lg border px-5 py-4`,r?`border-indigo-500 bg-indigo-50`:`border-gray-200 bg-white`].join(` `),children:(0,U.jsx)(`button`,{type:`button`,onClick:()=>i(e),className:`w-full text-left transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-indigo-500`,children:(0,U.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`div`,{className:`font-semibold text-gray-900`,children:t}),(0,U.jsx)(`div`,{className:`text-sm text-gray-500 mt-0.5`,children:n})]}),(0,U.jsx)(`div`,{className:[`flex-shrink-0 w-5 h-5 rounded border-2 flex items-center justify-center transition-colors`,r?`bg-indigo-500 border-indigo-500`:`border-gray-300`].join(` `),children:r&&(0,U.jsx)(`svg`,{className:`w-3 h-3 text-white`,viewBox:`0 0 12 12`,fill:`none`,"aria-label":`Selected`,role:`img`,children:(0,U.jsx)(`path`,{d:`M2 6l3 3 5-5`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`})})})]})})}),_He=()=>{let[e,t]=(0,V.useState)(new Set),n=N(),r=B(Wo),i=r.length<=1;(0,V.useEffect)(()=>{r.length>0&&!i&&n(Dr(),{replace:!0})},[r.length]);let a=e=>{t(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})};return(0,U.jsxs)(y5,{className:`flex gap-6`,children:[(0,U.jsx)(O8,{}),(0,U.jsx)(`div`,{className:`flex-1 mx-auto max-w-[500px]`,children:(0,U.jsxs)(W,{variant:`vertical`,children:[(0,U.jsx)(`div`,{className:`mx-auto max-w-[570px] px-4 md:px-0`,children:(0,U.jsx)(W,{children:(0,U.jsx)(`div`,{className:`flex justify-center pt-[65px] pb-4`,children:(0,U.jsx)(BU,{width:160})})})}),(0,U.jsxs)(W,{className:`max-w-xl mx-auto px-4`,children:[(0,U.jsx)(`h2`,{className:`mt-6 text-center text-3xl font-semibold text-gray-900`,children:`What are you looking to do?`}),(0,U.jsx)(`div`,{children:(0,U.jsx)(`p`,{className:`text-sm text-gray-500 mt-0.5 text-center`,children:`Select all that apply`})}),(0,U.jsx)(`div`,{className:`flex flex-col gap-6`,children:hHe.map(t=>(0,U.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,U.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,U.jsx)(`span`,{className:`text-xs font-semibold uppercase tracking-wide text-gray-400`,children:t.heading})}),t.options.map(t=>(0,U.jsx)(gHe,{value:t.value,label:t.label,description:t.description,isSelected:e.has(t.value),onToggle:a},t.value))]},t.heading))}),(0,U.jsx)(`div`,{className:`flex flex-col gap-3`,children:(0,U.jsx)(K,{onClick:()=>{mHe({paas:e.has(`deploy`),ai:e.has(`ai-gateway`)});let t=e.has(`ai-gateway`)&&!e.has(`deploy`);n(t?Hi():Dr())},disabled:e.size===0,className:`w-full`,children:`Continue`})})]})]})})]})},O5=`#283a99`,vHe=[{group:`LLM Access & Control`,items:[{label:`Multi-Provider Support`,text:`Use Anthropic, OpenAI, and Amazon Bedrock from a single API`},{label:`Model Access & Key Management`,text:`Grant, revoke, and scope model access per key. Set team-level model access controls.`},{label:`Cost Visibility & Control`,text:`View usage costs by key and by request, and set cost limits across your team`}]},{group:`Security and Compliance`,items:[{label:`Encryption`,text:`All data encrypted in transit and at rest`},{label:`Audit Logging`,text:`Every LLM request and response is logged and stored by Aptible`}
148,{label:`BAA Coverage`,text:`Supported models and capabilities covered under the Aptible BAA`},{label:`PHI Handling`,text:`Prompts and responses are never used for model training`}]}],k5=`LLM keys provide secure access to the Aptible LLM Gateway for your applications.`,yHe=`LLM Gateway access is approved by our team. Request access and we'll email you when your trial is ready.`,A5=({lead:e,loader:t,onClick:n,buttonLabel:r,consentAction:i})=>(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`p`,{className:`pt-5 text-gray-700`,children:e}),(0,U.jsx)(TA,{className:`mt-2`,...t}),(0,U.jsx)(`div`,{className:`pt-6`,children:(0,U.jsx)(K,{onClick:n,isLoading:t.isLoading,variant:`white`,layout:`block`,children:r})}),(0,U.jsx)(`div`,{className:`pt-2`,children:(0,U.jsx)(OA,{action:i})})]}),bHe=({loader:e,onClick:t})=>e.isSuccess?(0,U.jsx)(`div`,{className:`pt-5`,children:(0,U.jsx)(q,{variant:`success`,children:`Request received. Our team reviews LLM Gateway access requests and will email you when your trial is approved. Your Aptible account is ready to use in the meantime.`})}):(0,U.jsx)(A5,{lead:yHe,loader:e,onClick:t,buttonLabel:`Request access`,consentAction:`requesting access`}),xHe=()=>{let e=l(),t=N(),[n,r]=(0,V.useState)(!1),{isLoading:i,isInitialLoading:a}=Er([Ab]),o=B($o),s=!!B(kb)?.id,c=B(Ob),u=I(jb);T(u,()=>{t(Ki())});let d=()=>{Ys(`llm-gateway-enroll-clicked`,JSON.stringify({orgId:o})),e(jb({orgId:o}))},f=I(Mb);return T(f,()=>{e(Ab({orgId:o}))}),(0,V.useEffect)(()=>{if(!n)return;let e=e=>{e.key===`Escape`&&r(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[n]),i||a?(0,U.jsx)(r5,{children:(0,U.jsxs)(W,{children:[(0,U.jsx)(W,{size:`sm`,children:(0,U.jsx)(NU,{description:k5,children:`LLM Gateway`})}),(0,U.jsx)(`div`,{className:`flex justify-center py-12`,children:(0,U.jsx)(SE,{show:!0})})]})}):s?(0,U.jsx)(ae,{to:Ki(),replace:!0}):(0,U.jsx)(r5,{children:(0,U.jsxs)(W,{children:[(0,U.jsx)(W,{size:`sm`,children:(0,U.jsx)(NU,{description:k5,children:`LLM Gateway`})}),(0,U.jsxs)(`div`,{className:`rounded-lg`,children:[(0,U.jsxs)(`div`,{className:`bg-white shadow border border-black-100 rounded-lg overflow-hidden flex flex-col xl:flex-row items-stretch`,children:[(0,U.jsx)(`div`,{className:`order-2 xl:order-none flex flex-col items-center justify-center px-6 pt-10 pb-6 min-h-[320px] xl:min-h-[480px] xl:flex-[0.42] rounded-b-lg xl:rounded-b-none xl:rounded-l-lg`,style:{backgroundColor:O5},children:(0,U.jsxs)(`button`,{type:`button`,onClick:()=>r(!0),className:`block w-full max-w-full focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-[#283a99] rounded-lg`,"aria-label":`View LLM Gateway screenshot larger`,title:`Click to enlarge`,children:[(0,U.jsx)(`img`,{src:`/assets/images/llm-keys-landing.png`,alt:`LLM Gateway`,className:`max-w-full max-h-[520px] w-full h-auto object-contain cursor-pointer`}),(0,U.jsx)(`span`,{className:`sr-only`,children:`Click to view larger`})]})}),(0,U.jsxs)(`div`,{className:`order-1 xl:order-none flex flex-col p-6 xl:p-8 xl:flex-[0.58] xl:min-w-0 min-h-0 rounded-t-lg xl:rounded-t-none xl:rounded-r-lg`,children:[(0,U.jsx)(`div`,{className:`text-xs uppercase tracking-wide font-medium`,style:{color:O5},children:`NEW FEATURE`}),(0,U.jsx)(`h1`,{className:`text-2xl font-bold text-black pt-2`,children:`Get started with the LLM Gateway`}),(0,U.jsx)(`p`,{className:`pt-3 text-gray-700`,children:`Aptible LLM Gateway is a single API to access Anthropic, OpenAI, and Amazon Bedrock with security and compliance guardrails built in. Manage keys, control model access, and use LLMs without having to think about the security layer.`}),(0,U.jsx)(`div`,{className:`space-y-4 pt-5`,children:vHe.map(({group:e,items:t})=>(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-wide text-gray-400 mb-2`,children:e}),(0,U.jsx)(`ul`,{className:`space-y-2`,children:t.map(({label:e,text:t})=>(0,U.jsxs)(`li`,{className:`flex gap-3 items-start`,children:[(0,U.jsx)(UE,{color:O5,variant:`sm`,className:`flex-shrink-0 mt-0.5`}),(0,U.jsxs)(`span`,{children:[(0,U.jsxs)(`strong`,{children:[e,`:`]}),` `,t]})]},e))})]},e))}),(0,U.jsx)(`div`,{className:`mt-5`,children:(0,U.jsx)(E8,{})}),c?(0,U.jsx)(A5,{lead:`Try it free with $10 in credits. No commitment required.`,loader:u,onClick:d,buttonLabel:`Try for free`,consentAction:`enrolling`}):(0,U.jsx)(bHe,{loader:f,onClick:()=>{Ys(`llm-gateway-access-request-clicked`,JSON.stringify({orgId:o})),e(Mb({orgId:o}))}})]})]}),n&&(0,U.jsx)(h3,{children:(0,U.jsxs)(`div`,{className:`fixed inset-0 z-10 flex items-center justify-center p-4 bg-black/70`,role:`dialog`,"aria-modal":`true`,"aria-label":`LLM Gateway screenshot (enlarged)`,onClick:()=>r(!1),onKeyDown:e=>e.key===`Escape`&&r(!1),children:[(0,U.jsx)(`button`,{type:`button`,className:`absolute top-4 right-4 p-2 rounded-full bg-white/90 hover:bg-white text-gray-700 z-20`,onClick:e=>{e.stopPropagation(),r(!1)},"aria-label":`Close`,children:(0,U.jsx)(JE,{className:`w-6 h-6`})}),(0,U.jsx)(`img`,{src:`/assets/images/llm-keys-landing.png`,alt:`LLM Gateway screenshot`,className:`max-w-full max-h-[calc(100vh-4rem)] w-auto h-auto object-contain`,onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation()})]})})]})]})})},SHe={handle:e=>z4(e.handle)},CHe=({isOpen:e,onClose:t,onSuccess:n})=>{let r=l(),i=B($o),a=B(Ko),[o]=KS(),[s,c]=(0,V.useState)(``),[u,d]=(0,V.useState)(!1),[f,p]=
148QS(SHe),m=I(Vb),h=o.allowAiGatewayAccess||u,g=()=>{c(``),t()};return T(m,()=>{let{token:e=``,gatewayUrl:t=``}=m.meta;g(),n(e,t)}),e?(0,U.jsx)(h3,{children:(0,U.jsxs)(kU,{isOpen:e,className:`min-w-[600px]`,children:[(0,U.jsx)(AU,{icon:(0,U.jsx)(mD,{variant:`sm`}),title:`Create LLM Gateway Key`,onClose:g}),(0,U.jsxs)(LA,{onSubmit:e=>{e.preventDefault(),p({handle:s})&&r(Vb({handle:s,orgId:i}))},children:[(0,U.jsxs)(MU,{className:`pb-0`,children:[(0,U.jsx)(J,{label:(0,U.jsxs)(U.Fragment,{children:[`Handle `,(0,U.jsx)(`span`,{className:`text-red-500`,children:`*`})]}),htmlFor:`handle`,className:`mb-4`,feedbackMessage:f.handle,feedbackVariant:f.handle?`danger`:`default`,children:(0,U.jsx)(X,{id:`handle`,name:`handle`,value:s,onChange:e=>c(e.target.value),placeholder:`e.g., production-llm-key`,maxLength:64})}),!o.allowAiGatewayAccess&&(0,U.jsx)(ZH,{checked:u,disabled:u,onChange:e=>{e.currentTarget.checked&&(d(!0),r(ds({userId:a,agreementType:`llm_phi_acknowledgement`,agreementVersion:`1`})))},labelClassName:`ml-3`,label:(0,U.jsxs)(U.Fragment,{children:[`I have read and agree to the `,(0,U.jsx)(DA,{}),` and understand that`,` `,(0,U.jsx)(`b`,{children:`a BAA is required before sending any PHI through the gateway.`})]})}),(0,U.jsx)(TA,{className:`mt-4`,...m})]}),(0,U.jsx)(jU,{actions:[(0,U.jsx)(K,{variant:`white`,onClick:g,children:`Cancel`},`cancel`),(0,U.jsx)(K,{type:`submit`,disabled:!h||!s.trim(),isLoading:m.isLoading,children:`Create Key`},`submit`)]})]})]})}):null},wHe=({isOpen:e,token:t,gatewayUrl:n,onClose:r})=>e?(0,U.jsx)(h3,{children:(0,U.jsxs)(kU,{isOpen:e,className:`min-w-[600px]`,children:[(0,U.jsx)(AU,{icon:(0,U.jsx)(UE,{variant:`sm`,color:`#00633f`}),title:`LLM Gateway Key Created`,onClose:r}),(0,U.jsxs)(MU,{children:[(0,U.jsx)(q,{variant:`warning`,className:`mb-4`,children:`Be sure to copy your token now, as you will not be able to access it again once you close this window.`}),(0,U.jsx)(J,{label:`Token`,htmlFor:`llm-gateway-token`,className:`mb-4`,children:(0,U.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,U.jsx)(X,{id:`llm-gateway-token`,type:`text`,value:t,readOnly:!0,className:`flex-1 font-mono text-sm text-center`}),(0,U.jsx)(B2,{text:t})]})}),(0,U.jsx)(J,{label:`Endpoint URL`,htmlFor:`endpoint-url`,children:(0,U.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,U.jsx)(X,{id:`endpoint-url`,type:`text`,value:n,readOnly:!0,className:`flex-1 font-mono text-sm text-center`}),(0,U.jsx)(B2,{text:n})]})})]})]})}):null,THe=({isOpen:e,onClose:t,llmKey:n})=>{let r=l(),i=I(Zb),a=B($o),[o,s]=(0,V.useState)(``);return T(i,t),(0,V.useEffect)(()=>{e&&s(``)},[e]),!e||!n?null:(0,U.jsx)(h3,{children:(0,U.jsxs)(kU,{isOpen:e,onClose:t,className:`min-w-[500px]`,children:[(0,U.jsx)(AU,{title:`Revoke Legacy LLM Key`,onClose:t}),(0,U.jsxs)(MU,{children:[(0,U.jsxs)(`p`,{className:`text-gray-700 mb-4`,children:[`This will permanently revoke `,(0,U.jsx)(`strong`,{children:n.handle}),`. Any applications using this key will immediately lose access to the legacy gateway. This action cannot be undone.`]}),(0,U.jsx)(J,{label:`Type "${n.handle}" to confirm`,htmlFor:`revoke-legacy-confirm`,children:(0,U.jsx)(X,{id:`revoke-legacy-confirm`,type:`text`,value:o,onChange:e=>s(e.target.value),placeholder:n.handle})})]}),(0,U.jsx)(jU,{actions:[(0,U.jsx)(K,{variant:`white`,onClick:t,children:`Cancel`},`cancel`),(0,U.jsx)(K,{variant:`delete`,disabled:o!==n.handle,isLoading:i.isLoading,onClick:()=>r(Zb({id:n.id,orgId:a})),children:`Revoke Key`},`revoke`)]})]})})},EHe=e=>[{field:`handle`,headerName:`Key`,cellRenderer:({data:e})=>(0,U.jsx)(U2,{label:e.handle,href:qi(e.id),description:e.note??void 0})},{field:`status`,headerName:`Status`,cellRenderer:({data:e})=>(0,U.jsx)(J2,{value:e.status===`ACTIVE`?`Active`:`Revoked`,valueToVariantMap:{Active:`success`,Revoked:`error`}})},{field:`envHandle`,headerName:`Environment`,cellRenderer:({data:e})=>(0,U.jsx)(G2,{id:e.environmentId,hideIcon:!0})},{field:`createdAt`,headerName:`Created At (UTC)`,cellRenderer:({data:e})=>(0,U.jsx)(Y2,{date:e.createdAt})}
148,{field:`spend`,headerName:`Spend`,sort:`desc`,cellRenderer:({data:e})=>(0,U.jsx)(q2,{value:e.spend})},{colId:`actions`,headerName:`Actions`,sortable:!1,width:100,resizable:!1,suppressAutoSize:!0,suppressSizeToFit:!0,cellRenderer:({data:t})=>(0,U.jsx)(K,{variant:`delete`,size:`sm`,disabled:t.status===`REVOKED`,onClick:()=>e(t),children:`Revoke`})}],DHe=()=>{let e=B($o),[t,n]=(0,V.useState)(!1),[r,i]=(0,V.useState)(null);u(qb({orgId:e}));let a=B(ES);return a.length===0?null:(0,U.jsxs)(W,{size:`sm`,children:[(0,U.jsxs)(`button`,{type:`button`,className:`flex items-center gap-2 w-fit text-left`,onClick:()=>n(!t),children:[t?(0,U.jsx)(IE,{variant:`sm`}):(0,U.jsx)(PE,{variant:`sm`}),(0,U.jsxs)(`span`,{className:G.type.h4,children:[`Legacy Keys (`,a.length,`)`]})]}),t?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`p`,{className:`text-gray-600`,children:`These keys work against the previous LLM Gateway and can't be used with the endpoint above. Create replacements and revoke these once your applications have migrated.`}),(0,U.jsx)(L2,{rowData:a,colDefs:EHe(i),queryParamPrefix:`legacy`})]}):null,(0,U.jsx)(THe,{isOpen:r!==null,onClose:()=>i(null),llmKey:r})]})},j5=({isOpen:e,onClose:t,llmGatewayKey:n})=>{let r=l(),i=B($o),a=I(Hb),[o,s]=(0,V.useState)(``);return T(a,t),(0,V.useEffect)(()=>{e&&s(``)},[e]),!e||!n?null:(0,U.jsx)(h3,{children:(0,U.jsxs)(kU,{isOpen:e,onClose:t,className:`min-w-[500px]`,children:[(0,U.jsx)(AU,{title:`Revoke LLM Gateway Key`,onClose:t}),(0,U.jsxs)(MU,{children:[(0,U.jsxs)(`p`,{className:`text-gray-700 mb-4`,children:[`This will permanently revoke `,(0,U.jsx)(`strong`,{children:n.handle}),`. Any applications using this key will immediately lose access to the LLM Gateway. This action cannot be undone.`]}),(0,U.jsx)(J,{label:`Type "${n.handle}" to confirm`,htmlFor:`revoke-confirm`,children:(0,U.jsx)(X,{id:`revoke-confirm`,type:`text`,value:o,onChange:e=>s(e.target.value),placeholder:n.handle})}),(0,U.jsx)(TA,{className:`mt-4`,...a})]}),(0,U.jsx)(jU,{actions:[(0,U.jsx)(K,{variant:`white`,onClick:t,children:`Cancel`},`cancel`),(0,U.jsx)(K,{variant:`delete`,disabled:o!==n.handle,isLoading:a.isLoading,onClick:()=>r(Hb({id:n.id,orgId:i})),children:`Revoke Key`},`revoke`)]})]})})},M5=`LLM Gateway keys provide secure access to the Aptible LLM Gateway for your applications.`,OHe=e=>[{field:`handle`,headerName:`Key`,cellRenderer:({data:e})=>(0,U.jsx)(U2,{label:e.handle,href:Iee(e.id),icon:(0,U.jsx)(`img`,{src:`/resource-types/logo-llm_key.png`,className:`w-[32px] h-[32px] mr-2 align-middle`,"aria-label":`LLM Gateway Key`})})},{field:`id`,headerName:`ID`,minWidth:80,valueGetter:({data:e})=>Number.parseInt(e?.id||`0`,10)},{field:`status`,headerName:`Status`,cellRenderer:({data:e})=>(0,U.jsx)(J2,{value:e.status===`ACTIVE`?`Active`:`Revoked`,valueToVariantMap:{Active:`success`,Revoked:`error`}})},{field:`tokenPrefix`,headerName:`Token`,cellRenderer:({data:e})=>(0,U.jsx)(z2,{text:e.tokenPrefix,children:(0,U.jsxs)(`span`,{className:`font-mono text-sm`,children:[e.tokenPrefix,`â¦`]})})},{field:`createdBy`,headerName:`Created By`,valueGetter:({data:e})=>e?.createdBy.name,cellRenderer:({data:e})=>(0,U.jsx)(U2,{label:e.createdBy.name,description:e.createdBy.email})},{field:`createdAt`,headerName:`Created At (UTC)`,sort:`desc`,cellRenderer:({data:e})=>(0,U.jsx)(Y2,{date:e.createdAt})},{colId:`actions`,headerName:`Actions`,sortable:!1,width:100,resizable:!1,suppressAutoSize:!0,suppressSizeToFit:!0,cellRenderer:({data:t})=>(0,U.jsx)(K,{variant:`delete`,size:`sm`,disabled:t.status===`REVOKED`,onClick:()=>e(t),children:`Revoke`})}],kHe=()=>{let e=B($o),t=B(ns),[n,r]=(0,V.useState)(!1),[i,a]=(0,V.useState)(null),[o,s]=(0,V.useState)(null);u(Ab({orgId:e})),u(zb({orgId:e}));let{isLoading:c,isInitialLoading:l}=Er([Ab,zb]),d=!!B(kb)?.id,f=B(Rb),p=f.length>0;return c||l?(0,U.jsx)(r5,{children:(0,U.jsxs)(W,{children:[(0,U.jsx)(W,{size:`sm`,children:(0,U.jsx)(NU,{description:M5,children:`LLM Gateway`})}),(0,U.jsx)(`div`,{className:`flex justify-center py-12`,children:(0,U.jsx)(SE,{show:!0})})]})}):d?(0,U.jsx)(r5,{children:(0,U.jsxs)(W,{children:[(0,U.jsxs)(W,{variant:`horizontal`,className:`items-center justify-between`,children:[(0,U.jsx)(NU,{description:M5,children:`LLM Gateway`}),(0,U.jsxs)(K,{onClick:()=>{Ys(`new-llm-gateway-key-button-clicked`,JSON.stringify({orgId:t.id,org
148Name:t.name})),r(!0)},children:[(0,U.jsx)(mD,{variant:`sm`,className:`mr-2`}),` Create Key`]})]}),!p&&(0,U.jsx)(z8,{title:`Welcome to the LLM Gateway!`,defaultExpanded:!0,feature:`llm-gateway-welcome`,dismissable:!1,persistDismissed:!1,icon:(0,U.jsx)(`div`,{className:`text-2xl`,children:`ð`}),extraActions:(0,U.jsx)(dA,{variant:`white`,size:`sm`,to:Po(),children:`Contact Support`}),children:(0,U.jsx)(`div`,{className:`flex-1`,children:(0,U.jsxs)(`p`,{className:`${G.type.darker} max-w-[95%]`,children:[`You're on your way to using LLMs safely and securely in a compliant environment. Need help getting started?`,` `,(0,U.jsx)(CA,{className:`underline`,href:`https://www.aptible.com/docs/core-concepts/ai-gateway`,children:`Check out the docs`}),`, or contact us if you'd like some assistance getting setup.`]})})}),!p&&(0,U.jsx)(q,{variant:`warning`,children:(0,U.jsxs)(`p`,{className:`${G.type.darker} mt-0.5`,children:[`A signed BAA with Aptible is required before you can safely send any PHI through the gateway. Don't have one?`,` `,(0,U.jsx)(P,{to:Po(),className:`underline`,children:`Contact us`}),`.`]})}),(0,U.jsx)(L2,{rowData:f,colDefs:OHe(s),syncQueryParams:!0,defaultSearch:`status:active`}),(0,U.jsx)(DHe,{}),(0,U.jsx)(CHe,{isOpen:n,onClose:()=>r(!1),onSuccess:(e,t)=>a({token:e,gatewayUrl:t})}),(0,U.jsx)(wHe,{isOpen:i!==null,token:i?.token??``,gatewayUrl:i?.gatewayUrl??``,onClose:()=>a(null)}),(0,U.jsx)(j5,{isOpen:o!==null,onClose:()=>s(null),llmGatewayKey:o})]})}):(0,U.jsx)(ae,{to:Hi(),replace:!0})},N5=()=>(0,U.jsx)(`span`,{className:`text-gray-500 italic`,children:`(None)`}),P5=({user:e})=>e?(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`div`,{children:e.name}),(0,U.jsx)(`div`,{className:`text-gray-500 text-sm`,children:e.email})]}):(0,U.jsx)(N5,{}),AHe=()=>{let{id:e=``}=F(),t=B($o),[n,r]=(0,V.useState)(!1),i=u(Bb({id:e,orgId:t})),a=B(t=>Ib(t,{id:e})),{isLoading:o}=i,s=a.status===`REVOKED`;return(0,U.jsx)(r5,{header:(0,U.jsx)(CU,{...i,breadcrumbs:[{name:`LLM Gateway`,to:Wi()}],title:a.handle,detailsBox:(0,U.jsxs)(wU,{children:[(0,U.jsx)(TU,{title:`LLM Gateway Key Details`,isLoading:o,icon:(0,U.jsx)(`img`,{src:`/resource-types/logo-llm_key.png`,className:`w-[32px] h-[32px] mr-3`,"aria-label":`LLM Gateway Key`}),docsUrl:`https://www.aptible.com/docs/core-concepts/ai-gateway`,otherButtonsBeforeDocs:s?null:(0,U.jsx)(K,{variant:`delete`,size:`sm`,className:`mr-2`,onClick:()=>r(!0),children:`Revoke Key`})}),(0,U.jsxs)(EU,{columns:3,children:[(0,U.jsx)(DU,{title:`ID`,isLoading:o,children:a.id}),(0,U.jsx)(DU,{title:`Handle`,isLoading:o,children:a.handle}),(0,U.jsx)(DU,{title:`Status`,isLoading:o,children:a.status}),(0,U.jsx)(DU,{title:`Token`,isLoading:o,children:a.tokenPrefix?(0,U.jsx)(z2,{text:a.tokenPrefix,children:(0,U.jsxs)(`span`,{className:`font-mono text-sm`,children:[a.tokenPrefix,`â¦`]})}):(0,U.jsx)(N5,{})}),(0,U.jsx)(DU,{title:`Endpoint URL`,isLoading:o,children:a.gatewayUrl?(0,U.jsx)(z2,{text:a.gatewayUrl}):(0,U.jsx)(N5,{})}),(0,U.jsx)(DU,{title:`Created`,isLoading:o,children:Of(a.createdAt)}),(0,U.jsx)(DU,{title:`Created By`,isLoading:o,children:(0,U.jsx)(P5,{user:a.createdBy})}),s?(0,U.jsx)(DU,{title:`Revoked`,isLoading:o,children:a.revokedAt?Of(a.revokedAt):(0,U.jsx)(N5,{})}):null,s?(0,U.jsx)(DU,{title:`Revoked By`,isLoading:o,children:(0,U.jsx)(P5,{user:a.revokedBy})}):null]})]})}),children:(0,U.jsx)(j5,{isOpen:n,onClose:()=>r(!1),llmGatewayKey:a})})},jHe=()=>(0,U.jsx)(r5,{children:(0,U.jsx)(RBe,{})}),F5=()=>(0,U.jsx)(`div`,{className:`inline-block`,children:(0,U.jsx)(IE,{variant:`sm`,className:`top-1 -ml-1 relative group-hover:opacity-100 opacity-50`})}),MHe=({model:e})=>(0,U.jsx)(Y,{children:(0,U.jsx)(z2,{text:e.id,children:(0,U.jsx)(`span`,{className:G.type.darker,children:e.id})})}),NHe=({model:e})=>(0,U.jsx)(Y,{children:e.supported?(0,U.jsxs)(`div`,{className:`flex items-center gap-2 text-green-400 text-sm font-medium`,children:[(0,U.jsx)(UE,{variant:`sm`,color:`#00633f`}),` Yes`]}):(0,U.jsxs)(`div`,{className:`flex items-center gap-2 text-red-500 text-sm font-medium`,children:[(0,U.jsx)(YE,{variant:`sm`,color:`#901717`}),` No`]})}),PHe=()=>{let{id:e=``}=F(),{search:t,onChange:n}=_C(),[r,i]=(0,V.useState)(`id`),[a,o]=(0,V.useState)(`asc`),s=B(t=>Wb(t,{id:e})),c=B($o),l=s.environmentId??``;u(Qb());let d=I(Qb),f=(0,V.useMemo)(()=>({envId:l,orgId:c??``}),[l,c]);u(dx(f));let p=I(dx(f)).meta?.policy?.models,m=d.meta?.models||[],h=rC([...(Array.isArray(p)&&p.length>0?(()=>{let e=new Set,t=[];for(let n of p)if(n.includes(`*`)){let r=n.slice(0,n.indexOf(`*`));for(let n of m)n.id.startsWith(r)&&!e.has(n.id)&&(e.add(n.id),t.push(n))}else{let r=m.find(e=>e.id===n)??{id:n,supported:!1};e.has(r.id)||(e.add(r.id),t.push(r))}return t})():m).filter(e=>e.id.toLowerCase().includes(t.toLowerCase()))].sort((e,t)=>
148{let n=e[r],i=t[r];if(typeof n==`string`&&typeof i==`string`)return a===`asc`?n.localeCompare(i):i.localeCompare(n);if(typeof n==`boolean`&&typeof i==`boolean`){let e=+!!n,t=+!!i;return a===`asc`?e-t:t-e}return 0})),g=e=>{e===r?o(a===`asc`?`desc`:`asc`):(i(e),o(`asc`))};return(0,U.jsxs)(W,{children:[(0,U.jsx)(W,{size:`sm`,children:(0,U.jsxs)(PU,{children:[(0,U.jsx)(`div`,{className:`flex justify-between`,children:(0,U.jsxs)(W,{variant:`horizontal`,size:`sm`,className:`items-center`,children:[(0,U.jsx)(YH,{placeholder:`Search models...`,search:t,onChange:n}),(0,U.jsx)(LU,{isLoading:d.isLoading})]})}),(0,U.jsxs)(W,{variant:`horizontal`,size:`lg`,className:`items-center mt-1 flex-wrap justify-between gap-2`,children:[(0,U.jsxs)(W,{variant:`horizontal`,size:`lg`,className:`items-center`,children:[(0,U.jsxs)(IU,{children:[h.totalItems,` models`]}),(0,U.jsx)(RU,{...h})]}),l?(0,U.jsxs)(`span`,{className:`text-sm text-gray-600`,children:[`Model access is defined within the Environment's`,` `,(0,U.jsx)(P,{to:Va(l),className:`text-blue-600 underline hover:text-blue-800`,children:`LLM Gateway settings`}),`.`]}):null]})]})}),(0,U.jsxs)(VA,{children:[(0,U.jsxs)(HA,{children:[(0,U.jsxs)(KA,{className:`cursor-pointer hover:text-black group`,onClick:()=>g(`id`),children:[`Model Name `,(0,U.jsx)(F5,{})]}),(0,U.jsxs)(KA,{className:`cursor-pointer hover:text-black group`,onClick:()=>g(`supported`),children:[`Supported `,(0,U.jsx)(F5,{})]})]}),(0,U.jsx)(UA,{children:h.data.length===0?(0,U.jsx)(GA,{colSpan:2}):h.data.map(e=>(0,U.jsxs)(WA,{children:[(0,U.jsx)(MHe,{model:e}),(0,U.jsx)(NHe,{model:e})]},e.id))})]}),h.totalPages>1&&(0,U.jsx)(RU,{...h})]})},I5=(e={})=>{let{id:t=``}=F();return JSON.stringify({llmKeyId:t,...e})},FHe=({data:e})=>{let t=Are(`llm-key-detail-hover-tooltip`,I5({field:`tokens`,requestId:e.id}));return(0,U.jsx)(aA,{fluid:!0,text:(0,U.jsxs)(`div`,{className:`grid grid-cols-[6ch_1fr] gap-2`,children:[(0,U.jsx)(`div`,{className:`font-semibold`,children:`Input`}),(0,U.jsx)(`div`,{className:`text-right`,children:e.inputTokens.toLocaleString()}),(0,U.jsx)(`div`,{className:`font-semibold`,children:`Output`}),(0,U.jsx)(`div`,{className:`text-right`,children:e.outputTokens.toLocaleString()})]}),children:(0,U.jsx)(`span`,{...t,className:`border-b border-dotted border-gray-400`,children:e.totalTokens.toLocaleString()})})},IHe=({data:e})=>{let{id:t=``}=F(),n=I5({requestId:e.id});return(0,U.jsx)(`div`,{className:`flex justify-center items-center p-1 hover:bg-gray-200 rounded w-8 h-8`,children:(0,U.jsx)(P,{to:Hee(t,e.id),className:`flex justify-center items-center p-1 hover:bg-gray-200 rounded w-8 h-8`,onClick:()=>Ys(`llm-key-detail-request-detail-clicked`,n),children:(0,U.jsx)(PE,{className:`w-5 h-5 stroke-black hover:stroke-indigo`})})})},L5=()=>{let e=uw(`UTC`);return{start:e.subtract({days:7}),end:e}},LHe=({value:e,className:t,onChange:n})=>(0,U.jsxs)(`div`,{className:t,children:[(0,U.jsx)(RA,{htmlFor:`date-range-requests`,children:`Date & Time Range`}),(0,U.jsx)(lU,{id:`date-range-requests`,value:e,onChange:n,disableFuture:!0,useUTC:!0,maxRangeDays:7,quickRanges:[{label:`Last hour`,duration:`1h`},{label:`Last day`,duration:`1d`},{label:`Last 7 days`,duration:`7d`}],className:`w-full`})]}),RHe=({value:e,className:t,onChange:n})=>(0,U.jsxs)(`div`,{className:t,children:[(0,U.jsx)(RA,{htmlFor:`status-filter`,children:`Status`}),(0,U.jsx)(XA,{id:`status-filter`,value:e,options:[{label:`All`,value:``},{label:`Success`,value:`success`},{label:`Failure`,value:`failure`}],onSelect:e=>n(e.value),className:`w-full`})]}),zHe=({value:e,className:t,onChange:n})=>{u(Qb());let r=I(Qb).meta?.models||[],i=(0,V.useMemo)(()=>r.filter(e=>e.supported).map(e=>({value:e.id,label:e.id})),[r]);return(0,U.jsxs)(`div`,{className:t,children:[(0,U.jsx)(RA,{htmlFor:`model-filter`,children:`Model`}),(0,U.jsx)(C8,{id:`model-filter`,value:e,onChange:e=>n(e||``),options:[{value:``,label:`All Models`},...i],placeholder:`All Models`,className:`w-full`,searchPlaceholder:`Search models...`})]})},BHe=({onChange:e})=>{let[t,n]=(0,V.useState)(L5()),[r,i]=(0,V.useState)(``),[a,o]=(0,V.useState)(``);return(0,U.jsxs)(`div`,{className:`flex items-end gap-2 max-w-full`,children:[(0,U.jsx)(LHe,{className:`flex-shrink-0`,value:t,onChange:e=>{e?.start&&e?.end&&n(e)}}),(0,U.jsx)(RHe,{className:`flex-grow`,value:r,onChange:i}),(0,U.jsx)(zHe,{className:`flex-grow`,value:a,onChange:o}),(0,U.jsxs)(`div`,{className:`flex items-end gap-2 flex-shrink-0`,children:[(0,U.jsx)(K,{type:`button`,variant:`white`,size:`md`,onClick:()=>{let t=L5();n(t),i(``),o(``),e({startTime:t.start.toAbsoluteString(),endTime:t.end.toAbsoluteString(),status:``,model:``})},children:`Reset`}),(0,U.jsx)(K,{type:`button`,variant:`primary`,size:`md`,onClick:()=>{e({startTime:t.start.toAbsoluteString(),endTime:t.end.toAbsoluteString(),status:r,model:a})},children:`Apply Filters`})]})]})},VHe={startTime:`start_time`,totalTokens:`total_tokens`,spend:`spend`},HHe=()=>{let{id:e=``}=F(),t=L5(),[n,r]=(0,V.useState)({startTime:t.start.toAbsoluteString(),endTime:t.end.toAbsoluteString(),status:``,model:``}),[i,a]=(0,V.useState)(`start_time`),[o,s]=(0,V.useState)(`desc`),[c,l]=(0,V.useState)(1),d=()=>l(e=>e+1),f=()=>l(e=>e-1),p=(0,V.useMemo)(()=>$b({id:e,...n,sortBy:i||void 0,sortOrder:o||void 0,page:c,perPage:30}),[e,n,i,o,c]);u(p);let m=I(p),h=B(t=>rx(t,{llmKeyId:e})),{totalCount:g,totalPages:_}=m.meta||{},[v,y]=(0,V.useState)(0),[b,x]=(0,V.useState)(1);(0,V.useEffect)(()=>{g!=null&&y(g),_!=null&&x(Math.max(1,_))},[g,_]);let S=(0,V.useCallback)(t=>{let i=Object.keys(t).filter(e=>n[e]!==t[e]);i.length>0&&Ys(`llm-key-detail-filters-changed`,JSON.stringify({llmKeyId:e,...t,changedFilters:i})),r(t),l(1)},[e,n,r,l]),C=(0,V.useCallback)(t=>{t&&(Ys(`llm-key-detail-sort-changed`,JSON.stringify({llmKeyId:e,field:t.field,direction:t.direction})),a(VHe[t.field]??`start_time`),s(t.direction),l(1))},[e]),w=(0,V.useMemo)(()=>
148[{field:`id`,headerName:`Request ID`,sortable:!1,cellRenderer:({data:e})=>(0,U.jsx)(z2,{text:e.id,children:(0,U.jsx)(`span`,{className:`${G.type.darker} font-mono`,children:e.id})})},{field:`model`,headerName:`Model`,sortable:!1,cellRenderer:({data:e})=>(0,U.jsx)(z2,{text:e.model,children:(0,U.jsx)(`span`,{className:G.type.darker,children:e.model})})},{field:`status`,headerName:`Status`,sortable:!1,cellRenderer:({data:e})=>(0,U.jsx)(J2,{value:e.status,label:ul(e.status),valueToVariantMap:{success:`success`,failure:`error`}})},{field:`startTime`,headerName:`Timestamp (UTC)`,sortable:!0,initialSort:`desc`,cellRenderer:({data:e})=>(0,U.jsx)(Y2,{date:e.startTime})},{field:`durationSeconds`,headerName:`Duration`,sortable:!1,cellRenderer:({data:e})=>(0,U.jsx)(`span`,{className:G.type.darker,children:jf(e.durationSeconds)})},{field:`totalTokens`,headerName:`Tokens`,sortable:!0,getTooltip:({data:e})=>(0,U.jsxs)(`div`,{className:`grid grid-cols-[6ch_1fr] gap-2`,children:[(0,U.jsx)(`div`,{className:`font-semibold`,children:`Input`}),(0,U.jsx)(`div`,{className:`text-right`,children:e.inputTokens.toLocaleString()})]}),cellRenderer:FHe},{field:`spend`,headerName:`Cost`,sortable:!0,cellRenderer:({data:e})=>(0,U.jsx)(q2,{value:e.spend,decimalPlaces:4})},{colId:`actions`,sortable:!1,width:60,resizable:!1,suppressAutoSize:!0,suppressSizeToFit:!0,cellRenderer:IHe}],[e]);return(0,U.jsxs)(W,{children:[(0,U.jsx)(BHe,{onChange:S}),(0,U.jsx)(`hr`,{}),(0,U.jsx)(R2,{rowData:h,colDefs:w,isLoading:m.isLoading,searchable:!1,page:c,totalPages:b,totalItems:v,onPrev:f,onNext:d,onSort:C})]})},R5=(e,t,n)=>{let r=new Blob([e],{type:n}),i=URL.createObjectURL(r),a=document.createElement(`a`);a.href=i,a.download=t,a.click(),URL.revokeObjectURL(i)},z5=e(i(((e,t)=>{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r(Pe()):typeof define==`function`&&define.amd?define([`react`],r):typeof e==`object`?e.reactJsonView=r(Pe()):n.reactJsonView=r(n.React)})(e,e=>(()=>{var t={165(e,t,n){let r=n(877),i={};for(let e of Object.keys(r))i[r[e]]=e;let a={rgb:{channels:3,labels:`rgb`},hsl:{channels:3,labels:`hsl`},hsv:{channels:3,labels:`hsv`},hwb:{channels:3,labels:`hwb`},cmyk:{channels:4,labels:`cmyk`},xyz:{channels:3,labels:`xyz`},lab:{channels:3,labels:`lab`},lch:{channels:3,labels:`lch`},hex:{channels:1,labels:[`hex`]},keyword:{channels:1,labels:[`keyword`]},ansi16:{channels:1,labels:[`ansi16`]},ansi256:{channels:1,labels:[`ansi256`]},hcg:{channels:3,labels:[`h`,`c`,`g`]},apple:{channels:3,labels:[`r16`,`g16`,`b16`]},gray:{channels:1,labels:[`gray`]}};e.exports=a;for(let e of Object.keys(a)){if(!(`channels`in a[e]))throw Error(`missing channels property: `+e);if(!(`labels`in a[e]))throw Error(`missing channel labels property: `+e);if(a[e].labels.length!==a[e].channels)throw Error(`channel and label counts mismatch: `+e);let{channels:t,labels:n}=a[e];delete a[e].channels,delete a[e].labels,Object.defineProperty(a[e],"channels",{value:t}),Object.defineProperty(a[e],"labels",{value:n})}function o(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}a.rgb.hsl=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=a-i,s,c;a===i?s=0:t===a?s=(n-r)/o:n===a?s=2+(r-t)/o:r===a&&(s=4+(t-n)/o),s=Math.min(60*s,360),s<0&&(s+=360);let l=(i+a)/2;return c=a===i?0:l<=.5?o/(a+i):o/(2-a-i),[s,100*c,100*l]},a.rgb.hsv=function(e){let t,n,r,i,a,o=e[0]/255,s=e[1]/255,c=e[2]/255,l=Math.max(o,s,c),u=l-Math.min(o,s,c),d=function(e){return(l-e)/6/u+.5};return u===0?(i=0,a=0):(a=u/l,t=d(o),n=d(s),r=d(c),o===l?i=r-n:s===l?i=1/3+t-r:c===l&&(i=2/3+n-t),i<0?i+=1:i>1&&--i),[360*i,100*a,100*l]},a.rgb.hwb=function(e){let t=e[0],n=e[1],r=e[2],i=a.rgb.hsl(e)[0],o=1/255*Math.min(t,Math.min(n,r));return r=1-1/255*Math.max(t,Math.max(n,r)),[i,100*o,100*r]},a.rgb.cmyk=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(1-t,1-n,1-r);return[100*((1-t-i)/(1-i)||0),100*((1-n-i)/(1-i)||0),100*((1-r-i)/(1-i)||0),100*i]},a.rgb.keyword=function(e){let t=i[e];if(t)return t;let n,a=1/0;for(let t of Object.keys(r)){let i=o(e,r[t]);i<a&&(a=i,n=t)}return n}
148,a.keyword.rgb=function(e){return r[e]},a.rgb.xyz=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255;return t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,[100*(.4124*t+.3576*n+.1805*r),100*(.2126*t+.7152*n+.0722*r),100*(.0193*t+.1192*n+.9505*r)]},a.rgb.lab=function(e){let t=a.rgb.xyz(e),n=t[0],r=t[1],i=t[2];return n/=95.047,r/=100,i/=108.883,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,i=i>.008856?i**(1/3):7.787*i+16/116,[116*r-16,500*(n-r),200*(r-i)]},a.hsl.rgb=function(e){let t=e[0]/360,n=e[1]/100,r=e[2]/100,i,a,o;if(n===0)return o=255*r,[o,o,o];i=r<.5?r*(1+n):r+n-r*n;let s=2*r-i,c=[0,0,0];for(let e=0;e<3;e++)a=t+1/3*-(e-1),a<0&&a++,a>1&&a--,o=6*a<1?s+6*(i-s)*a:2*a<1?i:3*a<2?s+(i-s)*(2/3-a)*6:s,c[e]=255*o;return c},a.hsl.hsv=function(e){let t=e[0],n=e[1]/100,r=e[2]/100,i=n,a=Math.max(r,.01);return r*=2,n*=r<=1?r:2-r,i*=a<=1?a:2-a,[t,100*(r===0?2*i/(a+i):2*n/(r+n)),100*((r+n)/2)]},a.hsv.rgb=function(e){let t=e[0]/60,n=e[1]/100,r=e[2]/100,i=Math.floor(t)%6,a=t-Math.floor(t),o=255*r*(1-n),s=255*r*(1-n*a),c=255*r*(1-n*(1-a));switch(r*=255,i){case 0:return[r,c,o];case 1:return[s,r,o];case 2:return[o,r,c];case 3:return[o,s,r];case 4:return[c,o,r];case 5:return[r,o,s]}},a.hsv.hsl=function(e){let t=e[0],n=e[1]/100,r=e[2]/100,i=Math.max(r,.01),a,o;o=(2-n)*r;let s=(2-n)*i;return a=n*i,a/=s<=1?s:2-s,a||=0,o/=2,[t,100*a,100*o]},a.hwb.rgb=function(e){let t=e[0]/360,n=e[1]/100,r=e[2]/100,i=n+r,a;i>1&&(n/=i,r/=i);let o=Math.floor(6*t),s=1-r;a=6*t-o,1&o&&(a=1-a);let c=n+a*(s-n),l,u,d;switch(o){default:case 6:case 0:l=s,u=c,d=n;break;case 1:l=c,u=s,d=n;break;case 2:l=n,u=s,d=c;break;case 3:l=n,u=c,d=s;break;case 4:l=c,u=n,d=s;break;case 5:l=s,u=n,d=c}return[255*l,255*u,255*d]},a.cmyk.rgb=function(e){let t=e[0]/100,n=e[1]/100,r=e[2]/100,i=e[3]/100;return[255*(1-Math.min(1,t*(1-i)+i)),255*(1-Math.min(1,n*(1-i)+i)),255*(1-Math.min(1,r*(1-i)+i))]},a.xyz.rgb=function(e){let t=e[0]/100,n=e[1]/100,r=e[2]/100,i,a,o;return i=3.2406*t+-1.5372*n+-.4986*r,a=-.9689*t+1.8758*n+.0415*r,o=.0557*t+-.204*n+1.057*r,i=i>.0031308?1.055*i**(1/2.4)-.055:12.92*i,a=a>.0031308?1.055*a**(1/2.4)-.055:12.92*a,o=o>.0031308?1.055*o**(1/2.4)-.055:12.92*o,i=Math.min(Math.max(0,i),1),a=Math.min(Math.max(0,a),1),o=Math.min(Math.max(0,o),1),[255*i,255*a,255*o]},a.xyz.lab=function(e){let t=e[0],n=e[1],r=e[2];return t/=95.047,n/=100,r/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,[116*n-16,500*(t-n),200*(n-r)]},a.lab.xyz=function(e){let t,n,r;n=(e[0]+16)/116,t=e[1]/500+n,r=n-e[2]/200;let i=n**3,a=t**3,o=r**3;return n=i>.008856?i:(n-16/116)/7.787,t=a>.008856?a:(t-16/116)/7.787,r=o>.008856?o:(r-16/116)/7.787,t*=95.047,n*=100,r*=108.883,[t,n,r]},a.lab.lch=function(e){let t=e[0],n=e[1],r=e[2],i;return i=360*Math.atan2(r,n)/2/Math.PI,i<0&&(i+=360),[t,Math.sqrt(n*n+r*r),i]},a.lch.lab=function(e){let t=e[0],n=e[1],r=e[2]/360*2*Math.PI;return[t,n*Math.cos(r),n*Math.sin(r)]},a.rgb.ansi16=function(e,t=null){let[n,r,i]=e,o=t===null?a.rgb.hsv(e)[2]:t;if(o=Math.round(o/50),o===0)return 30;let s=30+(Math.round(i/255)<<2|Math.round(r/255)<<1|Math.round(n/255));return o===2&&(s+=60),s},a.hsv.ansi16=function(e){return a.rgb.ansi16(a.hsv.rgb(e),e[2])},a.rgb.ansi256=function(e){let t=e[0],n=e[1],r=e[2];return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},a.ansi16.rgb=function(e){let t=e%10;if(t===0||t===7)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];let n=.5*(1+~~(e>50));return[(1&t)*n*255,(t>>1&1)*n*255,(t>>2&1)*n*255]},a.ansi256.rgb=function(e){if(e>=232){let t=10*(e-232)+8;return[t,t,t]}let t;return e-=16,[Math.floor(e/36)/5*255,Math.floor((t=e%36)/6)/5*255,t%6/5*255]},a.rgb.hex=function(e){let t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return`000000`.substring(t.length)+t},a.hex.rgb=function(e){let t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let n=t[0];t[0].length===3&&(n=n.split(``).map(e=>e+e).join(``));let r=parseInt(n,16);return[r>>16&255,r>>8&255,255&r]},a.rgb.hcg=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.max(Math.max(t,n),r),a=Math.min(Math.min(t,n),r),o=i-a,s,c;return s=o<1?a/(1-o):0,c=o<=0?0:i===t?(n-r)/o%6:i===n?2+(r-t)/o:4+(t-n)/o,c/=6,c%=1,[360*c,100*o,100*s]},a.hsl.hcg=function(e){let t=e[1]/100,n=e[2]/100,r=n<.5?2*t*n:2*t*(1-n),i=0;return r<1&&(i=(n-.5*r)/(1-r)),[e[0],100*r,100*i]},a.hsv.hcg=function(e){let t=e[1]/100,n=e[2]/100,r=t*n,i=0;return r<1&&(i=(n-r)/(1-r)),[e[0],100*r,100*i]},a.hcg.rgb=function(e){let t=e[0]/360,n=e[1]/100,r=e[2]/100;if(n===0)return[255*r,255*r,255*r];let i=[0,0,0],a=t%1*6,o=a%1,s=1-o,c=0;switch(Math.floor(a)){case 0:i[0]=1,i[1]=o,i[2]=0;break;case 1:i[0]=s,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=o;break;case 3:i[0]=0,i[1]=s,i[2]=1;break;case 4:i[0]=o,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=s}return c=(1-n)*r,[255*(n*i[0]+c),255*(n*i[1]+c),255*(n*i[2]+c)]},a.hcg.hsv=function(e){let t=e[1]/100,n=t+e[2]/100*(1-t),r=0;return n>0&&(r=t/n),[e[0],100*r,100*n]},a.hcg.hsl=function(e){let t=e[1]/100,n=e[2]/100*(1-t)+.5*t,r=0;return n>0&&n<.5?r=t/(2*n):n>=.5&&n<1&&(r=t/(2*(1-n))),[e[0],100*r,100*n]},a.hcg.hwb=function(e){let t=e[1]/100,n=t+e[2]/100*(1-t);return[e[0],100*(n-t),100*(1-n)]},a.hwb.hcg=function(e){let t=e[1]/100,n=1-e[2]/100,r=n-t,i=0;return r<1&&(i=(n-r)/(1-r)),[e[0],100*r,100*i]},a.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},a.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},a.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},a.gray.hsl=function(e){return[0,0,e[0]]},a.gray.hsv=a.gray.hsl,a.gray.hwb=function(e){return[0,100,e[0]]},a.gray.cmyk=function(e){return[0,0,0,e[0]]},a.gray.lab=function(e){return[e[0],0,0]},a.gray.hex=function(e){let t=255&Math.round(e[0]/100*255),n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return`000000`.substring(n.length)+n},a.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}},880(e,t,n){let r=n(165),i=n(985),a={};
148Object.keys(r).forEach(e=>{a[e]={},Object.defineProperty(a[e],"channels",{value:r[e].channels}),Object.defineProperty(a[e],"labels",{value:r[e].labels});let t=i(e);Object.keys(t).forEach(n=>{let r=t[n];a[e][n]=function(e){let t=function(...t){let n=t[0];if(n==null)return n;n.length>1&&(t=n);let r=e(t);if(typeof r==`object`)for(let e=r.length,t=0;t<e;t++)r[t]=Math.round(r[t]);return r};return`conversion`in e&&(t.conversion=e.conversion),t}(r),a[e][n].raw=function(e){let t=function(...t){let n=t[0];return n==null?n:(n.length>1&&(t=n),e(t))};return`conversion`in e&&(t.conversion=e.conversion),t}(r)})}),e.exports=a},985(e,t,n){let r=n(165);function i(e){let t=function(){let e={},t=Object.keys(r);for(let n=t.length,r=0;r<n;r++)e[t[r]]={distance:-1,parent:null};return e}(),n=[e];for(t[e].distance=0;n.length;){let e=n.pop(),i=Object.keys(r[e]);for(let r=i.length,a=0;a<r;a++){let r=i[a],o=t[r];o.distance===-1&&(o.distance=t[e].distance+1,o.parent=e,n.unshift(r))}}return t}function a(e,t){return function(n){return t(e(n))}}function o(e,t){let n=[t[e].parent,e],i=r[t[e].parent][e],o=t[e].parent;for(;t[o].parent;)n.unshift(t[o].parent),i=a(r[t[o].parent][o],i),o=t[o].parent;return i.conversion=n,i}e.exports=function(e){let t=i(e),n={},r=Object.keys(t);for(let e=r.length,i=0;i<e;i++){let e=r[i];t[e].parent!==null&&(n[e]=o(e,t))}return n}},877(e){e.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87
148],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},138(e,t,n){var r=n(877),i=n(403),a=Object.hasOwnProperty,o=Object.create(null);for(var s in r)a.call(r,s)&&(o[r[s]]=s);var c=e.exports={to:{},get:{}};function l(e,t,n){return Math.min(Math.max(t,e),n)}function u(e){var t=Math.round(e).toString(16).toUpperCase();return t.length<2?`0`+t:t}c.get=function(e){var t,n;switch(e.substring(0,3).toLowerCase()){case`hsl`:t=c.get.hsl(e),n=`hsl`;break;case`hwb`:t=c.get.hwb(e),n=`hwb`;break;default:t=c.get.rgb(e),n=`rgb`}return t?{model:n,value:t}:null},c.get.rgb=function(e){if(!e)return null;var t,n,i,o=[0,0,0,1];if(t=e.match(/^#([a-f0-9]{6})([a-f0-9]{2})?$/i)){for(i=t[2],t=t[1],n=0;n<3;n++){var s=2*n;o[n]=parseInt(t.slice(s,s+2),16)}i&&(o[3]=parseInt(i,16)/255)}else if(t=e.match(/^#([a-f0-9]{3,4})$/i)){for(i=(t=t[1])[3],n=0;n<3;n++)o[n]=parseInt(t[n]+t[n],16);i&&(o[3]=parseInt(i+i,16)/255)}else if(t=e.match(/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)){for(n=0;n<3;n++)o[n]=parseInt(t[n+1],0);t[4]&&(t[5]?o[3]=.01*parseFloat(t[4]):o[3]=parseFloat(t[4]))}else{if(!(t=e.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/)))return(t=e.match(/^(\w+)$/))?t[1]===`transparent`?[0,0,0,0]:a.call(r,t[1])?((o=r[t[1]])[3]=1,o):null:null;for(n=0;n<3;n++)o[n]=Math.round(2.55*parseFloat(t[n+1]));t[4]&&(t[5]?o[3]=.01*parseFloat(t[4]):o[3]=parseFloat(t[4]))}for(n=0;n<3;n++)o[n]=l(o[n],0,255);return o[3]=l(o[3],0,1),o},c.get.hsl=function(e){if(!e)return null;var t=e.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(t){var n=parseFloat(t[4]);return[(parseFloat(t[1])%360+360)%360,l(parseFloat(t[2]),0,100),l(parseFloat(t[3]),0,100),l(isNaN(n)?1:n,0,1)]}return null},c.get.hwb=function(e){if(!e)return null;var t=e.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/);if(t){var n=parseFloat(t[4]);return[(parseFloat(t[1])%360+360)%360,l(parseFloat(t[2]),0,100),l(parseFloat(t[3]),0,100),l(isNaN(n)?1:n,0,1)]}return null},c.to.hex=function(){var e=i(arguments);return`#`+u(e[0])+u(e[1])+u(e[2])+(e[3]<1?u(Math.round(255*e[3])):``)},c.to.rgb=function(){var e=i(arguments);return e.length<4||e[3]===1?`rgb(`+Math.round(e[0])+`, `+Math.round(e[1])+`, `+Math.round(e[2])+`)`:`rgba(`+Math.round(e[0])+`, `+Math.round(e[1])+`, `+Math.round(e[2])+`, `+e[3]+`)`},c.to.rgb.percent=function(){var e=i(arguments),t=Math.round(e[0]/255*100),n=Math.round(e[1]/255*100),r=Math.round(e[2]/255*100);return e.length<4||e[3]===1?`rgb(`+t+`%, `+n+`%, `+r+`%)`:`rgba(`+t+`%, `+n+`%, `+r+`%, `+e[3]+`)`},c.to.hsl=function(){var e=i(arguments);return e.length<4||e[3]===1?`hsl(`+e[0]+`, `+e[1]+`%, `+e[2]+`%)`:`hsla(`+e[0]+`, `+e[1]+`%, `+e[2]+`%, `+e[3]+`)`},c.to.hwb=function(){var e=i(arguments),t=``;return e.length>=4&&e[3]!==1&&(t=`, `+e[3]),`hwb(`+e[0]+`, `+e[1]+`%, `+e[2]+`%`+t+`)`},c.to.keyword=function(e){return o[e.slice(0,3)]}},742(e,t,n){let r=n(138),i=n(880),a=[`keyword`,`gray`,`hex`],o={};for(let e of Object.keys(i))o[[...i[e].labels].sort().join(``)]=e;let s={};function c(e,t){if(!(this instanceof c))return new c(e,t);if(t&&t in a&&(t=null),t&&!(t in i))throw Error(`Unknown model: `+t);let n,l;if(e==null)this.model=`rgb`,this.color=[0,0,0],this.valpha=1;else if(e instanceof c)this.model=e.model,this.color=[...e.color],this.valpha=e.valpha;else if(typeof e==`string`){let t=r.get(e);if(t===null)throw Error(`Unable to parse color from string: `+e);this.model=t.model,l=i[this.model].channels,this.color=t.value.slice(0,l),this.valpha=typeof t.value[l]==`number`?t.value[l]:1}else if(e.length>0){this.model=t||`rgb`,l=i[this.model].channels;let n=Array.prototype.slice.call(e,0,l);this.color=f(n,l),this.valpha=typeof e[l]==`number`?e[l]:1}else if(typeof e==`number`)this.model=`rgb`,this.color=[e>>16&255,e>>8&255,255&e],this.valpha=1;else{this.valpha=1;let t=Object.keys(e);`alpha`in e&&(t.splice(t.indexOf(`alpha`),1),this.valpha=typeof e.alpha==`number`?e.alpha:0);let r=t.sort().join(``);if(!(r in o))throw Error(`Unable to parse color from object: `+JSON.stringify(e));this.model=o[r];let{labels:a}=i[this.model],s=[];for(n=0;n<a.length;n++)s.push(e[a[n]]);this.color=f(s)}if(s[this.model])for(l=i[this.model].channels,n=0;n<l;n++){let e=s[this.model][n];e&&(this.color[n]=e(this.color[n]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}c.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(e){let t=this.model in r.to?this:this.rgb();t=t.round(typeof e==`number`?e:1);let n=t.valpha===1?t.color:[...t.color,this.valpha];return r.to[t.model](n)}
148,percentString(e){let t=this.rgb().round(typeof e==`number`?e:1),n=t.valpha===1?t.color:[...t.color,this.valpha];return r.to.rgb.percent(n)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){let e={},{channels:t}=i[this.model],{labels:n}=i[this.model];for(let r=0;r<t;r++)e[n[r]]=this.color[r];return this.valpha!==1&&(e.alpha=this.valpha),e},unitArray(){let e=this.rgb().color;return e[0]/=255,e[1]/=255,e[2]/=255,this.valpha!==1&&e.push(this.valpha),e},unitObject(){let e=this.rgb().object();return e.r/=255,e.g/=255,e.b/=255,this.valpha!==1&&(e.alpha=this.valpha),e},round(e){return e=Math.max(e||0,0),new c([...this.color.map(l(e)),this.valpha],this.model)},alpha(e){return e===void 0?this.valpha:new c([...this.color,Math.max(0,Math.min(1,e))],this.model)},red:u(`rgb`,0,d(255)),green:u(`rgb`,1,d(255)),blue:u(`rgb`,2,d(255)),hue:u([`hsl`,`hsv`,`hsl`,`hwb`,`hcg`],0,e=>(e%360+360)%360),saturationl:u(`hsl`,1,d(100)),lightness:u(`hsl`,2,d(100)),saturationv:u(`hsv`,1,d(100)),value:u(`hsv`,2,d(100)),chroma:u(`hcg`,1,d(100)),gray:u(`hcg`,2,d(100)),white:u(`hwb`,1,d(100)),wblack:u(`hwb`,2,d(100)),cyan:u(`cmyk`,0,d(100)),magenta:u(`cmyk`,1,d(100)),yellow:u(`cmyk`,2,d(100)),black:u(`cmyk`,3,d(100)),x:u(`xyz`,0,d(95.047)),y:u(`xyz`,1,d(100)),z:u(`xyz`,2,d(108.833)),l:u(`lab`,0,d(100)),a:u(`lab`,1),b:u(`lab`,2),keyword(e){return e===void 0?i[this.model].keyword(this.color):new c(e)},hex(e){return e===void 0?r.to.hex(this.rgb().round().color):new c(e)},hexa(e){if(e!==void 0)return new c(e);let t=this.rgb().round().color,n=Math.round(255*this.valpha).toString(16).toUpperCase();return n.length===1&&(n=`0`+n),r.to.hex(t)+n},rgbNumber(){let e=this.rgb().color;return(255&e[0])<<16|(255&e[1])<<8|255&e[2]},luminosity(){let e=this.rgb().color,t=[];for(let[n,r]of e.entries()){let e=r/255;t[n]=e<=.04045?e/12.92:((e+.055)/1.055)**2.4}return .2126*t[0]+.7152*t[1]+.0722*t[2]},contrast(e){let t=this.luminosity(),n=e.luminosity();return t>n?(t+.05)/(n+.05):(n+.05)/(t+.05)},level(e){let t=this.contrast(e);return t>=7?`AAA`:t>=4.5?`AA`:``},isDark(){let e=this.rgb().color;return(2126*e[0]+7152*e[1]+722*e[2])/1e4<128},isLight(){return!this.isDark()},negate(){let e=this.rgb();for(let t=0;t<3;t++)e.color[t]=255-e.color[t];return e},lighten(e){let t=this.hsl();return t.color[2]+=t.color[2]*e,t},darken(e){let t=this.hsl();return t.color[2]-=t.color[2]*e,t},saturate(e){let t=this.hsl();return t.color[1]+=t.color[1]*e,t},desaturate(e){let t=this.hsl();return t.color[1]-=t.color[1]*e,t},whiten(e){let t=this.hwb();return t.color[1]+=t.color[1]*e,t},blacken(e){let t=this.hwb();return t.color[2]+=t.color[2]*e,t},grayscale(){let e=this.rgb().color,t=.3*e[0]+.59*e[1]+.11*e[2];return c.rgb(t,t,t)},fade(e){return this.alpha(this.valpha-this.valpha*e)},opaquer(e){return this.alpha(this.valpha+this.valpha*e)},rotate(e){let t=this.hsl(),n=t.color[0];return n=(n+e)%360,n=n<0?360+n:n,t.color[0]=n,t},mix(e,t){if(!e||!e.rgb)throw Error(`Argument to "mix" was not a Color instance, but rather an instance of `+typeof e);let n=e.rgb(),r=this.rgb(),i=t===void 0?.5:t,a=2*i-1,o=n.alpha()-r.alpha(),s=((a*o===-1?a:(a+o)/(1+a*o))+1)/2,l=1-s;return c.rgb(s*n.red()+l*r.red(),s*n.green()+l*r.green(),s*n.blue()+l*r.blue(),n.alpha()*i+r.alpha()*(1-i))}};for(let e of Object.keys(i)){if(a.includes(e))continue;let{channels:t}=i[e];c.prototype[e]=function(...t){return this.model===e?new c(this):t.length>0?new c(t,e):new c([...(n=i[this.model][e].raw(this.color),Array.isArray(n)?n:[n]),this.valpha],e);var n},c[e]=function(...n){let r=n[0];return typeof r==`number`&&(r=f(n,t)),new c(r,e)}}function l(e){return function(t){return function(e,t){return Number(e.toFixed(t))}(t,e)}}function u(e,t,n){e=Array.isArray(e)?e:[e];for(let r of e)(s[r]||(s[r]=[]))[t]=n;return e=e[0],function(r){let i;return r===void 0?(i=this[e]().color[t],n&&(i=n(i)),i):(n&&(r=n(r)),i=this[e](),i.color[t]=r,i)}}function d(e){return function(t){return Math.max(0,Math.min(e,t))}}function f(e,t){for(let n=0;n<t;n++)typeof e[n]!=`number`&&(e[n]=0);return e}e.exports=c},784(e){var t,n=typeof Reflect==`object`?Reflect:null,r=n&&typeof n.apply==`function`?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&typeof n.ownKeys==`function`?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function a(){a.init.call(this)}e.exports=a,e.exports.once=function(e,t){return new Promise(function(n,r){function i(n){e.removeListener(t,a),r(n)}function a(){typeof e.removeListener==`function`&&e.removeListener(`error`,i),n([].slice.call(arguments))}h(e,t,a,{once:!0}),t!==`error`&&function(e,t,n){typeof e.on==`function`&&h(e,`error`,t,n)}(e,i,{once:!0})})},a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var o=10;function s(e){if(typeof e!=`function`)throw TypeError(`The "listener" argument must be of type Function. Received type `+typeof e)}function c(e){return e._maxListeners===void 0?a.defaultMaxListeners:e._maxListeners}function l(e,t,n,r){var i,a,o,l;if(s(n),(a=e._events)===void 0?(a=e._events=Object.create(null),e._eventsCount=0):(a.newListener!==void 0&&(e.emit(`newListener`,t,n.listener?n.listener:n),a=e._events),o=a[t]),o===void 0)
vendor: 4,516 bytes, line 148
148o=a[t]=n,++e._eventsCount;else if(typeof o==`function`?o=a[t]=r?[n,o]:[o,n]:r?o.unshift(n):o.push(n),(i=c(e))>0&&o.length>i&&!o.warned){o.warned=!0;var u=Error(`Possible EventEmitter memory leak detected. `+o.length+` `+String(t)+` listeners added. Use emitter.setMaxListeners() to increase limit`);u.name=`MaxListenersExceededWarning`,u.emitter=e,u.type=t,u.count=o.length,l=u,console&&console.warn&&console.warn(l)}return e}function u(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=u.bind(r);return i.listener=n,r.wrapFn=i,i}function f(e,t,n){var r=e._events;if(r===void 0)return[];var i=r[t];return i===void 0?[]:typeof i==`function`?n?[i.listener||i]:[i]:n?function(e){for(var t=Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):m(i,i.length)}function p(e){var t=this._events;if(t!==void 0){var n=t[e];if(typeof n==`function`)return 1;if(n!==void 0)return n.length}return 0}function m(e,t){for(var n=Array(t),r=0;r<t;++r)n[r]=e[r];return n}function h(e,t,n,r){if(typeof e.on==`function`)r.once?e.once(t,n):e.on(t,n);else{if(typeof e.addEventListener!=`function`)throw TypeError(`The "emitter" argument must be of type EventEmitter. Received type `+typeof e);e.addEventListener(t,function i(a){r.once&&e.removeEventListener(t,i),n(a)})}}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return o},set:function(e){if(typeof e!=`number`||e<0||i(e))throw RangeError(`The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received `+e+`.`);o=e}}),a.init=function(){this._events!==void 0&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(e){if(typeof e!=`number`||e<0||i(e))throw RangeError(`The value of "n" is out of range. It must be a non-negative number. Received `+e+`.`);return this._maxListeners=e,this},a.prototype.getMaxListeners=function(){return c(this)},a.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var i=e===`error`,a=this._events;if(a!==void 0)i&&=a.error===void 0;else if(!i)return!1;if(i){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var s=Error(`Unhandled error.`+(o?` (`+o.message+`)`:``));throw s.context=o,s}var c=a[e];if(c===void 0)return!1;if(typeof c==`function`)r(c,this,t);else{var l=c.length,u=m(c,l);for(n=0;n<l;++n)r(u[n],this,t)}return!0},a.prototype.addListener=function(e,t){return l(this,e,t,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(e,t){return l(this,e,t,!0)},a.prototype.once=function(e,t){return s(t),this.on(e,d(this,e,t)),this},a.prototype.prependOnceListener=function(e,t){return s(t),this.prependListener(e,d(this,e,t)),this},a.prototype.removeListener=function(e,t){var n,r,i,a,o;if(s(t),(r=this._events)===void 0||(n=r[e])===void 0)return this;if(n===t||n.listener===t)--this._eventsCount===0?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit(`removeListener`,e,n.listener||t));else if(typeof n!=`function`){for(i=-1,a=n.length-1;a>=0;a--)if(n[a]===t||n[a].listener===t){o=n[a].listener,i=a;break}if(i<0)return this;i===0?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),n.length===1&&(r[e]=n[0]),r.removeListener!==void 0&&this.emit(`removeListener`,e,o||t)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(e){var t,n,r;if((n=this._events)===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[e]),this;if(arguments.length===0){var i,a=Object.keys(n);for(r=0;r<a.length;++r)(i=a[r])!==`removeListener`&&this.removeAllListeners(i);return this.removeAllListeners(`removeListener`),this._events=Object.create(null),this._eventsCount=0,this}if(typeof(t=n[e])==`function`)this.removeListener(e,t);else if(t!==void 0)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},a.prototype.listeners=function(e){return f(this,e,!0)},a.prototype.rawListeners=function(e){return f(this,e,!1)},a.listenerCount=function(e,t){return typeof e.listenerCount==`function`?e.listenerCount(t):p.c
148all(e,t)},a.prototype.listenerCount=p,a.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},94(e){e.exports=function(e){return!(!e||typeof e==`string`)&&(e instanceof Array||Array.isArray(e)||e.length>=0&&(e.splice instanceof Function||Object.getOwnPropertyDescriptor(e,e.length-1)&&e.constructor.name!==`String`))}},403(e,t,n){var r=n(94),i=Array.prototype.concat,a=Array.prototype.slice,o=e.exports=function(e){for(var t=[],n=0,o=e.length;n<o;n++){var s=e[n];r(s)?t=i.call(t,a.call(s)):t.push(s)}return t};o.wrap=function(e){return function(){return e(o(arguments))}}},119(t){t.exports=e}},n={};function r(e){var i=n[e];if(i!==void 0)return i.exports;var a=n[e]={exports:{}};return t[e](a,a.exports,r),a.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{typeof Symbol<`u`&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:`Module`}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return(()=>{function e(t){return e=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},e(t)}function t(t){var n=function(t,n){if(e(t)!=`object`||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,n||`default`);if(e(i)!=`object`)return i;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(n===`string`?String:Number)(t)}(t,`string`);return e(n)==`symbol`?n:n+``}function n(e,n,r){return(n=t(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]==null?{}:arguments[t];t%2?a(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function s(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function c(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,`value`in i&&(i.writable=!0),Object.defineProperty(e,t(i.key),i)}}function l(e,t,n){return t&&c(e.prototype,t),n&&c(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function u(e){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},u(e)}function d(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(d=function(){return!!e})()}function f(t,n){if(n&&(e(n)==`object`||typeof n==`function`))return n;if(n!==void 0)throw TypeError(`Derived constructors may only return object or undefined`);return function(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}(t)}function p(e,t,n){return t=u(t),f(e,d()?Reflect.construct(t,n||[],u(e).constructor):t.apply(e,n))}function m(e,t){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},m(e,t)}function h(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&m(e,t)}r.r(i),r.d(i,{default:()=>Ir});var g=r(119),_=r.n(g);function v(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);e!=null&&this.setState(e)}function y(e){this.setState(function(t){return this.constructor.getDerivedStateFromProps(e,t)??null}.bind(this))}function b(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function x(e){var t=e.prototype;if(!t||!t.isReactComponent)throw Error(`Can only polyfill class components`);if(typeof e.getDerivedStateFromProps!=`function`&&typeof t.getSnapshotBeforeUpdate!=`function`)return e;var n=null,r=null,i=null;if(typeof t.componentWillMount==`function`?n=`componentWillMount`:typeof t.UNSAFE_componentWillMount==`function`&&(n=`UNSAFE_componentWillMount`),typeof t.componentWillReceiveProps==`function`?r=`componentWillReceiveProps`:typeof t.UNSAFE_componentWillReceiveProps==`function`&&(r=`UNSAFE_componentWillReceiveProps`),typeof t.componentWillUpdate==`function`?i=`componentWillUpdate`:typeof t.UNSAFE_componentWillUpdate==`function`&&(i=`UNSAFE_componentWillUpdate`),n!==null||r!==null||i!==null){var a=e.displayName||e.name,o=typeof e.getDerivedStateFromProps==`function`?`getDerivedStateFromProps()`:`getSnapshotBeforeUpdate()`;throw Error(`Unsafe legacy lifecycles will not be called for components using new component APIs. 149 150`+a+` uses `+o+` but also contains the following legacy lifecycles:`+(n===null?``:` 151 `+n)+(r===null?``:` 152 `+r)+(i===null?``:` 153 `+i)+` 154 155The above lifecycles should be removed. Learn more about this warning here: 156https://fb.me/react-async-component-lifecycle-hooks`)}if(typeof e.getDerivedStateFromProps==`function`&&(t.componentWillMount=v,t.componentWillReceiveProps=y),typeof t.getSnapshotBeforeUpdate==`function`){if(typeof t.componentDidUpdate!=`function`)throw Error(`Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype`);t.componentWillUpdate=b;var s=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;s.call(this,e,t,r)}}return e}function S(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function C(e,t){if(e==null)return{};var n,r,i=S(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function w(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function T(e,t){if(e){if(typeof e==`string`)return w(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?w(e,t):void 0}}function E(e){return function(e){if(Array.isArray(e))return w(e)}(e)||function(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}(e)||T(e)||function(){throw TypeError(`Invalid attempt to spread non-iterable instance. 157In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function D(e,t){if(t&&e?.constructor===t)return`bigNumber`;var n=function(e){return{}.toString.call(e).match(/\s([a-zA-Z]+)/)[1].toLowerCase()}(e);return n===`number`&&(n=isNaN(e)?`nan`:(0|e)===e?`integer`:`float`),n}function O(e){return e.replace(/\\/g,`\\\\`).replace(/\n/g,`\\n`).replace(/\t/g,`\\t`).replace(/\r/g,`\\r`).replace(/\f/g,`\\f`)}v.__suppressDeprecationWarning=!0,y.__suppressDeprecationWarning=!0,b.__suppressDeprecationWarning=!0;var k=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=(e.parent_type,e.namespace),n=e.quotesOnKeys,r=e.indentWidth,i=e.theme,a=e.singleIndent,o=e.showComma,s=e.isLast,c=e.jsvRoot,l=e.name?e.name:``;return _().createElement(`div`,{className:`variable-row`},_().createElement(`span`,Object.assign({},R(i,`object-name`),{key:t},R(i,`objectKeyVal`,{paddingLeft:r*a})),_().createElement(`span`,{className:`object-key`}
157,n&&_().createElement(`span`,{style:{verticalAlign:`top`}},`"`),_().createElement(`span`,null,l),n&&_().createElement(`span`,{style:{verticalAlign:`top`}},`"`)),_().createElement(`span`,R(i,`colon`),`:`)),_().createElement(`span`,R(i,`circularReference`),`[CIRCULAR REFERENCE]`),o&&!s&&!c&&_().createElement(`span`,R(i,`comma`),`,`))}}])}(_().PureComponent),A={scheme:`rjv-default`,author:`mac gainor`,base00:`rgba(0, 0, 0, 0)`,base01:`rgb(245, 245, 245)`,base02:`rgb(235, 235, 235)`,base03:`#93a1a1`,base04:`rgba(0, 0, 0, 0.3)`,base05:`#586e75`,base06:`#073642`,base07:`#002b36`,base08:`#d33682`,base09:`#cb4b16`,base0A:`#dc322f`,base0B:`#859900`,base0C:`#6c71c4`,base0D:`#586e75`,base0E:`#2aa198`,base0F:`#268bd2`},j={scheme:`rjv-grey`,author:`mac gainor`,base00:`rgba(1, 1, 1, 0)`,base01:`rgba(1, 1, 1, 0.1)`,base02:`rgba(0, 0, 0, 0.2)`,base03:`rgba(1, 1, 1, 0.3)`,base04:`rgba(0, 0, 0, 0.4)`,base05:`rgba(1, 1, 1, 0.5)`,base06:`rgba(1, 1, 1, 0.6)`,base07:`rgba(1, 1, 1, 0.7)`,base08:`rgba(1, 1, 1, 0.8)`,base09:`rgba(1, 1, 1, 0.8)`,base0A:`rgba(1, 1, 1, 0.8)`,base0B:`rgba(1, 1, 1, 0.8)`,base0C:`rgba(1, 1, 1, 0.8)`,base0D:`rgba(1, 1, 1, 0.8)`,base0E:`rgba(1, 1, 1, 0.8)`,base0F:`rgba(1, 1, 1, 0.8)`};let M={white:`#fff`,black:`#000`,transparent:`rgba(1, 1, 1, 0)`,globalFontFamily:`monospace`,globalCursor:`default`,indentBlockWidth:`5px`,braceFontWeight:`bold`,braceCursor:`pointer`,ellipsisFontSize:`18px`,ellipsisLineHeight:`10px`,ellipsisCursor:`pointer`,keyMargin:`0px 5px`,keyLetterSpacing:`0.5px`,keyFontStyle:`none`,keyBorderRadius:`3px`,keyColonWeight:`bold`,keyVerticalAlign:`top`,keyOpacity:`0.85`,keyOpacityHover:`1`,keyValPaddingTop:`3px`,keyValPaddingBottom:`3px`,keyValPaddingRight:`5px`,keyValBorderLeft:`1px solid`,keyValBorderHover:`2px solid`,keyValPaddingHover:`3px 5px 3px 4px`,pushedContentMarginLeft:`6px`,variableValuePaddingRight:`6px`,nullFontSize:`11px`,nullFontWeight:`bold`,nullPadding:`1px 2px`,nullBorderRadius:`3px`,nanFontSize:`11px`,nanFontWeight:`bold`,nanPadding:`1px 2px`,nanBorderRadius:`3px`,undefinedFontSize:`11px`,undefinedFontWeight:`bold`,undefinedPadding:`1px 2px`,undefinedBorderRadius:`3px`,dataTypeFontSize:`11px`,dataTypeMarginRight:`4px`,datatypeOpacity:`0.8`,objectSizeBorderRadius:`3px`,objectSizeFontStyle:`italic`,objectSizeMargin:`0px 6px 0px 0px`,clipboardCursor:`pointer`,clipboardCheckMarginLeft:`-12px`,metaDataPadding:`0px 0px 0px 10px`,arrayGroupMetaPadding:`0px 0px 0px 4px`,iconContainerWidth:`17px`,tooltipPadding:`4px`,editInputMinWidth:`130px`,editInputBorderRadius:`2px`,editInputPadding:`5px`,editInputMarginRight:`4px`,editInputFontFamily:`monospace`,iconCursor:`pointer`,iconFontSize:`15px`,iconPaddingRight:`1px`,dateValueMarginLeft:`2px`,iconMarginRight:`3px`,detectedRowPaddingTop:`3px`,addKeyCoverBackground:`rgba(255, 255, 255, 0.3)`,addKeyCoverPosition:`absolute`,addKeyCoverPositionPx:`0px`,addKeyModalWidth:`200px`,addKeyModalMargin:`auto`,addKeyModalPadding:`10px`,addKeyModalRadius:`3px`,commaColor:`#666`,commaFontSize:`12px`,commaMarginRight:`4px`};var ee=r(742);let te=function(e){return e},ne=typeof global==`object`&&global&&global.Object===Object&&global;var re=typeof self==`object`&&self&&self.Object===Object&&self;let ie=ne||re||Function(`return this`)(),ae=ie.Symbol;var oe=Object.prototype,se=oe.hasOwnProperty,N=oe.toString,ce=ae?ae.toStringTag:void 0;let le=function(e){var t=se.call(e,ce),n=e[ce];try{e[ce]=void 0;var r=!0}catch{}var i=N.call(e);return r&&(t?e[ce]=n:delete e[ce]),i};var ue=Object.prototype.toString;let de=function(e){return ue.call(e)};var fe=ae?ae.toStringTag:void 0;let pe=function(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:fe&&fe in Object(e)?le(e):de(e)},me=function(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)},he=function(e){if(!me(e))return!1;var t=pe(e);return t==`[object Function]`||t==`[object GeneratorFunction]`||t==`[object AsyncFunction]`||t==`[object Proxy]`},ge=ie[`__core-js_shared__`];var _e,ve=(_e=/[^.]+$/.exec(ge&&ge.keys&&ge.keys.IE_PROTO||``))?`Symbol(src)_1.`+_e:``;let ye=function(e){return!!ve&&ve in e};var be=Function.prototype.toString;let xe=function(e){if(e!=null){try{return be.call(e)}catch{}try{return e+``}catch{}}return``};var Se=/^\[object .+?Constructor\]$/,P=Function.prototype,Ce=Object.prototype,we=P.toString,Te=Ce.hasOwnProperty,Ee=Reg
157Exp(`^`+we.call(Te).replace(/[\\^$.*+?()[\]{}|]/g,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`);let F=function(e){return!(!me(e)||ye(e))&&(he(e)?Ee:Se).test(xe(e))},I=function(e,t){return e?.[t]},De=function(e,t){var n=I(e,t);return F(n)?n:void 0};var Oe=De(ie,`WeakMap`);let ke=Oe&&new Oe,Ae=ke?function(e,t){return ke.set(e,t),e}:te;var je=Object.create;let Me=function(){function e(){}return function(t){if(!me(t))return{};if(je)return je(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),Ne=function(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Me(e.prototype),r=e.apply(n,t);return me(r)?r:n}},Pe=function(e,t,n){var r=1&t,i=Ne(e);return function t(){return(this&&this!==ie&&this instanceof t?i:e).apply(r?n:this,arguments)}},Fe=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)};var Ie=Math.max;let Le=function(e,t,n,r){for(var i=-1,a=e.length,o=n.length,s=-1,c=t.length,l=Ie(a-o,0),u=Array(c+l),d=!r;++s<c;)u[s]=t[s];for(;++i<o;)(d||i<a)&&(u[n[i]]=e[i]);for(;l--;)u[s++]=e[i++];return u};var Re=Math.max;let ze=function(e,t,n,r){for(var i=-1,a=e.length,o=-1,s=n.length,c=-1,l=t.length,u=Re(a-s,0),d=Array(u+l),f=!r;++i<u;)d[i]=e[i];for(var p=i;++c<l;)d[p+c]=t[c];for(;++o<s;)(f||i<a)&&(d[p+n[o]]=e[i++]);return d},Be=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r},Ve=function(){};function He(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}He.prototype=Me(Ve.prototype),He.prototype.constructor=He;let Ue=He,We=ke?function(e){return ke.get(e)}:function(){},Ge={};var Ke=Object.prototype.hasOwnProperty;let qe=function(e){for(var t=e.name+``,n=Ge[t],r=Ke.call(Ge,t)?n.length:0;r--;){var i=n[r],a=i.func;if(a==null||a==e)return i.name}return t};function Je(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}Je.prototype=Me(Ve.prototype),Je.prototype.constructor=Je;let Ye=Je,Xe=Array.isArray,Ze=function(e){return typeof e==`object`&&!!e},Qe=function(e,t){var n=-1,r=e.length;for(t||=Array(r);++n<r;)t[n]=e[n];return t},$e=function(e){if(e instanceof Ue)return e.clone();var t=new Ye(e.__wrapped__,e.__chain__);return t.__actions__=Qe(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t};var et=Object.prototype.hasOwnProperty;function tt(e){if(Ze(e)&&!Xe(e)&&!(e instanceof Ue)){if(e instanceof Ye)return e;if(et.call(e,`__wrapped__`))return $e(e)}return new Ye(e)}tt.prototype=Ve.prototype,tt.prototype.constructor=tt;let nt=tt,rt=function(e){var t=qe(e),n=nt[t];if(typeof n!=`function`||!(t in Ue.prototype))return!1;if(e===n)return!0;var r=We(n);return!!r&&e===r[0]};var it=Date.now;let at=function(e){var t=0,n=0;return function(){var r=it(),i=16-(r-n);if(n=r,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}},ot=at(Ae);var st=/\{\n\/\* \[wrapped with (.+)\] \*/,ct=/,? & /;let lt=function(e){var t=e.match(st);return t?t[1].split(ct):[]};var ut=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;let dt=function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?`& `:``)+t[r],t=t.join(n>2?`, `:` `),e.replace(ut,`{ 158/* [wrapped with `+t+`] */ 159`)},ft=function(e){return function(){return e}},pt=function(){try{var e=De(Object,`defineProperty`);return e({},``,{}),e}catch{}}(),mt=at(pt?function(e,t){return pt(e,`toString`,{configurable:!0,enumerable:!1,value:ft(t),writable:!0})}:te),ht=function(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&!1!==t(e[n],n,e););return e},gt=function(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a<i;)if(t(e[a],a,e))return a;return-1},_t=function(e){return e!=e},vt=function(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1},yt=function(e,t,n){return t==t?vt(e,t,n):gt(e,_t,n)},bt=function(e,t){return!!(e!=null&&e.length)&&yt(e,t,0)>-1};var xt=[[`ary`,128],[`bind`,1],[`bindKey`,2],[`curry`,8],[`curryRight`,16],[`flip`,512],[`partial`,32],[`partialRight`,64],[`rearg`,256]];let St=function(e,t){return ht(xt,function(n){var r=`_.`+n[0];
159t&n[1]&&!bt(e,r)&&e.push(r)}),e.sort()},Ct=function(e,t,n){var r=t+``;return mt(e,dt(r,St(lt(r),n)))},wt=function(e,t,n,r,i,a,o,s,c,l){var u=8&t;t|=u?32:64,4&(t&=~(u?64:32))||(t&=-4);var d=[e,t,i,u?a:void 0,u?o:void 0,u?void 0:a,u?void 0:o,s,c,l],f=n.apply(void 0,d);return rt(e)&&ot(f,d),f.placeholder=r,Ct(f,e,t)},Tt=function(e){return e.placeholder};var Et=/^(?:0|[1-9]\d*)$/;let Dt=function(e,t){var n=typeof e;return!!(t??=9007199254740991)&&(n==`number`||n!=`symbol`&&Et.test(e))&&e>-1&&e%1==0&&e<t};var Ot=Math.min;let kt=function(e,t){for(var n=e.length,r=Ot(t.length,n),i=Qe(e);r--;){var a=t[r];e[r]=Dt(a,n)?i[a]:void 0}return e};var At=`__lodash_placeholder__`;let jt=function(e,t){for(var n=-1,r=e.length,i=0,a=[];++n<r;){var o=e[n];o!==t&&o!==At||(e[n]=At,a[i++]=n)}return a},Mt=function e(t,n,r,i,a,o,s,c,l,u){var d=128&n,f=1&n,p=2&n,m=24&n,h=512&n,g=p?void 0:Ne(t);return function _(){for(var v=arguments.length,y=Array(v),b=v;b--;)y[b]=arguments[b];if(m)var x=Tt(_),S=Be(y,x);if(i&&(y=Le(y,i,a,m)),o&&(y=ze(y,o,s,m)),v-=S,m&&v<u){var C=jt(y,x);return wt(t,n,e,_.placeholder,r,y,C,c,l,u-v)}var w=f?r:this,T=p?w[t]:t;return v=y.length,c?y=kt(y,c):h&&v>1&&y.reverse(),d&&l<v&&(y.length=l),this&&this!==ie&&this instanceof _&&(T=g||Ne(T)),T.apply(w,y)}},Nt=function(e,t,n){var r=Ne(e);return function i(){for(var a=arguments.length,o=Array(a),s=a,c=Tt(i);s--;)o[s]=arguments[s];var l=a<3&&o[0]!==c&&o[a-1]!==c?[]:jt(o,c);return(a-=l.length)<n?wt(e,t,Mt,i.placeholder,void 0,o,l,void 0,void 0,n-a):Fe(this&&this!==ie&&this instanceof i?r:e,this,o)}},Pt=function(e,t,n,r){var i=1&t,a=Ne(e);return function t(){for(var o=-1,s=arguments.length,c=-1,l=r.length,u=Array(l+s),d=this&&this!==ie&&this instanceof t?a:e;++c<l;)u[c]=r[c];for(;s--;)u[c++]=arguments[++o];return Fe(d,i?n:this,u)}};var Ft=`__lodash_placeholder__`,It=128,Lt=Math.min;let Rt=function(e,t){var n=e[1],r=t[1],i=n|r,a=i<131,o=r==It&&n==8||r==It&&n==256&&e[7].length<=t[8]||r==384&&t[7].length<=t[8]&&n==8;if(!a&&!o)return e;1&r&&(e[2]=t[2],i|=1&n?0:4);var s=t[3];if(s){var c=e[3];e[3]=c?Le(c,s,t[4]):s,e[4]=c?jt(e[3],Ft):t[4]}return(s=t[5])&&(c=e[5],e[5]=c?ze(c,s,t[6]):s,e[6]=c?jt(e[5],Ft):t[6]),(s=t[7])&&(e[7]=s),r&It&&(e[8]=e[8]==null?t[8]:Lt(e[8],t[8])),e[9]??=t[9],e[0]=t[0],e[1]=i,e};var zt=/\s/;let Bt=function(e){for(var t=e.length;t--&&zt.test(e.charAt(t)););return t};var Vt=/^\s+/;let Ht=function(e){return e&&e.slice(0,Bt(e)+1).replace(Vt,``)},Ut=function(e){return typeof e==`symbol`||Ze(e)&&pe(e)==`[object Symbol]`};var Wt=/^[-+]0x[0-9a-f]+$/i,Gt=/^0b[01]+$/i,Kt=/^0o[0-7]+$/i,qt=parseInt;let Jt=function(e){if(typeof e==`number`)return e;if(Ut(e))return NaN;if(me(e)){var t=typeof e.valueOf==`function`?e.valueOf():e;e=me(t)?t+``:t}if(typeof e!=`string`)return e===0?e:+e;e=Ht(e);var n=Gt.test(e);return n||Kt.test(e)?qt(e.slice(2),n?2:8):Wt.test(e)?NaN:+e};var Yt=1/0;let Xt=function(e){return e?(e=Jt(e))===Yt||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:e===0?e:0},Zt=function(e){var t=Xt(e),n=t%1;return t==t?n?t-n:t:0};var Qt=Math.max;let $t=function(e,t,n,r,i,a,o,s){var c=2&t;if(!c&&typeof e!=`function`)throw TypeError(`Expected a function`);var l=r?r.length:0;if(l||(t&=-97,r=i=void 0),o=o===void 0?o:Qt(Zt(o),0),s=s===void 0?s:Zt(s),l-=i?i.length:0,64&t){var u=r,d=i;r=i=void 0}var f=c?void 0:We(e),p=[e,t,n,r,i,u,d,a,o,s];if(f&&Rt(p,f),e=p[0],t=p[1],n=p[2],r=p[3],i=p[4],!(s=p[9]=p[9]===void 0?c?0:e.length:Qt(p[9]-l,0))&&24&t&&(t&=-25),t&&t!=1)m=t==8||t==16?Nt(e,t,s):t!=32&&t!=33||i.length?Mt.apply(void 0,p):Pt(e,t,n,r);else var m=Pe(e,t,n);return Ct((f?Ae:ot)(m,p),e,t)};function en(e,t,n){var r=$t(e,8,void 0,void 0,void 0,void 0,void 0,t=n?void 0:t);return r.placeholder=en.placeholder,r}en.placeholder={};let tn=en,L={threezerotwofour:{scheme:`threezerotwofour`,author:`jan t. sott (http://github.com/idleberg)`,base00:`#090300`,base01:`#3a3432`,base02:`#4a4543`,base03:`#5c5855`,base04:`#807d7c`,base05:`#a5a2a2`,base06:`#d6d5d4`,base07:`#f7f7f7`,base08:`#db2d20`,base09:`#e8bbd0`,base0A:`#fded02`,base0B:`#01a252`,base0C:`#b5e4f4`,base0D:`#01a0e4`,base0E:`#a16a94`,base0F:`#cdab53`},apathy:{scheme:`apathy`,author:`jannik siebert (https://github.com/janniks)`,base00:`#031A16`,base01:`#0B342D`,base02:`#184E45`,base03:`#2B685E`,base04:`#5F9C92`,base05:`#81B5AC`,base06:`#A7CEC8`,base07:`#D2E7E4`,base08:`#3E9688`,base09:`#3E7996`,base0A:`#3E4C96`,base0B:`#883E96`,base0C:`#963E4C`,base0D:`#96883E`,base0E:`#4C963E`,base0F:`#3E965B`},ashes:{scheme:`ashes`,author:`jannik siebert (https://github.com/janniks)`,base00:`#1C2023`,base01:`#393F45`,base02:`#565E65`,base03:`#747C84`,base04:`#ADB3BA`,base05:`#C7CCD1`,base06:`#DFE2E5`,base07:`#F3F4F5`,base08:`#C7AE95`,base09:`#C7C795`,base0A:`#AEC795`,base0B:`#95C7AE`,base0C:`#95AEC7`,base0D:`#AE95C7`,base0E:`#C795AE`,base0F:`#C79595`},atelierDune:{scheme:`atelier dune`,author:`bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune)`,base00:`#20201d`,base01:`#292824`,base02:`#6e6b5e`,base03:`#7d7a68`,base04:`#999580`,base05:`#a6a28c`,base06:`#e8e4cf`,base07:`#fefbec`,base08:`#d73737`,base09:`#b65611`,base0A:`#cfb017`,base0B:`#60ac39`,base0C:`#1fad83`,base0D:`#6684e1`,base0E:`#b854d4`,base0F:`#d43552`},atelierForest:{scheme:`atelier forest`,author:`bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/forest)`,base00:`#1b1918`,base01:`#2c2421`,base02:`#68615e`,base03:`#766e6b`,base04:`#9c9491`,base05:`#a8a19f`,base06:`#e6e2e0`,base07:`#f1efee`,base08:`#f22c40`,base09:`#df5320`,base0A:`#d5911a`,base0B:`#5ab738`,base0C:`#00ad9c`,base0D:`#407ee7`,base0E:`#6666ea`,base0F:`#c33ff3`},atelierHeath:{scheme:`atelier heath`,author:`bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/heath)`,base00:`#1b181b`,base01:`#292329`,base02:`#695d69`,base03:`#776977`,base04:`#9e8f9e`,base05:`#ab9bab`,base06:`#d8cad8`,base07:`#f7f3f7`,base08:`#ca402b`,base09:`#a65926`,base0A:`#bb8a35`,base0B:`#379a37`,base0C:`#159393`,base0D:`#516aec`,base0E:`#7b59c0`,base0F:`#cc33cc`},atelierLakeside:{scheme:`atelier lakeside`,author:`bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/lakeside/)`,base00:`#161b1d`,base01:`#1f292e`,base02:`#516d7b`,base03:`#5a7b8c`,base04:`#7195a8`,base05:`#7ea2b4`,base06:`#c1e4f6`,base07:`#ebf8ff`,base08:`#d22d72`,base09:`#935c25`,base0A:`#8a8a0f`,base0B:`#568c3b`,base0C:`#2d8f6f`,base0D:`#257fad`,base0E:`#5d5db1`,base0F:`#b72dd2`},atelierSeaside:{scheme:`atelier seaside`,author:`bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/seaside/)`,base00:`#131513`,base01:`#242924`,base02:`#5e6e5e`,base03:`#687d68`,base04:`#809980`,base05:`#8ca68c`,base06:`#cfe8cf`,base07:`#f0fff0`,base08:`#e6193c`,base09:`#87711d`,base0A:`#c3c322`,base0B:`#29a329`,base0C:`#1999b3`,base0D:`#3d62f5`,base0E:`#ad2bee`,base0F:`#e619c3`},bespin:{scheme:`bespin`,author:`jan t. sott`,base00:`#28211c`,base01:`#36312e`,base02:`#5e5d5c`,base03:`#666666`,base04:`#797977`,base05:`#8a8986`,base06:`#9d9b97`,base07:`#baae9e`,base08:`#cf6a4c`,base09:`#cf7d34`,base0A:`#f9ee98`,base0B:`#54be0d`,base0C:`#afc4db`,base0D:`#5ea6ea`,base0E:`#9b859d`,base0F:`#937121`},brewer:{scheme:`brewer`,author:`timothée poisot (http://github.com/tpoisot)`,base00:`#0c0d0e`,base01:`#2e2f30`,base02:`#515253`,base03:`#737475`,base04:`#959697`,base05:`#b7b8b9`,base06:`#dadbdc`,base07:`#fcfdfe`,base08:`#e31a1c`,base09:`#e6550d`,base0A:`#dca060`,base0B:`#3
1591a354`,base0C:`#80b1d3`,base0D:`#3182bd`,base0E:`#756bb1`,base0F:`#b15928`},bright:{scheme:`bright`,author:`chris kempson (http://chriskempson.com)`,base00:`#000000`,base01:`#303030`,base02:`#505050`,base03:`#b0b0b0`,base04:`#d0d0d0`,base05:`#e0e0e0`,base06:`#f5f5f5`,base07:`#ffffff`,base08:`#fb0120`,base09:`#fc6d24`,base0A:`#fda331`,base0B:`#a1c659`,base0C:`#76c7b7`,base0D:`#6fb3d2`,base0E:`#d381c3`,base0F:`#be643c`},chalk:{scheme:`chalk`,author:`chris kempson (http://chriskempson.com)`,base00:`#151515`,base01:`#202020`,base02:`#303030`,base03:`#505050`,base04:`#b0b0b0`,base05:`#d0d0d0`,base06:`#e0e0e0`,base07:`#f5f5f5`,base08:`#fb9fb1`,base09:`#eda987`,base0A:`#ddb26f`,base0B:`#acc267`,base0C:`#12cfc0`,base0D:`#6fc2ef`,base0E:`#e1a3ee`,base0F:`#deaf8f`},codeschool:{scheme:`codeschool`,author:`brettof86`,base00:`#232c31`,base01:`#1c3657`,base02:`#2a343a`,base03:`#3f4944`,base04:`#84898c`,base05:`#9ea7a6`,base06:`#a7cfa3`,base07:`#b5d8f6`,base08:`#2a5491`,base09:`#43820d`,base0A:`#a03b1e`,base0B:`#237986`,base0C:`#b02f30`,base0D:`#484d79`,base0E:`#c59820`,base0F:`#c98344`},colors:{scheme:`colors`,author:`mrmrs (http://clrs.cc)`,base00:`#111111`,base01:`#333333`,base02:`#555555`,base03:`#777777`,base04:`#999999`,base05:`#bbbbbb`,base06:`#dddddd`,base07:`#ffffff`,base08:`#ff4136`,base09:`#ff851b`,base0A:`#ffdc00`,base0B:`#2ecc40`,base0C:`#7fdbff`,base0D:`#0074d9`,base0E:`#b10dc9`,base0F:`#85144b`},default:{scheme:`default`,author:`chris kempson (http://chriskempson.com)`,base00:`#181818`,base01:`#282828`,base02:`#383838`,base03:`#585858`,base04:`#b8b8b8`,base05:`#d8d8d8`,base06:`#e8e8e8`,base07:`#f8f8f8`,base08:`#ab4642`,base09:`#dc9656`,base0A:`#f7ca88`,base0B:`#a1b56c`,base0C:`#86c1b9`,base0D:`#7cafc2`,base0E:`#ba8baf`,base0F:`#a16946`},eighties:{scheme:`eighties`,author:`chris kempson (http://chriskempson.com)`,base00:`#2d2d2d`,base01:`#393939`,base02:`#515151`,base03:`#747369`,base04:`#a09f93`,base05:`#d3d0c8`,base06:`#e8e6df`,base07:`#f2f0ec`,base08:`#f2777a`,base09:`#f99157`,base0A:`#ffcc66`,base0B:`#99cc99`,base0C:`#66cccc`,base0D:`#6699cc`,base0E:`#cc99cc`,base0F:`#d27b53`},embers:{scheme:`embers`,author:`jannik siebert (https://github.com/janniks)`,base00:`#16130F`,base01:`#2C2620`,base02:`#433B32`,base03:`#5A5047`,base04:`#8A8075`,base05:`#A39A90`,base06:`#BEB6AE`,base07:`#DBD6D1`,base08:`#826D57`,base09:`#828257`,base0A:`#6D8257`,base0B:`#57826D`,base0C:`#576D82`,base0D:`#6D5782`,base0E:`#82576D`,base0F:`#825757`},flat:{scheme:`flat`,author:`chris kempson (http://chriskempson.com)`,base00:`#2C3E50`,base01:`#34495E`,base02:`#7F8C8D`,base03:`#95A5A6`,base04:`#BDC3C7`,base05:`#e0e0e0`,base06:`#f5f5f5`,base07:`#ECF0F1`,base08:`#E74C3C`,base09:`#E67E22`,base0A:`#F1C40F`,base0B:`#2ECC71`,base0C:`#1ABC9C`,base0D:`#3498DB`,base0E:`#9B59B6`,base0F:`#be643c`},google:{scheme:`google`,author:`seth wright (http://sethawright.com)`,base00:`#1d1f21`,base01:`#282a2e`,base02:`#373b41`,base03:`#969896`,base04:`#b4b7b4`,base05:`#c5c8c6`,base06:`#e0e0e0`,base07:`#ffffff`,base08:`#CC342B`,base09:`#F96A38`,base0A:`#FBA922`,base0B:`#198844`,base0C:`#3971ED`,base0D:`#3971ED`,base0E:`#A36AC7`,base0F:`#3971ED`},grayscale:{scheme:`grayscale`,author:`alexandre gavioli (https://github.com/alexx2/)`,base00:`#101010`,base01:`#252525`,base02:`#464646`,base03:`#525252`,base04:`#ababab`,base05:`#b9b9b9`,base06:`#e3e3e3`,base07:`#f7f7f7`,base08:`#7c7c7c`,base09:`#999999`,base0A:`#a0a0a0`,base0B:`#8e8e8e`,base0C:`#868686`,base0D:`#686868`,base0E:`#747474`,base0F:`#5e5e5e`},greenscreen:{scheme:`green screen`,author:`chris kempson (http://chriskempson.com)`,base00:`#001100`,base01:`#003300`,base02:`#005500`,base03:`#007700`,base04:`#009900`,base05:`#00bb00`,base06:`#00dd00`,base07:`#00ff00`,base08:`#007700`,base09:`#009900`,base0A:`#007700`,base0B:`#00bb00`,base0C:`#005500`,base0D:`#009900`,base0E:`#00bb00`,base0F:`#005500`},harmonic:{scheme:`harmonic16`,author:`jannik siebert (https://github.com/janniks)`,base00:`#0b1c2c`,base01:`#223b54`,base02:`#405c79`,base03:`#627e99`,base04:`#aabcce`,base05:`#cbd6e2`,base06:`#e5ebf1`,base07:`#f7f9fb`,base08:`#bf8b56`,base09:`#bfbf56`,base0A:`#8bbf56`,base0B:`#56bf8b`,base0C:`#568bbf`,base0D:`#8b56bf`,base0E:`#bf568b`,base0F:`#bf5656`},hopscotch:{scheme:`hopscotch`,author:`jan t. sott`,base00:`#322931`,base01:`#433b42`,base02:`#5c545b`,base03:`#797379`,base04:`#989498`,base05:`#b9b5b8`,base06:`#d5d3d5`,base07:`#ffffff`,base08:`#dd464c`,base09:`#fd8b19`,base0A:`#fdcc59`,base0B:`#8fc13e`,base0C:`#149b93`,base0D:`#1290bf`,base0E:`#c85e7c`,base0F:`#b33508`},isotope:{scheme:`isotope`,author:`jan t. sott`,base00:`#000000`,base01:`#404040`,base02:`#606060`,base03:`#808080`,base04:`#c0c0c0`,base05:`#d0d0d0`,base06:`#e0e0e0`,base07:`#ffffff`,base08:`#ff0000`,base09:`#ff9900`,base0A:`#ff0099`,base0B:`#33ff00`,base0C:`#00ffff`,base0D:`#0066ff`,base0E:`#cc00ff`,base0F:`#3300ff`},marrakesh:{scheme:`marrakesh`,author:`alexandre gavioli (http://github.com/alexx2/)`,base00:`#201602`,base01:`#302e00`,base02:`#5f5b17`,base03:`#6c6823`,base04:`#86813b`,base05:`#948e48`,base06:`#ccc37a`,base07:`#faf0a5`,base08:`#c35359`,base09:`#b36144`,base0A:`#a88339`,base0B:`#18974e`,base0C:`#75a738`,base0D:`#477ca1`,base0E:`#8868b3`,base0F:`#b3588e`},mocha:{scheme:`mocha`,author:`chris kempson (http://chriskempson.com)`,base00:`#3B3228`,base01:`#534636`,base02:`#645240`,base03:`#7e705a`,base04:`#b8afad`,base05:`#d0c8c6`,base06:`#e9e1dd`,base07:`#f5eeeb`,base08:`#cb6077`,base09:`#d28b71`,base0A:`#f4bc87`,base0B:`#beb55b`,base0C:`#7bbda4`,base0D:`#8ab3b5`,base0E:`#a89bb9`,base0F:`#bb9584`},monokai:{scheme:`monokai`,author:`wimer hazenberg (http://www.monokai.nl)`,base00:`#272822`,base01:`#383830`,base02:`#49483e`,base03:`#75715e`,base04:`#a59f85`,base05:`#f8f8f2`,base06:`#f5f4f1`,base07:`#f9f8f5`,base08:`#f92672`,base09:`#fd971f`,base0A:`#f4bf75`,base0B:`#a6e22e`,base0C:`#a1efe4`,base0D:`#66d9ef`,base0E:`#ae81ff`,base0F:`#cc6633`},nicinabox:{scheme:`nicinabox`,author:`nicinabox (http://github.com/nicinabox)`,base00:`#2A2F3A`,base01:`#3C444F`,base02:`#4F5A65`,base03:`#BEBEBE`,base04:`#b0b0b0`,base05:`#d0d0d0`,base06:`#FFFFFF`,base07:`#f5f5f5`,base08:`#fb9fb1`,base09:`#FC6D24`,base0A:`#ddb26f`,base0B:`#A1C659`,base0C:`#12cfc0`,base0D:`#6FB3D2`,base0E:`#D381C3`,base0F:`#deaf8f`},ocean:{scheme:`ocean`,author:`chris kempson (http://chriskempson.com)`,base00:`#2b303b`,base01:`#343d46`,base02:`#4f5b66`,base03:`#65737e`,base04:`#a7a
159dba`,base05:`#c0c5ce`,base06:`#dfe1e8`,base07:`#eff1f5`,base08:`#bf616a`,base09:`#d08770`,base0A:`#ebcb8b`,base0B:`#a3be8c`,base0C:`#96b5b4`,base0D:`#8fa1b3`,base0E:`#b48ead`,base0F:`#ab7967`},paraiso:{scheme:`paraiso`,author:`jan t. sott`,base00:`#2f1e2e`,base01:`#41323f`,base02:`#4f424c`,base03:`#776e71`,base04:`#8d8687`,base05:`#a39e9b`,base06:`#b9b6b0`,base07:`#e7e9db`,base08:`#ef6155`,base09:`#f99b15`,base0A:`#fec418`,base0B:`#48b685`,base0C:`#5bc4bf`,base0D:`#06b6ef`,base0E:`#815ba4`,base0F:`#e96ba8`},pop:{scheme:`pop`,author:`chris kempson (http://chriskempson.com)`,base00:`#000000`,base01:`#202020`,base02:`#303030`,base03:`#505050`,base04:`#b0b0b0`,base05:`#d0d0d0`,base06:`#e0e0e0`,base07:`#ffffff`,base08:`#eb008a`,base09:`#f29333`,base0A:`#f8ca12`,base0B:`#37b349`,base0C:`#00aabb`,base0D:`#0e5a94`,base0E:`#b31e8d`,base0F:`#7a2d00`},railscasts:{scheme:`railscasts`,author:`ryan bates (http://railscasts.com)`,base00:`#2b2b2b`,base01:`#272935`,base02:`#3a4055`,base03:`#5a647e`,base04:`#d4cfc9`,base05:`#e6e1dc`,base06:`#f4f1ed`,base07:`#f9f7f3`,base08:`#da4939`,base09:`#cc7833`,base0A:`#ffc66d`,base0B:`#a5c261`,base0C:`#519f50`,base0D:`#6d9cbe`,base0E:`#b6b3eb`,base0F:`#bc9458`},shapeshifter:{scheme:`shapeshifter`,author:`tyler benziger (http://tybenz.com)`,base00:`#000000`,base01:`#040404`,base02:`#102015`,base03:`#343434`,base04:`#555555`,base05:`#ababab`,base06:`#e0e0e0`,base07:`#f9f9f9`,base08:`#e92f2f`,base09:`#e09448`,base0A:`#dddd13`,base0B:`#0ed839`,base0C:`#23edda`,base0D:`#3b48e3`,base0E:`#f996e2`,base0F:`#69542d`},solarized:{scheme:`solarized`,author:`ethan schoonover (http://ethanschoonover.com/solarized)`,base00:`#002b36`,base01:`#073642`,base02:`#586e75`,base03:`#657b83`,base04:`#839496`,base05:`#93a1a1`,base06:`#eee8d5`,base07:`#fdf6e3`,base08:`#dc322f`,base09:`#cb4b16`,base0A:`#b58900`,base0B:`#859900`,base0C:`#2aa198`,base0D:`#268bd2`,base0E:`#6c71c4`,base0F:`#d33682`},summerfruit:{scheme:`summerfruit`,author:`christopher corley (http://cscorley.github.io/)`,base00:`#151515`,base01:`#202020`,base02:`#303030`,base03:`#505050`,base04:`#B0B0B0`,base05:`#D0D0D0`,base06:`#E0E0E0`,base07:`#FFFFFF`,base08:`#FF0086`,base09:`#FD8900`,base0A:`#ABA800`,base0B:`#00C918`,base0C:`#1faaaa`,base0D:`#3777E6`,base0E:`#AD00A1`,base0F:`#cc6633`},tomorrow:{scheme:`tomorrow`,author:`chris kempson (http://chriskempson.com)`,base00:`#1d1f21`,base01:`#282a2e`,base02:`#373b41`,base03:`#969896`,base04:`#b4b7b4`,base05:`#c5c8c6`,base06:`#e0e0e0`,base07:`#ffffff`,base08:`#cc6666`,base09:`#de935f`,base0A:`#f0c674`,base0B:`#b5bd68`,base0C:`#8abeb7`,base0D:`#81a2be`,base0E:`#b294bb`,base0F:`#a3685a`},tube:{scheme:`london tube`,author:`jan t. sott`,base00:`#231f20`,base01:`#1c3f95`,base02:`#5a5758`,base03:`#737171`,base04:`#959ca1`,base05:`#d9d8d8`,base06:`#e7e7e8`,base07:`#ffffff`,base08:`#ee2e24`,base09:`#f386a1`,base0A:`#ffd204`,base0B:`#00853e`,base0C:`#85cebc`,base0D:`#009ddc`,base0E:`#98005d`,base0F:`#b06110`},twilight:{scheme:`twilight`,author:`david hart (http://hart-dev.com)`,base00:`#1e1e1e`,base01:`#323537`,base02:`#464b50`,base03:`#5f5a60`,base04:`#838184`,base05:`#a7a7a7`,base06:`#c3c3c3`,base07:`#ffffff`,base08:`#cf6a4c`,base09:`#cda869`,base0A:`#f9ee98`,base0B:`#8f9d6a`,base0C:`#afc4db`,base0D:`#7587a6`,base0E:`#9b859d`,base0F:`#9b703f`}},nn=L.default,rn=Object.keys(nn),an=e=>{let[t,n,r]=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255;return[.299*t+.587*n+.114*r,-.14713*t+-.28886*n+.436*r,.615*t+-.51499*n+-.10001*r]}(ee(e).array());var i;let a=function(e){let t=e[0],n=e[1],r=e[2],i,a,o;return i=1*t+0*n+1.13983*r,a=1*t+-.39465*n+-.5806*r,o=1*t+2.02311*n+0*r,i=Math.min(Math.max(0,i),1),a=Math.min(Math.max(0,a),1),o=Math.min(Math.max(0,o),1),[255*i,255*a,255*o]}([(i=t,i<.25?1:i<.5?.9-i:1.1-i),n,r]);return ee.rgb(a).hex()},on=e=>t=>({className:[t.className,e.className].filter(Boolean).join(` `),style:{...t.style||{},...e.style||{}}}),sn=(e,t)=>{let n=Object.keys(t);for(let t in e)n.indexOf(t)===-1&&n.push(t);return n.reduce((n,r)=>(n[r]=((e,t)=>{if(e===void 0)return t;if(t===void 0)return e;let n=typeof t;switch(typeof e){case`string`:switch(n){case`string`:return[t,e].filter(
159Boolean).join(` `);case`object`:return on({className:e,style:t});case`function`:return(n,...r)=>on({className:e})(t(n,...r))}break;case`object`:switch(n){case`string`:return on({className:t,style:e});case`object`:return{...t,...e};case`function`:return(n,...r)=>on({style:e})(t(n,...r))}break;case`function`:switch(n){case`string`:return(n,...r)=>e(on(n)({className:t}),...r);case`object`:return(n,...r)=>e(on(n)({style:t}),...r);case`function`:return(n,...r)=>e(t(n,...r),...r)}}})(e[r],t[r]),n),{})},cn=(e,t,...n)=>{if(t===null)return e;Array.isArray(t)||(t=[t]);let r=t.map(t=>e[t]).filter(Boolean).reduce((e,t)=>(typeof t==`string`?e.className=[e.className,t].filter(Boolean).join(` `):typeof t==`object`?e.style={...e.style,...t}:typeof t==`function`&&(e={...e,...t(e,...n)}),e),{className:``,style:{}});return r.className||delete r.className,Object.keys(r.style).length===0&&delete r.style,r},ln=e=>Object.keys(e).reduce((t,n)=>(t[n]=/^base/.test(n)?an(e[n]):n===`scheme`?e[n]+`:inverted`:e[n],t),{}),un=tn((e,t={},n={},...r)=>{let{defaultBase16:i=nn,base16Themes:a=null}=t,o=fn(n,a);o&&(n={...o,...n});let s=rn.reduce((e,t)=>(e[t]=n[t]||i[t],e),{}),c=Object.keys(n).reduce((e,t)=>(rn.indexOf(t)===-1&&(e[t]=n[t]),e),{}),l=e(s),u=sn(c,l);return tn(cn,2)(u,...r)},3),dn=e=>!!e.extend,fn=(e,t)=>{if(e&&dn(e)&&e.extend&&(e=e.extend),typeof e==`string`){let[n,r]=e.split(`:`);e=t?t[n]:L[n],r===`inverted`&&(e=ln(e))}return e&&Object.prototype.hasOwnProperty.call(e,`base00`)?e:void 0};var pn=function(e){var t=function(e){return{backgroundColor:e.base00,ellipsisColor:e.base09,braceColor:e.base07,expandedIcon:e.base0D,collapsedIcon:e.base0E,keyColor:e.base07,arrayKeyColor:e.base0C,objectSize:e.base04,copyToClipboard:e.base0F,copyToClipboardCheck:e.base0D,objectBorder:e.base02,dataTypes:{boolean:e.base0E,date:e.base0D,float:e.base0B,function:e.base0D,integer:e.base0F,string:e.base09,nan:e.base08,null:e.base0A,undefined:e.base05,regexp:e.base0A,background:e.base02,bigNumber:e.base09},editVariable:{editIcon:e.base0E,cancelIcon:e.base09,removeIcon:e.base09,addIcon:e.base0E,checkIcon:e.base0E,background:e.base01,color:e.base0A,border:e.base07},addKeyModal:{background:e.base05,border:e.base04,color:e.base0A,labelColor:e.base01},validationFailure:{background:e.base09,iconColor:e.base01,fontColor:e.base01}}}(e);return{"app-container":{fontFamily:M.globalFontFamily,cursor:M.globalCursor,backgroundColor:t.backgroundColor,position:`relative`},ellipsis:{display:`inline-block`,color:t.ellipsisColor,fontSize:M.ellipsisFontSize,lineHeight:M.ellipsisLineHeight,cursor:M.ellipsisCursor},"brace-row":{display:`inline-block`,cursor:`pointer`},brace:{display:`inline-block`,cursor:M.braceCursor,fontWeight:M.braceFontWeight,color:t.braceColor},"expanded-icon":{color:t.expandedIcon},"collapsed-icon":{color:t.collapsedIcon},colon:{display:`inline-block`,margin:M.keyMargin,color:t.keyColor,verticalAlign:`top`},objectKeyVal:function(e,n){return{style:o({paddingTop:M.keyValPaddingTop,paddingRight:M.keyValPaddingRight,paddingBottom:M.keyValPaddingBottom,borderLeft:M.keyValBorderLeft+` `+t.objectBorder,":hover":{paddingLeft:n.paddingLeft-1+`px`,borderLeft:M.keyValBorderHover+` `+t.objectBorder}},n)}},"object-key-val-no-border":{padding:M.keyValPadding},"pushed-content":{marginLeft:M.pushedContentMarginLeft},variableValue:function(e,t){return{style:o({display:`inline-block`,paddingRight:M.variableValuePaddingRight,position:`relative`},t)}},"object-name":{display:`inline-block`,color:t.keyColor,letterSpacing:M.keyLetterSpacing,fontStyle:M.keyFontStyle,verticalAlign:M.keyVerticalAlign,opacity:M.keyOpacity,":hover":{opacity:M.keyOpacityHover}},"array-key":{display:`inline-block`,color:t.arrayKeyColor,letterSpacing:M.keyLetterSpacing,fontStyle:M.keyFontStyle,verticalAlign:M.keyVerticalAlign,opacity:M.keyOpacity,":hover":{opacity:M.keyOpacityHover}},"object-size":{color:t.objectSize,borderRadius:M.objectSizeBorderRadius,fontStyle:M.objectSizeFontStyle,margin:M.objectSizeMargin,cursor:`default`},"data-type-label":{fontSize:M.dataTypeFontSize,marginRight:M.dataTypeMarginRight,opacity:M.datatypeOpacity},boolean:{display:`inline-block`,color:t.dataTypes.boolean},date:{display:`inline-block`,color:t.dataTypes.date},"date-value":{marginLeft:M.dateValueMarginLeft},float:{display:`inline-block`,color:t.dataTypes.float},function:{display:`inline-block`,color:t.dataTypes.function,cursor:`pointer`,whiteSpace:`pre-line`},"function-value":{fontStyle:`italic`},integer:{display:`inline-block`,color:t.dataTypes.integer},bigNumber:{display:`inline-block`,color:t.dataTypes.bigNumber},string:{display:`inline-block`,color:t.dataTypes.string},nan:{display:`inline-block`,color:t.dataTypes.nan,fontSize:M.nanFontSize,fontWeight:M.nanFontWeight,backgroundColor:t.dataTypes.background,padding:M.nanPadding,borderRadius:M.nanBorderRadius},null:{display:`inline-block`,color:t.dataTypes.null,fontSize:M.nullFontSize,fontWeight:M.nullFontWeight,backgroundColor:t.dataTypes.background,padding:M.nullPadding,borderRadius:M.nullBorderRadius},undefined:{display:`inline-block`,color:t.dataTypes.undefined,fontSize:M.undefinedFontSize,padding:M.undefinedPadding,borderRadius:M.undefinedBorderRadius,backgroundColor:t.dataTypes.background},circularReference:{display:`inline-block`,color:t.dataTypes.null,fontSize:M.nullFontSize,fontWeight:M.nullFontWeight,backgroundColor:t.dataTypes.background,padding:M.nullPadding,borderRadius:M.nullBorderRadius}
159,regexp:{display:`inline-block`,color:t.dataTypes.regexp},"copy-to-clipboard":{cursor:M.clipboardCursor},"copy-icon":{color:t.copyToClipboard,fontSize:M.iconFontSize,marginRight:M.iconMarginRight,verticalAlign:`top`},"copy-icon-copied":{color:t.copyToClipboardCheck,marginLeft:M.clipboardCheckMarginLeft},"array-group-meta-data":{display:`inline-block`,padding:M.arrayGroupMetaPadding},"object-meta-data":{display:`inline-block`,padding:M.metaDataPadding},"icon-container":{display:`inline-block`,width:M.iconContainerWidth},tooltip:{padding:M.tooltipPadding},removeVarIcon:{verticalAlign:`top`,display:`inline-block`,color:t.editVariable.removeIcon,cursor:M.iconCursor,fontSize:M.iconFontSize,marginRight:M.iconMarginRight},addVarIcon:{verticalAlign:`top`,display:`inline-block`,color:t.editVariable.addIcon,cursor:M.iconCursor,fontSize:M.iconFontSize,marginRight:M.iconMarginRight},editVarIcon:{verticalAlign:`top`,display:`inline-block`,color:t.editVariable.editIcon,cursor:M.iconCursor,fontSize:M.iconFontSize,marginRight:M.iconMarginRight},"edit-icon-container":{display:`inline-block`,verticalAlign:`top`},"check-icon":{display:`inline-block`,cursor:M.iconCursor,color:t.editVariable.checkIcon,fontSize:M.iconFontSize,paddingRight:M.iconPaddingRight},"cancel-icon":{display:`inline-block`,cursor:M.iconCursor,color:t.editVariable.cancelIcon,fontSize:M.iconFontSize,paddingRight:M.iconPaddingRight},"edit-input":{display:`inline-block`,minWidth:M.editInputMinWidth,borderRadius:M.editInputBorderRadius,backgroundColor:t.editVariable.background,color:t.editVariable.color,padding:M.editInputPadding,marginRight:M.editInputMarginRight,fontFamily:M.editInputFontFamily},"detected-row":{paddingTop:M.detectedRowPaddingTop},"key-modal-request":{position:M.addKeyCoverPosition,top:M.addKeyCoverPositionPx,left:M.addKeyCoverPositionPx,right:M.addKeyCoverPositionPx,bottom:M.addKeyCoverPositionPx,backgroundColor:M.addKeyCoverBackground},"key-modal":{width:M.addKeyModalWidth,backgroundColor:t.addKeyModal.background,marginLeft:M.addKeyModalMargin,marginRight:M.addKeyModalMargin,padding:M.addKeyModalPadding,borderRadius:M.addKeyModalRadius,marginTop:`15px`,position:`relative`},"key-modal-label":{color:t.addKeyModal.labelColor,marginLeft:`2px`,marginBottom:`5px`,fontSize:`11px`},"key-modal-input-container":{overflow:`hidden`},"key-modal-input":{width:`100%`,padding:`3px 6px`,fontFamily:`monospace`,color:t.addKeyModal.color,border:`none`,boxSizing:`border-box`,borderRadius:`2px`},"key-modal-cancel":{backgroundColor:t.editVariable.removeIcon,position:`absolute`,top:`0px`,right:`0px`,borderRadius:`0px 3px 0px 3px`,cursor:`pointer`},"key-modal-cancel-icon":{color:t.addKeyModal.labelColor,fontSize:M.iconFontSize,transform:`rotate(45deg)`},"key-modal-submit":{color:t.editVariable.addIcon,fontSize:M.iconFontSize,position:`absolute`,right:`2px`,top:`3px`,cursor:`pointer`},"function-ellipsis":{display:`inline-block`,color:t.ellipsisColor,fontSize:M.ellipsisFontSize,lineHeight:M.ellipsisLineHeight,cursor:M.ellipsisCursor},"validation-failure":{float:`right`,padding:`3px 6px`,borderRadius:`2px`,cursor:`pointer`,color:t.validationFailure.fontColor,backgroundColor:t.validationFailure.background},"validation-failure-label":{marginRight:`6px`},"validation-failure-clear":{position:`relative`,verticalAlign:`top`,cursor:`pointer`,color:t.validationFailure.iconColor,fontSize:M.iconFontSize,transform:`rotate(45deg)`},comma:{display:`inline-block`,color:M.commaColor,fontSize:M.commaFontSize,marginRight:M.commaMarginRight,cursor:`default`}}},mn=function(e){var t=A;return!1!==e&&e!==`none`||(t=j),un(pn,{defaultBase16:t})(e)};function R(e,t,n){return e||console.error(`theme has not been set`),mn(e)(t,n)}var hn=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.typeName,n=e.displayDataTypes,r=e.theme;return n?_().createElement(`span`,Object.assign({className:`data-type-label`},R(r,`data-type-label`)),t):null}}])}(_().PureComponent),gn=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props;return _().createElement(`div`,R(e.theme,`boolean`),_().createElement(hn,Object.assign({typeName:`bool`},e)),e.value?`true`:`false`)}}])}(_().PureComponent),_n=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props;return _().createElement(`div`,R(e.theme,`date`),_().createElement(hn,Object.assign({typeName:`date`},e)),_().createElement(`span`,Object.assign({className:`date-value`},R(e.theme,`date-value`)),e.value.toLocaleTimeString(`en-us`,{weekday:`short`,year:`numeric`,month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`})))}}])}(_().PureComponent),vn=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props;return _().createElement(`div`,R(e.theme,`float`),_().createElement(hn,Object.assign({typeName:`float`},e)),this.props.value)}}])}(_().PureComponent),yn=r(784),bn=function(){return l(function e(){s(this,e),this.handler=function(){}},[{key:`register`,value:function(e){this.handler=e}},{key:`dispatch`,value:function(e){var t;(t=this.handler)==null||t.call(this,e)}}])}();globalThis.__globalDispatcherInstance||(globalThis.__globalDispatcherInstance=new bn);let xn=globalThis.__globalDispatcherInstance;var Sn=`updated_src`,Cn=new(function(e){function t(){var e;s(this,t);var n=[...arguments];return(e=p(this,t,[].concat(n))).objects={},e.set=function(t,n,r,i){e.objects[t]===void 0&&(e.objects[t]={}),e.objects[t][n]===void 0&&(e.objects[t][n]={}),e.objects[t][n][r]=i},e.get=function(t,n,r,i){return e.objects[t]===void 0||e.objects[t][n]===void 0||e.objects[t][n][r]===void 0?i:e.objects[t][n][r]},e.handleAction=function(t){var n=t.rjvId,r=t.data;switch(t.name){case`RESET`:e.emit(`reset-`+n);break;case`VARIABLE_UPDATED`:t.data[Sn]=e.updateSrc(n,r),e.set(n,`action`,`variable-update`,o(o({},r),{},{type:`variable-edited`})),e.emit(`variable-update-`+n);break;case`VARIABLE_REMOVED`:t.data[Sn]=e.updateSrc(n,r),e.set(n,`action`,`variable-update`,o(o({},r),{},{type:`variable-removed`})),e.emit(`variable-update-`+n);break;case`VARIABLE_ADDED`:t.data[Sn]=e.updateSrc(n,r),e.set(n,`action`,`variable-update`,o(o({},r),{},{type:`variable-added`})),e.emit(`variable-update-`+n);break;case`ADD_VARIABLE_KEY_REQUEST`:e.set(n,`action`,`new-key-request`,r),e.emit(`add-key-request-`+n)}},e.updateSrc=function(t,n){var r=n.name,i=n.namespace,a=n.new_value,o=n.variable_removed;i.shift();var s,c=e.get(t,`global`,`src`),l=e.deepCopy(c,E(i)),u=l,d=function(e,t){var n=typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];
159if(!n){if(Array.isArray(e)||(n=T(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError(`Invalid attempt to iterate non-iterable instance. 160In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||n.return==null||n.return()}finally{if(s)throw a}}}}(i);try{for(d.s();!(s=d.n()).done;)u=u[s.value]}catch(e){d.e(e)}finally{d.f()}return o?D(u)===`array`?u.splice(r,1):delete u[r]:r===null?l=a:u[r]=a,e.set(t,`global`,`src`,l),l},e.deepCopy=function(t,n){var r,i=D(t),a=n.shift();return i===`array`?r=E(t):i===`object`&&(r=o({},t)),a!==void 0&&(r[a]=e.deepCopy(t[a],n)),r},e}return h(t,e),l(t)}(yn.EventEmitter));xn.register(Cn.handleAction.bind(Cn));let wn=Cn;var Tn=function(e){function t(e){var n;return s(this,t),(n=p(this,t,[e])).handleToggleCollapsed=function(){n.setState({collapsed:!n.state.collapsed},function(){wn.set(n.props.rjvId,n.props.namespace,`collapsed`,n.state.collapsed)})},n.getFunctionDisplay=function(e){var t=n.props;return e?_().createElement(`span`,null,n.props.value.toString().slice(9,-1).replace(/\{[\s\S]+/,``),_().createElement(`span`,{className:`function-collapsed`,style:{fontWeight:`bold`}},_().createElement(`span`,null,`{`),_().createElement(`span`,R(t.theme,`ellipsis`),`...`),_().createElement(`span`,null,`}`))):n.props.value.toString().slice(9,-1)},n.state={collapsed:wn.get(e.rjvId,e.namespace,`collapsed`,!0)},n}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=this.state.collapsed;return _().createElement(`div`,R(e.theme,`function`),_().createElement(hn,Object.assign({typeName:`function`},e)),_().createElement(`span`,Object.assign({},R(e.theme,`function-value`),{className:`rjv-function-container`,onClick:this.handleToggleCollapsed}),this.getFunctionDisplay(t)))}}])}(_().PureComponent),En=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){return _().createElement(`div`,R(this.props.theme,`nan`),`NaN`)}}])}(_().PureComponent),Dn=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){return _().createElement(`div`,R(this.props.theme,`null`),`NULL`)}}])}(_().PureComponent),On=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props;return _().createElement(`div`,R(e.theme,`integer`),_().createElement(hn,Object.assign({typeName:`int`},e)),this.props.value)}}])}(_().PureComponent),kn=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props;return _().createElement(`div`,R(e.theme,`regexp`),_().createElement(hn,Object.assign({typeName:`regexp`},e)),this.props.value.toString())}}])}(_().PureComponent),An=function(e){function t(e){var n;return s(this,t),(n=p(this,t,[e])).handleToggleCollapsed=function(){n.setState({collapsed:!n.state.collapsed},function(){wn.set(n.props.rjvId,n.props.namespace,`collapsed`,n.state.collapsed)})},n.state={collapsed:wn.get(e.rjvId,e.namespace,`collapsed`,!0)},n}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.state.collapsed,t=this.props,n=t.collapseStringsAfterLength,r=t.theme,i=t.escapeStrings,a=t.value,o=D(n)===`integer`,s={style:{cursor:`default`,wordBreak:`break-all`}};return i&&(a=O(a)),o&&a.length>n&&(s.style.cursor=`pointer`,e&&(a=_().createElement(`span`,null,a.substring(0,n),_().createElement(`span`,R(r,`ellipsis`),` ...`)))),_().createElement(`div`,R(r,`string`),_().createElement(hn,Object.assign({typeName:`string`},t)),_().createElement(`span`,Object.assign({className:`string-value`},s,{onClick:this.handleToggleCollapsed}),`"`,a,`"`))}}])}(_().PureComponent),jn=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){return _().createElement(`div`,R(this.props.theme,`undefined`),`undefined`)}}])}(_().PureComponent),Mn=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props;return _().createElement(`div`,R(e.theme,`bigNumber`),_().createElement(hn,Object.assign({typeName:`bigNumber`},e)),this.props.value.toString())}}])}(_().PureComponent);function Nn(){return Nn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Nn.apply(null,arguments)}var Pn=g.useLayoutEffect,Fn=function(e,t){typeof e==`function`?e(t):e.current=t},In={"min-height":`0`,"max-height":`none`,height:`0`,visibility:`hidden`,overflow:`hidden`,position:`absolute`,"z-index":`-1000`,top:`0`,right:`0`,display:`block`}
160,Ln=function(e){Object.keys(In).forEach(function(t){e.style.setProperty(t,In[t],`important`)})},Rn=null,zn=function(e,t){var n=e.scrollHeight;return t.sizingStyle.boxSizing===`border-box`?n+t.borderSize:n-t.paddingSize},Bn=function(){},Vn=[`borderBottomWidth`,`borderLeftWidth`,`borderRightWidth`,`borderTopWidth`,`boxSizing`,`fontFamily`,`fontSize`,`fontStyle`,`fontWeight`,`letterSpacing`,`lineHeight`,`paddingBottom`,`paddingLeft`,`paddingRight`,`paddingTop`,`tabSize`,`textIndent`,`textRendering`,`textTransform`,`width`,`wordBreak`,`wordSpacing`,`scrollbarGutter`],Hn=!!document.documentElement.currentStyle,Un=function(e){var t=window.getComputedStyle(e);if(t===null)return null;var n,r=(n=t,Vn.reduce(function(e,t){return e[t]=n[t],e},{})),i=r.boxSizing;return i===``?null:(Hn&&i===`border-box`&&(r.width=parseFloat(r.width)+parseFloat(r.borderRightWidth)+parseFloat(r.borderLeftWidth)+parseFloat(r.paddingRight)+parseFloat(r.paddingLeft)+`px`),{sizingStyle:r,paddingSize:parseFloat(r.paddingBottom)+parseFloat(r.paddingTop),borderSize:parseFloat(r.borderBottomWidth)+parseFloat(r.borderTopWidth)})};function Wn(e,t,n){var r,i,a=(r=n,i=_().useRef(r),Pn(function(){i.current=r}),i);g.useLayoutEffect(function(){var n=function(e){return a.current(e)};if(e)return e.addEventListener(t,n),function(){return e.removeEventListener(t,n)}},[])}var Gn=[`cacheMeasurements`,`maxRows`,`minRows`,`onChange`,`onHeightChange`],Kn=g.forwardRef(function(e,t){var n=e.cacheMeasurements,r=e.maxRows,i=e.minRows,a=e.onChange,o=a===void 0?Bn:a,s=e.onHeightChange,c=s===void 0?Bn:s,l=S(e,Gn),u=l.value!==void 0,d=g.useRef(null),f=function(e,t){var n=_().useRef();return _().useCallback(function(r){e.current=r,n.current&&Fn(n.current,null),n.current=t,t&&Fn(t,r)},[t])}(d,t),p=g.useRef(0),m=g.useRef(),h=function(){var e=d.current,t=n&&m.current?m.current:Un(e);if(t){m.current=t;var a=function(e,t,n,r){n===void 0&&(n=1),r===void 0&&(r=1/0),Rn||((Rn=document.createElement(`textarea`)).setAttribute(`tabindex`,`-1`),Rn.setAttribute(`aria-hidden`,`true`),Ln(Rn)),Rn.parentNode===null&&document.body.appendChild(Rn);var i=e.paddingSize,a=e.borderSize,o=e.sizingStyle,s=o.boxSizing;Object.keys(o).forEach(function(e){var t=e;Rn.style[t]=o[t]}),Ln(Rn),Rn.value=t;var c=zn(Rn,e);Rn.value=t,c=zn(Rn,e),Rn.value=`x`;var l=Rn.scrollHeight-i,u=l*n;s===`border-box`&&(u=u+i+a),c=Math.max(u,c);var d=l*r;return s===`border-box`&&(d=d+i+a),[c=Math.min(d,c),l]}(t,e.value||e.placeholder||`x`,i,r),o=a[0],s=a[1];p.current!==o&&(p.current=o,e.style.setProperty(`height`,o+`px`,`important`),c(o,{rowHeight:s}))}};return g.useLayoutEffect(h),function(e,t){Wn(document.body,`reset`,function(n){e.current.form===n.target&&t(n)})}(d,function(){if(!u){var e=d.current.value;requestAnimationFrame(function(){var t=d.current;t&&e!==t.value&&h()})}}),Wn(window,`resize`,h),function(e){Wn(document.fonts,`loadingdone`,e)}(h),g.createElement(`textarea`,Nn({},l,{onChange:function(e){u||h(),o(e)},ref:f}))});function qn(e,t){e=e.trim();
160try{if((e=structuredClone(e))[0]===`[`)return Jn(`array`,JSON.parse(e));if(e[0]===`{`)return Jn(`object`,JSON.parse(e));if(e.match(/-?\d+\.\d+/)&&e.match(/-?\d+\.\d+/)[0]===e)return t&&parseFloat(e).toString()!==e?Jn(`bigNumber`,e):Jn(`float`,parseFloat(e));if(e.match(/-?\d+e-\d+/)&&e.match(/-?\d+e-\d+/)[0]===e)return Jn(`float`,Number(e));if(e.match(/-?\d+/)&&e.match(/-?\d+/)[0]===e)return t&&parseInt(e).toString()!==e?Jn(`bigNumber`,e):Jn(`integer`,parseInt(e));if(e.match(/-?\d+e\+\d+/)&&e.match(/-?\d+e\+\d+/)[0]===e)return Jn(`integer`,Number(e))}catch{}switch(e=e.toLowerCase()){case`undefined`:return Jn(`undefined`,void 0);case`nan`:return Jn(`nan`,NaN);case`null`:return Jn(`null`,null);case`true`:return Jn(`boolean`,!0);case`false`:return Jn(`boolean`,!1);default:if(e=Date.parse(e))return Jn(`date`,new Date(e))}return Jn(!1,null)}function Jn(e,t){return{type:e,value:t}}let Yn=function(e,t){var n;switch(D(e,t)){case`undefined`:n=`undefined`;break;case`nan`:n=`NaN`;break;case`string`:n=e;break;case`bigNumber`:case`date`:case`function`:case`regexp`:n=e.toString();break;default:try{n=JSON.stringify(e,null,` `)}catch{n=``}}return n};Reflect.getOwnPropertyDescriptor(Yn,`name`).writable||Reflect.defineProperty(Yn,"name",{value:`default`,configurable:!0});var Xn=[`style`],Zn=[`style`],Qn=[`style`],$n=[`style`],er=[`style`],tr=[`style`],nr=[`style`],rr=[`style`],ir=[`style`],ar=[`style`],or=[`style`],sr=[`style`],cr=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.style,n=C(e,Xn);return _().createElement(`span`,n,_().createElement(`svg`,Object.assign({},yr(t),{viewBox:`0 0 24 24`,fill:`currentColor`,preserveAspectRatio:`xMidYMid meet`}),_().createElement(`path`,{d:`M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M7,13H17V11H7`})))}}])}(_().PureComponent),lr=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.style,n=C(e,Zn);return _().createElement(`span`,n,_().createElement(`svg`,Object.assign({},yr(t),{viewBox:`0 0 24 24`,fill:`currentColor`,preserveAspectRatio:`xMidYMid meet`}),_().createElement(`path`,{d:`M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M13,7H11V11H7V13H11V17H13V13H17V11H13V7Z`})))}}])}(_().PureComponent),ur=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.style,n=C(e,Qn),r=yr(t).style;return _().createElement(`span`,n,_().createElement(`svg`,{fill:r.color,width:r.height,height:r.width,style:r,viewBox:`0 0 1792 1792`},_().createElement(`path`,{d:`M1344 800v64q0 14-9 23t-23 9h-832q-14 0-23-9t-9-23v-64q0-14 9-23t23-9h832q14 0 23 9t9 23zm128 448v-832q0-66-47-113t-113-47h-832q-66 0-113 47t-47 113v832q0 66 47 113t113 47h832q66 0 113-47t47-113zm128-832v832q0 119-84.5 203.5t-203.5 84.5h-832q-119 0-203.5-84.5t-84.5-203.5v-832q0-119 84.5-203.5t203.5-84.5h832q119 0 203.5 84.5t84.5 203.5z`})))}}])}(_().PureComponent),dr=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.style,n=C(e,$n),r=yr(t).style;return _().createElement(`span`,n,_().createElement(`svg`,{fill:r.color,width:r.height,height:r.width,style:r,viewBox:`0 0 1792 1792`},_().createElement(`path`,{d:`M1344 800v64q0 14-9 23t-23 9h-352v352q0 14-9 23t-23 9h-64q-14 0-23-9t-9-23v-352h-352q-14 0-23-9t-9-23v-64q0-14 9-23t23-9h352v-352q0-14 9-23t23-9h64q14 0 23 9t9 23v352h352q14 0 23 9t9 23zm128 448v-832q0-66-47-113t-113-47h-832q-66 0-113 47t-47 113v832q0 66 47 113t113 47h832q66 0 113-47t47-113zm128-832v832q0 119-84.5 203.5t-203.5 84.5h-832q-119 0-203.5-84.5t-84.5-203.5v-832q0-119 84.5-203.5t203.5-84.5h832q119 0 203.5 84.5t84.5 203.5z`})))}}])}(_().PureComponent),fr=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.style,n=C(e,er);return _().createElement(`span`,n,_().createElement(`svg`,{style:o(o({},yr(t).style),{}
160,{paddingLeft:`2px`,verticalAlign:`top`}),viewBox:`0 0 15 15`,fill:`currentColor`},_().createElement(`path`,{d:`M0 14l6-6-6-6z`})))}}])}(_().PureComponent),pr=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.style,n=C(e,tr);return _().createElement(`span`,n,_().createElement(`svg`,{style:o(o({},yr(t).style),{},{paddingLeft:`2px`,verticalAlign:`top`}),viewBox:`0 0 15 15`,fill:`currentColor`},_().createElement(`path`,{d:`M0 5l6 6 6-6z`})))}}])}(_().PureComponent),z=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.style,n=C(e,nr);return _().createElement(`span`,n,_().createElement(`svg`,Object.assign({},yr(t),{viewBox:`0 0 40 40`,fill:`currentColor`,preserveAspectRatio:`xMidYMid meet`}),_().createElement(`g`,null,_().createElement(`path`,{d:`m30 35h-25v-22.5h25v7.5h2.5v-12.5c0-1.4-1.1-2.5-2.5-2.5h-7.5c0-2.8-2.2-5-5-5s-5 2.2-5 5h-7.5c-1.4 0-2.5 1.1-2.5 2.5v27.5c0 1.4 1.1 2.5 2.5 2.5h25c1.4 0 2.5-1.1 2.5-2.5v-5h-2.5v5z m-20-27.5h2.5s2.5-1.1 2.5-2.5 1.1-2.5 2.5-2.5 2.5 1.1 2.5 2.5 1.3 2.5 2.5 2.5h2.5s2.5 1.1 2.5 2.5h-20c0-1.5 1.1-2.5 2.5-2.5z m-2.5 20h5v-2.5h-5v2.5z m17.5-5v-5l-10 7.5 10 7.5v-5h12.5v-5h-12.5z m-17.5 10h7.5v-2.5h-7.5v2.5z m12.5-17.5h-12.5v2.5h12.5v-2.5z m-7.5 5h-5v2.5h5v-2.5z`}))))}}])}(_().PureComponent),mr=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.style,n=C(e,rr);return _().createElement(`span`,n,_().createElement(`svg`,Object.assign({},yr(t),{viewBox:`0 0 40 40`,fill:`currentColor`,preserveAspectRatio:`xMidYMid meet`}),_().createElement(`g`,null,_().createElement(`path`,{d:`m28.6 25q0-0.5-0.4-1l-4-4 4-4q0.4-0.5 0.4-1 0-0.6-0.4-1.1l-2-2q-0.4-0.4-1-0.4-0.6 0-1 0.4l-4.1 4.1-4-4.1q-0.4-0.4-1-0.4-0.6 0-1 0.4l-2 2q-0.5 0.5-0.5 1.1 0 0.5 0.5 1l4 4-4 4q-0.5 0.5-0.5 1 0 0.7 0.5 1.1l2 2q0.4 0.4 1 0.4 0.6 0 1-0.4l4-4.1 4.1 4.1q0.4 0.4 1 0.4 0.6 0 1-0.4l2-2q0.4-0.4 0.4-1z m8.7-5q0 4.7-2.3 8.6t-6.3 6.2-8.6 2.3-8.6-2.3-6.2-6.2-2.3-8.6 2.3-8.6 6.2-6.2 8.6-2.3 8.6 2.3 6.3 6.2 2.3 8.6z`}))))}}])}(_().PureComponent),hr=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.style,n=C(e,ir);return _().createElement(`span`,n,_().createElement(`svg`,Object.assign({},yr(t),{viewBox:`0 0 40 40`,fill:`currentColor`,preserveAspectRatio:`xMidYMid meet`}),_().createElement(`g`,null,_().createElement(`path`,{d:`m30.1 21.4v-2.8q0-0.6-0.4-1t-1-0.5h-5.7v-5.7q0-0.6-0.4-1t-1-0.4h-2.9q-0.6 0-1 0.4t-0.4 1v5.7h-5.7q-0.6 0-1 0.5t-0.5 1v2.8q0 0.6 0.5 1t1 0.5h5.7v5.7q0 0.5 0.4 1t1 0.4h2.9q0.6 0 1-0.4t0.4-1v-5.7h5.7q0.6 0 1-0.5t0.4-1z m7.2-1.4q0 4.7-2.3 8.6t-6.3 6.2-8.6 2.3-8.6-2.3-6.2-6.2-2.3-8.6 2.3-8.6 6.2-6.2 8.6-2.3 8.6 2.3 6.3 6.2 2.3 8.6z`}))))}}])}(_().PureComponent),gr=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.style,n=C(e,ar);return _().createElement(`span`,n,_().createElement(`svg`,Object.assign({},yr(t),{viewBox:`0 0 40 40`,fill:`currentColor`,preserveAspectRatio:`xMidYMid meet`}),_().createElement(`g`,null,_().createElement(`path`,{d:`m31.6 21.6h-10v10h-3.2v-10h-10v-3.2h10v-10h3.2v10h10v3.2z`}))))}}])}(_().PureComponent),_r=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.style,n=C(e,or);return _().createElement(`span`,n,_().createElement(`svg`,Object.assign({},yr(t),{viewBox:`0 0 40 40`,fill:`currentColor`,preserveAspectRatio:`xMidYMid meet`}),_().createElement(`g`,null,_().createElement(`path`,{d:`m19.8 26.4l2.6-2.6-3.4-3.4-2.6 2.6v1.3h2.2v2.1h1.2z m9.8-16q-0.3-0.4-0.7 0l-7.8 7.8q-0.4 0.4 0 0.7t0.7 0l7.8-7.8q0.4-0.4 0-0.7z m1.8 13.2v4.3q0 2.6-1.9 4.5t-4.5 1.9h-18.6q-2.6 0-4.5-1.9t-1.9-4.5v-18.6q0-2.7 1.9-4.6t4.5-1.8h18.6q1.4 0 2.6 0.5 0.3 0.2 0.4 0.5 0.1 0.4-0.2 0.7l-1.1 1.1q-0.3 0.3-0.7 0.1-0.5-0.1-1-0.1h-18.6q-1.4 0-2.5 1.1t-1 2.5v18.6q0 1.4 1 2.5t2.5 1h18.6q1.5 0 2.5-1t1.1-2.5v-2.9q0-0.2
1600.2-0.4l1.4-1.5q0.3-0.3 0.8-0.1t0.4 0.6z m-2.1-16.5l6.4 6.5-15 15h-6.4v-6.5z m9.9 3l-2.1 2-6.4-6.4 2.1-2q0.6-0.7 1.5-0.7t1.5 0.7l3.4 3.4q0.6 0.6 0.6 1.5t-0.6 1.5z`}))))}}])}(_().PureComponent),vr=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.style,n=C(e,sr);return _().createElement(`span`,n,_().createElement(`svg`,Object.assign({},yr(t),{viewBox:`0 0 40 40`,fill:`currentColor`,preserveAspectRatio:`xMidYMid meet`}),_().createElement(`g`,null,_().createElement(`path`,{d:`m31.7 16.4q0-0.6-0.4-1l-2.1-2.1q-0.4-0.4-1-0.4t-1 0.4l-9.1 9.1-5-5q-0.5-0.4-1-0.4t-1 0.4l-2.1 2q-0.4 0.4-0.4 1 0 0.6 0.4 1l8.1 8.1q0.4 0.4 1 0.4 0.6 0 1-0.4l12.2-12.1q0.4-0.4 0.4-1z m5.6 3.6q0 4.7-2.3 8.6t-6.3 6.2-8.6 2.3-8.6-2.3-6.2-6.2-2.3-8.6 2.3-8.6 6.2-6.2 8.6-2.3 8.6 2.3 6.3 6.2 2.3 8.6z`}))))}}])}(_().PureComponent);function yr(e){return e||={},{style:o(o({verticalAlign:`middle`},e),{},{color:e.color?e.color:`#000000`,height:`1em`,width:`1em`})}}var br=function(e){function t(e){var n;return s(this,t),(n=p(this,t,[e])).copiedTimer=null,n.copyToClipboardFallback=function(e){var t=document.createElement(`textarea`);t.value=e,document.body.appendChild(t),t.select(),document.execCommand(`copy`),document.body.removeChild(t)},n.handleCopy=function(){var e=n.props,t=e.clickCallback,r=e.src,i=e.namespace,a=JSON.stringify(n.clipboardValue(r),null,` `);navigator.clipboard?navigator.clipboard.writeText(a).catch(function(){n.copyToClipboardFallback(a)}):n.copyToClipboardFallback(a),n.copiedTimer=setTimeout(function(){n.setState({copied:!1})},5500),n.setState({copied:!0},function(){typeof t==`function`&&t({src:r,namespace:i,name:i[i.length-1]})})},n.getClippyIcon=function(){var e=n.props.theme;return n.state.copied?_().createElement(`span`,null,_().createElement(z,Object.assign({className:`copy-icon`},R(e,`copy-icon`))),_().createElement(`span`,R(e,`copy-icon-copied`),`â`)):_().createElement(z,Object.assign({className:`copy-icon`},R(e,`copy-icon`)))},n.clipboardValue=function(e){switch(D(e)){case`function`:case`regexp`:return e.toString();default:return e}},n.state={copied:!1},n}return h(t,e),l(t,[{key:`componentWillUnmount`,value:function(){this.copiedTimer&&=(clearTimeout(this.copiedTimer),null)}},{key:`render`,value:function(){var e=this.props,t=e.theme,n=e.hidden,r=e.rowHovered,i=R(t,`copy-to-clipboard`).style,a=`inline`;return n&&(a=`none`),_().createElement(`span`,{className:`copy-to-clipboard-container`,title:`Copy to clipboard`,style:{verticalAlign:`top`,display:r?`inline-block`:`none`}},_().createElement(`span`,{style:o(o({},i),{},{display:a}),onClick:this.handleCopy},this.getClippyIcon()))}}])}(_().PureComponent);let xr=function(e){function t(e){var n;return s(this,t),(n=p(this,t,[e])).handleSelect=function(e){var t=n.props,r=t.variable,i=t.namespace,a=t.onEdit,s=t.onSelect,c=t.keyModifier,l=E(i);c(e,`edit`)&&!1!==a?n.prepopInput(r):!1!==s&&(l.shift(),s(o(o({},r),{},{namespace:l})))},n.getEditIcon=function(){var e=n.props,t=e.variable,r=e.theme;return _().createElement(`div`,{className:`click-to-edit`,style:{verticalAlign:`top`,display:n.state.hovered?`inline-block`:`none`}},_().createElement(_r,Object.assign({className:`click-to-edit-icon`},R(r,`editVarIcon`),{onClick:function(){n.prepopInput(t)}})))},n.prepopInput=function(e){if(!1!==n.props.onEdit){var t=Yn(e.value,n.props.bigNumber),r=qn(t,n.props.bigNumber);n.setState({editMode:!0,editValue:t,parsedInput:{type:r.type,value:r.value}})}},n.getRemoveIcon=function(){var e=n.props,t=e.variable,r=e.namespace,i=e.theme,a=e.rjvId;return _().createElement(`div`,{className:`click-to-remove`,style:{verticalAlign:`top`,display:n.state.hovered?`inline-block`:`none`}},_().createElement(mr,Object.assign({className:`click-to-remove-icon`},R(i,`removeVarIcon`),{onClick:function(){xn.dispatch({name:`VARIABLE_REMOVED`,rjvId:a,data:{name:t.name,namespace:r,existing_value:t.value,variable_removed:!0}})}})))},n.getValue=function(e,t){var r=!t&&e.type,i=n.props;switch(r){case!1:return n.getEditInput();case`string`:return _().createElement(An,Object.assign({value:e.value},i));case`integer`:return _().createElement(On,Object.assign({value:e.value},i));case`float`:return _().createElement(vn,Object.assign({value:e.value},i));case`boolean`:return _().createElement(gn,Object.assign({value:e.value},i));case`function`:return _().createElement(Tn,Object.assign({value:e.value},i));case`null`:return _().createElement(Dn,i);case`nan`:return _().createElement(En,i);case`undefined`:return _().createElement(jn,i);case`date`:return _().createElement(_n,Object.assign({value:e.value},i));case`regexp`:return _().createElement(kn,Object.assign({value:e.value},i));case`bigNumber`:return _().createElement(Mn,Object.assign({value:e.value},i));case`circularReference`:return _().createElement(JsonCircularReference,Object.assign({value:e.value},i));default:var a=``;try{a=JSON.stringify(e.value)}catch{a=``}return _().createElement(`div`,{className:`object-value`},a)}},n.getEditInput=function(){var e=n.props,t=e.keyModifier,r=e.selectOnFocus,i=e.theme,a=n.state.editValue;return _().createElement(`div`,null,_().createElement(Kn,Object.assign({type:`text`,ref:function(e){e&&e[r?`select`:`focus`]()},value:a,className:`variable-editor`,onChange:function(e){var t=e.target.value,r=qn(t,n.props.bigNumber);
160n.setState({editValue:t,parsedInput:{type:r.type,value:r.value}})},onKeyDown:function(e){switch(e.key){case`Escape`:n.setState({editMode:!1,editValue:``});break;case`Enter`:t(e,`submit`)&&n.submitEdit(!0)}e.stopPropagation()},placeholder:`update this value`,minRows:2},R(i,`edit-input`))),_().createElement(`div`,R(i,`edit-icon-container`),_().createElement(mr,Object.assign({className:`edit-cancel`},R(i,`cancel-icon`),{onClick:function(e){e&&e.stopPropagation(),n.setState({editMode:!1,editValue:``})}})),_().createElement(vr,Object.assign({className:`edit-check string-value`},R(i,`check-icon`),{onClick:function(e){e&&e.stopPropagation(),n.submitEdit()}})),_().createElement(`div`,null,n.showDetected())))},n.submitEdit=function(e){var t=n.props,r=t.variable,i=t.namespace,a=t.rjvId,o=t.bigNumber,s=n.state,c=s.editValue,l=s.parsedInput,u=c;e&&l.type&&(u=l.value,o&&l.type===`bigNumber`&&(u=new o(u))),n.setState({editMode:!1}),xn.dispatch({name:`VARIABLE_UPDATED`,rjvId:a,data:{name:r.name,namespace:i,existing_value:r.value,new_value:u,variable_removed:!1}})},n.showDetected=function(){var e=n.props.theme,t=n.getDetectedInput();if(t)return _().createElement(`div`,null,_().createElement(`div`,R(e,`detected-row`),t,_().createElement(vr,{className:`edit-check detected`,style:o({verticalAlign:`top`,paddingLeft:`3px`},R(e,`check-icon`).style),onClick:function(e){e&&e.stopPropagation(),n.submitEdit(!0)}})))},n.getDetectedInput=function(){var e=n.state.parsedInput,t=e.type,r=e.value,i=n.props,a=i.theme;if(!1!==t)switch(t.toLowerCase()){case`object`:return _().createElement(`span`,null,_().createElement(`span`,{style:o(o({},R(a,`brace`).style),{},{cursor:`default`})},`{`),_().createElement(`span`,{style:o(o({},R(a,`ellipsis`).style),{},{cursor:`default`})},`...`),_().createElement(`span`,{style:o(o({},R(a,`brace`).style),{},{cursor:`default`})},`}`));case`array`:return _().createElement(`span`,null,_().createElement(`span`,{style:o(o({},R(a,`brace`).style),{},{cursor:`default`})},`[`),_().createElement(`span`,{style:o(o({},R(a,`ellipsis`).style),{},{cursor:`default`})},`...`),_().createElement(`span`,{style:o(o({},R(a,`brace`).style),{},{cursor:`default`})},`]`));case`string`:return _().createElement(An,Object.assign({value:r},i));case`integer`:return _().createElement(On,Object.assign({value:r},i));case`float`:return _().createElement(vn,Object.assign({value:r},i));case`boolean`:return _().createElement(gn,Object.assign({value:r},i));case`function`:return _().createElement(Tn,Object.assign({value:r},i));case`null`:return _().createElement(Dn,i);case`nan`:return _().createElement(En,i);case`undefined`:return _().createElement(jn,i);case`date`:return _().createElement(_n,Object.assign({value:new Date(r)},i));case`bignumber`:return _().createElement(Mn,Object.assign({value:r},i));case`circularreference`:return _().createElement(JsonCircularReference,Object.assign({value:variable.value},i))}},n.state={editMode:!1,editValue:``,hovered:!1,renameKey:!1,parsedInput:{type:!1,value:null}},n}return h(t,e),l(t,[{key:`render`,value:function(){var e=this,t=this.props,n=t.variable,r=t.singleIndent,i=t.type,a=t.theme,s=t.namespace,c=t.indentWidth,l=t.enableClipboard,u=t.onEdit,d=t.onDelete,f=t.onSelect,p=t.displayArrayKey,m=t.quotesOnKeys,h=t.showComma,g=t.isLast,v=this.state.editMode,y=!1!==f||!1!==u;return _().createElement(`div`,Object.assign({},R(a,`objectKeyVal`,{paddingLeft:c*r}),{onMouseEnter:function(){return e.setState(o(o({},e.state),{},{hovered:!0}))},onMouseLeave:function(){return e.setState(o(o({},e.state),{},{hovered:!1}))},className:`variable-row`,key:n.name}),i===`array`?p?_().createElement(`span`,Object.assign({},R(a,`array-key`),{key:n.name+`_`+s}),n.name,_().createElement(`div`,R(a,`colon`),`:`)):null:_().createElement(`span`,null,_().createElement(`span`,Object.assign({},R(a,`object-name`),{className:`object-key`,key:n.name+`_`+s,onClick:y?this.handleSelect:null}),!!m&&_().createElement(`span`,{style:{verticalAlign:`top`}},`"`),_().createElement(`span`,{style:{display:`inline-block`}},O(n.name)),!!m&&_().createElement(`span`,{style:{verticalAlign:`to
160p`}},`"`)),_().createElement(`span`,R(a,`colon`),`:`)),_().createElement(`div`,Object.assign({className:`variable-value`,onClick:y?this.handleSelect:null},R(a,`variableValue`,{cursor:!1===f?`default`:`pointer`})),this.getValue(n,v)),h&&!g&&_().createElement(`span`,R(a,`comma`),`,`),l?_().createElement(br,{rowHovered:this.state.hovered,hidden:v,src:n.value,clickCallback:l,theme:a,namespace:[].concat(E(s),[n.name])}):null,!1!==u&&!1===v?this.getEditIcon():null,!1!==d&&!1===v?this.getRemoveIcon():null)}}])}(_().PureComponent);var Sr=function(e){function t(){var e;s(this,t);var n=[...arguments];return(e=p(this,t,[].concat(n))).getObjectSize=function(){var t=e.props,n=t.size,r=t.theme;if(t.displayObjectSize)return _().createElement(`span`,Object.assign({className:`object-size`},R(r,`object-size`)),n,` item`,n===1?``:`s`)},e.getAddAttribute=function(t){var n=e.props,r=n.theme,i=n.namespace,a=n.name,s=n.src,c=n.rjvId,l=n.depth;return _().createElement(`span`,{className:`click-to-add`,style:{verticalAlign:`top`,display:t?`inline-block`:`none`}},_().createElement(hr,Object.assign({className:`click-to-add-icon`},R(r,`addVarIcon`),{onClick:function(){var e={name:l>0?a:null,namespace:i.splice(0,i.length-1),existing_value:s,variable_removed:!1,key_name:null};D(s)===`object`?xn.dispatch({name:`ADD_VARIABLE_KEY_REQUEST`,rjvId:c,data:e}):xn.dispatch({name:`VARIABLE_ADDED`,rjvId:c,data:o(o({},e),{},{new_value:[].concat(E(s),[null])})})}})))},e.getRemoveObject=function(t){var n=e.props,r=n.theme,i=n.namespace,a=n.name,o=n.src,s=n.rjvId;if(i.length!==1)return _().createElement(`span`,{className:`click-to-remove`,style:{display:t?`inline-block`:`none`}},_().createElement(mr,Object.assign({className:`click-to-remove-icon`},R(r,`removeVarIcon`),{onClick:function(){xn.dispatch({name:`VARIABLE_REMOVED`,rjvId:s,data:{name:a,namespace:i.splice(0,i.length-1),existing_value:o,variable_removed:!0}})}})))},e.render=function(){var t=e.props,n=t.theme,r=t.onDelete,i=t.onAdd,a=t.enableClipboard,o=t.src,s=t.namespace,c=t.rowHovered;return _().createElement(`div`,Object.assign({},R(n,`object-meta-data`),{className:`object-meta-data`,onClick:function(e){e.stopPropagation()}}),e.getObjectSize(),a?_().createElement(br,{rowHovered:c,clickCallback:a,src:o,theme:n,namespace:s}):null,!1===i?null:e.getAddAttribute(c),!1===r?null:e.getRemoveObject(c))},e}return h(t,e),l(t)}(_().PureComponent);function Cr(e){var t=e.parent_type,n=e.namespace,r=e.quotesOnKeys,i=e.theme,a=e.jsvRoot,o=e.name,s=e.displayArrayKey,c=e.onKeyClick,l=e.name?e.name:``,u=typeof c==`function`?c:null;return!a||!1!==o&&o!==null?t===`array`?s?_().createElement(`span`,Object.assign({},R(i,`array-key`),{key:n,onClick:u}),_().createElement(`span`,{className:`array-key`},l),_().createElement(`span`,R(i,`colon`),`:`)):_().createElement(`span`,null):_().createElement(`span`,Object.assign({},R(i,`object-name`),{key:n,onClick:u}),_().createElement(`span`,{className:`object-key`},r&&_().createElement(`span`,{style:{verticalAlign:`top`}},`"`),_().createElement(`span`,null,l),r&&_().createElement(`span`,{style:{verticalAlign:`top`}},`"`)),_().createElement(`span`,R(i,`colon`),`:`)):_().createElement(`span`,null)}function wr(e){var t=e.theme;switch(e.iconStyle){case`triangle`:return _().createElement(pr,Object.assign({},R(t,`expanded-icon`),{className:`expanded-icon`}));case`square`:return _().createElement(ur,Object.assign({},R(t,`expanded-icon`),{className:`expanded-icon`}));default:return _().createElement(cr,Object.assign({},R(t,`expanded-icon`),{className:`expanded-icon`}))}}function B(e){var t=e.theme;switch(e.iconStyle){case`triangle`:return _().createElement(fr,Object.assign({},R(t,`collapsed-icon`),{className:`collapsed-icon`}));case`square`:return _().createElement(dr,Object.assign({},R(t,`collapsed-icon`),{className:`collapsed-icon`}));default:return _().createElement(lr,Object.assign({},R(t,`collapsed-icon`),{className:`collapsed-icon`}))}}var Tr=[`src`,`groupArraysAfterLength`,`depth`,`name`,`theme`,`jsvRoot`,`namespace`],Er=function(e){function t(e){var n;return s(this,t),(n=p(this,t,[e])).toggleCollapsed=function(e){for(var t=n.state.expanded,r=[],i=Math.max(t.length||0,e+1),a=0;a<i;a++)r[a]=!0===t[a];r[e]=!r[e],n.setState({expanded:r})},n.handleKeySelect=function(){var e=n.props,t=e.name,r=e.namespace,i=e.onSelect,a=e.src;if(typeof i==`function`){var o=E(r);o.shift(),o.length>0&&o.pop(),i({name:t,value:a,type:`array`,namespace:o})}},n.state={expanded:[]},n}return h(t,e),l(t,[{key:`getExpandedIcon`,value:function(e){var t=this.props,n=t.theme,r=t.iconStyle;return this.state.expanded[e]?_().createElement(wr,{theme:n,iconStyle:r}):_().createElement(B,{theme:n,iconStyle:r})}},{key:`render`,value:function(){var e=this,t=this.props,n=t.src,r
160=t.groupArraysAfterLength,i=(t.depth,t.name),a=t.theme,o=t.jsvRoot,s=t.namespace,c=C(t,Tr),l=0,u=5*this.props.indentWidth;o||(l=5*this.props.indentWidth);var d=r,f=Math.ceil(n.length/d);return _().createElement(`div`,Object.assign({className:`object-key-val`},R(a,o?`jsv-root`:`objectKeyVal`,{paddingLeft:l})),_().createElement(Cr,Object.assign({},this.props,{onKeyClick:this.handleKeySelect})),_().createElement(`span`,null,_().createElement(Sr,Object.assign({size:n.length},this.props))),E(Array(f)).map(function(t,r){return _().createElement(`div`,Object.assign({key:r,className:`object-key-val array-group`},R(a,`objectKeyVal`,{marginLeft:6,paddingLeft:u})),_().createElement(`span`,R(a,`brace-row`),_().createElement(`div`,Object.assign({className:`icon-container`},R(a,`icon-container`),{onClick:function(t){e.toggleCollapsed(r)}}),e.getExpandedIcon(r)),e.state.expanded[r]?_().createElement(Ar,Object.assign({key:i+r,depth:0,name:!1,collapsed:!1,groupArraysAfterLength:d,index_offset:r*d,src:n.slice(r*d,r*d+d),namespace:s,type:`array`,parent_type:`array_group`,theme:a,showComma:e.props.showComma,isLast:r===f-1},c)):_().createElement(`span`,Object.assign({},R(a,`brace`),{onClick:function(t){e.toggleCollapsed(r)},className:`array-group-brace`}),`[`,_().createElement(`div`,Object.assign({},R(a,`array-group-meta-data`),{className:`array-group-meta-data`}),_().createElement(`span`,Object.assign({className:`object-size`},R(a,`object-size`)),r*d,` - `,r*d+d-1>n.length?n.length-1:r*d+d-1)),`]`)))}))}}])}(_().PureComponent),Dr=[`depth`,`src`,`namespace`,`name`,`type`,`parent_type`,`theme`,`jsvRoot`,`iconStyle`,`showComma`,`isLast`],Or=function(e){function t(e){var n;s(this,t),(n=p(this,t,[e])).handleToggleCollapsed=function(){n.setState({expanded:!n.state.expanded},function(){wn.set(n.props.rjvId,n.props.namespace,`expanded`,n.state.expanded)})},n.handleKeySelect=function(){var e=n.props,t=e.name,r=e.namespace,i=e.onSelect,a=e.src,o=n.state.object_type;if(typeof i==`function`){var s=E(r);s.shift(),s.length>0&&s.pop(),i({name:t,value:a,type:o,namespace:s})}},n.getObjectContent=function(e,t,r){return _().createElement(`div`,{className:`pushed-content object-container`},_().createElement(`div`,Object.assign({className:`object-content`},R(n.props.theme,`pushed-content`)),n.renderObjectContents(t,r)))},n.getEllipsis=function(){return n.state.size===0?null:_().createElement(`div`,Object.assign({},R(n.props.theme,`ellipsis`),{className:`node-ellipsis`,onClick:n.handleToggleCollapsed}),`...`)},n.getObjectMetaData=function(e){var t=n.state,r=t.size,i=t.hovered;return _().createElement(Sr,Object.assign({rowHovered:i,size:r},n.props))},n.renderObjectContents=function(e,t){var r,i=n.props,a=i.depth,o=i.parent_type,s=i.index_offset,c=i.groupArraysAfterLength,l=i.namespace,u=i.showComma,d=n.state.object_type,f=[],p=Object.keys(e||{});return n.props.sortKeys&&d!==`array`&&(p=p.sort()),p.forEach(function(i,m){r=new kr(i,e[i],t.bigNumber);var h=m===p.length-1;if(o===`array_group`&&s&&(r.name=parseInt(r.name,10)+s),Object.prototype.hasOwnProperty.call(e,i)&&r.type.toLowerCase()!==`window`){if(n.isCircularReference(r))f.push(_().createElement(k,Object.assign({key:r.name,depth:a+1,name:r.name,src:r.value,namespace:l.concat(r.name),type:`array`,parent_type:d,isLast:h,showComma:u,singleIndent:5,indentWidth:n.props.indentWidth},t)));else if(r.type===`object`)f.push(_().createElement(Ar,Object.assign({key:r.name,depth:a+1,name:r.name,src:r.value,namespace:l.concat(r.name),parent_type:d,isLast:h,showComma:u,listOfAncestors:n.listOfAncestors.concat([n.props.src])},t)));else if(r.type===`array`){var g=Ar;c&&r.value.length>c&&(g=Er),f.push(_().createElement(g,Object.assign({key:r.name,depth:a+1,name:r.name,src:r.value,namespace:l.concat(r.name),type:`array`,parent_type:d,isLast:h,showComma:u,listOfAncestors:n.listOfAncestors.concat([n.props.src])},t)))}else f.push(_().createElement(xr,Object.assign({key:r.name+`_`+l,variable:r,singleIndent:5,namespace:l,type:n.props.type,isLast:h,showComma:u},t)))}}),f};var r=t.getState(e);return n.state=o(o({},r),{},{prevProps:{}}),n.listOfAncestors=Array.from(n.props.listOfAncestors||[]),n.listOfAncestors.push(e.src),n}return h(t,e),l(t,[{key:`getBraceStart`,value:function(e,t){var n=this.props,r=n.theme,i=n.iconStyle;if(n.parent_type===`array_group`)return _().createElement(`span`,null,_().createElement(`span`,R(r,`brace`),e===`array`?`[`:`{`));var a=t?wr:B;return _().createElement(`span`,null,_().createElement(`span`,Object.assign({onClick:this.handleToggleCollapsed},R(r,`brace-row`)),_().createElement(`div`,Object.assign({className:`icon-container`},R(r,`icon-container`)),_().createElement(a,{theme:r,iconStyle:i})),_().createElement(Cr,Object.assign({},this.props,{onKeyClick:this.handleKeySelect})),_().createElement(`span`,R(r,`brace`),e===`array`?`[`:`{`)))}}
160,{key:`isCircularReference`,value:function(e){return this.listOfAncestors.indexOf(e.value)>-1||e.value===this.props.src}},{key:`render`,value:function(){var e=this,t=this.props,n=t.depth,r=t.src,i=(t.namespace,t.name,t.type,t.parent_type),a=t.theme,s=t.jsvRoot,c=t.iconStyle,l=t.showComma,u=t.isLast,d=C(t,Dr),f=this.state,p=f.object_type,m=f.expanded,h={};return s||i===`array_group`?i===`array_group`&&(h.borderLeft=0,h.display=`inline`):h.paddingLeft=5*this.props.indentWidth,_().createElement(`div`,Object.assign({className:`object-key-val`,onMouseEnter:function(){return e.setState(o(o({},e.state),{},{hovered:!0}))},onMouseLeave:function(){return e.setState(o(o({},e.state),{},{hovered:!1}))}},R(a,s?`jsv-root`:`objectKeyVal`,h)),this.getBraceStart(p,m),m?this.getObjectContent(n,r,o({theme:a,iconStyle:c},d)):this.getEllipsis(),_().createElement(`span`,{className:`brace-row`},_().createElement(`span`,{style:o(o({},R(a,`brace`).style),{},{paddingLeft:m?`3px`:`0px`})},p===`array`?`]`:`}`)),l&&!u&&!s&&_().createElement(`span`,R(a,`comma`),`,`),this.getObjectMetaData(r))}}],[{key:`getDerivedStateFromProps`,value:function(e,n){var r=n.prevProps;return e.src!==r.src||e.collapsed!==r.collapsed||e.name!==r.name||e.namespace!==r.namespace||e.rjvId!==r.rjvId?o(o({},t.getState(e)),{},{prevProps:e}):null}}])}(_().PureComponent);Or.getState=function(e){var t=Object.keys(e.src).length,n=(!1===e.collapsed||!0!==e.collapsed&&e.collapsed>e.depth)&&(!e.shouldCollapse||!1===e.shouldCollapse({name:e.name,src:e.src,type:D(e.src),namespace:e.namespace}))&&t!==0;return{expanded:wn.get(e.rjvId,e.namespace,`expanded`,n),object_type:e.type===`array`?`array`:`object`,parent_type:e.type===`array`?`array`:`object`,size:t,hovered:!1}};var kr=l(function e(t,n,r){s(this,e),this.name=t,this.value=n,this.type=D(n,r)});x(Or);let Ar=Or;var jr=function(e){function t(){var e;s(this,t);var n=[...arguments];return(e=p(this,t,[].concat(n))).render=function(){var t,n,r=e.props,i=[r.name],a=Ar;return typeof r.name!=`object`||Array.isArray(r.name)||(i=[r.name?.displayName||r.name?.name||((t=r.name)==null||(n=t.type)==null?void 0:n.name)||`Anonymous`]),Array.isArray(r.src)&&r.groupArraysAfterLength&&r.src.length>r.groupArraysAfterLength&&(a=Er),_().createElement(`div`,{className:`pretty-json-container object-container`},_().createElement(`div`,{className:`object-content`},_().createElement(a,Object.assign({namespace:i,depth:0,jsvRoot:!0},r))))},e}return h(t,e),l(t)}(_().PureComponent),Mr=function(e){function t(e){var n;return s(this,t),(n=p(this,t,[e])).handleCloseModal=function(){xn.dispatch({rjvId:n.props.rjvId,name:`RESET`})},n.handleSubmit=function(){n.props.submit(n.state.input)},n.state={input:e.input?e.input:``},n}return h(t,e),l(t,[{key:`render`,value:function(){var e=this,t=this.props,n=t.theme,r=t.rjvId,i=t.isValid,a=this.state.input,o=i(a);return _().createElement(`div`,Object.assign({className:`key-modal-request`},R(n,`key-modal-request`),{onClick:this.handleCloseModal}),_().createElement(`div`,Object.assign({},R(n,`key-modal`),{onClick:function(e){e.stopPropagation()}}),_().createElement(`div`,R(n,`key-modal-label`),`Key Name:`),_().createElement(`div`,{style:{position:`relative`}},_().createElement(`input`,Object.assign({},R(n,`key-modal-input`),{className:`key-modal-input`,ref:function(e){return e&&e.focus()},spellCheck:!1,value:a,placeholder:`...`,onChange:function(t){e.setState({input:t.target.value})},onKeyPress:function(t){o&&t.key===`Enter`?e.handleSubmit():t.key===`Escape`&&e.handleCloseModal()}})),o?_().createElement(vr,Object.assign({},R(n,`key-modal-submit`),{className:`key-modal-submit`,onClick:this.handleSubmit})):null),_().createElement(`span`,R(n,`key-modal-cancel`),_().createElement(gr,Object.assign({},R(n,`key-modal-cancel-icon`),{className:`key-modal-cancel`,onClick:function(){xn.dispatch({rjvId:r,name:`RESET`})}})))))}}])}(_().PureComponent),Nr=function(e){function t(){var e;s(this,t);var n=[...arguments];return(e=p(this,t,[].concat(n))).isValid=function(t){var n=e.props.rjvId,r=wn.get(n,`action`,`new-key-request`);return t!==``&&Object.keys(r.existing_value).indexOf(t)===-1},e.submit=function(t){var n=e.props.rjvId,r=wn.get(n,`action`,`new-key-request`);r.new_value=o({},r.existing_value),r.new_value[t]=e.props.defaultValue,xn.dispatch({name:`VARIABLE_ADDED`,rjvId:n,data:r})},e}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.active,n=e.theme,r=e.rjvId;return t?_().createElement(Mr,{rjvId:r,theme:n,isValid:this.isValid,submit:this.submit}):null}}])}(_().PureComponent),Pr=function(e){function t(){return s(this,t),p(this,t,arguments)}return h(t,e),l(t,[{key:`render`,value:function(){var e=this.props,t=e.message,n=e.active,r=e.theme,i=e.rjvId;return n?_().createElement(`div`,Object.assign({className:`validation-failure`},R(r,`validation-failure`),{onClick:function(){xn.dispatch({rjvId:i,name:`RESET`})}}),_().createElement(`span`,R(r,`validation-failure-label`),t),_().createElement(gr,R(r,`validation-failure-clear`))):null}}])}(_().PureComponent),Fr=function(e){function t(e){var n;return s(this,t),(n=p(this,t,[e])).rjvId=Date.now().toString()+Math.random().toString(36).slice(2),n.getListeners=function(){return{reset:n.resetState,"variable-update":n.updateSrc,"add-key-request":n.addKeyRequest}},n.updateSrc=function(){var e,t=wn.get(n.rjvId,`action`,`variable-update`),r=t.name,i=t.namespace,a=t.new_value,o=t.existing_value,s=t.updated_src,c=t.type,l=n.props,u=l.onEdit,d=l.onDelete,f=l.onAdd,p={existing_src:n.state.src,new_value:a,updated_src:s,name:r,namespace:i,existing_value:o};switch(c){case`variable-added`:e=f(p);break;case`variable-edited`:e=u(p);break;case`variable-removed`:e=d(p)}!1===e?n.setState({validationFailure:!0}):(wn.set(n.rjvId,`global`,`src`,s),n.setState({src:s}))},n.addKeyRequest=function(){n.setState({addKeyRequest:!0})},n.resetState=function(){n.setState({validationFailure:!1,addKeyRequest:!1})},n.state={addKeyRequest:!1,editKeyRequest:!1,validationFailure:!1,src:t.defaultProps.src,name:t.defaultProps.name,theme:t.defaultProps.theme,validationMessage:t.defaultProps.validationMessage,prevSrc:t.defaultProps.src,prevName:t.defaultProps.name,prevTheme:t.defaultProps.theme},n}return h(t,e),l(t,[{key:`componentDidMount`,value:function(){wn.set(this.rjvId,`global`,`src`,this.state.src);var e=this.getListeners();for(var t in e)wn.on(t+`-`+this.rjvId,e[t]);this.setState({addKeyRequest:!1,editKeyRequest:!1})}},{key:`componentDidUpdate`,value:function(e,t){!1!==t.addKeyRequest&&this.setState({addKeyRequest:!1}),!1!==t.editKeyRequest&&this.setState({editKeyRequest:!1}),e.src!==this.state.src&&wn.set(this.rjvId,`global`,`src`,this.state.src)}},{key:`componentWillUnmount`,value:function(){var e=this.getListeners();for(var t in e)wn.removeListener(t+`-`+this.rjvId,e[t])}},{key:`render`,value:function(){var e=this.state,t=e.validationFailure,n=e.validationMessage,r=e.addKeyRequest,i=e.theme,a=e.src,s=e.name,c=this.props,l=c.style,u=c.defaultValue;return _().createElement(`div`,{className:`react-json-view`,style:o(o({},R(i,`app-container`).style),l)},_().createElement(Pr,{message:n,active:t,theme:i,rjvId:this.rjvId}),_().createElement(jr,Object.assign({},this.props,{src:a,name:s,theme:i,type:D(a),rjvId:this.rjvId})),_().createElement(Nr,{active:r,theme:i,rjvId:this.rjvId,defaultValue:u}))}}],[{key:`getDerivedStateFromProps`,value:function(e,n){if(e.src!==n.prevSrc||e.name!==n.prevName||e.theme!==n.prevTheme){var r={src:e.src,name:e.name,theme:e.theme,validationMessage:e.validationMessage,prevSrc:e.src,prevName:e.name,prevTheme:e.theme};return t.validateState(r)}return null}}])}(_().PureComponent);Fr.defaultProps={src:{},name:`root`,theme:`rjv-default`,collapsed:!1,collapseStringsAfterLength:!1,shouldCollapse:!1,sortKeys:!1,quotesOnKeys:!0,groupArraysAfterLength:100,indentWidth:4,enableClipboard:!0,escapeStrings:!0,displayObjectSize:!0,displayDataTypes:!0,onEdit:!1,onDelete:!1,onAdd:!1,onSelect:!1,iconStyle:`triangle`,style:{},validationMessage:`Validation Error`,defaultValue:null,displayArrayKey:!0,selectOnFocus:!1,keyModifier:function(e){return e.metaKey||e.ctrlKey},bigNumber:null,showComma:!0}
160,Fr.validateState=function(e){var t={};return D(e.theme)!==`object`||function(e){var t=[`base00`,`base01`,`base02`,`base03`,`base04`,`base05`,`base06`,`base07`,`base08`,`base09`,`base0A`,`base0B`,`base0C`,`base0D`,`base0E`,`base0F`];if(D(e)===`object`){for(var n=0;n<t.length;n++)if(!(t[n]in e))return!1;return!0}return!1}(e.theme)||(console.error(`react-json-view error:`,`theme prop must be a theme name or valid base-16 theme object.`,`defaulting to "rjv-default" theme`),t.theme=`rjv-default`),D(e.src)!==`object`&&D(e.src)!==`array`&&(console.error(`react-json-view error:`,`src property must be a valid json object`),t.name=`ERROR`,t.src={message:`src property must be a valid json object`}),o(o({},e),t)},x(Fr);let Ir=Fr})(),i})())}))(),1),UHe=z5.default.default||z5.default,WHe=async({src:e})=>{let t=typeof e==`string`?String(e):JSON.stringify(e,null,2);try{await navigator?.clipboard?.writeText(t)}catch(e){console.error(`Failed to copy text to clipboard: ${e}`)}},B5=({src:e,collapsed:t=1,rootName:n=null,collapseStringsAfterLength:r=100,displayDataTypes:i=!1,displayArrayKey:a=!1,groupArraysAfterLength:o=1e3,quotesOnKeys:s=!1,displayObjectSize:c=!1,theme:l=`chalk`})=>(0,U.jsx)(`div`,{className:`bg-black rounded-lg p-4`,children:(0,U.jsx)(UHe,{src:e,name:n,collapseStringsAfterLength:r,displayDataTypes:i,collapsed:t,displayArrayKey:a,groupArraysAfterLength:o,quotesOnKeys:s,displayObjectSize:c,theme:l,enableClipboard:WHe})});function V5(e){if(typeof e==`string`){let t=e.trim();if(t.startsWith(`{`)&&t.endsWith(`}`)||t.startsWith(`[`)&&t.endsWith(`]`))try{return V5(JSON.parse(t))}catch{return e}return e}return Array.isArray(e)?e.map(V5):typeof e==`object`&&e?Object.fromEntries(Object.entries(e).map(([e,t])=>[e,V5(t)])):e}var GHe=({viewRaw:e,onViewRawChange:t,rawContent:n,parsedContent:r,requestId:i})=>(0,U.jsx)(k2,{label:`Options`,items:[{id:`toggle-view`,label:(0,U.jsxs)(`div`,{className:`flex items-center justify-between gap-4 w-full`,children:[(0,U.jsx)(`span`,{children:`View Raw`}),(0,U.jsx)(`span`,{className:`pointer-events-none`,children:(0,U.jsx)(A2,{checked:e,onChange:()=>{}})})]}),onClick:()=>t(!e)},{id:`download-parsed`,label:`Download parsed JSON`,hasSeparator:!0,onClick:e=>{R5(r,`request-${i}.json`,`application/json`),e()}},{id:`download-raw`,label:`Download raw JSON`,onClick:e=>{R5(n,`request-${i}.raw.json`,`application/json`),e()}}]}),KHe=({llmKeyId:e,requestId:t})=>{let n=(0,V.useMemo)(()=>ex({id:e,requestId:t}),[e,t]);u(n);let r=I(n),i=B(e=>L.cache.selectById(e,{id:n.payload.key}))??``,[a,o]=(0,V.useState)(!1),s=(0,V.useMemo)(()=>{if(!i)return null;try{return JSON.parse(i)}catch{return null}},[i]),c=(0,V.useMemo)(()=>s===null?null:V5(s),[s]),l=(0,V.useMemo)(()=>s===null?null:JSON.stringify(s,null,2),[s]),d=(0,V.useMemo)(()=>c===null?null:JSON.stringify(c,null,2),[c]),f=r.isLoading||r.isInitialLoading;return(0,U.jsxs)(Z,{children:[(0,U.jsxs)(`div`,{className:`flex items-center justify-between mb-4`,children:[(0,U.jsx)(`h3`,{className:`text-lg font-semibold`,children:`Log Payload`}),s?(0,U.jsx)(GHe,{viewRaw:a,onViewRawChange:o,rawContent:l??``,parsedContent:d??``,requestId:t}):null]}),f?(0,U.jsx)(`p`,{className:`text-gray-500`,children:`Loading logs...`}):r.isError?(0,U.jsx)(`p`,{className:`text-gray-500`,children:`No logs are available for this request.`}):c?a?(0,U.jsx)(S4,{text:l??``,allowCopy:!0,className:`pr-4 whitespace-pre-wrap break-all overflow-auto`}):(0,U.jsx)(B5,{src:c}):null]})},qHe=()=>{let{id:e=``,requestId:t=``}=F(),n=(0,V.useMemo)(()=>{let n=Be.utc(),r=n.minus({days:7});return $b({id:e,requestId:t,startTime:r.toISO()??``,endTime:n.toISO()??``,perPage:1})},[e,t]);u(n);let r=I(n),i=B(t=>Wb(t,{id:e})),a=B(e=>tu(e,{id:i.environmentId})),o=B(e=>tx(e,{id:t})),s=r.isLoading||r.isInitialLoading,c=N();return(0,V.useEffect)(()=>{!s&&!o?.id&&c(jr())},[s,o?.id,c]),(0,U.jsxs)(r5,{children:[(0,U.jsx)(hU,{crumbs:[{name:a.handle,to:Va(a.id)},{name:i.handle||`Unknown`,to:Ji(i.id)},{name:o.id||`Unknown`,to:null}]}),(0,U.jsxs)(W,{children:[(0,U.jsxs)(wU,{children:[(0,U.jsx)(TU,{title:`Request Details`,isLoading:s,icon:(0,U.jsx)(`img`,{src:`/resource-types/logo-llm_key.png`,className:`w-[32px] h-[32px] mr-3`,"aria-label":`LLM Request`})}),(0,U.jsxs)(EU,{columns:3,children:[(0,U.jsx)(DU,{title:`Request ID`,isLoading:s,children:(0,U.jsx)(`span`,{className:`font-mono`,children:o.id})}),(0,U.jsx)(DU,{title:`Start Time`,isLoading:s,children:Of(o.startTime)}),(0,U.jsx)(DU,{title:`Input Tokens`,isLoading:s,children:o.inputTokens.toLocaleStr
160ing()}),(0,U.jsx)(DU,{title:`Status`,isLoading:s,children:(0,U.jsx)(H2,{variant:o.status===`success`?`success`:`error`,className:`capitalize`,children:o.status})}),(0,U.jsx)(DU,{title:`End Time`,isLoading:s,children:Of(o.endTime)}),(0,U.jsx)(DU,{title:`Output Tokens`,isLoading:s,children:o.outputTokens.toLocaleString()}),(0,U.jsx)(DU,{title:`Model`,isLoading:s,children:o.model}),(0,U.jsx)(DU,{title:`Duration`,isLoading:s,children:jf(o.durationSeconds)}),(0,U.jsx)(DU,{title:`Cost`,isLoading:s,children:ub(o.spend,4)})]})]}),(0,U.jsx)(KHe,{llmKeyId:e,requestId:t})]})]})},H5=()=>(0,U.jsxs)(b5,{children:[(0,U.jsxs)(`div`,{className:`text-center mt-16`,children:[(0,U.jsx)(`h1`,{className:`${G.type.h1} text-center`,children:`Page Not Found`}),(0,U.jsxs)(`p`,{className:`my-6 text-gray-600`,children:[`We can't find the page you're looking for.`,(0,U.jsx)(`br`,{}),`Maybe you mistyped the address? If not, the page may have moved.`]})]}),(0,U.jsxs)(Z,{children:[(0,U.jsx)(dA,{to:Nr(),children:`Back to Login`}),(0,U.jsx)(K,{className:`mt-4 w-full`,onClick:e=>{e.preventDefault(),window.location.href=`https://www.aptible.com/docs`},variant:`white`,children:`View Docs`}),(0,U.jsx)(K,{className:`mt-4 w-full`,onClick:e=>{e.preventDefault(),window.location.href=`https://status.aptible.com/`},variant:`white`,children:`View Status Page`})]})]}),JHe={email:e=>V4(e.username),pass:e=>H4(e.password,`Password`)},YHe=()=>{let e=l(),t=N(),[n,r]=(0,V.useState)(``),[i,a]=(0,V.useState)(``),[o,s]=(0,V.useState)(``),[c,u]=(0,V.useState)(!1),[d,f]=(0,V.useState)(),p=B(US),[m,h]=QS(JHe),g=B(Rn),{invitation:_}=fC(p),v=(0,V.useRef)(null);(0,V.useEffect)(()=>{_.email!==``&&r(_.email)},[_.email]);let y=I(uc),b=Ks(y.meta),x=I(dc),S=Ks(x.meta);(0,V.useEffect)(()=>{b.exception_context.failed_login_attempt_id?f(b.exception_context.failed_login_attempt_id):S.exception_context.failed_login_attempt_id&&f(S.exception_context.failed_login_attempt_id)},[b.exception_context.failed_login_attempt_id,S.exception_context.failed_login_attempt_id]);let C={username:n,password:o,otpToken:i,previousLoginAttemptId:d||void 0},w=t=>{t.preventDefault(),h(C)&&e(uc(C))};T(y,()=>{t(p||Dr()),e(GS()),f(void 0)});let E=Gs(b.error);(0,V.useEffect)(()=>{let t=b.exception_context.u2f?.payload?.challenge;if(!E){v.current=null;return}if(v.current===t)return;v.current=t;let r=b.exception_context.failed_login_attempt_id||d||void 0;u(!0),e(dc({username:n,password:o,otpToken:i,previousLoginAttemptId:r,webauthn:b.exception_context.u2f}))},[E,n,o,i,d,b.exception_context.failed_login_attempt_id,b.exception_context.u2f?.payload?.challenge]);let D=Gs(b.error);return(0,U.jsxs)(b5,{width:500,children:[(0,U.jsx)(`h1`,{className:`${G.type.h1} text-center`,children:`Log In`}),(0,U.jsx)(`div`,{className:`flex text-center items-center justify-center mt-4`,children:(0,U.jsx)(`div`,{className:`max-w-2xl`,children:(0,U.jsxs)(`p`,{children:[`Don't have an account?`,` `,(0,U.jsx)(P,{to:Lr(),className:`font-medium`,children:`Sign up`})]})})}),(0,U.jsx)(`div`,{className:`mt-8`,children:(0,U.jsx)(`div`,{className:`bg-white py-8 px-10 shadow rounded-lg border border-black-200`,children:(0,U.jsxs)(`form`,{className:`space-y-4`,onSubmit:w,children:[(0,U.jsx)(EA,{}),_.id?(0,U.jsxs)(q,{variant:`info`,children:[(0,U.jsx)(`strong`,{children:_.inviterName}),` invited you to join`,` `,(0,U.jsx)(`strong`,{children:_.organizationName}),` on Aptible`]}):null,(0,U.jsx)(J,{label:`Email`,htmlFor:`email`,feedbackMessage:m.email,feedbackVariant:m.email?`danger`:`info`,children:(0,U.jsx)(X,{id:`email`,name:`email`,type:`email`,autoComplete:`email`,autoFocus:!0,required:!0,value:n,className:`w-full`,onChange:e=>r(e.target.value)})}),(0,U.jsx)(J,{label:`Password`,htmlFor:`password`,feedbackMessage:m.pass,feedbackVariant:m.pass?`danger`:`info`,children:(0,U.jsx)(X,{id:`password`,name:`password`,type:`password`,autoComplete:`current-password`,required:!0,value:o,className:`w-full`,onChange:e=>s(e.target.value)})}),c?(0,U.jsx)(J,{label:`Two-Factor Authentication Required`,htmlFor:`otp`,description:(0,U.jsxs)(`p`,{children:[`Read our 2FA`,` `,(0,U.jsx)(CA,{href:`https://www.aptible.com/docs/password-authentication#2-factor-authentication-2fa`,variant:`info`,children:`docs`}),` `,`to learn more.`]}
160),children:(0,U.jsx)(X,{id:`otp`,name:`otp`,type:`number`,value:i,onChange:e=>a(e.currentTarget.value),autoComplete:`off`,autoFocus:!0})}):null,(0,U.jsxs)(`div`,{className:`my-2 flex flex-col gap-2`,children:[(0,U.jsx)(TA,{...x}),D?(0,U.jsx)(TA,{isSuccess:!1,isError:!1,isWarning:!0,message:`You must enter your 2FA token to continue`}):(0,U.jsx)(TA,{...y})]}),(0,U.jsx)(K,{isLoading:y.isLoading,disabled:g,type:`submit`,variant:`primary`,layout:`block`,size:`lg`,children:`Log In`}),(0,U.jsx)(`div`,{className:`py-2`,children:(0,U.jsx)(`hr`,{})}),(0,U.jsx)(dA,{to:ao(),variant:`white`,layout:`block`,size:`lg`,children:`Log In with SSO`}),(0,U.jsx)(`p`,{className:`text-center`,children:(0,U.jsx)(P,{to:Ci(),className:`text-sm text-center`,children:`Forgot your password?`})}),(0,U.jsxs)(`p`,{className:`mt-4 text-center text-sm text-gray-600`,children:[`By submitting this form, I confirm that I have read and agree to Aptible's`,` `,(0,U.jsx)(CA,{href:`https://www.aptible.com/legal/terms-of-service`,variant:`info`,children:`Terms of Service`}),` `,`and`,` `,(0,U.jsx)(CA,{href:`https://www.aptible.com/legal/privacy`,variant:`info`,children:`Privacy Policy`}),`.`]})]})})})]})},XHe={name:e=>H4(e.name,`Name`)||U4(e.name),company:e=>{if(e.challengeToken===``)return H4(e.company,`Company`)||U4(e.company)},email:e=>V4(e.email),pass:e=>fLe(e.password)},ZHe=()=>(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`p`,{className:`mt-4 text-center text-sm text-gray-600`,children:[`If you already have an account, you can`,` `,(0,U.jsx)(P,{to:Nr(),className:`font-medium`,children:`log in here`}),`.`]}),(0,U.jsxs)(`p`,{className:`mt-4 text-center text-sm text-gray-600`,children:[`By submitting this form, I confirm that I have read and agree to Aptible's`,` `,(0,U.jsx)(`a`,{href:`https://www.aptible.com/legal/terms-of-service`,children:`Terms of Service`}),` `,`and `,(0,U.jsx)(`a`,{href:`https://www.aptible.com/legal/privacy`,children:`Privacy Policy`}),`.`]})]}),QHe=()=>(0,U.jsx)(`div`,{className:`mx-auto max-w-[570px] px-4 md:px-0`,children:(0,U.jsxs)(W,{children:[(0,U.jsx)(`div`,{className:`flex justify-center pt-[65px] pb-4`,children:(0,U.jsx)(BU,{width:160})}),(0,U.jsx)(`div`,{className:`flex text-center items-center justify-center`,children:(0,U.jsx)(`div`,{children:(0,U.jsx)(`h1`,{className:`${G.type.h1} text-center`,children:`Get started`})})})]})}),$He=()=>{let e=l(),t=N(),[n]=Ee(),r=n.get(`email`)||``,i=B(US),a=B(Rn),{invitation:o,inviteId:s,code:c}=fC(i);(0,V.useEffect)(()=>{o.email!==``&&h(o.email)},[o.email]);let[u,d]=(0,V.useState)(``),[f,p]=(0,V.useState)(``),[m,h]=(0,V.useState)(r),[g,_]=(0,V.useState)(``),[v,y]=QS(XHe),b={company:f,name:u,email:m,password:g,challengeToken:c},x=Sc(b),S=I(x);return T(S,()=>{if(s){t(bi(s,c)),e(GS());return}if(Ks(S.meta).verified){t(i||Dr()),e(GS());return}t(Ti())}),(0,U.jsxs)(y5,{className:`flex gap-6`,children:[(0,U.jsx)(O8,{}),(0,U.jsx)(`div`,{className:`flex-1 mx-auto max-w-[500px]`,children:(0,U.jsxs)(W,{variant:`vertical`,children:[(0,U.jsx)(QHe,{}),(0,U.jsx)(`div`,{className:`mx-auto max-w-[500px] bg-white py-8 px-10 shadow rounded-lg border border-black-200`,children:(0,U.jsxs)(`form`,{className:`space-y-4`,onSubmit:t=>{t.preventDefault(),y(b)&&e(x)},children:[(0,U.jsx)(EA,{}),o.id?(0,U.jsxs)(q,{variant:`info`,children:[(0,U.jsx)(`strong`,{children:o.inviterName}),` invited you to join`,` `,(0,U.jsx)(`strong`,{children:o.organizationName}),` on Aptible`]}):null,(0,U.jsx)(J,{label:`Name`,htmlFor:`name`,feedbackMessage:v.name,feedbackVariant:v.name?`danger`:`info`,children:(0,U.jsx)(X,{id:`name`,name:`name`,type:`text`,autoComplete:`name`,required:!0,value:u,className:`w-full`,onChange:e=>d(W4(e.target.value))})}),s?null:(0,U.jsx)(J,{label:`Company`,htmlFor:`company`,feedbackMessage:v.company,feedbackVariant:v.company?`danger`:`info`,children:(0,U.jsx)(X,{id:`company`,name:`company`,type:`text`,autoComplete:`company`,required:!0,value:f,className:`w-full`,onChange:e=>p(W4(e.target.value))})}),(0,U.jsx)(J,{label:`Email`,htmlFor:`email`,feedbackMessage:v.email,feedbackVariant:v.email?`danger`:`info`,children:(0,U.jsx)(X,{id:`email`,name:`email`,type:`email`,autoComplete:`email`,required:!0,value:m,onChange:e=>h(W4(e.target.value)),className:`w-full`})}),(0,U.jsx)(J,{label:`Password`,htmlFor:`password`,feedbackMessage:v.pass,feedbackVariant:v.pass?`danger`:`info`,children:(0,U.jsx)(X,{id:`password`,name:`password`,type:`password`,autoComplete:`current-password`,required:!0,value:g,className:`w-full`,onChange:e=>_(e.target.value)})}),(0,U.jsx)(TA,{...S}),(0,U.jsx)(`div`,{children:(0,U.jsx)(K,{type:`submit`,layout:`block`,size:`lg`,isLoading:S.isLoading,disabled:a,children:`Create Account`})}),(0,U.jsx)(ZHe,{})]})})]})})]})},eUe=()=>{let e=l(),t=N(),n=I(_c),{isLoading:r,isError:i,message:a}=n,[o,s]=(0,V.useState)(``),c=o===``;return T(n,()=>{t(Dr())}),(0,U.jsxs)(`form`,{onSubmit:t=>{t.preventDefault(),!c&&e(_c({name:o}))},children:[i?(0,U.jsx)(q,{variant:`error`,className:`mb-6`,children:a}):null,(0,U.jsxs)(J,{label:`Your Name`,htmlFor:`input-name`,children:[(0,U.jsx)(`input`,{name:`name`,type:`text`,value:o,onChange:e=>s(e.currentTarget.value),autoComplete:`name`,disabled:r,"data-testid":`input-name`,id:`input-name`}),(0,U.jsx)(`div`,{children:`If you need to join an existing organization, have one of the owners of the organization send you an invitation to join.`})]}),(0,U.jsx)(`div`,{className:`flex flex-col justify-between mt-9 mb-6`,children:(0,U.jsx)(K,{isLoading:r,disabled:c,type:`submit`,"data-testid":`signup-submit`,children:`Create Organization`})})]})},tUe=()=>(0,U.jsxs)(`div`,{children:[(0,U.jsx)(dve,{steps:3,currentStep:3}),(0,U.jsx)(eUe,{})]}),nUe=()=>{let e=l(),t=N(),n=B(qo),[r]=Ee(),i=r.get(`redirect`)||``,[a,o]=(0,V.useState)(``),[s,c]=(0,V.useState)(``),[u,d]=(0,V.useState)(!1),[f,p]=(0,V.useState)(),m=(0,V.useRef)(null),h=I(Dc),g=Ks(h.meta),_=I(Oc),v=Ks(_.meta);(0,V.useEffect)(()=>{g.exception_context.failed_login_attempt_id?p(g.exception_context.failed_login_attempt_id):v.exception_context.failed_login_attempt_id&&p(v.exception_context.failed_login_attempt_id)},[g.exception_context.failed_login_attempt_id,v.exception_context.failed_login_attempt_id]);let y={username:n.email,password:s,otpToken:a,previousLoginAttemptId:f||void 0};T(h,()=>{Wre(i)?t(i):t(Dr()),e(GS()),p(void 0)});let b=t=>{t.preventDefault(),e(Dc(y))},x=Gs(g.error);return(0,V.useEffect)(()=>{let t=g.exception_context.u2f?.payload?.challenge;if(!x){m.current=null;return}if(m.current===t)return;m.current=t;let r=g.exception_context.failed_login_attempt_id||f||void 0;d(!0),e(Oc({username:n.email,password:s,otpToken:a,previousLoginAttemptId:r,webauthn:g.exception_context.u2f}))},[x,n.email,s,a,f,g.exception_context.failed_login_attempt_id,g.exception_context.u2f?.payload?.challenge]),(0,U.jsx)(b5,{children:(0,U.jsxs)(W,{children:[(0,U.jsx)(`h1`,{className:`${G.type.h1} text-center`,children:`Re-enter your credentials`}),(0,U.jsx)(Z,{children:(0,U.jsxs)(W,{children:[(0,U.jsx)(q,{variant:`warning`,children:`You must confirm your credentials before proceeding.`}),(0,U.jsx)(`div`,{children:(0,U.jsxs)(g3,{title:`Why do I need to elevate my credentials?`,children:[`We require users to elevate their access token whenever they want to make account related changes. For some operations (e.g. deploying an App with `,(0,U.jsx)(YU,{children:`git push`}),`) we require the user have an SSH key associated with their account during App setup, which then requires an elevated access token.`]})}),(0,U.jsxs)(`form`,{className:`flex flex-col gap-4`,onSubmit:b,children:[(0,U.jsx)(J,{label:`Email`,htmlFor:`email`,children:(0,U.jsx)(X,{id:`email`,name:`email`,type:`email`,disabled:!0,value:n.email,autoComplete:`username`,autoFocus:!0})}),(0,U.jsx)(J,{label:`Password`,htmlFor:`password`,children:(0,U.jsx)(X,{id:`password`,name:`password`,type:`password`,autoComplete:`current-password`,required:!0,value:s,className:`w-full`,onChange:e=>c(e.target.value)})}),u?(0,U.jsx)(J,{label:`Two-Factor Authentication Required`,htmlFor:`otp`,description:(0,U.jsxs)(`p`,{children:[`Read our 2fa`,` `,(0,U.jsx)(CA,{href:`https://www.aptible.com/docs/password-authentication#2-factor-authentication-2fa`,variant:`info`,children:`docs`}),` `,`to learn more.`]}
160),children:(0,U.jsx)(X,{id:`otp`,name:`otp`,type:`number`,value:a,onChange:e=>o(e.currentTarget.value),autoComplete:`off`,autoFocus:!0})}):null,(0,U.jsx)(TA,{..._}),x?(0,U.jsx)(TA,{isSuccess:!1,isError:!1,isWarning:!0,message:`You must enter your 2FA token to continue`}):(0,U.jsx)(TA,{...h}),(0,U.jsx)(K,{isLoading:h.isLoading,type:`submit`,layout:`block`,size:`lg`,children:`Confirm`}),(0,U.jsx)(`p`,{className:`text-center`,children:(0,U.jsx)(P,{to:Ci(),className:`text-sm text-center`,children:`Forgot your password?`})})]})]})})]})})},rUe=r({deleteU2fDevice:()=>W5,entities:()=>iUe,fetchOtpCodes:()=>K5,fetchU2fChallenges:()=>J5,fetchU2fDevices:()=>U5,resetOtp:()=>Y5,resetOtpVerify:()=>X5,setupOtp:()=>q5}),iUe={u2f_device:vn({id:`u2f_device`,save:L.u2fDevices.add,deserialize:e=>({id:e.id,name:e.name,keyHandle:e.key_handle,version:e.version,createdAt:e.created_at,updatedAt:e.updated_at})})},U5=mr.get(`/users/:userId/u2f_devices`,function*(e,t){e.elevated=!0,yield*t()}),W5=mr.delete(`/u2f_devices/:deviceId`,[function*(e,t){e.elevated=!0;let{deviceId:n}=e.payload;yield*t(),e.json.ok&&(yield*L.update(L.u2fDevices.remove([n])))},rc]),aUe=e=>({id:e.id,uri:e.otp_uri,currentUrl:e._links.self?.href||``,recoveryCodesUrl:e._links.otp_recovery_codes?.href||``});function*G5(e,t){e.cache=!0,e.elevated=!0,yield*t()}var K5=mr.get(`/otp_configurations/:otpId/otp_recovery_codes`,G5),q5=mr.post(`/users/:userId/otp_configurations`,function*(e,t){if(e.elevated=!0,(yield*p(L.otp.select)).id||(yield*t(),!e.json.ok))return;let n=aUe(e.json.value);yield*L.update(L.otp.set(n))}),J5=mr.post(`/users/:userId/u2f_challenges`,G5),Y5=mr.post(`/otp/resets/new`,function*(e,t){e.request=e.req({body:JSON.stringify({user_id:e.payload.userId})}),yield*t()}),X5=mr.post([`/verifications`,`otp`],{supervisor:j},[function*(e,t){let{challengeId:n,verificationCode:r}=e.payload;e.request=e.req({body:JSON.stringify({type:`otp_reset_challenge`,challenge_id:n,verification_code:r})}),yield*t()},rc]),Z5=({children:e,title:t})=>(0,U.jsxs)(Z,{children:[(0,U.jsx)(`div`,{className:`text-lg text-gray-500 mb-4`,children:t}),(0,U.jsx)(`div`,{children:e})]}),oUe=()=>{let e=l(),t=B(Ko),[n,r]=(0,V.useState)(``),[i,a]=(0,V.useState)(``),[o,s]=(0,V.useState)(``),c=Jc({type:`update-password`,userId:t,password:n}),u=I(Jc),d=r=>{if(r.preventDefault(),t&&n!==``){if(n!==i){s(`Passwords do not match`);return}e(c)}};T(u,()=>{r(``),a(``),s(``)});let f=n===``,p=o?`danger`:`info`;return(0,U.jsx)(`form`,{onSubmit:d,className:`flex flex-col gap-4`,children:(0,U.jsxs)(W,{size:`sm`,children:[(0,U.jsx)(TA,{...u}),(0,U.jsx)(J,{label:`New Password`,htmlFor:`input-password`,feedbackVariant:p,children:(0,U.jsx)(X,{name:`password`,type:`password`,autoComplete:`new-password`,value:n,onChange:e=>r(e.currentTarget.value),"data-testid":`input-password`,className:`border-black border`})}),(0,U.jsx)(J,{label:`Confirm New Password`,htmlFor:`input-password`,feedbackVariant:p,feedbackMessage:o,children:(0,U.jsx)(X,{name:`confirm-password`,type:`password`,autoComplete:`new-password`,value:i,onChange:e=>a(e.currentTarget.value),"data-testid":`input-confirm-password`,className:`border-black border`})}),(0,U.jsx)(K,{className:`w-fit`,type:`submit`,disabled:f,isLoading:u.isLoading,children:`Change Password`})]})})},sUe=()=>{let e=l(),t=B(Ko),[n,r]=(0,V.useState)(``),i=I(us),[a,o]=(0,V.useState)(``),s=c(Tc({userId:t})),u=I(Ec),d=r=>{if(r.preventDefault(),!t)return;let i=V4(n);if(i){o(i);return}e(us({userId:t,email:n}))},f=t=>{e(Ec({id:t}))};T(i,()=>{o(``),r(``),s.trigger()}),T(u,()=>{s.trigger()});let p=s.data?._embedded?.email_verification_challenges||[];return(0,U.jsxs)(W,{children:[(0,U.jsx)(`form`,{onSubmit:d,children:(0,U.jsxs)(W,{children:[(0,U.jsx)(TA,{...i}),(0,U.jsx)(J,{label:`Email`,htmlFor:`input-email`,feedbackVariant:a?`danger`:`info`,feedbackMessage:a,children:(0,U.jsx)(X,{name:`email`,type:`email`,value:n,onChange:e=>r(e.currentTarget.value),autoComplete:`username`,"data-testid":`input-email`,id:`input-email`})}),(0,U.jsx)(K,{className:`w-fit`,type:`submit`,disabled:n===``,isLoading:i.isLoading,children:`Send Verification
160Email`})]})}),(0,U.jsx)(`hr`,{}),(0,U.jsxs)(W,{size:`sm`,children:[(0,U.jsx)(`h4`,{className:G.type.h4,children:`Pending Requests`}),s.isInitialLoading?(0,U.jsx)(xE,{}):null,p.length===0?(0,U.jsx)(q,{variant:`info`,children:`No pending requests`}):null,p.map(e=>(0,U.jsxs)(`div`,{className:`flex justify-between items-center`,children:[(0,U.jsx)(aA,{text:`Expires ${Of(e.expires_at)}`,children:(0,U.jsx)(`span`,{children:e.email})}),(0,U.jsx)(K,{size:`xs`,requireConfirm:!0,variant:`delete`,onClick:()=>f(e.id),isLoading:u.isLoading,children:`Revoke`})]},e.id))]})]})},cUe=()=>{let e=l(),[t,n]=KS(),r=Xc({type:`otp`,userId:t.id,otp_enabled:!1}),i=I(r),a=()=>{e(r)};return(0,U.jsxs)(W,{children:[n.isLoading?(0,U.jsx)(xE,{}):null,(0,U.jsx)(TA,{...i}),t.otpEnabled?(0,U.jsxs)(W,{children:[(0,U.jsx)(`p`,{children:`2FA does not apply to git push operations.`}),(0,U.jsx)(K,{className:`w-fit`,variant:`delete`,onClick:a,requireConfirm:!0,isLoading:i.isLoading,children:`Disable 2FA`}),(0,U.jsx)(q,{variant:`info`,children:`Download your backup codes if you haven't done so yet!`}),(0,U.jsx)(`div`,{children:(0,U.jsx)(dA,{to:see(),className:`w-fit`,children:`Download backup codes`})})]}):(0,U.jsxs)(W,{children:[(0,U.jsx)(`p`,{children:`2-factor authentication can be enabled for your account.`}),(0,U.jsx)(dA,{to:oee(),className:`w-fit`,children:`Configure 2FA`})]})]})},lUe=()=>{let e=l(),[t,n]=KS();u(U5({userId:t.id}));let r=B(L.u2fDevices.selectTableAsList),i=t=>{e(W5({deviceId:t}))},a=I(W5);return n.isLoading?(0,U.jsx)(xE,{}):t.otpEnabled?(0,U.jsxs)(W,{children:[(0,U.jsx)(`div`,{children:`The following Security Keys are associated with your account and can be used to log in:`}),(0,U.jsx)(TA,{...a}),(0,U.jsx)(`div`,{children:r.map(e=>(0,U.jsxs)(`div`,{className:`flex gap-4 items-center`,children:[e.name,` `,(0,U.jsx)(K,{requireConfirm:!0,size:`sm`,variant:`delete`,onClick:()=>i(e.id),children:`Remove`})]},e.id))}),(0,U.jsx)(dA,{className:`w-fit`,to:cee(),children:`Add a new Security Key`})]}):(0,U.jsx)(q,{variant:`info`,children:`In order to add a hardware security key, you must set up 2FA authentication first.`})},uUe=()=>{let e=l(),t=I(nc),n=()=>e(nc());return(0,U.jsxs)(W,{children:[t.isSuccess?(0,U.jsx)(TA,{...t,message:(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`span`,{children:[t.message,` `]}),(0,U.jsx)(P,{to:Fr(),className:G.type[`white link`],children:`Logout`})]})}):(0,U.jsx)(TA,{...t}),(0,U.jsxs)(`div`,{children:[`This action will log out all `,(0,U.jsx)(`strong`,{children:`other`}),` sessions and cannot be undone. This session will remain logged in.`]}),(0,U.jsx)(`div`,{children:(0,U.jsx)(K,{variant:`delete`,requireConfirm:!0,onClick:n,children:`Log out other sessions`})})]})},dUe=()=>(0,U.jsxs)(pU,{children:[(0,U.jsx)(`h2`,{className:G.type.h2,children:`Security Settings`}),(0,U.jsxs)(`div`,{className:`grid grid-cols-1 lg:grid-cols-2 gap-4`,children:[(0,U.jsx)(Z5,{title:`Change Password`,children:(0,U.jsx)(oUe,{})}),(0,U.jsx)(Z5,{title:`Change Email`,children:(0,U.jsx)(sUe,{})})]}),(0,U.jsx)(Z5,{title:`2-Factor Authentication`,children:(0,U.jsx)(cUe,{})}),(0,U.jsx)(Z5,{title:`Security Keys`,children:(0,U.jsx)(lUe,{})}),(0,U.jsx)(Z5,{title:`Log out other sessions`,children:(0,U.jsx)(uUe,{})})]}),fUe=({ssh:e,onDelete:t})=>{let n=l(),r=tC({id:e.id}),i=I(r);return T(i,()=>{t(e.id)}),(0,U.jsx)(Z,{children:(0,U.jsxs)(W,{size:`sm`,children:[(0,U.jsx)(`h4`,{className:G.type.h4,children:e.name}),(0,U.jsx)(w4,{allowCopy:!0,segments:[{text:e.ssh_public_key,className:`text-lime`}]}),(0,U.jsx)(`div`,{children:(0,U.jsx)(K,{requireConfirm:!0,onClick:()=>{n(r)},variant:`delete`,isLoading:i.isLoading,children:`Delete`})})]})})},pUe=(e,t)=>{let n=new Date(e.created_at).getTime();return new Date(t.created_at).getTime()-n},mUe=()=>{let e=B(qo),t=c($S({userId:e.id})),n=I(tC),r=t.data?._embedded?.ssh_keys||[];return(0,U.jsxs)(W,{children:[(0,U.jsx)(`h2`,{className:G.type.h2,children:`SSH Keys`}),(0,U.jsx)(Z,{children:(0,U.jsx)(L6,{onSuccess:()=>t.trigger()})}),(0,U.jsxs)(W,{children:[(0,U.jsx)(TA,{...n}),t.isInitialLoading?(0,U.jsx)(xE,{}):null,[...r].sort(pUe).map(e=>(0,U.jsx)(fUe,{ssh:e,onDelete:()=>t.trigger()},e.id))]})]})},hUe=()=>{let e=N(),t=l(),n=B(Ko),r=I(q5),i=B(L.otp.select),[a,o]=(0,V.useState)(``),[s,c]=(0,V.useState)(``),[u,d]=(0,V.useState)(``),f=Yc({type:`otp`,userId:n,otp_enabled:!0,current_otp_configuration:i.currentUrl,current_otp_configuration_id:i.id,otp_token:s}),p=I(f);return(0,V.useEffect)(()=>
160{if(!i.uri)return;let e=new URLSearchParams(i.uri.replace(/.*\?/,`?`));d(e.get(`secret`)||``)},[i.uri]),(0,V.useEffect)(()=>{n&&t(q5({userId:n}))},[n]),T(p,()=>{e(qr())}),(0,U.jsxs)(pU,{children:[(0,U.jsx)(hU,{crumbs:[{name:`Security Settings`,to:qr()},{name:`2-Factor Authentication`,to:null}]}),(0,U.jsx)(Z,{children:(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`div`,{className:`mb-2 text-md font-semibold`,children:`2-factor authentication will be enabled for your account after confirmation.`}),(0,U.jsxs)(`div`,{className:`max-w-lg`,children:[`To proceed, scan the QR code below with your 2FA app (we recommend using`,` `,(0,U.jsx)(CA,{href:`https://support.google.com/accounts/answer/1066447?hl=en`,variant:`info`,children:`Google Authenticator`}),`), input the code generated, and click on Enable 2FA.`]}),r.isLoading?(0,U.jsx)(xE,{}):(0,U.jsxs)(`div`,{children:[(0,U.jsxs)(`div`,{className:`my-4`,children:[(0,U.jsx)(`div`,{className:`flex my-10 justify-center align-center max-w-lg`,children:(0,U.jsx)(he,{value:i.uri})}),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`b`,{children:`Your 2FA URL:`}),` `,i.uri]}),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`b`,{children:`Your 2FA Secret:`}),` `,u]})]}),(0,U.jsxs)(`form`,{onSubmit:e=>{if(e.preventDefault(),n&&i.id){if(!s){o(`must enter token`);return}t(f)}},className:`flex flex-col gap-4 max-w-lg`,children:[(0,U.jsxs)(J,{label:`2FA Token`,htmlFor:`input-mfa`,feedbackVariant:a?`danger`:`info`,children:[(0,U.jsx)(X,{name:`mfa`,type:`mfa`,value:s,onChange:e=>c(e.currentTarget.value),"data-testid":`input-mfa`}),(0,U.jsx)(`div`,{children:a})]}),(0,U.jsx)(K,{type:`submit`,disabled:!!a||!s,isLoading:p.isLoading,children:`Enable 2FA`}),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(TA,{...p}),r.isError?(0,U.jsx)(TA,{...r}):null]})]})]})]})})]})},gUe=()=>{let[e]=KS(),t=c(K5({otpId:e.currentOtpId})),n=t.data?._embedded?.otp_recovery_codes||[];return(0,U.jsxs)(pU,{children:[(0,U.jsx)(hU,{crumbs:[{name:`Security Settings`,to:qr()},{name:`Recovery Codes`,to:null}]}),(0,U.jsx)(Z,{children:(0,U.jsxs)(W,{children:[t.isInitialLoading?(0,U.jsx)(xE,{}):null,(0,U.jsx)(TA,{...t}),(0,U.jsx)(`p`,{children:`Backup codes can only be used once. Keep them somewhere safe.`}),(0,U.jsx)(`p`,{children:`If you run out, you'll need to disable and re-enable 2-factor authentication.`}),(0,U.jsx)(w4,{allowCopy:!0,segments:n.filter(e=>e.used===!1).map(e=>({text:e.value,className:`text-lime`}))})]})})]})},_Ue=()=>{let e=N(),[t,n]=(0,V.useState)(``),[r,i]=(0,V.useState)(``),a=B(Ko),o=c(J5({userId:a})),s=l(),u=I(lc),[d,f]=(0,V.useState)(!1),p=()=>{if(f(!0),o.isError){i(o.message);return}if(!o.data){i(`Could not load u2f challenge`);return}sc({publicKey:o.data.payload}).then(e=>{s(lc({userId:a,name:t,u2f:e}))}).catch(e=>{i(e.message)}).finally(()=>{f(!1)})};return T(u,()=>{e(qr())}),(0,U.jsxs)(W,{children:[(0,U.jsx)(hU,{crumbs:[{name:`Security Settings`,to:qr()},{name:`Security Keys`,to:null}]}),(0,U.jsx)(Z,{children:(0,U.jsxs)(`div`,{className:`flex flex-col gap-4 justify-center`,children:[(0,U.jsx)(`div`,{children:`Security Keys are hardware devices that can be used for two-factor authentication. To sign in using a Security Key, you press a button on the device, rather than type in a token.`}),(0,U.jsx)(`div`,{children:`Security Keys help protect against phishing, and as a result, they can be more secure than token-based two-factor authentication.`}),(0,U.jsx)(`form`,{onSubmit:e=>{if(e.preventDefault(),!t){i(`Name must not be blank`);return}i(``),p()},children:(0,U.jsxs)(W,{children:[(0,U.jsxs)(J,{label:`Name`,htmlFor:`input-name`,feedbackVariant:r?`danger`:`info`,children:[(0,U.jsx)(X,{name:`name`,type:`text`,value:t,onChange:e=>n(e.currentTarget.value),autoComplete:`username`}),(0,U.jsx)(`div`,{className:`text-gray-500`,children:`Pick a name that helps you remember this key`})]}),r?(0,U.jsx)(q,{variant:`error`,children:r}):null,u.isError?(0,U.jsx)(q,{variant:`error`,children:u.message}):null,(0,U.jsx)(`div`,{children:(0,U.jsx)(K,{type:`submit`,isLoading:u.isLoading||d,disabled:t===``,children:`Save Key`})})]})})]})})]})};function vUe(){return(0,U.jsx)(ae,{to:ii(),replace:!0})}function yUe(e,t){let n=`id,name,email,roles,verified,2fa 161`;
161return e.forEach(e=>{let r=t[e.id].map(e=>e.name).join(`,`);n+=`${e.id},${e.name},${e.email},"${r}",${e.verified},${e.otpEnabled}\n`}),n}function bUe({user:e,canEdit:t,roles:n}){return(0,U.jsxs)(WA,{children:[(0,U.jsxs)(Y,{children:[(0,U.jsx)(`div`,{className:G.type.darker,children:e.name}),(0,U.jsx)(z2,{text:e.email})]}),(0,U.jsx)(Y,{children:n.map((e,t)=>(0,U.jsxs)(V.Fragment,{children:[(0,U.jsx)(P,{to:_i(e.id),className:G.type[`table link`],children:e.name}),t===n.length-1?null:(0,U.jsx)(`span`,{children:`, `})]},e.id))}),(0,U.jsx)(Y,{variant:`center`,children:e.verified?`Yes`:`No`}),(0,U.jsx)(Y,{variant:`center`,children:e.otpEnabled?`Enabled`:`Disabled`}),(0,U.jsx)(Y,{variant:`right`,children:t?(0,U.jsx)(dA,{size:`sm`,to:yi(e.id),className:`w-fit justify-self-end inline-flex`,children:`Edit`}):null})]},e.id)}var xUe=()=>{let e=N(),t=B(ns),n=t.id;u(as({orgId:n})),u(ol({orgId:t.id}));let{search:r,onChange:i}=_C(),a=B(e=>Go(e,{search:r})),o=rC(a),s=()=>{e(dee())},c=B(e=>S_(e,{orgId:n})),l=B(e=>qg(e,{orgId:t.id}));return(0,U.jsxs)(W,{children:[(0,U.jsxs)(W,{size:`sm`,children:[(0,U.jsx)(NU,{description:`Search members by name or status by typing verified, mfa, !verified, or !mfa`,children:`Members`}),(0,U.jsxs)(PU,{children:[(0,U.jsxs)(`div`,{className:`flex justify-between mb-1`,children:[(0,U.jsx)(YH,{placeholder:`Search...`,search:r,onChange:i}),(0,U.jsx)(FU,{children:(0,U.jsxs)(W,{variant:`horizontal`,size:`sm`,children:[(0,U.jsx)(K6,{csv:()=>yUe(a,l),title:`aptible_${t.name.toLocaleLowerCase()}_members`}),(0,U.jsxs)(pA,{onClick:s,tooltipProps:{placement:`left`},children:[(0,U.jsx)(qE,{variant:`sm`,className:`mr-2`}),`Invite User`]})]})})]}),(0,U.jsxs)(W,{variant:`horizontal`,size:`lg`,className:`items-center`,children:[(0,U.jsxs)(IU,{children:[o.totalItems,` Members`]}),(0,U.jsx)(RU,{...o})]})]})]}),(0,U.jsxs)(VA,{children:[(0,U.jsxs)(HA,{children:[(0,U.jsx)(KA,{children:`N
161ame`}),(0,U.jsx)(KA,{children:`Roles`}),(0,U.jsx)(KA,{variant:`center`,children:`Verified`}),(0,U.jsx)(KA,{variant:`center`,children:`2FA Status`}),(0,U.jsx)(KA,{variant:`right`,children:`Actions`})]}),(0,U.jsxs)(UA,{children:[o.data.length===0?(0,U.jsx)(GA,{colSpan:5}):null,o.data.map(e=>(0,U.jsx)(bUe,{user:e,roles:l[e.id],canEdit:c},e.id))]})]}),o.totalPages>1&&(0,U.jsx)(RU,{...o})]})};function SUe(e){let t=c($g({userId:e}));return{rolesLoader:t,userRoles:t.data?._embedded?.roles.map(e=>e.id)||[]}}function CUe(){let{id:e=``}=F(),t=N(),n=l(),r=B(ns),i=B(qo),a=B(t=>Uo(t,{id:e})),o=B(e=>x_(e,{orgId:r.id})),{rolesLoader:s,userRoles:c}=SUe(a.id),u=[...c].sort().join(`,`);(0,V.useEffect)(()=>{f(c)},[u]);let[d,f]=(0,V.useState)(c),p=d.length===1,m=(e,t)=>{if(t){let t=[...d];if(t.findIndex(t=>t===e)>=0)return;t.push(e),f(t)}else{let t=[...d],n=t.findIndex(t=>t===e);if(n===-1)return;t.splice(n,1),f(t)}},h=c.filter(e=>d.includes(e)===!1),g=d.filter(e=>c.includes(e)===!1),_=g.length>0||h.length>0,v=I(sl);T(v,()=>{s.trigger()});let y=e=>{e.preventDefault(),n(sl({userId:a.id,add:g,remove:h}))},b=bc({orgId:r.id,userId:a.id}),x=I(b),S=()=>{n(b)},C=B(e=>__(e,{orgId:r.id})),w=B(e=>Xo(e,{id:a.id})),E=C&&a.id!==i.id&&!w;T(x,()=>{t(ii())});let D=C&&a.otpEnabled,O=I(Y5),k=()=>{n(Y5({userId:a.id}))};return(0,U.jsxs)(W,{children:[(0,U.jsx)(hU,{crumbs:[{name:`Members`,to:ii()},{name:`Edit ${a.name}`,to:null}]}),(0,U.jsxs)(Z,{children:[(0,U.jsxs)(`h3`,{className:G.type.h3,children:[`Edit roles for `,a.name,` at `,r.name]}),(0,U.jsx)(`form`,{onSubmit:y,className:`mt-4`,children:(0,U.jsxs)(W,{children:[(0,U.jsx)(TA,{...v}),o.sort((e,t)=>e.name.localeCompare(t.name)).map(e=>{let t=d.includes(e.id),n=e.scimCreated?` (role managed via SCIM Provisioning)`:``;return(0,U.jsx)(ZH,{name:`roles`,label:e.name+n,checked:t,onChange:t=>m(e.id,t.currentTarget.checked),disabled:t&&p||e.scimCreated&&w},e.id)}),(0,U.jsx)(`div`,{children:(0,U.jsx)(K,{type:`submit`,isLoading:v.isLoading,disabled:!_,children:`Save`})})]})})]}),D?(0,U.jsx)(Z,{children:(0,U.jsxs)(W,{children:[(0,U.jsx)(TA,{...O}),(0,U.jsx)(`h3`,{className:G.type.h3,children:`Reset 2FA`}),(0,U.jsxs)(`div`,{children:[`Clicking reset will send `,a.name,` an email with a link through which they can complete the reset.`,a.name,`'s 2FA will not be reset until they click the link in the email and confirm the reset.`]}),(0,U.jsx)(`div`,{children:(0,U.jsx)(K,{variant:`delete`,onClick:k,requireConfirm:!0,isLoading:O.isLoading,children:`Reset 2FA`})})]})}):null,E?(0,U.jsx)(Z,{children:(0,U.jsxs)(W,{children:[(0,U.jsx)(TA,{...x}),(0,U.jsxs)(`h3`,{className:G.type.h3,children:[`Remove `,a.name,` from `,r.name]}),(0,U.jsx)(`div`,{children:(0,U.jsxs)(K,{variant:`delete`,onClick:S,requireConfirm:!0,isLoading:x.isLoading,children:[`Remove from `,r.name]})})]})}):null,w?(0,U.jsx)(Z,{children:(0,U.jsxs)(W,{children:[(0,U.jsx)(TA,{...x}),(0,U.jsxs)(`h3`,{className:G.type.h3,children:[`Remove `,a.name,` from `,r.name]}),(0,U.jsx)(`p`,{children:`This user is managed via SCIM Provisioning. Please manage this user directly via the connected IDP.`}),(0,U.jsx)(`div`,{children:(0,U.jsxs)(K,{variant:`delete`,requireConfirm:!0,disabled:!0,children:[`Remove from `,r.name]})})]})}):null]})}var wUe={securityEmail:e=>V4(e.securityAlertEmail),opsEmail:e=>V4(e.opsAlertEmail),name:e=>H4(e.name,`name`)},TUe=[`Costs are too high`,`Migrated to self-hosted AWS`,`Migrated to self-hosted GCP or Azure`,`Migrated to alternative PaaS`,`Sunset/shut down application`,`Signed up by mistake`,`Other`],EUe=({org:e})=>{let t=l(),[n,r]=(0,V.useState)(!1),[i,a]=(0,V.useState)([]),[o,s]=(0,V.useState)(``),[c,d]=(0,V.useState)(``),f=B(qo),p=I(Iy);(0,V.useEffect)(()=>()=>{t(Ly())},[]),u($y({orgId:e.id}));let m=B(L.costs.selectTable),h=B(Vl).filter(e=>L.costs.findById(m,{id:Ky(`Stack`,e.id)}).estCost>0),g=h.length===0,_=()=>{a([]),s(``),d(``)},v=()=>{_(),r(!0)},y=()=>r(!1);T(p,()=>{_(),y()});let b=e=>{a(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},x=i.length===0||!o.trim()||c!==e.name,S=()=>{if(x||!g||p.isLoading)return;let n=`<p>Your request has been received by the Aptible Support team. If you'd like to cancel this request, reply here to let us know.</p>`;n+=`<p>--</p>`,n+=`<p><strong>
161User requested account deletion for organization:</strong> ${e.name} (ID: ${e.id})</p>`,n+=`<p><strong>User:</strong> ${f.name} (${f.email})<br/>`,n+=`<strong>Organization ID:</strong> ${e.id}<br/>`,n+=`<strong>Organization Name:</strong> ${e.name}</p>`,n+=`<p><strong>Reasons for deleting account:</strong><br/>${i.join(`<br/>`)}</p>`,n+=`<p><strong>Additional details:</strong><br/>${o.trim().replace(/\n/g,`<br/>`)}</p>`,n+=`<p><strong>Status:</strong> No billable resources are currently running.</p>`;let r=Iy({subject:`Account Deletion Request`,description:n,email:f.email,name:f.name,priority:`normal`,attachments:[]});t(r)};return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(Z,{className:`flex items-center justify-between gap-4`,children:[(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`h2`,{className:`text-base font-semibold text-gray-900`,children:`Delete Account`}),(0,U.jsx)(`p`,{className:`text-sm text-gray-500 mt-0.5`,children:`Permanently delete this organization and all of its data.`})]}),(0,U.jsx)(K,{type:`button`,variant:`delete`,onClick:v,className:`shrink-0`,children:`Delete Account`})]}),n?(0,U.jsx)(h3,{children:(0,U.jsxs)(kU,{isOpen:n,onClose:y,className:`min-w-[550px]`,children:[(0,U.jsx)(AU,{title:`Delete account`,onClose:y}),(0,U.jsx)(MU,{children:g?(0,U.jsxs)(`div`,{className:`flex flex-col gap-5`,children:[(0,U.jsxs)(`p`,{className:`text-gray-700`,children:[`Your organization `,(0,U.jsx)(`strong`,{children:e.name}),` will be permanently deleted once this process is complete. This cannot be undone.`]}),(0,U.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,U.jsxs)(`label`,{className:G.type.h4,children:[`Reasons for deleting account (required)`,(0,U.jsx)(`span`,{className:`ml-1 font-normal text-gray-500`,children:`â select all that apply`})]}),(0,U.jsx)(`div`,{className:`flex flex-col gap-2 mt-1`,children:TUe.map(e=>(0,U.jsx)(ZH,{label:e,labelClassName:`ml-3`,checked:i.includes(e),onChange:()=>b(e)},e))})]}),(0,U.jsx)(J,{label:`Tell us more (required)`,htmlFor:`cancellation-message`,children:(0,U.jsx)(XH,{id:`cancellation-message`,name:`cancellation-message`,placeholder:`Please share more detail about why you're deleting this account`,value:o,onChange:e=>s(e.currentTarget.value)})}),(0,U.jsx)(J,{label:`Type "${e.name}" to confirm (required)`,htmlFor:`delete-confirm`,children:(0,U.jsx)(X,{id:`delete-confirm`,name:`delete-confirm`,type:`text`,value:c,onChange:e=>d(e.currentTarget.value),disabled:p.isLoading})}),(0,U.jsx)(TA,{...p})]}):(0,U.jsxs)(`div`,{className:`text-gray-700`,children:[`You must first deprovision all existing running resources (Environments, Apps, Databases, Endpoints, Backups, etc.) in your `,(0,U.jsx)(`strong`,{children:e.name}),` organization. The following Stacks still have actively running resources:`,(0,U.jsx)(`ul`,{className:`mt-2 ml-4 list-disc`,children:h.map(e=>(0,U.jsx)(`li`,{children:(0,U.jsx)(P,{to:Co(e.id),className:`text-indigo-600 hover:text-indigo-800 underline`,children:e.name})},e.id))})]})}),(0,U.jsx)(jU,{actions:g?[(0,U.jsx)(K,{variant:`white`,onClick:y,children:`Cancel`},`cancel`),(0,U.jsx)(K,{variant:`delete`,disabled:x||p.isLoading,isLoading:p.isLoading,onClick:S,children:`Submit Deletion Request`},`submit`)]:[(0,U.jsx)(K,{variant:`white`,onClick:y,children:`Close`},`close`)]})]})}):null]})},DUe=()=>{let e=l(),t=B(ns),[n,r]=(0,V.useState)(t),i=(e,t)=>{r({...n,[e]:t})},a=vc(n),o=I(a),[s,c]=QS(wUe),u=t=>{t.preventDefault(),c(n)&&e(a)},d=()=>{r(t)};return(0,V.useEffect)(()=>{r(t)},[t.id,t.name]),(0,U.jsxs)(W,{children:[(0,U.jsx)(`h2`,{className:G.type.h2,children:`Organization Settings`}),(0,U.jsx)(Z,{children:(0,U.jsx)(W,{children:(0,U.jsx)(`form`,{onSubmit:u,children:(0,U.jsxs)(W,{children:[(0,U.jsx)(TA,{...o}),(0,U.jsx)(J,{label:`Organization Name`,htmlFor:`org-name`,children:(0,U.jsx)(X,{id:`org-name`,name:`org-name`,value:n.name,onChange:e=>i(`name`,e.currentTarget.value)})}),(0,U.jsx)(J,{label:`Primary Phone`,htmlFor:`phone`,children:(0,U.jsx)(X,{id:`phone`,name:`phone`,value:n.primaryPhone,onChange:e=>i(`primaryPhone`,e.currentTarget.value)})}),(0,U.jsx)(J,{label:`Emergency Phone`,htmlFor:`emergency-phone`,children:(0,U.jsx)(X,{id:`emergency-phone`,name:`emergency-phone`,value:n.emergencyPhone,onChange:e=>i(`emergencyPhone`,e.currentTarget.value)})}
161),(0,U.jsx)(J,{label:`Security Alert Notification Email`,htmlFor:`security-alert-email`,feedbackMessage:s.securityEmail,feedbackVariant:s.securityEmail?`danger`:`info`,children:(0,U.jsx)(X,{id:`security-alert-email`,name:`security-alert-email`,value:n.securityAlertEmail,onChange:e=>i(`securityAlertEmail`,e.currentTarget.value)})}),(0,U.jsx)(J,{label:`Ops Alert Notification Email`,htmlFor:`ops-alert-email`,feedbackMessage:s.opsEmail,feedbackVariant:s.opsEmail?`danger`:`info`,children:(0,U.jsx)(X,{id:`ops-alert-email`,name:`ops-alert-email`,value:n.opsAlertEmail,onChange:e=>i(`opsAlertEmail`,e.currentTarget.value)})}),(0,U.jsxs)(W,{variant:`horizontal`,size:`sm`,children:[(0,U.jsx)(K,{type:`submit`,isLoading:o.isLoading,children:`Save Changes`}),(0,U.jsx)(K,{variant:`white`,onClick:d,disabled:o.isLoading,children:`Cancel`})]})]})})})}),(0,U.jsx)(EUe,{org:t})]})},Q5=1e4,$5=5e3,e7=({isLoading:e,onCancel:t,disabled:n=!1})=>(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`div`,{className:`py-8`,children:(0,U.jsx)(`hr`,{})}),(0,U.jsxs)(W,{variant:`horizontal`,size:`sm`,children:[(0,U.jsx)(K,{type:`submit`,isLoading:e,disabled:n,children:`Save Changes`}),(0,U.jsx)(K,{variant:`white`,onClick:t,disabled:e,children:`Cancel`})]})]}),OUe=({config:e})=>{let t=l(),[n,r]=(0,V.useState)(e.spendLimit||$5),[i,a]=(0,V.useState)(),o=Nb({orgId:B($o),id:e.id,spendLimit:n}),s=I(o);(0,V.useEffect)(()=>{r(e.spendLimit||$5)},[e.spendLimit]);let c=e=>{if(e.preventDefault(),!n){a(`Global spend limit is required.`);return}if(n<0){a(`Global spend limit cannot be negative.`);return}if(n>Q5){a(`Global spend limit cannot exceed ${ub(Q5,0)}.`);return}a(void 0),t(o)},u=()=>{a(void 0),r(e.spendLimit||$5)};return(0,U.jsxs)(Z,{children:[(0,U.jsx)(`h3`,{className:G.type.h3,children:`Spend`}),(0,U.jsxs)(`p`,{className:`${G.type.darker} mt-2 mb-4`,children:[`The global spend limit always takes priority.`,` `,(0,U.jsx)(`strong`,{children:`Once it's reached, all key usage is blocked`}),` â even if individual key limits haven't been hit. Usage resumes when the cycle resets or you raise the global limit.`]}),(0,U.jsxs)(`form`,{onSubmit:c,noValidate:!0,children:[(0,U.jsx)(TA,{className:`mb-4`,...s}),(0,U.jsx)(J,{label:`Global Spend Limit (required)`,htmlFor:`global-spend-limit`,feedbackMessage:i,feedbackVariant:i?`danger`:`info`,children:(0,U.jsx)(X,{id:`global-spend-limit`,name:`global-spend-limit`,type:`number`,min:0,max:Q5,value:n,onChange:e=>r(e.currentTarget.value?Number.parseFloat(e.currentTarget.value):void 0)})}),(0,U.jsx)(e7,{isLoading:s.isLoading,onCancel:u})]})]})},t7=({cost:e})=>e===0?(0,U.jsx)(U2,{label:`Free`}):(0,U.jsx)(U2,{label:e.toLocaleString(`en`,{style:`currency`,currency:`USD`,minimumFractionDigits:2,maximumFractionDigits:Math.max(2,1-Math.floor(Math.log10(e)))})}),kUe=[{field:`id`,headerName:`ID`,cellRenderer:({data:e})=>(0,U.jsx)(U2,{label:(0,U.jsx)(`span`,{className:`font-mono`,children:e.id})})},{field:`name`,headerName:`Name`,cellRenderer:({data:e})=>(0,U.jsx)(U2,{label:e.name})},{field:`contextLength`,headerName:`Context Window`,cellRenderer:({data:e})=>(0,U.jsx)(U2,{label:L8(e.contextLength)})},{field:`inputCostPerMillionTokens`,headerName:`Input Cost ($/Mtok)`,cellRenderer:({data:e})=>(0,U.jsx)(t7,{cost:e.inputCostPerMillionTokens}
161)},{field:`outputCostPerMillionTokens`,headerName:`Output Cost ($/Mtok)`,cellRenderer:({data:e})=>(0,U.jsx)(t7,{cost:e.outputCostPerMillionTokens})}],n7=`*`,AUe=({config:e})=>{let t=l(),n=B($o),r=e.models.length>0&&!e.models.includes(n7),[i,a]=(0,V.useState)(r),o=e.models.filter(e=>e!==n7),[s,c]=(0,V.useState)(o),[d,f]=(0,V.useState)(),[p,m]=(0,V.useState)(0),h=()=>m(e=>e+1);u(AS());let g=I(AS),_=g.meta.models||[],v=g.isLoading||g.isInitialLoading,y=_.length>0,b=Nb({orgId:n,id:e.id,models:i?s:[n7]}),x=I(b),S=e=>s.includes(e.id),C=e=>{a(e),f(void 0),h()},w=e=>{if(e.preventDefault(),i&&s.length===0){f(`Select at least one model, or uncheck the restriction to allow all models.`);return}f(void 0),t(b)},T=()=>{a(r),c(o),f(void 0),h()};return(0,U.jsxs)(Z,{children:[(0,U.jsx)(`h3`,{className:G.type.h3,children:`Model Access`}),(0,U.jsx)(`p`,{className:`${G.type.darker} mt-2 mb-4`,children:`Define a model allowlist for your organization. Further restrictions and/or model fallback behavior can be defined on a per-key basis via the keysâ settings pages.`}),(0,U.jsxs)(`form`,{onSubmit:w,children:[(0,U.jsx)(TA,{className:`mb-4`,...x}),!v&&!y?(0,U.jsx)(q,{className:`mb-4`,variant:`error`,children:`We couldn't load the list of supported models, so model access can't be changed right now.`}):null,(0,U.jsx)(`div`,{className:`mb-4`,children:(0,U.jsx)(ZH,{label:`Restrict which models can be used by keys in my organization`,checked:i,disabled:!y,onChange:e=>C(e.currentTarget.checked)})}),(0,U.jsx)(L2,{rowData:_,colDefs:kUe,isLoading:g.isInitialLoading,pageSize:10,rowSelection:i?`multiRow`:void 0,rowId:e=>e.id,isRowSelected:S,onSelectionChanged:e=>c(e.map(e=>e.id))},p),d?(0,U.jsx)(zA,{variant:`danger`,children:d}):null,(0,U.jsx)(e7,{isLoading:x.isLoading,onCancel:T,disabled:!y})]})]})},jUe=()=>{let e=B($o);u(Ab({orgId:e}));let{isInitialLoading:t}=I(Ab),n=B(kb);return(0,U.jsxs)(W,{children:[(0,U.jsx)(`h2`,{className:G.type.h2,children:`Managed AI Settings`}),t?(0,U.jsx)(SE,{show:!0}):null,!t&&!n?(0,U.jsxs)(q,{variant:`info`,children:[`This organization isn't enrolled in the LLM Gateway yet.`,` `,(0,U.jsx)(P,{to:Wi(),className:`underline`,children:`Get started`}),` `,`to configure spend and model access.`]}):null,n?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(OUe,{config:n}),(0,U.jsx)(AUe,{config:n})]}):null]})},r7={metadata:e=>{if(!e.metadataUrl&&!e.metadata)return`must provide either metadata URL or metadata XML`}};function MUe({onSuccess:e}){let t=l(),n=B(an),r=B($o),i=`${n.authUrl}/organizations/${r}`,a=`${i}/saml/consume`,o=`${i}/saml/metadata`,[s,c]=(0,V.useState)(``),[u,d]=(0,V.useState)(``),[f,p]=QS(r7),m={orgId:r,metadata:u,metadataUrl:s},h=jc(m),g=I(h),_=e=>{e.preventDefault(),p(m)&&t(h)};return T(g,()=>{e()}),(0,U.jsxs)(W,{children:[(0,U.jsx)(`h2`,{className:G.type.h2,children:`Single Sign-On`}),(0,U.jsx)(Z,{children:(0,U.jsxs)(W,{children:[(0,U.jsxs)(q,{children:[`To configure an SSO Provider, enter the required information into the provider's setup process. Terminology and acronyms vary between providers. For Okta, follow our`,` `,(0,U.jsx)(CA,{variant:`default`,href:`https://www.aptible.com/docs/sso-setup#okta-walkthrough`,children:`guided walkthrough.`})]}),(0,U.jsx)(TA,{...g}),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`h4`,{className:G.type.h4,children:`Single Sign-On URL (Assertion Consumer Service [ACS] URL)`}),(0,U.jsx)(z2,{text:a})]}),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`h4`,{className:G.type.h4,children:`Audience URI (Service Provider Entity ID)`}),(0,U.jsx)(z2,{text:o})]}),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`h4`,{className:G.type.h4,children:`Name ID format`}),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`strong`,{children:`EmailAddress`}),` is preferred. Unspecified is also acceptible.`]})]}),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`h4`,{className:G.type.h4,children:`Application Username (NameID attribute)`}),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`strong`,{children:`Email`}),` is required. The email sent by the SSO provider must exactly match the Aptible account.`]})]}),(0,U.jsx)(`hr`,{}),(0,U.jsx)(`form`,{onSubmit:_,children:(0,U.jsxs)(W,{children:[(0,U.jsxs)(q,{children:[`After completing your SSO provider setup, it should generate an XML metadata file for you. Please enter either the`,` `,(0,U.jsx)(`strong`,{children:`Metadata URL`}),` OR`,` `,(0,U.jsx)(`strong`,{children:`Metadata File XML Content.`})]}),(0,U.jsx)(J,{label:`Metadata URL`,htmlFor:`metadata-url`,feedbackMessage:f.metadata,feedbackVariant:f.metadata?`danger`:`info`,children:(0,U.jsx)(X,{id:`metadata-url`,name:`metadata-url`,value:s,onChange:e=>c(e.currentTarget.value)})}),(0,U.jsx)(`h4`,{className:G.type.h4,children:`- OR -`}),(0,U.jsx)(J,{label:`Metadata File XML Content`,htmlFor:`metadata-xml`,feedbackMessage:f.metadata,feedbackVariant:f.metadata?`danger`:`info`,children:(0,U.jsx)(XH,{id:`metadata-xml`,"aria-label":`metadata-xml`,value:u,onChange:e=>d(e.currentTarget.value)})}),(0,U.jsx)(`div`,{children:(0,U.jsx)(K,{type:`submit`,isLoading:g.isLoading,children:`Save`})})]})})]})})]})}function NUe({onSuccess:e,saml:t,org:n}){let r=l(),[i,a]=(0,V.useState)(``),[o,s]=(0,V.useState)(``),[c,u]=QS(r7),d={samlId:t.id,metadata:o,metadataUrl:i},f=Mc(d),p=I(f),m=I(Pc),h=e=>{e.preventDefault(),u(d)&&r(f)},g=()=>{r(Pc({id:t.id}))};return T(p,()=>{e()}),T(m,()=>{e()}),(0,U.jsxs)(W,{children:[(0,U.jsx)(`h2`,{className:G.type.h2,children:`Single Sign-On`}),(0,U.jsx)(Z,{children:(0,U.jsxs)(W,{children:[(0,U.jsx)(`h3`,{className:G.type.h3,children:`Edit SSO Configuration`}),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`h4`,{className:G.type.h4,children:`Entity ID`}),(0,U.jsx)(z2,{text:t.entity_id})]}),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`h4`,{className:G.type.h4,children:`Sign-In URL`}),(0,U.jsx)(z2,{text:t.sign_in_url})]}),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`h4`,{className:G.type.h4,children:`N
161ame Format`}),(0,U.jsx)(z2,{text:t.name_format})]}),(0,U.jsx)(`form`,{onSubmit:h,children:(0,U.jsxs)(W,{children:[(0,U.jsx)(TA,{...p}),(0,U.jsx)(J,{label:`Metadata URL`,htmlFor:`metadata-url`,feedbackMessage:c.metadata,feedbackVariant:c.metadata?`danger`:`info`,children:(0,U.jsx)(X,{id:`metadata-url`,name:`metadata-url`,value:i,onChange:e=>a(e.currentTarget.value)})}),(0,U.jsx)(J,{label:`Metadata File XML Content`,htmlFor:`metadata-xml`,feedbackMessage:c.metadata,feedbackVariant:c.metadata?`danger`:`info`,children:(0,U.jsx)(XH,{id:`metadata-xml`,"aria-label":`metadata-xml`,value:o,onChange:e=>s(e.currentTarget.value)})}),(0,U.jsx)(`div`,{children:(0,U.jsx)(K,{type:`submit`,isLoading:p.isLoading,disabled:!i&&!o,children:`Save Changes`})})]})}),(0,U.jsxs)(W,{children:[(0,U.jsx)(TA,{...m}),(0,U.jsx)(`div`,{children:n.ssoEnforced?(0,U.jsx)(q,{variant:`info`,children:`SSO must not be enforced to be removed`}):(0,U.jsx)(K,{variant:`delete`,requireConfirm:!0,onClick:g,isLoading:m.isLoading,children:`Remove SSO Configuration`})})]})]})})]})}function PUe(e){return mC(B(t=>Kg(t,{orgId:e})).find(e=>e.type===`owner`)?.id||``)}var FUe={add:e=>H4(e.userId,`user`)};function IUe(e){let t=c(Fc({orgId:e})),{userIds:n}=PUe(e),r=(t.data?._embedded.whitelist_memberships||[]).map(e=>({id:e.id,userId:R(e._links.user)})),i=B(Wo),a=i.map(e=>{let t=r.find(t=>t.userId===e.id);return{...e,memberId:t?.id||``}}).filter(e=>e.memberId!==``),o=i.filter(e=>!a.find(t=>t.id===e.id)).filter(e=>!n.includes(e.id)).map(e=>({label:`${e.name} (${e.email})`,value:e.id}));return o.unshift({label:`Add user to SSO Bypass`,value:``}),{allowlist:t,allowlistUsers:a,options:o}}function LUe({orgId:e}){let t=l(),{allowlist:n,allowlistUsers:r,options:i}=IUe(e),[a,o]=(0,V.useState)(``),s=I(Ic),c=I(Lc),[u,d]=QS(FUe),f={orgId:e,userId:a},p=e=>{o(e.value)},m=()=>{d(f)&&t(Ic(f))},h=e=>{t(Lc({id:e}))};return T(s,()=>{n.trigger()}),T(c,()=>{n.trigger()}),(0,U.jsx)(Z,{children:(0,U.jsxs)(W,{children:[(0,U.jsx)(`h3`,{className:G.type.h3,children:`SSO Bypass Allowlist`}),(0,U.jsx)(`p`,{children:`Account owners can always access the account and can not be added here.`}),(0,U.jsxs)(VA,{children:[(0,U.jsxs)(HA,{children:[(0,U.jsx)(KA,{children:`N
161ame`}),(0,U.jsx)(KA,{children:`Email`}),(0,U.jsx)(KA,{children:`2FA`}),(0,U.jsx)(KA,{children:`Actions`})]}),(0,U.jsxs)(UA,{children:[r.length===0?(0,U.jsx)(GA,{colSpan:4,children:`No users added to SSO exception list`}):null,r.map(e=>(0,U.jsxs)(WA,{children:[(0,U.jsx)(Y,{children:e.name}),(0,U.jsx)(Y,{children:e.email}),(0,U.jsx)(Y,{children:e.otpEnabled}),(0,U.jsx)(Y,{children:(0,U.jsx)(K,{variant:`delete`,requireConfirm:!0,onClick:()=>h(e.memberId),isLoading:c.isLoading,children:`Remove user`})})]},e.id))]})]}),u.add?(0,U.jsx)(q,{variant:`error`,children:u.add}):null,(0,U.jsxs)(W,{variant:`horizontal`,children:[(0,U.jsx)(XA,{options:i,onSelect:p,value:a,ariaLabel:`allowlist-membership`}),(0,U.jsx)(K,{onClick:m,isLoading:s.isLoading,children:`Add`})]})]})})}var RUe=({org:e})=>{let t=l(),n=I(yc),r=()=>{t(yc({id:e.id,ssoEnforced:!e.ssoEnforced}))};return(0,U.jsx)(Z,{children:(0,U.jsxs)(W,{children:[(0,U.jsx)(`h3`,{className:G.type.h3,children:`Require SSO for Access`}),(0,U.jsx)(`div`,{children:`Your members will be able to access this organization's resources by using SSO. Organization owners and anyone added to the allowlist are exempt. They can continue to use Aptible credentials and SSH keys to access your resources.`}),(0,U.jsx)(TA,{...n}),(0,U.jsx)(`div`,{children:(0,U.jsx)(K,{onClick:r,isLoading:n.isLoading,variant:e.ssoEnforced?`delete`:`primary`,children:e.ssoEnforced?`Disable`:`Enable`})})]})})},zUe=({org:e,saml:t,onSuccess:n})=>{let r=l(),i=t.handle||e.id,[a,o]=(0,V.useState)(i),s=I(Nc),c=`${B(an).appUrl}/sso/${i}`,u=!a||a===i;return T(s,()=>{n()}),(0,U.jsx)(Z,{children:(0,U.jsxs)(W,{children:[(0,U.jsx)(`form`,{onSubmit:e=>{e.preventDefault(),r(Nc({samlId:t.id,handle:a}))},children:(0,U.jsxs)(W,{children:[(0,U.jsx)(TA,{...s}),(0,U.jsx)(J,{htmlFor:`saml-handle`,label:`SSO Login ID`,description:(0,U.jsxs)(`div`,{children:[`Your members must enter this login ID on the`,` `,(0,U.jsx)(CA,{variant:`info`,href:ao(),children:`SSO login page`}),`. We suggest picking a memorable, unique value such as your company's primary email domain.`]}),children:(0,U.jsx)(X,{value:a,onChange:e=>o(e.currentTarget.value),id:`saml-handle`,name:`saml-handle`,"data-form-type":`other`})}),(0,U.jsx)(`div`,{children:(0,U.jsx)(K,{type:`submit`,disabled:u,isLoading:s.isLoading,children:`Update Login ID`})})]})}),(0,U.jsx)(`hr`,{}),(0,U.jsxs)(W,{children:[(0,U.jsx)(`h4`,{className:G.type.h4,children:`Shortcut SSO login URL`}),(0,U.jsx)(`div`,{children:`Your members may also use this direct link to login to your Aptible organization via SSO.`}),(0,U.jsx)(z2,{text:c})]})]})})},BUe=()=>{let e=B(ns),t=c(kc());if(t.isLoading)return(0,U.jsx)(xE,{});let n=t.data?._embedded?.saml_configurations||[];return n.length===0?(0,U.jsx)(MUe,{onSuccess:()=>t.trigger()}):(0,U.jsxs)(W,{children:[(0,U.jsx)(NUe,{saml:n[0],org:e,onSuccess:()=>t.trigger()}),(0,U.jsx)(zUe,{saml:n[0],org:e,onSuccess:()=>t.trigger()}),(0,U.jsx)(RUe,{org:e}),e.ssoEnforced?(0,U.jsx)(LUe,{orgId:e.id}):null]})},VUe=()=>{let e=l(),t=B($o),n=u(sC({orgId:t})),r=B(e=>oC(e,{orgId:t})),i=t=>{e(lC({invitationId:t}))},a=t=>{e(uC({id:t}))},o=I(uC),s=I(lC);return T(o,()=>{n.trigger()}),(0,U.jsxs)(W,{children:[(0,U.jsx)(NU,{description:`This is a list of pending invitations to join this Organization`,children:`Pending Invites`}),(0,U.jsx)(TA,{...s}),(0,U.jsx)(TA,{...o}),(0,U.jsxs)(VA,{children:[(0,U.jsxs)(HA,{children:[(0,U.jsx)(KA,{children:`Email`}),(0,U.jsx)(KA,{variant:`right`,children:`Actions`})]}),(0,U.jsxs)(UA,{children:[r.length===0?(0,U.jsx)(GA,{colSpan:2,children:`No pending invitations`}):null,r.map(e=>(0,U.jsxs)(WA,{children:[(0,U.jsx)(Y,{children:e.email}),(0,U.jsx)(Y,{variant:`right`,children:(0,U.jsxs)(W,{variant:`horizontal`,size:`sm`,className:`flex justify-end`,children:[(0,U.jsx)(K,{requireConfirm:`invert`,size:`sm`,onClick:()=>i(e.id),isLoading:s.isLoading,children:`Resend`}),(0,U.jsx)(K,{requireConfirm:`invert`,variant:`delete`,size:`sm`,onClick:()=>a(e.id),isLoading:o.isLoading,children:`Revoke`})]})})]},e.id))]})]})]})},i7=(e,t)=>e.label.localeCompare(t.label),a7=`no-access`,HUe=e=>e===a7,o7=`all`,s7=e=>e===o7,UUe=()=>{let[e,t]=Ee(),n=B(ns),r=B(nu),i=B(tl),a=B(T_),o=B(Wo),s=[{label:`All`,value:o7},...o.map(e=>({label:e.name,value:e.id}
161)).sort(i7)],c=B(su),l=[{label:`Hide Environments without Permissions`,value:a7},{label:`All Environments`,value:o7},...c.map(e=>({label:e.handle,value:e.id})).sort(i7)],d=B(e=>Kg(e,{orgId:n.id})),f=[{label:`All`,value:o7},...d.map(e=>({label:e.name,value:e.id})).sort(i7)],p=e.get(`role_id`)||o7,m=e.get(`user_id`)||o7,h=e.get(`environment_id`)||a7,g={roleId:p,userId:m,envId:h},[_,v]=(0,V.useState)(p),[y,b]=(0,V.useState)(m),[x,S]=(0,V.useState)(h),C=d.filter(e=>s7(g.roleId)?!0:e.id===g.roleId),w=C.find(e=>e.type===`owner`),T=C.find(e=>e.type===`platform_owner`),E=C.find(e=>e.type===`billing_owner`),D=C.find(e=>e.type===`activity_log_viewer`),O=()=>{t({role_id:_,user_id:y,environment_id:x})};return u(ol({orgId:n.id})),(0,U.jsxs)(W,{children:[(0,U.jsx)(`h2`,{className:G.type.h2,children:`Settings / Roles`}),(0,U.jsx)(Z,{children:(0,U.jsx)(`form`,{onSubmit:e=>{e.preventDefault(),O()},children:(0,U.jsxs)(W,{children:[(0,U.jsxs)(W,{variant:`horizontal`,children:[(0,U.jsxs)(`div`,{className:`flex-1`,children:[(0,U.jsx)(RA,{htmlFor:`role-selector`,children:`Roles`}),(0,U.jsx)(XA,{id:`role-selector`,value:_,options:f,onSelect:e=>v(e.value),className:`w-full`})]}),(0,U.jsxs)(`div`,{className:`flex-1`,children:[(0,U.jsx)(RA,{htmlFor:`member-selector`,children:`Members`}),(0,U.jsx)(XA,{id:`member-selector`,value:y,options:s,onSelect:e=>b(e.value),className:`w-full`})]}),(0,U.jsxs)(`div`,{className:`flex-1`,children:[(0,U.jsx)(RA,{htmlFor:`env-selector`,children:`Environments`}),(0,U.jsx)(XA,{id:`env-selector`,options:l,value:x,onSelect:e=>S(e.value),className:`w-full`})]})]}),(0,U.jsx)(`hr`,{}),(0,U.jsxs)(W,{variant:`horizontal`,className:`items-center justify-between`,children:[(0,U.jsxs)(W,{variant:`horizontal`,size:`sm`,children:[(0,U.jsx)(K,{type:`submit`,children:`Save Filters`}),(0,U.jsx)(K,{variant:`white`,onClick:()=>{v(o7),b(o7),S(a7),t({})},children:`Reset`})]}),(0,U.jsxs)(W,{variant:`horizontal`,size:`sm`,children:[(0,U.jsx)(K6,{csv:()=>{let e=(e,t)=>n=>e===`owner`||e===`platform_owner`||t.find(e=>e.scope===n)?`Yes`:`No`,t=`organization,role,users,environment,environment_admin,full_visibility,basic_visibility,deployment,destroy,ops,sensitive_access,tunnel 162`;for(let o of C){let s=i[o.id].filter(u7(g.userId)),c=l7(g.envId,a[o.id]),l=Object.keys(c),u=s.findIndex(e=>e.id===g.userId)===-1;if(s7(g.userId)||!u){if(Wg(o)){let e=[n.name,o.name,`\"${s.map(e=>e.name).join(`,`)}\"`,`All Environments`,`Yes`,`Yes`,`Yes`,`Yes`,`Yes`,`Yes`,`Yes`,`Yes`];t+=e.join(`,`),t+=` 163`}else for(let i of l){let a=c[i],l=e(o.type,a),u=[n.name,o.name,`\"${s.map(e=>e.name).join(`,`)}\"`,r[i].handle,l(`admin`),l(`read`),l(`basic_read`),l(`deploy`),l(`destroy`),l(`observability`),l(`sensitive`),l(`tunnel`)];t+=u.join(`,`),t+=` 164`}}}return t},title:`aptible-roles-${n.name}`}),(0,U.jsxs)(dA,{to:mee(),children:[(0,U.jsx)(qE,{variant:`sm`,className:`mr-2`}),` New Role`]})]})]})]})})}),(0,U.jsx)(`div`,{className:`text-gray-500`,children:`${C.length} Roles`}),w||T||E||D?(0,U.jsxs)(W,{variant:`horizontal`,children:[w?(0,U.jsx)(c7,{title:`Account Owner`,desc:`The Account Owner role has total permission over your Aptible account, including billing.`,users:i[w.id],roleId:w.id,filters:g}):null,T?(0,U.jsx)(c7,{title:`Deploy Owner`,desc:`The Deploy Owner role total permission over all platform resources, not including billing.`,users:i[T.id],roleId:T.id,filters:g}):null,E?(0,U.jsx)(c7,{title:`Billing Only Owner`,desc:`The Billing Only Owner role has total permission over billing but cannot administer users, roles, environments, or resources.`,users:i[E.id],roleId:E.id,filters:g}):null,D?(0,U.jsx)(c7,{title:`Activity Log Viewer`,desc:`The Activity Log Viewer role has read-only access to view activity logs across the organization.`,users:i[D.id],roleId:D.id,filters:g}):null]}):null,(0,U.jsx)(`hr`,{}),C.filter(e=>!Wg(e)&&e.type!==`billing_owner`&&e.type!==`activity_log_viewer`).map(e=>(0,U.jsx)(WUe,{role:e,totalEnvs:c.length,filters:g,users:i[e.id],envToPerms:a[e.id]},e.id))]})};function c7({roleId:e,title:t,desc:n,users:r,filters:i}){let a=r.filter(u7(i.userId)).map(e=>e.name);return(0,U.jsxs)(Z,{bg:`gray-50`,className:`flex-1 flex flex-col gap-2`,children:[(0,U.jsx)(`h3`,{className:G.type.h3,children:t}),(0,U.jsx)(`p`,{className:`text-black-500`,children:n}),a.length===0?(0,U.jsx)(`p`,{className:`text-gray-500`,children:`No users assigned`}):(0,U.jsx)(`p`,{children:a.join(`, `)}),(0,U.jsx)(dA,{to:_i(e),size:`sm`,className:`inline-block w-fit`,children:`Edit Role`})]})}function WUe({role:e,totalEnvs:t,filters:n,envToPerms:r,users:i}){let a=i.filter(u7(n.userId)),o=l7(n.envId,r),s=Object.keys(o),c=s.reduce((e,t)=>
164o[t].length>0?e+1:e,0),l=i.findIndex(e=>e.id===n.userId)===-1;return!s7(n.userId)&&l?null:(0,U.jsxs)(W,{children:[(0,U.jsxs)(W,{variant:`horizontal`,children:[(0,U.jsxs)(W,{size:`sm`,className:`w-[225px]`,children:[(0,U.jsx)(qUe,{role:e}),a.length===0?(0,U.jsx)(`div`,{className:`text-sm`,children:`No users`}):(0,U.jsx)(`div`,{className:`text-sm`,children:a.map(e=>e.name).join(`, `)}),(0,U.jsx)(dA,{to:_i(e.id),size:`sm`,className:`inline-block w-fit`,children:`Edit Role`})]}),(0,U.jsxs)(VA,{className:`flex-1`,children:[(0,U.jsxs)(HA,{children:[(0,U.jsx)(KA,{children:KUe(e.type,t,c)}),(0,U.jsx)(f3,{scope:`admin`}),(0,U.jsx)(f3,{scope:`read`}),(0,U.jsx)(f3,{scope:`basic_read`}),(0,U.jsx)(f3,{scope:`deploy`}),(0,U.jsx)(f3,{scope:`destroy`}),(0,U.jsx)(f3,{scope:`observability`}),(0,U.jsx)(f3,{scope:`sensitive`}),(0,U.jsx)(f3,{scope:`tunnel`})]}),(0,U.jsxs)(UA,{children:[s.length===0?(0,U.jsx)(GA,{colSpan:9,children:`No permissions set`}):null,s.map(e=>(0,U.jsx)(GUe,{envId:e,envPerms:o[e]},e))]})]})]}),(0,U.jsx)(`hr`,{})]})}function GUe({envId:e,envPerms:t}){let n=B(t=>tu(t,{id:e})),r=R_(t);return(0,U.jsxs)(WA,{children:[(0,U.jsx)(Y,{children:n.handle}),(0,U.jsx)(Y,{variant:`center`,children:(0,U.jsx)(p3,{perm:r.admin})}),(0,U.jsx)(Y,{variant:`center`,children:(0,U.jsx)(p3,{perm:r.read})}),(0,U.jsx)(Y,{variant:`center`,children:(0,U.jsx)(p3,{perm:r.basic_read})}),(0,U.jsx)(Y,{variant:`center`,children:(0,U.jsx)(p3,{perm:r.deploy})}),(0,U.jsx)(Y,{variant:`center`,children:(0,U.jsx)(p3,{perm:r.destroy})}),(0,U.jsx)(Y,{variant:`center`,children:(0,U.jsx)(p3,{perm:r.observability})}),(0,U.jsx)(Y,{variant:`center`,children:(0,U.jsx)(p3,{perm:r.sensitive})}),(0,U.jsx)(Y,{variant:`center`,children:(0,U.jsx)(p3,{perm:r.tunnel})})]})}function l7(e,t){if(s7(e))return t;if(HUe(e)){let e={};return Object.keys(t).forEach(n=>{t[n].length>0&&(e[n]=t[n])}),e}return{[e]:t[e]||[]}}function u7(e){return t=>s7(e)?!0:t.id===e}function KUe(e,t,n){return e===`owner`?`All Environments and Billing`:e===`platform_owner`?`All Environments`:e===`billing_owner`?`Billing Only`:`${n} / ${t} Environments`}function qUe({role:e}){let t=!1;return(e.type===`owner`||e.type===`platform_owner`||e.type===`compliance_owner`||e.type===`billing_owner`||e.type===`activity_log_viewer`)&&(t=!0),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(P,{className:`${G.type[`table link`]} text-md font-semibold`,to:_i(e.id),children:e.name}),t?null:(0,U.jsxs)(`div`,{className:`text-gray-500 text-sm`,children:[`Created: `,Df(e.createdAt)]})]})}function JUe(){let{id:e=``}=F();return(0,U.jsx)(ae,{to:vi(e),replace:!0})}function YUe({removeToolTip:e,onDelete:t,userId:n,isLoading:r,disableRemoval:i}){let a=(0,U.jsx)(K,{size:`sm`,className:`w-fit justify-self-end inline-flex`,requireConfirm:!0,variant:`delete`,onClick:()=>t(n),isLoading:r,disabled:i,children:`Remove`});return e?(0,U.jsx)(aA,{fluid:!0,text:e,children:a}):a}function XUe({membership:e,onDelete:t,isLoading:n,canManage:r,roleScimCreated:i}){let a=l(),o=B(t=>Uo(t,{id:e.userId})),s=B(t=>Xo(t,{id:e.userId}))&&i,c=s?`Cannot remove: user and role are SCIM-managed`:null;return(0,U.jsxs)(WA,{children:[(0,U.jsx)(Y,{children:o.name}),(0,U.jsx)(Y,{children:(0,U.jsx)(z2,{text:o.email})}),(0,U.jsx)(Y,{variant:`center`,children:o.otpEnabled?`Enabled`:`Disabled`}),(0,U.jsx)(Y,{variant:`center`,children:Df(e.createdAt)}),(0,U.jsx)(Y,{children:(0,U.jsx)(ZH,{label:``,checked:e.privileged,disabled:!r,onChange:t=>{t.preventDefault(),a(rl({id:e.id,privileged:t.currentTarget.checked}))}})}),(0,U.jsx)(Y,{variant:`right`,children:t?(0,U.jsx)(YUe,{removeToolTip:c,onDelete:t,userId:o.id,isLoading:n,disableRemoval:s}):null})]})}function ZUe(){let{id:e=``}=F();u(al({roleId:e}));let t=l(),n=N(),r=B(t=>Hg(t,{id:e})),{trigger:i,userIds:a}=mC(r.id),o=rC(B(t=>el(t,{roleId:e}))),s=[{label:`Select Existing User`,value:``},...B(Wo).filter(e=>!a.includes(e.id)).map(e=>({label:e.name,value:e.id}))],c=B(Ko),d=B($o),f=B(t=>C_(t,{roleId:e,userId:c,orgId:d})),p={email:e=>V4(e.email),role:e=>H4(e.roleId,`role`)},[m,h]=(0,V.useState)(``),g={email:m,roleId:e},_=dC(g),v=I(_),[y,b]=QS(p),x=e=>{e.preventDefault(),b(g)&&t(_)};T(v,()=>
164{n(pi())});let[S,C]=(0,V.useState)(``),w=e=>{C(e.value)},E=B(e=>Uo(e,{id:S})),D=!!(E?.externalId&&E.externalId.trim()!==``)&&r.scimCreated,O=D?`Cannot add user: user and role are SCIM-managed`:`Add user to role`,k=()=>{D||t(sl({userId:S,add:[e],remove:[]}))},A=n=>{t(sl({userId:n,add:[],remove:[e]}))},j=I(sl);T(j,()=>{i()});let M=I(rl);return(0,U.jsx)(E5,{children:(0,U.jsxs)(W,{className:`mt-4`,children:[(0,U.jsx)(W,{size:`sm`,children:(0,U.jsxs)(PU,{children:[f?(0,U.jsx)(FU,{children:(0,U.jsxs)(W,{variant:`horizontal`,size:`sm`,children:[(0,U.jsxs)(W,{variant:`horizontal`,size:`sm`,children:[(0,U.jsx)(XA,{ariaLabel:`add-existing-user`,options:s,onSelect:w,value:S}),(0,U.jsx)(aA,{fluid:!0,text:O,children:(0,U.jsx)(K,{onClick:k,isLoading:j.isLoading,disabled:D||s.length===1,children:`Add User`})})]}),(0,U.jsx)(`form`,{onSubmit:x,children:(0,U.jsxs)(W,{variant:`horizontal`,size:`sm`,children:[(0,U.jsx)(TA,{...v}),(0,U.jsx)(J,{label:``,htmlFor:`email`,feedbackMessage:y.email,feedbackVariant:y.email?`danger`:`info`,children:(0,U.jsx)(X,{id:`email`,name:`email`,placeholder:`Email...`,value:m,onChange:e=>h(e.currentTarget.value)})}),(0,U.jsx)(K,{type:`submit`,name:`inviteUser`,isLoading:v.isLoading,children:`Invite New User`})]})})]})}):null,(0,U.jsx)(TA,{...j}),(0,U.jsx)(TA,{...M}),(0,U.jsxs)(W,{variant:`horizontal`,size:`lg`,className:`items-center`,children:[(0,U.jsxs)(IU,{children:[o.totalItems,` Members`]}),(0,U.jsx)(RU,{...o})]})]})}),(0,U.jsxs)(VA,{children:[(0,U.jsxs)(HA,{children:[(0,U.jsx)(KA,{children:`N
164ame`}),(0,U.jsx)(KA,{children:`Email`}),(0,U.jsx)(KA,{variant:`center`,children:`2FA Status`}),(0,U.jsx)(KA,{variant:`center`,children:`Added Date`}),(0,U.jsx)(KA,{children:`Role Admin`}),(0,U.jsx)(KA,{variant:`right`,children:`Actions`})]}),(0,U.jsxs)(UA,{children:[o.data.length===0?(0,U.jsxs)(GA,{colSpan:6,children:[r.name,` currently has no members.`]}):null,o.data.map(e=>(0,U.jsx)(XUe,{membership:e,isLoading:j.isLoading,onDelete:f?A:void 0,canManage:f,roleScimCreated:r.scimCreated},e.id))]})]}),o.totalPages>1&&(0,U.jsx)(RU,{...o})]})})}function d7({checked:e,disabled:t,onToggle:n,isLoading:r,label:i}){return(0,U.jsxs)(`label`,{children:[(0,U.jsx)(`div`,{className:`text-xs mb-2 h-[30px] flex justify-center items-end`,children:i}),(0,U.jsx)(X,{type:`checkbox`,className:`rounded-lg w-6 h-6`,onChange:e=>n(e.currentTarget.checked),checked:e,disabled:t||r})]})}function QUe({roleId:e,env:t,editing:n=!1,onEdit:r=()=>{},disabled:i=!1}){let a=l(),o=B(Ko),s=B($o),c=B(t=>C_(t,{roleId:e,userId:o,orgId:s})),u=B(t=>L.loaders.selectById(t,{id:A_(e)})),d=R_(B(n=>D_(n,{envId:t.id,roleId:e}))),f=e=>I_(e)?{checked:!0,disabled:!c}:L_(e)?{checked:!0,disabled:!0}:{checked:!1,disabled:!c},p=n=>r=>{a(j_(r?{type:`add`,payload:{envId:t.id,roleId:e,scope:n.scope}}:{type:`rm`,payload:{id:n.id,roleId:e}}))};return(0,U.jsxs)(WA,{children:[(0,U.jsxs)(Y,{className:`min-w-[130px]`,children:[(0,U.jsx)(`div`,{children:(0,U.jsx)(P,{to:Na(t.id),children:t.handle})}),(0,U.jsxs)(W,{size:`xs`,children:[(0,U.jsxs)(`div`,{children:[t.totalAppCount,` Apps`]}),(0,U.jsxs)(`div`,{children:[t.totalDatabaseCount,` Databases`]})]})]}),(0,U.jsx)(Y,{variant:`center`,className:`min-w-[130px]`,children:ou(t)?(0,U.jsx)(H2,{variant:`success`,children:`Allowed`}):(0,U.jsx)(H2,{variant:`error`,children:`Not Allowed`})}),(0,U.jsx)(Y,{variant:`center`,children:n?(0,U.jsx)(d7,{label:P_.admin,onToggle:p(d.admin),isLoading:u.isLoading,...f(d.admin)}):(0,U.jsx)(p3,{perm:d.admin})}),(0,U.jsx)(Y,{variant:`center`,children:n?(0,U.jsx)(d7,{label:P_.read,onToggle:p(d.read),isLoading:u.isLoading,...f(d.read)}):(0,U.jsx)(p3,{perm:d.read})}),(0,U.jsx)(Y,{variant:`center`,children:n?(0,U.jsx)(d7,{label:P_.basic_read,onToggle:p(d.basic_read),isLoading:u.isLoading,...f(d.basic_read)}):(0,U.jsx)(p3,{perm:d.basic_read})}),(0,U.jsx)(Y,{variant:`center`,children:n?(0,U.jsx)(d7,{label:P_.deploy,onToggle:p(d.deploy),isLoading:u.isLoading,...f(d.deploy)}):(0,U.jsx)(p3,{perm:d.deploy})}),(0,U.jsx)(Y,{variant:`center`,children:n?(0,U.jsx)(d7,{label:P_.destroy,onToggle:p(d.destroy),isLoading:u.isLoading,...f(d.destroy)}):(0,U.jsx)(p3,{perm:d.destroy})}),(0,U.jsx)(Y,{variant:`center`,children:n?(0,U.jsx)(d7,{label:P_.observability,onToggle:p(d.observability),isLoading:u.isLoading,...f(d.observability)}):(0,U.jsx)(p3,{perm:d.observability})}),(0,U.jsx)(Y,{variant:`center`,children:n?(0,U.jsx)(d7,{label:P_.sensitive,onToggle:p(d.sensitive),isLoading:u.isLoading,...f(d.sensitive)}
164):(0,U.jsx)(p3,{perm:d.sensitive})}),(0,U.jsx)(Y,{variant:`center`,children:n?(0,U.jsx)(d7,{label:P_.tunnel,onToggle:p(d.tunnel),isLoading:u.isLoading,...f(d.tunnel)}):(0,U.jsx)(p3,{perm:d.tunnel})}),(0,U.jsx)(Y,{variant:`right`,children:n?(0,U.jsx)(K,{className:`mt-4`,size:`sm`,variant:`white`,onClick:()=>r(``),children:`Close`}):(0,U.jsx)(afe,{className:`mt-4`,userId:o,roleId:e,orgId:s,size:`sm`,onClick:()=>r(t.id),disabled:i,children:`Edit`})})]})}function $Ue({roleId:e,envs:t}){let[n,r]=(0,V.useState)(``);return(0,U.jsxs)(VA,{className:`flex-1`,children:[(0,U.jsxs)(HA,{children:[(0,U.jsx)(KA,{children:`Environment`}),(0,U.jsx)(KA,{children:`PHI`}),(0,U.jsx)(f3,{scope:`admin`}),(0,U.jsx)(f3,{scope:`read`}),(0,U.jsx)(f3,{scope:`basic_read`}),(0,U.jsx)(f3,{scope:`deploy`}),(0,U.jsx)(f3,{scope:`destroy`}),(0,U.jsx)(f3,{scope:`observability`}),(0,U.jsx)(f3,{scope:`sensitive`}),(0,U.jsx)(f3,{scope:`tunnel`}),(0,U.jsx)(KA,{variant:`right`,children:`Actions`})]}),(0,U.jsxs)(UA,{children:[t.length===0?(0,U.jsx)(GA,{colSpan:10,children:`No environments exist`}):null,t.map(t=>(0,U.jsx)(QUe,{roleId:e,env:t,disabled:n!==``,editing:n===t.id,onEdit:r},t.id))]})]})}function eWe(){let{id:e=``}=F(),t=l(),{search:n,onChange:r}=_C();u(al({roleId:e}));let i=B(su).filter(e=>{let t=n.toLocaleLowerCase(),r=e.handle.toLocaleLowerCase(),i=e.id===t;return r.includes(t)||i}).sort((e,t)=>e.handle.localeCompare(t.handle)),a=A_(e),o=B(e=>L.loaders.selectById(e,{id:a})),s=B(t=>Hg(t,{id:e}));return(0,V.useEffect)(()=>{t(xr({ids:[a]}))},[]),Wg(s)?(0,U.jsxs)(E5,{children:[`Cannot edit `,s.type,` role`]}):(0,U.jsx)(E5,{children:(0,U.jsxs)(W,{className:`mt-4`,children:[(0,U.jsxs)(W,{variant:`horizontal`,size:`sm`,className:`items-center justify-between`,children:[(0,U.jsx)(YH,{placeholder:`Search...`,search:n,onChange:r}),(0,U.jsx)(mfe,{...o,message:o.isLoading?`Updating permissions ...`:o.message})]}),(0,U.jsx)($Ue,{roleId:e,envs:i})]})})}function tWe({role:e,canManage:t}){let n=l(),[r,i]=(0,V.useState)(e.name),a=I(t_),o=!t||r===e.name,s=t=>{t.preventDefault(),n(t_({id:e.id,name:r}))},c=()=>{i(e.name)};return(0,V.useEffect)(()=>{i(e.name)},[e.name]),(0,U.jsx)(`form`,{onSubmit:s,children:(0,U.jsxs)(W,{children:[(0,U.jsx)(`h3`,{className:`text-lg text-gray-500`,children:`Role Settings`}),(0,U.jsx)(TA,{...a}),(0,U.jsx)(J,{label:`Role Name`,htmlFor:`name`,children:(0,U.jsx)(X,{disabled:a.isLoading,name:`name`,type:`text`,value:r,onChange:e=>i(e.currentTarget.value),id:`name`})}),(0,U.jsxs)(W,{variant:`horizontal`,children:[(0,U.jsx)(K,{type:`submit`,isLoading:a.isLoading,disabled:o,children:`Save Changes`}),(0,U.jsx)(K,{variant:`white`,onClick:c,children:`Cancel`})]})]})})}function nWe({role:e,canManage:t}){let n=l(),r=N(),[i,a]=(0,V.useState)(``),o=r_({id:e.id}),s=I(o),c=e=>{e.preventDefault(),n(o),r(hi())},u=!t||e.name!==i;return(0,U.jsxs)(`form`,{onSubmit:c,children:[(0,U.jsxs)(`h1`,{className:`text-lg text-red-500 font-semibold flex items-center gap-2 mb-4`,children:[(0,U.jsx)(ZE,{color:`#AD1A1A`}),`Delete Role`]}),(0,U.jsxs)(W,{children:[(0,U.jsxs)(`p`,{children:[`This will permanently delete the `,(0,U.jsx)(`strong`,{children:e.name}),` role. This action cannot be undone. If you want to proceed, type`,` `,(0,U.jsx)(`strong`,{children:e.name}),` below to continue.`]}),(0,U.jsxs)(W,{variant:`horizontal`,size:`sm`,className:`items-center`,children:[(0,U.jsx)(X,{className:`flex-1`,disabled:s.isLoading,name:`delete-confirm`,type:`text`,value:i,onChange:e=>a(e.currentTarget.value),id:`delete-confirm`}),(0,U.jsxs)(K,{type:`submit`,variant:`delete`,className:`w-70 flex`,disabled:u,isLoading:s.isLoading,children:[(0,U.jsx)(RE,{color:`#FFF`,className:`mr-2`}),`Delete Role`]})]})]})]})}function rWe(){let{id:e=``}=F(),t=B(t=>Hg(t,{id:e})),n=B(Ko),r=B($o);u(al({roleId:e}));let i=B(t=>C_(t,{roleId:e,userId:n,orgId:r}));return Wg(t)?(0,U.jsxs)(E5,{children:[`Cannot edit `,t.type,` role`]}):t.scimCreated?(0,U.jsx)(E5,{children:(0,U.jsx)(W,{className:`mt-4`,children:(0,U.jsxs)(Z,{children:[(0,U.jsxs)(`h1`,{className:`text-lg text-red-500 font-semibold flex items-center gap-2 mb-4`,children:[(0,U.jsx)(ZE,{color:`#AD1A1A`}),`Role managed via SCIM`]}),(0,U.jsx)(`div`,{children:(0,U.jsx)(`p`,{children:`This role is managed via SCIM and cannot be edited in Aptible. Please manage the role directly in the source Identity Provider.`})})]})})}):(0,U.jsx)(E5,{children:(0,U.jsxs)(W,{className:`mt-4`,children:[(0,U.jsx)(Z,{children:(0,U.jsx)(tWe,{role:t,canManage:i})}),(0,U.jsx)(Z,{children:(0,U.jsx)(nWe,{role:t,canManage:i})})]})})}var iWe={email:e=>V4(e.email),role:e=>H4(e.roleId,`role`)};function aWe(){let e=N(),t=l(),n=B($o);u(Zg({orgId:n}));let r=[{value:``,label:`Select a Role`},...B(e=>x_(e,{orgId:n})).map(e=>({value:e.id,label:e.name}))],[i,a]=(0,V.useState)(``),[o,s]=(0,V.useState)(``),[c,d]=QS(iWe),f={email:i,roleId:o},p=dC(f),m=I(p);return T(m,()=>{e(pi())}),(0,U.jsxs)(W,{children:[(0,U.jsx)(hU,{crumbs:[{name:`Members`,to:ii()},{name:`Invite`,to:null}]}),(0,U.jsx)(Z,{children:(0,U.jsx)(`form`,{onSubmit:e=>{e.preventDefault(),d(f)&&t(p)},children:(0,U.jsxs)(W,{children:[(0,U.jsx)(TA,{...m}),(0,U.jsx)(J,{label:`Email`,htmlFor:`email`,feedbackMessage:c.email,feedbackVariant:c.email?`danger`:`info`,children:(0,U.jsx)(X,{id:`email`,name:`email`,value:i,onChange:e=>a(e.currentTarget.value)})}),(0,U.jsx)(J,{label:`Role`,htmlFor:`role`,feedbackMessage:c.role,feedbackVariant:c.role?`danger`:`info`,children:(0,U.jsx)(XA,{options:r,onSelect:e=>s(e.value),value:o})}),(0,U.jsx)(`div`,{children:(0,U.jsx)(K,{type:`submit`,isLoading:m.isLoading,children:`Share Invite`})})]})})})]})}var oWe=mr.post(`accept-invitation`,function*(e,t){if(e.request=e.payload.verificationCode?e.req({url:`/verifications`,body:JSON.stringify({type:`invitation`,invitation_id:e.payload.invitationId,verification_code:e.payload.verificationCode})}):e.req({url:`/invitations/${e.payload.invitationId}/accept`}),yield*t(),!e.json.ok)return;let n=yield*p(kn);yield*Te(()=>tc.run(tc({actorToken:n.accessToken,subjectToken:n.userUrl,subjectTokenType:`aptible:user:href`,scope:`manage`})))});function sWe({invitation:e,code:t}){let[n,r]=(0,V.useState)(!1),i=l(),a=N(),o=B(qo),s=oWe({invitationId:e.id,verificationCode:t}),c=I(s),u=I(tc);return(0,V.useEffect)(()=>{n&&u.status===`success`&&a(Dr())},[u.status,n]),e.id?o.email===e.email?e.expired?(0,U.jsx)(W,{children:(0,U.jsxs)(q,{variant:`error`,children:[`This invitation to join `,(0,U.jsx)(`strong`,{children:e.organizationName}),` `,`has expired. Please request a new invite from`,` `,(0,U.jsx)(`strong`,{children:e.inviterName}),`.`]})}):(0,U.jsxs)(W,{children:[(0,U.jsxs)(`p`,{children:[`You have been invited to join`,` `,(0,U.jsx)(`strong`,{children:e.organizationName}),` by`,` `,(0,U.jsx)(`strong`,{children:e.inviterName}),`.`]}),(0,U.jsxs)(`p`,{children:[`You have been assigned the `,(0,U.jsx)(`strong`,{children:e.roleName}),` role in this organization.`]}),(0,U.jsx)(`div`,{children:(0,U.jsx)(K,{className:`w-full`,onClick:()=>{r(!0),i(s)},isLoading:c.isLoading,children:`Accept Invite`})})]}):(0,U.jsx)(W,{children:(0,U.jsxs)(q,{children:[`This invitation (`,e.email,`) is not associated with your account (`,o.email,`). Please log in with the correct account.`]})}):null}
164function cWe(){let e=l(),t=N(),{inviteId:n=``,code:r=``}=F(),i=u(cC({id:n})),a=B(e=>aC(e,{id:n})),o=()=>{e(WS(bi(n,r))),e(pc()),t(Nr())};return(0,U.jsx)(b5,{children:(0,U.jsxs)(W,{children:[(0,U.jsx)(Z,{children:(0,U.jsxs)(W,{children:[(0,U.jsx)(TA,{...i}),(0,U.jsx)(xE,{...i}),(0,U.jsx)(sWe,{invitation:a,code:r})]})}),(0,U.jsx)(`div`,{children:(0,U.jsx)(K,{onClick:o,children:`Logout`})})]})})}var lWe=()=>{let{id:e=``}=F();return(0,U.jsx)(ae,{to:Co(e),replace:!0})},uWe=[`app`];function dWe(){let{id:e=``,serviceId:t=``}=F(),[n,r]=(0,V.useState)(`chart`),[i,a]=(0,V.useState)(`1h`);u(_f({id:e}));let o=[`cpu_pct`,`la`,`memory_all`],s=u(c8({serviceId:t,metrics:o,metricHorizon:i})),c=B(e=>s8(e,{serviceId:t,metricHorizon:i})),l=B(e=>Eu(e,{id:t})),d=B(e=>q_(e,{id:t,date:Ff(-7).toISOString()})).map(e=>e.id),f=Q6(i),p=B(e=>ev(e,{layers:uWe,releaseIds:d,horizonInSeconds:f,currentReleaseId:l.currentReleaseId})),m=(c/(p.length*o.length)*100).toFixed(2),{cpuShare:h}=wu(l);if(!l.containerCount)return(0,U.jsx)(q,{variant:`info`,children:`Metrics are available when there is at least one container running`});if(!p.length)return(0,U.jsx)(SE,{});if(!l.containerCount)return(0,U.jsx)(q,{variant:`info`,children:`Metrics are unavailable for services with zero containers`});let g=p.length>2?`grid-cols-1`:`grid-cols-1 xl:grid-cols-2`;return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,U.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,U.jsx)(q6,{viewMetricTab:n,setViewMetricTab:r}),(0,U.jsx)(J6,{viewHorizon:i,setViewHorizon:a})]}),s.isLoading?(0,U.jsxs)(`div`,{className:`flex gap-2 items-center`,children:[(0,U.jsxs)(`span`,{className:`text-black-500`,children:[m,`%`]}),(0,U.jsx)(SE,{color:`#595E63`})]}):null]}),(0,U.jsx)(`div`,{className:`my-4`,children:n===`chart`?(0,U.jsxs)(`div`,{className:`grid ${g} gap-4`,children:[(0,U.jsx)(l8,{containers:p,limit:`${h*100}% CPU`,metricNames:[`cpu_pct`],metricHorizon:i,helpText:`Total amount of CPU your container has used from the host system.`,yAxisUnit:`%`}),(0,U.jsx)(l8,{containers:p,metricNames:[`memory_all`],limit:`${l.containerMemoryLimitMb} MB`,metricHorizon:i,helpText:`Total amount of memory your container has requested from the host system.`,yAxisUnit:` MB`}),(0,U.jsx)(l8,{containers:p,metricNames:[`la`],metricHorizon:i,helpText:`Total runnable and blocked tasks (threads) in your container.`})]}):(0,U.jsx)(u8,{containers:p,metricHorizon:i})})]})}var fWe={containerCount:e=>{if(e.containerCount>32)return`Container count cannot exceed 32`}},f7=(e,t,n)=>(typeof e==`number`&&Number.isFinite(e)?e:n).toFixed(t),pWe={ratios:e=>{if(e.autoscaling===`vertical`&&e.memCpuRatioRThreshold<e.memCpuRatioCThreshold)return`Ratio for R must be larger than ratio for C`},minContainers:e=>{if(e.autoscaling===`horizontal`){if(e.minContainers===null||e.minContainers===void 0)return`Minimum containers is required`;if(e.minContainers<=0)return`Minimum containers must be greater than 0`;if(e.maxContainers&&e.minContainers>
164e.maxContainers)return`Minimum containers must be less than maximum containers`}},maxContainers:e=>{if(e.autoscaling===`horizontal`){if(e.maxContainers===null||e.maxContainers===void 0)return`Maximum containers is required`;if(e.maxContainers<=0)return`Maximum containers must be greater than 0`;if(e.minContainers&&e.maxContainers<e.minContainers)return`Maximum containers must be above minimum containers`}},minCpuThreshold:e=>{if(e.autoscaling===`horizontal`){if(e.minCpuThreshold===null||e.minCpuThreshold===void 0||Number.isNaN(e.minCpuThreshold))return`Scale down CPU threshold is required`;if(e.minCpuThreshold<=0||e.minCpuThreshold>1)return`Scale down CPU threshold must be between 0 and 1`;if(e.maxCpuThreshold&&!Number.isNaN(e.maxCpuThreshold)&&e.minCpuThreshold>=e.maxCpuThreshold)return`Scale down CPU threshold must be less than scale up threshold`}},maxCpuThreshold:e=>{if(e.autoscaling===`horizontal`){if(e.maxCpuThreshold===null||e.maxCpuThreshold===void 0||Number.isNaN(e.maxCpuThreshold))return`Scale up CPU threshold is required`;if(e.maxCpuThreshold<=0||e.maxCpuThreshold>1)return`Scale up CPU threshold must be between 0 and 1`;if(e.minCpuThreshold&&!Number.isNaN(e.minCpuThreshold)&&e.maxCpuThreshold<=e.minCpuThreshold)return`Scale up CPU threshold must be greater than scale down threshold`}},scaleUpStep:e=>{if(e.autoscaling===`horizontal`&&e.scaleUpStep<=0)return`Scale up step must be greater than 0`},scaleDownStep:e=>{if(e.autoscaling===`horizontal`&&e.scaleDownStep<=0)return`Scale down step must be greater than 0`},metricLookbackSeconds:e=>{if(e.metricLookbackSeconds<130||e.metricLookbackSeconds>3600)return`Metric lookback seconds must be between 130 and 3600`},percentile:e=>{if(e.percentile<50||e.percentile>100)return`Percentile must be between 50 and 100`}},mWe=({policy:e,title:t})=>{let n=[];if(e.scalingEnabled)switch(e.autoscaling){case`horizontal`:n.push({key:`Minimum Containers`,value:e.minContainers?.toString()||``},{key:`Maximum Containers`,value:e.maxContainers?.toString()||``},{key:`Scale Down CPU Threshold`,value:e.minCpuThreshold?.toString()||``},{key:`Scale Up CPU Threshold`,value:e.maxCpuThreshold?.toString()||``}),e.scaleUpStep>1&&n.push({key:`Scale Up Steps`,value:e.scaleUpStep.toString()}),e.scaleDownStep>1&&n.push({key:`Scale Down Steps`,value:e.scaleDownStep.toString()});break;case`vertical`:n.push({key:`Minimum Memory`,value:e.minimumMemory.toString()},{key:`Maximum Memory`,value:e.maximumMemory?.toString()||`Not set`})}let r=``;r=e.scalingEnabled?` - ${e.autoscaling} autoscaling`:` - Autoscaling Disabled`;let i=e.scalingEnabled&&e.autoscaling===`horizontal`,a=e.minContainers??0;return(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`h4`,{className:`${G.type.h4} capitalize`,children:`${t} Settings${r}`}),(0,U.jsx)(d8,{data:n,variant:`horizontal-inline`}),i&&a<2?(0,U.jsx)(q,{className:`mt-2`,variant:`warning`,children:`Warning: High-availability requires at least 2 containers`}):null]})},p7=e=>({minCpuThreshold:f7(e.minCpuThreshold,2,.1),maxCpuThreshold:f7(e.maxCpuThreshold,2,.9),memScaleUpThreshold:f7(e.memScaleUpThreshold,2,.8),memScaleDownThreshold:f7(e.memScaleDownThreshold,2,.2),memCpuRatioRThreshold:f7(e.memCpuRatioRThreshold,1,2),memCpuRatioCThreshold:f7(e.memCpuRatioCThreshold,2,1),percentile:String(e.percentile??``),minimumMemory:String(e.minimumMemory??``),maximumMemory:e.maximumMemory==null?``:String(e.maximumMemory),minContainers:e.minContainers==null?``:String(e.minContainers),maxContainers:e.maxContainers==null?``:String(e.maxContainers
164),scaleUpStep:String(e.scaleUpStep??``),scaleDownStep:String(e.scaleDownStep??``),metricLookbackSeconds:String(e.metricLookbackSeconds??``),postScaleUpCooldownSeconds:String(e.postScaleUpCooldownSeconds??``),postScaleDownCooldownSeconds:String(e.postScaleDownCooldownSeconds??``),postReleaseCooldownSeconds:String(e.postReleaseCooldownSeconds??``),useHorizontalScale:e.useHorizontalScale?`enabled`:`disabled`}),hWe=(e,t)=>{let n=(e,t)=>{let n=Number.parseInt(e,10);return Number.isNaN(n)?t:n},r=(e,t)=>{let n=Number.parseFloat(e);return Number.isNaN(n)?t:n};return{...t,percentile:r(e.percentile,t.percentile),minimumMemory:n(e.minimumMemory,t.minimumMemory),maximumMemory:e.maximumMemory?Number.parseInt(e.maximumMemory,10):null,minContainers:e.minContainers?Number.parseInt(e.minContainers,10):null,maxContainers:e.maxContainers?Number.parseInt(e.maxContainers,10):null,scaleUpStep:n(e.scaleUpStep,t.scaleUpStep),scaleDownStep:n(e.scaleDownStep,t.scaleDownStep),metricLookbackSeconds:n(e.metricLookbackSeconds,t.metricLookbackSeconds),postScaleUpCooldownSeconds:n(e.postScaleUpCooldownSeconds,t.postScaleUpCooldownSeconds),postScaleDownCooldownSeconds:n(e.postScaleDownCooldownSeconds,t.postScaleDownCooldownSeconds),postReleaseCooldownSeconds:n(e.postReleaseCooldownSeconds,t.postReleaseCooldownSeconds),minCpuThreshold:Number.parseFloat(e.minCpuThreshold),maxCpuThreshold:Number.parseFloat(e.maxCpuThreshold),memScaleUpThreshold:Number.parseFloat(e.memScaleUpThreshold),memScaleDownThreshold:Number.parseFloat(e.memScaleDownThreshold),memCpuRatioRThreshold:Number.parseFloat(e.memCpuRatioRThreshold),memCpuRatioCThreshold:Number.parseFloat(e.memCpuRatioCThreshold),useHorizontalScale:e.useHorizontalScale===`enabled`}},gWe=({nextPolicy:e,errors:t,blurErrors:n,inputValues:r,updateInputValue:i,handleInputBlur:a})=>e.autoscaling===`vertical`?(0,U.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,U.jsx)(`h2`,{className:`text-md text-gray-500`,children:`RAM & CPU Threshold Settings`}),(0,U.jsx)(J,{splitWidthInputs:!0,description:`Percentile to use for RAM and CPU`,label:`Percentile`,htmlFor:`percentile`,feedbackMessage:n.percentile||t.percentile,feedbackVariant:`danger`,children:(0,U.jsx)(X,{id:`percentile`,name:`percentile`,type:`text`,inputMode:`decimal`,value:r.percentile,min:`50`,max:`100`,placeholder:`50 (Min), 100 (Max)`,onChange:e=>i(`percentile`,ml(e.currentTarget.value)),onBlur:()=>a(`percentile`,50,100,2)})}),(0,U.jsx)(J,{splitWidthInputs:!0,description:`The minimum memory that vertical autoscaling can scale this service to`,label:`Minimum Memory (MB)`,htmlFor:`minimum-memory`,feedbackMessage:n.minimumMemory,feedbackVariant:`danger`,children:(0,U.jsx)(X,{id:`minimum-memory`,name:`minimum-memory`,type:`text`,inputMode:`numeric`,pattern:`[0-9]*`,value:r.minimumMemory,min:`512`,max:`784384`,placeholder:`512 (Min), 784384 (Max)`,onChange:e=>i(`minimumMemory`,pl(e.currentTarget.value)),onBlur:()=>a(`minimumMemory`,512,784384,0)})}),(0,U.jsx)(J,{splitWidthInputs:!0,description:`The maximum memory that vertical autoscaling can scale this service to`,label:`Maximum Memory (MB)`,htmlFor:`maximum-memory`,feedbackMessage:n.maximumMemory,feedbackVariant:`danger`,children:(0,U.jsx)(X,{id:`maximum-memory`,name:`maximum-memory`,type:`text`,inputMode:`numeric`,pattern:`[0-9]*`,value:r.maximumMemory,min:`512`,max:`784384`,placeholder:`512 (Min), 784384 (Max)`,onChange:e=>i(`maximumMemory`,pl(e.currentTarget.value)),onBlur:()=>a(`maximumMemory`,512,784384,0,!0)})}),(0,U.jsx)(J,{splitWidthInputs:!0,description:`Percent of the current memory limit for a container that will trigger a scale up`,label:`Memory Scale Up Percentage`,htmlFor:`memory-scale-up`,feedbackMessage:n.memScaleUpThreshold,feedbackVariant:`danger`,children:(0,U.jsx)(X,{id:`memory-scale-up`,name:`memory-scale-up`,type:`text`,inputMode:`decimal`,step:`0.01`,value:r.memScaleUpThreshold,min:`0`,max:`1`,placeholder:`0 (Min), 1 (Max)`,onChange:e=>i(`memScaleUpThreshold`,ml(e.currentTarget.value)),onBlur:()=>a(`memScaleUpThreshold`,0,1,2)})}),(0,U.jsx)(J,{splitWidthInputs:!0,description:`Percent of the next smallest memory limit for a container that will trigger a scale down`,label:`Memory Scale Down Percentage`,htmlFor:`memory-scale-down`,feedbackMessage:n.memScaleDownThreshold,feedbackVariant:`danger`,children:(0,U.jsx)(X,{id:`memory-scale-down`,n
164ame:`memory-scale-down`,type:`text`,inputMode:`decimal`,step:`0.01`,value:r.memScaleDownThreshold,min:`0`,max:`1`,placeholder:`0 (Min), 1 (Max)`,onChange:e=>i(`memScaleDownThreshold`,ml(e.currentTarget.value)),onBlur:()=>a(`memScaleDownThreshold`,0,1,2)})}),(0,U.jsx)(J,{splitWidthInputs:!0,feedbackMessage:n.memCpuRatioRThreshold||t.ratios,feedbackVariant:n.memCpuRatioRThreshold||t.ratios?`danger`:`info`,description:`Threshold of the Memory (in GB) to CPU (in CPUs) ratio in which values above will move into R profile`,label:`Memory Optimized Memory/CPU Ratio Threshold`,htmlFor:`r-ratio`,children:(0,U.jsx)(X,{id:`r-ratio`,name:`r-ratio`,type:`text`,inputMode:`decimal`,step:`0.1`,value:r.memCpuRatioRThreshold,min:`0`,max:`16`,placeholder:`0 (Min), 16 (Max)`,onChange:e=>i(`memCpuRatioRThreshold`,ml(e.currentTarget.value)),onBlur:()=>a(`memCpuRatioRThreshold`,0,16,1)})}),(0,U.jsx)(J,{splitWidthInputs:!0,description:`Threshold of the Memory (in GB) to CPU (in CPUs) ratio in which values below will move into C profile`,label:`Compute Optimized Memory/CPU Ratio Threshold`,htmlFor:`c-ratio`,feedbackMessage:n.mem
164CpuRatioCThreshold,feedbackVariant:`danger`,children:(0,U.jsx)(X,{id:`c-ratio`,name:`c-ratio`,type:`text`,inputMode:`decimal`,step:`0.01`,value:r.memCpuRatioCThreshold,min:`0`,max:`8`,placeholder:`0 (Min), 8 (Max)`,onChange:e=>i(`memCpuRatioCThreshold`,ml(e.currentTarget.value)),onBlur:()=>a(`memCpuRatioCThreshold`,0,8,2)})})]}):(0,U.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,U.jsx)(`h2`,{className:`text-md text-gray-500`,children:`Container & CPU Threshold Settings`}),(0,U.jsx)(J,{splitWidthInputs:!0,description:`Containers are scaled based on scale up steps, sequentially`,feedbackMessage:n.minContainers||t.minContainers||((Number.parseInt(r.minContainers,10)||0)<2?`Warning: High-availability requires at least 2 containers`:``),feedbackVariant:n.minContainers||t.minContainers?`danger`:`warn`,label:`Minimum Container Count`,htmlFor:`min-containers`,children:(0,U.jsx)(X,{id:`min-containers`,name:`min-containers`,type:`text`,inputMode:`numeric`,pattern:`[0-9]*`,value:r.minContainers,min:`1`,max:`9999`,placeholder:``,onChange:e=>i(`minContainers`,pl(e.currentTarget.value)),onBlur:()=>a(`minContainers`,1,9999,0)})}),(0,U.jsx)(J,{splitWidthInputs:!0,description:`Containers are scaled based on scale up steps, sequentially`,feedbackMessage:n.maxContainers||t.maxContainers,feedbackVariant:`danger`,label:`Maximum Container Count`,htmlFor:`max-containers`,children:(0,U.jsx)(X,{id:`max-containers`,name:`max-containers`,type:`text`,inputMode:`numeric`,pattern:`[0-9]*`,value:r.maxContainers,min:`1`,max:`9999`,placeholder:``,onChange:e=>i(`maxContainers`,pl(e.currentTarget.value)),onBlur:()=>a(`maxContainers`,1,9999,0)})}),(0,U.jsx)(J,{splitWidthInputs:!0,description:`How many containers to increase by on an autoscale event`,label:`Scale Up Steps`,htmlFor:`scale-up-step`,feedbackMessage:n.scaleUpStep||t.scaleUpStep,feedbackVariant:`danger`,children:(0,U.jsx)(X,{id:`scale-up-step`,name:`scale-up-step`,type:`text`,inputMode:`numeric`,pattern:`[0-9]*`,value:r.scaleUpStep,min:`1`,max:`9999`,placeholder:``,onChange:e=>i(`scaleUpStep`,pl(e.currentTarget.value)),onBlur:()=>a(`scaleUpStep`,1,9999,0)})}),(0,U.jsx)(J,{splitWidthInputs:!0,description:`How many containers to decrease by on an autoscale event`,label:`Scale Down Steps`,htmlFor:`scale-down-step`,feedbackMessage:n.scaleDownStep||t.scaleDownStep,feedbackVariant:`danger`,children:(0,U.jsx)(X,{id:`scale-down-step`,name:`scale-down-step`,type:`text`,inputMode:`numeric`,pattern:`[0-9]*`,value:r.scaleDownStep,min:`1`,max:`9999`,placeholder:``,onChange:e=>i(`scaleDownStep`,pl(e.currentTarget.value)),onBlur:()=>a(`scaleDownStep`,1,9999,0)})}),(0,U.jsx)(J,{splitWidthInputs:!0,description:`Percent of CPU usage that will trigger a scale down`,label:`Scale Down Threshold (CPU Usage)`,htmlFor:`cpu-scale-down`,feedbackMessage:n.minCpuThreshold||t.minCpuThreshold,feedbackVariant:`danger`,children:(0,U.jsx)(X,{id:`cpu-scale-down`,name:`cpu-scale-down`,type:`text`,inputMode:`decimal`,step:`0.01`,value:r.minCpuThreshold,min:`0`,max:`1`,placeholder:`0 (Min), 1 (Max)`,onChange:e=>i(`minCpuThreshold`,ml(e.currentTarget.value)),onBlur:()=>a(`minCpuThreshold`,0,1,2,!1,!0)})}),(0,U.jsx)(J,{splitWidthInputs:!0,description:`Percent of CPU usage that will trigger a scale up`,label:`Scale Up Threshold (CPU Usage)`,htmlFor:`cpu-scale-up`,feedbackMessage:n.maxCpuThreshold||t.maxCpuThreshold,feedbackVariant:`danger`,children:(0,U.jsx)(X,{id:`cpu-scale-up`,name:`cpu-scale-up`,type:`text`,inputMode:`decimal`,step:`0.01`,value:r.maxCpuThreshold,min:`0`,max:`1`,placeholder:`0 (Min), 1 (Max)`,onChange:e=>i(`maxCpuThreshold`,ml(e.currentTarget.value)),onBlur:()=>a(`maxCpuThreshold`,0,1,2,!1,!0)})}),(0,U.jsx)(J,{splitWidthInputs:!0,description:`Percentile to use for CPU`,label:`Percentile`,htmlFor:`percentile`,feedbackMessage:n.percentile||t.percentile,feedbackVariant:`danger`,children:(0,U.jsx)(X,{id:`percentile`,name:`percentile`,type:`text`,inputMode:`decimal`,value:r.percentile,min:`50`,max:`100`,placeholder:`50 (Min), 100 (Max)`,onChange:e=>i(`percentile`,ml(e.currentTarget.value)),onBlur:()=>a(`percentile`,50,100,2)})})]}),_We=({autoscalingType:e,advancedIsOpen:t,onToggle:n,resetAdvancedSettings:r,nextPolicy:i,errors:a,blurErrors:o,inputValues:s,updateInputValue:c,handleInputBlur:l})=>e===`disabled`?null:(0,U.jsx)(r4,{labelWhenClosed:`Show Advanced Settings`,labelWhenOpen:`Hide Advanced Settings`,open:t,onToggle:n,children:(0,U.jsx)(`div`,{className:`pb-4`,children:(0,U.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,U.jsx)(gWe,{nextPolicy:i,errors:a,blurErrors:o,inputValues:s,updateInputValue:c,handleInputBlur:l}),(0,U.jsx)(`h2`,{className:`text-md text-gray-500`,children:`Time-
164Based Settings`}),(0,U.jsx)(J,{splitWidthInputs:!0,description:`Time interval in seconds to fetch metrics for evaluation`,label:`Metrics Lookback Time Interval`,htmlFor:`lookback-interval`,feedbackMessage:o.metricLookbackSeconds||a.metricLookbackSeconds,feedbackVariant:`danger`,children:(0,U.jsx)(X,{id:`lookback-interval`,name:`lookback-interval`,type:`text`,inputMode:`numeric`,pattern:`[0-9]*`,value:s.metricLookbackSeconds,min:`130`,max:`3600`,placeholder:`130 (Min), 3600 (Max)`,onChange:e=>c(`metricLookbackSeconds`,pl(e.currentTarget.value)),onBlur:()=>l(`metricLookbackSeconds`,130,3600,0)})}),(0,U.jsx)(J,{splitWidthInputs:!0,description:`The number of seconds to wait after an automated scale to potentially scale up`,label:`Scale Up Cooldown`,htmlFor:`scale-up-cooldown`,feedbackMessage:o.postScaleUpCooldownSeconds,feedbackVariant:`danger`,children:(0,U.jsx)(X,{id:`scale-up-cooldown`,name:`scale-up-cooldown`,type:`text`,inputMode:`numeric`,pattern:`[0-9]*`,value:s.postScaleUpCooldownSeconds,min:`0`,max:`3600`,placeholder:`0 (Min), 3600 (Max)`,onChange:e=>c(`postScaleUpCooldownSeconds`,pl(e.currentTarget.value)),onBlur:()=>l(`postScaleUpCooldownSeconds`,0,3600,0)})}),(0,U.jsx)(J,{splitWidthInputs:!0,description:`The number of seconds to wait after an automated scale to potentially scale down`,label:`Scale Down Cooldown`,htmlFor:`scale-down-cooldown`,feedbackMessage:o.postScaleDownCooldownSeconds,feedbackVariant:`danger`,children:(0,U.jsx)(X,{id:`scale-down-cooldown`,name:`scale-down-cooldown`,type:`text`,inputMode:`numeric`,pattern:`[0-9]*`,value:s.postScaleDownCooldownSeconds,min:`0`,max:`3600`,placeholder:`0 (Min), 3600 (Max)`,onChange:e=>c(`postScaleDownCooldownSeconds`,pl(e.currentTarget.value)),onBlur:()=>l(`postScaleDownCooldownSeconds`,0,3600,0)})}),(0,U.jsx)(J,{splitWidthInputs:!0,description:`The number of seconds ignore in metrics after a scale event to allow for service stabilization`,label:`Post Release Cooldown`,htmlFor:`release-cooldown`,feedbackMessage:o.postReleaseCooldownSeconds,feedbackVariant:`danger`,children:(0,U.jsx)(X,{id:`release-cooldown`,name:`release-cooldown`,type:`text`,inputMode:`numeric`,pattern:`[0-9]*`,value:s.postReleaseCooldownSeconds,min:`0`,max:`3600`,placeholder:`0 (Min), 3600 (Max)`,onChange:e=>c(`postReleaseCooldownSeconds`,pl(e.currentTarget.value)),onBlur:()=>l(`postReleaseCooldownSeconds`,0,3600,0)})}),(0,U.jsx)(`h2`,{className:`text-md text-gray-500`,children:`General Settings`}),i.autoscaling===`horizontal`?(0,U.jsx)(J,{splitWidthInputs:!0,description:`Enable scaling the number of containers up and down without restarting all containers`,label:`Restart-Free Scale`,htmlFor:`horizontal-scale`,children:(0,U.jsx)(XA,{id:`horizontal-scale`,value:s.useHorizontalScale,onSelect:e=>c(`useHorizontalScale`,e.value),options:[{label:`Enabled`,value:`enabled`},{label:`Disabled`,value:`disabled`}]})}):null,(0,U.jsx)(J,{splitWidthInputs:!0,label:`Reset Advanced Settings to Defaults`,description:`This will restore settings to their default values.`,htmlFor:`reset-button`,children:(0,U.jsx)(`div`,{id:`reset-button`,children:(0,U.jsx)(cA,{icon:(0,U.jsx)(oD,{variant:`sm`}),variant:`white`,onClick:r,children:`Reset to Defaults`})})})]})})}),vWe=({serviceId:e,stackId:t})=>{let n=l();u(Um({serviceId:e}));let r=B(t=>zm(t,{id:e})),[i,a]=(0,V.useState)(r);(0,V.useEffect)(()=>{a(r)},[r.id]);let[o,s]=(0,V.useState)(()=>p7(r)),[c,d]=(0,V.useState)({});(0,V.useEffect)(()=>{s(p7(r)),d({})},[r.id]);let[f,p]=(0,V.useState)(`disabled`);(0,V.useEffect)(()=>{r.scalingEnabled?p(r.autoscaling):p(`disabled`)},[r.autoscaling,r.scalingEnabled]);let m=(()=>{if(!i.scalingEnabled&&!r.scalingEnabled)return!1;if(i.scalingEnabled!==r.scalingEnabled||i.autoscaling!==r.autoscaling)return!0;let e=p7(r);return Object.keys(e).some(t=>o[t]!==e[t])})(),h=I(qm),g=B(e=>zl(e,{id:t})),_=B($o),v=B(bg);u(Sg({orgId:_}));let[y,b]=QS(pWe),x=t=>{if(t.preventDefault(),Object.keys(c).length>0)return;let r=hWe(o,i);b(r)&&n(qm({...r,id:i.id,serviceId:e}))},S=(e,t)=>{a(n=>({...n,[e]:t}))},C=(e,t)=>{s(n=>({...n,[e]:t})),d(t=>{if(!(e in t))return t;let n={...t};return delete n[e],n})},w=(e,t=0,n=1,r=2,i=!1,a=!1)=>{let c=o[e],l=Number.parseFloat(c);
164if(c===``||Number.isNaN(l)){d(c===``&&i?t=>{let n={...t};return delete n[e],n}:c===``?t=>({...t,[e]:`This field cannot be empty`}):t=>({...t,[e]:`Please enter a valid number`}));return}if((a?l<=t:l<t)||l>n){d(r=>({...r,[e]:`Please enter a value between ${t} and ${n}`}));return}d(t=>{let n={...t};return delete n[e],n});let u=Math.max(t,Math.min(n,l));s(t=>({...t,[e]:Number(u.toFixed(r)).toFixed(r)}))},T=()=>{let e={...L.serviceSizingPolicies.empty,id:i.id,scalingEnabled:i.scalingEnabled,autoscaling:i.autoscaling};a(e),s(p7(e)),d({})},[E,D]=(0,V.useState)(!1),O=g.horizontalAutoscaling||v.horizontalAutoscaling,k=g.verticalAutoscaling||v.verticalAutoscaling,A=[{label:`Disabled: No autoscaling`,value:`disabled`}];O&&A.push({label:`Enabled: Horizontal Autoscaling`,value:`horizontal`}),k&&A.push({label:`Enabled: Vertical Autoscaling`,value:`vertical`});let j={horizontal:`Automatically scale your services by regularly reviewing recent CPU utilization and scale to the optimal container count.`,vertical:`Automatically scale your services by regularly reviewing recent CPU and RAM utilization and scale to the optimal configuration.`},M=e=>{if(e){if(D(!1),e.value===`disabled`){S(`scalingEnabled`,!1),p(`disabled`);return}S(`scalingEnabled`,!0),S(`autoscaling`,e.value),e.value===`horizontal`?S(`useHorizontalScale`,!0):e.value===`vertical`&&(S(`useHorizontalScale`,!1),S(`minContainers`,2),S(`maxContainers`,4),S(`minCpuThreshold`,.1),S(`maxCpuThreshold`,.9),S(`scaleUpStep`,1),S(`scaleDownStep`,1)),p(e.value),e.value===`horizontal`&&D(!0)}};return!k&&!O?null:(0,U.jsx)(Z,{children:(0,U.jsx)(`form`,{onSubmit:x,children:(0,U.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,U.jsxs)(`div`,{className:`flex justify-between items-start`,children:[(0,U.jsx)(`h1`,{className:`text-lg text-gray-500`,children:`Autoscale`}),(0,U.jsx)(uA,{href:`https://www.aptible.com/docs/core-concepts/scaling/app-scaling#autoscaling`})]}),(0,U.jsx)(TA,{...h}),(0,U.jsxs)(`div`,{className:`flex gap-4`,children:[(0,U.jsxs)(J,{label:`Autoscaling`,htmlFor:`autoscaling`,className:`w-1/2`,children:[(0,U.jsx)(XA,{ariaLabel:`Autoscaling Setting`,id:`autoscaling`,options:A,onSelect:e=>M(e),value:f}),(0,U.jsx)(`p`,{className:`mt-2 text-gray-500`,children:i.scalingEnabled?j[i.autoscaling]:``})]}),(0,U.jsx)(`div`,{className:`w-1/2 pb-4`,children:(0,U.jsx)(mWe,{policy:r,title:`Current`})})]}),(0,U.jsx)(`div`,{children:(0,U.jsx)(_We,{autoscalingType:f,advancedIsOpen:E,onToggle:()=>D(!E),nextPolicy:i,errors:y,blurErrors:c,inputValues:o,updateInputValue:C,handleInputBlur:w,resetAdvancedSettings:T})}),(0,U.jsx)(`hr`,{}),Object.keys(c).length>0?(0,U.jsx)(`p`,{className:`text-red-500 text-sm mb-2`,children:`Please correct values in the invalid fields before continuing.`}):null,(0,U.jsx)(`div`,{className:`flex`,children:(0,U.jsx)(K,{name:`autoscaling`,className:`w-40 flex font-semibold`,type:`submit`,disabled:!m||Object.keys(c).length>0,isLoading:h.isLoading,children:`Save Changes`})})]})})})},yWe=()=>{let e=l(),t=N(),{id:n=``,serviceId:r=``}=F(),[i,a]=QS(fWe);u(_f({id:n}));let[o,s]=(0,V.useState)(1),[c,d]=(0,V.useState)(`m`),[f,p]=(0,V.useState)(512),[m,h]=(0,V.useState)(!1),g=B(e=>rf(e,{id:n}));u(Lu({id:r}));let _=B(e=>Eu(e,{id:r})),v=B(e=>tu(e,{id:g.environmentId})),y=B(e=>zl(e,{id:v.stackId})),b=B(e=>ql(e,{id:v.stackId})),x=B(e=>Gp(e,{serviceId:r})),S=B(e=>yx(e,{serviceId:r})),C=B(e=>Ey(e,{serviceId:r})).length>0,w=B(e=>sb(e,{serviceId:r})),E=Yd({id:r,containerCount:o,containerSize:f,containerProfile:c,recId:m?S.id:``}),D=t=>{t.preventDefault(),a({containerCount:o})&&e(E)},O=I(Yd);(0,V.useEffect)(()=>{s(_.containerCount)},[_.containerCount]),(0,V.useEffect)(()=>{d(_.instanceClass)},[_.instanceClass]),(0,V.useEffect)(()=>{_.containerMemoryLimitMb&&p(_.containerMemoryLimitMb)},[_.containerMemoryLimitMb]);let k=_.containerCount!==o||_.instanceClass!==c||_.containerMemoryLimitMb!==f;T(O,()=>{t(oa(g.id))});let A=Su(_.instanceClass),j=Su(c),M=Object.keys(b).map(e=>({label:Su(e).name,value:e})),ee=ef(c).map(e=>({label:`${e/1024} GB`,value:`${e}`})),te=e=>{if(!e)return;let t=e.value,n=b[t];n&&(f<n.minimumContainerSize&&p(n.minimumContainerSize),d(t))},ne=()=>{d(_.instanceClass),p(_.containerMemoryLimitMb),s(_.containerCount),h(!1)};return(0,U.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,U.jsx)(fBe,{serviceId:r}),(0,U.jsx)(h4,{serviceId:r,onAcceptRecommendation:()=>{d(S.recommendedInstanceClass),p(S.recommendedContainerMemoryLimitMb),h(!0)}}),(0,U.jsx)(vWe,{serviceId:r,stackId:y.id}),(0,U.jsx)(Z,{children:(0,U.jsxs)(`form`,{onSubmit:D,children:[(0,U.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,U.jsx)(`h1`,{className:`text-lg text-gray-500 mb-4`,children:`Manual Scale`}),(0,U.jsx)(J,{splitWidthInputs:!0,description:`Optimize container performance with a custom profile.`,label:`Container Profile`,htmlFor:`container-profile`,children:(0,U.jsx)(XA,{id:`container-profile`,ariaLabel:`container-profile`,disabled:Object.keys(b).length<=1,value:c,onSelect:te,options:M})}),(0,U.jsx)(J,{splitWidthInputs:!0,description:`Horizontally scale this service by increasing the number of containers. A count of 2 or more will provide High Availability. 32 max count for ${Su(c).name} profiles.`,label:`Number of Containers`,htmlFor:`number-containers`,feedbackMessage:i.containerCount,feedbackVariant:i.containerCount?`danger`:`info`,children:(0,U.jsx)(X,{id:`number-containers`,name:`number-containers`,type:`text`,inputMode:`numeric`,pattern:`[0-9]*`,value:o,min:`0`,max:`32`,placeholder:`0 (Min), 32 (Max)`,onChange:e=>s(Number.parseInt(e.currentTarget.value||`0`,10))})}),C&&o>1?(0,U.jsx)(q,{variant:`error`,children:`Cannot scale to more than 1 container when a disk is attached. Detach the disk to proceed.`}):null,(0,U.jsx)(J,{splitWidthInputs:!0,description:`Specify the memory you wish to allow per container.`,label:`Memory per Container`,htmlFor:`memory-container`,children:(0,U.jsx)(XA,{id:`memory-container`,value:f.toString(),onSelect:e=>p(Number.parseInt(e.value)),options:ee})}),(0,U.jsx)(J,{splitWidthInputs:!0,description:`CPU Share is determined by the selected Memory Limit and Container Profile.`,label:`CPU
164Share per Container`,htmlFor:`cpu-share`,children:(0,U.jsx)(X,{id:`number-containers`,name:`number-containers`,className:`disabled`,type:`text`,disabled:!0,value:j.cpuShare*f})})]}),(0,U.jsx)(g8,{service:_,endpoints:x,persistentDiskCost:w}),(0,U.jsx)(`hr`,{}),k?(0,U.jsx)(`div`,{className:`text-md font-semibold text-gray-900 mt-4`,children:`Pending Changes`}):null,c===_.instanceClass?null:(0,U.jsxs)(`div`,{className:`my-3`,children:[(0,U.jsx)(`div`,{className:`text-md text-gray-900`,children:`Container Profile`}),(0,U.jsxs)(`p`,{className:`text-black-500`,children:[`Changed from `,A.name,` to`,` `,j.name]})]}),o===_.containerCount?null:(0,U.jsxs)(`div`,{className:`my-3`,children:[(0,U.jsx)(`div`,{className:`text-md text-gray-900`,children:`Container Count`}),(0,U.jsxs)(`p`,{className:`text-black-500`,children:[`Changed from `,_.containerCount,` to `,o]})]}),f===_.containerMemoryLimitMb?null:(0,U.jsxs)(`div`,{className:`my-3`,children:[(0,U.jsx)(`div`,{className:`text-md text-gray-900`,children:`Container Size`}),(0,U.jsxs)(`p`,{className:`text-black-500`,id:`container-size-txt`,children:[`Changed from `,_.containerMemoryLimitMb/1024,` GB to`,` `,f/1024,` GB`]})]}),k?(0,U.jsx)(g8,{service:{containerCount:o,containerMemoryLimitMb:f,instanceClass:c},endpoints:x,persistentDiskCost:w}):null,(0,U.jsx)(TA,{...O}),(0,U.jsxs)(`div`,{className:`flex mt-4`,children:[(0,U.jsx)(K,{className:`w-40 flex font-semibold`,type:`submit`,disabled:!k,isLoading:O.isLoading,children:`Save Changes`}),k?(0,U.jsx)(K,{className:`w-40 ml-2 flex font-semibold`,onClick:ne,variant:`white`,children:`Cancel`}):null]})]})})]})},bWe=()=>{let e=l(),{id:t=``,serviceId:n=``}=F();u(_f({id:t})),u(Lu({id:n}));let r=B(e=>Eu(e,{id:n})),i=B(e=>Gp(e,{serviceId:r.id})),[a,o]=(0,V.useState)(r);(0,V.useEffect)(()=>{o(r)},[r.id]);let s=Tu({...a}),c=I(s),d=()=>o(r),f=r.forceZeroDowntime!==a.forceZeroDowntime||r.naiveHealthCheck!==a.naiveHealthCheck||r.restartFreeScaling!==a.restartFreeScaling||r.stopTimeout!==a.stopTimeout;return(0,U.jsx)(`div`,{className:`flex flex-col gap-4`,children:(0,U.jsx)(Z,{children:(0,U.jsxs)(`form`,{onSubmit:t=>{t.preventDefault(),e(s)},children:[(0,U.jsx)(TA,{...c,className:`mb-4`}),(0,U.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,U.jsxs)(`div`,{className:`flex justify-between items-start`,children:[(0,U.jsx)(`h1`,{className:`text-lg text-gray-500 mb-4`,children:`Service Deployment Settings`}),(0,U.jsx)(uA,{href:`https://www.aptible.com/docs/core-concepts/apps/deploying-apps/releases/overview`})]}),(0,U.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[i.length>0?(0,U.jsx)(q,{children:`Cannot configure zero-downtime or non-endpoint health checks for services with endpoints.`}):null,i.length===0&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(ZH,{name:`zero-downtime`,label:`Enable Zero-Downtime Deployment`,checked:a.forceZeroDowntime,onChange:e=>o({...a,forceZeroDowntime:e.currentTarget.checked})}),(0,U.jsx)(`div`,{className:`flex gap-2`,children:(0,U.jsx)(aA,{text:`When enabled, ignores Docker healthchecks and instead only waits to ensure the container stays up for at least 30 seconds.`,children:(0,U.jsx)(ZH,{name:`simple-healthcheck`,label:`Use simple healthcheck (30s)`,checked:a.naiveHealthCheck,onChange:e=>o({...a,naiveHealthCheck:e.currentTarget.checked})})})})]}),(0,U.jsx)(`div`,{className:`flex flex-col gap-4 items-center mb-4`,children:(0,U.jsxs)(`div`,{className:`flex flex-col w-full gap-4`,children:[(0,U.jsx)(aA,{text:`When enabled, scaling operations that only change the number of containers will not restart existing containers.`,children:(0,U.jsx)(ZH,{name:`restart-free-scaling`,label:`Enable Restart-Free Scaling`,checked:a.restartFreeScaling,onChange:e=>o({...a,restartFreeScaling:e.currentTarget.checked})})}),(0,U.jsx)(J,{splitWidthInputs:!0,description:`The time in seconds to wait for the old release's containers to stop before killing them. Must be between 1 and 900 seconds.`,label:`Stop Timeout`,htmlFor:`stop-timeout`,className:`mt-4`,children:(0,U.jsx)(X,{id:`stop-timeout`,type:`number`,min:0,max:900,value:a.stopTimeout??``,onChange:e=>{let t=e.target.value,n=t===``?null:Number.parseInt(t);o({...a,stopTimeout:n===null?null:Math.min(Math.max(0,n),900)})}})})]})}),(0,U.jsxs)(`div`,{className:`flex mt-4`,children:[(0,U.jsx)(K,{name:`settings-save`,className:`w-40 flex font-semibold`,type:`submit`,disabled:!f,isLoading:c.isLoading,children:`Save Changes`}),f?(0,U.jsx)(K,{className:`w-40 ml-2 flex font-semibold`,onClick:d,variant:`white`,children:`Cancel`}):null]})]})]})]})})})},m7=({className:e})=>(0,U.jsx)(q,{variant:`info`,className:e,children:`This action will restart the service.`}),h7=e=>e.trim(),xWe=[],SWe={serviceId:e=>{if(!e.serviceId)return`Select a service to attach this disk to`},mountPoint:e=>{let t=h7(e.mountPoint);if(!t)return`Mount point is required`;if(!t.startsWith(`/`))return`Mount point must be an absolute path (e.g., /mnt/data)`;if(e.existingMountPoints.includes(t.toLowerCase()))return`That mou
164nt point is already in use on this service`}},CWe=({isOpen:e,disk:t,onClose:n})=>{let r=l(),[i,a]=(0,V.useState)(``),[o,s]=(0,V.useState)(``),c=B(e=>Fu(e,{envId:t.environmentId})),u=(0,V.useMemo)(()=>c.filter(e=>e.appId!==``),[c]),d=B(e=>wy(e,{persistentDiskId:t.id})),f=(0,V.useMemo)(()=>d.some(e=>e.status!==`deprovisioned`),[d]),p=(0,V.useMemo)(()=>u.find(e=>e.id===i),[u,i]),m=B(e=>i?Ey(e,{serviceId:i}):xWe),[h,g]=QS(SWe),_=N(),v=I(vy),y=()=>{a(``),s(``),n()};T(v,()=>{_(za(t.environmentId))});let b=p?.containerCount??0,x=!!p&&b!==1,S=p?b===0?`${p.handle} is not running (0 containers). Scale it to exactly 1 container before attaching a disk.`:b>1?`${p.handle} is running ${b} containers. A persistent disk can only attach to a service scaled to exactly 1 container.`:``:``,C=[{label:`Select a service`,value:``},...u.map(e=>({label:`${e.handle} (${e.containerCount} container${e.containerCount===1?``:`s`})`,value:e.id}))],w=e=>{e.preventDefault(),g({serviceId:i,mountPoint:o,existingMountPoints:m})&&(x||f||r(vy({id:t.id,serviceId:i,mountPoint:h7(o)})))};if(!e)return null;let E=!i||!o.trim()||x||f;return(0,U.jsx)(h3,{children:(0,U.jsxs)(kU,{isOpen:e,onClose:y,className:`min-w-[600px]`,children:[(0,U.jsx)(AU,{icon:(0,U.jsx)(LE,{variant:`sm`}),title:`Attach Disk: ${t.handle}`,onClose:y}),(0,U.jsxs)(LA,{onSubmit:w,children:[(0,U.jsxs)(MU,{className:`pb-0`,children:[(0,U.jsx)(m7,{className:`mb-4`}),f?(0,U.jsx)(q,{variant:`error`,className:`mb-4`,children:`This disk is already attached. Detach it first â a disk attaches to one service at a time.`}):null,(0,U.jsx)(J,{label:(0,U.jsxs)(U.Fragment,{children:[`Service `,(0,U.jsx)(`span`,{className:`text-red-500`,children:`*`})]}),htmlFor:`attach-disk-service`,className:`mb-4`,feedbackMessage:h.serviceId,feedbackVariant:h.serviceId?`danger`:`default`,children:(0,U.jsx)(XA,{id:`attach-disk-service`,ariaLabel:`service`,options:C,value:i,onSelect:e=>a(e.value)})}),S?(0,U.jsx)(q,{variant:`error`,className:`mb-4`,children:S}):null,(0,U.jsx)(J,{label:(0,U.jsxs)(U.Fragment,{children:[`Mount Point `,(0,U.jsx)(`span`,{className:`text-red-500`,children:`*`})]}),htmlFor:`attach-disk-mount-point`,className:`mb-4`,feedbackMessage:h.mountPoint,feedbackVariant:h.mountPoint?`danger`:`default`,children:(0,U.jsx)(X,{id:`attach-disk-mount-point`,name:`mountPoint`,value:o,onChange:e=>s(e.target.value),placeholder:`e.g., /mnt/data`,maxLength:255})}),(0,U.jsx)(TA,{className:`mt-4`,...v})]}),(0,U.jsx)(jU,{actions:[(0,U.jsx)(K,{type:`submit`,disabled:E,isLoading:v.isLoading,children:`Attach Disk`},`submit`)]})]})]})})},wWe={handle:e=>z4(e.handle),size:e=>{if(!Number.isFinite(e.size)||e.size<=0)return`Size must be a positive number of GB`}},TWe=({isOpen:e,envId:t,onClose:n})=>{let r=l(),i=N(),[a,o]=(0,V.useState)(``),[s,c]=(0,V.useState)(`10`),u=s.trim()===``?NaN:Number(s),[d,f]=QS(wWe),p=I(gy),m=ap({rates:B(L.costRates.select),persistentDisks:[{size:Number.isFinite(u)?u:0,provisionedIops:0}]}),h=()=>{o(``),c(`10`),n()};return T(p,()=>{i(za(t))}),e?(0,U.jsx)(h3,{children:(0,U.jsxs)(kU,{isOpen:e,onClose:h,className:`min-w-[600px]`,children:[(0,U.jsx)(AU,{icon:(0,U.jsx)(LE,{variant:`sm`}),title:`Create Persistent Disk`,onClose:h}),(0,U.jsxs)(LA,{onSubmit:e=>{e.preventDefault(),f({handle:a,size:u})&&r(gy({envId:t,handle:a,size:u}))},children:[(0,U.jsxs)(MU,{className:`pb-0`,children:[(0,U.jsx)(J,{label:(0,U.jsxs)(U.Fragment,{children:[`Handle `,(0,U.jsx)(`span`,{className:`text-red-500`,children:`*`})]}),htmlFor:`persistent-disk-handle`,className:`mb-4`,feedbackMessage:d.handle,feedbackVariant:d.handle?`danger`:`default`,children:(0,U.jsx)(X,{id:`persistent-disk-handle`,name:`handle`,value:a,onChange:e=>o(e.target.value),placeholder:`e.g., shared-uploads`,maxLength:64})}),(0,U.jsxs)(J,{label:(0,U.jsxs)(U.Fragment,{children:[`Size (GB) `,(0,U.jsx)(`span`,{className:`text-red-500`,children:`*`})]}),htmlFor:`persistent-disk-size`,className:`mb-4`,feedbackMessage:d.size,feedbackVariant:d.size?`danger`:`default`,children:[(0,U.jsx)(X,{id:`persistent-disk-size`,name:`size`,type:`number`,min:1,value:s,onChange:e=>c(e.target.value)}),(0,U.jsx)(`p`,{className:`mt-1 text-xs text-gray-500`,children:`You can increase disk size at any time, but cannot decrease it.`})]}),(0,U.jsxs)(`p`,{className:`text-gray-500 text-sm`,children:[`Est. cost: `,ub(m),`/month`]}),(0,U.jsx)(TA,{className:`mt-4`,...p})]}),(0,U.jsx)(jU,{actions:[(0,U.jsx)(K,{type:`submit`,disabled:!a.trim()||!Number.isFinite(u)||u<=0,isLoading:p.isLoading,children:`Create Persistent Disk`},`submit`)]})]})]})}):null},EWe=({isOpen:e,disk:t,onClose:n})=>{let r=l(),i=N(),a=B(e=>wy(e,{persistentDiskId:t.id})),o=(0,V.useMemo)(()=>a.filter(e=>e.status!==`deprovisioned`),[a]),s=o.length>0,c=I(hy);T(c,()=>{i(za(t.environmentId))});let u=()=>{s||r(hy({id:t.id,type:`deprovision`}))};return e?(0,U.jsx)(h3,{children:(0,U.jsxs)(kU,{isOpen:e,onClose:n,className:`min-w-[600px]`,children:[(0,U.jsx)(AU,{icon:(0,U.jsx)(ZE,{variant:`sm`,className:`text-red-500`}),title:`Delete Disk: ${t.handle}`,onClose:n}),(0,U.jsxs)(MU,{className:`pb-0`,children:[(0,U.jsxs)(q,{variant:`error`,className:`mb-4`,children:[`Deleting `,(0,U.jsx)(`strong`,{children:t.handle}),` destroys the disk and all of its data. This cannot be undone. To retain the data for future use, detach the disk now and reattach it when needed.`]}),s?(0,U.jsxs)(q,{variant:`warning`,className:`mb-4`,children:[`This disk is still attached to`,` `,o.length===1?`a service`:`${o.length} services`,`. Detach it from all services before deleting.`]}):null,(0,U.jsx)(TA,{className:`mt-4`,...c})]}),(0,U.jsx)(jU,{actions:[(0,U.jsx)(K,{variant:`white`,onClick:n,children:`Cancel`},`cancel`),(0,U.jsx)(K,{variant:`delete`,disabled:s,onClick:u,isLoading:c.isLoading,children:`Delete Permanently`},`confirm`)]})]})}):null},g7=({isOpen:e,disk:t,attachment:n,serviceHandle:r,onClose:i})=>{let a=l(),o=N(),s=I(Py);T(s,()=>{o(za(t.environmentId))});let c=()=>{a(Py({id:n.id}))};if(!e)return null;let u=r||`this service`;return(0,U.jsx)(h3,{children:(0,U.jsxs)(kU,{isOpen:e,onClose:i,className:`min-w-[600px]`,children:[(0,U.jsx)(AU,{icon:(0,U.jsx)(ZE,{variant:`sm`,className:`text-yellow-500`}),title:`Detach Disk: ${t.handle}`,onClose:i}),(0,U.jsxs)(MU,{className:`pb-0`,children:[(0,U.jsxs)(`p`,{className:`text-gray-700`,children:[`This will detach `,(0,U.jsx)(`strong`,{children:t.handle}),` from`,` `,(0,U.jsx)(`strong`,{children:u}),n.mountPoint?(0,U.jsxs)(U.Fragment,{children:[` `,`(mounted at `,(0,U.jsx)(`strong`,{children:n.mountPoint}),`)`]}):null,`.`]}),(0,U.jsx)(m7,{className:`mt-4`}),(0,U.jsx)(q,{variant:`info`,className:`mt-4`,children:`Detaching a disk will not delete it. It can be re-attached to a service from the Environment's Disk Storage tab.`}),(0,U.jsx)(TA,{className:`mt-4`,...s})]}),(0,U.jsx)(jU,{actions:[(0,U.jsx)(K,{variant:`white`,onClick:i,children:`Cancel`},`cancel`),(0,U.jsx)(K,{variant:`delete`,onClick:c,isLoading:s.isLoading,children:`Detach Disk`},`confirm`)]})]})})},DWe=()=>({newSize:e=>{if(!Number.isFinite(e.newSize)||e.newSize<=0)return`Size must be a positive number of GB`;if(e.newSize<=e.currentSize)return`New size must be greater than the current size (${e.currentSize} GB)`}}),_7=({isOpen:e,disk:t,onClose:n})=>{let r=l(),i=N(),a=String(t.size+1),[o,s]=(0,V.useState)(a),c=o.trim()===``?NaN:Number(o),[u,d]=QS(DWe(
164)),f=I(_y),p=ap({rates:B(L.costRates.select),persistentDisks:[{size:Number.isFinite(c)?c:t.size,provisionedIops:0}]}),m=()=>{s(a),n()};T(f,()=>{i(za(t.environmentId))});let h=e=>{e.preventDefault();let n={newSize:c,currentSize:t.size};d(n)&&r(_y({id:t.id,size:c}))};if(!e)return null;let g=Number.isFinite(c)&&c<=t.size?`New size must be greater than the current size (${t.size} GB)`:void 0,_=u.newSize??g,v=!Number.isFinite(c)||c<=t.size;return(0,U.jsx)(h3,{children:(0,U.jsxs)(kU,{isOpen:e,onClose:m,className:`min-w-[600px]`,children:[(0,U.jsx)(AU,{icon:(0,U.jsx)(LE,{variant:`sm`}),title:`Resize Disk: ${t.handle}`,onClose:m}),(0,U.jsxs)(LA,{onSubmit:h,children:[(0,U.jsxs)(MU,{className:`pb-0`,children:[(0,U.jsx)(m7,{className:`mb-4`}),(0,U.jsxs)(`p`,{className:`mb-4 text-gray-700`,children:[`Current size: `,(0,U.jsxs)(`strong`,{children:[t.size,` GB`]}),`. Disks can only be resized up.`]}),(0,U.jsxs)(J,{label:(0,U.jsxs)(U.Fragment,{children:[`New Size (GB) `,(0,U.jsx)(`span`,{className:`text-red-500`,children:`*`})]}),htmlFor:`resize-disk-size`,className:`mb-2`,feedbackMessage:_,feedbackVariant:_?`danger`:`default`,children:[(0,U.jsx)(X,{id:`resize-disk-size`,name:`newSize`,type:`number`,min:t.size+1,value:o,onChange:e=>s(e.target.value)}),(0,U.jsx)(`p`,{className:`mt-1 text-xs text-gray-500`,children:`You can increase disk size at any time, but cannot decrease it.`})]}),(0,U.jsxs)(`p`,{className:`text-gray-500 text-sm`,children:[`Est. cost: `,ub(p),`/month`]}),(0,U.jsx)(TA,{className:`mt-4`,...f})]}),(0,U.jsx)(jU,{actions:[(0,U.jsx)(K,{type:`submit`,disabled:v,isLoading:f.isLoading,children:`Resize Disk`},`submit`)]})]})]})})},OWe=({disk:e})=>{let t=ap({rates:B(L.costRates.select),persistentDisks:[{size:e.size,provisionedIops:0}]});return(0,U.jsx)(q2,{value:t})},kWe=({disk:e,onAttach:t,onDetach:n,onResize:r,onDelete:i})=>{let a=e.status===`provisioned`,o=e.activeAttachments.length>0,s=e.activeAttachments[0];return(0,U.jsx)(k2,{label:(0,U.jsx)(PD,{variant:`sm`}),items:[{id:`attach`,label:`Attach`,disabled:!a||o,onClick:n=>{t(e),n()}},{id:`detach`,label:`Detach`,disabled:!o||s==null,onClick:t=>{s&&n({disk:e,attachment:s.attachment,serviceHandle:s.serviceHandle}),t()}},{id:`resize`,label:`Resize`,disabled:!a,onClick:t=>{r(e),t()}},{id:`delete`,label:`Delete`,hasSeparator:!0,className:`text-red-500`,disabled:o,onClick:t=>{i(e),t()}}]})},AWe=({envId:e})=>{u(dy()),u(jy()),u(Ru()),u(hf());let[t,n]=(0,V.useState)(!1),[r,i]=(0,V.useState)(null),[a,o]=(0,V.useState)(null),[s,c]=(0,V.useState)(null),[l,d]=(0,V.useState)(null),f=B(t=>uy(t,{envId:e})),p=B(Sy),m=B(Mu),h=B(of),g=(0,V.useMemo)(()=>{let e=new Map(h.map(e=>[e.id,e.handle])),t=new Map(m.map(e=>[e.id,e]));return f.map(n=>{let r=p.filter(e=>e.persistentDiskId===n.id&&e.status!==`deprovisioned`).map(n=>{let r=t.get(n.serviceId);return{attachment:n,serviceHandle:r?.handle||``,serviceLabel:r?.processType||r?.handle||``,serviceId:r?.id??``,appId:r?.appId??``,appHandle:r?e.get(r.appId)??``:``}});return{...n,activeAttachments:r}})},[f,p,m,h]),_=(0,V.useMemo)(()=>[{field:`handle`,headerName:`Handle`,cellRenderer:({data:e})=>(0,U.jsxs)(W,{variant:`horizontal`,size:`sm`,className:`items-center`,children:[(0,U.jsx)(LE,{variant:`sm`,className:`text-gray-500 shrink-0`}),(0,U.jsx)(U2,{label:e.handle})]})},{field:`id`,headerName:`ID`,cellRenderer:({data:e})=>(0,U.jsx)(U2,{label:e.id})},{colId:`attachedTo`,headerName:`Attached To`,cellRenderer:({data:e})=>e.activeAttachments.length===0?(0,U.jsx)(`span`,{className:`text-gray-400 italic`,children:`None`}):(0,U.jsx)(`div`,{children:e.activeAttachments.map((e,t)=>(0,U.jsxs)(`div`,{className:t>0?`mt-1`:``,children:[e.appId&&e.serviceId?(0,U.jsx)(P,{to:aa(e.appId,e.serviceId),className:`${G.type.darker} hover:underline`,children:e.serviceLabel}):(0,U.jsx)(`span`,{className:G.type.darker,children:e.serviceLabel}),e.appHandle?(0,U.jsx)(`div`,{className:G.type[`normal lighter`],children:e.appHandle}):null]},e.attachment.id))})},{colId:`mountPath`,headerName:`Mount Path`,cellRenderer:({data:e})=>{let t=e.activeAttachments.map(e=>e.attachment.mountPoint).filter(e=>!!e);return t.length===0?(0,U.jsx)(`span`,{className:`text-gray-400`,children:`-`}):(0,U.jsx)(U2,{label:t.join(`, `)})}},{field:`size`,headerName:`Disk Size`,cellRenderer:({data:e})=>(0,U.jsx)(U2,{label:`${e.size} GB`})},{field:`status`,headerName:`Status`,cellRenderer:({data:e})=>(0,U.jsx)(U2,{label:cl(e.status)})},{field:`createdAt`,headerName:`Created`,cellRenderer:({data:e})=>(0,U.jsx)(Y2,{date:e.createdAt})},{colId:`cost`,headerName:`Est. Monthly Cost`,headerTooltip:gU,cellRenderer:({data:e})=>(0,U.jsx)(OWe,{disk:e})}
164,{colId:`actions`,headerName:`Actions`,sortable:!1,cellRenderer:({data:e})=>(0,U.jsx)(kWe,{disk:e,onAttach:i,onDetach:o,onResize:c,onDelete:d})}],[]);return(0,U.jsxs)(W,{children:[(0,U.jsx)(`div`,{className:`flex justify-end`,children:(0,U.jsxs)(hA,{envId:e,onClick:()=>n(!0),children:[(0,U.jsx)(qE,{variant:`sm`}),(0,U.jsx)(`div`,{className:`ml-2`,children:`New Disk`})]})}),(0,U.jsx)(L2,{rowData:g,colDefs:_}),(0,U.jsx)(TWe,{isOpen:t,envId:e,onClose:()=>n(!1)}),r?(0,U.jsx)(CWe,{isOpen:r!==null,disk:r,onClose:()=>i(null)}):null,a?(0,U.jsx)(g7,{isOpen:a!==null,disk:a.disk,attachment:a.attachment,serviceHandle:a.serviceHandle,onClose:()=>o(null)}):null,s?(0,U.jsx)(_7,{isOpen:s!==null,disk:s,onClose:()=>c(null)}):null,l?(0,U.jsx)(EWe,{isOpen:l!==null,disk:l,onClose:()=>d(null)}):null]})},jWe={handle:e=>{if(e.source===`new`)return z4(e.handle)},size:e=>{if(e.source===`new`&&(!Number.isFinite(e.size)||e.size<=0))return`Size must be a positive number of GB`},existingDiskId:e=>{if(e.source===`existing`&&!e.existingDiskId)return`Choose a disk to attach`},mountPoint:e=>{let t=h7(e.mountPoint);if(!t)return`Mount path is required`;if(!t.startsWith(`/`))return`Mount path must be an absolute path (e.g., /data)`;if(e.existingMountPoints.includes(t.toLowerCase()))return`That mount path is already in use on this service`}},MWe=({isOpen:e,service:t,onClose:n})=>{let r=l(),i=N(),[a,o]=(0,V.useState)(`new`),[s,c]=(0,V.useState)(``),[u,d]=(0,V.useState)(`10`),f=u.trim()===``?NaN:Number(u),[p,m]=(0,V.useState)(``),[h,g]=(0,V.useState)(``),_=B(e=>uy(e,{envId:t.environmentId})),v=B(Sy),y=(0,V.useMemo)(()=>_.filter(e=>e.status===`provisioned`&&!v.some(t=>t.persistentDiskId===e.id&&t.status!==`deprovisioned`)),[_,v]),b=B(e=>Ey(e,{serviceId:t.id})),[x,S]=QS(jWe),C=I(yy),w=I(vy),E=a===`new`?C:w,D=()=>{o(`new`),c(``),d(`10`),m(``),g(``),n()};T(E,()=>{i(za(t.environmentId))});let O=t.containerCount,k=O>1,A=k?`${t.processType} is running ${O} containers. Scale down to 1 or fewer to attach a disk.`:``,j=[{label:`Select a disk`,value:``},...y.map(e=>({label:`${e.handle} (${e.size} GB)`,value:e.id}))],M=e=>{e.preventDefault(),S({source:a,handle:s,size:f,existingDiskId:p,mountPoint:h,existingMountPoints:b})&&r(a===`new`?yy({envId:t.environmentId,handle:s,size:f,serviceId:t.id,mountPoint:h7(h)}):vy({id:p,serviceId:t.id,mountPoint:h7(h)}))};if(!e)return null;let ee=!(a===`new`?s.trim()&&Number.isFinite(f)&&f>0:p)||!h.trim()||k;return(0,U.jsx)(h3,{children:(0,U.jsxs)(kU,{isOpen:e,onClose:D,className:`min-w-[600px]`,children:[(0,U.jsx)(AU,{icon:(0,U.jsx)(LE,{variant:`sm`}),title:`Attach Persistent Disk`,onClose:D}),(0,U.jsxs)(LA,{onSubmit:M,children:[(0,U.jsxs)(MU,{className:`pb-0`,children:[(0,U.jsx)(m7,{className:`mb-4`}),(0,U.jsxs)(QA,{name:`attach-disk-source`,selected:a,onSelect:e=>o(e),orientation:`horizontal`,className:`gap-6 mb-4`,"aria-label":`Disk source`,children:[(0,U.jsx)(ZA,{value:`new`,children:`Create new disk`}),(0,U.jsx)(ZA,{value:`existing`,children:`Attach existing disk`})]}),A?(0,U.jsx)(q,{variant:`error`,className:`mb-4`,children:A}):null,a===`new`?(0,U.jsx)(J,{label:(0,U.jsxs)(U.Fragment,{children:[`Handle `,(0,U.jsx)(`span`,{className:`text-red-500`,children:`*`})]}),htmlFor:`attach-disk-handle`,className:`mb-4`,feedbackMessage:x.handle,feedbackVariant:x.handle?`danger`:`default`,children:(0,U.jsx)(X,{id:`attach-disk-handle`,name:`handle`,value:s,onChange:e=>c(e.target.value),placeholder:`e.g., shared-uploads`,maxLength:64})}):y.length===0?(0,U.jsx)(q,{variant:`warning`,className:`mb-4`,children:`No detached disks available. Detach an existing disk or create a new disk.`}):(0,U.jsx)(J,{label:(0,U.jsxs)(U.Fragment,{children:[`Choose Disk `,(0,U.jsx)(`span`,{className:`text-red-500`,children:`*`})]}),htmlFor:`attach-disk-existing`,className:`mb-4`,feedbackMessage:x.existingDiskId,feedbackVariant:x.existingDiskId?`danger`:`default`,children:(0,U.jsx)(XA,{id:`attach-disk-existing`,ariaLabel:`disk`,options:j,value:p,onSelect:e=>m(e.value)})}),(0,U.jsxs)(J,{label:(0,U.jsxs)(U.Fragment,{children:[`Mount Path `,(0,U.jsx)(`span`,{className:`text-red-500`,children:`*`})]}),htmlFor:`attach-disk-mount-path`,className:`mb-4`,feedbackMessage:x.mountPoint,feedbackVariant:x.mountPoint?`danger`:`default`,children:[(0,U.jsx)(X,{id:`attach-disk-mount-path`,name:`mountPoint`,value:h,onChange:e=>g(e.target.value),placeholder:`/data`,maxLength:255}),(0,U.jsx)(`p`,{className:`mt-1 text-xs text-gray-500`,children:(0,U.jsx)(CA,{href:`https://www.aptible.com/docs/core-concepts/apps/persistent-disks`,className:`hover:underline`,children:`Learn more about mount paths`})})]}),a===`new`?(0,U.jsxs)(J,{label:(0,U.jsxs)(U.Fragment,{children:[`Size (GB) `,(0,U.jsx)(`span`,{className:`text-red-500`,children:`*`})]}),htmlFor:`attach-disk-size`,className:`mb-4`,feedbackMessage:x.size,feedbackVariant:x.size?`danger`:`default`,children:[(0,U.jsx)(X,{id:`attach-disk-size`,name:`size`,type:`number`,min:1,value:u,onChange:e=>d(e.target.value)}),(0,U.jsx)(`p`,{className:`mt-1 text-xs text-gray-500`,children:`You can increase disk size at any time, but cannot decrease it.`})]}):null,(0,U.jsx)(TA,{className:`mt-4`,...E})]}),(0,U.jsx)(jU,{actions:[(0,U.jsx)(K,{type:`submit`,disabled:ee,isLoading:E.isLoading,children:`Attach Disk`},`submit`),(0,U.jsx)(K,{variant:`white`,onClick:D,type:`button`,children:`Cancel`},`cancel`)]})]})]})})},NWe=({disk:e})=>{let t=B(L.costRates.select);if(!e)return(0,U.jsx)(`span`,{className:`text-gray-400`,children:`-`});let n=ap({rates:t,persistentDisks:[{size:e.size,provisionedIops:0}]});return(0,U.jsx)(q2,{value:n})},PWe=({serviceId:e})=>{u(dy()),u(jy());let[t,n]=(0,V.useState)(!1),[r,i]=(0,V.useState)(null),[a,o]=(0,V.useState)(null),s=B(t=>Eu(t,{id:e}));u(du({id:s.environmentId}));let c=B(e=>tu(e,{id:s.environmentId})),l=B(t=>Ty(t,{serviceId:e})),d=B(cy),f=(0,V.useMemo)(()=>{let e=new Map(d.map(e=>[e.id,e]));return l.filter(e=>e.status!==`deprovisioned`).map(t=>({attachment:t,disk:e.get(t.persistentDiskId),serviceHandle:s.handle,envHandle:c.handle}))},[l,d,s.handle,c.handle]),p=(0,V.useMemo)(()=>[{colId:`handle`,headerName:`Handle`,cellRenderer:({data:e})=>(0,U.jsxs)(W,{variant:`horizontal`,size:`sm`,className:`items-center`,children:[(0,U.jsx)(LE,{variant:`sm`,className:`text-gray-500 shrink-0`}),(0,U.jsx)(U2,{label:e.disk?.handle??e.attachment.persistentDiskId})]})},{colId:`id`,headerName:`ID`,cellRenderer:({data:e})=>(0,U.jsx)(U2,{label:e.disk?.id??e.attachment.persistentDiskId})},{colId:`environment`,headerName:`Environment`,cellRenderer:({data:e})=>(0,U.jsx)(U2,{label:e.envHandle})},{colId:`mountPath`,headerName:`Mount Path`,cellRenderer:({data:e})=>(0,U.jsx)(U2,{label:e.attachment.mountPoint})},{colId:`size`,headerName:`Disk Size`,cellRenderer:({data:e})=>(0,U.jsx)(U2,{label:e.disk?`${e.disk.size} GB`:`-`})},{colId:`status`,headerName:`Status`,cellRenderer:({data:e})=>(0,U.jsx)(U2,{label:cl(e.attachment.status)})},{colId:`createdAt`,headerName:`Created`,cellRenderer:({data:e})=>(0,U.jsx)(Y2,{date:e.attachment.createdAt})},{colId:`cost`,headerName:`Est. Monthly Cost`,headerTooltip:gU,cellRenderer:({data:e})=>(0,U.jsx)(NWe,{disk:e.disk})}
164,{colId:`actions`,headerName:`Actions`,sortable:!1,cellRenderer:({data:e})=>(0,U.jsx)(k2,{label:(0,U.jsx)(PD,{variant:`sm`}),items:[{id:`detach`,label:`Detach`,disabled:!e.disk,onClick:t=>{e.disk&&i({disk:e.disk,attachment:e.attachment,serviceHandle:e.serviceHandle}),t()}},{id:`resize`,label:`Resize`,onClick:t=>{e.disk&&o(e.disk),t()}}]})}],[]);return(0,U.jsxs)(W,{children:[(0,U.jsx)(`div`,{className:`flex justify-end`,children:(0,U.jsxs)(K,{onClick:()=>n(!0),children:[(0,U.jsx)(qE,{variant:`sm`}),(0,U.jsx)(`div`,{className:`ml-2`,children:`Attach Disk`})]})}),(0,U.jsx)(L2,{rowData:f,colDefs:p}),(0,U.jsx)(MWe,{isOpen:t,service:s,onClose:()=>n(!1)}),r?(0,U.jsx)(g7,{isOpen:r!==null,disk:r.disk,attachment:r.attachment,serviceHandle:r.serviceHandle,onClose:()=>i(null)}):null,a?(0,U.jsx)(_7,{isOpen:a!==null,disk:a,onClose:()=>o(null)}):null]})},FWe=({disk:e})=>{let t=B(L.costRates.select);if(!e)return(0,U.jsx)(`span`,{className:`text-gray-400`,children:`â`});let n=ap({rates:t,persistentDisks:[{size:e.size,provisionedIops:0}]});return(0,U.jsx)(q2,{value:n})},IWe=({appId:e})=>{u(dy()),u(jy()),u(Bu({id:e}));let[t,n]=(0,V.useState)(null),r=B(t=>Hu(t,{appId:e})),i=B(Sy),a=B(cy),o=(0,V.useMemo)(()=>{let e=new Map(a.map(e=>[e.id,e])),t=new Map(r.map(e=>[e.id,e.handle]));return i.filter(e=>e.status!==`deprovisioned`).filter(e=>t.has(e.serviceId)).map(n=>({attachment:n,disk:e.get(n.persistentDiskId),serviceHandle:t.get(n.serviceId)??n.serviceId}))},[i,a,r]),s=(0,V.useMemo)(()=>[{colId:`disk`,headerName:`Disk`,cellRenderer:({data:e})=>(0,U.jsx)(U2,{label:e.disk?.handle??e.attachment.persistentDiskId})},{colId:`service`,headerName:`Service`,cellRenderer:({data:e})=>(0,U.jsx)(U2,{label:e.serviceHandle})},{colId:`mountPath`,headerName:`Mount Path`,cellRenderer:({data:e})=>(0,U.jsx)(U2,{label:e.attachment.mountPoint})},{colId:`size`,headerName:`Size`,cellRenderer:({data:e})=>(0,U.jsx)(U2,{label:e.disk?`${e.disk.size} GB`:`â`})},{colId:`status`,headerName:`Status`,cellRenderer:({data:e})=>(0,U.jsx)(U2,{label:cl(e.attachment.status)})},{colId:`createdAt`,headerName:`Created`,cellRenderer:({data:e})=>(0,U.jsx)(Y2,{date:e.attachment.createdAt})},{colId:`cost`,headerName:`Est. Monthly Cost`,headerTooltip:gU,cellRenderer:({data:e})=>(0,U.jsx)(FWe,{disk:e.disk})},{colId:`actions`,headerName:`Actions`,sortable:!1,cellRenderer:({data:e})=>(0,U.jsx)(k2,{label:(0,U.jsx)(PD,{variant:`sm`}),items:[{id:`detach`,label:`Detach`,disabled:!e.disk,onClick:t=>{e.disk&&n({disk:e.disk,attachment:e.attachment,serviceHandle:e.serviceHandle}),t()}}]})}],[]);return(0,U.jsxs)(W,{children:[(0,U.jsx)(L2,{rowData:o,colDefs:s}),t?(0,U.jsx)(g7,{isOpen:t!==null,disk:t.disk,attachment:t.attachment,serviceHandle:t.serviceHandle,onClose:()=>n(null)}):null]})},LWe=()=>{let{serviceId:e=``}=F();return(0,U.jsx)(`div`,{className:`mb-4`,children:(0,U.jsx)(BA,{children:(0,U.jsx)(PWe,{serviceId:e})})})},RWe=()=>{let{id:e=``}=F();return(0,U.jsx)(`div`,{className:`mb-4`,children:(0,U.jsx)(BA,{children:(0,U.jsx)(IWe,{appId:e})})})},zWe=()=>{let[e]=Ee(),t=e.get(`stack_id`)||``,n=e.get(`environment_id`)||``;return t&&n?(0,U.jsx)(ae,{to:qa(`stack_id=${t}&environment_id=${n}`)}):(0,U.jsx)(ae,{to:Za(t?`stack_id=${t}`:``)})},BWe=()=>{let{id:e=``}=F();return(0,U.jsx)(ae,{to:Pa(e),replace:!0})},VWe=()=>(0,U.jsx)(r5,{children:(0,U.jsx)(oIe,{})}),HWe=()=>(0,U.jsx)(r5,{children:(0,U.jsx)(LIe,{})}),UWe=()=>{let e=l(),t=N();return(0,U.jsxs)(b5,{children:[(0,U.jsxs)(`div`,{className:`text-center mt-16`,children:[(0,U.jsx)(`h1`,{className:`${G.type.h1} text-center`,children:`Confirm Log Out`}),(0,U.jsxs)(`p`,{className:`my-6 text-gray-600`,children:[`Click to log out now or visit`,` `,(0,U.jsx)(P,{to:qr(),children:`Security Settings`}),` to log out of other active sessions, first.`]})]}),(0,U.jsx)(Z,{children:(0,U.jsxs)(K,{onClick:n=>{n.preventDefault(),e(pc()),t(Nr())},className:`font-semibold w-full`,children:[`Log Out`,(0,U.jsx)(AE,{className:`ml-2`})]})})]})};function WWe(){return(0,U.jsx)(ae,{to:Hr(),replace:!0})}var GWe=()=>{let{id:e=``}=F();return(0,U.jsx)(Cze,{appId:e})};function KWe(){let{id:e=``}=F();return u(nm({appId:e})),(0,U.jsx)(TLe,{appId:e})}function qWe(){let{id:e=``}=F(),t=B(t=>rf(t,{id:e}));return t.deletedAt?(0,U.jsx)(ae,{to:oa(e),replace:!0}):(0,U.jsx)(BA,{children:(0,U.jsx)(jIe,{appId:t.id})})}var JWe=({app:e})=>{let t=B(t=>tu(t,{id:e.environmentId})),n=l(),r=N(),[i,a]=(0,V.useState)(``),o=wf({appId:e.id}),s=I(o),c=e=>
164{e.preventDefault(),n(o),r(za(t.id))},u=e.handle!==i;return(0,U.jsxs)(`form`,{onSubmit:c,children:[(0,U.jsxs)(`h1`,{className:`text-lg text-red-500 font-semibold flex items-center gap-2 mb-4`,children:[(0,U.jsx)(ZE,{color:`#AD1A1A`}),`Deprovision App`]}),(0,U.jsxs)(W,{children:[(0,U.jsxs)(`p`,{children:[`This will permanently deprovision `,(0,U.jsx)(`strong`,{children:e.handle}),` app. This action cannot be undone. If you want to proceed, type the`,` `,(0,U.jsx)(`strong`,{children:e.handle}),` below to continue.`]}),(0,U.jsxs)(W,{variant:`horizontal`,size:`sm`,className:`items-center`,children:[(0,U.jsx)(X,{className:`flex-1`,disabled:s.isLoading,name:`delete-confirm`,type:`text`,value:i,onChange:e=>a(e.currentTarget.value),id:`delete-confirm`}),(0,U.jsxs)(gA,{envId:e.environmentId,type:`submit`,variant:`delete`,className:`w-70 flex`,disabled:u,isLoading:s.isLoading,children:[(0,U.jsx)(RE,{color:`#FFF`,className:`mr-2`}),`Deprovision App`]})]})]})]})},YWe=({app:e})=>{let t=l(),n=N(),r=xf({id:e.id}),i=I(r);return T(i,()=>{n(oa(e.id))}),(0,U.jsxs)(W,{size:`sm`,children:[(0,U.jsx)(`h4`,{className:G.type.h4,children:`Restart App and Services`}),(0,U.jsx)(`div`,{children:(0,U.jsxs)(_A,{envId:e.environmentId,variant:`white`,onClick:()=>{t(r)},isLoading:i.isLoading,children:[(0,U.jsx)(oD,{className:`mr-2`,variant:`sm`}),`Restart`]})})]})},XWe=({app:e})=>{let t=l(),[n,r]=(0,V.useState)(``),i=B(t=>$m(t,{envId:e.environmentId})),a=B(t=>Th(t,{envId:e.environmentId}));u(rh({id:e.environmentId})),u(Eh({id:e.environmentId}));let o=[...i,...a],s=Tf({id:e.id,handle:n}),c=I(s);return(0,V.useEffect)(()=>{r(e.handle)},[e.id]),(0,U.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),t(s)},className:`flex flex-col gap-4`,children:[(0,U.jsxs)(J,{label:`App Name`,htmlFor:`input-name`,children:[(0,U.jsx)(X,{name:`app-handle`,type:`text`,value:n,onChange:e=>r(e.currentTarget.value),autoComplete:`name`,id:`input-name`}),n!==e.handle&&o.length?(0,U.jsxs)(q,{variant:`info`,showIcon:!1,className:`mt-4`,children:[(0,U.jsxs)(`p`,{children:[`You must `,(0,U.jsx)(`b`,{children:`restart the app`}),` for the new name to appear in the following log and metric drains, view the docs (`,(0,U.jsx)(CA,{variant:`default`,href:`https://www.aptible.com/docs/log-drains`,children:`log drains`}),`,`,` `,(0,U.jsx)(CA,{variant:`default`,href:`https://www.aptible.com/docs/metric-drains`,children:`metric drains`}),`) to learn more:`]}),(0,U.jsx)(`ul`,{className:`list-disc ml-4 mt-2`,children:o.map(e=>(0,U.jsx)(`li`,{children:e.handle},e.id))})]}):null]}),(0,U.jsx)(TA,{...c}),(0,U.jsxs)(W,{variant:`horizontal`,size:`sm`,children:[(0,U.jsx)(hA,{envId:e.environmentId,className:`w-40 semibold`,type:`submit`,disabled:n===e.handle,isLoading:c.isLoading,children:`Save Changes`}),(0,U.jsx)(K,{variant:`white`,onClick:()=>r(e.handle),children:`Cancel`})]})]})},ZWe=()=>{let{id:e=``}=F();u(_f({id:e}));let t=B(t=>rf(t,{id:e})),n=B($o);return(0,U.jsxs)(pU,{children:[(0,U.jsx)(Z,{children:(0,U.jsxs)(W,{children:[(0,U.jsx)(`h3`,{className:`text-lg text-gray-500`,children:`App Settings`}),(0,U.jsx)(XWe,{app:t}),(0,U.jsx)(`hr`,{}),(0,U.jsx)(YWe,{app:t})]})}),(0,U.jsx)(m3,{envId:t.environmentId,orgId:n}),(0,U.jsx)(Z,{children:(0,U.jsx)(JWe,{app:t})})]})};function QWe(){let{id:e=``,serviceId:t=``}=F();return(0,U.jsx)(ae,{to:na(e,t),replace:!0})}function $We(){let{id:e=``}=F();return(0,U.jsx)(ae,{to:la(e),replace:!0})}function eGe(){let{id:e=``}=F(),t=B(t=>rf(t,{id:e})),n=[{name:`GitHub Action`,href:la(e)}];return(0,U.jsxs)(Z,{children:[(0,U.jsxs)(`div`,{className:`flex justify-between items-center`,children:[(0,U.jsx)(`h3`,{className:G.type.h3,children:`How to Deploy Changes Automatically`}),(0,U.jsx)(uA,{href:`https://www.aptible.com/docs/continuous-integration-provider-deployment`})]}),(0,U.jsxs)(W,{className:`mt-4`,children:[(0,U.jsx)(SU,{tabs:n}),(0,U.jsx)(m8,{app:t}),(0,U.jsx)(`div`,{children:(0,U.jsx)(`h4`,{className:G.type.h4,children:`4. Push code to GitHub`})}),(0,U.jsx)(`div`,{children:(0,U.jsx)(`h4`,{className:G.type.h4,children:`5. Trigger deployment`})})]})]})}var tGe=()=>{let{id:e=``}=F();u(_f({id:e}));let t=B(t=>rf(t,{id:e}));u(dv({rootResourceId:e,rootResourceType:`App`,maxDistance:1,onlyRelationshipTypes:[`depends_on`]}));let n=B(e=>uv(e,{id:t.id}));return(0,U.jsx)(Oze,{scope:`read`,envId:t.environmentId,children:(0,U.jsxs)(W,{children:[(0,U.jsx)(q,{variant:`info`,children:`Depen
164dencies are connections tracked by the Aptible platform based on resource relationships.`}),(0,U.jsx)(`h3`,{className:G.type.h3,children:`Databases`}),(0,U.jsx)(VIe,{databases:n.database}),(0,U.jsx)(`h3`,{className:G.type.h3,children:`Apps`}),(0,U.jsx)(gIe,{apps:n.app})]})})};function nGe({appId:e,settingId:t,showMigrationBanner:n}){let r=l(),i=N(),[a,o]=(0,V.useState)(!1);u(oS({id:t,withSensitiveExtras:!0}));let s=B(e=>aS(e,{id:t})),[c,d]=(0,V.useState)(``),[f,p]=(0,V.useState)(``),[m,h]=(0,V.useState)(``),[g,_]=(0,V.useState)(!1),v=(0,V.useRef)(!1);(0,V.useEffect)(()=>{v.current||s.id&&(v.current=!0,d(s.settings.APTIBLE_DOCKER_IMAGE??``),p(s.sensitiveSettings.APTIBLE_PRIVATE_REGISTRY_USERNAME??``),h(s.sensitiveSettings.APTIBLE_PRIVATE_REGISTRY_PASSWORD??``))},[s.id,s.settings,s.sensitiveSettings]);let y=Sf({appId:e,dockerImage:c,registryUsername:f,registryPassword:m}),b=I(Sf);T(b,()=>{i(oa(e))});let x=e=>{e.preventDefault(),r(y)},S=()=>o(!1);return(0,U.jsxs)(Z,{children:[(0,U.jsxs)(W,{size:`sm`,children:[(0,U.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,U.jsx)(`h3`,{className:G.type.h3,children:`Deploy via Docker Image`}),(0,U.jsx)(uA,{href:`https://www.aptible.com/docs/core-concepts/apps/deploying-apps/image/overview#deploy-from-docker-image`})]}),n?(0,U.jsxs)(q,{variant:`info`,children:[`You've previously deployed this app via Git.`,` `,(0,U.jsx)(CA,{href:`https://www.aptible.com/docs/how-to-guides/app-guides/migrate-dockerfile-to-direct-image-deploy`,variant:`default`,children:`Review the docs for steps for migrating to Docker Image before proceeding.`})]}):null,(0,U.jsx)(`hr`,{}),(0,U.jsx)(`p`,{children:`Deploy a pre-built Docker image directly from a public or private registry.`}),(0,U.jsx)(`div`,{children:(0,U.jsx)(K,{className:`mt-2`,onClick:()=>o(!0),children:`Deploy Docker Image`})}),(0,U.jsx)(`div`,{children:(0,U.jsx)(w4,{segments:x4([`aptible deploy`,`--app`,`$APP_HANDLE`,`--docker-image`,`$DOCKER_IMAGE`]),allowCopy:!0})})]}),a?(0,U.jsx)(h3,{children:(0,U.jsxs)(kU,{isOpen:a,onClose:S,children:[(0,U.jsx)(AU,{title:`Deploy Docker Image`,description:`Deploy a pre-built image from a public or private registry.`,onClose:S}),(0,U.jsxs)(LA,{onSubmit:x,children:[(0,U.jsxs)(MU,{className:`pb-0`,children:[n?(0,U.jsxs)(q,{variant:`info`,className:`mb-4`,children:[`You've previously deployed this app via Git.`,` `,(0,U.jsx)(CA,{href:`https://www.aptible.com/docs/how-to-guides/app-guides/migrate-dockerfile-to-direct-image-deploy`,variant:`default`,children:`Review the docs for steps for migrating to Docker Image before proceeding.`})]}):null,(0,U.jsx)(TA,{...b}),(0,U.jsx)(J,{label:`Image to deploy`,htmlFor:`docker-image`,children:(0,U.jsx)(X,{id:`docker-image`,name:`docker-image`,type:`text`,placeholder:`e.g. nginx:latest`,value:c,onChange:e=>d(e.currentTarget.value),required:!0})}),(0,U.jsx)(J,{label:`Username`,htmlFor:`docker-username`,children:(0,U.jsx)(X,{id:`docker-username`,name:`docker-username`,type:`text`,placeholder:`Private registry username (optional)`,value:f,onChange:e=>p(e.currentTarget.value)})}),(0,U.jsx)(J,{label:`Password`,htmlFor:`docker-password`,children:(0,U.jsxs)(`div`,{className:`flex gap-2`,children:[(0,U.jsx)(X,{id:`docker-password`,name:`docker-password`,type:g?`text`:`password`,placeholder:`Private registry password (optional)`,value:m,onChange:e=>h(e.currentTarget.value),className:`flex-1`}),(0,U.jsx)(K,{type:`button`,variant:`white`,onClick:()=>_(e=>!e),children:g?(0,U.jsx)(yD,{variant:`sm`}):(0,U.jsx)(vD,{variant:`sm`})})]})})]}),(0,U.jsx)(jU,{actions:[(0,U.jsx)(K,{variant:`white`,onClick:S,children:`Cancel`},`cancel`),(0,U.jsx)(K,{type:`submit`,isLoading:b.isLoading,children:`Deploy`},`submit`)]})]})]})}):null]})}function rGe({gitRepo:e,appId:t,showDeployButton:n,showMigrationBanner:r}){let i=N();return(0,U.jsx)(Z,{children:(0,U.jsxs)(W,{size:`sm`,children:[(0,U.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,U.jsx)(`h3`,{className:G.type.h3,children:`Deploy via Git Push`}),(0,U.jsx)(uA,{href:`https://www.aptible.com/docs/core-concepts/apps/deploying-apps/image/deploying-with-git/overview`})]}),r?(0,U.jsxs)(q,{variant:`info`,children:[`You've previously deployed this app via Docker Image.`,` `,(0,U.jsx)(CA,{href:`https://www.aptible.com/docs/how-to-guides/app-guides/deploying-docker-image-to-git`,variant:`default`,children:`Review the docs for steps for migrating to Git before proceeding.`})]}):null,(0,U.jsx)(`hr`,{}),(0,U.jsx)(`p`,{children:`Add a Dockerfile to your repo, push to Aptible's Git remote, and Aptible builds and deploys your app automatically.`}),n?(0,U.jsx)(`div`,{children:(0,U.jsx)(cA,{className:`w-fit`,onClick:()=>i(ine(t)),icon:(0,U.jsx)(qE,{}),children:`Deploy`})}):null,(0,U.jsx)(`div`,{children:(0,U.jsx)(w4,{segments:x4([`git push`,e,`main`]),allowCopy:!0})})]})})}function iGe(){let{id:e=``}=F();u(_f({id:e}));let t=B(t=>rf(t,{id:e})),n=B(t=>mf(t,{id:e}));u(Tl({id:t.id}));let r=B(e=>yl(e,{appId:t.id})),i=r.length===0,[a,o]=(0,V.useState)(!1),s=(0,V.useRef)(!1);(0,V.useEffect)(()=>{s.current||t.id&&(s.current=!0,o(i))},[t.id,i]);let c=n===`image-based`,l=t.id?(0,U.jsx)(nGe,{appId:e,settingId:t.currentSettingId,showMigrationBanner:!c},`image`):null,d=(0,U.jsx)(rGe,{gitRepo:t.gitRepo,appId:e,envId:t.environmentId,showDeployButton:i,showMigrationBanner:c},`git`);return(0,U.jsx)(BA,{children:(0,U.jsxs)(W,{children:[i?(0,U.jsxs)(`div`,{className:`border border-gray-200 rounded-lg bg-white p-10 text-center`,children:[(0,U.jsx)(`h3`,{className:`text-lg font-semibold text-gray-900 mb-2`,children:`No Deployments`}),(0,U.jsx)(`p`,{className:`text-gray-600 max-w-lg mx-auto`,children:`This app has no deployments yet. Use the Deployment Methods below to trigger your first deployment.`})]}):null,n===`companion-repo`?(0,U.jsxs)(q,{variant:`warning`,children:[`Companion repository deployments are deprecated.`,` `,(0,U.jsx)(CA,{href:`https://www.aptible.com/docs/core-concepts/apps/deploying-apps/image/deploying-with-docker-image/companion-git-repository`,variant:`default`,children:`Learn more in the docs.`})]}):(0,U.jsx)(Z,{children:(0,U.jsx)(r4,{labelWhenClosed:`Deployment Methods`,labelWhenOpen:`Deployment Methods`,open:a,onToggle:()=>
164o(e=>!e),labelClassName:`text-lg text-gray-900`,children:(0,U.jsx)(W,{className:`mt-4`,children:c?[l,d]:[d,l]})})}),i?null:(0,U.jsx)(cBe,{deployments:r,app:t})]})})}var aGe=()=>{let{id:e=``}=F();return(0,U.jsx)(wze,{dbId:e})},oGe=()=>{let{id:e=``}=F(),t=l(),n=Tp({type:`backup`,dbId:e}),r=()=>{t(n)},i=B(t=>lp(t,{id:e})),a=I(n),o=N();return T(a,()=>{o(va(e))}),(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`div`,{className:`flex gap-4 items-center`,children:[(0,U.jsxs)(_A,{envId:i.environmentId,onClick:r,isLoading:a.isLoading,children:[(0,U.jsx)(qE,{variant:`sm`,className:`mr-2`}),` New Backup`]}),(0,U.jsxs)(dA,{to:Ba(i.environmentId),variant:`white`,children:[(0,U.jsx)(ME,{variant:`sm`,className:`mr-2`}),` Edit Environment Backup Policy`]})]}),(0,U.jsx)(TA,{className:`my-4`,...a})]})},sGe=()=>{let{id:e=``}=F(),t=B(t=>lp(t,{id:e})),n=Kse(e,!!t?.deletedAt);return(0,U.jsxs)(W,{children:[(0,U.jsx)(q,{variant:`info`,children:(0,U.jsxs)(`p`,{className:``,children:[(0,U.jsx)(`strong`,{children:`Deleting Copies of Backups: `}),`Removing an original backup deletes all its copies, but deleting a copy does not affect the original â`,` `,(0,U.jsx)(`a`,{href:` https://www.aptible.com/docs/core-concepts/managed-databases/managing-databases/database-backups`,target:`_blank`,rel:`noreferrer`,children:`view documentation.`})]})}),t?.deletedAt?null:(0,U.jsx)(oGe,{}),(0,U.jsx)(M4,{paginated:n,showDatabase:!1})]})};function cGe(){let{id:e=``}=F();u(bp({id:e}));let t=B(t=>lp(t,{id:e}));u(zu({id:t.environmentId}));let n=u(rm({id:t.environmentId}));return(0,U.jsx)(YA,{query:n,isEmpty:!1,children:(0,U.jsx)(ALe,{database:t})})}var lGe=({db:e})=>{let t=B(t=>Eu(t,{id:e.serviceId})),n=B(t=>ph(t,{id:e.databaseImageId})),r=Cu([t]),i=B(t=>ty(t,{id:e.diskId}));return(0,U.jsxs)(WA,{children:[(0,U.jsx)(Y,{className:`flex-1 pl-4`,children:(0,U.jsxs)(P,{to:_a(e.id),children:[(0,U.jsx)(`div`,{className:G.type.darker,children:e.handle}),(0,U.jsxs)(`div`,{className:G.type[`normal lighter`],children:[`ID: `,e.id]})]})}),(0,U.jsx)(Y,{className:`flex-1`,children:(0,U.jsx)(`div`,{className:`text-gray-900`,children:n.description})}),(0,U.jsx)(Y,{className:`flex-1`,children:(0,U.jsxs)(`div`,{className:G.type.darker,children:[i.size,` GB`]})}),(0,U.jsx)(Y,{className:`flex-1`,children:(0,U.jsxs)(`div`,{className:`text-gray-900`,children:[r.totalMemoryLimit/1024,` GB`]})}),(0,U.jsx)(Y,{className:`flex-1`,children:(0,U.jsx)(`div`,{className:`text-gray-900`,children:Pl[t.instanceClass].name})})]})},uGe=()=>{let{id:e=``}=F();u(bp({id:e}));let t=B(t=>lp(t,{id:e}));u(Ep({id:e}));let n=B(t=>Dp(t,{id:e}));u(vh()),u(zu({id:t.environmentId}));let r=rC(n);return(0,U.jsxs)(W,{children:[(0,U.jsx)(W,{size:`sm`,children:(0,U.jsx)(`div`,{className:`text-gray-500 select-none`,children:(0,U.jsx)(PU,{children:(0,U.jsxs)(W,{variant:`horizontal`,size:`lg`,className:`items-center`,children:[(0,U.jsxs)(IU,{children:[r.totalItems,` Cluster Databases. Replicas can only be added via the Aptible CLI,`,` `,(0,U.jsx)(`a`,{href:`https://www.aptible.com/docs/replication-clustering`,className:`text-blue-500`,children:`view docs to learn more`}),`.`,` `]}),(0,U.jsx)(RU,{...r})]})})})}),(0,U.jsxs)(VA,{children:[(0,U.jsxs)(HA,{children:[(0,U.jsx)(KA,{children:`Database`}),(0,U.jsx)(KA,{children:`Type`}),(0,U.jsx)(KA,{children:`Disk Size`}),(0,U.jsx)(KA,{children:`Container Size`}),(0,U.jsx)(KA,{children:`Profile`})]}),(0,U.jsxs)(UA,{children:[r.data.length===0?(0,U.jsx)(GA,{colSpan:5}):null,r.data.map(e=>(0,U.jsx)(lGe,{db:e},e.id))]})]}),r.totalPages>1&&(0,U.jsx)(RU,{...r})]})},dGe={diskSize:e=>G4(e.diskSize)},fGe=()=>{let e=l(),t=N(),{id:n=``}=F(),[r,i]=QS(dGe);u(bp({id:n}));let a=B(e=>lp(e,{id:n})),o=u(Lu({id:a.serviceId}));u(ey({id:a.diskId}));let s=B(e=>ty(e,{id:a.diskId})),c=B(e=>Eu(e,{id:a.serviceId})),d=B(e=>Gp(e,{serviceId:a.serviceId})),f=B(e=>Tv(e,{dbId:n})),p=B(e=>yx(e,{serviceId:a.serviceId})),[m,h]=(0,V.useState)(!1),{scaler:g,dispatchScaler:_,changesExist:v,requestedContainerProfile:y,currentContainerProfile:b}=gC({service:c,disk:s}),x=v&&!o.isInitialLoading,S=Pp({id:n,recId:m?p.id:``,...g,originalValues:{diskSize:s.size,containerSize:c.containerMemoryLimitMb,containerProfile:c.instanceClass}}),C=t=>{t.preventDefault(),i(g)&&e(S)},w=I(Pp);return T(w,()=>{t(va(a.id))}),(0,U.jsxs)(W,{children:[(0,U.jsx)(h4,{serviceId:c.id,onAcceptRecommendation:()=>{_({type:`containerProfile`,payload:p.recommendedInstanceClass}),_({type:`containerSize`,payload:p.recommendedContainerMemoryLimitMb}),h(!0)}}),(0,U.jsx)(Z,{children:(0,U.jsxs)(`form`,{onSubmit:C,children:[(0,U.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,U.jsx)(`h1`,{className:`text-lg text-gray-500 mb-4`,children:`Manual Scale`}),(0,U.jsx)(s3,{scaler:g,dispatchScaler:_,envId:a.environmentId}),(0,U.jsx)(o3,{scaler:g,dispatchScaler:_,error:r.diskSize}),(0,U.jsx)(a3,{scaler:g,dispatchScaler:_}),(0,U.jsx)(i3,{cpuShare:y.cpuShare,containerSize:g.containerSize})]}),(0,U.jsx)(g8,{service:c,disk:s,endpoints:d,backups:f}),(0,U.jsx)(`hr`,{}),x?(0,U.jsx)(`div`,{className:`text-md font-semibold text-gray-900 mt-4`,children:`Pending Changes`}):null,g.containerProfile===c.instanceClass?null:(0,U.jsxs)(`div`,{className:`my-3`,children:[(0,U.jsx)(`div`,{className:`text-md text-gray-900`,children:`Container Profile`}),(0,U.jsxs)(`p`,{className:`text-black-500`,children:[`Changed from `,b.name,` to`,` `,y.name]})]}),g.diskSize===s.size?null:(0,U.jsxs)(`div`,{className:`my-3`,children:[(0,U.jsx)(`div`,{className:`text-md text-gray-900`,children:`Disk Size`}),(0,U.jsxs)(`p`,{className:`text-black-500`,children:[`Changed from `,s.size,` GB to `,g.diskSize,` GB`]})]}),g.containerSize===c.containerMemoryLimitMb?null:(0,U.jsxs)(`div`,{className:`my-3`,children:[(0,U.jsx)(`div`,{className:`text-md text-gray-900`,children:`Container Size`}),(0,U.jsxs)(`p`,{className:`text-black-500`,children:[`Changed from `,c.containerMemoryLimitMb/1024,` GB to`,` `,g.containerSize/1024,` GB`]})]}),x?(0,U.jsx)(g8,{service:{containerCount:c.containerCount,containerMemoryLimitMb:g.containerSize,instanceClass:g.containerProfile},disk:{size:g.diskSize,provisionedIops:g.iops},endpoints:d,backups:f}):null,(0,U.jsx)(TA,{...w}),(0,U.jsxs)(`div`,{className:`flex mt-4`,children:[(0,U.jsx)(K,{className:`w-40 flex font-semibold`,disabled:!x,type:`submit`,isLoading:w.isLoading,children:`Save Changes`}),x?(0,U.jsx)(K,{className:`w-40 ml-2 flex font-semibold`,onClick:()=>{_({type:`set`,payload:hC(c,s)}),h(!1)},variant:`white`,children:`Cancel`}):null]})]})})]})},pGe=({database:e})=>{let t=B(t=>tu(t,{id:e.environmentId})),n=N(),r=l();u(Ep({id:e.id}));let i=B(t=>Dp(t,{id:e.id})),[a,o]=(0,V.useState)(``),s=kp({dbId:e.id}),c=I(s),d=e=>{e.preventDefault(),r(s)};T(c,()=>{n(za(t.id))});let f=e.handle!==a||i.length>0;return(0,U.jsxs)(`form`,{onSubmit:d,children:[(0,U.jsxs)(`h1`,{className:`text-lg text-red-500 font-semibold flex items-center gap-2 mb-4`,children:[(0,U.jsx)(ZE,{color:`#AD1A1A`}),`Deprovision Database`]}),(0,U.jsxs)(W,{children:[i.length>0?(0,U.jsxs)(q,{children:[(0,U.jsxs)(`p`,{children:[`These other databases depen
164d on `,(0,U.jsx)(`strong`,{children:e.handle}),`, you must delete them first:`]}),(0,U.jsx)(`ul`,{className:`list-disc list-inside`,children:i.map(e=>(0,U.jsx)(`li`,{children:(0,U.jsx)(P,{to:ga(e.id),children:e.handle})},e.id))})]}):null,(0,U.jsxs)(`p`,{children:[`This will permanently deprovision `,(0,U.jsx)(`strong`,{children:e.handle}),` `,`database. This action cannot be undone. If you want to proceed, type`,` `,(0,U.jsx)(`strong`,{children:e.handle}),` below to continue.`]}),(0,U.jsx)(TA,{...c}),(0,U.jsxs)(W,{variant:`horizontal`,size:`sm`,className:`items-center`,children:[(0,U.jsx)(X,{className:`flex-1`,name:`delete-confirm`,type:`text`,value:a,onChange:e=>o(e.currentTarget.value),id:`delete-confirm`}),(0,U.jsxs)(gA,{envId:e.environmentId,variant:`delete`,disabled:f,isLoading:c.isLoading,className:`w-70`,type:`submit`,children:[(0,U.jsx)(RE,{color:`#FFF`,className:`mr-2`}),`Deprovision Database`]})]})]})]})},mGe=({database:e})=>{let t=B(t=>tu(t,{id:e.environmentId})),n=N(),r=l(),[i,a]=(0,V.useState)(`m`),[o,s]=(0,V.useState)(!1),c=Np({id:e.id,containerProfile:i}),u=I(c),d=()=>{r(c),n(va(e.id))},f=!o,p=B(t=>Eu(t,{id:e.serviceId})),m=B(e=>ql(e,{id:t.stackId}));(0,V.useEffect)(()=>{a(xu(p.instanceClass))},[p.instanceClass]);let h=e=>{let t=e.value;Su(t)&&a(t)},g=Object.keys(m).map(e=>({label:Su(e).name,value:e}));return(0,U.jsxs)(`form`,{onSubmit:d,className:`flex flex-col gap-4`,children:[(0,U.jsxs)(`h1`,{className:`text-lg text-red-500 font-semibold flex items-center gap-2`,children:[(0,U.jsx)(ZE,{color:`#AD1A1A`}),`Restart Database with Disk Backup and Restore`]}),(0,U.jsx)(TA,{...u}),(0,U.jsxs)(W,{children:[(0,U.jsxs)(`p`,{children:[`This action will restart `,(0,U.jsx)(`strong`,{children:e.handle}),` with a different container profile and allow it to move availability zones if necessary. During the restart, the disk will be detached and`,` `,(0,U.jsx)(`strong`,{children:`downtime will occur`}),`.`]}),(0,U.jsxs)(W,{children:[(0,U.jsx)(J,{label:`Container Profile`,htmlFor:`container-profile`,children:(0,U.jsx)(XA,{id:`container-profile`,className:`w-1/2`,ariaLabel:`container-profile`,disabled:Object.keys(m).length<=1,value:i,onSelect:h,options:g})}),(0,U.jsx)(ZH,{label:`I understand the warning above`,checked:o,onChange:e=>s(e.currentTarget.checked)}),(0,U.jsx)(gA,{envId:e.environmentId,variant:`primary`,disabled:f,isLoading:u.isLoading,type:`submit`,className:`w-fit`,children:`Restart Database with Disk Backup and Restore`})]})]})]})},hGe=({database:e})=>{let t=l(),[n,r]=(0,V.useState)(!0),[i,a]=(0,V.useState)(``);(0,V.useEffect)(()=>{a(e.handle),r(e.enableBackups)},[e.id]);let o=jp({id:e.id,handle:i,enableBackups:n}),s=I(o),c=e=>{e.preventDefault(),t(o)},d=B(t=>$m(t,{envId:e.environmentId})),f=B(t=>Th(t,{envId:e.environmentId})),p=B(t=>ph(t,{id:e.databaseImageId}));u(rh({id:e.environmentId})),u(Eh({id:e.environmentId})),u(yh({id:e.databaseImageId}));let m=[...d,...f],h=[{label:`Enabled: Allow backups according to environment backup retention policy`,value:`true`},{label:`Disabled: No future automatic backups`,value:`false`}],g=e.enableBackups&&n,_=e=>{r(e)};return(0,U.jsxs)(`form`,{onSubmit:c,className:`flex flex-col gap-4`,children:[(0,U.jsxs)(J,{label:`Database Name`,htmlFor:`input-name`,children:[(0,U.jsx)(X,{name:`app-handle`,type:`text`,value:i,onChange:e=>a(e.currentTarget.value),autoComplete:`name`,id:`input-name`}),i!==e.handle&&m.length?(0,U.jsxs)(q,{variant:`info`,showIcon:!0,className:`mt-4`,children:[(0,U.jsxs)(`p`,{children:[`You must `,(0,U.jsx)(`b`,{children:`restart the database`}),` for the new name to appear in the following`,(0,U.jsxs)(CA,{variant:`default`,href:`https://www.aptible.com/docs/log-drains`,children:[` `,`log drains`]}),` `,`and`,` `,(0,U.jsxs)(CA,{variant:`default`,href:`https://www.aptible.com/docs/metric-drains`,children:[` `,`metric drains`]}),`:`]}),(0,U.jsx)(`ul`,{className:`list-disc ml-4`,children:m.map(e=>(0,U.jsx)(`li`,{children:e.handle},e.id))})]}):null]}),(0,U.jsx)(J,{label:`Database Backups`,description:(0,U.jsxs)(`p`,{children:[`When disabled, there will be no new automatic backups taken of this database,`,p.pitrSupported&&` point-in-time recovery (PITR) will be automatically disabled,`,` `,`and no final database backups will be made. This does not automatically delete any existing taken backups.`,` `,(0,U.jsx)(`a`,{href:`https://www.aptible.com/docs/core-concepts/managed-databases/managing-databases/database-backups#excluding-a-database-from-new-automatic-backups`,target:`_blank`,rel:`noreferrer`,children:`View docs for how to delete backups.`})]}),htmlFor:`input-backup`,children:(0,U.jsx)(XA,{ariaLabel:`Database Backups`,id:`input-backup`,options:h,onSelect:e=>_(e.value===`true`),value:n.toString()})}),p.pitrSupported&&g&&e.enablePitr?(0,U.jsx)(q,{variant:`info`,showIcon:!1,className:`mt-2`,children:(0,U.jsxs)(`p`,{className:`flex items-center gap-1`,children:[(0,U.jsx)(HE,{variant:`sm`,color:`#00633F`}),`Point-in-time recovery (PITR) enabled according to the environment backup retention policy.`]})}):null,p.pitrSupported&&!n&&e.enableBackups&&e.enablePitr?(0,U.jsx)(q,{variant:`warning`,showIcon:!0,className:`mt-2`,children:(0,U.jsx)(`p`,{children:`Disabling backups will automatically disable point-in-time recovery (PITR) for this database.`})}):null,(0,U.jsx)(TA,{...s}),(0,U.jsxs)(W,{variant:`horizontal`,size:`sm`,children:[(0,U.jsx)(hA,{envId:e.environmentId,className:`w-40 semibold`,type:`submit`,isLoading:s.isLoading,disabled:i===e.handle&&n===e.enableBackups,children:`Save Changes`}),(0,U.jsx)(K,{variant:`white`,onClick:()=>{a(e.handle),r(e.enableBackups)},children:`Cancel`})]})]})},gGe=({database:e})=>{let t=l(),[n,r]=(0,V.useState)(``),i=Ap({id:e.id}),a=I(i),o=e=>{e.preventDefault(),t(i)},s=e.handle!==n;return(0,U.jsxs)(`div`,{children:[e.initializeFrom&&(0,U.jsxs)(`form`,{onSubmit:o,className:`flex flex-col gap-4 mt-4`,children:[(0,U.jsx)(J,{label:`Unlink Replica from Source`,description:(0,U.jsxs)(`p`,{children:[(0,U.jsx)(`strong`,{children:`This action does not stop replication.`}),` You are about to unlink a replica from its primary. To proceed, type`,` `,(0,U.jsx)(`strong`,{children:e.handle}),` below to confirm these changes. This action cannot be undone or reversed.`,` `]}),htmlFor:`unlink replica`}),(0,U.jsxs)(W,{variant:`horizontal`,size:`sm`,className:`items-center`,children:[(0,U.jsx)(X,{className:`flex-1`,name:`unlink-confirm`,type:`text`,value:n,onChange:e=>r(e.currentTarget.value),id:`unlink-confirm`}),(0,U.jsx)(gA,{envId:e.environmentId,variant:`delete`,disabled:s,isLoading:a.isLoading,className:`w-70`,type:`submit`,children:`Unlink Replica from Source`})]})]}),(0,U.jsx)(TA,{...a}),(e.initializeFrom||a.isSuccess)&&(0,U.jsx)(`hr`,{className:`mt-6`})]})},_Ge=({database:e})=>{let t=N(),n=l(),r=Mp({id:e.id}),i=I(r);return T(i,()=>{t(va(e.id))}),(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(RA,{className:`mt-4 pb-1`,children:`Restart Database`}),(0,U.jsxs)(_A,{envId:e.environmentId,variant:`white`,isLoading:i.isLoading,className:`flex`,onClick:()=>{n(r)},children:[(0,U.jsx)(oD,{className:`mr-2`,variant:`sm`}),`Restart`]})]})},vGe=()=>{let{id:e=``}=F();u(bp({id:e}));let t=B(t=>lp(t,{id:e})),n=B($o);return t.id===``?(0,U.jsx)(xE,{}):(0,U.jsxs)(pU,{children:[(0,U.jsxs)(Z,{children:[(0,U.jsxs)(`div`,{className:`flex justify-between items-start`,children:[(0,U.jsx)(`h1`,{className:`text-lg text-gray-500 mb-4`,children:`Database Settings`}),(0,U.jsx)(uA,{href:`https://www.aptible.com/docs/managing-databases`})]}),(0,U.jsx)(hGe,{database:t}),(0,U.jsx)(`hr`,{className:`mt-6`}),(0,U.jsx)(gGe,{database:t}),(0,U.jsx)(_Ge,{database:t})]}),(0,U.jsx)(m3,{envId:t.environmentId,orgId:n}),(0,U.jsx)(Z,{children:(0,U.jsx)(mGe,{database:t})}),(0,U.jsx)(Z,{children:(0,U.jsx)(pGe,{database:t})})]})},yGe=()=>{let{id:e=``}=F();return(0,U.jsx)(r3,{dbId:e})},bGe={ipAllowlist:e=>I4(e.ipAllowlist)},xGe=()=>{let e=l(),t=N(),{id:n=``}=F();u(bp({id:n}));let r=B(e=>lp(e,{id:n}));u(Lu({id:r.serviceId}));let[i,a]=(0,V.useState)(``),o=()=>({ipAllowlist:Nm(i),envId:r.environmentId,serviceId:r.serviceId}),[s,c]=QS(bGe),d=o(),f=hm(d),p=t=>{t.preventDefault(),c(d)&&e(f)},m=I(f);return T(m,()=>{t(wa(m.meta.endpointId))}),(0,U.jsxs)(Z,{className:`flex flex-col gap-4`,children:[(0,U.jsx)(`h1`,{className:`text-lg text-black font-semibold`,children:`Create Endpoint`}),(0,U.jsxs)(q,{variant:`info`,children:[`If you only need to access your database from apps,`,` `,(0,U.jsx)(`strong`,{children:`you do not need an Endpoint.`}),` View Settings to reveal database credentials to connect. Before exposing this database to the internet, please consider the connection security advice in our`,` `,(0,U.jsx)(CA,{variant:`info`,href:`https://www.aptible.com/docs/database-endpoints`,children:`Database Endpoint documentation`}),`.`]}),(0,U.jsxs)(LA,{onSubmit:p,children:[(0,U.jsx)(J,{label:`IP Allowlist`,htmlFor:`ip-allowlist`,description:`Only traffic from the following sources is allowed. Add more sources (IPv4 addresses and CIDRs) by separating them with spaces or newlines.`,feedbackMessage:s.ipAllowlist,feedbackVariant:s.ipAllowlist?`danger`:`info`,children:(0,U.jsx)(XH,{id:`ip-allowlist`,"aria-label":`ip-allowlist`,value:i,onChange:e=>a(e.currentTarget.value)})}),(0,U.jsx)(TA,{...m}),(0,U.jsx)(hA,{envId:r.environmentId,isLoading:m.isLoading,type:`submit`,className:`w-[200px]`,children:`Save Endpoint`})]})]})},SGe=()=>{let{id:e=``}=F();return(0,U.jsx)(ae,{to:ba(e),replace:!0})},CGe=[`database`];function wGe(){let{id:e=``}=F(),[t,n]=(0,V.useState)(`chart`),[r,i]=(0,V.useState)(`1h`);u(bp({id:e,withDeleted:!0}
164));let a=B(t=>lp(t,{id:e})),o=u(zu({id:a.environmentId})),s=a.serviceId,c=B(e=>Eu(e,{id:s}));u(Lu({id:s}));let l=N();(0,V.useEffect)(()=>{a.deletedAt&&l(va(e))},[a.deletedAt]);let d=[`cpu_pct`,`la`,`memory_all`,`iops`,`fs`],f=u(c8({serviceId:s,metrics:d,metricHorizon:r})),p=B(e=>s8(e,{serviceId:s,metricHorizon:r})),m=B(e=>q_(e,{id:s,date:Ff(-7).toISOString()})).map(e=>e.id),h=Q6(r),g=B(e=>ev(e,{layers:CGe,releaseIds:m,horizonInSeconds:h,currentReleaseId:c.currentReleaseId})),_=(p/(g.length*d.length)*100).toFixed(2),{totalCPU:v}=Cu([c]);return g?(0,U.jsxs)(YA,{query:o,isEmpty:!1,children:[(0,U.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,U.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,U.jsx)(q6,{viewMetricTab:t,setViewMetricTab:n}),(0,U.jsx)(J6,{viewHorizon:r,setViewHorizon:i})]}),f.isLoading?(0,U.jsxs)(`div`,{className:`flex gap-2 items-center`,children:[(0,U.jsxs)(`span`,{className:`text-black-500`,children:[_,`%`]}),(0,U.jsx)(SE,{color:`#595E63`})]}):null]}),(0,U.jsx)(`div`,{className:`my-4`,children:t===`chart`?(0,U.jsxs)(`div`,{className:`grid grid-cols-1 xl:grid-cols-2 gap-4`,children:[(0,U.jsx)(l8,{containers:g,limit:`${v*100}% CPU`,metricNames:[`cpu_pct`],metricHorizon:r,helpText:`Total amount of CPU your container has used from the host system.`,yAxisUnit:`%`}),(0,U.jsx)(l8,{containers:g,limit:`${c.containerMemoryLimitMb} MB`,metricNames:[`memory_all`],metricHorizon:r,helpText:`Total amount of memory your container has requested from the host system.`,yAxisUnit:` MB`}),(0,U.jsx)(l8,{containers:g,metricNames:[`fs`],metricHorizon:r,helpText:`Total used disk space compared to total available space. A small amount is reserved for usage by the system.`,yAxisUnit:` GB`}),(0,U.jsx)(l8,{containers:g,metricNames:[`iops`],metricHorizon:r,helpText:`IO activity of your database, compared to the baseline performance of its underlying volume.`}),(0,U.jsx)(l8,{containers:g,metricNames:[`la`],metricHorizon:r,helpText:`Total runnable and blocked tasks (threads) in your container.`})]}):(0,U.jsx)(u8,{containers:g,metricHorizon:r})})]}):(0,U.jsx)(xE,{})}var TGe=()=>{let{id:e=``}=F();u(bp({id:e}));let t=l(),n=N(),r=B(t=>lp(t,{id:e}));u(xp({envId:r.environmentId}));let i=B(e=>gp(e,{envId:r.environmentId}));u(zv({envId:r.environmentId}));let a=B(e=>Lv(e,{envId:r.environmentId}));r.id&&!r?.enablePitr&&n(ga(r.id));let o={handle:e=>{let t=z4(e.handle);if(t)return t;if(i.some(t=>t.handle===e.handle))return`A database with this handle already exists in this environment`},recoveryTarget:({recoveryTarget:e})=>{if(!e)return`Target time is required`;if(e<h)return`Target time must be after ${Of(h.toString())}`;if(e>_)return`Target time must be before ${_.toString().replace(`T`,` `).replace(/:\d{2}(\.\d+)?$/,``)} UTC`}},[s,c]=(0,V.useState)(``),[d]=(0,V.useState)(`time`),[f]=(0,V.useState)(Fw(uw(`UTC`))),[p,m]=(0,V.useState)(),[h,g]=(0,V.useState)(f),_=Fw(uw(`UTC`)),[v,y]=QS(o),b={dbId:e,handle:s,recoveryTargetType:d,recoveryTarget:p},x=Fp({...b,recoveryTarget:p?.toString()}),S=I(x);(0,V.useEffect)(()=>{c(`${r.handle}-recovered`)},[r.handle]),(0,V.useEffect)(()=>{let e=f.subtract({days:a.pitrDays}),t=r.oldestPitrTime?Fw(Jce(r.oldestPitrTime,`UTC`)):null;g(t&&t>e?t:e)},[a.pitrDays,r.oldestPitrTime]);let C=e=>{e.preventDefault(),y(b)&&t(x)};return T(S,()=>{n(za(r.environmentId))}),(0,U.jsx)(pU,{children:(0,U.jsxs)(Z,{children:[(0,U.jsx)(`div`,{className:`flex justify-between items-start`,children:(0,U.jsx)(`h1`,{className:`text-lg text-gray-500 mb-4`,children:`Point-in-time Recovery`})}),(0,U.jsxs)(`div`,{className:`mb-4`,children:[(0,U.jsx)(TA,{...S}),a.daily<=a.pitrDays?(0,U.jsx)(c3,{addLinkToEnvironmentPolicy:!0,environmentId:r.environmentId}):null]}),(0,U.jsx)(`form`,{onSubmit:C,className:`flex flex-col gap-4`,children:(0,U.jsxs)(W,{children:[(0,U.jsx)(J,{label:`New Database Name`,htmlFor:`dbname`,feedbackMessage:v.handle,feedbackVariant:v.handle?`danger`:`info`,description:(0,U.jsx)(`p`,{children:`You can recover this database using a point-in-time recovery at target time. A new database will be created from the latest backup relevant to the target time. Once created, all archived write-ahead logs (WAL) up to the specified time will be applied during provisioning.`}),children:(0,U.jsx)(X,{className:`max-w-xs`,name:`dbname`,value:s,onChange:e=>c(e.currentTarget.value)})}),(0,U.jsx)(J,{label:`Target Time (UTC)`,htmlFor:`target-time`,feedbackMessage:v.recoveryTarget,feedbackVariant:v.recoveryTarget?`danger`:`info`,description:(0,U.jsxs)(`p`,{children:[`Recovery is available for any time after`,` `,(0,U.jsx)(`b`,{children:Of(h.toString())})]}),children:(0,U.jsx)(sU,{"aria-label":`target-time`,className:`max-w-xs`,name:`target-time`,granularity:`second`,hourCycle:24,minValue:h,maxValue:_,value:p,onChange:e=>e&&m(e)})}),(0,U.jsx)(W,{variant:`horizontal`,size:`sm`,children:(0,U.jsx)(hA,{envId:r.environmentId,isLoading:S.isLoading,onClick:C,disabled:s===``||!p,children:`Start Recovery`})})]})})]})})};function EGe(){return(0,U.jsx)(r5,{children:(0,U.jsx)(kIe,{})})}var v7=`Only organization owners can sync accounts. Ask an org owner to run this sync or grant you owner access.`,DGe=({accountId:e,accountName:t,awsAccountId:n,lastDiscoveryAt:r,resourceCount:i,isOwner:a})=>{let o=l(),s=B(t=>sd(t,{id:e})),c=s_({id:e}),u=I(c),d=s.id||u.meta?.operationId||``,f=u.isLoading||s.status===`queued`||s.status===`running`,p=!a||f;T(u,()=>{u.meta?.operationId&&o(Gd({id:u.meta.operationId}))});let m=(0,U.jsx)(cA,{variant:`white`,icon:(0,U.jsx)(oD,{variant:`sm`}),"aria-label":`Sync`,disabled:p,onClick:()=>{o(c)},children:`Sync`});return(0,U.jsxs)(WA,{children:[(0,U.jsxs)(Y,{children:[(0,U.jsx)(DD,{className:`inline mr-4`}),(0,U.jsx)(P,{to:$r(e),className:G.type[`table link`],children:t})]}),(0,U.jsx)(Y,{children:n}),(0,U.jsx)(Y,{children:f?(0,U.jsxs)(W,{size:`xs`,children:[(0,U.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,U.jsx)(D4,{status:s.status}),(0,U.jsx)(`span`,{children:`Syncing...`})]}),d?(0,U.jsx)(P,{to:po(d),className:G.type[`table link`],children:`View operation`}):null]}):(0,U.jsxs)(W,{size:`xs`,children:[(0,U.jsx)(`div`,{children:r?(0,U.jsx)(`span`,{children:r}):(0,U.jsx)(`em`,{children:`Not yet synced`})}),d?(0,U.jsx)(P,{to:po(d),className:G.type[`table link`],children:`View operation`}):null]})}),(0,U.jsx)(Y,{children:i}),(0,U.jsx)(Y,{variant:`right`,children:(0,U.jsxs)(W,{variant:`horizontal`,size:`sm`,className:`justify-end`,children:[a?m:(0,U.jsx)(aA,{text:v7,children:m}),(0,U.jsx)(K,{variant:`delete`,"aria-label":`Remove`,children:`Remove`})]})})]})},OGe=()=>{let e=l(),t=B($o),n=B(e=>S_(e,{orgId:t})),{isLoading:r}=u(o_());u(yb());let i=B(e=>d_(e,{search:``})),a=B(Sb);return yC((0,V.useMemo)(()=>i.map(e=>
164e.id).filter(Boolean),[i])),(0,U.jsxs)(W,{children:[(0,U.jsxs)(W,{size:`sm`,children:[(0,U.jsxs)(`div`,{className:`flex justify-between`,children:[(0,U.jsx)(NU,{description:`Connect your external cloud (accounts) so you can easily connect them to your Aptible apps.`,children:`Account Integrations`}),(0,U.jsx)(FU,{children:(0,U.jsxs)(W,{variant:`horizontal`,size:`sm`,children:[n?(0,U.jsx)(K,{variant:`white`,onClick:()=>{i.forEach(t=>{e(s_({id:t.id}))})},children:`Sync All`}):(0,U.jsx)(aA,{text:v7,children:(0,U.jsx)(K,{variant:`white`,disabled:!0,children:`Sync All`})}),(0,U.jsx)(aA,{text:`Not implemented yet, use aptible aws_accounts:add cli command for now. See aptible help aws_accounts:add for usage.`,children:(0,U.jsxs)(mA,{disabled:!0,children:[(0,U.jsx)(qE,{variant:`sm`,className:`mr-2`}),`New Account Connection`]})})]})})]}),(0,U.jsxs)(PU,{children:[(0,U.jsx)(W,{variant:`horizontal`,size:`sm`,className:`items-center`,children:(0,U.jsx)(LU,{isLoading:r})}),(0,U.jsx)(W,{variant:`horizontal`,size:`lg`,className:`items-center mt-1`,children:(0,U.jsxs)(IU,{children:[i?.length||`0`,` Connected`]})})]})]}),(0,U.jsxs)(VA,{children:[(0,U.jsxs)(HA,{children:[(0,U.jsx)(KA,{children:`Account`}),(0,U.jsx)(KA,{children:`Account ID`}),(0,U.jsx)(KA,{children:`Last Synced`}),(0,U.jsx)(KA,{children:`Available Resources`}),(0,U.jsx)(KA,{variant:`right`,children:`Actions`})]}),(0,U.jsx)(UA,{children:i?.length===0?(0,U.jsx)(GA,{colSpan:5}):i.map(e=>(0,U.jsx)(DGe,{accountId:e.id,accountName:e.accountName,awsAccountId:e.awsAccountId,lastDiscoveryAt:e.lastDiscoveryAt,resourceCount:a[e.id]||0,isOwner:n},e.id))})]})]})},y7=()=>{let e=I(Qs),t=l(),n=B(Nn),r=B(qo),{verificationId:i=``,verificationCode:a=``}=F(),o=N(),s=I(Cc),c=B(US);return(0,V.useEffect)(()=>{a&&i&&r.id&&t(Cc({userId:r.id,challengeId:i,verificationCode:a}))},[i,a,r.id]),(0,V.useEffect)(()=>
164{s.status===`success`&&r.verified&&(o(c||kr()),t(GS()))},[s.status]),s.isLoading?(0,U.jsx)(`div`,{className:`flex h-screen w-screen items-center justify-center`,children:(0,U.jsx)(xE,{})}):(0,U.jsx)(b5,{children:(0,U.jsxs)(W,{children:[(0,U.jsx)(`h2`,{className:`mt-6 text-center text-3xl font-semibold text-gray-900`,children:`Check your Email`}),e.lastSuccess!==0&&r.verified?(0,U.jsxs)(q,{variant:`success`,children:[`You are verified!`,` `,(0,U.jsx)(P,{to:Dr(),className:`underline`,children:`Continue to dashboard`})]}):null,(0,U.jsx)(`div`,{className:`flex text-center items-center justify-center`,children:(0,U.jsx)(`div`,{className:`max-w-2xl`,children:s.isError?(0,U.jsxs)(q,{variant:`error`,children:[(0,U.jsx)(`p`,{className:`text-h3 leading-normal`,children:`Failed to verify your email, the token may have expired. Resend the verification email and try again.`}),(0,U.jsx)(`p`,{children:s.message})]}):(0,U.jsxs)(`p`,{className:`text-h3 text-gray-500 leading-normal`,children:[`We've sent a verification link to `,n.email,`. Click the link in the email to confirm your account.`]})})}),(0,U.jsxs)(Z,{children:[(0,U.jsx)(ULe,{}),(0,U.jsx)(K,{onClick:e=>{e.preventDefault(),t(pc()),o(Nr())},className:`font-semibold w-full mt-4`,variant:`white`,children:`Log Out`})]})]})})},kGe=()=>{let{id:e=``}=F();return(0,U.jsx)(Sze,{envId:e})},AGe=()=>{let{id:e=``}=F();return(0,U.jsx)(`div`,{className:`mb-4`,children:(0,U.jsx)(BA,{children:(0,U.jsx)(zBe,{envId:e})})})},jGe=()=>{let{id:e=``}=F();return(0,U.jsx)(`div`,{className:`mb-4`,children:(0,U.jsx)(BA,{children:(0,U.jsx)(AWe,{envId:e})})})},MGe=()=>{let{id:e=``}=F();u(xp({envId:e}));let t=qse(e,!0);return(0,U.jsxs)(W,{children:[(0,U.jsx)(BLe,{envId:e}),(0,U.jsx)(`h3`,{className:G.type.h3,children:`Backups of Deprovisioned Databases`}),(0,U.jsxs)(q,{variant:`info`,children:[(0,U.jsxs)(`p`,{children:[(0,U.jsx)(`strong`,{children:`Both Final and Manual backups from deleted databases are shown below.`}),` `,`Final backups follow the backup retention policy, while Manual backups are retained indefinitely by default. To manage backups for an active database, visit the Backups tab on the database itself.`]}),(0,U.jsxs)(`p`,{children:[(0,U.jsx)(`strong`,{children:`Deleting Copies of Backups: `}),`Removing an original backup deletes all its copies, but deleting a copy does not affect the original â`,` `,(0,U.jsx)(`a`,{href:` https://www.aptible.com/docs/core-concepts/managed-databases/managing-databases/database-backups`,target:`_blank`,rel:`noreferrer`,children:`view documentation.`})]})]}),(0,U.jsx)(M4,{paginated:t,showDatabase:!0,showFinal:!0})]})},NGe=({certificate:e})=>(0,U.jsx)(Y,{children:(0,U.jsx)(P,{to:Oo(e.id),className:`text-black group-hover:text-indigo hover:text-indigo`,children:e.id})}),PGe=({certificate:e})=>(0,U.jsx)(Y,{children:(0,U.jsx)(P,{to:Oo(e.id),className:`text-black group-hover:text-indigo hover:text-indigo`,children:e.commonName})}),FGe=({certificate:e})=>(0,U.jsx)(Y,{children:(0,U.jsx)(B6,{cert:e})}),IGe=({certificate:e})=>(0,U.jsx)(Y,{children:(0,U.jsx)(V6,{cert:e})}),LGe=({certificate:e})=>{let t=B(t=>tm(t,{certId:e.id,envId:e.environmentId}));return(0,U.jsx)(Y,{children:(0,U.jsx)(`div`,{className:`${G.type.darker} leading-4`,children:t.length>0?t.flat().map((e,t)=>(0,U.jsx)(`div`,{children:(0,U.jsx)(P,{to:sa(e.id),children:e.handle},e.id)},`${e.id}-${t}`)):`No Apps Found`})})},RGe=({certificate:e})=>(0,U.jsx)(Y,{className:`w-[225px]`,children:(0,U.jsxs)(`div`,{className:`flex gap-2 items-center`,children:[(0,U.jsx)(R6,{cert:e}),(0,U.jsx)(z6,{cert:e})]})}),zGe=()=>{let{id:e=``}=F(),t=N();u(Zf({id:e}));let n=B(t=>Uf(t,{envId:e})),r=()=>{t(Xte(e))},i=rC(n);return(0,U.jsxs)(W,{children:[(0,U.jsx)(`div`,{className:`flex justify-end`,children:(0,U.jsxs)(vA,{className:`w-fit`,envId:e,onClick:r,tooltipProps:{placement:`left`},children:[(0,U.jsx)(qE,{variant:`sm`,className:`mr-1`}),` New Certificate`]})}),(0,U.jsx)(PU,{children:(0,U.jsxs)(W,{variant:`horizontal`,size:`lg`,className:`items-center`,children:[(0,U.jsxs)(IU,{children:[i.totalItems,` Certificates`]}),(0,U.jsx)(RU,{...i})]})}),(0,U.jsxs)(VA,{children:[(0,U.jsxs)(HA,{children:[(0,U.jsx)(KA,{children:`ID`}),(0,U.jsx)(KA,{children:`Certificate`}),(0,U.jsx)(KA,{children:`Date Range`}),(0,U.jsx)(KA,{children:`Issuer`}),(0,U.jsx)(KA,{children:`Apps`}),(0,U.jsx)(KA,{children:`Status`})]}),(0,U.jsxs)(UA,{children:[i.data.length===0?(0,U.jsx)(GA,{colSpan:6}):null,i.data.map(e=>(0,U.jsxs)(WA,{children:[(0,U.jsx)(NGe,{certificate:e}),(0,U.jsx)(PGe,{certificate:e}),(0,U.jsx)(FGe,{certificate:e}),(0,U.jsx)(IGe,{certificate:e}),(0,U.jsx)(LGe,{certificate:e}),(0,U.jsx)(RGe,{certificate:e})]},e.id))]})]}),i.totalPages>1&&(0,U.jsx)(RU,{...i})]})},b7=({drain:e})=>{let t=`progress`;
164(e.status===`pending`||e.status===`provisioning`||e.status===`deprovisioning`)&&(t=`pending`),e.status===`provisioned`&&(t=`success`),(e.status===`deprovision_failed`||e.status===`provision_failed`)&&(t=`error`);let n=e.status;return e.status===`deprovisioning`&&e.deletedAt&&(t=`error`,n=`deprovisioned`),(0,U.jsx)(H2,{variant:t,children:cl(n)})},BGe=({logDrain:e})=>(0,U.jsx)(Y,{className:`flex-1`,children:(0,U.jsx)(`div`,{className:`flex`,children:(0,U.jsx)(b7,{drain:e})})}),VGe=({logDrain:e})=>(0,U.jsx)(Y,{className:`flex-1`,children:(0,U.jsx)(`div`,{className:`flex`,children:(0,U.jsxs)(`p`,{className:`leading-4`,children:[(0,U.jsx)(`span`,{className:G.type.darker,children:e.handle}),(0,U.jsx)(`br`,{}),(0,U.jsx)(`span`,{className:G.type[`small lighter`],children:cl(e.drainType.replace(`_`,` `))})]})})}),HGe=({logDrain:e})=>{let t=[];return e.drainApps&&t.push(`Apps`),e.drainDatabases&&t.push(`Databases`),e.drainEphemeralSessions&&t.push(`SSH Sessions`),e.drainProxies&&t.push(`Proxies`),(0,U.jsx)(Y,{className:`flex-1`,children:(0,U.jsx)(`div`,{className:`flex`,children:(0,U.jsx)(`p`,{className:`leading-4`,children:(0,U.jsx)(`span`,{className:G.type.darker,children:t.length>0?t.join(`, `):`N/A`})})})})},UGe=({logDrain:e})=>(0,U.jsx)(Y,{className:`flex-1`,children:(0,U.jsx)(`div`,{className:`flex`,children:(0,U.jsx)(`p`,{className:`leading-4`,children:(0,U.jsx)(`span`,{className:G.type.darker,children:cl(Of(e.updatedAt))})})})}),WGe=({logDrain:e})=>{let t=N(),n=l(),r=lh({id:e.id}),i=I(r),a=()=>{n(r)};T(i,()=>{t(po(i.meta.opId))});let o=ch({id:e.id}),s=I(o);return T(s,()=>{t(po(s.meta.opId))}),(0,U.jsx)(Y,{className:`flex justify-end gap-2 mr-4`,children:(0,U.jsxs)(W,{variant:`horizontal`,size:`sm`,children:[e.drainType===`tail`?(0,U.jsx)(_A,{size:`sm`,envId:e.environmentId,className:`semibold`,onClick:a,isLoading:i.isLoading,disabled:e.backendChannel===`log_forwarder`,children:`Restart`}):null,(0,U.jsx)(gA,{size:`sm`,envId:e.environmentId,className:`semibold`,onClick:()=>{n(o)},isLoading:s.isLoading,variant:`delete`,requireConfirm:!0,children:`Delete`})]})})},GGe=({logDrain:e})=>{let t=B(t=>lp(t,{id:e.databaseId}));return e.drainType===`tail`?(0,U.jsx)(aA,{text:"This log drain was automatically provisioned to support `aptible logs` in this environment. Access these logs via the Aptible CLI.",children:(0,U.jsx)(YU,{children:`Tail`})}):e.drainType===`elasticsearch_database`?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(P,{to:ga(t.id),children:t.handle}),e.loggingToken?(0,U.jsx)(P6,{logDrainId:e.id,envId:e.environmentId,fieldValue:e.loggingToken,label:`Pipeline`}):null]}):e.drainType===`datadog`?(0,U.jsx)(P6,{logDrainId:e.id,envId:e.environmentId,fieldValue:e.drainUsername,label:`Datadog`,renderValue:t=>{let n=e.url||`https://http-intake.logs.datadoghq.com/v1/input/${t}`,r=(e.loggingToken??``).split(`,`).map(e=>e.trim()).filter(Boolean);return(0,U.jsx)(aA,{fluid:!0,text:(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`strong`,{children:`URL:`}),` `,(0,U.jsx)(`code`,{className:`text-xs`,children:n}),r.length>0&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`br`,{}),(0,U.jsx)(`strong`,{children:`Tags:`}),` `,(0,U.jsx)(`code`,{className:`text-xs`,children:r.join(`, `)})]})]}),children:(0,U.jsx)(YU,{children:n})})}}):eh(e)?(0,U.jsx)(P6,{logDrainId:e.id,envId:e.environmentId,fieldValue:e.url,label:`URL`}):th(e)?(0,U.jsxs)(W,{variant:`horizontal`,size:`sm`,className:`items-center`,children:[(0,U.jsxs)(YU,{children:[e.drainHost,`:`,e.drainPort]}),e.loggingToken?(0,U.jsx)(P6,{logDrainId:e.id,envId:e.environmentId,fieldValue:e.loggingToken,label:`Token`}):null]}):null},KGe=({envId:e,onCreate:t})=>{u(rh({id:e}));let n=rC(B(t=>$m(t,{envId:e})));return(0,U.jsxs)(W,{children:[(0,U.jsx)(`div`,{className:`flex justify-end`,children:(0,U.jsxs)(_A,{envId:e,onClick:t,children:[(0,U.jsx)(qE,{variant:`sm`,className:`mr-1`}),` New Log Drain`]})}),(0,U.jsx)(W,{size:`sm`,children:(0,U.jsx)(PU,{children:(0,U.jsxs)(W,{variant:`horizontal`,size:`lg`,className:`items-center`,children:[(0,U.jsxs)(IU,{children:[n.totalItems,` Log Drains`]}),(0,U.jsx)(RU,{...n})]})})}),(0,U.jsxs)(VA,{children:[(0,U.jsxs)(HA,{children:[(0,U.jsx)(KA,{children:`Status`}),(0,U.jsx)(KA,{children:`Handle`}),(0,U.jsx)(KA,{children:`Destination`}),(0,U.jsx)(KA,{children:`Sources`}),(0,U.jsx)(KA,{children:`Last Updated`}),(0,U.jsx)(KA,{variant:`right`,children:`Actions`})]}),(0,U.jsxs)(UA,{children:[n.data.length===0?(0,U.jsx)(GA,{colSpan:6}):null,n.data.map(e=>(0,U.jsxs)(WA,{children:[(0,U.jsx)(BGe,{logDrain:e}),(0,U.jsx)(VGe,{logDrain:e}),(0,U.jsx)(Y,{className:`flex items-center h-full min-w-[280px]`,children:(0,U.jsx)(GGe,{logDrain:e})}),(0,U.jsx)(HGe,{logDrain:e}),(0,U.jsx)(UGe,{logDrain:e}),(0,U.jsx)(WGe,{logDrain:e})]},e.id))]})]})]})},qGe=({metricDrain:e})=>(0,U.jsx)(Y,{className:`flex-1`,children:(0,U.jsx)(`div`,{className:`flex`,children:(0,U.jsx)(b7,{drain:e})})}),JGe=({metricDrain:e})=>(0,U.jsx)(Y,{className:`flex-1`,children:(0,U.jsx)(`div`,{className:`flex`,children:(0,U.jsxs)(`p`,{className:`leading-4`,children:[(0,U.jsx)(`span`,{className:G.type.darker,children:e.handle}),(0,U.jsx)(`br`,{}),(0,U.jsx)(`span`,{className:G.type[`small lighter`],children:cl(e.drainType.replace(`_`,` `))})]})})}),YGe=({metricDrain:e})=>{let t=B(t=>lp(t,{id:e.databaseId}));return(0,U.jsx)(Y,{className:`flex-1`,children:(0,U.jsx)(P,{to:ga(t.id),children:t.handle})})},XGe=({metricDrain:e})=>(0,U.jsx)(Y,{className:`flex-1`,children:(0,U.jsx)(`div`,{className:`flex`,children:(0,U.jsx)(`p`,{className:`leading-4`,children:(0,U.jsx)(`span`,{className:G.type.darker,children:Of(e.updatedAt)})})})}),ZGe=({metricDrain:e})=>{let t=N(),n=l(),r=Ph({id:e.id}),i=I(r);return T(i,()=>{t(po(i.meta.opId))}),(0,U.jsx)(Y,{className:`flex justify-end gap-2 mr-4`,children:(0,U.jsx)(W,{variant:`horizontal`,size:`sm`,children:(0,U.jsx)(gA,{size:`sm`,envId:e.environmentId,className:`semibold`,onClick:()=>{n(r)},isLoading:i.isLoading,variant:`delete`,requireConfirm:!0,children:`Delete`})})})},QGe=({envId:e,onCreate:t})=>{u(Eh({id:e}));let n=rC(B(t=>Th(t,{envId:e})));return(0,U.jsxs)(W,{children:[(0,U.jsx)(`div`,{className:`flex justify-end`,children:(0,U.jsxs)(_A,{envId:e,onClick:t,children:[(0,U.jsx)(qE,{variant:`sm`,className:`mr-1`}),` New Metric Drain`]})}),(0,U.jsx)(W,{size:`sm`,children:(0,U.jsx)(PU,{children:(0,U.jsxs)(W,{variant:`horizontal`,size:`lg`,className:`items-center`,children:[(0,U.jsxs)(IU,{children:[n.totalItems,` Metric Drains`]}),(0,U.jsx)(RU,{...n})]})})}),(0,U.jsxs)(VA,{children:[(0,U.jsxs)(HA,{children:[(0,U.jsx)(KA,{children:`Status`}),(0,U.jsx)(KA,{children:`Handle`}),(0,U.jsx)(KA,{children:`Database`}),(0,U.jsx)(KA,{children:`Last Updated`}),(0,U.jsx)(KA,{variant:`right`,children:`Actions`})]}),(0,U.jsxs)(UA,{children:[n.data.length===0?(0,U.jsx)(GA,{colSpan:5}):null,n.data.map(e=>(0,U.jsxs)(WA,{children:[(0,U.jsx)(qGe,{metricDrain:e}),(0,U.jsx)(JGe,{metricDrain:e}),(0,U.jsx)(YGe,{metricDrain:e}),(0,U.jsx)(XGe,{metricDrain:e}),(0,U.jsx)(ZGe,{metricDrain:e})]},e.id))]})]})]})},$Ge=({drain:e,envId:t,orgId:n})=>{let r=l(),i=LS({drainId:e.id,orgId:n,accountId:t}),a=I(i);return(0,U.jsx)(Y,{className:`flex justify-end gap-2 mr-4`,children:(0,U.jsx)(W,{variant:`horizontal`,size:`sm`,children:(0,U.jsx)(gA,{size:`sm`,envId:t,className:`semibold`,onClick:()=>{r(i)},isLoading:a.isLoading,variant:`delete`,requireConfirm:!0,children:`Delete`})})})},eKe=({envId:e,onCreate:t})=>{let n=B($o);u(dx({envId:e,orgId:n})),u(PS({id:e,orgId:n}));let r=rC(B(t=>NS(t,{envId:e})));return(0,U.jsxs)(`div`,{id:`llm-trace-drains`,className:`flex flex-col gap-4`,children:[(0,U.jsx)(`div`,{className:`flex justify-end`,children:(0,U.jsxs)(_A,{envId:e,onClick:t,children:[(0,U.jsx)(qE,{variant:`sm`,className:`mr-1`}),` New LLM Trace Drain`]})}),(0,U.jsx)(W,{size:`sm`,children:(0,U.jsx)(PU,{children:(0,U.jsxs)(W,{variant:`horizontal`,size:`lg`,className:`items-center`,children:[(0,U.jsxs)(IU,{children:[r.totalItems,` LLM Trace Drains`]}),(0,U.jsx)(RU,{...r})]})})}),(0,U.jsxs)(VA,{children:[(0,U.jsxs)(HA,{children:[(0,U.jsx)(KA,{children:`Handle`}),(0,U.jsx)(KA,{children:`Destination`}),(0,U.jsx)(KA,{children:`Last Updated`}),(0,U.jsx)(KA,{variant:`right`,children:`Actions`})]}),(0,U.jsxs)(UA,{children:[r.data.length===0?(0,U.jsx)(GA,{colSpan:4}):null,r.data.map(t=>(0,U.jsxs)(WA,{children:[(0,U.jsx)(Y,{className:`flex-1`,children:(0,U.jsx)(`div`,{className:`flex`,children:(0,U.jsx)(`p`,{className:`leading-4`,children:(0,U.jsx)(`span`,{className:G.type.darker,children:t.handle})})})}),(0,U.jsx)(Y,{className:`flex-1 min-w-[280px]`,children:(0,U.jsx)(aA,{fluid:!0,text:t.url,children:(0,U.jsx)(YU,{className:`truncate max-w-[360px] block`,children:t.url})})}),(0,U.jsx)(Y,{className:`flex-1`,children:(0,U.jsx)(`span`,{className:G.type.darker,children:cl(Of(t.updatedAt))})}),(0,U.jsx)($Ge,{drain:t,envId:e,orgId:n})]},t.id))]})]})]})},tKe=()=>{let{id:e=``}=F(),t=N(),n=B($o);u(Ab({orgId:n}));let r=!!B(kb)?.id;return(0,U.jsxs)(W,{children:[(0,U.jsx)(KGe,{envId:e,onCreate:()=>{t(Gne(e))}}),(0,U.jsx)(QGe,{envId:e,onCreate:()=>{t(Wne(e))}}
164),r?(0,U.jsx)(eKe,{envId:e,onCreate:()=>{t(Kne(e))}}):null]})},nKe=()=>{let{id:e=``}=F();return(0,U.jsx)(`div`,{className:`mb-4`,children:(0,U.jsx)(BA,{children:(0,U.jsx)(cIe,{envId:e})})})},rKe=()=>{let{id:e=``}=F();return(0,U.jsx)(`div`,{className:`mb-4`,children:(0,U.jsx)(BA,{children:(0,U.jsx)(zIe,{envId:e})})})},iKe=()=>(0,U.jsx)(BA,{children:(0,U.jsx)(`p`,{children:`Environment Security Content`})}),aKe={handle:z4},oKe=({envId:e})=>{let t=l(),n=B(t=>tu(t,{id:e})),[r,i]=(0,V.useState)(!1),[a,o]=(0,V.useState)(``),[s,c]=QS(aKe),u=mu({id:e,handle:a}),d=I(u),f=!r;return(0,V.useEffect)(()=>{o(n.handle)},[n.id]),(0,U.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),c(a)&&t(u)},className:`flex flex-col gap-4`,children:[(0,U.jsx)(J,{label:`Environment Handle`,htmlFor:`env-handle`,feedbackMessage:s.handle,feedbackVariant:s.handle?`danger`:`info`,children:(0,U.jsx)(X,{id:`env-handle`,type:`text`,value:a,onChange:e=>o(e.currentTarget.value)})}),(0,U.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,U.jsxs)(q,{variant:`info`,children:[(0,U.jsxs)(`div`,{className:`mb-1 font-semibold`,children:[`In order for the new environment handle `,a,` to appear in log drain and metric drain destinations, you must restart the apps and databases in this environment. Also be aware the following may need adjustments:`]}),(0,U.jsxs)(`ol`,{className:`list-disc list-inside`,children:[(0,U.jsxs)(`li`,{children:[`Git remote URLs (e.g.:`,` `,(0,U.jsxs)(YU,{children:[`[email protected]:`,a,`/APP_HANDLE.git`]}),`)`]}),(0,U.jsx)(`li`,{children:`Your own external scripts (e.g. for CI/CD)`})]})]}),(0,U.jsx)(ZH,{label:`I understand the warning above`,checked:r,onChange:e=>i(e.currentTarget.checked)}),(0,U.jsx)(TA,{...d}),(0,U.jsx)(`hr`,{}),(0,U.jsx)(bA,{envId:e,type:`submit`,isLoading:d.isLoading,disabled:f,className:`w-40`,children:`Save Changes`})]})]})},sKe=({envId:e})=>{let t=N();u(du({id:e})),u(Pv({id:e,page:1,perPage:1})),u(rh({id:e})),u(Eh({id:e}));let n=B(t=>tu(t,{id:e})),r=B(t=>Th(t,{envId:e})),i=B(t=>$m(t,{envId:e})),a=B(t=>Cv(t,{envId:e})),[o,s]=(0,V.useState)(``),c=l(),d=pu({id:e}),f=I(d),p=o!==n.handle,m=(()=>{let e=[];return n.totalAppCount>0&&e.push(`Apps`),n.totalDatabaseCount>0&&e.push(`Databases`),a.length>0&&e.push(`Database Backups`),i.length>0&&e.push(`Log Drains`),r.length>0&&e.push(`Metric Drains`),e})(),h=m.length===0;return T(f,()=>{t(Ma())}),(0,U.jsxs)(Z,{children:[(0,U.jsxs)(`h1`,{className:`text-lg text-red-500 font-semibold flex items-center gap-2 mb-4`,children:[(0,U.jsx)(ZE,{color:`#AD1A1A`}),`Deprovision Environment`]}),(0,U.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),!p&&h&&c(d)},children:[(0,U.jsxs)(`div`,{children:[`This will permanently deprovision `,(0,U.jsx)(`strong`,{children:n.handle}),` `,`environment. This action cannot be undone. If you want to proceed, type `,(0,U.jsx)(`strong`,{children:n.handle}),` below to continue.`]}),h?null:(0,U.jsxs)(q,{className:`mt-4`,variant:`error`,children:[`You must first deprovision any existing`,` `,(0,U.jsx)(`strong`,{children:m.join(`, `)}),` inside your`,` `,(0,U.jsx)(`strong`,{children:n.handle}),` environment to proceed.`]}),(0,U.jsxs)(`div`,{className:`flex items-center gap-2 mt-4`,children:[(0,U.jsx)(X,{name:`delete-confirm`,className:`flex-1`,type:`text`,value:o,onChange:e=>s(e.currentTarget.value),id:`delete-confirm`}),(0,U.jsxs)(gA,{type:`submit`,envId:e,variant:`delete`,isLoading:f.isLoading,disabled:p||!h,className:`h-full w-70 flex`,children:[(0,U.jsx)(RE,{color:`#FFF`,className:`mr-2`}),`Deprovision Environment`]})]})]})]})},cKe=()=>{let{id:e=``}=F(),t=B($o);return(0,U.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,U.jsxs)(Z,{children:[(0,U.jsx)(`h1`,{className:`text-lg text-gray-500 mb-4`,children:`Environment Settings`}),(0,U.jsx)(oKe,{envId:e})]}),(0,U.jsx)(m3,{envId:e,orgId:t}),(0,U.jsx)(sKe,{envId:e})]})},lKe=()=>(0,U.jsx)(r5,{children:(0,U.jsx)(ILe,{})}),uKe=()=>{let{id:e}=F();return u(By({resourceId:e||``})),e?(0,U.jsx)(fIe,{resourceId:e}):(0,U.jsx)(`div`,{children:`Resource not found`})},dKe=({resource:e})=>{let t=l(),[n,r]=(0,V.useState)(``),i=Tb({id:e.id,resourceName:n}),a=I(i);return(0,V.useEffect)(()=>{r(e.resourceName)},[e.id]),(0,U.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),t(i)},className:`flex flex-col gap-4`,children:[(0,U.jsx)(J,{label:`Resource Name`,htmlFor:`input-name`,children:(0,U.jsx)(X,{name:`resource-name`,type:`text`,value:n,onChange:e=>r(e.currentTarget.value),autoComplete:`name`,id:`input-name`})}),(0,U.jsx)(TA,{...a}),(0,U.jsxs)(W,{variant:`horizontal`,size:`sm`,children:[(0,U.jsx)(K,{className:`w-40 semibold`,type:`submit`,disabled:n===e.resourceName,isLoading:a.isLoading,children:`Save Changes`}),(0,U.jsx)(K,{variant:`white`,onClick:()=>r(e.resourceName),children:`Cancel`})]})]})},fKe=()=>{let{id:e=``}=F();u(vb({id:e}));let t=B(t=>bb(t,{id:e}));return(0,U.jsx)(pU,{children:(0,U.jsx)(Z,{children:(0,U.jsxs)(W,{children:[(0,U.jsx)(`h3`,{className:`text-lg text-gray-500`,children:`Resource Settings`}),(0,U.jsx)(dKe,{resource:t})]})})})},pKe=()=>(0,U.jsx)(`div`,{children:(()=>{throw`Error - Something went wrong.`})()}),mKe=()=>{let e=l(),[t,n]=(0,V.useState)(``),r=I(Kc),i=n=>{n.preventDefault(),t&&e(Kc({email:t}))};return(0,U.jsxs)(b5,{children:[(0,U.jsxs)(`div`,{className:`text-center mb-4`,children:[(0,U.jsx)(`h1`,{className:`${G.type.h1} text-center`,children:`Reset your password`}),(0,U.jsxs)(`p`,{className:`mt-6 text-gray-600 mb-4`,children:[`Check your email for reset instructions or go back to`,` `,(0,U.jsx)(P,{to:Nr(),children:`Log In`}),`.`]})]}),(0,U.jsx)(Z,{children:(0,U.jsxs)(W,{children:[(0,U.jsx)(TA,{...r,isSuccess:r.meta.fakeSuccess||r.isSuccess}),(0,U.jsxs)(`form`,{onSubmit:i,children:[(0,U.jsx)(J,{label:`Email`,htmlFor:`email`,children:(0,U.jsx)(X,{type:`email`,name:`email`,value:t,onChange:e=>n(W4(e.currentTarget.value)),placeholder:`Enter your email`,className:`w-full`})}),(0,U.jsx)(K,{className:`w-full mt-6`,disabled:t===``||r.isSuccess,isLoading:r.isLoading,type:`submit`,children:`Reset Password`})]})]})})]})},hKe=()=>{let{challengeId:e=``,verificationCode:t=``}=F(),n=l(),[r,i]=(0,V.useState)(``),a=I(qc),o=i=>{i.preventDefault(),r&&e&&t&&n(qc({password:r,challengeId:e,verificationCode:t}))};return(0,U.jsxs)(b5,{children:[(0,U.jsxs)(`div`,{className:`text-center`,children:[(0,U.jsx)(`h1`,{className:G.type.h1,children:`Reset Password`}),(0,U.jsx)(`p`,{className:`mt-6 text-gray-600`,children:`Finish changing your password.`})]}),(0,U.jsx)(Z,{children:(0,U.jsxs)(W,{children:[a.isError?(0,U.jsx)(TA,{className:`my-2`,...a}):null,a.isSuccess?(0,U.jsxs)(q,{className:`my-2`,variant:`success`,children:[`Success! Continue to `,(0,U.jsx)(P,{to:Nr(),children:`login`})]}):null,(0,U.jsxs)(`form`,{onSubmit:o,children:[(0,U.jsx)(J,{label:`New Password`,htmlFor:`pass`,children:(0,U.jsx)(X,{type:`password`,id:`pass`,name:`pass`,value:r,onChange:e=>i(e.currentTarget.value),placeholder:`Enter your new password`,className:`w-full`})}),(0,U.jsx)(K,{className:`w-full mt-4`,disabled:r===``||a.isSuccess,isLoading:a.isLoading,type:`submit`,children:`Change password`})]})]})})]})},x7=we(),S7=({children:e,options:t})=>{let n=B(an),r=(0,V.useMemo)(()=>Os(n.stripePublishableKey),[n.stripePublishableKey]);return(0,U.jsx)(x7.Elements,{stripe:r,options:t,children:e})},gKe={zipcode:e=>H4(e.zipcode,`zipcode`),name:e=>H4(e.nameOnCard,`name on card`),address1:e=>H4(e.address1,`street address`),city:e=>H4(e.city,`city`),state:e=>{if(e.country===`US`&&e.state===`NA`)return`state / province / district is required`},country:e=>e.country===`US`&&e.zipcode&&!/^[0-9]{5}(?:-[0-9]{4})?$/.test(e.zipcode)?`invalid zip code`:H4(e.country,`country`)},C7={development:0,production:49900};function w7(e){if(e===0)return`$0 base fee`;let t=e/100,n=e%100!=0;return`${new Intl.NumberFormat(`en-US`,{style:`currency`,currency:`USD`,minimumFractionDigits:n?2:0,maximumFractionDigits:2}).format(t)}/month base fee`}function T7(e,t){let n=e[t]?.costCents;
164return typeof n==`number`&&n>0?n:t in C7?C7[t]:n??0}var _Ke=({planName:e,storePlanName:t,selectedPlan:n,onSuccess:r,planChangeLoading:i=!1})=>{let a=B(Cs),o=B(vg),s=N(),c=(0,x7.useElements)(),u=(0,x7.useStripe)(),d=l(),[f,p]=(0,V.useState)(``),[m,h]=(0,V.useState)(``),[g,_]=(0,V.useState)(``),[v,y]=(0,V.useState)(``),[b,x]=(0,V.useState)(``),[S,C]=(0,V.useState)(`NA`),[w,E]=(0,V.useState)(`US`),[D,O]=(0,V.useState)(``),k=I(ks),[A,j]=(0,V.useState)(!1),[M,ee]=QS(gKe),te={zipcode:m,nameOnCard:f,address1:g,address2:v,city:b,state:S,country:w};T(k,()=>{if(d(Ns({id:a.id})),r){r();return}s(Dr())});async function ne(){if(!ee(te))return;if(!u||!c)throw Error(`stripe not found`);let e=await c.submit();if(e.error)throw Error(e.error.message||`unknown`);let t=c.getElement(x7.CardNumberElement);if(!t)throw Error(`stripe card number element not found`);let n=await u.createToken(t,{name:f,address_zip:m});if(n.error)throw Error(n.error.message||`unknown`);let r=n.token?.id;if(!r)throw Error(`stripe token not found`);return d(ks({id:a.id,stripeTokenId:r,...te})),r}let re=e=>{e.preventDefault(),j(!0),ne().catch(e=>{console.error(`err`,e),O(e.message)}).finally(()=>{j(!1)})};return(0,U.jsxs)(W,{children:[D?(0,U.jsx)(q,{variant:`error`,children:D}):null,(0,U.jsx)(TA,{...k}),(0,U.jsxs)(`div`,{className:`flex flex-col gap-0`,children:[(0,U.jsx)(RA,{children:`Organization`}),(0,U.jsx)(A6,{})]}),(0,U.jsxs)(`form`,{className:`space-y-4`,onSubmit:re,children:[(0,U.jsxs)(RA,{children:[(0,U.jsx)(`span`,{children:`Credit Card Number`}),(0,U.jsx)(`div`,{className:`p-3 border border-gray-300 rounded-md shadow-sm`,children:(0,U.jsx)(x7.CardNumberElement,{})})]}),(0,U.jsxs)(`div`,{className:`flex flex-row gap-4`,children:[(0,U.jsx)(`div`,{className:`w-1/2`,children:(0,U.jsxs)(RA,{children:[(0,U.jsx)(`span`,{children:`Expiration Date`}),(0,U.jsx)(`div`,{className:`p-3 border border-gray-300 rounded-md shadow-sm`,children:(0,U.jsx)(x7.CardExpiryElement,{})})]})}),(0,U.jsx)(`div`,{className:`w-1/2`,children:(0,U.jsxs)(RA,{children:[(0,U.jsx)(`span`,{children:`CVC`}),(0,U.jsx)(`div`,{className:`p-3 border border-gray-300 rounded-md shadow-sm`,children:(0,U.jsx)(x7.CardCvcElement,{})})]})})]}),(0,U.jsx)(J,{label:`Name on Card`,htmlFor:`name-on-card`,feedbackVariant:M.name?`danger`:`info`,feedbackMessage:M.name,children:(0,U.jsx)(X,{id:`name-on-card`,name:`name-on-card`,type:`text`,autoComplete:`name-on-card`,required:!0,value:f,onChange:e=>p(e.target.value)})}),(0,U.jsx)(J,{label:`Street and number, P.O. box, c/o.`,htmlFor:`street-address-1`,feedbackVariant:M.address1?`danger`:`info`,feedbackMessage:M.address1,children:(0,U.jsx)(X,{id:`street-address-1`,name:`street-address-1`,type:`text`,autoComplete:`address-line1`,value:g,onChange:e=>_(e.target.value)})}),(0,U.jsx)(J,{label:`Suite, unit, building, floor, etc.`,htmlFor:`street-address-2`,children:(0,U.jsx)(X,{id:`street-address-2`,name:`street-address-2`,type:`text`,autoComplete:`address-line2`,value:v,onChange:e=>y(e.target.value)})}),(0,U.jsx)(J,{label:`City`,htmlFor:`city`,feedbackVariant:M.city?`danger`:`info`,feedbackMessage:M.city,children:(0,U.jsx)(X,{id:`city`,name:`city`,type:`text`,value:b,onChange:e=>x(e.target.value)})}),(0,U.jsxs)(W,{variant:`horizontal`,children:[(0,U.jsx)(J,{label:`State`,htmlFor:`us-state`,feedbackVariant:M.state?`danger`:`info`,feedbackMessage:M.state,children:(0,U.jsx)(XA,{id:`us-state`,ariaLabel:`us-state`,value:S,options:dBe,onSelect:e=>C(e.value)})}),(0,U.jsx)(J,{label:`Zipcode`,htmlFor:`zipcode`,className:`flex-1`,feedbackVariant:M.zipcode?`danger`:`info`,feedbackMessage:M.zipcode,children:(0,U.jsx)(X,{name:`zipcode`,value:m,autoComplete:`postal-code`,onChange:e=>h(e.target.value)})})]}),(0,U.jsx)(J,{label:`Country`,htmlFor:`country`,feedbackVariant:M.country?`danger`:`info`,feedbackMessage:M.country,children:(0,U.jsx)(XA,{id:`country`,ariaLabel:`country`,value:w,options:v8,onSelect:e=>E(e.value)})}),t===`starter`&&n?(0,U.jsxs)(q,{variant:`info`,className:`text-sm`,children:[`Adding a payment method will end your trial and move you to the`,` `,cl(n.name),` plan (`,w7(T7(o,n.name)),`). Charges will begin accruing at that time.`]}):null,t===`none`&&n?(0,U.jsxs)(q,{variant:`info`,className:`text-sm`,children:[`Adding a payment method will move you to the`,` `,cl(n.name),` plan (`,w7(T7(o,n.name)),`). Charges will begin accruing at that time.`]}):null,(0,U.jsx)(K,{type:`submit`,className:`font-semibold w-full`,isLoading:k.isLoading||A||i,children:`Save Payment`})]})]})},E7=({selectedPlan:e,onSuccess:t,planChangeLoading:n=!1,onSelectDifferentPlan:r,header:i,description:a,changePlanHref:o=Di()})=>{let s=B(bg),c=B(e=>_g(e,{id:s.planId})),l=e?e.name:c.name,u=c.name===`starter`?`Trial`:c.name===`none`?`None`:cl(c.name),d=(()=>{let t=(0,U.jsxs)(U.Fragment,{children:[e?`Select a different plan`:`Change plan`,` `,(0,U.jsx)(AE,{variant:`sm`,color:`#4361FF`})]});return e&&r?(0,U.jsx)(`button`,{type:`button`,onClick:r,className:`flex items-center gap-1 text-[#4361FF] underline hover:opacity-90 bg-transparent border-0 p-0 cursor-pointer font-inherit`,children:t}):(0,U.jsx)(P,{to:o,className:`flex items-center gap-1 text-[#4361FF] underline hover:opacity-90`,children:t})})();return(0,U.jsxs)(W,{children:[i??null,a??null,(0,U.jsx)(q,{variant:`info`,className:`w-full`,children:(0,U.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,U.jsxs)(`div`,{children:[`Current plan: `,u]}),e?(0,U.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,U.jsxs)(`span`,{children:[`Changing to: `,cl(e.name)]}),d]}):(0,U.jsx)(`div`,{children:d})]})}),(0,U.jsxs)(`div`,{className:`bg-white py-8 px-10 shadow rounded-lg border border-black-100 w-full`,children:[(0,U.jsx)(_Ke,{planName:l,storePlanName:c.name,selectedPlan:e,onSuccess:t,planChangeLoading:n}),(0,U.jsx)(`div`,{className:`text-center text-sm mt-4`,children:(0,U.jsxs)(`p`,{children:[`Prefer to speak to someone first?`,` `,(0,U.jsx)(`a`,{href:`https://www.aptible.com/contact`,children:`Sc
164hedule a demo`}),` or go to `,(0,U.jsx)(P,{to:Fr(),children:`Logout`})]})})]})]})},vKe=e=>{let t=B(ns);return u(Ds({id:t.billingDetailId||t.id})),u(Sg({orgId:t.id})),u(xg()),(0,U.jsx)(E7,{...e})},D7=e=>{let{skipInternalFetch:t=!1,...n}=e;return t?(0,U.jsx)(E7,{...n}):(0,U.jsx)(vKe,{...n})},yKe=()=>{let e=B(ns);u(Ds({id:e.billingDetailId||e.id})),u(Sg({orgId:e.id})),u(xg());let t=Er([Ds({id:e.billingDetailId||e.id}),Sg({orgId:e.id}),xg()]),n=B(bg),r=B(e=>_g(e,{id:n.planId}));return t.isLoading||!t.isSuccess&&!t.isError?(0,U.jsx)(`div`,{className:`flex h-screen w-screen items-center justify-center`,children:(0,U.jsx)(xE,{})}):r.name===`starter`||r.name===`none`?(0,U.jsx)(ae,{to:Di(),replace:!0}):(0,U.jsx)(S7,{children:(0,U.jsxs)(y5,{className:`flex gap-6`,children:[(0,U.jsx)(O8,{}),(0,U.jsx)(`div`,{className:`flex-1 mx-auto max-w-[500px]`,children:(0,U.jsxs)(W,{children:[(0,U.jsx)(`div`,{className:`flex justify-center pt-[65px] pb-4`,children:(0,U.jsx)(BU,{width:160})}),(0,U.jsxs)(W,{className:`items-center`,children:[(0,U.jsxs)(`p`,{className:`text-gray-900 text-center`,children:[`You must enter a credit card to continue using Aptible. `,(0,U.jsx)(`br`,{}),`Your card will be charged at the end of your monthly billing cycle.`]}),(0,U.jsx)(`h1`,{className:`text-gray-900 text-3xl font-semibold text-center`,children:`Add Payment Information`})]}),(0,U.jsx)(D7,{skipInternalFetch:!0})]})})]})})},bKe=`ACH enrollment is unavailable for this account. Contact support for help.`,xKe=[`succeeded`,`requires_action`],SKe=`Bank verification is still processing. Wait a moment and save again.`;function CKe({billingDetailId:e,email:t,confirmedSetupIntentId:n,onConfirmedSetupIntent:r}){let i=(0,x7.useStripe)(),a=(0,x7.useElements)(),o=l(),s=N(),[c,u]=(0,V.useState)(``),[d,f]=(0,V.useState)(!1),p=I(js),m=d||p.isLoading;T(p,()=>{o(Ns({id:e})),s(Mi())}),(0,V.useEffect)(()=>{p.isError&&f(!1)},[p.isError]);async function h(){if(!i||!a)throw Error(`stripe not found`);let t=n;if(t===``){let{error:e,setupIntent:n}=await i.confirmSetup({elements:a,confirmParams:{return_url:`${window.location.origin}${Mi()}`},redirect:`if_required`});if(e)throw Error(e.message??`Unknown error`);if(!n)throw Error(`SetupIntent not found`);if(t=n.id,r(n.id),!xKe.includes(n.status))throw Error(SKe)}o(js({id:e,setupIntentId:t}))}return(0,U.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),!m&&(u(``),f(!0),h().catch(e=>{u(e.message),f(!1)}))},className:`space-y-4`,children:[c&&(0,U.jsx)(q,{variant:`error`,children:c}),(0,U.jsx)(TA,{...p}),(0,U.jsx)(x7.PaymentElement,{options:{defaultValues:{billingDetails:{email:t}}}}),(0,U.jsxs)(`div`,{className:`flex gap-2`,children:[(0,U.jsx)(K,{type:`button`,variant:`secondary`,onClick:()=>s(Mi()),children:`Cancel`}),(0,U.jsx)(K,{type:`submit`,isLoading:m,children:`Save Bank Account`})]})]})}function O7({children:e}){return(0,U.jsxs)(W,{children:[(0,U.jsx)(NU,{description:`Add a bank account for ACH payments`,children:`Add Bank Account`}),e]})}var wKe=()=>{let e=B(ns),t=e.billingDetailId||e.id,n=B(Cs),r=B(qo),i=l(),a=(0,V.useRef)(``),[o,s]=(0,V.useState)(``),[c,d]=(0,V.useState)(``);u(Ds({id:t}));let f=I(Ds({id:t})),p=I(As);T(p,()=>{let e=p.meta?.clientSecret;typeof e==`string`&&s(e)});let m=(0,V.useCallback)(()=>{a.current=t,s(``),d(``),i(xr({ids:[`${As}`,`${js}`]})),i(As({id:t}))},[t,i]),h=n.id===t&&n.invoicedExternally;return(0,V.useEffect)(()=>{h&&a.current!==t&&m()},[h,t,m]),f.isLoading||!f.isSuccess&&!f.isError?(0,U.jsx)(O7,{children:(0,U.jsx)(xE,{})}):f.isError?(0,U.jsx)(O7,{children:(0,U.jsx)(TA,{...f})}):h?p.isError?(0,U.jsxs)(O7,{children:[(0,U.jsx)(TA,{...p}),(0,U.jsx)(K,{className:`w-fit`,onClick:m,children:`Try again`})]}):(0,U.jsxs)(O7,{children:[(0,U.jsx)(q,{variant:`info`,className:`mb-4`,children:`Most bank accounts can be verified instantly. If your bank requires microdeposits, you can finish verification from the payment methods page.`}),(0,U.jsx)(Z,{children:o?(0,U.jsx)(S7,{options:{clientSecret:o,appearance:{theme:`stripe`}},children:(0,U.jsx)(CKe,{billingDetailId:t,email:r.email,confirmedSetupIntentId:c,onConfirmedSetupIntent:d})}):(0,U.jsx)(xE,{})})]}):(0,U.jsx)(O7,{children:(0,U.jsx)(q,{variant:`error`,children:bKe})})},TKe=()=>{let e=N();return(0,U.jsx)(S7,{children:(0,U.jsxs)(W,{children:[(0,U.jsx)(NU,{description:`Add a new credit card to your account`,children:`Add Credit Card`}),(0,U.jsx)(D7,{onSuccess:()=>e(Mi())})]})})},EKe=()=>{let e=B(Es),t=B(Ts),n=(0,V.useMemo)(()=>{try{return`clipboard-write ${new URL(t).origin}`}catch{return``}},[t]);
164return(0,U.jsxs)(W,{children:[(0,U.jsx)(NU,{description:`View and download your billing invoices`,children:`Invoices`}),(0,U.jsx)(`div`,{className:`w-full`,children:e&&t?(0,U.jsxs)(`div`,{children:[(0,U.jsx)(q,{variant:`info`,className:`mb-4`,children:`For invoices before November 24th 2024, please contact [email protected]`}),(0,U.jsx)(`iframe`,{src:t,className:`w-full border-0 rounded-lg shadow-sm`,style:{minHeight:`calc(100vh - 200px)`},title:`Invoice Portal`,loading:`lazy`,allow:n||void 0,sandbox:`allow-scripts allow-same-origin allow-forms allow-popups allow-downloads`})]}):(0,U.jsx)(`div`,{className:`flex items-center justify-center py-12`,children:(0,U.jsx)(`div`,{className:`text-gray-600`,children:e?`External invoice portal URL is not configured for this organization.`:`You have no invoices.`})})})]})},DKe=`ACH payment methods require Orb invoicing.`,OKe=864e5;function kKe(e){let t=Date.now(),n=new Date(e.range_begin).getTime(),r=new Date(e.range_end).getTime();return t>=n&&t<=r}function AKe(e){let t={year:`numeric`,month:`long`,day:`numeric`};return`Free Trial: ${new Date(e.range_begin).toLocaleDateString(`en-US`,t)} - ${new Date(e.range_end).toLocaleDateString(`en-US`,t)}`}function jKe(e){let t=new Date(e.range_end).getTime();return Math.max(0,Math.floor((t-Date.now())/OKe))}function MKe(e){let t=e.match(/\/stripe_sources\/([^/]+)$/);if(t?.[1])return{kind:`stripe`,source:{id:t[1]}};let n=e.match(/\/external_payment_sources\/([^/]+)$/);if(n?.[1])return{kind:`external`,source:{id:n[1]}};let r=e.match(/\/trials\/([^/]+)$/);return r?.[1]?{kind:`trial`,source:{id:r[1]}}:null}function NKe({source:e,isDefault:t,onVerify:n,onRefreshModern:r,invoicedExternally:i,disabled:a,onMakeDefault:o,onDeactivate:s,isMakingDefault:c,isDeactivating:l,isRefreshing:u,actionInFlight:d}){if(e.kind===`trial`){let n=!a&&!d&&!t;return(0,U.jsx)(Z,{size:`md`,className:`mb-4`,children:(0,U.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,U.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,U.jsx)(`h3`,{className:`font-semibold text-black`,children:AKe(e.source)}),t?(0,U.jsx)(H2,{variant:`default`,"data-testid":`default-payment-method`,children:`Default`}):null]}),(0,U.jsx)(`ul`,{className:`text-sm text-black-500 space-y-1`,children:(0,U.jsxs)(`li`,{children:[jKe(e.source),` days remaining`]})}),(0,U.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:(0,U.jsx)(K,{variant:`secondary`,size:`xs`,onClick:()=>o(e),disabled:!n,isLoading:c,"data-testid":`make-default-payment-method-${e.source.id}`,children:`Make Default`})})]})},e.source.id)}if(e.kind===`external`){let n=!a&&!d&&!t;return(0,U.jsx)(Z,{size:`md`,className:`mb-4`,children:(0,U.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,U.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,U.jsx)(`h3`,{className:`font-semibold text-black`,children:e.source.description}),t?(0,U.jsx)(H2,{variant:`default`,"data-testid":`default-payment-method`,children:`Default`}):null]}),(0,U.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:(0,U.jsx)(K,{variant:`secondary`,size:`xs`,onClick:()=>o(e),disabled:!n,isLoading:c,"data-testid":`make-default-payment-method-${e.source.id}`,children:`Make Default`})})]})},e.source.id)}let f=e.source,p=vs(f),m=gs(f),h=_s(f),g=ys(f),_=!a&&!d&&!t&&(!p||g&&i),v=!a&&!d&&!t&&f.stripeType!==`external`,y=p&&g&&!i,b=m&&!g&&!a&&!d,x=h&&!g&&!a,S=f.stripeMetadata?.hostedVerificationUrl,C=f.stripeMetadata?.setupIntentId,w=x&&!!C,T=S?`Finish verifying with your bank using Verify, then wait a minute and use Refresh status to update this payment method.`:`After your bank finishes verification, use Refresh status to update this payment method.`,E=(0,U.jsx)(K,{variant:`secondary`,size:`xs`,onClick:()=>o(e),disabled:!_,isLoading:c,"data-testid":`make-default-payment-method-${e.source.id}`,children:`Make Default`});return(0,U.jsx)(Z,{size:`md`,className:`mb-4`,children:(0,U.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,U.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,U.jsx)(`h3`,{className:`font-semibold text-black`,children:f.description}),t&&(0,U.jsx)(H2,{variant:`default`,"data-testid":`default-payment-method`,children:`Default`}),p&&(0,U.jsx)(H2,{variant:g?`success`:`error`,"data-testid":g?`bank-account-verified`:`bank-account-not-verified`,children:g?`Verified`:`Not verified`})]}),(0,U.jsxs)(`ul`,{className:`text-sm text-black-500 space-y-1`,children:[f.stripeMetadata?.name?(0,U.jsxs)(`li`,{"data-testid":`stripe-source-name`,children:[(0,U.jsx)(`span`,{className:`font-medium`,children:`Cardholder Name:`}),` `,f.stripeMetadata.name]}):null,f.stripeMetadata?.bankName?(0,U.jsxs)(`li`,{"data-testid":`stripe-source-bank-name`,children:[(0,U.jsx)(`span`,{className:`font-medium`,children:`Bank Name:`}),` `,f.stripeMetadata.bankName]}):null,f.stripeMetadata?.last4?(0,U.jsxs)(`li`,{"data-testid":`stripe-source-last4`,children:[(0,U.jsx)(`span`,{className:`font-medium`,children:`Last 4 Digits:`}),` `,f.stripeMetadata.last4]}):null,f.stripeMetadata?.expMonth!=null&&f.stripeMetadata?.expYear!=null?(0,U.jsxs)(`li`,{"data-testid":`stripe-source-exp-${f.stripeMetadata.expMonth}-${f.stripeMetadata.expYear}`,children:[(0,U.jsx)(`span`,{className:`font-medium`,children:`Expiration:`}),` `,f.stripeMetadata.expMonth,`/`,f.stripeMetadata.expYear]}):null,f.stripeMetadata?.status?(0,U.jsxs)(`li`,{"data-testid":`stripe-source-status`,children:[(0,U.jsx)(`span`,{className:`font-medium`,children:`Status:`}),` `,f.stripeMetadata.status]}):null,x?(0,U.jsx)(`li`,{"data-testid":`modern-ach-pending-help`,children:T}):null]}),(0,U.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[b&&(0,U.jsx)(K,{variant:`secondary`,size:`xs`,onClick:()=>n(f),"data-testid":`verify-bank-account-${e.source.id}`,children:`Verify`}),x&&S?(0,U.jsx)(lA,{href:S,variant:`secondary`,size:`xs`,"data-testid":`verify-bank-account-${e.source.id}`,children:`Verify`}):null,w?(0,U.jsx)(K,{variant:`secondary`,size:`xs`,onClick:()=>r(f),disabled:d,isLoading:u,"data-testid":`refresh-bank-account-${e.source.id}`,children:`Refresh status`}):null,y?(0,U.jsx)(aA,{text:DKe,children:E}):E,(0,U.jsx)(K,{variant:`secondary`,size:`xs`,onClick:()=>s(f),disabled:!v,isLoading:l,"data-testid":`deactivate-payment-method-${e.source.id}`,children:`Delete`})]})]})},e.source.id)}function PKe({source:e,isOpen:t,onClose:n,onSuccess:r}){let i=l(),[a,o]=(0,V.useState)(``),[s,c]=(0,V.useState)(``),[u,d]=(0,V.useState)(``),f=I(zs);return(0,V.useEffect)(()=>{t&&(i(xr({ids:[`${zs}`]})),o(``),c(``),d(``))},[i,t]),T(f,()=>{r(),n(),o(``),c(``),d(``)}),e?(0,U.jsx)(h3,{children:(0,U.jsxs)(kU,{isOpen:t,className:`min-w-[400px]`,children:[(0,U.jsx)(AU,{title:`Verify bank account`,description:e.description,onClose:n}),(0,U.jsxs)(`form`,{onSubmit:t=>{if(t.preventDefault(),d(``),!a.trim()||!s.trim()){d(`Both deposit amounts are required`);return}let n=Number.parseFloat(a),r=Number.parseFloat(s);if(Number.isNaN(n)||Number.isNaN(r)||n<=0||r<=0){d(`Please enter valid positive deposit amounts`);return}e&&i(zs({stripeSourceId:e.id,amountDecimal1:n.toFixed(2),amountDecimal2:r.toFixed(2)}))},children:[(0,U.jsxs)(MU,{children:[u&&(0,U.jsx)(q,{variant:`error`,className:`mb-4`,children:u}),(0,U.jsx)(TA,{...f}),(0,U.jsx)(q,{variant:`info`,className:`mb-4 text-sm`,children:(0,U.jsxs)(`div`,{className:`space-y-2`,children:[(0,U.jsx)(`p`,{children:`New bank accounts added for ACH payments need to be verified. Verification is done via two small deposits into your bank account. These deposits will take 1-2 business days to appear. The statement description for these deposits will be AMNTS: and then the values of the two microdeposits that were sent.`}),(0,U.jsx)(`p`,{children:`Wait for the deposits to appear on your statement. Then, enter the two amounts here to complete verification. The ordering of the amounts does not matter.`})]})}),(0,U.jsx)(J,{label:`First deposit amount in dollars (e.g. 0.45)`,htmlFor:`amount1`,children:(0,U.jsx)(X,{id:`amount1`,type:`number`,step:`0.01`,min:`0.01`,inputMode:`decimal`,value:a,onChange:e=>o(e.target.value),placeholder:`0.00`})}),(0,U.jsx)(J,{label:`Second deposit amount in dollars (e.g. 0.32)`,htmlFor:`amount2`,children:(0,U.jsx)(X,{id:`amount2`,type:`number`,step:`0.01`,min:`0.01`,inputMode:`decimal`,value:s,onChange:e=>c(e.target.value),placeholder:`0.00`})})]}),(0,U.jsx)(jU,{actions:[(0,U.jsx)(K,{type:`button`,variant:`secondary`,onClick:n,children:`Cancel`},`cancel`),(0,U.jsx)(K,{type:`submit`,isLoading:f.isLoading,children:`Verify & Exit`},`verify`)]})]})]})}):null}var FKe=()=>{let e=B(ns),t=B(an),n=B(Cs),r=e.billingDetailId||e.id,i=l(),[a,o]=Ee();u(Ds({id:r}));let s=c(Ns({id:r})),d=c(Ps({id:r})),f=c(Vs({id:r})),[p,m]=(0,V.useState)(null),[h,g]=(0,V.useState)(null),[_,v]=(0,V.useState)([]),[y,b]=(0,V.useState)(null),x=I(Bs),S=I(Rs),C=I(js),w=x.isLoading||S.isLoading||C.isLoading;T(x,()=>{g(null),s.trigger(),d.trigger(),f.trigger()}),T(S,()=>{b(null),g(null),s.trigger(),d.trigger(),f.trigger()}),T(C,()=>{g(null),s.trigger()}),(0,V.useEffect)(()=>{S.isError&&y&&(v(e=>e.filter(e=>e!==y)),b(null),g(null))},[S.isError,y]);let E=e=>{if(w)return;let n=e.kind===`stripe`?`${t.billingUrl}/stripe_sources/${e.source.id}`:e.kind===`external`?`${t.billingUrl}/external_payment_sources/${e.source.id}`:`${t.billingUrl}/trials/${e.source.id}`;g({kind:`make-default`,sourceId:e.source.id}),i(Bs({billingDetailId:r,paymentMethodUrl:n}))},D=e=>{w||window.confirm(`Delete payment method "${e.description}
164"? This cannot be undone.`)&&(b(e.id),v(t=>[...t,e.id]),g({kind:`deactivate`,sourceId:e.id}),i(Rs({id:e.id})))},O=e=>{let t=e.stripeMetadata?.setupIntentId;t&&!w&&(g({kind:`refresh`,sourceId:e.id}),i(js({id:r,setupIntentId:t})))},k=(0,V.useMemo)(()=>(s.data?._embedded?.stripe_sources||[]).filter(e=>e.deactivated_at===null).map(hs),[s.data]),A=(0,V.useMemo)(()=>k.filter(e=>!_.includes(e.id)),[_,k]),j=(d.data?._embedded?.external_payment_sources||[]).map(bs),M=(f.data?._embedded?.trials||[]).filter(kKe),ee=[...A.map(e=>({kind:`stripe`,source:e})),...j.map(e=>({kind:`external`,source:e})),...M.map(e=>({kind:`trial`,source:e}))],te=MKe(n.paymentMethodUrl),ne=!s.data&&!s.lastSuccess||!d.data&&!d.lastSuccess||!f.data&&!f.lastSuccess;return(0,V.useEffect)(()=>{let e=a.get(`setup_intent`)||``;e===``?i(xr({ids:[`${js}`]})):(i(js({id:r,setupIntentId:e})),o({},{replace:!0})),s.trigger(),d.trigger(),f.trigger()},[r]),(0,V.useEffect)(()=>{v(e=>{let t=e.filter(e=>k.some(t=>t.id===e));return t.length===e.length?e:t})},[k]),ne?(0,U.jsx)(`div`,{className:`flex items-center justify-center py-12`,children:(0,U.jsx)(xE,{})}):(0,U.jsxs)(W,{children:[(0,U.jsx)(NU,{description:`Manage your payment methods`,children:`Payment Methods`}),(0,U.jsx)(TA,{...x}),(0,U.jsx)(TA,{...S}),(0,U.jsx)(TA,{...C}),ee.length>0?(0,U.jsx)(`div`,{className:`space-y-2`,children:ee.map(e=>(0,U.jsx)(NKe,{source:e,isDefault:e.source.id===te?.source.id&&e.kind===te.kind,onVerify:m,onRefreshModern:O,invoicedExternally:n.invoicedExternally,disabled:ne,onMakeDefault:E,onDeactivate:D,isMakingDefault:x.isLoading&&h?.kind===`make-default`&&h.sourceId===e.source.id,isDeactivating:S.isLoading&&h?.kind===`deactivate`&&h.sourceId===e.source.id,isRefreshing:C.isLoading&&h?.kind===`refresh`&&h.sourceId===e.source.id,actionInFlight:w},`${e.kind}-${e.source.id}`))}):(0,U.jsx)(`p`,{className:`text-black-500 py-4`,children:`You have no configured payment methods.`}),(0,U.jsxs)(`div`,{className:`flex flex-wrap gap-2 mt-4`,children:[(0,U.jsx)(dA,{to:Dee(),variant:`primary`,children:`Add Credit Card`}),n.invoicedExternally?(0,U.jsx)(dA,{to:kee(),variant:`secondary`,children:`Add Bank Account`}):null]}),(0,U.jsx)(PKe,{source:p,isOpen:p!==null,onClose:()=>m(null),onSuccess:()=>{s.trigger()}})]})},IKe=()=>{let e=B(ns),t=e.billingDetailId||e.id,n=l(),[r,i]=(0,V.useState)(``),[a,o]=(0,V.useState)(``),[s,d]=(0,V.useState)(``),[f,p]=(0,V.useState)(null),[m,h]=(0,V.useState)([]),[g,_]=(0,V.useState)([]),[v,y]=(0,V.useState)(null);u(Ds({id:t}));let b=c(Fs({id:t})),x=I(Is),S=I(Ls);T(x,()=>{f&&(h(e=>[...e,{id:`optimistic-${Date.now()}`,name:f.name,email:f.email}]),p(null)),i(``),o(``),b.trigger()}),T(S,()=>{y(null),b.trigger()}),(0,V.useEffect)(()=>{S.isError&&v&&(_(e=>e.filter(e=>e!==v)),y(null))},[S.isError,v]);let C=(0,V.useMemo)(()=>(b.data?._embedded?.billing_contacts||[]).map(xs),[b.data]);(0,V.useEffect)(()=>{C.length!==0&&h(e=>{let t=e.filter(e=>!C.some(t=>t.name.toLowerCase()===e.name.toLowerCase()&&t.email.toLowerCase()===e.email.toLowerCase()));return t.length===e.length?e:t})},[C]);let w=(0,V.useMemo)(()=>{let e=[...C,...m],t=new Set;return e.filter(e=>{let n=`${e.email.toLowerCase()}::${e.name.toLowerCase()}`;return!t.has(n)&&(t.add(n),!0)}).filter(e=>!g.includes(e.id))},[C,m,g]);(0,V.useEffect)(()=>{_(e=>{let t=e.filter(e=>C.some(t=>t.id===e));return t.length===e.length?e:t})},[C]);let E=!b.data&&!b.lastSuccess,D=e=>{if(e.preventDefault(),d(``),!r.trim()||!a.trim()){d(`Please fill in all required fields.`);return}let i={name:r.trim(),email:a.trim()};p(i),n(Is({id:t,name:i.name,email:i.email}))},O=e=>{S.isLoading||e.id.startsWith(`optimistic-`)||window.confirm(`Delete billing contact "${e.name}"? This cannot be undone.`)&&(y(e.id),_(t=>[...t,e.id]),n(Ls({id:e.id})))};return(0,U.jsxs)(W,{children:[(0,U.jsx)(NU,{description:`Manage who receives billing invoices and notices`,children:`Billing Contacts`}),(0,U.jsx)(TA,{...x}),(0,U.jsx)(TA,{...S}),s?(0,U.jsx)(q,{variant:`error`,children:s}):null,(0,U.jsx)(Z,{children:E?(0,U.jsx)(`div`,{className:`flex items-center justify-center py-8`,children:(0,U.jsx)(xE,{})}):w.length===0?(0,U.jsx)(`p`,{className:`text-black-500 py-2`,children:`You have no Billing Contacts.`}):(0,U.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,U.jsx)(`thead`,{children:(0,U.jsxs)(`tr`,{className:`border-b border-black-100`,children:[(0,U.jsx)(`th`,{className:`text-left py-2`,children:`N
164ame`}),(0,U.jsx)(`th`,{className:`text-left py-2`,children:`Email Address`}),(0,U.jsx)(`th`,{className:`text-left py-2`,children:`Actions`})]})}),(0,U.jsx)(`tbody`,{children:w.map(e=>(0,U.jsxs)(`tr`,{className:`border-b border-black-100`,children:[(0,U.jsx)(`td`,{className:`py-2`,children:e.name}),(0,U.jsx)(`td`,{className:`py-2`,children:e.email}),(0,U.jsx)(`td`,{className:`py-2`,children:(0,U.jsx)(K,{variant:`secondary`,size:`xs`,onClick:()=>O(e),isLoading:S.isLoading&&v===e.id,disabled:e.id.startsWith(`optimistic-`)||S.isLoading,children:`Delete`})})]},e.id))})]})}),(0,U.jsx)(Z,{children:(0,U.jsxs)(`form`,{className:`space-y-4`,onSubmit:D,children:[(0,U.jsx)(`h3`,{className:`font-semibold text-black`,children:`Add Billing Contact`}),(0,U.jsx)(J,{label:`Name`,htmlFor:`billing-contact-name`,children:(0,U.jsx)(X,{id:`billing-contact-name`,value:r,onChange:e=>i(e.currentTarget.value),required:!0})}),(0,U.jsx)(J,{label:`Email Address`,htmlFor:`billing-contact-email`,children:(0,U.jsx)(X,{id:`billing-contact-email`,type:`email`,value:a,onChange:e=>o(e.currentTarget.value),required:!0})}),(0,U.jsx)(K,{type:`submit`,isLoading:x.isLoading,children:`Save`})]})})]})};function k7(e={}){return{streetOne:e.street_one||``,streetTwo:e.street_two||``,city:e.city||``,state:e.state||`NA`,postCode:e.post_code||``,country:e.country||`US`}}var LKe=()=>{let e=B(ns),t=B(Cs),n=e.billingDetailId||e.id,r=l(),i=I(Us),[a,o]=(0,V.useState)(``),[s,c]=(0,V.useState)(k7());u(Ds({id:n}));let d=t.organizationDetailsJson?.billing_address;(0,V.useEffect)(()=>{c(k7(d))},[d?.street_one,d?.street_two,d?.city,d?.state,d?.post_code,d?.country]),T(i,()=>{o(``)});let f=e=>{e.preventDefault(),o(``);let t=Ss(s);if(t){o(t);return}r(Us({id:n,address1:s.streetOne.trim(),address2:s.streetTwo.trim(),city:s.city.trim(),state:s.state,zipcode:s.postCode.trim(),country:s.country}))};return(0,U.jsxs)(W,{children:[(0,U.jsx)(NU,{description:`Update your billing address for invoicing and tax`,children:`Billing Address`}),a?(0,U.jsx)(q,{variant:`error`,children:a}):null,(0,U.jsx)(TA,{...i}),(0,U.jsx)(Z,{size:`md`,children:(0,U.jsxs)(`form`,{className:`space-y-4`,onSubmit:f,children:[(0,U.jsx)(J,{label:`Street Address`,htmlFor:`street-one`,children:(0,U.jsx)(X,{id:`street-one`,value:s.streetOne,onChange:e=>{let t=e.currentTarget.value;c(e=>({...e,streetOne:t}))},required:!0})}),(0,U.jsx)(J,{label:`Street Address Line 2`,htmlFor:`street-two`,children:(0,U.jsx)(X,{id:`street-two`,value:s.streetTwo,onChange:e=>{let t=e.currentTarget.value;c(e=>({...e,streetTwo:t}))}})}),(0,U.jsx)(J,{label:`City`,htmlFor:`city`,children:(0,U.jsx)(X,{id:`city`,value:s.city,onChange:e=>{let t=e.currentTarget.value;c(e=>({...e,city:t}))},required:!0})}),(0,U.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 gap-4`,children:[(0,U.jsx)(J,{label:`State/Province`,htmlFor:`state`,children:(0,U.jsx)(XA,{id:`state`,ariaLabel:`State/Province`,value:s.state,options:_8,onSelect:e=>c(t=>({...t,state:e.value}))})}),(0,U.jsx)(J,{label:`Postal/Zip Code`,htmlFor:`post-code`,children:(0,U.jsx)(X,{id:`post-code`,value:s.postCode,onChange:e=>{let t=e.currentTarget.value;c(e=>({...e,postCode:t}))},required:!0})})]}),(0,U.jsx)(J,{label:`Country`,htmlFor:`country`,children:(0,U.jsx)(XA,{id:`country`,ariaLabel:`Country`,value:s.country,options:v8,onSelect:e=>c(t=>({...t,country:e.value}))})}),(0,U.jsx)(K,{type:`submit`,isLoading:i.isLoading,children:`Save`}),(0,U.jsx)(`p`,{className:`text-sm text-black-500`,children:`The information you provide here may affect your sales tax rate in accordance with recent developments in state sales tax laws.`})]})})]})},RKe=3e3,zKe=`baa-external-signer`,BKe=`baa-self-signer`;function A7(e){return`${zKe}:${e}`}function j7(e,t){return`${BKe}:${e}:${t}`}function VKe(e){return e===`SIGNED`||e===`CANCELLED`}function HKe(e){return e===`NONE`||VKe(e)}function UKe(e){let t=e.nowMs??Date.now(),n=e.maxPollMs??6e5;return e.status!==`OUT_FOR_SIGNATURE`||!e.isAwaitingSignedStatus&&e.signerFlow!==`external`&&e.signerFlow!==`self`?!1:e.pollStartedAtMs==null||t-e.pollStartedAtMs<n}function WKe(e){return e.status===`OUT_FOR_SIGNATURE`&&!!e.signingUrl&&e.signerFlow===`self`}function GKe(e,t,n){try{let r=(n?.storage===void 0?globalThis.sessionStorage:n.storage)?.getItem(j7(e,t));if(!r)return null;let i=JSON.parse(r);if(!i||typeof i!=`object`)return null;let a=i,o=a.userId,s=a.createdAtMs,c=a.popupBlocked,l=a.agreementId;if(typeof o!=`string`||o!==t||typeof s!=`number`||!Number.isFinite(s)||typeof c!=`boolean`)return null;let u=n?.nowMs??Date.now(),d=n?.maxAgeMs??72e5;return u-s>d?null:{userId:o,createdAtMs:s,popupBlocked:c,agreementId:typeof l==`string`?l:void 0}}catch{return null}}function KKe(e,t,n,r){try{let i=r===void 0?globalThis.sessionStorage:r,a={userId:t,createdAtMs:n.createdAtMs??Date.now(),popupBlocked:n.popupBlocked,...n.agreementId?{agreementId:n.agreementId}:{}}
164;i?.setItem(j7(e,t),JSON.stringify(a))}catch{}}function M7(e,t,n){try{(n===void 0?globalThis.sessionStorage:n)?.removeItem(j7(e,t))}catch{}}function qKe(e,t){try{let n=(t===void 0?globalThis.sessionStorage:t)?.getItem(A7(e));if(!n)return null;let r=JSON.parse(n);if(!r||typeof r!=`object`)return null;let i=r.email;return typeof i==`string`&&i.trim()?i.trim():null}catch{return null}}function JKe(e,t,n){try{(n===void 0?globalThis.sessionStorage:n)?.setItem(A7(e),JSON.stringify({email:t.trim()}))}catch{}}function N7(e,t){try{(t===void 0?globalThis.sessionStorage:t)?.removeItem(A7(e))}catch{}}function P7(e,t){let n=kA(e.meta?.error),r=kA(e.meta?.json?.error);return e.message||n||r||e.meta?.message||t}function YKe(e){let t=P7(e,`Failed to create agreement`);return/access denied|forbidden/i.test(t)?`Only Account Owners can sign Business Associate Agreements`:t}var F7=`Signer email addresses must match.`,I7=`The BAA has been sent via email for signature.`,XKe=()=>{let e=l(),t=B(an),n=B(An),r=B(ns),i=B(qo),[a,o]=(0,V.useState)(``),[s,c]=(0,V.useState)(``),[u,d]=(0,V.useState)(``),[f,p]=(0,V.useState)(``),[m,h]=(0,V.useState)(!1),[g,_]=(0,V.useState)(!1),[v,y]=(0,V.useState)(null),[b,x]=(0,V.useState)(!1),[S,C]=(0,V.useState)(null),[w,T]=(0,V.useState)(null),[E,D]=(0,V.useState)(null),[O,k]=(0,V.useState)(null),[A,j]=(0,V.useState)(null),[M,ee]=(0,V.useState)(!1),[te,ne]=(0,V.useState)(!1),re=(0,V.useRef)(null),ie=(0,V.useRef)(null),ae=(0,V.useRef)(!1),oe=r.id,se=`${i.id}`,N=(0,V.useRef)(se),ce=B(e=>__(e,{orgId:oe})),le=(0,V.useMemo)(()=>PA({orgId:oe}),[oe]),[ue,de]=(0,V.useState)(()=>FA({orgId:oe,email:``,firstName:``,lastName:``})),fe=(0,V.useMemo)(()=>_fe({orgId:oe}),[oe]),pe=ue.payload.key;(0,V.useEffect)(()=>{de(FA({orgId:oe,email:``,firstName:``,lastName:``})),o(``),c(``),d(``),p(``),y(null),h(!1),_(!1),x(!1),C(null),T(null),D(null),k(null),j(null),ee(!1),ne(!1),re.current=null,ie.current=null,ae.current=!1},[oe]);let me=I(le),he=I(ue),ge=I(fe),_e=B(e=>L.cache.selectById(e,{id:le.payload.key})),ve=B(e=>L.cache.selectById(e,{id:pe})),ye=B(e=>L.cache.selectById(e,{id:fe.payload.key})),be=_e?.status===`NONE`,xe=(0,V.useMemo)(()=>{let e=S!=null||w!=null||m,t=ye?.status===`SIGNED`||ye?.status===`CANCELLED`,n=_e?.status===`SIGNED`||_e?.status===`CANCELLED`;if(t)return ye;if(n&&!e)return _e;if(S===`self`||w===`self`){if(m){if(n&&_e)return _e;if(ye&&ye.status!==`NONE`)return ye;if(_e&&_e.status!==`NONE`)return _e}else{if(ve&&ve.status===`OUT_FOR_SIGNATURE`)return ve;if(ye&&ye.status===`OUT_FOR_SIGNATURE`)return ye;if(_e&&_e.status===`OUT_FOR_SIGNATURE`)return _e}}return m&&_e&&_e.status!==`NONE`?_e:ve&&ve.status!==`NONE`?ve:ye&&ye.status!==`NONE`?ye:_e&&_e.status!==`NONE`?_e:_e??ye??ve??null},[_e,ye,ve,S,w,m]);(0,V.useEffect)(()=>{me.isError&&!be?y(P7(me,`Failed to fetch agreement status`)):(me.isSuccess||be)&&y(null)},[me.isError,me.isSuccess,me.message,me.meta,be]),(0,V.useEffect)(()=>{he.isError?(ie.current?.close(),ie.current=null,ae.current=!1,T(null),D(null),y(YKe(he))):he.isSuccess&&(w===`external`&&E?(C(`external`),k(E)):w===`self`&&(C(`self`),k(null)),T(null),D(null),y(null))},[he.isError,he.isSuccess,he.message,he.meta,w,E]),(0,V.useEffect)(()=>{ge.isError?y(P7(ge,`Failed to refresh status`)):ge.isSuccess&&y(null)},[ge.isError,ge.isSuccess,ge.message,ge.meta]);let Se=xe?.status,P=Se||`NONE`,Ce=xe?.signingUrl,we=me.isLoading||he.isLoading||ge.isLoading,Te=xe!=null||be,Ee=a.trim().toLowerCase(),F=s.trim().toLowerCase(),De=i.email.trim().toLowerCase(),Oe=Ee!==``&&Ee===De,ke=Ee!==``&&Ee===F,Ae=Ee!==``&&!Oe;(0,V.useEffect)(()=>{ke&&v===F7&&y(null)},[ke,v]);let je=()=>{if(!ce||!a||!s||!u.trim()||!f.trim())return;if(!ke){y(F7);return}if(y(null),ee(!1),j(null),ne(!1),Ae)T(`external`),D(a.trim()),ie.current=null,ae.current=!1;else{T(`self`),D(null),ae.current=!0;let e=window.open(``,`_blank`);ie.current=e,ne(!e)}let t=FA({orgId:oe,email:a,firstName:u,lastName:f});de(t),e(t)},Me=()=>{ee(!1),j(Date.now()),e(fe)},Ne=async()=>{if(n&&t.authUrl){x(!0),y(null);try{let e=t.authUrl.replace(/\/$/,``),r=xe?.downloadUrl||`${e}/organizations/${encodeURIComponent(oe)}/baa/download`,i=await fetch(r,{credentials:`include`,headers:{Authorization:`Bearer ${n}`}});if(!i.ok){let e=`Failed to download signed agreement`;try{let t=kA(await i.json());t&&(e=t)}catch{}y(e);return}let a=await i.blob(),o=window.URL.createObjectURL(a),s=document.createElement(`a`);s.style.display=`none`,s.href=o,s.download=`aptible-baa-${oe}-${Mf(new Date().toISOString())}.pdf`,document.body.appendChild(s),s.click(),window.URL.revokeObjectURL(o),s.remove()}catch(e){y(e instanceof Error?e.message:`Failed to download signed agreement`)}finally{x(!1)}}};(0,V.useEffect)(()=>{oe&&e(le)},[oe,e,le]),(0,V.useEffect)(()=>
164{if(N.current===se)return;let e=N.current;N.current=se,e&&(M7(oe,e),h(!1),C(null),T(null),D(null),k(null),ne(!1),re.current=null,ie.current=null,ae.current=!1)},[oe,se]),(0,V.useEffect)(()=>{if(!oe)return;let e=qKe(oe);e&&(C(`external`),k(e))},[oe]),(0,V.useEffect)(()=>{if(!oe||!se||!Te)return;let e=GKe(oe,se);e&&P===`OUT_FOR_SIGNATURE`&&(C(`self`),k(null),h(!1),ne(e.popupBlocked))},[oe,se,Te,P]),(0,V.useEffect)(()=>{oe&&Te&&(S===`external`&&O?JKe(oe,O):N7(oe),S===`self`&&P===`OUT_FOR_SIGNATURE`?KKe(oe,se,{popupBlocked:te,agreementId:xe?.agreementId}):(P!==`OUT_FOR_SIGNATURE`||S===`external`)&&M7(oe,se))},[oe,se,S,O,Te,P,te,xe?.agreementId]),(0,V.useEffect)(()=>{let e=e=>{if(e.origin!==window.location.origin||e.data?.source!==`adobeSign`||e.data?.event!==`completed`)return;let t=e.data?.agreementStatus;(t==null||t===``||t===`completed`)&&(C(`self`),k(null),h(!0))};return window.addEventListener(`message`,e),()=>window.removeEventListener(`message`,e)},[]),(0,V.useEffect)(()=>{let e=Se===`NONE`&&me.isSuccess,t=P!==`NONE`&&HKe(P);(e||t)&&(h(!1),C(null),k(null),_(!1),j(null),ee(!1),ne(!1),re.current=null,ie.current=null,ae.current=!1,oe&&(N7(oe),M7(oe,se)))},[P,Se,oe,me.isSuccess,se]),(0,V.useEffect)(()=>{if(S!==`self`||P!==`OUT_FOR_SIGNATURE`||!Ce||re.current===Ce)return;re.current=Ce;let e=!1,t=ie.current;if(t&&!t.closed)try{t.location.href=Ce,e=!0}catch{e=!1}ie.current=null,!e&&!ae.current&&(e=!!window.open(Ce,`_blank`,`noopener,noreferrer`)),ne(!e),ae.current=!1},[S,P,Ce]);let Pe=!M&&UKe({status:P,signerFlow:S,isAwaitingSignedStatus:m,pollStartedAtMs:A});(0,V.useEffect)(()=>{Pe&&A==null&&(j(Date.now()),ee(!1))},[Pe,A]),(0,V.useEffect)(()=>{if(!Pe||A==null)return;e(le);let t=window.setInterval(()=>{if(Date.now()-A>=6e5){ee(!0),window.clearInterval(t);return}e(le)},RKe);return()=>window.clearInterval(t)},[Pe,A,e,le]),(0,V.useEffect)(()=>{M&&j(null)},[M]);let Fe=Te&&(P===`NONE`||(P===`SIGNED`||P===`CANCELLED`)&&g),Ie=WKe({status:P,signingUrl:Ce,signerFlow:S}),Le=P===`OUT_FOR_SIGNATURE`&&S===`external`&&!!O&&!m,Re=m&&S!==`self`&&P!==`SIGNED`&&P!==`CANCELLED`,ze=P===`OUT_FOR_SIGNATURE`&&!Ie&&!Le&&!Re&&w!==`self`,Be=Te&&(P===`SIGNED`||P===`CANCELLED`);return(0,U.jsxs)(W,{children:[(0,U.jsxs)(`div`,{className:`flex justify-between`,children:[(0,U.jsx)(NU,{description:`Terms, BAAs, and compliance documents for your organization.`,children:`Legal & Compliance`}),Be&&!g?(0,U.jsx)(FU,{children:(0,U.jsx)(K,{variant:`white`,size:`sm`,onClick:()=>_(!0),children:`Start New BAA`})}):null]}),v?(0,U.jsx)(q,{variant:`error`,className:`w-full`,children:v}):null,!Te&&me.isLoading?(0,U.jsx)(`div`,{className:`w-full py-8`,"aria-live":`polite`,children:(0,U.jsx)(SE,{variant:`lg`,className:`text-gray-500`})}):null,Ie?(0,U.jsxs)(`div`,{className:`flex w-full flex-col gap-3`,children:[(0,U.jsx)(q,{variant:`info`,className:`w-full`,children:I7}),(0,U.jsx)(`p`,{className:G.type[`small lighter`],children:`Complete your signature in the Adobe Sign tab, then return here while we refresh the status automatically.`}),te?(0,U.jsx)(q,{variant:`warning`,className:`w-full`,children:`Your browser blocked opening Adobe Sign in a new tab. Use the link below to continue signing.`}):null,(0,U.jsx)(`a`,{href:Ce,target:`_blank`,rel:`noreferrer`,className:`text-indigo`,children:`Open signing page`})]}):null,Le?(0,U.jsx)(`div`,{className:`flex w-full flex-col gap-3`,children:(0,U.jsx)(q,{variant:`info`,className:`w-full`,children:I7})}):null,ze?(0,U.jsx)(`div`,{className:`flex w-full flex-col gap-3`,children:(0,U.jsx)(q,{variant:`info`,className:`w-full`,children:I7})}):null,Re?(0,U.jsxs)(`div`,{className:`flex w-full max-w-2xl flex-col items-start gap-3 rounded-lg border border-black-100 bg-white p-6 shadow-sm`,"aria-live":`polite`,children:[(0,U.jsx)(SE,{variant:`lg`,className:`text-gray-500`}),(0,U.jsx)(`p`,{className:`${G.type[`small semibold darker`]}`,children:`Processing your signatureâ¦`}),(0,U.jsx)(`p`,{className:`${G.type[`small lighter`]}`,children:`This usually takes a few seconds. You can leave this page openâweâll refresh automatically.`}),(0,U.jsx)(K,{variant:`white`,size:`sm`,onClick:Me,isLoading:we,children:`Refresh status`})]}):null,Be?(0,U.jsx)(`div`,{className:`w-full`,children:P===`SIGNED`?(0,U.jsxs)(Z,{size:`md`,className:`max-w-3xl`,children:[(0,U.jsx)(`h2`,{className:`text-xs font-semibold text-gray-500 uppercase tracking-wide`,children:`Agreements`}),(0,U.jsx)(`div`,{className:`mt-4 border-t border-black-100 pt-4`,children:(0,U.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-4`,children:[(0,U.jsxs)(`div`,{className:`min-w-0 flex-1 pr-2`,children:[(0,U.jsx)(`div`,{className:G.type[`small semibold darker`],children:`Business Associate Agreement`}),(0,U.jsx)(`p`,{className:`${G.type[`small lighter`]} mt-1`,children:xe?.signedAt?`Signed on ${Af(xe.signedAt,`local`)}`:xe?.updatedAt?`Signed on ${Af(xe.updatedAt,`local`)}`:`Signed and on file.`})]}),(0,U.jsxs)(`div`,{className:`flex shrink-0 items-center gap-3`,"aria-label":`Agreement signed`,children:[(0,U.jsx)(UE,{variant:`sm`,color:`#00633F`,"aria-hidden":!0}),(0,U.jsxs)(K,{variant:`white`,size:`sm`,onClick:()=>void Ne(),isLoading:b,disabled:!n,children:[(0,U.jsx)(aD,{className:`mr-1.5`,variant:`sm`}),`Download`]})]})]})})]}):(0,U.jsx)(q,{variant:`warning`,className:`w-full`,children:`BAA was cancelled or expired. You can request a new BAA.`})}):null,Fe?(0,U.jsx)(Z,{children:(0,U.jsx)(W,{children:(0,U.jsx)(`form`,{onSubmit:e=>{e.preventDefault(),je()},children:(0,U.jsxs)(W,{children:[(0,U.jsxs)(`div`,{className:`space-y-2`,children:[(0,U.jsx)(`h2`,{className:G.type.h2,children:`Business Associate Agreement`}),(0,U.jsxs)(`p`,{className:G.type[`small lighter`],children:[`A`,` `,(0,U.jsx)(CA,{href:`https://www.aptible.com/hipaa/baa`,children:`Business Associate Agreement (BAA)`}),` `,`is a required legal contract under HIPAA between a covered entity or business associate and any vendor that creates, receives, transmits, or maintains protected health information on their behalf. An Account Owner can kickoff the signing process for the BAA in-app by submitting the form below. Aptible will send the agreement to the signer via email.`]})]}),ce?null:(0,U.jsx)(q,{variant:`warning`,className:`w-full`,children:`Only Account Owners can sign Business Associate Agreements.`}),(0,U.jsx)(J,{label:`First Name`,htmlFor:`signer-first-name`,children:(0,U.jsx)(X,{id:`signer-first-name`,name:`signer-first-name`,value:u,onChange:e=>d(e.currentTarget.value),disabled:!ce,autoComplete:`given-name`})}),(0,U.jsx)(J,{label:`Last Name`,htmlFor:`signer-last-name`,children:(0,U.jsx)(X,{id:`signer-last-name`,name:`signer-last-name`,value:f,onChange:e=>p(e.currentTarget.value),disabled:!ce,autoComplete:`family-name`})}),(0,U.jsx)(J,{label:`Signer Email`,htmlFor:`signer-email`,children:(0,U.jsx)(X,{id:`signer-email`,name:`signer-email`,type:`email`,value:a,onChange:e=>o(e.currentTarget.value),disabled:!ce,autoComplete:`email`})}),(0,U.jsx)(J,{label:`Confirm Signer Email`,htmlFor:`signer-email-confirm`,children:(0,U.jsx)(X,{id:`signer-email-confirm`,name:`signer-email-confirm`,type:`email`,value:s,onChange:e=>c(e.currentTarget.value),disabled:!ce,autoComplete:`email`})}),(0,U.jsx)(W,{variant:`horizontal`,size:`sm`,children:(0,U.jsx)(K,{type:`submit`,isLoading:we,disabled:!ce||!a||!s||!ke||!u.trim()||!f.trim(),children:`Review & Sign BAA`})})]})})})}):null]})},ZKe=()=>{let e=B(ns).id;u(xg()),u(Sg({orgId:e}));let t=B(bg),n=B(e=>_g(e,{id:t.planId}));return B(Vl).some(e=>Gl(e)===`dedicated`)||n.name===`production`||n.name===`enterprise`?(0,U.jsx)(XKe,{}):(0,U.jsx)(b5,{width:1200,showOrgPicker:!0,children:(0,U.jsxs)(W,{children:[(0,U.jsx)(`h1`,{className:`${G.type.h1} text-center`,children:`Legal & Compliance`}),(0,U.jsx)(W,{className:`items-center`,children:(0,U.jsx)(`div`,{className:`max-w-2xl`,children:(0,U.jsxs)(`div`,{className:`flex items-center justify-center gap-2 p-8 bg-gray-50 rounded-lg`,children:[(0,U.jsx)(hD,{variant:`sm`,className:`opacity-60`}),(0,U.jsx)(`p`,{className:`text-gray-600`,children:`Signing a Business Associate Agreement requires a Production or Enterprise plan.`})]})})})]})})},QKe=()=>{let e=N(),[t]=Ee(),[n,r]=(0,V.useState)(5),i=t.get(`agreementStatus`),a=[null,``,`completed`].includes(i),o=!a;return(0,V.useEffect)(()=>
164{if(a)try{let e={source:`adobeSign`,event:`completed`,agreementStatus:i??`completed`};window.parent?.postMessage(e,window.location.origin),window.opener?.postMessage(e,window.location.origin)}catch{}},[a,i]),(0,V.useEffect)(()=>{if(!a)return;let t=window.setInterval(()=>{r(n=>n<=1?(window.clearInterval(t),queueMicrotask(()=>e(Ii)),0):n-1)},1e3);return()=>window.clearInterval(t)},[a,e]),o?(0,U.jsxs)(`div`,{className:`flex flex-col items-center justify-center gap-4 py-8 px-4`,children:[(0,U.jsx)(q,{variant:`error`,className:`max-w-md`,children:`We could not confirm that your agreement was completed. You can return to Legal & Compliance to check the status or try again.`}),(0,U.jsx)(P,{to:Ii,className:`text-indigo underline`,children:`Return to Agreements`})]}):(0,U.jsx)(`div`,{className:`flex items-center justify-center py-8`,children:(0,U.jsxs)(Z,{className:`flex max-w-md flex-col items-center gap-4 text-center`,children:[(0,U.jsx)(UE,{variant:`lg`,color:`#00633F`,"aria-hidden":!0}),(0,U.jsx)(`p`,{className:`text-lg font-medium text-gray-900`,children:`Agreement signed`}),(0,U.jsxs)(`p`,{className:`text-gray-600`,children:[`You will be redirected to the Agreements page in `,n,` `,n===1?`second`:`seconds`,`.`]})]})})};function $Ke(e=``,t=``,n=!1){let r=t.match(/^http/)?t:`https://auth.aptible.com/organizations/${t}`;return n?{subjectToken:e,subjectTokenType:`aptible:user:email`,ssoOrganization:r}:e===``?t===``?{subjectToken:``,subjectTokenType:``}:{subjectToken:r,subjectTokenType:`aptible:organization:href`}:{subjectToken:e,subjectTokenType:`aptible:user:email`}}var eqe=()=>{let e=l(),t=N(),n=B(qo),r=B(ns),i=I(tc),a=B(Jo),o=B(Ln),s=B(An),[c,u]=(0,V.useState)(``),[d,f]=(0,V.useState)(``),[p,m]=(0,V.useState)(!1),[h,g]=(0,V.useState)(!1),_=c!==``&&d!==``,v=c===``&&d===``,y=i.isLoading||v||h&&!_||o;return(0,V.useEffect)(()=>{n.id!==``&&(a||o||t(Dr()))},[a,o,n.id]),(0,U.jsx)(r5,{children:(0,U.jsxs)(`form`,{className:`flex flex-col gap-4`,onSubmit:t=>{t.preventDefault(),!y&&e(tc({actorToken:s,scope:p?`manage`:`read`,...$Ke(c,d,h)}))},children:[(0,U.jsx)(TA,{...i}),(0,U.jsx)(J,{label:`User Email`,htmlFor:`email`,children:(0,U.jsx)(X,{type:`email`,id:`email`,name:`email`,autoComplete:`email`,className:`w-full`,onChange:e=>u(e.currentTarget.value)})}),(0,U.jsx)(J,{label:`Organization ID/HREF`,htmlFor:`org`,children:(0,U.jsx)(X,{type:`text`,id:`org`,name:`org`,className:`w-full`,onChange:e=>f(e.currentTarget.value)})}),n.superuser?(0,U.jsx)(J,{label:`Write Access`,htmlFor:`write-access`,children:(0,U.jsx)(ZH,{label:``,id:`write-access`,name:`write-access`,onChange:e=>m(e.currentTarget.checked)})}):null,(0,U.jsx)(J,{label:`Simulate SSO login for user in organization`,htmlFor:`sso`,description:`To simulate an SSO login, check here and enter both fields. This is always read only.`,children:(0,U.jsx)(ZH,{label:``,id:`sso`,name:`sso`,onChange:e=>g(e.currentTarget.checked)})}),(0,U.jsx)(K,{type:`submit`,disabled:y,children:`Impersonate`}),(0,U.jsxs)(`div`,{className:`flex gap-2 items-center`,children:[(0,U.jsx)(`div`,{className:`font-bold w-1/5`,children:`Current User`}),(0,U.jsx)(`div`,{className:`flex-1`,children:n.email}),(0,U.jsx)(`div`,{className:`text-black-500`,children:n.id})]}),(0,U.jsxs)(`div`,{className:`flex gap-2 items-center`,children:[(0,U.jsx)(`div`,{className:`font-bold w-1/5`,children:`Current Organization`}),(0,U.jsx)(`div`,{className:`flex-1`,children:r.name}),(0,U.jsx)(`div`,{className:`text-black-500`,children:r.id})]})]})})},L7={};(function e(t,n,r,i){var a=!!(t.Worker&&t.Blob&&t.Promise&&t.OffscreenCanvas&&t.OffscreenCanvasRenderingContext2D&&t.HTMLCanvasElement&&t.HTMLCanvasElement.prototype.transferControlToOffscreen&&t.URL&&t.URL.createObjectURL),o=typeof Path2D==`function`&&typeof DOMMatrix==`function`,s=(function(){if(!t.OffscreenCanvas)return!1;try{var e=new OffscreenCanvas(1,1),n=e.getContext(`2d`);n.fillRect(0,0,1,1);var r=e.transferToImageBitmap();n.createPattern(r,`no-repeat`)}catch{return!1}return!0})();function c(){}function l(e){var r=n.exports.Promise,i=r===void 0?t.Promise:r;return typeof i==`function`?new i(e):(e(c,c),null)}var u=(function(e,t){return{transform:function(n){if(e)return n;if(t.has(n))return t.get(n);var r=new OffscreenCanvas(n.width,n.height);
vendor: 8,078 bytes, lines 164-165
164return r.getContext(`2d`).drawImage(n,0,0),t.set(n,r),r},clear:function(){t.clear()}}})(s,new Map),d=function(){var e,t,n={},r=0;return typeof requestAnimationFrame==`function`&&typeof cancelAnimationFrame==`function`?(e=function(e){var t=Math.random();return n[t]=requestAnimationFrame(function i(a){r===a||r+16-1<a?(r=a,delete n[t],e()):n[t]=requestAnimationFrame(i)}),t},t=function(e){n[e]&&cancelAnimationFrame(n[e])}):(e=function(e){return setTimeout(e,16)},t=function(e){return clearTimeout(e)}),{frame:e,cancel:t}}(),f=(function(){var t,n,i={};function o(e){function t(t,n){e.postMessage({options:t||{},callback:n})}e.init=function(t){var n=t.transferControlToOffscreen();e.postMessage({canvas:n},[n])},e.fire=function(r,a,o){if(n)return t(r,null),n;var s=Math.random().toString(36).slice(2);return n=l(function(a){function c(t){t.data.callback===s&&(delete i[s],e.removeEventListener(`message`,c),n=null,u.clear(),o(),a())}e.addEventListener(`message`,c),t(r,s),i[s]=c.bind(null,{data:{callback:s}})}),n},e.reset=function(){for(var t in e.postMessage({reset:!0}),i)i[t](),delete i[t]}}return function(){if(t)return t;if(!r&&a){var n=[`var CONFETTI, SIZE = {}, module = {};`,`(`+e.toString()+`)(this, module, true, SIZE);`,`onmessage = function(msg) {`,` if (msg.data.options) {`,` CONFETTI(msg.data.options).then(function () {`,` if (msg.data.callback) {`,` postMessage({ callback: msg.data.callback });`,` }`,` });`,` } else if (msg.data.reset) {`,` CONFETTI && CONFETTI.reset();`,` } else if (msg.data.resize) {`,` SIZE.width = msg.data.resize.width;`,` SIZE.height = msg.data.resize.height;`,` } else if (msg.data.canvas) {`,` SIZE.width = msg.data.canvas.width;`,` SIZE.height = msg.data.canvas.height;`,` CONFETTI = module.exports.create(msg.data.canvas);`,` }`,`}`].join(` 165`);try{t=new Worker(URL.createObjectURL(new Blob([n])))}catch(e){return typeof console<`u`&&typeof console.warn==`function`&&console.warn(`ð Could not load worker`,e),null}o(t)}return t}})(),p={particleCount:50,angle:90,spread:45,startVelocity:45,decay:.9,gravity:1,drift:0,ticks:200,x:.5,y:.5,shapes:[`square`,`circle`],zIndex:100,colors:[`#26ccff`,`#a25afd`,`#ff5e7e`,`#88ff5a`,`#fcff42`,`#ffa62d`,`#ff36ff`],disableForReducedMotion:!1,scalar:1};function m(e,t){return t?t(e):e}function h(e){return e!=null}function g(e,t,n){return m(e&&h(e[t])?e[t]:p[t],n)}function _(e){return e<0?0:Math.floor(e)}function v(e,t){return Math.floor(Math.random()*(t-e))+e}function y(e){return parseInt(e,16)}function b(e){return e.map(x)}function x(e){var t=String(e).replace(/[^0-9a-f]/gi,``);return t.length<6&&(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]),{r:y(t.substring(0,2)),g:y(t.substring(2,4)),b:y(t.substring(4,6))}}function S(e){var t=g(e,`origin`,Object);return t.x=g(t,`x`,Number),t.y=g(t,`y`,Number),t}function C(e){e.width=document.documentElement.clientWidth,e.height=document.documentElement.clientHeight}function w(e){var t=e.getBoundingClientRect();e.width=t.width,e.height=t.height}function T(e){var t=document.createElement(`canvas`);return t.style.position=`fixed`,t.style.top=`0px`,t.style.left=`0px`,t.style.pointerEvents=`none`,t.style.zIndex=e,t}function E(e,t,n,r,i,a,o,s,c){e.save(),e.translate(t,n),e.rotate(a),e.scale(r,i),e.arc(0,0,1,o,s,c),e.restore()}function D(e){var t=e.angle*(Math.PI/180),n=e.spread*(Math.PI/180);return{x:e.x,y:e.y,wobble:Math.random()*10,wobbleSpeed:Math.min(.11,Math.random()*.1+.05),velocity:e.startVelocity*.5+Math.random()*e.startVelocity,angle2D:-t+(.5*n-Math.random()*n),tiltAngle:(Math.random()*.5+.25)*Math.PI,color:e.color,shape:e.shape,tick:0,totalTicks:e.ticks,decay:e.decay,drift:e.drift,random:Math.random()+2,tiltSin:0,tiltCos:0,wobbleX:0,wobbleY:0,gravity:e.gravity*3,ovalScalar:.6,scalar:e.scalar,flat:e.flat}}function O(e,t){t.x+=Math.cos(t.angle2D)*t.velocity+t.drift,t.y+=Math.sin(t.angle2D)*t.velocity+t.gravity,t.velocity*=t.decay,t.flat?(t.wobble=0,t.wobbleX=t.x+10*t.scalar,t.wobbleY=t.y+10*t.scalar,t.tiltSin=0,t.tiltCos=0,t.random=1):(t.wobble+=t.wobbleSpeed,t.wobbleX=t.x+10*t.scalar*Math.cos(t.wobble),t.wobbleY=t.y+10*t.scalar*Math.sin(t.wobble),t.tiltAngle+=.1,t.tiltSin=Math.sin(t.tiltAngle),t.tiltCos=Math.cos(t.tiltAngle),t.random=Math.random()+2);var n=t.tick++/t.totalTicks,r=t.x+t.random*t.tiltCos,i=t.y+t.random*t.tiltSin,a=t.wobbleX+t.random*t.tiltCos,s=t.wobbleY+t.random*t.tiltSin;if(e.fillStyle=`rgba(`+t.color.r+`, `+t.color.g+`, `+t.color.b+`, `+(1-n)+`)`,e.beginPath(),o&&t.shape.type===`path`&&typeof t.shape.path==`string`&&Array.isArray(t.shape.matrix))e.fill(ee(t.shape.path,t.shape.matrix,t.x,t.y,Math.abs(a-r)*.1,Math.abs(s-i)*.1,Math.PI/10*t.wobble));else if(t.shape.type===`bitmap`){var c=Math.PI/10*t.wobble,l=Math.abs(a-r)*.1,d=Math.abs(s-i)*.1,f=t.shape.bitmap.width*t.scalar,p=t.shape.bitmap.height*t.scalar,m=new DOMMatrix([Math.cos(c)*l,Math.sin(c)*l,-Math.sin(c)*d,Math.cos(c)*d,t.x,t.y]);m.multiplySelf(new DOMMatrix(t.shape.matrix));var h=e.createPattern(u.transform(t.shape.bitmap),`no-repeat`);h.setTransform(m),e.globalAlpha=1-n,e.fillStyle=h,e.fillRect(t.x-f/2,t.y-p/2,f,p),e.globalAlpha=1}else if(t.shape===`circle`)e.ellipse?e.ellipse(t.x,t.y,Math.abs(a-r)*t.ovalScalar,Math.abs(s-i)*t.ovalScalar,Math.PI/10*t.wobble,0,2*Math.PI):E(e,t.x,t.y,Math.abs(a-r)*t.ovalScalar,Math.abs(s-i)*t.ovalScalar,Math.PI/10*t.wobble,0,2*Math.PI);else if(t.shape===`star`)for(var g=Math.PI/2*3,_=4*t.scalar,v=8*t.scalar,y=t.x,b=t.y,x=5,S=Math.PI/x;x--;)y=t.x+Math.cos(g)*v,b=t.y+Math.sin(g)*v,e.lineTo(y,b),g+=S,y=t.x+Math.cos(g)*_,b=t.y+Math.sin(g)*_,e.lineTo(y,b),g+=S;else e.moveTo(Math.floor(t.x),Math.floor(t.y)),e.lineTo(Math.floor(t.wobbleX),Math.floor(i)),e.lineTo(Math.floor(a),Math.floor(s)),e.lineTo(Math.floor(r),Math.floor(t.wobbleY));return e.closePath(),e.fill(),t.tick<t.totalTicks}function k(e,t,n,a,o){var s=t.slice(),c=e.getContext(`2d`),f,p,m=l(function(t){function l(){f=p=null,c.clearRect(0,0,a.width,a.height),u.clear(),o(),t()}function m(){r&&(a.width!==i.width||a.height!==i.height)&&(a.width=e.width=i.width,a.height=e.height=i.height),!a.width&&!a.height&&(n(e),a.width=e.width,a.height=e.height),c.clearRect(0,0,a.width,a.height),s=s.filter(function(e){return O(c,e)}),s.length?f=d.frame(m):l()}f=d.frame(m),p=l});return{addFettis:function(e){return s=s.concat(e),m},canvas:e,promise:m,reset:function(){f&&d.cancel(f),p&&p()}}}function A(e,n){var r=!e,i=!!g(n||{},`resize`),o=!1,s=g(n,`disableForReducedMotion`,Boolean),c=a&&g(n||{},`useWorker`)?f():null,u=r?C:w,d=e&&c?!!e.__confetti_initialized:!1,p=typeof matchMedia==`function`&&matchMedia(`(prefers-reduced-motion)`).matches,m;function h(t,n,r){for(var i=g(t,`particleCount`,_),a=g(t,`angle`,Number),o=g(t,`spread`,Number),s=g(t,`startVelocity`,Number),c=g(t,`decay`,Number),l=g(t,`gravity`,Number),d=g(t,`drift`,Number),f=g(t,`colors`,b),p=g(t,`ticks`,Number),h=g(t,`shapes`),y=g(t,`scalar`),x=!!g(t,`flat`),C=S(t),w=i,T=[],E=e.width*C.x,O=e.height*C.y;w--;)T.push(D({x:E,y:O,angle:a,spread:o,startVelocity:s,color:f[w%f.length],shape:h[v(0,h.length)],ticks:p,decay:c,gravity:l,drift:d,scalar:y,flat:x}));return m?m.addFettis(T):(m=k(e,T,u,n,r),m.promise)}function y(n){var a=s||g(n,`disableForReducedMotion`,Boolean),f=g(n,`zIndex`,Number);if(a&&p)return l(function(e){e()});r&&m?e=m.canvas:r&&!e&&(e=T(f),document.body.appendChild(e)),i&&!d&&u(e);var _={width:e.width,height:e.height};c&&!d&&c.init(e),d=!0,c&&(e.__confetti_initialized=!0);function v(){if(c){var t={getBoundingClientRect:function(){if(!r)return e.getBoundingClientRect()}};u(t),c.postMessage({resize:{width:t.width,height:t.height}});return}_.width=_.height=null}function y(){m=null,i&&(o=!1,t.removeEventListener(`resize`,v)),r&&e&&(document.body.contains(e)&&document.body.removeChild(e),e=null,d=!1)}return i&&!o&&(o=!0,t.addEventListener(`resize`,v,!1)),c?c.fire(n,_,y):h(n,_,y)}return y.reset=function(){c&&c.reset(),m&&m.reset()},y}var j;function M(){return j||=A(null,{useWorker:!0,resize:!0}),j}function ee(e,t,n,r,i,a,o){var s=new Path2D(e),c=new Path2D;c.addPath(s,new DOMMatrix(t));var l=new Path2D;
165return l.addPath(c,new DOMMatrix([Math.cos(o)*i,Math.sin(o)*i,-Math.sin(o)*a,Math.cos(o)*a,n,r])),l}function te(e){if(!o)throw Error(`path confetti are not supported in this browser`);var t,n;typeof e==`string`?t=e:(t=e.path,n=e.matrix);var r=new Path2D(t),i=document.createElement(`canvas`).getContext(`2d`);if(!n){for(var a=1e3,s=a,c=a,l=0,u=0,d,f,p=0;p<a;p+=2)for(var m=0;m<a;m+=2)i.isPointInPath(r,p,m,`nonzero`)&&(s=Math.min(s,p),c=Math.min(c,m),l=Math.max(l,p),u=Math.max(u,m));d=l-s,f=u-c;var h=10,g=Math.min(h/d,h/f);n=[g,0,0,g,-Math.round(d/2+s)*g,-Math.round(f/2+c)*g]}return{type:`path`,path:t,matrix:n}}function ne(e){var t,n=1,r=`#000000`,i=`"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", "EmojiOne Color", "Android Emoji", "Twemoji Mozilla", "system emoji", sans-serif`;typeof e==`string`?t=e:(t=e.text,n=`scalar`in e?e.scalar:n,i=`fontFamily`in e?e.fontFamily:i,r=`color`in e?e.color:r);var a=10*n,o=``+a+`px `+i,s=new OffscreenCanvas(a,a),c=s.getContext(`2d`);c.font=o;var l=c.measureText(t),u=Math.ceil(l.actualBoundingBoxRight+l.actualBoundingBoxLeft),d=Math.ceil(l.actualBoundingBoxAscent+l.actualBoundingBoxDescent),f=2,p=l.actualBoundingBoxLeft+f,m=l.actualBoundingBoxAscent+f;u+=f+f,d+=f+f,s=new OffscreenCanvas(u,d),c=s.getContext(`2d`),c.font=o,c.fillStyle=r,c.fillText(t,p,m);var h=1/n;return{type:`bitmap`,bitmap:s.transferToImageBitmap(),matrix:[h,0,0,h,-u*h/2,-d*h/2]}}n.exports=function(){return M().apply(this,arguments)},n.exports.reset=function(){M().reset()},n.exports.create=A,n.exports.shapeFromPath=te,n.exports.shapeFromText=ne})((function(){return typeof window<`u`?window:typeof self<`u`?self:this||{}})(),L7,!1);var R7=L7.exports;L7.exports.create;var tqe=({planName:e,plan:t,onReturnToDashboard:n})=>{let r=`${cl(e)} plan`;return(0,V.useEffect)(()=>{let e=[`#E09600`,`#4361FF`,`#22c55e`];R7({particleCount:60,spread:60,origin:{x:0,y:.5},angle:45,colors:e}),R7({particleCount:60,spread:60,origin:{x:1,y:.5},angle:135,colors:e});let t=setTimeout(()=>{R7({particleCount:40,spread:50,origin:{x:0,y:.55},angle:30,colors:e}),R7({particleCount:40,spread:50,origin:{x:1,y:.55},angle:150,colors:e})},200);return()=>clearTimeout(t)},[]),(0,U.jsxs)(W,{className:`items-center max-w-xl mx-auto`,children:[(0,U.jsxs)(`h1`,{className:`${G.type.h1} text-center`,children:[`Welcome to the `,r,`!`]}),(0,U.jsx)(`p`,{className:`text-base font-normal text-gray-700 mt-2`,children:`You've successfully upgraded your plan. You now have access to:`}),(0,U.jsx)(`div`,{className:`w-full rounded-lg border border-gray-200 bg-white p-4`,children:(0,U.jsx)($Le,{plan:t})}),(0,U.jsx)(K,{onClick:n,className:`mt-6`,children:`Return to Dashboard`})]})},nqe=()=>{let e=l(),t=B(ns),n=B(e=>__(e,{orgId:t.id})),r=u(Sg({orgId:t.id})),i=B(bg),a=u(xg()),o=B(vg),s=B(e=>_g(e,{id:i.planId})),c=I(Tg),{hasTrialNoPayment:d}=JU(),f=B(ws),p=d||!f,[m,h]=(0,V.useState)(1),[g,_]=(0,V.useState)(null),[v,y]=(0,V.useState)(!1),[b,x]=(0,V.useState)(!1),S=(0,V.useRef)(null),C=B(Vl).filter(e=>e.organizationId).length>0&&!i.planId;T(c,()=>{let e=S.current;e&&(_(e),y(!0),S.current=null)});let w=n=>{S.current=n,e(Tg({orgId:t.id,planId:n.planId,name:n.name}))};return n?v&&g?(0,U.jsx)(b5,{width:1200,showOrgPicker:!0,children:(0,U.jsx)(W,{children:(0,U.jsx)(tqe,{planName:g.name,plan:o[g.name],onReturnToDashboard:()=>{window.location.href=Dr()}})})}):p&&m===2&&g?(0,U.jsx)(b5,{width:1200,showOrgPicker:!0,children:(0,U.jsxs)(W,{children:[(0,U.jsx)(`h1`,{className:`${G.type.h1} text-center`,children:`Add payment method`}),(0,U.jsx)(`p`,{className:`text-center text-gray-600 max-w-xl mx-auto`,children:`You must enter a credit card to continue. Your card will be charged at the end of your monthly billing cycle.`}),(0,U.jsx)(TA,{...c}),(0,U.jsx)(S7,{children:(0,U.jsx)(`div`,{className:`max-w-[500px] mx-auto`,children:(0,U.jsx)(D7,{selectedPlan:g,changePlanHref:Di(),planChangeLoading:c.isLoading,onSelectDifferentPlan:()=>{h(1),_(null)},onSuccess:()=>{x(!0),h(1),w(g)}})})})]})}):(0,U.jsx)(b5,{width:1200,showOrgPicker:!0,children:(0,U.jsxs)(W,{children:[(0,U.jsx)(`h1`,{className:`${G.type.h1} text-center`,children:`Choose a Plan`}),(0,U.jsx)(W,{className:`items-center`,children:(0,U.jsx)(`div`,{className:`max-w-2xl`,children:(0,U.jsxs)(`p`,{children:[`If your trial has expired, choose a plan to continue or`,` `,(0,U.jsx)(P,{to:Fr(),children:`Log Out`})]})})}),(0,U.jsxs)(W,{children:[(0,U.jsx)(TA,{...c}),n&&(0,U.jsx)(TA,{...a}),n&&(0,U.jsx)(TA,{...r}),C?(0,U.jsxs)(q,{children:[`You are currently on an older plan with Aptible. Please`,` `,(0,U.jsx)(P,{to:`https://aptible.com/contact`,children:`contact us`}),` to update your plan or`,` `,(0,U.jsx)(P,{to:`https://www.aptible.com/pricing`,children:`view new plans`}),`.`]}):null]}),C?null:(0,U.jsx)(QLe,{activePlan:i,selected:s.name,onSelectPlan:w,paymentRequired:p,onSelectPlanWhenPaymentRequired:p?(e,t)=>{let n={planId:e,name:t};if(_(n),b){w(n);return}h(2)}:void 0}),(0,U.jsx)(`div`,{className:`text-center mt-8 pt-4 border-t border-gray-200`,children:(0,U.jsxs)(`p`,{className:`text-sm text-gray-600`,children:[`Looking to delete your account?`,` `,(0,U.jsx)(P,{to:oi,className:`text-indigo-600 hover:text-indigo-800 underline`,children:`Click here`})]})})]})}):(0,U.jsx)(b5,{width:1200,showOrgPicker:!0,children:(0,U.jsxs)(W,{children:[(0,U.jsx)(`h1`,{className:`${G.type.h1} text-center`,children:`Plans`}),(0,U.jsx)(W,{className:`items-center`,children:(0,U.jsx)(`div`,{className:`max-w-2xl`,children:(0,U.jsxs)(`div`,{className:`flex items-center justify-center gap-2 p-8 bg-gray-50 rounded-lg`,children:[(0,U.jsx)(hD,{variant:`sm`,className:`opacity-60`}),(0,U.jsxs)(`div`,{className:`text-center`,children:[(0,U.jsx)(`p`,{className:`text-gray-600`,children:`You must be an account owner to view and manage plans.`}),(0,U.jsx)(aA,{text:`Must be account owner`,fluid:!0,children:(0,U.jsx)(`span`,{className:`text-sm text-gray-500 cursor-help`,children:`Contact your account owner for access to this page.`})})]})]})})})]})})},rqe=()=>{let e=N(),[t,n]=(0,V.useState)(``);return(0,U.jsxs)(b5,{children:[(0,U.jsxs)(`div`,{className:`text-center mt-16`,children:[(0,U.jsx)(`h1`,{className:`${G.type.h1} text-center`,children:`Single Sign-On`}),(0,U.jsx)(`p`,{className:`my-6 text-gray-600`,children:`Use your organization's single sign-on provider to authenticate.`})]}),(0,U.jsx)(Z,{children:(0,U.jsxs)(W,{children:[(0,U.jsx)(EA,{}),(0,U.jsxs)(`form`,{onSubmit:n=>{n.preventDefault(),e(oo(t))},children:[(0,U.jsx)(J,{label:`Organization ID / Name`,htmlFor:`org`,children:(0,U.jsx)(X,{type:`text`,name:`org`,id:`org`,onChange:e=>n(e.currentTarget.value)})}),(0,U.jsx)(K,{type:`submit`,className:`w-full mt-4`,disabled:t===``,children:`Log In`})]})]})})]})},iqe=()=>{let{orgId:e=``}=F(),t=B(an);return(0,V.useEffect)(()=>
165{if(e===``)return;let n=encodeURIComponent(`${t.appUrl}${co()}`),r=`${t.authUrl}/organizations/${e}/saml/login?redirect_uri=${n}`;window.location.href=r},[e]),(0,U.jsx)(b5,{children:(0,U.jsx)(xE,{})})},aqe=()=>{let[e]=Ee(),t=e.get(`code`)||`unknown`,n={invalid_credentials:`invalid_credentials`,access_denied:`access_denied`,configuration_error:`configuration_error`,csrf_detected:`csrf_detected`,unknown:`unknown`},r=Object.values(n).includes(t)?t:n.unknown,i={[n.invalid_credentials]:`We couldn't sign you in with those credentials. Please try again.`,[n.access_denied]:`Access was denied by your identity provider.`,[n.configuration_error]:`Thereâs a configuration issue with SSO.`,[n.csrf_detected]:`Your session could not be verified. Please start the sign-in again.`,[n.unknown]:`We couldnât complete SSO. Please try again, or contact support if this persists.`};return(0,U.jsxs)(b5,{children:[(0,U.jsxs)(`div`,{className:`text-center mt-16`,children:[(0,U.jsx)(`h1`,{className:`${G.type.h1} text-center`,children:`We could not process your Single Sign-On login`}),(0,U.jsx)(q,{variant:`error`,className:`my-6`,children:i[r]})]}),(0,U.jsx)(Z,{children:(0,U.jsxs)(W,{children:[(0,U.jsx)(EA,{}),(0,U.jsx)(dA,{to:Nr(),className:`font-semibold w-full`,children:`Back to Login`}),(0,U.jsxs)(`div`,{children:[`Not an Enterprise customer?`,` `,(0,U.jsx)(CA,{href:`https://aptible.zendesk.com/hc/en-us/requests/new`,variant:`info`,children:`Contact support`}
165),` `,`to learn more about upgrading your account to support SSO.`]})]})})]})},oqe=()=>{let e=B(ns);return e.id?(0,U.jsx)(r5,{mainWrapperDivClassName:`overflow-x-hidden`,children:(0,U.jsx)(xze,{orgId:e.id})}):(0,U.jsx)(xE,{text:`Loading activity`})},sqe=()=>{let e=B(ns);return(0,U.jsx)(r5,{children:(0,U.jsx)(Dze,{orgId:e.id})})},cqe=new Set([`app.deploy`,`app.configure`]);function lqe({appId:e,operationId:t}){u(_f({id:e}));let n=B(t=>rf(t,{id:e}));u(Tl({id:e}));let r=B(t=>yl(t,{appId:e})).find(e=>e.operationId===t);u(Xv({id:r?.imageId??``}));let i=B(e=>Zv(e,{id:r?.imageId??``}));u(jl({id:r?.sourceId??``}));let a=B(e=>Dl(e,{id:r?.sourceId??``}));return r?(0,U.jsxs)(Z,{size:`md`,className:`flex flex-col gap-2`,children:[(0,U.jsx)(`h3`,{className:G.type[`micro label strong`],children:`Deployment Details`}),(0,U.jsxs)(`div`,{className:`grid grid-cols-1 lg:grid-cols-2 lg:divide-x lg:divide-black-100`,children:[(0,U.jsxs)(`div`,{className:`flex flex-col lg:pr-4 [&>*:not(:first-child)]:border-t [&>*:not(:first-child)]:border-black-100`,children:[(0,U.jsx)(X8,{title:`App`,children:(0,U.jsx)(P,{to:Qi(n.id),className:`text-indigo`,children:n.handle})}),(0,U.jsx)(X8,{title:`Git Ref`,children:(0,U.jsx)($2,{gitRef:r.gitRef,commitSha:r.gitCommitSha,commitUrl:r.gitCommitUrl})}),(0,U.jsx)(X8,{title:`Commit Message`,children:(0,U.jsx)(e4,{message:r.gitCommitMessage})})]}),(0,U.jsxs)(`div`,{className:`flex flex-col lg:pl-4 [&>*:not(:first-child)]:border-t [&>*:not(:first-child)]:border-black-100 border-t border-black-100 lg:border-t-0`,children:[(0,U.jsx)(X8,{title:`Source`,children:a.id?(0,U.jsx)(P,{to:Lo(a.id),className:`text-indigo`,children:a.displayName}):(0,U.jsx)(`span`,{className:`text-gray-500 italic`,children:`N/A`})}),(0,U.jsx)(X8,{title:`Docker Image`,children:(0,U.jsx)(Q2,{image:r.dockerImage,digest:i.dockerRef,repoUrl:r.dockerRepositoryUrl})})]})]})]}):null}function uqe({text:e}){let t=e.split(/(https?:\/\/[^\s]+)/g);return(0,U.jsx)(U.Fragment,{children:t.map((e,t)=>/^https?:\/\//.test(e)?(0,U.jsx)(`a`,{href:e,target:`_blank`,rel:`noopener noreferrer`,className:`text-blue-500 hover:underline`,children:e},t):(0,U.jsx)(V.Fragment,{children:e},t))})}var dqe=new Set([`operation.logs`,`app.logs`,`database.logs`,`database.tunnel`,`image.scan`,`llmkey.create`,`llmkey.revoke`,`vpntunnel.provision`,`vpntunnel.deprovision`]);function fqe({logsContent:e,operationId:t}){if(!e)return(0,U.jsx)(cA,{icon:(0,U.jsx)(aD,{variant:`sm`}),variant:`white`,size:`sm`,disabled:!0,children:`Download Logs`});let n=new Blob([e],{type:`text/plain`}),r=URL.createObjectURL(n);return(0,U.jsxs)(lA,{href:r,variant:`white`,size:`sm`,download:`operation-${t}-logs.txt`,children:[(0,U.jsx)(aD,{variant:`sm`,className:`mr-2`}),`Download Logs`]})}function pqe({operationId:e}){let t=l(),n=B(t=>Ju(t,{id:e})),r=(0,V.useMemo)(()=>Jd({id:e,withDeleted:!0}),[e]),i=(0,V.useMemo)(()=>qd(),[]),[a,o]=(0,V.useState)(!1);JS({action:r,cancel:i});let s=(0,V.useMemo)(()=>Wd({id:e}),[e]),c=B(e=>L.cache.selectById(e,{id:s.payload.key}))||``;return(0,V.useEffect)(()=>{(n.status===`queued`||n.status===`running`)&&o(!0),(n.status===`failed`||n.status===`succeeded`||n.status===`canceled`)&&(t(i),o(!1))},[n.status,t,i]),n.id?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`hr`,{className:`my-6 border-[#E7E8E8]`}),(0,U.jsxs)(`div`,{className:`flex flex-row items-center justify-between mb-4`,children:[(0,U.jsxs)(`div`,{className:`flex flex-row items-center`,children:[(0,U.jsx)(`h3`,{className:`text-lg font-semibold text-gray-900`,children:`Logs`}),(0,U.jsx)(SE,{show:a,className:`ml-2`})]}),(0,U.jsx)(fqe,{logsContent:c,operationId:e})]}),(0,U.jsx)(`div`,{className:`w-full`,children:(0,U.jsx)(w3,{op:n})})]}):null}var mqe=()=>{let{id:e=``}=F(),t=B(t=>PC(t,{id:e})),n=t.externalId||``;u(Gd({id:n,withDeleted:!0}));let r=(0,V.useMemo)(()=>Sce({resourceType:t.primaryResourceType||``,resourceId:t.primaryResourceId||``,withDeleted:!0}),[t.primaryResourceType,t.primaryResourceId]),i=(0,V.useMemo)(()=>UC(),[]);JS({action:r,cancel:i});let a=(0,V.useMemo)(()=>oce({id:e}),[e]),o=(0,V.useMemo)(()=>IC(),[]);JS({action:a,cancel:o});let s=l();(0,V.useEffect)(()=>
165{t.id&&(t.status===`succeeded`||t.status===`failed`||t.status===`canceled`)&&s(o)},[t.id,t.status,s,o]),(0,V.useEffect)(()=>()=>{s(i)},[s,i]);let c=B(e=>Ju(e,{id:n}));if(!t.id)return null;let d=!dqe.has(t.activityType)&&c.id!==``,f=t.primaryResourceType.toLowerCase()===`app`?t.primaryResourceId:VC(t.targetResources,`app`)??``,p=cqe.has(t.activityType)&&f!==``;return(0,U.jsxs)(U.Fragment,{children:[p&&n?(0,U.jsx)(lqe,{appId:f,operationId:n}):null,(0,U.jsxs)(Z,{children:[t.summary?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`div`,{className:`flex flex-row items-start mb-4`,children:(0,U.jsx)(`h3`,{className:`text-lg font-semibold text-gray-900`,children:`Additional Info`})}),(0,U.jsx)(`div`,{className:`flex items-center text-base font-normal text-black break-all`,children:t.summary}),(0,U.jsx)(`hr`,{className:`my-6 border-[#E7E8E8]`})]}):null,t.description?.note?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`div`,{className:`flex flex-row items-start mb-4`,children:(0,U.jsx)(`h3`,{className:`text-lg font-semibold text-gray-900`,children:`Note`})}),(0,U.jsx)(`div`,{className:`text-base font-normal text-black break-all`,children:(0,U.jsx)(uqe,{text:String(t.description.note)})}),(0,U.jsx)(`hr`,{className:`my-6 border-[#E7E8E8]`})]}):null,(0,U.jsx)(`div`,{className:`flex flex-row items-start mb-4`,children:(0,U.jsx)(`h3`,{className:`text-lg font-semibold text-gray-900`,children:`Activity JSON`})}),(0,U.jsx)(B5,{src:t,collapsed:!1}),d&&(0,U.jsx)(pqe,{operationId:n})]})]})};function hqe(){let{id:e=``}=F(),t=B(t=>PC(t,{id:e}));u(FC({id:e}));let n=t.primaryResourceType.toLowerCase()===`app`?t.primaryResourceId:VC(t.targetResources,`app`)??``,r=t.externalId??``;u(Tl({id:n}));let i=B(e=>yl(e,{appId:n})).find(e=>e.operationId===r);u(_f({id:i?.appId??n}));let a=B(e=>rf(e,{id:i?.appId??n}));if(!i)return null;let o=i.id===a.currentDeploymentId?`Current Configuration Variables`:`Previous Configuration Variables`;return(0,U.jsx)(Z,{children:(0,U.jsxs)(W,{size:`sm`,children:[(0,U.jsx)(`h3`,{className:G.type.h3,children:o}),(0,U.jsx)(T4,{configId:i.configurationId,envId:a.environmentId})]})})}var gqe=D(nu,of,up,(e,t,n)=>{let r={};return n.forEach(t=>{let n=L.environments.findById(e,{id:t.environmentId});r[n.stackId]||(r[n.stackId]={envCount:0,appCount:0,dbCount:0}),r[n.stackId].dbCount+=1}),t.forEach(t=>{let n=L.environments.findById(e,{id:t.environmentId});r[n.stackId]||(r[n.stackId]={envCount:0,appCount:0,dbCount:0}),r[n.stackId].appCount+=1}),Object.values(e).forEach(e=>{r[e.stackId]||(r[e.stackId]={envCount:0,appCount:0,dbCount:0}),r[e.stackId].envCount+=1}),r}),_qe=D(Vl,L.costs.selectTable,L.costRates.select,su,gqe,(e,t,n,r,i)=>e.map(e=>{let a=Qy(t,n,r,e.id),o=i[e.id]||{envCount:0,appCount:0,dbCount:0};return{...e,cost:a,...o,typeTitle:Ql(e)}}).sort((e,t)=>t.id.localeCompare(e.id,void 0,{numeric:!0}))),z7={name:{field:`name`,headerName:`Name`,initialWidth:300,cellRenderer:({data:e})=>(0,U.jsx)(eIe,{id:e.id})},id:{field:`id`,headerName:`ID`,valueGetter:({data:e})=>Number.parseInt(e?.id||`0`,10)},region:{field:`region`,headerName:`Region`},typeTitle:{field:`typeTitle`,headerName:`Tenancy`,cellRenderer:({data:e})=>{let t=e.typeTitle===`Shared`?`For non-production use only. Does not support compliance frameworks or Aptible's SLA.`:`For production workloads. Supports HIPAA and other compliance frameworks, includes VPN and VPC Peering.`;return(0,U.jsx)(U2,{label:e.typeTitle,tooltip:t})}},envCount:{field:`envCount`,headerName:`Environments`},appCount:{field:`appCount`,headerName:`Apps`},dbCount:{field:`dbCount`,headerName:`Databases`},createdAt:{field:`createdAt`,headerName:`Created At (UTC)`,initialHide:!0,valueGetter:({data:e})=>e&&Gl(e)===`shared`?null:e?.createdAt,cellRenderer:({data:e})=>e&&Gl(e)===`shared`?(0,U.jsx)(`span`,{children:`-`}):(0,U.jsx)(Y2,{date:e.createdAt})},cost:{field:`cost`,headerName:`Est. Monthly Cost`,initialWidth:250,sort:`desc`,headerTooltip:` 166 This is an estimate of the cost of running the current resources for 167 one month. It is updated automatically as resources are added or 168 scaled. Please note: it does not represent your actual usage for the 169 month and does not reflect contract discounts, custom rates, or 170 allocations. 171 `,cellRenderer:({data:e})=>(0,U.jsx)(q2,{value:e.cost})}},vqe=[z7.name,z7.id,z7.region,z7.typeTitle,z7.envCount,z7.appCount,z7.dbCount,z7.createdAt,z7.cost];function yqe(){let e=B($o),{isLoading:t,isInitialLoading:n}=Er([Jl,fu,ab({orgId:e}),$y({orgId:e})]),r=B(e=>_qe(e));return(0,U.jsxs)(W,{size:`xl`,children:[(0,U.jsxs)(W,{variant:`horizontal`,className:`items-center justify-between`,children:[(0,U.jsx)(NU,{description:`Stacks represent the virtualized infrastru
171cture where resources are deployed.`,children:`Stacks`}),(0,U.jsxs)(dA,{to:_o(),children:[(0,U.jsx)(qE,{variant:`sm`,className:`mr-2`}),` New Dedicated Stack`]})]}),(0,U.jsx)(L2,{rowData:r,colDefs:vqe,syncQueryParams:!0,isLoading:!r.length&&(t||n)})]})}function bqe(){return(0,U.jsxs)(r5,{children:[(0,U.jsx)(IA,{}),(0,U.jsx)(yqe,{})]})}var xqe=()=>{let{id:e=``}=F();return(0,U.jsx)(`div`,{className:`mb-4`,children:(0,U.jsx)(BA,{children:(0,U.jsx)(RLe,{stackId:e})})})},Sqe=()=>{let{id:e=``}=F();u(Fg({id:e}));let t=B(t=>zl(t,{id:e})),n=B(t=>Pg(t,{stackId:e}));return Kl(t)?Gl(t)===`shared`?(0,U.jsxs)(Z,{children:[(0,U.jsxs)(`h1`,{className:`text-lg text-gray-500 font-semibold flex items-center gap-2 mb-4`,children:[(0,U.jsx)(ZE,{color:`#6B7280`}),`VPN Tunnels`]}),(0,U.jsx)(q,{variant:`info`,children:`VPN Tunnels are not available on Shared Stacks. Upgrade to a Dedicated Stack for site-to-site VPN.`})]}):(0,U.jsxs)(`div`,{className:`mb-4`,children:[(0,U.jsxs)(Z,{className:`mb-4`,children:[(0,U.jsxs)(`div`,{className:`flex justify-between items-start`,children:[(0,U.jsx)(`p`,{className:`flex mb-4 text-gray-500 text-md`,children:`Contact support to edit or add new VPN Tunnels.`}),(0,U.jsx)(uA,{href:`https://www.aptible.com/docs/network-integrations`})]}),(0,U.jsx)(P,{className:`hover:no-underline`,to:Po(),children:(0,U.jsx)(K,{className:`font-semibold`,children:`Contact Support`})})]}),(0,U.jsxs)(`p`,{className:`flex text-gray-500 text-base mb-4`,children:[n.length,` VPN Tunnel`,n.length!==1&&`s`]}),n.map(e=>(0,U.jsxs)(Z,{className:`mt-4`,children:[(0,U.jsxs)(`h1`,{className:(0,H.default)(G.type.h4,`flex justify-between block`),children:[e.handle,e.auto===`route`?(0,U.jsxs)(aA,{text:"This tunnel is set to `routing` mode. In this mode, connections come up and down depending on traffic. Please check individual connections below.",children:[(0,U.jsx)(tD,{className:`inline-block mb-1 mr-1 opacity-50 hover:opacity-100`,variant:`sm`}),(0,U.jsxs)(`span`,{className:`text-base mt-1 text-gray-500`,children:[`Status: `,e.state]})]}):(0,U.jsxs)(`span`,{className:`text-base mt-1 text-gray-500`,children:[`Status: `,e.state]})]}),(0,U.jsx)(`p`,{className:`flex text-gray-500 text-base my-4`,children:`Gateways`}),(0,U.jsxs)(VA,{children:[(0,U.jsxs)(HA,{children:[(0,U.jsx)(KA,{children:`Gateway`}),(0,U.jsx)(KA,{children:`IP Address`})]}),(0,U.jsxs)(UA,{children:[(0,U.jsxs)(WA,{children:[(0,U.jsx)(Y,{children:`Aptible Gateway`}),(0,U.jsx)(Y,{children:e.ourGateway})]}),(0,U.jsxs)(WA,{children:[(0,U.jsx)(Y,{children:`Remote Gateway`}),(0,U.jsx)(Y,{children:e.peerGateway})]})]})]}),(0,U.jsx)(`p`,{className:`flex text-gray-500 text-base my-4`,children:`Attributes`}),(0,U.jsxs)(VA,{children:[(0,U.jsxs)(HA,{children:[(0,U.jsx)(KA,{children:`IKE Phase`}),(0,U.jsx)(KA,{children:`Parameter`}),(0,U.jsx)(KA,{children:`Value`})]}),(0,U.jsxs)(UA,{children:[(0,U.jsxs)(WA,{children:[(0,U.jsx)(Y,{children:`Phase 1`}),(0,U.jsx)(Y,{children:`Algorithm`}),(0,U.jsx)(Y,{children:e.phase1Alg})]}),(0,U.jsxs)(WA,{children:[(0,U.jsx)(Y,{children:`Phase 1`}),(0,U.jsx)(Y,{children:`Lifetime`}),(0,U.jsx)(Y,{children:e.phase1Lifetime})]}),(0,U.jsxs)(WA,{children:[(0,U.jsx)(Y,{children:`Phase 1`}),(0,U.jsx)(Y,{children:`DH Group`}),(0,U.jsx)(Y,{children:e.phase1DhGroup})]}),(0,U.jsxs)(WA,{children:[(0,U.jsx)(Y,{children:`Phase 2`}),(0,U.jsx)(Y,{children:`Algorithm`}),(0,U.jsx)(Y,{children:e.phase2Alg})]}),(0,U.jsxs)(WA,{children:[(0,U.jsx)(Y,{children:`Phase 2`}),(0,U.jsx)(Y,{children:`Lifetime`}),(0,U.jsx)(Y,{children:e.phase2Lifetime})]}),(0,U.jsxs)(WA,{children:[(0,U.jsx)(Y,{children:`Phase 2`}),(0,U.jsx)(Y,{children:`DH Group`}),(0,U.jsx)(Y,{children:e.phase2DhGroup})]})]})]}),(0,U.jsx)(`p`,{className:`flex text-gray-500 text-base my-4`,children:`Aptible Networks`}),(0,U.jsxs)(VA,{children:[(0,U.jsxs)(HA,{children:[(0,U.jsx)(KA,{children:`Network (As seen from Remote)`}),(0,U.jsx)(KA,{children:`Network (As routed by Aptible)`})]}),(0,U.jsx)(UA,{children:e.ourNetworks.map(e=>(0,U.jsxs)(WA,{children:[(0,U.jsx)(Y,{children:e?.[0]||`N/A`}),(0,U.jsx)(Y,{children:e?.[1]||`N/A`})]},e))})]}),(0,U.jsx)(`p`,{className:`flex text-gray-500 text-base my-4`,children:`Remote Networks`}),(0,U.jsxs)(VA,{children:[(0,U.jsxs)(HA,{children:[(0,U.jsx)(KA,{children:`Network (As seen from Aptible)`}),(0,U.jsx)(KA,{children:`Network (As routed by Remote)`})]}),(0,U.jsx)(UA,{children:e.peerNetworks.map(e=>(0,U.jsxs)(WA,{children:[(0,U.jsx)(Y,{children:e?.[0]||`N/A`}),(0,U.jsx)(Y,{children:e?.[1]||`N/A`})]},e))})]}),(0,U.jsx)(`p`,{className:`flex text-gray-500 text-base my-4`,children:`Connection Status`}),(0,U.jsxs)(VA,{children:[(0,U.jsxs)(HA,{children:[(0,U.jsx)(KA,{children:`Aptible Network`}),(0,U.jsx)(KA,{children:`Remote Network`}),(0,U.jsx)(KA,{children:`Status`})]}),(0,U.jsx)(UA,{children:Object.values(e.tunnelAttributes.connections||{}).map(e=>(0,U.jsxs)(WA,{children:[(0,U.jsx)(Y,{children:e.local_address}),(0,U.jsx)(Y,{children:e.remote_address}),(0,U.jsx)(Y,{children:e.state})]},e.name))})]})]},e.id))]}):null},Cqe=({vpcPeer:e})=>{let t=e.connectionStatus===`active`?`success`:`error`;return(0,U.jsx)(H2,{variant:t,children:cl(e.connectionStatus)})},wqe=({vpcPeer:e,onDelete:t,isAccountOwner:n,isLoading:r})=>{let[i,a]=(0,V.useState)(!1),[o,s]=(0,V.useState)(``),c=o===e.connectionId;return n?i?(0,U.jsxs)(`div`,{className:`flex flex-col gap-2 p-3 bg-red-50 border border-red-200 rounded-md`,children:[(0,U.jsxs)(`p`,{className:`text-sm text-red-800`,children:[`Type `,(0,U.jsx)(`strong`,{children:e.connectionId}
171),` to confirm deletion request:`]}),(0,U.jsx)(`p`,{className:`text-xs text-red-600`,children:`This will submit a request to Aptible support to delete this VPC peering connection.`}),(0,U.jsxs)(`div`,{className:`flex gap-2`,children:[(0,U.jsx)(X,{value:o,onChange:e=>s(e.currentTarget.value),placeholder:e.connectionId,className:`flex-1 text-sm`}),(0,U.jsx)(K,{variant:`delete`,size:`sm`,onClick:()=>{c&&(t(e),a(!1),s(``))},disabled:!c||r,isLoading:r,children:`Request Deletion`}),(0,U.jsx)(K,{variant:`white`,size:`sm`,onClick:()=>{a(!1),s(``)},children:`Cancel`})]})]}):(0,U.jsx)(K,{variant:`delete`,size:`sm`,onClick:()=>a(!0),className:`w-fit`,disabled:r,isLoading:r,children:`Request Deletion`}):(0,U.jsx)(aA,{text:`You must be an Account Owner to request VPC peering deletion`,children:(0,U.jsx)(K,{variant:`delete`,size:`sm`,disabled:!0,className:`w-fit opacity-50 cursor-not-allowed`,children:(0,U.jsx)(hD,{className:`w-4 h-4`})})})},Tqe=()=>{let{id:e=``}=F(),t=l(),n=N(),r=me(),i=B(ns),a=B(qo),o=B(t=>zl(t,{id:e})),s=I(Iy),[c,d]=(0,V.useState)(!1),[f,p]=(0,V.useState)(!1);u(jg({id:e})),(0,V.useEffect)(()=>{r.state?.createSuccess&&(p(!0),n(r.pathname,{replace:!0,state:{}}))},[r.state,r.pathname,n]),(0,V.useEffect)(()=>()=>{t(Ly())},[t]),(0,V.useEffect)(()=>{if(s.isSuccess&&c){let e=setTimeout(()=>{d(!1)},5e3);return()=>clearTimeout(e)}},[s.isSuccess,c]),(0,V.useEffect)(()=>{if(f){let e=setTimeout(()=>p(!1),5e3);return()=>clearTimeout(e)}},[f]);let m=rC(B(t=>Ag(t,{stackId:e}))),h=B(e=>__(e,{orgId:i.id}));if(!Kl(o))return null;if(Gl(o)===`shared`)return(0,U.jsxs)(Z,{children:[(0,U.jsxs)(`h1`,{className:`text-lg text-gray-500 font-semibold flex items-center gap-2 mb-4`,children:[(0,U.jsx)(ZE,{color:`#6B7280`}),`VPC Peering`]}),(0,U.jsx)(q,{variant:`info`,children:`VPC Peering is not available on Shared Stacks. Upgrade to a Dedicated Stack to peer with your AWS VPC or another Aptible stack.`})]});let g=e=>{d(!0);let n=`VPC Peering Deletion Request - ${o.name}`,r=` 172<p><strong>We've received your request for VPC Peering deletion.</strong> An Aptible Support team member will follow up shortly. If you did not make this request or if you'd like to cancel it, reply here.</p> 173 174<p><strong>Details:</strong></p> 175<ul> 176 <li><strong>User:</strong> ${a.name} (${a.email})</li> 177 <li><strong>Organization:</strong> ${i.name} (ID: ${i.id})</li> 178 <li><strong>Stack:</strong> ${o.name} (ID: ${o.id})</li> 179 <li><strong>VPC Peering Connection ID to Delete:</strong> ${e.connectionId}</li> 180 <li><strong>VPC Peer Description:</strong> ${e.description}</li> 181 <li><strong>Current Status:</strong> ${e.connectionStatus}</li> 182</ul> 183 `.trim();t(Iy({email:a.email,name:a.name,subject:n,description:r,priority:`normal`,attachments:[]}))};return(0,U.jsxs)(W,{children:[(0,U.jsxs)(W,{size:`sm`,children:[(0,U.jsx)(`div`,{className:`flex items-start mb-3`,children:h?(0,U.jsxs)(K,{onClick:()=>n(Jne(e)),children:[(0,U.jsx)(qE,{variant:`sm`,className:`mr-1`}),` Create VPC Peering Request`]}):(0,U.jsx)(aA,{text:`You must be an Account Owner to request VPC peering`,children:(0,U.jsxs)(K,{disabled:!0,className:`opacity-50 cursor-not-allowed`,children:[(0,U.jsx)(qE,{variant:`sm`,className:`mr-1`}),` Create VPC Peering Request`]})})}),f&&(0,U.jsx)(q,{variant:`success`,className:`mb-4`,children:`VPC Peering request submitted successfully! The Aptible Team will process your request.`}),(0,U.jsx)(PU,{children:(0,U.jsxs)(W,{variant:`horizontal`,size:`lg`,className:`items-center`,children:[(0,U.jsxs)(IU,{children:[m.totalItems,` Peers`]}),(0,U.jsx)(RU,{...m})]})})]}),s.isSuccess&&c&&(0,U.jsx)(q,{variant:`success`,className:`mb-4`,children:`VPC Peering deletion request submitted successfully! The Aptible Team will process your request.`}),(0,U.jsxs)(VA,{children:[(0,U.jsxs)(HA,{children:[(0,U.jsx)(KA,{children:`Status`}),(0,U.jsx)(KA,{children:`VPC Peer`}),(0,U.jsx)(KA,{children:`Description`}),(0,U.jsx)(KA,{variant:`right`,children:`Actions`})]}),(0,U.jsxs)(UA,{children:[m.data.length===0?(0,U.jsx)(GA,{colSpan:4}):null,m.data.map(e=>(0,U.jsxs)(WA,{children:[(0,U.jsx)(Y,{children:(0,U.jsx)(Cqe,{vpcPeer:e})}),(0,U.jsx)(Y,{children:(0,U.jsx)(`span`,{className:G.type.darker,children:e.connectionId})}),(0,U.jsx)(Y,{children:(0,U.jsx)(`span`,{className:G.type.darker,children:e.description})}),(0,U.jsx)(Y,{variant:`right`,children:(0,U.jsx)(wqe,{vpcPeer:e,onDelete:g,isAccountOwner:h,isLoading:s.isLoading})})]},e.id))]})]}),m.totalPages>1&&(0,U.jsx)(RU,{...m})]})},B7=({children:e})=>{let t=(0,H.default)(`my-2 px-2 flex items-center justify-between min-h-[48px]`,`border border-gray-200 rounded-lg`,`bg-white hover:bg-black-50`);return(0,U.jsx)(`div`,{className:t,children:e})},Eqe=({resource:e})=>{let t=B(t=>zl(t,{id:e.id}));return(0,U.jsxs)(B7,{children:[(0,U.jsx)(Mze,{stack:t}),(0,U.jsxs)(`div`,{className:`text-black-300 text-base`,children:[cl(e.type),` ID: `,cl(e.id)]})]})},Dqe=({resource:e})=>{let t=B(t=>tu(t,{id:e.id}));return(0,U.jsxs)(B7,{children:[(0,U.jsx)(FLe,{env:t}),(0,U.jsxs)(`div`,{className:`text-black-300 text-base`,children:[cl(e.type),` ID: `,cl(e.id)]})]})},Oqe=({resource:e})=>{let t=B(t=>rf(t,{id:e.id}));return(0,U.jsxs)(B7,{children:[(0,U.jsx)(iIe,{app:t}),(0,U.jsxs)(`div`,{className:`text-black-300 text-base`,children:[cl(e.type),` ID: `,cl(e.id)]})]})},kqe=({resource:e})=>{let t=B(t=>lp(t,{id:e.id}));return(0,U.jsxs)(B7,{children:[(0,U.jsx)(FIe,{database:t}),(0,U.jsxs)(`div`,{className:`text-black-300 text-base`,children:[cl(e.type),` ID: `,cl(e.id)]})]})},Aqe=({resource:e})=>{let t=B(t=>Lp(t,{id:e.id}));return(0,U.jsxs)(B7,{children:[(0,U.jsx)(yLe,{endpoint:t}),(0,U.jsxs)(`div`,{className:`text-black-300 text-base`,children:[cl(e.type),` ID: `,cl(e.id)]})]})},V7=({resource:e})=>e.type===`stack`?(0,U.jsx)(Eqe,{resource:e}):e.type===`environment`?(0,U.jsx)(Dqe,{resource:e}):e.type===`app`?(0,U.jsx)(Oqe,{resource:e}):e.type===`endpoint`?(0,U.jsx)(Aqe,{resource:e}):(0,U.jsx)(kqe,{resource:e}),H7=15,jqe=()=>{let e=B(l5),t=B(d5);return(0,U.jsxs)(`div`,{children:[e.length>0?(0,U.jsxs)(`div`,{className:`py-2`,children:[(0,U.jsx)(`div`,{className:`text-black-500`,children:`Recently Viewed`}),(0,U.jsx)(`div`,{children:e.filter(e=>!e?.deletedAt).slice(0,5).map(e=>(0,U.jsx)(V7,{resource:e},f5(e)))})]}):null,t.length>0?(0,U.jsxs)(`div`,{className:`py-2`,children:[(0,U.jsx)(`div`,{className:`text-black-500`,children:`Most Visited`}),(0,U.jsx)(`div`,{children:t.filter(e=>!e?.deletedAt).slice(0,5).map(e=>(0,U.jsx)(V7,{resource:e},f5(e)))})]}):null]})},Mqe=()=>{let e=Er([hf,yp,om,fu,Jl]),{search:t,onChange:n}=_C(),r=B(e=>a5(e,{search:t})).filter(e=>!e?.deletedAt),i=Math.min(r.length,H7),a=t===``,o=e.isInitialLoading,s=!a&&
183!o&&r.length===0,c=!a&&o,l=`Displaying ${i} of ${r.length} results`,u=s?(0,U.jsx)(`div`,{className:`mt-4 text-black-500`,children:`No results found for this search query.`}):a?(0,U.jsxs)(`div`,{className:`mt-4`,children:[(0,U.jsx)(`div`,{className:`text-black-300 text-center`,children:`Search for Stacks, Environments, Apps, Databases, and Endpoints by Name, Type, or ID.`}),(0,U.jsx)(`hr`,{className:`text-black-300 my-4`}),(0,U.jsx)(jqe,{})]}):(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`div`,{className:`text-gray-500 mt-4 text-base`,children:l}),(0,U.jsx)(`div`,{children:r.slice(0,H7).map(e=>(0,U.jsx)(V7,{resource:e},f5(e)))})]});return(0,U.jsxs)(r5,{children:[(0,U.jsxs)(W,{variant:`horizontal`,size:`sm`,className:`items-center mt-4`,children:[(0,U.jsx)(YH,{search:t,onChange:n,autoFocus:!0}),(0,U.jsx)(LU,{isLoading:c})]}),(0,U.jsx)(`div`,{className:`mt-2`,children:u})]})},Nqe=()=>{let{id:e=``}=F();return(0,U.jsx)(ae,{to:Ta(e),replace:!0})},Pqe=e=>e.startsWith(`*`),U7=({from:e,to:t})=>{let n=u(bm({from:e,to:t}));return(0,U.jsxs)(`div`,{className:`flex justify-between items-center gap-2 border p-4 rounded-lg`,children:[(0,U.jsxs)(W,{size:`sm`,children:[(0,U.jsx)(`div`,{className:`font-semibold`,children:`CNAME`}),(0,U.jsxs)(W,{variant:`horizontal`,size:`sm`,children:[(0,U.jsx)(`div`,{className:`w-[50px] font-bold`,children:`From`}),(0,U.jsx)(z2,{text:e})]}),(0,U.jsxs)(W,{variant:`horizontal`,size:`sm`,children:[(0,U.jsx)(`div`,{className:`w-[50px] font-bold`,children:`To`}),(0,U.jsx)(z2,{text:t})]})]}),(0,U.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,U.jsx)(`div`,{children:n.meta.success?(0,U.jsx)(aA,{text:`DNS check succeeded`,children:(0,U.jsx)(HE,{color:`#00633F`})}):(0,U.jsx)(aA,{text:`DNS check failed`,children:(0,U.jsx)(JE,{color:`#AD1A1A`})})}),(0,U.jsx)(K,{onClick:()=>{n.trigger()},isLoading:n.isLoading,children:`Check`})]})]})},Fqe=({domain:e,targetHost:t})=>(0,U.jsx)(`div`,{className:`border p-4 rounded-lg bg-yellow-50 border-yellow-200`,children:(0,U.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,U.jsx)(`div`,{className:`text-yellow-600 mt-1`,children:`â ï¸`}),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`div`,{className:`font-semibold text-yellow-800 mb-2`,children:`Wildcard Domain Configuration`}),(0,U.jsxs)(`p`,{className:`text-sm text-yellow-700 mb-3`,children:[`Since you're using a wildcard domain (`,(0,U.jsx)(`code`,{className:`bg-yellow-100 px-1 rounded`,children:e}),`), you'll need to create CNAME records for each specific subdomain you want to use for this endpoint.`]}),(0,U.jsxs)(`div`,{className:`text-sm text-yellow-700`,children:[(0,U.jsx)(`strong`,{children:`Example:`}),` For subdomains like`,` `,(0,U.jsxs)(`code`,{className:`bg-yellow-100 px-1 rounded`,children:[`api.`,e.slice(2)]}),` `,`or`,` `,(0,U.jsxs)(`code`,{className:`bg-yellow-100 px-1 rounded`,children:[`app.`,e.slice(2)]}),`, create:`]}),(0,U.jsxs)(`div`,{className:`mt-2 space-y-1 text-sm font-mono bg-yellow-100 p-2 rounded`,children:[(0,U.jsxs)(`div`,{children:[`api.`,e.slice(2),` â `,t]}),(0,U.jsxs)(`div`,{children:[`app.`,e.slice(2),` â `,t]}),(0,U.jsx)(`div`,{className:`text-yellow-600`,children:`...any other subdomains you need`})]})]})]})}),Iqe=({enp:e})=>{let t=Mm(e).hostname,n=Pqe(e.userDomain);return!e.acme||!e.userDomain||!t||t===`New Endpoint`?null:(0,U.jsxs)(`div`,{className:`mb-6`,children:[(0,U.jsx)(`h3`,{className:G.type.h3,children:`DNS Routing Configuration`}),(0,U.jsxs)(`div`,{className:`mb-4`,children:[n?(0,U.jsx)(`p`,{className:`mb-2`,children:`For wildcard domains, you need to create CNAME records for each specific subdomain you want to use to route traffic to this endpoint.`}):(0,U.jsx)(`p`,{className:`mb-2`,children:`To configure your custom domain, you need to create CNAME record(s) to route traffic from your custom domain to this endpoint.`}),(0,U.jsx)(`p`,{className:`text-sm text-gray-600`,children:n?(0,U.jsx)(U.Fragment,{children:`This is in addition to the SSL certificate validation records below.`}):(0,U.jsx)(U.Fragment,{children:`This is separate from the SSL certificate validation records below and is required for your domain to actually reach your application.`})})]}),(0,U.jsx)(`div`,{className:`flex flex-col gap-4`,children:n?(0,U.jsx)(Fqe,{domain:e.userDomain,targetHost:t}):(0,U.jsx)(U7,{from:e.userDomain,to:t})})]})},Lqe=({challenge:e})=>(0,U.jsx)(`div`,{children:e.to.map(t=>t.legacy?null:(0,U.jsx)(U7,{from:e.from.name,to:t.name},`${e.from.name}-${t.name}`))}),Rqe=()=>{let{id:e=``}=F(),t=l(),n=N(),r=B(t=>Lp(t,{id:e})),i=r.acmeConfiguration?.challenges||[],a=gm({id:e}),o=()=>{t(a)},s=I(a);return T(s,()=>{n(Ta(r.id))}),(0,U.jsx)(Z,{children:(0,U.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,U.jsx)(Iqe,{enp:r}),(0,U.jsx)(`h3`,{className:G.type.h3,children:`Managed HTTPS Validation Records`}),(0,U.jsx)(`div`,{children:r.internal?(0,U.jsxs)(U.Fragment,{children:[`In addition to the DNS routing record above, create the following CNAME records for SSL certificate validation via the DNS provider you use for `,(0,U.jsx)(`strong`,{children:r.userDomain}),`. These records enable automated SSL certificate provisioning using the DNS-01 challenge method.`]}):(0,U.jsxs)(U.Fragment,{children:[`Create the following CNAME records via the DNS provider you use for `,(0,U.jsx)(`strong`,{children:r.userDomain}),`. These records enable SSL certificate validation.`]})}),(0,U.jsx)(`div`,{className:`flex flex-col gap-4`,children:i.map(e=>(0,U.jsx)(Lqe,{challenge:e},e.from.name))}),(0,U.jsx)(`div`,{children:`Once you've done so, click the "I created the records" button, and Aptible will attempt to generate a new SSL certificate for your domain.`}
183),(0,U.jsxs)(`div`,{children:[r.acmeStatus===`pending`?(0,U.jsx)(`p`,{children:`Note: you have not provided a transitional certificate. Your app will be temporarily unavailable once you switch over DNS.`}):null,r.acmeStatus===`transitioning`?(0,U.jsx)(`p`,{children:`Note: you have provided a transitional certificate. Your app will be available once you switch over DNS, and Managed HTTPS setup will happen in the background.`}):null]}),(0,U.jsx)(K,{className:`w-[200px]`,isLoading:s.isLoading,onClick:o,children:`I created the records`})]})})},zqe=()=>{let{id:e=``}=F();return(0,U.jsx)(Tze,{enpId:e})},Bqe={port:e=>{if(e.enpType!==`tls`&&e.enpType!==`tcp`)return L4(e.containerPort)},ports:e=>{if(e.enpType===`tls`||e.enpType===`tcp`){let t=[];return e.containerPorts.forEach(e=>{L4(e.toString())&&t.push(`[${e}] is not between 1 and 65535`)}),t.length===0?void 0:t.join(`, `)}},ipAllowlist:e=>I4(e.ipAllowlist),cert:e=>{if(e.requiresCert&&e.certId===``&&e.cert===``)return`A certificate is required for custom HTTPS`},privKey:e=>{if(e.requiresCert&&e.certId===``&&e.privKey===``)return`A private key is required for custom HTTPS`},domain:e=>{if(e.shared&&e.requiresCert&&(!e.domain||e.domain.trim()===``))return`A domain is required for shared endpoints with a certificate.`}},Vqe=({endpointId:e})=>{let t=N(),n=l();u(am({id:e}));let r=B(t=>Lp(t,{id:e}));u(oS({id:r.currentSettingId}));let i=B(e=>aS(e,{id:r.currentSettingId})),a=B(e=>Eu(e,{id:r.serviceId})),o=B(e=>rf(e,{id:a.appId}));u(Xv({id:o.currentImageId}));let s=B(e=>Zv(e,{id:o.currentImageId})).exposedPorts,c=r.ipWhitelist.join(` 184`),d=r.containerPorts.join(`, `),[f,p]=(0,V.useState)(c),[m,h]=(0,V.useState)(r.containerPort),[g,_]=(0,V.useState)(d),[v,y]=(0,V.useState)(r.certificateId),[b,x]=(0,V.useState)(``),[S,C]=(0,V.useState)(``),[w,E]=(0,V.useState)(r.tokenHeader),[D,O]=(0,V.useState)(r.lbAlgorithm),[k,A]=(0,V.useState)(r.shared),[j,M]=(0,V.useState)(r.userDomain),[ee,te]=(0,V.useState)(!1),ne=i.settings??{},[re,ie]=(0,V.useState)(ne.IDLE_TIMEOUT??``),[ae,oe]=(0,V.useState)(ne.FORCE_SSL??``),[se,ce]=(0,V.useState)(ne.MAINTENANCE_PAGE_URL??``),[le,ue]=(0,V.useState)(ne.STRICT_HEALTH_CHECKS??``),[de,fe]=(0,V.useState)(ne.SSL_PROTOCOLS_OVERRIDE??``),[pe,me]=(0,V.useState)(ne.SSL_CIPHERS_OVERRIDE??``),[he,ge]=(0,V.useState)(ne.DISABLE_WEAK_CIPHER_SUITES??``),[_e,ve]=(0,V.useState)(ne.SHOW_ELB_HEALTHCHECKS??``),[ye,be]=(0,V.useState)(ne.RELEASE_HEALTHCHECK_TIMEOUT??``);(0,V.useEffect)(()=>{p(c)},[c]),(0,V.useEffect)(()=>{h(r.containerPort)},[r.containerPort]),(0,V.useEffect)(()=>{_(d)},[d]),(0,V.useEffect)(()=>{y(r.certificateId)},[r.certificateId]),(0,V.useEffect)(()=>{E(r.tokenHeader)},[r.tokenHeader]),(0,V.useEffect)(()=>{O(r.lbAlgorithm)},[r.lbAlgorithm]),(0,V.useEffect)(()=>{A(r.shared)},[r.shared]),(0,V.useEffect)(()=>{M(r.userDomain)},[r.userDomain]),(0,V.useEffect)(()=>{ie(i.settings?.IDLE_TIMEOUT??``)},[i.settings?.IDLE_TIMEOUT]),(0,V.useEffect)(()=>{oe(i.settings?.FORCE_SSL??``)},[i.settings?.FORCE_SSL]),(0,V.useEffect)(()=>{ce(i.settings?.MAINTENANCE_PAGE_URL??``)},[i.settings?.MAINTENANCE_PAGE_URL]),(0,V.useEffect)(()=>{ue(i.settings?.STRICT_HEALTH_CHECKS??``)},[i.settings?.STRICT_HEALTH_CHECKS]),(0,V.useEffect)(()=>{fe(i.settings?.SSL_PROTOCOLS_OVERRIDE??``)},[i.settings?.SSL_PROTOCOLS_OVERRIDE]),(0,V.useEffect)(()=>{me(i.settings?.SSL_CIPHERS_OVERRIDE??``)},[i.settings?.SSL_CIPHERS_OVERRIDE]),(0,V.useEffect)(()=>{ge(i.settings?.DISABLE_WEAK_CIPHER_SUITES??``)},[i.settings?.DISABLE_WEAK_CIPHER_SUITES]),(0,V.useEffect)(()=>{ve(i.settings?.SHOW_ELB_HEALTHCHECKS??``)},[i.settings?.SHOW_ELB_HEALTHCHECKS]),(0,V.useEffect)(()=>{be(i.settings?.RELEASE_HEALTHCHECK_TIMEOUT??``)},[i.settings?.RELEASE_HEALTHCHECK_TIMEOUT]);let xe=(()=>{if(re===``)return;let e=Number(re);if(!Number.isInteger(e)||e<30||e>2400)return`Must be between 30 and 2400 seconds`})(),Se=(()=>{if(ye===``)return;let e=Number(ye);if(!Number.isInteger(e)||e<1||e>900)return`Must be between 1 and 900 seconds`})(),P=(()=>{if(se!==``)try{let e=new URL(se);if(e.protocol!==`http:`&&e.protocol!==`https:`)return`Must be an http or https URL`}catch{return`Must be a valid URL`}})(),Ce=r.type===`http`||r.type===`http_proxy_protocol`,we=e=>Tm(e,r.type,r.platform),Te=i.settings??{},Ee=(e,t)=>t!==(Te[e]??``),F={...we(`FORCE_SSL`)&&Ee(`FORCE_SSL`,ae)?{FORCE_SSL:ae}:{},...we(`IDLE_TIMEOUT`)&&Ee(`IDLE_TIMEOUT`,re)?{IDLE_TIMEOUT:re}:{},...we(`MAINTENANCE_PAGE_URL`)&&Ee(`MAINTENANCE_PAGE_URL`,se)?{MAINTENANCE_PAGE_URL:se}:{},...we(`STRICT_HEALTH_CHECKS`)&&Ee(`STRICT_HEALTH_CHECKS`,le)?{STRICT_HEALTH_CHECKS:le}:{},...we(`SSL_PROTOCOLS_OVERRIDE`)&&Ee(`SSL_PROTOCOLS_OVERRIDE`,de)?{SSL_PROTOCOLS_OVERRIDE:de}:{},...we(`SSL_CIPHERS_OVERRIDE`)&&Ee(`SSL_CIPHERS_OVERRIDE`,pe)?{SSL_CIPHERS_OVERRIDE:pe}:{},...we(`DISABLE_WEAK_CIPHER_SUITES`)&&Ee(`DISABLE_WEAK_CIPHER_SUITES`,he)?{DISABLE_WEAK_CIPHER_SUITES:he}:{},...we(`SHOW_ELB_HEALTHCHECKS`)&&Ee(`SHOW_ELB_HEALTHCHECKS`,_e)?{SHOW_ELB_HEALTHCHECKS:_e}:{},...we(`RELEASE_HEALTHCHECK_TIMEOUT`)&&Ee(`RELEASE_HEALTHCHECK_TIMEOUT`,ye)?{RELEASE_HEALTHCHECK_TIMEOUT:ye}:{}},De=JSON.stringify(Object.entries(Te).sort())===JSON.stringify(Object.entries(F).sort()),Oe={id:e,ipAllowlist:Nm(f),containerPort:m,containerPorts:Pm(g),certId:ee?``:v,envId:a.environmentId,cert:b,privKey:S,tokenHeader:Ce?w:void 0,lbAlgorithm:r.type.startsWith(`http`)?D:void 0,shared:Ce&&r.platform===`alb`?k:!1,requiresCert:Cm(r),enpType:r.type,domain:r.type.startsWith(`http`)&&k?j:void 0,settings:F},ke=c===f,Ae=r.containerPort===m,je=d===g,Me=r.certificateId===v,Ne=r.tokenHeader===w,Pe=r.lbAlgorithm===D,Fe=r.shared===k,Ie=r.userDomain===j,Le=ke&&Ae&&je&&Me&&b===``&&Ne&&Pe&&Fe&&Ie&&De&&r.status===`provisioned`,Re=Dm(r,s),ze=_m(Oe),Be=I(_m),[Ve,He]=QS(Bqe),Ue=e=>{e.preventDefault(),!Le&&He(Oe)&&(xe||Se||P||n(ze))};T(Be,()=>{t(Ta(e))});let We=(0,U.jsxs)(J,{htmlFor:`existing-cert`,label:`Certificate`,feedbackMessage:Ve.cert,feedbackVariant:Ve.cert?`danger`:`info`,children:[ee?null:(0,U.jsx)(G6,{envId:o.environmentId,selectedId:v,onSelect:e=>y(e.value),className:`mb-2`}),(0,U.jsx)(ZH,{label:`Create a New Certificate`,name:`new-cert`,checked:ee,onChange:e=>te(e.currentTarget.checked)})]}),Ge=(0,U.jsx)(J,{htmlFor:`cert`,label:`New Certificate`,feedbackMessage:Ve.cert,feedbackVariant:Ve.cert?`danger`:`info`,description:(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`p`,{children:`Drag and drop your certificate file or paste its contents in the textarea below.`}),(0,U.jsx)(`p`,{children:`If you have a bundled certificate chain, drag and drop all of the certificate files or paste their contents in the textarea below.`})]}),children:(0,U.jsx)(dU,{id:`cert`,"aria-label":`cert`,onValueChange:x,value:b})}),Ke=(0,U.jsx)(J,{htmlFor:`private-key`,label:`Private Key for New Certificate`,description:`Drag and drop your private key file or paste its contents in the textarea below.`,feedbackMessage:Ve.privKey,feedbackVariant:Ve.privKey?`danger`:`info`,children:(0,U.jsx)(dU,{id:`private-key`,"aria-label":`private-key`,onValueChange:C,value:S})}),qe=a.appId&&Oe.requiresCert?(0,U.jsxs)(U.Fragment,{children:[We,ee?Ge:null,ee?Ke:null]}):null,Je=a.appId?wm(r)?(0,U.jsx)(J,{label:`Container Ports`,description:`Current container ports: ${Re}`,htmlFor:`ports`,feedbackMessage:Ve.ports,feedbackVariant:Ve.ports?`danger`:`info`,children:(0,U.jsx)(X,{type:`text`,id:`ports`,name:`ports`,value:g,onChange:e=>_(e.currentTarget.value)})}):(0,U.jsx)(J,{label:`Container Port`,description:`Current container port: ${Re}`,htmlFor:`port`,feedbackMessage:Ve.port,feedbackVariant:Ve.port?`danger`:`info`,children:(0,U.jsx)(X,{type:`text`,id:`port`,name:`port`,value:m,onChange:e=>h(e.currentTarget.value)})}):null,Ye=Ce?(0,U.jsx)(J,{label:`Header Authentication Value`,htmlFor:`token-header`,description:`The 'X-Origin-Token' header value. When set, clients will be required to pass a 185 'X-Origin-Token' header matching this value. Token header may only contain letters, numbers, 186 '_', '-', ':', and '.'`,children:(0,U.jsx)(X,{type:`text`,id:`token-header`,name:`token-header`,value:w,onChange:e=>E(e.currentTarget.value)})}):null,Xe=Object.keys(Fm).map(e=>({label:e,value:Fm[e]}
186)),Ze=r.platform===`alb`?(0,U.jsx)(J,{label:`Load Balancing Algorithm`,htmlFor:`lb-algorithm`,description:`Choose the load balancing algorithm for this ALB endpoint.`,children:(0,U.jsx)(XA,{ariaLabel:`Load Balancing Algorithm`,id:`lb-algorithm`,value:D,options:Xe,onSelect:e=>O(e.value)})}):null,Qe;r.shared?Qe=`Shared endpoints cannot be converted to dedicated endpoints.`:k&&(Qe=`Warning: Once saved, shared endpoints cannot be converted back to dedicated endpoints.`);let $e=Ce&&r.platform===`alb`?(0,U.jsx)(J,{label:`Shared Endpoint`,htmlFor:`shared`,description:(0,U.jsxs)(U.Fragment,{children:[`Share a load balancer across apps for a reduced per-endpoint rate. Highly recommended for non-production resources.`,` `,(0,U.jsx)(CA,{href:`https://www.aptible.com/docs/core-concepts/apps/connecting-to-apps/app-endpoints/https-endpoints/shared-endpoints#shared-endpoints`,children:`Learn more`})]}),feedbackMessage:Qe,feedbackVariant:r.shared?void 0:`danger`,children:(0,U.jsx)(ZH,{label:`Enable shared endpoint`,name:`shared`,checked:k??!1,disabled:r.shared??!1,onChange:e=>A(e.currentTarget.checked)})}):null,et=r.type.startsWith(`http`)&&k&&!r.shared&&Oe.requiresCert?(0,U.jsx)(J,{label:`Domain Name`,htmlFor:`domain`,description:`Wildcard domains are not supported.`,feedbackMessage:Ve.domain,feedbackVariant:Ve.domain?`danger`:`info`,children:(0,U.jsx)(X,{type:`text`,id:`domain`,name:`domain`,value:j,onChange:e=>M(e.currentTarget.value)})}):null,tt=(0,U.jsx)(U6,{applies:we,sslProtocolsOptions:Em(Ce&&r.platform===`alb`),ipAllowlist:f,onIpAllowlistChange:p,ipAllowlistError:Ve.ipAllowlist,forceSSL:ae,onForceSSLChange:oe,sslProtocolsOverride:de,onSslProtocolsOverrideChange:fe,sslCiphersOverride:pe,onSslCiphersOverrideChange:me,disableWeakCipherSuites:he,onDisableWeakCipherSuitesChange:ge,tokenFormSlot:Ye});return(0,U.jsxs)(Z,{children:[(0,U.jsx)(`h1`,{className:`text-lg text-gray-500 mb-4`,children:`Endpoint Settings`}),(0,U.jsxs)(`form`,{onSubmit:Ue,className:`flex flex-col gap-4`,children:[Je,qe,$e,et,(0,U.jsxs)(`div`,{className:`border-y border-gray-200 divide-y divide-gray-200`,children:[tt,(0,U.jsx)(W6,{applies:we,strictHealthChecks:le,onStrictHealthChecksChange:ue,releaseHealthcheckTimeout:ye,onReleaseHealthcheckTimeoutChange:be,releaseHealthcheckTimeoutError:Se,idleTimeout:re,onIdleTimeoutChange:ie,idleTimeoutError:xe,showElbHealthchecks:_e,onShowElbHealthchecksChange:ve,maintenancePageUrl:se,onMaintenancePageUrlChange:ce,maintenancePageUrlError:P,lbAlgorithmSlot:Ze})]}),(0,U.jsx)(TA,{...Be}),(0,U.jsx)(hA,{type:`submit`,envId:a.environmentId,isLoading:Be.isLoading,className:`w-40`,disabled:Le,children:`Save Changes`})]})]})},Hqe=()=>{let{id:e=``}=F(),t=B(t=>Lp(t,{id:e})),n=B(e=>Eu(e,{id:t.serviceId}));return(0,U.jsxs)(W,{variant:`vertical`,size:`lg`,children:[(0,U.jsx)(Vqe,{endpointId:e}),(0,U.jsx)(vLe,{endpointId:e,envId:n.environmentId})]})};function W7(e){return{orgId:e.id,orgName:e.name}}var G7={CONTAINER_EFFICIENCY_POPOVER_OPEN:`home.dash.container_efficiency.popover_open`,CONTAINER_EFFICIENCY_RECOMMENDATIONS_CLICK:`home.dash.container_efficiency.recommendations_click`,CONTAINER_EFFICIENCY_EMPTY_STATE_CTA:`home.dash.container_efficiency.empty_state_cta`,LAST_DEPLOY_EMPTY_DEPLOY_CTA:`home.dash.last_deploy.empty_deploy_cta`,LAST_DEPLOY_CONNECT_SOURCE_CTA:`home.dash.last_deploy.connect_source_cta`,LAST_DEPLOY_APP_LINK_CLICK:`home.dash.last_deploy.app_link_click`,LAST_DEPLOY_SOURCE_LINK_CLICK:`home.dash.last_deploy.source_link_click`,COMPLIANCE_CARD_OPEN:`home.dash.compliance.card_open`,COMPLIANCE_BADGE_PREVIEW_OPEN:`home.dash.compliance.badge_preview_open`,COMPLIANCE_BADGE_DOWNLOAD:`home.dash.compliance.badge_download`,COMPLIANCE_DEDICATED_STACK_CTA:`home.dash.compliance.dedicated_stack_cta`,COMPLIANCE_MODAL_CTA:`home.dash.compliance.modal_cta`,OVERVIEW_DEDICATED_STACKS_CLICK:`home.dash.overview.dedicated_stacks_click`,OVERVIEW_ENVIRONMENTS_CLICK:`home.dash.overview.environments_click`,OVERVIEW_APPS_CLICK:`home.dash.overview.apps_click`,OVERVIEW_DATABASES_CLICK:`home.dash.overview.databases_click`,RECENTLY_VIEWED_RESOURCE_CLICK:`home.dash.recently_viewed.resource_click`,ACTIVITY_FEED_VIEW_ALL_CLICK:`home.dash.activity_feed.view_all_click`};function K7(e,t){Ys(e,JSON.stringify(t))}var q7=(e,t)=>!e&&t===0,Uqe=()=>{let e=B(ns),t=Er([Jl,hf,yp,fu]),n=I(Jl),r=I(hf),i=I(yp),a=I(fu),o=I($y),s=B(e=>Vl(e)),c=B(uf),l=B(e=>CS(e,{search:``,sortBy:`savings`,sortDir:`desc`})),u=B(au),d=B(L.costs.selectTable),f=s.filter(e=>Gl(e)===`dedicated`).length,p=Object.keys(u).length,m=c.length,h=l.length,g=q7(n.isSuccess,f),_=q7(a.isSuccess,p),v=q7(r.isSuccess,m),y=q7(i.isSuccess,h),b=t.isInitialLoading||o.isInitialLoading||!s||!d,x=B(fb);return(0,U.jsx)(`div`,{children:(0,U.jsx)(Z,{size:`md`,className:`divi
186de-x divide-gray-300`,children:(0,U.jsxs)(`div`,{className:`grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-5 items-stretch`,children:[(0,U.jsxs)(`div`,{className:`p-3 flex flex-col items-center justify-between h-full`,children:[(0,U.jsx)(`div`,{className:`flex items-start gap-1.5 text-gray-500 mb-2`,children:(0,U.jsx)(`h3`,{className:`text-sm font-medium text-gray-600`,children:`Dedicated Stacks`})}),g?(0,U.jsx)(y8,{}):(0,U.jsx)(P,{to:ho(),className:`text-2xl sm:text-3xl font-semibold text-blue-600 hover:text-blue-800`,onClick:()=>K7(G7.OVERVIEW_DEDICATED_STACKS_CLICK,{...W7(e)}),children:f})]}),(0,U.jsxs)(`div`,{className:`p-3 flex flex-col items-center justify-between h-full`,children:[(0,U.jsx)(`div`,{className:`flex items-start gap-1.5 text-gray-500 mb-2`,children:(0,U.jsx)(`h3`,{className:`text-sm font-medium text-gray-600`,children:`Environments`})}),_?(0,U.jsx)(y8,{}):(0,U.jsx)(P,{to:Ma(),className:`text-2xl sm:text-3xl font-semibold text-blue-600 hover:text-blue-800`,onClick:()=>K7(G7.OVERVIEW_ENVIRONMENTS_CLICK,{...W7(e)}),children:p})]}),(0,U.jsxs)(`div`,{className:`p-3 flex flex-col items-center justify-between h-full`,children:[(0,U.jsx)(`div`,{className:`flex items-start gap-1.5 text-gray-500 mb-2`,children:(0,U.jsx)(`h3`,{className:`text-sm font-medium text-gray-600`,children:`Apps`})}),v?(0,U.jsx)(y8,{}):(0,U.jsx)(P,{to:Xi(),className:`text-2xl sm:text-3xl font-semibold text-blue-600 hover:text-blue-800`,onClick:()=>K7(G7.OVERVIEW_APPS_CLICK,{...W7(e)}),children:m})]}),(0,U.jsxs)(`div`,{className:`p-3 flex flex-col items-center justify-between h-full`,children:[(0,U.jsx)(`div`,{className:`flex items-start gap-1.5 text-gray-500 mb-2`,children:(0,U.jsx)(`h3`,{className:`text-sm font-medium text-gray-600`,children:`Managed Databases`})}),y?(0,U.jsx)(y8,{}):(0,U.jsx)(P,{to:ma(),className:`text-2xl sm:text-3xl font-semibold text-blue-600 hover:text-blue-800`,onClick:()=>K7(G7.OVERVIEW_DATABASES_CLICK,{...W7(e)}),children:h})]}),(0,U.jsxs)(`div`,{className:`p-3 flex flex-col items-center justify-between h-full`,children:[(0,U.jsxs)(`div`,{className:`flex items-start gap-1.5 text-gray-500 mb-2`,children:[(0,U.jsx)(`h3`,{className:`text-sm font-medium text-gray-600`,children:`Est. Monthly Cost`}),(0,U.jsx)(_U,{})]}),b?(0,U.jsx)(y8,{widthClass:`w-24`}):(0,U.jsx)(`div`,{className:`text-2xl sm:text-3xl font-semibold`,children:ub(x)})]})]})})})},Wqe=1800,Gqe=250,Kqe={scale_down:`bg-indigo-200`,scale_up:`bg-red-500`,rightsized:`bg-gray-200`,autoscaled:`bg-gray-200`},qqe={scale_down:`border-indigo-200`,scale_up:`border-red-500`,rightsized:`border-gray-200`,autoscaled:`border-gray-200`};function J7(e){let t={scale_down:0,scale_up:0,rightsized:0,autoscaled:0};for(let n of e)t[n.segmentState]++;return t}var Jqe=[`scale_up`,`scale_down`,`rightsized`];function Yqe(e,t){return e===`rightsized`?t===`app`?gx:hx.rightsized:hx[e]}function Y7(e){return Jqe.map(t=>({state:t,label:Yqe(t,e),fill:Kqe[t],border:qqe[t]}))}function Xqe(e,t){let n=e.length,r=J7(e),i=n===0?0:Math.round(r.scale_down/n*100),a=n===0?0:Math.round(r.scale_up/n*100),o={scale_up:a,scale_down:i,rightsized:n===0?0:100-i-a};return Y7(t).map(e=>({...e,pct:o[e.state]}))}function X7(e){let t=J7(e);return{under:{count:t.scale_up},over:{count:t.scale_down}}}function Z7(e,t){if(t===0||e===0)return`0`;let n=e/t*100,r=Math.round(n);if(r>=1)return String(r);let i=n.toFixed(1);return i===`0.0`?`<0.1`:i}function Q7({items:e,variant:t,animate:n=!1}){let r=Xqe(e,t),i=r.reduce((e,t)=>e+t.pct,0),a=n&&i>0,[o,s]=(0,V.useState)(()=>a?r.map(()=>0):r.map(e=>e.pct)),c=(0,V.useRef)(!1),l=r.map(e=>e.pct).join(`,`);(0,V.useEffect)(()=>{c.current=!1,s(a?r.map(()=>0):r.map(e=>e.pct))},[l,a]),(0,V.useEffect)(()=>{if(!a||c.current)return;c.current=!0;let e=r.map(e=>e.pct);requestAnimationFrame(()=>{requestAnimationFrame(()=>{s(e)})})},[a,l]);let u=r.map((e,t)=>`${o[t]??e.pct}% ${e.label}`).join(`, `),d=e.length===0;return(0,U.jsx)(`div`,{className:`w-full rounded-none bg-gray-100 box-border overflow-hidden border border-gray-500`,style:{height:14},role:`group`,"aria-label":u,children:(0,U.jsx)(`div`,{className:`flex h-full w-full min-w-0 overflow-hidden rounded-none box-border`,children:d?null:r.map((e,t)=>{let n=a?o[t]??0:e.pct,i=t===r.length-1;return(0,U.jsx)(`div`,{className:`relative min-w-0 rounded-none transition-[width] duration-500 ease-out ${t>0?`-ml-0.5`:``} ${t===0?`z-30`:t===1?`z-20`:`z-10`} ${i?`flex-1 min-w-0`:`flex-shrink-0`}`,style:{width:`${n}%`,...i?{minWidth:0}:{}},children:n>0?(0,U.jsx)(`div`,{className:`h-full w-full rounded-none border-2 box-border ${e.fill} ${e.border}`}):null},e.label)})})})}function $7({variant:e,under:t,over:n,totalItems:r,org:i}){let a=e===`database`?`Database Container Efficiency`:`App Service Container Efficiency`,o=t.count>
1860||n.count>0,s=e===`database`?`${pte(`scalerec:scale*`)}&sortBy=cost&sortDir=desc`:`${kte(`scalerec:scale*`)}&sortBy=cost&sortDir=desc`;return(0,U.jsxs)(`div`,{className:`flex min-w-full flex-col gap-1.5`,children:[(0,U.jsx)(`div`,{className:`font-semibold text-gray-900 pb-0.5`,children:a}),t.count>0&&(0,U.jsxs)(`div`,{className:`flex gap-2`,children:[(0,U.jsx)(`span`,{className:`inline-block h-2.5 w-2.5 flex-shrink-0 rounded-full border-2 border-red-500 bg-red-500 mt-0.5`,"aria-hidden":!0}),(0,U.jsx)(`div`,{className:`flex flex-col`,children:(0,U.jsxs)(`span`,{children:[`Under-provisioned:`,` `,Z7(t.count,r),`% (`,t.count,`)`]})})]}),n.count>0&&(0,U.jsxs)(`div`,{className:`flex gap-2`,children:[(0,U.jsx)(`span`,{className:`inline-block h-2.5 w-2.5 flex-shrink-0 rounded-full border-2 border-indigo-200 bg-indigo-200 mt-0.5`,"aria-hidden":!0}),(0,U.jsx)(`div`,{className:`flex flex-col`,children:(0,U.jsxs)(`span`,{children:[`Over-provisioned:`,` `,Z7(n.count,r),`% (`,n.count,`)`]})})]}),t.count===0&&n.count===0&&(0,U.jsx)(`span`,{children:`All containers are right-sized.`}),o&&(0,U.jsx)(`div`,{className:`mt-1`,children:(0,U.jsx)(P,{to:s,className:`underline`,onClick:()=>K7(G7.CONTAINER_EFFICIENCY_RECOMMENDATIONS_CLICK,{...W7(i),variant:e,underCount:t.count,overCount:n.count}),children:`See Recommendations`})})]})}function Zqe(){let e=Y7(`app`);return(0,U.jsx)(`div`,{className:`flex flex-wrap items-center gap-x-3 gap-y-1 text-xs text-gray-700`,children:e.map(e=>(0,U.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,U.jsx)(`span`,{className:`inline-block h-2.5 w-2.5 flex-shrink-0 rounded-full border-2 box-border ${e.fill} ${e.border}`,"aria-hidden":!0}),(0,U.jsx)(`span`,{children:e.label})]},e.label))})}var Qqe=()=>{let e=B(ns),t=Er([hf,Ru,yp,bx,Vm]),n=Pse(),r=Fse(),i=t.isInitialLoading,a=(0,V.useRef)(!t.isInitialLoading),[o,s]=(0,V.useState)(()=>a.current),[c,l]=(0,V.useState)(()=>a.current);(0,V.useEffect)(()=>{if(a.current)return;let e=setTimeout(()=>s(!0),Wqe);return()=>clearTimeout(e)},[]),(0,V.useEffect)(()=>{if(a.current){l(!0);return}if(i){l(!1);return}let e=setTimeout(()=>l(!0),Gqe);return()=>clearTimeout(e)},[i]);let u=i||!a.current&&(!o||!c),d=X7(u?[]:n),f=X7(u?[]:r),p=!u&&(r.length>0||n.length>0);return(0,U.jsxs)(`div`,{className:`flex flex-col h-full`,children:[(0,U.jsx)(`h2`,{className:`text-lg font-medium mb-4`,children:`Container Efficiency`}),(0,U.jsx)(`div`,{className:`bg-white rounded-lg border border-gray-200 shadow flex-1 p-4`,children:(0,U.jsxs)(`div`,{className:`flex flex-col gap-4`,"aria-busy":u,"aria-label":u?`Loading container efficiency`:void 0,children:[u?(0,U.jsxs)(`div`,{className:`flex items-center gap-3 w-full`,children:[(0,U.jsxs)(`div`,{className:`flex items-center gap-1.5 text-gray-600 w-36 flex-shrink-0`,children:[(0,U.jsx)(zE,{variant:`sm`,className:`flex-shrink-0`}),(0,U.jsx)(`span`,{className:`text-sm font-medium`,children:`App Service`})]}),(0,U.jsx)(`div`,{className:`flex-1 min-w-0 h-[14px] rounded-none bg-gray-200 animate-pulse`,style:{minHeight:14}})]}):r.length===0?(0,U.jsxs)(`div`,{className:`flex items-center gap-3 w-full`,children:[(0,U.jsxs)(`div`,{className:`flex items-center gap-1.5 text-gray-600 w-36 flex-shrink-0`,children:[(0,U.jsx)(zE,{variant:`sm`,className:`flex-shrink-0`}),(0,U.jsx)(`span`,{className:`text-sm font-medium`,children:`App Service`})]}),(0,U.jsxs)(`div`,{className:`flex-1 min-w-0 text-sm text-gray-600`,children:[`No apps.`,` `,(0,U.jsx)(P,{to:Ga(),className:`underline`,onClick:()=>K7(G7.CONTAINER_EFFICIENCY_EMPTY_STATE_CTA,{...W7(e),target:`deploy`}),children:`Deploy an app â`})]})]}):(0,U.jsx)(O4,{onOpenChange:t=>{t&&K7(G7.CONTAINER_EFFICIENCY_POPOVER_OPEN,{...W7(e),variant:`app`,itemCount:r.length})},trigger:(0,U.jsxs)(`div`,{className:`flex items-center gap-3 cursor-pointer w-full text-left min-w-0`,"aria-label":`App Service container efficiency: view breakdown and recommendations`,children:[(0,U.jsxs)(`div`,{className:`flex items-center gap-1.5 text-gray-600 w-36 flex-shrink-0`,children:[(0,U.jsx)(zE,{variant:`sm`,className:`flex-shrink-0`}),(0,U.jsx)(`span`,{className:`text-sm font-medium`,children:`App Service`})]}),(0,U.jsx)(`div`,{className:`flex-1 min-w-0`,children:(0,U.jsx)(Q7,{items:r,variant:`app`,animate:!0})})]}),placement:`top`,children:(0,U.jsx)($7,{variant:`app`,under:f.under,over:f.over,totalItems:r.length,org:e})}),u?(0,U.jsxs)(`div`,{className:`flex items-center gap-3 w-full`,children:[(0,U.jsxs)(`div`,{className:`flex items-center gap-1.5 text-gray-600 w-36 flex-shrink-0`,children:[(0,U.jsx)(LE,{variant:`sm`,className:`flex-shrink-0`}),(0,U.jsx)(`span`,{className:`text-sm font-medium`,children:`Database`})]}),(0,U.jsx)(`div`,{className:`flex-1 min-w-0 h-[14px] rounded-none bg-gray-200 animate-pulse`,style:{minHeight:14}})]}):n.length===0?(0,U.jsxs)(`div`,{className:`flex items-center gap-3 w-full`,children:[(0,U.jsxs)(`div`,{className:`flex items-center gap-1.5 text-gray-600 w-36 flex-shrink-0`,children:[(0,U.jsx)(LE,{variant:`sm`,className:`flex-shrink-0`}),(0,U.jsx)(`span`,{className:`text-sm font-medium`,children:`Database`})]}),(0,U.jsxs)(`div`,{className:`flex-1 min-w-0 text-sm text-gray-600`,children:[`No databases.`,` `,(0,U.jsx)(P,{to:Ua(),className:`underline`,onClick:()=>K7(G7.CONTAINER_EFFICIENCY_EMPTY_STATE_CTA,{...W7(e),target:`create_database`}),children:`Provision a database â`})]})]}):(0,U.jsx)(O4,{onOpenChange:t=>{t&&K7(G7.CONTAINER_EFFICIENCY_POPOVER_OPEN,{...W7(e),variant:`database`,itemCount:n.length})},trigger:(0,U.jsxs)(`div`,{className:`flex items-center gap-3 cursor-pointer w-full text-left min-w-0`,"aria-label":`Database container efficiency: view breakdown and recommendations`,children:[(0,U.jsxs)(`div`,{className:`flex items-center gap-1.5 text-gray-600 w-36 flex-shrink-0`,children:[(0,U.jsx)(LE,{variant:`sm`,className:`flex-shrink-0`}),(0,U.jsx)(`span`,{className:`text-sm font-medium`,children:`Database`})]}),(0,U.jsx)(`div`,{className:`flex-1 min-w-0`,children:(0,U.jsx)(Q7,{items:n,variant:`database`,animate:!0})})]}),placement:`top`,children:(0,U.jsx)($7,{variant:`database`,under:d.under,over:d.over,totalItems:n.length,org:e})}),p?(0,U.jsxs)(`div`,{className:`flex gap-3`,children:[(0,U.jsx)(`div`,{className:`w-36 flex-shrink-0`,"aria-hidden":!0}),(0,U.jsx)(`div`,{className:`flex-1 min-w-0`,children:(0,U.jsx)(Zqe,{})})]}):null]})})]})},$qe=()=>(0,U.jsxs)(`div`,{className:`flex flex-col h-full`,children:[(0,U.jsx)(`h2`,{className:`text-lg font-medium mb-4`,children:`Last Deploy`}),(0,U.jsx)(`div`,{className:`bg-white rounded-lg border border-gray-200 shadow flex-1`,children:(0,U.jsx)(`div`,{className:`p-4`,children:(0,U.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,U.jsx)(`div`,{className:`h-6 w-full bg-gray-200 rounded animate-pulse`}),(0,U.jsx)(`div`,{className:`h-px bg-gray-200 my-2`}),(0,U.jsx)(`div`,{className:`h-6 w-full bg-gray-200 rounded animate-pulse`})]})})})]}),eJe=({source:e,deployment:t,isLoading:n=!1,org:r})=>n?(0,U.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,U.jsx)(`span`,{className:`text-sm text-gray-600`,children:`Loading...`})}):!e||!t?(0,U.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,U.jsxs)(`span`,{className:`text-sm text-gray-600`,children:[`Commit data not available.`,` `]}),(0,U.jsx)(P,{to:Io(),className:`text-sm font-medium text-blue-600 hover:text-blue-800`,onClick:()=>K7(G7.LAST_DEPLOY_CONNECT_SOURCE_CTA,{...W7(r)}),children:`Connect Source â`})]}):(0,U.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,U.jsx)(h8,{source:e,className:`w-6 h-6`}),(0,U.jsx)(P,{to:Lo(e.id),className:`text-sm font-medium text-gray-900 hover:text-blue-600`,onClick:()=>K7(G7.LAST_DEPLOY_SOURCE_LINK_CLICK,{sourceId:e.id,...W7(r)}),children:e.displayName}),(0,U.jsx)(`span`,{className:`text-sm text-gray-500`,children:`|`}
186),(0,U.jsx)($2,{gitRef:t.gitRef,commitSha:t.gitCommitSha,commitUrl:t.gitCommitUrl})]}),tJe=()=>{let e=B(ns),t=Er([hf,Cl,Al]),n=B(e=>ff(e)),r=n?.deployment?.id,i=n?.app?.currentSourceId,a=(0,V.useMemo)(()=>jl({id:i||``}),[i]);u(a);let o=B(e=>i?Dl(e,{id:i}):null),s=(0,V.useMemo)(()=>wl({id:r||``}),[r]);u(s);let c=B(e=>r&&gl(e,{id:r})||n?.deployment),l=t.isInitialLoading,d=!!(t.isLoading||t.isInitialLoading||i&&!o||r&&!c),f=(0,V.useMemo)(()=>c?Pf({startDate:new Date().toISOString(),endDate:c.createdAt}):null,[c]);return l?(0,U.jsx)($qe,{}):(0,U.jsxs)(`div`,{className:`flex flex-col h-full`,children:[(0,U.jsx)(`h2`,{className:`text-lg font-medium mb-4`,children:`Last Deploy`}),(0,U.jsx)(`div`,{className:`bg-white rounded-lg border border-gray-200 shadow flex-1`,children:(0,U.jsx)(`div`,{className:`p-4`,children:n?(0,U.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,U.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,U.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,U.jsx)(`img`,{src:`/resource-types/logo-app.png`,className:`w-6 h-6`,"aria-label":`App`}),(0,U.jsx)(P,{to:ua(n.app.id),className:`text-sm font-medium text-gray-900 hover:text-blue-600`,onClick:()=>K7(G7.LAST_DEPLOY_APP_LINK_CLICK,{appId:n.app.id,...W7(e)}),children:n.app.handle})]}),(0,U.jsxs)(`div`,{className:`flex items-center gap-2`,children:[c&&(0,U.jsxs)(U.Fragment,{children:[c.status===`succeeded`&&(0,U.jsx)(aA,{text:`Deploy successful`,placement:`bottom`,fluid:!0,children:(0,U.jsx)(UE,{color:`#00633F`,variant:`sm`})}),c.status===`failed`&&(0,U.jsx)(aA,{text:`Deploy failed`,placement:`bottom`,fluid:!0,children:(0,U.jsx)(YE,{color:`#AD1A1A`,variant:`sm`})})]}),f&&(0,U.jsx)(`span`,{className:`text-sm text-gray-600`,children:f})]})]}),(0,U.jsx)(`div`,{className:`h-px bg-gray-200 my-2`}),(0,U.jsx)(eJe,{source:o,deployment:c,isLoading:d,org:e})]}):(0,U.jsx)(`div`,{className:`flex min-h-[80px] items-center justify-center`,children:(0,U.jsxs)(`div`,{className:`flex flex-col items-center gap-1 text-sm text-gray-500 text-center`,children:[(0,U.jsx)(`span`,{children:`No recent deployments found.`}),(0,U.jsx)(P,{to:Za(),className:`font-medium text-blue-600 hover:text-blue-800`,onClick:()=>K7(G7.LAST_DEPLOY_EMPTY_DEPLOY_CTA,{...W7(e)}),children:`Deploy an App â`})]})})})})]})},e9={success:`#00633F`,warn:`#b45309`,danger:`#EF4444`,default:`#6b7280`},t9=({progress:e,radius:t=32,strokeWidth:n=4,variant:r=`warn`,className:i=``})=>{let{normalizedRadius:a,circumference:o,strokeDashoffset:s,strokeColor:c}=(0,V.useMemo)(()=>{let i=Math.max(t-n*2,0),a=i*2*Math.PI;return{normalizedRadius:i,circumference:a,strokeDashoffset:a-Math.max(0,Math.min(e,100))/100*a,strokeColor:e9[r]??e9.default}},[e,t,n,r]),l=t*2;return(0,U.jsx)(`svg`,{className:i,height:l,width:l,role:`presentation`,viewBox:`0 0 ${l} ${l}`,children:(0,U.jsx)(`circle`,{stroke:c,fill:`transparent`,strokeWidth:n,strokeDasharray:`${o} ${o}`,strokeDashoffset:s,r:a,cx:t,cy:t,style:{transition:`stroke-dashoffset 0.35s ease`,transform:`rotate(-90deg)`,transformOrigin:`50% 50%`}})})},n9=({metrics:e,isLoading:t=!1,className:n=``})=>{let r=e.progressPercentage,i=e.status===`NO_SCOPE`;if(t)return(0,U.jsxs)(`div`,{className:(0,H.default)(`flex min-w-0 items-center gap-3`,n),children:[(0,U.jsx)(`div`,{className:`size-10 shrink-0 animate-pulse rounded-full bg-gray-200`}),(0,U.jsxs)(`div`,{className:`min-w-0 flex flex-col gap-1`,children:[(0,U.jsx)(`div`,{className:`h-3.5 w-10 animate-pulse rounded bg-gray-200`}),(0,U.jsx)(`div`,{className:`h-3 w-20 animate-pulse rounded bg-gray-100`})]})]});let a,o,s;return i?(a=`bg-gray-100`,o=`text-gray-500`,s=(0,U.jsx)(KE,{className:`size-6 shrink-0 text-gray-500`})):r===0?(a=`bg-red-100`,o=`text-red-500`,s=(0,U.jsx)(GE,{color:`#EF4444`,className:`size-6 shrink-0`})):r===100?(a=`bg-emerald-100`,o=`text-forest`,s=(0,U.jsx)(UE,{color:`#00633F`,className:`size-6 shrink-0`})):(a=`bg-amber-100`,o=`text-amber-700`,s=(0,U.jsx)(t9,{progress:r,radius:18,strokeWidth:3,variant:`warn`,className:`shrink-0`})),(0,U.jsxs)(`div`,{className:(0,H.default)(`flex min-w-0 items-center gap-3`,n),children:[(0,U.jsx)(`div`,{className:(0,H.default)(`flex size-10 shrink-0 items-center justify-center self-center rounded-full aspect-square`,a),children:s}),(0,U.jsxs)(`div`,{className:`min-w-0 flex flex-col`,children:[(0,U.jsx)(`span`,{className:(0,H.default)(`text-sm font-medium`,o),style:r===0&&!i?{color:`#EF4444`}:r===100&&!i?{color:`#00633F`}:void 0,children:i?`--`:`${r}%`}),(0,U.jsx)(`span`,{className:`text-xs text-gray-600`,children:i?`No in-scope resources`:e.implementationSummary})]})]})},nJe=`/assets/images/frameworks`,rJe=({metric:e,isActive:t,onToggle:n,isLoading:r})=>{let i=r,a=!i;return(0,U.jsxs)(`div`,{className:(0,H.default)(`relative flex flex-col rounded-lg border border-gray-200 bg-white p-4 shadow-sm min-w-0`,a&&`cursor-pointer`,t&&`border-2 border-indigo-500 bg-indigo-50 shadow-md`),role:`button`,tabIndex:a?0:-1,"aria-pressed":t,"aria-disabled":!a,onClick:()=>{a&&n(e.handle)},onKeyDown:t=>{a&&(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),n(e.handle))},"data-test-framework-card":e.handle,children:[e.logo?(0,U.jsx)(`img`,{src:`${nJe}/${e.logo}`,alt:e.name,className:`absolute right-3 top-3 h-9 w-9 object-contain opacity-90`}):null,(0,U.jsx)(`div`,{className:`flex flex-col items-center mb-3 mt-1`,children:(0,U.jsxs)(`div`,{className:`relative h-[76px] w-[76px]`,children:[(0,U.jsx)(`div`,{className:(0,H.default)(`absolute inset-1 rounded-full`,i?`bg-gray-100`:e.progressPercentage===0?`bg-red-100`:e.progressPercentage===100?`bg-emerald-100`:`bg-amber-100`)}),(0,U.jsx)(`div`,{className:`absolute inset-0 flex items-center justify-center`,children:i?(0,U.jsx)(`div`,{className:`h-12 w-12 animate-pulse rounded-full border-4 border-gray-200`}):e.progressPercentage===0?(0,U.jsx)(GE,{color:`#EF4444`}):(0,U.jsx)(t9,{progress:e.progressPercentage,radius:36,strokeWidth:4,variant:e.progressPercentage===100?`success`:e.progressPercentage===0?`danger`:`warn`})}),(0,U.jsx)(`span`,{className:(0,H.default)(`absolute inset-0 flex items-center justify-center font-normal text-base`,i&&`text-gray-400`,!i&&e.progressPercentage===0&&`text-red-500`,e.progressPercentage===100&&`text-forest`,e.progressPercentage>0&&e.progressPercentage<100&&`text-amber-700`),style:i?void 0:e.progressPercentage===0?{color:`#EF4444`}:e.progressPercentage===100?{color:`#00633F`}:void 0,"aria-hidden":`true`,children:i?`--`:`${e.progressPercentage}%`})]})}),(0,U.jsxs)(`div`,{className:`text-center mb-3`,children:[(0,U.jsx)(`h3`,{className:`text-sm font-semibold text-gray-900 mb-1 leading-tight`,children:e.name}),(0,U.jsx)(`p`,{className:`text-xs text-gray-600 leading-tight`,children:e.description})]}),(0,U.jsxs)(`div`,{className:`space-y-1 text-xs mb-3`,children:[(0,U.jsxs)(`div`,{className:`flex justify-between gap-2`,children:[(0,U.jsx)(`span`,{className:`text-gray-700 truncate`,children:`Controls`}),(0,U.jsx)(`span`,{className:`font-medium text-gray-900 flex-shrink-0`,children:i?`--`:e.controlCount})]}),(0,U.jsxs)(`div`,{className:`flex justify-between gap-2`,children:[(0,U.jsx)(`span`,{className:`text-gray-700 truncate`,children:`Checks Performed`}),(0,U.jsx)(`span`,{className:`font-medium text-gray-900 flex-shrink-0`,children:i?`--`:e.totalControlResourcesCount})]}),(0,U.jsxs)(`div`,{className:`flex justify-between gap-2`,children:[(0,U.jsx)(`span`,{className:`text-gray-700 truncate`,children:`Checks Passed`}),(0,U.jsx)(`span`,{className:`font-medium text-gray-900 text-right flex-shrink-0`,children:i?`--`:`${e.compliantControlResourcesCount} (${e.progressPercentage}% of total)`})]})]})]})},iJe=({metrics:e,selectedFrameworks:t,isLoading:n,onToggle:r,className:i=``})=>{let a=Object.values(e).sort((e,t)=>
186{let n=[`all`,`hipaa-required`,`hipaa-addressable`,`hitrust-inheritable`],r=n.indexOf(e.handle),i=n.indexOf(t.handle);return(r===-1?n.length:r)-(i===-1?n.length:i)}),o=Array.from({length:4});return(0,U.jsx)(`div`,{className:(0,H.default)(`w-full max-w-full min-w-0 grid grid-cols-1 sm:grid-cols-2 xl:grid-cols-4 gap-3`,i),children:a.length===0&&n?o.map((e,t)=>(0,U.jsx)(`div`,{className:`flex h-[260px] animate-pulse flex-col rounded-lg border border-gray-200 bg-white p-4 shadow-sm`},`framework-loading-${t}`)):a.map(e=>(0,U.jsx)(rJe,{metric:e,isActive:t.includes(e.handle),onToggle:r,isLoading:n},e.handle))})},aJe=({environmentOptions:e,environmentSelectionLimit:t,selectedEnvironmentIds:n,onEnvironmentChange:r,frameworkOptions:i,selectedFrameworks:a,onFrameworksChange:o,categories:s,selectedCategories:c,onCategoriesChange:l,hasPendingChanges:u,hasActiveFilters:d,onApplyFilters:f,onResetFilters:p,className:m=``})=>{let h=[...s.map(e=>({value:e,label:ul(e)}))];return(0,U.jsxs)(`div`,{className:`relative z-20 flex flex-wrap items-end gap-4 w-full max-w-full ${m}`,children:[(0,U.jsxs)(`div`,{className:`flex-1 max-w-full basis-[calc(33.333%-0.75rem)] xl:basis-auto min-w-0`,children:[(0,U.jsx)(RA,{htmlFor:`controls-environment-selector`,children:`Environment`}),(0,U.jsx)(C6,{id:`controls-environment-selector`,value:n,options:e,onChange:e=>r(e),placeholder:e.length>t?`Select Environments`:`All Environments`,className:`w-full`,dropdownClassName:`z-30 min-w-[300px]`,selectAllVisibleLimit:t,disabledOptionTooltip:`Max of 5 selected environments at a time`,renderOptionLabel:e=>{let t=e;return(0,U.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,U.jsx)(`span`,{className:`truncate`,children:t.label}),t.stackType?(0,U.jsx)(H2,{className:`flex-shrink-0 border-gray-200 bg-gray-100 px-2 py-0 text-[10px] font-medium uppercase tracking-wide text-gray-600`,children:t.stackType}):null]})}})]}),(0,U.jsxs)(`div`,{className:`flex-1 max-w-full basis-[calc(33.333%-0.75rem)] xl:basis-auto min-w-0`,children:[(0,U.jsx)(RA,{htmlFor:`controls-category-selector`,children:`Category`}),(0,U.jsx)(C6,{id:`controls-category-selector`,value:c,options:h,onChange:e=>l(e),placeholder:`Show All Categories`,className:`w-full`,dropdownClassName:`z-30`})]}),(0,U.jsxs)(`div`,{className:`flex-1 max-w-full basis-[calc(33.333%-0.75rem)] xl:basis-auto min-w-0`,children:[(0,U.jsx)(RA,{htmlFor:`controls-framework-selector`,children:`Compliance Framework`}),(0,U.jsx)(C6,{id:`controls-framework-selector`,value:a,options:i,onChange:e=>o(e),placeholder:`All Controls`,className:`w-full`,dropdownClassName:`z-30`})]}),(0,U.jsxs)(`div`,{className:`flex items-center gap-2 flex-shrink-0 basis-auto`,children:[d?(0,U.jsx)(K,{variant:`white`,size:`sm`,onClick:p,children:`Reset`}):null,(0,U.jsx)(K,{variant:`primary`,size:`sm`,onClick:f,disabled:!u,children:`Apply Filters`})]})]})},oJe=`controls`,sJe=aQ,cJe=()=>(0,U.jsx)(`div`,{className:`flex items-center justify-center h-full pt-12`,children:(0,U.jsx)(SE,{variant:`lg`})}),lJe=({sort:e})=>(0,U.jsxs)(`span`,{className:`ag-sort-indicator-container`,children:[(0,U.jsx)(`span`,{className:(0,H.default)(`ag-sort-indicator-icon ag-sort-ascending-icon`,{"ag-hidden":e!==`asc`}),children:(0,U.jsx)(AD,{variant:`sm`,className:`h-3 w-3`,strokeWidth:`3`,color:`currentColor`})}),(0,U.jsx)(`span`,{className:(0,H.default)(`ag-sort-indicator-icon ag-sort-descending-icon`,{"ag-hidden":e!==`desc`}),children:(0,U.jsx)(jD,{variant:`sm`,className:`h-3 w-3`,strokeWidth:`3`,color:`currentColor`})}),(0,U.jsx)(`span`,{className:(0,H.default)(`ag-sort-indicator-icon ag-sort-none-icon`,{"ag-hidden":e!=null}),children:(0,U.jsx)(RD,{variant:`sm`,className:`h-4 w-4`,strokeWidth:`2`,color:`currentColor`})})]}),uJe={theme:sJe,loadingOverlayComponent:cJe,defaultColDef:{autoHeight:!0,sortingOrder:[`asc`,`desc`],unSortIcon:!0,tooltipComponent:({value:e})=>(0,U.jsx)(`div`,{className:`shadow rounded-md break-normal text-sm text-left bg-black text-white px-3 py-2 w-96 transition-none`,children:e}),headerComponent:({displayName:e,column:t,progressSort:n,enableSorting:r})=>{let i=t.getColDef(),a=i.headerTooltip,o=i.headerComponentParams??{},[s,c]=(0,V.useState)(t.getSort());(0,V.useEffect)(()=>{let e=()=>c(t.getSort());
186return t.addEventListener(`sortChanged`,e),()=>t.removeEventListener(`sortChanged`,e)},[t]);let l=e=>{r&&n?.(e.shiftKey)};return(0,U.jsx)(`div`,{className:(0,H.default)(`ag-cell-label-container`,{"ag-header-cell-sorted-asc":s===`asc`,"ag-header-cell-sorted-desc":s===`desc`}),onClick:l,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),l(e))},role:r?`button`:void 0,tabIndex:r?0:void 0,"aria-label":r?`Sort by ${e}`:void 0,children:(0,U.jsxs)(`div`,{className:(0,H.default)(`ag-header-cell-label`,o.leadingIcon!=null&&`flex min-w-0 items-center justify-start gap-1.5`,o.containerClassName),children:[o.leadingIcon?(0,U.jsx)(`span`,{className:`inline-flex shrink-0 items-center justify-center`,children:o.leadingIcon}):null,(0,U.jsx)(`span`,{className:(0,H.default)(`ag-header-cell-text min-w-0`,o.labelClassName),children:e}),a&&(0,U.jsx)(`span`,{className:`ag-header-cell-tooltip-icon`,children:(0,U.jsx)(tD,{variant:`sm`,color:`currentColor`})}),r&&(0,U.jsx)(lJe,{sort:s})]})})},lockPinned:!0},tooltipShowDelay:250,tooltipInteraction:!0,enableCellTextSelection:!0,animateRows:!1,animateColumnResizing:!1,suppressColumnMoveAnimation:!0,suppressDragLeaveHidesColumns:!0,domLayout:`autoHeight`,colResizeDefault:`shift`,suppressScrollOnNewData:!0},dJe=({isLoading:e,currentPage:t,totalPages:n,totalResults:r,getPreviousPage:i,getNextPage:a})=>(0,U.jsxs)(`div`,{className:`flex flex-row items-center gap-2 text-gray-500`,children:[(0,U.jsxs)(`div`,{className:`flex items-center gap-2 whitespace-nowrap`,children:[`Page `,t,` of`,` `,(0,U.jsx)(SE,{show:e,className:`inline-block`,variant:`sm`}),!e&&(n||1)]}),(0,U.jsxs)(`div`,{className:`flex flex-row items-center gap-2`,children:[(0,U.jsx)(cA,{variant:`white`,icon:(0,U.jsx)(jE,{color:`#111920`,variant:`sm`}),size:`xs`,disabled:e||t<=1,onClick:e=>{e.preventDefault(),i()}}),(0,U.jsx)(cA,{variant:`white`,icon:(0,U.jsx)(AE,{color:`#111920`,variant:`sm`}),size:`xs`,disabled:e||t>=(n??0),onClick:e=>{e.preventDefault(),a()}}),(0,U.jsx)(`div`,{className:`whitespace-nowrap`,children:(0,U.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,U.jsx)(SE,{show:e,className:`inline-block`,variant:`sm`}),!e&&(r??0),` results`]})})]})]}),r9=e=>[oJe,cl(e)].join(``);function fJe({rowData:e,colDefs:t,getRowId:n,onRowClick:r,getRowClassName:i,isLoading:a=!1,className:o,pageSize:s=50,defaultSort:c,initialSort:l}){let u=(0,V.useRef)(null),[d,f]=(0,V.useState)(1),[p,m]=(0,V.useState)(void 0),[h,g]=(0,V.useState)(void 0),[_,v]=(0,V.useState)(void 0),[y,b]=(0,V.useState)(void 0),[x,S]=Ee(),C=r9(`page`),w=Number.parseInt(x.get(C)||`1`,10),T=r9(`sortBy`),E=x.get(T)||void 0,D=r9(`sortDir`),O=x.get(D),k=(0,V.useMemo)(()=>t.map(e=>{let t=e.colId??e.field;return typeof t==`string`?t:``}).join(`|`),[t]),A=(0,V.useMemo)(()=>{let e=w-1,t=l===null?c?.field:l?.field??E??c?.field,n=l===null?c?.direction:l?.direction??O??c?.direction;return{pagination:{page:e,pageSize:s},sort:t&&n?{sortModel:[{colId:t,sort:n}]}:void 0,partialColumnState:!0}},[w,E,O,c,l,s]);(0,V.useEffect)(()=>{f(w),m(l===null?c?.field:E??l?.field),g(l===null?c?.direction:O??l?.direction)},[]),(0,V.useEffect)(()=>{S(e=>{let t=new URLSearchParams(e);return Object.entries({[C]:d>1?d.toString():``,[T]:p||``,[D]:h||``}
186).forEach(([e,n])=>{n===``?t.delete(e):t.set(e,n.toString())}),t},{replace:!0})},[d,p,h]),(0,V.useEffect)(()=>{if(!c||l||l!==null&&(E||O))return;let e=requestAnimationFrame(()=>{let e=u.current?.api;e&&(e.applyColumnState({state:[{colId:c.field,sort:c.direction}],defaultState:{sort:null}}),m(c.field),g(c.direction))});return()=>cancelAnimationFrame(e)},[c,l,E,O,k]);let j=(0,V.useCallback)(e=>{e.sizeColumnsToFit(),requestAnimationFrame(()=>{e.resetRowHeights()})},[]),M=(0,V.useMemo)(()=>({...uJe,onGridSizeChanged:({api:e})=>{j(e)},loading:a,rowData:e,columnDefs:t,getRowId:n?e=>n(e.data):void 0,getRowClass:i?e=>i(e.data):void 0,suppressHorizontalScroll:a||!e.length,pagination:!0,paginationPageSize:s,suppressPaginationPanel:!0,initialState:A,onFirstDataRendered:({api:e})=>{v(e.getDisplayedRowCount()),b(Math.ceil(e.getDisplayedRowCount()/s)),j(e),f(t=>Math.min(Math.max(1,t),Math.ceil(e.getDisplayedRowCount()/s)))},onRowDataUpdated:({api:e})=>{v(e.getDisplayedRowCount()),b(Math.ceil(e.getDisplayedRowCount()/s)),requestAnimationFrame(()=>{e.resetRowHeights()})},onPaginationChanged:({api:e,newPage:t})=>{t&&f(e.paginationGetCurrentPage()+1)},onSortChanged:({api:e})=>{let t=e.getColumnState().find(e=>e.sort);t?(m(t.colId),g(t.sort)):(m(void 0),g(void 0))},onRowClicked:({data:e})=>{e&&r?.(e)}}),[e,t,a,s,n,r,i,j,A]);return(0,U.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,U.jsx)(dJe,{isLoading:a,currentPage:d,totalPages:y,totalResults:_,getPreviousPage:()=>u.current?.api.paginationGoToPreviousPage(),getNextPage:()=>u.current?.api.paginationGoToNextPage()}),(0,U.jsx)(v2,{modules:[J0],children:(0,U.jsx)(`div`,{className:(0,H.default)(`min-w-0 w-full h-full ag-theme-aptible`,o),children:(0,U.jsx)(O2,{ref:u,...M},k)})})]})}var i9={TRUST_CENTER_CLICK:`controls.trust_center_click`,EXPORT_PDF_REPORT_CLICK:`controls.export_pdf_report_click`,PROVISION_DEDICATED_STACK_CLICK:`controls.provision_dedicated_stack_click`,CONTROL_OPENED:`controls.control_opened`};function a9(e,t){Ys(e,t?JSON.stringify(t):null)}var pJe={dedicated:{label:`Dedicated stack`,tooltip:`This environment is on a dedicated stack. All controls are available.`},self_hosted:{label:`Self-hosted stack`,tooltip:`This environment is on a self-hosted stack running in your AW
186S account. Dedicated-stack controls are available.`},shared:{label:`Shared stack`,tooltip:`This environment is in a shared stack. Shared stacks are not designed for production, so some controls are not available.`}},o9=e=>{e.stopPropagation()},mJe=e=>e.length===0?`All Frameworks`:e.map(e=>e.displayName).join(`, `),hJe=({to:e})=>(0,U.jsx)(aA,{text:`Enhanced reporting and export for this control is available as an add-on. Contact support to enable it.`,children:(0,U.jsxs)(P,{to:e,onClick:o9,className:`relative z-20 inline-flex items-center gap-1 rounded-full bg-purple-100 px-2 py-0.5 text-xs font-semibold text-purple-700 pointer-events-auto`,children:[(0,U.jsx)(`span`,{className:`inline-block h-1.5 w-1.5 rounded-full bg-purple-500`}),`Add-on available`]})}),gJe={totalInScope:0,totalCompliant:0,totalIgnored:0,resourceType:`Resource`,lastEvaluation:``,lastEvaluationInWords:``,progressPercentage:0,status:`NOT_STARTED`,implementationSummary:`Available in production environments on dedicated or self-hosted stacks`,implementationAsString:`0%`,statusSort:0},_Je=e=>e.stackType?e.stackType:e.type===`production`?`dedicated`:`shared`,vJe=({env:e})=>{let t=_Je(e),n=pJe[t];return(0,U.jsx)(aA,{text:n.tooltip,children:(0,U.jsx)(`img`,{src:F6(t),alt:n.label,className:`h-3.5 w-3.5 shrink-0`})})},yJe=e=>({leadingIcon:(0,U.jsx)(vJe,{env:e}),labelClassName:`truncate`}),bJe=({control:e,envId:t,isLoading:n})=>{if(e.globalControl.isOrganizationScoped)return(0,U.jsx)(`div`,{className:`flex min-w-0 items-center`,children:(0,U.jsx)(n9,{metrics:e.cumulativeMetrics,isLoading:n})});let r=e.customerControlsByEnvironmentId[t];return r?r.isDisabled?(0,U.jsx)(`div`,{className:`flex min-w-0 items-center`,children:(0,U.jsx)(n9,{metrics:gJe})}):(0,U.jsx)(`div`,{className:`flex min-w-0 items-center`,children:(0,U.jsx)(n9,{metrics:r.metrics,isLoading:n})}):n?(0,U.jsx)(`div`,{className:`flex min-w-0 items-center`,children:(0,U.jsx)(n9,{metrics:e.cumulativeMetrics,isLoading:!0})}):(0,U.jsx)(`span`,{className:`text-sm text-gray-500`,children:`Not evaluated yet`})},xJe=(e,t)=>{if(!e)return 0;if(e.globalControl.isOrganizationScoped)return e.cumulativeMetrics.statusSort;let n=e.customerControlsByEnvironmentId[t];return n?n.isDisabled?0:n.metrics.statusSort:-1},SJe=({control:e,href:t})=>{let{globalControl:n}=e;return(0,U.jsxs)(`div`,{className:`min-w-0 w-full pr-2`,children:[(0,U.jsxs)(`div`,{className:`flex flex-wrap items-start gap-x-2 gap-y-1`,children:[(0,U.jsx)(P,{to:t,onClick:o9,className:`${G.type[`table link`]} min-w-0 break-words`,children:(0,U.jsx)(`span`,{className:`${G.type.darker} break-words`,children:n.name})}),n.isPremium?(0,U.jsx)(`span`,{className:`inline-flex shrink-0`,children:(0,U.jsx)(hJe,{to:t})}):null]}),(0,U.jsxs)(`div`,{className:`mt-1 break-words ${G.type[`normal lighter`]}`,children:[(0,U.jsx)(`span`,{children:n.area}),(0,U.jsx)(`span`,{className:`mx-2 text-gray-400`,children:`â¢`}),(0,U.jsx)(`span`,{children:mJe(n.frameworks)})]})]})},CJe=e=>e.id,wJe=({controls:e,scopeEnvironments:t,isAggregateScope:n,isLoading:r,selectedControlId:i,getControlLink:a,initialSort:o,className:s=``})=>{let c=N(),l=(0,V.useCallback)(e=>{a9(i9.CONTROL_OPENED,{controlId:e.id,controlName:e.globalControl.name,controlArea:e.globalControl.area}),c(a(e.id))},[a,c]),u=(0,V.useCallback)(e=>i===e.id?`control-row-selected`:void 0,[i]),d=n?`cumulativeStatus`:t.length===1?`env-${t[0].id}`:void 0,f=(0,V.useMemo)(()=>d?{field:d,direction:`asc`}:void 0,[d]),p=(0,V.useRef)(a);p.current=a;let m=(0,V.useRef)(r);m.current=r;let h=(0,V.useMemo)(()=>{let e=[{colId:`name`,headerName:`Control`,flex:2,minWidth:280,wrapText:!0,cellClass:`control-name-cell`,valueGetter:({data:e})=>e?.globalControl.name??``,cellRenderer:({data:e})=>e?(0,U.jsx)(SJe,{control:e,href:p.current(e.id)}):null}];n&&e.push({colId:`cumulativeStatus`,headerName:`Cumulative Status`,flex:1,minWidth:160,cellClass:`control-status-cell`,valueGetter:({data:e})=>e?.cumulativeMetrics.statusSort??0,cellRenderer:({data:e})=>e?(0,U.jsx)(`div`,{className:`flex min-w-0 items-center`,children:(0,U.jsx)(n9,{metrics:e.cumulativeMetrics,isLoading:m.current})}):null});for(let n of t)e.push({colId:`env-${n.id}`,headerName:n.handle,headerComponentParams:yJe(n),flex:1,minWidth:160,cellClass:`control-status-cell`,valueGetter:({data:e})=>xJe(e,n.id),cellRenderer:({data:e})=>e?(0,U.jsx)(bJe,{control:e,envId:n.id,isLoading:m.current}):null});return e},[n,t]);return!r&&e.length===0?(0,U.jsx)(`div`,{className:`rounded-xl border border-gray-200 bg-white p-6 text-center text-sm text-gray-600 shadow-sm`,children:`No controls match the current filters.`}):(0,U.jsx)(fJe,{rowData:e,colDefs:h,getRowId:CJe,onRowClick:l,getRowClassName:u,isLoading:r&&e.length===0,className:(0,H.default)(`control-table-grid`,s),defaultSort:f,initialSort:o})},TJe=(e,t)=>
186{let n=new Set([`name`]);e&&n.add(`cumulativeStatus`);for(let e of t)n.add(`env-${e.id}`);return n},s9=(e,t,n)=>TJe(t,n).has(e),c9=(e,t,n)=>{let r=e.get(`controlsSortBy`),i=e.get(`controlsSortDir`);if(r&&i)return s9(r,t,n)?{field:r,direction:i===`desc`?`desc`:`asc`}:void 0;let a=e.get(`sort`);if(!a)return;let o=e.get(`nameDir`)===`desc`?`desc`:`asc`,s=e.get(`statusDir`)===`desc`?`desc`:`asc`;return a===`name`?{field:`name`,direction:o}:a===`category`||a===`complianceType`?{field:`name`,direction:`asc`}:{field:t?`cumulativeStatus`:n.length===1?`env-${n[0].id}`:`name`,direction:s}},EJe=(e,t,n)=>{let r=c9(e,t,n);if(r)return r;if(e.get(`controlsSortBy`))return null},DJe=()=>(0,U.jsxs)(q,{variant:`error`,iconAlign:`center`,children:[(0,U.jsx)(`p`,{className:`font-semibold`,children:`Warning: Your infrastructure is not compliant`}),(0,U.jsxs)(`p`,{className:`mt-1`,children:[`All of your infrastructure (apps & databases) on Aptible is currently deployed on shared stacks. Upgrade to a Dedicated Stack to achieve compliance with frameworks such as HIPAA, HITRUST, and more.`,` `,(0,U.jsx)(P,{to:_o(),className:`underline`,onClick:()=>a9(i9.PROVISION_DEDICATED_STACK_CLICK),children:`Provision a Dedicated Stack`})]})]}),OJe=({organizationName:e,canCreateEnvironment:t})=>(0,U.jsxs)(`div`,{className:`mx-auto max-w-3xl rounded-xl border border-gray-200 bg-white p-8 text-center shadow-sm`,children:[(0,U.jsx)(`h1`,{className:`text-2xl font-semibold text-gray-900`,children:`No Environments to Evaluate`}),(0,U.jsx)(`p`,{className:`mt-4 text-gray-700`,children:`The Security & Compliance dashboard evaluates the security posture of your environments, but we can't find any environments to assess. To view your security controls and compliance status, you'll need to create at least one environment first.`}),(0,U.jsxs)(`div`,{className:`mt-6 rounded-lg bg-gray-100 p-4 text-sm text-gray-700`,children:[(0,U.jsx)(`strong`,{className:`font-semibold`,children:`What are environments?`}),(0,U.jsx)(`p`,{className:`mt-2`,children:`Environments are isolated spaces where you deploy and run your applications and databases on Aptible's platform.`}),(0,U.jsx)(`a`,{href:`https://www.aptible.com/docs/core-concepts/architecture/environments`,target:`_blank`,rel:`noreferrer`,className:`mt-2 inline-block text-sm font-medium text-blue-600 hover:underline`,children:`Learn more`})]}),(0,U.jsx)(`div`,{className:`mt-8`,children:t?(0,U.jsx)(dA,{to:Ya(),variant:`primary`,children:`Create Your First Environment`}):(0,U.jsxs)(`p`,{className:`text-sm text-gray-700`,children:[`You don't have permission to create environments. Contact an account owner in `,(0,U.jsx)(`strong`,{children:e}),` to create an environment, or ask them to grant you the necessary permissions.`]})})]}),kJe=(e,t,n,r)=>{if(t===`name`){let t=n===`desc`?-1:1;return[...e].sort((e,n)=>{let r=e.globalControl.name.localeCompare(n.globalControl.name)*t;return r===0?e.cumulativeMetrics.statusSort-n.cumulativeMetrics.statusSort:r})}if(t===`complianceType`||t===`category`)return[...e].sort((e,t)=>{let n=e.globalControl.frameworksAsString.localeCompare(t.globalControl.frameworksAsString);return n===0?e.globalControl.name.localeCompare(t.globalControl.name):n});let i=r===`desc`?-1:1;return[...e].sort((e,t)=>{let n=(e.cumulativeMetrics.statusSort-t.cumulativeMetrics.statusSort)*i;return n===0?e.globalControl.name.localeCompare(t.globalControl.name):n})},l9=`/assets/images/frameworks`,u9=`/assets/images/badges`,AJe={infrastructure:100,"hipaa-required":100,"hipaa-addressable":80,hitrust:80,pci:100,pipeda:100},jJe={infrastructure:80,"hipaa-required":0,"hipaa-addressable":0,hitrust:0,pci:0,pi
186peda:0},d9=(e,t)=>t?AJe[e]:jJe[e],f9={100:`Infrastructure controls automated and enforced by Aptible`,80:`See compliance dashboard to define scope`,0:`Requires a dedicated stack`},p9=e=>{let t=Gl(e);return t===`dedicated`||t===`self_hosted`},m9=`h-12 w-12`,h9=20,g9=e=>e===100?(0,U.jsxs)(`span`,{className:(0,H.default)(`relative inline-flex items-center justify-center rounded-full bg-emerald-100`,m9),"aria-hidden":!0,children:[(0,U.jsx)(t9,{progress:100,radius:h9,strokeWidth:3,variant:`success`}),(0,U.jsx)(`span`,{className:`absolute inset-0 flex items-center justify-center`,"aria-hidden":!0,children:(0,U.jsx)(HE,{variant:`sm`,color:`#00633F`,"aria-hidden":!0})})]}):e===0?(0,U.jsx)(`span`,{className:(0,H.default)(`inline-flex items-center justify-center rounded-full bg-red-100`,m9),"aria-hidden":!0,children:(0,U.jsx)(GE,{color:`#EF4444`,"aria-hidden":!0})}):(0,U.jsx)(`span`,{className:(0,H.default)(`inline-flex items-center justify-center rounded-full bg-amber-100`,m9),"aria-hidden":!0,children:(0,U.jsx)(t9,{progress:e,radius:h9,strokeWidth:3,variant:`warn`})}),MJe=({id:e,title:t,subtitle:n,score:r,logo:i,onClick:a})=>(0,U.jsx)(`div`,{className:`flex min-w-0 h-full flex-col bg-white rounded-lg border border-gray-200 shadow-sm overflow-hidden`,children:(0,U.jsxs)(`button`,{type:`button`,onClick:a,className:`w-full text-left p-4 flex items-center gap-3 hover:bg-gray-50 transition-colors flex-shrink-0`,children:[r!==null&&(0,U.jsx)(`div`,{className:`flex-shrink-0 flex items-center`,children:(0,U.jsx)(aA,{text:f9[r],placement:`top`,children:(0,U.jsx)(`span`,{className:`inline-flex items-center`,children:g9(r)})})}),(0,U.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col`,children:[(0,U.jsx)(`h3`,{className:`text-base font-semibold leading-tight text-gray-900`,children:t}),n?(0,U.jsx)(`p`,{className:`mt-0.5 text-xs text-gray-500`,children:n}):null]}),i?(0,U.jsx)(`div`,{className:`flex-shrink-0 flex items-center justify-center`,children:(0,U.jsx)(`img`,{src:`${l9}/${i}`,alt:``,className:`w-10 h-10 object-contain`})}):null]})}),NJe=[{id:`infrastructure`,title:`Infrastructure Security`,modalSubtitle:`Infrastructure built with security best practices, enforced by default`,badgeAsset:`secured-by-aptible.png`,actionLabel:`View Trust Center`,actionHref:`https://trust.aptible.com/`,docsHref:`https://www.aptible.com/docs/core-concepts/security-compliance/overview`,description:(0,U.jsxs)(`div`,{className:`text-sm text-gray-600 space-y-3`,children:[(0,U.jsx)(`p`,{children:`Aptible implements and manages the core infrastructure security controls required to support production workloads.`}),(0,U.jsx)(`p`,{children:`This includes hardened network isolation, encryption in transit and at rest, intrusion detection, vulnerability management, strict access controls, and continuous monitoring.`}),(0,U.jsx)(`p`,{children:`These safeguards are enforced and maintained by Aptible at the infrastructure layer and independently audited under frameworks such as SOC 2 Type 2, HITRUST, and PCI DSS. Together, they form the secure foundation for your applications and data.`})]}),getScore:({hasDedicatedStack:e})=>d9(`infrastructure`,e)},{id:`hipaa-required`,title:`HIPAA Required`,subtitle:`Healthcare`,modalSubtitle:`HIPAA-required controls 100% enforced by default`,badgeAsset:`hipaa-compliant.png`,docsHref:`https://www.aptible.com/docs/core-concepts/security-compliance/compliance-frameworks/hipaa`,description:(0,U.jsxs)(`div`,{className:`text-sm text-gray-600 space-y-3`,children:[(0,U.jsx)(`p`,{children:`When deploying to a Dedicated Stack, Aptible automatically enforces the infrastructure controls required to support HIPAA compliance, including encryption in transit and at rest, audit logging, access controls, and network isolation.`}),(0,U.jsx)(`p`,{children:`These technical safeguards are implemented and maintained by Aptible at the infrastructure layer and enforced by default without manual configuration.`}),(0,U.jsx)(`p`,{children:`Aptible also provides and executes a Business Associate Agreement (BAA) as part of Dedicated Stack setup.`}),(0,U.jsx)(`p`,{children:`Together, this establishes a HIPAA-ready infrastru
186cture baseline that enables you to begin processing PHI from day one.`})]}),logo:`hipaa.png`,getScore:({hasDedicatedStack:e})=>d9(`hipaa-required`,e)},{id:`hipaa-addressable`,title:`HIPAA Addressable`,subtitle:`Healthcare`,modalSubtitle:`Configurable controls to strengthen HIPAA posture`,badgeAsset:`hipaa-compliant.png`,docsHref:`https://www.aptible.com/docs/core-concepts/security-compliance/compliance-frameworks/hipaa`,description:(0,U.jsxs)(`div`,{className:`text-sm text-gray-600 space-y-3`,children:[(0,U.jsx)(`p`,{children:`Aptible enforces 100% of required controls and satisfies many addressable safeguards by default within a Dedicated Stack.`}),(0,U.jsx)(`p`,{children:`Additional safeguards are available as configurable options, including enabling MFA or SSO, scaling to multiple containers for high availability, and configuring cross-region copy backups.`}),(0,U.jsx)(`p`,{children:`These safeguards can be enabled through simple configuration changes, with guided workflows in the Security & Compliance Dashboard to review resources in scope, track status, and maintain audit-ready evidence.`})]}),logo:`hipaa.png`,getScore:({hasDedicatedStack:e})=>d9(`hipaa-addressable`,e)},{id:`hitrust`,title:`HITRUST`,subtitle:`Healthcare`,modalSubtitle:`HITRUST inheritance to fast-track certification`,badgeAsset:`hitrust-compliant.png`,docsHref:`https://www.aptible.com/docs/core-concepts/security-compliance/compliance-frameworks/hitrust`,description:(0,U.jsxs)(`div`,{className:`text-sm text-gray-600 space-y-3`,children:[(0,U.jsx)(`p`,{children:`Aptible provides HITRUST Inheritance, allowing customers to inherit a significant portion of applicable infrastructure controls through the HITRUST MyCSF platform. This reduces the number of controls your team must independently implement, test, and document.`}),(0,U.jsx)(`p`,{children:`By leveraging Aptible's audited infrastructure controls, you can streamline assessment scope, reduce certification effort, and shorten time to validation while maintaining visibility into both inherited and customer-responsible controls.`})]}),logo:`hitrust.png`,getScore:({hasDedicatedStack:e})=>d9(`hitrust`,e)},{id:`pci`,title:`PCI DSS`,subtitle:`Finance`,modalSubtitle:`PCI-ready infrastructure with required technical safeguards enforced`,badgeAsset:`pci-compliant.png`,actionLabel:`View Trust Center`,actionHref:`https://trust.aptible.com/`,docsHref:`https://www.aptible.com/docs/core-concepts/security-compliance/compliance-frameworks/pci`,description:(0,U.jsxs)(`div`,{className:`text-sm text-gray-600 space-y-3`,children:[(0,U.jsx)(`p`,{children:`When deploying to a Dedicated Stack, Aptible enforces infrastructure controls designed to support PCI DSS requirements.`}),(0,U.jsx)(`p`,{children:`These controls include encryption in transit and at rest, network isolation, access controls, logging, and other technical safeguards implemented and maintained by Aptible at the infrastructure layer.`}),(0,U.jsx)(`p`,{children:`This provides a secure foundation for handling and processing payment card data while supporting your broader PCI compliance efforts.`})]}),logo:`pci.png`,getScore:({hasDedicatedStack:e})=>d9(`pci`,e)},{id:`pipeda`,title:`PIPEDA`,subtitle:`Privacy, Canada`,modalSubtitle:`Secure infrastru
186cture to support PIPEDA privacy requirements`,badgeAsset:`pipeda-compliant.png`,logo:`pipeda.png`,actionLabel:`View Trust Center`,actionHref:`https://trust.aptible.com/`,docsHref:`https://www.aptible.com/docs/core-concepts/security-compliance/compliance-frameworks/pipeda`,description:(0,U.jsxs)(`div`,{className:`text-sm text-gray-600 space-y-3`,children:[(0,U.jsx)(`p`,{children:`Aptible provides the secure infrastructure and technical safeguards required to protect personal information under the Personal Information Protection and Electronic Documents Act (PIPEDA).`}),(0,U.jsx)(`p`,{children:`When deployed to a Dedicated Stack, Aptible automatically enforces critical controls such as encryption in transit and at rest, strong access controls, audit logging, and network isolation. These safeguards establish a secure foundation aligned with PIPEDA's expectations for protecting personal data.`})]}),getScore:({hasDedicatedStackInCaCentral:e})=>e?100:0}],PJe=()=>{let e=B(ns);u(Jl());let t=I(Jl),n=B(e=>Vl(e)),{canAccess:r,destination:i}=vE(),a=t.isInitialLoading||!n,o=!a&&n?n.some(e=>p9(e)):!1,s=!a&&n?n.some(e=>p9(e)&&e.region===`ca-central-1`):!1,c=NJe.filter(e=>e.id!==`pipeda`||s),l=!a&&!o,[d,f]=(0,V.useState)(null),[p,m]=(0,V.useState)(null),h=c.length===5?`grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 2xl:grid-cols-5 gap-x-4 gap-y-2 items-stretch min-w-0`:`grid grid-cols-1 gap-x-4 gap-y-2 items-stretch sm:grid-cols-2 md:grid-cols-3`,g=d===null?null:c.find(e=>e.id===d),_=g&&!a?g.getScore({hasDedicatedStack:o,hasDedicatedStackInCaCentral:s}):null;(0,V.useEffect)(()=>{d===`pipeda`&&!s&&f(null)},[d,s]);let v=t=>{d&&K7(G7.COMPLIANCE_MODAL_CTA,{action:t,cardId:d,...W7(e)})};return(0,U.jsxs)(`div`,{className:`space-y-6`,children:[(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`h2`,{className:(0,H.default)(`mb-4`,G.type.h3),children:`Security & Compliance`}),l&&(0,U.jsx)(q,{variant:`info`,className:`mb-4 flex items-center`,children:(0,U.jsxs)(`div`,{className:`flex flex-1 flex-wrap items-center justify-between gap-3`,children:[(0,U.jsx)(`span`,{className:`text-sm text-gray-700`,children:`To get started with compliance-ready infrastructure, provision a Dedicated Stack.`}),(0,U.jsx)(dA,{to:_o(),variant:`white`,size:`sm`,className:`flex-shrink-0`,onClick:()=>K7(G7.COMPLIANCE_DEDICATED_STACK_CTA,{destination:`create_stack`,...W7(e)}),children:`Create Stack`})]})}),(0,U.jsx)(`div`,{className:`space-y-2`,children:(0,U.jsx)(`div`,{className:h,children:c.map(t=>(0,U.jsx)(MJe,{id:t.id,title:t.title,subtitle:t.subtitle,description:t.description,logo:t.logo,badgeAsset:t.badgeAsset,actionLabel:t.actionLabel,actionHref:t.actionHref,score:a?null:t.getScore({hasDedicatedStack:o,hasDedicatedStackInCaCentral:s}),onClick:()=>{let n=a?null:t.getScore({hasDedicatedStack:o,hasDedicatedStackInCaCentral:s});K7(G7.COMPLIANCE_CARD_OPEN,{cardId:t.id,score:n,hasDedicatedStack:o,...W7(e)}),f(t.id)}},t.id))})})]}),d!==null&&g&&(0,U.jsx)(OU,{onClose:()=>f(null),"aria-label":`${g.title} details`,className:`px-4 pb-4`,handleEscape:p===null,children:(0,U.jsx)(`div`,{onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),children:(0,U.jsxs)(kU,{isOpen:!0,className:`min-w-[400px] max-w-lg`,onClose:p===null?()=>f(null):void 0,children:[(0,U.jsx)(AU,{icon:_===null?void 0:(0,U.jsx)(aA,{text:f9[_],placement:`top`,children:(0,U.jsx)(`span`,{className:`inline-flex items-center`,children:g9(_)})}),title:g.title,description:g.modalSubtitle,titleTrailing:g.logo?(0,U.jsx)(`img`,{src:`${l9}/${g.logo}`,alt:``,className:`w-10 h-10 object-contain ml-1`}):void 0,onClose:()=>f(null)}),(0,U.jsxs)(MU,{children:[(0,U.jsx)(`div`,{className:`text-sm text-gray-600 mb-4`,children:g.description}),g.badgeAsset&&(0,U.jsx)(`div`,{className:`mb-4`,children:(0,U.jsx)(`button`,{type:`button`,onClick:()=>{K7(G7.COMPLIANCE_BADGE_PREVIEW_OPEN,{cardId:d,badgeAsset:g.badgeAsset,...W7(e)}),m(g.badgeAsset??null)},className:`rounded border border-gray-200 bg-white p-1 shadow-sm hover:border-gray-300 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-gray-400`,title:`Click to view full size`,children:(0,U.jsx)(`img`,{src:`${u9}/${g.badgeAsset}`,alt:`Compliance badge`,className:`h-14 w-auto object-contain`})})}),(0,U.jsx)(`hr`,{className:`border-t border-gray-200 my-4`}),(0,U.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[g.actionHref&&g.actionLabel?(0,U.jsx)(`a`,{href:g.actionHref,className:(0,H.default)(`inline-flex items-center px-3 py-1.5 text-sm font-medium rounded-md border`,G.buttons.styles.primary),target:`_blank`,rel:`noopener noreferrer`,onClick:()=>{v(`trust_center`),a9(i9.TRUST_CENTER_CLICK)},children:g.actionLabel}):r?(0,U.jsx)(P,{to:i,className:(0,H.default)(`inline-flex items-center px-3 py-1.5 text-sm font-medium rounded-md border`,G.buttons.styles.primary),onClick:()=>v(`view_controls`),children:`View Controls`}):(0,U.jsx)(aA,{text:`Requires Full Visibility on any Environment`,placement:`top`,children:(0,U.jsxs)(`span`,{className:(0,H.default)(`inline-flex cursor-not-allowed items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-md border opacity-60`,G.buttons.styles.primary),"aria-disabled":`true`,onClick:()=>v(`view_controls_locked`),onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),v(`view_controls_locked`))},role:`button`,tabIndex:0,children:[`View Controls`,(0,U.jsx)(hD,{variant:`sm`})]})}),g.docsHref&&(0,U.jsxs)(`a`,{href:g.docsHref,className:(0,H.default)(`inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-md border`,G.buttons.styles.white),target:`_blank`,rel:`noopener noreferrer`,onClick:()=>v(`view_docs`),children:[`View docs`,(0,U.jsx)(rD,{variant:`sm`,className:`opacity-60`})]})]})]})]})})}),p&&(0,U.jsx)(OU,{onClose:()=>m(null),"aria-label":`Badge preview`,className:`px-4 pb-4`,children:(0,U.jsxs)(`div`,{className:`bg-white rounded-lg shadow-xl p-6 max-w-lg w-full flex flex-col items-center gap-4`,onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),children:[(0,U.jsx)(`div`,{className:`flex w-full justify-end`,children:(0,U.jsx)(`button`,{type:`button`,onClick:()=>m(null),className:`p-1 rounded hover:bg-gray-100 text-gray-500 hover:text-gray-700`,"aria-label":`Close`,children:(0,U.jsx)(JE,{variant:`sm`,"aria-hidden":!0})})}),(0,U.jsx)(`img`,{src:`${u9}/${p}`,alt:`Compliance badge full size`,className:`max-h-[70vh] w-auto object-contain`}),(0,U.jsxs)(`a`,{href:`${u9}/${p}`,download:p,className:(0,H.default)(`inline-flex items-center gap-2 px-4 py-2 text-sm font-medium rounded-md border`,G.buttons.styles.white),onClick:()=>K7(G7.COMPLIANCE_BADGE_DOWNLOAD,{cardId:d,badgeAsset:p,...W7(e)}),children:[(0,U.jsx)(aD,{variant:`sm`}),`Download`]})]})})]})},FJe=()=>{let e=B(ns),t=_E({orgId:e.id,hideFilters:!0,limit:5});return(0,U.jsxs)(`div`,{className:`flex flex-col h-full`,children:[(0,U.jsxs)(`div`,{className:`flex items-center justify-between mb-2`,children:[(0,U.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,U.jsx)(`h2`,{className:`text-lg font-medium`,children:`Activity Feed`}),t.isLoading&&(0,U.jsx)(SE,{})]}),(0,U.jsx)(P,{to:`/activity`,className:`text-sm font-medium text-blue-600 hover:text-blue-800`,onClick:()=>K7(G7.ACTIVITY_FEED_VIEW_ALL_CLICK,{...W7(e)}),children:`View All â`})]}),(0,U.jsx)(E6,{...t,showTitle:!1,hidePagination:!0,initialColumnVisibility:{additionalInfo:!1}})]})},IJe=({resource:e,org:t,horizontal:n=!1})=>{let r=B(t=>e.type===`app`?rf(t,{id:e.id}):void 0),i=B(t=>e.type===`database`?lp(t,{id:e.id}):void 0),a=B(t=>e.type===`endpoint`?Lp(t,{id:e.id}):void 0),o=B(t=>{if(e.type===`environment`)return tu(t,{id:e.id});if(e.type===`app`&&r)return tu(t,{id:r.environmentId});if(e.type===`database`&&i)return tu(t,{id:i.environmentId})}),s=B(t=>{if(e.type===`stack`){let n=zl(t,{id:e.id});return Kl(n)?n:void 0}if(o&&lu(o)){let e=zl(t,{id:o.stackId});return Kl(e)?e:void 0}}),c=``,l=``,u=``,d=``;switch(e.type){case`app`:if(!r||!r.id)return null;c=r.handle,l=Qi(r.id),u=`/resource-types/logo-app.png`,d=`App`;break;case`database`:if(!i||!i.id)return null;c=i.handle,l=ga(i.id),u=i.type?`/database-types/logo-${i.type}.png`:`/resource-types/logo-database.png`,d=`Database`;break;case`endpoint`:if(!a||!a.id)return null;c=Am(a),l=wa(a.id),u=`/resource-types/logo-vhost.png`,d=`Endpoint`;break;case`environment`:if(!o||!o.id)return null;c=o.handle,l=Pa(o.id),u=`/resource-types/logo-environment.png`,d=`Environment`;break;case`stack`:if(!s||!s.id)return null;c=s.name,l=Co(s.id),u=F6(Gl(s)),d=`Stack`;break;default:return null}let f=`${cl(e.type)} ID: ${e.id}`,p=n?`w-6 h-6`:`w-8 h-8`,m=n?`text-sm`:``,h=n?`text-xs`:`text-sm`,g=(0,U.jsxs)(`div`,{className:`flex items-center ${n?`gap-1.5`:`gap-2`}`,children:[(0,U.jsx)(`img`,{src:u,className:`${p} flex-shrink-0`,alt:d,onError:e=>{e.currentTarget.style.display=`none`}}),(0,U.jsxs)(`div`,{className:`flex-1 min-w-0 overflow-hidden ${m} ${n?``:`break-words`}`,children:[l?(0,U.jsx)(P,{to:l,className:n?`${G.type[`table link`]} block truncate`:`${G.type[`table link`]} break-words`,onClick:()=>K7(G7.RECENTLY_VIEWED_RESOURCE_CLICK,{resourceType:e.type,resourceId:e.id,...W7(t)}),children:c}):(0,U.jsx)(`div`,{className:n?`truncate`:`break-words`,children:c}),(0,U.jsx)(`div`,{className:`text-black-300 ${h} ${n?`truncate`:`break-words`}`,children:f})]})]});return n?(0,U.jsx)(`div`,{className:`flex-1 min-w-[140px] rounded-md border border-gray-200 bg-white px-3 py-2 shadow-sm`,children:g}):(0,U.jsx)(WA,{children:(0,U.jsx)(Y,{children:g})})},LJe=()=>{let e=B(ns),t=B(u5).slice(0,5);return t.length===0?null:(0,U.jsxs)(`div`,{className:`flex flex-col w-full`,children:[(0,U.jsx)(`h2`,{className:`text-lg font-medium mb-1.5`,children:`Recently Viewed`}),(0,U.jsx)(`div`,{className:`flex flex-row gap-2 w-full`,children:t.map(t=>(0,U.jsx)(IJe,{resource:t,org:e,horizontal:!0},f5(t)))})]})},_9=`#283a99`,RJe=`#ffffff`,zJe=({children:e})=>(0,U.jsx)(`span`,{className:`flex-shrink-0 w-7 h-7 rounded-full text-white text-sm font-medium flex items-center justify-center`,style:{backgroundColor:_9},children:e}),BJe=({children:e})=>(0,U.jsx)(`span`,{className:`flex-shrink-0 w-7 h-7 rounded-full text-sm font-medium flex items-center justify-center border-2`,style:{borderColor:_9,color:_9},children:e}),VJe=[{title:`Create your first environment`,description:`Group resources together (e.g. staging, dev, production).`,actionUrl:Ga(),docsUrl:`https://www.aptible.com/docs/core-concepts/architecture/environments`,statusKey:`hasEnvironments`},{title:`Deploy your code or a starter template`,description:`Deploy an app using Git push or Docker image.`,actionUrl:Ga(),docsUrl:`https://www.aptible.com/docs/core-concepts/apps/overview`,statusKey:`hasApps`},{title:`Provision a database`,description:`Add a managed database for persistent storage.`,actionUrl:Ga(),docsUrl:`https://www.aptible.com/docs/core-concepts/managed-databases/overview`,statusKey:`hasDatabases`},{title:`Expose your app to the internet`,description:`Create an endpoint to make your app accessible.`,actionUrl:Ga(),docsUrl:`https://www.aptible.com/docs/core-concepts/apps/connecting-to-apps/app-endpoints/overview#app-endpoints`,statusKey:`hasEndpoints`}],HJe=()=>{let e=B(su),t=B(uf),n=B(mp),r=B(Jp),i=I(qb),a=B(Kb),o=(0,V.useMemo)(()=>({hasEnvironments:e.length>0,hasApps:t.length>0,hasDatabases:n.length>0,hasEndpoints:r.length>0}),[e,t,n,r]),s=(0,V.useMemo)(()=>VJe.map(e=>
186({title:e.title,description:e.description,actionUrl:e.actionUrl,docsUrl:e.docsUrl,isComplete:o[e.statusKey]})),[o]);return(0,U.jsxs)(`div`,{className:`bg-white rounded-lg border border-gray-200 shadow`,children:[(0,U.jsx)(`div`,{className:`p-6 pb-4`,children:(0,U.jsx)(`h2`,{className:`text-lg font-semibold text-gray-900 mb-4`,children:`Getting Started`})}),(0,U.jsx)(`ol`,{className:`list-none p-0 m-0 divide-y divide-gray-200 px-6 pb-6`,children:s.map((e,t)=>(0,U.jsx)(`li`,{className:e.isComplete?`bg-gray-50 py-4`:`py-4 first:pt-0 last:pb-0`,children:(0,U.jsx)(`div`,{className:`flex items-start gap-4`,children:e.isComplete?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`div`,{className:`flex-shrink-0 w-14 flex justify-center pt-0.5`,children:(0,U.jsx)(zJe,{children:(0,U.jsx)(HE,{className:`w-4 h-4`,color:RJe})})}),(0,U.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,U.jsx)(`div`,{className:`font-medium text-gray-500`,children:e.title}),(0,U.jsxs)(`div`,{className:`text-sm text-gray-500`,children:[e.description,` `,(0,U.jsx)(`a`,{href:e.docsUrl,target:`_blank`,rel:`noreferrer`,className:`text-gray-400 hover:text-blue-600`,children:`Learn more.`})]})]})]}):(0,U.jsxs)(`div`,{className:`flex w-full min-w-0 items-start gap-4`,children:[(0,U.jsx)(P,{to:e.actionUrl,className:`flex flex-shrink-0 flex-col items-center no-underline hover:no-underline`,children:(0,U.jsx)(`div`,{className:`w-14 flex justify-center pt-0.5`,children:(0,U.jsx)(BJe,{children:t+1})})}),(0,U.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,U.jsx)(P,{to:e.actionUrl,className:`font-medium text-gray-900 no-underline hover:no-underline`,children:e.title}),(0,U.jsxs)(`div`,{className:`text-sm text-gray-500`,children:[e.description,` `,(0,U.jsx)(`a`,{href:e.docsUrl,target:`_blank`,rel:`noopener noreferrer`,className:`text-gray-400 hover:text-blue-600`,children:`Learn more.`})]})]}),(0,U.jsx)(`div`,{className:`min-w-0 flex-1`,"aria-hidden":`true`}),(0,U.jsx)(P,{to:e.actionUrl,className:`flex flex-shrink-0 items-center pt-0.5 no-underline hover:no-underline`,children:(0,U.jsx)(AE,{className:`w-5 h-5 text-gray-400`})})]})})},e.title))}),!i.isLoading&&a.length===0&&(0,U.jsx)(`div`,{className:`px-6 pb-6`,children:(0,U.jsx)(q,{variant:`progress`,showIcon:!1,children:(0,U.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,U.jsx)(TD,{variant:`base`}),(0,U.jsxs)(`p`,{className:`${G.type.darker} mt-0.5`,children:[(0,U.jsx)(`strong`,{children:`Prefer to start with the LLM Gateway?`}),` `,(0,U.jsx)(P,{to:Ki(),className:`underline`,children:`Create your first LLM key â`})]})]})})})]})},UJe=()=>{let e=B(ns),t=B(uf),n=I(hf),r=Er([hf,fu]),i=n.isSuccess&&t.length===0;if(!e.id)return(0,U.jsx)(xE,{text:`Loading...`});let a=new Date(`2026-05-21T00:00:00Z`).getTime(),o=(0,U.jsxs)(`div`,{className:`flex items-center justify-between border-b border-gray-200 pb-4`,children:[(0,U.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,U.jsx)(`h1`,{className:`text-xl font-semibold text-gray-900`,children:`Home`}),Date.now()<a&&(0,U.jsx)(`span`,{className:`inline-flex items-center justify-center px-2 py-1 rounded text-xs font-semibold text-black uppercase bg-indigo-200 leading-none`,children:`New`})]}),(0,U.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,U.jsxs)(dA,{to:pne(),variant:`white`,children:[(0,U.jsx)(mD,{variant:`sm`}),(0,U.jsx)(`span`,{className:`pl-2`,children:`SSO CLI Token`})]}),(0,U.jsxs)(lA,{href:`https://www.aptible.com/docs/reference/aptible-cli/overview`,variant:`white`,className:`gap-2`,target:`_blank`,rel:`noopener noreferrer`,children:[(0,U.jsx)(aD,{variant:`sm`}),`Install the CLI`]})]})]});return(0,U.jsx)(r5,{header:o,mainWrapperDivClassName:`overflow-x-hidden`,children:(0,U.jsx)(`div`,{className:`space-y-8`,children:(0,U.jsxs)(`div`,{className:`space-y-6`,children:[(0,U.jsx)(IA,{}),i?(0,U.jsx)(HJe,{}):null,(0,U.jsx)(Uqe,{}),!r.isInitialLoading&&!i&&e?.id?(0,U.jsx)(LJe,{}):null,(0,U.jsxs)(`div`,{className:`grid grid-cols-1 xl:grid-cols-2 gap-6`,children:[(0,U.jsx)(`div`,{className:`xl:col-span-1 min-w-0`,children:(0,U.jsx)(tJe,{})}),(0,U.jsx)(`div`,{className:`xl:col-span-1 min-w-0`,children:(0,U.jsx)(Qqe,{})})]}),(0,U.jsx)(`div`,{className:`flex flex-col`,children:i||e?.id?(0,U.jsx)(FJe,{}):null}),(0,U.jsx)(PJe,{})]})})})},WJe=Object.keys(Fm).map(e=>({label:e,value:Fm[e]}
186)),GJe={port:e=>L4(e.containerPort),ipAllowlist:e=>I4(e.ipAllowlist),service:e=>H4(e.serviceId,`Must select a service`),cert:e=>{if(e.type===`custom`&&e.certId===``&&e.cert===``)return`A certificate is required for custom certificate`},privKey:e=>{if(e.type===`custom`&&e.certId===``&&e.privKey===``)return`A private key is required for custom certificate`},tokenHeader:e=>{if(e.trafficType===`tcp`||e.trafficType===`tls`)return`A HTTP or GRPC endpoint is required to pass token`},domain:e=>{if(e.type===`managed`&&e.domain===``)return`A domain is required for managed certificate`;if(e.type===`custom`&&e.shared){if(!e.domain||e.domain===``)return`A domain is required for shared endpoints with a custom certificate`;if(e.domain.includes(`*`))return`Shared endpoints do not support wildcard domains. Please use a specific domain name.`}}},KJe=()=>{let e=l(),t=N(),{id:n=``}=F();u(_f({id:n}));let r=B(e=>rf(e,{id:n}));u(Xv({id:r.currentImageId}));let i=B(e=>Zv(e,{id:r.currentImageId}));u(du({id:r.environmentId}));let a=B(e=>tu(e,{id:r.environmentId}));u(Yl({id:a.stackId}));let o=B(e=>zl(e,{id:a.stackId})),[s,c]=(0,V.useState)(``),[d,f]=(0,V.useState)(``),[p,m]=(0,V.useState)(`http`),[h,g]=(0,V.useState)(`default`),[_,v]=(0,V.useState)(`external`),[y,b]=(0,V.useState)(``),[x,S]=(0,V.useState)(``),[C,w]=(0,V.useState)(!1),[E,D]=(0,V.useState)(``),[O,k]=(0,V.useState)(``),[A,j]=(0,V.useState)(``),[M,ee]=(0,V.useState)(void 0),[te,ne]=(0,V.useState)(`round_robin`),[re,ie]=(0,V.useState)(!1),[ae,oe]=(0,V.useState)(``),[se,ce]=(0,V.useState)(``),[le,ue]=(0,V.useState)(``),[de,fe]=(0,V.useState)(``),[pe,me]=(0,V.useState)(``),[he,ge]=(0,V.useState)(``),[_e,ve]=(0,V.useState)(``),[ye,be]=(0,V.useState)(``),[xe,Se]=(0,V.useState)(``),P=Dm({containerPort:d,containerPorts:[]},i.exposedPorts),[Ce,we]=(0,V.useState)(!1),Te=p===`http`||p===`http_proxy_protocol`,Ee=e=>Tm(e,p,`alb`),De=(()=>{if(le!==``)try{let e=new URL(le);if(e.protocol!==`http:`&&e.protocol!==`https:`)return`Must be an http or https URL`}catch{return`Must be a valid URL`}})(),Oe=(()=>{if(xe===``)return;let e=Number(xe);
186if(!Number.isInteger(e)||e<1||e>900)return`Must be between 1 and 900 seconds`})(),ke=(()=>{if(ae===``)return;let e=Number(ae);if(!Number.isInteger(e)||e<30||e>2400)return`Must be between 30 and 2400 seconds`})(),Ae=()=>{let e={...Ee(`FORCE_SSL`)&&se!==``?{FORCE_SSL:se}:{},...Ee(`IDLE_TIMEOUT`)&&ae!==``?{IDLE_TIMEOUT:ae}:{},...Ee(`MAINTENANCE_PAGE_URL`)&&le!==``?{MAINTENANCE_PAGE_URL:le}:{},...Ee(`STRICT_HEALTH_CHECKS`)&&de!==``?{STRICT_HEALTH_CHECKS:de}:{},...Ee(`SSL_PROTOCOLS_OVERRIDE`)&&pe!==``?{SSL_PROTOCOLS_OVERRIDE:pe}:{},...Ee(`SSL_CIPHERS_OVERRIDE`)&&he!==``?{SSL_CIPHERS_OVERRIDE:he}:{},...Ee(`DISABLE_WEAK_CIPHER_SUITES`)&&_e!==``?{DISABLE_WEAK_CIPHER_SUITES:_e}:{},...Ee(`SHOW_ELB_HEALTHCHECKS`)&&ye!==``?{SHOW_ELB_HEALTHCHECKS:ye}:{},...Ee(`RELEASE_HEALTHCHECK_TIMEOUT`)&&xe!==``?{RELEASE_HEALTHCHECK_TIMEOUT:xe}:{}},t={serviceId:s,trafficType:p,internal:_===`internal`,ipAllowlist:Nm(y),containerPort:d,tokenHeader:Te?M:void 0,lbAlgorithm:Te?te:void 0,shared:Te?re:!1,settings:e};return h===`managed`?{type:`managed`,envId:r.environmentId,certId:Ce?``:O,cert:E,privKey:A,domain:x,...t}:h===`custom`?{type:`custom`,envId:r.environmentId,certId:Ce?``:O,cert:E,privKey:A,domain:Te&&re?x:void 0,...t}:{type:`default`,envId:r.environmentId,...t}},[je,Me]=QS(GJe),Ne=Ae(),Pe=mm(Ne),Fe=t=>{t.preventDefault(),Me(Ne)&&(ke||Oe||De||e(Pe))},Ie=I(Pe);T(Ie,()=>{t(wa(Ie.meta.endpointId))});let Le=[{label:`Use app-${r.id}.${o.defaultDomain} default endpoint`,value:`default`},{label:`Use a custom domain with Managed certificate`,value:`managed`},{label:`Use a custom domain with a custom certificate`,value:`custom`}],Re=`You will need to be able to create a CNAME from this domain name to one provided by Aptible. Wildcard domains are supported.`;Te&&re&&(Re=`You will need to be able to create a CNAME from this domain name to one provided by Aptible. Wildcard domains are not supported.`);let ze=(0,U.jsx)(J,{label:`Domain Name`,htmlFor:`domain`,description:Re,feedbackMessage:je.domain,feedbackVariant:je.domain?`danger`:`info`,children:(0,U.jsx)(X,{type:`text`,name:`domain`,value:x,onChange:e=>S(e.currentTarget.value)})}),Be=(0,U.jsx)(J,{label:`Transitional Certificate`,htmlFor:`trans-cert`,description:`Managed certificate provisions a certificate for you, but this process takes a little while. During this time, your application will be unavailable. If you need to avoid downtime, you can provide a transitional certificate, which will let Aptible provision your Managed certificate in the background, while your app is running.`,children:(0,U.jsx)(ZH,{label:`Use a transitional certificate (recommended if your application is already live)`,name:`trans-cert`,checked:C,onChange:e=>w(e.currentTarget.checked)})}),Ve=(0,U.jsxs)(J,{htmlFor:`existing-cert`,label:`Certificate`,feedbackMessage:je.cert,feedbackVariant:je.cert?`danger`:`info`,children:[Ce?null:(0,U.jsx)(G6,{envId:r.environmentId,selectedId:O,onSelect:e=>k(e.value),className:`mb-2`}),(0,U.jsx)(ZH,{label:`Create a New Certificate`,name:`new-cert`,checked:Ce,onChange:e=>we(e.currentTarget.checked)})]}),He=(0,U.jsx)(J,{htmlFor:`cert`,label:`New Certificate`,feedbackMessage:je.cert,feedbackVariant:je.cert?`danger`:`info`,description:(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`p`,{children:`Drag and drop your certificate file or paste its contents in the textarea below.`}),(0,U.jsx)(`p`,{children:`If you have a bundled certificate chain, drag and drop all of the certificate files or paste their contents in the textarea below.`})]}),children:(0,U.jsx)(dU,{id:`cert`,"aria-label":`cert`,onValueChange:D,value:E})}),Ue=(0,U.jsx)(J,{htmlFor:`private-key`,label:`Private Key for New Certificate`,description:`Drag and drop your private key file or paste its contents in the textarea below.`,feedbackMessage:je.privKey,feedbackVariant:je.privKey?`danger`:`info`,children:(0,U.jsx)(dU,{id:`private-key`,"aria-label":`private-key`,onValueChange:j,value:A})}),We=(0,U.jsx)(J,{label:`Endpoint Placement`,htmlFor:`endpoint-placement`,children:(0,U.jsxs)(QA,{name:`endpoint-placement`,selected:_,onSelect:v,children:[(0,U.jsx)(ZA,{value:`external`,children:`External`}),(0,U.jsx)(ZA,{value:`internal`,children:`Internal`})]})}),Ge=(0,U.jsx)(J,{label:`Header Authentication Value`,htmlFor:`token-header`,description:`The 'X-Origin-Token' header value. When set, clients will be required to pass a 187 'X-Origin-Token' header matching this value. Token header may only contain letters, numbers, 188 '_', '-', ':', and '.'`,feedbackMessage:je.tokenHeader,feedbackVariant:je.tokenHeader?`danger`:`info`,children:(0,U.jsx)(X,{id:`token-header`,name:`token-header`,type:`text`,value:M,onChange:e=>ee(e.currentTarget.value)})}),Ke=(0,U.jsx)(J,{label:`Load Balancing Algorithm`,htmlFor:`lb-algorithm`,description:`Choose the load balancing algorithm for ALB endpoints. O
188nly applies to ALB endpoints.`,children:(0,U.jsx)(XA,{ariaLabel:`Load Balancing Algorithm`,id:`lb-algorithm`,value:te,options:WJe,onSelect:e=>ne(e.value)})}),qe=(0,U.jsx)(J,{label:`Shared Endpoint`,htmlFor:`shared`,description:`When enabled, the underlying load balancer will be shared by other shared endpoints, reducing costs.`,feedbackMessage:re?`Warning: Shared endpoints cannot be converted to dedicated endpoints.`:void 0,feedbackVariant:`danger`,children:(0,U.jsx)(ZH,{label:`Enable shared endpoint`,name:`shared`,checked:re,onChange:e=>ie(e.currentTarget.checked)})}),Je=(0,U.jsx)(U6,{applies:Ee,sslProtocolsOptions:Em(Te),forceSSL:se,onForceSSLChange:ce,sslProtocolsOverride:pe,onSslProtocolsOverrideChange:me,sslCiphersOverride:he,onSslCiphersOverrideChange:ge,disableWeakCipherSuites:_e,onDisableWeakCipherSuitesChange:ve,ipAllowlist:y,onIpAllowlistChange:b,ipAllowlistError:je.ipAllowlist,tokenFormSlot:Te?Ge:null}),Ye=(0,U.jsx)(W6,{applies:Ee,strictHealthChecks:de,onStrictHealthChecksChange:fe,releaseHealthcheckTimeout:xe,onReleaseHealthcheckTimeoutChange:Se,releaseHealthcheckTimeoutError:Oe,idleTimeout:ae,onIdleTimeoutChange:oe,idleTimeoutError:ke,showElbHealthchecks:ye,onShowElbHealthchecksChange:be,maintenancePageUrl:le,onMaintenancePageUrlChange:ue,maintenancePageUrlError:De,lbAlgorithmSlot:Te?Ke:null}),Xe=e=>{switch(e){case`grpc`:return`gRPC`;case`http_proxy_protocol`:return`HTTP`;case`http`:return`HTTP`;default:return`HTTP`}};return(0,U.jsxs)(Z,{children:[(0,U.jsxs)(`div`,{className:`flex justify-between items-start`,children:[(0,U.jsx)(`h1`,{className:`text-lg text-black font-semibold`,children:`Create Endpoint`}),(0,U.jsx)(uA,{href:`https://www.aptible.com/docs/core-concepts/apps/connecting-to-apps/app-endpoints/overview`})]}),(0,U.jsxs)(`div`,{className:`mt-2 mb-4 text-black-900`,children:[`This Endpoint will accept`,` `,Xe(p)===`HTTP`?`HTTP and HTTPS`:Xe(p),` `,`traffic and route it to your app over `,Xe(p),`.`,` `,Xe(p)===`HTTP`?`Additionally, you can set FORCE_SSL=true in your App configuration to route all traffic as HTTPS.`:``]}),(0,U.jsxs)(LA,{onSubmit:Fe,className:`max-w-4xl`,children:[(0,U.jsx)(J,{label:`Traffic Type`,htmlFor:`traffic-type`,children:(0,U.jsxs)(QA,{name:`traffic-type`,selected:p,onSelect:m,children:[(0,U.jsx)(ZA,{value:`http`,children:`HTTP`}),(0,U.jsx)(ZA,{value:`grpc`,children:`gRPC`})]})}),(0,U.jsx)(J,{label:`Service`,htmlFor:`service`,feedbackMessage:je.service,feedbackVariant:je.service?`danger`:`info`,children:(0,U.jsx)(y4,{app:r,selectedId:s,onSelect:c})}),(0,U.jsxs)(J,{label:`Custom Container Port`,htmlFor:`port`,description:`Aptible will deliver ${Xe(p)} traffic to your app on port (${P}).`,feedbackMessage:je.port,feedbackVariant:je.port?`danger`:`info`,children:[(0,U.jsx)(X,{id:`port`,name:`port`,type:`text`,value:d,onChange:e=>f(e.currentTarget.value)}),(0,U.jsxs)(`div`,{className:`text-base text-black-500 pt-2`,children:[`Choose any port number between 1 and 65535. Your app must be listening for `,Xe(p),` traffic on this port, and it must be exposed by your Docker image.`]})]}),(0,U.jsx)(J,{label:`Endpoint Type`,htmlFor:`endpoint-type`,children:(0,U.jsx)(XA,{ariaLabel:`Endpoint Type`,id:`endpoint-type`,options:Le,onSelect:e=>g(e.value),value:h})}),h===`managed`?(0,U.jsxs)(U.Fragment,{children:[We,ze,Be,C?Ve:null,C&&Ce?He:null,C&&Ce?Ue:null,Te?qe:null]}):h===`custom`?(0,U.jsxs)(U.Fragment,{children:[We,Ve,Ce?He:null,Ce?Ue:null,Te?qe:null,Te&&re?ze:null]}):(0,U.jsxs)(U.Fragment,{children:[We,Te?qe:null]}),(0,U.jsxs)(`div`,{className:`border-y border-gray-200 divide-y divide-gray-200`,children:[Je,Ye]}),(0,U.jsx)(TA,{...Ie}),(0,U.jsx)(hA,{envId:r.environmentId,isLoading:Ie.isLoading,type:`submit`,className:`w-[200px]`,children:`Save Endpoint`})]})]})},qJe=()=>{let[e]=Ee(),t=e.get(`environment_id`)||``;u(du({id:t}));let n=B(e=>tu(e,{id:t})),r=B(e=>zl(e,{id:n.stackId})),[i,a]=(0,V.useState)(``),[o,s]=(0,V.useState)(``),c=w(vf({name:i,envId:n.id})),l=e=>{e.preventDefault();let t=z4(i);s(t||``),c.trigger()},d=N();return T(c,()=>{d(Qa(c.meta.appId))}),(0,U.jsxs)(r5,{children:[(0,U.jsx)(`div`,{className:`text-center mt-10`,children:(0,U.jsx)(`h1`,{className:G.type.h1,children:`N
188ame your App`})}),(0,U.jsx)(I6,{cur:1}),(0,U.jsx)(Z,{className:`w-full max-w-[700px] mx-auto`,children:(0,U.jsxs)(`form`,{onSubmit:l,children:[(0,U.jsx)(J,{label:`Stack`,description:(0,U.jsxs)(`p`,{children:[`The App will be created inside this`,` `,(0,U.jsx)(`a`,{href:`https://www.aptible.com/docs/stacks`,target:`_blank`,rel:`noreferrer`,children:`Stack`})]}),htmlFor:`stack`,feedbackVariant:`info`,className:`mb-4`,children:(0,U.jsx)(`div`,{id:`stack`,children:(0,U.jsx)(P,{to:So(r.id),target:`_blank`,children:r.name})})}),(0,U.jsx)(J,{label:`Environment`,description:(0,U.jsxs)(`p`,{children:[`The App will be created inside this`,` `,(0,U.jsx)(`a`,{href:`https://www.aptible.com/docs/environments`,target:`_blank`,rel:`noreferrer`,children:`Environment`})]}),htmlFor:`env`,className:`mb-4`,children:(0,U.jsx)(`div`,{id:`env`,children:(0,U.jsx)(P,{to:Na(n.id),target:`_blank`,children:n.handle})})}),(0,U.jsx)(J,{label:`App Name`,description:R4,htmlFor:`name`,feedbackVariant:o?`danger`:`info`,feedbackMessage:o,children:(0,U.jsx)(X,{name:`name`,type:`text`,value:i,onChange:e=>a(e.currentTarget.value),autoFocus:!0})}),(0,U.jsx)(TA,{...c,className:`my-2`}),(0,U.jsx)(hA,{envId:t,className:`mt-4 w-full`,type:`submit`,isLoading:c.isLoading,disabled:i===``,children:`Create App`})]})}),(0,U.jsx)(`div`,{className:`hero-bg absolute w-full h-full top-0 left-0 z-[-999]`})]})},JJe=()=>{let e=N(),[t]=Ee(),n=t.get(`stack_id`)||``,r=B(ns),i=B(Wl),[a,o]=(0,V.useState)(n||i.id),[s,c]=(0,V.useState)(``),[l,u]=(0,V.useState)(``),d=w(_u({name:s,stackId:a,orgId:r.id}));return(0,V.useEffect)(()=>{o(n)},[n]),(0,V.useEffect)(()=>{n||o(i.id)},[i.id]),T(d,()=>{e(qa(`environment_id=${d.meta.id}`))}),(0,U.jsxs)(r5,{children:[(0,U.jsxs)(`div`,{className:`text-center mt-10`,children:[(0,U.jsx)(`h1`,{className:G.type.h1,children:`N
188ame your Environment`}),(0,U.jsx)(`p`,{className:`mt-4 mb-8 text-gray-600`,children:`An Aptible environment contains your app along with any required databases.`})]}),(0,U.jsx)(Z,{className:`w-full max-w-[700px] mx-auto`,children:(0,U.jsxs)(`form`,{onSubmit:e=>{e.preventDefault();let t=z4(s);u(t||``),d.trigger()},children:[(0,U.jsx)(TA,{...d,className:`my-2`}),(0,U.jsxs)(J,{label:`Stack`,htmlFor:`stack`,feedbackVariant:`info`,className:`mb-4`,children:[(0,U.jsx)($A,{value:a,onSelect:e=>{o(e.value)}}),(0,U.jsxs)(zA,{children:[`Need a new dedicated stack?`,` `,(0,U.jsx)(P,{to:_o(),children:`Request a new stack.`})]})]}),(0,U.jsx)(J,{label:`Environment Name`,description:R4,htmlFor:`name`,feedbackVariant:l?`danger`:`info`,feedbackMessage:l,children:(0,U.jsx)(X,{name:`name`,type:`text`,value:s,onChange:e=>c(e.currentTarget.value),autoFocus:!0})}),(0,U.jsx)(pA,{className:`mt-4 w-full`,type:`submit`,isLoading:d.isLoading,disabled:s===``,children:`Create Environment`})]})}),(0,U.jsx)(`div`,{className:`hero-bg absolute w-full h-full top-0 left-0 z-[-999]`})]})},v9=({onSuccess:e})=>{let[t]=Ee(),n=t.get(`stack_id`)||``,r=B(Wl),[i,a]=(0,V.useState)(n||r.id),[o,s]=(0,V.useState)(``),c=N();return(0,V.useEffect)(()=>{a(n)},[n]),(0,V.useEffect)(()=>{n||a(r.id)},[r.id]),(0,V.useEffect)(()=>{s(``)},[i]),(0,U.jsxs)(r5,{children:[(0,U.jsxs)(`div`,{className:`text-center mt-10`,children:[(0,U.jsx)(`h1`,{className:G.type.h1,children:`Choose your Environment`}),(0,U.jsx)(`p`,{className:`mt-4 mb-8 text-gray-600`,children:`An Aptible environment is a container for your Apps and Databases.`})]}),(0,U.jsx)(Z,{className:`w-full max-w-[700px] mx-auto`,children:(0,U.jsxs)(`form`,{onSubmit:t=>{t.preventDefault(),e?e({stackId:i,envId:o}):c(qa(`stack_id=${i}&environment_id=${o}`))},children:[(0,U.jsxs)(J,{label:`Stack`,htmlFor:`stack`,feedbackVariant:`info`,className:`mb-4`,children:[(0,U.jsx)($A,{value:i,onSelect:e=>{a(e.value)}}),(0,U.jsxs)(zA,{children:[`Need a new dedicated stack?`,` `,(0,U.jsx)(P,{to:_o(),children:`Request Stack`})]})]}),(0,U.jsxs)(J,{label:`Environment`,htmlFor:`env-select`,children:[(0,U.jsx)(ej,{onSelect:e=>{s(e.value)},value:o,stackId:i,ariaLabel:`env-select`}),(0,U.jsxs)(zA,{children:[`Need a new environment?`,` `,(0,U.jsx)(P,{to:Ya(),children:`Create Environment`})]})]}),(0,U.jsx)(K,{className:`mt-4 w-full`,type:`submit`,disabled:!i||!o,children:`Next`})]})}),(0,U.jsx)(`div`,{className:`hero-bg absolute w-full h-full top-0 left-0 z-[-999]`})]})},YJe={handle:e=>z4(e.handle),diskSize:e=>G4(e.diskSize),databaseImageId:e=>H4(e.databaseImageId,`must pick database`)},XJe=()=>{let e=l(),t=N(),[n,r]=Ee(),i=n.get(`environment_id`)||``,a=B(e=>tu(e,{id:i}));u(zv({envId:i}));let o=B(e=>Lv(e,{envId:i})),[s,c]=QS(YJe),d=u(vh()),f=B(_h),p=[{value:``,label:`Choose a Database`},...f.map(e=>({label:e.description,value:e.id}))],[m,h]=(0,V.useState)(``),[g,_]=(0,V.useState)(``),v=f.find(e=>e.id===m),y=e=>{let t=e.value,n=f.find(e=>e.id===t),r=`${`${a.handle}-${rLe(5)}`}-${n?.type||``}`;h(t),_(r)},{scaler:b,dispatchScaler:x,requestedContainerProfile:S}=gC({service:ut(),disk:it()}),C={envId:i,type:v?.type||``,handle:g,databaseImageId:m,enableBackups:!0,...b},w=wp(C),E=t=>{t.preventDefault(),c(C)&&e(w)},D=I(w);T(D,()=>{t(za(i))});let O=v?.type===`elasticsearch`?1024:0;return(0,V.useEffect)(()=>{v?.type===`elasticsearch`&&b.containerSize<1024&&x({type:`containerSize`,payload:1024})},[v?.type,b.containerSize]),i?(0,U.jsx)(v5,{children:(0,U.jsx)(Z,{children:(0,U.jsxs)(`form`,{onSubmit:E,children:[(0,U.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,U.jsx)(J,{htmlFor:`new-db`,label:`Database Type`,children:(0,U.jsx)(XA,{id:`new-db`,ariaLabel:`new-db`,onSelect:y,value:m,options:p,className:`flex-1 mr-2`,disabled:d.isLoading})}),(0,U.jsx)(J4,{value:C.handle,onChange:e=>_(e),feedbackMessage:s.handle,feedbackVariant:s.handle?`danger`:`default`}),(0,U.jsx)(s3,{scaler:b,dispatchScaler:x,envId:i}),(0,U.jsx)(o3,{scaler:b,dispatchScaler:x,error:s.diskSize}),(0,U.jsx)(NLe,{scaler:b,dispatchScaler:x}),(0,U.jsx)(a3,{scaler:b,dispatchScaler:x,minSize:O}),(0,U.jsx)(i3,{cpuShare:S.cpuShare,containerSize:b.containerSize}),(0,U.jsx)(g8,{service:{containerCount:1,containerMemoryLimitMb:b.containerSize,instanceClass:b.containerProfile},disk:{size:b.diskSize,provisionedIops:b.iops}})]}),(0,U.jsx)(`hr`,{className:`my-4`}),v?.pitrSupported&&!o.pitrDays&&(0,U.jsx)(q,{className:`mb-4`,variant:`warning`,children:(0,U.jsxs)(`p`,{children:[`Point-in-time Recovery (PITR) will not be automatically enabled since this`,` `,(0,U.jsx)(`a`,{href:Ba(i),rel:`noreferrer`,className:`underline`,children:`environment's backup retention policy`}),` `,`for recovery data is currently set to 0 days.`]})}),(0,U.jsx)(TA,{className:`mb-4`,...D}),(0,U.jsxs)(`div`,{className:`flex gap-2`,children:[(0,U.jsx)(hA,{envId:i,type:`submit`,isLoading:D.isLoading,disabled:m===``,children:`Save`}),(0,U.jsx)(K,{variant:`white`,onClick:()=>t(Fa(i)),children:`Cancel`})]})]})})}):(0,U.jsx)(v9,{onSuccess:e=>{r({stack_id:e.stackId,environment_id:e.envId},{replace:!0})}})},y9=qd(),ZJe=()=>{let{id:e=``}=F(),t=l(),n=B(t=>Ju(t,{id:e})),r=(0,V.useMemo)(()=>Jd({id:e}),[e]),[i,a]=(0,V.useState)(!1);return JS({action:r,cancel:y9}),(0,V.useEffect)(()=>{(n.status===`queued`||n.status===`running`)&&a(!0),(n.status===`failed`||n.status===`succeeded`)&&(t(y9),a(!1))},[n.status]),(0,U.jsx)(`div`,{className:`py-2`,children:(0,U.jsxs)(W,{variant:`horizontal`,size:`sm`,className:`items-center`,children:[(0,U.jsx)(SE,{show:i}),(0,U.jsx)(`div`,{className:`w-full`,children:(0,U.jsx)(w3,{op:n})})]})})},QJe=({children:e,navigation:t})=>(0,U.jsx)(`div`,{className:`flex-1 flex flex-col min-h-0 border-r border-gray-200 bg-white -mt-4 -ml-4 -mr-4`,children:(0,U.jsxs)(`div`,{className:`flex`,children:[(0,U.jsx)(`div`,{className:`w-[200px] py-6 px-6 fixed border-r border-black-100 h-full bg-off-white`,children:t}),(0,U.jsx)(`div`,{className:`ml-[200px] py-6 px-8 overflow-y-auto w-full mr-2 flex flex-col gap-6`,children:e})]})}),$Je=()=>(0,U.jsxs)(`nav`,{className:`flex flex-col gap-2`,children:[(0,U.jsx)(`div`,{className:`mb-4`,children:(0,U.jsx)(BU,{})}),(0,U.jsx)(`p`,{children:(0,U.jsx)(`b`,{children:`STYLES`})}),[{name:`Colors`,to:`#colors`},{name:`Typography`,to:`#typography`},{name:`AI Terms`,to:`#ai-terms`},{name:`Buttons`,to:`#buttons`},{name:`Banners`,to:`#banners`},{name:`Tables`,to:`#tables`},{name:`DataTable`,to:`#datatables`},{name:`Forms`,to:`#forms`},{name:`Progress Bars`,to:`#progress-bars`},{name:`Logs`,to:`#logs`},{name:`Pills`,to:`#pills`},{name:`Labels`,to:`#labels`},{name:`Counts`,to:`#counts`},{name:`Navigation`,to:`#navigation`},{name:`Icons`,to:`#icons`},{name:`Tooltips`,to:`#tooltips`},{name:`Resource Detail Boxes`,to:`#resource-detail-boxes`},{name:`Boxes`,to:`#boxes`},{name:`QR Example`,to:`#qrexample`}].map(({name:e,to:t})=>(0,U.jsx)(`a`,{className:G.type[`table link`],href:t,children:(0,U.jsx)(`div`,{className:`flex items-center`,children:(0,U.jsx)(`div`,{children:e})})},t))]}),eYe=()=>(0,U.jsxs)(`div`,{className:`pt-8 space-y-4`,children:[(0,U.jsx)(`h1`,{id:`banners`,className:G.type.h1,children:`Banners`}),(0,U.jsxs)(q,{className:`mt-2`,variant:`success`,children:[`Success banner with`,` `,(0,U.jsx)(`a`,{href:`/`,className:`underline`,children:`a link`})]}),(0,U.jsxs)(q,{className:`mt-2`,variant:`progress`,children:[`Progress banner with`,` `,(0,U.jsx)(`a`,{href:`/`,className:`underline`,children:`a link`})]}),(0,U.jsxs)(q,{className:`mt-2`,variant:`info`,children:[`Info banner with`,` `,(0,U.jsx)(`a`,{href:`/`,className:`underline`,children:`a link`})]}),(0,U.jsxs)(q,{className:`mt-2`,variant:`warning`,children:[`Warning banner with`,` `,(0,U.jsx)(`a`,{href:`/`,className:`underline`,children:`a link`})]}),(0,U.jsxs)(q,{className:`mt-2`,variant:`error`,children:[`Error banner with`,` `,(0,U.jsx)(`a`,{href:`/`,className:`underline`,children:`a link`})]}),(0,U.jsx)(q,{className:`mt-2`,variant:`success`,children:`This is a success banner with text wrapping enabled. It demonstrates how longer content flows naturally within the banner container while maintaining proper styling and alignment.`}),(0,U.jsx)(VBe,{dismissKey:`styles-preview`,badge:`SEP 2026`,icon:(0,U.jsx)(`span`,{children:`ð`}),title:`New: Platform Improvements`,description:`Container efficiency insights, AI Gateway usage breakdowns, and improved compliance reporting are now available.`,link:{href:`https://www.aptible.com/changelog`,label:`View changelog`}})]}),tYe=()=>(0,U.jsxs)(`div`,{className:`pt-8 space-y-4`,children:[(0,U.jsx)(`h1`,{id:`tables`,className:G.type.h1,children:`Tables`}),(0,U.jsxs)(VA,{children:[(0,U.jsxs)(HA,{children:[(0,U.jsx)(KA,{children:`Header 1`}),(0,U.jsx)(KA,{children:`Header 2`}),(0,U.jsx)(KA,{children:`Header 3`}),(0,U.jsx)(KA,{children:`Header 4`}),(0,U.jsx)(KA,{children:`Header 5`}),(0,U.jsx)(KA,{children:`Header 6`}),(0,U.jsx)(KA,{children:`Header 7`}),(0,U.jsx)(KA,{children:`Header 8`}),(0,U.jsx)(KA,{children:`Header 9`}),(0,U.jsx)(KA,{children:`Header 10`})]}),(0,U.jsxs)(UA,{children:[(0,U.jsxs)(WA,{children:[(0,U.jsx)(Y,{children:(0,U.jsx)(o4,{})}),(0,U.jsx)(Y,{children:`Row 1 Value 2`}),(0,U.jsx)(Y,{children:`Row 1 Value 3`}),(0,U.jsx)(Y,{children:`Row 1 Value 4`}),(0,U.jsx)(Y,{children:`Row 1 Value 5`}),(0,U.jsx)(Y,{children:`Row 1 Value 6`}),(0,U.jsx)(Y,{children:`Row 1 Value 7`}),(0,U.jsx)(Y,{children:`Row 1 Value 8`}),(0,U.jsx)(Y,{children:`Row 1 Value 9`}),(0,U.jsx)(Y,{children:`Row 1 Value 10`})]}),(0,U.jsxs)(WA,{children:[(0,U.jsx)(Y,{children:(0,U.jsx)(o4,{})}),(0,U.jsx)(Y,{children:`Row 2 Value 2`}),(0,U.jsx)(Y,{children:`Row 2 Value 3`}),(0,U.jsx)(Y,{children:`Row 2 Value 4`}),(0,U.jsx)(Y,{children:`Row 2 Value 5`}),(0,U.jsx)(Y,{children:`Row 2 Value 6`}),(0,U.jsx)(Y,{children:`Row 2 Value 7`}),(0,U.jsx)(Y,{children:`Row 2 Value 8`}),(0,U.jsx)(Y,{children:`Row 2 Value 9`}),(0,U.jsx)(Y,{children:`Row 2 Value 10`})]}),(0,U.jsxs)(WA,{children:[(0,U.jsxs)(Y,{children:[(0,U.jsx)(a4,{}),(0,U.jsx)(`span`,{children:`View Metrics`})]}),(0,U.jsx)(Y,{children:`Row 3 Value 2`}),(0,U.jsx)(Y,{children:`Row 3 Value 3`}),(0,U.jsx)(Y,{children:`Row 3 Value 4`}),(0,U.jsx)(Y,{children:`Row 3 Value 5`}),(0,U.jsx)(Y,{children:`Row 3 Value 6`}),(0,U.jsx)(Y,{children:`Row 3 Value 7`}),(0,U.jsx)(Y,{children:`Row 3 Value 8`}),(0,U.jsx)(Y,{children:`Row 3 Value 9`}),(0,U.jsx)(Y,{children:`Row 3 Value 10`})]}),(0,U.jsxs)(WA,{children:[(0,U.jsxs)(Y,{children:[(0,U.jsx)(i4,{}),(0,U.jsx)(`span`,{children:`Save up to $10.42`})]}),(0,U.jsx)(Y,{children:`Row 4 Value 2`}),(0,U.jsx)(Y,{children:`Row 4 Value 3`}),(0,U.jsx)(Y,{children:`Row 4 Value 4`}),(0,U.jsx)(Y,{children:`Row 4 Value 5`}),(0,U.jsx)(Y,{children:`Row 4 Value 6`}),(0,U.jsx)(Y,{children:`Row 4 Value 7`}),(0,U.jsx)(Y,{children:`Row 4 Value 8`}),(0,U.jsx)(Y,{children:`Row 4 Value 9`}),(0,U.jsx)(Y,{children:`Row 4 Value 10`})]}),(0,U.jsxs)(WA,{children:[(0,U.jsx)(Y,{children:`Row 5 Value 1`}),(0,U.jsx)(Y,{children:`Row 5 Value 2`}),(0,U.jsx)(Y,{children:`Row 5 Value 3`}),(0,U.jsx)(Y,{children:`Row 5 Value 4`}),(0,U.jsx)(Y,{children:`Row 5 Value 5`}),(0,U.jsx)(Y,{children:`Row 5 Value 6`}),(0,U.jsx)(Y,{children:`Row 5 Value 7`}),(0,U.jsx)(Y,{children:`Row 5 Value 8`}),(0,U.jsx)(Y,{children:`Row 5 Value 9`}),(0,U.jsx)(Y,{children:`Row 5 Value 10`})]})]})]})]}),nYe=()=>
188{let e=[{appId:`63798`,envId:`8458`,name:`my-app`,cost:1423.5,status:`active`,date:`2024-03-15T14:30:00Z`,services:[ut({containerMemoryLimitMb:512,containerCount:2}),ut({containerMemoryLimitMb:1024,containerCount:1})]},{appId:`63797`,envId:`8456`,name:`api-service`,cost:892.25,status:`pending`,date:`2024-02-28T09:15:00Z`,services:[ut({containerMemoryLimitMb:2048,containerCount:3})]},{appId:`63796`,envId:`8457`,name:`worker-process`,cost:234.75,status:`inactive`,date:`2024-01-10T20:45:00Z`,services:[ut({containerMemoryLimitMb:512,containerCount:1})]}],t={active:`success`,pending:`pending`,inactive:`error`},n=[{field:`name`,headerName:`DataTableCell`,cellRenderer:({data:e})=>(0,U.jsx)(U2,{label:e.name,description:`label + description`})},{field:`appId`,headerName:`AppCell`,headerTooltip:`Requires Redux store data â shows empty state in this demo`,cellRenderer:({data:e})=>(0,U.jsx)(W2,{id:e.appId})},{field:`envId`,headerName:`EnvironmentCell`,headerTooltip:`Requires Redux store data â shows empty state in this demo`,cellRenderer:({data:e})=>(0,U.jsx)(G2,{id:e.envId})},{field:`services`,headerName:`ServicesCell`,cellRenderer:({data:e})=>(0,U.jsx)(K2,{services:e.services})},{field:`cost`,headerName:`CurrencyCell`,cellRenderer:({data:e})=>(0,U.jsx)(q2,{value:e.cost})},{field:`status`,headerName:`PillCell`,cellRenderer:({data:e})=>(0,U.jsx)(J2,{value:e.status,valueToVariantMap:t})},{field:`date`,headerName:`DateTimeCell`,cellRenderer:({data:e})=>(0,U.jsx)(Y2,{date:e.date})}],[r,i]=(0,V.useState)([]);return(0,U.jsxs)(`div`,{className:`pt-8 space-y-4`,children:[(0,U.jsx)(`h1`,{id:`datatables`,className:G.type.h1,children:`DataTable`}),(0,U.jsx)(L2,{rowData:e,colDefs:n}),(0,U.jsx)(`h2`,{className:G.type.h2,children:`Row Selection`}),(0,U.jsxs)(`p`,{children:[`Pass `,(0,U.jsx)(YU,{children:`rowSelection`}),` to add a checkbox column, and omit it to take the column away. Selecting rows calls`,` `,(0,U.jsx)(YU,{children:`onSelectionChanged`}),` with every selected row, and`,` `,(0,U.jsx)(YU,{children:`isRowSelected`}),` seeds the initial selection (`,(0,U.jsx)(YU,{children:`worker-process`}),` here). Pair it with `,(0,U.jsx)(YU,{children:`rowId`}),` â without stable row ids, ag-grid drops the selection whenever the caller re-renders with a new `,(0,U.jsx)(YU,{children:`rowData`}),` array.`]}),(0,U.jsxs)(`p`,{children:[`With selection on, the search box also takes `,(0,U.jsx)(YU,{children:`selected:true`}),` `,`and `,(0,U.jsx)(YU,{children:`selected:false`}),`. Both read as a snapshot from when the term was typed, since ag-grid doesn't re-filter as rows are checked.`]}),(0,U.jsx)(L2,{rowData:e,colDefs:n.slice(0,3),rowSelection:`multiRow`,rowId:e=>e.appId,isRowSelected:e=>e.name===`worker-process`,onSelectionChanged:i}),(0,U.jsxs)(`p`,{children:[`Selected:`,` `,r.length===0?`none`:r.map(e=>e.name).join(`, `)]})]})},rYe=()=>(0,U.jsxs)(`div`,{className:`pt-8 space-y-4`,children:[(0,U.jsx)(`h1`,{id:`data`,className:G.type.h1,children:`Data`}),(0,U.jsx)(`div`,{className:`w-[300px]`,children:(0,U.jsx)(d8,{data:[{key:`Key1`,value:`Value1`},{key:`Key2`,value:`Value2`},{key:`Key3`,value:`Value3`}]})})]}),iYe=()=>{let[e,t]=(0,V.useState)(``),n=e=>t(e.currentTarget.value),[r,i]=(0,V.useState)(``),[a,o]=(0,V.useState)(``),[s,c]=(0,V.useState)(`Drop a text file into this textarea`),[l,u]=(0,V.useState)(Be.utc().toISODate()),[d,f]=(0,V.useState)(Be.utc().toISO({extendedZone:!0})),p=e=>{i(e.value)},[m,h]=(0,V.useState)([]),g=Array(8).fill(0).map((e,t)=>({label:`Select Menu Option ${t+1}`,value:`option_${t+1}`})),_=(0,V.useMemo)(()=>Array.from({length:5e3},(e,t)=>({label:`Account ${t+1}`,value:`account_${t+1}`})),[]),[v,y]=(0,V.useState)([]),b=(0,V.useMemo)(()=>Array.from({length:_.length},(e,t)=>({label:`Account ${t+1}`,value:`account_${t+1}`})),[]),[x,S]=(0,V.useState)([]),[C,w]=(0,V.useState)(``),[T,E]=(0,V.useState)(``),[D,O]=(0,V.useState)(``),[k,A]=(0,V.useState)([{label:`Operation`,value:`operation`},{label:`Target`,value:`target`},{label:`Additional Info`,value:`additionalInfo`},{label:`Status`,value:`status`},{label:`Actor`,value:`actor`},{label:`Environment`,value:`environment`},{label:`Occurred At`,value:`occurredAt`}]),[j,M]=(0,V.useState)(k.map(e=>e.value)),ee=[].find(e=>e.value===r);return(0,U.jsxs)(`div`,{className:`pt-8 flex flex-col gap-2 w-1/3`,children:[(0,U.jsx)(`h1`,{id:`forms`,className:G.type.h1,children:`Forms`}
188),(0,U.jsx)(YH,{className:`mt-4`,placeholder:`Search field...`,search:e,onChange:n}),(0,U.jsx)(X,{className:`mt-4`,name:`app-handle`,type:`text`,value:a,onChange:e=>o(e.currentTarget.value),autoComplete:`name`,"data-testid":`input-name`,id:`input-name`,placeholder:`Input`}),(0,U.jsx)(X,{className:`mt-4`,name:`app-handle`,type:`text`,value:a,onChange:e=>o(e.currentTarget.value),disabled:!0,autoComplete:`name`,"data-testid":`input-name`,id:`input-name`,placeholder:`Disabled input`}),(0,U.jsx)(`div`,{className:`my-4`,children:(0,U.jsx)(`h3`,{className:G.type.h3,children:`Date Picker`})}),(0,U.jsx)(sU,{className:`mt-4 max-w-full`,name:`app-date`,granularity:`day`,defaultValue:aT(l),value:aT(l),onChange:e=>e&&u(e.toString()),autoComplete:`name`,"data-testid":`input-name`,id:`input-name`}),(0,U.jsx)(sU,{className:`mt-4 max-w-full`,name:`app-datetime`,granularity:`minute`,defaultValue:oT(d),value:oT(d),onChange:e=>e&&f(e.toString()),autoComplete:`name`,"data-testid":`input-name`,id:`input-name`}),(0,U.jsx)(sU,{className:`mt-4 max-w-full`,isDisabled:!0,name:`app-date-disabled`,granularity:`day`,autoComplete:`name`,"data-testid":`input-name`,id:`input-name`}),(0,U.jsx)(`div`,{className:`my-4`,children:(0,U.jsx)(`h3`,{className:G.type.h3,children:`Date Range Picker`})}),(0,U.jsx)(cU,{className:`mt-4 max-w-full`,granularity:`day`,"data-testid":`input-name`,defaultValue:{start:oT(`2025-02-03T08:45:00[America/Los_Angeles]`),end:oT(`2025-02-14T08:45:00[America/Los_Angeles]`)},id:`date-rangeinput-name-1`}),(0,U.jsx)(`p`,{className:`mt-4 mb-0 pb-0`,children:`Future selection disabled:`}),(0,U.jsx)(cU,{className:`mt-4 max-w-full`,granularity:`day`,"data-testid":`input-name`,disableFuture:!0,defaultValue:{start:oT(`2025-01-03T08:45:00[America/Los_Angeles]`),end:oT(`2025-01-05T08:45:00[America/Los_Angeles]`)},id:`date-range-input-name-2`}),(0,U.jsx)(`p`,{className:`mt-4 mb-0 pb-0`,children:`Future selection disabled with max range selection:`}),(0,U.jsx)(cU,{className:`mt-4 max-w-full`,granularity:`day`,"data-testid":`input-name`,disableFuture:!0,maxRangeDays:5,defaultValue:{start:oT(`2025-01-03T08:45:00[America/Los_Angeles]`),end:oT(`2025-01-05T08:45:00[America/Los_Angeles]`)},id:`date-range-input-name-2`}),(0,U.jsx)(`div`,{className:`my-4`,children:(0,U.jsx)(`h3`,{className:G.type.h3,children:`Date-Time Range Picker`})}),(0,U.jsx)(lU,{className:`mt-4 max-w-full`,granularity:`minute`,"data-testid":`input-datetime-range`,defaultValue:{start:oT(`2025-02-03T09:00:00[America/Los_Angeles]`),end:oT(`2025-02-03T17:00:00[America/Los_Angeles]`)},id:`datetime-range-input-name-1`}),(0,U.jsx)(`p`,{className:`mt-4 mb-0 pb-0`,children:`Future selection disabled:`}),(0,U.jsx)(lU,{className:`mt-4 max-w-full`,granularity:`minute`,"data-testid":`input-datetime-range-2`,disableFuture:!0,defaultValue:{start:oT(`2025-01-03T08:00:00[America/Los_Angeles]`),end:oT(`2025-01-05T18:30:00[America/Los_Angeles]`)},id:`datetime-range-input-name-2`}),(0,U.jsx)(`p`,{className:`mt-4 mb-0 pb-0`,children:`With 12-hour format:`}),(0,U.jsx)(lU,{className:`mt-4 max-w-full`,granularity:`minute`,hourCycle:12,"data-testid":`input-datetime-range-3`,defaultValue:{start:oT(`2025-02-03T09:00:00[America/Los_Angeles]`),end:oT(`2025-02-03T17:00:00[America/Los_Angeles]`)},id:`datetime-range-input-name-3`}),(0,U.jsx)(`h3`,{className:`${G.type.h3} mt-4`,children:`Select`}),(0,U.jsx)(XA,{className:`mt-4`,onSelect:p,value:ee,options:g}),(0,U.jsx)(`h3`,{className:`${G.type.h3} mt-4`,children:`SearchableSelect`}),(0,U.jsx)(C8,{className:`mt-2`,options:g,value:C,onChange:e=>w(e||``)}),(0,U.jsxs)(`h3`,{className:`${G.type.h3} mt-4`,children:[`SearchableSelect (`,_.length,` items, virtualized)`]}),(0,U.jsx)(C8,{className:`mt-2`,options:_,value:T,onChange:e=>E(e||``)}),(0,U.jsxs)(`h3`,{className:`${G.type.h3} mt-4`,children:[`SearchableSelect (`,b.length,` items, `,(0,U.jsx)(`em`,{children:`not`}),` `,`virtualized)`]}),(0,U.jsx)(C8,{className:`mt-2`,options:b,value:D,onChange:e=>O(e||``),disableVirtualization:!0}),(0,U.jsx)(`h3`,{className:`${G.type.h3} mt-4`,children:`MultiSelect`}),(0,U.jsx)(C6,{className:`mt-2`,options:g,value:m,onChange:e=>h(e)}),(0,U.jsxs)(`h3`,{className:`${G.type.h3} mt-4`,children:[`MultiSelect (`,_.length,` items, virtualized)`]}
188),(0,U.jsx)(C6,{className:`mt-2`,options:_,value:v,onChange:e=>y(e)}),(0,U.jsxs)(`h3`,{className:`${G.type.h3} mt-4`,children:[`MultiSelect (`,b.length,` items, `,(0,U.jsx)(`em`,{children:`not`}),` virtualized)`]}),(0,U.jsx)(C6,{className:`mt-2`,options:b,value:x,onChange:e=>S(e),disableVirtualization:!0}),(0,U.jsx)(`h3`,{className:`${G.type.h3} mt-4`,children:`ReorderableMultiSelect`}),(0,U.jsx)(b6,{className:`mt-2`,options:k,selectedValues:j,onSelectionChange:M,onOrderChange:e=>{let t=new Map(k.map(e=>[e.value,e]));A(e.map(e=>t.get(e)))}}),(0,U.jsx)(`div`,{className:`mt-4`,children:(0,U.jsxs)(QA,{name:`service`,selected:`cmd`,onSelect:()=>{},children:[(0,U.jsx)(ZA,{value:`unchecked`,children:`Radio unchecked`}),(0,U.jsx)(ZA,{value:`cmd`,children:`Radio checked`}),(0,U.jsx)(ZA,{value:`disabled`,disabled:!0,children:`Radio disabled`})]})}),(0,U.jsxs)(`div`,{className:`mt-4`,children:[(0,U.jsx)(ZH,{checked:!0,label:`Check Box`}),(0,U.jsx)(ZH,{checked:!1,label:`Check Box`}),(0,U.jsx)(ZH,{checked:!0,label:`Check Box - size sm`,variantSize:`sm`}),(0,U.jsx)(ZH,{checked:!1,label:`Check Box - size sm`,variantSize:`sm`}),(0,U.jsx)(ZH,{checked:!0,label:`Check Box - simple`,variant:`simple`}),(0,U.jsx)(ZH,{checked:!1,label:`Check Box - simple`,variant:`simple`}),(0,U.jsx)(ZH,{checked:!0,label:`Check Box - simple - size sm`,variant:`simple`,variantSize:`sm`}),(0,U.jsx)(ZH,{checked:!1,label:`Check Box - simple - size sm`,variant:`simple`,variantSize:`sm`})]}),(0,U.jsxs)(`div`,{className:`mt-4`,children:[(0,U.jsx)(`h3`,{className:G.type.h3,children:`Switches`}),(0,U.jsxs)(`div`,{className:`mt-4 space-y-4`,children:[(0,U.jsx)(A2,{checked:!0,children:`Enabled Switch`}),(0,U.jsx)(A2,{checked:!1,children:`Disabled Switch`}),(0,U.jsx)(A2,{checked:!0,disabled:!0,children:`Disabled & Checked`})]})]}),(0,U.jsx)(XH,{className:`${G.type.textarea} mt-4`,defaultValue:`Editable textarea`}),(0,U.jsx)(dU,{"aria-label":`File drop textarea`,className:`mt-4`,value:s,onValueChange:c}),(0,U.jsx)(`div`,{className:`my-4`,children:(0,U.jsx)(`h3`,{className:G.type.h3,children:`Form Groups`})}),(0,U.jsx)(J,{htmlFor:`input - name`,label:`Label`,children:(0,U.jsx)(X,{name:`app-handle`,type:`text`,value:a,onChange:e=>o(e.currentTarget.value),autoComplete:`name`,"data-testid":`input-name`,id:`input-name`,placeholder:`Input`})})]})},aYe=()=>(0,U.jsxs)(`div`,{className:`space-y-4`,children:[(0,U.jsx)(`h1`,{id:`colors`,className:G.type.h1,children:`Colors`}),(0,U.jsx)(`h3`,{className:G.type.h3,children:`Main Colors`}),(0,U.jsxs)(`div`,{className:`flex my-2`,children:[(0,U.jsx)(`div`,{className:`rounded-full bg-black w-[32px] h-[32px] block mr-2`}),(0,U.jsx)(`p`,{className:`leading-8`,children:`Black`})]}),(0,U.jsxs)(`div`,{className:`flex my-2`,children:[(0,U.jsx)(`div`,{className:`rounded-full bg-white border-solid border border-black w-[32px] h-[32px] block mr-2`}),(0,U.jsx)(`p`,{className:`leading-8`,children:`White`})]}),(0,U.jsxs)(`div`,{className:`flex my-2`,children:[(0,U.jsx)(`div`,{className:`rounded-full bg-indigo
188w-[32px] h-[32px] block mr-2`}),(0,U.jsx)(`p`,{className:`leading-8`,children:`Indigo`})]}),(0,U.jsxs)(`div`,{className:`flex my-2`,children:[(0,U.jsx)(`div`,{className:`rounded-full bg-yellow w-[32px] h-[32px] block mr-2`}),(0,U.jsx)(`p`,{className:`leading-8`,children:`Yellow`})]}),(0,U.jsxs)(`div`,{className:`flex my-2`,children:[(0,U.jsx)(`div`,{className:`rounded-full bg-gold w-[32px] h-[32px] block mr-2`}),(0,U.jsx)(`p`,{className:`leading-8`,children:`Gold`})]}),(0,U.jsxs)(`div`,{className:`flex my-2`,children:[(0,U.jsx)(`div`,{className:`rounded-full bg-forest w-[32px] h-[32px] block mr-2`}),(0,U.jsx)(`p`,{className:`leading-8`,children:`Forest`})]}),(0,U.jsxs)(`div`,{className:`flex my-2`,children:[(0,U.jsx)(`div`,{className:`rounded-full bg-red w-[32px] h-[32px] block mr-2`}),(0,U.jsx)(`p`,{className:`leading-8`,children:`Red`})]}),(0,U.jsx)(`h3`,{className:G.type.h3,children:`Misc. Colors`}),(0,U.jsxs)(`div`,{className:`flex my-2`,children:[(0,U.jsx)(`div`,{className:`rounded-full bg-off-white border-solid border border-black w-[32px] h-[32px] block mr-2`}),(0,U.jsx)(`p`,{className:`leading-8`,children:`Off-White`})]}),(0,U.jsxs)(`div`,{className:`flex my-2`,children:[(0,U.jsx)(`div`,{className:`rounded-full bg-lime w-[32px] h-[32px] block mr-2`}),(0,U.jsx)(`p`,{className:`leading-8`,children:`Lime`})]}),(0,U.jsxs)(`div`,{className:`flex my-2`,children:[(0,U.jsx)(`div`,{className:`rounded-full bg-cyan w-[32px] h-[32px] block mr-2`}),(0,U.jsx)(`p`,{className:`leading-8`,children:`Cyan`})]}),(0,U.jsxs)(`div`,{className:`flex my-2`,children:[(0,U.jsx)(`div`,{className:`rounded-full bg-brown w-[32px] h-[32px] block mr-2`}),(0,U.jsx)(`p`,{className:`leading-8`,children:`Brown`})]}),(0,U.jsxs)(`div`,{className:`flex my-2`,children:[(0,U.jsx)(`div`,{className:`rounded-full bg-lavender w-[32px] h-[32px] block mr-2`}),(0,U.jsx)(`p`,{className:`leading-8`,children:`Lavender`})]}),(0,U.jsxs)(`div`,{className:`flex my-2`,children:[(0,U.jsx)(`div`,{className:`rounded-full bg-plum w-[32px] h-[32px] block mr-2`}),(0,U.jsx)(`p`,{className:`leading-8`,children:`Plum`})]})]}),oYe=()=>(0,U.jsxs)(`div`,{className:`pt-8 space-y-4`,children:[(0,U.jsx)(`h1`,{id:`typography`,className:G.type.h1,children:`Typography`}),(0,U.jsx)(`h1`,{className:G.type.h1,children:`H1 Heading`}),(0,U.jsx)(`h2`,{className:G.type.h2,children:`H2 Heading`}),(0,U.jsx)(`h3`,{className:G.type.h3,children:`H3 Heading`}),(0,U.jsx)(`h4`,{className:G.type.h4,children:`H4 Heading`}),(0,U.jsx)(`p`,{children:`Paragraph text`}),(0,U.jsx)(`p`,{children:(0,U.jsx)(`a`,{href:`/`,children:`Link Text (Unstyled)`})}),(0,U.jsx)(`p`,{children:(0,U.jsx)(`a`,{className:G.type.link,href:`/`,children:`Link Text (Styled as tokens.type.link)`})}),(0,U.jsx)(`p`,{children:`Paragraph variants`}),(0,U.jsx)(`p`,{className:G.type[`small semibold darker`],children:`Small semibold darker`}),(0,U.jsx)(`p`,{className:G.type[`small normal darker`],children:`Small normal darker`}),(0,U.jsx)(`p`,{className:G.type[`small normal lighter`],children:`Small normal lighter`}),(0,U.jsx)(`p`,{className:G.type[`medium label`],children:`Medium label`}),(0,U.jsx)(`p`,{className:G.type.textarea,children:`Textarea format`}),(0,U.jsx)(w4,{segments:NIe([`git`,`push`,`origin`,`main`]),allowCopy:!0})]}),sYe=()=>(0,U.jsxs)(`div`,{className:`pt-8 space-y-4`,children:[(0,U.jsx)(`h1`,{id:`ai-terms`,className:G.type.h1,children:`AI Terms`}),(0,U.jsx)(OA,{action:`enrolling`})]}),cYe=()=>(0,U.jsxs)(`div`,{className:`pt-8 space-y-4`,children:[(0,U.jsx)(`h1`,{id:`buttons`,className:G.type.h1,children:`Buttons`}),(0,U.jsx)(`h3`,{className:G.type.h3,children:`Button Variants`}),(0,U.jsx)(K,{className:`mt-2`,children:`Button Default`}),(0,U.jsx)(K,{className:`mt-2`,variant:`primary`,children:`Primary Button`}),(0,U.jsx)(K,{className:`mt-2`,variant:`delete`,children:`Delete Button`}),(0,U.jsx)(K,{className:`mt-2`,variant:`secondary`,children:`Secondary Button`}),(0,U.jsx)(K,{className:`mt-2`,variant:`success`,children:`Success Button`}),(0,U.jsx)(K,{className:`mt-2`,variant:`white`,children:`White Button`}),(0,U.jsx)(cA,{icon:(0,U.jsx)(qE,{}),children:`Button Icon`}),(0,U.jsx)(dA,{className:`w-fit`,to:`#`,children:`Button Link`}),(0,U.jsx)(`h3`,{className:G.type.h3,children:`Button Sizes`}),(0,U.jsx)(K,{className:`mt-2`,size:`xs`,children:`Extra Small`}),(0,U.jsx)(K,{className:`mt-2`,size:`sm`,children:`Small`}),(0,U.jsx)(K,{className:`mt-2`,size:`md`,children:`Medium`}),(0,U.jsx)(K,{className:`mt-2`,size:`lg`,children:`Large`}),(0,U.jsx)(K,{className:`mt-2`,size:`xl`,children:`Extra Large`}),(0,U.jsx)(`h3`,{className:G.type.h3,children:`Button States`}),(0,U.jsx)(K,{className:`mt-2`,disabled:!0,children:`Button Disabled`}),(0,U.jsx)(K,{className:`mt-2`,isLoading:!0})]}),lYe=()=>(0,U.jsxs)(`div`,{className:`pt-8 space-y-4`,children:[(0,U.jsx)(`h1`,{id:`progress-bars`,className:G.type.h1,children:`Progress Bars`}),(0,U.jsx)(`h3`,{className:G.type.h3,children:`Basic Progress Bar`}),(0,U.jsxs)(`div`,{className:`w-[400px] space-y-4`,children:[(0,U.jsx)(k8,{value:25,maxValue:100}),(0,U.jsx)(k8,{value:50,maxValue:100}),(0,U.jsx)(k8,{value:75,maxValue:100}),(0,U.jsx)(k8,{value:90,maxValue:100})]}),(0,U.jsx)(`h3`,{className:G.type.h3,children:`Progress Bar Variants`}),(0,U.jsxs)(`div`,{className:`w-[400px] space-y-4`,children:[(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`p`,{className:`text-sm text-gray-600 mb-1`,children:`Default`}),(0,U.jsx)(k8,{value:60,maxValue:100,variant:`default`})]}),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`p`,{className:`text-sm text-gray-600 mb-1`,children:`Info`}),(0,U.jsx)(k8,{value:60,maxValue:100,variant:`info`})]}),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`p`,{className:`text-sm text-gray-600 mb-1`,children:`Success`}),(0,U.jsx)(k8,{value:60,maxValue:100,variant:`success`})]}),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`p`,{className:`text-sm text-gray-600 mb-1`,children:`Warning`}),(0,U.jsx)(k8,{value:60,maxValue:100,variant:`warning`})]}),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`p`,{className:`text-sm text-gray-600 mb-1`,children:`Error`}),(0,U.jsx)(k8,{value:60,maxValue:100,variant:`error`})]})]}),(0,U.jsx)(`h3`,{className:G.type.h3,children:`Progress Bar Sizes`}),(0,U.jsxs)(`div`,{className:`w-[400px] space-y-4`,children:[(0,U.jsx)(k8,{value:60,maxValue:100,height:`sm`}),(0,U.jsx)(k8,{value:60,maxValue:100,height:`md`}),(0,U.jsx)(k8,{value:60,maxValue:100,height:`lg`})]}),(0,U.jsx)(`h3`,{className:G.type.h3,children:`Progress Bar Detail Component`}),(0,U.jsx)(`div`,{className:`w-[400px]`,children:(0,U.jsx)(A8,{label:`Monthly Spend Limit`,value:4302.17,maxValue:5e3,unit:`USD`,resetDate:`2026-02-01T00:00:00Z`})}),(0,U.jsx)(`div`,{className:`w-[400px] mt-4`,children:(0,U.jsx)(A8,{label:`API Requests`,value:75e4,maxValue:1e6,unit:`requests`})})]}),uYe=()=>(0,U.jsxs)(`div`,{className:`pt-8 space-y-4 w-[500px]`,children:[(0,U.jsx)(`h1`,{id:`logs`,className:G.type.h1,children:`Logs`}),(0,U.jsx)(C3,{text:`2023-06-14 16:45:39 +0000 INFO -- : Starting Database backup operation with ID: 3946 1892023-06-14 16:45:39 +0000 INFO -- : Obtaining dependency information for asgiref==3.7.2 from https://files.pythonhosted.org/packages/9b/80/b9051a4a07ad231558fcd8ffc89232711b4e618c15cb7a392a17384bbeef/asgiref-3.7.2-py3-none-any.whl.metadata 1902023-06-14 16:45:39 +0000 INFO -- : STARTING: Snapshot EBS volume 1912023-06-14 16:45:40 +0000 WARN -- : WAITING FOR: Snapshot EBS volume 1922023-06-14 16:45:52 +0000 INFO -- : WAITING FOR: Snapshot EBS volume 1932023-06-14 16:46:04 +0000 INFO -- : WAITING FOR: Snapshot EBS volume 1942023-06-14 16:46:16 +0000 ERROR -- : WAITING FOR: Snapshot EBS volume 1952023-06-14 16:46:29 +0000 INFO -- : WAITING FOR: Snapshot EBS volume 1962023-06-14 16:46:41 +0000 INFO -- : WAITING FOR: Snapshot EBS volume 1972023-06-14 16:46:45 +0000 INFO -- : COMPLETED (after 65.95s): Snapshot EBS volume 1982023-06-14 16:46:45 +0000 INFO -- : STARTING: Commit Backup in API 1992023-06-14 16:46:46 +0000 INFO -- : COMPLETED (after 0.2s): Commit Backup in API 200`})]}),dYe=()=>(0,U.jsxs)(`div`,{className:`pt-8 space-y-4`,children:[(0,U.jsxs)(`h1`,{id:`pills`,className:`${G.type.h1} flex items-center gap-1.5`,children:[`Pills`,(0,U.jsx)(_U,{text:`Pills are primarily used for status. Think: container efficiency & operations. They should be used sparingly (ideally no more than one column per table), otherwise they will compete visually and become less meaningful. Note that they can a
200ppear with or without icons.`,ariaLabel:`More about pills`})]}),(0,U.jsxs)(`div`,{className:`mt-4 flex flex-col items-start gap-4`,children:[(0,U.jsx)(H2,{variant:`error`,icon:(0,U.jsx)(JE,{variant:`sm`,color:`#AD1A1A`}),children:`Fail`}),(0,U.jsx)(H2,{variant:`success`,icon:(0,U.jsx)(CD,{variant:`sm`,color:`#425B21`}),children:`Success`}),(0,U.jsx)(H2,{variant:`pending`,icon:(0,U.jsx)(wD,{variant:`sm`}),children:`Queued`}),(0,U.jsx)(s4,{}),(0,U.jsx)(o4,{}),(0,U.jsx)(a4,{}),(0,U.jsx)(i4,{})]})]}),fYe=()=>(0,U.jsxs)(`div`,{className:`pt-8 space-y-4`,children:[(0,U.jsx)(`h1`,{id:`labels`,className:G.type.h1,children:`Labels`}),(0,U.jsxs)(`div`,{className:`mt-4`,children:[(0,U.jsx)(`h3`,{className:G.type.h3,children:`On/Off`}),(0,U.jsxs)(`div`,{className:`mt-4 flex items-center gap-4`,children:[(0,U.jsx)(bU,{on:!0}),(0,U.jsx)(bU,{on:!1})]})]}),(0,U.jsxs)(`div`,{className:`mt-4`,children:[(0,U.jsx)(`h3`,{className:G.type.h3,children:`Enabled/Disabled`}),(0,U.jsxs)(`div`,{className:`mt-4 flex items-center gap-4`,children:[(0,U.jsx)(O6,{enabled:!0}),(0,U.jsx)(O6,{enabled:!1})]})]}),(0,U.jsxs)(`div`,{className:`mt-4`,children:[(0,U.jsx)(`h3`,{className:G.type.h3,children:`Deployment Label`}),(0,U.jsx)(`p`,{className:`mt-2 text-black-500`,children:`Tag chip used to mark deployments in a comparison view (e.g. in the rollback modal). May expand to include other colors if needed, but red should be avoided.`}),(0,U.jsxs)(`div`,{className:`mt-4 flex items-center gap-4`,children:[(0,U.jsx)(D6,{variant:`default`,children:`Current`}),(0,U.jsx)(D6,{variant:`success`,children:`Selected to restore`}),(0,U.jsx)(D6,{variant:`default`,onRemove:()=>{},children:`Removable`})]})]}),(0,U.jsxs)(`div`,{className:`mt-4`,children:[(0,U.jsx)(`h3`,{id:`counts`,className:G.type.h3,children:`Counts`}),(0,U.jsx)(`p`,{className:`mt-2 text-black-500`,children:`Used to show item counts alongside tab labels`}),(0,U.jsxs)(`div`,{className:`mt-4 flex items-center gap-4`,children:[(0,U.jsx)(bE,{n:3}),(0,U.jsx)(bE,{n:12}),(0,U.jsx)(bE,{n:128})]}),(0,U.jsx)(`p`,{className:`mt-4 text-black-500`,children:`Count is 0`}),(0,U.jsx)(`div`,{className:`mt-4 flex items-center gap-4`,children:(0,U.jsx)(bE,{n:0})}),(0,U.jsx)(`p`,{className:`mt-4 text-black-500`,children:`Loading`}),(0,U.jsx)(`div`,{className:`mt-4 flex items-center gap-4`,children:(0,U.jsx)(bE,{n:null})})]})]});function pYe(e){return`icons / ${e.replace(/^Icon/,``).replace(/([A-Z]+)([A-Z][a-z])/g,`$1-$2`).replace(/([a-z])([A-Z])/g,`$1-$2`).toLowerCase()}`}var mYe={IconActivity:`1548-3879`,IconAI:`2152-1615`,IconAlertCircle:`2993-1245`,IconAlertTriangle:`865-614`,IconAptible:`1040-901`,IconArrowDown:`865-453`,IconArrowLeft:`865-454`,IconArrowRight:`865-455`,IconArrowUp:`865-452`,IconAws:`1488-4285`,IconBars3:`865-514`,IconBell:`1005-830`,IconBitbucket:`897-820`,IconBox:`865-493`,IconCalendar:`865-523`,IconCard:`1133-1169`,IconCertificate:`1627-4776`,IconChartSquareBar:`865-506`,IconCheck:`865-558`,IconCheckCircle:`865-557`,IconCheckCircleAlt:`3051-1191`,IconChevronDown:`865-458`,IconChevronLeft:`865-459`,IconChevronRight:`865-460`,IconChevronUp:`865-461`,IconCircleStack:`865-624`,IconClock:null,IconCloud:`865-469`,IconCommit:`932-735`,IconCopy:`865-570`,IconCreditCard:`1133-1169`,IconCylinder:`865-624`,IconCube:`865-493`,IconDeployments:`865-470`,IconDiagnostics:`865-506`,IconDiff:`2053-1377`,IconDocs:`3779-2`,IconDocumentSearch:`865-466`,IconDownload:`865-613`,IconDuplicate:`865-570`,IconEdit:`865-465`,IconEllipsis:`865-541`,IconEllipsisHorizontal:`865-541`,IconEndpoint:`1783-1172`,IconEnvelope:`905-826`,IconExclamationCircle:`2993-1245`,IconExternalLink:`865-467`,IconExternalResource:`2084-1413`,IconEyeClosed:`2070-2355`,IconEyeOpen:`2070-2354`,IconFileText:`2714-1975`,IconFilter:`2674-1211`,IconFit:`2070-2345`,IconFolder:`1925-2181`,IconGitBranch:`931-729`,IconGitCommit:`932-735`,IconGithub:`897-821`,IconGitlab:`897-822`,IconGlobe:`865-472`,IconGlobeAlt:`865-472`,IconGrid:`2748-1246`,IconHamburger:`865-514`,IconHeart:`1548-3879`,IconHome:`1439-3646`,IconInfo:`944-993`,IconKey:`865-626`,IconLayers:`1601-5641`,IconHelp:`3774-3`,IconLightbulb:`3775-2`,IconList:`2733-1308`,IconLock:`865-612`,IconLogout:`865-478`,IconMagnifyingGlass:`865-546`,IconMap:`2038-1372`,IconMetrics:`865-506`,IconMinusCircle:`2993-1243`,IconOrganization:`1727-1990`,IconPipelines:`1893-1379`,IconPencil:`865-465`,IconPlusCircle:`865-581`,IconRefresh:`1250-2839`,IconReorder:`3037-1241`,IconRollback:`2047-1377`,IconScaleCheck:`865-558`,IconScaleDown:`865-453`,IconScaleUp:`865-452`,IconSearch:`865-546`,IconService:`1793-3481`,IconSettings:`865-519`,IconS
200hield:`865-559`,IconShieldCheck:`865-559`,IconSource:`865-489`,IconStack:`1601-5641`,IconSwitchHorizontal:`865-456`,IconSwitchVertical:`865-457`,IconTarget:`2073-1375`,IconTerminal:`2010-1371`,IconThumbsDown:`2576-1215`,IconThumbsUp:`1414-3614`,IconTool:`2191-1613`,IconTrash:`865-464`,IconUnlock:`2653-1245`,IconUser:`865-532`,IconUserCircle:`865-531`,IconUsers:`2598-1219`,IconWorkplace:`1727-1990`,IconX:`865-588`,IconXCircle:`865-589`},hYe=new Set([`IconSubtleProvider`,`IconAlertDot`]),b9=Object.entries(Tle).filter(([e,t])=>e.startsWith(`Icon`)&&!hYe.has(e)&&typeof t==`function`).map(([e,t])=>({name:e,figmaName:pYe(e),figmaNodeId:mYe[e],Component:t})),gYe=(e,t)=>(0,U.jsx)(U.Fragment,{children:e}),_Ye=()=>{let[e,t]=(0,V.useState)(``),[n,r]=(0,V.useState)(`name`),[i,a]=(0,V.useState)(`asc`),o=(0,V.useMemo)(()=>{let t=e.toLowerCase();return[...t?b9.filter(e=>e.name.toLowerCase().includes(t)||e.figmaName.toLowerCase().includes(t)):b9].sort((e,t)=>{let r=e[n],a=t[n],o=r.localeCompare(a);return i===`asc`?o:-o})},[e,n,i]),s=e=>{n===e?a(e=>e===`asc`?`desc`:`asc`):(r(e),a(`asc`))},c=e=>n===e?i===`asc`?` â²`:` â¼`:``;return(0,U.jsxs)(`div`,{className:`pt-8 space-y-4`,children:[(0,U.jsx)(`h1`,{id:`icons`,className:G.type.h1,children:`Icons`}),(0,U.jsxs)(`div`,{className:`mt-4`,children:[(0,U.jsxs)(`div`,{className:`flex items-center gap-4 mb-4`,children:[(0,U.jsxs)(`h3`,{className:G.type.h3,children:[`Icon Variants (`,o.length,`)`]}),(0,U.jsx)(`input`,{type:`text`,placeholder:`Search icons...`,value:e,onChange:e=>t(e.target.value),className:`border border-gray-300 rounded px-3 py-1 text-sm w-64`})]}),(0,U.jsx)(`div`,{className:`flex flex-wrap gap-4 mt-4`,children:(0,U.jsxs)(`table`,{className:`border-separate border-spacing-2`,children:[(0,U.jsx)(`thead`,{children:(0,U.jsxs)(`tr`,{children:[(0,U.jsxs)(`th`,{className:`cursor-pointer select-none`,onClick:()=>s(`name`),onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&s(`name`)},children:[`Name`,c(`name`)]}),(0,U.jsxs)(`th`,{className:`cursor-pointer select-none`,onClick:()=>s(`figmaName`),onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&s(`figmaName`)},children:[`Figma Name`,c(`figmaName`)]}),(0,U.jsx)(`th`,{children:`Small`}),(0,U.jsx)(`th`,{children:`Base`}),(0,U.jsx)(`th`,{children:`Large`}),(0,U.jsx)(`th`,{children:`Subtle`})]})}),(0,U.jsx)(`tbody`,{children:o.map(({name:e,figmaName:t,figmaNodeId:n,Component:r})=>(0,U.jsxs)(`tr`,{"data-icon":e,children:[(0,U.jsx)(`td`,{children:e}),(0,U.jsx)(`td`,{className:`text-gray-500`,children:gYe(t,n)}),(0,U.jsx)(`td`,{children:(0,U.jsx)(r,{variant:`sm`})}),(0,U.jsx)(`td`,{children:(0,U.jsx)(r,{variant:`base`})}),(0,U.jsx)(`td`,{children:(0,U.jsx)(r,{variant:`lg`})}),(0,U.jsx)(`td`,{children:(0,U.jsx)(wE,{value:!0,children:(0,U.jsx)(r,{variant:`base`})})})]},e))})]})})]})]})},vYe=()=>(0,U.jsxs)(`div`,{className:`pt-8 space-y-4`,children:[(0,U.jsx)(`h1`,{id:`navigation`,className:G.type.h1,children:`N
200avigation`}),(0,U.jsxs)(`div`,{className:`mt-4`,children:[(0,U.jsx)(`h3`,{className:G.type.h3,children:`Tabs`}),(0,U.jsx)(`div`,{className:`mt-4`,children:(0,U.jsx)(SU,{tabs:[{name:`Tab 1`,current:!0,href:`#`},{name:`Tab 2`,current:!1,href:`/`},{name:`Tab 3`,current:!1,href:`/`},{name:`Tab 4`,current:!1,href:`/`},{name:`Tab 5`,current:!1,href:`/`},{name:`Tab 6`,current:!1,href:`/`}]})})]}),(0,U.jsxs)(`div`,{className:`mt-4`,children:[(0,U.jsx)(`h3`,{className:G.type.h3,children:`Breadcrumbs`}),(0,U.jsx)(`div`,{className:`mt-4`,children:(0,U.jsx)(hU,{crumbs:[{to:`/`,name:`Crumb 1`},{to:`/`,name:`Crumb 2`},{to:`/`,name:`Crumb 3`},{to:`/`,name:`Crumb 4`},{to:`/styles`,name:`Crumb 5`}]})}),(0,U.jsx)(`div`,{className:`mt-4`,children:(0,U.jsx)(hU,{crumbs:[{to:`/`,name:`Sources`,label:`Section`,crumbVariant:mU.UPPERCASE},{to:`/`,name:`my-environment`,label:`Environment`,crumbVariant:mU.UPPERCASE},{to:`/styles`,name:`my-database`,label:`Database`,crumbVariant:mU.UPPERCASE}]})})]})]}),yYe=()=>(0,U.jsxs)(`div`,{className:`pt-8 space-y-4`,children:[(0,U.jsx)(`h1`,{id:`tooltips`,className:G.type.h1,children:`Tooltips`}),(0,U.jsx)(aA,{text:`Here is some help text!`,children:(0,U.jsx)(`div`,{children:`Here is a tooltip hover top`})}),(0,U.jsx)(aA,{text:`Here is some help text! Here is some help text! Here is some help text! Here is some help text! Here is some help text!`,children:(0,U.jsx)(`div`,{children:`Here is a tooltip hover top long`})}),(0,U.jsx)(aA,{header:(0,U.jsxs)(U.Fragment,{children:[`Scale: `,(0,U.jsx)(`span`,{className:`text-red-300`,children:`Under-Provisioned`})]}),values:[{label:`CPU Usage (p95):`,value:`35.0% / 12.5%`},{label:`RAM Usage (peak):`,value:`94.5% / 100% (0.5GB / 0.5GB)`}],description:`Last evaluated on Aug 19, 2026 at 04:47 UTC, based on prior 14 days. Note: For safety and reliability, we apply a 3x multiplier to memory recommendations for PostgreSQL databases.`,link:{label:`Scale`,to:`/styles`},children:(0,U.jsx)(`div`,{children:`Here is a structured tooltip (header + values + description + link)`})}),(0,U.jsx)(aA,{header:(0,U.jsxs)(U.Fragment,{children:[`Horizontal Autoscaling: `,(0,U.jsx)(`span`,{className:`text-lime`,children:`ON`})]}),values:[{label:`Min. Containers:`,value:`1`},{label:`Max Containers:`,value:`4`},{label:`Scale Down CPU Threshold:`,value:`0.1`},{label:`Scale Up CPU Threshold:`,value:`0.9`}],link:{label:`View settings`,to:`/styles`},children:(0,U.jsx)(`div`,{children:`Here is a structured tooltip (header + values + link)`})})]}),bYe=()=>{let e=st({id:`222`,handle:`my-postgres-db`,type:`postgresql`,createdAt:new Date(`2024-11-02`).toISOString()}),t=ut({id:`444`,handle:`my-app-cmd`,containerMemoryLimitMb:4096,createdAt:new Date(`2024-11-02`).toISOString()}),n=$e({id:`333`,type:`http`,status:`provisioned`,virtualDomain:`app.example.com`,createdAt:new Date(`2024-11-02`).toISOString()}),r=rt({id:`555`,name:`my-stack`,createdAt:new Date(`2024-11-02`).toISOString()}),i=Yt({id:`666`,handle:`my-llm-key`,createdAt:new Date(`2024-11-02`).toISOString(),currentUsage:{spend:8.32,inputTokens:0,outputTokens:0,successfulRequests:0,failedRequests:0,totalRequests:0,totalTokens:0}}),a=Xe({id:`777`,handle:`my-app`,createdAt:new Date(`2024-11-02`).toISOString()}),o=et({id:`888`,handle:`my-environment`,createdAt:new Date(`2024-11-02`).toISOString()});return(0,U.jsxs)(`div`,{className:`flex flex-col gap-3 pt-8`,children:[(0,U.jsx)(`h1`,{id:`resource-detail-boxes`,className:G.type.h1,children:`Resource Detail Boxes`}),(0,U.jsx)(`h2`,{className:G.type.h2,children:`4 Panel`}),(0,U.jsx)(`h3`,{className:G.type.h3,children:`Database`}),(0,U.jsx)(J8,{icon:(0,U.jsx)(`img`,{src:`/database-types/logo-${e.type}.png`,className:`w-[32px] h-[32px]`,"aria-label":`${e.type} Database`}),name:e.handle,nameCopyText:e.handle,id:e.id,createdAt:e.createdAt,cost:49.99,costTooltip:gU}),(0,U.jsx)(`h3`,{className:`${G.type.h3} pt-4`,children:`App`}),(0,U.jsx)(J8,{icon:(0,U.jsx)(`img`,{src:`/resource-types/logo-app.png`,className:`w-[32px] h-[32px]`,"aria-label":`App`}),nameLabel:`App`,name:a.handle,id:a.id,dateLabel:`Created`,createdAt:a.createdAt,cost:14.99,costTooltip:gU}),(0,U.jsx)(`h3`,{className:`${G.type.h3} pt-4`,children:`Environment`}),(0,U.jsx)(J8,{icon:(0,U.jsx)(`img`,{src:`/resource-types/logo-environment.png`,className:`w-[32px] h-[32px]`,"aria-label":`Environment`}),nameLabel:`Environment`,name:o.handle,id:o.id,createdAt:o.createdAt,cost:64.99,costTooltip:gU}),(0,U.jsx)(`h3`,{className:`${G.type.h3} pt-4`,children:`Service`}),(0,U.jsx)(J8,{icon:(0,U.jsx)(`img`,{src:`/resource-types/logo-app.png`,className:`w-[32px] h-[32px]`,"aria-label":`Service`}
200),nameLabel:`Service`,name:t.handle,id:t.id,dateLabel:`Last Deploy`,createdAt:t.createdAt,cost:24.99,costTooltip:gU}),(0,U.jsx)(`h3`,{className:`${G.type.h3} pt-4`,children:`Stack`}),(0,U.jsx)(J8,{icon:(0,U.jsx)(`img`,{src:F6(Gl(r)),className:`w-[32px] h-[32px]`,"aria-label":`Stack`}),nameLabel:`Stack`,name:r.name,id:r.id,createdAt:r.createdAt,cost:0,costTooltip:gU}),(0,U.jsx)(`h3`,{className:`${G.type.h3} pt-4`,children:`LLM Key`}),(0,U.jsx)(J8,{icon:(0,U.jsx)(`img`,{src:`/resource-types/logo-llm_key.png`,className:`w-[32px] h-[32px]`,"aria-label":`LLM Key`}),nameLabel:`LLM Key`,name:i.handle,id:i.id,createdAt:i.createdAt,costLabel:`Spend (MTD)`,cost:i.currentUsage.spend}),(0,U.jsx)(`h2`,{className:`${G.type.h2} pt-4`,children:`5 Panel`}),(0,U.jsx)(`h3`,{className:G.type.h3,children:`Endpoint`}),(0,U.jsx)(J8,{icon:(0,U.jsx)(`img`,{src:`/resource-types/logo-vhost.png`,className:`w-[32px] h-[32px]`,"aria-label":`Endpoint`}),nameLabel:`Hostname`,name:n.virtualDomain,nameCopyText:n.virtualDomain,id:n.id,url:(0,U.jsxs)(`div`,{className:`flex flex-row items-center gap-2 min-w-0`,children:[(0,U.jsx)(`div`,{className:`min-w-0 break-words`,children:(0,U.jsx)(t3,{enp:n})}),(0,U.jsx)(B2,{text:n.virtualDomain,className:`shrink-0`})]}),dateLabel:`Provisioned`,createdAt:n.createdAt,cost:12.5,costTooltip:gU}),(0,U.jsx)(`h2`,{className:`${G.type.h2} pt-4`,children:`Custom Resource Detail Box`}),(0,U.jsx)(`h3`,{className:G.type.h3,children:`Database`}),(0,U.jsxs)(Y8,{columns:2,children:[(0,U.jsx)(X8,{title:`Database Type`,children:`PostgreSQL 17`}),(0,U.jsx)(X8,{title:`Container Profile`,children:`General Purpose (M)`}),(0,U.jsx)(X8,{title:`Disk Size`,children:`100 GB`}),(0,U.jsx)(X8,{title:`Memory Limit`,children:`4 GB`}),(0,U.jsx)(X8,{title:`Disk Type`,children:`gp2`}),(0,U.jsx)(X8,{title:`CPU Share`,children:`0.125`}),(0,U.jsx)(X8,{title:`Disk IOPS`,children:`100 IOPS`}),(0,U.jsx)(X8,{title:`Point-in-Time-Recovery`,children:`Enabled`}),(0,U.jsx)(X8,{title:`Disk Encryption`,children:`AES-256`}),(0,U.jsx)(X8,{title:`Container Efficiency`,children:(0,U.jsx)(g4,{service:t})})]}),(0,U.jsx)(`h3`,{className:G.type.h3,children:`Service`}),(0,U.jsxs)(Y8,{columns:2,children:[(0,U.jsx)(X8,{title:`Type`,children:(0,U.jsx)(YU,{children:`cmd`})}),(0,U.jsx)(X8,{title:`Container Count`,children:`1`}),(0,U.jsx)(X8,{title:`Resource`,children:(0,U.jsx)(U2,{label:`my-app`,href:`#`,icon:(0,U.jsx)(`img`,{src:`/resource-types/logo-app.png`,className:`w-[20px] h-[20px] mr-2`,"aria-label":`App`})})}),(0,U.jsx)(X8,{title:`Container Size`,children:`0.5 GB`}),(0,U.jsx)(X8,{title:`Deployment Strategy`,children:(0,U.jsx)(U2,{label:`Zero-Overlap`,href:`#`})}),(0,U.jsx)(X8,{title:`CPU Share`,children:`0.125`}),(0,U.jsx)(X8,{title:`Container Profile`,children:`General Purpose (M)`}),(0,U.jsx)(X8,{title:`Container Efficiency`,children:(0,U.jsx)(g4,{service:t})})]}),(0,U.jsx)(`h3`,{className:G.type.h3,children:`Stack`}),(0,U.jsxs)(Y8,{columns:2,children:[(0,U.jsx)(X8,{title:`Tenancy`,children:`Dedicated`}),(0,U.jsx)(X8,{title:`Network CIDR`,titleTooltip:`The IP address range assigned to this Stack's VPC.`,children:`10.10.0.0/16`}),(0,U.jsx)(X8,{title:`Region`,children:`us-east-1`}),(0,U.jsx)(X8,{title:`Outbound IP Addresses`,titleTooltip:`The IP addresses your resources use to make outbound connections.`,children:`18.205.248.132, 3.210.50.104, 52.55.114.39, 34.203.74.106, 34.236.214.101`})]}),(0,U.jsx)(`h3`,{className:G.type.h3,children:`Endpoint`}),(0,U.jsxs)(Y8,{columns:2,children:[(0,U.jsx)(X8,{title:`Type`,children:(0,U.jsx)(YU,{children:`tls`})}),(0,U.jsx)(X8,{title:`Placement`,children:`Public`}),(0,U.jsx)(X8,{title:`Service Process`,children:(0,U.jsx)(YU,{children:`cmd`})}),(0,U.jsx)(X8,{title:`Port`,children:`3000`}),(0,U.jsx)(X8,{title:`Service ID`,children:`44505`}),(0,U.jsx)(X8,{title:`Using Header Auth`,children:`False`}),(0,U.jsx)(X8,{title:`Resource`,children:(0,U.jsx)(U2,{label:`dashboard-database`,href:`#`,icon:(0,U.jsx)(`img`,{src:`/database-types/logo-${e.type}.png`,className:`w-[20px] h-[20px] mr-2`,"aria-label":`${e.type} Database`})})}),(0,U.jsx)(X8,{title:`Status`,children:`Provisioned`}),(0,U.jsx)(X8,{title:`Shared`,children:`N/A`}),(0,U.jsx)(X8,{title:`IP Allowlist`,children:`Disabled`})]})]})},xYe=()=>(0,U.jsxs)(W,{children:[(0,U.jsxs)(`div`,{className:`pt-8`,children:[(0,U.jsx)(`h1`,{id:`boxes`,className:G.type.h1,children:`Bo
200x`}),(0,U.jsx)(Z,{children:`A simple box`})]}),(0,U.jsxs)(`div`,{className:`pt-8`,children:[(0,U.jsx)(`h1`,{className:G.type.h1,children:`Box Group`}),(0,U.jsx)(`div`,{children:(0,U.jsxs)(W,{children:[(0,U.jsx)(Z,{children:`One`}),(0,U.jsx)(Z,{children:`Two`}),(0,U.jsx)(Z,{children:`Three`})]})}),(0,U.jsxs)(`div`,{className:`pt-8`,children:[(0,U.jsx)(`h2`,{className:G.type.h2,children:`Box Group Horizontal`}),(0,U.jsxs)(W,{variant:`horizontal`,children:[(0,U.jsx)(Z,{children:`One`}),(0,U.jsx)(Z,{children:`Two`}),(0,U.jsx)(Z,{children:`Three`})]})]})]})]}),SYe=()=>(0,U.jsxs)(W,{children:[(0,U.jsx)(`div`,{className:`pt-8`,children:(0,U.jsx)(`h1`,{id:`qrexample`,className:G.type.h1,children:`QR Example`})}),(0,U.jsx)(he,{value:`1234567891011121314151617`})]}),CYe=()=>((0,V.useEffect)(()=>{let e=window.location.hash.replace(`#`,``);if(!e)return;let t=document.getElementById(e);t&&t.scrollIntoView({behavior:`instant`})},[]),(0,U.jsx)(`div`,{className:`px-4 py-4`,children:(0,U.jsxs)(QJe,{navigation:(0,U.jsx)($Je,{}),children:[(0,U.jsx)(aYe,{}),(0,U.jsx)(oYe,{}),(0,U.jsx)(sYe,{}),(0,U.jsx)(cYe,{}),(0,U.jsx)(eYe,{}),(0,U.jsx)(tYe,{}),(0,U.jsx)(nYe,{}),(0,U.jsx)(rYe,{}),(0,U.jsx)(iYe,{}),(0,U.jsx)(lYe,{}),(0,U.jsx)(uYe,{}),(0,U.jsx)(dYe,{}),(0,U.jsx)(fYe,{}),(0,U.jsx)(vYe,{}),(0,U.jsx)(_Ye,{}),(0,U.jsx)(yYe,{}),(0,U.jsx)(bYe,{}),(0,U.jsx)(xYe,{}),(0,U.jsx)(SYe,{})]})})),wYe={handle:e=>z4(e.handle)},TYe=()=>{let e=l(),t=N(),{id:n=``}=F(),r=B(e=>_v(e,{id:n})),i=B(e=>lp(e,{id:r.databaseId}));u(Nv({id:n,withDeleted:!0})),u(bp({id:r.databaseId,withDeleted:!0,waitForBootup:!0}));let a=B(e=>tu(e,{id:r.environmentId})),o={label:a.handle,value:a.id},[s,c]=(0,V.useState)(``),[d,f]=(0,V.useState)(r.environmentId),[p,m]=QS(wYe),h={id:r.id,handle:s,destEnvId:d},g=Iv(h),_=I(g);return(0,V.useEffect)(()=>{f(r.environmentId)},[r.environmentId]),(0,V.useEffect)(()=>{let e=Nf(r.createdAt),t=`${i.handle}-at-${e}`.slice(0,64);c(t)},[i.handle,r.createdAt]),T(_,()=>{t(za(d))}),(0,U.jsxs)(r5,{children:[(0,U.jsx)(`h2`,{className:G.type.h2,children:`Restore Database from Backup`}),(0,U.jsx)(Z,{className:`mt-3`,children:(0,U.jsxs)(`form`,{onSubmit:t=>{t.preventDefault(),m(h)&&e(g)},className:`flex flex-col gap-4`,children:[(0,U.jsxs)(`div`,{children:[(0,U.jsxs)(`p`,{children:[`This will create a new database.`,` `,(0,U.jsx)(`strong`,{children:`It does not overwrite your existing database.`})]}),(0,U.jsxs)(`div`,{className:`mt-4`,children:[(0,U.jsx)(`div`,{className:`text-md font-semibold text-gray-900 block`,children:`Source Backup`}),(0,U.jsxs)(P,{to:ya(i.id),children:[i.handle,` (backup from: `,Of(r.createdAt),`)`]})]})]}),(0,U.jsx)(J,{label:`Environment`,htmlFor:`env-selector`,children:(0,U.jsx)(ej,{onSelect:e=>{f(e.value)},defaultValue:o.value})}),(0,U.jsx)(J4,{value:s,onChange:e=>c(e),feedbackMessage:p.handle,feedbackVariant:p.handle?`danger`:`info`}),(0,U.jsx)(TA,{..._}),(0,U.jsx)(hA,{className:`w-[200px]`,type:`submit`,envId:d,isLoading:_.isLoading,children:`Restore Database`})]})})]})},EYe=()=>{let{id:e=``}=F();return(0,U.jsx)(ae,{replace:!0,to:ko(e)})},DYe=()=>{let{id:e=``}=F();u(Kf({certId:e})),u(qf({certId:e}));let t=B(t=>Vf(t,{id:e}));return(0,U.jsx)(uIe,{certId:e,envId:t.environmentId})},OYe=()=>{let{id:e=``}=F();return u(qf({certId:e})),(0,U.jsx)(DLe,{certId:e})},kYe=({certId:e})=>{let t=l(),n=N();u(qf({certId:e}));let r=B(t=>Vf(t,{id:e})),i=B(t=>em(t,{certId:e,envId:r.environmentId})),a=Jf({certId:e}),o=I(a),[s,c]=(0,V.useState)(``);T(o,()=>{t(Qf([e])),n(Ra(r.environmentId))});let d=i.length>0||s!==r.commonName;return(0,U.jsxs)(Z,{className:`mb-8`,children:[(0,U.jsxs)(`h1`,{className:`text-lg text-red-500 font-semibold flex items-center gap-2 mb-4`,children:[(0,U.jsx)(ZE,{color:`#AD1A1A`}),`Delete Certificate`]}),(0,U.jsxs)(`form`,{className:`flex flex-col gap-4`,onSubmit:e=>{e.preventDefault(),!d&&t(a)},children:[i.length>0?(0,U.jsx)(q,{variant:`error`,children:`This certificate is still in use and cannot be deleted. Remove all endpoints before trying again.`}):null,(0,U.jsxs)(`p`,{children:[`This will permanently delete `,(0,U.jsx)(`strong`,{children:r.commonName}),` `,`certificate. This action cannot be undone. If you want to proceed, type `,(0,U.jsx)(`strong`,{children:r.commonName}),` below to continue.`]}),(0,U.jsx)(TA,{...o}),(0,U.jsxs)(`div`,{className:`flex`,children:[(0,U.jsx)(X,{className:`flex-1`,type:`text`,value:s,onChange:e=>c(e.currentTarget.value),id:`delete-confirm`}),(0,U.jsxs)(vA,{type:`submit`,envId:r.environmentId,variant:`delete`,isLoading:o.isLoading,disabled:d,className:`h-15 w-60 mb-0 ml-4 flex`,children:[(0,U.jsx)(RE,{color:`#FFF`,className:`mr-2`}),`Delete Certificate`]})]})]})]})},AYe=()=>{let{id:e=``}=F();return(0,U.jsx)(kYe,{certId:e})},jYe={cert:e=>{if(e.cert===``)return`A certificate is required for custom HTTPS`},privKey:e=>{if(e.privKey===``)return`A private key is required for custom HTTPS`}},MYe=()=>{let{id:e=``}=F(),t=l(),n=N(),[r,i]=(0,V.useState)(``),[a,o]=(0,V.useState)(``),[s,c]=QS(jYe),u={envId:e,privKey:a,cert:r},d=$f(u),f=I(d);return T(f,()=>{n(Ra(e))}),(0,U.jsxs)(Z,{children:[(0,U.jsx)(`h1`,{className:`text-lg text-black font-semibold mb-4`,children:`Create Certificate`}),(0,U.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),c(u)&&t(d)},className:`flex flex-col gap-4`,children:[(0,U.jsx)(J,{htmlFor:`cert`,label:`Certificate`,feedbackMessage:s.cert,feedbackVariant:s.cert?`danger`:`info`,description:(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`p`,{children:`Drag and drop your certificate file or paste its contents in the textarea below.`}),(0,U.jsx)(`p`,{children:`If you have a bundled certificate chain, drag and drop all of the certificate files or paste their contents in the textarea below.`})]}),children:(0,U.jsx)(dU,{id:`cert`,"aria-label":`cert`,onValueChange:i,value:r})}),(0,U.jsx)(J,{htmlFor:`private-key`,label:`Private Key`,description:`Drag and drop your private key file or paste its contents in the textarea below.`,feedbackMessage:s.privKey,feedbackVariant:s.privKey?`danger`:`info`,children:(0,U.jsx)(dU,{id:`private-key`,"aria-label":`private-key`,onValueChange:o,value:a})}),(0,U.jsx)(TA,{...f}),(0,U.jsx)(hA,{envId:e,isLoading:f.isLoading,type:`submit`,className:`w-[200px]`,children:`Save Certificate`})]})]})},x9=[{value:`influxdb_database`,label:`InfluxDb (this environment)`},{value:`influxdb`,label:`InfluxDb v1 (anywhere)`},{value:`influxdb2`,label:`InfluxDb v2 (anywhere)`},{value:`datadog`,label:`Datadog`}],NYe=Object.keys(kh).map(e=>({label:e,value:e})),PYe={handle:e=>z4(e.handle),hostname:e=>{if(e.drainType===`influxdb`||e.drainType===`influxdb2`){if(e.hostname===``)return`Must provide hostname`;if(e.hostname.startsWith(`http`))return`Do not include the protocol (e.g. http(s)://)`}}
200,port:e=>{if(e.drainType===`influxdb`||e.drainType===`influxdb2`)return L4(e.port)},username:e=>{if(e.drainType===`influxdb`&&e.username===``)return`Must provide username`},password:e=>{if(e.drainType===`influxdb`&&e.password===``)return`Must provide password`},database:e=>{if(e.drainType===`influxdb`&&e.database===``)return`Must provide a database name`},org:e=>{if(e.drainType===`influxdb2`&&e.org===``)return`Must provide an organization name`},authToken:e=>{if(e.drainType===`influxdb2`&&e.authToken===``)return`Must provide an API token`},bucket:e=>{if(e.drainType===`influxdb2`&&e.bucket===``)return`Must provide a bucket name`},dbId:e=>{if(e.drainType===`influxdb_database`&&e.dbId===``)return`Must provide an Aptible database`},apiKey:e=>{if(e.drainType===`datadog`&&e.apiKey===``)return`Must provide a Datadog API key`}},FYe=()=>{let e=N(),t=l(),[n]=Ee(),r=n.get(`environment_id`)||``,[i,a]=(0,V.useState)(r);u(xp({envId:i}));let o=B(e=>tu(e,{id:i})),[s,c]=(0,V.useState)(``),[d,f]=(0,V.useState)(``),[p,m]=(0,V.useState)(``),[h,g]=(0,V.useState)(`US1`),[_,v]=(0,V.useState)(`https`),[y,b]=(0,V.useState)(``),[x,S]=(0,V.useState)(``),[C,w]=(0,V.useState)(``),[E,D]=(0,V.useState)(``),[O,k]=(0,V.useState)(``),[A,j]=(0,V.useState)(``),[M,ee]=(0,V.useState)(``),[te,ne]=(0,V.useState)(``),[re,ie]=(0,V.useState)(x9[0].value),[ae,oe]=QS(PYe),se=e=>{ie(e.value)},ce=e=>{a(e.value)},le=(()=>{let e={envId:i,handle:d};return re===`influxdb_database`?{...e,drainType:`influxdb_database`,dbId:s}:re===`datadog`?{...e,drainType:`datadog`,apiKey:p,ddSite:h}:re===`influxdb2`?{...e,drainType:`influxdb2`,protocol:_,hostname:y,port:x,org:A,authToken:M,bucket:te}:{...e,drainType:`influxdb`,protocol:_,hostname:y,port:x,username:C,password:E,database:O}})(),ue=Nh(le),de=I(ue);return T(de,()=>{e(po(de.meta.opId))}),(0,U.jsx)(v5,{children:(0,U.jsxs)(Z,{children:[(0,U.jsx)(`h1`,{className:`text-lg text-black font-semibold`,children:`Create Metric Drain`}),(0,U.jsxs)(`div`,{className:`py-4`,children:[`Metric Drains let you collect metrics from apps and databases deployed in the `,(0,U.jsx)(`strong`,{children:o.handle}),` environment and route them to a metrics destination.`]}),(0,U.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),oe(le)&&t(ue)},className:`flex flex-col gap-4`,children:[(0,U.jsx)(`div`,{className:`text-md font-semibold text-gray-900 block -mb-3`,children:`Environment`}),(0,U.jsx)(ej,{value:i,onSelect:ce}),(0,U.jsx)(J,{label:`Handle`,htmlFor:`handle`,feedbackMessage:ae.handle,feedbackVariant:ae.handle?`danger`:`info`,children:(0,U.jsx)(X,{type:`text`,id:`handle`,value:d,onChange:e=>f(e.currentTarget.value)})}),(0,U.jsx)(J,{label:`Type`,htmlFor:`metric-type`,children:(0,U.jsx)(XA,{ariaLabel:`Type`,id:`metric-type`,options:x9,onSelect:se,value:re})}),re===`influxdb_database`?(0,U.jsx)(J,{label:`InfluxDB`,htmlFor:`db-selector`,description:(0,U.jsxs)(`p`,{children:[`Only InfluxDB Databases in the `,o.handle,` Environment are eligible. To use an InfluxDB Database located in another Environment, or hosted with a third party, use the "InfluxDB (anywhere)" option.`]}),feedbackMessage:ae.dbId,feedbackVariant:ae.dbId?`danger`:`info`,children:(0,U.jsx)(X4,{id:`db-selector`,envId:i,onSelect:e=>{c(e.value)},dbTypeFilters:[`influxdb`,`influxdb2`],value:s})}):null,re===`datadog`?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(J,{label:`API Key`,htmlFor:`api-key`,description:(0,U.jsx)(`div`,{children:(0,U.jsxs)(`p`,{children:[`Create a new API Key in Datadog under`,` `,(0,U.jsx)(CA,{variant:`info`,href:`https://app.datadoghq.com/account/settings#api`,children:`Integrations / APIs`}),` `,`(or reuse an existing one) and paste it here.`]})}),feedbackMessage:ae.apiKey,feedbackVariant:ae.apiKey?`danger`:`info`,children:(0,U.jsx)(X,{type:`text`,id:`api-key`,value:p,onChange:e=>m(e.currentTarget.value)})}),(0,U.jsx)(J,{label:`Datadog Site`,htmlFor:`dd-site`,description:`Select the Datadog Site to use.`,children:(0,U.jsx)(XA,{ariaLabel:`Datadog Site`,id:`dd-site`,options:NYe,onSelect:e=>g(e.value)})})]}):null,re===`influxdb`||re===`influxdb2`?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(J,{label:`Protocol`,htmlFor:`protocol`,children:(0,U.jsxs)(QA,{name:`protocol`,selected:_,onSelect:v,children:[(0,U.jsx)(ZA,{value:`https`,children:`HTTPS`}),(0,U.jsx)(ZA,{value:`http`,children:`HTTP`})]})}),(0,U.jsx)(J,{label:`Hostname`,htmlFor:`hostname`,feedbackMessage:ae.hostname,feedbackVariant:ae.hostname?`danger`:`info`,children:(0,U.jsx)(X,{type:`text`,id:`hostname`,value:y,onChange:e=>b(e.currentTarget.value)})}),(0,U.jsx)(J,{label:`Port`,htmlFor:`port`,description:`Leave empty to use the default for the protocol (443 for HTTPS, 80 for HTTP).`,feedbackMessage:ae.port,feedbackVariant:ae.port?`danger`:`info`,children:(0,U.jsx)(X,{type:`number`,id:`port`,value:x,onChange:e=>S(e.currentTarget.value)})}),re===`influxdb`?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(J,{label:`Username`,htmlFor:`username`,feedbackMessage:ae.username,feedbackVariant:ae.username?`danger`:`info`,children:(0,U.jsx)(X,{type:`text`,id:`username`,value:C,onChange:e=>w(e.currentTarget.value)})}),(0,U.jsx)(J,{label:`Password`,htmlFor:`password`,feedbackMessage:ae.password,feedbackVariant:ae.password?`danger`:`info`,children:(0,U.jsx)(X,{type:`password`,id:`password`,value:E,onChange:e=>D(e.currentTarget.value)})}),(0,U.jsx)(J,{label:`Database`,htmlFor:`database`,feedbackMessage:ae.database,feedbackVariant:ae.database?`danger`:`info`,children:(0,U.jsx)(X,{type:`text`,id:`database`,value:O,onChange:e=>k(e.currentTarget.value)})})]}):null,re===`influxdb2`?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(J,{label:`InfluxDB Organization Name`,htmlFor:`org`,feedbackMessage:ae.org,feedbackVariant:ae.org?`danger`:`info`,children:(0,U.jsx)(X,{type:`text`,id:`org`,value:A,onChange:e=>j(e.currentTarget.value)})}),(0,U.jsx)(J,{label:`API Token`,htmlFor:`authToken`,feedbackMessage:ae.authToken,feedbackVariant:ae.authToken?`danger`:`info`,children:(0,U.jsx)(X,{type:`password`,id:`authToken`,value:M,onChange:e=>ee(e.currentTarget.value)})}),(0,U.jsx)(J,{label:`Bucket`,htmlFor:`bucket`,feedbackMessage:ae.bucket,feedbackVariant:ae.bucket?`danger`:`info`,children:(0,U.jsx)(X,{type:`text`,id:`bucket`,value:te,onChange:e=>ne(e.currentTarget.value)})})]}):null]}):null,(0,U.jsx)(TA,{...de}),(0,U.jsx)(_A,{className:`w-[200px]`,envId:i,type:`submit`,isLoading:de.isLoading,children:`Save Metric Drain`})]})]})})},IYe=({drainType:e,allowPhi:t,envHandle:n})=>e===`logdna`||e===`papertrail`||e===`solarwinds`||e===`sumologic`||e===`insightops`||e===`datadog`?(0,U.jsx)(q,{variant:`info`,children:`Signs BAAs`}):e===`elasticsearch_database`?t?(0,U.jsxs)(q,{variant:`info`,children:[n,` is safe for PHI`]}):(0,U.jsxs)(q,{variant:`warning`,children:[n,` is not safe for PHI`]}):null,LYe={handle:e=>z4(e.handle),dbId:e=>{if(e.drainType===`elasticsearch_database`&&e.databaseId===``)return`Must provide an Aptible database`},drainHost:e=>{if((e.drainType===`syslog_tls_tcp`||e.drainType===`papertrail`||e.drainType===`solarwinds`)&&e.drainHost===``)return`Must provide a Drain Host`},drainPort:e=>{if(e.drainType===`syslog_tls_tcp`||e.drainType===`papertrail`)return L4(e.drainPort)},url:e=>{if(e.drainType===`datadog`||e.drainType===`sumologic`||e.drainType===`https_post`||e.drainType===`logdna`){if(e.url===``)return`Must provide a URL for log drain`;if(!e.url.startsWith(`https`))return`Must begin with https://`}},loggingToken:e=>{if((e.drainType===`insightops`||e.drainType===`syslog_tls_tcp`||e.drainType===`solarwinds`)&&e.loggingToken===``)return`Must provide a token for log drain.`}},S9=[{value:`datadog`,label:`Datadog`},{value:`logdna`,label:`Mezmo (formerly LogDNA)`},{value:`papertrail`,label:`Papertrail`},{value:`solarwinds`,label:`SolarWinds`},{value:`sumologic`,label:`Sumo Logic`},{value:`insightops`,label:`InsightOps`},{value:`elasticsearch_database`,label:`Self-hosted Elasticsearch`},{value:`https_post`,label:`HTTPS POST`},{value:`syslog_tls_tcp`,label:`Syslog TLS TCP`}],RYe=()=>{let e=N(),t=l(),[n]=Ee(),r=n.get(`environment_id`)||``,[i,a]=(0,V.useState)(``),[o,s]=(0,V.useState)(r),c=B(e=>tu(e,{id:o})),[u,d]=(0,V.useState)(``),[f,p]=(0,V.useState)(!0),[m,h]=(0,V.useState)(!0),[g,_]=(0,V.useState)(!0),[v,y]=(0,V.useState)(!1),[b,x]=(0,V.useState)(``),[S,C]=(0,V.useState)(``),[w,E]=(0,V.useState)(``),[D,O]=(0,V.useState)(``),[k,A]=(0,V.useState)(S9[0].value),[j,M]=QS(LYe),ee=(()=>{let e={envId:o,handle:u,drainApps:f,drainDatabases:m,drainEphemeralSessions:g,drainProxies:v};return k===`elasticsearch_database`?{...e,drainType:k,databaseId:i}:k===`papertrail`?{...e,drainType:k,drainHost:b,drainPort:S}:k===`solarwinds`?{...e,drainType:k,drainHost:b,loggingToken:w}:k===`datadog`||k===`logdna`||k===`sumologic`||k===`https_post`?{...e,drainType:k,url:D}:k===`insightops`?{...e,drainType:k,loggingToken:w}:{...e,drainType:`syslog_tls_tcp`,drainHost:b,drainPort:S,loggingToken:w}})(),te=sh(ee),ne=I(te);return T(ne,()=>{e(po(ne.meta.opId))}),(0,U.jsx)(v5,{children:(0,U.jsxs)(Z,{children:[(0,U.jsx)(`h1`,{className:`text-lg text-black font-semibold`,children:`Create Log Drain`}),(0,U.jsxs)(`div`,{className:`py-4`,children:[`Log Drains let you collect stdout and stderr logs from your apps and databases deployed in the `,(0,U.jsx)(`strong`,{children:c.handle}),` environment and route them to a log destination.`]}),(0,U.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),M(ee)&&t(te)},className:`flex flex-col gap-4`,children:[(0,U.jsx)(`div`,{className:`text-md font-semibold text-gray-900 block -mb-3`,children:`Environment`}),(0,U.jsx)(ej,{value:o,onSelect:e=>{s(e.value)}}),(0,U.jsx)(J,{label:`Handle`,htmlFor:`handle`,feedbackMessage:j.handle,feedbackVariant:j.handle?`danger`:`info`,children:(0,U.jsx)(X,{type:`text`,id:`handle`,value:u,onChange:e=>d(e.currentTarget.value)})}),(0,U.jsx)(J,{label:`Type`,htmlFor:`drain-type`,children:(0,U.jsx)(XA,{ariaLabel:`Type`,id:`drain-type`,options:S9,onSelect:e=>{A(e.value)},value:k})}),(0,U.jsx)(IYe,{drainType:k,allowPhi:c.type===`production`,envHandle:c.handle}),(0,U.jsxs)(`div`,{className:`flex flex-col`,children:[(0,U.jsx)(RA,{children:`Sources`}),(0,U.jsx)(`p`,{className:`text-gray-500`,children:`Select which logs should be captured:`})]}),(0,U.jsx)(ZH,{label:`App Logs`,name:`app-logs`,checked:f,onChange:e=>p(e.currentTarget.checked)}),(0,U.jsx)(ZH,{label:`Database Logs`,name:`db-logs`,checked:m,onChange:e=>h(e.currentTarget.checked)}),(0,U.jsx)(ZH,{label:`SSH Session Logs`,name:`ssh-logs`,checked:g,onChange:e=>_(e.currentTarget.checked)}),(0,U.jsx)(ZH,{label:`Endpoint Logs`,name:`endpoint-logs`,checked:v,onChange:e=>y(e.currentTarget.checked)}),k===`papertrail`||k===`syslog_tls_tcp`||k===`solarwinds`?(0,U.jsx)(J,{label:`Host`,de
200scription:k===`papertrail`?(0,U.jsx)(`p`,{children:`Host Add a new Log Destination in Papertrail (make sure to accept TCP + TLS connections and logs from unrecognized senders), then copy the host from the Log Destination.`}):k===`solarwinds`?(0,U.jsxs)(`p`,{children:[`Aptible supports sending logs to SolarWinds via Syslog+TLS. This field is your Logs Endpoint URL.`,` `,(0,U.jsx)(CA,{variant:`success`,href:`https://documentation.solarwinds.com/en/success_center/observability/content/configure/configure-logs-syslog.htm`,children:`See SolarWinds' docs here.`})]}):void 0,htmlFor:`host`,feedbackMessage:j.drainHost,feedbackVariant:j.drainHost?`danger`:`info`,children:(0,U.jsx)(X,{type:`text`,id:`host`,name:`host`,value:b,onChange:e=>x(e.currentTarget.value)})}):null,k===`papertrail`||k===`syslog_tls_tcp`?(0,U.jsx)(J,{label:`Port`,description:(0,U.jsx)(`p`,{children:`Add the port from the Log Destination you added.`}),htmlFor:`port`,feedbackMessage:j.drainPort,feedbackVariant:j.drainPort?`danger`:`info`,children:(0,U.jsx)(X,{type:`number`,id:`port`,value:S,onChange:e=>C(e.currentTarget.value)})}):null,k===`elasticsearch_database`?(0,U.jsxs)(J,{label:`Elasticsearch Database`,htmlFor:`db-selector`,description:(0,U.jsx)(`p`,{children:`Finish configuring your Elasticsearch Log Drain.`}),feedbackMessage:j.dbId,feedbackVariant:j.dbId?`danger`:`info`,children:[(0,U.jsxs)(q,{className:`mb-2`,variant:`warning`,children:[`Logs from this Elasticsearch database will `,(0,U.jsx)(`strong`,{children:`not`}),` `,`be captured by the Log Drain to avoid creating a feedback loop.`]}),(0,U.jsx)(X4,{id:`db-selector`,envId:o,onSelect:e=>{a(e.value)},dbTypeFilters:[`elasticsearch`],value:i})]}):null,k===`sumologic`||k===`datadog`||k===`logdna`||k===`https_post`?(0,U.jsx)(J,{label:`URL`,description:(0,U.jsxs)(U.Fragment,{children:[k===`https_post`&&(0,U.jsx)(`p`,{children:`Must be a HTTPS URL.`}),k===`datadog`&&(0,U.jsxs)(`p`,{children:[`For Datadog Site US1, this must be in the format of`,` `,(0,U.jsx)(YU,{children:`https://http-intake.logs.datadoghq.com/v1/input/DD_API_KEY?env=${c.handle||`ENV_HANDLE`}`}),`. For other sites and more options, refer to`,` `,(0,U.jsx)(CA,{variant:`success`,href:`https://docs.datadoghq.com/logs/`,children:`https://docs.datadoghq.com/logs/log_collection`}),`. Optionally, add tags as query parameters to filter logs in Datadog.`]}),k===`logdna`&&(0,U.jsxs)(`p`,{children:[`Must be in the format of`,` `,(0,U.jsx)(YU,{children:`https://logs.mezmo.com/aptible/ingest/INGESTION KEY`}),`. Refer to`,` `,(0,U.jsx)(CA,{variant:`success`,href:`https://docs.mezmo.com/docs/aptible-logs`,children:`https://docs.mezmo.com/docs/aptible-logs`}),`.`]}),k===`sumologic`&&(0,U.jsx)(`p`,{children:`Create a new Hosted Collector in Sumologic using a HTTP source, then copy the HTTP Source Address.`})]}),htmlFor:`url`,feedbackMessage:j.url,feedbackVariant:j.url?`danger`:`info`,children:(0,U.jsx)(X,{type:`text`,id:`url`,value:D,onChange:e=>O(e.currentTarget.value)})}):null,k===`insightops`||k===`syslog_tls_tcp`||k===`solarwinds`?(0,U.jsx)(J,{label:`Token`,description:(0,U.jsxs)(U.Fragment,{children:[k===`insightops`&&(0,U.jsx)(`p`,{children:`Add a new Token TCP Log in InsightOps, then copy the Logging Token provided by InsightOps.`}),k===`syslog_tls_tcp`&&(0,U.jsx)(`p`,{children:`All log lines sent through this Log Drain will be prefixed with this token`}),k===`solarwinds`&&(0,U.jsx)(`p`,{children:`Your authentication token in SolarWinds Logs.`})]}),htmlFor:`logging-token`,feedbackMessage:j.loggingToken,feedbackVariant:j.loggingToken?`danger`:`info`,children:(0,U.jsx)(X,{type:`text`,id:`logging-token`,value:w,onChange:e=>E(e.currentTarget.value)})}):null,(0,U.jsx)(TA,{...ne}),(0,U.jsx)(_A,{className:`w-[200px]`,envId:o,type:`submit`,isLoading:ne.isLoading,children:`Save Log Drain`})]})]})})},zYe=[{value:`langfuse`,label:`Langfuse`}],BYe={handle:e=>z4(e.handle),url:e=>{let t=e.url.trim();if(t===``)return`Must provide a base URL`;try{if(new URL(t).protocol!==`https:`)return`URL must use https`}catch{return`Must be a valid URL`}},publicKey:e=>{if(e.publicKey.trim()===``)return`Must provide a public key`},secretKey:e=>{if(e.secretKey.trim()===``)return`Must provide a secret key`}},VYe=()=>{let e=N(),t=l(),n=B($o),{isLoading:r}=u(Ab({orgId:n})),i=!!B(kb)?.id,[a]=Ee(),o=a.get(`environment_id`)||``,[s,c]=(0,V.useState)(o),d=B(e=>tu(e,{id:s}));(0,V.useEffect)(()=>{s&&n&&t(px({envId:s,orgId:n}))},[t,s,n]);let[f,p]=(0,V.useState)(``),[m,h]=(0,V.useState)(`langfuse`),[g,_]=(0,V.useState)(``),[v,y]=(0,V.useState)(``),[b,x]=(0,V.useState)(``),[S,C]=QS(BYe),w=()=>({orgId:n??``,accountId:s,handle:f,drainType:m,url:g,publicKey:v,secretKey:b}),E=I(IS),D=()=>
200{if(!s||!n)return;let e=w();C(e)&&t(IS({...e,handle:e.handle.trim(),url:e.url.trim(),publicKey:e.publicKey.trim(),secretKey:e.secretKey.trim()}))};return T(E,()=>{e(Ia(s))}),r?(0,U.jsx)(v5,{children:(0,U.jsx)(Z,{children:null})}):i?(0,U.jsx)(v5,{children:(0,U.jsxs)(Z,{children:[(0,U.jsx)(`h1`,{className:`text-lg text-black font-semibold`,children:`Create LLM Trace Drain`}),(0,U.jsxs)(`div`,{className:`py-4`,children:[`LLM trace drains send LLM gateway trace data from the`,` `,(0,U.jsx)(`strong`,{children:d.handle||`selected`}),` environment to an observability destination.`]}),(0,U.jsxs)(`form`,{noValidate:!0,onSubmit:e=>{e.preventDefault(),D()},className:`flex flex-col gap-4`,children:[(0,U.jsx)(`div`,{className:`text-md font-semibold text-gray-900 block -mb-3`,children:`Environment`}),(0,U.jsx)(ej,{value:s,onSelect:e=>{c(e.value)}}),(0,U.jsx)(J,{label:`Handle`,htmlFor:`llm-trace-drain-handle`,feedbackMessage:S.handle,feedbackVariant:S.handle?`danger`:`info`,children:(0,U.jsx)(X,{type:`text`,id:`llm-trace-drain-handle`,value:f,onChange:e=>p(e.currentTarget.value),disabled:!s})}),(0,U.jsx)(J,{label:`Type`,htmlFor:`llm-trace-drain-type`,children:(0,U.jsx)(XA,{ariaLabel:`Type`,id:`llm-trace-drain-type`,options:zYe,onSelect:e=>{h(e.value)},value:m})}),m===`langfuse`?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(J,{label:`Base URL`,htmlFor:`llm-trace-drain-base-url`,feedbackMessage:S.url,feedbackVariant:S.url?`danger`:`info`,children:(0,U.jsx)(X,{type:`text`,id:`llm-trace-drain-base-url`,value:g,placeholder:`https://cloud.langfuse.com`,onChange:e=>_(e.currentTarget.value),disabled:!s,autoComplete:`url`,inputMode:`url`})}),(0,U.jsx)(J,{label:`Public Key`,htmlFor:`llm-trace-drain-public-key`,feedbackMessage:S.publicKey,feedbackVariant:S.publicKey?`danger`:`info`,children:(0,U.jsx)(X,{type:`text`,id:`llm-trace-drain-public-key`,value:v,onChange:e=>y(e.currentTarget.value),autoComplete:`off`,disabled:!s})}),(0,U.jsx)(J,{label:`Secret Key`,htmlFor:`llm-trace-drain-secret-key`,feedbackMessage:S.secretKey,feedbackVariant:S.secretKey?`danger`:`info`,children:(0,U.jsx)(X,{type:`password`,id:`llm-trace-drain-secret-key`,value:b,onChange:e=>x(e.currentTarget.value),autoComplete:`new-password`,disabled:!s})})]}):null,(0,U.jsx)(TA,{...E}),(0,U.jsx)(_A,{className:`w-[200px]`,envId:s,type:`submit`,isLoading:E.isLoading,disabled:!s||!n,children:`Save LLM Trace Drain`})]})]})}):(0,U.jsx)(ae,{to:s?Ia(s):Ma(),replace:!0})};function C9(e){let t=e.trim();return t.length>0&&t.toLowerCase().startsWith(`pcx-`)}var HYe={connectionId:e=>{if(e.connectionId.trim()===``)return`VPC Peering Connection ID is required`;if(!C9(e.connectionId))return`VPC Peering Connection ID must start with pcx-`}},UYe=()=>{let e=N(),t=l(),[n]=Ee(),{id:r=``}=F(),i=r||n.get(`stack_id`)||``,a=B(ns),o=B(qo),s=B(e=>zl(e,{id:i})),c=Gl(s)===`shared`,u=B(e=>__(e,{orgId:a.id})),[d,f]=(0,V.useState)(`aws`),[p,m]=(0,V.useState)(``),[h,g]=(0,V.useState)(``),[_,v]=(0,V.useState)(``),[y,b]=QS(HYe),x=B(Vl),S=(0,V.useMemo)(()=>x.filter(e=>Gl(e)===`dedicated`&&e.id!==i),[x,i]),C=e=>{let t=0;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);t=(t<<5)-t+r,t&=t}return`10.${Math.abs(t)%254+1}.0.0/16`},w=e=>{let t=0;for(let n=0;n<e.length;n++)t=t*31+e.charCodeAt(n)|0;return`vpc-${Math.abs(t).toString(16).padStart(8,`0`).slice(0,8)}`},E=!!s.vpcId,D=!!s.vpcCidr,O=s.vpcId||w(i),k=s.vpcCidr||C(i),A=I(Iy);return T(A,()=>{e(wo(i),{state:{createSuccess:!0}})}),(0,V.useEffect)(()=>()=>{t(Ly())},[t]),(0,V.useEffect)(()=>{a.id&&!u&&e(wo(i))},[a.id,u,e,i]),Kl(s)?c?(0,U.jsxs)(Z,{children:[(0,U.jsxs)(`h1`,{className:`text-lg text-gray-500 font-semibold flex items-center gap-2 mb-4`,children:[(0,U.jsx)(ZE,{color:`#6B7280`}),`VPC Peering`]}),(0,U.jsx)(q,{variant:`info`,children:`VPC Peering is not available on Shared Stacks. Upgrade to a Dedicated Stack to peer with your AWS VPC or another Aptible stack.`})]}):!a.id||!u?null:(0,U.jsx)(`div`,{className:`mb-4`,children:(0,U.jsxs)(Z,{className:`mb-4`,children:[(0,U.jsx)(`h2`,{className:`text-lg text-black font-semibold`,children:`Create VPC Peering Request`}),(0,U.jsxs)(`p`,{className:`py-4 text-gray-600`,children:[`Create a VPC peering request for the `,(0,U.jsx)(`strong`,{children:s.name}),` `,`stack.`]}),d===`aws`&&(!E||!D)&&(0,U.jsx)(q,{variant:`error`,className:`mb-4`,children:`VPC ID and CIDR information is required to submit a VPC peering request. Please contact Aptible Support to obtain these values.`}),(0,U.jsxs)(`form`,{onSubmit:e=>{if(e.preventDefault(),u&&(d!==`aws`||E&&D)&&(d!==`aws`||b({connectionId:p}))){if(d===`stack`){let e=`VPC Peering Request (Dedicated Stack) - ${s.name}`,n=` 201<p><strong>VPC Peering Request (Dedicated Stack)</strong></p> 202 203<p><strong>Details:</strong></p> 204<ul> 205 <li><strong>User:</strong> ${o.name} (${o.email})</li> 206 <li><strong>Organization:</strong> ${a.name} (ID: ${a.id})</li> 207 <li><strong>Primary Stack:</strong> ${s.name} (ID: ${s.id})</li> 208 <li><strong>Peer Stack ID:</strong> ${_}</li> 209</ul> 210 `.trim();t(Iy({email:o.email,name:o.name,subject:e,description:n,priority:`normal`,attachments:[]}))}else{let e=`VPC Peering Request (AWS) - ${s.name}`,n=s.vpcCidr,r=h.trim(),i=` 211<p>Your request for VPC Peering Connection has been received.</p> 212 213<p><strong>Details:</strong></p> 214<ul> 215 <li><strong>User:</strong> ${o.name} (${o.email})</li> 216 <li><strong>Org:</strong> ${a.name}</li> 217 <li><strong>Stack:</strong> ${s.name} (ID: ${s.id})</li> 218 <li><strong>Region:</strong> ${s.region}</li> 219 <li><strong>VPC Peering Connection ID:</strong> ${p}</li> 220 ${r?`<li><strong>Description:</strong> ${r}</li>`:``} 221</ul> 222 223<p><strong>Next steps:</strong> Once the connection has been accepted, use the following to configure route tables and security groups.</p> 224 225<p>Using the following IP CIDR Range <code>${n}</code>:</p> 226<ul> 227 <li>Update the route table(s) for your VPC to map the IP Destination onto the new VPC Peering Target (it will be named ${p}).</li> 228 <li>If you want to accept connections from your Aptible apps into your VPC, add a rule to your VPC's security group(s) to allow connections from the appropriate IP range.</li> 229</ul> 230 `.trim();t(Iy({email:o.email,name:o.name,subject:e,description:i,priority:`normal`,attachments:[]}))}}},className:`flex flex-col gap-4`,children:[(0,U.jsx)(J,{label:`Select VPC Target Destination`,htmlFor:`peer-type`,children:(0,U.jsx)(XA,{id:`peer-type`,value:d,options:[{label:`Peer to AWS Account`,value:`aws`},{label:`Peer to Aptible Dedicated Stack`,value:`stack`}],onSelect:e=>f(e.value)})}),d===`stack`&&(0,U.jsxs)(`div`,{className:`space-y-2`,children:[S.length===0?(0,U.jsx)(q,{variant:`warning`,children:`An additional Dedicated Stack is required to complete this peering. Contact Aptible Support to provision another Dedicated Stack, then return to create the peering request.`}):null,(0,U.jsx)(J,{label:`Dedicated Stack`,htmlFor:`peer-stack`,children:(0,U.jsx)(XA,{id:`peer-stack`,value:_,options:[{label:`Select a Stack`,value:``,disabled:!0},...S.map(e=>({label:e.name,value:e.id}))],onSelect:e=>v(e.value),disabled:S.length===0})})]}),d===`aws`&&(0,U.jsxs)(`div`,{className:`space-y-6`,children:[(0,U.jsx)(`h2`,{className:`text-md font-semibold text-gray-900`,children:`Initiate VPC Peering connection`}),(0,U.jsxs)(`div`,{className:`space-y-1`,children:[(0,U.jsx)(`p`,{className:`font-semibold`,children:`1. Create Peering Connection in AWS`}),(0,U.jsxs)(`p`,{className:`text-sm text-gray-600`,children:[`Go to the`,` `,(0,U.jsxs)(CA,{className:`underline`,href:`https://console.aws.amazon.com/vpc/home?region=${s.region}#PeeringConnections:sort=desc:peeredOwner`,children:[`Peering Connections page of the AWS VPC Dashboard`,(0,U.jsx)(rD,{variant:`sm`,className:`inline ml-1 opacity-60`})]}),` `,`and click "Create VPC Peering Connection".`]})]}),(0,U.jsxs)(`div`,{className:`space-y-1`,children:[(0,U.jsx)(`p`,{className:`font-semibold`,children:`2. Connect to Aptible's VPC`}),(0,U.jsx)(`p`,{className:`text-sm text-gray-600`,children:`Select your own
230Local VPC, and then enter the following details for the Aptible VPC to peer with.`}),(0,U.jsx)(q,{variant:`info`,className:`mt-2`,children:(0,U.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,U.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,U.jsx)(`p`,{className:`text-sm font-semibold`,children:`Aptible VPC Information`}),(0,U.jsx)(aA,{text:`These are your Aptible-side details for VPC Peering. Use them when initiating a peering connection from your own AWS VPC.`,children:(0,U.jsx)(`div`,{className:`flex-shrink-0 w-4 h-4 rounded-full bg-gray-400 text-white flex items-center justify-center text-xs font-bold cursor-help`,children:`?`})})]}),(0,U.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-6 gap-y-2`,children:[(0,U.jsxs)(`p`,{className:`text-sm font-medium`,children:[`AWS Account ID:`,` `,(0,U.jsx)(`code`,{className:`bg-black-100 px-1 py-0.5 rounded`,children:s.awsAccountId})]}),(0,U.jsxs)(`p`,{className:`text-sm font-medium`,children:[`VPC ID:`,` `,(0,U.jsx)(`code`,{className:`bg-black-100 px-1 py-0.5 rounded`,children:O}),E?null:(0,U.jsx)(`span`,{className:`text-xs text-gray-500 ml-1`,children:`(mock data)`})]}),(0,U.jsxs)(`p`,{className:`text-sm font-medium`,children:[`Region:`,` `,(0,U.jsx)(`code`,{className:`bg-black-100 px-1 py-0.5 rounded`,children:s.region})]}),(0,U.jsxs)(`p`,{className:`text-sm font-medium`,children:[`CIDR:`,` `,(0,U.jsx)(`code`,{className:`bg-black-100 px-1 py-0.5 rounded`,children:k}),D?null:(0,U.jsx)(`span`,{className:`text-xs text-gray-500 ml-1`,children:`(mock data)`})]})]})]})})]}),(0,U.jsxs)(`div`,{className:`space-y-2`,children:[(0,U.jsx)(`h2`,{className:`text-md font-semibold text-gray-900`,children:`Provide VPC Peering Details`}),(0,U.jsx)(`p`,{className:`text-sm text-gray-600`,children:`Provide your VPC details so Aptible can accept the peering request.`}),(0,U.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 gap-4`,children:[(0,U.jsx)(J,{label:`VPC Peering Connection ID`,htmlFor:`connection-id`,labelProps:{className:`text-sm font-semibold`},feedbackMessage:y.connectionId,feedbackVariant:y.connectionId?`danger`:`info`,children:(0,U.jsx)(X,{id:`connection-id`,name:`connection-id`,value:p,onChange:e=>m(e.currentTarget.value),placeholder:`pcx-1234567890abcdef0`})}),(0,U.jsx)(J,{label:`Description (Optional)`,htmlFor:`description`,labelProps:{className:`text-sm font-semibold`},children:(0,U.jsx)(X,{id:`description`,name:`description`,value:h,onChange:e=>g(e.currentTarget.value),placeholder:`Brief description of the peering connection`})})]})]})]}),(0,U.jsxs)(`div`,{className:`flex gap-2`,children:[(0,U.jsx)(K,{type:`button`,variant:`white`,onClick:()=>e(wo(i)),children:`Cancel`}),(0,U.jsx)(K,{type:`submit`,disabled:d===`stack`?_===``:!C9(p)||!E||!D,isLoading:A.isLoading,children:`Submit`})]})]}),A.isSuccess&&(0,U.jsx)(q,{variant:`success`,className:`mt-4`,children:`VPC Peering request submitted successfully! The Aptible Team will process your request.`})]})}):null};function WYe(e){let[t,n]=(0,V.useState)(!1);return(0,V.useEffect)(()=>{let e=document.createElement(`script`);return e.id=`mintlify-widget`,document.getElementById(`mintlify-widget`)||(e.src=`https://unpkg.com/@mintlify/widget@^0`,e.onload=()=>n(!0),document.head.appendChild(e)),()=>{document.getElementById(`mintlify-widget`)&&document.head.removeChild(e)}},[]),(0,V.useEffect)(()=>{window.updateMintlifyWidget&&window.updateMintlifyWidget(e)},[e]),(0,V.useEffect)(()=>{t&&window.MintlifyWidget.init(e)},[t]),e.display?.trigger?.type===`input`?(0,U.jsx)(`div`,{id:`mintlify-widget-wrapper`}):null}var GYe=()=>{let e=l(),t=B(qo),[n]=Ee(),r=n.get(`subject`)||``,i=n.get(`message`)||``,[a,o]=(0,V.useState)({email:t.email||``,name:t.name?t.name===`Aptible`?``:t.name:``,description:i,subject:r,attachments:[],priority:`normal`}),s=a.subject===``||a.description===``,[c,u]=(0,V.useState)([]),[d,f]=(0,V.useState)(!1),[p,m]=(0,V.useState)(null),h=(0,V.useRef)(null),g=e=>{e.preventDefault(),e.stopPropagation()},_=e=>{e.preventDefault(),e.stopPropagation();let{files:t}=e.dataTransfer;t?.length&&w(t)},v=I(Iy),y=I(Ry);(0,V.useEffect)(()=>{t.email&&o(e=>({...e,email:t.email})),t.name&&o(e=>({...e,name:t.name===`Aptible`?``:t.name}))},[t.email,t.name]);let b=e=>e.replace(/\n/g,`<br />`),x=n=>{n.preventDefault();let r=c.map(e=>e.token),i=b(a.description);e(Iy({...a,description:i,attachments:r}
230)),Ys(`submittedAppUiSupportForm`,`{ "viewedDocs": "${d}", "email": "${t.email}" }`),o({email:t.email||``,name:t.name?t.name===`Aptible`?``:t.name:``,description:``,subject:``,attachments:[],priority:``}),u([]),f(!1)},S=e=>{u([...c,{token:e.token,filename:e.filename}])},C=e=>{m(e)},w=async t=>{m(null);for(let n of t)e(Ry({attachment:n,callback:S,errorCallback:C}))},T=B(an);return(0,V.useEffect)(()=>()=>{e(Ly())},[]),(0,U.jsxs)(r5,{children:[(0,U.jsx)(NU,{description:`Get Support from the Aptible team`,children:`Support`}),(0,U.jsxs)(`div`,{className:`flex flex-col gap-6`,children:[(0,U.jsxs)(Z,{className:`w-full border-gold !bg-off-white`,children:[(0,U.jsx)(`div`,{className:`text-lg font-semibold text-black mb-2`,children:`Get Answers Now: Ask Chatbot`}),(0,U.jsx)(WYe,{connection:{apiKey:T.mintlifyChatKey},display:{trigger:{type:`input`,label:`Get Answers`},isDarkMode:!1,colors:{primary:`#111920`}}})]}),(0,U.jsxs)(Z,{className:`w-full`,children:[(0,U.jsx)(`div`,{className:`text-lg font-semibold text-black mb-2`,children:`Submit Support Ticket`}),(0,U.jsxs)(`div`,{className:`mb-4`,children:[`Please enter the details of your request. A member of our support staff will respond as soon as possible. Be sure to include relevant information such as app handles or timestamps, and`,` `,(0,U.jsx)(`b`,{children:`omit sensitive information `}),`like passwords.`]}),(0,U.jsx)(TA,{className:`my-2`,...v}),(0,U.jsx)(`form`,{onSubmit:x,children:(0,U.jsxs)(W,{children:[t.email?null:(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(J,{description:``,htmlFor:`email`,label:`Email`,children:(0,U.jsx)(X,{className:`flex w-full`,name:`email`,type:`email`,value:a.email,onChange:e=>o({...a,email:e.currentTarget.value}),"data-testid":`email`,id:`email`})}),(0,U.jsx)(J,{description:``,htmlFor:`name`,label:`Name`,children:(0,U.jsx)(X,{className:`flex w-full`,name:`name`,type:`string`,value:a.name,onChange:e=>o({...a,name:e.currentTarget.value}),"data-testid":`name`,id:`name`})})]}),(0,U.jsx)(J,{description:``,htmlFor:`subject`,label:`Subject`,children:(0,U.jsx)(X,{className:`flex w-full`,name:`subject`,type:`string`,value:a.subject,onChange:e=>{o({...a,subject:e.currentTarget.value})},"data-testid":`subject`,id:`subject`})}),(0,U.jsx)(J,{description:``,htmlFor:`message`,label:`Message`,children:(0,U.jsx)(XH,{autoResize:!0,name:`message`,value:a.description,onChange:e=>o({...a,description:e.currentTarget.value}),"data-testid":`message`,id:`message`})}),(0,U.jsx)(J,{description:``,htmlFor:`attachments`,label:`Upload Attachments`,children:(0,U.jsxs)(W,{size:`sm`,children:[y.isLoading?(0,U.jsx)(q,{children:`Uploading attachment ...`}):null,p?(0,U.jsx)(q,{variant:`error`,className:`mb-3`,children:p}):null,c?.map(e=>(0,U.jsxs)(`div`,{className:`last:pb-2`,children:[e.filename,(0,U.jsx)(`span`,{className:`ml-1 cursor-pointer hover:underline`,style:{color:`#AD1A1A`},onClick:()=>{let t=c.filter(t=>e.token!==t.token);u(t)},onKeyUp:()=>{let t=c.filter(t=>e.token!==t.token);u(t)},children:`Remove`})]},e.token)),(0,U.jsx)(`label`,{htmlFor:`attachments`,className:`flex w-full h-full justify-center items-center cursor-pointer rounded-lg`,style:{backgroundColor:`#FAFAFA`,border:`2px dashed #E7E8E8`},ref:h,onDrop:_,onDragOver:g,children:(0,U.jsxs)(`div`,{className:`flex justify-center items-center h-16 gap-1`,children:[(0,U.jsx)(`span`,{style:{color:`#4361FF`},children:`Add Files`}),` `,`or Drop Files`]})}),(0,U.jsx)(X,{style:{visibility:`hidden`,height:`0px`,padding:`0px`},name:`attachments`,type:`file`,value:``,onChange:e=>{let t=Array.prototype.slice.call(e.target.files);w(t)},"data-testid":`attachments`,id:`attachments`})]})}),(0,U.jsx)(J,{description:``,htmlFor:`priority`,label:`Choose Priority`,children:(0,U.jsxs)(QA,{name:`priority`,selected:a.priority,onSelect:e=>{o({...a,priority:e})},children:[(0,U.jsx)(ZA,{value:`low`,children:(0,U.jsx)(`div`,{className:`ml-2`,children:(0,U.jsxs)(`p`,{children:[`Low`,(0,U.jsx)(`span`,{className:`text-base text-gray-500 ml-2`,children:`(You have a general development question, or want to request a feature.)`})]})})}),(0,U.jsx)(ZA,{value:`normal`,children:(0,U.jsx)(`div`,{className:`ml-2`,children:(0,U.jsxs)(`p`,{children:[`Normal`,(0,U.jsx)(`span`,{className:`text-base text-gray-500 ml-2`,children:`(Non-critical functions of your application are behaving abnormally, or you have a time-sensitive development question.)`})]})})}),(0,U.jsx)(ZA,{value:`high`,children:(0,U.jsx)(`div`,{className:`ml-2`,children:(0,U.jsxs)(`p`,{children:[`High`,(0,U.jsx)(`span`,{className:`text-base text-gray-500 ml-2`,children:`(Important functions of your production application are impaired or degraded.)`})]})})}),(0,U.jsx)(ZA,{value:`urgent`,children:(0,U.jsx)(`div`,{className:`ml-2`,children:(0,U.jsxs)(`p`,{children:[`Urgent`,(0,U.jsx)(`span`,{className:`text-base text-gray-500 ml-2`,children:`(Your business is significantly impacted. Important functions of your production application are unavailable.)`})]})})})]})}),(0,U.jsx)(K,{className:`w-40 flex font-semibold`,type:`submit`,isLoading:v.isLoading,disabled:s,children:`Submit Request`})]})})]})]})]})},w9=({org:e,selected:t=!1,onClick:n})=>(0,U.jsxs)(`div`,{onClick:n,onKeyUp:n,role:`button`,className:`my-2 py-2 px-4 border border-gray-200 rounded-lg flex items-center justify-between cursor-pointer hover:bg-black-50`,children:[(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`div`,{children:e.name}),(0,U.jsxs)(`div`,{className:`text-gray-500 text-sm flex flex-row gap-1`,children:[`ID:`,(0,U.jsx)(z2,{text:e.id})]})]}),(0,U.jsxs)(W,{size:`sm`,variant:`horizontal`,className:`items-center`,children:[e.ssoEnforced?(0,U.jsx)(H2,{children:`SSO Enforced`}):null,(0,U.jsx)(`span`,{children:t?`Continue using`:``})]})]}),KYe=()=>{let e=N(),t=l(),n=B(Ko),r=B($o),i=B(Qo);u(gc());let a=i.filter(e=>!e.reauthRequired),o=i.filter(e=>e.reauthRequired),s=(r,i=!1)=>
230{if(i){t(ls({userId:n,orgId:r.id})),t(pc()),r.ssoEnforced?e(ao()):e(Nr());return}t(ls({userId:n,orgId:r.id})),t(HS())};return(0,U.jsx)(r5,{children:(0,U.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,U.jsx)(`h2`,{className:G.type.h2,children:`Choose Organization`}),(0,U.jsx)(`div`,{children:a.map(e=>(0,U.jsx)(w9,{onClick:()=>s(e,!1),org:e,selected:r===e.id},e.id))}),o.length>0?(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`div`,{children:`Reauthentication Required`}),o.map(e=>(0,U.jsx)(w9,{onClick:()=>s(e,!0),org:e},e.id))]}):null]})})},qYe=()=>{let{org:e}=yE(),t=B(ts);return(0,U.jsx)(r5,{children:(0,U.jsxs)(`div`,{className:`flex flex-col items-center text-center mt-16 mx-auto max-w-lg`,children:[(0,U.jsx)(`h1`,{className:G.type.h1,children:`SSO Login Required`}),(0,U.jsx)(Z,{className:`mt-8 w-full text-left`,children:(0,U.jsxs)(W,{children:[(0,U.jsx)(q,{variant:`error`,children:`Sign in with SSO to continue accessing this organization.`}),(0,U.jsx)(dA,{to:oo(e.id),className:`font-semibold w-full`,children:`Login with SSO`}),t?(0,U.jsx)(dA,{to:zi(),variant:`white`,className:`font-semibold w-full`,children:`Switch Organization`}):null]})})]})})},JYe=()=>(0,U.jsx)(r5,{children:(0,U.jsx)(xLe,{})}),YYe=()=>{let{id:e=``}=F(),t=u(_f({id:e,withDeleted:!0,waitForBootup:!0})),n=B(t=>rf(t,{id:e}));return t.isInitialLoading?(0,U.jsx)(xE,{}):n.deletedAt?(0,U.jsx)(ae,{to:oa(e),replace:!0}):n.currentDeploymentId?(0,U.jsx)(ae,{to:$i(e),replace:!0}):(0,U.jsx)(ae,{to:ua(e),replace:!0})},T9=({url:e,filename:t,children:n})=>{let r=B(An),[i,a]=(0,V.useState)(!1),o=async()=>{let n=await(await fetch(e,{headers:{Authorization:`Bearer ${r}`}})).text(),i=await(await fetch(n)).blob(),a=window.URL.createObjectURL(i),o=document.createElement(`a`);o.style.display=`none`,o.href=a,o.download=t,document.body.appendChild(o),o.click(),window.URL.revokeObjectURL(a)};return(0,U.jsxs)(K,{size:`sm`,variant:`primary`,onClick:e=>{e.preventDefault(),a(!0),o().finally(()=>a(!1))},isLoading:i,children:[(0,U.jsx)(aD,{className:`mr-1`,variant:`sm`}),n]})},XYe=({report:e,stack:t})=>{let n=Df(e.created_at),r=Mf(e.created_at);return(0,U.jsxs)(WA,{children:[(0,U.jsx)(Y,{children:Df(e.starts_at)}),(0,U.jsx)(Y,{children:Df(e.ends_at)}),(0,U.jsx)(Y,{children:n}),(0,U.jsx)(Y,{variant:`right`,children:(0,U.jsxs)(W,{variant:`horizontal`,size:`sm`,children:[(0,U.jsx)(T9,{filename:`report-${t.name}-${r}.csv`,url:e._links.download_csv.href,children:`CSV`}),(0,U.jsx)(T9,{filename:`report-${t.name}-${r}.pdf`,url:e._links.download_pdf.href,children:`PDF`})]})})]})},ZYe=({stack:e})=>{let[t,n]=(0,V.useState)(1),r=c(Xl({id:e.id,page:t}));if(!e.exposeIntrusionDetectionReports)return(0,U.jsx)(`div`,{children:`We cannot expose intrusion detection reports for this stack.`});if(r.isInitialLoading)return(0,U.jsx)(xE,{});if(r.isError)return(0,U.jsx)(TA,{...r});let i=r.data;if(!i)return(0,U.jsx)(q,{variant:`error`,children:`Unable to fetch managed HIDS evidence.`});let a=Math.ceil((i.total_count||0)/(i.per_page||0)),o=[...i._embedded.intrusion_detection_reports].sort((e,t)=>new Date(t.starts_at).getTime()-new Date(e.starts_at).getTime());return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(W,{variant:`horizontal`,size:`sm`,className:`items-center`,children:[(0,U.jsx)(RU,{page:t,totalPages:a,prev:()=>n(t-1),next:()=>n(t+1)}),(0,U.jsx)(`div`,{className:`ml-2 text-gray-500`,children:`Weekly Host-level Intrusion Detection System (HIDS) reports for auditing evidence. This report applies to all resources and environments in this stack.`})]}),(0,U.jsxs)(VA,{children:[(0,U.jsxs)(HA,{children:[(0,U.jsx)(KA,{children:`From Date`}),(0,U.jsx)(KA,{children:`To Date`}),(0,U.jsx)(KA,{children:`Posted Date`}),(0,U.jsx)(KA,{variant:`right`,children:`Download`})]}),(0,U.jsxs)(UA,{children:[o.length===0?(0,U.jsx)(GA,{colSpan:4}):null,o.map(t=>(0,U.jsx)(XYe,{report:t,stack:e},t.id))]})]}),a>1&&(0,U.jsx)(RU,{page:t,totalPages:a,prev:()=>n(t-1),next:()=>n(t+1)})]})},QYe=()=>{let{id:e=``}=F(),t=B(t=>zl(t,{id:e})),n=Kl(t)&&Gl(t)===`shared`;return(0,U.jsxs)(W,{children:[n?(0,U.jsx)(q,{variant:`warning`,children:`Note: This stack is shared tenancy. If you are looking for HIDS evidence to pass an audit, you probably need to download reports from a dedicated tenancy
230stack instead.`}):null,(0,U.jsx)(ZYe,{stack:t})]})},$Ye=({stackId:e})=>{u(Yl({id:e}));let t=l(),n=B(ns),r=B(qo),i=I(Iy),a=B(e=>__(e,{orgId:n.id}));(0,V.useEffect)(()=>()=>{t(Ly())},[]);let o=u(eb({orgId:n.id})),s=B(L.costs.selectTable),c=B(t=>zl(t,{id:e})),d=B(t=>hu(t,{stackId:e})),f=Gl(c),p=d.filter(e=>L.costs.findById(s,{id:Ky(`Account`,e.id)}).estCost>0),[m,h]=(0,V.useState)(``),g=m!==c.name;if(f===`shared`)return(0,U.jsxs)(Z,{children:[(0,U.jsxs)(`h1`,{className:`text-lg text-gray-500 font-semibold flex items-center gap-2 mb-4`,children:[(0,U.jsx)(ZE,{color:`#6B7280`}),`Deprovision Stack`]}),(0,U.jsx)(q,{variant:`info`,children:`Shared Stacks cannot be deprovisioned. Note: Shared Stacks have no additional costs.`})]});let _=(d.length>0?[`environments`]:[]).length===0;return(0,U.jsxs)(Z,{children:[(0,U.jsxs)(`h1`,{className:`text-lg text-red-500 font-semibold flex items-center gap-2 mb-4`,children:[(0,U.jsx)(ZE,{color:`#AD1A1A`}),`Deprovision Stack`]}),(0,U.jsxs)(`form`,{onSubmit:e=>{if(e.preventDefault(),g||!_||i.isLoading||!a)return;let o=`<p>Your request has been received by the Aptible Support team. If you'd like to cancel this request, reply here to let us know.</p>`;o+=`<p>--</p>`,o+=`<p><strong>User requested stack deprovision for:</strong> ${c.name} (ID: ${c.id})</p>`,o+=`<p><strong>User:</strong> ${r.name} (${r.email})<br/>`,o+=`<strong>Organization:</strong> ${n.name} (ID: ${n.id})<br/>`,o+=`<strong>Stack ID:</strong> ${c.id}<br/>`,o+=`<strong>Stack Name:</strong> ${c.name}</p>`,p.length>0?(o+=`<p><strong>Note:</strong> The following environments still have active resources:</p><ul>`,p.forEach(e=>{o+=`<li>${e.handle} (ID: ${e.id})</li>`}),o+=`</ul>`):o+=`<p><strong>Status:</strong> No billable resources are currently running in environments.</p>`;let s=Iy({subject:`Stack Deprovision Request`,description:o,email:r.email,name:r.name,priority:`normal`,attachments:[]});t(s),h(``)},children:[(0,U.jsxs)(q,{className:`mb-4`,variant:`error`,children:[`This will permanently deprovision `,(0,U.jsx)(`strong`,{children:c.name}),` stack and all its environments. This action cannot be undone.`]}),(0,U.jsx)(TA,{className:`mb-4`,...i}),p.length>0&&(0,U.jsxs)(`div`,{className:`mb-4 bg-gray-100 border border-gray-200 rounded-md px-6 py-3 shadow flex items-start`,children:[(0,U.jsx)(ZE,{color:`#6B7280`,className:`mr-3 mt-1 flex-shrink-0`}),(0,U.jsxs)(`div`,{className:`text-gray-800`,children:[`The following environments still have active running resources:`,(0,U.jsx)(`ul`,{className:`mt-2 ml-4 list-disc`,children:p.map(e=>(0,U.jsx)(`li`,{children:(0,U.jsx)(P,{to:Na(e.id),className:`text-indigo-600 hover:text-indigo-800 underline`,children:e.handle})},e.id))})]})]}),!o.isLoading&&!_&&(0,U.jsxs)(q,{className:`mb-4`,variant:`warning`,children:[`You must first delete all environments in your`,` `,(0,U.jsx)(`strong`,{children:c.name}),` stack before you can deprovision it. Any specific errors about remaining resources will be provided when you attempt to delete individual environments.`]}),(0,U.jsxs)(`div`,{className:`mb-4`,children:[`If you want to proceed, type `,(0,U.jsx)(`strong`,{children:c.name}),` below to continue. This will trigger a request to the Aptible Support team to complete this request.`]}),(0,U.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,U.jsx)(X,{name:`delete-confirm`,className:`flex-1`,type:`text`,value:m,onChange:e=>h(e.currentTarget.value),id:`delete-confirm`,disabled:i.isLoading||!a}),a?(0,U.jsxs)(K,{type:`submit`,variant:`delete`,isLoading:i.isLoading,disabled:g||!_||i.isLoading,className:`h-full w-70 flex bg-red-600 hover:bg-red-700 text-white`,children:[(0,U.jsx)(RE,{color:`#FFF`,className:`mr-2`}),`Request Deprovision of Stack`]}):(0,U.jsx)(aA,{text:`You must be an Account Owner to deprovision stacks`,children:(0,U.jsxs)(K,{type:`button`,variant:`delete`,disabled:!0,className:`h-full w-70 flex opacity-50 cursor-not-allowed`,children:[(0,U.jsx)(hD,{color:`#FFF`,className:`mr-2`}),`Request Deprovision of Stack`]})})]})]})]})},eXe=()=>{let{id:e=``}=F();return(0,U.jsx)(`div`,{className:`flex flex-col gap-4`,children:(0,U.jsx)($Ye,{stackId:e})})},tXe=({appId:e})=>{let{codeScan:t,op:n}=YS(e);return qu(n)?t.isInitialLoading?(0,U.jsx)(xE,{}):t.isError?(0,U.jsx)(TA,{...t}):t.data?(0,U.jsx)(Z,{children:(0,U.jsxs)(W,{size:`sm`,children:[(0,U.jsx)(`h3`,{className:G.type.h3,children:`Code Scan`}),(0,U.jsx)(nXe,{codeScan:t.data})]})}):(0,U.jsx)(`div`,{children:`No data found`}):(0,U.jsxs)(`div`,{children:[`Code scan information is only available for `,(0,U.jsx)(YU,{children:`git push`}),` `,`deployments.`]})},nXe=({codeScan:e})=>(0,U.jsxs)(W,{children:[(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`div`,{className:G.type.h4,children:`Languages Detected`}),(0,U.jsx)(`div`,{children:cl(e.languages_detected?.join(`, `)||``)})]}),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`div`,{className:G.type.h4,children:`Procfile`}),(0,U.jsx)(`div`,{children:e.procfile_present?(0,U.jsx)(S4,{text:e.procfile_data||``}):`No`})]}),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`div`,{className:G.type.h4,children:(0,U.jsx)(YU,{children:`.aptible.yml`})}),(0,U.jsx)(`div`,{children:e.aptible_yml_present?(0,U.jsx)(S4,{text:e.aptible_yml_data||``}):`No`})]}),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`div`,{className:G.type.h4,children:`Dockerfile`}),(0,U.jsx)(`div`,{className:`relative`,children:e.dockerfile_present?(0,U.jsx)(S4,{text:e.dockerfile_data||``}):`No`})]})]}),rXe=()=>{let{id:e=``}=F();u(_f({id:e}));let t=B(t=>rf(t,{id:e}));return(0,U.jsxs)(W,{children:[(0,U.jsx)(Z,{children:(0,U.jsxs)(W,{size:`sm`,children:[(0,U.jsx)(`h3`,{className:G.type.h3,children:`Current Environment Variables`}),(0,U.jsx)(T4,{configId:t.currentConfigurationId,envId:t.environmentId})]})}),(0,U.jsx)(Z,{children:(0,U.jsxs)(W,{size:`sm`,children:[(0,U.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,U.jsx)(`h3`,{className:G.type.h3,children:`Edit Environment Variables`}),(0,U.jsx)(uA,{href:`https://www.aptible.com/docs/configuration`})]}),(0,U.jsx)(iBe,{app:t})]})}),(0,U.jsx)(tXe,{appId:t.id})]})},iXe=[{label:`Select a Region`,value:`none`},{label:`us-east-1 / US East (N. Virginia)`,value:`us-east-1`},{label:`us-east-2 / US East (Ohio)`,value:`us-east-2`},{label:`us-west-1 / US West (N. California)`,value:`us-west-1`},{label:`us-west-2 / US West (Oregon)`,value:`us-west-2`},{label:`ca-central-1 / Canada (Central)`,value:`ca-central-1`},{label:`eu-west-1 / Europe (Ireland)`,value:`eu-west-1`},{label:`eu-west-2 / Europe (London)`,value:`eu-west-2`},{label:`eu-west-3 / Europe (Paris)`,value:`eu-west-3`},{label:`eu-central-1 / Europe (Frankfurt)`,value:`eu-central-1`},{label:`ap-south-1 / Asia Pacific (Mumbai)`,value:`ap-south-1`},{label:`ap-southeast-1 / Asia Pacific (Singapore)`,value:`ap-southeast-1`},{label:`ap-southeast-2 / Asia Pacific (Sydney)`,value:`ap-southeast-2`},{label:`ap-northeast-1 / Asia Pacific (Tokyo)`,value:`ap-northeast-1`},{label:`ap-northeast-2 / Asia Pacific (Seoul)`,value:`ap-northeast-2`},{label:`sa-east-1 / South America (São Paulo)`,value:`sa-east-1`}],E9=({show:e,text:t,children:n,wrapper:r})=>e?(0,U.jsx)(aA,{text:t,fluid:!0,children:(0,U.jsx)(r,{children:n})}):(0,U.jsx)(U.Fragment,{children:n}),aXe={name:e=>uLe(e.stackName),region:e=>{if(e.region===`none`)return`must select an AWS region`}},oXe=()=>{let e=l(),t=B(qo),n=B($o),r=B(bg),i=B(Vl),a=(0,V.useMemo)(()=>i.some(e=>e.organizationId===n&&Gl(e)===`dedicated`),[i,n]),o=(0,V.useMemo)(()=>PA({orgId:n}),[n]),s=I(o),c=B(e=>L.cache.selectById(e,{id:o.payload.key}
230))?.status,d=c!==void 0;u(xg()),u(Sg({orgId:n})),u(Jl());let f=B(e=>_g(e,{id:r.planId})),p=[`growth`,`scale`,`production`,`enterprise`].includes(f.name),[m,h]=(0,V.useState)(``),[g,_]=(0,V.useState)(`none`),[v,y]=(0,V.useState)([]),[b,x]=(0,V.useState)(!1),[S,C]=QS(aXe),w={stackName:m,region:g,dataTypes:v},T=I(Iy),E=!a,D=c===`SIGNED`,O=E&&s.isError&&!d,k=E&&!s.isLoading&&d&&!D,A=E&&!D,j=A,M=!b||!p||j,ee=`Signed BAA required`,te=e=>{v.findIndex(t=>t===e)===-1&&y([...v,e])},ne=e=>{let t=v.findIndex(t=>t===e);if(t===-1)return;let n=[...v];n.splice(t,1),y(n)},re=e=>t=>t.currentTarget.checked?te(e):ne(e);return(0,V.useEffect)(()=>()=>{e(Ly())},[]),(0,V.useEffect)(()=>{n&&e(o)},[n,e,o]),(0,U.jsxs)(W,{children:[(0,U.jsx)(hU,{crumbs:[{name:`Stacks`,to:ho()},{name:`Request Dedicated Stack`,to:null}]}),(0,U.jsx)(Z,{children:(0,U.jsx)(`form`,{onSubmit:r=>{r.preventDefault(),C(w)&&(A||e(Iy({email:t.email,name:t.name,subject:`Dedicated Stack Request - ${m} on ${g}`,priority:`high`,attachments:[],description:[`ORG_ID="${n}";`,`STACK_NAME="${m}";`,`REGION="${g}";`,`Data Types: ${v.join(`, `)}`,`Current plan: ${f.name}`].join(` 231`)})))},children:(0,U.jsxs)(W,{children:[(0,U.jsxs)(`p`,{children:[(0,U.jsx)(CA,{variant:`info`,href:`https://www.aptible.com/docs/stacks#dedicated-stacks`,children:`Dedicated Stacks`}),` `,`are built for production environments, are dedicated to a single organization, and provide four significant benefits: Isolated Tenancy, SLA Availability, Regulatory (HIPAA, GDPR), and Connectivity (VPNs, VPC Peering).`]}),A?null:(0,U.jsx)(q,{variant:`info`,children:`Fill out this form and Aptible Support will be in contact with you shortly.`}),f.id===``||p?null:(0,U.jsxs)(q,{variant:`info`,children:[`Dedicated stacks are only available for`,` `,(0,U.jsx)(`strong`,{children:`Production and Enterprise`}),` plans â`,` `,(0,U.jsx)(P,{to:Di(),children:`Upgrade your plan for access.`})]}),k?(0,U.jsxs)(q,{variant:`warning`,className:`w-full border-2 border-gold bg-gold-50 shadow-sm`,children:[`You must sign a Business Associate Agreement (BAA) before requesting a Dedicated Stack. Complete the agreement on the`,` `,(0,U.jsx)(P,{className:`font-semibold underline`,to:Li(),children:`Legal & Compliance`}),` `,`page, then return here to submit your request.`]}):null,(0,U.jsx)(TA,{...T}),(0,U.jsx)(E9,{show:A,text:ee,wrapper:`div`,children:(0,U.jsx)(J,{label:`Stack Name`,description:B4,htmlFor:`stack`,feedbackMessage:S.name,feedbackVariant:S.name?`danger`:`info`,children:(0,U.jsx)(X,{id:`stack`,name:`stack`,value:m,onChange:e=>h(e.currentTarget.value),disabled:A})})}),(0,U.jsx)(E9,{show:A,text:ee,wrapper:`div`,children:(0,U.jsx)(J,{label:`Region`,description:`Stack will be created in this AWS Region`,htmlFor:`region`,feedbackMessage:S.region,feedbackVariant:S.region?`danger`:`info`,children:(0,U.jsx)(XA,{options:iXe,value:g,onSelect:e=>_(e.value),disabled:A})})}),(0,U.jsx)(E9,{show:A,text:ee,wrapper:`div`,children:(0,U.jsx)(J,{label:`What types of data will this Stack process?`,description:`Select all that apply`,htmlFor:`data-type`,children:(0,U.jsxs)(W,{size:`sm`,children:[(0,U.jsx)(ZH,{label:`Protected Health Information (PHI)`,onChange:re(`phi`),disabled:A}),(0,U.jsx)(ZH,{label:`Sensitive Data`,onChange:re(`sensitive`),disabled:A}),(0,U.jsx)(ZH,{label:`Financial Data`,onChange:re(`financial`),disabled:A}),(0,U.jsx)(ZH,{label:`Other`,onChange:re(`other`),disabled:A})]})})}),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`h4`,{className:G.type.h4,children:`Monthly Cost`}),(0,U.jsx)(`p`,{className:`text-lg text-green-400`,children:`$499`})]}),(0,U.jsx)(`hr`,{}),(0,U.jsxs)(W,{variant:`horizontal`,size:`sm`,className:`items-center gap-4`,children:[(0,U.jsx)(E9,{show:j,text:`signed BAA required`,wrapper:`span`,children:(0,U.jsx)(pA,{type:`submit`,disabled:M,isLoading:T.isLoading,children:`Request Dedicated Stack`})}),(0,U.jsx)(E9,{show:A,text:ee,wrapper:`span`,children:(0,U.jsx)(ZH,{onChange:e=>x(e.currentTarget.checked),disabled:A,label:(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`span`,{children:`I agree to the `}),(0,U.jsx)(CA,{variant:`info`,href:`https://www.aptible.com/legal/terms-of-service`,children:`terms and conditions`})]})})})]}),E&&s.isLoading?(0,U.jsx)(`p`,{className:`text-gray-600 text-sm w-full`,children:`Verifying Business Associate Agreement statusâ¦`}):null,O?(0,U.jsx)(`p`,{className:`text-red-500 text-sm w-full`,children:`Could not verify your BAA status. Refresh the page and try again.`}):null]})})})]})},D9=[{label:`1 Hour`,value:`3600`},{label:`4 Hours`,value:`14400`},{label:`12 Hours`,value:`43200`},{label:`24 Hours`,value:`86400`},{label:`5 Days`,value:`432000`},{label:`1 Week`,value:`604800`}],O9=[{label:`1 Day`,value:`86400`},{label:`1 Week`,value:`604800`},{label:`1 Month`,value:`2592000`},{label:`3 Months`,value:`7776000`},{label:`6 Months`,value:`15552000`},{label:`1 Year`,value:`31536000`}],sXe=()=>{let e=B(an),[t,n]=(0,V.useState)(D9[0].value),r=B($o);return(0,U.jsx)(Z,{children:(0,U.jsxs)(W,{children:[(0,U.jsx)(`h3`,{className:G.type.h3,children:`SSO Token for CLI`}),(0,U.jsxs)(`div`,{children:[`To use the`,` `,(0,U.jsx)(CA,{variant:`info`,href:`https://aptible.com/docs/cli`,children:`Aptible CLI`}),` `,`with SSO, you must generate a new token. The selected lifetime is the maximum duration the token will be valid. If your SSO provider is configured to use a shorter session duration, that will be applied to the token instead. The security best practice is to select the shortest lifetime that will meet your needs. You can enforce a maximum token duration via your SSO provider (`,(0,U.jsx)(CA,{variant:`info`,href:`https://www.aptible.com/docs/core-concepts/security-compliance/authentication/sso#controlling-cli-token-lifetime`,children:`see docs`}),`).`]}),(0,U.jsx)(`form`,{onSubmit:n=>{n.preventDefault();let i=encodeURIComponent(`${e.appUrl}${co()}`),a=`${e.authUrl}/organizations/${r}/saml/login?landing_page=clitoken&duration=${t}&redirect_uri=${i}`;window.location.replace(a)},className:`max-w-xs`,children:(0,U.jsxs)(J,{htmlFor:`sso-token-duration`,label:`Token Duration`,children:[(0,U.jsx)(XA,{options:D9,onSelect:e=>n(e.value),value:t,ariaLabel:`sso-token-duration`}),(0,U.jsx)(K,{className:`mt-4`,type:`submit`,children:`Generate SSO Token`})]})})]})})},cXe=()=>{let e=l(),[t,n]=(0,V.useState)(O9[O9.length-1].value),[r,i]=(0,V.useState)(ic({expires
231In:Number.parseInt(t)})),a=w(r),o=B(e=>e.activityLogsToken);(0,V.useEffect)(()=>()=>{e(ac())},[]);let s=e=>{e.preventDefault(),a.trigger()},c=e=>{n(e.value),i(ic({expiresIn:Number.parseInt(e.value)}))};return(0,U.jsx)(Z,{children:(0,U.jsxs)(W,{children:[(0,U.jsx)(`h3`,{className:G.type.h3,children:`Activity Logs Token`}),(0,U.jsx)(`div`,{children:`Generate a long-lived token for accessing activity. This token only provides access to activity and other limited personal and organization-level metadata. This token can be used with the SIEM or other client to retrieve activity logs for your organization.`}),(0,U.jsx)(TA,{...a}),(0,U.jsx)(`form`,{onSubmit:s,className:`max-w-xs`,children:(0,U.jsxs)(J,{htmlFor:`activity-logs-token-duration`,label:`Token Duration`,children:[(0,U.jsx)(XA,{options:O9,onSelect:c,value:t,ariaLabel:`activity-logs-token-duration`}),(0,U.jsx)(K,{className:`mt-4`,type:`submit`,isLoading:a.isLoading,children:`Generate Activity Logs Token`})]})}),o?(0,U.jsxs)(W,{className:`mt-4`,children:[(0,U.jsx)(`div`,{className:`font-semibold`,children:`Your Activity Logs Token:`}),(0,U.jsx)(q,{variant:`info`,children:(0,U.jsx)(`div`,{className:`text-sm`,children:`Save this token securely. You won't be able to see it again.`})}),(0,U.jsx)(w4,{allowCopy:!0,segments:x4([o])}),(0,U.jsx)(`div`,{children:(0,U.jsx)(K,{variant:`white`,onClick:()=>e(ac()),children:`Dismiss`})})]}):null]})})},lXe=()=>{let e=B(In);return(0,U.jsxs)(W,{children:[(0,U.jsx)(`h2`,{className:G.type.h2,children:`Access Tokens`}),e?(0,U.jsx)(sXe,{}):null,(0,U.jsx)(cXe,{})]})},uXe=()=>{let e=B(An),t=w(Qs());return(0,U.jsxs)(W,{children:[(0,U.jsx)(`h2`,{className:G.type.h2,children:`Access Tokens`}),(0,U.jsx)(Z,{children:(0,U.jsxs)(W,{children:[(0,U.jsxs)(`div`,{children:[`To use the`,` `,(0,U.jsx)(CA,{variant:`info`,href:`https://aptible.com/docs/cli`,children:`Aptible CLI`}),` `,`with SSO, enter the below command into your terminal.`,` `]}),(0,U.jsxs)(W,{children:[e===``&&!t.isLoading?(0,U.jsx)(q,{variant:`error`,children:(0,U.jsxs)(`div`,{className:`flex gap-2 items-center`,children:[`Failed to fetch token, try again.`,` `,(0,U.jsx)(K,{variant:`delete`,onClick:()=>t.trigger(),isLoading:t.isLoading,children:`Retry`})]})}):null,(0,U.jsx)(w4,{allowCopy:!0,segments:x4([`aptible login --sso`,e])})]})]})})]})},dXe=()=>{let{id:e=``}=F(),t=B(t=>Lp(t,{id:e})),n=B(e=>Eu(e,{id:t.serviceId}));return(0,U.jsx)(r3,{dbId:n.databaseId,externalHost:t.externalHost})},fXe=()=>{let{appId:e=``}=F();return(0,U.jsxs)(D5,{children:[(0,U.jsxs)(dA,{to:cne(e),children:[(0,U.jsx)(gD,{variant:`sm`,className:`mr-1`}),` Deploy from GitHub`]}),(0,U.jsx)(dA,{to:$a(e),children:`Deploy with Git Push`})]})},pXe=()=>{let{envId:e=``}=F(),t=l(),n=B(t=>tu(t,{id:e})),r=N(),i=B(t=>lf(t,{envId:e})),{appOps:a,op:o}=YS(i.id),s=B(e=>dd(e,{appId:i.id}));return(0,V.useEffect)(()=>{t(hf())},[]),(0,V.useEffect)(()=>{t(du({id:e}))},[e]),(0,V.useEffect)(()=>{lu(n)&&nf(i)&&a.lastSuccess!==0&&(qu(s)?r(ro(i.id)):r(Qa(i.id)))},[n.id,i.id,a,s,o]),(0,U.jsx)(r5,{children:(0,U.jsx)(xE,{text:`Detecting app ${i.handle} status...`})})},mXe=()=>{let{appId:e=``}=F(),t=l(),n=B(t=>rf(t,{id:e})),r=B(e=>tu(e,{id:n.environmentId})),i=N(),{appOps:a,op:o}=YS(e),s=B(t=>dd(t,{appId:e}));return(0,V.useEffect)(()=>{t(_f({id:e}))},[e]),(0,V.useEffect)(()=>{t(du({id:n.environmentId}))},[n]),(0,V.useEffect)(()=>{lu(r)&&nf(n)&&a.lastSuccess!==0&&(qu(s)?i(ro(n.id),{replace:!0}):i(Qa(n.id),{replace:!0}))},[r.id,n.id,a,o,s]),(0,U.jsx)(r5,{children:(0,U.jsx)(xE,{text:`Detecting app ${n.handle} status...`})})},k9=ln(`project`),A9=`_TMP`,j9=e=>`{{${e}}}`;qn.create(`create-project`,function*(e,t){if(yield*L.update(L.loaders.start({id:e.key})),!e.payload.stackId){yield*L.update(L.loaders.error({id:e.key,message:`stack cannot be empty`}));return}if(!e.payload.name){yield*L.update(L.loaders.error({id:e.key,message:`name cannot be empty`}));return}let n=yield*p(t=>uu(t,{handle:e.payload.name})),r=``;if(lu(n))k9(`environment already exists, continuing`,n),r=n.id;else{k9(`environment doesn't exist, creating`);let t=yield*Te(()=>_u.run(_u(e.payload)));if(!t.json.ok){let n=t.json.error;yield*L.update(L.loaders.error({id:e.key,message:n.message}));return}k9(t),r=`${t.json.value.id}`}let i=yield*Te(()=>vf.run(vf({name:e.payload.name,envId:r})));if(!i.json.ok){let t=i.json.error;yield*L.update(L.loaders.error({id:e.key,message:t.message,meta:{envId:r}}));return}k9(i);let a=i.json.value.id;yield*L.update(L.loaders.success({id:e.key,meta:{envId:r,appId:a}})),yield*t()});
231function*hXe(e,t){yield*Te(()=>Xd({id:e,skipFetch:!0}));let n=yield*Te(()=>bp.run(bp({id:t,withSensitiveExtras:!0})));return n.json.ok?{id:`${n.json.value.id}`,handle:n.json.value.handle,connectionUrl:n.json.value.connection_url}:{id:``,handle:``,connectionUrl:``}}var M9=qn.create(`project-deploy`,function*(e,t){let{appId:n,envId:r,dbs:i,envs:a,gitRef:o,curEnvs:s}=e.payload,c=e.name;if(yield*L.update(L.loaders.start({id:c})),!nf(yield*p(e=>rf(e,{id:n})))){let e=`no app found with id ${n}, cannot deploy project`;k9(e),yield*L.update(L.loaders.error({id:c,message:e}));return}if(!r){let e=`envId cannot be empty, cannot deploy project`;k9(e),yield*L.update(L.loaders.error({id:c,message:e}));return}yield*be(gu({id:r,status:`completed`}));let l=rg(a,s);i.forEach(e=>{l[`${e.env}${A9}`]=j9(e.name)});let u=``,d=Object.keys(l).length>0;if(d){let e=yield*Te(()=>yf.run(yf({type:`configure`,appId:n,env:l})));if(!e.json.ok){let t=e.json.error;yield*L.update(L.loaders.error({id:c,message:t.message}));return}u=`${e.json.value.id}`}let f=yield*yield*S(i.map(e=>()=>wp.run(wp(Cp(r,e)))));d&&(yield*Te(()=>Xd({id:u}))),yield*Te(()=>_f.run(_f({id:n})));let m=[];for(let e=0;e<f.length;e+=1){let t=f[e];if(!t.ok)continue;let n=t.value.json;if(!n)continue;if(n.error){yield*L.update(L.loaders.error({id:c,message:n.error}));continue}let{opCtx:r,dbCtx:i,dbId:a}=n;if(r&&!r.json.ok){yield*L.update(L.loaders.error({id:c,message:r.json.error.message}));continue}if(i&&!i.json.ok){yield*L.update(L.loaders.error({id:c,message:i.json.error.message}));continue}let o=r?.json;o?.ok&&m.push(()=>hXe(`${o?.value.id}`,a))}if(yield*yield*S(m),yield*Te(()=>N9.run(N9({appId:n,envId:r,force:!0}))),o){let e=yield*Te(()=>yf.run(yf({type:`deploy`,appId:n,envId:r,gitRef:o})));if(!e.json.ok){let t=e.json.error;yield*L.update(L.loaders.error({id:c,message:t.message}));return}}yield*t(),yield*L.update(L.loaders.success({id:c}))});function*gXe({appId:e,env:t,dbs:n,force:r=!1}){let i=!1,a={...t};if(n.forEach(e=>{Object.keys(a).forEach(t=>{a[t]===j9(e.handle)&&(a[t.replace(A9,``)]=e.connectionUrl,a[t]=``,i=!0)})}),!(r||i))return;let o=yield*Te(()=>yf.run(yf({type:`configure`,appId:e,env:a})));if(!o.json.ok)return;let s=`${o.json.value.id}`;yield*Te(()=>Xd({id:s,skipFetch:!0}))}var N9=qn.create(`update-env-with-db-urls`,function*(e,t){let{appId:n,envId:r,force:i=!1}=e.payload,a=e.name,o=yield*p(e=>rf(e,{id:n})),s=yield*Te(()=>xp.run(xp({envId:r,withSensitiveExtras:!0}))),c=yield*Te(()=>ug.run(ug({id:o.currentConfigurationId,withSensitiveExtras:!0})));if(!s.json.ok){yield*t(),e.json={message:`failed to fetch databases`};return}if(!c.json.ok){yield*t(),e.json={message:`failed to fetch app env vars`};return}let l=c.json.value.env||{},u=yield*p(e=>gp(e,{envId:r}));yield*Te(()=>gXe({appId:n,dbs:u,env:l,force:i})),yield*L.update(L.loaders.success({id:a})),yield*t(),e.json={message:`success`}}),P9=qn.create(`redeploy-app`,function*(e,t){yield*L.update(L.loaders.resetByIds([`${M9}`]));let n=e.name;yield*L.update(L.loaders.start({id:n}));let r=yield*Te(()=>N9.run(N9(e.payload)));if(r.json.message!==`success`){yield*L.update(L.loaders.error({id:n,message:r.json.message})),yield*t();return}let i=yield*Te(()=>yf.run(yf({type:`deploy`,appId:e.payload.appId,envId:e.payload.envId,gitRef:e.payload.gitRef})));if(!i.json.ok){let e=i.json.error;yield*L.update(L.loaders.error({id:n,message:e.message})),yield*t();return}yield*L.update(L.loaders.success({id:n,message:`Redeploy initiated`}))}),_Xe=()=>{let{appId:e=``}=F(),t=l(),n=u(_f({id:e})),r=B(t=>rf(t,{id:e})),i=r.environmentId,a=r.currentConfigurationId,o=B(t=>Hu(t,{appId:e})),s=DXe({envId:i,configId:a});u(du({id:i}));let c=B(e=>tu(e,{id:i})),d=B(e=>fd(e,{appId:r.id})),f=u(nm({appId:e})),p=B(t=>Wp(t,{appId:e}));XS({envId:i,appId:e});let{ops:m}=ZS({envId:i,appId:e}),[h,g]=PIe(m);u(vd({envId:i}));let{isInitialLoading:_}=u(kd({envId:i})),{gitRef:v}=YS(e),y=B(e=>L.loaders.selectById(e,{id:`${P9}`})),b=B(e=>L.loaders.selectById(e,{id:`${M9}`})),x=n=>{y.isLoading||t(P9({appId:e,envId:c.id,gitRef:v,force:n}))};return(0,V.useEffect)(()=>{h===`succeeded`&&(n.trigger(),f.trigger())},[h]),(0,U.jsxs)(r5,{className:`mb-8`,children:[h===`succeeded`?(0,U.jsxs)(`div`,{className:`text-center mt-10`,children:[(0,U.jsx)(`h1`,{className:G.type.h1,children:`Deployed your Code`}),(0,U.jsx)(`p`,{className:`my-4 text-gray-600`,children:`All done! Deployment c
231ompleted successfully.`})]}):h===`failed`?(0,U.jsxs)(`div`,{className:`text-center mt-10`,children:[(0,U.jsx)(`h1`,{className:G.type.h1,children:`Deployment Failed`}),(0,U.jsx)(`p`,{className:`my-4 text-gray-600`,children:`Don't worry! Edit your configuration or push your code to redeploy.`})]}):(0,U.jsxs)(`div`,{className:`text-center mt-10`,children:[(0,U.jsx)(`h1`,{className:G.type.h1,children:`Deploying your Code`}),(0,U.jsx)(`p`,{className:`my-4 text-gray-600`,children:`Deployment is in progress...`})]}),(0,U.jsx)(I6,{cur:4,prev:no(e)}),(0,U.jsxs)(`div`,{className:`w-full max-w-[700px] mx-auto`,children:[(0,U.jsx)(Aze,{handle:r.handle,appId:e,status:(0,U.jsx)(QFe,{status:h,from:g}),children:_?(0,U.jsx)(xE,{text:`Loading resources...`}):(0,U.jsx)(wXe,{status:h,app:r,dbs:s,endpoints:p,gitRef:v})}),qu(d)?null:(0,U.jsx)(k6,{children:(0,U.jsx)(vXe,{children:(0,U.jsxs)(W,{size:`sm`,children:[(0,U.jsx)(q,{variant:`warning`,children:`If you require databases, please wait to push your code until databases are provisioned.`}),(0,U.jsxs)(`div`,{children:[(0,U.jsxs)(`div`,{className:`flex flex-row items-center`,children:[(0,U.jsx)(`h4`,{className:G.type.h4,children:`Deploy from GitHub`}),(0,U.jsx)(aA,{fluid:!0,text:`If your local branch is named master, push to master`,children:(0,U.jsx)(tD,{className:`opacity-50 hover:opacity-100 ml-1`,variant:`sm`})})]}),(0,U.jsx)(w4,{segments:x4([`git push origin`,`main`]),allowCopy:!0})]}),(0,U.jsx)(`p`,{className:`font-bold`,children:`- OR -`}),(0,U.jsxs)(`div`,{children:[(0,U.jsxs)(`div`,{className:`flex flex-row items-center`,children:[(0,U.jsx)(`h4`,{className:G.type.h4,children:`Deploy with Git Push`}),(0,U.jsx)(aA,{fluid:!0,text:`If your local branch is named master, push to master`,children:(0,U.jsx)(tD,{className:`opacity-50 hover:opacity-100 ml-1`,variant:`sm`})})]}),(0,U.jsxs)(W,{size:`sm`,children:[(0,U.jsx)(w4,{segments:x4([`git remote add aptible`,r.gitRepo]),allowCopy:!0}),(0,U.jsx)(w4,{segments:x4([`git push aptible`,`main`]),allowCopy:!0})]})]})]})})}),b.isError?(0,U.jsxs)(k6,{children:[(0,U.jsx)(`h4`,{className:G.type.h4,children:`Error!`}),(0,U.jsx)(TA,{...b})]}):null,y.isError?(0,U.jsxs)(k6,{children:[(0,U.jsx)(`h4`,{className:G.type.h4,children:`Error!`}),(0,U.jsx)(TA,{...y})]}):null,o.length>0&&p.length>0?(0,U.jsxs)(k6,{children:[(0,U.jsx)(`h4`,{className:G.type.h4,children:`Current Endpoints`}),p.map(e=>(0,U.jsx)(EXe,{vhost:e},e.id)),(0,U.jsxs)(`div`,{className:`flex gap-3`,children:[(0,U.jsx)(P,{to:sa(r.id),children:`Manage Endpoints`}),(0,U.jsx)(CA,{href:`https://www.aptible.com/docs/endpoints`,variant:`info`,children:`View Docs`})]})]}):(0,U.jsxs)(k6,{children:[(0,U.jsxs)(`h4`,{className:G.type.h4,children:[`Which service needs an`,` `,(0,U.jsx)(CA,{href:`https://www.aptible.com/docs/endpoints`,variant:`info`,children:`Endpoint`}),`?`]}),o.length?(0,U.jsx)(`div`,{className:`mt-2`,children:(0,U.jsx)(TXe,{app:r})}):(0,U.jsx)(`p`,{className:`text-black-500`,children:`Your services will appear here shortly...`})]}),d.status===`failed`||y.isLoading?(0,U.jsxs)(k6,{children:[(0,U.jsx)(`h4`,{className:G.type.h4,children:`Deployment Failed`}),(0,U.jsx)(`p`,{className:`text-black-500`,children:`â¢\xA0Check the error logs and make changes, then push your code to redeploy.`}),(0,U.jsx)(`p`,{className:`text-black-500 mb-4`,children:`â¢\xA0Or, you can click Redeploy to try again without making any changes.`}),(0,U.jsx)(K,{onClick:()=>x(!0),isLoading:y.isLoading,children:`Redeploy`})]}):null,(0,U.jsxs)(k6,{children:[(0,U.jsxs)(dA,{to:Qi(r.id),children:[`View App `,(0,U.jsx)(AE,{variant:`sm`,className:`ml-2`})]}),(0,U.jsx)(dA,{to:no(e),variant:`white`,className:`mt-2`,children:`Edit Configuration`})]})]}),(0,U.jsx)(`div`,{className:`hero-bg absolute w-full h-full top-0 left-0 z-[-999]`})]})};function vXe({children:e}){return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`h4`,{className:G.type.h4,children:`Push your code to Aptible or GitHub`}),(0,U.jsx)(`div`,{children:e})]}),(0,U.jsx)(`hr`,{className:`my-4`}),(0,U.jsx)(q,{variant:`info`,children:`Waiting on your git push to deploy your Ap
231p...`})]})}var yXe=(e,t)=>e.resourceType===`app`&&e.type===`deploy`?`App deployment`:e.resourceType===`database`&&e.type===`provision`?`Database provision ${t}`:e.resourceType===`app`&&e.type===`configure`?`Initial configuration`:e.resourceType===`vhost`&&e.type===`provision`?`HTTPS endpoint provision`:`${e.resourceType}:${e.type}`,F9=({op:e,resource:t,retry:n,alwaysRetry:r=!1,status:i})=>{let[a,o]=(0,V.useState)(``),[s,c]=(0,V.useState)(!1);return(0,V.useEffect)(()=>{if([`succeeded`,`failed`].includes(e.status))return;let t=setInterval(()=>{o(Pf({startDate:e.createdAt,endDate:new Date().toString()}))},1e3);return()=>clearInterval(t)},[e.status]),qu(e)?(0,U.jsxs)(`div`,{className:`border-b border-black-100`,children:[(0,U.jsxs)(`div`,{className:`py-4 flex justify-between items-center`,children:[(0,U.jsxs)(`div`,{className:`flex flex-1`,children:[(0,U.jsxs)(`div`,{className:`font-semibold flex items-center cursor-pointer`,onClick:()=>c(!s),onKeyUp:()=>c(!s),children:[s?(0,U.jsx)(IE,{}):(0,U.jsx)(PE,{}),(0,U.jsx)(`div`,{children:yXe(e,t.handle)})]}),(0,U.jsxs)(`div`,{className:`flex items-center ml-2`,children:[(0,U.jsxs)(`div`,{className:`mr-2 text-xs text-black-300`,children:[`ID: `,e.id]}),(0,U.jsx)(`div`,{title:`aptible operation:logs ${e.id}`,children:(0,U.jsx)(B2,{text:`aptible operation:logs ${e.id}`})})]})]}),(()=>{let t=`font-semibold flex justify-center items-center`,o=Pf({startDate:e.createdAt,endDate:e.updatedAt});return e.status===`succeeded`?(0,U.jsxs)(`div`,{className:(0,H.default)(t,`text-forest`),children:[n&&r&&i===`succeeded`?(0,U.jsx)(K,{size:`sm`,variant:`white`,onClick:e=>{e.stopPropagation(),n()},className:`mr-2`,children:`Re-run`}):null,(0,U.jsxs)(`span`,{className:`mx-2 ${G.type[`small lighter`]}`,children:[o,` `]}),Qd(e.status)]}):e.status===`failed`?(0,U.jsxs)(`div`,{className:(0,H.default)(t,`text-red`),children:[n?(0,U.jsx)(K,{size:`sm`,variant:`white`,onClick:e=>{e.stopPropagation(),n()},className:`mr-2`,children:`Re-run`}):null,(0,U.jsxs)(`span`,{className:`mx-2 ${G.type[`small lighter`]}`,children:[o,` `]}),Qd(e.status)]}):(0,U.jsx)(U.Fragment,{children:(0,U.jsxs)(`div`,{className:(0,H.default)(t,`text-black-500`),children:[a&&(0,U.jsxs)(`span`,{className:`mx-2 ${G.type[`small lighter`]}`,children:[` `,a]}),Qd(e.status)]})})})()]}),s?(0,U.jsx)(`div`,{className:`pb-4`,children:(0,U.jsx)(w3,{op:e})}):null]}):null},bXe=({db:e,status:t})=>{let n=B(t=>cd(t,{resourceId:e.id,resourceType:`database`}));return(0,U.jsx)(F9,{op:n,resource:e,status:t})},xXe=({endpoint:e,status:t})=>{let n=l(),r=B(t=>cd(t,{resourceId:e.id,resourceType:`vhost`}));return(0,U.jsx)(F9,{op:r,resource:{handle:``},retry:()=>{n(fm({type:`provision`,endpointId:e.id,settings:{}}))},status:t})},SXe=({app:e,retry:t,status:n})=>{let r=B(t=>dd(t,{appId:e.id}));return(0,U.jsx)(F9,{op:r,resource:e,retry:t,alwaysRetry:!0,status:n})},CXe=({app:e,status:t,retry:n})=>{let r=B(t=>fd(t,{appId:e.id}));return(0,U.jsx)(F9,{op:r,resource:e,retry:n,alwaysRetry:!0,status:t})},wXe=({app:e,dbs:t,endpoints:n,gitRef:r,status:i})=>{let a=l(),o=()=>{a(P9({appId:e.id,envId:e.environmentId,gitRef:r,force:!0}))};return(0,U.jsxs)(`div`,{children:[(0,U.jsx)(SXe,{app:e,status:i,retry:o}),t.map(e=>(0,U.jsx)(bXe,{db:e,status:i},e.id)),(0,U.jsx)(CXe,{app:e,status:i,retry:o}),n.map(e=>(0,U.jsx)(xXe,{endpoint:e,status:i},e.id))]})},TXe=({app:e})=>{let t=l(),[n,r]=(0,V.useState)(``),i=!!n,a=B(t=>Wp(t,{appId:e.id})),o=mm({type:`default`,trafficType:`http_proxy_protocol`,serviceId:n,internal:!1,ipAllowlist:[],envId:e.environmentId,tokenHeader:void 0,lbAlgorithm:void 0,shared:!1}),s=I(o);return(0,V.useEffect)(()=>{t(_f({id:e.id}))},[e.id]),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(y4,{app:e,selectedId:n,onSelect:e=>r(e),disabled:e=>!!a.find(t=>t.serviceId===e.id)}),(0,U.jsx)(K,{onClick:()=>{t(o)},isLoading:s.isLoading,disabled:!i,className:`mt-4`,children:`Create Endpoint`}),(0,U.jsx)(TA,{...s,className:`mt-2`})]})},EXe=({vhost:e})=>{let t=B(t=>Eu(t,{id:e.serviceId})),n=bu(t);return(0,U.jsxs)(`div`,{children:[(0,U.jsxs)(`div`,{className:`gap-1 py-2`,children:[(0,U.jsx)(`p`,{className:`font-semibold`,children:Am(e)}),(0,U.jsxs)(`p`,{className:`text-gray-500`,children:[`Service: `,t.processType]}),(0,U.jsxs)(`p`,{className:`text-gray-500`,children:[`Command: `,(0,U.jsx)(YU,{children:n})]})]}),(0,U.jsx)(`hr`,{className:`my-2`})]})},DXe=({envId:e,configId:t})=>
231{u(ug({id:t}));let n=B(e=>sg(e,{id:t}));u(xp({envId:e,withSensitiveExtras:!0}));let r=B(t=>gp(t,{envId:e})),i=Object.values(n.env);return r.filter(e=>{let t=i.includes(j9(e.handle)),n=i.includes(e.connectionUrl);return t||n})},OXe=()=>{let{appId:e=``}=F(),t=N(),n=$a(e);return(0,U.jsxs)(r5,{children:[(0,U.jsxs)(`div`,{className:`text-center mt-10`,children:[(0,U.jsx)(`h1`,{className:G.type.h1,children:`Add your SSH Key`}),(0,U.jsx)(`p`,{className:`my-4 text-gray-600`,children:`Add your SSH key to push code into Aptible.`})]}),(0,U.jsx)(I6,{cur:2,prev:qa(),next:n}),(0,U.jsx)(Z,{className:`w-full max-w-[700px] mx-auto`,children:(0,U.jsx)(L6,{onSuccess:()=>t(n)})}),(0,U.jsx)(`div`,{className:`hero-bg absolute w-full h-full top-0 left-0 z-[-999]`})]})},I9={label:`Custom Code`,value:`none`,query:{},repo:``},kXe=[I9,{label:`Ruby on Rails v7 Template`,value:`[email protected]:aptible/template-rails.git`,repo:`template-rails`,query:{dbs:[`database_url:postgresql:14`,`redis_url:redis:3.0`],envs:[`production_secret_key`]}},{label:`Django v4 Template`,value:`[email protected]:aptible/template-django.git`,repo:`template-django`,query:{dbs:[`database_url:postgresql:14`],envs:[`secret_key`]}},{label:`Express v4 Template`,value:`[email protected]:aptible/template-express.git`,repo:`template-express`,query:{dbs:[`database_url:postgresql:14`]}},{label:`Laravel v10 Template`,value:`[email protected]:aptible/template-laravel.git`,repo:`template-laravel`,query:{dbs:[`database_url:postgresql:14`],envs:[`db_connection:aptible`,`app_key`]}},{label:`Deploy Demo App Template`,value:`[email protected]:aptible/deploy-demo-app.git`,repo:`deploy-demo-app`,query:{dbs:[`database_url:postgresql:14`,`redis_url:redis:3.0`]}}],AXe=()=>{let{appId:e=``}=F();zse(to(e));let[t,n]=(0,V.useState)(I9);u(_f({id:e}));let r=B(t=>rf(t,{id:e})),i=``;if(t){let e={};Object.keys(t.query).forEach(n=>{e[n]=t.query[n].join(`,`)}),i=new URLSearchParams(e).toString()}return(0,U.jsxs)(r5,{children:[(0,U.jsxs)(`div`,{className:`text-center mt-10`,children:[(0,U.jsx)(`h1`,{className:G.type.h1,children:`Add Aptible's git remote to your Repo`}),(0,U.jsx)(`p`,{className:`my-4 text-gray-600`,children:`We require you include a Dockerfile`})]}),(0,U.jsx)(I6,{cur:2,prev:to(e),next:no(e,i)}),(0,U.jsxs)(Z,{className:`w-full max-w-[700px] mx-auto`,children:[(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`h4`,{className:G.type.h4,children:`Deploy Custom Code or Starter Template`}),(0,U.jsx)(`div`,{className:`text-black-500 mb-1 mr-2`,children:`Launch your existing app with Custom Code, or learn how Aptible works with a Starter Template.`}),(0,U.jsx)(`div`,{className:`my-2`,children:(0,U.jsx)(XA,{options:kXe,value:t?.value,onSelect:e=>{n(e)},className:`w-full`})}),t&&t.value!==`none`?(0,U.jsxs)(`div`,{children:[`What's inside this template?`,` `,(0,U.jsx)(CA,{href:`https://github.com/aptible/${t.repo}`,variant:`info`,children:`View Source Code on GitHub`})]}):null]}),t&&t.value!==`none`?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`div`,{className:`mt-4`,children:[(0,U.jsx)(`h4`,{className:G.type.h4,children:`Clone Template`}),(0,U.jsx)(w4,{segments:x4([`git clone`,t.value]),allowCopy:!0})]}),(0,U.jsxs)(`div`,{className:`mt-4`,children:[(0,U.jsx)(`h4`,{className:G.type.h4,children:`Select Template`}),(0,U.jsx)(w4,{segments:x4([`cd`,t.repo]),allowCopy:!0})]})]}):null,(0,U.jsxs)(`div`,{className:`mt-4`,children:[(0,U.jsx)(`h4`,{className:G.type.h4,children:`Add Aptible's Git Server`}),(0,U.jsx)(w4,{segments:x4([`git remote add aptible`,r.gitRepo]),allowCopy:!0})]}),t&&t.value===`none`?(0,U.jsxs)(`div`,{className:`mt-4`,children:[(0,U.jsx)(`h4`,{className:G.type.h4,children:`Configure database migrations (Optional)`}),(0,U.jsxs)(`div`,{className:`text-black-500 mr-2`,children:[`1. Add a `,(0,U.jsx)(YU,{children:`.aptible.yml`}),` file in the root directory of your app (see example below).`]}),(0,U.jsx)(`div`,{className:`text-black-500 mb-1 mr-2`,children:`2. Commit your code changes.`}),(0,U.jsx)(C4,{segments:x4([`before_release: 232`,` - python3 manage.py migrate`]),allowCopy:!0})]}):null,(0,U.jsx)(`hr`,{className:`my-4`}),(0,U.jsx)(dA,{to:no(r.id,i),children:`Configure`})]}),(0,U.jsx)(`div`,{className:`hero-bg absolute w-full h-full top-0 left-0 z-[-999]`})]})},jXe=()=>{let e=N(),{appId:t=``}=F();u(_f({id:t}));let n=B(e=>rf(e,{id:t})),r=B(e=>fd(e,{appId:t}));return(0,V.useEffect)(()=>{r&&r.status===`succeeded`&&e(no(t))},[r]),(0,U.jsxs)(r5,{children:[(0,U.jsxs)(`div`,{className:`text-center mt-10`,children:[(0,U.jsx)(`h1`,{className:G.type.h1,children:`Add our GitHub Action to your Repo`}),(0,U.jsx)(`p`,{className:`my-4 text-gray-600`,children:`Deploy your app with our custom GitHub Workflow.`})]}),(0,U.jsx)(I6,{cur:2,prev:Qa(t),next:no(t)}),(0,U.jsxs)(Z,{className:`w-full max-w-[700px] mx-auto`,children:[(0,U.jsx)(m8,{app:n}),(0,U.jsxs)(`div`,{className:`mt-4`,children:[(0,U.jsx)(`hr`,{}),(0,U.jsx)(dA,{to:no(n.id),className:`mt-4`,children:`Configure App`})]})]}),(0,U.jsx)(`div`,{className:`hero-bg absolute w-full h-full top-0 left-0 z-[-999]`})]})},MXe=()=>{let e=l(),t=N(),{appId:n=``}=F(),[r]=Ee(),i=r.get(`envs`)||``,a=B(e=>L.loaders.selectById(e,{id:`${M9}`}));u(_f({id:n}));let o=B(e=>rf(e,{id:n}
232)),{gitRef:s,codeScan:c}=YS(n),d=u(xp({envId:o.environmentId,withSensitiveExtras:!0})),f=B(e=>gp(e,{envId:o.environmentId})),p=u(vh()),m=B(_h);u(ug({id:o.currentConfigurationId,withSensitiveExtras:!0}));let h=B(e=>sg(e,{id:o.currentConfigurationId})),g=tg(h.env),{envs:_,setEnvs:v,envList:y,validate:b,errors:x}=nC(g),S=rg(y);(0,V.useEffect)(()=>{v(g)},[g]),(0,V.useEffect)(()=>{i&&v(i.split(`,`).map(e=>{let[t,n=``]=e.split(`:`);return`${t.toLocaleUpperCase()}=${n}`}).join(` 233`))},[i]);let[C,w]=(0,V.useState)([]),[T,E]=(0,V.useReducer)(q4,{}),[D,O]=(0,V.useReducer)(q4,{});return XS({appId:n,envId:o.environmentId}),ZS({envId:o.environmentId,appId:n}),(0,U.jsxs)(r5,{className:`mb-8`,children:[(0,U.jsxs)(`div`,{className:`text-center mt-10`,children:[(0,U.jsx)(`h1`,{className:G.type.h1,children:`Configure your App`}),(0,U.jsx)(`p`,{className:`my-4 text-gray-600`,children:`Add required Databases and review settings to finish.`})]}),(0,U.jsx)(I6,{cur:3,prev:Qa(n),next:ro(n)}),(0,U.jsxs)(Z,{className:`w-full max-w-[700px] mx-auto`,children:[(0,U.jsx)(`div`,{children:c.isInitialLoading?null:(0,U.jsx)(zXe,{codeScan:c.data})}),(0,U.jsxs)(`div`,{className:`mb-2`,children:[(0,U.jsx)(`div`,{className:`text-md font-semibold text-gray-900`,children:`Databases`}),(0,U.jsx)(`div`,{className:`text-black-500`,children:`Aptible automatically handles configuring and managing databases for Elasticsearch, InfluxDB, MySQL, PostgreSQL, Redis and more.`})]}),(0,U.jsx)(`form`,{onSubmit:r=>{r.preventDefault();let i=Object.values(T).sort((e,t)=>e.id.localeCompare(t.id)),a=Object.values(D).sort((e,t)=>e.id.localeCompare(t.id)).filter(e=>e.dbId!==``),c=!1,l=new Set,u=NXe(i,l),d=PXe(a,l),f=[...u,...d];f.length>0?(c=!0,w(f)):w([]),b()||(c=!0),!c&&(a.forEach(e=>{y.push({key:e.env,value:e.connectionUrl,meta:{}})}),e(M9({appId:n,envId:o.environmentId,dbs:i,envs:y,curEnvs:h.env,cmds:[],gitRef:s})),t(ro(n)))},children:(0,U.jsxs)(W,{children:[y.some(e=>e.key.includes(`_TMP`))?(0,U.jsx)(q,{variant:`warning`,children:`We have detected existing databases inside your App's config. Be sure you didn't already create the databases you require.`}):null,(0,U.jsx)(J,{label:``,htmlFor:`databases`,feedbackVariant:C?`danger`:`info`,feedbackMessage:C.map(e=>e.message).join(`. `),children:(0,U.jsxs)(W,{children:[(0,U.jsx)(xE,{text:`Loading databases...`,isLoading:d.isInitialLoading}),f.length>0?(0,U.jsx)(LXe,{envId:o.environmentId,dbMap:D,dbDispatch:O,isLoading:d.isInitialLoading}):null,(0,U.jsx)(gLe,{dbImages:m,namePrefix:o.handle,dbMap:T,dbDispatch:E,isLoading:p.isInitialLoading,showEnv:!0})]})}),(0,U.jsx)(`hr`,{}),(0,U.jsx)(p8,{envs:_,setEnvs:v,errors:x,previewEnv:S}),(0,U.jsx)(`hr`,{}),c.data?.procfile_present?(0,U.jsx)(`div`,{children:(0,U.jsxs)(q,{variant:`info`,children:[(0,U.jsx)(`span`,{children:`Your code has a `}),(0,U.jsx)(CA,{href:`https://aptible.com/docs/procfiles`,variant:`info`,children:`Procfile`}),(0,U.jsx)(`span`,{children:`, which will be used to determine your app's services and commands.`})]})}):null,(0,U.jsx)(`hr`,{}),(0,U.jsx)(K,{type:`submit`,className:`w-full`,isLoading:a.isLoading,children:`Save & Deploy`})]})})]}),(0,U.jsx)(`div`,{className:`hero-bg absolute w-full h-full top-0 left-0 z-[-999]`})]})},NXe=(e,t)=>{let n=[];return e.forEach(e=>{let r=mLe(e);r&&n.push(r),e.imgId===``&&n.push({item:e,message:`Must pick a database or delete the selector from the menu`}),t.has(e.env)?n.push({item:e,message:`${e.env} has already been used, each database env var must be unique`}):t.add(e.env)}),n},PXe=(e,t)=>{let n=[];return e.forEach(e=>{t.has(e.env)?n.push({item:e,message:`${e.env} has already been used, each database env var must be unique`}):t.add(e.env)}),n},FXe=N4(),IXe=({envId:e,db:t,propChange:n,onDelete:r})=>{let i=B(t=>gp(t,{envId:e})),a=e=>{let r=e.value,a=i.find(e=>e.id===r);n({...t,dbId:r,connectionUrl:a?a.connectionUrl:``})},o=(0,U.jsx)(`div`,{className:`flex justify-between gap-3 mt-4`,children:(0,U.jsx)(Y4,{value:t.env,onChange:e=>n({...t,env:e})})});return(0,U.jsxs)(`div`,{className:`mb-4`,children:[(0,U.jsx)(`h4`,{className:`${G.type.h4}`,children:`Existing Database`}),(0,U.jsx)(`p`,{className:`text-black-500 mb-2`,children:`Choose an already existing database. The environment variable here will be injected into your app with the connection URL.`}),(0,U.jsxs)(`div`,{className:`flex mb-2`,children:[(0,U.jsx)(X4,{envId:e,ariaLabel:`existing-db`,onSelect:a,value:t.dbId,className:`flex-1 mr-2`}),(0,U.jsx)(K,{variant:`delete`,onClick:r,children:`Delete`})]}),o,(0,U.jsx)(`hr`,{className:`my-4`})]})},LXe=({envId:e,dbMap:t,dbDispatch:n,isLoading:r})=>(0,U.jsxs)(`div`,{children:[Object.values(t).sort((e,t)=>
233e.id.localeCompare(t.id)).map(t=>(0,U.jsx)(IXe,{db:t,envId:e,propChange:e=>n({type:`add`,payload:e}),onDelete:()=>n({type:`rm`,payload:t.id})},t.id)),(0,U.jsxs)(K,{type:`button`,onClick:()=>{n({type:`add`,payload:{id:`${FXe()}`,name:``,env:`DATABASE_URL`,dbId:``,connectionUrl:``}})},variant:`secondary`,isLoading:r,children:[(0,U.jsx)(qE,{className:`mr-2`,color:`#fff`,variant:`sm`}),` Connect Existing Database`]})]}),RXe=({dockerfileData:e})=>{let[t,n]=(0,V.useState)(!1);if(!e)return null;let r=e.split(` 234`).map(e=>({text:`${e}\n`,className:e?.[0]===`#`?`text-white`:`text-lime`}));return(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`div`,{className:`py-4 flex justify-between items-center`,children:(0,U.jsx)(`div`,{className:`flex flex-1`,children:(0,U.jsxs)(`div`,{className:`font-semibold flex items-center cursor-pointer`,onClick:()=>n(!t),onKeyUp:()=>n(!t),children:[t?(0,U.jsx)(IE,{}):(0,U.jsx)(PE,{}),(0,U.jsx)(`p`,{className:`ml-2`,children:`View scanned Dockerfile:`})]})})}),t?(0,U.jsx)(`div`,{className:`pb-4`,children:(0,U.jsx)(C4,{allowCopy:!0,segments:r})}):null]})},zXe=({codeScan:e})=>{if(!e)return null;if(e.dockerfile_present)return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(q,{variant:`info`,children:[(0,U.jsx)(`span`,{children:`Your code has a `}),(0,U.jsx)(CA,{href:`https://www.aptible.com/docs/dockerfile`,variant:`info`,children:`Dockerfile`}),(0,U.jsx)(`span`,{children:` and will be used to build your Aptible app image.`})]}),(0,U.jsx)(RXe,{dockerfileData:e.dockerfile_data})]});let t=(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`span`,{children:`We recommend adding a `}),(0,U.jsx)(CA,{href:`https://www.aptible.com/docs/dockerfile`,variant:`info`,children:`Dockerfile`}),(0,U.jsx)(`span`,{children:` to your repo, commit it, and push your code.`})]});return e.languages_detected?.includes(`python`)?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(q,{variant:`info`,children:(0,U.jsx)(`div`,{className:`ml-2`,children:(0,U.jsxs)(`p`,{children:[`We have detected a Python application that does not contain a`,` `,(0,U.jsx)(CA,{href:`https://www.aptible.com/docs/dockerfile`,variant:`info`,children:`Dockerfile`}),`.`]})})}),(0,U.jsx)(`p`,{className:`my-4`,children:`There will need to be a requirements.txt and/or pyproject.toml in the root directory of your app. We suggest ensuring the following:`}),(0,U.jsxs)(`p`,{className:`my-4`,children:[`If a Django project, we will run:`,` `,(0,U.jsx)(`span`,{className:`bg-gray-200 font-mono`,children:`python manage.py migrate && gunicorn $PROJECT.wsgi`}),`.`]}),(0,U.jsxs)(`p`,{className:`my-4`,children:[`Otherwise, if pyproject.toml is found, we will run`,` `,(0,U.jsx)(`span`,{className:`bg-gray-200 font-mono`,children:`python -m $MODULE_NAME`}),`.`]}),(0,U.jsx)(`p`,{className:`my-4`,children:`Finally, if above two conditions are not met, a main.py must be present in the root directory of your application for us to continue.`}),(0,U.jsx)(`p`,{className:`my-4`,children:(0,U.jsx)(`strong`,{children:t})})]}):(0,U.jsx)(U.Fragment,{children:(0,U.jsx)(q,{variant:`info`,children:(0,U.jsx)(`p`,{children:`Your code is missing a Dockerfile to deploy.`})})})},BXe=()=>(0,U.jsx)(D5,{children:(0,U.jsxs)(dA,{to:Ya(),className:`font-bold`,children:[`Get Started`,(0,U.jsx)(AE,{variant:`sm`,className:`ml-2`})]})}),VXe=()=>{let e=l(),{challengeId:t=``,verificationCode:n=``}=F(),r=N(),i=I(X5),a=()=>{e(X5({challengeId:t,verificationCode:n}))};return T(i,()=>{r(Nr())}),i.isLoading?(0,U.jsx)(`div`,{className:`flex h-screen w-screen items-center justify-center`,children:(0,U.jsx)(xE,{})}):(0,U.jsx)(b5,{children:(0,U.jsxs)(W,{children:[(0,U.jsx)(`h2`,{className:`mt-6 text-center text-3xl font-semibold text-gray-900`,children:`Confirm Aptible 2FA Reset`}),(0,U.jsx)(`div`,{children:`Clicking Reset 2FA below will complete the process and redirect you to the login page.`}),(0,U.jsx)(Z,{children:(0,U.jsxs)(W,{children:[(0,U.jsx)(TA,{...i}),(0,U.jsx)(K,{onClick:a,children:`Reset 2FA`})]})})]})})};function HXe(){let{id:e=``}=F();return(0,U.jsx)(ae,{to:fa(e),replace:!0})}function UXe(){let{id:e=``}=F(),t=B(t=>gl(t,{id:e})),n=B(e=>Ju(e,{id:t.operationId}));return(0,U.jsx)(w3,{op:n})}function WXe(){let{id:e=``}=F(),t=B(t=>gl(t,{id:e}));u(_f({id:t.appId}));let n=B(e=>rf(e,{id:t.appId}));return(0,U.jsx)(Z,{children:(0,U.jsxs)(W,{size:`sm`,children:[(0,U.jsx)(`h3`,{className:G.type.h3,children:`Current Environment Variables`}),(0,U.jsx)(T4,{configId:t.configurationId,envId:n.environmentId})]})})}function GXe({source:e}){let t=e.liveCommits.slice(0,7),n=e.liveCommits.length-t.length;return(0,U.jsxs)(WA,{children:[(0,U.jsx)(Y,{children:(0,U.jsxs)(P,{to:Lo(e.id),className:`flex items-center`,children:[(0,U.jsx)(h8,{source:e,className:`w-[32px] h-[32px] mr-2 align-middle`}),(0,U.jsx)(`p`,{className:`${G.type[`table link`]} leading-8`,children:e.displayName})]})}),(0,U.jsx)(Y,{children:(0,U.jsx)(z2,{text:e.url,children:e.url})}),(0,U.jsxs)(Y,{children:[t.length===0?(0,U.jsx)(`em`,{children:`No commit information`}):null,(0,U.jsxs)(W,{variant:`horizontal`,size:`xs`,className:`items-center min-w-[150px]`,children:[t.map(e=>(0,U.jsx)(aA,{fluid:!0,theme:`light`,placement:`top`,text:(0,U.jsx)($2,{gitRef:e.ref,commitSha:e.sha,commitUrl:e.url}),children:(0,U.jsx)(P,{to:`#`,className:`block bg-gray-300 h-[16px] w-[6px] hover:bg-indigo rounded-md`})},e.sha)),n?(0,U.jsxs)(`p`,{children:[`+`,n]}):null]})]}),(0,U.jsx)(Y,{variant:`center`,className:`center items-center justify-center`,children:(0,U.jsx)(`div`,{className:`text-center`,children:e.apps.length})})]},e.id)}var L9=()=>(0,U.jsx)(`div`,{className:`inline-block`,children:(0,U.jsx)(IE,{variant:`sm`,className:`top-1 -ml-1 relative group-hover:opacity-100 opacity-50`})});function KXe(){let{isLoading:e}=u(hf()),{isLoading:t}=u(Cl()),{isLoading:n}=u(Al()),r=e||t||n,{search:i,onChange:a}=_C(),[o,s]=Ee(),c=o.get(`sortBy`)||`handle`,l=o.get(`asc`)||`asc`,[d,f]=(0,V.useState)(c),[p,m]=(0,V.useState)(l),h=e=>{let t=e,n=p===`asc`?`desc`:`asc`;t===d?m(n):(f(t),m(l)),s(e=>(e.set(`sortBy`,t),e.set(`sortDir`,n),e),{replace:!0})},g=B(e=>yS(e,{search:i,sortBy:d,sortDir:p})),_=rC(g),v=N();return!r&&i===``&&g.length===0&&v(Io()),(0,U.jsx)(r5,{children:(0,U.jsxs)(W,{children:[(0,U.jsxs)(W,{size:`sm`,children:[(0,U.jsxs)(W,{variant:`horizontal`,className:`items-center justify-between`,children:[(0,U.jsx)(NU,{description:`Sources connect apps with code repositories to show you what's deployed where.`,children:`Sources`}),(0,U.jsxs)(pA,{onClick:()=>v(Io()),tooltipProps:{placement:`left`},children:[(0,U.jsx)(qE,{variant:`sm`,className:`mr-2`}),`New Source`]})]}),(0,U.jsxs)(PU,{children:[(0,U.jsxs)(W,{variant:`horizontal`,size:`lg`,className:`items-center justify-between`,children:[(0,U.jsxs)(W,{variant:`horizontal`,size:`lg`,className:`items-center`,children:[(0,U.jsxs)(IU,{children:[_.totalItems,` Apps`]}),(0,U.jsx)(RU,{..._})]}),(0,U.jsx)(YH,{placeholder:`Search...`,search:i,onChange:a})]}),(0,U.jsx)(LU,{isLoading:r})]})]}),(0,U.jsxs)(VA,{children:[(0,U.jsxs)(HA,{children:[(0,U.jsxs)(KA,{className:`curs
234or-pointer hover:text-black group`,onClick:()=>h(`displayName`),children:[`Name `,(0,U.jsx)(L9,{})]}),(0,U.jsx)(KA,{children:`Source URL`}),(0,U.jsxs)(KA,{className:`cursor-pointer hover:text-black group`,onClick:()=>h(`liveCommits`),children:[`Live Commits`,(0,U.jsx)(`div`,{className:`inline-block mx-2`,children:(0,U.jsx)(aA,{placement:`top`,text:`The number of unique commits from this source currently running in your infrastructure.`,children:(0,U.jsx)(tD,{variant:`sm`,className:`top-1 -ml-1 relative group-hover:opacity-100 opacity-50`})})}),(0,U.jsx)(L9,{})]}),(0,U.jsxs)(KA,{variant:`center`,className:`cursor-pointer hover:text-black group`,onClick:()=>h(`apps`),children:[`Apps `,(0,U.jsx)(L9,{})]})]}),(0,U.jsxs)(UA,{children:[_.data.length===0?(0,U.jsx)(GA,{colSpan:3}):null,_.data.map(e=>(0,U.jsx)(GXe,{source:e},e.id))]})]}),_.totalPages>1&&(0,U.jsx)(RU,{..._})]})})}function qXe(){let{id:e=``}=F();return(0,U.jsx)(ae,{to:Ro(e),replace:!0})}function JXe(){let{id:e=``}=F();return(0,U.jsx)(mIe,{sourceId:e})}function YXe(){let{id:e=``}=F();return(0,U.jsx)(uBe,{sourceId:e})}function XXe(){let e=N(),t=B($o),n=l(),[r,i]=(0,V.useState)(``),a=r.trim(),o=I(n_),s=e=>{e.preventDefault(),n(n_({orgId:t,name:a}))};return T(o,()=>{e(hi())}),(0,U.jsxs)(W,{children:[(0,U.jsx)(hU,{crumbs:[{name:`Settings`,to:Br()},{name:`Roles`,to:hi()},{name:`New`,to:null}]}),(0,U.jsx)(TA,{...o}),(0,U.jsx)(Z,{children:(0,U.jsx)(`form`,{onSubmit:s,children:(0,U.jsx)(J,{label:`New Role`,htmlFor:`role-name`,children:(0,U.jsxs)(`div`,{className:`flex gap-2`,children:[(0,U.jsx)(X,{type:`text`,value:r,onChange:e=>i(e.currentTarget.value),placeholder:`Enter role name`,name:`role-name`,id:`role-name`,className:`flex-1`}),(0,U.jsx)(mA,{type:`submit`,disabled:a===``,children:`Save Role`})]})})})})]})}var ZXe={roles:e=>{if(!e.defaultRoleId)return`must select Default Role`}};function QXe({onSuccess:e}){let t=l(),n=B($o),[r,i]=(0,V.useState)(``),[a,o]=QS(ZXe),s={orgId:n,defaultRoleId:r},c=Bc(s),d=I(c),f=e=>{e.preventDefault(),o(s)&&t(c)};T(d,()=>{e()}),u(Zg({orgId:n}));let p=[{value:``,label:`Select a Role`},...B(e=>x_(e,{orgId:n})).map(e=>({value:e.id,label:e.name}))];return(0,U.jsxs)(W,{children:[(0,U.jsx)(R9,{}),(0,U.jsx)(Z,{children:(0,U.jsxs)(W,{children:[(0,U.jsx)(z9,{}),(0,U.jsx)(`form`,{onSubmit:f,children:(0,U.jsxs)(W,{children:[(0,U.jsx)(J,{label:`Default Aptible Role`,htmlFor:`default-role`,feedbackMessage:a.roles,feedbackVariant:a.roles?`danger`:`info`,children:(0,U.jsxs)(`div`,{children:[`Default Aptible Role `,(0,U.jsx)(`br`,{}),(0,U.jsx)(XA,{id:`default-role`,options:p,onSelect:e=>i(e.value),value:r,ariaLabel:`default-role`})]})}),(0,U.jsx)(`div`,{children:(0,U.jsx)(K,{type:`submit`,isLoading:d.isLoading,children:`Save`})})]})})]})})]})}function $Xe({onSuccess:e,scim:t}){let n=l(),r=B($o),i=B(Ko),a=B(Uc),[o,s]=(0,V.useState)(t.default_role_id||``),[c,d]=(0,V.useState)(!1),f=Vc({scimId:t.id,orgId:r,defaultRoleId:o}),p=I(f),m=I(Hc),h=Wc({scimConfigurationId:t.id,userId:i}),g=I(h),_=async()=>{try{await n(h)}catch(e){console.error(`Error generating token:`,e)}},v=()=>{d(!1),n(Gc())},y=e=>{e.preventDefault(),n(f)},b=()=>{n(Hc({id:t.id}))};T(p,()=>{e()}),T(m,()=>{e()}),T(g,()=>{a?d(!0):console.error(`undefined scimToken`)}),u(Zg({orgId:r}));let x=[{value:``,label:`Select a Role`},...B(e=>x_(e,{orgId:r})).map(e=>({value:e.id,label:e.name}))];return(0,U.jsxs)(W,{children:[(0,U.jsx)(R9,{}),(0,U.jsx)(Z,{children:(0,U.jsxs)(W,{children:[(0,U.jsx)(`h3`,{className:G.type.h3,children:`Edit SCIM Configuration`}),(0,U.jsx)(z9,{}),(0,U.jsxs)(`form`,{onSubmit:y,children:[(0,U.jsxs)(W,{children:[(0,U.jsx)(TA,{...p}),(0,U.jsx)(J,{label:`Default Aptible Role`,htmlFor:`default-role-edit`,feedbackMessage:null,feedbackVariant:`info`,children:(0,U.jsx)(`div`,{children:(0,U.jsx)(XA,{id:`default-role-edit`,options:x,onSelect:e=>s(e.value),value:o,ariaLabel:`default-role-edit`})})}),(0,U.jsx)(`div`,{children:(0,U.jsx)(K,{onClick:_,isLoading:g.isLoading,children:`Generate New Token`})}),c&&a!==``?(0,U.jsx)(`div`,{className:`modal`,children:(0,U.jsxs)(`div`,{className:`modal-content`,children:[(0,U.jsx)(`h4`,{className:G.type.h4,children:`Your New SCIM Bearer Token`}),(0,U.jsx)(`p`,{children:`This token is displayed once only. If you lose access to this token you will need to generate a new token.`}),(0,U.jsx)(J,{description:``,htmlFor:`scim-token`,label:``,children:(0,U.jsx)(z2,{text:a,children:(0,U.jsx)(`textarea`,{id:`scim-token`,name:`scimToken`,className:`${G.type.textarea} min-w-[400px] mb-4`,value:a,readOnly:!0})})}),(0,U.jsx)(K,{onClick:v,children:`Hide Token`})]})}):null]}),(0,U.jsx)(`div`,{className:`py-8`,children:(0,U.jsx)(`hr`,{})}),(0,U.jsxs)(W,{variant:`horizontal`,children:[(0,U.jsx)(`div`,{children:(0,U.jsx)(K,{type:`submit`,isLoading:p.isLoading,children:`Save Changes`})}),(0,U.jsx)(TA,{...m}),(0,U.jsx)(`div`,{children:(0,U.jsx)(K,{variant:`delete`,requireConfirm:!0,onClick:b,isLoading:m.isLoading,children:`Remove SCIM Configuration`})})]})]})]})})]})}var R9=()=>(0,U.jsx)(`h2`,{className:G.type.h2,children:`Provisioning (SCIM)`}),z9=()=>(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(q,{children:[`To configure System for Cross-domain Identity Management (SCIM), enter the required information below. Terminology and acronyms vary between providers. Please see our`,` `,(0,U.jsx)(CA,{variant:`default`,href:`https://www.aptible.com/docs/core-concepts/security-compliance/authentication/scim`,children:`documentation`}),`\xA0for more information and guided walkthroughs.`]}),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`h4`,{className:G.type.h4,children:`Supported SCIM Version`}),(0,U.jsx)(YU,{children:`2.0`})]}),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`h4`,{className:G.type.h4,children:`Supported Features`}),(0,U.jsx)(`ol`,{children:(0,U.jsxs)(`ul`,{children:[(0,U.jsx)(`li`,{children:`Create/Update/Delete Users`}),(0,U.jsx)(`li`,{children:`Create/Update/Delete Groups (Aptible Roles)`})]})})]}),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`h4`,{className:G.type.h4,children:`SCIM Connector Base URL`}),(0,U.jsx)(z2,{text:`https://auth.aptible.com/scim_v2`})]}),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`h4`,{className:G.type.h4,children:`Unique Identifier`}),(0,U.jsx)(z2,{text:`email`})]})]}),eZe=()=>{let e=c(zc());if(e.isLoading)return(0,U.jsx)(xE,{});let t=e.data?._embedded?.scim_configurations||[];return t.length>0?(0,U.jsx)(W,{children:(0,U.jsx)($Xe,{scim:t[0],onSuccess:()=>e.trigger()})}):(0,U.jsx)(QXe,{onSuccess:()=>e.trigger()})};function tZe(e){switch(e){case`aws_rds_db_instance`:return`AWS RDS Database`;default:return`Unknown`}}var nZe=()=>{let e=l(),{id:t=``}=F(),n=B(e=>l_(e,{id:t})),{hasActiveSync:r,isTabActive:i}=yC([n.id]),{isLoading:a}=u(yb()),o=B(e=>Cb(e,{accountId:n.id})),s=(0,V.useCallback)(()=>
234{e(yb())},[e]);return(0,V.useEffect)(()=>{i&&s()},[i,s]),vC(()=>{i&&s()},i&&n.id?r?1e3:1e4:null),(0,U.jsx)(`div`,{className:`py-2`,children:(0,U.jsx)(`div`,{className:`mb-4`,children:(0,U.jsxs)(BA,{children:[(0,U.jsxs)(W,{variant:`horizontal`,size:`sm`,className:`items-center`,children:[(0,U.jsx)(LU,{isLoading:a}),(0,U.jsx)(PU,{children:(0,U.jsx)(W,{variant:`horizontal`,size:`lg`,className:`items-center my-2`,children:(0,U.jsxs)(IU,{children:[o.length||0,` Resources`]})})})]}),(0,U.jsxs)(VA,{children:[(0,U.jsxs)(HA,{children:[(0,U.jsx)(KA,{children:`Name`}),(0,U.jsx)(KA,{children:`ARN`}),(0,U.jsx)(KA,{children:`Region`}),(0,U.jsx)(KA,{children:`Last Synced`}),(0,U.jsx)(KA,{children:`Sync Status`})]}),(0,U.jsx)(UA,{children:o.length===0?(0,U.jsx)(GA,{colSpan:5}):o.map(e=>(0,U.jsxs)(WA,{children:[(0,U.jsx)(Y,{children:(0,U.jsx)(`div`,{className:`flex`,children:(0,U.jsxs)(`div`,{className:`flex`,children:[(0,U.jsx)(`img`,{src:`/resource-types/logo-database.png`,className:`w-[32px] h-[32px] mr-2 mt-1 align-middle`,"aria-label":`AWS Resource`}),(0,U.jsxs)(`p`,{className:`flex flex-col`,children:[(0,U.jsx)(`span`,{className:G.type[`table link`],children:(0,U.jsx)(P,{to:bo(e.id),className:G.type[`table link`],children:e.resourceName||e.resourceId})}),(0,U.jsx)(`span`,{className:G.type[`normal lighter`],children:tZe(e.resourceType)})]})]})})}),(0,U.jsx)(Y,{className:`truncate max-w-[320px]`,children:e.resourceArn}),(0,U.jsx)(Y,{children:e.region}),(0,U.jsx)(Y,{children:e.lastSyncedAt?Of(e.lastSyncedAt):(0,U.jsx)(`em`,{children:`Not yet synced`})}),(0,U.jsx)(Y,{children:e.syncStatus.charAt(0).toUpperCase()+e.syncStatus.slice(1)})]},e.id))})]})]})})})},rZe=({account:e})=>{let t=l(),[n,r]=(0,V.useState)(``),i=f_({id:e.id,accountName:n}),a=I(i);return(0,V.useEffect)(()=>{r(e.accountName)},[e.id]),(0,U.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),t(i)},className:`flex flex-col gap-4`,children:[(0,U.jsx)(J,{label:`Account Name`,htmlFor:`input-name`,children:(0,U.jsx)(X,{name:`account-name`,type:`text`,value:n,onChange:e=>r(e.currentTarget.value),autoComplete:`name`,id:`input-name`})}),(0,U.jsx)(TA,{...a}),(0,U.jsxs)(W,{variant:`horizontal`,size:`sm`,children:[(0,U.jsx)(K,{className:`w-40 semibold`,type:`submit`,disabled:n===e.accountName,isLoading:a.isLoading,children:`Save Changes`}),(0,U.jsx)(K,{variant:`white`,onClick:()=>r(e.accountName),children:`Cancel`})]})]})},iZe=()=>{let{id:e=``}=F();u(a_({id:e}));let t=B(t=>l_(t,{id:e}));return(0,U.jsx)(pU,{children:(0,U.jsx)(Z,{children:(0,U.jsxs)(W,{children:[(0,U.jsx)(`h3`,{className:`text-lg text-gray-500`,children:`Account Settings`}),(0,U.jsx)(rZe,{account:t})]})})})},aZe=`#00633F`,B9=`#98256A`,oZe=e=>`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,`0`)}-${String(e.getDate()).padStart(2,`0`)}`,sZe=e=>`${new Intl.DateTimeFormat(`en-US`,{month:`long`,day:`numeric`,year:`numeric`}).format(e)}, ${e.toLocaleTimeString(`en-US`,{hour:`numeric`,minute:`2-digit`,hour12:!0})}`,cZe=e=>[...new Set(e.map(e=>e.region))].filter(Boolean).sort().join(`, `)||`â`,V9=(e,t,n)=>`${e} ${e===1?t:n}`,lZe=e=>{let t=[];return e.dedicated>0&&t.push(V9(e.dedicated,`Dedicated Stack`,`Dedicated Stacks`)),e.shared>0&&t.push(V9(e.shared,`Shared Stack`,`Shared Stacks`)),e.selfHosted>0&&t.push(V9(e.selfHosted,`Self-Hosted Stack`,`Self-Hosted Stacks`)),t.join(`, `)||`0 Stacks`},uZe=(e,t)=>{let n=e.filter(e=>t.has(e.id));return{stacksInScope:n,dedicated:n.filter(e=>Gl(e)===`dedicated`),shared:n.filter(e=>Gl(e)===`shared`),selfHosted:n.filter(e=>Gl(e)===`self_hosted`)}},dZe=(e,t,n)=>{let r=e.length,i=t.length,a=n.length;return r>0&&i===0&&a===0?e:i>0&&r===0&&a===0?t:a>0&&r===0&&i===0?n:[...e,...t,...n]},fZe=(e,t,n)=>{let r=e>0&&t===0&&n===0,i=t>0&&e===0&&n===0,a=n>0&&e===0&&t===0;if(r)return`Dedicated infrastructure stacks providing tenant isolation.`;if(i)return`Scoped environments run on shared Aptible infrastructure (multi-tenant).`;
234if(a)return`Self-hosted stacks running in your AWS account.`;let o=[];return e>0&&o.push(`Dedicated stacks provide tenant isolation.`),t>0&&o.push(`Shared stacks use multi-tenant Aptible infrastructure.`),n>0&&o.push(`Self-hosted stacks run in your AWS account.`),o.join(` `)},pZe=(e,t)=>e.length>0||t.length>0&&!t.includes(`all`),mZe=({categoryParams:e,frameworkParams:t,frameworkMetrics:n})=>{let r=[];e.length>0&&r.push(`Categories: ${e.join(`, `)}`);let i=t.filter(e=>e!==`all`);if(i.length>0){let e=i.map(e=>n[e]?.name??e);r.push(`Frameworks: ${e.join(`, `)}`)}return r},hZe=(e,t)=>{let n=t.length>0&&!t.includes(`all`),r=n?t:[...Wx],i=[];for(let t of r){let r=e[t];r&&(n&&r.controlCount===0||i.push({framework:r.name,percentage:r.progressPercentage}))}return i},gZe=(e,t)=>{let n=e||`Resource`;return t===1?n:`${n}s`},_Ze={COMPLETE:`Satisfied`,PARTIAL:`Partially Satisfied`,NOT_STARTED:`Not Satisfied`,NO_SCOPE:`Not In-Scope`},vZe={COMPLETE:`report-status-badge bg-lime-100 border border-lime-300 text-forest`,NOT_STARTED:`report-status-badge bg-red-100 border border-red-300 text-red`,PARTIAL:`report-status-badge bg-indigo-100 border border-indigo-300 text-indigo`,NO_SCOPE:`report-status-badge bg-gray-100 border border-gray-300 text-gray-600`},yZe=()=>(0,U.jsx)(`style`,{children:` 235 script#pylon-widget, 236 iframe[src*="widget.usepylon.com/widget/"], 237 iframe[src*="usepylon.com/widget/"], 238 [id^="pylon-"], 239 [class^="pylon-"], 240 [class*=" pylon-"] { 241 display: none !important; 242 visibility: hidden !important; 243 } 244 245 .print-footer { 246 display: none; 247 } 248 249 .controls-report-print-source { 250 position: fixed; 251 top: 0; 252 left: -10000px; 253 width: 8.5in; 254 height: 0; 255 overflow: hidden; 256 pointer-events: none; 257 visibility: hidden; 258 } 259 260 .auto-print-mode .print-container { 261 visibility: hidden; 262 position: absolute; 263 left: -9999px; 264 } 265 @media print { 266 body.controls-report-printing #app { 267 display: none !important; 268 } 269 body.controls-report-printing .controls-report-print-source { 270 position: static !important; 271 width: 100% !important; 272 height: auto !important; 273 overflow: visible !important; 274 pointer-events: auto !important; 275 visibility: visible !important; 276 } 277 body.controls-report-printing .controls-report-print-source * { 278 visibility: visible !important; 279 } 280 .auto-print-mode .print-container { 281 visibility: visible !important; 282 position: static !important; 283 left: auto !important; 284 } 285 .auto-print-message { 286 display: none !important; 287 } 288 } 289 290 @media print { 291 /* Zero page margins suppress browser print headers/footers (URL, page #, title). */ 292 @page { 293 size: letter; 294 margin: 0; 295 } 296 297 .print-report-root, 298 .print-container { 299 print-color-adjust: exact; 300 -webkit-print-color-adjust: exact; 301 } 302 303 html, 304 body, 305 .print-report-root { 306 height: auto !important; 307 min-height: auto !important; 308 overflow: visible !important; 309 } 310 311 .print-container { 312 width: 100% !important; 313 max-width: none !important; 314 min-height: auto !important; 315 overflow: visible !important; 316 /* Bottom padding reserves space for the fixed print footer on every page. */ 317 padding: 0.5in 0.5in 1.15in 0.5in !important; 318 } 319 320 .cover-page { 321 min-height: 10in; 322 padding-top: 0.25in !important; 323 margin-top: 0 !important; 324 } 325 .cover-generated-box { 326 page-break-inside: avoid; 327 break-inside: avoid; 328 print-color-adjust: exact; 329 -webkit-print-color-adjust: exact; 330 } 331 .intro-page, 332 .infra-compliance-page, 333 .controls-section { 334 padding-top: 0.5in !important; 335 margin-top: 0 !important; 336 } 337 338 nav, button, .no-print { 339 display: none !important; 340 } 341 342 .intro-page { 343 page-break-after: always; 344 break-after: page; 345 }
346 .infra-compliance-page { 347 page-break-before: always; 348 break-before: page; 349 } 350 .compliance-overview-section { 351 page-break-inside: avoid; 352 break-inside: avoid; 353 max-width: 100%; 354 overflow: visible; 355 } 356 .compliance-overview-section .compliance-cards-grid { 357 grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); 358 gap: 0.5rem; 359 } 360 .controls-section { 361 page-break-before: always; 362 break-before: page; 363 margin-top: 0; 364 } 365 /* 366 * Keep each control box intact across page breaks. Some print engines 367 * ignore break-inside on flex/grid descendants, so we apply the rule 368 * to the item, both inner sections, and any direct child wrappers. 369 * orphans/widows give the engine room to push the whole block to the 370 * next page when it won't fit on the current one. 371 */ 372 /* 373 * One gap between controls: padding-top on siblings only (not top+bottom 374 * on every wrap, which doubled spacing mid-page). Padding survives page 375 * breaks when a box is pushed to the next sheet; margin-top would collapse. 376 */ 377 .controls-section > .border-b { 378 margin-bottom: 0.4in !important; 379 } 380 .control-item-wrap { 381 display: block; 382 margin-bottom: 0 !important; 383 page-break-inside: avoid !important; 384 break-inside: avoid-page !important; 385 -webkit-column-break-inside: avoid !important; 386 orphans: 4; 387 widows: 4; 388 } 389 .control-item-wrap + .control-item-wrap { 390 padding-top: 0.4in; 391 } 392 .control-item-wrap .control-item { 393 margin: 0 !important; 394 padding: 0.2in 0.25in !important; 395 } 396 .control-item *, 397 .control-item-header, 398 .control-item-body { 399 page-break-inside: avoid !important; 400 break-inside: avoid-page !important; 401 } 402 403 * { 404 box-shadow: none !important; 405 } 406 407 * { 408 color: black !important; 409 } 410 .text-forest { color: ${aZe} !important; } 411 .text-red { color: #AD1A1A !important; } 412 .text-amber-700 { color: #b45309 !important; } 413 .text-gray-600 { color: #4b5563 !important; } 414 .text-indigo { color: #4f46e5 !important; } 415 416 .report-status-badge { 417 print-color-adjust: exact; 418 -webkit-print-color-adjust: exact; 419 } 420 421 div { 422 background-color: white !important; 423 } 424 425 .print-footer { 426 position: fixed; 427 bottom: 0; 428 left: 0; 429 right: 0; 430 padding: 0.08in 0.5in; 431 z-index: 1; 432 display: flex !important; 433 justify-content: space-between; 434 align-items: center; 435 margin: 0 !important; 436 font-size: 8pt; 437 color: black !important; 438 box-sizing: border-box; 439 } 440 .print-footer a { 441 color: ${B9} !important; 442 text-decoration: underline; 443 min-width: 0; 444 } 445 .text-plum { 446 color: ${B9} !important; 447 } 448 } 449 `}),bZe=({status:e})=>{let t=_Ze[e]||`Unknown`,n=vZe[e]??`report-status-badge bg-gray-100 border border-gray-300 text-gray-600`;return(0,U.jsx)(`span`,{className:`inline-block rounded-lg px-2 py-0.5 text-sm font-medium ${n}`,children:t})},xZe=({control:e})=>{let{globalControl:t,cumulativeMetrics:n}=e,r=t.frameworks.map(e=>e.displayName).join(`, `)||`All Frameworks`,i=t.callToAction;return(0,U.jsx)(`div`,{className:`control-item-wrap mb-4`,children:(0,U.jsxs)(`div`,{className:`control-item border border-gray-300 rounded-lg p-4 bg-white`,children:[(0,U.jsxs)(`div`,{className:`control-item-header mb-2`,children:[(0,U.jsxs)(`div`,{className:`flex justify-between items-baseline gap-4`,children:[(0,U.jsx)(`h4`,{className:G.type.h4,children:t.name}),(0,U.jsx)(bZe,{status:n.status})]}),(0,U.jsxs)(`div`,{className:`${G.type[`small lighter`]} mt-1`,children:[(0,U.jsx)(`span`,{children:t.area}),(0,U.jsx)(`span`,{className:`mx-2`,children:`â¢`}),(0,U.jsx)(`span`,{children:r})]})]}),(0,U.jsxs)(`div`,{className:`control-item-body mt-2 text-sm`,children:[(0,U.jsx)(`p`,{className:G.type[`small normal darker`],children:t.description}),n.totalInScope>0||i?(0,U.jsxs)(`div`,{className:`mt-2 flex items-center justify-between gap-3 text-xs ${G.type[`small lighter`]}`,children:[(0,U.jsx)(`div`,{className:`min-w-0`,children:n.totalInScope>0?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`span`,{children:[n.totalInScope,` `,gZe(n.resourceType,n.totalInScope),` `,`in-scope`]}),(0,U.jsx)(`span`,{className:`mx-2`,children:`â¢`}),(0,U.jsxs)(`span`,{children:[`Satisfied: `,n.totalCompliant]}),n.totalInScope-n.totalCompliant-n.totalIgnored>0&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`span`,{className:`mx-2`,children:`â¢`}),(0,U.jsxs)(`span`,{children:[`Not Satisfied:`,` `,n.totalInScope-n.totalCompliant-n.totalIgnored]})]}),n.totalIgnored>0&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`span`,{className:`mx-2`,children:`â¢`}),(0,U.jsxs)(`span`,{children:[`Ignored: `,n.totalIgnored]})]})]}):(0,U.jsx)(`span`,{children:`No resources in scope`})}),i?(0,U.jsx)(`a`,{href:i,target:`_blank`,rel:`noopener noreferrer`,className:`flex-shrink-0 text-gray-900 underline`,children:`View Docs`}):null]}):null]})]})})},H9=({scopeIds:e,categoryParams:t,frameworkParams:n,onReady:r,onLoadingStateChange:i})=>{let a=B($o),o=B(e=>Zo(e,{id:a})),s=B(e=>Jx(e,{orgId:a})),c=B(e=>Yx(e,{orgId:a})),l=s.all,d=(0,V.useMemo)(()=>[...e.length>0?e.filter(e=>l.some(t=>t.id===e)):c.length>0?c:[...new Set(l.map(e=>e.id))]].sort().slice(0,5),[e,l,c]),f=(0,V.useMemo)(()=>l.filter(e=>d.includes(e.id)),[l,d]),p=(0,V.useMemo)(()=>new Set(f.map(e=>e.id)),[f]),m=(0,V.useMemo)(()=>new Set(f.map(e=>e.stackId)),[f]),h=(0,V.useMemo)(()=>[...m].sort(),[m]),g=B(e=>L.loaders.selectById(e,{id:`${BS}`}).isSuccess===!0);
449u(Qx()),u($x({orgId:a,accountIds:d})),u(Lg({stackIds:h}));let _=I(Qx),v=I($x),y=I(Lg({stackIds:h})),b=(0,V.useMemo)(()=>({orgId:a,scopeIds:d}),[a,d]),x=B(e=>Zx(e,b)),S=t.join(`,`),C=n.join(`,`),w=(0,V.useMemo)(()=>{let e=x.controls;return t.length>0&&(e=e.filter(e=>t.includes(e.globalControl.area))),n.length>0&&!n.includes(`all`)&&(e=e.filter(e=>e.globalControl.frameworkHandles.some(e=>n.includes(e)))),kJe(e,`name`,`asc`,`asc`)},[x.controls,S,C]),[T,E]=(0,V.useState)(`pending`),D=!g||_.isLoading||v.isLoading||y.isLoading,O=!D&&(T===`loaded`||T===`error`);(0,V.useEffect)(()=>{O&&r&&r()},[O,r]),(0,V.useEffect)(()=>{i&&i({isLoading:D,isFullyLoaded:O})},[D,O,i]);let k=(0,V.useMemo)(()=>{let e=new Date;return{at:sZe(e),date:oZe(e)}},[]),A=f.map(e=>e.handle).join(`, `)||`All Environments`,j=(0,V.useMemo)(()=>mZe({categoryParams:t,frameworkParams:n,frameworkMetrics:x.frameworks}),[t,n,x.frameworks]),M=(0,V.useMemo)(()=>{if(n.length>0&&!n.includes(`all`))return n},[n]),ee=(0,V.useMemo)(()=>Gx(w,{metricHandles:M}),[w,M]),te=(0,V.useMemo)(()=>hZe(ee,n),[ee,n]),ne=j.length>0?` ${j.join(` `)}`:``,re=B(Vl),ie=B(mp),ae=(0,V.useMemo)(()=>uZe(re,m),[re,m]),oe=(0,V.useMemo)(()=>{let e=ie.filter(e=>p.has(e.environmentId));return[...new Set(e.map(e=>sp(e.type)))].filter(Boolean).sort().join(`, `)||`â`},[ie,p]),se=B(uf),N=B(Bp),ce=B(Du),le=B(Zm),ue=B(Ch),de=B(kg),fe=B(Ng),pe=(0,V.useMemo)(()=>{let e=se.filter(e=>p.has(e.environmentId)),t=ie.filter(e=>p.has(e.environmentId)),n=N.filter(e=>{let t=ku(ce,{id:e.serviceId});return t&&p.has(t.environmentId)}),r=le.filter(e=>p.has(e.environmentId)&&e.drainType?.toLowerCase()!==`tail`),i=ue.filter(e=>p.has(e.environmentId)),a=de.filter(e=>m.has(e.stackId)),o=fe.filter(e=>m.has(e.stackId));return{applicationLayer:e.length,databaseLayer:t.length,loadBalancers:n.length,vpcPeers:a.length,vpnTunnels:o.length,logDrains:r.length,metricDrains:i.length}},[se,ie,p,m,N,ce,le,ue,de,fe]),me=(0,V.useMemo)(()=>{let e=le.filter(e=>p.has(e.environmentId));return[...new Set(e.map(e=>e.drainType))].filter(Boolean).filter(e=>e.toLowerCase()!==`tail`).sort().map(ul).join(`, `)||`â`},[le,p]),he=(0,V.useMemo)(()=>{let e=ue.filter(e=>p.has(e.environmentId));return[...new Set(e.map(e=>e.drainType))].filter(Boolean).sort().map(ul).join(`, `)||`â`},[ue,p]),ge=(0,V.useMemo)(()=>{let{dedicated:e,shared:t,selfHosted:n}=ae,r=e.length,i=t.length,a=n.length,o=dZe(e,t,n);return{countDisplay:lZe({dedicated:r,shared:i,selfHosted:a}),descriptionText:fZe(r,i,a),regions:cZe(o)}},[ae]),_e=(0,V.useMemo)(()=>[{label:`Isolated VPCs`,countDisplay:ge.countDisplay,description:(0,U.jsxs)(U.Fragment,{children:[ge.descriptionText,` Hosted in`,` `,(0,U.jsx)(`strong`,{children:ge.regions}),`.`]})},{label:`Application Layer`,countDisplay:`${pe.applicationLayer} Apps`,description:(0,U.jsxs)(U.Fragment,{children:[`Applications deployed as `,(0,U.jsx)(`strong`,{children:`Docker containers`}),` and managed by the Aptible platform.`]})},{label:`Database Layer`,countDisplay:`${pe.databaseLayer} Managed Databases`,description:(0,U.jsxs)(U.Fragment,{children:[`Managed databases including `,(0,U.jsx)(`strong`,{children:oe}),`, with encryption and automated backups enabled by default.`]})},{label:`Load Balancers`,countDisplay:`${pe.loadBalancers} Endpoints`,description:(0,U.jsxs)(U.Fragment,{children:[`Access to each stack is controlled by`,` `,(0,U.jsx)(`strong`,{children:`encrypted endpoints`}),`. TLS endpoints provide load balancing and support IP filtering for inbound traffic.`]})},{label:`Network Connections`,countDisplay:y.isSuccess?`${pe.vpnTunnels} VPNs, ${pe.vpcPeers} VPC Peering Connections`:`â`,description:(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`strong`,{children:`Aptible-managed VPN and VPC peering`}),` connections provide secure, isolated networking between your stack and other networks.`]})},{label:`Observability Drains`,countDisplay:`${pe.logDrains} Log Drains, ${pe.metricDrains} Metric Drains`,description:(0,U.jsxs)(U.Fragment,{children:[`Connected `,(0,U.jsx)(`strong`,{children:`Log Drains`}),` (`,(0,U.jsx)(`strong`,{children:me}),`) and`,` `,(0,U.jsx)(`strong`,{children:`Metric Drains`}),` (`,(0,U.jsx)(`strong`,{children:he}),`) stream container, database, and API logs and metrics to your preferred observability or SIEM tools for auditability and monitoring.`]}
449)}],[oe,pe,ge,y.isSuccess,me,he]);return(0,U.jsxs)(`div`,{className:`print-report-root min-h-screen bg-white`,children:[(0,U.jsx)(yZe,{}),(0,U.jsxs)(`div`,{className:`print-footer`,"aria-hidden":`true`,children:[(0,U.jsx)(`span`,{children:k.date}),(0,U.jsx)(`a`,{href:`https://aptible.com/`,target:`_blank`,rel:`noopener noreferrer`,className:`text-plum`,children:`Powered by Aptible`})]}),(0,U.jsxs)(`div`,{className:`print-container pt-4 pb-8 pl-10 pr-8 min-h-screen`,children:[D&&(0,U.jsx)(`div`,{className:`flex justify-center items-center h-64`,children:(0,U.jsx)(SE,{})}),!D&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsxs)(`div`,{className:`cover-page flex flex-col justify-center pt-6`,children:[(0,U.jsx)(`div`,{className:`mb-6`,children:(0,U.jsx)(BU,{width:200})}),(0,U.jsx)(`h1`,{className:`text-4xl font-bold mb-4`,children:`Infrastructure Security & Compliance Report`}),(0,U.jsx)(`p`,{className:`text-2xl font-semibold mb-4`,style:{color:`#4D1ED8`},children:o.name}),(0,U.jsxs)(`div`,{className:`cover-generated-box w-fit border border-gray-200 rounded-md px-3 py-2`,"aria-label":`Report generated ${k.at}`,children:[(0,U.jsx)(`p`,{className:`text-xs leading-tight text-gray-500`,children:`Report generated`}),(0,U.jsx)(`p`,{className:`text-sm leading-snug text-gray-900`,children:k.at})]})]}),(0,U.jsxs)(`div`,{className:`intro-page`,children:[(0,U.jsx)(`h1`,{className:`text-3xl font-bold mb-2`,children:`About Aptible`}),(0,U.jsx)(`p`,{className:`${G.type[`small normal darker`]} mb-4`,children:`Aptible is a Platform as a Service (PaaS) that provides secure infrastru
449cture with built-in automation to support compliance frameworks such as HIPAA, SOC 2, HITRUST, and PCI. The platform is commonly used by organizations in regulated industriesâincluding healthcare, fintech, and enterprise SaaSâto deploy and operate applications that handle sensitive data.`}),(0,U.jsx)(`h2`,{className:`${G.type.h3} mb-1 mt-4`,children:`Shared Responsibility Model`}),(0,U.jsx)(`p`,{className:G.type[`small normal darker`],children:`Security within the Aptible platform follows a shared responsibility model. Aptible secures the underlying infrastructure, including network isolation, encryption systems, deployment infrastructure, and platform monitoring. Organizations using Aptible are responsible for securing their application code, managing access policies, and implementing organizational security procedures.`}),(0,U.jsx)(`p`,{className:`${G.type[`small normal darker`]} mt-2`,children:(0,U.jsx)(`a`,{href:`https://www.aptible.com/assets/deploy-division-of-responsibilities.pdf`,target:`_blank`,rel:`noopener noreferrer`,className:`text-blue-600 underline`,children:`Division of Responsibilities (PDF)`})}),(0,U.jsx)(`h2`,{className:`${G.type.h3} mb-1 mt-4`,children:`Reference Architecture`}),(0,U.jsx)(`div`,{className:`rounded-xl border border-gray-300 overflow-hidden mb-2 w-full`,children:(0,U.jsx)(`img`,{src:`/assets/images/report/reference-architecture-diagram.png`,alt:`Aptible Deploy reference architecture diagram`,className:`w-full h-auto block`,onLoad:()=>E(`loaded`),onError:()=>E(`error`)})}),(0,U.jsxs)(`p`,{className:G.type[`small normal darker`],children:[`Full reference:`,` `,(0,U.jsx)(`a`,{href:`https://www.aptible.com/assets/deploy-reference-architecture.pdf`,target:`_blank`,rel:`noopener noreferrer`,className:`text-blue-600 underline`,children:`Aptible Reference Architecture`})]})]}),(0,U.jsxs)(`div`,{className:`infra-compliance-page`,children:[(0,U.jsxs)(`h2`,{className:`text-2xl font-bold text-gray-900 mb-2`,children:[o.name,` Infrastructure`]}),(0,U.jsx)(`h2`,{className:`${G.type.h3} mb-1 mt-2`,children:`Summary`}),(0,U.jsxs)(`p`,{className:`${G.type[`small normal darker`]} mb-4`,children:[`The following summary reflects the infrastructure deployed by`,` `,o.name,` within the Aptible platform at the time this report was generated. Scoped environments: `,A,`.`,ne,pZe(t,n)?(0,U.jsxs)(U.Fragment,{children:[` `,`Compliance status and controls below reflect these filters.`]}):null]}),(0,U.jsxs)(`table`,{className:`w-full border-collapse text-sm mb-6`,children:[(0,U.jsx)(`thead`,{children:(0,U.jsxs)(`tr`,{className:`border-b border-gray-300`,children:[(0,U.jsx)(`th`,{className:`py-2 pr-4 text-left font-semibold w-48`,children:`Title`}),(0,U.jsx)(`th`,{className:`py-2 pr-4 text-left font-semibold w-40`,children:`Count`}),(0,U.jsx)(`th`,{className:`py-2 text-left font-semibold`,children:`Notes`})]})}),(0,U.jsx)(`tbody`,{children:_e.map(e=>(0,U.jsxs)(`tr`,{className:`border-b border-gray-200`,children:[(0,U.jsx)(`td`,{className:`py-2 pr-4 font-medium align-top`,children:e.label}),(0,U.jsx)(`td`,{className:`py-2 pr-4 align-top whitespace-nowrap`,children:e.countDisplay}),(0,U.jsx)(`td`,{className:`py-2 ${G.type[`small normal darker`]}`,children:e.description||`â`})]},e.label))})]}),(0,U.jsxs)(`div`,{className:`compliance-overview-section mb-2`,children:[(0,U.jsx)(`h2`,{className:`${G.type.h3} mt-4 mb-2`,children:`Compliance Status`}),(0,U.jsx)(`div`,{className:`compliance-cards-grid grid grid-cols-3 gap-4 items-stretch`,children:te.map(e=>{let t=e.percentage,n=t===0?`text-red-600`:t===100?`text-forest`:`text-amber-700`;return(0,U.jsxs)(Z,{size:`md`,className:`flex flex-col justify-start border-gray-200 min-w-0 py-2`,children:[(0,U.jsxs)(`span`,{className:`${G.type.h3} ${n} block`,style:t===0?{color:`#EF4444`}:t===100?{color:`#00633F`}:void 0,children:[t,`%`]}),(0,U.jsx)(`h3`,{className:`${G.type[`small semibold darker`]} leading-tight break-words min-w-0 mt-1`,children:e.framework})]},e.framework)})})]})]}),(0,U.jsxs)(`div`,{className:`controls-section`,children:[(0,U.jsx)(`h2`,{className:`${G.type.h3} mb-2`,children:`Controls Overview`}),(0,U.jsxs)(`p`,{className:`${G.type[`small normal darker`]} mb-2`,children:[`This report summarizes the Security and Availability controls implemented by Aptible on behalf of `,o.name,`. Scoped environments: `,A,`.`,ne]}),(0,U.jsx)(`div`,{className:`border-b border-gray-300 mb-4`}),w.length>0?w.map(e=>(0,U.jsx)(xZe,{control:e},e.id)):(0,U.jsx)(`div`,{className:`text-center py-12 ${G.type[`small lighter`]}`,children:`No controls found matching the current filters.`})]})]})]})]})},U9=e=>e?e.split(`,`).map(e=>
449e.trim()).filter(Boolean):[],SZe=()=>{let[e]=Ee(),t=e.get(`autoPrint`)===`1`||e.get(`autoPrint`)===`true`,n=(0,V.useMemo)(()=>U9(e.get(`scope`)),[e]),r=(0,V.useMemo)(()=>U9(e.get(`category`)),[e]),i=(0,V.useMemo)(()=>U9(e.get(`framework`)),[e]),[a,o]=(0,V.useState)({isLoading:!0,isFullyLoaded:!1});(0,V.useEffect)(()=>{let e=window.Pylon;if(typeof e==`function`)try{e(`hide`)}catch{}},[]);let s=(0,V.useCallback)(e=>{o(t=>t.isLoading===e.isLoading&&t.isFullyLoaded===e.isFullyLoaded?t:e)},[]),c=(0,V.useCallback)(()=>{a.isFullyLoaded&&requestAnimationFrame(()=>{requestAnimationFrame(()=>{window.print()})})},[a.isFullyLoaded]);return(0,U.jsxs)(`div`,{className:`print-controls-route min-h-screen bg-white${t?` auto-print-mode`:``}`,children:[t?(0,U.jsx)(`div`,{className:`auto-print-message flex flex-col items-center justify-center min-h-[40vh] px-4 text-gray-600`,children:a.isFullyLoaded?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`p`,{className:`${G.type.h3} mb-4`,children:`Report ready`}),(0,U.jsx)(K,{variant:`primary`,size:`md`,onClick:c,children:`Download PDF`})]}):(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`p`,{className:`${G.type.h3} mb-4`,children:`Preparing your reportâ¦`}),(0,U.jsx)(SE,{})]})}):null,!a.isLoading&&!t?(0,U.jsx)(`div`,{className:`no-print sticky top-0 z-10 flex justify-end border-b border-gray-200 bg-white px-8 py-3`,children:(0,U.jsx)(K,{variant:`primary`,size:`md`,onClick:c,disabled:!a.isFullyLoaded,children:`Print / Save as PDF`})}):null,(0,U.jsx)(H9,{scopeIds:n,categoryParams:r,frameworkParams:i,onLoadingStateChange:s})]})},W9=e=>[...e].sort().join(`,`),CZe=[`scope`,`framework`,`category`],G9=`all`,wZe=3e4,TZe=12e4,EZe={controls:[],frameworks:{},categories:[]},DZe={dedicated:`Dedicated`,shared:`Shared`,self_hosted:`Self-Hosted`},OZe=e=>{if(!e)return[G9];let t=e.split(`,`).map(e=>e.trim()).filter(Boolean);return t.length>0?t:[G9]},K9=(e,t)=>{let n=Array.from(new Set(e)),r=n.includes(G9),i=n.filter(e=>e!==G9);return r?i.length===0?[G9]:t.includes(G9)?i:[G9]:i.length>0?i:[G9]},kZe=({scopeIds:e,categoryParams:t,frameworkParams:n,onPrinted:r,onError:i})=>{let a=(0,V.useRef)(!1),o=(0,V.useRef)(!1),s=(0,V.useRef)(null),c=(0,V.useRef)(null),l=(0,V.useRef)(null),u=(0,V.useRef)(null),d=(0,V.useRef)(null);(0,V.useEffect)(()=>(document.body.classList.add(`controls-report-printing`),()=>{document.body.classList.remove(`controls-report-printing`)}),[]);let f=(0,V.useCallback)(()=>{s.current!==null&&(window.cancelAnimationFrame(s.current),s.current=null),c.current!==null&&(window.cancelAnimationFrame(c.current),c.current=null),l.current!==null&&(window.clearTimeout(l.current),l.current=null),u.current!==null&&(window.clearTimeout(u.current),u.current=null),d.current!==null&&(window.removeEventListener(`afterprint`,d.current),window.removeEventListener(`focus`,d.current),d.current=null)},[]),p=(0,V.useCallback)(()=>{o.current||(o.current=!0,f(),r())},[f,r]),m=(0,V.useCallback)(()=>{o.current||(o.current=!0,f(),i())},[f,i]),h=(0,V.useCallback)(()=>{a.current||(a.current=!0,l.current!==null&&(window.clearTimeout(l.current),l.current=null),s.current=window.requestAnimationFrame(()=>{s.current=null,c.current=window.requestAnimationFrame(()=>{c.current=null,u.current=window.setTimeout(m,TZe);let e=()=>p();d.current=e,window.addEventListener(`afterprint`,e,{once:!0}),window.addEventListener(`focus`,e,{once:!0});try{window.print()}catch{m()}})}))},[m,p]);return(0,V.useEffect)(()=>(l.current=window.setTimeout(()=>{l.current=null,a.current||m()},wZe),f),[f,m]),(0,ak.createPortal)((0,U.jsx)(`div`,{className:`controls-report-print-source`,"aria-hidden":`true`,children:(0,U.jsx)(H9,{scopeIds:e,categoryParams:t,frameworkParams:n,onReady:h})}),document.body)},AZe=()=>{let{controlId:e}=F(),[t,n]=Ee(),r=B($o),i=B(e=>Zo(e,{id:r})),a=B(e=>Jx(e,{orgId:r})),o=B(e=>Yx(e,{orgId:r})),s=B(e=>Xx(e,{orgId:r})),c=B(w_);u(Qx()),u(fu()),u(Jl()),u(Zg({orgId:r}));let l=B(Bl),d=t.get(`scope`)||``,f=OZe(t.get(`framework`)),p=t.get(`category`)||``,m=p.split(`,`).map(e=>e.trim()).filter(Boolean);(0,V.useEffect)(()=>{if(!r)return;let e=new URLSearchParams(t),i=!1;!t.has(`scope`)&&o.length>0&&(e.set(`scope`,o.join(`,`)),i=!0),i&&n(e,{replace:!0})},[o,d,t,n,r]);let h=(0,V.useMemo)(()=>r?d?d.split(`,`).map(e=>
449e.trim()).filter(Boolean):o:[],[d,o,r]).slice(0,5),g=h.join(`,`);u($x({orgId:r,accountIds:h}));let _=I(Qx),v=I($x),y=I(fu),b=(0,V.useMemo)(()=>({orgId:r,scopeIds:h}),[r,g]),x=B(e=>!r||h.length===0?EZe:Zx(e,b)),S=(0,V.useMemo)(()=>h.map(e=>{let t=a.all.find(t=>t.id===e);if(!t)return;let n=l[t.stackId],r=n==null?void 0:Gl(n);return{id:t.id,handle:t.handle,type:t.type,stackId:t.stackId,...r?{stackType:r}:{}}}).filter(e=>!!e),[a.all,h,l]),C=S.length>1,w=(0,V.useMemo)(()=>EJe(t,C,S),[t,C,S]);(0,V.useEffect)(()=>{if(!t.has(`sort`))return;let e=c9(t,C,S);if(!e)return;let r=new URLSearchParams(t);r.set(`controlsSortBy`,e.field),r.set(`controlsSortDir`,e.direction),r.delete(`sort`),r.delete(`nameDir`),r.delete(`statusDir`),n(r,{replace:!0})},[t,n,C,S]),(0,V.useEffect)(()=>{let e=t.get(`controlsSortBy`);e&&!s9(e,C,S)&&n(e=>{let t=new URLSearchParams(e);return t.delete(`controlsSortBy`),t.delete(`controlsSortDir`),t.delete(`controlsPage`),t},{replace:!0})},[t,n,C,S]);let T=W9(f),E=o.slice(0,5),D=E.join(`,`),O=h.join(`,`),[k,A]=(0,V.useState)(h),[j,M]=(0,V.useState)(m),[ee,te]=(0,V.useState)(f);(0,V.useEffect)(()=>{A(O?O.split(`,`):[]),M(m)},[O,p]),(0,V.useEffect)(()=>{te(f)},[T]);let ne=(0,V.useMemo)(()=>{let e=x.controls;return m.length>0&&(e=e.filter(e=>m.includes(e.globalControl.area))),f.includes(G9)||(e=e.filter(e=>e.globalControl.frameworkHandles.some(e=>f.includes(e)))),e},[x.controls,p,T]),re=(e,r)=>{let i=new URLSearchParams(t);r===null?i.delete(e):i.set(e,r),n(i)},ie=e=>{M(e)},ae=e=>{let t=K9(f.includes(e)?f.filter(t=>t!==e):[...f,e],f);re(`framework`,t.includes(G9)?G9:t.join(`,`))},oe=e=>{let t=K9(e,ee);te(t)},N=e=>{A(e.slice(0,5))},ce=()=>{let e=k.map(e=>a.all.find(t=>t.id===e)).filter(e=>!!e).map(e=>({id:e.id,handle:e.handle,type:e.type,stackId:e.stackId})),r=e.length>1,i=new URLSearchParams(t);i.set(`scope`,k.length>0?k.join(`,`):``),j.length>0?i.set(`category`,j.join(`,`)):i.delete(`category`),ee.length===0||ee.includes(G9)?i.delete(`framework`):i.set(`framework`,ee.join(`,`));let o=i.get(`controlsSortBy`);o&&!s9(o,r,e)&&(i.delete(`controlsSortBy`),i.delete(`controlsSortDir`),i.delete(`controlsPage`)),n(i)},le=()=>{let e=new URLSearchParams(t);e.set(`scope`,E.length>0?E.join(`,`):``),e.delete(`category`),e.delete(`framework`),A(E),M([]),te([G9]),n(e)},ue=_.isInitialLoading||v.isInitialLoading,de=a.all.length===0,fe=k.join(`,`)!==O||W9(j)!==W9(m)||W9(ee)!==W9(f),pe=O!==D||!f.includes(G9)||m.length>0,me=(0,V.useMemo)(()=>{let e=new Set(k);return[...a.production,...a.development].map(t=>{let n=!e.has(t.id)&&k.length>=5,r=l[t.stackId],i=r==null?void 0:DZe[Gl(r)];return{value:t.id,label:t.handle,disabled:n,stackType:i}})},[a.production,a.development,k,l]),he=(0,V.useMemo)(()=>{let e=[G9,`hipaa-required`,`hipaa-addressable`,`hitrust-inheritable`],t=Object.values(x.frameworks).map(e=>({value:e.handle,label:e.name}));return t.some(e=>e.value===G9)||t.unshift({value:G9,label:`All Controls`}),t.sort((t,n)=>{let r=e.indexOf(t.value),i=e.indexOf(n.value);return(r===-1?e.length:r)-(i===-1?e.length:i)})},[x.frameworks]),ge=(0,V.useCallback)(e=>{let n=new URLSearchParams;for(let e of CZe){let r=t.get(e);r&&n.set(e,r)}let r=n.toString();return r?`/controls/${e}/implementation?${r}`:`/controls/${e}/implementation`},[t]),[_e,ve]=(0,V.useState)(`idle`),ye=(0,V.useCallback)(()=>{a9(i9.EXPORT_PDF_REPORT_CLICK,{orgId:r,orgName:i.name}),ve(`exporting`)},[r,i.name]),be=(0,V.useCallback)(()=>{ve(`idle`)},[]),xe=(0,V.useCallback)(()=>{ve(`error`)},[]),Se=I(Zg({orgId:r})),P=y.isInitialLoading||Se.isInitialLoading;return r?P?(0,U.jsx)(r5,{children:(0,U.jsx)(`div`,{className:`mt-4`,children:(0,U.jsx)(xE,{text:`Loading ...`})})}):de?(0,U.jsx)(r5,{children:(0,U.jsx)(OJe,{organizationName:i.name||`your organization`,canCreateEnvironment:c})}):(0,U.jsxs)(r5,{children:[(0,U.jsxs)(`div`,{className:(0,H.default)(`flex flex-col gap-8 min-w-0 overflow-x-hidden w-full max-w-full`),style:{contain:`inline-size`},children:[(0,U.jsx)(`div`,{className:`space-y-4`,children:(0,U.jsxs)(`div`,{className:`flex flex-col gap-4 lg:flex-row lg:items-start lg:justify-between`,children:[(0,U.jsx)(`div`,{children:(0,U.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,U.jsx)(`h1`,{className:`text-3xl font-semibold text-gray-900`,children:`Security & Compliance`}),(0,U.jsx)(aA,{text:`This dashboard shows the security and compliance controls for your infrastru
449cture running on Aptible. Control status is evaluated automatically every 24 hours.`,children:(0,U.jsx)(tD,{variant:`sm`,className:`text-gray-500`})})]})}),(0,U.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,U.jsx)(`a`,{href:`https://trust.aptible.com/`,target:`_blank`,rel:`noreferrer`,onClick:()=>a9(i9.TRUST_CENTER_CLICK,{orgId:r,orgName:i.name}),children:(0,U.jsxs)(K,{variant:`white`,size:`md`,className:`w-fit whitespace-nowrap`,children:[(0,U.jsx)(rD,{variant:`sm`,className:`mr-1`,"aria-hidden":!0}),`Trust Center`]})}),(0,U.jsxs)(K,{variant:`primary`,size:`md`,onClick:ye,disabled:_e===`exporting`,className:`w-fit whitespace-nowrap`,children:[(0,U.jsx)(aD,{variant:`sm`,className:`mr-1`,"aria-hidden":!0}),`Download Report`]})]})]})}),_e===`idle`?null:(0,U.jsx)(SA,{status:_e,onCancel:be}),_e===`exporting`?(0,U.jsx)(kZe,{scopeIds:h,categoryParams:m,frameworkParams:f,onPrinted:be,onError:xe}):null,s?(0,U.jsx)(DJe,{}):null,(0,U.jsxs)(`div`,{className:(0,H.default)(`relative z-20 w-full max-w-full min-w-0 overflow-visible`),children:[(0,U.jsx)(iJe,{metrics:x.frameworks,selectedFrameworks:f,isLoading:ue,onToggle:ae}),(0,U.jsx)(aJe,{className:`mt-4`,environmentOptions:me,environmentSelectionLimit:5,selectedEnvironmentIds:k,onEnvironmentChange:N,frameworkOptions:he,selectedFrameworks:ee,onFrameworksChange:oe,categories:x.categories,selectedCategories:j,onCategoriesChange:ie,hasPendingChanges:fe,hasActiveFilters:pe,onApplyFilters:ce,onResetFilters:le})]}),(0,U.jsx)(`div`,{className:`my-1 h-px w-full bg-gray-200`}),(0,U.jsx)(`div`,{className:`relative z-0 w-full min-w-0 max-w-full overflow-x-auto`,children:(0,U.jsx)(wJe,{controls:ne,scopeEnvironments:S,isAggregateScope:C,isLoading:ue,selectedControlId:e,getControlLink:ge,initialSort:w})})]}),(0,U.jsx)(se,{})]}):(0,U.jsx)(r5,{children:(0,U.jsx)(SE,{})})},jZe=(e,t)=>e?e.split(`,`).map(e=>e.trim()).filter(Boolean).slice(0,5):t,MZe=()=>{let e=N(),[t]=Ee(),{controlId:n=``}=F(),r=B($o),i=B(e=>Zo(e,{id:r})),a=B(e=>Jx(e,{orgId:r})),o=B(e=>Yx(e,{orgId:r})),s=jZe(t.get(`scope`),o),c=B(e=>Zx(e,{orgId:r,scopeIds:s})),l=(0,V.useMemo)(()=>c.controls.find(e=>e.id===n),[c.controls,n]),u=s.map(e=>{let t=a.all.find(t=>t.id===e);if(t)return{id:t.id,handle:t.handle,type:t.type,stackId:t.stackId}}).filter(e=>!!e),d=t.toString(),f=(0,V.useCallback)(()=>{let t=new URLSearchParams(d);e(`/controls?${t.toString()}`)},[e,d]);return(0,V.useEffect)(()=>{l||f()},[l,f]),(0,V.useEffect)(()=>{let e=e=>{e.key===`Escape`&&f()};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[f]),l?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`button`,{type:`button`,className:`fixed inset-0 z-40 bg-black/30`,"aria-label":`Close security control details`,onClick:f}),(0,U.jsxs)(`aside`,{className:`fixed inset-y-0 right-0 z-50 w-full max-w-4xl overflow-y-auto bg-white shadow-2xl`,children:[(0,U.jsxs)(`div`,{className:`px-8 pt-6 pb-0`,children:[(0,U.jsxs)(`div`,{className:`flex items-start justify-between`,children:[(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`p`,{className:`text-sm font-semibold uppercase tracking-wide text-gray-500`,children:l.globalControl.area}),(0,U.jsx)(`h2`,{className:`mt-1 text-2xl font-semibold text-gray-900`,children:l.globalControl.name}),l.globalControl.description?(0,U.jsx)(`p`,{className:`mt-3 max-w-3xl text-sm text-gray-600`,children:l.globalControl.description}):null]}),(0,U.jsx)(`button`,{type:`button`,onClick:f,className:`ml-4 shrink-0 rounded p-1 transition-colors hover:bg-gray-100`,"aria-label":`Close`,children:(0,U.jsx)(JE,{className:`w-5 h-5 text-gray-400 hover:text-gray-600`})})]}),(0,U.jsxs)(`nav`,{className:`mt-4 flex space-x-8 border-b border-black-100`,children:[(0,U.jsx)(xU,{to:Ine(n,t),label:`Implementation`}),(0,U.jsx)(xU,{to:Lne(n,t),label:`Details`})]})]}),(0,U.jsx)(`div`,{className:`px-8 py-6`,children:(0,U.jsx)(se,{context:{controlId:n,orgId:r,organizationName:i.name,organizationSsoEnforced:i.ssoEnforced,control:l,scopeEnvironments:u,scopeIds:s}})})]})]}):null},q9=()=>M(),J9=e=>e==null?``:String(e).toLowerCase(),Y9=e=>e==null?``:String(e),NZe=`https://www.aptible.com/docs/core-concepts/security-compliance/authentication/sso`,PZe={app:`/resource-types/logo-app.png`,environment:`/resource-types/logo-environment.png`,account:`/resource-types/logo-environment.png`,vhost:`/resource-types/logo-vhost.png`,endpoint:`/resource-types/logo-vhost.png`,service:`/resource-types/logo-service.png`},FZe=({resourceId:e})=>{let t=B(t=>lp(t,{id:e})),n=t.type?`/database-types/logo-${t.type}.png`:`/resource-types/logo-database.png`;return(0,U.jsx)(`img`,{src:n,className:`w-5 h-5 shrink-0`,"aria-hidden":!0})},IZe=({resourceType:e,resourceId:t})=>{let n=e.toLowerCase();if(n===`database`||n===`backup`)return(0,U.jsx)(FZe,{resourceId:t});let r=PZe[n];return r?(0,U.jsx)(`img`,{src:r,className:`w-5 h-5 shrink-0`,"aria-hidden":!0}):[`user`,`membership`,`role`,`mfacontrolproxyuser`].includes(n)?(0,U.jsx)(kD,{className:`w-5 h-5 shrink-0 text-gray-500`,variant:`sm`,"aria-hidden":!0}):null},LZe=({serviceId:e,resourceHandle:t,resourceId:n})=>{let r=B(t=>Eu(t,{id:e})),i=B(e=>rf(e,{id:r.appId}));if(!Ou(r)){let r=t||n||e;return(0,U.jsx)(`span`,{className:G.type[`normal lighter`],children:r})}let a=r.appId?ta(r.appId,r.id):ga(r.databaseId),o=i.handle?`${i.handle} / ${r.processType}`:r.processType;return(0,U.jsx)(P,{to:a,className:G.type[`table link`],children:o})},X9=({compliant:e,title:t,description:n,resourceType:r,resourceId:i,action:a})=>{let o=e===null?`bg-gray-100 text-gray-400`:e?`bg-emerald-100 text-emerald-600`:`bg-red-100 text-red-600`,s=e===null?(0,U.jsx)(KE,{className:`text-gray-500`,variant:`sm`}):e?(0,U.jsx)(UE,{color:`#00633F`,variant:`sm`}):(0,U.jsx)(GE,{color:`#EF4444`,variant:`sm`});return(0,U.jsxs)(`div`,{className:`flex items-start justify-between rounded-lg border border-gray-200 px-3 py-2`,children:[(0,U.jsxs)(`div`,{className:`flex flex-1 items-start gap-3`,children:[(0,U.jsx)(`div`,{className:`mt-1 mr-1 flex h-8 w-8 shrink-0 items-center justify-center rounded-full ${o}`,children:s}),(0,U.jsxs)(`div`,{children:[(0,U.jsxs)(`div`,{className:`flex items-center gap-2`,children:[r&&i&&(0,U.jsx)(IZe,{resourceType:r,resourceId:i}),(0,U.jsx)(`p`,{className:`font-medium text-gray-900`,children:t})]}),(0,U.jsx)(`p`,{className:G.type[`normal lighter`],children:n})]})]}),a]})},RZe=({status:e})=>e===`enforced`?(0,U.jsx)(`div`,{className:`flex size-20 items-center justify-center rounded-full bg-emerald-100`,children:(0,U.jsx)(UE,{color:`#00633F`,variant:`lg`})}):e===`configured`?(0,U.jsx)(`div`,{className:`flex size-20 items-center justify-center rounded-full bg-amber-100`,children:(0,U.jsx)(t9,{progress:50,radius:32,variant:`warn`})}):(0,U.jsx)(`div`,{className:`flex size-20 items-center justify-center rounded-full bg-red-100`,children:(0,U.jsx)(GE,{color:`#EF4444`,variant:`lg`})}),zZe=({status:e,isAccountOwner:t,docsUrl:n})=>{if(e===`enforced`||e===`loading`)return(0,U.jsx)(lA,{href:n,variant:`white`,children:`More Info`});let r=e===`configured`?`Enable SSO Enforcement`:`Get Started With SSO`,i=e===`configured`?`Only Account Owners can enable SSO Enforcement`:`Only Account Owners can configure SSO`;return(0,U.jsxs)(`div`,{className:`flex flex-col items-center justify-center gap-3 md:flex-row`,children:[t?(0,U.jsx)(dA,{to:ui(),children:r}):(0,U.jsx)(`span`,{className:G.type[`normal lighter`],children:i}),(0,U.jsx)(lA,{href:n,variant:`white`,children:`More Info`})]})},BZe=(e,t,n)=>{if(t)return`enforced`;let r=e.customerControls.flatMap(e=>e.resources);return!(e.customerControls.length>0||e.cumulativeMetrics.lastEvaluation!==``)&&n?`loading`:r.length>0||e.cumulativeMetrics.totalCompliant>0||e.cumulativeMetrics.progressPercentage>0?`configured`:`available`}
449,VZe=()=>{let{orgId:e,organizationName:t,organizationSsoEnforced:n,control:r}=q9(),i=B(t=>__(t,{orgId:e})),a=BZe(r,n,I($x).isLoading),o=r.globalControl.callToAction||NZe,s={enforced:{title:`Single Sign On (SSO) is Configured and Enforced`,description:`${t} users can only log in and access ${t}'s resources by using your configured SAML provider. This allows you to enforce any restrictions allowed by your SSO provider on logins, such as password rotation or use of specific second factors.`},configured:{title:`Single Sign On (SSO) is Configured, but Not Enforced.`,description:`${t} users can log in and access ${t}'s resources by using both your configured SAML provider and their individual Aptible credentials. This limits your ability to enforce any restrictions allowed by your SSO provider on logins, such as password rotation or use of specific second factors.`},loading:{title:`Checking Single Sign On (SSO) Configuration`,description:`Aptible is checking whether ${t} has a SAML provider configured.`},available:{title:`Single Sign On (SSO) is Not Configured`,description:`Aptible provides Single Sign On (SSO) for all customers to control access to their Aptible organization's resources through a separate, single authentication service. To use SSO, configure both the SSO provider and Aptible with metadata related to the SAML protocol.`}}[a];return(0,U.jsxs)(`section`,{className:`overflow-hidden rounded-lg border border-gray-200 bg-white shadow-sm`,children:[(0,U.jsxs)(`div`,{className:`border-b border-gray-200 px-5 py-4`,children:[(0,U.jsx)(`h3`,{className:`font-semibold text-gray-900`,children:`Overall Implementation`}),(0,U.jsx)(`p`,{className:G.type[`normal lighter`],children:t})]}),(0,U.jsxs)(`div`,{className:`flex flex-col items-center px-8 py-10 text-center`,children:[(0,U.jsx)(RZe,{status:a}),(0,U.jsx)(`h4`,{className:`mt-6 text-lg font-semibold text-gray-900`,children:s.title}),(0,U.jsx)(`p`,{className:`mt-3 max-w-3xl text-sm text-gray-600`,children:s.description}),(0,U.jsx)(`div`,{className:`mt-6`,children:(0,U.jsx)(zZe,{status:a,isAccountOwner:i,docsUrl:o})})]})]})},Z9=(e,t)=>{let n=J9(e.resourceId),r=J9(e.resourceHandle);return t.find(t=>t.id===Y9(e.resourceHandle)||t.externalId===Y9(e.resourceHandle)||t.id===Y9(e.resourceId)||t.externalId===Y9(e.resourceId)||J9(t.email)===n||J9(t.username)===n||J9(t.email)===r||J9(t.username)===r)},Q9=(e,t)=>{let n=Z9(e,t);return n?`${n.name} â ${n.email}`:e.resourceHandle||e.resourceId||``},HZe=()=>{let e=l(),{control:t,orgId:n,scopeIds:r}=q9();u(as({orgId:n}));let i=B(Ho),a=Object.values(i),o=(0,V.useMemo)(()=>{let e=new Set;return a.forEach(t=>{t.id&&e.add(t.id),t.externalId&&e.add(t.externalId)}),Array.from(e).sort().join(`,`)},[a]);(0,V.useEffect)(()=>{let n=new Set;t.customerControls.forEach(e=>e.resources.forEach(e=>{if((e.readableResourceType||e.resourceType||``).toLowerCase()===`user`){let t=Y9(e.resourceHandle);t&&n.add(t)}}));let r=new Set(o.split(`,`).filter(Boolean)),i=Array.from(n).filter(e=>!r.has(e));i.length>0&&i.forEach(t=>e(is({userId:t})))},[t.customerControls,o,e]);let s=(0,V.useMemo)(()=>Vx(t.customerControls).sort((e,t)=>Q9(e.resource,a).localeCompare(Q9(t.resource,a))),[t.customerControls,a]),c=(t,i)=>{e(rS({ids:t,ignored:i,orgId:n,accountIds:r}))},d=s.filter(e=>!e.resource.ignored),f=s.filter(e=>e.resource.ignored),p=({resource:e,resourceIds:t})=>{let n=Z9(e,a),r=Q9(e,a),i=n?.id?yi(n.id):``;return(0,U.jsx)(X9,{compliant:e.ignored?null:e.compliant,resourceType:e.readableResourceType||e.resourceType,resourceId:e.resourceId,title:i?(0,U.jsx)(P,{to:i,className:G.type[`table link`],children:r}):r,description:e.detailsText||(e.ignored?`This user is marked as ignored.`:``),action:(0,U.jsx)(K,{variant:`white`,onClick:()=>c(t,!e.ignored),children:e.ignored?`Stop Ignoring`:`Ignore`})},t.join(`,`))};return(0,U.jsxs)(`div`,{className:`space-y-8`,children:[(0,U.jsxs)(`section`,{children:[(0,U.jsx)(`h3`,{className:`text-sm font-semibold uppercase tracking-wide text-gray-600`,children:`Cumulative Control Implementation Status`}),(0,U.jsx)(`p`,{className:`mt-1 ${G.type[`normal lighter`]}`,children:`Covering users with access to environments in the current report scope.`}),(0,U.jsx)(`div`,{className:`mt-4`,children:(0,U.jsx)(n9,{metrics:t.cumulativeMetrics})})]}),s.length===0?(0,U.jsx)(`p`,{className:G.type[`normal lighter`],children:`No user-specific evaluations are available for this control.`}):(0,U.jsxs)(`section`,{className:`rounded-xl border border-gray-200 bg-gray-50 p-5`,children:[(0,U.jsx)(`h4`,{className:`text-lg font-semibold text-gray-900`,children:`Users`}),(0,U.jsxs)(`div`,{className:`mt-4 space-y-4`,children:[d.length>0?(0,U.jsx)(`div`,{className:`space-y-3`,children:d.map(p)}):null,f.length>0?(0,U.jsxs)(`div`,{className:`space-y-2`,children:[(0,U.jsx)(`h5`,{className:`text-xs font-semibold uppercase tracking-wide text-gray-600`,children:`Ignored Users`}),(0,U.jsx)(`div`,{className:`space-y-3`,children:f.map(p)})]}):null]})]})]})},UZe=()=>
449{let e=l(),{control:t,orgId:n,scopeIds:r}=q9(),i=I(iS),[a,o]=(0,V.useState)(``);u(as({orgId:n}));let s=B(Ho),c=Object.values(s),d=(e,t)=>{let n=J9(e.resourceType),r=J9(e.readableResourceType),i=Y9(e.resourceId);return n===`account`||r===`environment`?i?Na(i):``:n===`vhost`||r===`endpoint`?i?wa(i):``:n===`app`||r===`app`?i?Qi(i):``:n===`database`||r===`database`?i?ga(i):``:(n===`mfacontrolproxyuser`||n===`user`||r===`user`)&&t?yi(t):``},f=(0,V.useMemo)(()=>{let e=new Set;return c.forEach(t=>{t.id&&e.add(t.id),t.externalId&&e.add(t.externalId)}),Array.from(e).sort().join(`,`)},[c]);(0,V.useEffect)(()=>{let n=new Set;t.customerControls.forEach(e=>e.resources.forEach(e=>{if((e.readableResourceType||e.resourceType||``).toLowerCase()===`user`){let t=Y9(e.resourceHandle);t&&n.add(t)}}));let r=new Set(f.split(`,`).filter(Boolean)),i=Array.from(n).filter(e=>!r.has(e));i.length>0&&i.forEach(t=>e(is({userId:t})))},[t.customerControls,f,e]);let p=(t,i)=>{e(nS({id:t,ignored:i,orgId:n,accountIds:r}))},m=(e,t)=>e.map(e=>{let n=(e.readableResourceType||e.resourceType)??``,r=n.toLowerCase()===`user`,i=r&&c.length>0?Z9(e,c):void 0,a=(r&&i?`${i.name} â ${i.email}`:e.resourceHandle||e.resourceId)||``,o=d(e,i?.id),s=n.toLowerCase()===`service`;return(0,U.jsx)(X9,{compliant:t?null:e.compliant,resourceType:n,resourceId:e.resourceId,title:s?(0,U.jsx)(LZe,{serviceId:e.resourceId,resourceHandle:e.resourceHandle,resourceId:e.resourceId}):o?(0,U.jsx)(P,{to:o,className:G.type[`table link`],children:a}):a,description:e.detailsText||(t?`This resource is marked as ignored.`:``),action:(0,U.jsx)(K,{variant:`white`,onClick:()=>p(e.id,!t),children:t?`Stop Ignoring`:`Ignore`})},e.id)}),h=i.isLoading||t.customerControls.some(e=>e.isEvaluating),g=(t,r)=>{h||(o(t),e(iS({id:t,orgId:n,accountIds:[r]})))};return(0,U.jsxs)(`div`,{className:`space-y-8`,children:[(0,U.jsxs)(`section`,{className:`rounded-xl border border-gray-200 bg-white p-5`,children:[(0,U.jsx)(`h3`,{className:`text-sm font-semibold uppercase tracking-wide text-gray-600`,children:`Cumulative Control Implementation Status`}),(0,U.jsx)(`p`,{className:`mt-1 ${G.type[`normal lighter`]}`,children:`Covering environments in the current report scope.`}),(0,U.jsx)(`div`,{className:`mt-4`,children:(0,U.jsx)(n9,{metrics:t.cumulativeMetrics})})]}),t.customerControls.length===0?(0,U.jsx)(`p`,{className:G.type[`normal lighter`],children:`No environment-specific evaluations are available for this control.`}):t.customerControls.map(e=>{let t=e.resources.filter(e=>!e.ignored),n=e.resources.filter(e=>e.ignored),r=e.isEvaluating||i.isLoading&&a===e.id;return(0,U.jsxs)(`section`,{className:`rounded-xl border border-gray-200 bg-gray-50 p-5`,children:[(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`h4`,{className:`text-lg font-semibold text-gray-900`,children:(0,U.jsx)(P,{to:Na(e.environmentId),className:G.type[`table link`],children:e.environmentHandle})}),(0,U.jsx)(`p`,{className:G.type[`normal lighter`],children:e.metrics.lastEvaluationInWords?`Evaluated ${e.metrics.lastEvaluationInWords}`:`Never evaluated.`})]}),e.isDisabled?(0,U.jsxs)(`div`,{className:`mt-4 rounded-lg bg-white p-4 text-sm text-gray-700`,children:[`This control is only available on production environments.`,` `,e.environmentType===`development`?`Select a production environment to view implementation details.`:null]}):(0,U.jsxs)(`div`,{className:`mt-4 space-y-4`,children:[(0,U.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,U.jsx)(n9,{metrics:e.metrics}),(0,U.jsx)(K,{variant:`white`,size:`xs`,onClick:()=>g(e.id,e.environmentId),disabled:h,children:r?`Rerunning...`:`Rerun`})]}),a===e.id?(0,U.jsx)(TA,{...i}):null,t.length===0&&!e.isEvaluating?(0,U.jsx)(`p`,{className:`text-sm text-gray-600`,children:`No active resources are currently evaluated for this control.`}):(0,U.jsx)(`div`,{className:`space-y-3`,children:m(t,!1)}),n.length>0&&(0,U.jsxs)(`div`,{className:`space-y-2`,children:[(0,U.jsx)(`h5`,{className:`text-xs font-semibold uppercase tracking-wide text-gray-600`,children:`Ignored Resources`}),(0,U.jsx)(`div`,{className:`space-y-3`,children:m(n,!0)})]})]})]},e.id)})]})},WZe=()=>{let{control:e}=q9();return e.globalControl.implementationUiComponent===`sso`?(0,U.jsx)(VZe,{}):e.globalControl.implementationUiComponent===`mfa`?(0,U.jsx)(HZe,{}):(0,U.jsx)(UZe,{})},GZe=e=>e.length===0?`All Frameworks`:e.map(e=>e.displayName).join(`, `),KZe=()=>{let{control:e}=q9(),{globalControl:t}=e;return(0,U.jsxs)(`div`,{className:`space-y-6`,children:[(0,U.jsx)(`section`,{className:`rounded-xl border border-gray-200 bg-white p-5`,children:(0,U.jsxs)(`dl`,{className:`grid gap-4 md:grid-cols-2`,children:[(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`dt`,{className:`text-xs font-semibold uppercase text-gray-500`,children:`Availability`}),(0,U.jsx)(`dd`,{className:`mt-1 text-sm text-gray-700`,children:t.isDedicatedOnly?`This control is available on production environments only.`:`This control is available on all environments.`})]}),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`dt`,{className:`text-xs font-semibold uppercase text-gray-500`,children:`Category`}),(0,U.jsx)(`dd`,{className:`mt-1 text-sm text-gray-700`,children:t.area})]}),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`dt`,{className:`text-xs font-semibold uppercase text-gray-500`,children:`Compliance Frameworks`}),(0,U.jsx)(`dd`,{className:`mt-1 text-sm text-gray-700`,children:GZe(t.frameworks)})]}),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`dt`,{className:`text-xs font-semibold uppercase text-gray-500`,children:`Implementation`}),(0,U.jsx)(`dd`,{className:`mt-1 text-sm text-gray-700`,children:t.hasRemediation?`Additional steps are required to fully implement this control. Review the implementation guidance for details.`:`This control is managed by Aptible on your behalf. No further action is required.`})]}),t.callToAction?(0,U.jsxs)(`div`,{className:`md:col-span-2`,children:[(0,U.jsx)(`dt`,{className:`text-xs font-semibold uppercase text-gray-500`,children:`Learn More`}),(0,U.jsx)(`dd`,{className:`mt-2`,children:(0,U.jsx)(lA,{href:t.callToAction,variant:`white`,className:`w-full`,children:`View Documentation`})})]}):null]})}),t.detailedDescription?(0,U.jsxs)(`section`,{className:`rounded-xl border border-gray-200 bg-white p-5`,children:[(0,U.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,U.jsx)(`h3`,{className:`text-base font-semibold text-gray-900`,children:`Detailed Control Description`}),(0,U.jsx)(B2,{text:t.detailedDescription,label:`Copy description`,successIconOnCopy:!0})]}),(0,U.jsx)(`p`,{className:`mt-4 whitespace-pre-line text-sm text-gray-700`,children:t.detailedDescription})]}):null]})};function qZe({deployment:e,app:t,op:n}){u(Xv({id:e.imageId}));let r=B(t=>Zv(t,{id:e.imageId})),i=B(t=>Dl(t,{id:e.sourceId}));return(0,U.jsxs)(wU,{children:[(0,U.jsx)(TU,{title:`Deployment Details`,icon:(0,U.jsx)(`img`,{src:`/resource-types/logo-deployments.png`,className:`w-[32px] h-[32px] mr-3`,"aria-label":`Deployment`})}),(0,U.jsxs)(EU,{children:[(0,U.jsx)(DU,{title:`Type`,children:cl(n.type)}
449),(0,U.jsx)(DU,{title:`Source`,children:(0,U.jsx)(P,{to:Lo(i.id),children:i.displayName})}),(0,U.jsx)(DU,{title:`App`,children:(0,U.jsx)(P,{to:Qi(t.id),children:t.handle})}),(0,U.jsx)(DU,{title:`Git Ref`,children:(0,U.jsx)($2,{gitRef:e.gitRef,commitSha:e.gitCommitSha,commitUrl:e.gitCommitUrl})}),(0,U.jsx)(DU,{title:`Created`,children:cl(Of(e.createdAt))}),(0,U.jsx)(DU,{title:`Commit Message`,children:(0,U.jsx)(`div`,{className:`max-h-[21px]`,children:(0,U.jsx)(e4,{message:e.gitCommitMessage})})}),(0,U.jsx)(DU,{title:`Status`,children:(0,U.jsx)(D4,{status:n.status})}),(0,U.jsx)(DU,{title:`Docker Image`,children:(0,U.jsx)(Q2,{image:e.dockerImage,digest:r.dockerRef,repoUrl:e.dockerRepositoryUrl})}),(0,U.jsxs)(DU,{title:`User`,children:[n.userName,(0,U.jsxs)(`div`,{className:`text-gray-500`,children:[`Note: `,n.note||`N/A`]})]})]})]})}function JZe(){let{id:e=``}=F(),t=B(t=>gl(t,{id:e})),n=B(e=>rf(e,{id:t.appId}));u(_f({id:t.appId}));let r=u(wl({id:e})),i=B(e=>Ju(e,{id:t.operationId}));u(Gd({id:t.operationId}));let a=[{name:`Logs`,href:fa(e)},{name:`Configuration`,href:fte(e)}];return(0,U.jsx)(CU,{...r,breadcrumbs:[{name:n.handle,to:ua(n.id),label:`App`,crumbVariant:mU.UPPERCASE}],titleLabel:`Deployment ID`,title:e,detailsBox:(0,U.jsx)(qZe,{deployment:t,op:i,app:n}),tabs:a})}var YZe=()=>(0,U.jsx)(r5,{header:(0,U.jsx)(JZe,{}),children:(0,U.jsx)(se,{})}),XZe=()=>{let{id:e=``}=F();return(0,U.jsx)(CLe,{envId:e})};function ZZe(){let[e,t]=(0,V.useState)(X6(`aptible-enable-local-storage-caching`)===`true`);return(0,U.jsx)(Z,{children:(0,U.jsxs)(W,{children:[(0,U.jsx)(`h3`,{className:G.type.h3,children:`Browser-side Settings`}),(0,U.jsx)(`div`,{children:`These settings apply only to your current browser, and will not affect other members of your organization, or other browsers you use.`}),(0,U.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,U.jsx)(A2,{checked:e,onChange:e=>{t(e),e?Z6(`aptible-enable-local-storage-caching`,`true`,365):Z6(`aptible-enable-local-storage-caching`,`false`,-1),window.location.reload()},ariaLabel:`Enable enhanced localStorage caching`,children:`Enable Enhanced Caching`}),(0,U.jsx)(aA,{text:(0,U.jsx)(`div`,{className:`max-w-xs`,children:`This feature uses localStorage to cache apps, databases, and other Aptible resources to improve performance. Sensitive information (app ENV, connection URLs, passwords, certificates) are removed before storing data locally. Only select keys are cached.`}),placement:`right`,children:(0,U.jsx)(tD,{className:`w-4 h-4 text-gray-500 cursor-help`,title:`Enchanced caching info`})})]})]})})}function QZe(){let e=l(),t=B(qo),[n,r]=(0,V.useState)(t.name),i=I(cs),a={userId:t.id,name:n},o=cs(a),[s,c]=QS({name:e=>H4(e.name,`Name`)||U4(e.name)}),u=n===t.name||!!s.name;return(0,V.useEffect)(()=>{r(t.name)},[t.name]),(0,U.jsxs)(W,{children:[(0,U.jsx)(`h2`,{className:G.type.h2,children:`Profile`}),(0,U.jsx)(Z,{children:(0,U.jsxs)(W,{size:`sm`,variant:`horizontal`,children:[(0,U.jsxs)(W,{size:`sm`,className:`w-[180px] font-bold`,children:[(0,U.jsx)(`div`,{children:`N
449ame`}),(0,U.jsx)(`div`,{children:`ID`}),(0,U.jsx)(`div`,{children:`Email`}),(0,U.jsx)(`div`,{children:`Password`}),(0,U.jsx)(`div`,{children:`2-Factor Authentication`}),(0,U.jsx)(`div`,{children:`Security Keys`}),(0,U.jsx)(`div`,{children:`Log out other sessions`})]}),(0,U.jsxs)(W,{size:`sm`,children:[(0,U.jsx)(`div`,{children:t.name}),(0,U.jsx)(z2,{text:t.id}),(0,U.jsxs)(W,{variant:`horizontal`,children:[(0,U.jsx)(z2,{text:t.email}),(0,U.jsx)(P,{to:qr(),children:`Edit`})]}),(0,U.jsx)(P,{to:qr(),children:`Edit`}),(0,U.jsx)(P,{to:qr(),children:`Edit`}),(0,U.jsx)(P,{to:qr(),children:`Edit`}),(0,U.jsx)(P,{to:qr(),children:`Edit`})]})]})}),(0,U.jsx)(Z,{children:(0,U.jsx)(`form`,{onSubmit:t=>{t.preventDefault(),!u&&c(a)&&e(o)},children:(0,U.jsxs)(W,{children:[(0,U.jsx)(TA,{...i}),(0,U.jsx)(J,{label:`Name`,htmlFor:`name`,feedbackMessage:s.name,feedbackVariant:s.name?`danger`:`info`,children:(0,U.jsx)(X,{type:`text`,id:`name`,name:`name`,value:n,onChange:e=>{r(W4(e.currentTarget.value)),c({name:W4(e.currentTarget.value)})}})}),(0,U.jsx)(`div`,{children:(0,U.jsx)(K,{type:`submit`,isLoading:i.isLoading,disabled:u,children:`Save Changes`})})]})})}),(0,U.jsx)(ZZe,{})]})}function $Ze(){let{isLoading:e}=u(hf()),t=B(of),n=[{label:e?`Please wait...`:`Select an app`,value:``,disabled:e},...t.map(e=>({label:e.handle,value:e.id,disabled:!!e.currentSourceId})).sort((e,t)=>e.label.localeCompare(t.label))],[r,i]=(0,V.useState)(``),a=e=>i(e.value),o=N();return(0,U.jsxs)(r5,{children:[(0,U.jsx)(W,{children:(0,U.jsx)(W,{size:`sm`,children:(0,U.jsx)(NU,{description:`Sources connect apps with code repositories to show you what's deployed where.`,children:`Sources`})})}),(0,U.jsxs)(Z,{children:[(0,U.jsxs)(q,{variant:`info`,className:`mb-6`,children:[`Sources connect apps with code repositories to show you what's deployed where.`,` `,(0,U.jsx)(P,{target:`_blank`,to:`https://www.loom.com/share/cb781fd9aa2e41198684e99f25d4ea2a`,children:`Watch the demo video.`})]}),(0,U.jsxs)(W,{className:`mb-4`,children:[(0,U.jsx)(`h3`,{className:G.type.h3,children:`How to Setup a Source`}),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`h4`,{className:`font-semibold`,children:`Step 1. View an appâs CI/CD tab and follow the setup instructions.`}),(0,U.jsx)(`p`,{children:`Aptible automatically creates a source and links all releases to that source when you use the Aptible GitHub Action (v4 or greater).`})]}),(0,U.jsxs)(`div`,{children:[(0,U.jsx)(`h4`,{className:`font-semibold`,children:`Step 2. Commit your changes and wait for the release to finish.`}),(0,U.jsx)(`p`,{children:`Thatâs it! Now you can view all apps, release history, release logs, and release ENV variables (if you have permissions) tied to this source.`})]})]}),(0,U.jsxs)(W,{children:[(0,U.jsx)(J,{label:`Choose App to configure Source`,htmlFor:`Choose App to configure Source`,children:(0,U.jsx)(XA,{disabled:e,onSelect:a,value:r||void 0,options:n})}),(0,U.jsx)(K,{className:`w-fit`,type:`button`,disabled:!r,onClick:()=>o(ca(r)),children:`Continue to CI/CD Setup`})]})]})]})}var eQe=()=>{let e=me();return(0,V.useEffect)(()=>{Ys(`pageview`,e.pathname)},[e.pathname]),null},tQe=e=>({...e,element:(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(eQe,{}),(0,U.jsx)(gBe,{}),e.element]})}),nQe=e=>({...e,errorElement:(0,U.jsx)(TVe,{})}),rQe=[{path:`/`,element:(0,U.jsx)(GBe,{}),children:[{index:!0,element:(0,U.jsx)(UJe,{})},{path:`home-beta`,element:(0,U.jsx)(ae,{to:Dr(),replace:!0})},{path:`deployments`,element:(0,U.jsx)(ae,{to:Xi(),replace:!0})},{path:To,element:(0,U.jsx)(Mqe,{})},{path:Do,element:(0,U.jsx)(w5,{children:(0,U.jsx)(AZe,{})}),children:[{path:Pne,element:(0,U.jsx)(MZe,{}),children:[{index:!0,element:(0,U.jsx)(ae,{to:`implementation`,replace:!0})},{path:`implementation`,element:(0,U.jsx)(WZe,{})},{path:`details`,element:(0,U.jsx)(KZe,{})}]}]},{path:Yne,element:(0,U.jsx)(w5,{children:(0,U.jsx)(SZe,{})})},{path:go,element:(0,U.jsx)(r5,{children:(0,U.jsx)(oXe,{})})},{path:mo,children:[{index:!0,element:(0,U.jsx)(bqe,{})},{path:xo,element:(0,U.jsx)(jVe,{}),children:[{path:xo,element:(0,U.jsx)(lWe,{})},{path:Ene,element:(0,U.jsx)(xqe,{})},{path:kne,element:(0,U.jsx)(Tqe,{})},{path:qne,element:(0,U.jsx)(UYe,{})},{path:Dne,element:(0,U.jsx)(Sqe,{})},{path:Ane,element:(0,U.jsx)(QYe,{})},{path:Mne,element:(0,U.jsx)(eXe,{})}]}]},{path:ea,element:(0,U.jsx)(KVe,{}),children:[{index:!0,element:(0,U.jsx)(QWe,{})},{path:Kee,element:(0,U.jsx)(dWe,{})},{path:qee,element:(0,U.jsx)(yWe,{})},{path:Jee,element:(0,U.jsx)(bWe,{})},{path:Yee,element:(0,U.jsx)(LWe,{})}]},{path:Ca,element:(0,U.jsx)(EGe,{})},{path:Xne,children:[{index:!0,element:(0,U.jsx)(KXe,{})},{path:Fo,element:(0,U.jsx)($Ze,{})},{path:Zne,element:(0,U.jsx)(ZVe,{}),children:[{index:!0,element:(0,U.jsx)(qXe,{})},{path:Qne,element:(0,U.jsx)(JXe,{})},{path:$ne,element:(0,U.jsx)(YXe,{})}]}]},{path:Ui,children:[{index:!0,element:(0,U.jsx)(kHe,{})},{path:Fee,element:(0,U.jsx)(AHe,{})}]},{path:Gi,children:[{index:!0,element:(0,U.jsx)(jHe,{})},{path:Lee,element:(0,U.jsx)(YBe,{}),children:[{index:!0,element:(0,U.jsx)(ae,{to:`requests`,replace:!0})},{path:Ree,element:(0,U.jsx)(PHe,{})},{path:Bee,element:(0,U.jsx)(HHe,{})}]},{path:Vee,element:(0,U.jsx)(qHe,{})}]},{path:Vi,element:(0,U.jsx)(xHe,{})},{path:Yi,children:[{index:!0,element:(0,U.jsx)(VWe,{})},{path:Zi,element:(0,U.jsx)(hVe,{}),children:[{index:!0,element:(0,U.jsx)(YYe,{})},{path:Uee,element:(0,U.jsx)(qWe,{})},{path:Qee,element:(0,U.jsx)(GWe,{})},{path:$ee,element:(0,U.jsx)(KWe,{})},{path:ete,element:(0,U.jsx)(KJe,{})},{path:nte,element:(0,U.jsx)(ZWe,{})},{path:Wee,element:(0,U.jsx)(rXe,{})},{path:ite,element:(0,U.jsx)($We,{})},{path:ate,element:(0,U.jsx)(eGe,{})},{path:ote,element:(0,U.jsx)(tGe,{})},{path:cte,element:(0,U.jsx)(iGe,{})},{path:Xee,element:(0,U.jsx)(RWe,{})}]}]},{path:lte,element:(0,U.jsx)(YZe,{}),children:[{index:!0,element:(0,U.jsx)(HXe,{})},{path:ute,element:(0,U.jsx)(UXe,{})},{path:dte,element:(0,U.jsx)(WXe,{})}]},{path:Ate,element:(0,U.jsx)(TYe,{})},{path:pa,children:[{index:!0,element:(0,U.jsx)(HWe,{})},{path:Sne,element:(0,U.jsx)(iHe,{}),children:[{path:Cne,element:(0,U.jsx)(uKe,{})},{path:wne,element:(0,U.jsx)(fKe,{})}]},{path:ha,element:(0,U.jsx)(bVe,{}),children:[{index:!0,element:(0,U.jsx)(SGe,{})},{path:wte,element:(0,U.jsx)(xGe,{})},{path:mte,element:(0,U.jsx)(cGe,{})},{path:hte,element:(0,U.jsx)(aGe,{})},{path:gte,element:(0,U.jsx)(sGe,{})},{path:yte,element:(0,U.jsx)(wGe,{})},{path:_te,element:(0,U.jsx)(uGe,{})},{path:bte,element:(0,U.jsx)(fGe,{})},{path:xte,element:(0,U.jsx)(vGe,{})},{path:Cte,element:(0,U.jsx)(yGe,{})},{path:Ete,element:(0,U.jsx)(TGe,{})}]}]},{path:Rne,element:(0,U.jsx)(BVe,{}),children:[{index:!0,element:(0,U.jsx)(EYe,{})},{path:zne,element:(0,U.jsx)(DYe,{})},{path:Bne,element:(0,U.jsx)(OYe,{})},{path:Hne,element:(0,U.jsx)(AYe,{})}]},{path:ka,element:(0,U.jsx)(JYe,{})},{path:Mte,element:(0,U.jsx)(LVe,{}),children:[{index:!0,element:(0,U.jsx)(Nqe,{})},{path:Nte,element:(0,U.jsx)(zqe,{})},{path:Pte,element:(0,U.jsx)(Rqe,{})},{path:Da,element:(0,U.jsx)(Hqe,{})},{path:Fte,element:(0,U.jsx)(dXe,{})}]},{path:Ao,element:(0,U.jsx)(FYe,{})},{path:jo,element:(0,U.jsx)(RYe,{})},{path:Mo,element:(0,U.jsx)(VYe,{})},{path:ja,children:[{index:!0,element:(0,U.jsx)(lKe,{})},{path:Lte,element:(0,U.jsx)(v5,{}),children:[{index:!0,element:(0,U.jsx)(BWe,{})},{path:Rte,element:(0,U.jsx)(nKe,{})},{path:zte,element:(0,U.jsx)(rKe,{})},{path:Bte,element:(0,U.jsx)(iKe,{})},{path:Vte,element:(0,U.jsx)(tKe,{})},{path:Yte,element:(0,U.jsx)(MYe,{})},{path:La,element:(0,U.jsx)(zGe,{})},{path:Hte,element:(0,U.jsx)(ae,{to:`../activity`,replace:!0})},{path:Ute,element:(0,U.jsx)(kGe,{})},{path:Wte,element:(0,U.jsx)(MGe,{})},{path:Gte,element:(0,U.jsx)(AGe,{})},{path:Kte,element:(0,U.jsx)(jGe,{})},{path:Jte,element:(0,U.jsx)(cKe,{})},{path:Zte,element:(0,U.jsx)(XZe,{})}]}]},{path:Ha,element:(0,U.jsx)(XJe,{})},{path:xi,element:(0,U.jsx)(eqe,{})},{path:hne,element:(0,U.jsx)(sqe,{})},{path:mne,element:(0,U.jsx)(ae,{to:uo})},{path:uo,element:(0,U.jsx)(oqe,{})}
449,{path:_ne,element:(0,U.jsx)(fHe,{}),children:[{index:!0,element:(0,U.jsx)(mqe,{})},{path:vne,element:(0,U.jsx)(hqe,{})}]},{path:bne,element:(0,U.jsx)(OVe,{}),children:[{index:!0,element:(0,U.jsx)(ZJe,{})}]},{path:Nee,element:(0,U.jsx)(tUe,{})},{path:Rr,element:(0,U.jsx)(nUe,{})},{path:Wa,element:(0,U.jsx)(zWe,{})},{path:Ja,element:(0,U.jsx)(JJe,{})},{path:Xa,element:(0,U.jsx)(v9,{})},{path:Ka,element:(0,U.jsx)(qJe,{})},{path:nne,element:(0,U.jsx)(pXe,{})},{path:rne,element:(0,U.jsx)(mXe,{})},{path:ane,element:(0,U.jsx)(fXe,{})},{path:one,element:(0,U.jsx)(AXe,{})},{path:sne,element:(0,U.jsx)(jXe,{})},{path:eo,element:(0,U.jsx)(t5,{children:(0,U.jsx)(OXe,{})})},{path:lne,element:(0,U.jsx)(MXe,{})},{path:une,element:(0,U.jsx)(_Xe,{})}]},{path:Ri,element:(0,U.jsx)(e5,{children:(0,U.jsx)($8,{children:(0,U.jsx)(KYe,{})})})},{path:Bi,element:(0,U.jsx)(e5,{children:(0,U.jsx)($8,{children:(0,U.jsx)(qYe,{})})})},{path:Pr,element:(0,U.jsx)(e5,{children:(0,U.jsx)(UWe,{})})},{path:wi,element:(0,U.jsx)(e5,{children:(0,U.jsx)(y7,{})})},{path:Tee,element:(0,U.jsx)(e5,{children:(0,U.jsx)(y7,{})})},{path:lee,element:(0,U.jsx)(VXe,{})},{path:Ei,element:(0,U.jsx)(e5,{children:(0,U.jsx)($8,{children:(0,U.jsx)(nqe,{})})})},{path:Oi,element:(0,U.jsx)(e5,{children:(0,U.jsx)($8,{children:(0,U.jsx)(yKe,{})})})},{path:ki,element:(0,U.jsx)(e5,{children:(0,U.jsx)($8,{children:(0,U.jsx)(T5,{})})}),children:[{index:!0,element:(0,U.jsx)(C5,{children:(0,U.jsx)(EKe,{})})}]},{path:Pi,element:(0,U.jsx)(e5,{children:(0,U.jsx)($8,{children:(0,U.jsx)(T5,{})})}),children:[{index:!0,element:(0,U.jsx)(C5,{children:(0,U.jsx)(IKe,{})})}]},{path:Fi,element:(0,U.jsx)(e5,{children:(0,U.jsx)($8,{children:(0,U.jsx)(T5,{})})}),children:[{index:!0,element:(0,U.jsx)(C5,{children:(0,U.jsx)(LKe,{})})}]},{path:ji,element:(0,U.jsx)(e5,{children:(0,U.jsx)($8,{children:(0,U.jsx)(T5,{})})}),children:[{index:!0,element:(0,U.jsx)(C5,{children:(0,U.jsx)(FKe,{})})},{path:`add-credit-card`,element:(0,U.jsx)(C5,{children:(0,U.jsx)(TKe,{})})},{path:`add-bank-account`,element:(0,U.jsx)(C5,{children:(0,U.jsx)(wKe,{})})}]},{path:Ii,element:(0,U.jsx)(e5,{children:(0,U.jsx)($8,{children:(0,U.jsx)(T5,{})})}),children:[{index:!0,element:(0,U.jsx)(ZKe,{})}]},{path:tne,element:(0,U.jsx)(BXe,{})},{path:Mee,element:(0,U.jsx)(e5,{children:(0,U.jsx)($8,{children:(0,U.jsx)(QKe,{})})})},{path:No,element:(0,U.jsx)(GYe,{})},{path:zr,element:(0,U.jsx)(e5,{children:(0,U.jsx)($8,{children:(0,U.jsx)(T5,{})})}),children:[{index:!0,element:(0,U.jsx)(WWe,{})},{path:Vr,element:(0,U.jsx)(QZe,{})},{path:Ur,element:(0,U.jsx)(lXe,{})},{path:Gr,element:(0,U.jsx)(uXe,{})},{path:Yr,element:(0,U.jsx)(OGe,{})},{path:Zr,element:(0,U.jsx)(tHe,{}),children:[{path:ree,element:(0,U.jsx)(nZe,{})},{path:iee,element:(0,U.jsx)(iZe,{})}]}]},{path:zr,element:(0,U.jsx)(e5,{children:(0,U.jsx)($8,{children:(0,U.jsx)(t5,{children:(0,U.jsx)(T5,{})})})}),children:[{path:Kr,element:(0,U.jsx)(dUe,{})},{path:Jr,element:(0,U.jsx)(mUe,{})},{path:ei,element:(0,U.jsx)(hUe,{})},{path:ti,element:(0,U.jsx)(gUe,{})},{path:ni,element:(0,U.jsx)(_Ue,{})}]},{path:uee,element:(0,U.jsx)(e5,{children:(0,U.jsx)($8,{children:(0,U.jsx)(T5,{})})}),children:[{index:!0,element:(0,U.jsx)(vUe,{})},{path:ri,element:(0,U.jsx)(xUe,{})},{path:xee,element:(0,U.jsx)(CUe,{})},{path:ai,element:(0,U.jsx)(aWe,{})},{path:fi,element:(0,U.jsx)(VUe,{})},{path:mi,element:(0,U.jsx)(UUe,{})},{path:li,element:(0,U.jsx)(S5,{children:(0,U.jsx)(BUe,{})})},{path:di,element:(0,U.jsx)(S5,{children:(0,U.jsx)(eZe,{})})},{path:oi,element:(0,U.jsx)(S5,{children:(0,U.jsx)(DUe,{})})},{path:ci,element:(0,U.jsx)(S5,{children:(0,U.jsx)(jUe,{})})},{path:gi,element:(0,U.jsx)(XXe,{})}]},{path:See,element:(0,U.jsx)(e5,{redirectTo:Lr(),children:(0,U.jsx)(cWe,{})})},{path:hee,element:(0,U.jsx)(e5,{children:(0,U.jsx)(r5,{})}),children:[{index:!0,element:(0,U.jsx)(JUe,{})},{path:gee,element:(0,U.jsx)(ZUe,{})},{path:_ee,element:(0,U.jsx)(eWe,{})},{path:yee,element:(0,U.jsx)(rWe,{})}]},{path:Or,element:(0,U.jsx)(_He,{})},{path:Mr,element:(0,U.jsx)(YHe,{})},{path:Ir,element:(0,U.jsx)($He,{})},{path:Si,element:(0,U.jsx)(mKe,{})},{path:wee,element:(0,U.jsx)(hKe,{})},{path:so,element:(0,U.jsx)(aqe,{})},{path:io,element:(0,U.jsx)(rqe,{})},{path:dne,element:(0,U.jsx)(iqe,{})},{path:lo,element:(0,U.jsx)(ae,{to:Wr(),replace:!0})},{path:fne,element:(0,U.jsx)(ae,{to:tee(),replace:!0})},{path:Ar,element:(0,U.jsx)(H5,{})},{path:ene,element:(0,U.jsx)(pKe,{})},{path:xne,element:(0,U.jsx)(CYe,{})},{path:`*`,element:(0,U.jsx)(H5,{})}].map(e=>nQe(tQe(e))),iQe=pe(rQe),aQe=()=>(0,U.jsxs)(`div`,{className:`h-full w-full`,children:[(0,U.jsxs)(wVe,{children:[(0,U.jsx)(GLe,{}),(0,U.jsx)(Kze,{})]}),(0,U.jsx)(ye,{router:iQe})]}),oQe=({store:e})=>(0,U.jsx)(V.StrictMode,{children:(0,U.jsx)(De,{schema:L,store:e,children:(0,U.jsx)(ne,{loading:(0,U.jsx)(SE,{}),children:(0,U.jsx)(aQe,{})})})}),sQe=r({closeModal:()=>lQe,openModal:()=>cQe}),cQe=qn.create(`open-modal`,function*(e,t){yield*L.update(L.modal.set(e.payload)),yield*t()}),lQe=qn.create(`close-modal`,function*(e,t){yield*L.update(L.modal.reset()),yield*t()}),uQe=r({selectTheme:()=>dQe}),dQe=L.theme.select,$9=[rn,eBe,Hre,mre,Sn,Gse,pn,Tre,jse,rre,Tse,rUe,z,uQe,Sse,Bae,tve,XBe,qze,gre,Kre,Qre,br,sQe],fQe=$9.reduce((e,t)=>
449t.entities?{...e,...t.entities}:e,{}),pQe={api:z.bootup,authApi:mr.bootup,metricTunnelApi:gr.bootup,thunks:qn.bootup,billingApi:hr.bootup,freezerApi:_r.bootup},mQe=$9.reduce((e,t)=>t.sagas?{...e,...t.sagas}:e,pQe),hQe=Object.values(mQe),gQe=ln(`fx`),_Qe={databases:[`connectionUrl`],databaseCredentials:[`connectionUrl`],endpoints:[`tokenHeader`],llmKeys:[`token`],logDrains:[`drainPassword`,`loggingToken`,`url`],metricDrains:[`drainConfiguration`,`agggregatorCaCertificate`,`aggregatorCaPrivateKeyBlob`,`aggregatorHost`]},vQe=[`drainConfiguration`];function yQe(e){return vQe.includes(e)?null:``}function bQe(e,t){let n={...e};for(let e of t)e in n&&(n[e]=yQe(e));return n}function xQe(e,t){let n={};for(let[r,i]of Object.entries(e))n[r]=bQe(i,t);return n}function SQe(){let e=x();return{...e,setItem:(t,n)=>{let r={...n};for(let[e,t]of Object.entries(_Qe)){let i=n[e];i&&typeof i==`object`&&(r[e]=xQe(i,t))}return e.setItem(t,r)}}}function CQe({logs:e=!0,initialState:t={}}){let n=X6(`aptible-enable-local-storage-caching`)===`true`,r=[`theme`,`nav`,`redirectPath`,`feedback`,`resourceStats`,`notices`],i=[...r,`apps`,`costs`,`databases`,`environments`,`stacks`,`services`,`endpoints`,`logDrains`,`metricDrains`,`images`,`llmKeys`,`persistentDisks`],a=d({adapter:n?SQe():x(),allowlist:n?i:r}),o=f({initialState:{...nn,entities:fQe,...t},middleware:[_(queueMicrotask),m(a)]}),s=[];return e&&s.push(function*(){for(;;){let e=yield*h(`*`);e.type!==`store`&&gQe(e)}}),s.push(...hQe),o.run(function*(){yield*a.rehydrate(),yield*L.update(L.loaders.success({id:y}));let e=yield*S(s);yield*BS.run(),yield*e}),o}function wQe(){let e=CQe({logs:!1});window.store=e;let t=document.getElementById(`app`);if(!t)throw Error(`#app element not found`);(0,Je.createRoot)(t,{onUncaughtError:ve(),onCaughtError:ve(),onRecoverableError:ve()}).render((0,U.jsx)(oQe,{store:e}))}Ce({dsn:`https://[email protected]/4504990894391296`,integrations:[],beforeSend(e){return e.user=e.user?.email?{email:e.user.email}:void 0,e.request=e.request?.url?{url:e.request.url}:void 0,e.contexts=void 0,e.extra=void 0,e.breadcrumbs=void 0,e.modules=void 0,e}}),wQe(); 450//# sourceMappingURL=index-D_38rT_I.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.