PageSourceSearch

https://ooni.com/cdn/shopifycloud/checkout-web/assets/c1/181d38d3.Bsy-Yqp4.js

js ooni.com collected 2026-10-01 10:41:44 UTC 2,859 bytes, 1 lines download raw bytes

1import{f as e}from"./2c1ab0fe.D_oO1jU7.js";import{aC as n,aD as t,n as o,O as i,P as r,aq as a,aE as s,aB as l,r as d}from"./4c290a1e.D9lE9kmU.js";import{al as p,a9 as m}from"./164ad2e3.DgUUtBtV.js";import{p as h,s as u,c,a as f}from"./347b440c.oWH9qB5Z.js";function v(e){if(void 0===e)return;if("number"==typeof e)return{lower:e,upper:e};const{lower:n,upper:t}=e;return void 0!==n&&void 0!==t?{lower:n,upper:t}:void 0}function g(e){let n,t;for(const{estimatedTimeInTransit:o}of e){const e=v(o);if(!e)return;n=void 0===n?e.lower:Math.min(n,e.lower),t=void 0===t?e.upper:Math.max(t,e.upper)}if(void 0!==n&&void 0!==t)return n===t?n:{lower:n,upper:t}}function S(e,n){if(!e)return`unresolved:${n}`;const t=e.deliveryPresentationGroupToken;return t?`token:${t}`:`no-token:${n}:${e.handle}`}function M(e){const n=new Map;return e.forEach((({line:e,method:t},o)=>{const i=S(t,e.id??`index-${o}`);let r=n.get(i);r||(r={key:i,methods:[],merchandiseLines:[],mergedTimeInTransit:void 0,availableOn:e.availableOn},n.set(i,r)),t&&r.methods.push(t),e.targetMerchandiseLines&&r.merchandiseLines.push(...e.targetMerchandiseLines)})),[...n.values()].map((e=>({...e,merchandiseLines:p(e.merchandiseLines),mergedTimeInTransit:g(e.methods)})))}function b(e){const n=e.map((e=>({line:e,method:o(e)}))),t=n.filter(L);return{groups:M(t),nonShippableCount:n.length-t.length}}function L({line:e,method:n}){return n?"SHIPPING"===n.methodType||"LOCAL"===n.methodType:0===e.methods.length||e.methods.some((({methodType:e})=>"SHIPPING"===e||"LOCAL"===e))}function T(e){return{...e,included:!0}}function C(e,n){return[...e.filter((e=>!n(e))),...e.filter(n)]}function k(){const{shop:{id:o,marketDrivenShippingEnabled:p,remoteShopsConfigMap:v}}=i(),{deliveryNext:g,remoteMerchandiseDetails:S}=r(),{parts:b}=a();return e((()=>{const e={includedMethods:new Set,total:void 0,presentsConsolidatedShipping:!1,groups:[]},i=g.value;if(!i||"filled"!==i.status)return e;const{oneTimePurchaseLines:r}=m(s(i).filter(l));if(r.length<2)return e;const a=(e,n)=>d({line:e,method:n,localShopId:o,marketDrivenShippingEnabled:p,remoteShopsConfigMap:v,remoteMerchandiseDetails:S.value}),T=r.some((e=>function({line:e,localShopId:o,marketDrivenShippingEnabled:i,remoteShopsConfigMap:r,remoteMerchandiseDetails:a}){const s=n(e,a,o);if(s===o)return i;const l=r?.get(s);return l?l.marketDrivenShippingEnabled:e.methods.some((e=>Boolean(t(e))))}({line:e,localShopId:o,marketDrivenShippingEnabled:p,remoteShopsConfigMap:v,remoteMerchandiseDetails:S.value})));if(!T)return e;const C=h(b.deliveryLines.value),k=u(r,C),D=k.filter((e=>Boolean(e.method))),I=D.length===r.length?c(D.map((({line:e,method:n})=>({...n,amountCombinabilityToken:a(e,n)})))):void 0,y=M(k.filter(L));return{includedMethods:f(r,k,a),total:I,presentsConsolidatedShipping:T,groups:y}}))}export{T as a,b,M as c,L as i,g as m,C as o,S as s,k as u};

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.