@levi-gemcommerce/analytics 1.0.0-dev.14 → 1.0.0-dev.16
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/esm/core/gemxql/builder/clauses/time-query.d.ts +2 -1
- package/dist/esm/core/gemxql/builder/helpers/date-query-helpers.d.ts +1 -1
- package/dist/esm/core/gemxql/hooks/useAnalyticData.d.ts +1 -2
- package/dist/esm/core/gemxql/types/date-filter.d.ts +1 -1
- package/dist/esm/core/gemxql/types/index.d.ts +0 -1
- package/dist/esm/gemxql.js +183 -2
- package/dist/esm/gemxql.mjs +183 -2
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +117 -3
- package/dist/esm/index.mjs +117 -3
- package/dist/esm/providers/ConvertMoneyProvider.d.ts +13 -0
- package/dist/esm/providers/currencyRatesStore.d.ts +7 -0
- package/dist/esm/providers/index.d.ts +5 -0
- package/dist/esm/providers/useFetchCurrencyRates.d.ts +1 -0
- package/dist/esm/utils/currency.d.ts +5 -0
- package/dist/umd/esm/core/gemxql/builder/clauses/time-query.d.ts +2 -1
- package/dist/umd/esm/core/gemxql/builder/helpers/date-query-helpers.d.ts +1 -1
- package/dist/umd/esm/core/gemxql/hooks/useAnalyticData.d.ts +1 -2
- package/dist/umd/esm/core/gemxql/types/date-filter.d.ts +1 -1
- package/dist/umd/esm/core/gemxql/types/index.d.ts +0 -1
- package/dist/umd/esm/index.d.ts +1 -0
- package/dist/umd/esm/providers/ConvertMoneyProvider.d.ts +13 -0
- package/dist/umd/esm/providers/currencyRatesStore.d.ts +7 -0
- package/dist/umd/esm/providers/index.d.ts +5 -0
- package/dist/umd/esm/providers/useFetchCurrencyRates.d.ts +1 -0
- package/dist/umd/esm/utils/currency.d.ts +5 -0
- package/dist/umd/gemxql.js +1 -1
- package/dist/umd/index.js +1 -1
- package/package.json +2 -2
package/dist/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react/jsx-runtime"),require("@shopify/polaris"),require("react"),require("dayjs"),require("dayjs/plugin/quarterOfYear.js"),require("dayjs/plugin/timezone.js"),require("dayjs/plugin/utc.js"),require("react-i18next"),require("@shopify/polaris-viz"),require("@tanstack/react-query")):"function"==typeof define&&define.amd?define(["exports","react/jsx-runtime","@shopify/polaris","react","dayjs","dayjs/plugin/quarterOfYear.js","dayjs/plugin/timezone.js","dayjs/plugin/utc.js","react-i18next","@shopify/polaris-viz","@tanstack/react-query"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).GemAnalytics={},e.jsxRuntime,e.Polaris,e.React,e.dayjs,e.quarterOfYear,e.timezone,e.utc,e.reactI18next,e.polarisViz)}(this,function(e,t,i,n,a,r,s,o,l,c){"use strict";var d;!function(e){e.SESSION="sessions",e.ORDERS="orders",e.PAGE_VIEWS="pageviews",e.VISITORS="visitors",e.BOUNCE_RATE="bounce_rate",e.CTR="ctr",e.CONVERSION_RATE="conversion_rate",e.AVG_TIME_ON_PAGE="average_time_on_page",e.ADDED_TO_CART="added_to_cart",e.ADD_TO_CART_RATE="added_to_cart_rate",e.REACHED_CHECKOUT="sessions_that_reached_checkout",e.COMPLETE_CHECKOUT="sessions_that_completed_checkout",e.CART_ADDITION="sessions_with_cart_additions",e.AOV="aov",e.REVENUE="revenue",e.RPV="revenue_per_visitor",e.VISITOR_ITEMS="visitor_items",e.DEVICE_ITEMS="device_items",e.TRAFFIC_SOURCE_ITEMS="traffic_source_items"}(d||(d={}));const u={[d.SESSION]:{title:"Sessions",content:"A period during which a visitor interacts with your online store"},[d.VISITORS]:{title:"Visitors",content:"Number of unique individuals who visit your online store"},[d.BOUNCE_RATE]:{title:"Bounce rate",content:"Percentage of visitors who leave your store after viewing only one page, without interacting further",formula:t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"formula-variable",children:"Bounce rate"}),t.jsx("span",{children:" = "}),t.jsx("span",{className:"formula-input",children:"sessions with a pageview"}),t.jsx("span",{className:"formula-operator",children:" / "}),t.jsx("span",{className:"formula-input",children:"total sessions"})]})},[d.CTR]:{title:"Click-through rate",content:"Percentage of clicks to open new page, compared to the number of times the page was viewed",formula:t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"formula-variable",children:"Click-through rate"}),t.jsx("span",{children:" = "}),t.jsx("span",{className:"formula-input",children:"total clicks"}),t.jsx("span",{className:"formula-operator",children:" / "}),t.jsx("span",{className:"formula-input",children:"total pageviews"})]})},[d.AVG_TIME_ON_PAGE]:{title:"Average time on page",content:"Average duration that visitors spend on a page before clicking to open new page",formula:t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"formula-variable",children:"Average time on page"}),t.jsx("span",{children:" = "}),t.jsx("span",{className:"formula-input",children:"total time on page"}),t.jsx("span",{className:"formula-operator",children:" / "}),t.jsx("span",{className:"formula-input",children:"(total pageviews - total exits)"})]})},[d.PAGE_VIEWS]:{title:"Pageviews",content:"Number of times a page on your online store has been viewed by visitors"},[d.RPV]:{title:"Revenue per visitor",content:"Average revenue generated from each visitor",formula:t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"formula-variable",children:"Revenue per visitor"}),t.jsx("span",{children:" = "}),t.jsx("span",{className:"formula-input",children:"total revenue"}),t.jsx("span",{className:"formula-operator",children:" / "}),t.jsx("span",{className:"formula-input",children:"total visitors"})]})},[d.ADDED_TO_CART]:{title:"Added to cart",content:"Total number of the event when a customer adds a product to their cart on your online store"},[d.REACHED_CHECKOUT]:{title:"Sessions that reached checkout",content:"Sessions in your online store in which the checkout page was reached"},[d.COMPLETE_CHECKOUT]:{title:"Sessions that completed checkout",content:"Sessions in your online store in which a purchase was completed"},[d.ORDERS]:{title:"Orders",content:"Number of orders that went through this pages"},[d.CONVERSION_RATE]:{title:"Conversion rate",content:"Percentage of online store sessions that completed an order",formula:t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"formula-variable",children:"Conversion rate"}),t.jsx("span",{children:" = "}),t.jsx("span",{className:"formula-input",children:"sessions that completed checkout"}),t.jsx("span",{className:"formula-operator",children:" / "}),t.jsx("span",{className:"formula-input",children:"total sessions"})]})},[d.AOV]:{title:"Average order value",content:"Average value of orders placed in your online store",formula:t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"formula-variable",children:"Average order value"}),t.jsx("span",{children:" = "}),t.jsx("span",{className:"formula-input",children:"total revenue"}),t.jsx("span",{className:"formula-operator",children:" / "}),t.jsx("span",{className:"formula-input",children:"total orders"})]})},[d.REVENUE]:{title:"Revenue",content:"Total income generated from sales after discounts",formula:t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"formula-variable",children:"Revenue"}),t.jsx("span",{children:" = "}),t.jsx("span",{className:"formula-input",children:"gross sales"}),t.jsx("span",{className:"formula-operator",children:" - "}),t.jsx("span",{className:"formula-input",children:"discounts"})]})},[d.ADD_TO_CART_RATE]:{title:"Add to cart rate",content:"Percentage of sessions in which the customer added item to the cart",formula:t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"formula-variable",children:"Added to cart rate"}),t.jsx("span",{children:" = "}),t.jsx("span",{className:"formula-input",children:"sessions with cart additions"}),t.jsx("span",{className:"formula-operator",children:" / "}),t.jsx("span",{className:"formula-input",children:"total sessions"})]})},[d.CART_ADDITION]:{title:"Sessions with cart additions",content:"Sessions in your online store in which a visitor added item to the cart"},[d.VISITOR_ITEMS]:{title:"Sessions by visitor type",content:"<p>Numbers of new and returning visitors</p>",contentList:["New visitor: who accesses your store for the first time after GemX installation","Returning visitor: who comes back to your store after GemX installation"]},[d.DEVICE_ITEMS]:{title:"Sessions by device type",content:"Sessions in your online store by the visitor's device type"},[d.TRAFFIC_SOURCE_ITEMS]:{title:"Sessions by traffic source",content:"Sessions on your page by where visitors come from"}};var m,A,h,g;!function(e){e.ALL_SESSION="ALL_SESSION",e.FIRST_SESSION="FIRST_SESSION",e.PAGE_ONLY="PAGE_ONLY"}(m||(m={})),function(e){e.NEW="new",e.RETURNING="returning"}(A||(A={})),function(e){e.DESKTOP="desktop",e.MOBILE="mobile",e.TABLET="tablet"}(h||(h={})),function(e){e.DIRECT="direct",e.EMAIL="email",e.REFERRAL="referral",e.ORGANIC_SOCIAL="organic-social",e.ORGANIC_SEARCH="organic-search",e.PAID_SOCIAL="paid-social",e.PAID_SEARCH="paid-search",e.SMS="sms"}(g||(g={}));const p=[{value:A.NEW,label:"New"},{value:A.RETURNING,label:"Returning"}],M=[{value:h.DESKTOP,label:"Desktop"},{value:h.TABLET,label:"Tablet"},{value:h.MOBILE,label:"Mobile"}],T=[{value:g.DIRECT,label:"Direct"},{value:g.EMAIL,label:"Email"},{value:g.REFERRAL,label:"Referral"},{value:g.ORGANIC_SOCIAL,label:"Organic social"},{value:g.ORGANIC_SEARCH,label:"Organic search"},{value:g.PAID_SOCIAL,label:"Paid social"},{value:g.PAID_SEARCH,label:"Paid search"},{value:g.SMS,label:"SMS"}],f="Current",x="Previous",I={current:"rgba(64, 176, 230, 1)",comparison:"rgba(161, 202, 231, 1)",all:["#2C7DFF","#F34A70"]},N={POSITIVE:"#007F5F",NEUTRAL:"#4A4A4A"},j="USD";var D="data:image/svg+xml;base64,PHN2ZwogIHdpZHRoPSI5MCIKICBoZWlnaHQ9IjcyIgogIHZpZXdCb3g9IjAgMCA5MCA3MiIKICBmaWxsPSJub25lIgogIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKPgogIDxwYXRoCiAgICBkPSJNNDguNzUgMzQuNUM0OS45OTI2IDM0LjUgNTEgMzMuNDkyNiA1MSAzMi4yNUM1MSAzMS4wMDc0IDQ5Ljk5MjYgMzAgNDguNzUgMzBDNDcuNTA3NCAzMCA0Ni41IDMxLjAwNzQgNDYuNSAzMi4yNUM0Ni41IDMzLjQ5MjYgNDcuNTA3NCAzNC41IDQ4Ljc1IDM0LjVaIgogICAgZmlsbD0iIzYxNjE2MSIKICAvPgogIDxwYXRoCiAgICBmaWxsUnVsZT0iZXZlbm9kZCIKICAgIGNsaXBSdWxlPSJld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o8L3N2Zz4K",E=function(e){return n.createElement("svg",Object.assign({viewBox:"0 0 20 20"},e),n.createElement("path",{fillRule:"evenodd",d:"M3.5 10a.75.75 0 0 1 .75-.75h9.69l-2.72-2.72a.75.75 0 1 1 1.06-1.06l4 4a.75.75 0 0 1 0 1.06l-4 4a.75.75 0 0 1-1.06-1.06l2.72-2.72h-9.69a.75.75 0 0 1-.75-.75Z"}))};E.displayName="ArrowRightIcon";var S=function(e){return n.createElement("svg",Object.assign({viewBox:"0 0 20 20"},e),n.createElement("path",{fillRule:"evenodd",d:"M7.75 3.5a.75.75 0 0 0-1.5 0v.407a3.075 3.075 0 0 0-.702.252 3.75 3.75 0 0 0-1.64 1.639c-.226.444-.32.924-.365 1.47-.043.531-.043 1.187-.043 2v1.464c0 .813 0 1.469.043 2 .045.546.14 1.026.366 1.47a3.75 3.75 0 0 0 1.639 1.64c.444.226.924.32 1.47.365.531.043 1.187.043 2 .043h3.383c.323 0 .542 0 .735-.02a3.75 3.75 0 0 0 3.344-3.344c.02-.193.02-.412.02-.735v-2.883c0-.813 0-1.469-.043-2-.045-.546-.14-1.026-.366-1.47a3.75 3.75 0 0 0-1.639-1.64 3.076 3.076 0 0 0-.702-.251v-.407a.75.75 0 0 0-1.5 0v.259c-.373-.009-.794-.009-1.268-.009h-1.964c-.474 0-.895 0-1.268.009v-.259Zm-1.521 1.995c.197-.1.458-.17.912-.207.462-.037 1.057-.038 1.909-.038h1.9c.853 0 1.447 0 1.91.038.453.037.714.107.912.207.423.216.767.56.983.984.1.197.17.458.207.912.014.18.024.38.029.609h-9.982c.006-.228.015-.429.03-.61.036-.453.106-.714.206-.911a2.25 2.25 0 0 1 .984-.984Zm-1.229 4.005v1.2c0 .853 0 1.447.038 1.91.037.453.107.714.207.912.216.423.56.767.984.983.197.1.458.17.912.207.462.037 1.057.038 1.909.038h3.306c.385 0 .52-.001.626-.012a2.25 2.25 0 0 0 2.006-2.006c.011-.106.012-.241.012-.626v-2.606h-10Z"}))};S.displayName="CalendarIcon";var v=function(e){return n.createElement("svg",Object.assign({viewBox:"0 0 20 20"},e),n.createElement("path",{fillRule:"evenodd",d:"M15.78 5.97a.75.75 0 0 1 0 1.06l-6.5 6.5a.75.75 0 0 1-1.06 0l-3.25-3.25a.75.75 0 1 1 1.06-1.06l2.72 2.72 5.97-5.97a.75.75 0 0 1 1.06 0Z"}))};v.displayName="CheckIcon";var O=function(e){return n.createElement("svg",Object.assign({viewBox:"0 0 20 20"},e),n.createElement("path",{fillRule:"evenodd",d:"M5.72 8.47a.75.75 0 0 1 1.06 0l3.47 3.47 3.47-3.47a.75.75 0 1 1 1.06 1.06l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 0 1 0-1.06Z"}))};O.displayName="ChevronDownIcon";var y=function(e){return n.createElement("svg",Object.assign({viewBox:"0 0 20 20"},e),n.createElement("path",{fillRule:"evenodd",d:"M7.72 14.53a.75.75 0 0 1 0-1.06l3.47-3.47-3.47-3.47a.75.75 0 0 1 1.06-1.06l4 4a.75.75 0 0 1 0 1.06l-4 4a.75.75 0 0 1-1.06 0Z"}))};y.displayName="ChevronRightIcon";var C=function(e){return n.createElement("svg",Object.assign({viewBox:"0 0 20 20"},e),n.createElement("path",{fillRule:"evenodd",d:"M14.53 12.28a.75.75 0 0 1-1.06 0l-3.47-3.47-3.47 3.47a.75.75 0 0 1-1.06-1.06l4-4a.75.75 0 0 1 1.06 0l4 4a.75.75 0 0 1 0 1.06Z"}))};C.displayName="ChevronUpIcon";const R=/\.0+$/,k=(e,t=2)=>(e=>`${e}`.replace(R,""))(e.toFixed(t)),b=e=>{const[t,i,n]=e.split(".").map(e=>Number(e));return 1e6*(t??0)+1e3*(i??0)+(n??0)},P=e=>e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,","),w=e=>e>0&&e<.005,L=(e,t,i=2)=>{const n=((e,t,i=2)=>{if("number"!=typeof e||!t)return;return 0===e?0:parseFloat(k(e/t*100,i))})(e,t,i);if("number"==typeof n)return w(n)?"~0%":`${n}%`},z=(e,t=2)=>w(e)?"~0%":`${k(e,t)}%`;function Y(e){return"string"==typeof e?e:"object"==typeof e&&null!==e&&Object.keys(e).filter(t=>e[t]).join(" ")}function U(...e){return e.map(Y).filter(Boolean).join(" ")}function B(e,t,i="asc"){if(e===t)return 0;if(void 0===e||void 0===t)return void 0===e&&void 0!==t?"asc"===i?-1:1:void 0===t&&void 0!==e?"asc"===i?1:-1:0;const n=e=>"boolean"!=typeof e&&!isNaN(Date.parse(e)),a=e=>"string"==typeof e;let r=0;if(n(e)&&n(t)){r=(e instanceof Date?e:new Date(e))>(t instanceof Date?t:new Date(t))?1:-1}else r=(a(e)&&a(t),e>t?1:-1);return"asc"===i?-r:r}function H(e,t){return"string"==typeof t?t.replace(/\[(\d+)\]/g,".$1").split(".").reduce((e,t)=>e?.[t],e):e[t]}function G(e,t){return t.reduce((e,t)=>function(e,t){const{attr:i,order:n="asc",preferredValue:a,backupAttr:r,orderArrayAttr:s,orderArray:o}=t;return e.slice().sort((e,t)=>{const l=H(e,i),c=H(t,i);if(void 0!==a){if(l===a&&c!==a)return-1;if(c===a&&l!==a)return 1}if(s===i&&o){const e=o[n];return e.indexOf(l)-e.indexOf(c)}const d=B(l,c,n);return 0!==d?d:r?B(e[r],t[r],n):0})}(e,t),e.slice())}a.extend(o),a.extend(s),a.extend(r);let Q="UTC";const _="YYYY-MM-DD HH:mm:ss";const V=e=>e?a(e).tz(Q):a().tz(Q),W=e=>e?a.tz(a(e).format(_),Q):a.tz(a().format(_),Q),F=e=>a(e?V(e).format(_):V().format(_)),J=e=>F(e).toDate();var q;!function(e){e.DAY="DAY",e.HOUR="HOUR",e.MONTH="MONTH",e.QUARTER="QUARTER",e.WEEK="WEEK",e.YEAR="YEAR"}(q||(q={}));const X=60,K=3600,Z=(e,t,i)=>{if(!e)return"";const n=i?.isExpandDetail?{formatHouse:"MMM D, h:mm A",formatDay:"MMM D, YYYY",formatMonth:"MMM YYYY",formatYear:"MMM YYYY"}:{formatHouse:"h A",formatDay:"MMM D",formatMonth:"MMM YYYY",formatYear:"YYYY"};switch(t){case q.HOUR:return V(e).format(n.formatHouse);case q.DAY:case q.WEEK:return V(e).format(n.formatDay);case q.MONTH:return V(e).format(n.formatMonth);case q.QUARTER:{const t=V(e);return`Q${t.quarter()} ${t.format("YYYY")}`}case q.YEAR:return V(e).format(n.formatYear)}return V(e).format(n.formatMonth)},$=({children:e,fullWidth:i=!1,cursor:n="pointer",onClick:a,onMouseEnter:r,onMouseLeave:s})=>t.jsx("div",{role:"button",tabIndex:0,className:U({"w-full":i,"cursor-pointer":"pointer"===n,"cursor-default":"default"===n,"cursor-not-allowed":"not-allowed"===n}),onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),a())},onClick:a,onMouseEnter:r,onMouseLeave:s,children:e}),ee=({onClick:e,active:a,content:r,textProps:s,boxProps:o,disabled:l,icon:c})=>{const d=n.useMemo(()=>l?{borderColor:"border-disabled",background:"bg-surface-disabled",...o}:{shadow:a?"button-inset":"button",background:a?"bg-fill-active":"bg-fill",...o},[a,l,o]),u=n.useMemo(()=>l?"text-[var(--p-color-text-disabled)]":a?"text-[var(--p-color-text-subdued)]":"text-[var(--p-color-text)]",[a,l]),m=n.useMemo(()=>t.jsx(i.Text,{as:"span",variant:"bodyMd",fontWeight:"medium",tone:l?"inherit":s?.tone,truncate:!0,...s?.variant&&{variant:s.variant},children:r}),[r,s,l]),A=n.useCallback(()=>{l||e()},[l,e]);return t.jsx($,{cursor:l?"default":"pointer",onClick:A,children:t.jsx("div",{className:U(u),children:t.jsxs(i.Box,{padding:"150",paddingInline:"300",paddingInlineEnd:"150",borderRadius:"200",...d,children:[c&&t.jsxs(i.InlineStack,{gap:"200",align:"center",wrap:!1,children:[t.jsx(i.Box,{children:t.jsx(i.Icon,{source:c})}),m]}),!c&&t.jsxs(i.InlineGrid,{columns:"1fr 20px",gap:"200",alignItems:"center",children:[m,t.jsx(i.Icon,{source:a?C:O})]})]})})})},te=({height:e,align:a,inlineAlign:r,display:s,...o})=>{const l=n.useMemo(()=>{if("sticky"!==o.position)return{};const e={position:"sticky"};return o.insetInlineStart&&(e.insetInlineStart=4*Number(o.insetInlineStart)),o.insetInlineEnd&&(e.insetInlineEnd=4*Number(o.insetInlineEnd)),o.insetBlockStart&&(e.insetBlockStart=4*Number(o.insetBlockStart)),o.insetBlockEnd&&(e.insetBlockEnd=4*Number(o.insetBlockEnd)),e},[o.position,o.insetInlineStart,o.insetInlineEnd,o.insetBlockStart,o.insetBlockEnd]);return t.jsx("div",{className:"Polaris-GBlockCenter",style:{...l,"--gp-block-center-height":e,"--gp-block-center-display":s,"--gp-block-center-align":a,"--gp-block-center-inline-align":r,"--gp-block-center-overflow-x":o.overflowX,"--gp-block-center-overflow-y":o.overflowY},children:t.jsx(i.Box,{...o})})},ie=({isEnabled:e=!0,content:n,maxWidth:a,...r})=>e&&!!n?t.jsx(i.Tooltip,{width:"wide",hoverDelay:500,content:n,...r,accessibilityLabel:a?.toString()}):r.children,ne=({activatorWrapper:e,children:n,iconRight:a,inset:r,stopPropagation:s=!0,onClick:o,themeTone:l="light",variant:c,...d})=>{const u=e||"div",m="neutral"===c,A=m?void 0:c,h=t.jsx(ie,{activatorWrapper:"tooltip-content",...d.tooltip,children:t.jsx(u,{className:U("Polaris-GButton",{"Polaris-GButton--icon-right":a,"Polaris-GButton--dark":"dark"===l,"Polaris-GButton--neutral":m,"cursor-default":d.disabled,"Polaris-GButton--fullWidth":d.fullWidth,flex:r}),onClick:e=>{s&&e.stopPropagation(),d.disabled||o?.()},children:t.jsx(i.Button,{variant:A,...d,children:n})})});return r?t.jsx(i.Box,{padding:"100",children:h}):h},ae=({...e})=>e.multiple?t.jsx(re,{...e}):t.jsx(se,{...e}),re=({options:e,onChange:a,onChangeSingleValue:r,emptySelected:s,selected:o,onHover:l,itemHovered:c,dependentDisabledValues:d})=>{const[u,m]=n.useState([]),A=e=>{l&&l(e)};return n.useEffect(()=>{m(()=>o?e.filter(e=>o.includes(e.value)).map(e=>e.value):[])},[o]),t.jsx(i.BlockStack,{children:e.map(n=>{const o=d?.has(n.value),l=s&&1===e.filter(e=>e.selected).length&&s,h=()=>{l||(e=>{r&&r(e);const t=u.includes(e)?u.filter(t=>t!==e):[...u,e];m(t),a(t)})(n.value)};return t.jsx("div",{className:U("flex w-full items-center justify-between",{"cursor-not-allowed":l,"cursor-pointer":!l,"bg-surface-hover rounded-lg":c===n.value}),onClick:()=>{l||n.disabled||h()},onMouseEnter:()=>A(n.value),onMouseLeave:()=>A(void 0),children:l?t.jsx(ie,{isEnabled:n.tooltip?.isEnabled,...n.tooltip,children:t.jsx(i.Box,{paddingBlock:"150",paddingInline:"200",width:"100%",children:t.jsxs(i.InlineStack,{blockAlign:"center",gap:"150",children:[t.jsx(i.Checkbox,{label:n.label,labelHidden:!0,checked:n.selected,disabled:!0}),t.jsx(i.Text,{as:"p",variant:"bodyMd",tone:"subdued",children:n.label})]})})}):t.jsx(i.Box,{paddingBlock:"150",paddingInline:"200",minWidth:"0",children:t.jsxs(i.InlineStack,{blockAlign:"center",gap:"150",wrap:!1,children:[t.jsx(i.Checkbox,{label:n.label,labelHidden:!0,checked:!o&&u.includes(n.value),onChange:h,disabled:n.disabled}),t.jsxs(i.Box,{minWidth:"0",children:[t.jsx(i.Text,{as:"p",variant:"bodyMd",truncate:!0,tone:o?"disabled":"inherit",children:n.label}),n.description&&t.jsx(i.Text,{as:"p",variant:"bodySm",tone:"disabled",truncate:!0,children:n.description})]})]})})},n.value)})})},se=({options:e,onChange:n})=>t.jsx(i.BlockStack,{gap:"300",children:e.map(e=>t.jsx(i.RadioButton,{label:e.label,checked:e.selected,onChange:()=>n(e.value),helpText:e.helpText?t.jsx(Ie,{item:e}):void 0},e.value))}),oe=n.forwardRef(({children:e,onClick:i,...a},r)=>{const s=n.useCallback(e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),i?.())},[i]);return t.jsx("div",{ref:r,...a,role:"button",tabIndex:0,onKeyDown:s,onClick:i,children:e})});oe.displayName="GDiv";const le=/\[(\d+)\](.*?)\[\]/g,ce=e=>{const{children:a,transformers:r}=e;if(!r||0===Object.values(r).length)return t.jsx(i.Text,{...e,children:a});return t.jsx(i.Text,{...e,children:"string"==typeof a?(e=>{const i=[];let a=0;return e.replace(le,(t,n,s,o)=>{i.push(e.slice(a,o));const l=r[n];return"function"==typeof l?i.push(l(s)):i.push(t),a=o+t.length,t}),i.push(e.slice(a)),i.map((e,i)=>t.jsx(n.Fragment,{children:e},i))})(a):a})};function de({options:e,selected:n,onChange:a}){const r=e=>{a([e])};return t.jsx(i.Box,{padding:"150",children:t.jsx(i.BlockStack,{gap:"100",children:e.map(e=>{const a=n.includes(e.value);return t.jsx("div",{role:"option","aria-selected":a,tabIndex:0,onClick:()=>r(e.value),onKeyDown:t=>{return i=t,n=e.value,void("Enter"!==i.key&&" "!==i.key||(i.preventDefault(),r(n)));var i,n},className:U("p-1.5 pl-4 rounded-lg cursor-pointer",{"bg-[#F1F1F1]":a,"hover:bg-[#F1F1F1]":!a}),children:t.jsxs(i.InlineStack,{align:"space-between",blockAlign:"center",wrap:!1,gap:"200",children:[t.jsx(i.Box,{minWidth:"0",children:e.label}),a&&t.jsx(i.Box,{children:t.jsx(i.Icon,{source:v})})]})},e.value)})})})}const ue=e=>{const[a,r]=n.useState(!1),{activatorText:s,selected:o,options:l,emptyLabel:c,preferredAlignment:d="right",formatActivatorContent:u=e=>e.join(", ")}=e,m=n.useCallback(()=>r(e=>!e),[]),A=n.useMemo(()=>l.filter(e=>e.active||e.id===o).map(e=>e.content||"").filter(e=>!!e),[l,o]),h=n.useMemo(()=>{if(A.length){const e=u(A);return s?`${s}: ${e}`:e}return c?s?`${s}: ${c}`:c:s},[A,c,s,u]),g=n.useMemo(()=>{switch(e.variant){case"choice":return t.jsx(me,{...e,setPopoverActive:m});case"action-list":return t.jsx(Ae,{...e,setPopoverActive:m})}},[e,m]);return t.jsx(i.Popover,{active:a,activator:t.jsx("div",{className:"flex items-center gap-1",children:t.jsx(i.Button,{onClick:m,disclosure:a?"up":"down",children:h})}),autofocusTarget:"first-node",fluidContent:!0,onClose:m,preferredAlignment:d,children:g})},me=({options:e,selected:a,onSelect:r,maxWidth:s,minWidth:o,clearable:c,setPopoverActive:d})=>{const{t:u}=l.useTranslation(),m=n.useMemo(()=>e?.length?e.map(e=>({value:e.id,label:e.content||"",selected:!1})):[],[e]),A=n.useCallback(e=>{r(e)},[r]);return t.jsx(i.Box,{maxWidth:s,minWidth:o,paddingBlock:"150",children:t.jsxs(i.BlockStack,{children:[t.jsx(i.BlockStack,{gap:"0",children:t.jsx(ae,{multiple:!0,options:m,selected:a,onChange:A})}),c&&t.jsx(i.Box,{paddingBlock:"150",paddingInline:"200",children:t.jsx(i.InlineStack,{blockAlign:"center",align:"start",children:t.jsx(i.Button,{disabled:!a?.length,onClick:()=>{A([]),d(!1)},variant:"plain",children:u("Clear")})})})]})})},Ae=({options:e,selected:a,onSelect:r,helpText:s,maxWidth:o,minWidth:l,setPopoverActive:c})=>{const d=n.useCallback(e=>{r(e),c(!1)},[r,c]),u=n.useMemo(()=>e?.length?e.map(e=>({id:e.id,content:e.content,helpText:e.helpText,onAction:()=>d(e.id),active:e.active||e.id===a,suffix:(e.active||e.id===a)&&t.jsx(i.Icon,{source:v,tone:"success"})})):[],[e,a,d]);return t.jsx(i.Box,{maxWidth:o,minWidth:l,children:t.jsxs(i.BlockStack,{gap:"0",children:[t.jsx(i.ActionList,{actionRole:"menuitem",items:u}),s]})})},he=({linkAction:e,isDisabled:n,disabledFocus:a,children:r})=>!e||n?t.jsx(t.Fragment,{children:r}):t.jsx("span",{className:U("GTextLink",{"GTextLink--disabled-focus":a}),children:t.jsx(i.Link,{...e,children:t.jsx(t.Fragment,{children:r})})}),ge=e=>{const n=e.height??"50px";return t.jsxs("div",{className:"Polaris-GSkeletonDisplayText",children:[t.jsx("style",{children:`.Polaris-GSkeletonDisplayText .Polaris-SkeletonDisplayText__DisplayText { height: ${n} !important; }`}),t.jsx(i.SkeletonDisplayText,{maxWidth:"100%",size:"extraLarge"})]})};const pe=({source:e,alt:i,size:n,grayscale:a,defaultSource:r=D,width:s="80",height:o="80",classRemoved:l=!1})=>{var c;const d=a&&"Polaris-GThumbnail--filter",u=U("Polaris-Thumbnail",n&&`${"Polaris-Thumbnail--size"}${(c=n).charAt(0).toUpperCase()}${c.slice(1)}`),m=t.jsx("img",{onError:e=>{e.currentTarget.src=r},alt:i??"Thumbnail",src:`${e??r}`,width:s,height:o,style:{"--gp-grayscale-percentage":a||"100%"},className:U("Polaris-GThumbnail",d)});return l?m:t.jsx("span",{className:u,children:m})},Me={default:"w-[210px]",wide:"w-[320px]",large:"w-[328px]"},Te={start:"flex justify-start",center:"flex justify-center",end:"flex justify-end"},fe=n.forwardRef((e,a)=>{const{tooltip:r,wrapper:s="div",activatorProps:o,isHideBorder:l,alignment:c,delay:d=500,textDecoration:u="none",popoverRef:m,preferredAlignment:A="left",showArrow:h=!1}=e,{width:g="default"}=r??{},[p,M]=n.useState(!1),T=s,f=Me[g],x=n.useRef(null),I=()=>{x.current&&(clearTimeout(x.current),x.current=null),M(!1)};return n.useImperativeHandle(a,()=>({onClose:I})),t.jsx(T,{className:U("GTooltipCard cursor-pointer",c&&Te[c],{"GTooltipCard--text-underline":"underline"===u}),onMouseEnter:()=>{x.current=setTimeout(()=>{M(!0)},d)},onMouseLeave:I,children:t.jsx(i.Popover,{ref:m,activator:l?t.jsx(i.InlineStack,{children:e.children}):t.jsx(i.Box,{borderBlockEndWidth:"025",borderStyle:"dashed",borderColor:"border-tertiary",as:s,...o,children:e.children}),activatorWrapper:s,onClose:()=>{},active:p,preferredPosition:"below",preferredAlignment:A,children:r&&t.jsx("div",{className:U(f,{"GTooltipCard-arrow":h}),children:t.jsx(i.Box,{padding:"400",children:t.jsxs(i.BlockStack,{gap:"200",children:[t.jsxs(i.BlockStack,{gap:"100",children:[t.jsx(i.Text,{as:"span",variant:"headingSm",fontWeight:"semibold",children:r.title}),t.jsxs(i.BlockStack,{gap:"200",children:[t.jsx(i.Text,{as:"span",variant:"bodyMd",tone:"subdued",fontWeight:"medium",children:t.jsx("span",{dangerouslySetInnerHTML:{__html:r.content}})}),r.contentList&&t.jsx(i.List,{type:"bullet",children:r.contentList.map(e=>t.jsx(i.List.Item,{children:t.jsx(i.Text,{as:"span",variant:"bodyMd",tone:"subdued",fontWeight:"medium",children:e})},e))})]})]}),r.formula&&t.jsx("div",{className:"rounded-md font-mono",style:{fontSize:"12px"},children:r.formula})]})})})})})});fe.displayName="GTooltipCard";const xe=({activatorText:e,selected:a,options:r,minWidth:s,maxWidth:o,preferredAlignment:l="right",onSelect:c})=>{const[d,u]=n.useState(!1),[m,A]=n.useState(null),h=()=>u(e=>!e),g=n.useMemo(()=>r.find(e=>e.id===a),[r,a]),p=n.useMemo(()=>{if(g){const t=g.title??g.content;return e?`${e}: ${t}`:t}return e},[g,e]);return t.jsx(i.Popover,{active:d,activator:t.jsx(ee,{active:d,content:p,textProps:{variant:"bodySm"},onClick:h}),autofocusTarget:"first-node",fluidContent:!0,onClose:h,preferredAlignment:l,children:t.jsx(i.Box,{maxWidth:o,minWidth:s,padding:"200",children:t.jsx(i.BlockStack,{gap:"200",children:r.map(e=>{const n=e.id===a,r=m===e.id,s=n?"input-border":r?"border-hover":"transparent";return t.jsx(i.Box,{padding:"150",borderWidth:"025",borderColor:s,borderRadius:"100",children:t.jsx("div",{onClick:()=>{return t=e.id,c(t),void u(!1);var t},className:"cursor-pointer",onMouseEnter:()=>A(e.id),onMouseLeave:()=>A(null),children:t.jsxs(i.InlineStack,{gap:"300",align:"space-between",blockAlign:"center",wrap:!1,children:[t.jsxs(i.InlineStack,{gap:"300",blockAlign:"center",wrap:!1,children:[t.jsx("div",{className:"bg-surface-secondary flex items-center justify-center rounded-md min-w-[184px] h-[92px]",children:t.jsx("img",{src:e.icon,alt:e.content,className:"w-full h-full object-contain"})}),t.jsxs(i.BlockStack,{gap:"100",children:[t.jsx(i.Text,{as:"span",variant:"bodyMd",fontWeight:"semibold",children:e.content}),t.jsx(i.Text,{as:"p",variant:"bodyMd",tone:"subdued",children:e.helpText})]})]}),n&&t.jsx(i.Box,{children:t.jsx(i.Icon,{source:v})})]})})},e.id)})})})})},Ie=({item:e})=>t.jsxs(i.Text,{as:"p",variant:"bodyMd",children:[e.description,e.inlineAction&&t.jsx(i.Link,{monochrome:!0,onClick:()=>{e.inlineAction?.onAction?e.inlineAction?.onAction():window.open(e.inlineAction?.url,e.inlineAction?.target??"_blank")},children:e.inlineAction?.content})]}),Ne=()=>t.jsx(ge,{height:"188px"}),je={comparison:I.comparison,single:I.current,all:[...I.all]},De=({children:e,minHeight:i=228,seriesColors:n=je})=>t.jsx(c.PolarisVizProvider,{themes:{Light:{chartContainer:{minHeight:i},grid:{horizontalOverflow:!0,verticalOverflow:!0,horizontalMargin:0},seriesColors:n}},children:e});var Ee,Se,ve,Oe,ye,Ce,Re,ke,be,Pe,we,Le,ze,Ye;!function(e){e.DATE="DATE",e.ARRAY="ARRAY",e.OBJECT="OBJECT",e.STRING="STRING",e.INTEGER="INTEGER",e.CURRENCY="CURRENCY",e.PERCENT="PERCENT",e.DURATION="DURATION",e.MONTH="MONTH_TIMESTAMP",e.QUARTER="QUARTER_TIMESTAMP",e.DAY="DAY_TIMESTAMP",e.WEEK="WEEK_TIMESTAMP",e.YEAR="YEAR_TIMESTAMP",e.HOUR="HOUR_TIMESTAMP"}(Ee||(Ee={})),function(e){e.CAMPAIGNS="experiments",e.VISITOR_ITEMS="visitor_items",e.DEVICE_ITEMS="device_items",e.TRAFFIC_SOURCE_ITEMS="traffic_source_items"}(Se||(Se={})),function(e){e.SESSIONS="sessions",e.SALES="sales"}(ve||(ve={})),function(e){e.EQ="=",e.IN="IN",e.LIKE="LIKE"}(Oe||(Oe={})),function(e){e.OR="OR",e.AND="AND"}(ye||(ye={})),function(e){e.DEVICE="device",e.DEVICES="devices",e.VISITOR="visitor_type",e.VISITORS="visitor_types",e.TRAFFIC_SOURCE="traffic_source",e.TRAFFIC_SOURCES="traffic_sources",e.VERSION="version",e.VERSIONS="versions",e.SINGLE_PAGE="page_path",e.LIST_PAGE="page_paths",e.GROUP_CAMPAIGN_ITEM="group_campaign_item",e.GROUP_CAMPAIGN_ITEMS="group_campaign_items",e.SINGLE_CAMPAIGN="experiment_id",e.GROUP_CAMPAIGN="experiment_group_id",e.CAMPAIGN_VERSION_ID="version_id",e.GROUP_CAMPAIGN_VERSION_ID="group_version_id"}(Ce||(Ce={})),function(e){e.DEVICE_OPERATOR="deviceOperator",e.VISITOR_OPERATOR="visitorOperator",e.TRAFFIC_SOURCE_OPERATOR="trafficSourceOperator",e.VERSION_OPERATOR="versionOperator",e.PAGE_OPERATOR="pageOperator",e.CAMPAIGN_ITEM_OPERATOR="campaignItemOperator"}(Re||(Re={})),function(e){e.NONE="",e.TOTALS="TOTALS",e.ALL="WITH GROUP_TOTALS, TOTALS"}(ke||(ke={})),function(e){e.ASC="ASC",e.DESC="DESC"}(be||(be={})),function(e){e.PAGE_ITEMS="page_items",e.PAGE_PATHS="page_paths"}(Pe||(Pe={})),function(e){e.PAGE_PATH="page_path"}(we||(we={})),function(e){e.SHOPIFY_PAGE_ID="shopify_page_id",e.LOCATION_PATH="location_path",e.PAGE_TYPE="page_type",e.PAGE_TITLE="page_title",e.PAGE_PATH="page_path",e.TEMPLATE_SUFFIX="template_suffix"}(Le||(Le={})),function(e){e.DEFAULT="DEFAULT",e.COMPARISON="COMPARISON",e.TOTALS="TOTALS",e.COMPARISON_TOTALS="COMPARISON_TOTALS"}(ze||(ze={})),function(e){e.HOUR="hour",e.DAY="day",e.WEEK="week",e.MONTH="month",e.QUARTER="quarter",e.YEAR="year"}(Ye||(Ye={})),ze.DEFAULT,ze.COMPARISON,ze.TOTALS,ze.COMPARISON_TOTALS;const Ue=({value:e,formatter:t,getTextPrice:i,name:n})=>{if(null!==e&&("object"==typeof e||Array.isArray(e)))return e;switch(t){case Ee.INTEGER:return P((e??0).toString());case Ee.CURRENCY:return i?i(e,!1):`${e??0}`;case Ee.DATE:return(e=>{if(!e)return"None";const t=V(e),i=V(),n=V().subtract(1,"day"),a=t.format("YYYY-MM-DD")===i.format("YYYY-MM-DD"),r=t.format("YYYY-MM-DD")===n.format("YYYY-MM-DD");if(a)return`Today at ${t.format("HH:mm")}`;if(r)return`Yesterday at ${t.format("HH:mm")}`;const s=i.diff(t,"day");return s>=0&&s<7?`${t.format("dddd")} at ${t.format("HH:mm")}`:`${t.format("MMM D")} at ${t.format("hh:mm a")}`})(e);case Ee.PERCENT:return"number"!=typeof e?L(0,1,2)??"":L(e/100,1,2)??"";case Ee.DURATION:return(e=>{let t=e;Number.isFinite(e)&&null!=e||(t=0);const i=k(t);if(t>=K)return`${Math.floor(t/K)}h ${Math.floor(t%K/X)}m ${Math.floor(t%X)}s`;if(t>=X)return`${Math.floor(t/X)}m ${Math.floor(t%X)}s`;return`${i}s`})(Number(e));case Ee.STRING:{const t=n===Se.CAMPAIGNS?"":"None";return e??t}case Ee.DAY:return Z(e,q.DAY,{isExpandDetail:!0});case Ee.HOUR:return Z(e,q.HOUR,{isExpandDetail:!0});case Ee.MONTH:return Z(e,q.MONTH,{isExpandDetail:!0});case Ee.YEAR:return Z(e,q.YEAR);case Ee.WEEK:return Z(e,q.WEEK,{isExpandDetail:!0});case Ee.QUARTER:return Z(e,q.QUARTER,{isExpandDetail:!0});case Ee.OBJECT:case Ee.ARRAY:return e;default:return`${e}`}},Be=e=>{try{const t=(e=>{if(e)return"string"==typeof e?JSON.parse(e):e})(e);if(!Array.isArray(t))return;return t}catch{return}},He=e=>Be(e)?.map(e=>({...e,total:Number(e.total)})),Ge=(e,t)=>{const i=e?.[t];return"number"==typeof i?i:0};var Qe;!function(e){e.NEXT="NEXT",e.PREV="PREV"}(Qe||(Qe={}));const _e=({metricKey:e,columnTypes:t})=>{const{formatData:i}=(e=>{const t=({value:t,formatter:i,name:n})=>Ue({value:t,formatter:i,getTextPrice:e,name:n});return{formatData:t,computeMetric:({metric:e,previousMetric:i,metricKey:n,formatter:a})=>{if(!(e=>{const t=e?.sessions;return"number"==typeof t&&t>0})(e))return{value:0,change:"-"};const r=Ge(e,n),s=Ge(i,n),o=t({value:r,formatter:a,name:n});return 0===r&&0!==s?{value:o,change:-100}:0===s?{value:o,change:"-"}:{value:o,change:(r-s)/s*100}}}})(),n=e?t?.[e]:void 0,a=e=>String(i({value:e,formatter:n})),r={labelFormatter:e=>a(Number(e)||0)};return{formatValue:a,yAxisOptions:r}},Ve=({lineChartData:e,isLoading:i,isEmptyMetricData:n,columnTypes:a,metricKey:r})=>{const{formatValue:s,yAxisOptions:o}=_e({metricKey:r,columnTypes:a||{}});return r?i?t.jsx(Ne,{}):n?t.jsx(We,{title:"No data yet",description:"Data needs time to gather"}):t.jsx(De,{children:t.jsx(c.LineChart,{data:e,yAxisOptions:o,theme:"Light",tooltipOptions:{titleFormatter:()=>`${u[r]?.title??""}`,keyFormatter:e=>e,renderTooltipContent:e=>t.jsx(Xe,{data:e,formatValue:s})},showLegend:!0})}):t.jsx(t.Fragment,{})};const We=({boxProps:e,minHeight:n,description:a,title:r})=>t.jsx(i.Box,{minWidth:"100%",...e,children:t.jsx(te,{minHeight:n,children:t.jsx(i.Box,{padding:"400",children:t.jsxs(i.BlockStack,{gap:"400",align:"center",inlineAlign:"center",children:[t.jsx("div",{className:"h-[80px] w-[80px]",children:t.jsx(pe,{source:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKEAAACgCAYAAABkDQwTAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAABvtSURBVHgB7V3NjyRFdo+oqq7u6fmg5wOzMINA8oDkA2hXSICstTS+GWRp17CyLIF89on1P2DBybKslS0h37hYFsg37PUBfIQbYCFZIPkCQoM0MAzM0D3Tw/RMT1el3y8iXubLqMjPqu7Mro6fOjuzMiMys7J++b7iRYRW+4DNzc0NWv02SZJLtP45LRsq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t7yZ1rlUEjrimcL5tktdGRwFCaNGPnjAUcBvwxPo9G3caklAktx3HQFHkivYTltMeFs200kUdLbhMWlURDeAWoZtiKVPRJQEpHu6T1J7ymrYF2wzI7Vm7cXmU3pSYfsl/gW17tcsn0cNJ06cMGEb/PDwQKGmu3JW3ISL6WiyRMAJSexp1iycIuXSDAnN0ZRwiWsV0UnJRbWDiugGePYgIiQhz+zEAe2DlIq4Jq7NUo7Il4zHZtB05lnawOEEl9kOkZDZlAhmyXiNHDwvkq9HgCrG78EzfIIUcgqH/YIv/UB8ckJE1GW2lU0J7pTdXYhdUef2HFDFkIAI33ALBWyz/SAjyMezybM5Ri9CQkuRcNLeOqeO+UAiDvr2X9HQp3Id0QOwJAL5IBURvmEywkOdR01zdjdL2rSfCBEcTtLQzqZdF6asJKEkUohgIaJFAvYYkH5YJBlBHiwc4E5HwtKzQ+Zx7BFrJhwP3s4A+WD70bpNNrIpI0fv9w+GTujbhqG6ET0Dk5HVM9ZMyDYA8SBN3WyePtlCvChNmR8VHCgiVhnhokTsOUAe2VeF256LpByrbJaYIB5neAv4DmvImS1Nmf9/PWJzbd+1lKUAAAAASUVORK5CYII=",width:"80px",height:"80px",alt:r,classRemoved:!0})}),t.jsxs(i.BlockStack,{gap:"200",align:"center",inlineAlign:"center",children:[t.jsx(i.Text,{as:"h4",variant:"headingSm",fontWeight:"semibold",children:r}),t.jsx(i.Text,{as:"h4",variant:"bodyMd",tone:"subdued",children:a})]})]})})})}),Fe=()=>t.jsxs("svg",{width:"8",height:"8",viewBox:"0 0 8 8",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t.jsx("g",{clipPath:"url(#clip0_18114_1160)",children:t.jsx("path",{d:"M1 1L6.5 6.5M6.5 6.5V1.5M6.5 6.5H1.5",stroke:"#8A8A8A",strokeWidth:"1.5"})}),t.jsx("defs",{children:t.jsx("clipPath",{id:"clip0_18114_1160",children:t.jsx("rect",{width:"8",height:"8",fill:"white"})})})]}),Je=()=>t.jsxs("svg",{width:"8",height:"8",viewBox:"0 0 8 8",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t.jsx("g",{clipPath:"url(#clip0_18114_1146)",children:t.jsx("path",{d:"M1 7L6.5 1.5M6.5 1.5H1.5M6.5 1.5V6.5",stroke:"#29845A",strokeWidth:"1.5"})}),t.jsx("defs",{children:t.jsx("clipPath",{id:"clip0_18114_1146",children:t.jsx("rect",{width:"8",height:"8",fill:"white",transform:"matrix(0 -1 1 0 0 8)"})})})]}),qe=({change:e})=>"number"!=typeof e?t.jsx("div",{style:{height:"2px",width:"11px",backgroundColor:"#8A8A8A"}}):t.jsxs("div",{style:{display:"flex",maxHeight:"20px",width:"fit-content",alignItems:"center",gap:"4px",borderRadius:"8px",fontSize:"12px",color:e>0?N.POSITIVE:N.NEUTRAL},children:[e<0&&t.jsx(i.InlineStack,{align:"center",children:t.jsx(Fe,{})}),e>0&&t.jsx(i.InlineStack,{align:"center",children:t.jsx(Je,{})}),t.jsx(i.Text,{as:"span",variant:"bodyXs",fontWeight:"semibold",children:z(Math.abs(e||0))})]}),Xe=({data:e,formatValue:n})=>{const{activeIndex:a}=e,r=e?.dataSeries[0]?.data[a],s=e?.dataSeries[1]?.data[a],o=()=>{const e=r.trend?.value;if(!e)return"-";const t=Number(e.replace(/[%~]/g,""));return"negative"===r.trend?.trend?-1*t:t};return t.jsx("div",{className:"w-fit min-w-[175px]",children:t.jsx(i.Card,{padding:"200",children:t.jsxs(i.BlockStack,{gap:"100",children:[t.jsx(i.Text,{as:"p",variant:"bodySm",fontWeight:"semibold",children:e.formatters?.titleFormatter?.(e.title||"")||e.title}),t.jsxs(i.BlockStack,{gap:"100",children:[t.jsxs(i.InlineStack,{gap:"400",align:"space-between",blockAlign:"center",children:[t.jsxs(i.InlineStack,{gap:"100",blockAlign:"center",children:[t.jsx("div",{className:"h-[2px] w-[12px] rounded-[10px] bg-[#4FA9EA]"}),t.jsx(i.Text,{as:"p",variant:"bodySm",fontWeight:"medium",tone:"subdued",children:r.tooltipKey})]}),t.jsxs(i.InlineStack,{blockAlign:"center",gap:"100",children:[t.jsx(i.Text,{as:"span",variant:"bodySm",fontWeight:"semibold",children:n(r.value)}),t.jsx(qe,{change:o()})]})]}),t.jsxs(i.InlineStack,{gap:"400",align:"space-between",blockAlign:"center",children:[t.jsxs(i.InlineStack,{gap:"100",blockAlign:"center",children:[t.jsx("div",{className:"w-[12px] border border-dashed border-[#A1CAE7]"}),t.jsx(i.Text,{as:"p",variant:"bodySm",tone:"subdued",fontWeight:"medium",children:s.tooltipKey})]}),t.jsxs(i.InlineStack,{blockAlign:"center",gap:"100",children:[t.jsx(i.Text,{as:"span",variant:"bodySm",fontWeight:"semibold",children:n(s.value)}),t.jsx("div",{className:"opacity-0",children:t.jsx(qe,{change:o()})})]})]})]})]})})})},Ke=({isShowOneLine:e})=>e?t.jsx(i.Box,{width:"40%",children:t.jsx(i.SkeletonBodyText,{lines:1})}):t.jsxs(i.BlockStack,{gap:"200",children:[t.jsx(i.Box,{width:"60%",children:t.jsx(i.SkeletonBodyText,{lines:1})}),t.jsx(i.Box,{width:"40%",children:t.jsx(i.SkeletonBodyText,{lines:1})})]}),Ze=()=>t.jsx(i.Card,{children:t.jsxs(i.BlockStack,{gap:"400",children:[t.jsx(Ke,{isShowOneLine:!0}),t.jsx(Ne,{})]})}),$e=({totalValue:e,hideComparison:n})=>t.jsx(i.BlockStack,{gap:"200",children:t.jsxs(i.InlineStack,{blockAlign:"center",gap:"200",wrap:!1,children:[t.jsx(i.InlineStack,{blockAlign:"center",gap:"200",children:t.jsx(i.Text,{as:"span",variant:"headingSm",children:e.value})}),!n&&t.jsx(qe,{change:e.change})]})}),et=({item:e,isHovered:n,isLoading:a,hideComparison:r,titleVariant:s="headingMd",titleFontWeight:o,onClickTitle:l})=>{const{key:c,title:d,totalValue:m}=e,A=u[c];return a?t.jsx(Ke,{}):t.jsxs(i.BlockStack,{gap:"200",children:[t.jsx("div",{className:"hover:cursor-pointer hover:text-[--p-color-text-link-hover]",onClick:e=>{e?.stopPropagation(),l?.(c)},children:t.jsxs(i.InlineStack,{wrap:!1,children:[t.jsx(i.Box,{maxWidth:"100%",overflowX:"hidden",children:t.jsx(fe,{tooltip:A,children:t.jsx(i.Text,{as:"span",variant:s,fontWeight:o,truncate:!0,children:d})})}),n&&t.jsx("div",{className:"flex h-[20px] w-[20px] items-center",children:t.jsx(i.Icon,{source:y,tone:"inherit"})})]})}),t.jsx($e,{totalValue:m,hideComparison:r})]})},tt=({item:e,isActive:a,isLoading:r,hideComparison:s,onSelect:o,onClickTitle:l})=>{const[c,d]=n.useState(!1),u=a||c;return t.jsx("div",{className:"w-full cursor-pointer overflow-hidden",onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1),onClick:()=>o(e.key),children:t.jsx(i.Box,{paddingBlock:"150",paddingInline:"300",borderRadius:"200",background:u?"bg-surface-active":void 0,children:t.jsx(et,{item:e,isHovered:c,isLoading:r,hideComparison:s,titleVariant:"headingSm",titleFontWeight:"semibold",onClickTitle:l})})})};ye.OR,Re.DEVICE_OPERATOR,Ce.DEVICE,Ce.DEVICES,Ce.DEVICE,Re.VISITOR_OPERATOR,Ce.VISITOR,Ce.VISITORS,Ce.VISITOR,Re.TRAFFIC_SOURCE_OPERATOR,Ce.TRAFFIC_SOURCE,Ce.TRAFFIC_SOURCES,Ce.TRAFFIC_SOURCE,Re.VERSION_OPERATOR,Ce.VERSION,Ce.VERSIONS,Ce.VERSION,Re.PAGE_OPERATOR,Ce.SINGLE_PAGE,Ce.LIST_PAGE,Ce.SINGLE_PAGE,Re.CAMPAIGN_ITEM_OPERATOR,Ce.GROUP_CAMPAIGN_ITEM,Ce.GROUP_CAMPAIGN_ITEMS,Ce.GROUP_CAMPAIGN,Ce.SINGLE_CAMPAIGN,Ce.SINGLE_CAMPAIGN,Ce.GROUP_CAMPAIGN;const it=(e,t)=>{if(0===e&&0===t)return;if(0===t)return e>0?"100%":"0%";const i=(e-t)/t*100;return`${Math.abs(i).toFixed(0)}%`},nt=(e,t)=>{const i=e?.find(e=>e?.type?.toLowerCase()===t.toLowerCase());return i?.total??0},at=({targets:e,metricKey:t,totalsRow:i,comparisonTotalsRow:n,sort:a})=>{const r=He(i?.[t]),s=He(n?.[t]),o=!!n?.[t],l=e.map(({value:e,label:t})=>(({name:e,currentValue:t,prevValue:i,hasPreviousData:n})=>({name:e,data:[{key:"value",value:t}],metadata:{trend:{value:n?it(t,i):void 0,direction:t>=i?"upward":"downward",trend:t>=i?"positive":"negative"}}}))({name:t,currentValue:nt(r,e),prevValue:nt(s,e),hasPreviousData:o})),c=e=>e.data[0]?.value??0;return a?[...l].sort((e,t)=>c(t)-c(e)):l};const rt=[{id:m.ALL_SESSION,content:"All sessions",helpText:"Count metrics for all sessions where this page shows up anywhere in the journey: before, during, or after other pages.",icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAXAAAAC4CAMAAADNC0dgAAAAw1BMVEUAAAD39/f39/f39/f39/f39/f39/f39/f8/Pz39/fb5P////+WrPjj4+MaHB319vfe5v/s7/rp7Ovy8vLx8/nn5+fu7u7n7PzKzdDi6f1wcXL7+/vEzOTGxscphFrd5Pni4+o2OTtTnHpjZnCcsfjQ2fby9/VEk2/f5PFSVFaktvd4spewwPd6gI9mboa6yPWGmt2pqqsuMTbW3OCSwavDz/iwvcJKVHOpqqrl6feLkaGMjo6bm5x+gIA8QUqOo+t3iMFQsBsaAAAACXRSTlMA779wIIDfnxC1qPNnAAAJI0lEQVR42uzWuw3AQAgEUe5nm/4btoMLHG12SCvNK2GEgNie1a/EIa2PGX+zJw67f8lHSxzXRmwrUWLt+U4UGfGZ7JMybUbEnSjTI2ai0MMGr7WCD7xUD05mqSsSpQiuEdwdwTWCuyO4RnB3BNcI7o7gGsHdEVwjuDuCawR3R3CN4O4IrhHcHcE1grsjuEZwdwTXCO6O4BrB3RFcI7g7gmsEd/eya4a9acNAGM5XQ5iJTcIQiLAKVkbpmEZbqfuy//+v5tR1XzqnF5JzDJP2fqla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gmca6CrjHvRmwE0u51q6YDd7rGvBsArhhTFvTm8LQ6YWPebRJwy21mpKbNtJygscqN366MxW9XTqsTNubdEHCkgtjKqN3OWTtdY95tMnDPTNHSC5UgbMy7ES9VSQYUft7spI15N+61Qf4LhdWQAwrfWO3GvxiL8/gXY7EqJ2zMu3HAQSJYeGdf/cYqBY3FbvzhBnjCIA83wAr6xrwbe3wHn4eJ1wRvrrHSjT+gBiv3Jko0jld7eWPejQVuF2flFdZMl+uI6xOisdCNP2QMa2E4hWrky5l8Y60bA9wkP+TCpyz4f/IGDCdEY50bfVAkjuO1bxDu0gARjbVu1FGodFwaeUfgJhpr3fjDfqPywhFzJTrsN6pqgjdIfGO9G3Wc9UNsnhcL560RqAw/m7rqUdd1F0pAW9BY6fbxA6b/2KFjGgBgGAhi/FmXwS1d8pINwf+E3ya8CV8nvAlfJ7wJXye8CV8nvAlfJ7wJXye8CV8nvAlfJ7wJXye8CV8nvAlfJ7wJXye8CV8nvAlfJ7wJXye8CV8nvAlfJ7wJXye8CV8nvAl/7dVBCsMwDETRsSQn0f0v3JaWkpV3GTD8d4SPGO2O4GsE3x3B1wi+O4KvEXx3BDfT0TAaioZRaDaMUlfDqMSmOJ2SajRMRuktGyapD/6my9RPsioGI/VXZ+NhUbqrDM78MUfMS18vwGQ/2+yp6lQAAAAASUVORK5CYII="},{id:m.FIRST_SESSION,content:"Entry session only",helpText:"Count metrics for sessions only where this page was the very first page visited, then track how they moved through the funnel.",icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAXAAAAC4CAMAAADNC0dgAAAAulBMVEUAAAD39/f39/f39/f39/f39/f8/Pz39/fb5P+WrPj///8aHB3j4+P09vfKzdDo6Ojy8vLl5ebd5f7h6P7n7Pzr6+vu7u5wcXLx8/nt8PsxNDn7+/vGxscphFrEzOS8yfakt/je5Pecsfjh4+zQ2fZjZnDr7vdSVFaHm95UnXt4sZd6f41Ek2/H0visvfTk7+vZ3OSOkJZXY4ipqqvX6OBIUm+u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hY+oucj3M66OQX0ag+lGFXhcoNtlnybMM0rGtCBEGbXTs4MeudOgZRYH6/qcw2f5bRlmSRbnc+zm39zduDnWSBF9/MsE6QWm9BoQxoQzO40Z1mBDQggRb0BIa9Ked7+aNk+I19n5QV/+91jy24Pt9iAlFgttvkNANBEFsCayDL/v4lMi/G+Aw3GxzFhgZhYOyBW44VXNByjbILH9doXAvnxS91qGo6LY8JqDSsuHC/xki4gvfLFnI5EcOF4iV+4ByKPY8LqDyu+IF9vBsdV2AtNePVhxYXTk9IjCq4C33KCD2vcTVX4HZNxUSovtfrDim8b1JxQGBul8rz6sOLCqdRYi48X37jNZbnCqywmHDde0ihSE+VKd+qXES6cguINk/FG0TfjIvjGj+9QrG/GW0XfjFP3jQunlYJvYB43ngCcgm+1I5hkFhVBpE5FhHwp4c8nmHBgT/JTTSi5URAxamCtJ4hPhFIFzfJmF4oimNzKKcalhIELp7pcCLpXLALDW23d/coR3Swcp66Cnm7GO1XdrFyjutUO+2VCOSeQs4f9MsbmsAfhsF+27QnnlY+znq/KEA6qQ1lWNengc2cP2o2xLvcpqZD+STnGvFbKxx+Y/mKHjmkAAGAgCPl3XQefrpeABL6EVwnfhNcJ34TXCd+E1wnfhNcJ34TXCd+E1wnfhNcJ34TXCd+E1wnfhNcJ34TXCd+E1wnfhNcJ34TXCd+E1wnfhNcJ34TXCd+E1wnfhNcJ34Rfe/VyAjEQA0G09LF12vzTXTA2vs3NDQP9QihEa3cOvubgu3PwNQffnYOvOfjuHFyMHBNKakyoiDGh4BwTarwpSgfQfpsy2YBXXCfAxYWCW3hVBDLg0cfYx6qBV0f5zL/yy4oTLn9JSvy4U7oaTQAAAABJRU5ErkJggg=="}];var st;function ot(){return{[e.MainDateTimePickerAlias.TODAY]:{title:"Today",alias:e.MainDateTimePickerAlias.TODAY,getDateRange:bt},[e.MainDateTimePickerAlias.YESTERDAY]:{title:"Yesterday",alias:e.MainDateTimePickerAlias.YESTERDAY,getDateRange:Pt},[e.MainDateTimePickerAlias.LAST_7_DAYS]:{title:"Last 7 days",alias:e.MainDateTimePickerAlias.LAST_7_DAYS,getDateRange:wt},[e.MainDateTimePickerAlias.LAST_30_DAYS]:{title:"Last 30 days",alias:e.MainDateTimePickerAlias.LAST_30_DAYS,getDateRange:Lt},[e.MainDateTimePickerAlias.LAST_90_DAYS]:{title:"Last 90 days",alias:e.MainDateTimePickerAlias.LAST_90_DAYS,getDateRange:zt},[e.MainDateTimePickerAlias.LAST_365_DAYS]:{title:"Last 365 days",alias:e.MainDateTimePickerAlias.LAST_365_DAYS,getDateRange:Yt},[e.MainDateTimePickerAlias.LAST_MONTH]:{title:"Last month",alias:e.MainDateTimePickerAlias.LAST_MONTH,getDateRange:Ut},[e.MainDateTimePickerAlias.LAST_12_MONTHS]:{title:"Last 12 months",alias:e.MainDateTimePickerAlias.LAST_12_MONTHS,getDateRange:Bt},[e.MainDateTimePickerAlias.LAST_YEAR]:{title:"Last year",alias:e.MainDateTimePickerAlias.LAST_YEAR,getDateRange:Ht}}}function lt(e){return ot()[e]}e.MainDateTimePickerAlias=void 0,(st=e.MainDateTimePickerAlias||(e.MainDateTimePickerAlias={})).TODAY="today",st.YESTERDAY="yesterday",st.LAST_7_DAYS="last7days",st.LAST_30_DAYS="last30days",st.LAST_90_DAYS="last90days",st.LAST_365_DAYS="last365days",st.LAST_MONTH="lastMonth",st.LAST_12_MONTHS="last12Months",st.LAST_YEAR="lastYear";const ct={YMD:"YYYY-MM-DD",MONTH_YEAR:"MMM YYYY",FULL:"MMMM D, YYYY",FULL_WITH_TIME:"MMMM D, YYYY [at] h:mm A",SHORT:"MMM DD, YYYY",SHORT_NO_PAD:"MMM D, YYYY",SHORT_WITH_TIME:"MMM D, YYYY [at] h:mm A",MONTH_DAY:"MMM D",DAY_YEAR:"D, YYYY",TIME:"h:mm A",MONTH_DAY_WITH_TIME:"MMM D [at] h:mm A",YEAR:"YYYY"};const dt=/^\d{4}-\d{1,2}-\d{1,2}/;function ut(e){return!isNaN(new Date(e).getDate())}function mt(e){return dt.test(e)&&ut(e)}function At(e){return 10===e.length&&mt(e)}function ht(e,t){const i=W(e);return"YMD"===t?i.format(ct.YMD):"MY"===t?i.format(ct.MONTH_YEAR):"FULL"===t?i.format(ct.FULL):"FULL_WITH_TIME"===t?i.format(ct.FULL_WITH_TIME):i.format(ct.SHORT)}function gt(e,t){const i=W(e),n=W(t);return i.isSame(n,"day")}function pt(e){const{since:t,until:i,format:n=ct.TIME,showNow:a=!1}=e,r=W(t),s=W(i);return`${r.format(n)} - ${a?"Now":s.format(n)}`}function Mt(e){const{since:t,until:i,isShowNow:n}=e,a=W(t),r=W(i),s=a.isSame(V(),"day"),o=a.format(ct.TIME),l=r.format(ct.TIME);if(s){return`Today at ${o} - ${n?"Now":l}`}if(n)return`${a.format(ct.SHORT_WITH_TIME)} - Now`;if(a.isSame(r,"day"))return`${a.format(ct.SHORT_WITH_TIME)} - ${l}`;if(a.isSame(r,"day")){const e=pt({since:t,until:i});return`${a.format(ct.SHORT)} (${e})`}return a.isSame(r,"year")?`${a.format(ct.MONTH_DAY_WITH_TIME)} - ${r.format(ct.MONTH_DAY_WITH_TIME)}, ${r.format(ct.YEAR)}`:`${a.format(ct.SHORT_WITH_TIME)} - ${r.format(ct.SHORT_WITH_TIME)}`}const Tt=(e,t=!1,i)=>t&&xt(e)?e.endOf("day").format(i):e.format(i),ft=(e,t)=>Tt(e?V(e).endOf("day"):V().endOf("day"),!1,t),xt=e=>0===e.hour()&&0===e.minute();function It(e,t){const i=W(e),n=W(t);return i.isSame(n,"day")?i.format(ct.SHORT):i.isSame(n,"month")&&i.isSame(n,"year")?`${i.format(ct.MONTH_DAY)} - ${n.format(ct.DAY_YEAR)}`:i.isSame(n,"year")?`${i.format(ct.MONTH_DAY)} - ${n.format(ct.SHORT_NO_PAD)}`:`${i.format(ct.SHORT_NO_PAD)} - ${n.format(ct.SHORT_NO_PAD)}`}function Nt(t){const{since:i,until:n,isShowNow:a}=t,r=W(i);return r.isSame(V(),"day")?lt(e.MainDateTimePickerAlias.TODAY).title:a?`${r.format(ct.SHORT_NO_PAD)} - Now`:It(i,n)}const jt=({since:e,until:t,isShowNow:i})=>{if(gt(e,t))return pt({since:e,until:t,showNow:i})},Dt=e=>[...e].sort((e,t)=>b(t.version)-b(e.version)).map(e=>{if(!e.startedAt)return!1;const t=!e.completedAt,i=F(e.startedAt).valueOf(),n=t?F(ft()).valueOf():F(e.completedAt).valueOf(),a=Nt({since:i,until:n,isShowNow:t}),r=jt({since:i,until:n,isShowNow:t});return{title:a,alias:`${e.version}`,since:i,until:n,isVersion:!0,isCurrentVersion:t,description:r,versionId:e.id}}).filter(Boolean),Et=()=>({since:0,until:0}),St=t=>{const{since:i,until:n,alias:r}=t,s=a(i),o=a(n);if(r===e.MainDateTimePickerAlias.LAST_MONTH)return Ut(s);if(r===e.MainDateTimePickerAlias.LAST_12_MONTHS)return Bt(s);if(r===e.MainDateTimePickerAlias.LAST_YEAR)return Ht(s);const l=o.diff(s,"day")+1,c=s.subtract(l,"day"),d=o.subtract(l,"day");return{since:c.valueOf(),until:d.valueOf()}},vt=(e,t)=>i=>{const{since:n,until:r}=i,s=a(n),o=a(r).diff(s,"day"),l=s.subtract(e,t),c=l.add(o,"day");return{since:l.valueOf(),until:c.valueOf()}},Ot=vt(7,"day"),yt=vt(3,"month"),Ct=vt(1,"month"),Rt=vt(1,"year"),kt=e=>t=>({since:t.subtract(e,"day").valueOf(),until:t.valueOf()}),bt=e=>({since:e.valueOf(),until:e.valueOf()}),Pt=e=>({since:e.subtract(1,"day").valueOf(),until:e.subtract(1,"day").valueOf()}),wt=kt(6),Lt=kt(29),zt=kt(89),Yt=kt(364);function Ut(e){return{since:e.subtract(1,"month").startOf("month").valueOf(),until:e.subtract(1,"month").endOf("month").valueOf()}}function Bt(e){return{since:e.subtract(12,"month").startOf("month").valueOf(),until:e.subtract(1,"month").endOf("month").valueOf()}}function Ht(e){return{since:e.subtract(1,"year").startOf("year").valueOf(),until:e.subtract(1,"year").endOf("year").valueOf()}}const Gt=(e,t,i)=>{const n=a(i),r=n.month();if(n.year()!==t||r!==e){const e=n.subtract(1,"month");return{month:e.month(),year:e.year()}}return{month:e,year:t}};var Qt;e.CompareDateTimePickerAlias=void 0,(Qt=e.CompareDateTimePickerAlias||(e.CompareDateTimePickerAlias={})).NO_COMPARISON="noComparison",Qt.PREVIOUS_PERIOD="previousPeriod",Qt.PREVIOUS_WEEK="previousWeek",Qt.PREVIOUS_MONTH="previousMonth",Qt.PREVIOUS_QUARTER="previousQuarter",Qt.PREVIOUS_YEAR="previousYear";const _t={title:"Previous period",alias:e.CompareDateTimePickerAlias.PREVIOUS_PERIOD,since:0,until:0},Vt=[{title:"No comparison",alias:e.CompareDateTimePickerAlias.NO_COMPARISON,since:0,until:0},_t,{title:"Previous week",alias:e.CompareDateTimePickerAlias.PREVIOUS_WEEK,since:0,until:0},{title:"Previous quarter",alias:e.CompareDateTimePickerAlias.PREVIOUS_QUARTER,since:0,until:0},{title:"Previous month",alias:e.CompareDateTimePickerAlias.PREVIOUS_MONTH,since:0,until:0},{title:"Previous year",alias:e.CompareDateTimePickerAlias.PREVIOUS_YEAR,since:0,until:0}],Wt={[e.CompareDateTimePickerAlias.NO_COMPARISON]:Et,[e.CompareDateTimePickerAlias.PREVIOUS_PERIOD]:St,[e.CompareDateTimePickerAlias.PREVIOUS_WEEK]:Ot,[e.CompareDateTimePickerAlias.PREVIOUS_QUARTER]:yt,[e.CompareDateTimePickerAlias.PREVIOUS_MONTH]:Ct,[e.CompareDateTimePickerAlias.PREVIOUS_YEAR]:Rt},Ft=()=>{const t=F().startOf("day"),i=ot(),n=i[e.MainDateTimePickerAlias.TODAY],a={...n,...n.getDateRange(t)},r=i[e.MainDateTimePickerAlias.YESTERDAY],s={...r,...r.getDateRange(t)},o=i[e.MainDateTimePickerAlias.LAST_7_DAYS],l={...o,...o.getDateRange(t)},c=i[e.MainDateTimePickerAlias.LAST_30_DAYS],d={...c,...c.getDateRange(t)},u=i[e.MainDateTimePickerAlias.LAST_90_DAYS],m={...u,...u.getDateRange(t)},A=i[e.MainDateTimePickerAlias.LAST_365_DAYS],h={...A,...A.getDateRange(t)},g=i[e.MainDateTimePickerAlias.LAST_MONTH],p={...g,...g.getDateRange(t)},M=i[e.MainDateTimePickerAlias.LAST_12_MONTHS],T={...M,...M.getDateRange(t)},f=i[e.MainDateTimePickerAlias.LAST_YEAR];return{DATE_TIME_FILTERS:[a,s,l,d,m,h,p,T,{...f,...f.getDateRange(t)}],LAST_7_DAYS_DATE_RANGE:l,LAST_30_DAYS_DATE_RANGE:d}},Jt=n.createContext({dateTimePicked:{since:V().valueOf(),until:V().valueOf(),title:"Today",alias:"today"},compareDateTimePicked:_t,setDateTimePicked:()=>{},setCompareDateTimePicked:()=>{},resetDateVersion:()=>{}}),qt=()=>{const e=n.useContext(Jt);if(!e)throw new Error("useDateTimePickerContext must be used within a DateTimePickerProvider");return e},Xt=({ranges:e,initialPicked:t,onApply:i})=>{const{DATE_TIME_FILTERS:r}=Ft(),s=e||r,{dateTimePicked:o,setDateTimePicked:l}=qt(),[c,d]=n.useState(o),[{month:u,year:m},A]=n.useState({month:a(o.since).month(),year:a(o.since).year()});n.useEffect(()=>{if(o){const e=new Date(o.until);((e,t)=>t.month-e.month+12*(e.year-t.year))({year:m,month:u},{year:e.getFullYear(),month:e.getMonth()})}},[o,u,m]);return n.useEffect(()=>{o&&(d(o),A({month:a(o.since).month(),year:a(o.since).year()}))},[o]),{month:u,year:m,setDate:A,dateRange:c,apply:()=>{l(c),i?.(c)},cancel:()=>{d(o)},dateTimePicked:o,onChange:({end:e})=>{A(Gt(u,m,e))},onMonthChange:(e,t)=>{A({month:e,year:t})},onCalendarChange:e=>{const{start:i,end:n,alias:a}=e,r={alias:"custom",title:"Custom",since:i.getTime(),until:n.getTime()},o=s.find(e=>{const t=e.alias===a,r=e.until===n.getTime(),s=e.since===i.getTime();return t||s&&r});d(o||t||r)}}};function Kt({onBlur:e,dateRange:a,setDateTimePicked:r}){const[s,o]=n.useState(!1),[l,c]=n.useState({}),d=n.useCallback((e,t=!1)=>!a.isVersion||t&&a.isCurrentVersion?ht(e,"FULL"):ht(e,"FULL_WITH_TIME"),[a.isVersion,a.isCurrentVersion]);function u(){o(!1),c({since:d(a.since),until:d(a.until,!0)}),e&&e()}return n.useEffect(()=>{s||c({since:d(a.since),until:d(a.until,!0)})},[a,d]),t.jsxs(i.InlineGrid,{gap:"200",columns:"1fr auto 1fr",children:[t.jsx(i.TextField,{role:"combobox",label:"Since",labelHidden:!0,value:a.since?l.since:"MMMM D, YYYY",onChange:function(e){if(c(t=>({...t,since:e})),At(e)){const t=W(e).startOf("day"),i=W(a.until).endOf("day"),n=t.isAfter(i)?t.endOf("day"):i;r({start:F(t).toDate(),end:F(n).toDate()})}},onBlur:()=>u(),onFocus:()=>(o(!0),void c({...l,since:ht(a.since,"YMD")})),autoComplete:"off"}),t.jsx(i.InlineStack,{children:t.jsx(i.Icon,{source:E,tone:"subdued"})}),t.jsx(i.TextField,{role:"combobox",label:"Until",labelHidden:!0,value:a.until?l.until:"MMMM D, YYYY",onChange:function(e){if(c(t=>({...t,until:e})),At(e)){const t=V().endOf("day"),i=W(e).endOf("day"),n=i.isAfter(t)?t:i,s=W(a.since).startOf("day"),o=n.isBefore(s)?n.startOf("day"):s;r({start:F(o).toDate(),end:F(n).toDate()})}},onBlur:()=>u(),onFocus:()=>(o(!0),void c({...l,until:ht(a.until,"YMD")})),autoComplete:"off"})]})}function Zt(e){const{setDateTimePicked:a,dateTimePicked:r,rangeAddition:s,allRanges:o}=e,{value:l,toggle:c}=function(e){const[t,i]=n.useState(e);return{value:t,toggle:n.useCallback(()=>i(e=>!e),[]),setTrue:n.useCallback(()=>i(!0),[]),setFalse:n.useCallback(()=>i(!1),[])}}(!0),d=s?.rangers||[],u=d.map(e=>{const n=r.alias===e.alias;return{value:e.alias,label:t.jsxs(i.Text,{as:"span",truncate:!0,children:[t.jsx(i.Text,{as:"span",variant:"bodyMd",fontWeight:n?"semibold":"regular",children:e.title}),e.description&&t.jsxs(t.Fragment,{children:[" ",t.jsx(i.Text,{as:"span",variant:"bodyXs",fontWeight:"regular",tone:"subdued",children:`(${e.description})`})]})]})}});if(s&&0!==d.length)return t.jsxs(i.Box,{borderBlockEndWidth:"025",borderColor:"border",paddingBlock:"200",children:[t.jsx("div",{className:"px-1.5",children:t.jsx(oe,{onClick:c,"aria-expanded":l,className:U("hover:bg-surface-hover cursor-pointer rounded-lg p-1.5"),children:t.jsxs(i.InlineStack,{align:"space-between",blockAlign:"center",children:[t.jsx(i.Text,{as:"span",variant:"bodyMd",children:s.title}),t.jsx(i.Box,{children:t.jsx(i.Icon,{source:l?C:O})})]})})}),t.jsx(i.Collapsible,{open:l,id:"date-time-filter-periods-collapsible",transition:{duration:"200ms",timingFunction:"ease-in-out"},children:t.jsx(de,{options:u,selected:r?[r.alias]:[],onChange:e=>{const t=e[0],i=o.find(e=>e.alias===t)||o[0];a({start:V(i?.since).toDate(),end:V(i?.until).toDate(),alias:i?.alias})}})})]})}function $t(e){const{setDateTimePicked:n,dateTimePicked:a,allRanges:r,isCompare:s}=e,{DATE_TIME_FILTERS:o}=Ft(),{mdDown:l}=i.useBreakpoints(),c=s?[...Vt]:[...o];return t.jsx(i.Box,{maxWidth:l?"516px":"250px",width:l?"100%":"250px",padding:{xs:"500",md:"0"},paddingBlockEnd:{xs:"100",md:"0"},children:l?t.jsx(i.Select,{label:"dateRangeLabel",labelHidden:!0,onChange:e=>(e=>{const t=r.find(({title:t,alias:i})=>t===e||i===e)||r[0];n({start:V(t?.since).toDate(),end:V(t?.until).toDate(),alias:t?.alias})})(e),value:a?.title||a?.alias||"",options:r.map(({alias:e,title:t})=>t||e)}):t.jsx(i.Scrollable,{style:{maxHeight:"356px"},children:t.jsx(i.Box,{children:t.jsxs(i.BlockStack,{children:[t.jsx(Zt,{...e}),t.jsx(i.OptionList,{options:c.map(e=>({value:e.alias,label:e.title})),selected:a?[a.alias]:[],onChange:e=>(e=>{const t=r.find(t=>t.alias===e[0])||r[0];n({start:V(t?.since).toDate(),end:V(t?.until).toDate(),alias:t?.alias})})(e)})]})})})})}const ei=({ranges:e,onApply:t})=>{const i=e||Vt,{compareDateTimePicked:a,setCompareDateTimePicked:r}=qt(),{dateTimePicked:s}=qt(),[o,l]=n.useState(a),[{month:c,year:d},u]=n.useState({month:V(a.since).month(),year:V(a.since).year()});return{month:c,year:d,setDate:u,dateRange:o,apply:()=>{r(o),t?.(o)},cancel:()=>{l(a)},compareDateTimePicked:a,onChange:({end:e})=>{u(Gt(c,d,e))},onMonthChange:(e,t)=>{u({month:e,year:t})},onCalendarChange:({start:e,end:t,alias:n})=>{const a=i.find(e=>e.alias===n);l(a?{...a,...Wt[n]({since:s.since,until:s.until})}:{alias:"custom",title:"Custom",since:e.getTime(),until:t.getTime()})}}},ti=e=>{const{dateTimeFilters:r,rangeAddition:s,popoverProps:o,activatorProps:c,actionProps:d,isCompare:u,buttonValue:m,activator:A}=e,h=s?.initialPicked,g=[...r||[],...s?.rangers||[]],p=u?ei:Xt,{month:M,year:T,dateRange:f,apply:x,cancel:I,onMonthChange:N,onCalendarChange:j,onChange:D}=p({ranges:g,initialPicked:h,onApply:e.onApply}),{t:E}=l.useTranslation(),{mdDown:v,lgUp:O}=i.useBreakpoints(),y=O,C=n.useMemo(()=>{if(f.isVersion&&f.since&&f.until)return Mt({since:f.since,until:f.until,isShowNow:f.isCurrentVersion})},[f.since,f.until,f.isVersion,f.isCurrentVersion]),[R,k]=n.useState(!1),b=n.useRef(null),P=n.useRef(C);R||(P.current=C);const w=P.current;function L({relatedTarget:e}){var t;null!=e&&(t=e,!!b?.current&&function(e,t){if(e===t)return!0;let i=t.parentNode;for(;null!=i;){if(i===e)return!0;i=i.parentNode}return!1}(b.current,t))||k(!1)}function z(){I(),k(!1)}const Y=()=>{u||k(!R)};return t.jsx(i.Popover,{active:R,autofocusTarget:"none",preferredAlignment:"right",preferredPosition:"below",fluidContent:!0,sectioned:!1,fullHeight:!0,activator:t.jsx(te,{height:"100%",minHeight:"28px",align:"center",children:t.jsx(ie,{content:w,maxWidth:A?"large":"extra-large",children:t.jsx(i.Box,{children:A?A({onClick:Y,value:m}):t.jsx(i.Button,{size:"slim",icon:u?void 0:S,onClick:Y,...c,children:m})})})}),onClose:z,...o,children:t.jsxs(i.Scrollable,{vertical:!0,scrollbarWidth:"thin",className:"max-w-[100%]",children:[t.jsx(i.Popover.Pane,{fixed:!0,children:t.jsx("div",{ref:b,children:t.jsxs(i.InlineGrid,{columns:{xs:"1fr",md:"max-content max-content"},gap:"0",children:[t.jsx($t,{setDateTimePicked:e=>{j(e),D(e)},dateTimePicked:f,rangeAddition:s,allRanges:g,isCompare:u}),t.jsx(i.Box,{padding:"400",maxWidth:v?"320px":"516px",borderInlineStartWidth:"025",borderColor:"border-secondary",children:t.jsxs(i.BlockStack,{gap:"400",children:[t.jsx(Kt,{setDateTimePicked:j,dateRange:f,onBlur:()=>L}),t.jsx("div",{children:t.jsx(i.DatePicker,{month:M,year:T,selected:f.since||f.until?{start:a(f.since).toDate(),end:a(f.until).toDate()}:void 0,onMonthChange:N,onChange:j,multiMonth:y,allowRange:!0,disableDatesAfter:J()})}),d&&t.jsx(ne,{...d,onClick:()=>{k(!1),d.onClick?.()}})]})})]})})}),t.jsx(i.Popover.Pane,{fixed:!0,children:t.jsx(i.Box,{padding:"400",borderBlockStartWidth:"025",borderColor:"border-secondary",children:t.jsx(i.InlineStack,{align:"end",gap:"200",children:t.jsxs(i.ButtonGroup,{children:[t.jsx(i.Button,{onClick:z,children:E("Cancel")}),t.jsx(i.Button,{variant:"primary",onClick:function(){x(),k(!1)},children:E("Apply")})]})})})})]})})},ii=i=>{const{rangeAddition:a,popoverProps:r}=i,s=a?.initialPicked,o=Vt,c=[...o,...a?.rangers||[]],{t:d}=l.useTranslation(),{compareDateTimePicked:u}=ei({ranges:c,initialPicked:s}),m=n.useMemo(()=>u.alias===e.CompareDateTimePickerAlias.NO_COMPARISON?d("No comparison"):d("Compare to: {{value}}",{value:It(u.since,u.until)}),[u,d]);return t.jsx(ti,{dateTimeFilters:o,rangeAddition:a,popoverProps:r,isCompare:!0,buttonValue:m})},ni=e=>{const{rangeAddition:i,popoverProps:n,activator:a,onApply:r,activatorProps:s,actionProps:o}=e,{DATE_TIME_FILTERS:l}=Ft(),c=l,d=i?.rangers||[],u=i?.initialPicked,m=[...c,...d],{dateTimePicked:A}=Xt({ranges:m,initialPicked:u});return t.jsx(ti,{activatorProps:s,dateTimeFilters:c,rangeAddition:i,popoverProps:n,actionProps:o,buttonValue:(()=>{if(A.isVersion&&d.length>0){const e=A.description?`at ${A.description}`:"";return`Period: ${A.title} ${e}`}return"custom"===A.alias?It(A.since,A.until):A.title})(),activator:a,onApply:r})};e.dayjs=a,e.ANALYTICS_METRIC_TOOLTIP=u,e.AnalyticModeSelector=({activatorText:e="View by",value:i,onChange:a})=>{const r=n.useMemo(()=>rt.map(e=>({...e})),[]);return t.jsx(xe,{activatorText:e,options:r,selected:i,onSelect:e=>{a(e)},maxWidth:"650px"})},e.CAMPAIGN_BACKGROUND_MAIN={ORIGIN:"#2C7DFF",VARIANT:"#F34A70"},e.CHART_MIN_HEIGHT=228,e.COMPARE_DATE_TIME_FILTERS_MAP=Wt,e.CurrencySelector=({currencies:e,selected:a,preferredAlignment:r="left",activatorText:s,onSelect:o})=>{const{t:c}=l.useTranslation(),d=n.useRef(o),u=n.useCallback(e=>{d.current?.(e)},[]),m=n.useMemo(()=>{if(!e)return[];const t=e.map(e=>({content:e,id:e}));return t.some(e=>e.id===j)||t.push({content:j,id:j}),G(t,[{attr:"content",order:"asc",preferredValue:j}])},[e]),A=n.useMemo(()=>m.map(e=>({id:e.id,content:e.content,onAction:()=>u(e.id),active:e.id===a,suffix:e.id===a&&t.jsx(i.Icon,{source:v,tone:"success"}),helpText:e.id===j&&t.jsx(i.Text,{as:"p",fontWeight:"semibold",children:c("Default")})})),[m,a,u,c]),h=n.useMemo(()=>!m?.length||1===m.length&&m[0]?.id===j,[m]);return n.useEffect(()=>{d.current=o}),h?null:t.jsx(ue,{options:A,selected:a,variant:"action-list",onSelect:e=>u(e),activatorText:s??c("Currency"),maxWidth:"225px",preferredAlignment:r,helpText:t.jsx(i.Box,{padding:"200",paddingBlockStart:"300",paddingBlockEnd:"300",borderColor:"border-tertiary",background:"bg",children:t.jsx(ce,{as:"p",variant:"bodyMd",transformers:{1:e=>t.jsx(he,{linkAction:{url:"https://help.shopify.com/en/manual/international/pricing/exchange-rates#auto-convert",target:"_blank"},children:e},e+"text-link")},children:c("This will follow Shopify's current exchange rate. [1]Read more[]")})})})},e.DATE_TIME_COMPARISON_FILTERS=Vt,e.DEFAULT_CURRENCY_ANALYTIC=j,e.DEFAULT_CURRENT_PERIOD_LABEL=f,e.DEFAULT_PREVIOUS_PERIOD_LABEL=x,e.DateTimeFilterInputs=Kt,e.DateTimeFilters=$t,e.DateTimePickerContext=Jt,e.DateTimePickerProvider=({children:i,initDate:r,initDateCompare:s})=>{const[o,l]=n.useState(r||{since:V().set("hour",0).valueOf(),until:V().set("hour",0).valueOf(),title:"Today",alias:"today"}),{DATE_TIME_FILTERS:c}=Ft(),d=n.useCallback((e,t=o)=>({..._t,...Wt[e]({since:t.since,until:t.until,alias:t.alias})}),[o]),[u,m]=n.useState(s||d(e.CompareDateTimePickerAlias.PREVIOUS_PERIOD)),A=n.useCallback(t=>{"custom"!==u.alias&&u.alias!==e.CompareDateTimePickerAlias.NO_COMPARISON&&m(d(u.alias,t))},[u,d]),h=n.useCallback(e=>{l(e),A(e)},[A]);return t.jsx(Jt.Provider,{value:{dateTimePicked:o,setDateTimePicked:h,compareDateTimePicked:u,setCompareDateTimePicked:m,resetDateVersion:()=>{const e=a(o.since).startOf("day").valueOf(),t=a(o.until).startOf("day").valueOf(),i=c.find(i=>i.since===e&&i.until===t);l({...o,isVersion:!1,versionId:void 0,isCurrentVersion:!1,description:"",title:i?.title||o.title,alias:i?.alias||"custom"})}},children:i})},e.GSelectableMetricChartCard=({metricInfo:e,dataChart:a,defaultActiveTab:r,isLoading:s,isEmptyMetricData:o,hideComparison:l,currentPeriodLabel:c=f,previousPeriodLabel:d=x,columnTypes:u})=>{const[m,A]=n.useState(r),h=n.useMemo(()=>{const e=m?a[m]:void 0;if(!e)return[];const t={name:c,data:e.current};return l?[t]:[t,{name:d,data:e.previous,isComparison:!0}]},[m,a,l,c,d]);return t.jsxs(i.Card,{children:[t.jsx("div",{style:{display:"grid",gridTemplateColumns:`repeat(${e.length}, 1fr)`,gap:"16px",marginBottom:"16px"},children:e.map(e=>t.jsx(tt,{item:e,isActive:m===e.key,isLoading:s,hideComparison:l,onSelect:A},e.key))}),t.jsx(Ve,{lineChartData:h,isLoading:s,isEmptyMetricData:o,metricKey:m,columnTypes:u})]})},e.GTimePicker=e=>{const{isCompare:n,...a}=e;return t.jsxs(i.InlineStack,{gap:"200",children:[t.jsx(ni,{...a}),n&&t.jsx(ii,{rangeAddition:a.rangeAddition,popoverProps:a.popoverProps})]})},e.MetricDonutChartCard=({label:e,metricKey:a,targets:r,totalsRow:s,comparisonTotalsRow:o,sort:l,isLoading:d,isEmptyMetricData:m,minHeight:A=294,onClick:h})=>{const g=u[a],{windowWidth:p,windowSize:M}=(()=>{const[e,t]=n.useState(()=>({width:"undefined"!=typeof window?window.innerWidth:0,height:"undefined"!=typeof window?window.innerHeight:0})),i=n.useMemo(()=>({xs:e.width<=768,md:768<e.width&&e.width<=1024,lg:e.width>1024,xsDown:e.width<768,"1200Down":e.width<1200,"1040Down":e.width<1040}),[e.width]),a=!i.lg,r=i.xs;return n.useEffect(()=>{const e=()=>{t({width:window.innerWidth,height:window.innerHeight})};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[]),{windowSize:e,windowWidth:i,isMobileTabletView:a,isMobileView:r}})(),[T,f]=n.useState(!1),x=n.useMemo(()=>at({targets:r,metricKey:a,totalsRow:s,comparisonTotalsRow:o,sort:l}),[r,a,s,o,l]);if(d)return t.jsx(Ze,{});const I=e=>P(`${e}`),N=p.lg&&M.width<1500;return t.jsx("div",{onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),children:t.jsx(i.Card,{children:t.jsxs(i.BlockStack,{gap:"200",children:[t.jsx(i.InlineStack,{children:t.jsx("div",{className:"hover:cursor-pointer hover:text-[--p-color-text-link-hover]",onClick:e=>{e.stopPropagation(),h()},children:t.jsxs(i.InlineStack,{children:[t.jsx(fe,{tooltip:g,children:t.jsx(i.Text,{as:"h3",variant:"headingMd",children:e})}),T&&t.jsx(i.Icon,{source:y,tone:"inherit"})]})})}),t.jsx("div",{className:U("flex items-center justify-center",{"max-h-[250px] overflow-hidden":N}),children:m?t.jsx(We,{title:"No data yet",description:"Data needs time to gather"}):t.jsx(De,{minHeight:A,seriesColors:{},children:t.jsx(c.DonutChart,{data:x,legendPosition:"left",showLegendValues:!0,showLegend:!0,theme:"Light",tooltipOptions:{valueFormatter:I},labelFormatter:I})})})]})})})},e.PLACEHOLDER_VALUE="-",e.PREVIOUS_PERIOD_FILTER=_t,e.SERIES_COLORS=I,e.SingleMetricChartCard=({metricInfo:e,lineChartData:a,isLoading:r,hideComparison:s,columnTypes:o,isEmptyMetricData:l,onClickTitle:c})=>{const[d,u]=n.useState(!1);return t.jsx("div",{onMouseEnter:()=>u(!0),onMouseLeave:()=>u(!1),children:t.jsx(i.Card,{children:t.jsxs(i.BlockStack,{gap:"200",children:[t.jsx(et,{item:e,isHovered:d,isLoading:r,hideComparison:s,onClickTitle:c}),t.jsx(Ve,{lineChartData:a,isLoading:r,isEmptyMetricData:l,columnTypes:o,metricKey:e.key})]})})})},e.TARGET_CHANNEL=T,e.TARGET_DEVICES=M,e.TARGET_VISITOR=p,e.THUMB_PRODUCT_DEFAULT=D,e.TREND_TONE=N,e.convertDateToTz=W,e.convertToDateTimeFilters=Dt,e.createLastDaysRange=kt,e.dayjsTz=V,e.dayjsTzToDate=J,e.dayjsTzToLocalTZ=F,e.formatDate=ht,e.formatDateTimeRange=Mt,e.formatDayjs=Tt,e.formatMs=e=>{const t=Math.floor(e/1e3);return[Math.floor(t/3600),Math.floor(t%3600/60),t%60].map(e=>String(e).padStart(2,"0")).join(":")},e.formatTime=function(e){return W(e).format(ct.TIME)},e.formatTimeRange=pt,e.getDateRangeTitle=It,e.getDateTimeFilterBase=function(e,t){const i=V(),n=W(e),a=W(t),r=ot();for(const e of Object.values(r)){const t=e.getDateRange(i),r=W(t.since),s=W(t.until),o=n.isSame(r,"day"),l=a.isSame(s,"day");if(o&&l)return{title:e.title,alias:e.alias}}return{title:It(e,t),alias:"custom"}},e.getDateTimeFilterByAlias=lt,e.getDateTimeFilterMapping=ot,e.getEndOfDayBy=ft,e.getInitialTimezone=function(){return Q},e.getLast12Months=Bt,e.getLast30Days=Lt,e.getLast365Days=Yt,e.getLast7Days=wt,e.getLast90Days=zt,e.getLastMonth=Ut,e.getLastYear=Ht,e.getMonthAndYearByDateFilter=Gt,e.getNoComparison=Et,e.getPreviousMonth=Ct,e.getPreviousPeriod=St,e.getPreviousQuarter=yt,e.getPreviousWeek=Ot,e.getPreviousYear=Rt,e.getToday=bt,e.getVersionDateDescription=jt,e.getVersionDateRangeTitle=Nt,e.getYesterday=Pt,e.isDate=ut,e.isMidnight=xt,e.isSameDayTimestamp=gt,e.isValidDate=At,e.isValidYearMonthDayDateString=mt,e.parseYearMonthDayDateString=function(e){return a(e).valueOf()},e.setTz=function(e){Q=e,a.tz.setDefault(e)},e.useDateTimeFilter=Ft,e.useDateTimePicker=Xt,e.useDateTimePickerContext=qt,e.useVersionDateTimeFilters=e=>{const{t:t}=l.useTranslation(),i=n.useMemo(()=>e?.length?Dt(e):[],[e]);return{rangeAddition:{title:t("Experiment periods"),rangers:i}}}});
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react/jsx-runtime"),require("@shopify/polaris"),require("react"),require("dayjs"),require("dayjs/plugin/quarterOfYear.js"),require("dayjs/plugin/timezone.js"),require("dayjs/plugin/utc.js"),require("react-i18next"),require("zustand"),require("@tanstack/react-query"),require("@shopify/polaris-viz")):"function"==typeof define&&define.amd?define(["exports","react/jsx-runtime","@shopify/polaris","react","dayjs","dayjs/plugin/quarterOfYear.js","dayjs/plugin/timezone.js","dayjs/plugin/utc.js","react-i18next","zustand","@tanstack/react-query","@shopify/polaris-viz"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).GemAnalytics={},e.jsxRuntime,e.Polaris,e.React,e.dayjs,e.quarterOfYear,e.timezone,e.utc,e.reactI18next,e.zustand,e.reactQuery,e.polarisViz)}(this,function(e,t,i,n,a,r,s,o,l,c,d,u){"use strict";var m;!function(e){e.SESSION="sessions",e.ORDERS="orders",e.PAGE_VIEWS="pageviews",e.VISITORS="visitors",e.BOUNCE_RATE="bounce_rate",e.CTR="ctr",e.CONVERSION_RATE="conversion_rate",e.AVG_TIME_ON_PAGE="average_time_on_page",e.ADDED_TO_CART="added_to_cart",e.ADD_TO_CART_RATE="added_to_cart_rate",e.REACHED_CHECKOUT="sessions_that_reached_checkout",e.COMPLETE_CHECKOUT="sessions_that_completed_checkout",e.CART_ADDITION="sessions_with_cart_additions",e.AOV="aov",e.REVENUE="revenue",e.RPV="revenue_per_visitor",e.VISITOR_ITEMS="visitor_items",e.DEVICE_ITEMS="device_items",e.TRAFFIC_SOURCE_ITEMS="traffic_source_items"}(m||(m={}));const h={[m.SESSION]:{title:"Sessions",content:"A period during which a visitor interacts with your online store"},[m.VISITORS]:{title:"Visitors",content:"Number of unique individuals who visit your online store"},[m.BOUNCE_RATE]:{title:"Bounce rate",content:"Percentage of visitors who leave your store after viewing only one page, without interacting further",formula:t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"formula-variable",children:"Bounce rate"}),t.jsx("span",{children:" = "}),t.jsx("span",{className:"formula-input",children:"sessions with a pageview"}),t.jsx("span",{className:"formula-operator",children:" / "}),t.jsx("span",{className:"formula-input",children:"total sessions"})]})},[m.CTR]:{title:"Click-through rate",content:"Percentage of clicks to open new page, compared to the number of times the page was viewed",formula:t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"formula-variable",children:"Click-through rate"}),t.jsx("span",{children:" = "}),t.jsx("span",{className:"formula-input",children:"total clicks"}),t.jsx("span",{className:"formula-operator",children:" / "}),t.jsx("span",{className:"formula-input",children:"total pageviews"})]})},[m.AVG_TIME_ON_PAGE]:{title:"Average time on page",content:"Average duration that visitors spend on a page before clicking to open new page",formula:t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"formula-variable",children:"Average time on page"}),t.jsx("span",{children:" = "}),t.jsx("span",{className:"formula-input",children:"total time on page"}),t.jsx("span",{className:"formula-operator",children:" / "}),t.jsx("span",{className:"formula-input",children:"(total pageviews - total exits)"})]})},[m.PAGE_VIEWS]:{title:"Pageviews",content:"Number of times a page on your online store has been viewed by visitors"},[m.RPV]:{title:"Revenue per visitor",content:"Average revenue generated from each visitor",formula:t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"formula-variable",children:"Revenue per visitor"}),t.jsx("span",{children:" = "}),t.jsx("span",{className:"formula-input",children:"total revenue"}),t.jsx("span",{className:"formula-operator",children:" / "}),t.jsx("span",{className:"formula-input",children:"total visitors"})]})},[m.ADDED_TO_CART]:{title:"Added to cart",content:"Total number of the event when a customer adds a product to their cart on your online store"},[m.REACHED_CHECKOUT]:{title:"Sessions that reached checkout",content:"Sessions in your online store in which the checkout page was reached"},[m.COMPLETE_CHECKOUT]:{title:"Sessions that completed checkout",content:"Sessions in your online store in which a purchase was completed"},[m.ORDERS]:{title:"Orders",content:"Number of orders that went through this pages"},[m.CONVERSION_RATE]:{title:"Conversion rate",content:"Percentage of online store sessions that completed an order",formula:t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"formula-variable",children:"Conversion rate"}),t.jsx("span",{children:" = "}),t.jsx("span",{className:"formula-input",children:"sessions that completed checkout"}),t.jsx("span",{className:"formula-operator",children:" / "}),t.jsx("span",{className:"formula-input",children:"total sessions"})]})},[m.AOV]:{title:"Average order value",content:"Average value of orders placed in your online store",formula:t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"formula-variable",children:"Average order value"}),t.jsx("span",{children:" = "}),t.jsx("span",{className:"formula-input",children:"total revenue"}),t.jsx("span",{className:"formula-operator",children:" / "}),t.jsx("span",{className:"formula-input",children:"total orders"})]})},[m.REVENUE]:{title:"Revenue",content:"Total income generated from sales after discounts",formula:t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"formula-variable",children:"Revenue"}),t.jsx("span",{children:" = "}),t.jsx("span",{className:"formula-input",children:"gross sales"}),t.jsx("span",{className:"formula-operator",children:" - "}),t.jsx("span",{className:"formula-input",children:"discounts"})]})},[m.ADD_TO_CART_RATE]:{title:"Add to cart rate",content:"Percentage of sessions in which the customer added item to the cart",formula:t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"formula-variable",children:"Added to cart rate"}),t.jsx("span",{children:" = "}),t.jsx("span",{className:"formula-input",children:"sessions with cart additions"}),t.jsx("span",{className:"formula-operator",children:" / "}),t.jsx("span",{className:"formula-input",children:"total sessions"})]})},[m.CART_ADDITION]:{title:"Sessions with cart additions",content:"Sessions in your online store in which a visitor added item to the cart"},[m.VISITOR_ITEMS]:{title:"Sessions by visitor type",content:"<p>Numbers of new and returning visitors</p>",contentList:["New visitor: who accesses your store for the first time after GemX installation","Returning visitor: who comes back to your store after GemX installation"]},[m.DEVICE_ITEMS]:{title:"Sessions by device type",content:"Sessions in your online store by the visitor's device type"},[m.TRAFFIC_SOURCE_ITEMS]:{title:"Sessions by traffic source",content:"Sessions on your page by where visitors come from"}};var A,g,p,M;!function(e){e.ALL_SESSION="ALL_SESSION",e.FIRST_SESSION="FIRST_SESSION",e.PAGE_ONLY="PAGE_ONLY"}(A||(A={})),function(e){e.NEW="new",e.RETURNING="returning"}(g||(g={})),function(e){e.DESKTOP="desktop",e.MOBILE="mobile",e.TABLET="tablet"}(p||(p={})),function(e){e.DIRECT="direct",e.EMAIL="email",e.REFERRAL="referral",e.ORGANIC_SOCIAL="organic-social",e.ORGANIC_SEARCH="organic-search",e.PAID_SOCIAL="paid-social",e.PAID_SEARCH="paid-search",e.SMS="sms"}(M||(M={}));const T=[{value:g.NEW,label:"New"},{value:g.RETURNING,label:"Returning"}],f=[{value:p.DESKTOP,label:"Desktop"},{value:p.TABLET,label:"Tablet"},{value:p.MOBILE,label:"Mobile"}],x=[{value:M.DIRECT,label:"Direct"},{value:M.EMAIL,label:"Email"},{value:M.REFERRAL,label:"Referral"},{value:M.ORGANIC_SOCIAL,label:"Organic social"},{value:M.ORGANIC_SEARCH,label:"Organic search"},{value:M.PAID_SOCIAL,label:"Paid social"},{value:M.PAID_SEARCH,label:"Paid search"},{value:M.SMS,label:"SMS"}],I="Current",N="Previous",j={current:"rgba(64, 176, 230, 1)",comparison:"rgba(161, 202, 231, 1)",all:["#2C7DFF","#F34A70"]},D={POSITIVE:"#007F5F",NEUTRAL:"#4A4A4A"},E="USD";var S="data:image/svg+xml;base64,PHN2ZwogIHdpZHRoPSI5MCIKICBoZWlnaHQ9IjcyIgogIHZpZXdCb3g9IjAgMCA5MCA3MiIKICBmaWxsPSJub25lIgogIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKPgogIDxwYXRoCiAgICBkPSJNNDguNzUgMzQuNUM0OS45OTI2IDM0LjUgNTEgMzMuNDkyNiA1MSAzMi4yNUM1MSAzMS4wMDc0IDQ5Ljk5MjYgMzAgNDguNzUgMzBDNDcuNTA3NCAzMCA0Ni41IDMxLjAwNzQgNDYuNSAzMi4yNUM0Ni41IDMzLjQ5MjYgNDcuNTA3NCAzNC41IDQ4Ljc1IDM0LjVaIgogICAgZmlsbD0iIzYxNjE2MSIKICAvPgogIDxwYXRoCiAgICBmaWxsUnVsZT0iZXZlbm9kZCIKICAgIGNsaXBSdWxlPSJldmVub2RkIgogICAgZD0iTTQzLjUyNjggMjYuMjVINDYuNDczMkM0Ny42OTI0IDI2LjI1IDQ4LjY3NTggMjYuMjUgNDkuNDcy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 1 .75-.75h9.69l-2.72-2.72a.75.75 0 1 1 1.06-1.06l4 4a.75.75 0 0 1 0 1.06l-4 4a.75.75 0 0 1-1.06-1.06l2.72-2.72h-9.69a.75.75 0 0 1-.75-.75Z"}))};v.displayName="ArrowRightIcon";var O=function(e){return n.createElement("svg",Object.assign({viewBox:"0 0 20 20"},e),n.createElement("path",{fillRule:"evenodd",d:"M7.75 3.5a.75.75 0 0 0-1.5 0v.407a3.075 3.075 0 0 0-.702.252 3.75 3.75 0 0 0-1.64 1.639c-.226.444-.32.924-.365 1.47-.043.531-.043 1.187-.043 2v1.464c0 .813 0 1.469.043 2 .045.546.14 1.026.366 1.47a3.75 3.75 0 0 0 1.639 1.64c.444.226.924.32 1.47.365.531.043 1.187.043 2 .043h3.383c.323 0 .542 0 .735-.02a3.75 3.75 0 0 0 3.344-3.344c.02-.193.02-.412.02-.735v-2.883c0-.813 0-1.469-.043-2-.045-.546-.14-1.026-.366-1.47a3.75 3.75 0 0 0-1.639-1.64 3.076 3.076 0 0 0-.702-.251v-.407a.75.75 0 0 0-1.5 0v.259c-.373-.009-.794-.009-1.268-.009h-1.964c-.474 0-.895 0-1.268.009v-.259Zm-1.521 1.995c.197-.1.458-.17.912-.207.462-.037 1.057-.038 1.909-.038h1.9c.853 0 1.447 0 1.91.038.453.037.714.107.912.207.423.216.767.56.983.984.1.197.17.458.207.912.014.18.024.38.029.609h-9.982c.006-.228.015-.429.03-.61.036-.453.106-.714.206-.911a2.25 2.25 0 0 1 .984-.984Zm-1.229 4.005v1.2c0 .853 0 1.447.038 1.91.037.453.107.714.207.912.216.423.56.767.984.983.197.1.458.17.912.207.462.037 1.057.038 1.909.038h3.306c.385 0 .52-.001.626-.012a2.25 2.25 0 0 0 2.006-2.006c.011-.106.012-.241.012-.626v-2.606h-10Z"}))};O.displayName="CalendarIcon";var y=function(e){return n.createElement("svg",Object.assign({viewBox:"0 0 20 20"},e),n.createElement("path",{fillRule:"evenodd",d:"M15.78 5.97a.75.75 0 0 1 0 1.06l-6.5 6.5a.75.75 0 0 1-1.06 0l-3.25-3.25a.75.75 0 1 1 1.06-1.06l2.72 2.72 5.97-5.97a.75.75 0 0 1 1.06 0Z"}))};y.displayName="CheckIcon";var C=function(e){return n.createElement("svg",Object.assign({viewBox:"0 0 20 20"},e),n.createElement("path",{fillRule:"evenodd",d:"M5.72 8.47a.75.75 0 0 1 1.06 0l3.47 3.47 3.47-3.47a.75.75 0 1 1 1.06 1.06l-4 4a.75.75 0 0 1-1.06 0l-4-4a.75.75 0 0 1 0-1.06Z"}))};C.displayName="ChevronDownIcon";var R=function(e){return n.createElement("svg",Object.assign({viewBox:"0 0 20 20"},e),n.createElement("path",{fillRule:"evenodd",d:"M7.72 14.53a.75.75 0 0 1 0-1.06l3.47-3.47-3.47-3.47a.75.75 0 0 1 1.06-1.06l4 4a.75.75 0 0 1 0 1.06l-4 4a.75.75 0 0 1-1.06 0Z"}))};R.displayName="ChevronRightIcon";var k=function(e){return n.createElement("svg",Object.assign({viewBox:"0 0 20 20"},e),n.createElement("path",{fillRule:"evenodd",d:"M14.53 12.28a.75.75 0 0 1-1.06 0l-3.47-3.47-3.47 3.47a.75.75 0 0 1-1.06-1.06l4-4a.75.75 0 0 1 1.06 0l4 4a.75.75 0 0 1 0 1.06Z"}))};k.displayName="ChevronUpIcon";const b=/\.0+$/,P=e=>`${e}`.replace(b,""),w=(e,t=2)=>P(e.toFixed(t)),L=e=>{const[t,i,n]=e.split(".").map(e=>Number(e));return 1e6*(t??0)+1e3*(i??0)+(n??0)},z=e=>e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,","),Y=e=>e>0&&e<.005,U=(e,t,i=2)=>{const n=((e,t,i=2)=>{if("number"!=typeof e||!t)return;return 0===e?0:parseFloat(w(e/t*100,i))})(e,t,i);if("number"==typeof n)return Y(n)?"~0%":`${n}%`},B=(e,t=2)=>Y(e)?"~0%":`${w(e,t)}%`;function H(e){return"string"==typeof e?e:"object"==typeof e&&null!==e&&Object.keys(e).filter(t=>e[t]).join(" ")}function G(...e){return e.map(H).filter(Boolean).join(" ")}function Q(e,t,i="asc"){if(e===t)return 0;if(void 0===e||void 0===t)return void 0===e&&void 0!==t?"asc"===i?-1:1:void 0===t&&void 0!==e?"asc"===i?1:-1:0;const n=e=>"boolean"!=typeof e&&!isNaN(Date.parse(e)),a=e=>"string"==typeof e;let r=0;if(n(e)&&n(t)){r=(e instanceof Date?e:new Date(e))>(t instanceof Date?t:new Date(t))?1:-1}else r=(a(e)&&a(t),e>t?1:-1);return"asc"===i?-r:r}function _(e,t){return"string"==typeof t?t.replace(/\[(\d+)\]/g,".$1").split(".").reduce((e,t)=>e?.[t],e):e[t]}function F(e,t){return t.reduce((e,t)=>function(e,t){const{attr:i,order:n="asc",preferredValue:a,backupAttr:r,orderArrayAttr:s,orderArray:o}=t;return e.slice().sort((e,t)=>{const l=_(e,i),c=_(t,i);if(void 0!==a){if(l===a&&c!==a)return-1;if(c===a&&l!==a)return 1}if(s===i&&o){const e=o[n];return e.indexOf(l)-e.indexOf(c)}const d=Q(l,c,n);return 0!==d?d:r?Q(e[r],t[r],n):0})}(e,t),e.slice())}a.extend(o),a.extend(s),a.extend(r);let V="UTC";const W="YYYY-MM-DD HH:mm:ss";const J=e=>e?a(e).tz(V):a().tz(V),q=e=>e?a.tz(a(e).format(W),V):a.tz(a().format(W),V),X=e=>a(e?J(e).format(W):J().format(W)),K=e=>X(e).toDate();var Z;!function(e){e.DAY="DAY",e.HOUR="HOUR",e.MONTH="MONTH",e.QUARTER="QUARTER",e.WEEK="WEEK",e.YEAR="YEAR"}(Z||(Z={}));const $=60,ee=3600,te=(e,t,i)=>{if(!e)return"";const n=i?.isExpandDetail?{formatHouse:"MMM D, h:mm A",formatDay:"MMM D, YYYY",formatMonth:"MMM YYYY",formatYear:"MMM YYYY"}:{formatHouse:"h A",formatDay:"MMM D",formatMonth:"MMM YYYY",formatYear:"YYYY"};switch(t){case Z.HOUR:return J(e).format(n.formatHouse);case Z.DAY:case Z.WEEK:return J(e).format(n.formatDay);case Z.MONTH:return J(e).format(n.formatMonth);case Z.QUARTER:{const t=J(e);return`Q${t.quarter()} ${t.format("YYYY")}`}case Z.YEAR:return J(e).format(n.formatYear)}return J(e).format(n.formatMonth)},ie=({children:e,fullWidth:i=!1,cursor:n="pointer",onClick:a,onMouseEnter:r,onMouseLeave:s})=>t.jsx("div",{role:"button",tabIndex:0,className:G({"w-full":i,"cursor-pointer":"pointer"===n,"cursor-default":"default"===n,"cursor-not-allowed":"not-allowed"===n}),onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),a())},onClick:a,onMouseEnter:r,onMouseLeave:s,children:e}),ne=({onClick:e,active:a,content:r,textProps:s,boxProps:o,disabled:l,icon:c})=>{const d=n.useMemo(()=>l?{borderColor:"border-disabled",background:"bg-surface-disabled",...o}:{shadow:a?"button-inset":"button",background:a?"bg-fill-active":"bg-fill",...o},[a,l,o]),u=n.useMemo(()=>l?"text-[var(--p-color-text-disabled)]":a?"text-[var(--p-color-text-subdued)]":"text-[var(--p-color-text)]",[a,l]),m=n.useMemo(()=>t.jsx(i.Text,{as:"span",variant:"bodyMd",fontWeight:"medium",tone:l?"inherit":s?.tone,truncate:!0,...s?.variant&&{variant:s.variant},children:r}),[r,s,l]),h=n.useCallback(()=>{l||e()},[l,e]);return t.jsx(ie,{cursor:l?"default":"pointer",onClick:h,children:t.jsx("div",{className:G(u),children:t.jsxs(i.Box,{padding:"150",paddingInline:"300",paddingInlineEnd:"150",borderRadius:"200",...d,children:[c&&t.jsxs(i.InlineStack,{gap:"200",align:"center",wrap:!1,children:[t.jsx(i.Box,{children:t.jsx(i.Icon,{source:c})}),m]}),!c&&t.jsxs(i.InlineGrid,{columns:"1fr 20px",gap:"200",alignItems:"center",children:[m,t.jsx(i.Icon,{source:a?k:C})]})]})})})},ae=({height:e,align:a,inlineAlign:r,display:s,...o})=>{const l=n.useMemo(()=>{if("sticky"!==o.position)return{};const e={position:"sticky"};return o.insetInlineStart&&(e.insetInlineStart=4*Number(o.insetInlineStart)),o.insetInlineEnd&&(e.insetInlineEnd=4*Number(o.insetInlineEnd)),o.insetBlockStart&&(e.insetBlockStart=4*Number(o.insetBlockStart)),o.insetBlockEnd&&(e.insetBlockEnd=4*Number(o.insetBlockEnd)),e},[o.position,o.insetInlineStart,o.insetInlineEnd,o.insetBlockStart,o.insetBlockEnd]);return t.jsx("div",{className:"Polaris-GBlockCenter",style:{...l,"--gp-block-center-height":e,"--gp-block-center-display":s,"--gp-block-center-align":a,"--gp-block-center-inline-align":r,"--gp-block-center-overflow-x":o.overflowX,"--gp-block-center-overflow-y":o.overflowY},children:t.jsx(i.Box,{...o})})},re=({isEnabled:e=!0,content:n,maxWidth:a,...r})=>e&&!!n?t.jsx(i.Tooltip,{width:"wide",hoverDelay:500,content:n,...r,accessibilityLabel:a?.toString()}):r.children,se=({activatorWrapper:e,children:n,iconRight:a,inset:r,stopPropagation:s=!0,onClick:o,themeTone:l="light",variant:c,...d})=>{const u=e||"div",m="neutral"===c,h=m?void 0:c,A=t.jsx(re,{activatorWrapper:"tooltip-content",...d.tooltip,children:t.jsx(u,{className:G("Polaris-GButton",{"Polaris-GButton--icon-right":a,"Polaris-GButton--dark":"dark"===l,"Polaris-GButton--neutral":m,"cursor-default":d.disabled,"Polaris-GButton--fullWidth":d.fullWidth,flex:r}),onClick:e=>{s&&e.stopPropagation(),d.disabled||o?.()},children:t.jsx(i.Button,{variant:h,...d,children:n})})});return r?t.jsx(i.Box,{padding:"100",children:A}):A},oe=({...e})=>e.multiple?t.jsx(le,{...e}):t.jsx(ce,{...e}),le=({options:e,onChange:a,onChangeSingleValue:r,emptySelected:s,selected:o,onHover:l,itemHovered:c,dependentDisabledValues:d})=>{const[u,m]=n.useState([]),h=e=>{l&&l(e)};return n.useEffect(()=>{m(()=>o?e.filter(e=>o.includes(e.value)).map(e=>e.value):[])},[o]),t.jsx(i.BlockStack,{children:e.map(n=>{const o=d?.has(n.value),l=s&&1===e.filter(e=>e.selected).length&&s,A=()=>{l||(e=>{r&&r(e);const t=u.includes(e)?u.filter(t=>t!==e):[...u,e];m(t),a(t)})(n.value)};return t.jsx("div",{className:G("flex w-full items-center justify-between",{"cursor-not-allowed":l,"cursor-pointer":!l,"bg-surface-hover rounded-lg":c===n.value}),onClick:()=>{l||n.disabled||A()},onMouseEnter:()=>h(n.value),onMouseLeave:()=>h(void 0),children:l?t.jsx(re,{isEnabled:n.tooltip?.isEnabled,...n.tooltip,children:t.jsx(i.Box,{paddingBlock:"150",paddingInline:"200",width:"100%",children:t.jsxs(i.InlineStack,{blockAlign:"center",gap:"150",children:[t.jsx(i.Checkbox,{label:n.label,labelHidden:!0,checked:n.selected,disabled:!0}),t.jsx(i.Text,{as:"p",variant:"bodyMd",tone:"subdued",children:n.label})]})})}):t.jsx(i.Box,{paddingBlock:"150",paddingInline:"200",minWidth:"0",children:t.jsxs(i.InlineStack,{blockAlign:"center",gap:"150",wrap:!1,children:[t.jsx(i.Checkbox,{label:n.label,labelHidden:!0,checked:!o&&u.includes(n.value),onChange:A,disabled:n.disabled}),t.jsxs(i.Box,{minWidth:"0",children:[t.jsx(i.Text,{as:"p",variant:"bodyMd",truncate:!0,tone:o?"disabled":"inherit",children:n.label}),n.description&&t.jsx(i.Text,{as:"p",variant:"bodySm",tone:"disabled",truncate:!0,children:n.description})]})]})})},n.value)})})},ce=({options:e,onChange:n})=>t.jsx(i.BlockStack,{gap:"300",children:e.map(e=>t.jsx(i.RadioButton,{label:e.label,checked:e.selected,onChange:()=>n(e.value),helpText:e.helpText?t.jsx(De,{item:e}):void 0},e.value))}),de=n.forwardRef(({children:e,onClick:i,...a},r)=>{const s=n.useCallback(e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),i?.())},[i]);return t.jsx("div",{ref:r,...a,role:"button",tabIndex:0,onKeyDown:s,onClick:i,children:e})});de.displayName="GDiv";const ue=/\[(\d+)\](.*?)\[\]/g,me=e=>{const{children:a,transformers:r}=e;if(!r||0===Object.values(r).length)return t.jsx(i.Text,{...e,children:a});return t.jsx(i.Text,{...e,children:"string"==typeof a?(e=>{const i=[];let a=0;return e.replace(ue,(t,n,s,o)=>{i.push(e.slice(a,o));const l=r[n];return"function"==typeof l?i.push(l(s)):i.push(t),a=o+t.length,t}),i.push(e.slice(a)),i.map((e,i)=>t.jsx(n.Fragment,{children:e},i))})(a):a})};function he({options:e,selected:n,onChange:a}){const r=e=>{a([e])};return t.jsx(i.Box,{padding:"150",children:t.jsx(i.BlockStack,{gap:"100",children:e.map(e=>{const a=n.includes(e.value);return t.jsx("div",{role:"option","aria-selected":a,tabIndex:0,onClick:()=>r(e.value),onKeyDown:t=>{return i=t,n=e.value,void("Enter"!==i.key&&" "!==i.key||(i.preventDefault(),r(n)));var i,n},className:G("p-1.5 pl-4 rounded-lg cursor-pointer",{"bg-[#F1F1F1]":a,"hover:bg-[#F1F1F1]":!a}),children:t.jsxs(i.InlineStack,{align:"space-between",blockAlign:"center",wrap:!1,gap:"200",children:[t.jsx(i.Box,{minWidth:"0",children:e.label}),a&&t.jsx(i.Box,{children:t.jsx(i.Icon,{source:y})})]})},e.value)})})})}const Ae=e=>{const[a,r]=n.useState(!1),{activatorText:s,selected:o,options:l,emptyLabel:c,preferredAlignment:d="right",formatActivatorContent:u=e=>e.join(", ")}=e,m=n.useCallback(()=>r(e=>!e),[]),h=n.useMemo(()=>l.filter(e=>e.active||e.id===o).map(e=>e.content||"").filter(e=>!!e),[l,o]),A=n.useMemo(()=>{if(h.length){const e=u(h);return s?`${s}: ${e}`:e}return c?s?`${s}: ${c}`:c:s},[h,c,s,u]),g=n.useMemo(()=>{switch(e.variant){case"choice":return t.jsx(ge,{...e,setPopoverActive:m});case"action-list":return t.jsx(pe,{...e,setPopoverActive:m})}},[e,m]);return t.jsx(i.Popover,{active:a,activator:t.jsx("div",{className:"flex items-center gap-1",children:t.jsx(i.Button,{onClick:m,disclosure:a?"up":"down",children:A})}),autofocusTarget:"first-node",fluidContent:!0,onClose:m,preferredAlignment:d,children:g})},ge=({options:e,selected:a,onSelect:r,maxWidth:s,minWidth:o,clearable:c,setPopoverActive:d})=>{const{t:u}=l.useTranslation(),m=n.useMemo(()=>e?.length?e.map(e=>({value:e.id,label:e.content||"",selected:!1})):[],[e]),h=n.useCallback(e=>{r(e)},[r]);return t.jsx(i.Box,{maxWidth:s,minWidth:o,paddingBlock:"150",children:t.jsxs(i.BlockStack,{children:[t.jsx(i.BlockStack,{gap:"0",children:t.jsx(oe,{multiple:!0,options:m,selected:a,onChange:h})}),c&&t.jsx(i.Box,{paddingBlock:"150",paddingInline:"200",children:t.jsx(i.InlineStack,{blockAlign:"center",align:"start",children:t.jsx(i.Button,{disabled:!a?.length,onClick:()=>{h([]),d(!1)},variant:"plain",children:u("Clear")})})})]})})},pe=({options:e,selected:a,onSelect:r,helpText:s,maxWidth:o,minWidth:l,setPopoverActive:c})=>{const d=n.useCallback(e=>{r(e),c(!1)},[r,c]),u=n.useMemo(()=>e?.length?e.map(e=>({id:e.id,content:e.content,helpText:e.helpText,onAction:()=>d(e.id),active:e.active||e.id===a,suffix:(e.active||e.id===a)&&t.jsx(i.Icon,{source:y,tone:"success"})})):[],[e,a,d]);return t.jsx(i.Box,{maxWidth:o,minWidth:l,children:t.jsxs(i.BlockStack,{gap:"0",children:[t.jsx(i.ActionList,{actionRole:"menuitem",items:u}),s]})})},Me=({linkAction:e,isDisabled:n,disabledFocus:a,children:r})=>!e||n?t.jsx(t.Fragment,{children:r}):t.jsx("span",{className:G("GTextLink",{"GTextLink--disabled-focus":a}),children:t.jsx(i.Link,{...e,children:t.jsx(t.Fragment,{children:r})})}),Te=e=>{const n=e.height??"50px";return t.jsxs("div",{className:"Polaris-GSkeletonDisplayText",children:[t.jsx("style",{children:`.Polaris-GSkeletonDisplayText .Polaris-SkeletonDisplayText__DisplayText { height: ${n} !important; }`}),t.jsx(i.SkeletonDisplayText,{maxWidth:"100%",size:"extraLarge"})]})};const fe=({source:e,alt:i,size:n,grayscale:a,defaultSource:r=S,width:s="80",height:o="80",classRemoved:l=!1})=>{var c;const d=a&&"Polaris-GThumbnail--filter",u=G("Polaris-Thumbnail",n&&`${"Polaris-Thumbnail--size"}${(c=n).charAt(0).toUpperCase()}${c.slice(1)}`),m=t.jsx("img",{onError:e=>{e.currentTarget.src=r},alt:i??"Thumbnail",src:`${e??r}`,width:s,height:o,style:{"--gp-grayscale-percentage":a||"100%"},className:G("Polaris-GThumbnail",d)});return l?m:t.jsx("span",{className:u,children:m})},xe={default:"w-[210px]",wide:"w-[320px]",large:"w-[328px]"},Ie={start:"flex justify-start",center:"flex justify-center",end:"flex justify-end"},Ne=n.forwardRef((e,a)=>{const{tooltip:r,wrapper:s="div",activatorProps:o,isHideBorder:l,alignment:c,delay:d=500,textDecoration:u="none",popoverRef:m,preferredAlignment:h="left",showArrow:A=!1}=e,{width:g="default"}=r??{},[p,M]=n.useState(!1),T=s,f=xe[g],x=n.useRef(null),I=()=>{x.current&&(clearTimeout(x.current),x.current=null),M(!1)};return n.useImperativeHandle(a,()=>({onClose:I})),t.jsx(T,{className:G("GTooltipCard cursor-pointer",c&&Ie[c],{"GTooltipCard--text-underline":"underline"===u}),onMouseEnter:()=>{x.current=setTimeout(()=>{M(!0)},d)},onMouseLeave:I,children:t.jsx(i.Popover,{ref:m,activator:l?t.jsx(i.InlineStack,{children:e.children}):t.jsx(i.Box,{borderBlockEndWidth:"025",borderStyle:"dashed",borderColor:"border-tertiary",as:s,...o,children:e.children}),activatorWrapper:s,onClose:()=>{},active:p,preferredPosition:"below",preferredAlignment:h,children:r&&t.jsx("div",{className:G(f,{"GTooltipCard-arrow":A}),children:t.jsx(i.Box,{padding:"400",children:t.jsxs(i.BlockStack,{gap:"200",children:[t.jsxs(i.BlockStack,{gap:"100",children:[t.jsx(i.Text,{as:"span",variant:"headingSm",fontWeight:"semibold",children:r.title}),t.jsxs(i.BlockStack,{gap:"200",children:[t.jsx(i.Text,{as:"span",variant:"bodyMd",tone:"subdued",fontWeight:"medium",children:t.jsx("span",{dangerouslySetInnerHTML:{__html:r.content}})}),r.contentList&&t.jsx(i.List,{type:"bullet",children:r.contentList.map(e=>t.jsx(i.List.Item,{children:t.jsx(i.Text,{as:"span",variant:"bodyMd",tone:"subdued",fontWeight:"medium",children:e})},e))})]})]}),r.formula&&t.jsx("div",{className:"rounded-md font-mono",style:{fontSize:"12px"},children:r.formula})]})})})})})});Ne.displayName="GTooltipCard";const je=({activatorText:e,selected:a,options:r,minWidth:s,maxWidth:o,preferredAlignment:l="right",onSelect:c})=>{const[d,u]=n.useState(!1),[m,h]=n.useState(null),A=()=>u(e=>!e),g=n.useMemo(()=>r.find(e=>e.id===a),[r,a]),p=n.useMemo(()=>{if(g){const t=g.title??g.content;return e?`${e}: ${t}`:t}return e},[g,e]);return t.jsx(i.Popover,{active:d,activator:t.jsx(ne,{active:d,content:p,textProps:{variant:"bodySm"},onClick:A}),autofocusTarget:"first-node",fluidContent:!0,onClose:A,preferredAlignment:l,children:t.jsx(i.Box,{maxWidth:o,minWidth:s,padding:"200",children:t.jsx(i.BlockStack,{gap:"200",children:r.map(e=>{const n=e.id===a,r=m===e.id,s=n?"input-border":r?"border-hover":"transparent";return t.jsx(i.Box,{padding:"150",borderWidth:"025",borderColor:s,borderRadius:"100",children:t.jsx("div",{onClick:()=>{return t=e.id,c(t),void u(!1);var t},className:"cursor-pointer",onMouseEnter:()=>h(e.id),onMouseLeave:()=>h(null),children:t.jsxs(i.InlineStack,{gap:"300",align:"space-between",blockAlign:"center",wrap:!1,children:[t.jsxs(i.InlineStack,{gap:"300",blockAlign:"center",wrap:!1,children:[t.jsx("div",{className:"bg-surface-secondary flex items-center justify-center rounded-md min-w-[184px] h-[92px]",children:t.jsx("img",{src:e.icon,alt:e.content,className:"w-full h-full object-contain"})}),t.jsxs(i.BlockStack,{gap:"100",children:[t.jsx(i.Text,{as:"span",variant:"bodyMd",fontWeight:"semibold",children:e.content}),t.jsx(i.Text,{as:"p",variant:"bodyMd",tone:"subdued",children:e.helpText})]})]}),n&&t.jsx(i.Box,{children:t.jsx(i.Icon,{source:y})})]})})},e.id)})})})})},De=({item:e})=>t.jsxs(i.Text,{as:"p",variant:"bodyMd",children:[e.description,e.inlineAction&&t.jsx(i.Link,{monochrome:!0,onClick:()=>{e.inlineAction?.onAction?e.inlineAction?.onAction():window.open(e.inlineAction?.url,e.inlineAction?.target??"_blank")},children:e.inlineAction?.content})]}),Ee=()=>t.jsx(Te,{height:"188px"}),Se=c.create(e=>({currencyRates:null,setCurrencyRates:t=>e({currencyRates:t})})),ve=async()=>{const e=await fetch("https://cdn.shopify.com/s/javascripts/currencies.js");if(!e.ok)throw new Error("Failed to fetch currency rates");return(e=>{const t={},i=/var Currency=\{rates:\{(.*?)\}\};/s.exec(e),n=i?.[1];if(!n)return t;const a=/([A-Z]+):\s*([\d.e+-]+),/g;let r;for(;null!==(r=a.exec(n));){const[,e,i]=r;e&&i&&(t[e]=parseFloat(i))}return t})(await e.text())},Oe=()=>{const e=Se(e=>e.setCurrencyRates),{data:t}=d.useQuery({queryKey:["sdk-currency-rates"],queryFn:ve,staleTime:36e5});n.useEffect(()=>{t&&e(t)},[t,e])},ye=n.createContext({getTextPrice:e=>"string"==typeof e?e:`${e??0}`}),Ce=()=>n.useContext(ye),Re={comparison:j.comparison,single:j.current,all:[...j.all]},ke=({children:e,minHeight:i=228,seriesColors:n=Re})=>t.jsx(u.PolarisVizProvider,{themes:{Light:{chartContainer:{minHeight:i},grid:{horizontalOverflow:!0,verticalOverflow:!0,horizontalMargin:0},seriesColors:n}},children:e});var be,Pe,we,Le,ze,Ye,Ue,Be,He,Ge,Qe,_e,Fe,Ve;!function(e){e.DATE="DATE",e.ARRAY="ARRAY",e.OBJECT="OBJECT",e.STRING="STRING",e.INTEGER="INTEGER",e.CURRENCY="CURRENCY",e.PERCENT="PERCENT",e.DURATION="DURATION",e.MONTH="MONTH_TIMESTAMP",e.QUARTER="QUARTER_TIMESTAMP",e.DAY="DAY_TIMESTAMP",e.WEEK="WEEK_TIMESTAMP",e.YEAR="YEAR_TIMESTAMP",e.HOUR="HOUR_TIMESTAMP"}(be||(be={})),function(e){e.CAMPAIGNS="experiments",e.VISITOR_ITEMS="visitor_items",e.DEVICE_ITEMS="device_items",e.TRAFFIC_SOURCE_ITEMS="traffic_source_items"}(Pe||(Pe={})),function(e){e.SESSIONS="sessions",e.SALES="sales"}(we||(we={})),function(e){e.EQ="=",e.IN="IN",e.LIKE="LIKE"}(Le||(Le={})),function(e){e.OR="OR",e.AND="AND"}(ze||(ze={})),function(e){e.DEVICE="device",e.DEVICES="devices",e.VISITOR="visitor_type",e.VISITORS="visitor_types",e.TRAFFIC_SOURCE="traffic_source",e.TRAFFIC_SOURCES="traffic_sources",e.VERSION="version",e.VERSIONS="versions",e.SINGLE_PAGE="page_path",e.LIST_PAGE="page_paths",e.GROUP_CAMPAIGN_ITEM="group_campaign_item",e.GROUP_CAMPAIGN_ITEMS="group_campaign_items",e.SINGLE_CAMPAIGN="experiment_id",e.GROUP_CAMPAIGN="experiment_group_id",e.CAMPAIGN_VERSION_ID="version_id",e.GROUP_CAMPAIGN_VERSION_ID="group_version_id"}(Ye||(Ye={})),function(e){e.DEVICE_OPERATOR="deviceOperator",e.VISITOR_OPERATOR="visitorOperator",e.TRAFFIC_SOURCE_OPERATOR="trafficSourceOperator",e.VERSION_OPERATOR="versionOperator",e.PAGE_OPERATOR="pageOperator",e.CAMPAIGN_ITEM_OPERATOR="campaignItemOperator"}(Ue||(Ue={})),function(e){e.NONE="",e.TOTALS="TOTALS",e.ALL="WITH GROUP_TOTALS, TOTALS"}(Be||(Be={})),function(e){e.ASC="ASC",e.DESC="DESC"}(He||(He={})),function(e){e.PAGE_ITEMS="page_items",e.PAGE_PATHS="page_paths"}(Ge||(Ge={})),function(e){e.PAGE_PATH="page_path"}(Qe||(Qe={})),function(e){e.SHOPIFY_PAGE_ID="shopify_page_id",e.LOCATION_PATH="location_path",e.PAGE_TYPE="page_type",e.PAGE_TITLE="page_title",e.PAGE_PATH="page_path",e.TEMPLATE_SUFFIX="template_suffix"}(_e||(_e={})),function(e){e.DEFAULT="DEFAULT",e.COMPARISON="COMPARISON",e.TOTALS="TOTALS",e.COMPARISON_TOTALS="COMPARISON_TOTALS"}(Fe||(Fe={})),function(e){e.HOUR="hour",e.DAY="day",e.WEEK="week",e.MONTH="month",e.QUARTER="quarter",e.YEAR="year"}(Ve||(Ve={})),Fe.DEFAULT,Fe.COMPARISON,Fe.TOTALS,Fe.COMPARISON_TOTALS;const We=({value:e,formatter:t,getTextPrice:i,name:n})=>{if(null!==e&&("object"==typeof e||Array.isArray(e)))return e;switch(t){case be.INTEGER:return z((e??0).toString());case be.CURRENCY:return i?i(e,!1):`${e??0}`;case be.DATE:return(e=>{if(!e)return"None";const t=J(e),i=J(),n=J().subtract(1,"day"),a=t.format("YYYY-MM-DD")===i.format("YYYY-MM-DD"),r=t.format("YYYY-MM-DD")===n.format("YYYY-MM-DD");if(a)return`Today at ${t.format("HH:mm")}`;if(r)return`Yesterday at ${t.format("HH:mm")}`;const s=i.diff(t,"day");return s>=0&&s<7?`${t.format("dddd")} at ${t.format("HH:mm")}`:`${t.format("MMM D")} at ${t.format("hh:mm a")}`})(e);case be.PERCENT:return"number"!=typeof e?U(0,1,2)??"":U(e/100,1,2)??"";case be.DURATION:return(e=>{let t=e;Number.isFinite(e)&&null!=e||(t=0);const i=w(t);if(t>=ee)return`${Math.floor(t/ee)}h ${Math.floor(t%ee/$)}m ${Math.floor(t%$)}s`;if(t>=$)return`${Math.floor(t/$)}m ${Math.floor(t%$)}s`;return`${i}s`})(Number(e));case be.STRING:{const t=n===Pe.CAMPAIGNS?"":"None";return e??t}case be.DAY:return te(e,Z.DAY,{isExpandDetail:!0});case be.HOUR:return te(e,Z.HOUR,{isExpandDetail:!0});case be.MONTH:return te(e,Z.MONTH,{isExpandDetail:!0});case be.YEAR:return te(e,Z.YEAR);case be.WEEK:return te(e,Z.WEEK,{isExpandDetail:!0});case be.QUARTER:return te(e,Z.QUARTER,{isExpandDetail:!0});case be.OBJECT:case be.ARRAY:return e;default:return`${e}`}},Je=e=>{try{const t=(e=>{if(e)return"string"==typeof e?JSON.parse(e):e})(e);if(!Array.isArray(t))return;return t}catch{return}},qe=e=>Je(e)?.map(e=>({...e,total:Number(e.total)})),Xe=(e,t)=>{const i=e?.[t];return"number"==typeof i?i:0};var Ke;!function(e){e.NEXT="NEXT",e.PREV="PREV"}(Ke||(Ke={}));const Ze=({metricKey:e,columnTypes:t})=>{const{formatData:i}=(()=>{const{getTextPrice:e}=Ce(),t=({value:t,formatter:i,name:n})=>We({value:t,formatter:i,getTextPrice:e,name:n});return{formatData:t,computeMetric:({metric:e,previousMetric:i,metricKey:n,formatter:a})=>{if(!(e=>{const t=e?.sessions;return"number"==typeof t&&t>0})(e))return{value:0,change:"-"};const r=Xe(e,n),s=Xe(i,n),o=t({value:r,formatter:a,name:n});return 0===r&&0!==s?{value:o,change:-100}:0===s?{value:o,change:"-"}:{value:o,change:(r-s)/s*100}}}})(),n=e?t?.[e]:void 0,a=e=>String(i({value:e,formatter:n})),r={labelFormatter:e=>a(Number(e)||0)};return{formatValue:a,yAxisOptions:r}},$e=({lineChartData:e,isLoading:i,isEmptyMetricData:n,columnTypes:a,metricKey:r})=>{const{formatValue:s,yAxisOptions:o}=Ze({metricKey:r,columnTypes:a||{}});return r?i?t.jsx(Ee,{}):n?t.jsx(et,{title:"No data yet",description:"Data needs time to gather"}):t.jsx(ke,{children:t.jsx(u.LineChart,{data:e,yAxisOptions:o,theme:"Light",tooltipOptions:{titleFormatter:()=>`${h[r]?.title??""}`,keyFormatter:e=>e,renderTooltipContent:e=>t.jsx(at,{data:e,formatValue:s})},showLegend:!0})}):t.jsx(t.Fragment,{})};const et=({boxProps:e,minHeight:n,description:a,title:r})=>t.jsx(i.Box,{minWidth:"100%",...e,children:t.jsx(ae,{minHeight:n,children:t.jsx(i.Box,{padding:"400",children:t.jsxs(i.BlockStack,{gap:"400",align:"center",inlineAlign:"center",children:[t.jsx("div",{className:"h-[80px] w-[80px]",children:t.jsx(fe,{source:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKEAAACgCAYAAABkDQwTAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAABvtSURBVHgB7V3NjyRFdo+oqq7u6fmg5wOzMINA8oDkA2hXSICstTS+GWRp17CyLIF89on1P2DBybKslS0h37hYFsg37PUBfIQbYCFZIPkCQoM0MAzM0D3Tw/RMT1el3y8iXubLqMjPqu7Mro6fOjuzMiMys7J++b7iRYRW+4DNzc0NWv02SZJLtP45LRsq4rBji5YPptPp78+dO/evaoHQasEgAoJ8b6hIvGXGZa31n54+ffqyWgAWSkIi4OuOgBHLjy1HxP9Vc2JhJLx+/fqvB4PBf6iIowRIxF8QEbfUHBioBYEI+M8q4qjhcbIR/1bNiYWQkNTwJVo9riKOHEgS/lbNiYWQkN6GSyriqGKDhNDP1RxYlDp+XEUcWUwmk16QMCKiNSIJIzpHJGFE54gkjOgcI9URyLVXa2tranV11WxHdAtyLtTdu3fV7u6uOmh0RsKTJ0+q4XCoIvoB/BbHjx83AuHevXvqINGJOh6Px5GAPcWxY8cOXDN1QsLRqDMBHFEBEPCgf5/omETM4EhIwogIiUjCiM4RSRjROSIJIzpHJGFE54gkjOgckYQRnWNposbT6dS0fwIrKysq4vDg0JIQpLt165a6c+eO2t7eNp+Bc+fOqQcffNBsb21tqdu3b6sTJ06oU6dOoTOWiugfDh0JQbYbN26oH3/8MSVeEZigWK5du6YeeOABdfbs2Sgpe4ZDRUKQ6ttvv1X379+vVR6pSQwQdnNz00hGSMuNjThARF9waEgIyQdpVhewD0MpSSDw1atXzZrVdkS3OBQkvH79uvrhhx8a1anKicM5gUjE7tF7Sx3ORVMCAlIVFwFEhISN6Ba9loRQmXVUMLxe2HjoKoAuAwCSZuGAVNmPOP/6+npaL+Lg0WsSQgKWecAg2SOPPGJI5AOeMBb2jMvIiOOP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6GST5hNRWCuc8kCc/RRvts0ojagCRhabiI4eB4GBAs2JbDgGBB+OXJJ580Knse8vG9QwrSPe+dPHnqW+vruukTaeOfaPlLW9SqXHZMpJPiCJmItkyWhGdoadZ6HdEasA0xpgs8ZhDxMICHNLZS8Pjm6urKHSfkePyZaRrvY5Vr1bHOnUSO1SIlYkzlOliAeByucXMKq76DZxQgE2JnbW2M0d2HfCxtO5Y7HbTiEUFmpKHmA0zMSMIDBJ450qZgH/Jg6X0eoxAvjBvCZEov0A7CgfI4Z9FwJ3bECoeQkK4H3lB0cB+5yuk+LtPnGZ2WFZB+GFwIkLM29Q1yRNmTJ0/edi8Lt7yZ1rlUEjrimcL5tktdGRwFCaNGPnjAUcBvwxPo9G3caklAktx3HQFHkivYTltMeFs200kUdLbhMWlURDeAWoZtiKVPRJQEpHu6T1J7ymrYF2wzI7Vm7cXmU3pSYfsl/gW17tcsn0cNJ06cMGEb/PDwQKGmu3JW3ISL6WiyRMAJSexp1iycIuXSDAnN0ZRwiWsV0UnJRbWDiugGePYgIiQhz+zEAe2DlIq4Jq7NUo7Il4zHZtB05lnawOEEl9kOkZDZlAhmyXiNHDwvkq9HgCrG78EzfIIUcgqH/YIv/UB8ckJE1GW2lU0J7pTdXYhdUef2HFDFkIAI33ALBWyz/SAjyMezybM5Ri9CQkuRcNLeOqeO+UAiDvr2X9HQp3Id0QOwJAL5IBURvmEywkOdR01zdjdL2rSfCBEcTtLQzqZdF6asJKEkUohgIaJFAvYYkH5YJBlBHiwc4E5HwtKzQ+Zx7BFrJhwP3s4A+WD70bpNNrIpI0fv9w+GTujbhqG6ET0Dk5HVM9ZMyDYA8SBN3WyePtlCvChNmR8VHCgiVhnhokTsOUAe2VeF256LpByrbJaYIB5neAv4DmvImS1Nmf9/PWJzbd+1lKUAAAAASUVORK5CYII=",width:"80px",height:"80px",alt:r,classRemoved:!0})}),t.jsxs(i.BlockStack,{gap:"200",align:"center",inlineAlign:"center",children:[t.jsx(i.Text,{as:"h4",variant:"headingSm",fontWeight:"semibold",children:r}),t.jsx(i.Text,{as:"h4",variant:"bodyMd",tone:"subdued",children:a})]})]})})})}),tt=()=>t.jsxs("svg",{width:"8",height:"8",viewBox:"0 0 8 8",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t.jsx("g",{clipPath:"url(#clip0_18114_1160)",children:t.jsx("path",{d:"M1 1L6.5 6.5M6.5 6.5V1.5M6.5 6.5H1.5",stroke:"#8A8A8A",strokeWidth:"1.5"})}),t.jsx("defs",{children:t.jsx("clipPath",{id:"clip0_18114_1160",children:t.jsx("rect",{width:"8",height:"8",fill:"white"})})})]}),it=()=>t.jsxs("svg",{width:"8",height:"8",viewBox:"0 0 8 8",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t.jsx("g",{clipPath:"url(#clip0_18114_1146)",children:t.jsx("path",{d:"M1 7L6.5 1.5M6.5 1.5H1.5M6.5 1.5V6.5",stroke:"#29845A",strokeWidth:"1.5"})}),t.jsx("defs",{children:t.jsx("clipPath",{id:"clip0_18114_1146",children:t.jsx("rect",{width:"8",height:"8",fill:"white",transform:"matrix(0 -1 1 0 0 8)"})})})]}),nt=({change:e})=>"number"!=typeof e?t.jsx("div",{style:{height:"2px",width:"11px",backgroundColor:"#8A8A8A"}}):t.jsxs("div",{style:{display:"flex",maxHeight:"20px",width:"fit-content",alignItems:"center",gap:"4px",borderRadius:"8px",fontSize:"12px",color:e>0?D.POSITIVE:D.NEUTRAL},children:[e<0&&t.jsx(i.InlineStack,{align:"center",children:t.jsx(tt,{})}),e>0&&t.jsx(i.InlineStack,{align:"center",children:t.jsx(it,{})}),t.jsx(i.Text,{as:"span",variant:"bodyXs",fontWeight:"semibold",children:B(Math.abs(e||0))})]}),at=({data:e,formatValue:n})=>{const{activeIndex:a}=e,r=e?.dataSeries[0]?.data[a],s=e?.dataSeries[1]?.data[a],o=()=>{const e=r.trend?.value;if(!e)return"-";const t=Number(e.replace(/[%~]/g,""));return"negative"===r.trend?.trend?-1*t:t};return t.jsx("div",{className:"w-fit min-w-[175px]",children:t.jsx(i.Card,{padding:"200",children:t.jsxs(i.BlockStack,{gap:"100",children:[t.jsx(i.Text,{as:"p",variant:"bodySm",fontWeight:"semibold",children:e.formatters?.titleFormatter?.(e.title||"")||e.title}),t.jsxs(i.BlockStack,{gap:"100",children:[t.jsxs(i.InlineStack,{gap:"400",align:"space-between",blockAlign:"center",children:[t.jsxs(i.InlineStack,{gap:"100",blockAlign:"center",children:[t.jsx("div",{className:"h-[2px] w-[12px] rounded-[10px] bg-[#4FA9EA]"}),t.jsx(i.Text,{as:"p",variant:"bodySm",fontWeight:"medium",tone:"subdued",children:r.tooltipKey})]}),t.jsxs(i.InlineStack,{blockAlign:"center",gap:"100",children:[t.jsx(i.Text,{as:"span",variant:"bodySm",fontWeight:"semibold",children:n(r.value)}),t.jsx(nt,{change:o()})]})]}),t.jsxs(i.InlineStack,{gap:"400",align:"space-between",blockAlign:"center",children:[t.jsxs(i.InlineStack,{gap:"100",blockAlign:"center",children:[t.jsx("div",{className:"w-[12px] border border-dashed border-[#A1CAE7]"}),t.jsx(i.Text,{as:"p",variant:"bodySm",tone:"subdued",fontWeight:"medium",children:s.tooltipKey})]}),t.jsxs(i.InlineStack,{blockAlign:"center",gap:"100",children:[t.jsx(i.Text,{as:"span",variant:"bodySm",fontWeight:"semibold",children:n(s.value)}),t.jsx("div",{className:"opacity-0",children:t.jsx(nt,{change:o()})})]})]})]})]})})})},rt=({isShowOneLine:e})=>e?t.jsx(i.Box,{width:"40%",children:t.jsx(i.SkeletonBodyText,{lines:1})}):t.jsxs(i.BlockStack,{gap:"200",children:[t.jsx(i.Box,{width:"60%",children:t.jsx(i.SkeletonBodyText,{lines:1})}),t.jsx(i.Box,{width:"40%",children:t.jsx(i.SkeletonBodyText,{lines:1})})]}),st=()=>t.jsx(i.Card,{children:t.jsxs(i.BlockStack,{gap:"400",children:[t.jsx(rt,{isShowOneLine:!0}),t.jsx(Ee,{})]})}),ot=({totalValue:e,hideComparison:n})=>t.jsx(i.BlockStack,{gap:"200",children:t.jsxs(i.InlineStack,{blockAlign:"center",gap:"200",wrap:!1,children:[t.jsx(i.InlineStack,{blockAlign:"center",gap:"200",children:t.jsx(i.Text,{as:"span",variant:"headingSm",children:e.value})}),!n&&t.jsx(nt,{change:e.change})]})}),lt=({item:e,isHovered:n,isLoading:a,hideComparison:r,titleVariant:s="headingMd",titleFontWeight:o,onClickTitle:l})=>{const{key:c,title:d,totalValue:u}=e,m=h[c];return a?t.jsx(rt,{}):t.jsxs(i.BlockStack,{gap:"200",children:[t.jsx("div",{className:"hover:cursor-pointer hover:text-[--p-color-text-link-hover]",onClick:e=>{e?.stopPropagation(),l?.(c)},children:t.jsxs(i.InlineStack,{wrap:!1,children:[t.jsx(i.Box,{maxWidth:"100%",overflowX:"hidden",children:t.jsx(Ne,{tooltip:m,children:t.jsx(i.Text,{as:"span",variant:s,fontWeight:o,truncate:!0,children:d})})}),n&&t.jsx("div",{className:"flex h-[20px] w-[20px] items-center",children:t.jsx(i.Icon,{source:R,tone:"inherit"})})]})}),t.jsx(ot,{totalValue:u,hideComparison:r})]})},ct=({item:e,isActive:a,isLoading:r,hideComparison:s,onSelect:o,onClickTitle:l})=>{const[c,d]=n.useState(!1),u=a||c;return t.jsx("div",{className:"w-full cursor-pointer overflow-hidden",onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1),onClick:()=>o(e.key),children:t.jsx(i.Box,{paddingBlock:"150",paddingInline:"300",borderRadius:"200",background:u?"bg-surface-active":void 0,children:t.jsx(lt,{item:e,isHovered:c,isLoading:r,hideComparison:s,titleVariant:"headingSm",titleFontWeight:"semibold",onClickTitle:l})})})};ze.OR,Ue.DEVICE_OPERATOR,Ye.DEVICE,Ye.DEVICES,Ye.DEVICE,Ue.VISITOR_OPERATOR,Ye.VISITOR,Ye.VISITORS,Ye.VISITOR,Ue.TRAFFIC_SOURCE_OPERATOR,Ye.TRAFFIC_SOURCE,Ye.TRAFFIC_SOURCES,Ye.TRAFFIC_SOURCE,Ue.VERSION_OPERATOR,Ye.VERSION,Ye.VERSIONS,Ye.VERSION,Ue.PAGE_OPERATOR,Ye.SINGLE_PAGE,Ye.LIST_PAGE,Ye.SINGLE_PAGE,Ue.CAMPAIGN_ITEM_OPERATOR,Ye.GROUP_CAMPAIGN_ITEM,Ye.GROUP_CAMPAIGN_ITEMS,Ye.GROUP_CAMPAIGN,Ye.SINGLE_CAMPAIGN,Ye.SINGLE_CAMPAIGN,Ye.GROUP_CAMPAIGN;const dt=(e,t)=>{if(0===e&&0===t)return;if(0===t)return e>0?"100%":"0%";const i=(e-t)/t*100;return`${Math.abs(i).toFixed(0)}%`},ut=(e,t)=>{const i=e?.find(e=>e?.type?.toLowerCase()===t.toLowerCase());return i?.total??0},mt=({targets:e,metricKey:t,totalsRow:i,comparisonTotalsRow:n,sort:a})=>{const r=qe(i?.[t]),s=qe(n?.[t]),o=!!n?.[t],l=e.map(({value:e,label:t})=>(({name:e,currentValue:t,prevValue:i,hasPreviousData:n})=>({name:e,data:[{key:"value",value:t}],metadata:{trend:{value:n?dt(t,i):void 0,direction:t>=i?"upward":"downward",trend:t>=i?"positive":"negative"}}}))({name:t,currentValue:ut(r,e),prevValue:ut(s,e),hasPreviousData:o})),c=e=>e.data[0]?.value??0;return a?[...l].sort((e,t)=>c(t)-c(e)):l};const ht=[{id:A.ALL_SESSION,content:"All sessions",helpText:"Count metrics for all sessions where this page shows up anywhere in the journey: before, during, or after other pages.",icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAXAAAAC4CAMAAADNC0dgAAAAw1BMVEUAAAD39/f39/f39/f39/f39/f39/f39/f8/Pz39/fb5P////+WrPjj4+MaHB319vfe5v/s7/rp7Ovy8vLx8/nn5+fu7u7n7PzKzdDi6f1wcXL7+/vEzOTGxscphFrd5Pni4+o2OTtTnHpjZnCcsfjQ2fby9/VEk2/f5PFSVFaktvd4spewwPd6gI9mboa6yPWGmt2pqqsuMTbW3OCSwavDz/iwvcJKVHO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5CYII="},{id:A.FIRST_SESSION,content:"Entry session only",helpText:"Count metrics for sessions only where this page was the very first page visited, then track how they moved through the funnel.",icon:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAXAAAAC4CAMAAADNC0dgAAAAulBMVEUAAAD39/f39/f39/f39/f39/f8/Pz39/fb5P+WrPj///8aHB3j4+P09vfKzdDo6Ojy8vLl5ebd5f7h6P7n7Pzr6+vu7u5wcXLx8/nt8PsxNDn7+/vGxscphFrEzOS8yfakt/je5Pecsfjh4+zQ2fZjZnDr7vdSVFaHm95UnXt4sZd6f41Ek2/H0visvfTk7+vZ3OSOkJZXY4ipqqvX6OBIUm+u0cGRwKqpqqo3i2Vvc4CwtcGFkba82cvy+RBRAAAAB3RSTlMAduu/IJ8QQSls1wAACLJJREFUeNrs1kEKwEAIBEHdNfH/P84lhJzmtsJA1xMaUeN1516NQ9bOir/ajcOuX/JkuAes/Ho3RiS9tTPFi30yZlVEXI0xO6Iag242+KwMPvBROziZo1Y0RhFcI7g7gmsEd0dwjeDuCK4R3B3BNYK7I7hGcHcE1wjujuAawd0RXCO4O4JrBHdHcI3g7giuEdwdwTWCuyO4RnB3BNcI7u5h1+x2nIaBMHo5ThkrcVpbLVGbJlsVFthQEFqEBO//WnizTUddb6bEPyJInKv26kvPTMZu4v/Cef4L/9dJK1wanVtMAYmRRSHBZYY5KYUbhRfydM4Lrc4ZWgIx05x0wg0iKlP0baERMU9jw6BF5VrnV3WdbU4q4TJH1LAYqJ6+G4hOoWxMUT1ngLEhfffNOCeRcKkw73WTcoOoITKmrypRFYhKAsw4J7Zw8l0tXgAqmnHyULwIqXJUBcB8c9IIt2oXLqBCpgrvgTB97802J4lw3fe3CyBG7L6i9+Bi0wFgrjkphEvE3reLielCDR7cu90AzDUnhfB8uEKHSsVrcYP5SAogSoCZ5iQQLlFVixGKeC2uEMZSNBqAmeYkEG7QOJf2+Ovc4tGar6DGcwBEAJhnTgLhudsS37f3sZtPu3Pr86chpZ9c88xJIByxcnz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nfhNcJ34TXCd+E1wnfhNcJ34Rfe/VyAjEQA0G09LF12vzTXTA2vs3NDQP9QihEa3cOvubgu3PwNQffnYOvOfjuHFyMHBNKakyoiDGh4BwTarwpSgfQfpsy2YBXXCfAxYWCW3hVBDLg0cfYx6qBV0f5zL/yy4oTLn9JSvy4U7oaTQAAAABJRU5ErkJggg=="}];var At;function gt(){return{[e.MainDateTimePickerAlias.TODAY]:{title:"Today",alias:e.MainDateTimePickerAlias.TODAY,getDateRange:Ht},[e.MainDateTimePickerAlias.YESTERDAY]:{title:"Yesterday",alias:e.MainDateTimePickerAlias.YESTERDAY,getDateRange:Gt},[e.MainDateTimePickerAlias.LAST_7_DAYS]:{title:"Last 7 days",alias:e.MainDateTimePickerAlias.LAST_7_DAYS,getDateRange:Qt},[e.MainDateTimePickerAlias.LAST_30_DAYS]:{title:"Last 30 days",alias:e.MainDateTimePickerAlias.LAST_30_DAYS,getDateRange:_t},[e.MainDateTimePickerAlias.LAST_90_DAYS]:{title:"Last 90 days",alias:e.MainDateTimePickerAlias.LAST_90_DAYS,getDateRange:Ft},[e.MainDateTimePickerAlias.LAST_365_DAYS]:{title:"Last 365 days",alias:e.MainDateTimePickerAlias.LAST_365_DAYS,getDateRange:Vt},[e.MainDateTimePickerAlias.LAST_MONTH]:{title:"Last month",alias:e.MainDateTimePickerAlias.LAST_MONTH,getDateRange:Wt},[e.MainDateTimePickerAlias.LAST_12_MONTHS]:{title:"Last 12 months",alias:e.MainDateTimePickerAlias.LAST_12_MONTHS,getDateRange:Jt},[e.MainDateTimePickerAlias.LAST_YEAR]:{title:"Last year",alias:e.MainDateTimePickerAlias.LAST_YEAR,getDateRange:qt}}}function pt(e){return gt()[e]}e.MainDateTimePickerAlias=void 0,(At=e.MainDateTimePickerAlias||(e.MainDateTimePickerAlias={})).TODAY="today",At.YESTERDAY="yesterday",At.LAST_7_DAYS="last7days",At.LAST_30_DAYS="last30days",At.LAST_90_DAYS="last90days",At.LAST_365_DAYS="last365days",At.LAST_MONTH="lastMonth",At.LAST_12_MONTHS="last12Months",At.LAST_YEAR="lastYear";const Mt={YMD:"YYYY-MM-DD",MONTH_YEAR:"MMM YYYY",FULL:"MMMM D, YYYY",FULL_WITH_TIME:"MMMM D, YYYY [at] h:mm A",SHORT:"MMM DD, YYYY",SHORT_NO_PAD:"MMM D, YYYY",SHORT_WITH_TIME:"MMM D, YYYY [at] h:mm A",MONTH_DAY:"MMM D",DAY_YEAR:"D, YYYY",TIME:"h:mm A",MONTH_DAY_WITH_TIME:"MMM D [at] h:mm A",YEAR:"YYYY"};const Tt=/^\d{4}-\d{1,2}-\d{1,2}/;function ft(e){return!isNaN(new Date(e).getDate())}function xt(e){return Tt.test(e)&&ft(e)}function It(e){return 10===e.length&&xt(e)}function Nt(e,t){const i=q(e);return"YMD"===t?i.format(Mt.YMD):"MY"===t?i.format(Mt.MONTH_YEAR):"FULL"===t?i.format(Mt.FULL):"FULL_WITH_TIME"===t?i.format(Mt.FULL_WITH_TIME):i.format(Mt.SHORT)}function jt(e,t){const i=q(e),n=q(t);return i.isSame(n,"day")}function Dt(e){const{since:t,until:i,format:n=Mt.TIME,showNow:a=!1}=e,r=q(t),s=q(i);return`${r.format(n)} - ${a?"Now":s.format(n)}`}function Et(e){const{since:t,until:i,isShowNow:n}=e,a=q(t),r=q(i),s=a.isSame(J(),"day"),o=a.format(Mt.TIME),l=r.format(Mt.TIME);if(s){return`Today at ${o} - ${n?"Now":l}`}if(n)return`${a.format(Mt.SHORT_WITH_TIME)} - Now`;if(a.isSame(r,"day"))return`${a.format(Mt.SHORT_WITH_TIME)} - ${l}`;if(a.isSame(r,"day")){const e=Dt({since:t,until:i});return`${a.format(Mt.SHORT)} (${e})`}return a.isSame(r,"year")?`${a.format(Mt.MONTH_DAY_WITH_TIME)} - ${r.format(Mt.MONTH_DAY_WITH_TIME)}, ${r.format(Mt.YEAR)}`:`${a.format(Mt.SHORT_WITH_TIME)} - ${r.format(Mt.SHORT_WITH_TIME)}`}const St=(e,t=!1,i)=>t&&Ot(e)?e.endOf("day").format(i):e.format(i),vt=(e,t)=>St(e?J(e).endOf("day"):J().endOf("day"),!1,t),Ot=e=>0===e.hour()&&0===e.minute();function yt(e,t){const i=q(e),n=q(t);return i.isSame(n,"day")?i.format(Mt.SHORT):i.isSame(n,"month")&&i.isSame(n,"year")?`${i.format(Mt.MONTH_DAY)} - ${n.format(Mt.DAY_YEAR)}`:i.isSame(n,"year")?`${i.format(Mt.MONTH_DAY)} - ${n.format(Mt.SHORT_NO_PAD)}`:`${i.format(Mt.SHORT_NO_PAD)} - ${n.format(Mt.SHORT_NO_PAD)}`}function Ct(t){const{since:i,until:n,isShowNow:a}=t,r=q(i);return r.isSame(J(),"day")?pt(e.MainDateTimePickerAlias.TODAY).title:a?`${r.format(Mt.SHORT_NO_PAD)} - Now`:yt(i,n)}const Rt=({since:e,until:t,isShowNow:i})=>{if(jt(e,t))return Dt({since:e,until:t,showNow:i})},kt=e=>[...e].sort((e,t)=>L(t.version)-L(e.version)).map(e=>{if(!e.startedAt)return!1;const t=!e.completedAt,i=X(e.startedAt).valueOf(),n=t?X(vt()).valueOf():X(e.completedAt).valueOf(),a=Ct({since:i,until:n,isShowNow:t}),r=Rt({since:i,until:n,isShowNow:t});return{title:a,alias:`${e.version}`,since:i,until:n,isVersion:!0,isCurrentVersion:t,description:r,versionId:e.id}}).filter(Boolean),bt=()=>({since:0,until:0}),Pt=t=>{const{since:i,until:n,alias:r}=t,s=a(i),o=a(n);if(r===e.MainDateTimePickerAlias.LAST_MONTH)return Wt(s);if(r===e.MainDateTimePickerAlias.LAST_12_MONTHS)return Jt(s);if(r===e.MainDateTimePickerAlias.LAST_YEAR)return qt(s);const l=o.diff(s,"day")+1,c=s.subtract(l,"day"),d=o.subtract(l,"day");return{since:c.valueOf(),until:d.valueOf()}},wt=(e,t)=>i=>{const{since:n,until:r}=i,s=a(n),o=a(r).diff(s,"day"),l=s.subtract(e,t),c=l.add(o,"day");return{since:l.valueOf(),until:c.valueOf()}},Lt=wt(7,"day"),zt=wt(3,"month"),Yt=wt(1,"month"),Ut=wt(1,"year"),Bt=e=>t=>({since:t.subtract(e,"day").valueOf(),until:t.valueOf()}),Ht=e=>({since:e.valueOf(),until:e.valueOf()}),Gt=e=>({since:e.subtract(1,"day").valueOf(),until:e.subtract(1,"day").valueOf()}),Qt=Bt(6),_t=Bt(29),Ft=Bt(89),Vt=Bt(364);function Wt(e){return{since:e.subtract(1,"month").startOf("month").valueOf(),until:e.subtract(1,"month").endOf("month").valueOf()}}function Jt(e){return{since:e.subtract(12,"month").startOf("month").valueOf(),until:e.subtract(1,"month").endOf("month").valueOf()}}function qt(e){return{since:e.subtract(1,"year").startOf("year").valueOf(),until:e.subtract(1,"year").endOf("year").valueOf()}}const Xt=(e,t,i)=>{const n=a(i),r=n.month();if(n.year()!==t||r!==e){const e=n.subtract(1,"month");return{month:e.month(),year:e.year()}}return{month:e,year:t}};var Kt;e.CompareDateTimePickerAlias=void 0,(Kt=e.CompareDateTimePickerAlias||(e.CompareDateTimePickerAlias={})).NO_COMPARISON="noComparison",Kt.PREVIOUS_PERIOD="previousPeriod",Kt.PREVIOUS_WEEK="previousWeek",Kt.PREVIOUS_MONTH="previousMonth",Kt.PREVIOUS_QUARTER="previousQuarter",Kt.PREVIOUS_YEAR="previousYear";const Zt={title:"Previous period",alias:e.CompareDateTimePickerAlias.PREVIOUS_PERIOD,since:0,until:0},$t=[{title:"No comparison",alias:e.CompareDateTimePickerAlias.NO_COMPARISON,since:0,until:0},Zt,{title:"Previous week",alias:e.CompareDateTimePickerAlias.PREVIOUS_WEEK,since:0,until:0},{title:"Previous quarter",alias:e.CompareDateTimePickerAlias.PREVIOUS_QUARTER,since:0,until:0},{title:"Previous month",alias:e.CompareDateTimePickerAlias.PREVIOUS_MONTH,since:0,until:0},{title:"Previous year",alias:e.CompareDateTimePickerAlias.PREVIOUS_YEAR,since:0,until:0}],ei={[e.CompareDateTimePickerAlias.NO_COMPARISON]:bt,[e.CompareDateTimePickerAlias.PREVIOUS_PERIOD]:Pt,[e.CompareDateTimePickerAlias.PREVIOUS_WEEK]:Lt,[e.CompareDateTimePickerAlias.PREVIOUS_QUARTER]:zt,[e.CompareDateTimePickerAlias.PREVIOUS_MONTH]:Yt,[e.CompareDateTimePickerAlias.PREVIOUS_YEAR]:Ut},ti=()=>{const t=X().startOf("day"),i=gt(),n=i[e.MainDateTimePickerAlias.TODAY],a={...n,...n.getDateRange(t)},r=i[e.MainDateTimePickerAlias.YESTERDAY],s={...r,...r.getDateRange(t)},o=i[e.MainDateTimePickerAlias.LAST_7_DAYS],l={...o,...o.getDateRange(t)},c=i[e.MainDateTimePickerAlias.LAST_30_DAYS],d={...c,...c.getDateRange(t)},u=i[e.MainDateTimePickerAlias.LAST_90_DAYS],m={...u,...u.getDateRange(t)},h=i[e.MainDateTimePickerAlias.LAST_365_DAYS],A={...h,...h.getDateRange(t)},g=i[e.MainDateTimePickerAlias.LAST_MONTH],p={...g,...g.getDateRange(t)},M=i[e.MainDateTimePickerAlias.LAST_12_MONTHS],T={...M,...M.getDateRange(t)},f=i[e.MainDateTimePickerAlias.LAST_YEAR];return{DATE_TIME_FILTERS:[a,s,l,d,m,A,p,T,{...f,...f.getDateRange(t)}],LAST_7_DAYS_DATE_RANGE:l,LAST_30_DAYS_DATE_RANGE:d}},ii=n.createContext({dateTimePicked:{since:J().valueOf(),until:J().valueOf(),title:"Today",alias:"today"},compareDateTimePicked:Zt,setDateTimePicked:()=>{},setCompareDateTimePicked:()=>{},resetDateVersion:()=>{}}),ni=()=>{const e=n.useContext(ii);if(!e)throw new Error("useDateTimePickerContext must be used within a DateTimePickerProvider");return e},ai=({ranges:e,initialPicked:t,onApply:i})=>{const{DATE_TIME_FILTERS:r}=ti(),s=e||r,{dateTimePicked:o,setDateTimePicked:l}=ni(),[c,d]=n.useState(o),[{month:u,year:m},h]=n.useState({month:a(o.since).month(),year:a(o.since).year()});n.useEffect(()=>{if(o){const e=new Date(o.until);((e,t)=>t.month-e.month+12*(e.year-t.year))({year:m,month:u},{year:e.getFullYear(),month:e.getMonth()})}},[o,u,m]);return n.useEffect(()=>{o&&(d(o),h({month:a(o.since).month(),year:a(o.since).year()}))},[o]),{month:u,year:m,setDate:h,dateRange:c,apply:()=>{l(c),i?.(c)},cancel:()=>{d(o)},dateTimePicked:o,onChange:({end:e})=>{h(Xt(u,m,e))},onMonthChange:(e,t)=>{h({month:e,year:t})},onCalendarChange:e=>{const{start:i,end:n,alias:a}=e,r={alias:"custom",title:"Custom",since:i.getTime(),until:n.getTime()},o=s.find(e=>{const t=e.alias===a,r=e.until===n.getTime(),s=e.since===i.getTime();return t||s&&r});d(o||t||r)}}};function ri({onBlur:e,dateRange:a,setDateTimePicked:r}){const[s,o]=n.useState(!1),[l,c]=n.useState({}),d=n.useCallback((e,t=!1)=>!a.isVersion||t&&a.isCurrentVersion?Nt(e,"FULL"):Nt(e,"FULL_WITH_TIME"),[a.isVersion,a.isCurrentVersion]);function u(){o(!1),c({since:d(a.since),until:d(a.until,!0)}),e&&e()}return n.useEffect(()=>{s||c({since:d(a.since),until:d(a.until,!0)})},[a,d]),t.jsxs(i.InlineGrid,{gap:"200",columns:"1fr auto 1fr",children:[t.jsx(i.TextField,{role:"combobox",label:"Since",labelHidden:!0,value:a.since?l.since:"MMMM D, YYYY",onChange:function(e){if(c(t=>({...t,since:e})),It(e)){const t=q(e).startOf("day"),i=q(a.until).endOf("day"),n=t.isAfter(i)?t.endOf("day"):i;r({start:X(t).toDate(),end:X(n).toDate()})}},onBlur:()=>u(),onFocus:()=>(o(!0),void c({...l,since:Nt(a.since,"YMD")})),autoComplete:"off"}),t.jsx(i.InlineStack,{children:t.jsx(i.Icon,{source:v,tone:"subdued"})}),t.jsx(i.TextField,{role:"combobox",label:"Until",labelHidden:!0,value:a.until?l.until:"MMMM D, YYYY",onChange:function(e){if(c(t=>({...t,until:e})),It(e)){const t=J().endOf("day"),i=q(e).endOf("day"),n=i.isAfter(t)?t:i,s=q(a.since).startOf("day"),o=n.isBefore(s)?n.startOf("day"):s;r({start:X(o).toDate(),end:X(n).toDate()})}},onBlur:()=>u(),onFocus:()=>(o(!0),void c({...l,until:Nt(a.until,"YMD")})),autoComplete:"off"})]})}function si(e){const{setDateTimePicked:a,dateTimePicked:r,rangeAddition:s,allRanges:o}=e,{value:l,toggle:c}=function(e){const[t,i]=n.useState(e);return{value:t,toggle:n.useCallback(()=>i(e=>!e),[]),setTrue:n.useCallback(()=>i(!0),[]),setFalse:n.useCallback(()=>i(!1),[])}}(!0),d=s?.rangers||[],u=d.map(e=>{const n=r.alias===e.alias;return{value:e.alias,label:t.jsxs(i.Text,{as:"span",truncate:!0,children:[t.jsx(i.Text,{as:"span",variant:"bodyMd",fontWeight:n?"semibold":"regular",children:e.title}),e.description&&t.jsxs(t.Fragment,{children:[" ",t.jsx(i.Text,{as:"span",variant:"bodyXs",fontWeight:"regular",tone:"subdued",children:`(${e.description})`})]})]})}});if(s&&0!==d.length)return t.jsxs(i.Box,{borderBlockEndWidth:"025",borderColor:"border",paddingBlock:"200",children:[t.jsx("div",{className:"px-1.5",children:t.jsx(de,{onClick:c,"aria-expanded":l,className:G("hover:bg-surface-hover cursor-pointer rounded-lg p-1.5"),children:t.jsxs(i.InlineStack,{align:"space-between",blockAlign:"center",children:[t.jsx(i.Text,{as:"span",variant:"bodyMd",children:s.title}),t.jsx(i.Box,{children:t.jsx(i.Icon,{source:l?k:C})})]})})}),t.jsx(i.Collapsible,{open:l,id:"date-time-filter-periods-collapsible",transition:{duration:"200ms",timingFunction:"ease-in-out"},children:t.jsx(he,{options:u,selected:r?[r.alias]:[],onChange:e=>{const t=e[0],i=o.find(e=>e.alias===t)||o[0];a({start:J(i?.since).toDate(),end:J(i?.until).toDate(),alias:i?.alias})}})})]})}function oi(e){const{setDateTimePicked:n,dateTimePicked:a,allRanges:r,isCompare:s}=e,{DATE_TIME_FILTERS:o}=ti(),{mdDown:l}=i.useBreakpoints(),c=s?[...$t]:[...o];return t.jsx(i.Box,{maxWidth:l?"516px":"250px",width:l?"100%":"250px",padding:{xs:"500",md:"0"},paddingBlockEnd:{xs:"100",md:"0"},children:l?t.jsx(i.Select,{label:"dateRangeLabel",labelHidden:!0,onChange:e=>(e=>{const t=r.find(({title:t,alias:i})=>t===e||i===e)||r[0];n({start:J(t?.since).toDate(),end:J(t?.until).toDate(),alias:t?.alias})})(e),value:a?.title||a?.alias||"",options:r.map(({alias:e,title:t})=>t||e)}):t.jsx(i.Scrollable,{style:{maxHeight:"356px"},children:t.jsx(i.Box,{children:t.jsxs(i.BlockStack,{children:[t.jsx(si,{...e}),t.jsx(i.OptionList,{options:c.map(e=>({value:e.alias,label:e.title})),selected:a?[a.alias]:[],onChange:e=>(e=>{const t=r.find(t=>t.alias===e[0])||r[0];n({start:J(t?.since).toDate(),end:J(t?.until).toDate(),alias:t?.alias})})(e)})]})})})})}const li=({ranges:e,onApply:t})=>{const i=e||$t,{compareDateTimePicked:a,setCompareDateTimePicked:r}=ni(),{dateTimePicked:s}=ni(),[o,l]=n.useState(a),[{month:c,year:d},u]=n.useState({month:J(a.since).month(),year:J(a.since).year()});return{month:c,year:d,setDate:u,dateRange:o,apply:()=>{r(o),t?.(o)},cancel:()=>{l(a)},compareDateTimePicked:a,onChange:({end:e})=>{u(Xt(c,d,e))},onMonthChange:(e,t)=>{u({month:e,year:t})},onCalendarChange:({start:e,end:t,alias:n})=>{const a=i.find(e=>e.alias===n);l(a?{...a,...ei[n]({since:s.since,until:s.until})}:{alias:"custom",title:"Custom",since:e.getTime(),until:t.getTime()})}}},ci=e=>{const{dateTimeFilters:r,rangeAddition:s,popoverProps:o,activatorProps:c,actionProps:d,isCompare:u,buttonValue:m,activator:h}=e,A=s?.initialPicked,g=[...r||[],...s?.rangers||[]],p=u?li:ai,{month:M,year:T,dateRange:f,apply:x,cancel:I,onMonthChange:N,onCalendarChange:j,onChange:D}=p({ranges:g,initialPicked:A,onApply:e.onApply}),{t:E}=l.useTranslation(),{mdDown:S,lgUp:v}=i.useBreakpoints(),y=v,C=n.useMemo(()=>{if(f.isVersion&&f.since&&f.until)return Et({since:f.since,until:f.until,isShowNow:f.isCurrentVersion})},[f.since,f.until,f.isVersion,f.isCurrentVersion]),[R,k]=n.useState(!1),b=n.useRef(null),P=n.useRef(C);R||(P.current=C);const w=P.current;function L({relatedTarget:e}){var t;null!=e&&(t=e,!!b?.current&&function(e,t){if(e===t)return!0;let i=t.parentNode;for(;null!=i;){if(i===e)return!0;i=i.parentNode}return!1}(b.current,t))||k(!1)}function z(){I(),k(!1)}const Y=()=>{u||k(!R)};return t.jsx(i.Popover,{active:R,autofocusTarget:"none",preferredAlignment:"right",preferredPosition:"below",fluidContent:!0,sectioned:!1,fullHeight:!0,activator:t.jsx(ae,{height:"100%",minHeight:"28px",align:"center",children:t.jsx(re,{content:w,maxWidth:h?"large":"extra-large",children:t.jsx(i.Box,{children:h?h({onClick:Y,value:m}):t.jsx(i.Button,{size:"slim",icon:u?void 0:O,onClick:Y,...c,children:m})})})}),onClose:z,...o,children:t.jsxs(i.Scrollable,{vertical:!0,scrollbarWidth:"thin",className:"max-w-[100%]",children:[t.jsx(i.Popover.Pane,{fixed:!0,children:t.jsx("div",{ref:b,children:t.jsxs(i.InlineGrid,{columns:{xs:"1fr",md:"max-content max-content"},gap:"0",children:[t.jsx(oi,{setDateTimePicked:e=>{j(e),D(e)},dateTimePicked:f,rangeAddition:s,allRanges:g,isCompare:u}),t.jsx(i.Box,{padding:"400",maxWidth:S?"320px":"516px",borderInlineStartWidth:"025",borderColor:"border-secondary",children:t.jsxs(i.BlockStack,{gap:"400",children:[t.jsx(ri,{setDateTimePicked:j,dateRange:f,onBlur:()=>L}),t.jsx("div",{children:t.jsx(i.DatePicker,{month:M,year:T,selected:f.since||f.until?{start:a(f.since).toDate(),end:a(f.until).toDate()}:void 0,onMonthChange:N,onChange:j,multiMonth:y,allowRange:!0,disableDatesAfter:K()})}),d&&t.jsx(se,{...d,onClick:()=>{k(!1),d.onClick?.()}})]})})]})})}),t.jsx(i.Popover.Pane,{fixed:!0,children:t.jsx(i.Box,{padding:"400",borderBlockStartWidth:"025",borderColor:"border-secondary",children:t.jsx(i.InlineStack,{align:"end",gap:"200",children:t.jsxs(i.ButtonGroup,{children:[t.jsx(i.Button,{onClick:z,children:E("Cancel")}),t.jsx(i.Button,{variant:"primary",onClick:function(){x(),k(!1)},children:E("Apply")})]})})})})]})})},di=i=>{const{rangeAddition:a,popoverProps:r}=i,s=a?.initialPicked,o=$t,c=[...o,...a?.rangers||[]],{t:d}=l.useTranslation(),{compareDateTimePicked:u}=li({ranges:c,initialPicked:s}),m=n.useMemo(()=>u.alias===e.CompareDateTimePickerAlias.NO_COMPARISON?d("No comparison"):d("Compare to: {{value}}",{value:yt(u.since,u.until)}),[u,d]);return t.jsx(ci,{dateTimeFilters:o,rangeAddition:a,popoverProps:r,isCompare:!0,buttonValue:m})},ui=e=>{const{rangeAddition:i,popoverProps:n,activator:a,onApply:r,activatorProps:s,actionProps:o}=e,{DATE_TIME_FILTERS:l}=ti(),c=l,d=i?.rangers||[],u=i?.initialPicked,m=[...c,...d],{dateTimePicked:h}=ai({ranges:m,initialPicked:u});return t.jsx(ci,{activatorProps:s,dateTimeFilters:c,rangeAddition:i,popoverProps:n,actionProps:o,buttonValue:(()=>{if(h.isVersion&&d.length>0){const e=h.description?`at ${h.description}`:"";return`Period: ${h.title} ${e}`}return"custom"===h.alias?yt(h.since,h.until):h.title})(),activator:a,onApply:r})};e.dayjs=a,e.ANALYTICS_METRIC_TOOLTIP=h,e.AnalyticModeSelector=({activatorText:e="View by",value:i,onChange:a})=>{const r=n.useMemo(()=>ht.map(e=>({...e})),[]);return t.jsx(je,{activatorText:e,options:r,selected:i,onSelect:e=>{a(e)},maxWidth:"650px"})},e.CAMPAIGN_BACKGROUND_MAIN={ORIGIN:"#2C7DFF",VARIANT:"#F34A70"},e.CHART_MIN_HEIGHT=228,e.COMPARE_DATE_TIME_FILTERS_MAP=ei,e.ConvertMoneyProvider=({children:e,currency:i,locale:a="en-US"})=>{Oe();const r=Se(e=>e.currencyRates),s=n.useCallback((e,t,n)=>{if("string"==typeof e)return e;if("number"!=typeof e)return"0";if(!i)return e.toString();const s=r?((e,t,i,n)=>{if(t===i||!n[t]||!n[i])return e;const a=e*n[t]/n[i];return a?Number(a.toFixed(2)):e})(e,E,i,r):e;return P(((e,t=E,i)=>{if("string"==typeof e)return e;if("number"!=typeof e)return;const n="string"==typeof i?{locale:i}:i,a=n?.locale??"en-US";return e>=1e9?`${new Intl.NumberFormat(a,{style:"currency",currency:t,minimumFractionDigits:2,maximumFractionDigits:2}).format(e/1e9)}B`:e>=1e6?`${new Intl.NumberFormat(a,{style:"currency",currency:t,minimumFractionDigits:2,maximumFractionDigits:2}).format(e/1e6)}M`:n?.compact&&Math.abs(e)>=1e3?`${new Intl.NumberFormat(a,{style:"currency",currency:t,minimumFractionDigits:1,maximumFractionDigits:1}).format(e/1e3)}K`:new Intl.NumberFormat(a,{style:"currency",currency:t}).format(e)})(s,i,{locale:a,compact:n?.compact})??"0")},[i,a,r]),o=n.useMemo(()=>({getTextPrice:s}),[s]);return t.jsx(ye.Provider,{value:o,children:e})},e.CurrencySelector=({currencies:e,selected:a,preferredAlignment:r="left",activatorText:s,onSelect:o})=>{const{t:c}=l.useTranslation(),d=n.useRef(o),u=n.useCallback(e=>{d.current?.(e)},[]),m=n.useMemo(()=>{if(!e)return[];const t=e.map(e=>({content:e,id:e}));return t.some(e=>e.id===E)||t.push({content:E,id:E}),F(t,[{attr:"content",order:"asc",preferredValue:E}])},[e]),h=n.useMemo(()=>m.map(e=>({id:e.id,content:e.content,onAction:()=>u(e.id),active:e.id===a,suffix:e.id===a&&t.jsx(i.Icon,{source:y,tone:"success"}),helpText:e.id===E&&t.jsx(i.Text,{as:"p",fontWeight:"semibold",children:c("Default")})})),[m,a,u,c]),A=n.useMemo(()=>!m?.length||1===m.length&&m[0]?.id===E,[m]);return n.useEffect(()=>{d.current=o}),A?null:t.jsx(Ae,{options:h,selected:a,variant:"action-list",onSelect:e=>u(e),activatorText:s??c("Currency"),maxWidth:"225px",preferredAlignment:r,helpText:t.jsx(i.Box,{padding:"200",paddingBlockStart:"300",paddingBlockEnd:"300",borderColor:"border-tertiary",background:"bg",children:t.jsx(me,{as:"p",variant:"bodyMd",transformers:{1:e=>t.jsx(Me,{linkAction:{url:"https://help.shopify.com/en/manual/international/pricing/exchange-rates#auto-convert",target:"_blank"},children:e},e+"text-link")},children:c("This will follow Shopify's current exchange rate. [1]Read more[]")})})})},e.DATE_TIME_COMPARISON_FILTERS=$t,e.DEFAULT_CURRENCY_ANALYTIC=E,e.DEFAULT_CURRENT_PERIOD_LABEL=I,e.DEFAULT_PREVIOUS_PERIOD_LABEL=N,e.DateTimeFilterInputs=ri,e.DateTimeFilters=oi,e.DateTimePickerContext=ii,e.DateTimePickerProvider=({children:i,initDate:r,initDateCompare:s})=>{const[o,l]=n.useState(r||{since:J().set("hour",0).valueOf(),until:J().set("hour",0).valueOf(),title:"Today",alias:"today"}),{DATE_TIME_FILTERS:c}=ti(),d=n.useCallback((e,t=o)=>({...Zt,...ei[e]({since:t.since,until:t.until,alias:t.alias})}),[o]),[u,m]=n.useState(s||d(e.CompareDateTimePickerAlias.PREVIOUS_PERIOD)),h=n.useCallback(t=>{"custom"!==u.alias&&u.alias!==e.CompareDateTimePickerAlias.NO_COMPARISON&&m(d(u.alias,t))},[u,d]),A=n.useCallback(e=>{l(e),h(e)},[h]);return t.jsx(ii.Provider,{value:{dateTimePicked:o,setDateTimePicked:A,compareDateTimePicked:u,setCompareDateTimePicked:m,resetDateVersion:()=>{const e=a(o.since).startOf("day").valueOf(),t=a(o.until).startOf("day").valueOf(),i=c.find(i=>i.since===e&&i.until===t);l({...o,isVersion:!1,versionId:void 0,isCurrentVersion:!1,description:"",title:i?.title||o.title,alias:i?.alias||"custom"})}},children:i})},e.GSelectableMetricChartCard=({metricInfo:e,dataChart:a,defaultActiveTab:r,isLoading:s,isEmptyMetricData:o,hideComparison:l,currentPeriodLabel:c=I,previousPeriodLabel:d=N,columnTypes:u})=>{const[m,h]=n.useState(r),A=n.useMemo(()=>{const e=m?a[m]:void 0;if(!e)return[];const t={name:c,data:e.current};return l?[t]:[t,{name:d,data:e.previous,isComparison:!0}]},[m,a,l,c,d]);return t.jsxs(i.Card,{children:[t.jsx("div",{style:{display:"grid",gridTemplateColumns:`repeat(${e.length}, 1fr)`,gap:"16px",marginBottom:"16px"},children:e.map(e=>t.jsx(ct,{item:e,isActive:m===e.key,isLoading:s,hideComparison:l,onSelect:h},e.key))}),t.jsx($e,{lineChartData:A,isLoading:s,isEmptyMetricData:o,metricKey:m,columnTypes:u})]})},e.GTimePicker=e=>{const{isCompare:n,...a}=e;return t.jsxs(i.InlineStack,{gap:"200",children:[t.jsx(ui,{...a}),n&&t.jsx(di,{rangeAddition:a.rangeAddition,popoverProps:a.popoverProps})]})},e.MetricChartProvider=ke,e.MetricDonutChartCard=({label:e,metricKey:a,targets:r,totalsRow:s,comparisonTotalsRow:o,sort:l,isLoading:c,isEmptyMetricData:d,minHeight:m=294,onClick:A})=>{const g=h[a],{windowWidth:p,windowSize:M}=(()=>{const[e,t]=n.useState(()=>({width:"undefined"!=typeof window?window.innerWidth:0,height:"undefined"!=typeof window?window.innerHeight:0})),i=n.useMemo(()=>({xs:e.width<=768,md:768<e.width&&e.width<=1024,lg:e.width>1024,xsDown:e.width<768,"1200Down":e.width<1200,"1040Down":e.width<1040}),[e.width]),a=!i.lg,r=i.xs;return n.useEffect(()=>{const e=()=>{t({width:window.innerWidth,height:window.innerHeight})};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[]),{windowSize:e,windowWidth:i,isMobileTabletView:a,isMobileView:r}})(),[T,f]=n.useState(!1),x=n.useMemo(()=>mt({targets:r,metricKey:a,totalsRow:s,comparisonTotalsRow:o,sort:l}),[r,a,s,o,l]);if(c)return t.jsx(st,{});const I=e=>z(`${e}`),N=p.lg&&M.width<1500;return t.jsx("div",{onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),children:t.jsx(i.Card,{children:t.jsxs(i.BlockStack,{gap:"200",children:[t.jsx(i.InlineStack,{children:t.jsx("div",{className:"hover:cursor-pointer hover:text-[--p-color-text-link-hover]",onClick:e=>{e.stopPropagation(),A()},children:t.jsxs(i.InlineStack,{children:[t.jsx(Ne,{tooltip:g,children:t.jsx(i.Text,{as:"h3",variant:"headingMd",children:e})}),T&&t.jsx(i.Icon,{source:R,tone:"inherit"})]})})}),t.jsx("div",{className:G("flex items-center justify-center",{"max-h-[250px] overflow-hidden":N}),children:d?t.jsx(et,{title:"No data yet",description:"Data needs time to gather"}):t.jsx(ke,{minHeight:m,seriesColors:{},children:t.jsx(u.DonutChart,{data:x,legendPosition:"left",showLegendValues:!0,showLegend:!0,theme:"Light",tooltipOptions:{valueFormatter:I},labelFormatter:I})})})]})})})},e.PLACEHOLDER_VALUE="-",e.PREVIOUS_PERIOD_FILTER=Zt,e.SERIES_COLORS=j,e.SingleMetricChartCard=({metricInfo:e,lineChartData:a,isLoading:r,hideComparison:s,columnTypes:o,isEmptyMetricData:l,onClickTitle:c})=>{const[d,u]=n.useState(!1);return t.jsx("div",{onMouseEnter:()=>u(!0),onMouseLeave:()=>u(!1),children:t.jsx(i.Card,{children:t.jsxs(i.BlockStack,{gap:"200",children:[t.jsx(lt,{item:e,isHovered:d,isLoading:r,hideComparison:s,onClickTitle:c}),t.jsx($e,{lineChartData:a,isLoading:r,isEmptyMetricData:l,columnTypes:o,metricKey:e.key})]})})})},e.TARGET_CHANNEL=x,e.TARGET_DEVICES=f,e.TARGET_VISITOR=T,e.THUMB_PRODUCT_DEFAULT=S,e.TREND_TONE=D,e.convertDateToTz=q,e.convertToDateTimeFilters=kt,e.createLastDaysRange=Bt,e.dayjsTz=J,e.dayjsTzToDate=K,e.dayjsTzToLocalTZ=X,e.formatDate=Nt,e.formatDateTimeRange=Et,e.formatDayjs=St,e.formatMs=e=>{const t=Math.floor(e/1e3);return[Math.floor(t/3600),Math.floor(t%3600/60),t%60].map(e=>String(e).padStart(2,"0")).join(":")},e.formatTime=function(e){return q(e).format(Mt.TIME)},e.formatTimeRange=Dt,e.getDateRangeTitle=yt,e.getDateTimeFilterBase=function(e,t){const i=J(),n=q(e),a=q(t),r=gt();for(const e of Object.values(r)){const t=e.getDateRange(i),r=q(t.since),s=q(t.until),o=n.isSame(r,"day"),l=a.isSame(s,"day");if(o&&l)return{title:e.title,alias:e.alias}}return{title:yt(e,t),alias:"custom"}},e.getDateTimeFilterByAlias=pt,e.getDateTimeFilterMapping=gt,e.getEndOfDayBy=vt,e.getInitialTimezone=function(){return V},e.getLast12Months=Jt,e.getLast30Days=_t,e.getLast365Days=Vt,e.getLast7Days=Qt,e.getLast90Days=Ft,e.getLastMonth=Wt,e.getLastYear=qt,e.getMonthAndYearByDateFilter=Xt,e.getNoComparison=bt,e.getPreviousMonth=Yt,e.getPreviousPeriod=Pt,e.getPreviousQuarter=zt,e.getPreviousWeek=Lt,e.getPreviousYear=Ut,e.getToday=Ht,e.getVersionDateDescription=Rt,e.getVersionDateRangeTitle=Ct,e.getYesterday=Gt,e.isDate=ft,e.isMidnight=Ot,e.isSameDayTimestamp=jt,e.isValidDate=It,e.isValidYearMonthDayDateString=xt,e.parseYearMonthDayDateString=function(e){return a(e).valueOf()},e.setTz=function(e){V=e,a.tz.setDefault(e)},e.useConvertMoneyContext=Ce,e.useCurrencyRatesStore=Se,e.useDateTimeFilter=ti,e.useDateTimePicker=ai,e.useDateTimePickerContext=ni,e.useFetchCurrencyRates=Oe,e.useVersionDateTimeFilters=e=>{const{t:t}=l.useTranslation(),i=n.useMemo(()=>e?.length?kt(e):[],[e]);return{rangeAddition:{title:t("Experiment periods"),rangers:i}}}});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@levi-gemcommerce/analytics",
|
|
3
|
-
"version": "1.0.0-dev.
|
|
3
|
+
"version": "1.0.0-dev.16",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "gemx-dev",
|
|
6
6
|
"sideEffects": [
|
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
},
|
|
106
106
|
"peerDependencies": {
|
|
107
107
|
"@shopify/polaris": ">=12",
|
|
108
|
-
"@shopify/polaris-viz": ">=
|
|
108
|
+
"@shopify/polaris-viz": ">=10",
|
|
109
109
|
"@tanstack/react-query": ">=4",
|
|
110
110
|
"dayjs": ">=1.11",
|
|
111
111
|
"i18next": ">=23",
|