1!function(){try{var e="u">typeof window?window:"u">typeof global?global:"u">typeof globalThis?globalThis:"u">typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="4a6b0600-bae2-4653-97dc-cb17afbb6ef3",e._sentryDebugIdIdentifier="sentry-dbid-4a6b0600-bae2-4653-97dc-cb17afbb6ef3")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2363],{22363:(e,t,i)=>{i.r(t),i.d(t,{ProductCard:()=>W});var s=i(29726),n=i(22343),l=i(83912),r=i(11570),a=i(52041),o=i(968),c=i(3228),d=i(14586),u=i(14741),p=i(55689),m=i(21365),x=i(8636),h=i(5588),g=i(60633),f=i(70783),_=i(13947),v=i(70650),y=i(6762),b=i(79873),j=i.n(b),w=i(71298),N=i(78894),k=i(53764),C=i(31430),$=i(80053),S=i(96028),I=i(89471),P=i(90517),A=i(47851),V=i(35123),z=i(60058),M=i(95002),E=i(17653),D=i(57659),T=i(60675);let F="text-green-700";var G=i(6451),B=i(78736),L=i(81496),R=i(64428);let W=(0,N.memo)(function({id:e,product:t,isVariant:i,priority:b}){let W,q=(0,v.c)("Marketplace"),U=(0,v.c)("SupplierCard"),Z=(0,v.c)("Navigation"),K=(0,w.useRouter)(),O=(0,w.useParams)().locale,H=(0,y.Ym)(),J=(0,D.kg)(t.title,H)||"Product",{data:X,status:Y}=(0,_.useSession)(),{toast:Q}=(0,u.dj)(),ee=(0,m.md)(L.Dx),et=(0,m.md)(L.My),ei=(0,m.md)(L.g2),es=(0,m.Xr)(L.el),{canEditCart:en,canEditWishlist:el,canViewCart:er,canViewWishlist:ea}=(0,R.S)(),{userCurrency:eo,currencyRate:ec}=(0,P.p)(),{isSupplier:ed,ownSupplierGuid:eu,shouldMaskPrice:ep}=(0,A.K)(),em=(e,t)=>{let i=O?`/${O}/product/${e}`:`/product/${e}`;return t?`${i}?${t}`:i},[ex,eh]=(0,N.useState)(t.image_urls.at(0)||""),eg=(0,G.c)(X?.accessToken,et),ef=(0,V.y3)({sessionStatus:Y,persistedParticipationGuid:ee,participation:et}),e_=(0,B.DS)(eg,eu),ev=ei[`${t.guid}-${e_}`]?.data,ey=!!ei[`${t.guid}-${e_}`]?.isLoading,eb=t.image_urls.length>1,ej=(ev?.available_suppliers?.length??0)>0,ew=ep(t.suppliers),eN=!ed&&!!ev&&ej&&ev.price_units_min<.98*t.price_units_usd_min,ek=ev?.available_suppliers?.length??0,eC=ev?.available_suppliers?.some(e=>e.id!==T.k7)??!1,e$=ev?.available_suppliers?.reduce((e,t)=>e+(t.id===T.k7?0:t.quantity),0)??0,eS=ev?.vip_categories.filter(e=>6!==e.category_type)||[],eI=ev?.vip_categories.filter(e=>6===e.category_type)||[],{incrementCart:eP,isPending:eA}=(0,I.e)(),eV=(0,N.useRef)(!1),[ez,eM]=(0,N.useState)(!1),eE=async i=>{if(i.preventDefault(),i.stopPropagation(),(t.suppliers?.length??0)>1)K.push(em(e,et?.type==="SUPPLIER"?void 0:"target=suppliers"));else{if(!ef)return;if(eg&&(!0!==en||!0!==er))return void Q({title:U("warning"),description:Z("no_permission"),variant:"warning"});if(eV.current||eA||et?.type==="SUPPLIER")return;eV.current=!0,eM(!0);try{let i=await (0,l.cM6)({pathParams:{guid:e},...X?.accessToken?{headers:{Authorization:`Bearer ${X.accessToken}`,...eg?{"Clinic-Context-Id":eg}:{}}}:{}}),s=i?.supplier_products?.[0];if(!s)return void Q({title:q("error"),description:U("add_to_cart_failed"),variant:"destructive"});let n=0;if(X?.user?.id&&eg){let e=await eP({items:[{quantity:1,supplier_product_id:s.id,is_consignment:!1}],headers:{Authorization:`Bearer ${X?.accessToken}`,"Clinic-Context-Id":eg}});if(!e)return;n=e.wasReplayed?0:e.results.find(e=>e.supplier_product_id===s.id)?.applied_quantity??0,Q({title:q("success"),description:U("add_to_cart")})}else{let e=null;if(es(i=>{let l=i.find(e=>e.item.id===s.id),r=l?.quantity??0,a=Math.max(s.min_order_quantity,r+1);return a>1e3?(e=r,i):(n=a-r,l?i.map(e=>e.item.id===s.id?{...e,quantity:a}:e):[...i,(0,M.jD)({totalQuantity:a,supplier:s,product:t,productGuid:t.guid,productTitle:J,session:X})])}),null!==e)return void Q({title:U("warning"),description:U("max_quantity_exceeded",{current:e}),variant:"warning"});Q({title:q("success"),description:U("add_to_cart")})}if(n>0){let i=(s.price_units??t.price_units_usd_min??0)/100;(0,S.Ml)({currency:eo||"USD",items:[{item_id:String(s.id),item_name:J||e,price:i*(ec||1),quantity:n,item_brand:t.manufacturer?.name||s.supplier?.name,item_category:t.category_path||void 0}]})}}catch{Q({title:q("error"),description:U("add_to_cart_failed"),variant:"destructive"})}finally{eV.current=!1,eM(!1)}}},{data:eD,refetch:eT}=(0,l.zfK)({headers:{Authorization:`Bearer ${X?.accessToken}`,"Clinic-Context-Id":eg}},(0,V.AS)(ef&&!!X?.accessToken&&!!eg&&!0===ea)),[eF,eG]=(0,N.useState)(!1),eB=(ef?eD?.items:void 0)?.some(t=>t.item.guid===e),{mutateAsync:eL}=(0,l.otn)(),{mutateAsync:eR}=(0,l.xlK)();async function eW(){if(!eF&&ef){if(!X?.accessToken||!eg)return void Q({title:q("sign_in_first"),description:q("sign_in_to_wishlist")});if(!0!==el||!0!==ea)return void Q({title:U("warning"),description:Z("no_permission"),variant:"warning"});eG(!0);try{eB?(await eR({body:[{product_id:e}],headers:{Authorization:`Bearer ${X?.accessToken}`,"Clinic-Context-Id":eg}}),Q({title:q("success"),description:q("item_wishlist_removed")})):(await eL({body:[{quantity:1,product_id:e}],headers:{Authorization:`Bearer ${X?.accessToken}`,"Clinic-Context-Id":eg}}),Q({title:q("success"),description:q("item_wishlist_added")})),await eT()}catch(e){(0,z.bT)(e,{component:"product-card",op:"toggleWishlist"}),Q({title:q("error"),description:q("wishlist_update_failed"),variant:"destructive"})}eG(!1)}}return(0,s.jsxs)("div",{className:(0,p.cn)("group/wishlist relative flex h-full min-h-117.5 w-full cursor-pointer flex-col gap-0 overflow-hidden rounded-lg border border-slate-200 bg-white p-2.5 pb-4 transition hover:border-brand md:gap-4",!i&&"md:w-70"),onClick:()=>{K.push(em(e))},children:[(0,s.jsxs)("div",{className:"group/image relative flex shrink-0 flex-col items-center justify-center gap-2",children:[(0,s.jsx)("img",{src:(0,E.V)(ex,C.A),alt:`${J} image`,className:(0,p.cn)("h-35 w-full object-contain md:h-40",eb&&"group-hover/image:h-24 md:group-hover/image:h-26.5"),loading:b?"eager":"lazy",fetchPriority:b?"high":void 0,decoding:"async"}),eb&&(0,s.jsx)("div",{className:"hidden items-center gap-1 group-hover/image:flex md:gap-2",children:t.image_urls.map((e,t)=>(0,s.jsx)("button",{type:"button","aria-label":`${J} - Image ${t+1}`,className:"h-9 w-9 md:h-11.5 md:w-11.5",onClick:t=>{t.preventDefault(),t.stopPropagation(),eh(e)},children:(0,s.jsx)("img",{src:e,alt:`${J} - Image ${t+1}`,className:"h-9 w-full cursor-pointer border border-transparent object-contain hover:border-slate-500 md:h-11.5",loading:"lazy"})},t))}),t.has_education?(0,s.jsx)("div",{className:"absolute bottom-0 right-0 flex gap-1",children:t.has_education?(0,s.jsx)(a.$,{size:"icon","aria-label":Z("education"),className:"h-8 w-8 rounded-full bg-brand shadow-lg",onClick:t=>{t.preventDefault(),t.stopPropagation(),K.push(em(e,"target=education"))},children:(0,s.jsx)(x.A,{size:20})}):null}):null,ev?.vip_categories.length?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"absolute bottom-0 left-0 hidden items-center gap-0.5 md:flex",children:[eS.length?(0,s.jsx)(d.Bc,{delayDuration:400,children:(0,s.jsxs)(d.m_,{children:[(0,s.jsx)(d.k$,{className:"flex items-center",children:(0,s.jsx)(r.E,{className:"shrink-0 border-none bg-yellow-100 px-1.5 py-0.5 text-yellow-700",children:(0,s.jsx)(h.A,{size:12})})}),(0,s.jsx)(d.ZI,{align:"start",side:"bottom",children:(0,s.jsxs)("div",{className:"flex flex-col gap-1 px-3 py-2.5",children:[(0,s.jsx)("p",{className:"text-sm font-semibold text-gray-800",children:q("vip")}),eS.map(e=>{let t=e.category_type_display.split(" ").map(e=>e.toLowerCase()).join("_"),i=T.vo.find(e=>e.label===t);return(0,s.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,s.jsx)(r.E,{className:"shrink-0 border-none px-1.5 py-0.5",style:{color:`color-mix(in srgb, ${e.color}, black 20%)`,background:`color-mix(in srgb, ${e.color}, white 70%)`},children:(0,s.jsx)(h.A,{size:12})}),(0,s.jsx)("p",{children:`(${e.supplier_name})`}),(0,s.jsxs)("p",{className:"text-sm text-gray-500",children:[i?.value==="1"?q("free_shipping"):null,i?.value==="2"?q("discount_percent",{amount:(0,D.$4)(e.discount_units/100,H)}):null,i?.value==="3"?q("discount_plat",{amount:(0,D.$4)(e.discount_units/100,H),currency:e.price_currency||"USD"}):null,i?.value==="4"?q("discount_percent_and_free_shipping",{amount:(0,D.$4)(e.discount_units/100,H)}):null,i?.value==="5"?q("discount_plat_and_free_shipping",{amount:(0,D.$4)(e.discount_units/100,H),currency:e.price_currency||"USD"}):null]})]},e.id)}),(0,s.jsx)("p",{className:"text-xs font-medium text-gray-600",children:q("price_reflect_vip")})]})})]})}):null,eI.length?(0,s.jsx)(d.Bc,{delayDuration:400,children:(0,s.jsxs)(d.m_,{children:[(0,s.jsx)(d.k$,{className:"flex items-center",children:(0,s.jsx)(r.E,{className:"h-4 shrink-0 border-none bg-gray-200 px-1.5 py-0.5 text-gray-700",children:(0,s.jsx)($.A,{width:12,height:12})})}),(0,s.jsx)(d.ZI,{align:"start",side:"bottom",children:(0,s.jsxs)("div",{className:"flex flex-col gap-1 px-3 py-2.5",children:[(0,s.jsx)("p",{className:"text-sm font-semibold text-gray-800",children:q("consignment")}),eI.map(e=>(0,s.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,s.jsx)(r.E,{className:"shrink-0 border-none px-1.5 py-0.5",style:{color:`color-mix(in srgb, ${e.color}, black 20%)`,background:`color-mix(in srgb, ${e.color}, white 70%)`},children:(0,s.jsx)($.A,{size:12})}),(0,s.jsx)("p",{children:`(${e.supplier_name})`})]},e.id))]})})]})}):null]}),(0,s.jsxs)("div",{className:"absolute bottom-0 left-0 flex items-center gap-0.5 md:hidden",children:[eS.length?(0,s.jsxs)(o.AM,{children:[(0,s.jsx)(o.Wv,{onClick:e=>e.stopPropagation(),className:"flex items-center",children:(0,s.jsx)(r.E,{className:"shrink-0 border-none bg-yellow-100 px-1.5 py-0.5 text-yellow-700",children:(0,s.jsx)(h.A,{size:12})})}),(0,s.jsx)(o.hl,{align:"start",children:(0,s.jsxs)("div",{className:"flex flex-col gap-1 px-3 py-2.5",children:[(0,s.jsx)("p",{className:"text-sm font-semibold text-gray-800",children:q("vip")}),eS.map(e=>{let t=e.category_type_display.split(" ").map(e=>e.toLowerCase()).join("_"),i=T.vo.find(e=>e.label===t);return(0,s.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,s.jsx)(r.E,{className:"shrink-0 border-none px-1.5 py-0.5",style:{color:`color-mix(in srgb, ${e.color}, black 20%)`,background:`color-mix(in srgb, ${e.color}, white 70%)`},children:(0,s.jsx)(h.A,{size:12})}),(0,s.jsx)("p",{children:`(${e.supplier_name})`}),(0,s.jsxs)("p",{className:"text-sm text-gray-500",children:[i?.value==="1"?q("free_shipping"):null,i?.value==="2"?q("discount_percent",{amount:(0,D.$4)(e.discount_units/100,H)}):null,i?.value==="3"?q("discount_plat",{amount:(0,D.$4)(e.discount_units/100,H),currency:e.price_currency||"USD"}):null,i?.value==="4"?q("discount_percent_and_free_shipping",{amount:(0,D.$4)(e.discount_units/100,H)}):null,i?.value==="5"?q("discount_plat_and_free_shipping",{amount:(0,D.$4)(e.discount_units/100,H),currency:e.price_currency||"USD"}):null]})]},e.id)}),(0,s.jsx)("p",{className:"text-xs font-medium text-gray-600",children:q("price_reflect_vip")})]})})]}):null,eI.length?(0,s.jsxs)(o.AM,{children:[(0,s.jsx)(o.Wv,{onClick:e=>e.stopPropagation(),className:"flex items-center",children:(0,s.jsx)(r.E,{className:"h-4 shrink-0 border-none bg-gray-200 px-1.5 py-0.5 text-gray-700",children:(0,s.jsx)($.A,{width:12,height:12})})}),(0,s.jsx)(o.hl,{align:"start",children:(0,s.jsxs)("div",{className:"flex flex-col gap-1 px-3 py-2.5",children:[(0,s.jsx)("p",{className:"text-sm font-semibold text-gray-800",children:q("consignment")}),eI.map(e=>(0,s.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,s.jsx)(r.E,{className:"shrink-0 border-none px-1.5 py-0.5",style:{color:`color-mix(in srgb, ${e.color}, black 20%)`,background:`color-mix(in srgb, ${e.color}, white 70%)`},children:(0,s.jsx)(h.A,{size:12})}),(0,s.jsx)("p",{children:`(${e.supplier_name})`})]},e.id))]})})]}):null]})]}):null]}),(0,s.jsxs)("div",{className:"flex grow flex-col justify-between",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-2 md:gap-2.5",children:[(0,s.jsxs)("div",{className:"flex shrink-0 items-center gap-1.5",children:[(0,s.jsx)(k.G,{initialValue:t.review_score_avg||0,size:16,SVGclassName:"inline-block",readonly:!0,allowFraction:!0}),(0,s.jsx)("span",{className:"mt-1 text-xs font-medium text-gray-700",children:t.review_score_avg}),(0,s.jsx)("span",{className:"mt-1 text-xs text-gray-400 underline",children:t.review_count}),t.manufacturer?.name&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"mt-1 hidden h-1 w-1 shrink-0 rounded-full bg-gray-300 md:block"}),(0,s.jsx)("span",{className:"mt-1 hidden truncate text-xs text-gray-500 md:inline",children:t.manufacturer.name})]})]}),t.manufacturer?.name&&(0,s.jsx)("p",{className:"-mt-1 truncate text-xs text-gray-500 md:hidden",children:t.manufacturer.name}),(0,s.jsxs)("div",{className:"-mt-1 flex w-full shrink-0 flex-col md:mt-0",children:[(0,s.jsx)(j(),{href:em(e),prefetch:!1,onClick:e=>e.stopPropagation(),className:"line-clamp-4 h-18 w-full rounded-sm text-sm font-semibold leading-4.5 text-gray-900 hover:text-blue-500 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand focus-visible:ring-offset-2",children:J}),t.mpn&&(0,s.jsxs)("p",{className:"mt-auto truncate text-11 text-gray-400",children:["MPN: ",t.mpn]})]})]}),(0,s.jsxs)("div",{className:"mt-auto flex flex-col gap-2",children:[ej&&!ew&&(0,s.jsxs)("div",{className:"flex shrink-0 items-center gap-1 text-gray-600 sm:gap-2.5",children:[(0,s.jsx)("button",{type:"button",className:"rounded-sm text-left text-xs hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand focus-visible:ring-offset-2",onClick:t=>{t.preventDefault(),t.stopPropagation(),K.push(em(e,"target=suppliers"))},children:1===ek?q("supplier_one",{count:ek}):q("suppliers",{count:ek})}),(e$>
10||eC)&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"h-1 w-1 rounded-full bg-gray-600"}),(0,s.jsxs)("span",{className:"line-clamp-1 text-xs",children:[e$," ",q("pcs")]})]})]}),(0,s.jsx)("div",{className:"flex flex-col gap-1",children:ew?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"h-3.5"}),(0,s.jsx)(n.v,{compact:!0})]}):ey?(0,s.jsx)(c.E,{className:"h-5.5 w-20"}):ej?eN?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("p",{className:"h-3.5 text-xs font-semibold text-[#CC0511] line-through",children:[(0,D.$g)(t.price_units_usd_min*(ec||1)/100,eo,H),t.price_units_usd_min<t.price_units_usd_max&&(0,s.jsxs)(s.Fragment,{children:[" - ",(0,D.$g)((t.price_units_usd_max||0)*(ec||1)/100,eo,H)]})," ",eo]}),(0,s.jsxs)("p",{className:"text-16 font-bold text-gray-900",children:[(0,D.$g)(ev.price_units_min*(ec||1)/100,eo,H),ev.price_units_min<ev.price_units_max&&(0,s.jsxs)(s.Fragment,{children:[" - ",(0,D.$g)(ev.price_units_max*(ec||1)/100,eo,H)]})," ",eo]})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"h-3.5"}),(0,s.jsxs)("p",{className:"text-16 font-bold text-gray-900",children:[(0,D.$g)(ev.price_units_min*(ec||1)/100,eo,H),ev.price_units_min<ev.price_units_max&&(0,s.jsxs)(s.Fragment,{children:[" - ",(0,D.$g)(ev.price_units_max*(ec||1)/100,eo,H)]})," ",eo]})]}):ed?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"h-3.5"}),(0,s.jsx)(n.v,{compact:!0})]}):t.price_units_usd_min>0?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"h-3.5"}),(0,s.jsxs)("p",{className:"text-16 font-bold text-gray-900",children:[(0,D.$g)(t.price_units_usd_min*(ec||1)/100,eo,H),t.price_units_usd_min<t.price_units_usd_max&&(0,s.jsxs)(s.Fragment,{children:[" - ",(0,D.$g)((t.price_units_usd_max||0)*(ec||1)/100,eo,H)]})," ",eo]})]}):null}),(0,s.jsxs)("div",{className:"flex w-full shrink-0 flex-col items-start gap-2 md:items-center",children:[ed?null:(t.suppliers?.length??0)===1&&!1===en?(0,s.jsx)(d.Bc,{children:(0,s.jsxs)(d.m_,{children:[(0,s.jsx)(d.k$,{asChild:!0,children:(0,s.jsxs)("div",{className:"w-full",children:[(0,s.jsx)(a.$,{variant:"outline",className:"h-auto w-full cursor-not-allowed p-2 text-sm font-semibold opacity-50 md:hidden",disabled:!0,children:q("buy")}),(0,s.jsx)(a.$,{className:"hidden h-auto w-full cursor-not-allowed p-2 text-sm font-semibold opacity-50 md:flex",disabled:!0,children:q("buy")})]})}),(0,s.jsx)(d.ZI,{children:(0,s.jsx)("p",{children:Z("no_permission")})})]})}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a.$,{variant:"outline",className:"h-auto w-full p-2 text-sm font-semibold md:hidden",onClick:eE,disabled:ez||eA||et?.type==="SUPPLIER",children:q((t.suppliers?.length??0)>1?"view_suppliers":"buy")}),(0,s.jsx)(a.$,{className:"hidden h-auto w-full p-2 text-sm font-semibold md:flex",onClick:eE,disabled:ez||eA||et?.type==="SUPPLIER",children:q((t.suppliers?.length??0)>1?"view_suppliers":"buy")})]}),(W=function(e){if(e.in_stock)return{variant:"in_stock",colorClass:F};let t=e.min_delivery_days;return null!=t&&t>0?{variant:"in_stock_days",colorClass:"text-blue-600",days:t}:0===t?{variant:"in_stock",colorClass:F}:{variant:"not_in_stock",colorClass:"text-[#B28C00]"}}(t),(0,s.jsx)("p",{className:(0,p.cn)("text-left text-xs font-semibold md:text-center",W.colorClass),children:"in_stock_days"===W.variant?q("in_stock_days",{count:W.days??0}):q(W.variant)}))]})]})]}),eN&&!ew?(0,s.jsx)("div",{className:"absolute left-2.5 top-2.5 flex flex-col items-start gap-1",children:(0,s.jsx)("p",{className:"bg-[#CC0511] px-1.5 py-1 text-xs font-semibold uppercase text-white",children:q("discount")})}):null,(0,s.jsx)("div",{className:"absolute right-2.5 top-2.5 block",children:(0,s.jsx)(d.Bc,{delayDuration:400,children:(0,s.jsxs)(d.m_,{children:[(0,s.jsx)(d.k$,{asChild:!0,children:(0,s.jsx)("div",{children:(0,s.jsx)(a.$,{variant:"ghost","aria-label":Z("wish_list"),"aria-pressed":eB,className:(0,p.cn)("h-auto w-auto rounded-full p-1.5",eB?"":"opacity-100",(!1===el||eF)&&"cursor-not-allowed opacity-50"),onClick:e=>{e.stopPropagation(),!1===el||eF||eW()},disabled:!1===el||eF,children:eF?(0,s.jsx)(g.A,{className:"size-6 animate-spin text-gray-400"}):eB?(0,s.jsx)(f.A,{className:"size-6 text-red-600",fill:"#DC2626"}):(0,s.jsx)(f.A,{className:"size-6 text-gray-400"})})})}),!1===el&&(0,s.jsx)(d.ZI,{align:"center",className:"max-w-50",children:Z("no_permission")})]})})})]})})},53764:(e,t,i)=>{var s=i(29726),n=i(78894),l=function(){return(l=Object.assign||function(e){for(var t,i=1,s=arguments.length;i<s;i++)for(var n in t=arguments[i])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}).apply(this,arguments)};function r(e,t,i){if(i||2==arguments.length)for(var s,n=0,l=t.length;n<l;n++)!s&&n in t||(s||(s=Array.prototype.slice.call(t,0,n)),s[n]=t[n]);return e.concat(s||Array.prototype.slice.call(t))}function a(e){var t=e.size,i=void 0===t?25:t,n=e.SVGstrokeColor,r=e.SVGstorkeWidth,a=e.SVGclassName,o=e.SVGstyle;return s.jsx("svg",l({className:void 0===a?"star-svg":a,style:o,stroke:void 0===n?"currentColor":n,fill:"currentColor",strokeWidth:void 0===r?0:r,viewBox:"0 0 24 24",width:i,height:i,xmlns:"http://www.w3.org/2000/svg"},{children:s.jsx("path",{d:"M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"})}))}function o(e,t){switch(t.type){case"PointerMove":return l(l({},e),{hoverValue:t.payload,hoverIndex:t.index});case"PointerLeave":return l(l({}
1,e),{ratingValue:e.ratingValue,hoverIndex:0,hoverValue:null});case"MouseClick":return l(l({},e),{valueIndex:e.hoverIndex,ratingValue:t.payload});default:return e}}function c(){return"u">typeof window&&window.matchMedia("(pointer: coarse)").matches||"ontouchstart"in window||"u">typeof navigator&&navigator.maxTouchPoints>0}!function(e,t){void 0===t&&(t={});var i=t.insertAt;if(e&&"u">typeof document){var s=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===i&&s.firstChild?s.insertBefore(n,s.firstChild):s.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}}(".style-module_starRatingWrap__q-lJC{display:inline-block;touch-action:none}.style-module_simpleStarRating__nWUxf{display:inline-block;overflow:hidden;position:relative;touch-action:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;vertical-align:middle;white-space:nowrap}.style-module_fillIcons__6---A{display:inline-block;overflow:hidden;position:absolute;top:0;white-space:nowrap}.style-module_emptyIcons__Bg-FZ{display:inline-block}.style-module_tooltip__tKc3i{background-color:#333;border-radius:5px;color:#fff;display:inline-block;padding:5px 15px;vertical-align:middle}"),t.G=function(e){var t,i,d=e.onClick,u=e.onPointerMove,p=e.onPointerEnter,m=e.onPointerLeave,x=e.initialValue,h=void 0===x?0:x,g=e.iconsCount,f=void 0===g?5:g,_=e.size,v=void 0===_?40:_,y=e.readonly,b=void 0!==y&&y,j=e.rtl,w=void 0!==j&&j,N=e.customIcons,k=void 0===N?[]:N,C=e.allowFraction,$=void 0!==C&&C,S=e.style,I=e.className,P=e.transition,A=e.allowHover,V=void 0===A||A,z=e.disableFillHover,M=void 0!==z&&z,E=e.fillIcon,D=void 0===E?null:E,T=e.fillColor,F=e.fillColorArray,G=e.fillStyle,B=e.fillClassName,L=e.emptyIcon,R=void 0===L?null:L,W=e.emptyColor,q=e.emptyStyle,U=e.emptyClassName,Z=e.allowTitleTag,K=e.showTooltip,O=e.tooltipDefaultText,H=e.tooltipArray,J=void 0===H?[]:H,X=e.tooltipStyle,Y=e.tooltipClassName,Q=e.SVGclassName,ee=void 0===Q?"star-svg":Q,et=e.titleSeparator,ei=e.SVGstyle,es=e.SVGstorkeWidth,en=void 0===es?0:es,el=e.SVGstrokeColor,er=void 0===el?"currentColor":el,ea=n.useReducer(o,{hoverIndex:0,valueIndex:0,ratingValue:h,hoverValue:null}),eo=ea[0],ec=eo.ratingValue,ed=eo.hoverValue,eu=eo.hoverIndex,ep=eo.valueIndex,em=ea[1];n.useEffect(function(){h&&em({type:"MouseClick",payload:0})},[h]);var ex=n.useMemo(function(){return $?2*f:f},[$,f]),eh=n.useMemo(function(){return h>ex?0:$||Math.floor(h)===h?Math.round(h/f*100):2*Math.ceil(h)*10},[$,h,f,ex]),eg=n.useMemo(function(){return($?2*h-1:h-1)||0},[$,h]),ef=n.useCallback(function(e){return f%2!=0?e/2/10:e*f/100},[f]),e_=function(e){for(var t=e.clientX,i=e.currentTarget.children[0].getBoundingClientRect(),s=i.left,n=i.right,l=i.width,r=w?n-t:t-s,a=ex,o=Math.round(l/ex),c=0;c<=ex;c+=1)if(r<=o*c){a=0===c&&r<o?0:c;break}var d=a-1;a>0&&(em({type:"PointerMove",payload:100*a/ex,index:d}),u&&ed&&u(ef(ed),d,e))},ev=function(e){ed&&(em({type:"MouseClick",payload:ed}),d&&d(ef(ed),eu,e))},ey=n.useMemo(function(){if(V){if(M){var e=ec&&ec||eh;return ed&&ed>e?ed:e}return ed&&ed||ec&&ec||eh}return ec&&ec||eh},[V,M,ed,ec,eh]);n.useEffect(function(){J.length>ex&&console.error("tooltipArray Array length is bigger then Icons Count length.")},[J.length,ex]);var eb=n.useCallback(function(e){return ed&&e[eu]||ec&&e[ep]||h&&e[eg]},[ed,eu,ec,ep,h,eg]),ej=n.useMemo(function(){return ed&&ef(ed)||ec&&ef(ec)||h&&ef(eh)},[ed,ef,ec,h,eh]);return s.jsxs("span",l({className:"style-module_starRatingWrap__q-lJC",style:{direction:"".concat(w?"rtl":"ltr")}},{children:[s.jsxs("span",l({className:"".concat("style-module_simpleStarRating__nWUxf"," ").concat(void 0===I?"react-simple-star-rating":I),style:l({cursor:b?"":"pointer"},S),onPointerMove:b?void 0:e_,onPointerEnter:b?void 0:function(e){p&&p(e),c()&&e_(e)},onPointerLeave:b?void 0:function(e){c()&&ev(),em({type:"PointerLeave"}),m&&m(e)},onClick:b?void 0:ev,"aria-hidden":"true"},{children:[s.jsx("span",l({className:"".concat("style-module_emptyIcons__Bg-FZ"," ").concat(void 0===U?"empty-icons":U),style:l({color:void 0===W?"#cccccc":W},q)},{children:r([],Array(f),!0).map(function(e,t){var i;return s.jsx(n.Fragment,{children:(null==(i=k[t])?void 0:i.icon)||R||s.jsx(a,{SVGclassName:ee,SVGstyle:ei,SVGstorkeWidth:en,SVGstrokeColor:er,size:v})},t)})})),s.jsx("span",l({className:"".concat("style-module_fillIcons__6---A"," ").concat(void 0===B?"filled-icons":B),style:l(((t={})[w?"right":"left"]=0,t.color=eb(void 0===F?[]:F)||(void 0===T?"#ffbc0b":T),t.transition=void 0!==P&&P?"width .2s ease, color .2s ease":"",t.width="".concat(ey,"%"),t),G),title:void 0===Z||Z?"".concat(ej," ").concat(void 0===et?"out of":et," ").concat(f):void 0},{children:r([],Array(f),!0).map(function(e,t){var i;return s.jsx(n.Fragment,{children:(null==(i=k[t])?void 0:i.icon)||D||s.jsx(a,{SVGclassName:ee,SVGstyle:ei,SVGstorkeWidth:en,SVGstrokeColor:er,size:v})},t)})}))]})),void 0!==K&&K&&s.jsx("span",l({className:"".concat("style-module_tooltip__tKc3i"," ").concat(void 0===Y?"react-simple-star-rating-tooltip":Y),style:l(((i={})[w?"marginRight":"marginLeft"]=20,i),X)},{children:(J.length>
10?eb(J):ej)||(void 0===O?"Your Rate":O)}))]}))}}}]);
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.