1"use strict";(self["FC.EcomwebpackJsonp"]=self["FC.EcomwebpackJsonp"]||[]).push([[8587],{8242:(e,t,a)=>{a.r(t),a.d(t,{default:()=>r});var n=a(27378),i=a(15211),l=function(e,t){var a="function"==typeof Symbol&&e[Symbol.iterator];if(!a)return e;var n,i,l=a.call(e),r=[];try{for(;(void 0===t||t-- >0)&&!(n=l.next()).done;)r.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(a=l.return)&&a.call(l)}finally{if(i)throw i.error}}return r};const r=function(e){var t=e.dialogId,a=e.isOpen,r=e.onClose,o=e.commonTexts,c=e.options,u=e.openedWithKeyboard,s=(0,n.useRef)([]),d=(0,n.useRef)([]),m=(0,n.useRef)(null),f=l((0,n.useState)(null),2),g=f[0],h=f[1],p=l((0,n.useState)(FaberCastell.isMobile),2),E=p[0],v=p[1],b=l((0,n.useState)(FaberCastell.isDesktop),2),_=b[0],w=b[1],y=c.findIndex((function(e){return"true"===e.selected})),N=crypto.randomUUID();(0,n.useEffect)((function(){r&&-1!==y&&h(y)}),[r,c]),(0,n.useEffect)((function(){a&&u&&(-1!==y&&setTimeout((function(){var e;null===(e=d.current[y])||void 0===e||e.focus()}),0),1===c.length&&setTimeout((function(){var e;null===(e=s.current[0])||void 0===e||e.focus()}),0))}),[a,u]);var S=function(e){h((function(t){return t===e?null:e}))};(0,n.useEffect)((function(){var e=function(){v(FaberCastell.isMobile),w(FaberCastell.isDesktop)};return document.addEventListener("FaberCastell:resizeEnd",e),function(){document.removeEventListener("FaberCastell:resizeEnd",e)}}),[]);(0,n.useEffect)((function(){var e=m.current;e&&(a?e.open||e.showModal():e.open&&e.close())}),[a]),(0,n.useEffect)((function(){var e=m.current;if(e){var t=function(){return r()};return e.addEventListener("close",t),function(){return e.removeEventListener("close",t)}}}),[r]);return n.createElement("dialog",{ref:m,className:"nib-size-modal fc-modal",id:t,"aria-labelledby":"nib-size-modal-title-".concat(N),onClick:function(e){var t;e.target===m.current&&(null===(t=m.current)||void 0===t||t.close())}},n.createElement("button",{onClick:function(){var e;return null===(e=m.current)||void 0===e?void 0:e.close()},className:"modal-close","aria-label":o.cancelButtonText,type:"reset"},n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1.25rem",height:"1.25rem",viewBox:"4 4 16 16",fill:"none"},n.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.364 7.05024L16.9497 5.63603L12 10.5858L7.05025 5.63603L5.63604 7.05024L10.5858 12L5.63604 16.9497L7.05025 18.3639L12 13.4142L16.9497 18.3639L18.364 16.9497L13.4142 12L18.364 7.05024Z",fill:"currentColor"}))),n.createElement("div",{className:"nib-size-modal__wrapper"},n.createElement("h3",{id:"nib-size-modal-title-".concat(N),className:"nib-size-modal__title"},o.mainTitle),n.createElement(i.default,{showWhen:!!o.mainText},n.createElement("p",{className:"nib-size-modal__main-desc"},o.mainText)),n.createElement(i.default,{showWhen:!!o.hintText},n.createElement("p",{className:"nib-size-modal__hint-desc"},o.hintText)),n.createElement("div",{className:"nib-size-modal__accordion"},n.createElement("ul",{className:"nib-size-modal__accordion-wrapper"},c.map((function(e,t){return n.createElement(i.default,{showWhen:!!e.targetProductLink,key:t},n.createElement("li",{className:"nib-size-modal__accordion-item ".concat(g===t?"active":""),tabIndex:c.length>1?-1:0,ref:function(e){return s.current[t]=e},"data-focusable":"Enter,Space"},n.createElement("div",{className:"nib-size-modal__accordion-header",onClick:function(){return S(t)}},c.length>1?n.createElement("div",{className:"form-field radio ".concat(g===t?"active":"")},n.createElement("input",{"aria-controls":"".concat(e.title,"-accordion-").concat(N,"-segment-").concat(t),id:"".concat(e.title,"-accordion-").concat(N),ref:function(e){return d.current[t]=e},type:"radio",name:"nib-size-option",checked:g===t,onFocus:function(){return function(e,t){var a=t.current[e];g===e&&a&&!a.classList.contains("active")&&S(e)}(t,s)}}),n.createElement("label",{htmlFor:"".concat(e.title,"-accordion-").concat(N),onClick:function(){return S(t)}},n.createElement("span",{className:"hdl-5"},e.title))):n.createElement("span",{className:"hdl-5",id:"".concat(e.title,"-accordion-label")},e.title),n.createElement(i.default,{showWhen:!!e.dialogueGuide.nibSizeIdentifier},n.createElement("p",{className:"nib-size-modal__accordion-title"},"(",e.dialogueGuide.nibSizeIdentifier,")")),n.createElement("div",{className:"nib-size-modal__accordion-images"},n.createElement(i.default,{showWhen:!!e.dialogueGuide.images.previewImage.url&&_},n.createElement("img",{className:"nib-size-modal__accordion-img text",src:e.dialogueGuide.images.previewImage.url,width:e.dialogueGuide.images.previewImage.width,height:e.dialogueGuide.images.previewImage.height,alt:e.dialogueGuide.nibSizeIdentifier})),n.createElement(i.default,{showWhen:!!e.dialogueGuide.images.mainImage.url},n.createElement("img",{className:"nib-size-modal__accordion-img",src:e.dialogueGuide.images.mainImage.url,width:e.dialogueGuide.images.mainImage.width,height:e.dialogueGuide.images.mainImage.height,alt:e.dialogueGuide.nibSizeIdentifier})))),n.createElement("div",{className:"nib-size-modal__accordion-content",id:"".concat(e.title,"-accordion-").concat(N,"-segment-").concat(t)},n.createElement(i.default,{showWhen:!!o.titleWidth||!!e.dialogueGuide.textNibWidth},n.createElement("div",{className:"nib-size-modal__accordion-content-top"},n.createElement(i.default,{showWhen:!!o.titleWidth},n.createElement("h5",null,o.titleWidth)),n.createElement(i.default,{showWhen:!!e.dialogueGuide.textNibWidth},n.createElement("p",null,e.dialogueGuide.textNibWidth)))),n.createElement(i.default,{showWhen:!!o.titleStyle||!!e.dialogueGuide.textWritingStyle},n.createElement("div",{className:"nib-size-modal__accordion-content-bottom"},n.createElement(i.default,{showWhen:!!o.titleStyle},n.createElement("h5",null,o.titleStyle)),n.createElement(i.default,{showWhen:!!e.dialogueGuide.textWritingStyle},n.createElement("p",null,e.dialogueGuide.textWritingStyle)))),n.createElement(i.default,{showWhen:!!e.dialogueGuide.images.previewImage.url&&E},n.createElement("img",{className:"nib-size-modal__accordion-img",src:e.dialogueGuide.images.previewImage.url,width:e.dialogueGuide.images.previewImage.width,height:e.dialogueGuide.images.previewImage.height,alt:e.dialogueGuide.nibSizeIdentifier})))))}
1)))),n.createElement(i.default,{showWhen:c.length>1},n.createElement("div",{className:"nib-size-modal__button-wrapper"},n.createElement("button",{className:"btn btn--secondary btn--small nib-size-modal__cancel-button",type:"reset",onClick:function(){var e;return null===(e=m.current)||void 0===e?void 0:e.close()},"aria-label":o.cancelButtonText},o.cancelButtonText),n.createElement("button",{className:"btn btn--primary btn--small nib-size-modal__save-button ".concat(null===g?"disabled":""),onClick:function(e){if(e.preventDefault(),null!==g){var t=c[g];y!==g&&t.targetProductLink?window.location.href=t.targetProductLink:r()}else r()},"aria-label":o.saveButtonText},o.saveButtonText)))))}},68587:(e,t,a)=>{a.r(t),a.d(t,{default:()=>o});var n=a(27378),i=a(15211),l=a(8242),r=function(e,t){var a="function"==typeof Symbol&&e[Symbol.iterator];if(!a)return e;var n,i,l=a.call(e),r=[];try{for(;(void 0===t||t-- >0)&&!(n=l.next()).done;)r.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(a=l.return)&&a.call(l)}finally{if(i)throw i.error}}return r};const o=function(e){var t,a,o=r((0,n.useState)(!1),2),c=o[0],u=o[1],s=r((0,n.useState)(""),2),d=s[0],m=s[1],f=r((0,n.useState)(null),2),g=f[0],h=f[1],p=r((0,n.useState)(""),2),E=p[0],v=p[1],b=r((0,n.useState)(!1),2),_=b[0],w=b[1],y=crypto.randomUUID(),N="nib-size-modal-".concat(y),S=document.querySelector(".pdp-container__left .product-slider__list picture"),z=document.querySelectorAll(".pdp-container__left .product-slider__list img"),x=e.options.find((function(e){return"true"===e.selected})),W=function(e){var t=e.currentTarget;t.checked&&m(t.dataset.title||"")};(0,n.useEffect)((function(){S&&!g&&h(S.cloneNode(!0))}),[]),(0,n.useEffect)((function(){m((null==x?void 0:x.title)||"")}),[e.options]);var k="tag-status-".concat(crypto.randomUUID()),I=function(e){if(S){S.querySelectorAll("source").forEach((function(t){t.srcset=t.srcset.replace(/\/-\/media\/[^ ]+/g,e.productImage||e.image)}));var t=S.querySelector("img");t&&(t.src=e.productImage||e.image),(e.productImage||e.image&&z.length>1)&&z.forEach((function(e,t){0!==t&&e.classList.add("fade-out")}))}v(e.title)},L=function(){if(S){if(g){for(var e=g.querySelectorAll("source"),t=S.querySelectorAll("source"),a=0;a<e.length;a++)t[a].srcset=e[a].srcset;var n=S.querySelector("img");n&&(n.src=g.querySelector("img").src)}z.forEach((function(e){e.classList.remove("fade-out")}))}v("")};return n.createElement("fieldset",{className:"product-filter-tag"},n.createElement("legend",{className:"product-filter-tag__header"},n.createElement("span",{className:"product-filter-tag__header-wrapper"},n.createElement(i.default,{showWhen:((null===(t=e.title)||void 0===t?void 0:t.length)||0)>0},n.createElement("span",{className:"product-filter-tag__label"},e.title,":")),n.createElement("span",{className:"product-filter-tag__selected-item",id:k,role:"status"},E||d)),e.hasModal&&n.createElement("button",{className:"product-filter-tag__guide-button underline-button",onClick:function(e){e.preventDefault(),u(!0)},onKeyDown:function(e){"Enter"!==e.key&&" "!==e.key||w(!0)},"aria-expanded":!!c,"aria-controls":N,"aria-haspopup":"dialog"},e.commonTexts.dialogueLinkText)),n.createElement("div",{className:"product-filter-tag__body"},n.createElement(i.default,{showWhen:e.options.length>0},n.createElement("ul",{className:"product-filter-tag__list"},e.options.map((function(t,a){var i="tag-filter-".concat(a,"-").concat(y);return n.createElement("li",{className:"product-filter-tag__list-item",key:a},n.createElement("a",{className:""===t.targetProductLink?"disabled":"",href:t.targetProductLink,onClick:function(e){return function(e,t,a){t.preventDefault(),document.getElementById(a).checked=!0;var n=window.location.pathname+window.location.search+window.location.hash;e&&e!==n&&(window.location.href=e)}(t.targetProductLink,e,i)},"data-focusable":"Enter,Space",onFocus:function(){return I(t)},onBlur:L,onMouseEnter:function(){return I(t)},onMouseLeave:L},n.createElement("span",{className:"true"===t.selected?"checked":"",id:i+"-label"},t.title)),n.createElement("input",{id:i,"aria-controls":k,"aria-labelledby":i+"-label",checked:t.title===d,"data-title":t.title,name:e.title,onChange:W,type:"radio"}))})))),n.createElement(i.default,{showWhen:((null===(a=e.text)||void 0===a?void 0:a.length)||0)>0},n.createElement("p",{className:"product-filter-tag__desc"},e.text)),e.hasModal&&n.createElement(l.default,{dialogId:N,isOpen:c,onClose:function(){u(!1),w(!1)},commonTexts:e.commonTexts,options:e.options,openedWithKeyboard:_})))}},15211:(e,t,a)=>{a.r(t),a.d(t,{default:()=>i});var n=a(27378);const i=function(e){var t=e.showWhen,a=e.children;return t?n.createElement(n.Fragment,null,a):n.createElement(n.Fragment,null)}}}]);
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.