PageSourceSearch

https://www.norstedts.se/static/js/theme-components-TextHighlight.02cbd19f.chunk.js

js norstedts.se collected 2026-10-02 04:58:08 UTC 6,611 bytes, 2 lines download raw bytes

1"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[9525,5101],{73213:function(e,t,n){n.d(t,{Y:function(){return a}});var i=n(99710),r=n(30969),o=n(95870),a=function(){var e=(0,r.useState)(o.N9?{width:0,height:0}:{width:window.innerWidth,height:window.innerHeight}),t=(0,i.Z)(e,2),n=t[0],a=t[1];return(0,r.useLayoutEffect)((function(){var e=function(){a(o.N9?null:{width:window.innerWidth,height:window.innerHeight})};return o.N9||window.addEventListener("resize",e),function(){return o.N9?null:window.removeEventListener("resize",e)}}),[]),n}},73075:function(e,t,n){n.r(t),n.d(t,{default:function(){return x}});var i,r,o,a,d=n(99500),c=n(30969),l=n(85255),u=n(78568),s=n(433),g=n(21547),h=n(90576),Z=n(99710),p=n(39455),b=n(37574),f=(0,l.Z)(s.Z)(i||(i=(0,d.Z)(["\n    row-gap: 32px;\n    padding-top: 56px;\n    padding-bottom: 56px;\n\n    "," {\n        padding-top: 120px;\n        padding-bottom: 120px;\n    }\n"])),p.aE.lg),v=(0,l.Z)("div")(r||(r=(0,d.Z)(["\n    grid-column: 2 / span 10;\n    display: flex;\n    flex-direction: column;\n"]))),w=(0,l.Z)(u.Z)(o||(o=(0,d.Z)(["\n    grid-column: 2 / span 10;\n    margin: 0;\n"]))),m=(0,l.Z)(u.Z)(a||(a=(0,d.Z)(["\n    display: inline-block;\n    white-space: nowrap;\n    color: ",";\n    transition: color 500ms ease;\n\n    &[data-animate='true'] {\n        color: ",";\n    }\n"])),(function(e){return g.Z[e.colorThemeKey].text.faded}),(function(e){return g.Z[e.colorThemeKey].text.primary})),x=function(e){var t=e.data,n=e.settings,i=(0,c.useRef)(null),r=t.text,o=t.settings,a=t.author_and_affiliation,d=null===o||void 0===o?void 0:o.includes("author"),l=d&&(null===a||void 0===a?void 0:a.author),s=d&&(null===a||void 0===a?void 0:a.affiliation),p=(null===n||void 0===n?void 0:n.theme)||"light",x=(0,h.Z)(r),k=(0,c.useMemo)((function(){return x.split(" ")}),[x]),_=k.length,y=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.from,i=void 0===n?"bottom":n,r=t.startOffset,o=void 0===r?0:r,a=t.maxDistance,d=void 0===a?"100%":a,l=t.relativeToElement,u=void 0!==l&&l,s=(0,c.useState)(0),g=(0,Z.Z)(s,2),h=g[0],p=g[1],b=function(e,t){return"string"===typeof e&&e.endsWith("%")?t*(parseFloat(e)/100):parseFloat(e)};return(0,c.useEffect)((function(){var t=function(){if(e.current){var t=e.current.getBoundingClientRect(),n=u?t.height:window.innerHeight,r=(("top"===i?t.top:window.innerHeight-t.top)-b(o,window.innerHeight))/b(d,n),a=Math.max(0,Math.min(1,r));p(a)}};return window.addEventListener("scroll",t),window.addEventListener("resize",t),t(),function(){window.removeEventListener("scroll",t),window.removeEventListener("resize",t)}}),[e,i,o,d,u]),h}(i,{from:"bottom",startOffset:"25%",maxDistance:"100%",relativeToElement:!0}),E=Math.floor(_*y),L=["Signifier/24-120 Light",null,"Signifier/40-110-scalable-desktop"];return x?(0,b.jsxs)(f,{as:"section",backgroundColor:g.Z[p].background,children:[(0,b.jsx)(w,{ref:i,as:l?"blockquote":"p",gridColumn:"2/ span 10",textStyles:L,children:k.map((function(e,t){return(0,b.jsxs)(m,{"data-animate":t<E,textStyles:L,colorThemeKey:p,children:[e,"\xa0"]},"".concat(e,"-").concat(t))}))}),l&&(0,b.jsxs)(v,{color:g.Z[p].text.primary,children:[(0,b.jsx)(u.Z,{textStyles:"Signifier/16-140 Light",children:l}),s&&(0,b.jsx)(u.Z,{textStyles:"Signifier/16-140 Light italic",children:s})]})]}):null}},79225:function(e,t,n){n.r(t);var i,r,o,a,d=n(95764),c=n(99710),l=n(99500),u=n(30969),s=n(73075),g=n(85255),h=n(29222),Z=n(7113),p=n(73213),b=n(37574),f=(0,g.Z)("div")(i||(i=(0,l.Z)(["\n    position: relative;\n"]))),v=(0,g.Z)("div")(r||(r=(0,l.Z)(["\n    position: sticky;\n    bottom: 0;\n    z-index: -1;\n"]))),w=(0,g.Z)("div")(o||(o=(0,l.Z)(["\n    width: 1px;\n    height: 1px;\n"]))),m=(0,g.Z)("div")(a||(a=(0,l.Z)(["\n    margin-top: -1px; // Needed to close some potential gaps where AdditionalBlock shines through\n"])));t.default=function(e){var t=e.data,n=e.settings,i=null!==t&&void 0!==t&&t.settings.includes("block")?null===t||void 0===t?void 0:t.block:[],r=(0,u.useRef)(null),o=(0,u.useRef)(null),a=(0,u.useState)({block:0,wrapper:0}),l=(0,c.Z)(a,2),g=l[0],x=l[1],k=(0,u.useState)(!1),_=(0,c.Z)(k,2),y=_[0],E=_[1],L=(0,p.Y)().height,S=(0,Z.S)({threshold:0,rootMargin:"0px 0px -40% 0px"}),j=(0,c.Z)(S,2),H=j[0],C=j[1],D=t.text_highlight,A=void 0===D?"":D,N=(0,u.useMemo)((function(){return i.map((function(e){var t;return"image_full_with_scale"!==e.layout||(null===(t=e.data)||void 0===t?void 0:t.inViewCustom)===y?e:(0,d.Z)((0,d.Z)({},e),{},{data:(0,d.Z)((0,d.Z)({},e.data),{},{inViewCustom:y})})}))}),[i,y]);(0,u.useEffect)((function(){if(null!==i&&void 0!==i&&i.length&&r.current&&o.current){var e=new ResizeObserver((function(){var e=r.current.clientHeight,t=o.current.clientHeight+e;x({block:e,wrapper:t})}));return e.observe(r.current),function(){return e.disconnect()}}}),[i]),(0,u.useEffect)((function(){C&&(C.isIntersecting&&!y?E(!0):C.boundingClientRect.top>0&&y&&E(!1))}),[C]);var O=L-g.block+1;return(0,b.jsxs)(f,{height:"".concat(g.wrapper,"px"),children:[(0,b.jsxs)(m,{ref:o,children:[(0,b.jsx)(s.default,{data:A,settings:n}),(0,b.jsx)(w,{ref:H})]}),N.length>0&&(0,b.jsx)(v,{ref:r,marginTop:"-".concat(g.block,"px"),top:"".concat(O,"px"),children:(0,b.jsx)(h.G,{modules:N,settings:n})})]})}},21547:function(e,t,n){var i=n(31619);t.Z={dark:{theme:"dark",background:i.Z.black,text:{primary:i.Z.white,faded:i.Z.white30,brand:i.Z.textGrey},button:{background:i.Z.white,text:i.Z.black},product_details:{border:i.Z.white30,inactive:i.Z.grey,category_title:i.Z.grey},product_summary:{options:{border:i.Z.white30,text:i.Z.white,background:i.Z.greige},options_open:{border:i.Z.white30,text:i.Z.white,background:i.Z.black},options_image_background:{border:i.Z.white30,text:i.Z.white,background:i.Z.greige},options_open_image_background:{border:i.Z.black20,text:i.Z.black,background:i.Z.greige},button_image_background:{background:i.Z.white,color:i.Z.black}}},light:{theme:"light",background:i.Z.greige,text:{primary:i.Z.black,faded:i.Z.black20,brand:i.Z.blue},button:{background:i.Z.black,text:i.Z.white},product_details:{border:i.Z.black20,inactive:i.Z.grey,category_title:i.Z.textGrey},product_summary:{options:{border:i.Z.black20,text:i.Z.black,background:i.Z.greige},options_open:{border:i.Z.black20,text:i.Z.black,background:i.Z.greige},options_image_background:{border:i.Z.white30,text:i.Z.white},options_open_image_background:{border:i.Z.black20,text:i.Z.black,background:i.Z.greige},button_image_background:{background:i.Z.white,color:i.Z.black}}}}}}]);
2//# sourceMappingURL=theme-components-TextHighlight.02cbd19f.chunk.js.map

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.