PageSourceSearch

https://www.landrover.it/etc.clientlibs/jlr/clientlibs/clientlib-d…essorieswishlist-js.78f73ea6901cad041d85.js

js landrover.it collected 2026-09-29 14:32:08 UTC 22,926 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkaem_maven_archetype=self.webpackChunkaem_maven_archetype||[]).push([["components-accessorieswishlist-accessorieswishlist-js","components-nameplatevisualiser-nameplatevisualiser-js"],{20147:function(e,t,r){r.r(t),r.d(t,{default:function(){return L}});var i=r(68469),n=r(86079),o=r(54011),a=r(71409),s=r(12285),l=r(41126);function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function c(e){return function(e){if(Array.isArray(e))return d(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return d(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?d(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,i=Array(t);r<t;r++)i[r]=e[r];return i}function f(){var e,t,r="function"==typeof Symbol?Symbol:{},i=r.iterator||"@@iterator",n=r.toStringTag||"@@toStringTag";function o(r,i,n,o){var l=i&&i.prototype instanceof s?i:s,u=Object.create(l.prototype);return m(u,"_invoke",function(r,i,n){var o,s,l,u=0,c=n||[],d=!1,f={p:0,n:0,v:e,a:m,f:m.bind(e,4),d:function(t,r){return o=t,s=0,l=e,f.n=r,a}};function m(r,i){for(s=r,l=i,t=0;!d&&u&&!n&&t<c.length;t++){var n,o=c[t],m=f.p,h=o[2];r>3?(n=h===i)&&(l=o[(s=o[4])?5:(s=3,3)],o[4]=o[5]=e):o[0]<=m&&((n=r<2&&m<o[1])?(s=0,f.v=i,f.n=o[1]):m<h&&(n=r<3||o[0]>i||i>h)&&(o[4]=r,o[5]=i,f.n=h,s=0))}if(n||r>1)return a;throw d=!0,i}return function(n,c,h){if(u>1)throw TypeError("Generator is already running");for(d&&1===c&&m(c,h),s=c,l=h;(t=s<2?e:l)||!d;){o||(s?s<3?(s>1&&(f.n=-1),m(s,l)):f.n=l:f.v=l);try{if(u=2,o){if(s||(n="next"),t=o[n]){if(!(t=t.call(o,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,s<2&&(s=0)}else 1===s&&(t=o.return)&&t.call(o),s<2&&(l=TypeError("The iterator does not provide a '"+n+"' method"),s=1);o=e}else if((t=(d=f.n<0)?l:r.call(i,f))!==a)break}catch(t){o=e,s=1,l=t}finally{u=1}}return{value:t,done:d}}}(r,n,o),!0),u}var a={};function s(){}function l(){}function u(){}t=Object.getPrototypeOf;var c=[][i]?t(t([][i]())):(m(t={},i,function(){return this}),t),d=u.prototype=s.prototype=Object.create(c);function h(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,m(e,n,"GeneratorFunction")),e.prototype=Object.create(d),e}return l.prototype=u,m(d,"constructor",u),m(u,"constructor",l),l.displayName="GeneratorFunction",m(u,n,"GeneratorFunction"),m(d),m(d,n,"Generator"),m(d,i,function(){return this}),m(d,"toString",function(){return"[object Generator]"}),(f=function(){return{w:o,m:h}})()}function m(e,t,r,i){var n=Object.defineProperty;try{n({},"",{})}catch(e){n=0}m=function(e,t,r,i){if(t)n?n(e,t,{value:r,enumerable:!i,configurable:!i,writable:!i}):e[t]=r;else{var o=function(t,r){m(e,t,function(e){return this._invoke(t,r,e)})};o("next",0),o("throw",1),o("return",2)}},m(e,t,r,i)}function h(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,i)}return r}function v(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?h(Object(r),!0).forEach(function(t){k(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):h(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function y(e,t,r,i,n,o,a){try{var s=e[o](a),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(i,n)}function p(e){return function(){var t=this,r=arguments;return new Promise(function(i,n){var o=e.apply(t,r);function a(e){y(o,i,n,a,s,"next",e)}function s(e){y(o,i,n,a,s,"throw",e)}a(void 0)})}}function _(e,t){for(var r=0;r<t.length;r++){var i=t[r];
1i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,A(i.key),i)}}function b(e,t,r){return t=g(t),function(e,t){if(t&&("object"==u(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,S()?Reflect.construct(t,r||[],g(e).constructor):t.apply(e,r))}function S(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(S=function(){return!!e})()}function g(e){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},g(e)}function w(e,t){return w=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},w(e,t)}function k(e,t,r){return(t=A(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function A(e){var t=function(e,t){if("object"!=u(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!=u(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==u(t)?t:t+""}var C="accessories-wishlist-form-target",q="data-wishlist-injected",O="AccessoriesWishlist__form-iframe--loading",j="AccessoriesWishlist__view--hidden",D=function(e){function t(e){var r,i,n,o,s,u,c,d;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),k(d=b(this,t,[e]),"_itemLabel",void 0),k(d,"_priceFormat",void 0),k(d,"_apiUrl",void 0),k(d,"_baseUrl",void 0),k(d,"_formUrl",void 0),k(d,"_service",void 0),k(d,"_groupByVehicleModel",void 0),k(d,"_filterByVehicleModel",void 0),k(d,"_drawerSkeleton",void 0),k(d,"_formSkeleton",void 0),k(d,"_formIframeLoadListenerAttached",!1),k(d,"uiSelectors",{drawerContainer:".AccessoriesWishlist__drawer-container",drawerSkeleton:".AccessoriesWishlist__skeleton",emptyWishlist:".AccessoriesWishlist__drawer-body [data-empty-wishlist]",formContainer:".AccessoriesWishlist__form-container",formContent:".AccessoriesWishlist__form-content",formBackButton:".AccessoriesWishlist__form-back",itemCount:".AccessoriesWishlist__total-cost [data-item-count]",sendToRetailerCta:".AccessoriesWishlist__drawer-footer [data-send-to-retailer-cta]",statusRegion:"[data-wishlist-status]",totalCost:".AccessoriesWishlist__total-cost [data-total-cost]",wishlist:".AccessoriesWishlist__drawer-body [data-wishlist]",wishlistItems:".AccessoriesWishlist__drawer-body [data-wishlist-items]"}),k(d,"_onVisibilityChange",function(){if("visible"===document.visibilityState){var e=d.element.querySelector(d.uiSelectors.formContainer);!1!==(null==e?void 0:e.classList.contains("AccessoriesWishlist__form-container--hidden"))&&d._fetchData()}}),d._itemLabel=null!==(r=e.getAttribute("data-item-label"))&&void 0!==r?r:void 0,d._priceFormat=null!==(i=e.getAttribute("data-price-format"))&&void 0!==i?i:"",d._formUrl=null!==(n=e.getAttribute("data-form-url"))&&void 0!==n?n:"";var f=null!==(o=e.getAttribute("data-api-url"))&&void 0!==o?o:"",m=null!==(s=e.getAttribute("data-base-url"))&&void 0!==s?s:"",h=null!==(u=e.getAttribute("data-brand"))&&void 0!==u?u:"",v=null!==(c=e.getAttribute("data-locale"))&&void 0!==c?c:"",y=e.hasAttribute("data-authentication-required");if(!(f&&m&&h&&v))throw new Error("AccessoriesWishlist requires data-api-url and data-base-url attributes.");return d._apiUrl=f,d._baseUrl=m,d._service=new l.A({brand:h,locale:v,authenticationRequired:y,urls:{api:f,media:m}}),d._groupByVehicleModel=e.hasAttribute("data-group-by-vehicle-model"),d._filterByVehicleModel=(0,a.qj)(e.getAttribute("data-filter-by-vehicle-model")),d._init(),d._dispatchQuantityChangedForCtaSync(),d}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&w(e,t)}(t,e),r=t,n=[{key:"_dispatchQuantityChangedForCtaSync",value:function(){var e=(0,a.Mj)();document.dispatchEvent(new CustomEvent(a.e6,{detail:{count:e},bubbles:!0}))}},{key:"_getItemsToDisplay",value:function(e){var t=this;return this._filterByVehicleModel.length?e.filter(function(e){return(0,a.UP)(e,t._filterByVehicleModel)}):e}},{key:"_formatTotalCost",value:function(e){var t,r,i,n,o=(null!==(t=null!==(r=this.element.getAttribute("data-locale"))&&void 0!==r?r:null===(i=document.documentElement)||void 0===i?void 0:i.lang)&&void 0!==t?t:"en-GB").replace(/_/g,"-"),a=e.toLocaleStr
1ing(o,{minimumFractionDigits:2,maximumFractionDigits:2}),s=(null!==(n=this._priceFormat)&&void 0!==n?n:"").trim();if(!s)return a;var l=s.match(/^([£$€¥])\s*/)||s.match(/\s*([£$€¥])$/),u=null!=s.match(/\s*([£$€¥])\s*$/),c=null==l?void 0:l[1];if(c)return u?"".concat(a," ").concat(c):"".concat(c).concat(a);var d=s.match(/\s*(zł|kr|R\$|CHF)\s*$/i);return d?"".concat(a," ").concat(d[1]):a}},{key:"_init",value:function(){this._createSkeleton();try{this._bindEvents()}catch(e){console.error(e)}}},{key:"_toggleView",value:function(e){var t=this.element.querySelector(this.uiSelectors.emptyWishlist),r=this.element.querySelector(this.uiSelectors.wishlist);if(t&&r){var i="empty"===e;i?(t.classList.remove(j),t.setAttribute("aria-hidden","false"),r.classList.add(j),r.setAttribute("aria-hidden","true")):(t.classList.add(j),t.setAttribute("aria-hidden","true"),r.classList.remove(j),r.setAttribute("aria-hidden","false")),i&&this._setSendToRetailerCtaDisabled(!0),this._unloadSkeleton()}}},{key:"_setSendToRetailerCtaDisabled",value:function(e){var t=this.element.querySelector(this.uiSelectors.sendToRetailerCta);t&&t.toggleAttribute("disabled",e)}},{key:"_ensureFormAndIframe",value:function(){var e=this.element.querySelector(this.uiSelectors.formContainer);if(e){var t=e.querySelector(this.uiSelectors.formContent);t||(t=(0,s.Kp)("div",["AccessoriesWishlist__form-content"]),e.appendChild(t));var r=e.querySelector("form[data-wishlist-form]"),i=e.querySelector('iframe[name="'.concat(C,'"]'));if(r&&i)return{form:r,iframe:i};r&&r.remove(),i&&i.remove();var n=(0,s.Kp)("form",[],{action:this._formUrl,method:"post",target:C,"data-wishlist-form":""}),o=(0,s.Kp)("iframe",[],{name:C});return o.classList.add(O),t.appendChild(n),t.appendChild(o),{form:n,iframe:o}}}},{key:"_buildWishlistItemPipeValue",value:function(e){var t,r,i,n,o,a,s;return[null!==(t=e.quantity)&&void 0!==t?t:"",null!==(r=null!==(i=e.reference)&&void 0!==i?i:e.partNumber)&&void 0!==r?r:"",null!==(n=e.vehicleModel)&&void 0!==n?n:"",null!==(o=e.priceFormatted)&&void 0!==o?o:"",null!==(a=e.name)&&void 0!==a?a:"",null!==(s=e.productUrl)&&void 0!==s?s:""].join("|")}},{key:"_injectWishlistDataAndSubmitForm",value:function(){var e=this;if(this._formUrl){var t=this._ensureFormAndIframe();if(t){var r=t.form;r.querySelectorAll("[".concat(q,"]")).forEach(function(e){return e.remove()});var i=(0,s.Kp)("input",[],k({type:"hidden",name:"wishlistId",value:"AOC-wishlist-".concat((0,o.A)())},q,"")),n=(0,s.Kp)("input",[],k({type:"hidden",name:"wishlistUrl",value:window.location.href},q,""));r.appendChild(i),r.appendChild(n);var l=(0,a._k)();this._getItemsToDisplay(l).forEach(function(t){var i=document.createElement("input");i.type="hidden",i.name="wishlistItem",i.value=e._buildWishlistItemPipeValue(t),i.setAttribute(q,""),r.appendChild(i)}),r.submit()}}}},{key:"_createFormSkeletonElement",value:function(){var e=(0,s.Kp)("div",["AccessoriesWishlist__form-skeleton","DxSkeleton-wrapper","DxSkeleton--fade-in"]),t=(0,s.Kp)("div",["AccessoriesWishlist__form-skeleton-content","DxSkeleton","DxSkeleton--loaded"]),r=(0,s.Kp)("div",["DxSkeleton__group","AccessoriesWishlist__form-skeleton-body"]);return r.style.setProperty("--_dxskeleton-group-direction","column"),r.style.setProperty("--_dxskeleton-group-gap","24px"),t.appendChild(r),e.appendChild(t),e}},{key:"_ensureFormSkeleton",value:function(){var e=this,t=this._ensureFormAndIframe();if(t){var r=t.iframe;r.classList.add(O);var n=this.element.querySelector(this.uiSelectors.formContainer);if(n){var o=n.querySelector(this.uiSelectors.formContent);if(o){var a=o.querySelector(".AccessoriesWishlist__form-skeleton");if(!a){var s,l=this.element.querySelector("[data-form-skeleton-template]");(a=null!=l&&null!==(s=l.content)&&void 0!==s&&s.firstElementChild?l.content.cloneNode(!0).firstElementChild:this._createFormSkeletonElement())&&o.insertBefore(a,r)}a&&(this._formSkeleton=new i.A({target:a,manualMode:!0}),this._formIframeLoadListenerAttached||(r.addEventListener("load",function(){return e._scheduleFormSkeletonUnload()}),this._formIframeLoadListenerAttached=!0))}}}}},{key:"_scheduleFormSkeletonUnload",value:function(){var e=this;requestAnimationFrame(function(){requestAnimationFrame(function(){window.setTimeout(function(){return e._unloadFormSkeleton()},150)})})}},{key:"_unloadFormSkeleton",value:function(){var e=this.element.querySelector('iframe[name="'.concat(C,'"]'));e&&e.classList.remove(O),this._formSkeleton&&(this._formSkeleton.unload({destroy:!0,destroyDelay:2e3}),this._formSkeleton=void 0)}},{key:"_createSkeleton",value:function(){var e=this.element.querySelector(this.uiSelectors.drawerSkeleton),t=this.element.querySelector(this.uiSelectors.drawerContainer);e&&e instanceof HTMLElement&&(this._drawerSkeleton=new i.A({target:e,swapTarget:null!=t?t:void 0,manualMode:!0}))}},{key:"_unloadSkeleton",value:function(){var e=this.element.querySelector(this.uiSelectors.drawerContainer);e instanceof HTMLElement&&(e.classList.remove("AccessoriesWishlist__drawer
1-container--not-loaded"),e.removeAttribute("style"),e.setAttribute("aria-busy","false")),this._drawerSkeleton&&this._drawerSkeleton.unload({destroy:!0,destroyDelay:2e3})}},{key:"_bindEvents",value:function(){var e=this;this._fetchData();var t=this.element.querySelector(this.uiSelectors.formBackButton);t&&t.addEventListener("click",function(){return e._toggleForm(!1)}),this.element.addEventListener("click",this._handleWishlistItemClick.bind(this)),document.addEventListener("visibilitychange",this._onVisibilityChange);var r=this.element.querySelector(this.uiSelectors.sendToRetailerCta);r&&r.addEventListener("click",function(){return e._toggleForm(!0)})}},{key:"_handleWishlistItemClick",value:function(e){var t,r,i,n=null===(t=(r=e.target).closest)||void 0===t?void 0:t.call(r,"[data-remove-item], [data-quantity-increment], [data-quantity-decrement]");if(n){var o=n.closest(".AccessoriesWishlist__item");if(o){var s=o.querySelector("[data-part-number]"),l=null==s||null===(i=s.textContent)||void 0===i?void 0:i.trim();l&&(n.matches("[data-remove-item]")?this._fadeOutThenRemove(o,l):n.matches("[data-quantity-increment]")?((0,a._V)(l,1),this._updateQuantityInView(l)):n.matches("[data-quantity-decrement]")&&((0,a._V)(l,-1),this._updateQuantityInView(l)))}}}},{key:"_fadeOutThenRemove",value:function(e,t){var r=this;e.classList.add("AccessoriesWishlist__item--leave");var i=!1,n=function(){if(!i){i=!0,e.removeEventListener("transitionend",n),clearTimeout(o);var s=1===(0,a._k)().length;(0,a.xK)(t);var l=r.element.getAttribute("data-a11y-item-removed-message");r._announceStatus(l),r._fetchData().then(function(){s&&r._focusDrawer()})}};e.addEventListener("transitionend",n,{once:!0});var o=window.setTimeout(n,330)}},{key:"_focusDrawer",value:function(){var e=this.element.closest(".DxDrawer"),t=null==e?void 0:e.querySelector(".DxDrawer__close");t&&t.focus()}},{key:"_announceStatus",value:function(e){var t=this.element.querySelector(this.uiSelectors.statusRegion);t&&e&&(t.textContent="",window.setTimeout(function(){t.textContent=e},80))}},{key:"_updateQuantityInView",value:function(e){var t,r,i=(0,a._k)(),n=i.find(function(t){return t.partNumber===e});if(n){var o=this.element.querySelector(this.uiSelectors.wishlistItems);if(o){var s=o.querySelectorAll(".AccessoriesWishlist__item"),l=Array.from(s).find(function(t){var r;return(null===(r=t.querySelector("[data-part-number]"))||void 0===r||null===(r=r.textContent)||void 0===r?void 0:r.trim())===e});if(l){var u=l.querySelector("[data-quantity]");u&&(u.textContent=String(null!==(t=n.quantity)&&void 0!==t?t:0));var c=this._getItemsToDisplay(i);this._updateItemCountDisplay(c),this._updateTotalCostDisplay(c);var d=this.element.getAttribute("data-a11y-quantity-updated-message"),f="".concat(d," ").concat(String(null!==(r=n.quantity)&&void 0!==r?r:0));this._announceStatus(f)}}}}},{key:"_resolveItemForDisplay",value:(m=p(f().m(function e(t){var r,i,n,o,a;return f().w(function(e){for(;;)switch(e.n){case 0:if(i=null===(r=t.apiUrl)||void 0===r?void 0:r.trim()){e.n=1;break}return e.a(2,v({},t));case 1:return e.p=1,e.n=2,this._service.getPartByPath(i);case 2:return a=e.v,e.a(2,v(v({},a),{},{partNumber:null!==(n=t.partNumber)&&void 0!==n?n:a.reference,productUrl:null!==(o=t.productUrl)&&void 0!==o?o:a.url,dateAdded:t.dateAdded,quantity:t.quantity}));case 3:return e.p=3,e.v,e.a(2,t)}},e,this,[[1,3]])})),function(e){return m.apply(this,arguments)})},{key:"_fetchData",value:(d=p(f().m(function e(){var t,r,i,n,o,s,l=this;return f().w(function(e){for(;;)switch(e.n){case 0:if(e.p=0,0!==(t=(0,a._k)()).length){e.n=1;break}return this._toggleView("empty"),e.a(2);case 1:return e.n=2,Promise.allSettled(t.map(function(e){return l._resolveItemForDisplay(e)}));case 2:r=e.v,i=r.map(function(e,r){return"fulfilled"===e.status?e.value:t[r]}),(0,a.yA)(i),n=this._getItemsToDisplay(i),this._clearRenderedList(),(this._groupByVehicleModel?c(n).sort(function(e,t){var r,i;return(null!==(r=e.vehicleModel)&&void 0!==r?r:"").localeCompare(null!==(i=t.vehicleModel)&&void 0!==i?i:"")}):n).forEach(function(e){return l._renderWishlistItem(e)}),this._updateItemCountDisplay(n),this._updateTotalCostDisplay(n),this._toggleView(n.length>0?"wishlist":"empty"),o="".concat(this.element.getAttribute("data-component")," ").concat(this.element.getAttribute("data-a11y-loaded-message"),"."),this._announceStatus(o),e.n=4;break;case 3:e.p=3,s=e.v,console.error(s),this._toggleView("empty");case 4:return e.a(2)}},e,this,[[0,3]])}
1)),function(){return d.apply(this,arguments)})},{key:"_updateItemCountDisplay",value:function(e){var t=(null!=e?e:(0,a._k)()).reduce(function(e,t){var r;return e+(null!==(r=t.quantity)&&void 0!==r?r:1)},0);this._setSendToRetailerCtaDisabled(t<=0);var r=this.element.querySelector(this.uiSelectors.itemCount);if(r){var i,n=null!==(i=this._itemLabel)&&void 0!==i?i:"one;Item;other;Items";r.textContent=this.getPlural(t,n)}}},{key:"_updateTotalCostDisplay",value:function(e){var t=(null!=e?e:(0,a._k)()).reduce(function(e,t){var r,i;return e+(null!==(r=t.totalPriceIncLocalTax)&&void 0!==r?r:0)*(null!==(i=t.quantity)&&void 0!==i?i:0)},0),r=this.element.querySelector(this.uiSelectors.totalCost);r&&(r.textContent=this._formatTotalCost(t))}},{key:"_clearRenderedList",value:function(){var e=this.element.querySelector(this.uiSelectors.wishlistItems);e&&(e.innerHTML="")}},{key:"on",value:function(e,t,r){this.element.addEventListener("AccessoriesWishlist::".concat(e),t,r)}},{key:"_renderWishlistItem",value:function(e){var t,r,i,n,o,a,s,l,u=this.element.querySelector(this.uiSelectors.wishlistItems);if(u){var c=this.element.querySelector("#example-wishlist-item");if(null!=c&&c.content){var d=c.content.cloneNode(!0).firstElementChild;if(d){var f=(null!==(t=e.imageThumbnailUrl)&&void 0!==t?t:"").trim(),m=d.querySelector(".AccessoriesWishlist__item-image");if(m&&this._baseUrl&&f){var h,v,y=f.startsWith("/")?f.slice(1):f,p=document.createElement("img");p.src="".concat(this._baseUrl,"/").concat(y),p.alt=(null===(h=e.name)||void 0===h?void 0:h.trim())||(null===(v=e.reference)||void 0===v?void 0:v.trim())||"Product Image",m.appendChild(p)}var _=d.querySelector(".AccessoriesWishlist__item-price");_&&(_.innerHTML=null!=(null==e?void 0:e.priceFormatted)?"".concat(e.priceFormatted,".00"):"");var b=(null!==(r=e.vehicleModel)&&void 0!==r?r:"").replace(/\bLand Rover\s*/gi,"").trim(),S=function(e,t){var r=d.querySelector(e);r&&(r.innerHTML=t)},g=d.querySelector("[data-remove-item]");if(g){var w,k,A=null===(w=g.textContent)||void 0===w?void 0:w.trim();g.setAttribute("aria-label","".concat(A," ").concat(null===(k=e.name)||void 0===k?void 0:k.trim()))}S("[data-product-name]",null!==(i=null===(n=e.name)||void 0===n?void 0:n.toLocaleUpperCase())&&void 0!==i?i:""),S("[data-product-brand]",b.toLocaleUpperCase()),S("[data-part-number]",null!==(o=e.reference)&&void 0!==o?o:""),S("[data-date-added]",null!==(a=e.dateAdded)&&void 0!==a?a:""),S("[data-quantity]",null!==(s=null===(l=e.quantity)||void 0===l?void 0:l.toString())&&void 0!==s?s:""),u.appendChild(d),this._toggleView("wishlist")}}}}},{key:"_toggleForm",value:function(e){var t=this.element.querySelector(this.uiSelectors.formContainer),r=this.element.querySelector(this.uiSelectors.drawerContainer);t&&r&&(t.classList.toggle("AccessoriesWishlist__form-container--hidden",!e),t.setAttribute("aria-hidden",e?"false":"true"),r.classList.toggle("AccessoriesWishlist__drawer-container--hidden",e),e&&this._formUrl&&(this._ensureFormSkeleton(),this._injectWishlistDataAndSubmitForm()))}}],n&&_(r.prototype,n),u&&_(r,u),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,u,d,m}(n.G),L=D},54011:function(e,t,r){var i;r.d(t,{A:function(){return d}});var n=new Uint8Array(16);function o(){if(!i&&!(i="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return i(n)}var a=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var s=function(e){return"string"==typeof e&&a.test(e)},l=[],u=0;u<256;++u)l.push((u+256).toString(16).substr(1));var c=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(l[e[t+0]]+l[e[t+1]]+l[e[t+2]]+l[e[t+3]]+"-"+l[e[t+4]]+l[e[t+5]]+"-"+l[e[t+6]]+l[e[t+7]]+"-"+l[e[t+8]]+l[e[t+9]]+"-"+l[e[t+10]]+l[e[t+11]]+l[e[t+12]]+l[e[t+13]]+l[e[t+14]]+l[e[t+15]]).toLowerCase();
vendor: 230 bytes, line 1
1if(!s(r))throw TypeError("Stringified UUID is invalid");return r};var d=function(e,t,r){var i=(e=e||{}).random||(e.rng||o)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t){r=r||0;for(var n=0;n<16;++n)t[r+n]=i[n];return t}return c(i)}}}]);

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.