PageSourceSearch

https://experiencewaterloo.com/dist/scripts/AisNumericSelect.a3f49e66d5a7ec5edc1d.min.js

js experiencewaterloo.com collected 2026-10-02 06:01:44 UTC 11,905 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7190],{2732:function(e,t){t.ud={mounted:function(e,t,n){e.clickOutsideEvent=function(n){e==n.target||e.contains(n.target)||t.value(n,e)},document.addEventListener("click",e.clickOutsideEvent)},unmounted:function(e){document.removeEventListener("click",e.clickOutsideEvent)}}},2160:function(e,t,n){var r=n(2732),i='[type="checkbox"]';t.Z={directives:{clickOutside:r.ud},data:function(){return{isOpen:!1}},methods:{open:function(){this.isOpen||(this.isOpen=!0)},close:function(){this.isOpen&&(this.isOpen=!1)},toggle:function(){this.isOpen=!this.isOpen},dropdownKeydownHandler:function(){var e,t,n;null==this||null===(e=this.$refs)||void 0===e||null===(t=e.list)||void 0===t||null===(n=t.querySelector(i))||void 0===n||n.focus()},itemKeyHandler:function(e){var t,n,r,o,u,a,c=(null==e||null===(t=e.target)||void 0===t||null===(n=t.closest("li"))||void 0===n?void 0:n.previousElementSibling)||null,l=(null==e||null===(r=e.target)||void 0===r||null===(o=r.closest("li"))||void 0===o?void 0:o.nextElementSibling)||null;38===e.keyCode&&null!=c&&(e.preventDefault(),e.stopPropagation(),null==c||null===(u=c.querySelector(i))||void 0===u||u.focus());40===e.keyCode&&null!=l&&(e.preventDefault(),e.stopPropagation(),null==l||null===(a=l.querySelector(i))||void 0===a||a.focus())}}}},367:function(e,t,n){n.r(t),n.d(t,{default:function(){return h}});var r=n(6252),i=n(9963),o=n(3577),u=["aria-expanded"],a=["textContent"],c=["aria-label","textContent"],l={class:"ddOptions__menu",role:"listbox"},s={class:"ddOptions__list ais-NumericSelect-list",ref:"list"},d=["value","onClick","checked"],f={class:"ddOptions__label ais-NumericSelect-label"};var m=n(755),v=n(1583),p=n(2160),y={props:{attribute:{type:String,required:!0},items:{type:Array,default:function(){return[]}},classNames:{type:Object,default:function(){return{}}},transformItems:{type:Function}},name:"AisNumericSelect",mixins:[(0,m.hJ)({connector:v.Z}),p.Z],computed:{count:function(){var e;return"%7B%7D"!==(null==this||null===(e=this.selectedItem)||void 0===e?void 0:e.value)?1:0},selectedItem:function(){var e,t;return null==this||null===(e=this.state)||void 0===e||null===(t=e.items)||void 0===t?void 0:t.find((function(e){return e.isRefined}))},selectedLabel:function(){var e;return(null==this||null===(e=this.selectedItem)||void 0===e?void 0:e.label)||"All"},widgetParams:function(){return{attribute:this.attribute,items:this.items,transformItems:this.transformItems,classNames:this.classNames}}}};const b=(0,n(3744).Z)(y,[["render",function(e,t,n,m,v,p){var y=(0,r.Q2)("click-outside");return e.state?(0,r.wy)(((0,r.wg)(),(0,r.iD)("div",{key:0,class:"ais-NumericSelect ddOptions",onKeydown:[t[3]||(t[3]=(0,i.D2)((function(){return e.close&&e.close.apply(e,arguments)}),["esc"])),t[4]||(t[4]=(0,i.D2)((function(){return e.close&&e.close.apply(e,arguments)}),["tab"]))]},[(0,r.WI)(e.$slots,"default",(0,o.vs)((0,r.F4)(e.state)),(function(){return[(0,r._)("button",{class:"ddOptions__cta ais-NumericSelect-button","aria-haspopup":"true",type:"button","aria-expanded":e.isOpen?"true":"false",onClick:t[0]||(t[0]=function(){return e.toggle&&e.toggle.apply(e,arguments)}),onKeydown:t[1]||(t[1]=(0,i.D2)((function(){return e.dropdownKeydownHandler&&e.dropdownKeydownHandler.apply(e,arguments)}),["down"]))},[(0,r._)("span",{textContent:(0,o.zw)(p.selectedLabel)},null,8,a),p.count&&p.count>1?((0,r.wg)(),(0,r.iD)("span",{key:0,class:"ddOptions__count ais-NumericSelect-count","data-item-bubble":"","aria-label":"".concat(p.count," selected"),textContent:(0,o.zw)(p.count)},null,8,c)):(0,r.kq)("",!0)],40,u),(0,r._)("div",l,[(0,r._)("ul",s,[((0,r.wg)(!0),(0,r.iD)(r.HY,null,(0,r.Ko)(e.state.items,(function(n){return(0,r.wg)(),(0,r.iD)("li",{class:"ais-NumericSelect-item",key:n.value},[(0,r._)("label",null,[(0,r._)("input",{class:"ddOptions__input ais-NumericSelect-checkbox",type:"radio",tabindex:"-1",role:"option",value:n.value,onClick:function(t){return e.state.refine(n.value)},checked:n.isRefined,onKeydown:t[2]||(t[2]=function(){return e.itemKeyHandler&&e.itemKeyHandler.apply(e,arguments)})},null,40,d),(0,r._)("span",f,(0,o.zw)(n.label),1)])])})),128))],512)])]}))],32)),[[y,e.close]]):(0,r.kq)("",!0)}]]);var h=b},1583:function(e,t,n){var r=n(7456),i=n(1490),o=n(2244),u=n(2895);function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function c(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];
1if(!n){if(Array.isArray(e)||(n=s(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,u=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return u=e.done,e},e:function(e){a=!0,o=e},f:function(){try{u||null==n.return||n.return()}finally{if(a)throw o}}}}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,u,a=[],c=!0,l=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&null!=n.return&&(u=n.return(),Object(u)!==u))return}finally{if(l)throw i}}return a}}(e,t)||s(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){if(e){if("string"==typeof e)return d(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(e,t):void 0}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){v(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function v(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==a(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==a(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===a(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var p=(0,r.K)({name:"numeric-menu",connector:!0}),y="ais.numericMenu",b=function(e){var t=e.instantSearchInstance;return function(){1!==arguments.length||t.sendEventToInsights(arguments.length<=0?void 0:arguments[0])}};function h(e,t,n){var r=e.getNumericRefinements(t);return void 0!==n.start&&void 0!==n.end?n.start===n.end?w(r,"=",n.start):w(r,">=",n.start)&&w(r,"<=",n.end):void 0!==n.start?w(r,">=",n.start):void 0!==n.end?w(r,"<=",n.end):void 0===n.start&&void 0===n.end&&Object.keys(r).every((function(e){return 0===(r[e]||[]).length}))}function g(e,t,n){var r=e,i=JSON.parse(decodeURI(n)),o=r.getNumericRefinements(t);if(void 0===i.start&&void 0===i.end)return r.removeNumericRefinement(t);if(h(r,t,i)||(r=r.removeNumericRefinement(t)),void 0!==i.start&&void 0!==i.end){if(i.start>i.end)throw new Error("option.start should be > to option.end");if(i.start===i.end)return r=w(o,"=",i.start)?r.removeNumericRefinement(t,"=",i.start):r.addNumericRefinement(t,"=",i.start)}return void 0!==i.start&&(w(o,">=",i.start)&&(r=r.removeNumericRefinement(t,">=",i.start)),r=r.addNumericRefinement(t,">=",i.start)),void 0!==i.end&&(w(o,"<=",i.end)&&(r=r.removeNumericRefinement(t,"<=",i.end)),r=r.addNumericRefinement(t,"<=",i.end)),"number"==typeof r.page&&(r.page=0),r}function w(e,t,n){return void 0!==e[t]&&e[t].includes(n)}t.Z=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.Z;return(0,o._)(e,p()),function(n){var r=n||{},i=r.attribute,o=void 0===i?"":i,a=r.items,s=void 0===a?[]:a,d=r.transformItems,f=void 0===d?function(e){return e}:d;if(""===o)throw new Error(p("The `attribute` option is required."));if(!s||0===s.length)throw new Error(p("The `items` option expects an array of objects."));var w={};return{$$type:y,init:function(t){var n=t.instantSearchInstance;e(m(m({},this.getWidgetRenderState(t)),{},{instantSearchInstance:n}),!0)},render:function(t){var n=t.instantSearchInstance;e(m(m({},this.getWidgetRenderState(t)),{},{instantSearchInstance:n}),!1)},dispose:function(e){var n=e.state;return t(),n.clearRefinements(o)},getWidgetUiState:function(e,t){var n=t.searchParameters.getNumericRefinements(o),r=n["="]&&n["="][0];if(r||0===r)return m(m({},e),{},{numericMenu:m(m({},e.numericMenu),{},v({},o,"".concat(n["="])))});var i=n[">="]&&n[">="][0]||"",u=n["<="]&&n["<="][0]||"";return""===i&&""===u?e:m(m({},e),{},{numericMenu:m(m({},e.numericMenu),{},v({},o,"".concat(i,":").concat(u)))})},getWidgetSearchParameters:function(e,t){var n=t.uiState,r=n.numericMenu&&n.numericMenu[o],i=e.clearRefinements(o);if(!r)return i.setQueryParameters({numericRefinements:m(m({},i.numericRefinements),{},v({},o,{}))});if(-1===r.indexOf(":"))return i.addNumericRefinement(o,"=",Number(r));var a=l(r.split(":").map(parseFloat),2),c=a[0],s=a[1],d=(0,u.z)(c)?i.addNumericRefinement(o,">=",c):i;return(0,u.z)(s)?d.addNumericRefinement(o,"<=",s):d},getRenderState:function(e,t){return m(m({},e),{},{numericMenu:m(m({},e.numericMenu),{},v({},o,this.getWidgetRenderState(t)))})},getWidgetRenderState:function(e){var t=e.results,r=e.state,i=e.instantSearchInstance,u=e.helper,a=e.createURL;w.refine||(w.refine=function(e){var t=g(u.state,o,e);w.sendEvent("click",e),u.setState(t).search()}),w.createURL||(w.createURL=function(e){return function(t){return a(g(e,o,t))}}),w.sendEvent||(w.sendEvent=b({instantSearchInstance:i}));var l,d=!t||0===t.nbHits,m=function(e){return s.map((function(t){var n=t.start,r=t.end,i=t.label;return{label:i,value:encodeURI(JSON.stringify({start:n,end:r})),isRefined:h(e,o,{start:n,end:r,label:i})}}))}(r),v=!0,p=c(m);try{for(p.s();!(l=p.n()).done;){var y=l.value;if(y.isRefined&&"{}"!==decodeURI(y.value)){v=!1;break}}}catch(e){p.e(e)}finally{p.f()}return{createURL:w.createURL(r),items:f(m,{results:t}),hasNoResults:d,canRefine:!(d&&v),refine:w.refine,sendEvent:w.sendEvent,widgetParams:n}}}}}},2244:function(e,t,n){function r(e,t){if(void 0===e||"function"!=typeof e)throw new Error("The render function is not val
1id (received type ".concat((n=e,Object.prototype.toString.call(n).slice(8,-1)),").\n\n").concat(t));var n}n.d(t,{_:function(){return r}})},7456:function(e,t,n){function r(e){var t=e.name,n=e.connector;return["https://www.algolia.com/doc/api-reference/widgets/",t,"/js/",void 0!==n&&n?"#connector":""].join("")}function i(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var i=t.map((function(e){return r(e)})).join(", ");return function(e){return[e,"See documentation: ".concat(i)].filter(Boolean).join("\n\n")}}n.d(t,{J:function(){return r},K:function(){return i}})},2895:function(e,t,n){function r(e){return"number"==typeof e&&isFinite(e)}n.d(t,{z:function(){return r}})}}]);

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.