1import{g as z,a as S,b as J,d as L,e as R}from"./useAnalytics-D5iKMjQO.js";import{g as Y}from"./main-D0kbgca-.js";import"./useTheme-CYmKclXd.js";import"./subscriptionCache-HW2FLFcF.js";import"./filters-BrjZAjgu.js";import"./promo-params-vkKC0BzN.js";import"./platform-params-BHpjPEpa.js";import"./useShopifyAjax-OsCkI3bc.js";import"./js.cookie-CR4gOKBE.js";import"./useMoney-CLBrhtwG.js";import"./new-cart-redirect-CcNd8MEm.js";import"./handoff-cookie-C_5Qa1mE.js";import"./utc-CvZOimXZ.js";import"./index-D2onZCs9.js";import"./iterable-BxvvZ8JT.js";import"./useSubscription-DwYrLuun.js";import"./useUpgradeMembership-0AXbhAHk.js";import"./restricted-one-time-plans-B9H83GG2.js";import"./index-NCKdgxA7.js";import"./amplitudeExperiment-DbggqHX7.js";import"./promocodes-BLp2O_K-.js";import"./notifySlack-CMxtHm2f.js";import"./experiment-utils-DT7dcT-x.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="611ce2e0-2ff5-46a8-b6d7-3b5e579dd695",e._sentryDebugIdIdentifier="sentry-dbid-611ce2e0-2ff5-46a8-b6d7-3b5e579dd695")}catch{}})();function K(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||e===null||e===void 0}function U(e,t,r){if(e){var n=t.map(T),o=r.map(T);F({json:e,allowlist:n,excludelist:o,ancestors:[]})}}function F(e){var t,r,n=e.json,o=e.targetObject,i=e.allowlist,f=e.excludelist,s=e.ancestors,a=e.parentObject,c=e.targetKey;o||(o=n);var b=Object.keys(o);try{for(var l=z(b),u=l.next();!u.done;u=l.next()){var d=u.value,v=S(S([],J(s),!1),[d],!1);K(o[d])?(!C(v,i)||C(v,f))&&delete o[d]:F({json:n,targetObject:o[d],allowlist:i,excludelist:f,ancestors:v,parentObject:o,targetKey:d})}}catch(p){t={error:p}}finally{try{u&&!u.done&&(r=l.return)&&r.call(l)}finally{if(t)throw t.error}}Object.keys(o).length===0&&a&&c&&delete a[c]}function T(e){return e.startsWith("/")&&(e=e.slice(1)),e.split("/").map(function(t){return t.replace(/~0/g,"~").replace(/~1/g,"/")})}function O(e,t,r,n){if(r===void 0&&(r=0),n===void 0&&(n=0),n===t.length)return r===e.length;if(r===e.length){for(;n<t.length&&t[n]==="**";)n++;return n===t.length}var o=t[n];if(o==="**"){if(n+1===t.length)return!0;for(var i=r;i<=e.length;i++)if(O(e,t,i,n+1))return!0;return!1}else return o==="*"||o===e[r]?O(e,t,r+1,n+1):!1}function C(e,t){return t.some(function(r){return O(e,r)})}var D=function(e){return e===void 0?!1:typeof e=="boolean"?e:e.enabled!==!1},G=function(e){var t;return typeof e=="object"&&e!==null?{allowlist:(t=e.allowlist)!==null&&t!==void 0?t:[],excludelist:e.excludelist||e.blocklist||[]}:{allowlist:[],excludelist:[]}},H=function(e,t,r){if(t.length===0&&r.length===0)return e;var n=t.length>0?t:["/**"];try{var o=JSON.parse(e);return U(o,n,r),JSON.stringify(o)}catch{return e}},k=function(e,t,r,n){var o=G(t),i=o.allowlist,f=o.excludelist,s=H(e,i,f);return n(s,r)},I=10240,W=["image/","audio/","video/","application/octet-stream","font/"];function X(e){return e?W.some(function(t){return e.toLowerCase().startsWith(t)}):!1}function M(e){if(e!=null){if(typeof e=="string")return e;if(e instanceof URLSearchParams)return e.toString();if(e instanceof FormData){var t=[];return e.forEach(function(r,n){t.push("".concat(n,"=").concat(typeof r=="string"?r:"[File]"))}),t.join("&")}}}function A(e,t){if(new Blob([e]).size<=t)return{value:e,truncated:!1};for(var r=0,n=Math.min(e.length,t);r<n;){var o=Math.ceil((r+n)/2);new Blob([e.slice(0,o)]).size<=t?r=o:n=o-1}return r>0&&e.charCodeAt(r-1)>=55296&&e.charCodeAt(r-1)<=56319&&(r-=1),{value:e.slice(0,r),truncated:!0}}var be=function(){function e(){this.fetchObserver=null}return e.prototype.start=function(t,r){this.eventCallback=t,this.networkConfig=r,this.observeFetch()},e.prototype.stop=function(){var t;(t=this.fetchObserver)===null||t===void 0||t.call(this),this.fetchObserver=null,this.eventCallback=void 0,this.networkConfig=void 0},e.prototype.notifyEvent=function(t){var r;(r=this.eventCallback)===null||r===void 0||r.call(this,t)},e.prototype.observeFetch=function(){var t=this,r=Y();if(r){var n=r.fetch;n&&(r.fetch=function(o,i){return L(t,void 0,void 0,function(){var f,s,a,c,b,l,h,u,d,v,p,h,g,_=this,w,B;return R(this,function(m){switch(m.label){case 0:f=Date.now(),s={timestamp:f,type:"fetch",method:i?.method||"GET",url:o.toString(),requestHeaders:i?.headers},a=(w=this.networkConfig)===null||w===void 0?void 0:w.body,a&&D(a.request)&&(c=M(i?.body),c!==void 0&&(b=(B=a.maxBodySizeBytes)!==null&&B!==void 0?B:I,s.requestBody=k(c,a.request,b,A).value)),m.label=1;case 1:return m.trys.push([1,3,,4]),[4,n(o,i)];case 2:return l=m.sent(),h=Date.now(),s.status=l.status,s.duration=h-f,u={}
1,l.headers.forEach(function(E,y){u[y]=E}),s.responseHeaders=u,a&&D(a.response)?(d=u["content-type"]||null,X(d)?(s.responseBodyStatus="skipped_binary",this.notifyEvent(s)):(v=l.clone(),v.text().then(function(E){var y,N=(y=a.maxBodySizeBytes)!==null&&y!==void 0?y:I,x=k(E,a.response,N,A),P=x.value,q=x.truncated;s.responseBody=P,s.responseBodyStatus=q?"truncated":"captured",_.notifyEvent(s)},function(){s.responseBodyStatus="error",_.notifyEvent(s)}))):this.notifyEvent(s),[2,l];case 3:throw p=m.sent(),h=Date.now(),s.duration=h-f,g=p,s.error={name:g.name||"UnknownError",message:g.message||"An unknown error occurred"},this.notifyEvent(s),p;case 4:return[2]}})})},this.fetchObserver=function(){r.fetch=n})}},e}();export{be as NetworkObservers}; 2//# sourceMappingURL=observers-_h1yUw9p.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.