@esri/solutions-components 5.0.0 → 5.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/{J6Z7OGPT.js → 224I72SO.js} +1 -1
- package/dist/cdn/{JV3YKSCY.js → 2333JKXT.js} +1 -1
- package/dist/cdn/{3QLYSIKK.js → 243LX5NA.js} +1 -1
- package/dist/cdn/{G3RPEESM.js → 2SD4IYX3.js} +1 -1
- package/dist/cdn/{Z5H7S4UV.js → 2XLDIKUR.js} +1 -1
- package/dist/cdn/{PTPT75U6.js → 3RZAPX3S.js} +1 -1
- package/dist/cdn/{6OSOUHQD.js → 4JMP7ZE6.js} +1 -1
- package/dist/cdn/{S6XTVW2E.js → 4YJT24E5.js} +1 -1
- package/dist/cdn/{IW3HH57K.js → 5MTMSAKC.js} +1 -1
- package/dist/cdn/{LYMOZHWK.js → 5SHA3PGC.js} +1 -1
- package/dist/cdn/{SXOJTCOY.js → 6NMWB5NC.js} +1 -1
- package/dist/cdn/{C4M2JGW3.js → 6UJALA2L.js} +1 -1
- package/dist/cdn/{JRDWWNST.js → 6VKEW33C.js} +1 -1
- package/dist/cdn/{ONIWIJZN.js → 76M3UWJF.js} +1 -1
- package/dist/cdn/{R6DDGHRE.js → 7GQ24AKO.js} +1 -1
- package/dist/cdn/7PY2VM2S.js +2 -0
- package/dist/cdn/{ULPRAGHR.js → 7PZQ2MP7.js} +1 -1
- package/dist/cdn/{ASS5QC73.js → ARXWEJFK.js} +1 -1
- package/dist/cdn/{7JX6B3W3.js → AV3KXTWF.js} +1 -1
- package/dist/cdn/{QNT2CGG3.js → BXXYI7NG.js} +1 -1
- package/dist/cdn/{DJRQRVE7.js → BZVRRVNB.js} +1 -1
- package/dist/cdn/{KUYFIQG5.js → C5LZGCHH.js} +1 -1
- package/dist/cdn/CI66IACC.js +2 -0
- package/dist/cdn/DD3JC2L3.js +4 -0
- package/dist/cdn/{RGCDDZZ7.js → E7UFN5JY.js} +1 -1
- package/dist/cdn/{AS3OMVJG.js → EMSOP52X.js} +1 -1
- package/dist/cdn/{L4UMQNXD.js → ESOI3UW5.js} +1 -1
- package/dist/cdn/FMFUEICN.js +2 -0
- package/dist/cdn/{V3SPTOG3.js → FNGWQOMU.js} +1 -1
- package/dist/cdn/{QNSZUCGN.js → G2T6OYTB.js} +1 -1
- package/dist/cdn/{E4LHQX7P.js → GU77W2GF.js} +1 -1
- package/dist/cdn/HHKKBJCY.js +2 -0
- package/dist/cdn/{K3TXWVO2.js → HK7YZNM4.js} +1 -1
- package/dist/cdn/{QNTMCZAS.js → HTLJCLHR.js} +1 -1
- package/dist/cdn/{MGOL3BOX.js → HVE26GKL.js} +1 -1
- package/dist/cdn/{PRSBDD25.js → IQQXCY6C.js} +1 -1
- package/dist/cdn/{EVYF4Q4A.js → IZU7KP25.js} +1 -1
- package/dist/cdn/{PKLCCM5C.js → JAOKRCFG.js} +1 -1
- package/dist/cdn/{AELONRA2.js → JBJJMSR3.js} +1 -1
- package/dist/cdn/{7XSKL7BM.js → JUINWMBC.js} +1 -1
- package/dist/cdn/{4GUAHP55.js → K5Z5A2RY.js} +1 -1
- package/dist/cdn/{Q36LSOV4.js → M5MCA232.js} +1 -1
- package/dist/cdn/{HUTJQTEN.js → MBVWXJW7.js} +1 -1
- package/dist/cdn/{EUQ4JO3K.js → NCTVUAXT.js} +1 -1
- package/dist/cdn/{GPHDOTEY.js → NHKAOTFM.js} +1 -1
- package/dist/cdn/{DBPLH4RV.js → NNOOCMHD.js} +1 -1
- package/dist/cdn/{74XBLQLQ.js → NU2NW3YW.js} +1 -1
- package/dist/cdn/{56MHO3UY.js → O7AZMIQX.js} +1 -1
- package/dist/cdn/{Z5GWY442.js → OIFBNDN7.js} +1 -1
- package/dist/cdn/{V7JWKNPI.js → OLLLVTHU.js} +1 -1
- package/dist/cdn/{GRJZORJP.js → P6NSLBDS.js} +1 -1
- package/dist/cdn/{RLTX5S5V.js → P77GI3QL.js} +1 -1
- package/dist/cdn/{NVYKJK26.js → PAKIDHHK.js} +1 -1
- package/dist/cdn/{ENW2DF2D.js → PCG2HRKC.js} +1 -1
- package/dist/cdn/{M2KUCUL3.js → PQ7PCKL4.js} +1 -1
- package/dist/cdn/PSXEKRGH.js +2 -0
- package/dist/cdn/{EJJFSS5C.js → QRUCDIZO.js} +1 -1
- package/dist/cdn/QXSUDN7A.js +21 -0
- package/dist/cdn/{C7UAPXZR.js → RA35CIMF.js} +1 -1
- package/dist/cdn/{NPPIBUUP.js → RUU2LTYJ.js} +1 -1
- package/dist/cdn/{ZJZBIHZ5.js → S4WGAHIV.js} +1 -1
- package/dist/cdn/{2CMRI2B3.js → S7XOHDIW.js} +1 -1
- package/dist/cdn/{V7FXM6DJ.js → SLXAZV5B.js} +1 -1
- package/dist/cdn/{EYFR4JQP.js → SNN6XXHG.js} +1 -1
- package/dist/cdn/SPBICIV2.js +2 -0
- package/dist/cdn/SS7F2SZ4.js +2 -0
- package/dist/cdn/{5S7OJL7F.js → SSL3U5CO.js} +1 -1
- package/dist/cdn/{GVGTMXTG.js → SU77ODY2.js} +1 -1
- package/dist/cdn/TAHIBODN.js +2 -0
- package/dist/cdn/TE7VJ4KH.js +2 -0
- package/dist/cdn/{YHW6JKYZ.js → TOLNZKKL.js} +1 -1
- package/dist/cdn/{5KV6KCRT.js → UAUP4JQ4.js} +1 -1
- package/dist/cdn/{PDNBP4EL.js → VCZPVG3A.js} +1 -1
- package/dist/cdn/{QEZPZGBW.js → VGC3RHQQ.js} +1 -1
- package/dist/cdn/VLIHU4DD.js +2 -0
- package/dist/cdn/{6A5SBI3R.js → VWDJZ7HA.js} +1 -1
- package/dist/cdn/{RSLHX62X.js → WCGF6MFJ.js} +1 -1
- package/dist/cdn/WGKOKVQY.js +2 -0
- package/dist/cdn/WNOPX4X3.js +2 -0
- package/dist/cdn/WPV4X3NK.js +2 -0
- package/dist/cdn/{QMRCHKSO.js → XY5MX7TV.js} +1 -1
- package/dist/cdn/{HA5W44KL.js → Y3XY5BXI.js} +1 -1
- package/dist/cdn/{C5YQOXHX.js → YCLEJLXQ.js} +1 -1
- package/dist/cdn/{T6AL47LF.js → ZIPMI556.js} +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/runtime.js +1 -1
- package/dist/components/public-notification/customElement.js +3 -3
- package/dist/components/solutions-all-panel/customElement.js +8 -8
- package/dist/components/solutions-all-shell/customElement.js +9 -9
- package/dist/components/solutions-deployed-shell/customElement.js +2 -2
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/solutions-components_commit.txt +4 -4
- package/package.json +3 -3
- package/dist/cdn/4SZGXI37.js +0 -2
- package/dist/cdn/52QNBNIL.js +0 -2
- package/dist/cdn/AHXBPG3X.js +0 -2
- package/dist/cdn/BF6WA5U4.js +0 -2
- package/dist/cdn/CBVAXYAC.js +0 -2
- package/dist/cdn/D6VGQMIK.js +0 -2
- package/dist/cdn/ETEJ4PIB.js +0 -2
- package/dist/cdn/GSRMKEUC.js +0 -2
- package/dist/cdn/H74UJR3L.js +0 -2
- package/dist/cdn/HATDZAP6.js +0 -2
- package/dist/cdn/JJUJVV7A.js +0 -2
- package/dist/cdn/LHCWS2RN.js +0 -4
- package/dist/cdn/PLHWBWIG.js +0 -2
- package/dist/cdn/U4QFXUX2.js +0 -33
- package/dist/cdn/WNQD3BKN.js +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
|
|
2
|
-
import{a as pn}from"./HA5W44KL.js";import"./36I27Q5R.js";import"./GDPFKW75.js";import{b as dn}from"./2CMRI2B3.js";import{H as fn,h as cn,r as ln}from"./46DQNAMV.js";import"./OR4HXHSY.js";function Pi(){var e;return!!(!((e=window?.navigator)===null||e===void 0)&&e.globalPrivacyControl)}function ji(e={}){let{disabled:t,portal:n,requireConsent:r,userPrivacySettings:i}=e;if(r)if(i?.accepted){if(i?.functional===!1&&i?.performance===!1&&i?.targeting===!1)return!0}else return!0;return i?.accepted===!0&&i?.functional===!1&&i?.performance===!1&&i?.targeting===!1||t||n?.eueiEnabled===!1||Pi()?!0:!(!n||Ti(n)||Ni(n)||_i(n))}function Ti(e){return e.eueiEnabled&&e.user&&e.user.orgId===e.id}function Ni(e){return e.user&&!e.user.orgId&&e.ipCntryCode==="US"}function _i(e){return!e.user&&e.ipCntryCode==="US"}var Ue={storage:{},memory:!0,get(e){let t;try{t=window.localStorage&&window.localStorage.getItem(e)||this.storage[e]}catch{t=this.storage[e]}if(t)try{return JSON.parse(t)}catch{return}else return},set(e,t){let n=JSON.stringify(t);try{window.localStorage.setItem(e,n)}catch{this.memory||(console.error("setting local storage failed, falling back to in-memory storage"),this.memory=!0),this.storage[e]=t}},delete(e){try{window.localStorage.removeItem(e)}catch{this.memory||(console.error("setting local storage failed, falling back to in-memory storage"),this.memory=!0),delete this.storage[e]}}},Er="esri-telemetry";function Ci(e){return new Promise((t,n)=>{e.onload=t,e.onerror=n,(!Ui(e)||e.body)&&t()})}function Mi(e){let{id:t,dataAttribute:n}=e;return!!document.getElementById(t)||!!document.querySelector(`[data-${Er}="${n}"]`)}function Ui(e){let{body:t,src:n,id:r,dataAttribute:i,section:o="body",type:s="text/javascript",async:a=!1,defer:u=!1,onload:c,onerror:p}=e;if(typeof window>"u")throw new Fe("Window is undefined: Cannot add script element.");if(Mi(e)){console.log(`script (${r||i}) is already present, skipping`);return}let l=Di({id:r,dataAttribute:i,type:s,async:a,defer:u,body:t,src:n,onload:c,onerror:p});return o==="body"?document.body.appendChild(l):document.head.appendChild(l)}var Fe=class extends Error{};function Di({id:e,dataAttribute:t,type:n,async:r,defer:i,body:o,src:s,onload:a,onerror:u}){let c=document.createElement("script");return e&&(c.id=e),t&&c.setAttribute(`data-${Er}`,t),s&&(c.src=s),o&&(c.innerText=o),c.type=n,c.async=r,c.defer=i,a&&(c.onload=a),u&&(c.onerror=u),c}function Ri(e){return e.map(t=>{let n=[];return["src","id","dataAttribute","type"].forEach(r=>{let i=r;r==="dataAttribute"&&(i="data-esri-telemetry"),t[r]&&n.push(`${i}="${t[r]}"`)}),["async","defer"].forEach(r=>{t[r]&&n.push(`${r}`)}),`<script ${n.join(" ")}>${t.body?t.body:""}<\/script>`}).join("")}var zi=["esri.com","esriuk.com","esri.de","esri.ca","esrifrance.fr","esri.nl","esri-portugal.pt","esribulgaria.com","esri.fi","esri.kr","esrimalaysia.com.my","esri.es","esriaustralia.com.au","esri-southafrica.com","esri.cl","esrichina.com.cn","esri.co","esriturkey.com.tr","geodata.no","esriitalia.it","esri.pl"],kt=class{constructor(t){var n,r,i;this.trackers=[],this.options=t,this.debug=t.debug,this.suppressDisabledWarnings=t.suppressDisabledWarnings,this.logger=t.logger||console,t.userPrivacySettings&&(this._userPrivacySettings=t.userPrivacySettings),t.requireConsent&&!t.userPrivacySettings&&(this._userPrivacySettings={accepted:!1,performance:!1,targeting:!1,functional:!1,id:Vi(),timestamp:Date.now()},t.userPrivacySettings=this._userPrivacySettings),this.disabled=ji(t),this.disabled&&!this.suppressDisabledWarnings&&this.logger.info("Telemetry Disabled");let o=((n=t.portal)===null||n===void 0?void 0:n.user)||t.user;o&&this.setUser(o,(i=(r=t.portal)===null||r===void 0?void 0:r.subscriptionInfo)===null||i===void 0?void 0:i.type),this.disabled||this.initializeTrackers()}shouldInitializeTrackers(t,n,r){let i=!n&&!t?.accepted,o=r.every(s=>t?.[s]);return i||o}filterTrackers(t){return this.options.plugins.filter(n=>t.includes(n.name))}initializeTrackers(){let t=this._userPrivacySettings,n=this.options.requireConsent;this.trackers=[],this.options.plugins&&(t?(this.shouldInitializeTrackers(t,n,["performance"])&&this.trackers.push(...this.filterTrackers(["amazon"])),this.shouldInitializeTrackers(t,n,["performance","targeting","functional"])&&this.trackers.push(...this.filterTrackers(["adobe-analytics","googleAnalytics","siteimprove"]))):this.trackers.push(...this.options.plugins)),this.trackers.length||this.logger.info("No trackers configured")}getScriptTags(){return this.trackers.map(t=>t.getScriptTags&&t.getScriptTags()).join("")}async init(){let t=this.trackers.map(n=>n.init());await Promise.all(t)}setUser(t={},n="Public"){t=typeof t=="string"?{username:t}:t,this.user=t,this.user.accountType=n;let r;if(t.email&&t.email.split){let i=t.email.split("@")[1];r=zi.filter(o=>i===o).length>0}(r||["In House","Demo and Marketing"].indexOf(n)>-1)&&(this.user.internalUser=!0)}async updateUserPrivacySettings(t){let{accepted:n,performance:r,targeting:i,functional:o}=this._userPrivacySettings,s=t.accepted&&!n&&!this.options.requireConsent&&(!t.performance||!t.targeting||!t.functional)||!t.performance&&r||!t.targeting&&i||!t.functional&&o;return this._userPrivacySettings=t,s||(this.disabled=!1,this.initializeTrackers(),await this.init()),{reload:s}}logPageView(t,n={},r={}){if(this.disabled&&!this.suppressDisabledWarnings)return this.logger.info("Page view was not logged because telemetry is disabled."),!1;let i=this.trackers.filter(({disabled:a,hasError:u})=>!a&&!u);if(!i.length)return this.logger.info("Page view was not logged because no enabled telemetry-plugins are registered."),!1;let o=this.preProcess(n,r);this.debug&&this.logger.info("Tracking page view",JSON.stringify(o));let s=i.map(a=>a.logPageView(t,o));return Promise.all(s).then(),!0}logEvent(t,n={}){if(this.disabled&&!this.suppressDisabledWarnings)return this.logger.info("Event was not logged because telemetry is disabled."),!1;let r=this.trackers.filter(({disabled:s,hasError:a})=>!s&&!a);if(!r.length)return this.logger.info("Event was not logged because no enabled telemetry-plugins are registered."),!1;let i=this.preProcess(t,n);this.debug&&this.logger.info("Tracking event",JSON.stringify(i));let o=r.map(s=>s.logEvent(i));return Promise.all(o).then(),!0}logError(t={}){t=Object.assign({eventType:"error"},t),this.logEvent(t)}startWorkflow(t,n={}){let r={name:t,start:Date.now(),steps:[],workflowId:Math.floor((1+Math.random())*17592186044416).toString(16)};this.saveWorkflow(r);let i=Object.assign({name:t,step:"start"},n);return this.logWorkflow(i),r}stepWorkflow(t,n,r={}){let i=typeof r=="string"?r:r.details,o=Object.assign({name:t,step:n,details:i},r);this.logWorkflow(o)}endWorkflow(t,n={}){let r=Object.assign({name:t,step:"finish"},n);this.logWorkflow(r)}cancelWorkflow(t,n={}){let r=Object.assign({name:t,step:"cancel"},n);this.logWorkflow(r)}getWorkflow(t){let n=Ue.get(`TELEMETRY-WORKFLOW:${t}`);if(n){let r=Date.now()-n.start,i=1800*1e3;if(r<i)return n;this.deleteWorkflow(n)}}saveWorkflow(t){Ue.set(`TELEMETRY-WORKFLOW:${t.name}`,t)}deleteWorkflow(t){Ue.delete(`TELEMETRY-WORKFLOW:${t.name}`)}logWorkflow(t={}){t=this.preProcess(t);let n=this.getWorkflow(t.name);n||(this.startWorkflow(t.name),n=this.getWorkflow(t.name)),n.steps.push(t.step),n.duration=(Date.now()-n.start)/1e3,["cancel","finish"].indexOf(t.step)>-1?this.deleteWorkflow(n):this.saveWorkflow(n);let r=Object.assign(t,{eventType:"workflow",category:t.name,action:t.step,label:t.details,duration:n.duration,workflowId:n.workflowId});this.logEvent(r)}preProcess(t={},n={}){let r={};return this.user&&(r={user:"unknown",org:"unknown",lastLogin:this.user.lastLogin,userSince:this.user.created,internalUser:this.user.internalUser||!1,accountType:this.user.accountType}),Object.entries(Object.assign(Object.assign({},t),r)).reduce(Li(n.omitComplexData,this.logger),{})}disable(){this.disabled=!0,this.trackers.forEach(t=>{var n;t.hasError||(t.disabled=!0,(n=t.disable)===null||n===void 0||n.call(t))})}disableTracker(t){var n;let r=this.trackers.find(({name:i})=>i===t);r&&!r.hasError&&(r.disabled=!0,(n=r.disable)===null||n===void 0||n.call(r))}enableTracker(t){var n;let r=this.trackers.find(({name:i})=>i===t);r&&!r.hasError&&(r.disabled=!1,(n=r.enable)===null||n===void 0||n.call(r))}};function Li(e,t){return function(n,[r,i]){return $i(i)?n[r]=i:e||(t.warn(`You are trying to log a non-primitive value, ${r}:${JSON.stringify(i)}. This will get logged as [object Object]`),n[r]=i),n}}function $i(e){return["string","number","boolean","undefined"].includes(typeof e)||e&&typeof e.valueOf()=="string"}function Vi(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){let t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}function Gt(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}var At=class{constructor(t){var n;if(this.name="googleAnalytics",this.dimensions={},this.metrics={},this.isInitialized=!1,typeof window<"u"&&!(!((n=t?.measurementIds)===null||n===void 0)&&n.length))throw new Error("at least one measurementId needs to be provided in your configuration");Object.assign(this,t)}_getScripts(){return[{dataAttribute:"google-analytics",async:!0,src:`https://www.googletagmanager.com/gtag/js?id=${this.measurementIds?this.measurementIds[0]:""}`}]}getScriptTags(){return Ri(this._getScripts())}async init(){if(!this.isInitialized){if(typeof window>"u")throw new Fe("Window is undefined: Cannot add script element.");await Promise.all(this._getScripts().map(t=>Ci(t))),this.injectConfig(),this.isInitialized=!0}}logPageView(t,n={}){let r=this.buildCustomParams(n),i=Object.assign({page_title:t||window.location.pathname},r);return window.gtag("event","page_view",i),!0}logEvent(t){let{action:n}=t,r=Gt(t,["action"]),i=n||"other",o=this.buildCustomParams(r);return window.gtag("event",i,o),!0}disable(){this.measurementIds&&this.measurementIds.forEach(t=>{window[`ga-disable-${t}`]=!0})}enable(){this.measurementIds&&this.measurementIds.forEach(t=>{window[`ga-disable-${t}`]=void 0})}injectConfig(){window.dataLayer=window.dataLayer||[],window.gtag=function(){window.dataLayer.push(arguments)},window.gtag("js",new Date);let t={custom_map:this.createDimensionsAndMetricsCustomMap(this.dimensions,this.metrics),send_page_view:!1,anonymize_ip:!0};this.measurementIds.forEach(n=>{window.gtag("config",n,t)})}buildCustomParams(t){let n,{category:r,label:i}=t;return n=this.verifyCustomDimensionAndMetrics(t),r&&(n=Object.assign(Object.assign({},n),{event_category:r})),i&&(n=Object.assign(Object.assign({},n),{event_label:i})),n}verifyCustomDimensionAndMetrics(t){let n=this.createDimensionsAndMetricsCustomMap(this.dimensions,this.metrics),r=Object.values(n);return Object.keys(t).filter(i=>r.includes(i)).reduce((i,o)=>Object.assign(i,{[o]:t[o]}),{})}createDimensionsAndMetricsCustomMap(t={},n={}){let r=this.createMetricCustomMap(n),i=this.createDimensionCustomMap(t);return Object.assign(Object.assign({},r),i)}createMetricCustomMap(t={}){return Object.keys(t).map(function(n){return{key:`metric${t[n]}`,value:n}}).filter(n=>n).reduce((n,{key:r,value:i})=>(n[r]=i,n),{})}createDimensionCustomMap(t={}){return Object.keys(t).map(function(n){return{key:`dimension${t[n]}`,value:n}}).filter(n=>n).reduce((n,{key:r,value:i})=>(n[r]=i,n),{})}},gn="TELEMETRY_COGNITO_CREDENTIALS";function Wi(e,t={}){let n=`https://cognito-identity${t.fips===!0?"-fips":""}.us-east-1.amazonaws.com/`,r=Ue.get(gn);if(r&&Date.now()/1e3<r.Expiration)return Promise.resolve(r);let i={method:"POST",headers:{"Content-type":"application/x-amz-json-1.1","X-Amz-Target":"AWSCognitoIdentityService.GetId"},body:JSON.stringify({IdentityPoolId:e})};return fetch(n,i).then(o=>{if(!o.ok)throw new Error(o.statusText);return o.json()}).then(o=>{let{IdentityId:s}=o,a={method:"POST",headers:{"Content-type":"application/x-amz-json-1.1","X-Amz-Target":"AWSCognitoIdentityService.GetCredentialsForIdentity"},body:JSON.stringify({IdentityId:s})};return fetch(n,a)}).then(o=>{if(!o.ok)throw new Error(o.statusText);return o.json()}).then(({Credentials:o})=>(Ue.set(gn,o),o))}function Pr({telemetryData:e,dimensionLookup:t={},excludeKeys:n=[]}){return Object.keys(e).filter(r=>!n.includes(r)).map(r=>t[r]?{key:Hi(t,r),value:e[r]}:{key:r,value:qi(e,r)}).reduce((r,{key:i,value:o})=>(r[i]=o,r),{})}function qi(e,t){return t==="json"?e[t]?JSON.stringify(e[t]):"null":e[t]===void 0?"null":e[t].toString()}function Hi(e,t){return`dimension${e[t]}`}var Ki=["size","duration","position","number","count"];function jr(e,t={}){return Object.keys(e).filter(n=>t[n]||Ki.includes(n)).map(n=>t[n]?{key:Gi(t,n),value:e[n]}:{key:n,value:e[n]}).reduce((n,{key:r,value:i})=>(n[r]=i,n),{})}function Gi(e,t){return`metric${e[t]}`}function Ji({event:e={},dimensionLookup:t={},metricLookup:n={}}){var r,i;let{pathname:o,eventType:s="other"}=e,a=jr(e,n),u=Pr({telemetryData:Object.assign({eventType:s},e),dimensionLookup:t,excludeKeys:["workflow","pathname",...Object.keys(a),...Object.keys(n)]}),c=Object.assign(Object.assign({name:s},u),a);return typeof document<"u"&&document.referrer&&(c.referrer=document.referrer),typeof window<"u"&&!c.hostname&&(c.hostname=(r=window.location)===null||r===void 0?void 0:r.hostname),c.path=typeof window<"u"&&window.location.pathname?(i=window.location)===null||i===void 0?void 0:i.pathname:o,c}function Xi({page:e,previousPage:t={},options:n={},dimensionLookup:r={},metricLookup:i={}}){let o=jr(n,i),s=Pr({telemetryData:n,dimensionLookup:r,excludeKeys:["workflow",...Object.keys(o),...Object.keys(i)]}),{referrer:a,title:u}=document||{},{hostname:c,pathname:p}=window&&window.location?window.location:{};return Object.assign(Object.assign({name:"pageView",referrer:a,hostname:c,path:e||p,pageUrl:e||p,pageName:u,previousPageUrl:t.pageUrl,previousPageName:t.pageName},s),o)}function hn(e,t,n,r,i){for(t=t.split?t.split("."):t,r=0;r<t.length;r++)e=e?e[t[r]]:i;return e===i?n:e}var Fi="function",Bi="string",ne="undefined",Qi="boolean",Be="object",Yi="array",Zi="number",eo="symbol",to="null",no=function(){},Tr="any",Nr="*",we="__",ro="form",io="input",oo="button",so="select",Qe=typeof process!==ne?process:{};Qe.env&&Qe.env.NODE_ENV;var Z=typeof document!==ne;Qe.versions!=null&&Qe.versions.node!=null;typeof Deno!==ne&&Deno.core;Z&&window.name==="nodejs"||typeof navigator!==ne&&typeof navigator.userAgent!==ne&&(navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom"));function _r(e,t){return t.charAt(0)[e]()+t.slice(1)}var ao=_r.bind(null,"toUpperCase"),uo=_r.bind(null,"toLowerCase");function co(e){return Cr(e)?ao(to):typeof e===Be?go(e):Object.prototype.toString.call(e).slice(8,-1)}function Ye(e,t){t===void 0&&(t=!0);var n=co(e);return t?uo(n):n}function $e(e,t){return typeof t===e}var ee=$e.bind(null,Fi),le=$e.bind(null,Bi),Se=$e.bind(null,ne),lo=$e.bind(null,Qi);$e.bind(null,eo);function Cr(e){return e===null}function fo(e){return Ye(e)===Zi&&!isNaN(e)}function Mr(e){return Ye(e)===Yi}function Q(e){if(!po(e))return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function po(e){return e&&(typeof e===Be||e!==null)}function go(e){return ee(e.constructor)?e.constructor.name:null}function ho(e){return e instanceof Error||le(e.message)&&e.constructor&&fo(e.constructor.stackTraceLimit)}function Ur(e,t){if(typeof t!="object"||Cr(t))return!1;if(t instanceof e)return!0;var n=Ye(new e(""));if(ho(t))for(;t;){if(Ye(t)===n)return!0;t=Object.getPrototypeOf(t)}return!1}Ur.bind(null,TypeError);Ur.bind(null,SyntaxError);function nt(e,t){var n=e instanceof Element||e instanceof HTMLDocument;return n&&t?mo(e,t):n}function mo(e,t){return t===void 0&&(t=""),e&&e.nodeName===t.toUpperCase()}function rt(e){var t=[].slice.call(arguments,1);return function(){return e.apply(void 0,[].slice.call(arguments).concat(t))}}rt(nt,ro);rt(nt,oo);rt(nt,io);rt(nt,so);function yo(e){return e?Mr(e)?e:[e]:[]}function mn(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch{return null}}function vo(){if(Z){var e=navigator,t=e.languages;return e.userLanguage||(t&&t.length?t[0]:e.language)}}function bo(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{}}function wo(e){return(function(t){for(var n,r=Object.create(null),i=/([^&=]+)=?([^&]*)/g;n=i.exec(t);){var o=mn(n[1]),s=mn(n[2]);if(o)if(o.substring(o.length-2)==="[]"){var a=r[o=o.substring(0,o.length-2)]||(r[o]=[]);r[o]=Array.isArray(a)?a:[],r[o].push(s)}else r[o]=s===""||s}for(var u in r){var c=u.split("[");c.length>1&&(xo(r,c.map(function(p){return p.replace(/[?[\]\\ ]/g,"")}),r[u]),delete r[u])}return r})((function(t){return Z&&window.location.search.substring(1)})())}function xo(e,t,n){for(var r=t.length-1,i=0;i<r;++i){var o=t[i];if(o==="__proto__"||o==="constructor")break;o in e||(e[o]={}),e=e[o]}e[t[r]]=n}function xe(){for(var e="",t=0,n=4294967295*Math.random()|0;t++<36;){var r="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx"[t-1],i=15&n;e+=r=="-"||r=="4"?r:(r=="x"?i:3&i|8).toString(16),n=t%8==0?4294967295*Math.random()|0:n>>4}return e}var me="global",Ee=we+me+we,Pe=typeof self===Be&&self.self===self&&self||typeof global===Be&&global[me]===global&&global||void 0;function pe(e){return Pe[Ee][e]}function ge(e,t){return Pe[Ee][e]=t}function Te(e){delete Pe[Ee][e]}function Ne(e,t,n){var r;try{if(Jt(e)){var i=window[e];r=i[t].bind(i)}}catch{}return r||n}Pe[Ee]||(Pe[Ee]={});var We={};function Jt(e){if(typeof We[e]!==ne)return We[e];try{var t=window[e];t.setItem(ne,ne),t.removeItem(ne)}catch{return We[e]=!1}return We[e]=!0}function T(){return T=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},T.apply(null,arguments)}var ce="function",oe="undefined",De="reducer",Dr="@@redux/",It=Dr+"INIT",So=Dr+Math.random().toString(36),yn=(function(){return typeof Symbol===ce&&Symbol.observable||"@@observable"})(),qe=" != "+ce;function Rr(e,t,n){var r;if(typeof t===ce&&typeof n===oe&&(n=t,t=void 0),typeof n!==oe){if(typeof n!==ce)throw new Error("enhancer"+qe);return n(Rr)(e,t)}if(typeof e!==ce)throw new Error(De+qe);var i=e,o=t,s=[],a=s,u=!1;function c(){a===s&&(a=s.slice())}function p(){return o}function l(y){if(typeof y!==ce)throw new Error("Listener"+qe);var b=!0;return c(),a.push(y),function(){if(b){b=!1,c();var S=a.indexOf(y);a.splice(S,1)}}}function x(y){if(!Q(y))throw new Error("Act != obj");if(typeof y.type===oe)throw new Error("ActType "+oe);if(u)throw new Error("Dispatch in "+De);try{u=!0,o=i(o,y)}finally{u=!1}for(var b=s=a,S=0;S<b.length;S++)(0,b[S])();return y}return x({type:It}),(r={dispatch:x,subscribe:l,getState:p,replaceReducer:function(y){if(typeof y!==ce)throw new Error("next "+De+qe);i=y,x({type:It})}})[yn]=function(){var y,b=l;return(y={subscribe:function(S){if(typeof S!="object")throw new TypeError("Observer != obj");function h(){S.next&&S.next(p())}return h(),{unsubscribe:b(h)}}})[yn]=function(){return this},y},r}function Oo(e,t){var n=t&&t.type;return"action "+(n&&n.toString()||"?")+De+" "+e+" returns "+oe}function je(){var e=[].slice.call(arguments);return e.length===0?function(t){return t}:e.length===1?e[0]:e.reduce(function(t,n){return function(){return t(n.apply(void 0,[].slice.call(arguments)))}})}function ko(){var e=arguments;return function(t){return function(n,r,i){var o,s=t(n,r,i),a=s.dispatch,u={getState:s.getState,dispatch:function(c){return a(c)}};return o=[].slice.call(e).map(function(c){return c(u)}),T({},s,{dispatch:a=je.apply(void 0,o)(s.dispatch)})}}}var fe=we+"anon_id",ye=we+"user_id",ke=we+"user_traits",Et="analytics",ue="userId",Oe="anonymousId",Je=["bootstrap","params","campaign","initializeStart","initialize","initializeEnd","ready","resetStart","reset","resetEnd","pageStart","page","pageEnd","pageAborted","trackStart","track","trackEnd","trackAborted","identifyStart","identify","identifyEnd","identifyAborted","userIdChanged","registerPlugins","enablePlugin","disablePlugin","online","offline","setItemStart","setItem","setItemEnd","setItemAborted","removeItemStart","removeItem","removeItemEnd","removeItemAborted"],Pt=["name","EVENTS","config","loaded"],j=Je.reduce(function(e,t){return e[t]=t,e},{registerPluginType:function(e){return"registerPlugin:"+e},pluginReadyType:function(e){return"ready:"+e}}),vn=/^utm_/,bn=/^an_prop_/,wn=/^an_trait_/;function Ao(e){var t=e.storage.setItem;return function(n){return function(r){return function(i){if(i.type===j.bootstrap){var o=i.params,s=i.user,a=i.persistedUser,u=i.initialUser,c=a.userId===s.userId;a.anonymousId!==s.anonymousId&&t(fe,s.anonymousId),c||t(ye,s.userId),u.traits&&t(ke,T({},c&&a.traits?a.traits:{},u.traits));var p=Object.keys(i.params);if(p.length){var l=o.an_uid,x=o.an_event,y=p.reduce(function(b,S){if(S.match(vn)||S.match(/^(d|g)clid/)){var h=S.replace(vn,"");b.campaign[h==="campaign"?"name":h]=o[S]}return S.match(bn)&&(b.props[S.replace(bn,"")]=o[S]),S.match(wn)&&(b.traits[S.replace(wn,"")]=o[S]),b},{campaign:{},props:{},traits:{}});n.dispatch(T({type:j.params,raw:o},y,l?{userId:l}:{})),l&&setTimeout(function(){return e.identify(l,y.traits)},0),x&&setTimeout(function(){return e.track(x,y.props)},0),Object.keys(y.campaign).length&&n.dispatch({type:j.campaign,campaign:y.campaign})}}return r(i)}}}}function Io(e){return function(t,n){if(t===void 0&&(t={}),n===void 0&&(n={}),n.type===j.setItemEnd){if(n.key===fe)return T({},t,{anonymousId:n.value});if(n.key===ye)return T({},t,{userId:n.value})}switch(n.type){case j.identify:return Object.assign({},t,{userId:n.userId,traits:T({},t.traits,n.traits)});case j.reset:return[ye,fe,ke].forEach(function(r){e.removeItem(r)}),Object.assign({},t,{userId:null,anonymousId:null,traits:{}});default:return t}}}function xn(e){return{userId:e.getItem(ye),anonymousId:e.getItem(fe),traits:e.getItem(ke)}}var jt=function(e){return we+"TEMP"+we+e};function Eo(e){var t=e.storage,n=t.setItem,r=t.removeItem,i=t.getItem;return function(o){return function(s){return function(a){var u=a.userId,c=a.traits,p=a.options;if(a.type===j.reset&&([ye,ke,fe].forEach(function(y){r(y)}),[ue,Oe,"traits"].forEach(function(y){Te(jt(y))})),a.type===j.identify){i(fe)||n(fe,xe());var l=i(ye),x=i(ke)||{};l&&l!==u&&o.dispatch({type:j.userIdChanged,old:{userId:l,traits:x},new:{userId:u,traits:c},options:p}),u&&n(ye,u),c&&n(ke,T({},x,c))}return s(a)}}}}var Me={};function Sn(e,t){Me[e]&&ee(Me[e])&&(Me[e](t),delete Me[e])}function zr(e,t,n){return new Promise(function(r,i){return t()?r(e):n<1?i(T({},e,{queue:!0})):new Promise(function(o){return setTimeout(o,10)}).then(function(o){return zr(e,t,n-10).then(r,i)})})}function Po(e){return{abort:e}}function Lr(e,t,n){var r={},i=t(),o=e.getState(),s=o.plugins,a=o.queue,u=o.user;if(!o.context.offline&&a&&a.actions&&a.actions.length){var c=a.actions.reduce(function(l,x,y){return s[x.plugin].loaded?(l.process.push(x),l.processIndex.push(y)):(l.requeue.push(x),l.requeueIndex.push(y)),l},{processIndex:[],process:[],requeue:[],requeueIndex:[]});if(c.processIndex&&c.processIndex.length){c.processIndex.forEach(function(l){var x=a.actions[l],y=x.plugin,b=x.payload.type,S=i[y][b];if(S&&ee(S)){var h,f=(function(w,v){return w===void 0&&(w={}),v===void 0&&(v={}),[ue,Oe].reduce(function(A,k){return w.hasOwnProperty(k)&&v[k]&&v[k]!==w[k]&&(A[k]=v[k]),A},w)})(x.payload,u),m=r[f.meta.rid];if(!m&&(h=S({payload:f,config:s[y].config,instance:n,abort:Po}))&&Q(h)&&h.abort)return void(r[f.meta.rid]=!0);if(!m){var O=b+":"+y;e.dispatch(T({},f,{type:O,_:{called:O,from:"queueDrain"}}))}}});var p=a.actions.filter(function(l,x){return!~c.processIndex.indexOf(x)});a.actions=p}}}var dt=function(e){var t=e.data,n=e.action,r=e.instance,i=e.state,o=e.allPlugins,s=e.allMatches,a=e.store,u=e.EVENTS;try{var c=i.plugins,p=i.context,l=n.type,x=l.match(Ae),y=t.exact.map(function(h){return h.pluginName});x&&(y=s.during.map(function(h){return h.pluginName}));var b=(function(h,f){return function(m,O,w){var v=O.config,A=O.name,k=A+"."+m.type;w&&(k=w.event);var C=m.type.match(Ae)?(function(M,P,z,U,q){return function($,E){var H=U?U.name:M,D=E&&ze(E)?E:z;if(U&&(!(D=E&&ze(E)?E:[M]).includes(M)||D.length!==1))throw new Error("Method "+P+" can only abort "+M+" plugin. "+JSON.stringify(D)+" input valid");return T({},q,{abort:{reason:$,plugins:D,caller:P,_:H}})}})(A,k,f,w,m):(function(M,P){return function(){throw new Error(M.type+" action not cancellable. Remove abort in "+P)}})(m,k);return{payload:jo(m),instance:h,config:v||{},abort:C}}})(r,y),S=t.exact.reduce(function(h,f){var m=f.pluginName,O=f.methodName,w=!1;return O.match(/^initialize/)||O.match(/^reset/)||(w=!c[m].loaded),p.offline&&O.match(/^(page|track|identify)/)&&(w=!0),h[""+m]=w,h},{});return Promise.resolve(t.exact.reduce(function(h,f,m){var O=f.pluginName;return Promise.resolve(h).then(function(w){function v(){return Promise.resolve(w)}var A=(function(){if(t.namespaced&&t.namespaced[O])return Promise.resolve(t.namespaced[O].reduce(function(k,C,M){return Promise.resolve(k).then(function(P){return C.method&&ee(C.method)?((function($,E){var H=jn($);if(H&&H.name===E){var D=jn(H.method);throw new Error([E+" plugin is calling method "+$,"Plugins cant call self","Use "+H.method+" "+(D?"or "+D.method:"")+" in "+E+" plugin insteadof "+$].join(`
|
|
2
|
+
import{a as pn}from"./Y3XY5BXI.js";import"./36I27Q5R.js";import"./GDPFKW75.js";import{b as dn}from"./S7XOHDIW.js";import{H as fn,h as cn,r as ln}from"./46DQNAMV.js";import"./OR4HXHSY.js";function Pi(){var e;return!!(!((e=window?.navigator)===null||e===void 0)&&e.globalPrivacyControl)}function ji(e={}){let{disabled:t,portal:n,requireConsent:r,userPrivacySettings:i}=e;if(r)if(i?.accepted){if(i?.functional===!1&&i?.performance===!1&&i?.targeting===!1)return!0}else return!0;return i?.accepted===!0&&i?.functional===!1&&i?.performance===!1&&i?.targeting===!1||t||n?.eueiEnabled===!1||Pi()?!0:!(!n||Ti(n)||Ni(n)||_i(n))}function Ti(e){return e.eueiEnabled&&e.user&&e.user.orgId===e.id}function Ni(e){return e.user&&!e.user.orgId&&e.ipCntryCode==="US"}function _i(e){return!e.user&&e.ipCntryCode==="US"}var Ue={storage:{},memory:!0,get(e){let t;try{t=window.localStorage&&window.localStorage.getItem(e)||this.storage[e]}catch{t=this.storage[e]}if(t)try{return JSON.parse(t)}catch{return}else return},set(e,t){let n=JSON.stringify(t);try{window.localStorage.setItem(e,n)}catch{this.memory||(console.error("setting local storage failed, falling back to in-memory storage"),this.memory=!0),this.storage[e]=t}},delete(e){try{window.localStorage.removeItem(e)}catch{this.memory||(console.error("setting local storage failed, falling back to in-memory storage"),this.memory=!0),delete this.storage[e]}}},Er="esri-telemetry";function Ci(e){return new Promise((t,n)=>{e.onload=t,e.onerror=n,(!Ui(e)||e.body)&&t()})}function Mi(e){let{id:t,dataAttribute:n}=e;return!!document.getElementById(t)||!!document.querySelector(`[data-${Er}="${n}"]`)}function Ui(e){let{body:t,src:n,id:r,dataAttribute:i,section:o="body",type:s="text/javascript",async:a=!1,defer:u=!1,onload:c,onerror:p}=e;if(typeof window>"u")throw new Fe("Window is undefined: Cannot add script element.");if(Mi(e)){console.log(`script (${r||i}) is already present, skipping`);return}let l=Di({id:r,dataAttribute:i,type:s,async:a,defer:u,body:t,src:n,onload:c,onerror:p});return o==="body"?document.body.appendChild(l):document.head.appendChild(l)}var Fe=class extends Error{};function Di({id:e,dataAttribute:t,type:n,async:r,defer:i,body:o,src:s,onload:a,onerror:u}){let c=document.createElement("script");return e&&(c.id=e),t&&c.setAttribute(`data-${Er}`,t),s&&(c.src=s),o&&(c.innerText=o),c.type=n,c.async=r,c.defer=i,a&&(c.onload=a),u&&(c.onerror=u),c}function Ri(e){return e.map(t=>{let n=[];return["src","id","dataAttribute","type"].forEach(r=>{let i=r;r==="dataAttribute"&&(i="data-esri-telemetry"),t[r]&&n.push(`${i}="${t[r]}"`)}),["async","defer"].forEach(r=>{t[r]&&n.push(`${r}`)}),`<script ${n.join(" ")}>${t.body?t.body:""}<\/script>`}).join("")}var zi=["esri.com","esriuk.com","esri.de","esri.ca","esrifrance.fr","esri.nl","esri-portugal.pt","esribulgaria.com","esri.fi","esri.kr","esrimalaysia.com.my","esri.es","esriaustralia.com.au","esri-southafrica.com","esri.cl","esrichina.com.cn","esri.co","esriturkey.com.tr","geodata.no","esriitalia.it","esri.pl"],kt=class{constructor(t){var n,r,i;this.trackers=[],this.options=t,this.debug=t.debug,this.suppressDisabledWarnings=t.suppressDisabledWarnings,this.logger=t.logger||console,t.userPrivacySettings&&(this._userPrivacySettings=t.userPrivacySettings),t.requireConsent&&!t.userPrivacySettings&&(this._userPrivacySettings={accepted:!1,performance:!1,targeting:!1,functional:!1,id:Vi(),timestamp:Date.now()},t.userPrivacySettings=this._userPrivacySettings),this.disabled=ji(t),this.disabled&&!this.suppressDisabledWarnings&&this.logger.info("Telemetry Disabled");let o=((n=t.portal)===null||n===void 0?void 0:n.user)||t.user;o&&this.setUser(o,(i=(r=t.portal)===null||r===void 0?void 0:r.subscriptionInfo)===null||i===void 0?void 0:i.type),this.disabled||this.initializeTrackers()}shouldInitializeTrackers(t,n,r){let i=!n&&!t?.accepted,o=r.every(s=>t?.[s]);return i||o}filterTrackers(t){return this.options.plugins.filter(n=>t.includes(n.name))}initializeTrackers(){let t=this._userPrivacySettings,n=this.options.requireConsent;this.trackers=[],this.options.plugins&&(t?(this.shouldInitializeTrackers(t,n,["performance"])&&this.trackers.push(...this.filterTrackers(["amazon"])),this.shouldInitializeTrackers(t,n,["performance","targeting","functional"])&&this.trackers.push(...this.filterTrackers(["adobe-analytics","googleAnalytics","siteimprove"]))):this.trackers.push(...this.options.plugins)),this.trackers.length||this.logger.info("No trackers configured")}getScriptTags(){return this.trackers.map(t=>t.getScriptTags&&t.getScriptTags()).join("")}async init(){let t=this.trackers.map(n=>n.init());await Promise.all(t)}setUser(t={},n="Public"){t=typeof t=="string"?{username:t}:t,this.user=t,this.user.accountType=n;let r;if(t.email&&t.email.split){let i=t.email.split("@")[1];r=zi.filter(o=>i===o).length>0}(r||["In House","Demo and Marketing"].indexOf(n)>-1)&&(this.user.internalUser=!0)}async updateUserPrivacySettings(t){let{accepted:n,performance:r,targeting:i,functional:o}=this._userPrivacySettings,s=t.accepted&&!n&&!this.options.requireConsent&&(!t.performance||!t.targeting||!t.functional)||!t.performance&&r||!t.targeting&&i||!t.functional&&o;return this._userPrivacySettings=t,s||(this.disabled=!1,this.initializeTrackers(),await this.init()),{reload:s}}logPageView(t,n={},r={}){if(this.disabled&&!this.suppressDisabledWarnings)return this.logger.info("Page view was not logged because telemetry is disabled."),!1;let i=this.trackers.filter(({disabled:a,hasError:u})=>!a&&!u);if(!i.length)return this.logger.info("Page view was not logged because no enabled telemetry-plugins are registered."),!1;let o=this.preProcess(n,r);this.debug&&this.logger.info("Tracking page view",JSON.stringify(o));let s=i.map(a=>a.logPageView(t,o));return Promise.all(s).then(),!0}logEvent(t,n={}){if(this.disabled&&!this.suppressDisabledWarnings)return this.logger.info("Event was not logged because telemetry is disabled."),!1;let r=this.trackers.filter(({disabled:s,hasError:a})=>!s&&!a);if(!r.length)return this.logger.info("Event was not logged because no enabled telemetry-plugins are registered."),!1;let i=this.preProcess(t,n);this.debug&&this.logger.info("Tracking event",JSON.stringify(i));let o=r.map(s=>s.logEvent(i));return Promise.all(o).then(),!0}logError(t={}){t=Object.assign({eventType:"error"},t),this.logEvent(t)}startWorkflow(t,n={}){let r={name:t,start:Date.now(),steps:[],workflowId:Math.floor((1+Math.random())*17592186044416).toString(16)};this.saveWorkflow(r);let i=Object.assign({name:t,step:"start"},n);return this.logWorkflow(i),r}stepWorkflow(t,n,r={}){let i=typeof r=="string"?r:r.details,o=Object.assign({name:t,step:n,details:i},r);this.logWorkflow(o)}endWorkflow(t,n={}){let r=Object.assign({name:t,step:"finish"},n);this.logWorkflow(r)}cancelWorkflow(t,n={}){let r=Object.assign({name:t,step:"cancel"},n);this.logWorkflow(r)}getWorkflow(t){let n=Ue.get(`TELEMETRY-WORKFLOW:${t}`);if(n){let r=Date.now()-n.start,i=1800*1e3;if(r<i)return n;this.deleteWorkflow(n)}}saveWorkflow(t){Ue.set(`TELEMETRY-WORKFLOW:${t.name}`,t)}deleteWorkflow(t){Ue.delete(`TELEMETRY-WORKFLOW:${t.name}`)}logWorkflow(t={}){t=this.preProcess(t);let n=this.getWorkflow(t.name);n||(this.startWorkflow(t.name),n=this.getWorkflow(t.name)),n.steps.push(t.step),n.duration=(Date.now()-n.start)/1e3,["cancel","finish"].indexOf(t.step)>-1?this.deleteWorkflow(n):this.saveWorkflow(n);let r=Object.assign(t,{eventType:"workflow",category:t.name,action:t.step,label:t.details,duration:n.duration,workflowId:n.workflowId});this.logEvent(r)}preProcess(t={},n={}){let r={};return this.user&&(r={user:"unknown",org:"unknown",lastLogin:this.user.lastLogin,userSince:this.user.created,internalUser:this.user.internalUser||!1,accountType:this.user.accountType}),Object.entries(Object.assign(Object.assign({},t),r)).reduce(Li(n.omitComplexData,this.logger),{})}disable(){this.disabled=!0,this.trackers.forEach(t=>{var n;t.hasError||(t.disabled=!0,(n=t.disable)===null||n===void 0||n.call(t))})}disableTracker(t){var n;let r=this.trackers.find(({name:i})=>i===t);r&&!r.hasError&&(r.disabled=!0,(n=r.disable)===null||n===void 0||n.call(r))}enableTracker(t){var n;let r=this.trackers.find(({name:i})=>i===t);r&&!r.hasError&&(r.disabled=!1,(n=r.enable)===null||n===void 0||n.call(r))}};function Li(e,t){return function(n,[r,i]){return $i(i)?n[r]=i:e||(t.warn(`You are trying to log a non-primitive value, ${r}:${JSON.stringify(i)}. This will get logged as [object Object]`),n[r]=i),n}}function $i(e){return["string","number","boolean","undefined"].includes(typeof e)||e&&typeof e.valueOf()=="string"}function Vi(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){let t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}function Gt(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}var At=class{constructor(t){var n;if(this.name="googleAnalytics",this.dimensions={},this.metrics={},this.isInitialized=!1,typeof window<"u"&&!(!((n=t?.measurementIds)===null||n===void 0)&&n.length))throw new Error("at least one measurementId needs to be provided in your configuration");Object.assign(this,t)}_getScripts(){return[{dataAttribute:"google-analytics",async:!0,src:`https://www.googletagmanager.com/gtag/js?id=${this.measurementIds?this.measurementIds[0]:""}`}]}getScriptTags(){return Ri(this._getScripts())}async init(){if(!this.isInitialized){if(typeof window>"u")throw new Fe("Window is undefined: Cannot add script element.");await Promise.all(this._getScripts().map(t=>Ci(t))),this.injectConfig(),this.isInitialized=!0}}logPageView(t,n={}){let r=this.buildCustomParams(n),i=Object.assign({page_title:t||window.location.pathname},r);return window.gtag("event","page_view",i),!0}logEvent(t){let{action:n}=t,r=Gt(t,["action"]),i=n||"other",o=this.buildCustomParams(r);return window.gtag("event",i,o),!0}disable(){this.measurementIds&&this.measurementIds.forEach(t=>{window[`ga-disable-${t}`]=!0})}enable(){this.measurementIds&&this.measurementIds.forEach(t=>{window[`ga-disable-${t}`]=void 0})}injectConfig(){window.dataLayer=window.dataLayer||[],window.gtag=function(){window.dataLayer.push(arguments)},window.gtag("js",new Date);let t={custom_map:this.createDimensionsAndMetricsCustomMap(this.dimensions,this.metrics),send_page_view:!1,anonymize_ip:!0};this.measurementIds.forEach(n=>{window.gtag("config",n,t)})}buildCustomParams(t){let n,{category:r,label:i}=t;return n=this.verifyCustomDimensionAndMetrics(t),r&&(n=Object.assign(Object.assign({},n),{event_category:r})),i&&(n=Object.assign(Object.assign({},n),{event_label:i})),n}verifyCustomDimensionAndMetrics(t){let n=this.createDimensionsAndMetricsCustomMap(this.dimensions,this.metrics),r=Object.values(n);return Object.keys(t).filter(i=>r.includes(i)).reduce((i,o)=>Object.assign(i,{[o]:t[o]}),{})}createDimensionsAndMetricsCustomMap(t={},n={}){let r=this.createMetricCustomMap(n),i=this.createDimensionCustomMap(t);return Object.assign(Object.assign({},r),i)}createMetricCustomMap(t={}){return Object.keys(t).map(function(n){return{key:`metric${t[n]}`,value:n}}).filter(n=>n).reduce((n,{key:r,value:i})=>(n[r]=i,n),{})}createDimensionCustomMap(t={}){return Object.keys(t).map(function(n){return{key:`dimension${t[n]}`,value:n}}).filter(n=>n).reduce((n,{key:r,value:i})=>(n[r]=i,n),{})}},gn="TELEMETRY_COGNITO_CREDENTIALS";function Wi(e,t={}){let n=`https://cognito-identity${t.fips===!0?"-fips":""}.us-east-1.amazonaws.com/`,r=Ue.get(gn);if(r&&Date.now()/1e3<r.Expiration)return Promise.resolve(r);let i={method:"POST",headers:{"Content-type":"application/x-amz-json-1.1","X-Amz-Target":"AWSCognitoIdentityService.GetId"},body:JSON.stringify({IdentityPoolId:e})};return fetch(n,i).then(o=>{if(!o.ok)throw new Error(o.statusText);return o.json()}).then(o=>{let{IdentityId:s}=o,a={method:"POST",headers:{"Content-type":"application/x-amz-json-1.1","X-Amz-Target":"AWSCognitoIdentityService.GetCredentialsForIdentity"},body:JSON.stringify({IdentityId:s})};return fetch(n,a)}).then(o=>{if(!o.ok)throw new Error(o.statusText);return o.json()}).then(({Credentials:o})=>(Ue.set(gn,o),o))}function Pr({telemetryData:e,dimensionLookup:t={},excludeKeys:n=[]}){return Object.keys(e).filter(r=>!n.includes(r)).map(r=>t[r]?{key:Hi(t,r),value:e[r]}:{key:r,value:qi(e,r)}).reduce((r,{key:i,value:o})=>(r[i]=o,r),{})}function qi(e,t){return t==="json"?e[t]?JSON.stringify(e[t]):"null":e[t]===void 0?"null":e[t].toString()}function Hi(e,t){return`dimension${e[t]}`}var Ki=["size","duration","position","number","count"];function jr(e,t={}){return Object.keys(e).filter(n=>t[n]||Ki.includes(n)).map(n=>t[n]?{key:Gi(t,n),value:e[n]}:{key:n,value:e[n]}).reduce((n,{key:r,value:i})=>(n[r]=i,n),{})}function Gi(e,t){return`metric${e[t]}`}function Ji({event:e={},dimensionLookup:t={},metricLookup:n={}}){var r,i;let{pathname:o,eventType:s="other"}=e,a=jr(e,n),u=Pr({telemetryData:Object.assign({eventType:s},e),dimensionLookup:t,excludeKeys:["workflow","pathname",...Object.keys(a),...Object.keys(n)]}),c=Object.assign(Object.assign({name:s},u),a);return typeof document<"u"&&document.referrer&&(c.referrer=document.referrer),typeof window<"u"&&!c.hostname&&(c.hostname=(r=window.location)===null||r===void 0?void 0:r.hostname),c.path=typeof window<"u"&&window.location.pathname?(i=window.location)===null||i===void 0?void 0:i.pathname:o,c}function Xi({page:e,previousPage:t={},options:n={},dimensionLookup:r={},metricLookup:i={}}){let o=jr(n,i),s=Pr({telemetryData:n,dimensionLookup:r,excludeKeys:["workflow",...Object.keys(o),...Object.keys(i)]}),{referrer:a,title:u}=document||{},{hostname:c,pathname:p}=window&&window.location?window.location:{};return Object.assign(Object.assign({name:"pageView",referrer:a,hostname:c,path:e||p,pageUrl:e||p,pageName:u,previousPageUrl:t.pageUrl,previousPageName:t.pageName},s),o)}function hn(e,t,n,r,i){for(t=t.split?t.split("."):t,r=0;r<t.length;r++)e=e?e[t[r]]:i;return e===i?n:e}var Fi="function",Bi="string",ne="undefined",Qi="boolean",Be="object",Yi="array",Zi="number",eo="symbol",to="null",no=function(){},Tr="any",Nr="*",we="__",ro="form",io="input",oo="button",so="select",Qe=typeof process!==ne?process:{};Qe.env&&Qe.env.NODE_ENV;var Z=typeof document!==ne;Qe.versions!=null&&Qe.versions.node!=null;typeof Deno!==ne&&Deno.core;Z&&window.name==="nodejs"||typeof navigator!==ne&&typeof navigator.userAgent!==ne&&(navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom"));function _r(e,t){return t.charAt(0)[e]()+t.slice(1)}var ao=_r.bind(null,"toUpperCase"),uo=_r.bind(null,"toLowerCase");function co(e){return Cr(e)?ao(to):typeof e===Be?go(e):Object.prototype.toString.call(e).slice(8,-1)}function Ye(e,t){t===void 0&&(t=!0);var n=co(e);return t?uo(n):n}function $e(e,t){return typeof t===e}var ee=$e.bind(null,Fi),le=$e.bind(null,Bi),Se=$e.bind(null,ne),lo=$e.bind(null,Qi);$e.bind(null,eo);function Cr(e){return e===null}function fo(e){return Ye(e)===Zi&&!isNaN(e)}function Mr(e){return Ye(e)===Yi}function Q(e){if(!po(e))return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function po(e){return e&&(typeof e===Be||e!==null)}function go(e){return ee(e.constructor)?e.constructor.name:null}function ho(e){return e instanceof Error||le(e.message)&&e.constructor&&fo(e.constructor.stackTraceLimit)}function Ur(e,t){if(typeof t!="object"||Cr(t))return!1;if(t instanceof e)return!0;var n=Ye(new e(""));if(ho(t))for(;t;){if(Ye(t)===n)return!0;t=Object.getPrototypeOf(t)}return!1}Ur.bind(null,TypeError);Ur.bind(null,SyntaxError);function nt(e,t){var n=e instanceof Element||e instanceof HTMLDocument;return n&&t?mo(e,t):n}function mo(e,t){return t===void 0&&(t=""),e&&e.nodeName===t.toUpperCase()}function rt(e){var t=[].slice.call(arguments,1);return function(){return e.apply(void 0,[].slice.call(arguments).concat(t))}}rt(nt,ro);rt(nt,oo);rt(nt,io);rt(nt,so);function yo(e){return e?Mr(e)?e:[e]:[]}function mn(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch{return null}}function vo(){if(Z){var e=navigator,t=e.languages;return e.userLanguage||(t&&t.length?t[0]:e.language)}}function bo(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{}}function wo(e){return(function(t){for(var n,r=Object.create(null),i=/([^&=]+)=?([^&]*)/g;n=i.exec(t);){var o=mn(n[1]),s=mn(n[2]);if(o)if(o.substring(o.length-2)==="[]"){var a=r[o=o.substring(0,o.length-2)]||(r[o]=[]);r[o]=Array.isArray(a)?a:[],r[o].push(s)}else r[o]=s===""||s}for(var u in r){var c=u.split("[");c.length>1&&(xo(r,c.map(function(p){return p.replace(/[?[\]\\ ]/g,"")}),r[u]),delete r[u])}return r})((function(t){return Z&&window.location.search.substring(1)})())}function xo(e,t,n){for(var r=t.length-1,i=0;i<r;++i){var o=t[i];if(o==="__proto__"||o==="constructor")break;o in e||(e[o]={}),e=e[o]}e[t[r]]=n}function xe(){for(var e="",t=0,n=4294967295*Math.random()|0;t++<36;){var r="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx"[t-1],i=15&n;e+=r=="-"||r=="4"?r:(r=="x"?i:3&i|8).toString(16),n=t%8==0?4294967295*Math.random()|0:n>>4}return e}var me="global",Ee=we+me+we,Pe=typeof self===Be&&self.self===self&&self||typeof global===Be&&global[me]===global&&global||void 0;function pe(e){return Pe[Ee][e]}function ge(e,t){return Pe[Ee][e]=t}function Te(e){delete Pe[Ee][e]}function Ne(e,t,n){var r;try{if(Jt(e)){var i=window[e];r=i[t].bind(i)}}catch{}return r||n}Pe[Ee]||(Pe[Ee]={});var We={};function Jt(e){if(typeof We[e]!==ne)return We[e];try{var t=window[e];t.setItem(ne,ne),t.removeItem(ne)}catch{return We[e]=!1}return We[e]=!0}function T(){return T=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},T.apply(null,arguments)}var ce="function",oe="undefined",De="reducer",Dr="@@redux/",It=Dr+"INIT",So=Dr+Math.random().toString(36),yn=(function(){return typeof Symbol===ce&&Symbol.observable||"@@observable"})(),qe=" != "+ce;function Rr(e,t,n){var r;if(typeof t===ce&&typeof n===oe&&(n=t,t=void 0),typeof n!==oe){if(typeof n!==ce)throw new Error("enhancer"+qe);return n(Rr)(e,t)}if(typeof e!==ce)throw new Error(De+qe);var i=e,o=t,s=[],a=s,u=!1;function c(){a===s&&(a=s.slice())}function p(){return o}function l(y){if(typeof y!==ce)throw new Error("Listener"+qe);var b=!0;return c(),a.push(y),function(){if(b){b=!1,c();var S=a.indexOf(y);a.splice(S,1)}}}function x(y){if(!Q(y))throw new Error("Act != obj");if(typeof y.type===oe)throw new Error("ActType "+oe);if(u)throw new Error("Dispatch in "+De);try{u=!0,o=i(o,y)}finally{u=!1}for(var b=s=a,S=0;S<b.length;S++)(0,b[S])();return y}return x({type:It}),(r={dispatch:x,subscribe:l,getState:p,replaceReducer:function(y){if(typeof y!==ce)throw new Error("next "+De+qe);i=y,x({type:It})}})[yn]=function(){var y,b=l;return(y={subscribe:function(S){if(typeof S!="object")throw new TypeError("Observer != obj");function h(){S.next&&S.next(p())}return h(),{unsubscribe:b(h)}}})[yn]=function(){return this},y},r}function Oo(e,t){var n=t&&t.type;return"action "+(n&&n.toString()||"?")+De+" "+e+" returns "+oe}function je(){var e=[].slice.call(arguments);return e.length===0?function(t){return t}:e.length===1?e[0]:e.reduce(function(t,n){return function(){return t(n.apply(void 0,[].slice.call(arguments)))}})}function ko(){var e=arguments;return function(t){return function(n,r,i){var o,s=t(n,r,i),a=s.dispatch,u={getState:s.getState,dispatch:function(c){return a(c)}};return o=[].slice.call(e).map(function(c){return c(u)}),T({},s,{dispatch:a=je.apply(void 0,o)(s.dispatch)})}}}var fe=we+"anon_id",ye=we+"user_id",ke=we+"user_traits",Et="analytics",ue="userId",Oe="anonymousId",Je=["bootstrap","params","campaign","initializeStart","initialize","initializeEnd","ready","resetStart","reset","resetEnd","pageStart","page","pageEnd","pageAborted","trackStart","track","trackEnd","trackAborted","identifyStart","identify","identifyEnd","identifyAborted","userIdChanged","registerPlugins","enablePlugin","disablePlugin","online","offline","setItemStart","setItem","setItemEnd","setItemAborted","removeItemStart","removeItem","removeItemEnd","removeItemAborted"],Pt=["name","EVENTS","config","loaded"],j=Je.reduce(function(e,t){return e[t]=t,e},{registerPluginType:function(e){return"registerPlugin:"+e},pluginReadyType:function(e){return"ready:"+e}}),vn=/^utm_/,bn=/^an_prop_/,wn=/^an_trait_/;function Ao(e){var t=e.storage.setItem;return function(n){return function(r){return function(i){if(i.type===j.bootstrap){var o=i.params,s=i.user,a=i.persistedUser,u=i.initialUser,c=a.userId===s.userId;a.anonymousId!==s.anonymousId&&t(fe,s.anonymousId),c||t(ye,s.userId),u.traits&&t(ke,T({},c&&a.traits?a.traits:{},u.traits));var p=Object.keys(i.params);if(p.length){var l=o.an_uid,x=o.an_event,y=p.reduce(function(b,S){if(S.match(vn)||S.match(/^(d|g)clid/)){var h=S.replace(vn,"");b.campaign[h==="campaign"?"name":h]=o[S]}return S.match(bn)&&(b.props[S.replace(bn,"")]=o[S]),S.match(wn)&&(b.traits[S.replace(wn,"")]=o[S]),b},{campaign:{},props:{},traits:{}});n.dispatch(T({type:j.params,raw:o},y,l?{userId:l}:{})),l&&setTimeout(function(){return e.identify(l,y.traits)},0),x&&setTimeout(function(){return e.track(x,y.props)},0),Object.keys(y.campaign).length&&n.dispatch({type:j.campaign,campaign:y.campaign})}}return r(i)}}}}function Io(e){return function(t,n){if(t===void 0&&(t={}),n===void 0&&(n={}),n.type===j.setItemEnd){if(n.key===fe)return T({},t,{anonymousId:n.value});if(n.key===ye)return T({},t,{userId:n.value})}switch(n.type){case j.identify:return Object.assign({},t,{userId:n.userId,traits:T({},t.traits,n.traits)});case j.reset:return[ye,fe,ke].forEach(function(r){e.removeItem(r)}),Object.assign({},t,{userId:null,anonymousId:null,traits:{}});default:return t}}}function xn(e){return{userId:e.getItem(ye),anonymousId:e.getItem(fe),traits:e.getItem(ke)}}var jt=function(e){return we+"TEMP"+we+e};function Eo(e){var t=e.storage,n=t.setItem,r=t.removeItem,i=t.getItem;return function(o){return function(s){return function(a){var u=a.userId,c=a.traits,p=a.options;if(a.type===j.reset&&([ye,ke,fe].forEach(function(y){r(y)}),[ue,Oe,"traits"].forEach(function(y){Te(jt(y))})),a.type===j.identify){i(fe)||n(fe,xe());var l=i(ye),x=i(ke)||{};l&&l!==u&&o.dispatch({type:j.userIdChanged,old:{userId:l,traits:x},new:{userId:u,traits:c},options:p}),u&&n(ye,u),c&&n(ke,T({},x,c))}return s(a)}}}}var Me={};function Sn(e,t){Me[e]&&ee(Me[e])&&(Me[e](t),delete Me[e])}function zr(e,t,n){return new Promise(function(r,i){return t()?r(e):n<1?i(T({},e,{queue:!0})):new Promise(function(o){return setTimeout(o,10)}).then(function(o){return zr(e,t,n-10).then(r,i)})})}function Po(e){return{abort:e}}function Lr(e,t,n){var r={},i=t(),o=e.getState(),s=o.plugins,a=o.queue,u=o.user;if(!o.context.offline&&a&&a.actions&&a.actions.length){var c=a.actions.reduce(function(l,x,y){return s[x.plugin].loaded?(l.process.push(x),l.processIndex.push(y)):(l.requeue.push(x),l.requeueIndex.push(y)),l},{processIndex:[],process:[],requeue:[],requeueIndex:[]});if(c.processIndex&&c.processIndex.length){c.processIndex.forEach(function(l){var x=a.actions[l],y=x.plugin,b=x.payload.type,S=i[y][b];if(S&&ee(S)){var h,f=(function(w,v){return w===void 0&&(w={}),v===void 0&&(v={}),[ue,Oe].reduce(function(A,k){return w.hasOwnProperty(k)&&v[k]&&v[k]!==w[k]&&(A[k]=v[k]),A},w)})(x.payload,u),m=r[f.meta.rid];if(!m&&(h=S({payload:f,config:s[y].config,instance:n,abort:Po}))&&Q(h)&&h.abort)return void(r[f.meta.rid]=!0);if(!m){var O=b+":"+y;e.dispatch(T({},f,{type:O,_:{called:O,from:"queueDrain"}}))}}});var p=a.actions.filter(function(l,x){return!~c.processIndex.indexOf(x)});a.actions=p}}}var dt=function(e){var t=e.data,n=e.action,r=e.instance,i=e.state,o=e.allPlugins,s=e.allMatches,a=e.store,u=e.EVENTS;try{var c=i.plugins,p=i.context,l=n.type,x=l.match(Ae),y=t.exact.map(function(h){return h.pluginName});x&&(y=s.during.map(function(h){return h.pluginName}));var b=(function(h,f){return function(m,O,w){var v=O.config,A=O.name,k=A+"."+m.type;w&&(k=w.event);var C=m.type.match(Ae)?(function(M,P,z,U,q){return function($,E){var H=U?U.name:M,D=E&&ze(E)?E:z;if(U&&(!(D=E&&ze(E)?E:[M]).includes(M)||D.length!==1))throw new Error("Method "+P+" can only abort "+M+" plugin. "+JSON.stringify(D)+" input valid");return T({},q,{abort:{reason:$,plugins:D,caller:P,_:H}})}})(A,k,f,w,m):(function(M,P){return function(){throw new Error(M.type+" action not cancellable. Remove abort in "+P)}})(m,k);return{payload:jo(m),instance:h,config:v||{},abort:C}}})(r,y),S=t.exact.reduce(function(h,f){var m=f.pluginName,O=f.methodName,w=!1;return O.match(/^initialize/)||O.match(/^reset/)||(w=!c[m].loaded),p.offline&&O.match(/^(page|track|identify)/)&&(w=!0),h[""+m]=w,h},{});return Promise.resolve(t.exact.reduce(function(h,f,m){var O=f.pluginName;return Promise.resolve(h).then(function(w){function v(){return Promise.resolve(w)}var A=(function(){if(t.namespaced&&t.namespaced[O])return Promise.resolve(t.namespaced[O].reduce(function(k,C,M){return Promise.resolve(k).then(function(P){return C.method&&ee(C.method)?((function($,E){var H=jn($);if(H&&H.name===E){var D=jn(H.method);throw new Error([E+" plugin is calling method "+$,"Plugins cant call self","Use "+H.method+" "+(D?"or "+D.method:"")+" in "+E+" plugin insteadof "+$].join(`
|
|
3
3
|
`))}})(C.methodName,C.pluginName),Promise.resolve(C.method({payload:P,instance:r,abort:(z=P,U=O,q=C.pluginName,function($,E){return T({},z,{abort:{reason:$,plugins:E||[U],caller:l,from:q||U}})}),config:An(C.pluginName,c,o),plugins:c})).then(function($){var E=Q($)?$:{};return Promise.resolve(T({},P,E))})):P;var z,U,q})},Promise.resolve(n))).then(function(k){w[O]=k});w[O]=n})();return A&&A.then?A.then(v):v()})},Promise.resolve({}))).then(function(h){return Promise.resolve(t.exact.reduce(function(f,m,O){try{var w=t.exact.length===O+1,v=m.pluginName,A=o[v];return Promise.resolve(f).then(function(k){var C=h[v]?h[v]:{};if(x&&(C=k),gt(C,v))return pt({data:C,method:l,instance:r,pluginName:v,store:a}),Promise.resolve(k);if(gt(k,v))return w&&pt({data:k,method:l,instance:r,store:a}),Promise.resolve(k);if(S.hasOwnProperty(v)&&S[v]===!0)return a.dispatch({type:"queue",plugin:v,payload:C,_:{called:"queue",from:"queueMechanism"}}),Promise.resolve(k);var M=b(h[v],o[v]);return Promise.resolve(A[l]({abort:M.abort,payload:C,instance:r,config:An(v,c,o),plugins:c})).then(function(P){var z=Q(P)?P:{},U=T({},k,z),q=h[v];if(gt(q,v))pt({data:q,method:l,instance:r,pluginName:v,store:a});else{var $=l+":"+v;($.match(/:/g)||[]).length<2&&!l.match(On)&&!l.match(kn)&&r.dispatch(T({},x?U:C,{type:$,_:{called:$,from:"submethod"}}))}return Promise.resolve(U)})})}catch(k){return Promise.reject(k)}},Promise.resolve(n))).then(function(f){if(!(l.match(Ae)||l.match(/^registerPlugin/)||l.match(kn)||l.match(On)||l.match(/^params/)||l.match(/^userIdChanged/))){if(u.plugins.includes(l),f._&&f._.originalAction===l)return f;var m=T({},f,{_:{originalAction:f.type,called:f.type,from:"engineEnd"}});$r(f,t.exact.length)&&!l.match(/End$/)&&(m=T({},m,{type:f.type+"Aborted"})),a.dispatch(m)}return f})})}catch(h){return Promise.reject(h)}},Ae=/Start$/,On=/^bootstrap/,kn=/^ready/;function pt(e){var t=e.pluginName,n=e.method+"Aborted"+(t?":"+t:"");e.store.dispatch(T({},e.data,{type:n,_:{called:n,from:"abort"}}))}function An(e,t,n){var r=t[e]||n[e];return r&&r.config?r.config:{}}function In(e,t){return t.reduce(function(n,r){return r[e]?n.concat({methodName:e,pluginName:r.name,method:r[e]}):n},[])}function En(e,t){var n=e.replace(Ae,""),r=t?":"+t:"";return[""+e+r,""+n+r,n+"End"+r]}function gt(e,t){var n=e.abort;return!!n&&(n===!0||Pn(n,t)||n&&Pn(n.plugins,t))}function $r(e,t){var n=e.abort;if(!n)return!1;if(n===!0||le(n))return!0;var r=n.plugins;return ze(n)&&n.length===t||ze(r)&&r.length===t}function ze(e){return Array.isArray(e)}function Pn(e,t){return!(!e||!ze(e))&&e.includes(t)}function jn(e){var t=e.match(/(.*):(.*)/);return!!t&&{method:t[1],name:t[2]}}function jo(e){return Object.keys(e).reduce(function(t,n){return n==="type"||(t[n]=Q(e[n])?Object.assign({},e[n]):e[n]),t},{})}function To(e,t,n){var r={};return function(i){return function(o){return function(s){try{var a,u=function(w){return a?w:o(l)},c=s.type,p=s.plugins,l=s;if(s.abort)return Promise.resolve(o(s));if(c===j.enablePlugin&&i.dispatch({type:j.initializeStart,plugins:p,disabled:[],fromEnable:!0,meta:s.meta}),c===j.disablePlugin&&setTimeout(function(){return Sn(s.meta.rid,{payload:s})},0),c===j.initializeEnd){var x=t(),y=Object.keys(x),b=y.filter(function(w){return p.includes(w)}).map(function(w){return x[w]}),S=[],h=[],f=s.disabled,m=b.map(function(w){var v=w.loaded,A=w.name,k=w.config;return zr(w,function(){return v({config:k})},1e4).then(function(C){return r[A]||(i.dispatch({type:j.pluginReadyType(A),name:A,events:Object.keys(w).filter(function(M){return!Pt.includes(M)})}),r[A]=!0),S=S.concat(A),w}).catch(function(C){if(C instanceof Error)throw new Error(C);return h=h.concat(C.name),C})});Promise.all(m).then(function(w){var v={plugins:S,failed:h,disabled:f};setTimeout(function(){y.length===m.length+f.length&&i.dispatch(T({},{type:j.ready},v))},0)})}var O=(function(){if(c!==j.bootstrap)return/^ready:([^:]*)$/.test(c)&&setTimeout(function(){return Lr(i,t,e)},0),Promise.resolve((function(w,v,A,k,C){try{var M=ee(v)?v():v,P=w.type,z=P.replace(Ae,"");if(w._&&w._.called)return Promise.resolve(w);var U=A.getState(),q=(H=M,(D=U.plugins)===void 0&&(D={}),(N=w.options)===void 0&&(N={}),Object.keys(H).filter(function(d){var g=N.plugins||{};return lo(g[d])?g[d]:g.all!==!1&&(!D[d]||D[d].enabled!==!1)}).map(function(d){return H[d]}));P===j.initializeStart&&w.fromEnable&&(q=Object.keys(U.plugins).filter(function(d){var g=U.plugins[d];return w.plugins.includes(d)&&!g.initialized}).map(function(d){return M[d]}));var $=q.map(function(d){return d.name}),E=(function(d,g){var I=En(d).map(function(_){return In(_,g)});return g.reduce(function(_,L){var R=L.name,X=En(d,R).map(function(ie){return In(ie,g)}),W=X[0],G=X[1],V=X[2];return W.length&&(_.beforeNS[R]=W),G.length&&(_.duringNS[R]=G),V.length&&(_.afterNS[R]=V),_},{before:I[0],beforeNS:{},during:I[1],duringNS:{},after:I[2],afterNS:{}})})(P,q);return Promise.resolve(dt({action:w,data:{exact:E.before,namespaced:E.beforeNS},state:U,allPlugins:M,allMatches:E,instance:A,store:k,EVENTS:C})).then(function(d){function g(){var L=(function(){if(P.match(Ae))return Promise.resolve(dt({action:T({},I,{type:z+"End"}),data:{exact:E.after,namespaced:E.afterNS},state:U,allPlugins:M,allMatches:E,instance:A,store:k,EVENTS:C})).then(function(R){R.meta&&R.meta.hasCallback&&Sn(R.meta.rid,{payload:R})})})();return L&&L.then?L.then(function(){return d}):d}if($r(d,$.length))return d;var I,_=(function(){if(P!==z)return Promise.resolve(dt({action:T({},d,{type:z}),data:{exact:E.during,namespaced:E.duringNS},state:U,allPlugins:M,allMatches:E,instance:A,store:k,EVENTS:C})).then(function(L){I=L});I=d})();return _&&_.then?_.then(g):g()})}catch(d){return Promise.reject(d)}var H,D,N})(s,t,e,i,n)).then(function(w){var v=o(w);return a=1,v})})();return Promise.resolve(O&&O.then?O.then(u):u(O))}catch(w){return Promise.reject(w)}}}}}function No(e){return function(t){return function(n){return function(r){var i=r.type,o=r.key,s=r.value,a=r.options;if(i===j.setItem||i===j.removeItem){if(r.abort)return n(r);i===j.setItem?e.setItem(o,s,a):e.removeItem(o,a)}return n(r)}}}}var _o=function(){var e=this;this.before=[],this.after=[],this.addMiddleware=function(t,n){e[n]=e[n].concat(t)},this.removeMiddleware=function(t,n){var r=e[n].findIndex(function(i){return i===t});r!==-1&&(e[n]=[].concat(e[n].slice(0,r),e[n].slice(r+1)))},this.dynamicMiddlewares=function(t){return function(n){return function(r){return function(i){var o={getState:n.getState,dispatch:function(a){return n.dispatch(a)}},s=e[t].map(function(a){return a(o)});return je.apply(void 0,s)(r)(i)}}}}};function Co(e){return function(t,n){t===void 0&&(t={});var r={};if(n.type==="initialize:aborted")return t;if(/^registerPlugin:([^:]*)$/.test(n.type)){var i=Tn(n.type,"registerPlugin"),o=e()[i];if(!o||!i)return t;var s=n.enabled,a=o.config;return r[i]={enabled:s,initialized:!!s&&!o.initialize,loaded:!!s&&!!o.loaded({config:a}),config:a},T({},t,r)}if(/^initialize:([^:]*)$/.test(n.type)){var u=Tn(n.type,j.initialize),c=e()[u];return c&&u?(r[u]=T({},t[u],{initialized:!0,loaded:!!c.loaded({config:c.config})}),T({},t,r)):t}if(/^ready:([^:]*)$/.test(n.type))return r[n.name]=T({},t[n.name],{loaded:!0}),T({},t,r);switch(n.type){case j.disablePlugin:return T({},t,Nn(n.plugins,!1,t));case j.enablePlugin:return T({},t,Nn(n.plugins,!0,t));default:return t}}}function Tn(e,t){return e.substring(t.length+1,e.length)}function Nn(e,t,n){return e.reduce(function(r,i){return r[i]=T({},n[i],{enabled:t}),r},n)}function Vr(e){try{return JSON.parse(JSON.stringify(e))}catch{}return e}var Mo={last:{},history:[]};function Uo(e,t){e===void 0&&(e=Mo);var n=t.options,r=t.meta;if(t.type===j.track){var i=Vr(T({event:t.event,properties:t.properties},Object.keys(n).length&&{options:n},{meta:r}));return T({},e,{last:i,history:e.history.concat(i)})}return e}var Do={actions:[]};function Ro(e,t){e===void 0&&(e=Do);var n=t.payload;switch(t.type){case"queue":var r;return r=n&&n.type&&n.type===j.identify?[t].concat(e.actions):e.actions.concat(t),T({},e,{actions:r});case"dequeue":return[];default:return e}}var Wr=/#.*$/;function zo(e){var t=/(http[s]?:\/\/)?([^\/\s]+\/)(.*)/g.exec(e);return"/"+(t&&t[3]?t[3].split("?")[0].replace(Wr,""):"")}var qr,Hr,Kr,Gr,Lo=function(e){if(e===void 0&&(e={}),!Z)return e;var t=document,n=t.title,r=t.referrer,i=window,o=i.location,s=i.innerWidth,a=i.innerHeight,u=o.hash,c=o.search,p=(function(x){var y=(function(){if(Z){for(var b,S=document.getElementsByTagName("link"),h=0;b=S[h];h++)if(b.getAttribute("rel")==="canonical")return b.getAttribute("href")}})();return y?y.match(/\?/)?y:y+x:window.location.href.replace(Wr,"")})(c),l={title:n,url:p,path:zo(p),hash:u,search:c,width:s,height:a};return r&&r!==""&&(l.referrer=r),T({},l,e)},$o={last:{},history:[]};function Vo(e,t){e===void 0&&(e=$o);var n=t.options;if(t.type===j.page){var r=Vr(T({properties:t.properties,meta:t.meta},Object.keys(n).length&&{options:n}));return T({},e,{last:r,history:e.history.concat(r)})}return e}qr=(function(){if(!Z)return!1;var e=navigator.appVersion;return~e.indexOf("Win")?"Windows":~e.indexOf("Mac")?"MacOS":~e.indexOf("X11")?"UNIX":~e.indexOf("Linux")?"Linux":"Unknown OS"})(),Hr=Z?document.referrer:null,Kr=vo(),Gr=bo();var _n={initialized:!1,sessionId:xe(),app:null,version:null,debug:!1,offline:!!Z&&!navigator.onLine,os:{name:qr},userAgent:Z?navigator.userAgent:"node",library:{name:Et,version:"0.13.1"},timezone:Gr,locale:Kr,campaign:{},referrer:Hr};function Wo(e,t){e===void 0&&(e=_n);var n=e.initialized,r=t.campaign;switch(t.type){case j.campaign:return T({},e,{campaign:r});case j.offline:return T({},e,{offline:!0});case j.online:return T({},e,{offline:!1});default:return n?e:T({},_n,e,{initialized:!0})}}var qo=["plugins","reducers","storage"];function Ho(e,t,n){if(Z){var r=window[(n?"add":"remove")+"EventListener"];e.split(" ").forEach(function(i){r(i,t)})}}function Ko(e){var t=Ho.bind(null,"online offline",function(n){return Promise.resolve(!navigator.onLine).then(e)});return t(!0),function(n){return t(!1)}}function Jr(){return ge(Et,[]),function(e){return function(t,n,r){var i=e(t,n,r),o=i.dispatch;return Object.assign(i,{dispatch:function(s){return Pe[Ee][Et].push(s.action||s),o(s)}})}}}function Cn(e){return function(){return je(je.apply(null,arguments),Jr())}}function ht(e){return e?Mr(e)?e:[e]:[]}function Mn(e,t,n){e===void 0&&(e={});var r,i,o=xe();return t&&(Me[o]=(r=t,i=(function(s){for(var a,u=s||Array.prototype.slice.call(arguments),c=0;c<u.length;c++)if(ee(u[c])){a=u[c];break}return a})(n),function(s){i&&i(s),r(s)})),T({},e,{rid:o,ts:new Date().getTime()},t?{hasCallback:!0}:{})}function Go(e){e===void 0&&(e={});var t=e.reducers||{},n=e.initialUser||{},r=(e.plugins||[]).reduce(function(d,g){if(ee(g))return d.middlewares=d.middlewares.concat(g),d;if(g.NAMESPACE&&(g.name=g.NAMESPACE),!g.name)throw new Error("https://lytics.dev/errors/1");g.config||(g.config={});var I=g.EVENTS?Object.keys(g.EVENTS).map(function(R){return g.EVENTS[R]}):[];d.pluginEnabled[g.name]=!(g.enabled===!1||g.config.enabled===!1),delete g.enabled,g.methods&&(d.methods[g.name]=Object.keys(g.methods).reduce(function(R,X){var W;return R[X]=(W=g.methods[X],function(){for(var G=Array.prototype.slice.call(arguments),V=new Array(W.length),ie=0;ie<G.length;ie++)V[ie]=G[ie];return V[V.length]=v,W.apply({instance:v},V)}),R},{}),delete g.methods);var _=Object.keys(g).concat(I),L=new Set(d.events.concat(_));if(d.events=Array.from(L),d.pluginsArray=d.pluginsArray.concat(g),d.plugins[g.name])throw new Error(g.name+"AlreadyLoaded");return d.plugins[g.name]=g,d.plugins[g.name].loaded||(d.plugins[g.name].loaded=function(){return!0}),d},{plugins:{},pluginEnabled:{},methods:{},pluginsArray:[],middlewares:[],events:[]}),i=e.storage?e.storage:{getItem:pe,setItem:ge,removeItem:Te},o=(function(d){return function(g,I,_){return I.getState("user")[g]||(_&&Q(_)&&_[g]?_[g]:xn(d)[g]||pe(jt(g))||null)}})(i),s=r.plugins,a=r.events.filter(function(d){return!Pt.includes(d)}).sort(),u=new Set(a.concat(Je).filter(function(d){return!Pt.includes(d)})),c=Array.from(u).sort(),p=function(){return s},l=new _o,x=l.addMiddleware,y=l.removeMiddleware,b=l.dynamicMiddlewares,S=function(){throw new Error("Abort disabled inListener")},h=wo(),f=xn(i),m=T({},f,n,h.an_uid?{userId:h.an_uid}:{},h.an_aid?{anonymousId:h.an_aid}:{});m.anonymousId||(m.anonymousId=xe());var O=T({enable:function(d,g){return new Promise(function(I){E.dispatch({type:j.enablePlugin,plugins:ht(d),_:{originalAction:j.enablePlugin}},I,[g])})},disable:function(d,g){return new Promise(function(I){E.dispatch({type:j.disablePlugin,plugins:ht(d),_:{originalAction:j.disablePlugin}},I,[g])})}},r.methods),w=!1,v={identify:function(d,g,I,_){try{var L=le(d)?d:null,R=Q(d)?d:g,X=I||{},W=v.user();ge(jt(ue),L);var G=L||R.userId||o(ue,v,R);return Promise.resolve(new Promise(function(V){E.dispatch(T({type:j.identifyStart,userId:G,traits:R||{},options:X,anonymousId:W.anonymousId},W.id&&W.id!==L&&{previousId:W.id}),V,[g,I,_])}))}catch(V){return Promise.reject(V)}},track:function(d,g,I,_){try{var L=Q(d)?d.event:d;if(!L||!le(L))throw new Error("EventMissing");var R=Q(d)?d:g||{},X=Q(I)?I:{};return Promise.resolve(new Promise(function(W){E.dispatch({type:j.trackStart,event:L,properties:R,options:X,userId:o(ue,v,g),anonymousId:o(Oe,v,g)},W,[g,I,_])}))}catch(W){return Promise.reject(W)}},page:function(d,g,I){try{var _=Q(d)?d:{},L=Q(g)?g:{};return Promise.resolve(new Promise(function(R){E.dispatch({type:j.pageStart,properties:Lo(_),options:L,userId:o(ue,v,_),anonymousId:o(Oe,v,_)},R,[d,g,I])}))}catch(R){return Promise.reject(R)}},user:function(d){if(d===ue||d==="id")return o(ue,v);if(d===Oe||d==="anonId")return o(Oe,v);var g=v.getState("user");return d?hn(g,d):g},reset:function(d){return new Promise(function(g){E.dispatch({type:j.resetStart},g,d)})},ready:function(d){return w&&d({plugins:O,instance:v}),v.on(j.ready,function(g){d&&d(g),w=!0})},on:function(d,g){if(!d||!ee(g))return!1;if(d===j.bootstrap)throw new Error(".on disabled for "+d);var I=/Start$|Start:/;if(d==="*"){var _=function(W){return function(G){return function(V){return V.type.match(I)&&g({payload:V,instance:v,plugins:s}),G(V)}}},L=function(W){return function(G){return function(V){return V.type.match(I)||g({payload:V,instance:v,plugins:s}),G(V)}}};return x(_,He),x(L,Ke),function(){y(_,He),y(L,Ke)}}var R=d.match(I)?He:Ke,X=function(W){return function(G){return function(V){return V.type===d&&g({payload:V,instance:v,plugins:s,abort:S}),G(V)}}};return x(X,R),function(){return y(X,R)}},once:function(d,g){if(!d||!ee(g))return!1;if(d===j.bootstrap)throw new Error(".once disabled for "+d);var I=v.on(d,function(_){g({payload:_.payload,instance:v,plugins:s,abort:S}),I()});return I},getState:function(d){var g=E.getState();return d?hn(g,d):Object.assign({},g)},dispatch:function(d){var g=le(d)?{type:d}:d;if(Je.includes(g.type))throw new Error("reserved action "+g.type);var I=T({},g,{_:T({originalAction:g.type},d._||{})});E.dispatch(I)},enablePlugin:O.enable,disablePlugin:O.disable,plugins:O,storage:{getItem:i.getItem,setItem:function(d,g,I){E.dispatch({type:j.setItemStart,key:d,value:g,options:I})},removeItem:function(d,g){E.dispatch({type:j.removeItemStart,key:d,options:g})}},setAnonymousId:function(d,g){v.storage.setItem(fe,d,g)},events:{core:Je,plugins:a}},A=r.middlewares.concat([function(d){return function(g){return function(I){return I.meta||(I.meta=Mn()),g(I)}}},b(He),To(v,p,{all:c,plugins:a}),No(i),Ao(v),Eo(v),b(Ke)]),k={context:Wo,user:Io(i),page:Vo,track:Uo,plugins:Co(p),queue:Ro},C=je,M=je;if(Z&&e.debug){var P=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__;P&&(C=P({trace:!0,traceLimit:25})),M=function(){return arguments.length===0?Jr():Q(typeof arguments[0])?Cn():Cn().apply(null,arguments)}}var z,U=(function(d){return Object.keys(d).reduce(function(g,I){return qo.includes(I)||(g[I]=d[I]),g},{})})(e),q=r.pluginsArray.reduce(function(d,g){var I=g.name,_=g.config,L=g.loaded,R=r.pluginEnabled[I];return d[I]={enabled:R,initialized:!!R&&!g.initialize,loaded:!!L({config:_}),config:_},d},{}),$={context:U,user:m,plugins:q},E=Rr((function(d){for(var g=Object.keys(d),I={},_=0;_<g.length;_++){var L=g[_];typeof d[L]===ce&&(I[L]=d[L])}var R,X=Object.keys(I);try{(function(W){Object.keys(W).forEach(function(G){var V=W[G];if(typeof V(void 0,{type:It})===oe||typeof V(void 0,{type:So})===oe)throw new Error(De+" "+G+" "+oe)})})(I)}catch(W){R=W}return function(W,G){if(W===void 0&&(W={}),R)throw R;for(var V=!1,ie={},lt=0;lt<X.length;lt++){var Ve=X[lt],un=W[Ve],ft=(0,I[Ve])(un,G);if(typeof ft===oe){var Ei=Oo(Ve,G);throw new Error(Ei)}ie[Ve]=ft,V=V||ft!==un}return V?ie:W}})(T({},k,t)),$,M(C(ko.apply(void 0,A))));E.dispatch=(z=E.dispatch,function(d,g,I){var _=T({},d,{meta:Mn(d.meta,g,ht(I))});return z.apply(null,[_])});var H=Object.keys(s);E.dispatch({type:j.bootstrap,plugins:H,config:U,params:h,user:m,initialUser:n,persistedUser:f});var D=H.filter(function(d){return r.pluginEnabled[d]}),N=H.filter(function(d){return!r.pluginEnabled[d]});return E.dispatch({type:j.registerPlugins,plugins:H,enabled:r.pluginEnabled}),r.pluginsArray.map(function(d,g){var I=d.bootstrap,_=d.config,L=d.name;I&&ee(I)&&I({instance:v,config:_,payload:d}),E.dispatch({type:j.registerPluginType(L),name:L,enabled:r.pluginEnabled[L],plugin:d}),r.pluginsArray.length===g+1&&E.dispatch({type:j.initializeStart,plugins:D,disabled:N})}),Ko(function(d){E.dispatch({type:d?j.offline:j.online})}),(function(d,g,I){setInterval(function(){return Lr(d,g,I)},3e3)})(E,p,v),v}var He="before",Ke="after",ve="cookie",he=Br(),Xt=it,Xr=it;function Fr(e){return he?it(e,"",-1):Te(e)}function Br(){if(he!==void 0)return he;var e=ve+ve;try{it(e,e),he=document.cookie.indexOf(e)!==-1,Fr(e)}catch{he=!1}return he}function it(e,t,n,r,i,o){if(typeof window<"u"){var s=arguments.length>1;return he===!1&&(s?ge(e,t):pe(e)),s?document.cookie=e+"="+encodeURIComponent(t)+(n?"; expires="+new Date(+new Date+1e3*n).toUTCString()+(r?"; path="+r:"")+(i?"; domain="+i:"")+(o?"; secure":""):""):decodeURIComponent((("; "+document.cookie).split("; "+e+"=")[1]||"").split(";")[0])}}var se="localStorage",Jo=Jt.bind(null,se),Ft=Ne(se,"getItem",pe),Xo=Ne(se,"setItem",ge),Qr=Ne(se,"removeItem",Te),ae="sessionStorage",Fo=Jt.bind(null,ae),Bo=Ne(ae,"getItem",pe),Qo=Ne(ae,"setItem",ge);Ne(ae,"removeItem",Te);function Ie(e){var t=e;try{if((t=JSON.parse(e))==="true")return!0;if(t==="false")return!1;if(Q(t))return t;parseFloat(t)===t&&(t=parseFloat(t))}catch{}if(t!==null&&t!=="")return t}var Yo=Jo(),Zo=Fo(),es=Br();function Yr(e,t){if(e){var n=Bt(t),r=!en(n),i=Qt(n)?Ie(localStorage.getItem(e)):void 0;if(r&&!Se(i))return i;var o=Yt(n)?Ie(Xt(e)):void 0;if(r&&o)return o;var s=Zt(n)?Ie(sessionStorage.getItem(e)):void 0;if(r&&s)return s;var a=pe(e);return r?a:{localStorage:i,sessionStorage:s,cookie:o,global:a}}}function ts(e,t,n){if(e&&!Se(t)){var r={},i=Bt(n),o=JSON.stringify(t),s=!en(i);return Qt(i)&&(r[se]=Ge(se,t,Ie(localStorage.getItem(e))),localStorage.setItem(e,o),s)?r[se]:Yt(i)&&(r[ve]=Ge(ve,t,Ie(Xt(e))),Xr(e,o),s)?r[ve]:Zt(i)&&(r[ae]=Ge(ae,t,Ie(sessionStorage.getItem(e))),sessionStorage.setItem(e,o),s)?r[ae]:(r[me]=Ge(me,t,pe(e)),ge(e,t),s?r[me]:r)}}function ns(e,t){if(e){var n=Bt(t),r=Yr(e,Nr),i={};return!Se(r.localStorage)&&Qt(n)&&(localStorage.removeItem(e),i[se]=r.localStorage),!Se(r.cookie)&&Yt(n)&&(Fr(e),i[ve]=r.cookie),!Se(r.sessionStorage)&&Zt(n)&&(sessionStorage.removeItem(e),i[ae]=r.sessionStorage),!Se(r.global)&&ot(n,me)&&(Te(e),i[me]=r.global),i}}function Bt(e){return e?le(e)?e:e.storage:Tr}function Qt(e){return Yo&&ot(e,se)}function Yt(e){return es&&ot(e,ve)}function Zt(e){return Zo&&ot(e,ae)}function en(e){return e===Nr||e==="all"}function ot(e,t){return e===Tr||e===t||en(e)}function Ge(e,t,n){return{location:e,current:t,previous:n}}var rs={setItem:ts,getItem:Yr,removeItem:ns};function is(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Un(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Dn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Un(Object(n),!0).forEach(function(r){is(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Un(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function os(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t={storage:rs};return Go(Dn(Dn({},t),e))}function te(e){"@babel/helpers - typeof";return te=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},te(e)}function ss(e,t){if(te(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(te(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function as(e){var t=ss(e,"string");return te(t)=="symbol"?t:t+""}function tn(e,t,n){return(t=as(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Rn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function J(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Rn(Object(n),!0).forEach(function(r){tn(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Rn(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Zr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var zn={exports:{}},Ln={exports:{}},$n;function ei(){return $n||($n=1,(function(e){function t(n,r){this.v=n,this.k=r}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(Ln)),Ln.exports}var Vn={exports:{}},Wn={exports:{}},qn;function ti(){return qn||(qn=1,(function(e){function t(n,r,i,o){var s=Object.defineProperty;try{s({},"",{})}catch{s=0}e.exports=t=function(a,u,c,p){function l(x,y){t(a,x,function(b){return this._invoke(x,y,b)})}u?s?s(a,u,{value:c,enumerable:!p,configurable:!p,writable:!p}):a[u]=c:(l("next",0),l("throw",1),l("return",2))},e.exports.__esModule=!0,e.exports.default=e.exports,t(n,r,i,o)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(Wn)),Wn.exports}var Hn;function ni(){return Hn||(Hn=1,(function(e){var t=ti();function n(){var r,i,o=typeof Symbol=="function"?Symbol:{},s=o.iterator||"@@iterator",a=o.toStringTag||"@@toStringTag";function u(h,f,m,O){var w=f&&f.prototype instanceof p?f:p,v=Object.create(w.prototype);return t(v,"_invoke",(function(A,k,C){var M,P,z,U=0,q=C||[],$=!1,E={p:0,n:0,v:r,a:H,f:H.bind(r,4),d:function(D,N){return M=D,P=0,z=r,E.n=N,c}};function H(D,N){for(P=D,z=N,i=0;!$&&U&&!d&&i<q.length;i++){var d,g=q[i],I=E.p,_=g[2];D>3?(d=_===N)&&(z=g[(P=g[4])?5:(P=3,3)],g[4]=g[5]=r):g[0]<=I&&((d=D<2&&I<g[1])?(P=0,E.v=N,E.n=g[1]):I<_&&(d=D<3||g[0]>N||N>_)&&(g[4]=D,g[5]=N,E.n=_,P=0))}if(d||D>1)return c;throw $=!0,N}return function(D,N,d){if(U>1)throw TypeError("Generator is already running");for($&&N===1&&H(N,d),P=N,z=d;(i=P<2?r:z)||!$;){M||(P?P<3?(P>1&&(E.n=-1),H(P,z)):E.n=z:E.v=z);try{if(U=2,M){if(P||(D="next"),i=M[D]){if(!(i=i.call(M,z)))throw TypeError("iterator result is not an object");if(!i.done)return i;z=i.value,P<2&&(P=0)}else P===1&&(i=M.return)&&i.call(M),P<2&&(z=TypeError("The iterator does not provide a '"+D+"' method"),P=1);M=r}else if((i=($=E.n<0)?z:A.call(k,E))!==c)break}catch(g){M=r,P=1,z=g}finally{U=1}}return{value:i,done:$}}})(h,m,O),!0),v}var c={};function p(){}function l(){}function x(){}i=Object.getPrototypeOf;var y=[][s]?i(i([][s]())):(t(i={},s,function(){return this}),i),b=x.prototype=p.prototype=Object.create(y);function S(h){return Object.setPrototypeOf?Object.setPrototypeOf(h,x):(h.__proto__=x,t(h,a,"GeneratorFunction")),h.prototype=Object.create(b),h}return l.prototype=x,t(b,"constructor",x),t(x,"constructor",l),l.displayName="GeneratorFunction",t(x,a,"GeneratorFunction"),t(b),t(b,a,"Generator"),t(b,s,function(){return this}),t(b,"toString",function(){return"[object Generator]"}),(e.exports=n=function(){return{w:u,m:S}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports})(Vn)),Vn.exports}var Kn={exports:{}},Gn={exports:{}},Jn={exports:{}},Xn;function ri(){return Xn||(Xn=1,(function(e){var t=ei(),n=ti();function r(i,o){function s(u,c,p,l){try{var x=i[u](c),y=x.value;return y instanceof t?o.resolve(y.v).then(function(b){s("next",b,p,l)},function(b){s("throw",b,p,l)}):o.resolve(y).then(function(b){x.value=b,p(x)},function(b){return s("throw",b,p,l)})}catch(b){l(b)}}var a;this.next||(n(r.prototype),n(r.prototype,typeof Symbol=="function"&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),n(this,"_invoke",function(u,c,p){function l(){return new o(function(x,y){s(u,p,x,y)})}return a=a?a.then(l,l):l()},!0)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(Jn)),Jn.exports}var Fn;function ii(){return Fn||(Fn=1,(function(e){var t=ni(),n=ri();function r(i,o,s,a,u){return new n(t().w(i,o,s,a),u||Promise)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(Gn)),Gn.exports}var Bn;function us(){return Bn||(Bn=1,(function(e){var t=ii();function n(r,i,o,s,a){var u=t(r,i,o,s,a);return u.next().then(function(c){return c.done?c.value:u.next()})}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports})(Kn)),Kn.exports}var Qn={exports:{}},Yn;function cs(){return Yn||(Yn=1,(function(e){function t(n){var r=Object(n),i=[];for(var o in r)i.unshift(o);return function s(){for(;i.length;)if((o=i.pop())in r)return s.value=o,s.done=!1,s;return s.done=!0,s}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(Qn)),Qn.exports}var Zn={exports:{}},er={exports:{}},tr;function ls(){return tr||(tr=1,(function(e){function t(n){"@babel/helpers - typeof";return e.exports=t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(er)),er.exports}var nr;function fs(){return nr||(nr=1,(function(e){var t=ls().default;function n(r){if(r!=null){var i=r[typeof Symbol=="function"&&Symbol.iterator||"@@iterator"],o=0;if(i)return i.call(r);if(typeof r.next=="function")return r;if(!isNaN(r.length))return{next:function(){return r&&o>=r.length&&(r=void 0),{value:r&&r[o++],done:!r}}}}throw new TypeError(t(r)+" is not iterable")}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports})(Zn)),Zn.exports}var rr;function ds(){return rr||(rr=1,(function(e){var t=ei(),n=ni(),r=us(),i=ii(),o=ri(),s=cs(),a=fs();function u(){var c=n(),p=c.m(u),l=(Object.getPrototypeOf?Object.getPrototypeOf(p):p.__proto__).constructor;function x(S){var h=typeof S=="function"&&S.constructor;return!!h&&(h===l||(h.displayName||h.name)==="GeneratorFunction")}var y={throw:1,return:2,break:3,continue:3};function b(S){var h,f;return function(m){h||(h={stop:function(){return f(m.a,2)},catch:function(){return m.v},abrupt:function(O,w){return f(m.a,y[O],w)},delegateYield:function(O,w,v){return h.resultName=w,f(m.d,a(O),v)},finish:function(O){return f(m.f,O)}},f=function(O,w,v){m.p=h.prev,m.n=h.next;try{return O(w,v)}finally{h.next=m.n}}),h.resultName&&(h[h.resultName]=m.v,h.resultName=void 0),h.sent=m.v,h.next=m.n;try{return S.call(this,h)}finally{m.p=h.prev,m.n=h.next}}}return(e.exports=u=function(){return{wrap:function(S,h,f,m){return c.w(b(S),h,f,m&&m.reverse())},isGeneratorFunction:x,mark:c.m,awrap:function(S,h){return new t(S,h)},AsyncIterator:o,async:function(S,h,f,m,O){return(x(h)?i:r)(b(S),h,f,m,O)},keys:s,values:a}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=u,e.exports.__esModule=!0,e.exports.default=e.exports})(zn)),zn.exports}var mt,ir;function ps(){if(ir)return mt;ir=1;var e=ds()();mt=e;try{regeneratorRuntime=e}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}return mt}var gs=ps(),K=Zr(gs);function or(e,t,n,r,i,o,s){try{var a=e[o](s),u=a.value}catch(c){return void n(c)}a.done?t(u):Promise.resolve(u).then(r,i)}function re(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var o=e.apply(t,n);function s(u){or(o,r,i,s,a,"next",u)}function a(u){or(o,r,i,s,a,"throw",u)}s(void 0)})}}var sr=function(){};function hs(e,t){var n,r,i,o=(t=t||{}).initial||[],s=t.max||1/0,a=t.interval||1e4,u=t.onEmpty||sr,c=t.onPause||sr;function p(x){clearInterval(n);var y=o.splice(0,s);return y.length&&e(y,o),o.length?x?p():l():(i=!1,u(o))}function l(){i=!0,n=setInterval(p,a)}return o.length&&l(),{flush:function(x){p(x)},resume:p,push:function(x){return(r=o.push(x))>=s&&!t.throttle&&p(),i||l(),r},size:function(){return o.length},pause:function(x){x&&p(),clearInterval(n),i=!1,c(o)}}}var Xe="__",st="session",oi=Xe+st,si="page",ar=["id","createdAt","created"];function Tt(e){var t=e?new Date(e):new Date;return[t.toISOString(),t.getTime()]}function ai(){var e=Tt(),t=e[0],n=e[1];return{id:xe(),created:n,createdAt:t}}var ms={session:[Bo,Qo],page:[pe,ge]};function at(e,t){for(var n=ms[e],r=n[0],i=n[1],o=ai(),s=!1,a={},u=0;u<ar.length;u++){var c=ar[u],p=Xe+e+Xe+st+Xe+c,l=r(p);s=t||!l,(t||!t&&!l)&&i(p,o[c]);var x=l&&!t?l:o[c],y=c!=="created"?x:Number(x);a[c]=y}return nn(a,s)}function nn(e,t){var n=Date.now();return e.elapsed=n-e.created,e.expires&&(e.remaining=Math.max(e.expires-n,0),e.isExpired=e.remaining===0),e.isNew=t,e}function Le(e,t){e===void 0&&(e=30);var n=Xt(oi),r=n?JSON.parse(n):Ze(e);return t?r:nn(r,!n)}function Ze(e,t,n){e===void 0&&(e=30);var r=n?Le(e,!0):ai(),i=60*e,o=r.created;if(n){var s=Tt(),a=s[0],u=s[1];r.modified=u,r.modifiedAt=a,o=u}var c=Tt(o+1e3*i),p=c[0];return r.expires=c[1],r.expiresAt=p,r.duration=1e3*i,t&&(r=Object.assign(r,t)),Xr(oi,JSON.stringify(r),i),nn(r,!n)}var ys=function(e,t){return Ze(e,t,!0)},ui=at.bind(null,st),vs=at.bind(null,st,!0),rn=at.bind(null,si),ur=at.bind(null,si,!0),be=typeof window<"u";function bs(e){return typeof e=="string"}function cr(e){return typeof e=="boolean"}var yt,lr;function ws(){if(lr)return yt;lr=1;var e=function(f){return t(f)&&!n(f)};function t(f){return!!f&&typeof f=="object"}function n(f){var m=Object.prototype.toString.call(f);return m==="[object RegExp]"||m==="[object Date]"||o(f)}var r=typeof Symbol=="function"&&Symbol.for,i=r?Symbol.for("react.element"):60103;function o(f){return f.$$typeof===i}function s(f){return Array.isArray(f)?[]:{}}function a(f,m){return m.clone!==!1&&m.isMergeableObject(f)?S(s(f),f,m):f}function u(f,m,O){return f.concat(m).map(function(w){return a(w,O)})}function c(f,m){if(!m.customMerge)return S;var O=m.customMerge(f);return typeof O=="function"?O:S}function p(f){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(f).filter(function(m){return Object.propertyIsEnumerable.call(f,m)}):[]}function l(f){return Object.keys(f).concat(p(f))}function x(f,m){try{return m in f}catch{return!1}}function y(f,m){return x(f,m)&&!(Object.hasOwnProperty.call(f,m)&&Object.propertyIsEnumerable.call(f,m))}function b(f,m,O){var w={};return O.isMergeableObject(f)&&l(f).forEach(function(v){w[v]=a(f[v],O)}),l(m).forEach(function(v){y(f,v)||(x(f,v)&&O.isMergeableObject(m[v])?w[v]=c(v,O)(f[v],m[v],O):w[v]=a(m[v],O))}),w}function S(f,m,O){O=O||{},O.arrayMerge=O.arrayMerge||u,O.isMergeableObject=O.isMergeableObject||e,O.cloneUnlessOtherwiseSpecified=a;var w=Array.isArray(m),v=Array.isArray(f),A=w===v;return A?w?O.arrayMerge(f,m,O):b(f,m,O):a(m,O)}S.all=function(f,m){if(!Array.isArray(f))throw new Error("first argument should be an array");return f.reduce(function(O,w){return S(O,w,m)},{})};var h=S;return yt=h,yt}var xs=ws(),Ss=Zr(xs),Nt=new TextEncoder,Os={appstream2:"appstream",cloudhsmv2:"cloudhsm",email:"ses",marketplace:"aws-marketplace",mobile:"AWSMobileHubService",pinpoint:"mobiletargeting",queue:"sqs","git-codecommit":"codecommit","mturk-requester-sandbox":"mturk-requester","personalize-runtime":"personalize"},ks=new Set(["authorization","content-type","content-length","user-agent","presigned-expires","expect","x-amzn-trace-id","range","connection"]),_t=class{constructor({accessKeyId:t,secretAccessKey:n,sessionToken:r,service:i,region:o,cache:s,retries:a,initRetryMs:u}){if(t==null)throw new TypeError("accessKeyId is a required option");if(n==null)throw new TypeError("secretAccessKey is a required option");this.accessKeyId=t,this.secretAccessKey=n,this.sessionToken=r,this.service=i,this.region=o,this.cache=s||new Map,this.retries=a??10,this.initRetryMs=u||50}async sign(t,n){if(t instanceof Request){let{method:o,url:s,headers:a,body:u}=t;n=Object.assign({method:o,url:s,headers:a},n),n.body==null&&a.has("Content-Type")&&(n.body=u!=null&&a.has("X-Amz-Content-Sha256")?u:await t.clone().arrayBuffer()),t=s}let r=new Ct(Object.assign({url:t.toString()},n,this,n&&n.aws)),i=Object.assign({},n,await r.sign());delete i.aws;try{return new Request(i.url.toString(),i)}catch(o){if(o instanceof TypeError)return new Request(i.url.toString(),Object.assign({duplex:"half"},i));throw o}}async fetch(t,n){for(let r=0;r<=this.retries;r++){let i=fetch(await this.sign(t,n));if(r===this.retries)return i;let o=await i;if(o.status<500&&o.status!==429)return o;await new Promise(s=>setTimeout(s,Math.random()*this.initRetryMs*Math.pow(2,r)))}throw new Error("An unknown error occurred, ensure retries is not negative")}},Ct=class{constructor({method:t,url:n,headers:r,body:i,accessKeyId:o,secretAccessKey:s,sessionToken:a,service:u,region:c,cache:p,datetime:l,signQuery:x,appendSessionToken:y,allHeaders:b,singleEncode:S}){if(n==null)throw new TypeError("url is a required option");if(o==null)throw new TypeError("accessKeyId is a required option");if(s==null)throw new TypeError("secretAccessKey is a required option");this.method=t||(i?"POST":"GET"),this.url=new URL(n),this.headers=new Headers(r||{}),this.body=i,this.accessKeyId=o,this.secretAccessKey=s,this.sessionToken=a;let h,f;(!u||!c)&&([h,f]=As(this.url,this.headers)),this.service=u||h||"",this.region=c||f||"us-east-1",this.cache=p||new Map,this.datetime=l||new Date().toISOString().replace(/[:-]|\.\d{3}/g,""),this.signQuery=x,this.appendSessionToken=y||this.service==="iotdevicegateway",this.headers.delete("Host"),this.service==="s3"&&!this.signQuery&&!this.headers.has("X-Amz-Content-Sha256")&&this.headers.set("X-Amz-Content-Sha256","UNSIGNED-PAYLOAD");let m=this.signQuery?this.url.searchParams:this.headers;if(m.set("X-Amz-Date",this.datetime),this.sessionToken&&!this.appendSessionToken&&m.set("X-Amz-Security-Token",this.sessionToken),this.signableHeaders=["host",...this.headers.keys()].filter(w=>b||!ks.has(w)).sort(),this.signedHeaders=this.signableHeaders.join(";"),this.canonicalHeaders=this.signableHeaders.map(w=>w+":"+(w==="host"?this.url.host:(this.headers.get(w)||"").replace(/\s+/g," "))).join(`
|
|
4
4
|
`),this.credentialString=[this.datetime.slice(0,8),this.region,this.service,"aws4_request"].join("/"),this.signQuery&&(this.service==="s3"&&!m.has("X-Amz-Expires")&&m.set("X-Amz-Expires","86400"),m.set("X-Amz-Algorithm","AWS4-HMAC-SHA256"),m.set("X-Amz-Credential",this.accessKeyId+"/"+this.credentialString),m.set("X-Amz-SignedHeaders",this.signedHeaders)),this.service==="s3")try{this.encodedPath=decodeURIComponent(this.url.pathname.replace(/\+/g," "))}catch{this.encodedPath=this.url.pathname}else this.encodedPath=this.url.pathname.replace(/\/+/g,"/");S||(this.encodedPath=encodeURIComponent(this.encodedPath).replace(/%2F/g,"/")),this.encodedPath=pr(this.encodedPath);let O=new Set;this.encodedSearch=[...this.url.searchParams].filter(([w])=>{if(!w)return!1;if(this.service==="s3"){if(O.has(w))return!1;O.add(w)}return!0}).map(w=>w.map(v=>pr(encodeURIComponent(v)))).sort(([w,v],[A,k])=>w<A?-1:w>A?1:v<k?-1:v>k?1:0).map(w=>w.join("=")).join("&")}async sign(){return this.signQuery?(this.url.searchParams.set("X-Amz-Signature",await this.signature()),this.sessionToken&&this.appendSessionToken&&this.url.searchParams.set("X-Amz-Security-Token",this.sessionToken)):this.headers.set("Authorization",await this.authHeader()),{method:this.method,url:this.url,headers:this.headers,body:this.body}}async authHeader(){return["AWS4-HMAC-SHA256 Credential="+this.accessKeyId+"/"+this.credentialString,"SignedHeaders="+this.signedHeaders,"Signature="+await this.signature()].join(", ")}async signature(){let t=this.datetime.slice(0,8),n=[this.secretAccessKey,t,this.region,this.service].join(),r=this.cache.get(n);if(!r){let i=await _e("AWS4"+this.secretAccessKey,t),o=await _e(i,this.region),s=await _e(o,this.service);r=await _e(s,"aws4_request"),this.cache.set(n,r)}return vt(await _e(r,await this.stringToSign()))}async stringToSign(){return["AWS4-HMAC-SHA256",this.datetime,this.credentialString,vt(await fr(await this.canonicalString()))].join(`
|
|
5
5
|
`)}async canonicalString(){return[this.method.toUpperCase(),this.encodedPath,this.encodedSearch,this.canonicalHeaders+`
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
|
|
2
|
-
import d from"./JJUJVV7A.js";import{b}from"./PZ4L77M5.js";import"./LHCWS2RN.js";import{a as m}from"./HA5W44KL.js";import"./36I27Q5R.js";import"./GDPFKW75.js";import"./AOBFPJ2R.js";import"./JK6XUSIM.js";import"./UPHYUDLT.js";import"./QJJXVRMV.js";import"./7FMLZNDR.js";import"./LL5C4DHP.js";import"./WPAMUSBR.js";import"./XJPOVJV7.js";import"./LDNQ56OK.js";import"./3HUY3T5F.js";import"./Z6G5PBUQ.js";import"./J3QMHA2M.js";import"./TKZAMPEI.js";import"./2IHQU2FX.js";import"./CGLFPVBM.js";import"./OEJAW72H.js";import"./5JJMGPOW.js";import"./TYX345MZ.js";import"./5UWT66A7.js";import{b as g}from"./2CMRI2B3.js";import{F as a,G as n,H as f,K as i,L as c,h as v,i as e,j as h}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([k,R,{K:y,b:x,p:w}])=>{var L=v`:host{display:block;--solutions-social-share-action-width: initial;--solutions-social-share-width--s: 200px;--solutions-social-share-width--m: 280px;--solutions-social-share-width--l: 320px;--solutions-social-share-width-horizontal--s: 300px;--solutions-social-share-width-horizontal--m: 380px;--solutions-social-share-width-horizontal--l: 420px;--solutions-social-share-background-color: var(--calcite-color-foreground-1);--solutions-social-share-popover-button-background-color: transparent;--solutions-social-share-popover-button-icon-color: var(--calcite-ui-icon-color);--solutions-social-share-border: 1px solid var(--calcite-color-border-1);position:relative;display:flex;block-size:100%;flex:1 1 auto;flex-flow:column;align-items:stretch}.solutions-social-share__popover-button{background-color:var(--solutions-social-share-popover-button-background-color);--calcite-color-focus: initial}.solutions-social-share__popover-button calcite-icon{color:var(--solutions-social-share-popover-button-icon-color)}.solutions-social-share__dialog{background-color:var(--solutions-social-share-background-color);border:var(--solutions-social-share-border);box-sizing:border-box;height:auto;padding:10px 0;border-radius:5px;color:var(--calcite-color-text-1)}.solutions-social-share__options{margin:0;padding:1% 0 0;list-style-type:none}.solutions-social-share__options li{box-sizing:border-box;display:flex;align-items:center;width:100%;padding:5%;transition:background-color .15s ease-out 0s}.solutions-social-share__options li .solutions-social-share__icon,.solutions-social-share__options li .solutions-social-share__option-text{display:inline-block}.solutions-social-share__options li .solutions-social-share__icon{display:flex;align-items:center}.solutions-social-share__options li .solutions-social-share__option-text{width:85%;margin-left:10px;word-break:break-word}.solutions-social-share__options li .solutions-social-share__option-text--rtl{margin-left:0;margin-right:10px}.solutions-social-share__options li:hover{cursor:pointer;background-color:var(--calcite-color-foreground-2)}.solutions-social-share__options li:focus{outline:2px solid var(--calcite-color-brand);outline-offset:-2px}.solutions-social-share__x-logo{color:var(--calcite-color-text-1)}.solutions-social-share__success{display:flex;flex-direction:column;padding:15px}.solutions-social-share__success-header{display:flex;align-items:center;font-weight:700;margin-bottom:10px}.solutions-social-share__success-icon{display:flex;align-items:center;margin-right:5px}.solutions-social-share__success-icon calcite-icon{color:var(--calcite-color-status-success)}.solutions-social-share__success-message{line-height:16px}.solutions-social-share__layout--horizontal .solutions-social-share__options{display:flex;justify-content:space-around;margin-bottom:8%}.solutions-social-share__layout--horizontal .solutions-social-share__options li{flex-direction:column;padding:0}.solutions-social-share__layout--horizontal .solutions-social-share__options li .solutions-social-share__option-text{word-break:break-word;margin-left:0;margin-top:10px;text-align:center}.solutions-social-share__layout--horizontal .solutions-social-share__options li:hover{background-color:unset}.solutions-social-share__icon-container{display:flex;align-items:center}calcite-action{width:var(--solutions-social-share-action-width)}:host([scale=s]) .solutions-social-share__dialog{width:var(--solutions-social-share-width--s)}:host([scale=s]) .solutions-social-share__icon{width:16px;height:16px}:host([scale=s]) .solutions-social-share__option-text{font-size:var(--calcite-font-size--1)}:host([scale=s]) .solutions-social-share__dialog.solutions-social-share__layout--horizontal{width:var(--solutions-social-share-width-horizontal--s)}:host([scale=m]) .solutions-social-share__dialog{width:var(--solutions-social-share-width--m)}:host([scale=m]) .solutions-social-share__icon{width:24px;height:24px}:host([scale=m]) .solutions-social-share__option-text{font-size:var(--calcite-font-size-0)}:host([scale=m]) .solutions-social-share__dialog.solutions-social-share__layout--horizontal{width:var(--solutions-social-share-width-horizontal--m)}:host([scale=l]) .solutions-social-share__dialog{width:var(--solutions-social-share-width--l)}:host([scale=l]) .solutions-social-share__icon{width:32px;height:32px}:host([scale=l]) .solutions-social-share__option-text{font-size:var(--calcite-font-size-1)}:host([scale=l]) .solutions-social-share__dialog.solutions-social-share__layout--horizontal{width:var(--solutions-social-share-width-horizontal--l)}`,S=".calcite-mode-dark",P={facebook:"https://www.facebook.com/sharer/sharer.php?u={url}",x:"https://x.com/intent/post?url={url}",linkedIn:"https://www.linkedin.com/sharing/share-offsite/?url={url}",bluesky:"https://bsky.app/intent/compose?text={url}"},C="https://arcg.is/prod/shorten",u=class extends f{constructor(){super(...arguments),this.actionApperance="transparent",this.autoUpdateShareUrl=!0,this.buttonAppearance="transparent",this.inlineSuccessPopoverPlacement="trailing",this.mode="popover",this.popoverButtonIconScale="m",this.popoverPositioning="absolute",this.removePopoverOffset=!1,this.scale="s",this.shareButtonKind="neutral",this.shareButtonScale="m",this.shareButtonText="",this.shareButtonType="button",this.shareIconsLayout="vertical",this.shareText="",this.shareUrl=window.location.href,this.shortenShareUrl=!0,this.socialMedia=!0,this.solutionId="",this.solutionTitle="",this.solutionVersion="",this.successMessage="",this._copied=!1,this._inlineCopyLinkOpened=!1,this._opened=!1,this._translations=m({name:"solution-social-share",blocking:!0}),this._configContextConsumer=b({context:x,subscribe:!0}),this._copyLinkPopoverRef=a(),this._dialogContentRef=a(),this._popoverActionRef=a(),this._popoverButtonRef=a(),this._popoverRef=a(),this._shareListRef=a()}static{this.properties={actionApperance:1,autoUpdateShareUrl:5,buttonAppearance:1,inlineSuccessPopoverPlacement:3,mode:3,popoverButtonIconScale:3,popoverPositioning:3,removePopoverOffset:7,scale:3,shareButtonKind:3,shareButtonScale:3,shareButtonText:1,shareButtonType:3,shareIconsLayout:3,shareText:3,shareUrl:1,shortenShareUrl:7,socialMedia:7,solutionId:1,solutionTitle:1,solutionVersion:1,successMessage:3,_copied:16,_inlineCopyLinkOpened:16,_opened:16,_translations:16}}static{this.styles=L}get _telemetry(){return this._configContextConsumer.value?.telemetrySession}loaded(){this._setupAutoCloseListeners(),this.mode==="popover"&&this._popoverRef.value&&(this._opened&&(this._popoverRef.value.open=!0),this.listenOn(this._popoverRef.value,"calcitePopoverOpen",()=>{this._shareListRef.value&&this._shareListRef.value.children[0].focus()}),this.listenOn(this._popoverRef.value,"keydown",this._handlePopoverRefKeyDown))}render(){let o=this._copied&&this.mode==="popover"?this._renderSuccess():e`<div class=solutions-social-share__dialog-content>${this._renderOptions()}</div>`,s=this.shareIconsLayout==="vertical"?" solutions-social-share__layout--vertical":" solutions-social-share__layout--horizontal",t=` calcite-mode-${this.el.closest(S)?"dark":"light"}`,l=e`<div class=${`solutions-social-share__dialog${s}${t}`} ${n(this._dialogContentRef)}>${o}</div>`,r=this.removePopoverOffset?0:6;return this.mode==="popover"?[e`<calcite-popover .label=${this._translations.share?.label??""} reference-element=shareButton placement=bottom-start .scale=${this.scale} overlay-positioning=${this.popoverPositioning??c} offset-distance=${r??c} pointer-disabled=${this.removePopoverOffset??c} ${n(this._popoverRef)}>${l}</calcite-popover>`,this._renderButton()]:[l,e`<calcite-popover .label=${this._translations.share?.label??""} reference-element=copyToClipboard .placement=${this.inlineSuccessPopoverPlacement} .scale=${this.scale} overlay-positioning=fixed ${n(this._copyLinkPopoverRef)}>${this._renderSuccess()}</calcite-popover>`]}_setupAutoCloseListeners(){this.listenOn(document.documentElement,"click",this._autoCloseCallback),this.mode==="popover"&&this._popoverRef.value?(this.listenOn(this._popoverRef.value,"click",this._stopPropagationCallback),this.listenOn(this._popoverRef.value,"calcitePopoverClose",this._resetPopoverCopyState)):this._dialogContentRef.value&&this.listenOn(this._dialogContentRef.value,"click",this._stopPropagationCallback)}_handlePopoverRefKeyDown(o){if(o.code==="Tab"){if(!this._shareListRef.value)return;let s=o.target,t=this._shareListRef.value.children[0],l=this._shareListRef.value.children[this._shareListRef.value.children.length-1];o.shiftKey&&s===t?(o.preventDefault(),l.focus()):!o.shiftKey&&s===l&&(o.preventDefault(),t.focus())}else o.code==="Escape"&&(this._closePopover(),this.shareButtonType==="button"?this._popoverButtonRef.value?.setFocus():this._popoverActionRef.value?.setFocus())}_autoCloseCallback(){this.mode==="popover"?(this._opened=!1,this._popoverRef.value.open=this._opened):(this._copyLinkPopoverRef.value&&(this._copyLinkPopoverRef.value.open=!1),this._inlineCopyLinkOpened=!1)}_stopPropagationCallback(o){o.stopPropagation()}_resetPopoverCopyState(){this.shareButtonType==="button"?this._popoverButtonRef.value?.setFocus():this._popoverActionRef.value?.setFocus(),setTimeout(()=>{this._copied=!1},200)}_renderButton(){let o=this.shareButtonScale!=null?this.shareButtonScale:this.scale;return this.shareButtonType==="button"?e`<calcite-button .appearance=${this.buttonAppearance} class=solutions-social-share__popover-button id=shareButton .kind=${this.shareButtonKind} .label=${this._translations.share?.label} @click=${this._togglePopover.bind(this)} .scale=${o} title=${this._translations.share?.label??c} ${n(this._popoverButtonRef)}>${this.shareButtonText}</calcite-button>`:e`<calcite-action alignment=center .appearance=${this.actionApperance} class=solutions-social-share__popover-button id=shareButton .label=${this._translations.share?.label} @click=${this._togglePopover.bind(this)} .scale=${o} text title=${this._translations.share?.label??c} ${n(this._popoverActionRef)}><div class=solutions-social-share__icon-container><calcite-icon icon=share .scale=${this.popoverButtonIconScale}></calcite-icon></div></calcite-action>`}_renderSuccess(){let o=this._translations.success;return e`<div class=solutions-social-share__success><span class=solutions-social-share__success-header><span class=solutions-social-share__success-icon><calcite-icon icon=check-circle-f .scale=${this.scale}></calcite-icon></span>${o?.label}</span><span class=solutions-social-share__success-message>${this.successMessage||o?.url}</span></div>`}_renderOptions(){let o=this._translations.options,s=document.dir==="rtl"?" solutions-social-share__option-text--rtl":"";return e`<ul class=solutions-social-share__options role=menu ${n(this._shareListRef)}><li id=copyToClipboard @click=${this._handleShareItem.bind(this,"link")} @keydown=${this._handleOptionKeyDown("link")} role=menuitem tabindex=0><span class=solutions-social-share__icon><calcite-icon icon=link .scale=${this.scale}></calcite-icon></span><span class=${`solutions-social-share__option-text${s}`}>${o?.link?.label}</span></li>${this.socialMedia?[e`<li @click=${this._handleShareItem.bind(this,"facebook")} @keydown=${this._handleOptionKeyDown("facebook")} role=menuitem tabindex=0><span class=solutions-social-share__icon>${this._renderFacebookIcon()}</span><span class=${`solutions-social-share__option-text${s}`}>${o?.facebook?.label}</span></li>`,e`<li @click=${this._handleShareItem.bind(this,"x")} @keydown=${this._handleOptionKeyDown("x")} role=menuitem tabindex=0><span class=solutions-social-share__icon>${this._renderXIcon()}</span><span class=${`solutions-social-share__option-text${s}`}>\r\n X</span></li>`,e`<li @click=${this._handleShareItem.bind(this,"linkedIn")} @keydown=${this._handleOptionKeyDown("linkedIn")} role=menuitem tabindex=0><span class=solutions-social-share__icon>${this._renderLinkedInIcon()}</span><span class=${`solutions-social-share__option-text${s}`}>${o?.linkedIn?.label}</span></li>`,e`<li @click=${this._handleShareItem.bind(this,"bluesky")} @keydown=${this._handleOptionKeyDown("bluesky")} role=menuitem tabindex=0><span class=solutions-social-share__icon>${this._renderBlueSkyIcon()}</span><span class=${`solutions-social-share__option-text${s}`}>${o?.blueSky?.label}</span></li>`]:null}</ul>`}_handleOptionKeyDown(o){return s=>{let t=s.code;(t==="Space"||t==="Enter"||t==="NumpadEnter")&&this._handleShareItem(o)}}_renderFacebookIcon(){return e`<svg height=100% style=${i({fillRule:"evenodd",clipRule:"evenodd",strokeLinejoin:"round",strokeMiterlimit:"2"})} version=1.1 viewBox="0 0 512 512" width=100% xmlns=http://www.w3.org/2000/svg>${h`<g><path d="M512,256c0,-141.385 -114.615,-256 -256,-256c-141.385,0 -256,114.615 -256,256c0,127.777 93.616,233.685 216,252.89l0,-178.89l-65,0l0,-74l65,0l0,-56.4c0,-64.16 38.219,-99.6 96.695,-99.6c28.009,0 57.305,5 57.305,5l0,63l-32.281,0c-31.801,0 -41.719,19.733 -41.719,39.978l0,48.022l71,0l-11.35,74l-59.65,0l0,178.89c122.385,-19.205 216,-125.113 216,-252.89Z" style=${i({fill:"#1877f2",fillRule:"nonzero"})} /><path d="M355.65,330l11.35,-74l-71,0l0,-48.022c0,-20.245 9.917,-39.978 41.719,-39.978l32.281,0l0,-63c0,0 -29.297,-5 -57.305,-5c-58.476,0 -96.695,35.44 -96.695,99.6l0,56.4l-65,0l0,74l65,0l0,178.89c13.033,2.045 26.392,3.11 40,3.11c13.608,0 26.966,-1.065 40,-3.11l0,-178.89l59.65,0Z" style=${i({fill:"#fff",fillRule:"nonzero"})} /></g>`}</svg>`}_renderXIcon(){return e`<svg height=100% width=100% class="solutions-social-share__x-logo" viewBox="0 0 1200 1227" fill=none xmlns=http://www.w3.org/2000/svg>${h`<rect height=400 style=${i({fill:"none"})} width=400 x=56 y=56 /><path d="M714.163 519.284L1160.89 0H1055.03L667.137 450.887L357.328 0H0L468.492 681.821L0 1226.37H105.866L515.491 750.218L842.672 1226.37H1200L714.137 519.284H714.163ZM569.165 687.828L521.697 619.934L144.011 79.6944H306.615L611.412 515.685L658.88 583.579L1055.08 1150.3H892.476L569.165 687.854V687.828Z" fill=currentColor />`}</svg>`}_renderBlueSkyIcon(){return e`<svg height=100% width=100% fill=#0f85fe xmlns=http://www.w3.org/2000/svg viewBox="0 0 512 512">${h`<path d="M111.8 62.2C170.2 105.9 233 194.7 256 242.4c23-47.6 85.8-136.4 144.2-180.2c42.1-31.6 110.3-56 110.3 21.8c0 15.5-8.9 130.5-14.1 149.2C478.2 298 412 314.6 353.1 304.5c102.9 17.5 129.1 75.5 72.5 133.5c-107.4 110.2-154.3-27.6-166.3-62.9l0 0c-1.7-4.9-2.6-7.8-3.3-7.8s-1.6 3-3.3 7.8l0 0c-12 35.3-59 173.1-166.3 62.9c-56.5-58-30.4-116 72.5-133.5C100 314.6 33.8 298 15.7 233.1C10.4 214.4 1.5 99.4 1.5 83.9c0-77.8 68.2-53.4 110.3-21.8z" />`}</svg>`}_renderLinkedInIcon(){return e`<svg height=100% style=${i({fillRule:"evenodd",clipRule:"evenodd",strokeLinejoin:"round",strokeMiterlimit:"2"})} version=1.1 viewBox="0 0 512 512" width=100% xmlns=http://www.w3.org/2000/svg>${h`<g id=g5891><path d="M512,64c0,-35.323 -28.677,-64 -64,-64l-384,0c-35.323,0 -64,28.677 -64,64l0,384c0,35.323 28.677,64 64,64l384,0c35.323,0 64,-28.677 64,-64l0,-384Z" id=background style=${i({fill:"#2867b2"})} /><g id=shapes><rect height=257.962 id=rect11 style=${i({fill:"#fff"})} width=85.76 x=61.053 y=178.667 /><path d="M104.512,54.28c-29.341,0 -48.512,19.29 -48.512,44.573c0,24.752 18.588,44.574 47.377,44.574l0.554,0c29.903,0 48.516,-19.822 48.516,-44.574c-0.555,-25.283 -18.611,-44.573 -47.935,-44.573Z" id=path13-0 style=${i({fill:"#fff",fillRule:"nonzero"})} /><path d="M357.278,172.601c-45.49,0 -65.866,25.017 -77.276,42.589l0,-36.523l-85.738,0c1.137,24.197 0,257.961 0,257.961l85.737,0l0,-144.064c0,-7.711 0.554,-15.42 2.827,-20.931c6.188,-15.4 20.305,-31.352 43.993,-31.352c31.012,0 43.436,23.664 43.436,58.327l0,138.02l85.741,0l0,-147.93c0,-79.237 -42.305,-116.097 -98.72,-116.097Z" id=path15 style=${i({fill:"#fff",fillRule:"nonzero"})} /></g></g>`}</svg>`}_togglePopover(o){o.stopPropagation(),this._opened=!this._opened,this._popoverRef.value.open=this._opened}_closePopover(){this._opened=!1,this._popoverRef.value.open=this._opened}async _handleShareItem(o){this._telemetry?.logEvent({category:y.SOLUTION_DETAILS,action:"Share",dimensions:[this.solutionTitle,this.solutionId,this.solutionVersion,w(o)]}),this.shareUrl=await this._generateShareUrl();let s=null,t=navigator?.userAgent?.includes("Chrome")??!1,l=(navigator?.userAgent?.includes("Safari")??!1)&&!t;!l&&this.shortenShareUrl&&(s=await this._shortenUrl(this.shareUrl));let r=s||this.shareUrl;switch(o){case"link":navigator.clipboard.writeText(r),this.mode==="inline"&&(this._copyLinkPopoverRef.value.open=!0,setTimeout(()=>this._copyLinkPopoverRef.value.open=!1,3e3)),this._inlineCopyLinkOpened=!0,this._copied=!0,this.mode==="popover"&&setTimeout(()=>this._closePopover(),2e3);return;case"facebook":case"bluesky":case"x":case"linkedIn":{let p;l&&(p=window.open("","_blank"),this.shortenShareUrl&&(r=await this._shortenUrl(this.shareUrl)||r));let _={url:encodeURI(r)},$=o==="x"?{..._,text:this.shareText}:_,d=k.substitute(P[o],$);this.mode==="popover"&&this._closePopover(),l&&p?(p.location=d,p.focus()):window.open(encodeURI(d),"_blank")}return}}async _shortenUrl(o){let s=(await R(C,{query:{longUrl:o,f:"json"}}))?.data?.data?.url;if(s)return s.replace("http://","https://")}_generateShareUrl(){return this.autoUpdateShareUrl&&(this.shareUrl=window.location.href),this.shareUrl}};g("solution-social-share",u);return u},"intl","request",d)
|
|
2
|
+
import d from"./HHKKBJCY.js";import{b}from"./PZ4L77M5.js";import"./DD3JC2L3.js";import{a as m}from"./Y3XY5BXI.js";import"./36I27Q5R.js";import"./GDPFKW75.js";import"./AOBFPJ2R.js";import"./JK6XUSIM.js";import"./UPHYUDLT.js";import"./QJJXVRMV.js";import"./7FMLZNDR.js";import"./LL5C4DHP.js";import"./WPAMUSBR.js";import"./XJPOVJV7.js";import"./LDNQ56OK.js";import"./3HUY3T5F.js";import"./Z6G5PBUQ.js";import"./J3QMHA2M.js";import"./TKZAMPEI.js";import"./2IHQU2FX.js";import"./CGLFPVBM.js";import"./OEJAW72H.js";import"./5JJMGPOW.js";import"./TYX345MZ.js";import"./5UWT66A7.js";import{b as g}from"./S7XOHDIW.js";import{F as a,G as n,H as f,K as i,L as c,h as v,i as e,j as h}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([k,R,{K:y,b:x,p:w}])=>{var L=v`:host{display:block;--solutions-social-share-action-width: initial;--solutions-social-share-width--s: 200px;--solutions-social-share-width--m: 280px;--solutions-social-share-width--l: 320px;--solutions-social-share-width-horizontal--s: 300px;--solutions-social-share-width-horizontal--m: 380px;--solutions-social-share-width-horizontal--l: 420px;--solutions-social-share-background-color: var(--calcite-color-foreground-1);--solutions-social-share-popover-button-background-color: transparent;--solutions-social-share-popover-button-icon-color: var(--calcite-ui-icon-color);--solutions-social-share-border: 1px solid var(--calcite-color-border-1);position:relative;display:flex;block-size:100%;flex:1 1 auto;flex-flow:column;align-items:stretch}.solutions-social-share__popover-button{background-color:var(--solutions-social-share-popover-button-background-color);--calcite-color-focus: initial}.solutions-social-share__popover-button calcite-icon{color:var(--solutions-social-share-popover-button-icon-color)}.solutions-social-share__dialog{background-color:var(--solutions-social-share-background-color);border:var(--solutions-social-share-border);box-sizing:border-box;height:auto;padding:10px 0;border-radius:5px;color:var(--calcite-color-text-1)}.solutions-social-share__options{margin:0;padding:1% 0 0;list-style-type:none}.solutions-social-share__options li{box-sizing:border-box;display:flex;align-items:center;width:100%;padding:5%;transition:background-color .15s ease-out 0s}.solutions-social-share__options li .solutions-social-share__icon,.solutions-social-share__options li .solutions-social-share__option-text{display:inline-block}.solutions-social-share__options li .solutions-social-share__icon{display:flex;align-items:center}.solutions-social-share__options li .solutions-social-share__option-text{width:85%;margin-left:10px;word-break:break-word}.solutions-social-share__options li .solutions-social-share__option-text--rtl{margin-left:0;margin-right:10px}.solutions-social-share__options li:hover{cursor:pointer;background-color:var(--calcite-color-foreground-2)}.solutions-social-share__options li:focus{outline:2px solid var(--calcite-color-brand);outline-offset:-2px}.solutions-social-share__x-logo{color:var(--calcite-color-text-1)}.solutions-social-share__success{display:flex;flex-direction:column;padding:15px}.solutions-social-share__success-header{display:flex;align-items:center;font-weight:700;margin-bottom:10px}.solutions-social-share__success-icon{display:flex;align-items:center;margin-right:5px}.solutions-social-share__success-icon calcite-icon{color:var(--calcite-color-status-success)}.solutions-social-share__success-message{line-height:16px}.solutions-social-share__layout--horizontal .solutions-social-share__options{display:flex;justify-content:space-around;margin-bottom:8%}.solutions-social-share__layout--horizontal .solutions-social-share__options li{flex-direction:column;padding:0}.solutions-social-share__layout--horizontal .solutions-social-share__options li .solutions-social-share__option-text{word-break:break-word;margin-left:0;margin-top:10px;text-align:center}.solutions-social-share__layout--horizontal .solutions-social-share__options li:hover{background-color:unset}.solutions-social-share__icon-container{display:flex;align-items:center}calcite-action{width:var(--solutions-social-share-action-width)}:host([scale=s]) .solutions-social-share__dialog{width:var(--solutions-social-share-width--s)}:host([scale=s]) .solutions-social-share__icon{width:16px;height:16px}:host([scale=s]) .solutions-social-share__option-text{font-size:var(--calcite-font-size--1)}:host([scale=s]) .solutions-social-share__dialog.solutions-social-share__layout--horizontal{width:var(--solutions-social-share-width-horizontal--s)}:host([scale=m]) .solutions-social-share__dialog{width:var(--solutions-social-share-width--m)}:host([scale=m]) .solutions-social-share__icon{width:24px;height:24px}:host([scale=m]) .solutions-social-share__option-text{font-size:var(--calcite-font-size-0)}:host([scale=m]) .solutions-social-share__dialog.solutions-social-share__layout--horizontal{width:var(--solutions-social-share-width-horizontal--m)}:host([scale=l]) .solutions-social-share__dialog{width:var(--solutions-social-share-width--l)}:host([scale=l]) .solutions-social-share__icon{width:32px;height:32px}:host([scale=l]) .solutions-social-share__option-text{font-size:var(--calcite-font-size-1)}:host([scale=l]) .solutions-social-share__dialog.solutions-social-share__layout--horizontal{width:var(--solutions-social-share-width-horizontal--l)}`,S=".calcite-mode-dark",P={facebook:"https://www.facebook.com/sharer/sharer.php?u={url}",x:"https://x.com/intent/post?url={url}",linkedIn:"https://www.linkedin.com/sharing/share-offsite/?url={url}",bluesky:"https://bsky.app/intent/compose?text={url}"},C="https://arcg.is/prod/shorten",u=class extends f{constructor(){super(...arguments),this.actionApperance="transparent",this.autoUpdateShareUrl=!0,this.buttonAppearance="transparent",this.inlineSuccessPopoverPlacement="trailing",this.mode="popover",this.popoverButtonIconScale="m",this.popoverPositioning="absolute",this.removePopoverOffset=!1,this.scale="s",this.shareButtonKind="neutral",this.shareButtonScale="m",this.shareButtonText="",this.shareButtonType="button",this.shareIconsLayout="vertical",this.shareText="",this.shareUrl=window.location.href,this.shortenShareUrl=!0,this.socialMedia=!0,this.solutionId="",this.solutionTitle="",this.solutionVersion="",this.successMessage="",this._copied=!1,this._inlineCopyLinkOpened=!1,this._opened=!1,this._translations=m({name:"solution-social-share",blocking:!0}),this._configContextConsumer=b({context:x,subscribe:!0}),this._copyLinkPopoverRef=a(),this._dialogContentRef=a(),this._popoverActionRef=a(),this._popoverButtonRef=a(),this._popoverRef=a(),this._shareListRef=a()}static{this.properties={actionApperance:1,autoUpdateShareUrl:5,buttonAppearance:1,inlineSuccessPopoverPlacement:3,mode:3,popoverButtonIconScale:3,popoverPositioning:3,removePopoverOffset:7,scale:3,shareButtonKind:3,shareButtonScale:3,shareButtonText:1,shareButtonType:3,shareIconsLayout:3,shareText:3,shareUrl:1,shortenShareUrl:7,socialMedia:7,solutionId:1,solutionTitle:1,solutionVersion:1,successMessage:3,_copied:16,_inlineCopyLinkOpened:16,_opened:16,_translations:16}}static{this.styles=L}get _telemetry(){return this._configContextConsumer.value?.telemetrySession}loaded(){this._setupAutoCloseListeners(),this.mode==="popover"&&this._popoverRef.value&&(this._opened&&(this._popoverRef.value.open=!0),this.listenOn(this._popoverRef.value,"calcitePopoverOpen",()=>{this._shareListRef.value&&this._shareListRef.value.children[0].focus()}),this.listenOn(this._popoverRef.value,"keydown",this._handlePopoverRefKeyDown))}render(){let o=this._copied&&this.mode==="popover"?this._renderSuccess():e`<div class=solutions-social-share__dialog-content>${this._renderOptions()}</div>`,s=this.shareIconsLayout==="vertical"?" solutions-social-share__layout--vertical":" solutions-social-share__layout--horizontal",t=` calcite-mode-${this.el.closest(S)?"dark":"light"}`,l=e`<div class=${`solutions-social-share__dialog${s}${t}`} ${n(this._dialogContentRef)}>${o}</div>`,r=this.removePopoverOffset?0:6;return this.mode==="popover"?[e`<calcite-popover .label=${this._translations.share?.label??""} reference-element=shareButton placement=bottom-start .scale=${this.scale} overlay-positioning=${this.popoverPositioning??c} offset-distance=${r??c} pointer-disabled=${this.removePopoverOffset??c} ${n(this._popoverRef)}>${l}</calcite-popover>`,this._renderButton()]:[l,e`<calcite-popover .label=${this._translations.share?.label??""} reference-element=copyToClipboard .placement=${this.inlineSuccessPopoverPlacement} .scale=${this.scale} overlay-positioning=fixed ${n(this._copyLinkPopoverRef)}>${this._renderSuccess()}</calcite-popover>`]}_setupAutoCloseListeners(){this.listenOn(document.documentElement,"click",this._autoCloseCallback),this.mode==="popover"&&this._popoverRef.value?(this.listenOn(this._popoverRef.value,"click",this._stopPropagationCallback),this.listenOn(this._popoverRef.value,"calcitePopoverClose",this._resetPopoverCopyState)):this._dialogContentRef.value&&this.listenOn(this._dialogContentRef.value,"click",this._stopPropagationCallback)}_handlePopoverRefKeyDown(o){if(o.code==="Tab"){if(!this._shareListRef.value)return;let s=o.target,t=this._shareListRef.value.children[0],l=this._shareListRef.value.children[this._shareListRef.value.children.length-1];o.shiftKey&&s===t?(o.preventDefault(),l.focus()):!o.shiftKey&&s===l&&(o.preventDefault(),t.focus())}else o.code==="Escape"&&(this._closePopover(),this.shareButtonType==="button"?this._popoverButtonRef.value?.setFocus():this._popoverActionRef.value?.setFocus())}_autoCloseCallback(){this.mode==="popover"?(this._opened=!1,this._popoverRef.value.open=this._opened):(this._copyLinkPopoverRef.value&&(this._copyLinkPopoverRef.value.open=!1),this._inlineCopyLinkOpened=!1)}_stopPropagationCallback(o){o.stopPropagation()}_resetPopoverCopyState(){this.shareButtonType==="button"?this._popoverButtonRef.value?.setFocus():this._popoverActionRef.value?.setFocus(),setTimeout(()=>{this._copied=!1},200)}_renderButton(){let o=this.shareButtonScale!=null?this.shareButtonScale:this.scale;return this.shareButtonType==="button"?e`<calcite-button .appearance=${this.buttonAppearance} class=solutions-social-share__popover-button id=shareButton .kind=${this.shareButtonKind} .label=${this._translations.share?.label} @click=${this._togglePopover.bind(this)} .scale=${o} title=${this._translations.share?.label??c} ${n(this._popoverButtonRef)}>${this.shareButtonText}</calcite-button>`:e`<calcite-action alignment=center .appearance=${this.actionApperance} class=solutions-social-share__popover-button id=shareButton .label=${this._translations.share?.label} @click=${this._togglePopover.bind(this)} .scale=${o} text title=${this._translations.share?.label??c} ${n(this._popoverActionRef)}><div class=solutions-social-share__icon-container><calcite-icon icon=share .scale=${this.popoverButtonIconScale}></calcite-icon></div></calcite-action>`}_renderSuccess(){let o=this._translations.success;return e`<div class=solutions-social-share__success><span class=solutions-social-share__success-header><span class=solutions-social-share__success-icon><calcite-icon icon=check-circle-f .scale=${this.scale}></calcite-icon></span>${o?.label}</span><span class=solutions-social-share__success-message>${this.successMessage||o?.url}</span></div>`}_renderOptions(){let o=this._translations.options,s=document.dir==="rtl"?" solutions-social-share__option-text--rtl":"";return e`<ul class=solutions-social-share__options role=menu ${n(this._shareListRef)}><li id=copyToClipboard @click=${this._handleShareItem.bind(this,"link")} @keydown=${this._handleOptionKeyDown("link")} role=menuitem tabindex=0><span class=solutions-social-share__icon><calcite-icon icon=link .scale=${this.scale}></calcite-icon></span><span class=${`solutions-social-share__option-text${s}`}>${o?.link?.label}</span></li>${this.socialMedia?[e`<li @click=${this._handleShareItem.bind(this,"facebook")} @keydown=${this._handleOptionKeyDown("facebook")} role=menuitem tabindex=0><span class=solutions-social-share__icon>${this._renderFacebookIcon()}</span><span class=${`solutions-social-share__option-text${s}`}>${o?.facebook?.label}</span></li>`,e`<li @click=${this._handleShareItem.bind(this,"x")} @keydown=${this._handleOptionKeyDown("x")} role=menuitem tabindex=0><span class=solutions-social-share__icon>${this._renderXIcon()}</span><span class=${`solutions-social-share__option-text${s}`}>\r\n X</span></li>`,e`<li @click=${this._handleShareItem.bind(this,"linkedIn")} @keydown=${this._handleOptionKeyDown("linkedIn")} role=menuitem tabindex=0><span class=solutions-social-share__icon>${this._renderLinkedInIcon()}</span><span class=${`solutions-social-share__option-text${s}`}>${o?.linkedIn?.label}</span></li>`,e`<li @click=${this._handleShareItem.bind(this,"bluesky")} @keydown=${this._handleOptionKeyDown("bluesky")} role=menuitem tabindex=0><span class=solutions-social-share__icon>${this._renderBlueSkyIcon()}</span><span class=${`solutions-social-share__option-text${s}`}>${o?.blueSky?.label}</span></li>`]:null}</ul>`}_handleOptionKeyDown(o){return s=>{let t=s.code;(t==="Space"||t==="Enter"||t==="NumpadEnter")&&this._handleShareItem(o)}}_renderFacebookIcon(){return e`<svg height=100% style=${i({fillRule:"evenodd",clipRule:"evenodd",strokeLinejoin:"round",strokeMiterlimit:"2"})} version=1.1 viewBox="0 0 512 512" width=100% xmlns=http://www.w3.org/2000/svg>${h`<g><path d="M512,256c0,-141.385 -114.615,-256 -256,-256c-141.385,0 -256,114.615 -256,256c0,127.777 93.616,233.685 216,252.89l0,-178.89l-65,0l0,-74l65,0l0,-56.4c0,-64.16 38.219,-99.6 96.695,-99.6c28.009,0 57.305,5 57.305,5l0,63l-32.281,0c-31.801,0 -41.719,19.733 -41.719,39.978l0,48.022l71,0l-11.35,74l-59.65,0l0,178.89c122.385,-19.205 216,-125.113 216,-252.89Z" style=${i({fill:"#1877f2",fillRule:"nonzero"})} /><path d="M355.65,330l11.35,-74l-71,0l0,-48.022c0,-20.245 9.917,-39.978 41.719,-39.978l32.281,0l0,-63c0,0 -29.297,-5 -57.305,-5c-58.476,0 -96.695,35.44 -96.695,99.6l0,56.4l-65,0l0,74l65,0l0,178.89c13.033,2.045 26.392,3.11 40,3.11c13.608,0 26.966,-1.065 40,-3.11l0,-178.89l59.65,0Z" style=${i({fill:"#fff",fillRule:"nonzero"})} /></g>`}</svg>`}_renderXIcon(){return e`<svg height=100% width=100% class="solutions-social-share__x-logo" viewBox="0 0 1200 1227" fill=none xmlns=http://www.w3.org/2000/svg>${h`<rect height=400 style=${i({fill:"none"})} width=400 x=56 y=56 /><path d="M714.163 519.284L1160.89 0H1055.03L667.137 450.887L357.328 0H0L468.492 681.821L0 1226.37H105.866L515.491 750.218L842.672 1226.37H1200L714.137 519.284H714.163ZM569.165 687.828L521.697 619.934L144.011 79.6944H306.615L611.412 515.685L658.88 583.579L1055.08 1150.3H892.476L569.165 687.854V687.828Z" fill=currentColor />`}</svg>`}_renderBlueSkyIcon(){return e`<svg height=100% width=100% fill=#0f85fe xmlns=http://www.w3.org/2000/svg viewBox="0 0 512 512">${h`<path d="M111.8 62.2C170.2 105.9 233 194.7 256 242.4c23-47.6 85.8-136.4 144.2-180.2c42.1-31.6 110.3-56 110.3 21.8c0 15.5-8.9 130.5-14.1 149.2C478.2 298 412 314.6 353.1 304.5c102.9 17.5 129.1 75.5 72.5 133.5c-107.4 110.2-154.3-27.6-166.3-62.9l0 0c-1.7-4.9-2.6-7.8-3.3-7.8s-1.6 3-3.3 7.8l0 0c-12 35.3-59 173.1-166.3 62.9c-56.5-58-30.4-116 72.5-133.5C100 314.6 33.8 298 15.7 233.1C10.4 214.4 1.5 99.4 1.5 83.9c0-77.8 68.2-53.4 110.3-21.8z" />`}</svg>`}_renderLinkedInIcon(){return e`<svg height=100% style=${i({fillRule:"evenodd",clipRule:"evenodd",strokeLinejoin:"round",strokeMiterlimit:"2"})} version=1.1 viewBox="0 0 512 512" width=100% xmlns=http://www.w3.org/2000/svg>${h`<g id=g5891><path d="M512,64c0,-35.323 -28.677,-64 -64,-64l-384,0c-35.323,0 -64,28.677 -64,64l0,384c0,35.323 28.677,64 64,64l384,0c35.323,0 64,-28.677 64,-64l0,-384Z" id=background style=${i({fill:"#2867b2"})} /><g id=shapes><rect height=257.962 id=rect11 style=${i({fill:"#fff"})} width=85.76 x=61.053 y=178.667 /><path d="M104.512,54.28c-29.341,0 -48.512,19.29 -48.512,44.573c0,24.752 18.588,44.574 47.377,44.574l0.554,0c29.903,0 48.516,-19.822 48.516,-44.574c-0.555,-25.283 -18.611,-44.573 -47.935,-44.573Z" id=path13-0 style=${i({fill:"#fff",fillRule:"nonzero"})} /><path d="M357.278,172.601c-45.49,0 -65.866,25.017 -77.276,42.589l0,-36.523l-85.738,0c1.137,24.197 0,257.961 0,257.961l85.737,0l0,-144.064c0,-7.711 0.554,-15.42 2.827,-20.931c6.188,-15.4 20.305,-31.352 43.993,-31.352c31.012,0 43.436,23.664 43.436,58.327l0,138.02l85.741,0l0,-147.93c0,-79.237 -42.305,-116.097 -98.72,-116.097Z" id=path15 style=${i({fill:"#fff",fillRule:"nonzero"})} /></g></g>`}</svg>`}_togglePopover(o){o.stopPropagation(),this._opened=!this._opened,this._popoverRef.value.open=this._opened}_closePopover(){this._opened=!1,this._popoverRef.value.open=this._opened}async _handleShareItem(o){this._telemetry?.logEvent({category:y.SOLUTION_DETAILS,action:"Share",dimensions:[this.solutionTitle,this.solutionId,this.solutionVersion,w(o)]}),this.shareUrl=await this._generateShareUrl();let s=null,t=navigator?.userAgent?.includes("Chrome")??!1,l=(navigator?.userAgent?.includes("Safari")??!1)&&!t;!l&&this.shortenShareUrl&&(s=await this._shortenUrl(this.shareUrl));let r=s||this.shareUrl;switch(o){case"link":navigator.clipboard.writeText(r),this.mode==="inline"&&(this._copyLinkPopoverRef.value.open=!0,setTimeout(()=>this._copyLinkPopoverRef.value.open=!1,3e3)),this._inlineCopyLinkOpened=!0,this._copied=!0,this.mode==="popover"&&setTimeout(()=>this._closePopover(),2e3);return;case"facebook":case"bluesky":case"x":case"linkedIn":{let p;l&&(p=window.open("","_blank"),this.shortenShareUrl&&(r=await this._shortenUrl(this.shareUrl)||r));let _={url:encodeURI(r)},$=o==="x"?{..._,text:this.shareText}:_,d=k.substitute(P[o],$);this.mode==="popover"&&this._closePopover(),l&&p?(p.location=d,p.focus()):window.open(encodeURI(d),"_blank")}return}}async _shortenUrl(o){let s=(await R(C,{query:{longUrl:o,f:"json"}}))?.data?.data?.url;if(s)return s.replace("http://","https://")}_generateShareUrl(){return this.autoUpdateShareUrl&&(this.shareUrl=window.location.href),this.shareUrl}};g("solution-social-share",u);return u},"intl","request",d)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
|
|
2
|
-
import m from"./WNQD3BKN.js";import l from"./HATDZAP6.js";import k from"./4SZGXI37.js";import j from"./QNSZUCGN.js";import i from"./D6VGQMIK.js";import h from"./ONIWIJZN.js";import f from"./NVYKJK26.js";import e from"./ETEJ4PIB.js";import"./EVYF4Q4A.js";import d from"./L4UMQNXD.js";import c from"./U4QFXUX2.js";import b from"./PLHWBWIG.js";import"./4T7P5RXF.js";import"./6MZ227J7.js";import a from"./JJUJVV7A.js";import{a as u}from"./PZ4L77M5.js";import"./LHCWS2RN.js";import{a as S}from"./HA5W44KL.js";import"./36I27Q5R.js";import"./GDPFKW75.js";import"./AOBFPJ2R.js";import"./JK6XUSIM.js";import"./UPHYUDLT.js";import"./QJJXVRMV.js";import"./7FMLZNDR.js";import"./LL5C4DHP.js";import"./WPAMUSBR.js";import"./XJPOVJV7.js";import"./LDNQ56OK.js";import"./3HUY3T5F.js";import"./Z6G5PBUQ.js";import"./J3QMHA2M.js";import"./TKZAMPEI.js";import"./2IHQU2FX.js";import"./CGLFPVBM.js";import"./OEJAW72H.js";import"./5JJMGPOW.js";import"./TYX345MZ.js";import"./5UWT66A7.js";import{b as C}from"./2CMRI2B3.js";import{F as o,G as s,H as v,J as _,h as g,i as p,r as n}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([,,,{D:x,H:D,I:I,K:c,a:f,b:w,w:F},,{b:O},,,{g:k,h:A},,,,,{a:y,b:M},{a:T}])=>{var $=g`.back-color-override{background-color:var(--calcite-color-foreground-2);--calcite-tab-border-color: var(--calcite-color-foreground-3)}.display-none{display:none!important}.height-100{height:100%}calcite-tab-nav{padding-bottom:6px;padding-top:6px}calcite-tab{--calcite-color-focus: transparent}calcite-tab>*{--calcite-color-focus: initial}calcite-tabs{--calcite-tab-border-color: var(--calcite-color-border-3);height:100%}.tab-space-0{--calcite-tab-content-space-y: var(--calcite-spacing-none)}.tab-space-md{--calcite-tab-content-space-y: var(--calcite-spacing-md)}solutions-searchsort-toolbar,solutions-deploy-app-nav,solution-details-panel,solutions-resources-shell,solutions-deployed-shell,solutions-all-shell,calcite-tab-nav,solution-deployed-card-panel{width:1440px;display:block;max-width:96vw;padding-right:var(--calcite-spacing-none);padding-left:var(--calcite-spacing-none);margin-left:auto;margin-right:auto;box-sizing:border-box}.border{height:var(--calcite-spacing-px);border-bottom-color:var(--calcite-color-border-3);border-bottom-style:solid;border-bottom-width:var(--calcite-border-width-sm);box-sizing:border-box}.overflow-auto{overflow:auto}solution-details-panel{scroll-margin-top:3rem}`,m=class extends v{constructor(){super(),this.initTitleOrId="",this.sortType="relevance",this.useLocalAppConfig=!1,this.authentication=void 0,this._isLoaded=!1,this.isMobile=!1,this._activeTab="all-solutions",this._showDeployedCardFetchFailed=!1,this._translations=S({name:"solutions-deploy-app",blocking:!0}),this._agoTerms=`${I}`,this._allCards=[],this._allShell=o(),this._allTab=o(),this._allTabTitle=o(),this._resourcesTab=o(),this._resourcesTabTitle=o(),this._categories=[],this._configContextProvider=u({context:w}),this._delay=!1,this._deployAppNav=o(),this._deployedCardPanel=o(),this._deployCardFetchFailedMessage="",this._deployedCardTab=o(),this._deployedCardTabTitle=o(),this._detailsShell=o(),this._detailsTab=o(),this._detailsTabTitle=o(),this._forceInit=!1,this._getSuggested=!1,this._tabpanelsFixed=!1,this._isMobileContextProvider=u({context:f}),this._mySolutionsShell=o(),this._mySolutionsTab=o(),this._mySolutionsTabTitle=o(),this._sortField="relevance",this._sortOrder="desc",this._telemetryManager=new T,this.deployAppTabSelected=n(),this.deployedCardFetchFailed=n(),this.detailsCardSelected=n(),this.deployedCardSelected=n(),this.metaTagStringsReady=n(),this.sessionRefreshed=n(),this.tabChanged=n(),this.listenOn(window,"detailsCardSelected",this._detailsCardSelected),this.listenOn(window,"deployedCardSelected",this._deployedCardSelected),this.listenOn(window,"displayDeployedCard",this._handleDeployedCardDisplay),this.listenOn(window,"navTabSelected",this._setActiveTab),this.listenOn(window,"forceSelectTab",t=>this.selectTab(t.detail,{})),this._mediaQueryChange=this._mediaQueryChange.bind(this)}static{this.properties={appConfig:1,initTab:1,initTitleOrId:1,sortType:1,useLocalAppConfig:5,authentication:16,_isLoaded:16,isMobile:16,_activeTab:16,_showDeployedCardFetchFailed:16,_translations:16}}static{this.styles=$}get _telemetry(){return this._configContextProvider.value?.telemetrySession}get _isDisconnectedEnvironment(){return this._configContextProvider.value?.isEnterprise===!0&&this._configContextProvider.value?.authentication?.CanSearchArcGISOnline===!1}async selectTab(t,e){if(this._isLoaded||this._forceInit){let i=this._getDefaultSearchOptions(e);switch(this._searchSortToolbar&&(this._searchSortToolbar.scope=t.tabType),t.tabType){case"all-solutions":this._allTab.value.selected=!0,this._allTabTitle.value.selected=!0,i&&await this._allShell.value?.searchSolutions(i);break;case"resources":this._resourcesTab.value.selected=!0,this._resourcesTabTitle.value.selected=!0;break;case"deployed-card":if(this.authentication?.IsSignedIn){if(this._forceInit=!0,this._isLoaded=!1,this._cardFetcherDeployed&&await this._getDeployedSolution(t.tabTitleOrId),this._deployedSolutions?.cards?.length>0){let a;this._deployedSolutions.cards.some(l=>l.id===t.tabTitleOrId?(a=l,this.deployedCardSelected.emit({card:a}),!0):!1),this._isLoaded=!0,this._forceInit=!1}else return this._isLoaded=!0,this._forceInit=!1,this.selectTab({tabTitleOrId:"",tabType:"deployments"},e);break}else await this.authentication?.signIn();case"details":if(this._allCards){let a=k(this._allCards,t.tabTitleOrId);a=a||A(this._allCards,t.tabTitleOrId),a?(this._detailsTab.value.selected=!0,this._detailsTabTitle.value.selected=!0,this.detailsCardSelected.emit(a)):(t.tabType="all-solutions",this._allTab.value.selected=!0,this._allTabTitle.value.selected=!0)}break;case"deployments":this._mySolutionsTab.value.selected=!0,this._mySolutionsTabTitle.value.selected=!0,this._searchSortToolbar&&i?.filter&&this._searchSortToolbar.changeOwnerFilter(i.filter!=="Organization"),i&&await this._mySolutionsShell.value?.searchSolutions(i);break}return this._setActiveTab(new CustomEvent("setActiveTab",{detail:t})),this._blurTabs(),this._showDeployedCardFetchFailed&&(this.deployedCardFetchFailed.emit({message:this._deployCardFetchFailedMessage,title:this._translations.failedToOpen}),this._showDeployedCardFetchFailed=!1),!0}else return this._initTab=t,this._initFilters=e,!1}async connectedCallback(){super.connectedCallback(),this._mediaQuery=window.matchMedia("(max-width: 800px)"),this._mediaQuery.addEventListener("change",this._mediaQueryChange),this._mediaQueryChange(this._mediaQuery)}updated(){this._fixTabpanelFocus()}_fixTabpanelFocus(){if(!this._tabpanelsFixed&&this._allTab.value){let t=[this._allTab,this._mySolutionsTab,this._resourcesTab,this._detailsTab,this._deployedCardTab];Promise.all(t.map(async e=>{let i=e.value;if(i&&(await i.componentOnReady?.(),i.shadowRoot)){let a=i.shadowRoot.querySelector('[role="tabpanel"]');a&&(a.tabIndex=-1)}})).then(()=>{this._tabpanelsFixed=!0,this._setupTabpanelObserver()}).catch(()=>{this._tabpanelsFixed=!0})}}_setupTabpanelObserver(){this._tabpanelObserver||(this._tabpanelObserver=new MutationObserver(t=>{t.forEach(e=>{if(e.type==="attributes"&&e.attributeName==="tabindex"){let i=e.target;i.getAttribute("role")==="tabpanel"&&i.tabIndex===0&&(i.tabIndex=-1)}})}),[this._allTab,this._mySolutionsTab,this._resourcesTab,this._detailsTab,this._deployedCardTab].forEach(t=>{let e=t.value;if(e?.shadowRoot){let i=e.shadowRoot.querySelector('[role="tabpanel"]');i&&this._tabpanelObserver.observe(i,{attributes:!0,attributeFilter:["tabindex"]})}}))}async load(){this.useLocalAppConfig&&(this.appConfig=O)}render(){let t=this._isLoaded?"display-none":"",e=this._isLoaded?"":"display-none";return p`<calcite-shell><solutions-deploy-app-nav .appConfig=${this.appConfig} .initTab=${this.initTab} @authInit=${this._handleAuthInit} slot=header ${s(this._deployAppNav)}></solutions-deploy-app-nav>${this._isSearchToolbarShowing()&&p`<div class="border" slot=header></div>`||""}<solutions-searchsort-toolbar slot=header ${s(async i=>{i&&(await this._deployAppNav.value?.componentOnReady(),this._searchSortToolbar=i)})}></solutions-searchsort-toolbar><calcite-loader class=${_(t)} id=solutions-loader .label=${this._translations.fetchingAllSolutions}></calcite-loader><calcite-tabs class=${_(e)} scale=l><calcite-tab-nav class="display-none" @calciteTabChange=${this._handleCalciteTabChanged} slot=title-group><calcite-tab-title ${s(this._allTabTitle)}>${this._translations.allSolutions}</calcite-tab-title><calcite-tab-title ${s(this._mySolutionsTabTitle)}>${this._translations.mySolutions}</calcite-tab-title><calcite-tab-title ${s(this._resourcesTabTitle)}>${this._translations.solutionResources}</calcite-tab-title><calcite-tab-title class="display-none" ${s(this._detailsTabTitle)}></calcite-tab-title><calcite-tab-title class="display-none" ${s(this._deployedCardTabTitle)}></calcite-tab-title></calcite-tab-nav><calcite-tab class="back-color-override tab-space-0" selected ${s(this._allTab)}><solutions-all-shell class="height-100" ${s(this._allShell)}></solutions-all-shell></calcite-tab><calcite-tab class="back-color-override tab-space-0" ${s(this._mySolutionsTab)}><solutions-deployed-shell class="height-100" ${s(this._mySolutionsShell)}></solutions-deployed-shell></calcite-tab><calcite-tab class="back-color-override tab-space-0" ${s(this._resourcesTab)}><solutions-resources-shell class="height-100"></solutions-resources-shell></calcite-tab><calcite-tab class="back-color-override" ${s(this._detailsTab)}><solution-details-panel class="height-100" ${s(this._detailsShell)}></solution-details-panel></calcite-tab><calcite-tab class="back-color-override tab-space-0" ${s(this._deployedCardTab)}><solution-deployed-card-panel class="shell-container height-100" ${s(this._deployedCardPanel)}></solution-deployed-card-panel></calcite-tab></calcite-tabs></calcite-shell>`}loaded(){this._setScrollbarGutters()}disconnectedCallback(){super.disconnectedCallback(),this._mediaQuery?.removeEventListener("change",this._mediaQueryChange),this._tabpanelObserver?.disconnect()}async _handleAuthInit(t){let e=t.detail;e.telemetrySession||(e.telemetrySession=T.getDisabledSession()),this._configContextProvider.setValue(e),e.authentication&&(this.authentication=e.authentication),this._cardFetcherDeployed=new y(e.locale,e.orgUrl,e.portalURL),this._cardsFetcher=new y(e.locale,e.orgUrl,e.portalURL),this._isDisconnectedEnvironment||await this._getSolutions(e.primarySolutionsGroupId,e.agoBasedEnterpriseSolutionsGroupId),this._configContextProvider.value.allCards=this._allCards,this._configContextProvider.value.anonAgolSession=this._cardsFetcher.anonAgolSession,this._configContextProvider.value.agolPortalUrl=this._cardsFetcher.agolPortalUrl,await this._initializeTelemetry(),this._isLoaded=!0,this._setRefreshInterval(),this._initTab?(this.selectTab(this._initTab,this._initFilters),this._logTabViewTelemetry(this._initTab.tabType),this._initTab=void 0,this._initFilters=void 0):this.authentication?.IsSignedIn&&(this.initTab==="details"||this.initTab==="deployed-card"||(this._logTabViewTelemetry(this._activeTab),this._emitMetaTagStrings(this._activeTab)))}_mediaQueryChange(t){this.isMobile=t.matches,this._isMobileContextProvider.setValue(this.isMobile)}_setActiveTab(t){let e=t.detail.tabType,i=this._activeTab!==e;switch(this._activeTab=e,i&&this._logTabViewTelemetry(e),e){case"all-solutions":this._allTabTitle.value?.click();break;case"deployments":this._mySolutionsTabTitle.value?.click();break;case"resources":this._resourcesTabTitle.value?.click();break;case"deployed-card":this._deployedCardTabTitle.value?.click();break;case"details":this._detailsTabTitle.value?.click();break}e!=="details"&&e!=="deployed-card"&&(this._deployAppNav.value.activateMenuItem(e),this.deployAppTabSelected.emit(e),this._emitMetaTagStrings(e))}_logTabViewTelemetry(t,e){let i;switch(t){case"all-solutions":i=c.ALL_SOLUTIONS;break;case"deployments":i=c.DEPLOYMENTS;break;case"resources":i=c.RESOURCES;break;case"details":i=c.SOLUTION_DETAILS;break;case"deployed-card":i=c.DEPLOYMENTS;break}if(!((t==="details"||t==="deployed-card")&&!e)&&i){let a=[];if((t==="details"||t==="deployed-card")&&e){let r=e;a.push(r.title||""),a.push(r.deployCommonId||""),a.push(r.deployVersion||"")}let l=t==="deployed-card"?"Open":"View";this._telemetry?.logEvent({category:i,action:l,dimensions:a.length>0?a:void 0})}}_emitMetaTagStrings(t,e){let i="",a="";switch(t){case"all-solutions":i=this._translations.metaAllSolutionsTitle,a=this._translations.metaAllSolutionsDescription;break;case"deployments":case"deployed-card":i=this._translations.metaDeploymentsTitle,a=this._translations.metaDeploymentsDescription;break;case"resources":i=this._translations.metaResourcesTitle,a=this._translations.metaResourcesDescription;break;case"details":e&&(i=this._translations.metaDetailsTitle.replace("{title}",e.title),a=e.snippet);break}this.metaTagStringsReady.emit({pageType:t,title:i,description:a,detailTemplate:e})}_handleCalciteTabChanged(){this.tabChanged.emit(this._activeTab)}_detailsCardSelected(t){this._activeTab="details",this._detailsTabTitle.value.selected=!0,this._detailsTab.value.selected=!0,this._deployAppNav.value.clearMenuItems(),t?.detail&&(this._selectedDetailsCard=t.detail),this._logTabViewTelemetry("details",this._selectedDetailsCard),this._emitMetaTagStrings("details",this._selectedDetailsCard)}_deployedCardSelected(t){this._activeTab="deployed-card",this._deployedCardTabTitle.value.selected=!0,this._deployedCardTab.value.selected=!0,this._deployAppNav.value.clearMenuItems(),t?.detail?.card&&(this._selectedDeployedCard=t.detail.card),this._logTabViewTelemetry("deployed-card",this._selectedDeployedCard),this._emitMetaTagStrings("deployed-card")}_handleDeployedCardDisplay(t){let{card:e,cardRef:i}=t.detail;this.deployedCardSelected.emit({card:e,cardRef:i})}async _initializeTelemetry(){let t=this._configContextProvider.value;if(!this.authentication||!t)return;let e=await this._telemetryManager.initializeTelemetry(this.authentication,t);this._configContextProvider.value.telemetrySession=e}async _getSolutions(t,e){if(this._isDisconnectedEnvironment)return[];this._abortController?(this._abortController.abort(),this._abortController=new AbortController):this._abortController=new AbortController;let i=await this._cardsFetcher?.requestAvailableSolutionCards({q:this._agoTerms,filter:"type:Solution",sortField:this._sortField,sortOrder:this._sortOrder,nextStart:-1,categories:this._categories,delay:this._delay,getSuggested:this._getSuggested,num:100},t,e,this._configContextProvider.value.userSession,this._configContextProvider.value.isEnterprise,this._abortController.signal,{num:1e3});return this._abortController=void 0,this._allCards.length===0&&i?.cards&&(this._allCards=i?.cards),this._allCards}async _getDeployedSolution(t){let e=this._configContextProvider.value.authentication,i=this._configContextProvider.value.userSession;if(e&&i&&e.IsSignedIn){this._abortControllerDeployed?(this._abortControllerDeployed.abort(),this._abortControllerDeployed=new AbortController):this._abortControllerDeployed=new AbortController;let a=F(e);try{let l=await M(e,i,this._cardsFetcher,this._cardFetcherDeployed,D,"created","desc",!1,[],[],this._abortControllerDeployed.signal,a?"My organization's solutions":"My solutions",t);l.cards.length===0||l.cards[0].typeKeywords.indexOf("Deployed")<0?(this._deployCardFetchFailedMessage=this._translations.failedToFetchNotSolution.replace("{{ITEMID}}",t),this._showDeployedCardFetchFailed=!0):this._deployedSolutions=l}catch(l){let r=l.message;r.indexOf("CONT_0001")>-1||r.indexOf("Item does not exist or is inaccessible.")>-1?(this._deployCardFetchFailedMessage=this._translations.failedToFetchWrongId.replace("{{ITEMID}}",t),this._showDeployedCardFetchFailed=!0):r.indexOf("GWM_0003")>-1||r.indexOf("You do not have permissions to access this resource or perform this operation.")>-1?(this._deployCardFetchFailedMessage=this._translations.failedToFetchWrongPermissions.replace("{{ITEMID}}",t),this._showDeployedCardFetchFailed=!0):(this._showDeployedCardFetchFailed=!0,this._deployCardFetchFailedMessage=""),console.warn(l)}}}_blurTabs(){this._allTabTitle.value?.blur(),this._resourcesTabTitle.value?.blur(),this._detailsTabTitle.value?.blur(),this._mySolutionsTabTitle.value?.blur()}_isSearchToolbarShowing(){return this._activeTab==="all-solutions"||this._activeTab==="deployments"&&this.authentication?.IsSignedIn===!0}_getDefaultSearchOptions(t){let e;if(t){let i=t.domain,a=t.industry==="AEC"?x.AEC:t.industry,l=t.offerType,r=t.searchTerm,E="",d=t.sortField,h=t.owner,b=t.filter;e=i||a?{type:i?"domain":a?"industry":""}:void 0,i&&(e=e?{...e,domain:i}:{domain:i}),a&&(e=e?{...e,industry:a}:{industry:a}),r&&(e=e?{...e,searchTerm:r}:{searchTerm:r}),e&&(e={...e,displayValue:E}),d&&(e=e?{...e,sortType:d}:{sortType:d}),l&&(d=l.toLowerCase(),e=e?{...e,sortType:d}:{sortType:d}),h&&(e=e?{...e,owner:h}:{owner:h}),b&&(e=e?{...e,filter:b}:{filter:b})}return e}_setScrollbarGutters(){let t=this._detailsTab.value?.shadowRoot?.firstElementChild;t?.style&&(t.style.scrollbarGutter="stable both-edges");let e=this._deployedCardTab.value?.shadowRoot?.firstElementChild;e?.style&&(e.style.scrollbarGutter="stable both-edges")}_setRefreshInterval(){let{userSession:t,authentication:e}=this._configContextProvider.value;if(t&&t.tokenDuration&&e?.IsSignedIn){let i=Date.now(),a=(e.Credential?.expires-i)*.95;setInterval(async()=>{if(e.Credential&&e.Credential.expires){await e.Credential?.refreshToken();let l=new Date(e.Credential.expires);t.updateToken(e.Credential.token,l),this.sessionRefreshed.emit(t.token)}},a)}}};C("solutions-deploy-app",m);return m},"identity/IdentityManager","identity/OAuthInfo","portal/Portal",a,b,c,d,e,f,h,i,j,k,l,m)
|
|
2
|
+
import m from"./WNOPX4X3.js";import l from"./WGKOKVQY.js";import k from"./WPV4X3NK.js";import j from"./G2T6OYTB.js";import i from"./TE7VJ4KH.js";import h from"./76M3UWJF.js";import f from"./PAKIDHHK.js";import e from"./7PY2VM2S.js";import"./IZU7KP25.js";import d from"./ESOI3UW5.js";import c from"./QXSUDN7A.js";import b from"./TAHIBODN.js";import"./4T7P5RXF.js";import"./6MZ227J7.js";import a from"./HHKKBJCY.js";import{a as u}from"./PZ4L77M5.js";import"./DD3JC2L3.js";import{a as S}from"./Y3XY5BXI.js";import"./36I27Q5R.js";import"./GDPFKW75.js";import"./AOBFPJ2R.js";import"./JK6XUSIM.js";import"./UPHYUDLT.js";import"./QJJXVRMV.js";import"./7FMLZNDR.js";import"./LL5C4DHP.js";import"./WPAMUSBR.js";import"./XJPOVJV7.js";import"./LDNQ56OK.js";import"./3HUY3T5F.js";import"./Z6G5PBUQ.js";import"./J3QMHA2M.js";import"./TKZAMPEI.js";import"./2IHQU2FX.js";import"./CGLFPVBM.js";import"./OEJAW72H.js";import"./5JJMGPOW.js";import"./TYX345MZ.js";import"./5UWT66A7.js";import{b as C}from"./S7XOHDIW.js";import{F as o,G as s,H as v,J as _,h as g,i as p,r as n}from"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([,,,{D:x,H:D,I:I,K:c,a:f,b:w,w:F},,{b:O},,,{g:k,h:A},,,,,{a:y,b:M},{a:T}])=>{var $=g`.back-color-override{background-color:var(--calcite-color-foreground-2);--calcite-tab-border-color: var(--calcite-color-foreground-3)}.display-none{display:none!important}.height-100{height:100%}calcite-tab-nav{padding-bottom:6px;padding-top:6px}calcite-tab{--calcite-color-focus: transparent}calcite-tab>*{--calcite-color-focus: initial}calcite-tabs{--calcite-tab-border-color: var(--calcite-color-border-3);height:100%}.tab-space-0{--calcite-tab-content-space-y: var(--calcite-spacing-none)}.tab-space-md{--calcite-tab-content-space-y: var(--calcite-spacing-md)}solutions-searchsort-toolbar,solutions-deploy-app-nav,solution-details-panel,solutions-resources-shell,solutions-deployed-shell,solutions-all-shell,calcite-tab-nav,solution-deployed-card-panel{width:1440px;display:block;max-width:96vw;padding-right:var(--calcite-spacing-none);padding-left:var(--calcite-spacing-none);margin-left:auto;margin-right:auto;box-sizing:border-box}.border{height:var(--calcite-spacing-px);border-bottom-color:var(--calcite-color-border-3);border-bottom-style:solid;border-bottom-width:var(--calcite-border-width-sm);box-sizing:border-box}.overflow-auto{overflow:auto}solution-details-panel{scroll-margin-top:3rem}`,m=class extends v{constructor(){super(),this.initTitleOrId="",this.sortType="relevance",this.useLocalAppConfig=!1,this.authentication=void 0,this._isLoaded=!1,this.isMobile=!1,this._activeTab="all-solutions",this._showDeployedCardFetchFailed=!1,this._translations=S({name:"solutions-deploy-app",blocking:!0}),this._agoTerms=`${I}`,this._allCards=[],this._allShell=o(),this._allTab=o(),this._allTabTitle=o(),this._resourcesTab=o(),this._resourcesTabTitle=o(),this._categories=[],this._configContextProvider=u({context:w}),this._delay=!1,this._deployAppNav=o(),this._deployedCardPanel=o(),this._deployCardFetchFailedMessage="",this._deployedCardTab=o(),this._deployedCardTabTitle=o(),this._detailsShell=o(),this._detailsTab=o(),this._detailsTabTitle=o(),this._forceInit=!1,this._getSuggested=!1,this._tabpanelsFixed=!1,this._isMobileContextProvider=u({context:f}),this._mySolutionsShell=o(),this._mySolutionsTab=o(),this._mySolutionsTabTitle=o(),this._sortField="relevance",this._sortOrder="desc",this._telemetryManager=new T,this.deployAppTabSelected=n(),this.deployedCardFetchFailed=n(),this.detailsCardSelected=n(),this.deployedCardSelected=n(),this.metaTagStringsReady=n(),this.sessionRefreshed=n(),this.tabChanged=n(),this.listenOn(window,"detailsCardSelected",this._detailsCardSelected),this.listenOn(window,"deployedCardSelected",this._deployedCardSelected),this.listenOn(window,"displayDeployedCard",this._handleDeployedCardDisplay),this.listenOn(window,"navTabSelected",this._setActiveTab),this.listenOn(window,"forceSelectTab",t=>this.selectTab(t.detail,{})),this._mediaQueryChange=this._mediaQueryChange.bind(this)}static{this.properties={appConfig:1,initTab:1,initTitleOrId:1,sortType:1,useLocalAppConfig:5,authentication:16,_isLoaded:16,isMobile:16,_activeTab:16,_showDeployedCardFetchFailed:16,_translations:16}}static{this.styles=$}get _telemetry(){return this._configContextProvider.value?.telemetrySession}get _isDisconnectedEnvironment(){return this._configContextProvider.value?.isEnterprise===!0&&this._configContextProvider.value?.authentication?.CanSearchArcGISOnline===!1}async selectTab(t,e){if(this._isLoaded||this._forceInit){let i=this._getDefaultSearchOptions(e);switch(this._searchSortToolbar&&(this._searchSortToolbar.scope=t.tabType),t.tabType){case"all-solutions":this._allTab.value.selected=!0,this._allTabTitle.value.selected=!0,i&&await this._allShell.value?.searchSolutions(i);break;case"resources":this._resourcesTab.value.selected=!0,this._resourcesTabTitle.value.selected=!0;break;case"deployed-card":if(this.authentication?.IsSignedIn){if(this._forceInit=!0,this._isLoaded=!1,this._cardFetcherDeployed&&await this._getDeployedSolution(t.tabTitleOrId),this._deployedSolutions?.cards?.length>0){let a;this._deployedSolutions.cards.some(l=>l.id===t.tabTitleOrId?(a=l,this.deployedCardSelected.emit({card:a}),!0):!1),this._isLoaded=!0,this._forceInit=!1}else return this._isLoaded=!0,this._forceInit=!1,this.selectTab({tabTitleOrId:"",tabType:"deployments"},e);break}else await this.authentication?.signIn();case"details":if(this._allCards){let a=k(this._allCards,t.tabTitleOrId);a=a||A(this._allCards,t.tabTitleOrId),a?(this._detailsTab.value.selected=!0,this._detailsTabTitle.value.selected=!0,this.detailsCardSelected.emit(a)):(t.tabType="all-solutions",this._allTab.value.selected=!0,this._allTabTitle.value.selected=!0)}break;case"deployments":this._mySolutionsTab.value.selected=!0,this._mySolutionsTabTitle.value.selected=!0,this._searchSortToolbar&&i?.filter&&this._searchSortToolbar.changeOwnerFilter(i.filter!=="Organization"),i&&await this._mySolutionsShell.value?.searchSolutions(i);break}return this._setActiveTab(new CustomEvent("setActiveTab",{detail:t})),this._blurTabs(),this._showDeployedCardFetchFailed&&(this.deployedCardFetchFailed.emit({message:this._deployCardFetchFailedMessage,title:this._translations.failedToOpen}),this._showDeployedCardFetchFailed=!1),!0}else return this._initTab=t,this._initFilters=e,!1}async connectedCallback(){super.connectedCallback(),this._mediaQuery=window.matchMedia("(max-width: 800px)"),this._mediaQuery.addEventListener("change",this._mediaQueryChange),this._mediaQueryChange(this._mediaQuery)}updated(){this._fixTabpanelFocus()}_fixTabpanelFocus(){if(!this._tabpanelsFixed&&this._allTab.value){let t=[this._allTab,this._mySolutionsTab,this._resourcesTab,this._detailsTab,this._deployedCardTab];Promise.all(t.map(async e=>{let i=e.value;if(i&&(await i.componentOnReady?.(),i.shadowRoot)){let a=i.shadowRoot.querySelector('[role="tabpanel"]');a&&(a.tabIndex=-1)}})).then(()=>{this._tabpanelsFixed=!0,this._setupTabpanelObserver()}).catch(()=>{this._tabpanelsFixed=!0})}}_setupTabpanelObserver(){this._tabpanelObserver||(this._tabpanelObserver=new MutationObserver(t=>{t.forEach(e=>{if(e.type==="attributes"&&e.attributeName==="tabindex"){let i=e.target;i.getAttribute("role")==="tabpanel"&&i.tabIndex===0&&(i.tabIndex=-1)}})}),[this._allTab,this._mySolutionsTab,this._resourcesTab,this._detailsTab,this._deployedCardTab].forEach(t=>{let e=t.value;if(e?.shadowRoot){let i=e.shadowRoot.querySelector('[role="tabpanel"]');i&&this._tabpanelObserver.observe(i,{attributes:!0,attributeFilter:["tabindex"]})}}))}async load(){this.useLocalAppConfig&&(this.appConfig=O)}render(){let t=this._isLoaded?"display-none":"",e=this._isLoaded?"":"display-none";return p`<calcite-shell><solutions-deploy-app-nav .appConfig=${this.appConfig} .initTab=${this.initTab} @authInit=${this._handleAuthInit} slot=header ${s(this._deployAppNav)}></solutions-deploy-app-nav>${this._isSearchToolbarShowing()&&p`<div class="border" slot=header></div>`||""}<solutions-searchsort-toolbar slot=header ${s(async i=>{i&&(await this._deployAppNav.value?.componentOnReady(),this._searchSortToolbar=i)})}></solutions-searchsort-toolbar><calcite-loader class=${_(t)} id=solutions-loader .label=${this._translations.fetchingAllSolutions}></calcite-loader><calcite-tabs class=${_(e)} scale=l><calcite-tab-nav class="display-none" @calciteTabChange=${this._handleCalciteTabChanged} slot=title-group><calcite-tab-title ${s(this._allTabTitle)}>${this._translations.allSolutions}</calcite-tab-title><calcite-tab-title ${s(this._mySolutionsTabTitle)}>${this._translations.mySolutions}</calcite-tab-title><calcite-tab-title ${s(this._resourcesTabTitle)}>${this._translations.solutionResources}</calcite-tab-title><calcite-tab-title class="display-none" ${s(this._detailsTabTitle)}></calcite-tab-title><calcite-tab-title class="display-none" ${s(this._deployedCardTabTitle)}></calcite-tab-title></calcite-tab-nav><calcite-tab class="back-color-override tab-space-0" selected ${s(this._allTab)}><solutions-all-shell class="height-100" ${s(this._allShell)}></solutions-all-shell></calcite-tab><calcite-tab class="back-color-override tab-space-0" ${s(this._mySolutionsTab)}><solutions-deployed-shell class="height-100" ${s(this._mySolutionsShell)}></solutions-deployed-shell></calcite-tab><calcite-tab class="back-color-override tab-space-0" ${s(this._resourcesTab)}><solutions-resources-shell class="height-100"></solutions-resources-shell></calcite-tab><calcite-tab class="back-color-override" ${s(this._detailsTab)}><solution-details-panel class="height-100" ${s(this._detailsShell)}></solution-details-panel></calcite-tab><calcite-tab class="back-color-override tab-space-0" ${s(this._deployedCardTab)}><solution-deployed-card-panel class="shell-container height-100" ${s(this._deployedCardPanel)}></solution-deployed-card-panel></calcite-tab></calcite-tabs></calcite-shell>`}loaded(){this._setScrollbarGutters()}disconnectedCallback(){super.disconnectedCallback(),this._mediaQuery?.removeEventListener("change",this._mediaQueryChange),this._tabpanelObserver?.disconnect()}async _handleAuthInit(t){let e=t.detail;e.telemetrySession||(e.telemetrySession=T.getDisabledSession()),this._configContextProvider.setValue(e),e.authentication&&(this.authentication=e.authentication),this._cardFetcherDeployed=new y(e.locale,e.orgUrl,e.portalURL),this._cardsFetcher=new y(e.locale,e.orgUrl,e.portalURL),this._isDisconnectedEnvironment||await this._getSolutions(e.primarySolutionsGroupId,e.agoBasedEnterpriseSolutionsGroupId),this._configContextProvider.value.allCards=this._allCards,this._configContextProvider.value.anonAgolSession=this._cardsFetcher.anonAgolSession,this._configContextProvider.value.agolPortalUrl=this._cardsFetcher.agolPortalUrl,await this._initializeTelemetry(),this._isLoaded=!0,this._setRefreshInterval(),this._initTab?(this.selectTab(this._initTab,this._initFilters),this._logTabViewTelemetry(this._initTab.tabType),this._initTab=void 0,this._initFilters=void 0):this.authentication?.IsSignedIn&&(this.initTab==="details"||this.initTab==="deployed-card"||(this._logTabViewTelemetry(this._activeTab),this._emitMetaTagStrings(this._activeTab)))}_mediaQueryChange(t){this.isMobile=t.matches,this._isMobileContextProvider.setValue(this.isMobile)}_setActiveTab(t){let e=t.detail.tabType,i=this._activeTab!==e;switch(this._activeTab=e,i&&this._logTabViewTelemetry(e),e){case"all-solutions":this._allTabTitle.value?.click();break;case"deployments":this._mySolutionsTabTitle.value?.click();break;case"resources":this._resourcesTabTitle.value?.click();break;case"deployed-card":this._deployedCardTabTitle.value?.click();break;case"details":this._detailsTabTitle.value?.click();break}e!=="details"&&e!=="deployed-card"&&(this._deployAppNav.value.activateMenuItem(e),this.deployAppTabSelected.emit(e),this._emitMetaTagStrings(e))}_logTabViewTelemetry(t,e){let i;switch(t){case"all-solutions":i=c.ALL_SOLUTIONS;break;case"deployments":i=c.DEPLOYMENTS;break;case"resources":i=c.RESOURCES;break;case"details":i=c.SOLUTION_DETAILS;break;case"deployed-card":i=c.DEPLOYMENTS;break}if(!((t==="details"||t==="deployed-card")&&!e)&&i){let a=[];if((t==="details"||t==="deployed-card")&&e){let r=e;a.push(r.title||""),a.push(r.deployCommonId||""),a.push(r.deployVersion||"")}let l=t==="deployed-card"?"Open":"View";this._telemetry?.logEvent({category:i,action:l,dimensions:a.length>0?a:void 0})}}_emitMetaTagStrings(t,e){let i="",a="";switch(t){case"all-solutions":i=this._translations.metaAllSolutionsTitle,a=this._translations.metaAllSolutionsDescription;break;case"deployments":case"deployed-card":i=this._translations.metaDeploymentsTitle,a=this._translations.metaDeploymentsDescription;break;case"resources":i=this._translations.metaResourcesTitle,a=this._translations.metaResourcesDescription;break;case"details":e&&(i=this._translations.metaDetailsTitle.replace("{title}",e.title),a=e.snippet);break}this.metaTagStringsReady.emit({pageType:t,title:i,description:a,detailTemplate:e})}_handleCalciteTabChanged(){this.tabChanged.emit(this._activeTab)}_detailsCardSelected(t){this._activeTab="details",this._detailsTabTitle.value.selected=!0,this._detailsTab.value.selected=!0,this._deployAppNav.value.clearMenuItems(),t?.detail&&(this._selectedDetailsCard=t.detail),this._logTabViewTelemetry("details",this._selectedDetailsCard),this._emitMetaTagStrings("details",this._selectedDetailsCard)}_deployedCardSelected(t){this._activeTab="deployed-card",this._deployedCardTabTitle.value.selected=!0,this._deployedCardTab.value.selected=!0,this._deployAppNav.value.clearMenuItems(),t?.detail?.card&&(this._selectedDeployedCard=t.detail.card),this._logTabViewTelemetry("deployed-card",this._selectedDeployedCard),this._emitMetaTagStrings("deployed-card")}_handleDeployedCardDisplay(t){let{card:e,cardRef:i}=t.detail;this.deployedCardSelected.emit({card:e,cardRef:i})}async _initializeTelemetry(){let t=this._configContextProvider.value;if(!this.authentication||!t)return;let e=await this._telemetryManager.initializeTelemetry(this.authentication,t);this._configContextProvider.value.telemetrySession=e}async _getSolutions(t,e){if(this._isDisconnectedEnvironment)return[];this._abortController?(this._abortController.abort(),this._abortController=new AbortController):this._abortController=new AbortController;let i=await this._cardsFetcher?.requestAvailableSolutionCards({q:this._agoTerms,filter:"type:Solution",sortField:this._sortField,sortOrder:this._sortOrder,nextStart:-1,categories:this._categories,delay:this._delay,getSuggested:this._getSuggested,num:100},t,e,this._configContextProvider.value.userSession,this._configContextProvider.value.isEnterprise,this._abortController.signal,{num:1e3});return this._abortController=void 0,this._allCards.length===0&&i?.cards&&(this._allCards=i?.cards),this._allCards}async _getDeployedSolution(t){let e=this._configContextProvider.value.authentication,i=this._configContextProvider.value.userSession;if(e&&i&&e.IsSignedIn){this._abortControllerDeployed?(this._abortControllerDeployed.abort(),this._abortControllerDeployed=new AbortController):this._abortControllerDeployed=new AbortController;let a=F(e);try{let l=await M(e,i,this._cardsFetcher,this._cardFetcherDeployed,D,"created","desc",!1,[],[],this._abortControllerDeployed.signal,a?"My organization's solutions":"My solutions",t);l.cards.length===0||l.cards[0].typeKeywords.indexOf("Deployed")<0?(this._deployCardFetchFailedMessage=this._translations.failedToFetchNotSolution.replace("{{ITEMID}}",t),this._showDeployedCardFetchFailed=!0):this._deployedSolutions=l}catch(l){let r=l.message;r.indexOf("CONT_0001")>-1||r.indexOf("Item does not exist or is inaccessible.")>-1?(this._deployCardFetchFailedMessage=this._translations.failedToFetchWrongId.replace("{{ITEMID}}",t),this._showDeployedCardFetchFailed=!0):r.indexOf("GWM_0003")>-1||r.indexOf("You do not have permissions to access this resource or perform this operation.")>-1?(this._deployCardFetchFailedMessage=this._translations.failedToFetchWrongPermissions.replace("{{ITEMID}}",t),this._showDeployedCardFetchFailed=!0):(this._showDeployedCardFetchFailed=!0,this._deployCardFetchFailedMessage=""),console.warn(l)}}}_blurTabs(){this._allTabTitle.value?.blur(),this._resourcesTabTitle.value?.blur(),this._detailsTabTitle.value?.blur(),this._mySolutionsTabTitle.value?.blur()}_isSearchToolbarShowing(){return this._activeTab==="all-solutions"||this._activeTab==="deployments"&&this.authentication?.IsSignedIn===!0}_getDefaultSearchOptions(t){let e;if(t){let i=t.domain,a=t.industry==="AEC"?x.AEC:t.industry,l=t.offerType,r=t.searchTerm,E="",d=t.sortField,h=t.owner,b=t.filter;e=i||a?{type:i?"domain":a?"industry":""}:void 0,i&&(e=e?{...e,domain:i}:{domain:i}),a&&(e=e?{...e,industry:a}:{industry:a}),r&&(e=e?{...e,searchTerm:r}:{searchTerm:r}),e&&(e={...e,displayValue:E}),d&&(e=e?{...e,sortType:d}:{sortType:d}),l&&(d=l.toLowerCase(),e=e?{...e,sortType:d}:{sortType:d}),h&&(e=e?{...e,owner:h}:{owner:h}),b&&(e=e?{...e,filter:b}:{filter:b})}return e}_setScrollbarGutters(){let t=this._detailsTab.value?.shadowRoot?.firstElementChild;t?.style&&(t.style.scrollbarGutter="stable both-edges");let e=this._deployedCardTab.value?.shadowRoot?.firstElementChild;e?.style&&(e.style.scrollbarGutter="stable both-edges")}_setRefreshInterval(){let{userSession:t,authentication:e}=this._configContextProvider.value;if(t&&t.tokenDuration&&e?.IsSignedIn){let i=Date.now(),a=(e.Credential?.expires-i)*.95;setInterval(async()=>{if(e.Credential&&e.Credential.expires){await e.Credential?.refreshToken();let l=new Date(e.Credential.expires);t.updateToken(e.Credential.token,l),this.sessionRefreshed.emit(t.token)}},a)}}};C("solutions-deploy-app",m);return m},"identity/IdentityManager","identity/OAuthInfo","portal/Portal",a,b,c,d,e,f,h,i,j,k,l,m)
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
|
|
2
|
+
import c from"./GU77W2GF.js";import"./LLYTIOG4.js";import"./PZ4L77M5.js";import b from"./KDIUYXBA.js";import a from"./UUYUTETH.js";import"./Y3XY5BXI.js";import"./36I27Q5R.js";import"./GDPFKW75.js";import"./S7XOHDIW.js";import"./46DQNAMV.js";import"./OR4HXHSY.js";export default $arcgis.t(([,,a])=>{return a},a,b,c)
|