PageSourceSearch

https://www.coop-pronto.ch/assets/scripts/chunks/4965.a71ead91cb43df58.min.js

js coop-pronto.ch collected 2026-09-26 11:01:56 UTC 14,227 bytes, 65 lines download raw bytes

1"use strict";(globalThis.webpackChunkCoop_Pronto=globalThis.webpackChunkCoop_Pronto||[]).push([["4965"],{6960(e,t,l){l.d(t,{A:()=>r,Sk:()=>y,init:()=>m,j7:()=>a,mn:()=>q,tX:()=>A});var n=l(3016),o=l(4759);let r="accordion",i=`${r}__button`,a=`${r}__block`,s=`${r}__content`,c=`${r}__search-input`,d=`${r}__chip-container`,u=`${r}__selected-filter-label`,h=`${a}--before-visible`,p=`${a}--after-visible`,$=`${a}--visible`,v=300,m=e=>{v=parseInt((0,n.Ei)(e,"--transition-duration"));let t="1"===e.dataset.multipleBlockOpen;y(e,t);let l=e.querySelectorAll(`.${c}`),o=e.querySelectorAll(`.${a}`);l.forEach(e=>{e.addEventListener("input",()=>{let t=e.closest(`.${s}`),l=e.value.toLowerCase(),n=null==t?void 0:t.querySelector(`.${d}`),o=null==n?void 0:n.querySelectorAll(".chip");o&&o.forEach(e=>{var t;(null!=(t=e.textContent)?t:"").toLowerCase().indexOf(l)>-1?e.removeAttribute("style"):e.style.display="none"})})}),l&&(o.forEach(e=>{let t=L(e);null==t||t.querySelectorAll(".chip").forEach(e=>{b(e,t)})}),setTimeout(()=>{o.forEach(e=>{g(e)})},30))},y=(e,t=!0)=>{let l=e.querySelectorAll(`.${a}`);e.querySelectorAll(`.${i}`).forEach((e,n)=>{let o=l[n];e.addEventListener("click",()=>{let e=o.classList.contains($);S(l,o,t,()=>{e?_(o):x(o)})}),e.addEventListener("keyup",e=>{"Escape"===e.key&&_(o)}),"true"===e.getAttribute("aria-expanded")&&x(o)})},g=e=>{let t=L(e),l=null==t?void 0:t.querySelector(`.${c}`),n=null==t?void 0:t.querySelector(`.${d}`);l&&n&&n.querySelectorAll(".chip").forEach(e=>{var l,n;if(null==(l=e.querySelector("input"))?void 0:l.checked){let l=null==t?void 0:t.querySelector(`.${c}`);if(!l)return;null==(n=l.parentNode)||n.insertBefore(e,l.nextSibling)}})},b=(e,t)=>{e.addEventListener("change",()=>{var l,n;if(null==(l=e.querySelector("input"))?void 0:l.checked){let l=null==t?void 0:t.querySelector(`.${c}`);if(!l)return;null==(n=l.parentNode)||n.insertBefore(e,l.nextSibling)}else{let l=null==t?void 0:t.querySelector(`.${d}`);null==l||l.appendChild(e),f(l)}})},f=e=>{if(e){let t=Array.from(e.querySelectorAll(".chip")).sort((e,t)=>{var l,n;return(null!=(l=e.textContent)?l:"").localeCompare(null!=(n=t.textContent)?n:"")});t.forEach(l=>{let n,o=(n=t.indexOf(l))>0?t[n-1]:null;o&&e.insertBefore(l,o.nextSibling)})}},_=(e,t)=>{if(!w(e)||e.classList.contains(p))return;if(e.classList.contains(h))return void setTimeout(()=>{_(e)},(v+30)*2);let l=e.querySelector(`.${i}`);l&&l.setAttribute("aria-expanded","false");let n=L(e);if(!n)return;let o=n.scrollHeight;n.style.setProperty("--content-height",`${o}px`),e.classList.add(p),e.classList.remove($),setTimeout(()=>{n.style.setProperty("--content-height","0")},30),setTimeout(()=>{e.classList.remove(p),n.style.removeProperty("--content-height"),t&&t()},v+30)},x=e=>{let t=e.querySelector(`.${i}`);t&&t.setAttribute("aria-expanded","true");let l=L(e);l&&(l.style.setProperty("--content-height",`${l.scrollHeight}px`),e.classList.add(h),setTimeout(()=>{l.style.setProperty("--content-height",`${l.scrollHeight}px`)},30),setTimeout(()=>{e.classList.add($),e.classList.remove(h),l.style.removeProperty("--content-height");let t=e.querySelector(`.${i}`);if(t){let e=t.getBoundingClientRect().top+document.documentElement.scrollTop+-80;window.scrollTo({top:e,behavior:"smooth"})}},v+30))},S=(e,t,l,n)=>{e.forEach(e=>{e===t||l?n&&n():_(e,()=>n&&n())})},w=e=>e.classList.contains($)||e.classList.contains(h)||e.classList.contains(p),L=e=>e.querySelector(`.${s}`),q=(e,t,l)=>{let n=0;return t.forEach(t=>{n+=T(e,`${t}[]`)}),E(l,n),n},E=(e,t)=>{e&&(e.dataset.filterCount=t.toString(),e.textContent=t>0?t.toString():"")},T=(e,t)=>{let l=e.querySelectorAll(`input[name="${t}"]:checked`);if(0===l.length){let l=e.querySelectorAll(`input[name="${t}"]`);if(l&&l.length>0){let e=l[0].closest(`.${a}`);if(e){let t=e.querySelector(`.${u}`);t&&(t.textContent="")}}return 0}let n=l[0].closest(`.${a}`);if(n){let e=n.querySelector(`.${u}`);return e&&(e.textContent=l.length.toString()),l.length}return l?l.length:0},A=e=>{let t=new DOMParser,l=`basicsHeading${e.id}_${e.index}`,n=`${l}--collapse`,r=`
2    <div class="${a}">
3      <h4 class="accordion__header" id="${l}">
4        <button
5            class="accordion__button"
6            type="button"
7            aria-expanded="false"
8            aria-controls="${n}"
9        >
10          <div class="accordion__button-text">
11            <span class="accordion__button-text-headline">${e.question}</span>
12          </div>
13          <div class="accordion__button-icon button button--icon-only">${(0,o.b)("close")}</div>
14        </button>
15      </h4>
16      <div id="${n}" class="accordion__content" aria-labelledby="${l}">
17        <div class="accordion__content-inner">
18          <div class="richtext">${e.answer}</div>
19        </div>
20      </div>
21    </div>`;return t.parseFromString(r,"text/html").querySelector(`.${a}`)}},4759(e,t,l){l.d(t,{b:()=>n});let n=(e,t=!1,l="")=>e?`<i class="${e}${t?"-filled":""} ${l}" aria-label="Icon ${e}" aria-hidden="true"></i>`:""},7325(e,t,l){function n(e,t,l,n,o,r,i){try{var a=e[r](i),s=a.value}catch(e){l(e);return}a.done?t(s):Promise.resolve(s).then(n,o)}l.d(t,{s:()=>o});let o=()=>{var e;return(e=function*(){let e=yield fetch("/actions/blitz/csrf/token",{method:"GET"});return yield e.text()},function(){var t=this,l=arguments;return new Promise(function(o,r){var i=e.apply(t,l);function a(e){n(i,o,r,a,s,"next",e)}function s(e){n(i,o,r,a,s,"throw",e)}a(void 0)})})()}},6036(e,t,l){l.d(t,{init:()=>b});var n=l(6960),o=l(6958),r=l(385),i=l(7325);function a(e,t,l,n,o,r,i){try{var a=e[r](i),s=a.value}catch(e){l(e);return}a.done?t(s):Promise.resolve(s).then(n,o)}let s="jobs",c=`${s}--loading`,d=`${s}__search-input`,u=`${s}__result-number`,h=`${s}__list`,p=`${h}-item`,$=`${p}-not-found`,v=`${s}__all-selected-filter-label`,m=["pensum","canton","workTimeModel"],y=[],g=[],b=e=>{let t=e.querySelector(`.${d}`),l=e.querySelectorAll(`.${d}`),i=e.querySelector(`.${v}`);(0,o.aD)(l),e.addEventListener("submit",t=>{t.preventDefault(),_(e)}),e.addEventListener("change",t=>{let l=t.target,o=l.classList.contains(d);i&&(!o||""===l.value&&o)&&((0,n.mn)(e,m,i),_(e))}),t.addEventListener("input",()=>{let l=t.value;(l.length>2||0===l.length)&&(0,r.GR)(500,()=>{_(e)})}),i&&(0,n.mn)(e,m,i)&&_(e)},f=(e,t)=>{e.querySelectorAll(`.${u}`).forEach(e=>{e.textContent=t.toString()})},_=e=>{e&&(x(e,!0),q((0,o.tg)(e)).then(t=>S(e,t)))},x=(e,t=!0)=>{let l=e.querySelectorAll(`.${p}`);l.length>0&&(y[0]&&clearTimeout(y[0]),t?g[0]=l.length-1:g[0]=0,E(l,t))},S=(e,t,l=!1)=>{e.classList.remove(c);let r=e.querySelector(`.${h}`);if(r){var i,a;y[0]&&clearTimeout(y[0]),r.innerHTML="";let l=new DOMParser;0===t.jobs.length?(f(e,0),null==(i=e.querySelector(`.${$}`))||i.classList.remove(`${$}--hidden`)):(f(e,t.jobs.length),t.jobs.forEach((e,n)=>{let i=`basicsHeading-${e.id}${n}`,a=`${i}--collapse`,s=0==n?`data-testid="job-list-item" data-test-canton="${e.place.canton}" data-test-title="${e.title}"`:"",c=`<h5 class="accordion__header" id="${i}">${L(a,e)}</h5><div id="${a}" class="accordion__content" aria-labelledby="${i}">${w(e,t.jobEntry)}</div>`,d=`<div class="accordion__block ${p} ${p}--hidden" ${s}>${c}</div>`,u=l.parseFromString(d,"text/html").querySelector(`.${p}`);u&&(r.appendChild(u),u.addEventListener("click",()=>{(0,o.oA)("Jobs","Email Link","bewerbungs_click")}))}),null==(a=e.querySelector(`.${$}`))||a.classList.add(`${$}--hidden`)),(0,n.Sk)(r),setTimeout(()=>{x(e,!1)},1)}l||(0,o.Ix)(e,l)},w=(e,t)=>{var l;return`
22  <div class="jobs__accordion-content">
23    <div class="jobs__accordion-content-intro h5">
24       ${e.introduction}
25    </div>
26    <div class="jobs__accordion-content-cta">
27        <div class="jobs__cta-text">
28            <h4>${t.ctaTitle}</h4>
29            <span class="jobs__cta-text">${t.ctaText}</span>
30        </div>
31        <a href="${null!=(l=e.linkAdvertisement)?l:""}" class="button jobs__cta-button" target="_blank">${TRANSLATED_JOB_APPLY_BUTTON}</a>
32    </div>
33  </div>`},L=(e,t)=>`
34  <button
35    class="accordion__button"
36    type="button"
37    aria-expanded="false"
38    aria-controls="${e}"
39  >
40    <div class="jobs__accordion-title accordion__button-text">
41      <span class="accordion__button-text-headline">${t.title}</span>
42      <span class="jobs__accordion-pensum">
43        ${null===t.pensumMax||t.pensumMin===t.pensumMax?`${t.pensumMin}%`:`${t.pensumMin}% - ${t.pensumMax}%`}
44      </span>
45      <span class="jobs__accordion-place">${t.place.canton} ${t.place.city}</span>
46    </div>
47    <div class="accordion__button-icon button button--icon-only button--teaser-icon"><i class="close"></i></div>
48  </button>`,q=e=>{var t;return(t=function*(){let t=yield(0,i.s)();try{let l=yield fetch("/search-jobs",{method:"POST",headers:{"Content-Type":"application/json","X-CSRF-Token":t},body:JSON.stringify(e)});return yield l.json()}catch(e){return T(e),{jobEntry:{ctaTitle:"",ctaText:""},jobs:[]}}},function(){var e=this,l=arguments;return new Promise(function(n,o){var r=t.apply(e,l);function i(e){a(r,n,o,i,s,"next",e)}function s(e){a(r,n,o,i,s,"throw",e)}i(void 0)})})()},E=(e,t=!0)=>{y[0]=setInterval(()=>{let l=g[0];e[l]&&(t?e[l].classList.add(`${p}--hidden`):e[l].classList.remove(`${p}--hidden`)),e[l]&&l>=0&&l<=e.length-1?g[0]=t?l-1:l+1:clearInterval(y[0])},80)},T=e=>{console.error(e)}},6958(e,t,l){l.d(t,{$g:()=>o,C3:()=>c,F_:()=>s,Ix:()=>v,Q0:()=>p,aD:()=>$,bf:()=>n,gd:()=>r,hd:()=>g,lW:()=>a,oA:()=>u,tg:()=>d,xd:()=>m,yL:()=>h});let n=(e,t=!1)=>{let l=new DOMParser().parseFromString(e,"text/html");return t?l.body.childNodes:l.body.childNodes[0]},o=(e,t=!1)=>{let l=t?" "+e.currency:"";return e?(.01*e.amount).toFixed(2)+l:""},r=(e,t,l,n)=>{let o=i(l-e),r=i(n-t),a=Math.sin(o/2)*Math.sin(o/2)+Math.cos(i(e))*Math.cos(i(l))*Math.sin(r/2)*Math.sin(r/2);return 2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a))*6371},i=e=>Math.PI/180*e,a=e=>{let t=document.createElement("textarea");t.value=e,t.setAttribute("readonly",""),t.style.position="absolute",t.style.left="-9999px",document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t)},s=()=>parseInt(document.body.style.getPropertyValue("--scrollbar-width"),10),c=()=>window.innerWidth+s()<577,d=e=>{let t={};for(let[l,n]of new FormData(e).entries()){let e=l.replace("[]","");t[e]||(t[e]=[]),t[e].push(n)}return t},u=(e,t,l="click")=>{window.dataLayer&&e&&window.dataLayer.push({event:l,type:e,value:t})},h=(e,t,l)=>{let n=new CustomEvent(t,l);e.dispatchEvent(n)},p=e=>e.length>0?e.split("|").map(e=>{let[t,l,n,o,r]=e.split(",");return void 0===r&&console.error("slug is undefined in list of locations"),{id:parseInt(t),lat:parseFloat(l),lng:parseFloat(n),title:o,slug:r}}):[],$=(e,t)=>{let l=new URL(window.location.href);
48e.forEach(e=>{var t,n;let o=null!=(t=e.getAttribute("name"))?t:"",r=null!=(n=e.getAttribute("value"))?n:"",i=l.searchParams.getAll(o);i.filter(e=>null==e?void 0:e.includes(r)).length>0&&(("checkbox"===e.type||"radio"===e.type)&&(e.checked=!0),("text"===e.type||"search"===e.type||"hidden"===e.type)&&(e.value=i[i.length-1]))}),t&&t()},v=(e,t=!1,l=["page","sort","order","limit","offset","productCategory"])=>{setTimeout(()=>{let n=new URL(window.location.href),o=new FormData(e),r=new Map;for(let[e,t]of o.entries())r.has(e)||r.set(e,[]),r.get(e).push(t.toString());for(let e of n.searchParams.keys()){var i;let l=n.searchParams.getAll(e),o=r.get(e),a=0===l.filter(e=>null==o?void 0:o.includes(e)).length,s=o&&(null==(i=o[0])?void 0:i.length)===0&&l[0].length>0;(!r.has(e)||!a||t||s)&&n.searchParams.delete(e)}for(let[e,o]of r.entries())l.includes(e)||!o.length||t||o.forEach(t=>{let l=e.endsWith("[]"),o=!n.searchParams.has(e),r=0===n.searchParams.getAll(e).filter(e=>e===t).length;t&&(!l||l&&r)&&(l||o?n.searchParams.append(e,t):n.searchParams.set(e,t))});window.history.replaceState({additionalInformation:document.head.title},document.head.title,n.href)},200)},m=(e,t,l="")=>e?`
49  <picture class="${t}">
50    <source type="image/webp" class="img-fluid"
51        src="${e.source.x1}"
52        width="${e.config.width}"
53        height="${e.config.height}"
54        alt="${""===l?e.title:l}"
55        srcset="${y(e.source)}">
56    <img
57        type="image/jpg"
58        class="img-fluid"
59        src="${e.jpeg}"
60        width="${e.config.width}"
61        height="${e.config.height}"
62        alt="${""===l?e.title:l}" />
63    <div class="fallback"></div>
64  </picture>`:"",y=e=>`${e.x1?e.x1+" 1x":""}${e.x1_5?", "+e.x1_5+" 1.5x ":""}${e.x2?", "+e.x2+" 2x ":""}`,g=(e="")=>{history.pushState("",document.title,window.location.pathname+window.location.search+"#"+e)}},385(e,t,l){l.d(t,{GR:()=>h,Ik:()=>s,Jf:()=>i,YN:()=>d,cw:()=>c,nj:()=>u,pb:()=>a});let n=null,o=[],r=[],i=(e,t,l)=>{e.querySelectorAll(`.${t}`).forEach(e=>{e.textContent=l.toString()})},a=(e,t)=>{let l=e.toLowerCase().indexOf(t.toLowerCase());return l<0?e:e.substring(0,l)+`<span class="highlight">${e.substring(l,l+t.length)}</span>`+e.substring(l+t.length)},s=(e,t,l)=>{let n=e.querySelector(`.${t}`);n&&(l?n.classList.add(`${t}--visible`):n.classList.remove(`${t}--visible`))},c=(e,t,l)=>{let n=e.querySelector(`.${t}`);if(null===n)return;let o=0===n.value.length?n.placeholder:n.value,r=document.createElement("canvas").getContext("2d");if(!r)return;r.font=window.getComputedStyle(n).font;let i=e.querySelector(`.${l}`);if(i){var a;i.style.left=`${null!=(a=r.measureText(o).width)?a:0}px`}},d=(e,t,l=!0)=>{let n=e.querySelectorAll(`.${t}--hidden`);n.length>0&&(o[0]&&clearTimeout(o[0]),l?r[0]=n.length-1:r[0]=0,((e,t,l=!0)=>{o[0]=setInterval(()=>{let n=r[0];e[n]&&(l?e[n].classList.add(`${t}--hidden`):e[n].classList.remove(`${t}--hidden`)),e[n]&&n>=0&&n<=e.length-1?r[0]=l?n-1:n+1:clearInterval(o[0])},80)})(n,t,l))},u=()=>{o[0]&&clearTimeout(o[0])},h=(e,t)=>{n&&clearTimeout(n),n=setTimeout(()=>{t&&(t(),n=null)},e)}},3016(e,t,l){l.d(t,{Ip:()=>o,e0:()=>a,Ei:()=>s,hY:()=>i,PL:()=>r});let n="scroll-lock";/^((?!chrome|android).)*safari/i.test(navigator.userAgent);let o=()=>document.body.classList.add(n),r=()=>document.body.classList.remove(n),i=()=>document.documentElement&&document.documentElement.scrollTop||document.body.scrollTop,a=()=>{document.body.classList.add("no-outline")},s=(e,t)=>getComputedStyle(e).getPropertyValue(t)}}]);
65//# sourceMappingURL=4965.a71ead91cb43df58.min.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.