/*! For license information please see userreviews.js.LICENSE.txt */ (self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[7313],{17402:(e,t,r)=>{"use strict";r.d(t,{n:()=>a});const a=(e,t,r,a,o,n)=>{o=o||"hawk-article-url",n=n||"hawk-article-name",t=(t||"hawk").toLowerCase(),r=(r||"zz").toLowerCase();const i=-1===(e||"").indexOf("go.redirectingat.com")||"custom-tracking"===a?"-":"_",s="hawk"===t?t:`${t}${i}${r}`;return a=a||"custom-tracking",(e=(e||"").replace("hawk-article-url",encodeURIComponent(o)).replace("hawk-article-name",encodeURIComponent(n)).replace("hawk-prefix",s)).replace(/hawk-custom-tracking/g,`${s}${i}${a}`)}},58370:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>s});var a=r(67294),o=r(87554),n=r(81210);const i=e=>{const{genericSharedComponents:{HawkWidgetStandard:t,ModelCodeReviews:r},type:o}=e;return o===n.qo.MISSING?null:a.createElement(t,e,a.createElement(r,{className:"userReviews"}))};i.getInitialiserProps=e=>{let{renderProps:{el:t,site:r,articleUrl:a,...n},attributes:i,getWidgetResponse:s,getSeasonalResponse:l,getAiredaleFeeds:c,getModelSuggestions:u,postForWidgetResponse:d,editorial:p,defaultParams:h,url:f,origin:m,dataLinkMerchant:g}=e;return(0,o.k)({editorial:p,defaultParams:h,url:f,origin:m,dataLinkMerchant:g,site:r,getWidgetResponse:s,getSeasonalResponse:l,getAiredaleFeeds:c,getModelSuggestions:u,postForWidgetResponse:d,placeholder:t,articleUrl:a,attributes:i,...n})};const s=i},58990:(e,t,r)=>{"use strict";r.d(t,{z:()=>a,t:()=>n});const a=(e,t)=>{switch(t){case"brand":return e.filter((e=>"filter_label[text_brand]"===e.filter_key));case"label":return e.filter((e=>"label"===e.category&&!["filter_label[text_network]","filter_label[text_brand]"].includes(e.filter_key)));case"monthlyCost":return e.filter((e=>"filter_monthly_cost"===e.filter_key));case"upfrontCost":return e.filter((e=>"filter_upfront"===e.filter_key&&"contract_price"===e.category));case"retailCost":return e.filter((e=>"filter_upfront"===e.filter_key&&"price"===e.category));case"cost":return e.filter((e=>"price"===e.category));case"contractCost":return e.filter((e=>"contract_price"===e.category));case"merchant":return e.filter((e=>"filter_merchants"===e.filter_key));case"basicContract":return e.filter((e=>"contract"===e.category&&"filter_upgrade"!==e.filter_key&&"filter_contract_length"!==e.filter_key&&"filter_data"!==e.filter_key));case"data":return e.filter((e=>"contract"===e.category&&"filter_data"===e.filter_key));case"model":return e.filter((e=>"model_name"===e.filter_key&&"model"===e.category));case"category":return e.filter((e=>"model_name"===e.filter_key&&"category"===e.category));case"contractLength":return e.filter((e=>"filter_contract_length"===e.filter_key));case"network":return e.filter((e=>"filter_label[text_network]"===e.filter_key));case"upgrade":return e.filter((e=>"filter_upgrade"===e.filter_key));case"package":return e.filter((e=>"filter_includes"===e.filter_key));case"speed":return e.filter((e=>"filter_speed"===e.filter_key));case"type":return e.filter((e=>"filter_type"===e.filter_key));case"colour":return e.filter((e=>"filter_label[text_colour]"===e.filter_key));default:return[]}};var o=r(31421);function n(e,t){const{blacklistedFilters:r}=(0,o.KF)(),n=r.split(","),i=e.filter((e=>!n.includes(e.title)));return a(i,t)}},39045:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});const a=e=>{if(e?.offer?.was_price){return(parseFloat((e.offer.was_price-parseFloat(e.offer.price)).toFixed(2))/e.offer.was_price*100).toFixed(0)}return null}},25572:(e,t,r)=>{"use strict";r.d(t,{$:()=>c});var a=r(23810),o=r(17402),n=r(14551),i=r(74414);const s=a.ZP.lib({resolved:{},chunkName:()=>"analytics-library-entry-getCustomTrackingIdServerside",isReady(e){const t=this.resolve(e);return!0===this.resolved[t]&&!!r.m[t]},importAsync:()=>r.e(6030).then(r.bind(r,65722)),requireAsync(e){const t=this.resolve(e);return this.resolved[t]=!1,this.importAsync(e).then((e=>(this.resolved[t]=!0,e)))},requireSync(e){const t=this.resolve(e);return r(t)},resolve(){return 65722}}),l=a.ZP.lib({resolved:{},chunkName:()=>"analytics-library-entry-getCustomTrackingId",isReady(e){const t=this.resolve(e);return!0===this.resolved[t]&&!!r.m[t]},importAsync:()=>r.e(5420).then(r.bind(r,37381)),requireAsync(e){const t=this.resolve(e);return this.resolved[t]=!1,this.importAsync(e).then((e=>(this.resolved[t]=!0,e)))},requireSync(e){const t=this.resolve(e);return r(t)},resolve(){return 37381}}),c=async e=>{let{deal:t,site:r,articleUrl:a,area:s,params:c,widget:u,forcedCustomTrackingId:d,link:p,linkText:h,articleName:f,rawLink:m}=e;if(t?.offer?.link){let e;{const{getCustomTrackingId:o}=await l.load();e=await o({params:{pageUrl:a,site:r,deal:t,area:s,battle:c&&c.battle||""},forcedCustomTrackingId:d,randomize:t.product_type===n.V.rewards})}const g=(u.id===i.U.DEAL||u.id===i.U.ANF_DEAL)&&p,v=g&&h?h:t?.offer?.linkText;return{...t,offer:{...t.offer,...v?{linkText:v}:{},link:(0,o.n)(m??(g?p:t.offer.link),r&&r.analyticsName,s,e,a,f),...t?.offer?.rawLink?{}:{rawLink:g?p:t.offer.link},custom_tracking_id:e}}}return{...t,offer:{...t.offer}}}},20759:(e,t,r)=>{"use strict";r.d(t,{Z:()=>l});var a=r(23810),o=r(17402),n=r(55874);const i=a.ZP.lib({resolved:{},chunkName:()=>"analytics-library-entry-getCustomTrackingIdServerside",isReady(e){const t=this.resolve(e);return!0===this.resolved[t]&&!!r.m[t]},importAsync:()=>r.e(6030).then(r.bind(r,65722)),requireAsync(e){const t=this.resolve(e);return this.resolved[t]=!1,this.importAsync(e).then((e=>(this.resolved[t]=!0,e)))},requireSync(e){const t=this.resolve(e);return r(t)},resolve(){return 65722}}),s=a.ZP.lib({resolved:{},chunkName:()=>"analytics-library-entry-getCustomTrackingId",isReady(e){const t=this.resolve(e);return!0===this.resolved[t]&&!!r.m[t]},importAsync:()=>r.e(5420).then(r.bind(r,37381)),requireAsync(e){const t=this.resolve(e);return this.resolved[t]=!1,this.importAsync(e).then((e=>(this.resolved[t]=!0,e)))},requireSync(e){const t=this.resolve(e);return r(t)},resolve(){return 37381}}),l=async(e,t,r,a,i,l)=>{e=e||{};const c=Object.keys(e.reviews||{}).map((t=>e.reviews[t]));if(c){const e=(()=>{const e=["asin","walmart"],r=["imdb","rt"];switch(t){case"asin":case"walmart":return[t];case"none":return[];case"reversePriority":return e.reverse();case"streamingScores":return r;default:return e}})(),u=(()=>{switch(t){case"priority":case"reversePriority":return 1;default:return e.length}})(),{customTrackingId:d}=(0,n.ie)(),p=[];for(let t=0;t["imdb","rt"].includes(r.code_name)?r.code_name===e[t]:r.code_name===e[t]&&r.reviews_url));if(n){let e;{const{getCustomTrackingId:t}=await s.load();e=await t({params:{pageUrl:i,site:r,review:n,area:a,battle:l},forcedCustomTrackingId:d})}n.reviews_customTrackingId=e,p.push({...n,reviews_url:(0,o.n)(n.reviews_url,r&&r.analyticsName,a,e)})}}return p}return[]}},60856:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});const a=e=>{switch(e){case"GBP":return"£";case"NGN":return"₦";case"JPY":return"¥";case"EUR":return"€";case"KRW":return"₩";case"USD":case"AUD":case"CAD":case"SGD":case"NZD":return"$";case"INR":return"₹";case"THB":return"฿";case"PHP":return"₱";case"IDR":return"Rp";case"MYR":return"RM";case"NOK":case"SEK":case"DKK":return"kr";default:return e}}},91144:(e,t,r)=>{"use strict";r.d(t,{Z:()=>d});const a={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let o;const n=new Uint8Array(16);function i(){if(!o&&(o="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!o))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return o(n)}const s=[];for(let e=0;e<256;++e)s.push((e+256).toString(16).slice(1));function l(e,t=0){return(s[e[t+0]]+s[e[t+1]]+s[e[t+2]]+s[e[t+3]]+"-"+s[e[t+4]]+s[e[t+5]]+"-"+s[e[t+6]]+s[e[t+7]]+"-"+s[e[t+8]]+s[e[t+9]]+"-"+s[e[t+10]]+s[e[t+11]]+s[e[t+12]]+s[e[t+13]]+s[e[t+14]]+s[e[t+15]]).toLowerCase()}const c=function(e,t,r){if(a.randomUUID&&!t&&!e)return a.randomUUID();const o=(e=e||{}).random||(e.rng||i)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t){r=r||0;for(let e=0;e<16;++e)t[r+e]=o[e];return t}return l(o)};var u=r(55874);const d=()=>{const{widgetId:e}=(0,u.ie)();return e||c()}},87554:(e,t,r)=>{"use strict";r.d(t,{k:()=>J});var a=r(81210),o=r(46524),n=r(74414),i=r(31994);const s=async e=>{if(t=e.options.props.widgetType,r=Boolean(e.options.props.params.filter_merchant_name),t!==n.U.VULTURE&&t!==n.U.EAGLE&&t!==n.U.TILE&&t!==n.U.SCROLLABLE_TILE||r)return e;var t,r;const a=[...new Set(e.model.tabConfigs.map((t=>e.model.tabData[t.value].offers.map((e=>e.merchant.name?(0,i.D)(e.merchant.name):e.merchant.name)))).flat())];if(!a.length)return e;const o=3*a.length,s=await e.options.props.getAiredaleFeeds({site:e.options.props.site.vanillaName??e.options.props.site.value,length:Math.max(100,o),retailerCategory:a.join(","),territory:e.options.props.territory});return{...e,model:{...e.model,tabData:{...e.model.tabConfigs.reduce(((t,r)=>({...t,[r.value]:{...e.model.tabData[r.value],offers:e.model.tabData[r.value].offers.map((e=>({...e,airedale_info:{canonicalUrl:s.find((t=>t.articlevoucherretailercategory?.toLowerCase()===e.merchant.name?.toLowerCase()))?.canonical}})))}})),{})}}}};var l=r(86492),c=r.n(l);const u=(e,t,r)=>{const{editorialOnPage:a,keywords:o,defaultParams:i}=t,{skip:s,excludeFrom:l,hiddenDealWidget:c}=e;let u=Boolean((s||"").split(",").find((e=>{switch(e){case"disabled":return!0;case"editorial":return a;case"phones":return"phones"===i?.articleCategory;case"retail":return"retail"===i?.articleCategory;case"dealsy":return o?.find((e=>["amazonprimeday","blackfriday","sensitive"].find((t=>{return(r=e,(r=(r=r||"").toLowerCase()).replace(/(_|-| )/g,"")).indexOf(t)>=0;var r}))||"deals"===i?.articleType));default:return!1}})));return(r.id===n.U.DEAL||r.id===n.U.ANF_DEAL)&&l&&c&&(u=!0),u};var d=r(55874),p=r(14551),h=r(90689),f=r(61129),m=r(78099);const g=(e,t,r,a)=>{if(t)return t;const o=(0,h._)({price:e?.offer?.price,currencyIso:e?.offer?.currency_iso,showOfferLabel:!1,type:(0,f.Z)(e),locale:r,translate:a,showPriceRounded:"no"})||"",n=(0,h._)({price:e?.contract?.monthly_price||null,currencyIso:e?.offer?.currency_iso,showOfferLabel:!1,type:(0,f.Z)(e),locale:r,translate:a,showPriceRounded:"no"})||"",i=(0,h._)({price:e?.contract?.length&&e?.contract?.monthly_price&&String(Number(e.contract.monthly_price)*e.contract.length)||null,currencyIso:e?.offer?.currency_iso,showOfferLabel:!1,type:(0,f.Z)(e),locale:r,translate:a,showPriceRounded:"no"})||"",s=e?.contract?.yearly_price,l=(0,h._)({price:e?.contract&&String(e.contract.yearly_price)||null,currencyIso:e?.offer?.currency_iso,showOfferLabel:!1,type:(0,f.Z)(e),locale:r,translate:a,showPriceRounded:"no"})||"",c=e?.contract?.data&&((e,t)=>{if(null==e)return t("n/a");if(999999===Math.floor(e))return t("unlimitedValue");if(e>=1e3){let r=e;return e%1024==0&&(r=1e3*Math.floor(e/1e3)),r/1e3+t("gigabyte")}return e+t("megabyte")})(e.contract.data,a);switch(e?.product_type){case 3e3:return s&&l&&0!==parseInt(e?.offer?.price,10)?a("inbodyTextBroadbandYearly",[e?.merchant?.name??"",e?.offer?.name,String(e?.contract?.speed),l,o]):s&&l?a("inbodyTextBroadbandYearlyFreeUpfront",[e?.merchant?.name??"",e?.offer?.name,String(e?.contract?.speed),l]):0!==parseInt(e?.offer?.price,10)?a("inbodyTextBroadbandMonthly",[e?.merchant?.name??"",e?.offer?.name,String(e?.contract?.speed),n,o]):a("inbodyTextBroadbandMonthlyFreeUpfront",[e?.merchant?.name??"",e?.offer?.name,String(e?.contract?.speed),n]);case 2500:return s&&l?a("inbodyTextSubscriptionsYearly",[(0,m.G)(e),l]):e?.contract?.length&&999999===e.contract.length?a("inbodyTextVPNLifetime",[o]):a("inbodyTextVPNMonthly",[String(e?.contract?.length),n,i]);case 2e3:return s&&l?a("inbodyTextContractsYearly",[(0,m.G)(e),o,c||"",l,e?.merchant?.name??""]):a("inbodyTextContractsMonthly",[(0,m.G)(e),o,c||"",n,e?.merchant?.name??""]);default:return a("inbodyTextRetail",[(0,m.G)(e),e?.merchant?.name??"",o])}},v=e=>{let t,{deal:r,widget:a,showFallback:o,localiser:i,localisedLinkText:s,modelName:l,showPrice:c}=e;return r.product_type===p.V.fallback&&s?r:(t=a.id===n.U.DEAL||a.id===n.U.ANF_DEAL?"editors-choice"===o?i.translate("editorsChoiceLinkText",[l]):s:((e,t,r,a,o)=>{switch(t.id){case n.U.BUTTON:return r?.product_type&&r.product_type!==p.V.similar?e.translate("checkPriceLinkText"):"";case n.U.DEAL:return a||e.translate("alternativeLinkText");case n.U.MERCHANT_LINK:case n.U.TABLETOP:if("noPrice"===o)return"";if(r?.offer&&r?.product_type&&r.product_type===p.V.multimedia){if("stream"===o)return r.offer?.price&&Number(r.offer.price)>0?r.merchant&&e.translate("multimediaStreamOn",[String(r.merchant.name)]):r.merchant&&e.translate("multimediaStreamOnWithoutFor",[String(r.merchant.name)]);if("availableToStream"===o)return r.merchant&&e.translate("multimediaAvailableToStream",[String(r.merchant.name)])}return r?.offer&&r?.product_type===p.V.fallback&&!r?.offer?.price?`${e.translate("priceLinkLinkText")}`:r?.offer&&(r?.product_type&&r.product_type===p.V.similar||!r?.offer?.price)?`${e.translate("merchantLinkWidgetItemBuySimilarLabel")} ${r?.merchant?.name||"merchant"}`:r?.merchant&&e.translate("priceLinkAtMerchant",[String(r.merchant.name)]);case n.U.STREAMING:return"noPrice"===o?"":r?.offer&&r?.product_type&&(r.product_type===p.V.multimedia||r.product_type===p.V.subscription)?r?.merchant&&e.translate("multimediaWatchAtWithoutFor",[String(r.merchant.name)]):!r?.offer||!r?.product_type||r.product_type!==p.V.similar&&r?.offer?.price?r?.merchant&&e.translate("priceLinkAtMerchant",[String(r.merchant.name)]):`${e.translate("merchantLinkWidgetItemBuySimilarLabel")} ${r?.merchant?.name||"merchant"}`;case n.U.INBODY:return g(r,a,e.language,e.translate.bind(e));case n.U.PRODUCT_BLOCK:return e.translate("shopNow");default:return""}})(i,a,{...r},s,c),t?{...r,offer:{...r.offer,merchant_link_text:t,link_text:t}}:r)};var y=r(54998),b=r.n(y),_=r(60856),w=r(16435);const k=e=>{let{dataLinkMerchant:t,link:r,linkText:a,localiser:o,modelName:n,editorialCurrency:i,editorialPrice:s,editorialWasPrice:l,editorialMerchantName:c}=e;const u=c||(t?.name??(r?new(b())(r).domain():"merchant"));return{an:t?.network||null,bundle_models:[],click_count:0,click_count_weekly:0,click_count_monthly:0,image:null,label_image:null,last_update:0,mobile_match_score:0,model_id:0,percentage:0,popularity:0,product_key:"",score:0,shipping:{prime:!1,url:null},id:0,match_id:0,product_type:300,offer:{link:r??"",name:n,link_text:a??"",merchant_link_text:a??"",label:o.translate("offerLabelNoPrice"),price:s||"",in_stock:!0,stock_quantity:null,currency_iso:i||"GBP",currency_symbol:i&&(0,_.Z)(i)||"£",percentage_saving:null,percentage_saving_label:null,money_saving:null,money_saving_label:null,display_name:n,display_labels:"",was_price:null===l?void 0:Number(l)},merchant:{id:t?.id||null,name:u,url:t?.url||null,logo_url:"",territory:"",preference:0},model:n,requested_model:n,model_matched:[n],model_image:(0,w.Z)("misc/blank.png")}};var S=r(25572);const P=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r={};return Object.keys(t).forEach((a=>{const o=t[a];if("string"==typeof o){const n=o.indexOf("{{");if(n>=0){const i=o.substring(n).replace(/([{}]*)/g,"");let s={...e};i.split(".").forEach((e=>{s=s[e]})),r[a]=`${t[a].substring(0,n)}${s}`}else r[a]=o}else r[a]=o})),r},x=(e,t)=>{const r=t.shift();return r?x(e[r],t):e},A=e=>{let{localiser:t,customPromo:r,customPromos:a,promos:o}=e;if(a){const e=(e=>JSON.parse(c().decode(e)))(a);return e.map((e=>({type:"custom-promo",value:t.translate(e),display_value:t.translate(e)}))).concat(o)}return r?[{type:"custom-promo",value:t.translate(r),display_value:t.translate(r)}].concat(o):o};var T=r(39045);const I=e=>{let{showWasPrice:t,percentageOffThreshold:r,localiser:a,deal:o,customPromo:i,customPromos:s,excludeFrom:l,showPromos:c,widget:u}=e;const d=(e=>{let{showWasPrice:t,percentageOffThreshold:r,localiser:a,deal:o}=e;if(!o)return o;const{offer:n,promos:i}=o,s=i??[];if(!n?.was_price)return s;const l=e=>Boolean(i?.some((t=>t.type===e))),c=(0,T.Z)(o);if(["promoPercentage","allPercentage"].includes(t??"")){if(l("was-price-percentage"))return s;if(c&&void 0!==r&&Number(c)>=r){const e=a.translate("percentageDiscount",[c]);return[{type:"was-price-percentage",value:e,display_value:e}].concat(s)}return s}if(["promoSaving","allSaving"].includes(t??"")){if(l("was-price-light"))return s;if(!c||void 0!==r&&Number(c){let{excludeFrom:t,localiser:r,widget:a,promos:o,showPromos:i}=e;return t?[{value:r.translate("reportedOutOfStockPromo"),display_value:r.translate("reportedOutOfStockPromo"),type:""}]:a&&a.id===n.U.BUNDLE&&o?o.filter((e=>"bundle"!==e.type)):i?o:[]})({localiser:a,excludeFrom:l,promos:A({localiser:a,customPromo:i,customPromos:s,promos:d}),showPromos:c,widget:u})},z=async e=>{const{dataLinkMerchant:t,showPrice:r="",showWasPrice:a="",percentageOffThreshold:o,showPromos:n,localiser:i,site:s,area:l,articleName:c,articleUrl:u,link:p,linkText:h="",params:f,widget:m,overrides:g,customPromo:y,excludeFrom:b,showFallback:_,customPromos:w,preserveEditorialLink:A,defaultTab:T,editorialCurrency:z="",editorialPrice:C="",editorialWasPrice:F="",editorialMerchantName:U=""}=e;let{data:L}=e;L=L||{};const{customTrackingId:E}=(0,d.ie)(),R=(e=>{const{overrides:t}=(0,d.ie)();return t&&t.length>0?t:e||[]})(g).find((e=>e.dealTypes&&e.dealTypes.indexOf(L.offer_type)>=0)),O=f&&f.model_name,D=h&&i.translate(h),Q=(e=>{let{dataLinkMerchant:t,link:r,localisedLinkText:a,offers:o,preserveEditorialLink:n,pageSize:i,localiser:s,modelName:l,editorialCurrency:c,editorialPrice:u,editorialWasPrice:d,editorialMerchantName:p}=e;const h=Boolean(r&&(0===o.length||o.length===o.filter((e=>200===e.product_type)).length&&o.length{const t=v({localiser:i,localisedLinkText:D,showFallback:_,showPrice:r,modelName:O,widget:m,deal:e}),d=R&&((e,t)=>{let r=!0;if(t){const{value:a,fields:o}=t;r=x(e,o)===a}return r})(t,R.condition),h=d?((e,t)=>Object.keys(e).reduce(((r,a)=>Array.isArray(e[a])?{...r,[a]:(t[a]||[]).concat(e[a])}:"object"==typeof e[a]?{...r,[a]:{...r[a],...P(r,e[a])}}:{...r,[a]:e[a]}),t))(R.overrides,{...t}):t,g=I({percentageOffThreshold:o,showWasPrice:a,localiser:i,deal:h,customPromo:y,customPromos:w,excludeFrom:b,showPromos:n,widget:m}),k=await(0,S.$)({deal:h,site:s,articleName:c,articleUrl:u,params:f,area:l,link:p,linkText:D,widget:m,forcedCustomTrackingId:E,rawLink:null});return{...h,...k,promos:g}})))};var C=r(20759),F=r(72739),U=r(58990);const L=(e,t)=>t[e.filter_key]?t[e.filter_key].split(","):[],E=(e,t)=>{const r=L(e,t),a=e&&e.values?e.values:[],o=r.length>0?r:a.map((e=>String(e.value))),n=[];return o.forEach((e=>{const t=a.find((t=>String(t.value).toLowerCase()===e.toLowerCase()));t&&n.push(t)})),n},R=e=>{let{data:t,params:r,features:a,widget:o,localiser:i,models:s,area:l}=e;const c=(e=>{let{data:t,params:r,features:a,area:o,widget:i,localiser:s,models:l}=e;const{counts:c={},filters:u=[]}=t||{},{tabs:d,showBundleOffers:p,link:h}=a,f=u.find((e=>{if("priority"===d){const t="label"===e.category,r=e?.values?.find((e=>e.tab_active));return t&&r}return"review"===i.id&&"filter_label[text_game_platform]"===e.filter_key&&e}));if("requestedModel"===d){const e=u.find((e=>"popular_model"===e.type));return e?(e.values||[]).map((e=>({value:e.formatted_value,label:e.formatted_value,countProperty:t.offer_type,params:{model_name:e.formatted_value},category:"model",pageSize:r.rows||1}))):Object.keys(l).map((e=>({value:e,label:e,countProperty:t.offer_type,params:{model_name:e},category:"model",pageSize:r.rows||1})))}if("nighthawk"===i.id)return(0,U.z)(u,"label").length>0?[{value:"deals",label:s.translate("specifications"),countProperty:"deals",params:{filter_product_types:"deals,similar"},category:"retail",pageSize:r.rows||4}]:[];if(c.broadband>0)return[{value:"broadband",label:s.translate("comparisonBroadbandTabLabel"),countProperty:"broadband",params:{filter_product_types:"broadband"},category:"broadband",pageSize:r.rows||3}];if(c.multimedia>0)return[{value:"multimedia",label:s.translate("multimediaTabLabel"),countProperty:"multimedia",params:{filter_product_types:"multimedia"},category:"multimedia",pageSize:r.rows||3}];if(c.subscriptions>0)return[{value:"subscriptions",label:s.translate("reviewSubscriptionsTabLabel"),countProperty:"subscriptions",params:{filter_product_types:"subscriptions"},category:"subscriptions",pageSize:r.rows||3}];if(c.contracts>0){const e=[],t=u.find((e=>"network"===d&&"filter_label[text_network]"===e.filter_key));return t?E(t,r).filter((e=>""!==e.value)).map((e=>({value:String(e.value).toLowerCase().replace(/ /g,"-"),label:s.translate(e.formatted_value),image:e.image_url,countProperty:"contracts",params:{[t.filter_key]:e.value},category:"contracts",pageSize:r.rows||3}))):(e.push({value:"contracts",label:i.id===n.U.COMPARISON?s.translate("comparisonContractsTabLabel"):s.translate("reviewContractsTabLabel"),countProperty:"contracts",params:{filter_product_types:"contracts"},category:"contracts",pageSize:r.rows||3}),(c.deals>0||c.similar>0)&&e.push({value:"deals",label:s.translate("reviewHandsetsTabLabel"),countProperty:"deals",params:{filter_product_types:"deals"},category:"retail",pageSize:r.rows||4}),"simOnly"===d&&c.contracts>0&&"GB"===o&&e.push({value:"simOnly",label:s.translate("comparisonSimOnlyTabLabel"),countProperty:"contracts",params:{model_name:"Sim Only",filter_product_types:"contracts"},category:"contracts",pageSize:r.rows||3}),e)}if(c.deals>0||c.similar>0){if(f){const e=e=>{const t=(f.values||[]).find((t=>t.tab_active&&(t.value===e.value||parseFloat(String(t.value))===parseFloat(String(e.value)))));return t?{value:String(e.value).toLowerCase().replace(/ /g,"-"),rawValue:String(e.value),label:s.translate(e.formatted_value),image:t.image_url,mobileImage:t.mobile_image_url,countProperty:"deals",params:{[f.filter_key]:e.value},category:"retail",type:f.type,pageSize:r.rows||4}:null},t=E(f,r).reduce(((t,r)=>{const a=e(r);return a?t.concat([a]):t}),[]),a=L(f,r),o=t.map((e=>e.params[f.filter_key]));if((f.values||[]).filter((e=>-1===o.indexOf(e.value))).length>0&&t.push({value:"other",rawValue:"null",label:s.translate("reviewOtherPlatformTabLabel"),image:t.find((e=>e.image))||0===t.length?(0,w.Z)("misc/three_dots.png"):null,countProperty:"deals",params:{[f.filter_key.replace("filter_label","filter_label_blacklist")]:o.join(",")},category:"retail",type:f.type,pageSize:r.rows||4}),t.length>0)return a.length>0?a.reduce(((e,r)=>{const a=t.find((e=>e.rawValue&&e.rawValue.toLowerCase()===r.toLowerCase()));return a?e.concat(a):e}),[]):t}const e=[{value:"deals",label:s.translate("reviewRetailTabLabel"),countProperty:"deals",params:{filter_product_types:"deals,similar"},category:"retail",pageSize:r.rows||4}];return p&&e.push({value:"bundle",label:s.translate("bundleTabLabel"),countProperty:"deals",params:{filter_product_types:"deals",bundle_models:1},category:"retail",pageSize:r.rows||4}),e}return c.offers>0?[{value:"offers",label:s.translate("offersTabLabel"),countProperty:"offers",params:{filter_product_types:"offers"},category:"offers",pageSize:r.rows||3}]:c.vouchers>0?[{value:"vouchers",label:s.translate("offersVouchersTabLabel"),countProperty:"vouchers",params:{filter_product_types:"vouchers"},category:"vouchers",pageSize:r.rows||3}]:c.offer_deals>0?[{value:"offer_deals",label:s.translate("offersDealsTabLabel"),countProperty:"offer_deals",params:{filter_product_types:"offer_deals"},category:"offer_deals",pageSize:r.rows||3}]:c.fallback>0||h?[{value:"fallback",label:s.translate("fallbackLabel"),countProperty:"fallback",params:{filter_product_types:"fallback"},category:"retail",pageSize:r.rows||4}]:c.unique_codes>0?[{value:"unique_codes",label:s.translate("offersUniqueCodesTabLabel"),countProperty:"unique_codes",params:{filter_product_types:"unique_codes"},category:"unique_codes",pageSize:r.rows||3}]:c.newsletter>0?[{value:"newsletter",label:s.translate("newsletterTabLabel"),countProperty:"newsletter",params:{filter_product_types:"newsletter"},category:"newsletter",pageSize:r.rows||3}]:c.rewards>0?[{value:"rewards",label:s.translate("rewardsTabLabel"),countProperty:"rewards",params:{filter_product_types:"rewards"},category:"rewards",pageSize:r.rows||3}]:[]})({data:t,params:r,features:a,area:l,widget:o,localiser:i,models:s});return{tabConfigs:c,defaultTab:(()=>{const e=(0,F.e)("hawk-review-widget-tab");if(e&&c.find((t=>t.value===e&&"gamePlatform"===t.type))){const t=(c||[]).find((t=>t.value===e));if(t)return t}return c&&c[0]?c[0]:null})()}},O=(e,t)=>{try{"undefined"!=typeof window&&(window.localStorage[`hawk-${t}`]=JSON.stringify(e))}catch(e){}},D=async e=>{const{model:t,options:r}=e,{localiser:o,features:i,props:s}=r,{params:l,site:d,articleName:p,articleUrl:h,widget:f,dataLinkMerchant:m,modelBrand:g}=s,{defaultTab:v,tabConfigs:y,widgetResponse:b,tabData:_,battleDealOverrides:w,tabParams:k,widgetMissing:S}=t,{models:P,battle:x}=b?.ok?b.data:{models:{},battle:null},A=((e,t)=>t||e||"GB")(s.territory,b?.ok?b.data.area:null),T={...s,area:A,widgetIntroduction:s.widgetIntroduction&&c().decode(s.widgetIntroduction).trim().replace(/(\\n|\\)/g,""),data:_,params:k,tabConfigs:y,defaultTab:v,getTabConfigs:(e,t)=>{const{tabConfigs:r}=R({data:e,params:t,features:i,widget:f,localiser:o,models:P,area:A});return r},models:P,reviews:await(async()=>{const e=Object.keys(P||{}),t=v?v.value:null;if(t&&e&&e.length>0&&_[t]&&_[t].model_info){const r=e.map((e=>P[e])).reduce(((e,t)=>(e||(e=t),e)));return(0,C.Z)(_[t].model_info[r]||{},i.showReviews??"",d,A,h,x)}return[]})(),getDealData:async(e,t)=>{e=e||{},t=t||w;const r=await z({dataLinkMerchant:m,data:e,...i,params:l,localiser:o,site:d,area:A,articleName:p,articleUrl:h,overrides:t,widget:f,defaultTab:v}),a=e?.model_info??{0:{brand:g,model_name:l?.model_name}};return{deals:r,totalDeals:e.counts&&void 0!==e.counts[e.offer_type]?e.counts[e.offer_type]:r.length,dealType:e.offer_type,modelInfo:a}}};if(T.dealData=await T.getDealData(v?_[v.value]:{}),!S&&v&&((e,t,r)=>{let{showNoDeals:a}=r;return!0===e?.ok&&(t&&t.deals&&t.deals.length>0||!0===a)})(t.widgetResponse,T.dealData,i)){return u(T,r,T.widget)?{props:T,type:a.qo.SKIPPED}:(function(e,t){O({data:e,battleId:arguments.length>2&&void 0!==arguments[2]?arguments[2]:null},`${t}`)}(_[v.value],T.widgetId,T.battleId),{props:T,type:a.qo.SUCCESS})}const{only_fallback_offers:I}=l;if(r.props.widget.id===n.U.DEAL||r.props.widget.id===n.U.ANF_DEAL||I&&v)return{props:T,type:a.qo.SUCCESS};if(!b)return{props:T,type:a.qo.SKIPPED};return!b.ok?{props:T,type:a.qo.PRESERVED}:{props:T,type:a.qo.MISSING}};var Q=r(33631),N=r(84633);const q=(e,t)=>{const{params:r,site:a,platform:o,editorial:i,widget:s,name:l}=e,{widgetType:c}=(0,N.Z)(["widgetType"]);return"0"===String(0)&&c?c:"trd"===a.id&&s.id===n.U.REVIEW&&t&&"contracts"===t.value?n.U.POCKET:"responsive"===o&&"review"===r.article_type&&t&&"deals"===t.value&&s.id===n.U.REVIEW&&!i&&"BOT widget"!==l?n.U.MERCHANT_LINK:t&&"label_text_game_platform"===t.type&&s.id===n.U.REVIEW?n.U.TABS:"buying_guide"===r.article_type&&s.id===n.U.MERCHANT_LINK&&t&&"subscriptions"===t.value?n.U.PRICE:s.id},j=async e=>{const t={battleDealOverrides:[],battleFeatures:null,widgetMissing:!1,widgetChanged:!1,reFetchData:!1,tabConfigs:[],defaultTab:null,tabData:{},tabParams:{}},{props:{widget:r,params:a,getWidgetResponse:o}}=e;if(!((e,t)=>{const{model_name:r,model_id:a,offer:o,match_id:i,only_fallback_offers:s}=t;return!!(e?.id!==n.U.DEAL&&e?.id!==n.U.ANF_DEAL||i)&&!s&&Boolean(r||a||o)})(r,a))return{options:e,model:t};const{props:i,widgetFeatures:s,apiFeatures:l,features:c}=(e=>{let{props:t,widgetFeatures:r,apiFeatures:a,features:o}=e;const i=q(t,null);if(t.widget.id!==i&&i===n.U.NIGHTHAWK){const e=(0,Q.Z)(i);r.setAttribute("widget",e),a.setAttribute("widget",e);const o=r.getFeatures("id");return{widgetFeatures:r,apiFeatures:a,features:o,props:{...t,...o,params:a.getFeatures("value",!0),widget:e}}}return{widgetFeatures:r,apiFeatures:a,features:o,props:t}})(e),u=await o(a);return{options:{...e,apiFeatures:l,widgetFeatures:s,features:c,props:i},model:{...t,widgetResponse:u}}},M=(e,t)=>{if(e&&e.variants&&e.variants.length>0){const{variants:r}=e,a=((e,t,r)=>{const a=(0,N.Z)(["battle"]),o=a&&a.battle?a.battle:"",n=t&&t.params&&t.params.battle?t.params.battle:"",i=o||n;if(/\d*-v\d*/.test(i)){const t=i.match(new RegExp(`^${e}-v(\\d)`));if(t&&t&&t[1])return parseInt(t[1],10)}if(/\d*-\d*/.test(i)){const e=Number(i.split("-")[1]);return r.findIndex((t=>t.id===e))}return 0})(e.id,t,r),o="number"==typeof a?a:0,n=r[o];return n?{...n,variantNumber:o}:null}return null},B=(e,t,r,a)=>{if(e&&function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0;return 0===e.length||e.filter((e=>{let{attribute:t}=e;return"modelName"!==t})).every((e=>{let{attribute:o,values:n}=e;return(n||[]).some((e=>"widgetType"===o?e===t.widget.id:"editorial"===o?Boolean(parseInt(e,10))===t[o]:"modelId"!==o||!r||!!Object.values(r).find((t=>String(t)===e))||Boolean(Object.keys(r).find((t=>{const o=r[t];return(a&&a.model_info&&a.model_info[o]&&a.model_info[o].parents?a.model_info[o].parents:[]).find((t=>String(t.id)===e))})))))}))}(e.criteria,t,r,a)){const r=M(e,t),a=[];return r&&r.deal_types&&r.deal_types.length>0&&a.push({overrides:r.overrides,dealTypes:r.deal_types,condition:r.condition}),{battleFeatures:r?r.features:null,battleDealOverrides:a,test:e,variant:r}}return{}},$=(e,t)=>{if(0===t.offers.filter((e=>200!==e.product_type)).length&&e.offers.length>0)return e.offers;if(t.offers.length>0&&e.offers.length>0){const r=t.offers.filter((t=>!e.offers.find((e=>e.match_id===t.match_id)))).sort(((e,t)=>t.score0&&0===e.offers.length?t.offers:e.offers},H=e=>{let{tab:t,tabConfigs:r,defaultTab:a,getDataForAllTabs:o,showFilters:n,index:i,reFetchData:s}=e;return a&&t.value===a.value?!!(t.params&&Object.keys(t.params).filter((e=>e.indexOf("filter_")>=0&&"filter_product_types"!==e)).length>0)||(!!s||!!(n&&r.length>1)):!(!o||0===i)||"bundle"===t.value},Z=async e=>{const{options:t,model:r}=e,{apiFeatures:a,widgetFeatures:o,props:i,features:s}=t,{widget:l,getWidgetResponse:c}=i,{widgetResponse:u,defaultTab:d,reFetchData:p,widgetMissing:h,tabConfigs:f}=r;if(h||!u?.ok)return e;const{widget:{data:m}}=u.data,g=await(async e=>{const{defaultTab:t,tabConfigs:r,data:a,params:o,showFilters:i,reFetchData:s,widget:l}=e,c=Boolean(o.bundle_models)||t&&"model"===t.category||l.id===n.U.SPECS,u={},d={};for(const[n,l]of r.entries()){const p={...o,...l.params||{}},h=H({tab:l,tabConfigs:r,defaultTab:t,getDataForAllTabs:c,showFilters:i,index:n,reFetchData:s}),f={model_info:{},offers:[],filters:[]};if(t&&l.value===t.value&&!h)u[l.value]=a,d[l.value]=o;else if(h){const t=await e.getWidgetResponse(p);t.ok?(u[l.value]=t.data.widget.data,d[l.value]=p):(u[l.value]=f,d[l.value]=p)}else u[l.value]=f,d[l.value]=p}return{tabData:u,tabParams:d}})({defaultTab:d,tabConfigs:f,data:m,params:i.params,showFilters:s.showFilters??!1,reFetchData:p,widget:l,getWidgetResponse:c}),v=((e,t,r)=>{if(r&&t&&t.find((e=>"bundle"===e.value))){const a=e.bundle,o=e[r.value];o&&o.offers&&a&&a.offers&&(e[r.value]={...e[r.value],offers:$(a,o)},delete e.bundle,t=t.filter((e=>"bundle"!==e.value)))}return{tabConfigs:t,data:e}})(g.tabData,f,d);o.setAttribute("defaultTab",d),a.setAttribute("defaultTab",d);const y=o.getFeatures("id");return{options:{...t,props:{...i,...y,params:a.getFeatures("value",!0)},widgetFeatures:o,apiFeatures:a,features:y},model:{...r,tabData:v.data,tabConfigs:v.tabConfigs,tabParams:g.tabParams}}},W=(e,t,r)=>{const a=[];return Array.from(new Set(Object.keys(e).concat(Object.keys(t)))).forEach((o=>{if(t[o]!==e[o])if("filter_product_types"===o){-1===(t[o]||"").split(",").indexOf(r)&&a.push(o)}else a.push(o)})),a.length>0},V=async e=>{const t=(e=>{const{options:t,model:r}=e,{features:a,localiser:o,props:n}=t,{params:i,widget:s}=n,{widgetResponse:l}=r,{models:c,area:u,widget:{data:d}}=l?.ok?l.data:{models:{},area:null,widget:{data:{}}},{tabConfigs:p,defaultTab:h}=R({data:d,params:i,features:a,widget:s,localiser:o,models:c,area:u}),f=((e,t)=>!(e&&(e.value||e.type)&&t&&t.length>0))(h,p);if(f)return{options:t,model:{...r,defaultTab:h,tabConfigs:p,widgetMissing:f}};const m=q(n,h);return s.id!==m?{options:{...t,props:{...n,widgetTypeComponent:m,widget:(0,Q.Z)(m)}},model:{...r,widgetChanged:!0,defaultTab:h,tabConfigs:p,widgetMissing:f}}:{options:{...t,props:{...n,widgetTypeComponent:m}},model:{...r,widgetChanged:!1,defaultTab:h,tabConfigs:p,widgetMissing:f}}})(await j(e)),r=(e=>{const{options:t,model:r}=e,{apiFeatures:a,widgetFeatures:o,props:i}=t,{widgetResponse:s,widgetMissing:l}=r;if(l||!s?.ok||!s.data.battle)return e;const{widget:{data:c},models:u,battle:d}=s.data,{battleFeatures:p,battleDealOverrides:h,test:f,variant:m}=B(d,i,u,c);if(a.setAttribute("battleFeatures",p),o.setAttribute("battleFeatures",p),p&&p.switchMerchantlinkToReview&&(p.widgetType=n.U.REVIEW),p&&p.widgetType){const e=(0,Q.Z)(p.widgetType);return{options:{...t,apiFeatures:a,widgetFeatures:o,props:{...i,widget:e,widgetTypeComponent:e.id,battle:{test:f,variant:{id:m?.id||0,name:m?.name||""}}}},model:{...r,battleDealOverrides:h,battleFeatures:p,widgetChanged:!0}}}return{options:{...t,apiFeatures:a,widgetFeatures:o,props:{...i,battle:{test:f,variant:{id:m?.id||0,name:m?.name||""}}}},model:{...r,battleDealOverrides:h,battleFeatures:p}}})(t),a=(e=>{const{options:t,model:r}=e,{apiFeatures:a,widgetFeatures:o,localiser:i,props:s}=t,{widget:l,params:c}=s,{widgetResponse:u,battleFeatures:d,widgetChanged:p,widgetMissing:h}=r;if(h||!u?.ok)return e;const{widget:{data:f},models:m,area:g}=u.data;if(p){o.setAttribute("widget",l),a.setAttribute("widget",l);const e=a.getFeatures("value",!0),n=R({data:f,params:e,features:o.getFeatures("id"),widget:l,localiser:i,models:m,area:g}),{tabConfigs:u,defaultTab:d}=n;return{options:{...t,widgetFeatures:o,apiFeatures:a,props:{...s,...o.getFeatures("id"),params:{...c,...e}}},model:{...r,reFetchData:W(c,e,f?.offer_type),tabConfigs:u,defaultTab:d}}}if(d){const e=a.getFeatures("value",!0);return{options:{...t,widgetFeatures:o,apiFeatures:a,props:{...s,...o.getFeatures("id"),params:{...c,...e}}},model:{...r,reFetchData:W(c,e,f?.offer_type)}}}return{options:t,model:{...r,reFetchData:l.id===n.U.SPECS}}})(r),o=await Z(a),i=await s(o);return D(i)},K=async e=>{let{props:t}=e;const{params:r,getSeasonalResponse:o,keywords:n}=t,i=await o(r),s=((e,t)=>{if(!e.ok)return a.qo.PRESERVED;if(!e.data.link)return a.qo.MISSING;const r=e.data.link?.tags;return t&&r&&r?.length>0?r.some((e=>t.includes(e)))?a.qo.SUCCESS:a.qo.SKIPPED:a.qo.SUCCESS})(i,n);return{props:{...t,seasonalResponse:i},type:s}};var G=r(87218);var Y=r(91144);const J=async e=>{const{editorial:t,placeholder:r,defaultParams:i,index:s,site:l,platform:c,territory:d,localiser:p,url:h,keywords:f,getWidgetResponse:m,getSeasonalResponse:g,getAiredaleFeeds:v,getModelSuggestions:y,postForWidgetResponse:b,articleId:_,articleName:w,articleUrl:k,origin:S,dataLinkMerchant:P}=e;let{attributes:x}=e;const A=(e=>{if((e||"").indexOf("iframe.html")>=0)return[]})(k),T=(0,N.Z)(A),I=((e,t)=>{const r=(0,G.J)(n.U,e);if(r)return(0,Q.Z)(r);const a=(0,G.J)(n.U,t);if(!a)throw new Error(`Invalid widget type: ${t}`);return(0,Q.Z)(a)})(x.displayType,x.widgetType);x={...i,...x,...T};const z=new o.Hf(x,I,t,c,p,l,d,f,S),C=new o.LN(x,I,t,c,p,l,d,f),F=C.getFeatures("id"),U={...z.getFeatures("value"),...z.getLabels()},L=u(F,e,I),E={getWidgetResponse:m,getSeasonalResponse:g,getAiredaleFeeds:v,getModelSuggestions:y,postForWidgetResponse:b,widget:I,editorial:t,placeholder:r??null,site:l,platform:c,territory:d,localiser:p,language:p.language,translate:p.translate.bind(p),url:h,index:s,articleId:_??"",articleName:w,articleUrl:k,keywords:f,...F,params:U,widgetTypeComponent:I.id,widgetId:(0,Y.Z)(),dataLinkMerchant:P};if(L)return{props:E,type:a.qo.SKIPPED};((e,t,r,a)=>{O({articleType:r,articleCategory:a,territory:e,language:t.articleLanguage,hawkLanguage:t.language},"article")})(d,p,U.article_type,U.article_category);const R=I.id===n.U.SEASONAL?K:V;return await R({props:E,apiFeatures:z,widgetFeatures:C,localiser:p,features:F})}},33631:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var a=r(3262);const o=e=>{const t=a.Z.find((t=>t.id===e||t.aliases?.includes(e)));if(!t)throw new Error(`Widget ${e} not found in widgetConfigs`);return t}},2251:function(e,t,r){var a,o;!function(n,i){"use strict";e.exports?e.exports=i():void 0===(o="function"==typeof(a=i)?a.call(t,r,t,e):a)||(e.exports=o)}(0,(function(e){"use strict";var t=e&&e.IPv6;return{best:function(e){var t,r,a=e.toLowerCase().split(":"),o=a.length,n=8;for(""===a[0]&&""===a[1]&&""===a[2]?(a.shift(),a.shift()):""===a[0]&&""===a[1]?a.shift():""===a[o-1]&&""===a[o-2]&&a.pop(),-1!==a[(o=a.length)-1].indexOf(".")&&(n=7),t=0;t1);s++)r.splice(0,1);a[i]=r.join("")}var l=-1,c=0,u=0,d=-1,p=!1;for(i=0;ic&&(l=d,c=u)):"0"===a[i]&&(p=!0,d=i,u=1);u>c&&(l=d,c=u),c>1&&a.splice(l,c,""),o=a.length;var h="";for(""===a[0]&&(h=":"),i=0;i=e.length-1)return!1;var a=e.lastIndexOf(".",t-1);if(a<=0||a>=t-1)return!1;var o=r.list[e.slice(t+1)];return!!o&&o.indexOf(" "+e.slice(a+1,t)+" ")>=0},is:function(e){var t=e.lastIndexOf(".");if(t<=0||t>=e.length-1)return!1;if(e.lastIndexOf(".",t-1)>=0)return!1;var a=r.list[e.slice(t+1)];return!!a&&a.indexOf(" "+e.slice(0,t)+" ")>=0},get:function(e){var t=e.lastIndexOf(".");if(t<=0||t>=e.length-1)return null;var a=e.lastIndexOf(".",t-1);if(a<=0||a>=t-1)return null;var o=r.list[e.slice(t+1)];return o?o.indexOf(" "+e.slice(a+1,t)+" ")<0?null:e.slice(a+1):null},noConflict:function(){return e.SecondLevelDomains===this&&(e.SecondLevelDomains=t),this}};return r}))},54998:function(e,t,r){var a,o,n;!function(i,s){"use strict";e.exports?e.exports=s(r(33132),r(2251),r(76106)):(o=[r(33132),r(2251),r(76106)],void 0===(n="function"==typeof(a=s)?a.apply(t,o):a)||(e.exports=n))}(0,(function(e,t,r,a){"use strict";var o=a&&a.URI;function n(e,t){var r=arguments.length>=1;if(!(this instanceof n))return r?arguments.length>=2?new n(e,t):new n(e):new n;if(void 0===e){if(r)throw new TypeError("undefined is not a valid argument for URI");e="undefined"!=typeof location?location.href+"":""}if(null===e&&r)throw new TypeError("null is not a valid argument for URI");return this.href(e),void 0!==t?this.absoluteTo(t):this}n.version="1.19.11";var i=n.prototype,s=Object.prototype.hasOwnProperty;function l(e){return e.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function c(e){return void 0===e?"Undefined":String(Object.prototype.toString.call(e)).slice(8,-1)}function u(e){return"Array"===c(e)}function d(e,t){var r,a,o={};if("RegExp"===c(t))o=null;else if(u(t))for(r=0,a=t.length;r]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/gi,n.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?«»“”„‘’]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g},n.leading_whitespace_expression=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,n.ascii_tab_whitespace=/[\u0009\u000A\u000D]+/g,n.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},n.hostProtocols=["http","https"],n.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/,n.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"},n.getDomAttribute=function(e){if(e&&e.nodeName){var t=e.nodeName.toLowerCase();if("input"!==t||"image"===e.type)return n.domAttributes[t]}},n.encode=g,n.decode=decodeURIComponent,n.iso8859=function(){n.encode=escape,n.decode=unescape},n.unicode=function(){n.encode=g,n.decode=decodeURIComponent},n.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/gi,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/gi,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}},urnpath:{encode:{expression:/%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/gi,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}},n.encodeQuery=function(e,t){var r=n.encode(e+"");return void 0===t&&(t=n.escapeQuerySpace),t?r.replace(/%20/g,"+"):r},n.decodeQuery=function(e,t){e+="",void 0===t&&(t=n.escapeQuerySpace);try{return n.decode(t?e.replace(/\+/g,"%20"):e)}catch(t){return e}};var v,y={encode:"encode",decode:"decode"},b=function(e,t){return function(r){try{return n[t](r+"").replace(n.characters[e][t].expression,(function(r){return n.characters[e][t].map[r]}))}catch(e){return r}}};for(v in y)n[v+"PathSegment"]=b("pathname",y[v]),n[v+"UrnPathSegment"]=b("urnpath",y[v]);var _=function(e,t,r){return function(a){var o;o=r?function(e){return n[t](n[r](e))}:n[t];for(var i=(a+"").split(e),s=0,l=i.length;s-1&&(t.fragment=e.substring(r+1)||null,e=e.substring(0,r)),(r=e.indexOf("?"))>-1&&(t.query=e.substring(r+1)||null,e=e.substring(0,r)),"//"===(e=(e=e.replace(/^(https?|ftp|wss?)?:+[/\\]*/i,"$1://")).replace(/^[/\\]{2,}/i,"//")).substring(0,2)?(t.protocol=null,e=e.substring(2),e=n.parseAuthority(e,t)):(r=e.indexOf(":"))>-1&&(t.protocol=e.substring(0,r)||null,t.protocol&&!t.protocol.match(n.protocol_expression)?t.protocol=void 0:"//"===e.substring(r+1,r+3).replace(/\\/g,"/")?(e=e.substring(r+3),e=n.parseAuthority(e,t)):(e=e.substring(r+1),t.urn=!0)),t.path=e,t},n.parseHost=function(e,t){e||(e="");var r,a,o=(e=e.replace(/\\/g,"/")).indexOf("/");if(-1===o&&(o=e.length),"["===e.charAt(0))r=e.indexOf("]"),t.hostname=e.substring(1,r)||null,t.port=e.substring(r+2,o)||null,"/"===t.port&&(t.port=null);else{var i=e.indexOf(":"),s=e.indexOf("/"),l=e.indexOf(":",i+1);-1!==l&&(-1===s||l-1?o:e.length-1);return i>-1&&(-1===o||i-1?h.slice(0,f)+h.slice(f).replace(i,""):h.replace(i,"")).length<=c[0].length||r.ignore&&r.ignore.test(h))){var v=t(h,u,p=u+h.length,e);void 0!==v?(v=String(v),e=e.slice(0,u)+v+e.slice(p),a.lastIndex=u+v.length):a.lastIndex=p}}return a.lastIndex=0,e},n.ensureValidHostname=function(t,r){var a=!!t,o=!1;if(!!r&&(o=p(n.hostProtocols,r)),o&&!a)throw new TypeError("Hostname cannot be empty, if protocol is "+r);if(t&&t.match(n.invalid_hostname_characters)){if(!e)throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');if(e.toASCII(t).match(n.invalid_hostname_characters))throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-:_]')}},n.ensureValidPort=function(e){if(e){var t=Number(e);if(!(/^[0-9]+$/.test(t)&&t>0&&t<65536))throw new TypeError('Port "'+e+'" is not a valid port')}},n.noConflict=function(e){if(e){var t={URI:this.noConflict()};return a.URITemplate&&"function"==typeof a.URITemplate.noConflict&&(t.URITemplate=a.URITemplate.noConflict()),a.IPv6&&"function"==typeof a.IPv6.noConflict&&(t.IPv6=a.IPv6.noConflict()),a.SecondLevelDomains&&"function"==typeof a.SecondLevelDomains.noConflict&&(t.SecondLevelDomains=a.SecondLevelDomains.noConflict()),t}return a.URI===this&&(a.URI=o),this},i.build=function(e){return!0===e?this._deferred_build=!0:(void 0===e||this._deferred_build)&&(this._string=n.build(this._parts),this._deferred_build=!1),this},i.clone=function(){return new n(this)},i.valueOf=i.toString=function(){return this.build(!1)._string},i.protocol=w("protocol"),i.username=w("username"),i.password=w("password"),i.hostname=w("hostname"),i.port=w("port"),i.query=k("query","?"),i.fragment=k("fragment","#"),i.search=function(e,t){var r=this.query(e,t);return"string"==typeof r&&r.length?"?"+r:r},i.hash=function(e,t){var r=this.fragment(e,t);return"string"==typeof r&&r.length?"#"+r:r},i.pathname=function(e,t){if(void 0===e||!0===e){var r=this._parts.path||(this._parts.hostname?"/":"");return e?(this._parts.urn?n.decodeUrnPath:n.decodePath)(r):r}return this._parts.urn?this._parts.path=e?n.recodeUrnPath(e):"":this._parts.path=e?n.recodePath(e):"/",this.build(!t),this},i.path=i.pathname,i.href=function(e,t){var r;if(void 0===e)return this.toString();this._string="",this._parts=n._parts();var a=e instanceof n,o="object"==typeof e&&(e.hostname||e.path||e.pathname);e.nodeName&&(e=e[n.getDomAttribute(e)]||"",o=!1);if(!a&&o&&void 0!==e.pathname&&(e=e.toString()),"string"==typeof e||e instanceof String)this._parts=n.parse(String(e),this._parts);else{if(!a&&!o)throw new TypeError("invalid input");var i=a?e._parts:e;for(r in i)"query"!==r&&s.call(this._parts,r)&&(this._parts[r]=i[r]);i.query&&this.query(i.query,!1)}return this.build(!t),this},i.is=function(e){var t=!1,a=!1,o=!1,i=!1,s=!1,l=!1,c=!1,u=!this._parts.urn;switch(this._parts.hostname&&(u=!1,a=n.ip4_expression.test(this._parts.hostname),o=n.ip6_expression.test(this._parts.hostname),s=(i=!(t=a||o))&&r&&r.has(this._parts.hostname),l=i&&n.idn_expression.test(this._parts.hostname),c=i&&n.punycode_expression.test(this._parts.hostname)),e.toLowerCase()){case"relative":return u;case"absolute":return!u;case"domain":case"name":return i;case"sld":return s;case"ip":return t;case"ip4":case"ipv4":case"inet4":return a;case"ip6":case"ipv6":case"inet6":return o;case"idn":return l;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return c}return null};var S=i.protocol,P=i.port,x=i.hostname;i.protocol=function(e,t){if(e&&!(e=e.replace(/:(\/\/)?$/,"")).match(n.protocol_expression))throw new TypeError('Protocol "'+e+"\" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]");return S.call(this,e,t)},i.scheme=i.protocol,i.port=function(e,t){return this._parts.urn?void 0===e?"":this:(void 0!==e&&(0===e&&(e=null),e&&(":"===(e+="").charAt(0)&&(e=e.substring(1)),n.ensureValidPort(e))),P.call(this,e,t))},i.hostname=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0!==e){var r={preventInvalidHostname:this._parts.preventInvalidHostname};if("/"!==n.parseHost(e,r))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');e=r.hostname,this._parts.preventInvalidHostname&&n.ensureValidHostname(e,this._parts.protocol)}return x.call(this,e,t)},i.origin=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){var r=this.protocol();return this.authority()?(r?r+"://":"")+this.authority():""}var a=n(e);return this.protocol(a.protocol()).authority(a.authority()).build(!t),this},i.host=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e)return this._parts.hostname?n.buildHost(this._parts):"";if("/"!==n.parseHost(e,this._parts))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');return this.build(!t),this},i.authority=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e)return this._parts.hostname?n.buildAuthority(this._parts):"";if("/"!==n.parseAuthority(e,this._parts))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');return this.build(!t),this},i.userinfo=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){var r=n.buildUserinfo(this._parts);return r?r.substring(0,r.length-1):r}return"@"!==e[e.length-1]&&(e+="@"),n.parseUserinfo(e,this._parts),this.build(!t),this},i.resource=function(e,t){var r;return void 0===e?this.path()+this.search()+this.hash():(r=n.parse(e),this._parts.path=r.path,this._parts.query=r.query,this._parts.fragment=r.fragment,this.build(!t),this)},i.subdomain=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var r=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,r)||""}var a=this._parts.hostname.length-this.domain().length,o=this._parts.hostname.substring(0,a),i=new RegExp("^"+l(o));if(e&&"."!==e.charAt(e.length-1)&&(e+="."),-1!==e.indexOf(":"))throw new TypeError("Domains cannot contain colons");return e&&n.ensureValidHostname(e,this._parts.protocol),this._parts.hostname=this._parts.hostname.replace(i,e),this.build(!t),this},i.domain=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("boolean"==typeof e&&(t=e,e=void 0),void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var r=this._parts.hostname.match(/\./g);if(r&&r.length<2)return this._parts.hostname;var a=this._parts.hostname.length-this.tld(t).length-1;return a=this._parts.hostname.lastIndexOf(".",a-1)+1,this._parts.hostname.substring(a)||""}if(!e)throw new TypeError("cannot set domain empty");if(-1!==e.indexOf(":"))throw new TypeError("Domains cannot contain colons");if(n.ensureValidHostname(e,this._parts.protocol),!this._parts.hostname||this.is("IP"))this._parts.hostname=e;else{var o=new RegExp(l(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(o,e)}return this.build(!t),this},i.tld=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("boolean"==typeof e&&(t=e,e=void 0),void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var a=this._parts.hostname.lastIndexOf("."),o=this._parts.hostname.substring(a+1);return!0!==t&&r&&r.list[o.toLowerCase()]&&r.get(this._parts.hostname)||o}var n;if(!e)throw new TypeError("cannot set TLD empty");if(e.match(/[^a-zA-Z0-9-]/)){if(!r||!r.is(e))throw new TypeError('TLD "'+e+'" contains characters other than [A-Z0-9]');n=new RegExp(l(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(n,e)}else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");n=new RegExp(l(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(n,e)}return this.build(!t),this},i.directory=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e||!0===e){if(!this._parts.path&&!this._parts.hostname)return"";if("/"===this._parts.path)return"/";var r=this._parts.path.length-this.filename().length-1,a=this._parts.path.substring(0,r)||(this._parts.hostname?"/":"");return e?n.decodePath(a):a}var o=this._parts.path.length-this.filename().length,i=this._parts.path.substring(0,o),s=new RegExp("^"+l(i));return this.is("relative")||(e||(e="/"),"/"!==e.charAt(0)&&(e="/"+e)),e&&"/"!==e.charAt(e.length-1)&&(e+="/"),e=n.recodePath(e),this._parts.path=this._parts.path.replace(s,e),this.build(!t),this},i.filename=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("string"!=typeof e){if(!this._parts.path||"/"===this._parts.path)return"";var r=this._parts.path.lastIndexOf("/"),a=this._parts.path.substring(r+1);return e?n.decodePathSegment(a):a}var o=!1;"/"===e.charAt(0)&&(e=e.substring(1)),e.match(/\.?\//)&&(o=!0);var i=new RegExp(l(this.filename())+"$");return e=n.recodePath(e),this._parts.path=this._parts.path.replace(i,e),o?this.normalizePath(t):this.build(!t),this},i.suffix=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e||!0===e){if(!this._parts.path||"/"===this._parts.path)return"";var r,a,o=this.filename(),i=o.lastIndexOf(".");return-1===i?"":(r=o.substring(i+1),a=/^[a-z0-9%]+$/i.test(r)?r:"",e?n.decodePathSegment(a):a)}"."===e.charAt(0)&&(e=e.substring(1));var s,c=this.suffix();if(c)s=e?new RegExp(l(c)+"$"):new RegExp(l("."+c)+"$");else{if(!e)return this;this._parts.path+="."+n.recodePath(e)}return s&&(e=n.recodePath(e),this._parts.path=this._parts.path.replace(s,e)),this.build(!t),this},i.segment=function(e,t,r){var a=this._parts.urn?":":"/",o=this.path(),n="/"===o.substring(0,1),i=o.split(a);if(void 0!==e&&"number"!=typeof e&&(r=t,t=e,e=void 0),void 0!==e&&"number"!=typeof e)throw new Error('Bad segment "'+e+'", must be 0-based integer');if(n&&i.shift(),e<0&&(e=Math.max(i.length+e,0)),void 0===t)return void 0===e?i:i[e];if(null===e||void 0===i[e])if(u(t)){i=[];for(var s=0,l=t.length;s= 0x80 (not a basic code point)","invalid-input":"Invalid input"},_=l-c,w=Math.floor,k=String.fromCharCode;function S(e){throw new RangeError(b[e])}function P(e,t){for(var r=e.length,a=[];r--;)a[r]=t(e[r]);return a}function x(e,t){var r=e.split("@"),a="";return r.length>1&&(a=r[0]+"@",e=r[1]),a+P((e=e.replace(y,".")).split("."),t).join(".")}function A(e){for(var t,r,a=[],o=0,n=e.length;o=55296&&t<=56319&&o65535&&(t+=k((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=k(e)})).join("")}function I(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function z(e,t,r){var a=0;for(e=r?w(e/p):e>>1,e+=w(e/t);e>_*u>>1;a+=l)e=w(e/_);return w(a+(_+1)*e/(e+d))}function C(e){var t,r,a,o,n,i,d,p,g,v,y,b=[],_=e.length,k=0,P=f,x=h;for((r=e.lastIndexOf(m))<0&&(r=0),a=0;a=128&&S("not-basic"),b.push(e.charCodeAt(a));for(o=r>0?r+1:0;o<_;){for(n=k,i=1,d=l;o>=_&&S("invalid-input"),((p=(y=e.charCodeAt(o++))-48<10?y-22:y-65<26?y-65:y-97<26?y-97:l)>=l||p>w((s-k)/i))&&S("overflow"),k+=p*i,!(p<(g=d<=x?c:d>=x+u?u:d-x));d+=l)i>w(s/(v=l-g))&&S("overflow"),i*=v;x=z(k-n,t=b.length+1,0==n),w(k/t)>s-P&&S("overflow"),P+=w(k/t),k%=t,b.splice(k++,0,P)}return T(b)}function F(e){var t,r,a,o,n,i,d,p,g,v,y,b,_,P,x,T=[];for(b=(e=A(e)).length,t=f,r=0,n=h,i=0;i=t&&yw((s-r)/(_=a+1))&&S("overflow"),r+=(d-t)*_,t=d,i=0;is&&S("overflow"),y==t){for(p=r,g=l;!(p<(v=g<=n?c:g>=n+u?u:g-n));g+=l)x=p-v,P=l-v,T.push(k(I(v+x%P,0))),p=w(x/P);T.push(k(I(p,0))),n=z(r,_,a==o),r=0,++a}++r,++t}return T.join("")}i={version:"1.3.2",ucs2:{decode:A,encode:T},decode:C,encode:F,toASCII:function(e){return x(e,(function(e){return v.test(e)?"xn--"+F(e):e}))},toUnicode:function(e){return x(e,(function(e){return g.test(e)?C(e.slice(4).toLowerCase()):e}))}},void 0===(a=function(){return i}.call(t,r,t,e))||(e.exports=a)}()}}]); //# sourceMappingURL=userreviews.js.map