1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4347],{8509:function(e,n,t){t.d(n,{Qp:function(){return disableBodyScroll},tG:function(){return enableBodyScroll}});var i=!1;if("undefined"!=typeof window){var o={get passive(){i=!0;return}};window.addEventListener("testPassive",null,o),window.removeEventListener("testPassive",null,o)}var r="undefined"!=typeof window&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||"MacIntel"===window.navigator.platform&&window.navigator.maxTouchPoints>1),a=[],l=!1,s=-1,c=void 0,u=void 0,allowTouchMove=function(e){return a.some(function(n){return!!(n.options.allowTouchMove&&n.options.allowTouchMove(e))})},preventDefault=function(e){var n=e||window.event;return!!allowTouchMove(n.target)||n.touches.length>1||(n.preventDefault&&n.preventDefault(),!1)},setOverflowHidden=function(e){if(void 0===u){var n=!!e&&!0===e.reserveScrollBarGap,t=window.innerWidth-document.documentElement.clientWidth;n&&t>0&&(u=document.body.style.paddingRight,document.body.style.paddingRight=t+"px")}void 0===c&&(c=document.body.style.overflow,document.body.style.overflow="hidden")},restoreOverflowSetting=function(){void 0!==u&&(document.body.style.paddingRight=u,u=void 0),void 0!==c&&(document.body.style.overflow=c,c=void 0)},handleScroll=function(e,n){var t=e.targetTouches[0].clientY-s;return!allowTouchMove(e.target)&&(n&&0===n.scrollTop&&t>0?preventDefault(e):n&&n.scrollHeight-n.scrollTop<=n.clientHeight&&t<0?preventDefault(e):(e.stopPropagation(),!0))},disableBodyScroll=function(e,n){if(!e){console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.");return}!a.some(function(n){return n.targetElement===e})&&(a=[].concat(function(e){if(!Array.isArray(e))return Array.from(e);for(var n=0,t=Array(e.length);n<e.length;n++)t[n]=e[n];return t}(a),[{targetElement:e,options:n||{}}]),r?(e.ontouchstart=function(e){1===e.targetTouches.length&&(s=e.targetTouches[0].clientY)},e.ontouchmove=function(n){1===n.targetTouches.length&&handleScroll(n,e)},l||(document.addEventListener("touchmove",preventDefault,i?{passive:!1}:void 0),l=!0)):setOverflowHidden(n))},enableBodyScroll=function(e){if(!e){console.error("enableBodyScroll unsuccessful - targetElement must be provided when calling enableBodyScroll on IOS devices.");return}a=a.filter(function(n){return n.targetElement!==e}),r?(e.ontouchstart=null,e.ontouchmove=null,l&&0===a.length&&(document.removeEventListener("touchmove",preventDefault,i?{passive:!1}:void 0),l=!1)):a.length||restoreOverflowSetting()}},377:function(e,n,t){var i,o=this&&this.__extends||(i=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var t in n)n.hasOwnProperty(t)&&(e[t]=n[t])},function(e,n){function __(){this.constructor=e}i(e,n),e.prototype=null===n?Object.create(n):(__.prototype=n.prototype,new __)});Object.defineProperty(n,"__esModule",{value:!0});var r=t(7294),a=function(e){function Subscribe(){var n=null!==e&&e.apply(this,arguments)||this;return n.stores=[],n.onUpdate=function(){n.forceUpdate()},n}return o(Subscribe,e),Subscribe.prototype.componentWillReceiveProps=function(){this._unsubscribe()},Subscribe.prototype.componentWillUnmount=function(){this._unsubscribe()},Subscribe.prototype._unsubscribe=function(){var e=this;this.stores.forEach(function(n){n.unsubscribe(e.onUpdate)})},Subscribe.prototype.render=function(){var e,n=this,t=[],i=this.props.to.map(function(e){return e.unsubscribe(n.onUpdate),e.subscribe(n.onUpdate),t.push(e),e.get()});return this.stores=t,(e=this.props).children.apply(e,i)},Subscribe}(r.PureComponent);n.Subscribe=a,n.useStore=function(e){var n=r.useState(e.get()),t=n[0],i=n[1];function updateState(){i(e.get())}return r.useEffect(function(){return e.subscribe(updateState),function(){return e.unsubscribe(updateState)}}),t},n.useStores=function(e){var n=r.useState(e.map(function(e){return e.get()})),t=n[0],i=n[1];function updateState(){i(e.map(function(e){return e.get()}))}return r.useEffect(function(){return e.map(function(e){return e.subscribe(updateState)}),function(){return e.map(function(e){return e.unsubscribe(updateState)})}}),t}},1326:function(e,n){var t=this&&this.__assign||Object.assign||function(e){for(var n,t=1,i=arguments.length;t<i;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e};Object.defineProperty(n,"__esModule",{value:!0});var i={},o=0,r=function(){function Store(e,n){this.name="",this._listeners=[],n&&(this.name=n),this.idx=o++,i[this.idx]=e,this.initialState=e}return Store.prototype.get=function(){return i[this.idx]},Store.prototype.set=function(e,n){if(this.condition){var o=this.condition(t({},i[this.idx],e(i[this.idx])),n);o&&(i[this.idx]=o)}else i[this.idx]=t({},i[this.idx],e(i[this.idx]));
1this._listeners.forEach(function(e){return e()})},Store.prototype.replace=function(e,n){if(this.condition){var t=this.condition(e(i[this.idx]),n);t&&(i[this.idx]=t)}else i[this.idx]=e(i[this.idx]);this._listeners.forEach(function(e){return e()})},Store.prototype.setCondition=function(e){this.condition=e},Store.prototype.reset=function(){i[this.idx]=this.initialState},Store.prototype.subscribe=function(e){this._listeners.push(e)},Store.prototype.unsubscribe=function(e){this._listeners=this._listeners.filter(function(n){return n!==e})},Store.prototype.dispatch=function(e,n){return e},Store}();n.Store=r,n.dispatch=function(e,n){return e},n.getGlobalState=function(){return i},n.resetGlobalState=function(){i={}},n.replaceGlobalState=function(e){i=e}},4347:function(e,n,t){t.r(n),t.d(n,{default:function(){return Menu}});var i=t(5893),o=t(2729),r=t(9521);function _templateObject(){let e=(0,o._)(["\n visibility: visible;\n transition: var(--transition) 0.4s;\n transform: skewY(0);\n transform: translateY(0%);\n "]);return _templateObject=function(){return e},e}function _templateObject1(){let e=(0,o._)(["\n position: fixed;\n width: 100%;\n z-index: 600;\n top: 0px;\n left: 0px;\n right: 0px;\n bottom: 0px;\n display: flex;\n align-items: center;\n will-change: transform;\n background: var(--white);\n overflow: hidden;\n transition: var(--transition) 0.4s;\n transition-delay: 0.3;\n transform: translateY(-100%);\n visibility: hidden;\n .header-light {\n display: flex;\n justify-content: space-between;\n svg {\n fill: black;\n justify-self: end;\n }\n }\n ","\n .menu {\n height: 100%;\n width: 100%;\n position: relative;\n padding: 20px 0px 100px;\n font-family: TiemposHeadline-Bold;\n font-weight: 600;\n }\n .container {\n height: 100%;\n width: 100%;\n position: relative;\n padding: 0px 20px;\n }\n\n .current-label {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n\n p {\n margin-bottom: 0px;\n }\n\n svg {\n width: 24px;\n height: 24px;\n margin-top: 6px;\n }\n }\n\n .dropdown-wrapper {\n margin: 14px 0px;\n\n .dropdown-menu {\n margin: 14px 0px;\n background: #efefef;\n overflow: hidden;\n top: -45px;\n margin: 0px -2px;\n font-size: var(--font-title-xxs) !important;\n font-weight: 400;\n padding: 14px 20px;\n\n .last-child {\n a {\n margin-bottom: 0px;\n }\n }\n\n ul {\n padding: 0px;\n list-style-type: circle;\n }\n\n & > div {\n margin: 0px;\n display: flex;\n color: #000;\n\n &.active {\n ul {\n list-style-type: disc;\n }\n }\n }\n }\n }\n\n a,\n p {\n color: black;\n display: block;\n margin-bottom: 20px;\n white-space: nowrap;\n\n &:hover {\n color: var(--primary);\n cursor: pointer;\n }\n\n &:active {\n color: var(--primary);\n }\n }\n"]);return _templateObject1=function(){return e},e}let a=r.ZP.div.withConfig({componentId:"sc-c384d2bb-0"})(_templateObject1(),e=>e.toggle&&(0,r.iv)(_templateObject()));var l=t(203),s=t(761),c=t(9734),u=t(8793),d=t(2777),p=t(1664),f=t.n(p),h=t(9755),v=t.n(h),Menu=()=>{var e,n;let{ui:t,closeMenu:o}=(0,l.Z)(),{data:r}=(0,c.ZP)("header",u.dz);return(0,i.jsx)(a,{toggle:t.menuToggle,children:(0,i.jsx)("div",{className:"menu h3",children:(0,i.jsx)("div",{onClick:()=>o(),children:(0,i.jsxs)("div",{className:"container",children:[(0,i.jsxs)("div",{className:"header-light",children:[(0,i.jsx)(f(),{href:"/",onClick:()=>o(),children:(0,i.jsx)(v(),{src:"/ME_logo_black.svg",alt:"maskinentreprenoren logo",height:32,width:75,loading:"eager",priority:!0})}),(0,i.jsx)(d.Close,{})]}),(0,i.jsx)("div",{children:null==r?void 0:null===(n=r.data)||void 0===n?void 0:null===(e=n.header_menu)||void 0===e?void 0:e.map((e,n)=>(0,i.jsx)(s.w,{element:null==e?void 0:e.headermenu_link,children:null==e?void 0:e.headermenu_title},"".concat(null==e?void 0:e.headermenu_title,"-").concat(n)))})]})})})})}},203:function(e,n,t){var i=t(1326),o=t(377),r=t(8509);let disableBody=e=>
1(0,r.Qp)(e),enableBody=e=>(0,r.tG)(e),a=new i.Store({headerColor:"header-dark",menuToggle:!1,userAgreedCookie:!1});n.Z=function(){let e=(0,o.useStore)(a),setUi=e=>a.set(()=>({...e}));return{ui:e,setUi,closeMenu:()=>{setUi({menuToggle:!1}),enableBody(document.documentElement)},openMenu:()=>{setUi({menuToggle:!0}),disableBody(document.documentElement)}}}},8793:function(e,n,t){t.d(n,{Be:function(){return calcAvarage},Eh:function(){return calculateReadingTime},Qm:function(){return generateTagColor},_i:function(){return fetcher},dz:function(){return fetchGlobal},ql:function(){return generateImageBlur}});var i=t(7880),o=t(7780),r=t(2906);let a=(0,i.LF)(),calculateReadingTime=()=>Math.ceil(document.body.innerText.split(" ").length/250),generateTagColor=e=>{let n;switch(e){case"Branschnytt":case"BranschPricken":case"Kr\xf6nika":case"Ledaren":n="Fokus";break;case"Ekonominytt":case"Ekonomireportage":n="Ekonomi";break;case"Landet runt":n="Landet runt";break;case"Tekniknytt":case"Jag & min maskin":case"Teknikreportage":n="Teknik";break;case"Annons":n="Native";break;default:return"Default"}return n},calcAvarage=function(){for(var e=arguments.length,n=Array(e),t=0;t<e;t++)n[t]=arguments[t];let i=n.reduce((e,n)=>e+parseFloat(n),0)/n.length;return i},fetchGlobal=async()=>{let e=await a.getSingle("site_settings");return e},fetcher=async e=>{let{data:n,error:t}=await o.O.from("view_counter").select("id,prismic_id,views").eq("prismic_id",e);return n||(t?null:void 0)},generateImageBlur=e=>(0,r.D)(e,{blur:460,px:21,q:25})},761:function(e,n,t){t.d(n,{w:function(){return c}});var i=t(5893),o=t(1664),r=t.n(o),a=t(7880),l=t(1163),s=t(6689);let c=(0,l.withRouter)(e=>{let{router:n,element:t,children:o}=e;return(0,i.jsxs)(s.Bj,{className:"/"==n.pathname?"prismic-link-container category-slide-container":"prismic-link-container",children:[(null==t?void 0:t.link_type)==="Web"&&(0,i.jsx)("a",{href:null==t?void 0:t.url,target:null==t?void 0:t.target,rel:"noreferrer noopener",children:o}),(null==t?void 0:t.link_type)!=="Web"&&(0,i.jsx)(r(),{href:(0,a.Ew)(t),as:(0,a.kG)(t),className:n.asPath.includes("/".concat(null==t?void 0:t.uid))||n.asPath.includes("/".concat(null==t?void 0:t.slug))?"active":null,children:o},null==t?void 0:t.id)]})})},7780:function(e,n,t){t.d(n,{O:function(){return o}});var i=t(9802);let o=(0,i.eI)("https://xuxjlwryzwyvycrnbdxu.supabase.co","eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Inh1eGpsd3J5end5dnljcm5iZHh1Iiwicm9sZSI6ImFub24iLCJpYXQiOjE2NDU3MDc4MzMsImV4cCI6MTk2MTI4MzgzM30.ShjDOb-H-k1SpKsH3KdCKq7mr77eb4-Yva8c0f0bF6M")}}]);
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.