PageSourceSearch

https://www.yzd.ca/_nuxt/CwAPirPw.js

js yzd.ca collected 2026-09-28 14:38:36 UTC 10,449 bytes, 1 lines download raw bytes

1function U(e){const t=`algoliasearch-client-js-${e.key}`;let r;const s=()=>(r===void 0&&(r=e.localStorage||window.localStorage),r),a=()=>JSON.parse(s().getItem(t)||"{}"),n=o=>{s().setItem(t,JSON.stringify(o))},u=()=>{const o=e.timeToLive?e.timeToLive*1e3:null,d=a(),h=Object.fromEntries(Object.entries(d).filter(([,c])=>c.timestamp!==void 0));if(n(h),!o)return;const l=Object.fromEntries(Object.entries(h).filter(([,c])=>{const m=new Date().getTime();return!(c.timestamp+o<m)}));n(l)};return{get(o,d,h={miss:()=>Promise.resolve()}){return Promise.resolve().then(()=>{u();const l=JSON.stringify(o);return a()[l]}).then(l=>Promise.all([l?l.value:d(),l!==void 0])).then(([l,c])=>Promise.all([l,c||h.miss(l)])).then(([l])=>l)},set(o,d){return Promise.resolve().then(()=>{const h=a();return h[JSON.stringify(o)]={timestamp:new Date().getTime(),value:d},s().setItem(t,JSON.stringify(h)),d})},delete(o){return Promise.resolve().then(()=>{const d=a();delete d[JSON.stringify(o)],s().setItem(t,JSON.stringify(d))})},clear(){return Promise.resolve().then(()=>{s().removeItem(t)})}}}function S(e){const t=[...e.caches],r=t.shift();return r===void 0?W():{get(s,a,n={miss:()=>Promise.resolve()}){return r.get(s,a,n).catch(()=>S({caches:t}).get(s,a,n))},set(s,a){return r.set(s,a).catch(()=>S({caches:t}).set(s,a))},delete(s){return r.delete(s).catch(()=>S({caches:t}).delete(s))},clear(){return r.clear().catch(()=>S({caches:t}).clear())}}}function W(){return{get(e,t,r={miss:()=>Promise.resolve()}){return t().then(a=>Promise.all([a,r.miss(a)])).then(([a])=>a)},set(e,t){return Promise.resolve(t)},delete(e){return Promise.resolve()},clear(){return Promise.resolve()}}}function N(e={serializable:!0}){let t={};return{get(r,s,a={miss:()=>Promise.resolve()}){const n=JSON.stringify(r);if(n in t)return Promise.resolve(e.serializable?JSON.parse(t[n]):t[n]);const u=s(),o=a&&a.miss||(()=>Promise.resolve());return u.then(d=>o(d)).then(()=>u)},set(r,s){return t[JSON.stringify(r)]=e.serializable?JSON.stringify(s):s,Promise.resolve(s)},delete(r){return delete t[JSON.stringify(r)],Promise.resolve()},clear(){return t={},Promise.resolve()}}}function M(e,t,r){const s={"x-algolia-api-key":r,"x-algolia-application-id":t};return{headers(){return e===v.WithinHeaders?s:{}},queryParameters(){return e===v.WithinQueryParameters?s:{}}}}function L(e){let t=e.length-1;for(t;t>0;t--){const r=Math.floor(Math.random()*(t+1)),s=e[t];e[t]=e[r],e[r]=s}return e}function $(e,t){return t&&Object.keys(t).forEach(r=>{e[r]=t[r](e)}),e}function A(e,...t){let r=0;return e.replace(/%s/g,()=>encodeURIComponent(t[r++]))}const w="4.24.0",v={WithinQueryParameters:0,WithinHeaders:1};function x(e,t){const r=e||{},s=r.data||{};return Object.keys(r).forEach(a=>{["timeout","headers","queryParameters","data","cacheable"].indexOf(a)===-1&&(s[a]=r[a])}),{data:Object.entries(s).length>0?s:void 0,timeout:r.timeout||t,headers:r.headers||{},queryParameters:r.queryParameters||{},cacheable:r.cacheable}}const O={Read:1,Write:2,Any:3},T={Up:1,Down:2,Timeouted:3},q=2*60*1e3;function J(e,t=T.Up){return{...e,status:t,lastUpdate:Date.now()}}function Q(e){return e.status===T.Up||Date.now()-e.lastUpdate>q}function G(e){return e.status===T.Timeouted&&Date.now()-e.lastUpdate<=q}function k(e){return typeof e=="string"?{protocol:"https",url:e,accept:O.Any}:{protocol:e.protocol||"https",url:e.url,accept:e.accept||O.Any}}const y={Get:"GET",Post:"POST"};function _(e,t){return Promise.all(t.map(r=>e.get(r,()=>Promise.resolve(J(r))))).then(r=>{const s=r.filter(o=>Q(o)),a=r.filter(o=>G(o)),n=[...s,...a],u=n.length>0?n.map(o=>k(o)):t;return{getTimeout(o,d){return(a.length===0&&o===0?1:a.length+3+o)*d},statelessHosts:u}})}const B=({isTimedOut:e,status:t})=>!e&&~~t===0,V=e=>{const t=e.status;return e.isTimedOut||B(e)||~~(t/100)!==2&&~~(t/100)!==4},X=({status:e})=>~~(e/100)===2,K=(e,t)=>V(e)?t.onRetry(e):X(e)?t.onSuccess(e):t.onFail(e);function E(e,t,r,s){const a=[],n=se(r,s),u=ae(e,s),o=r.method,d=r.method!==y.Get?{}:{...r.data,...s.data},h={"x-algolia-agent":e.userAgent.value,...e.queryParameters,...d,...s.queryParameters};let l=0;const c=(m,g)=>{const f=m.pop();if(f===void 0)throw ce(R(a));const b={data:n,headers:u,method:o,url:re(f,r.path,h),connectTimeout:g(l,e.timeouts.connect),responseTimeout:g(l,s.timeout)},C=i=>{const P={request:b,response:i,host:f,triesLeft:m.length};return a.push(P),P},p={onSuccess:i=>ee(i),onRetry(i){const P=C(i);return i.isTimedOut&&l++,Promise.all([e.logger.info("Retryable failure",D(P)),e.hostsCache.set(f,J(f,i.isTimedOut?T.Timeouted:T.Down))]).then(()=>c(m,g))},onFail(i){throw C(i),te(i,R(a))}};return e.requester.send(b).then(i=>K(i,p))};return _(e.hostsCache,t).then(m=>c([...m.statelessHosts].reverse(),m.getTimeout))}function Y(e){const{hostsCache:t,logger:r,requester:s,requestsCache:a,responsesCache:n,timeouts:u,userAgent:o,hosts:d,queryParameters:h,headers:l}=e,c={hostsCache:t,logger:r,requester:s,requestsCache:a,responsesCache:n,timeouts:u,userAgent:o,headers:l,queryParameters:h,hosts:d.map(m=>k(m)),read(m,g){const f=x(g,c.timeouts.read),b=()=>E(c,c.hosts.filter(i=>(i.accept&O.Read)!==0),m,f);if((f.cacheable!==void 0?f.cacheable:m.cacheable)!==!0)return b();const p={request:m,mappedRequestOptions:f,transporter:{queryParameters:c.queryParameters,headers:c.headers}};return c.responsesCache.get(p,()=>c.requestsCache.get(p,()=>c.requestsCache.set(p,b()).then(i=>Promise.all([c.requestsCache.delete(p),i]),i=>Promise.all([c.requestsCache.delete(p),Promise.reject(i)])).then(([i,P])=>P)),{miss:i=>c.responsesCache.set(p,i)})},write(m,g){return E(c,c.hosts.filter(f=>(f.accept&O.Write)!==0),m,x(g,c.timeouts.write))}};return c}function Z(e){const t={value:`Algolia for JavaScript (${e})`,add(r){const s=`; ${r.segment}${r.version!==void 0?` (${r.version})`:""}`;return t.value.indexOf(s)===-1&&(t.value=`${t.value}${s}`),t}};return t}function ee(e){try{return JSON.parse(e.content)}catch(t){throw oe(t.message,e)}}function te({content:e,status:t},r){let s=e;try{s=JSON.parse(e).message}catch{}return ne(s,t,r)}function re(e,t,r){const s=z(r);let a=`${e.protocol}://${e.url}/${t.charAt(0)==="/"?t.substr(1):t}`;return s.length&&(a+=`?${s}`),a}function z(e){const t=r=>Object.prototype.toString.call(r)==="[object Object]"||Object.prototype.toString.call(r)==="[object Array]";return Object.keys(e).map(r=>A("%s=%s",r,t(e[r])?JSON.stringify(e[r]):e[r])).join("&")}function se(e,t){if(e.method===y.Get||e.data===void 0&&t.data===void 0)return;const r=Array.isArray(e.data)?e.data:{...e.data,...t.data};return JSON.stringify(r)}function ae(e,t){const r={...e.headers,...t.headers},s={};return Object.keys(r).forEach(a=>{const n=r[a];s[a.toLowerCase()]=n}),s}function R(e){return e.map(t=>D(t))}function D(e){const t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...e,request:{...e.request,headers:{...e.request.headers,...t}}}}function ne(e,t,r){return{name:"ApiError",message:e,status:t,transporterStackTrace:r}}function oe(e,t){return{name:"DeserializationError",message:e,response:t}}function ce(e){return{name:"RetryError",message:"Unreachable hosts - your application id may be incorrect. If the error persists, please reach out to the Algolia Support team: https://alg.li/support .",transporterStackTrace:e}}const ie=e=>{const t=e.appId,r=M(e.authMode!==void 0?e.authMode:v.WithinHeaders,t,e.apiKey),s=Y({hosts:[{url:`${t}-dsn.algolia.net`,accept:O.Read},{url:`${t}.algolia.net`,accept:O.Write}].concat(L([{url:`${t}-1.algolianet.com`},{url:`${t}-2.algolianet.com`},{url:`${t}-3.algolianet.com`}])),...e,headers:{...r.headers(),"content-type":"application/x-www-form-urlencoded",...e.headers},queryParameters:{...r.queryParameters(),...e.queryParameters}});return $({transporter:s,appId:t,addAlgoliaAgent(n,u){s.userAgent.add({segment:n,version:u})},clearCache(){return Promise.all([s.requestsCache.clear(),s.responsesCache.clear()]).then(()=>{})}},e.methods)},ue=e=>(t,r)=>t.method===y.Get?e.transporter.read(t,r):e.transporter.write(t,r),F=e=>(t,r={})=>{const s={transporter:e.transporter,appId:e.appId,indexName:t};return $(s,r.methods)},j=e=>(t,r)=>{const s=t.map(a=>({...a,params:z(a.params||{})}));return e.transporter.read({method:y.Post,path:"1/indexes/*/queries",data:{requests:s},cacheable:!0},r)},I=e=>(t,r)=>Promise.all(t.map(s=>{const{facetName:a,facetQuery:n,...u}=s.params;return F(e)(s.indexName,{methods:{searchForFacetValues:H}}).searchForFacetValues(a,n,{...r,...u})})),le=e=>(t,r,s)=>e.transporter.read({method:y.Post,path:A("1/answers/%s/prediction",e.indexName),data:{query:t,queryLanguages:r},cacheable:!0},s),de=e=>(t,r)=>e.transporter.read({method:y.Post,path:A("1/indexes/%s/query",e.indexName),data:{query:t},cacheable:!0},r),H=e=>(t,r,s)=>e.transporter.read({method:y.Post,path:A("1/indexes/%s/facets/%s/query",e.indexName,t),data:{facetQuery:r},cacheable:!0},s);function me(e){return{debug(t,r){return Promise.resolve()},info(t,r){return Promise.resolve()},error(t,r){return console.error(t,r),Promise.resolve()}}}const he=e=>(t,r)=>{const s=t.map(a=>({...a,threshold:a.threshold||0}));return e.transporter.read({method:y.Post,path:"1/indexes/*/recommendations",data:{requests:s},cacheable:!0},r)};function fe(){return{send(e){return new Promise(t=>{const r=new XMLHttpRequest;
1r.open(e.method,e.url,!0),Object.keys(e.headers).forEach(u=>r.setRequestHeader(u,e.headers[u]));const s=(u,o)=>setTimeout(()=>{r.abort(),t({status:0,content:o,isTimedOut:!0})},u*1e3),a=s(e.connectTimeout,"Connection timeout");let n;r.onreadystatechange=()=>{r.readyState>r.OPENED&&n===void 0&&(clearTimeout(a),n=s(e.responseTimeout,"Socket timeout"))},r.onerror=()=>{r.status===0&&(clearTimeout(a),clearTimeout(n),t({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=()=>{clearTimeout(a),clearTimeout(n),t({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(e.data)})}}}function ge(e,t,r){const s={appId:e,apiKey:t,timeouts:{connect:1,read:2,write:30},requester:fe(),logger:me(),responsesCache:N(),requestsCache:N({serializable:!1}),hostsCache:S({caches:[U({key:`${w}-${e}`}),N()]}),userAgent:Z(w).add({segment:"Browser",version:"lite"}),authMode:v.WithinQueryParameters};return ie({...s,...r,methods:{search:j,searchForFacetValues:I,multipleQueries:j,multipleSearchForFacetValues:I,customRequest:ue,initIndex:a=>n=>F(a)(n,{methods:{search:de,searchForFacetValues:H,findAnswers:le}}),getRecommendations:he}})}ge.version=w;export{ge as default};

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.