PageSourceSearch

https://rhinoshield.eu/hane/_nuxt/iemQUcSu.js

js rhinoshield.eu collected 2026-10-05 18:27:44 UTC 2,449 bytes, 1 lines download raw bytes

1import{o as e}from"./DUvDP71k.js";import{et as t,nn as n}from"./DVNGEeaJ.js";import{t as r}from"./DdKu44mK.js";import{t as i}from"./B6ZEW0uq.js";var a=i(o);function o(){let{isDev:i}=r(),{$tracking:a,$shopifyCart:o}=e(),s=n(null),c=n(!1),l=n(!1);async function u(){await _(async()=>{s.value=await o.getCart(),s.value&&(c.value=!0)})}let d=t(()=>{let e=new Map;return f.value.forEach(t=>{switch(t.rhinoAttribute._type){case`package-product`:{let n=e.get(t.rhinoAttribute._packageId);n?n.push(t):e.set(t.rhinoAttribute._packageId,[t]);break}default:e.set(t.id,[t]);break}}),e}),f=t(()=>s.value?.rhinoLines?.length?s.value?.rhinoLines?.map(e=>({id:e.id,title:e.merchandise.product.title,sku:e.merchandise.sku,quantity:e.quantity,variantId:e.merchandise.id,image:p(e)&&e.rhinoAttribute._imageUrl||e.merchandise.image?.url,rhinoAttribute:e.rhinoAttribute,cost:m(e),...e.rhinoType===`package-product`&&{packageCost:h(e.packageCost)}})):[]);function p(e){return`_imageUrl`in e.rhinoAttribute}function m(e){return e.rhinoType===`free-gift`?{current:0,original:0,subtotal:0,total:0,discount:0,hasDiscount:!1}:h(e.rhinoType===`design-creator-product`||e.rhinoType===`predesign-creator-product`?e.rhinoBundleCost:e.rhinoCost)}function h(e){let t=Number(e.discountPerQuantity?.amount??0),n=Number(e.price.amount)-t,r=Number(e.compareAtPrice?.amount??e.price.amount);return{current:n,original:r,subtotal:Number(e.subtotal.amount),total:Number(e.total.amount),discount:t,hasDiscount:r>n}}async function g(e){await _(async()=>{if(!s.value){console.error(`Cart is not initialized yet.`);return}let t=s.value.rhinoLines.find(t=>t.id===e);if(!t){console.error(`Item not found, lineItemId: ${e}`);return}if(s.value=await o.removeRhinoLine(e),t.rhinoAttribute._type!==`free-gift`){if(!t.rhinoAttribute._ecommerce){console.error(`_ecommerce missing, removedItem:`,t);return}a.sendEcommerceEvent(`REMOVE_FROM_CART`,[t.rhinoAttribute._ecommerce])}})}async function _(e){l.value=!0;let t=null;try{t=await(typeof e==`function`?e():e)}catch(e){i&&console.error(`[Checkout]`,e)}finally{l.value=!1}return t}return{groupedDisplayedItems:d,displayedItemCount:t(()=>f.value.reduce((e,t)=>e+t.quantity,0)),nonDiscountedCostSubtotal:t(()=>Number(s.value?.rhinoCost?.nonDiscountedCostSubtotal?.amount??0)),nonDeliveryCostTotal:t(()=>Number(s.value?.rhinoCost?.nonDeliveryCostTotal?.amount??0)),isCartInitialized:c,isCartUpdating:l,initialize:u,cart:s,removeLineItem:g}}export{a as t};

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.