@roadtrip/components 2.29.1 → 2.30.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{index-38dff3de.js → index-575ae25f.js} +2 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/road-accordion.cjs.entry.js +1 -1
- package/dist/cjs/road-badge_11.cjs.entry.js +1 -1
- package/dist/cjs/road-banner.cjs.entry.js +1 -1
- package/dist/cjs/road-carousel.cjs.entry.js +1 -1
- package/dist/cjs/road-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/road-chip.cjs.entry.js +1 -1
- package/dist/cjs/road-dialog.cjs.entry.js +1 -1
- package/dist/cjs/road-modal.cjs.entry.js +1 -1
- package/dist/cjs/road-plate-number.cjs.entry.js +2 -2
- package/dist/cjs/road-range.cjs.entry.js +7 -2
- package/dist/cjs/road-rating.cjs.entry.js +1 -1
- package/dist/cjs/road-select-filter.cjs.entry.js +12 -1
- package/dist/cjs/road-toast.cjs.entry.js +1 -1
- package/dist/cjs/roadtrip.cjs.js +1 -1
- package/dist/collection/components/plate-number/plate-number.js +1 -1
- package/dist/collection/components/range/range.css +6 -2
- package/dist/collection/components/range/range.js +30 -4
- package/dist/collection/components/range/range.stories.js +6 -0
- package/dist/collection/components/select-filter/select-filter.js +42 -1
- package/dist/collection/components/select-filter/select-filter.stories.js +4 -1
- package/dist/esm/{index-d612e910.js → index-5e24bf37.js} +2 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/road-accordion.entry.js +1 -1
- package/dist/esm/road-badge_11.entry.js +1 -1
- package/dist/esm/road-banner.entry.js +1 -1
- package/dist/esm/road-carousel.entry.js +1 -1
- package/dist/esm/road-checkbox.entry.js +1 -1
- package/dist/esm/road-chip.entry.js +1 -1
- package/dist/esm/road-dialog.entry.js +1 -1
- package/dist/esm/road-modal.entry.js +1 -1
- package/dist/esm/road-plate-number.entry.js +2 -2
- package/dist/esm/road-range.entry.js +7 -2
- package/dist/esm/road-rating.entry.js +1 -1
- package/dist/esm/road-select-filter.entry.js +12 -1
- package/dist/esm/road-toast.entry.js +1 -1
- package/dist/esm/roadtrip.js +1 -1
- package/dist/esm-es5/{index-d612e910.js → index-5e24bf37.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/road-accordion.entry.js +1 -1
- package/dist/esm-es5/road-badge_11.entry.js +1 -1
- package/dist/esm-es5/road-banner.entry.js +1 -1
- package/dist/esm-es5/road-carousel.entry.js +1 -1
- package/dist/esm-es5/road-checkbox.entry.js +1 -1
- package/dist/esm-es5/road-chip.entry.js +1 -1
- package/dist/esm-es5/road-dialog.entry.js +1 -1
- package/dist/esm-es5/road-modal.entry.js +1 -1
- package/dist/esm-es5/road-plate-number.entry.js +1 -1
- package/dist/esm-es5/road-range.entry.js +1 -1
- package/dist/esm-es5/road-rating.entry.js +1 -1
- package/dist/esm-es5/road-select-filter.entry.js +1 -1
- package/dist/esm-es5/road-toast.entry.js +1 -1
- package/dist/esm-es5/roadtrip.js +1 -1
- package/dist/html.html-data.json +8 -0
- package/dist/roadtrip/{p-217cbe8e.system.entry.js → p-070c9811.system.entry.js} +1 -1
- package/dist/roadtrip/p-071b7a4a.system.entry.js +1 -0
- package/dist/roadtrip/{p-fc3ddc8f.system.entry.js → p-0e84c69a.system.entry.js} +1 -1
- package/dist/roadtrip/{p-4d4403bd.system.entry.js → p-159d83fc.system.entry.js} +1 -1
- package/dist/roadtrip/{p-1e8c2ef4.entry.js → p-221f2b4e.entry.js} +1 -1
- package/dist/roadtrip/{p-d920dfb7.entry.js → p-36f67c07.entry.js} +1 -1
- package/dist/roadtrip/{p-8134554a.entry.js → p-44d18405.entry.js} +1 -1
- package/dist/roadtrip/p-54f6290f.entry.js +1 -0
- package/dist/roadtrip/{p-aeef53e7.system.entry.js → p-642f2d7b.system.entry.js} +1 -1
- package/dist/roadtrip/{p-b182a822.system.entry.js → p-6869bb9e.system.entry.js} +1 -1
- package/dist/roadtrip/{p-374713ec.entry.js → p-7781ae98.entry.js} +1 -1
- package/dist/roadtrip/{p-415986e7.system.entry.js → p-7f6d428f.system.entry.js} +1 -1
- package/dist/roadtrip/{p-c93a46dd.system.entry.js → p-80e9520b.system.entry.js} +1 -1
- package/dist/roadtrip/{p-6a78da80.js → p-8483d855.js} +1 -1
- package/dist/roadtrip/{p-7073f8c2.entry.js → p-89ae9541.entry.js} +1 -1
- package/dist/roadtrip/{p-ba2fbd4d.system.js → p-8e5e066c.system.js} +1 -1
- package/dist/roadtrip/{p-1bf25864.entry.js → p-975338e4.entry.js} +1 -1
- package/dist/roadtrip/{p-9cf14f6b.entry.js → p-a61d5b6c.entry.js} +1 -1
- package/dist/roadtrip/{p-030f078e.system.entry.js → p-aac4c95b.system.entry.js} +1 -1
- package/dist/roadtrip/p-b205281e.system.js +1 -1
- package/dist/roadtrip/{p-277d7139.entry.js → p-be767436.entry.js} +1 -1
- package/dist/roadtrip/{p-c11d0d20.system.entry.js → p-c218985b.system.entry.js} +1 -1
- package/dist/roadtrip/{p-f0f44a57.system.entry.js → p-c4992dbd.system.entry.js} +1 -1
- package/dist/roadtrip/{p-86d53ea4.entry.js → p-c4ebd67f.entry.js} +1 -1
- package/dist/roadtrip/{p-c2f61ccd.entry.js → p-c786b700.entry.js} +1 -1
- package/dist/roadtrip/{p-453a812f.system.entry.js → p-cc43071e.system.entry.js} +1 -1
- package/dist/roadtrip/{p-90a76d66.entry.js → p-d48e0669.entry.js} +1 -1
- package/dist/roadtrip/{p-d3858ffa.system.entry.js → p-e1859bab.system.entry.js} +1 -1
- package/dist/roadtrip/p-ea1eff86.entry.js +1 -0
- package/dist/roadtrip/roadtrip.esm.js +1 -1
- package/dist/types/components/range/range.d.ts +4 -0
- package/dist/types/components/select-filter/select-filter.d.ts +5 -0
- package/dist/types/components.d.ts +16 -0
- package/package.json +1 -1
- package/dist/roadtrip/p-6819f569.entry.js +0 -1
- package/dist/roadtrip/p-7df3c178.entry.js +0 -1
- package/dist/roadtrip/p-81333100.system.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as registerInstance,c as createEvent,h}from"./index-0c8a0e04.js";import{l as licensePlateStarEu}from"./index-
|
|
1
|
+
import{r as registerInstance,c as createEvent,h}from"./index-0c8a0e04.js";import{l as licensePlateStarEu}from"./index-5e24bf37.js";var plateNumberCss=".sc-road-plate-number-h{display:block}.plate-number.sc-road-plate-number{--margin-bottom:0}.plate-number-start.sc-road-plate-number,.plate-number-end.sc-road-plate-number{width:1.75rem;height:calc(3rem - 0.25rem);background:var(--road-info-text)}.input-group-prepend.sc-road-plate-number{margin-right:-1px}.input-group-prepend.sc-road-plate-number,.input-group-append.sc-road-plate-number{padding:0}.plate-number-start.sc-road-plate-number{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;padding:0;margin-right:0;margin-left:1px;color:var(--road-info-contrast);border-radius:0.125rem 0 0 0.125rem}.plate-number-icon.sc-road-plate-number{width:1.25rem;height:1.25rem;color:#f3db53}.plate-number-location.sc-road-plate-number{font-size:0.875rem;font-weight:700}.plate-number-end.sc-road-plate-number{margin-right:1px;border-radius:0 0.125rem 0.125rem 0}.plate-number-be.sc-road-plate-number .plate-number-input.sc-road-plate-number{color:var(--road-danger-text)}.plate-number-be.sc-road-plate-number .plate-number-input.sc-road-plate-number,.plate-number-be.sc-road-plate-number .input-group-append.sc-road-plate-number,.plate-number-be.sc-road-plate-number .input-group-prepend.sc-road-plate-number{border-color:var(--road-danger-text)}.plate-number-input.sc-road-plate-number{position:relative;display:block;height:3rem;margin:0;font-family:var(--road-font, sans-serif);font-size:1.75rem;font-weight:700;color:var(--road-grey-900);text-align:center;background:var(--road-grey-000);border:1px solid var(--road-grey-400);border-radius:0;outline:0;-webkit-box-shadow:none;box-shadow:none;-webkit-appearance:none;-moz-appearance:none;appearance:none}.plate-number-input.sc-road-plate-number::-webkit-input-placeholder{color:var(--road-grey-500);opacity:1}.plate-number-input.sc-road-plate-number::-moz-placeholder{color:var(--road-grey-500);opacity:1}.plate-number-input.sc-road-plate-number:-ms-input-placeholder{color:var(--road-grey-500);opacity:1}.plate-number-input.sc-road-plate-number::-ms-input-placeholder{color:var(--road-grey-500);opacity:1}.plate-number-input.sc-road-plate-number::placeholder{color:var(--road-grey-500);opacity:1}.plate-number-input.sc-road-plate-number:disabled,.plate-number-input[readonly].sc-road-plate-number{color:var(--road-grey-900);cursor:not-allowed;background:var(--road-disabled);opacity:1}.plate-number-input.sc-road-plate-number:disabled~.input-group-prepend.sc-road-plate-number,.plate-number-input[readonly].sc-road-plate-number~.input-group-prepend.sc-road-plate-number,.plate-number-input.sc-road-plate-number:disabled~.input-group-append.sc-road-plate-number,.plate-number-input[readonly].sc-road-plate-number~.input-group-append.sc-road-plate-number{background:var(--road-disabled)}@media (hover: hover){.plate-number-input.sc-road-plate-number:not(:disabled):not([readonly]):hover{border-color:var(--road-primary-700)}}.plate-number-input.sc-road-plate-number:not([readonly]):focus{border-color:var(--road-primary-700);outline:0}.motorbike-plate.sc-road-plate-number .plate-number-input.sc-road-plate-number{height:6rem;padding:0.75rem 1rem 0;resize:none;border-left:0}.motorbike-plate.sc-road-plate-number .input-group-prepend.sc-road-plate-number,.motorbike-plate.sc-road-plate-number .input-group-append.sc-road-plate-number{-ms-flex-align:start;align-items:flex-start;height:6rem;padding:0}.motorbike-plate.sc-road-plate-number .plate-number-start.sc-road-plate-number{margin-top:1px;border-radius:0.125rem 0 0}.motorbike-plate.sc-road-plate-number .plate-number-end.sc-road-plate-number{margin-top:1px;border-radius:0 0.125rem 0 0}";var PlateNumber=function(){function e(e){var r=this;registerInstance(this,e);this.roadinput=createEvent(this,"roadinput",7);this.roadInput=createEvent(this,"roadInput",7);this.roadchange=createEvent(this,"roadchange",7);this.roadChange=createEvent(this,"roadChange",7);this.roadblur=createEvent(this,"roadblur",7);this.roadBlur=createEvent(this,"roadBlur",7);this.roadfocus=createEvent(this,"roadfocus",7);this.roadFocus=createEvent(this,"roadFocus",7);this.countries=[{country:"FR",letter:"F",placeholder:"AT-857-YY"},{country:"BE",letter:"B",placeholder:"1-AAA-001"},{country:"IT",letter:"I",placeholder:"AT 814TX"},{country:"ES",letter:"E",placeholder:"9512 HVY"},{country:"PT",letter:"P",placeholder:"13 24 PZ"},{country:"PL",letter:"PL",placeholder:"GD 921KF"}];this.country="FR";this.disabled=false;this.readonly=false;this.value="";this.onInput=function(e){var t=e.target;if(t){t.value=t.value.toUpperCase()||""}r.roadinput.emit(e);r.roadInput.emit(e)};this.onBlur=function(){r.roadblur.emit();r.roadBlur.emit()};this.onFocus=function(){r.roadfocus.emit();r.roadFocus.emit()}}e.prototype.valueChanged=function(){this.roadchange.emit({value:this.value==null?this.value:this.value.toString()});this.roadChange.emit({value:this.value==null?this.value:this.value.toString()})};e.prototype.getValue=function(){return typeof this.value==="number"?this.value.toString():(this.value||"").toString()};e.prototype.render=function(){var e=this;var r=this.getValue();var t=this.motorbike?"motorbike-plate":"";return h("road-input-group",{class:"plate-number plate-number-"+this.country.toLowerCase()+" "+t},h("label",{slot:"prepend",class:"input-group-prepend"},h("div",{class:"plate-number-start"},h("road-icon",{class:"plate-number-icon",icon:licensePlateStarEu}),h("div",{class:"plate-number-location"},this.countries.filter((function(r){return r.country===e.country}))[0].letter))),this.motorbike?h("textarea",{class:"form-control plate-number-input mb-0",disabled:this.disabled,placeholder:this.placeholder!=null?this.placeholder:this.countries.filter((function(r){return r.country===e.country}))[0].placeholder,readOnly:this.readonly,maxlength:"9",rows:2,onInput:this.onInput,onBlur:this.onBlur,onFocus:this.onFocus}):h("input",{class:"plate-number-input mb-0",disabled:this.disabled,placeholder:this.placeholder!=null?this.placeholder:this.countries.filter((function(r){return r.country===e.country}))[0].placeholder,readOnly:this.readonly,value:r,onInput:this.onInput,onBlur:this.onBlur,onFocus:this.onFocus}),h("label",{slot:"append",class:"input-group-append"},h("div",{class:"plate-number-end"})))};Object.defineProperty(e,"watchers",{get:function(){return{value:["valueChanged"]}},enumerable:false,configurable:true});return e}();PlateNumber.style=plateNumberCss;export{PlateNumber as road_plate_number};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as registerInstance,c as createEvent,h,e as getElement}from"./index-0c8a0e04.js";var rangeCss='.sc-road-range-h{display:block}.form-range.sc-road-range{position:relative;display:block;width:100%;margin-bottom:6px}.form-range-input.sc-road-range{position:relative;z-index:1;width:100%;height:0.5rem;background:transparent;outline:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}.form-range.sc-road-range>output.sc-road-range::after{display:block;font-size:0.875rem;text-align:right;content:counter(variable);counter-reset:variable var(--value)}.form-range-progress.sc-road-range{position:relative;z-index:0;display:block;width:100%;margin-top:-0.875rem}.form-range-input.sc-road-range::-webkit-slider-runnable-track{height:0.5rem;border:0;-webkit-appearance:none;appearance:none}.form-range-input.sc-road-range::-moz-range-track{height:0.5rem;border:0;-moz-appearance:none;appearance:none}.form-range-progress.sc-road-range::before{display:block;height:0.5rem;content:"";background-color:var(--road-grey-200);border:0;border-radius:1.125rem}.form-range-progress.sc-road-range::after{position:absolute;top:0;right:0;left:0;display:block;width:calc((var(--value) * 100%) / var(--max));height:0.5rem;content:"";background:var(--road-primary-500);border-radius:1.125rem}.form-range-input.sc-road-range::-webkit-slider-thumb{position:relative;z-index:1;width:1.625rem;height:1.625rem;margin-top:-0.625rem;cursor:-webkit-grab;cursor:grab;background:var(--road-grey-000);border:none;border-radius:1.625rem;-webkit-box-shadow:0 0.1875rem 0.375rem rgba(0, 0, 0, 0.24);box-shadow:0 0.1875rem 0.375rem rgba(0, 0, 0, 0.24);-webkit-appearance:none;appearance:none}.form-range-input.sc-road-range::-moz-range-thumb{position:relative;z-index:1;box-sizing:border-box;width:1.625rem;height:1.625rem;margin-top:-0.625rem;cursor:grab;background:var(--road-grey-000);border:none;border-radius:1.625rem;box-shadow:0 0.1875rem 0.375rem rgba(0, 0, 0, 0.24);-moz-appearance:none;appearance:none}.focus-visible.sc-road-range-h .form-range-input.sc-road-range::-webkit-slider-thumb,.sc-road-range-h:active .form-range-input.sc-road-range::-webkit-slider-thumb{background:var(--road-primary-
|
|
1
|
+
import{r as registerInstance,c as createEvent,h,e as getElement}from"./index-0c8a0e04.js";import{h as navigationAddMore,b as navigationAddLess}from"./index-5e24bf37.js";var rangeCss='.sc-road-range-h{display:block}.form-group.sc-road-range{width:100%}.form-range.sc-road-range{position:relative;display:block;width:100%;margin-bottom:6px}.form-range-input.sc-road-range{position:relative;z-index:1;width:100%;height:0.5rem;background:transparent;outline:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}.form-range.sc-road-range>output.sc-road-range::after{display:block;font-size:0.875rem;text-align:right;content:counter(variable);counter-reset:variable var(--value)}.form-range-progress.sc-road-range{position:relative;z-index:0;display:block;width:100%;margin-top:-0.875rem}.form-range-input.sc-road-range::-webkit-slider-runnable-track{height:0.5rem;border:0;-webkit-appearance:none;appearance:none}.form-range-input.sc-road-range::-moz-range-track{height:0.5rem;border:0;-moz-appearance:none;appearance:none}.form-range-progress.sc-road-range::before{display:block;height:0.5rem;content:"";background-color:var(--road-grey-200);border:0;border-radius:1.125rem}.form-range-progress.sc-road-range::after{position:absolute;top:0;right:0;left:0;display:block;width:calc((var(--value) * 100%) / var(--max));height:0.5rem;content:"";background:var(--road-primary-500);border-radius:1.125rem}.form-range-input.sc-road-range::-webkit-slider-thumb{position:relative;z-index:1;width:1.625rem;height:1.625rem;margin-top:-0.625rem;cursor:-webkit-grab;cursor:grab;background:var(--road-grey-000);border:none;border-radius:1.625rem;-webkit-box-shadow:0 0.1875rem 0.375rem rgba(0, 0, 0, 0.24);box-shadow:0 0.1875rem 0.375rem rgba(0, 0, 0, 0.24);-webkit-appearance:none;appearance:none}.form-range-input.sc-road-range::-moz-range-thumb{position:relative;z-index:1;box-sizing:border-box;width:1.625rem;height:1.625rem;margin-top:-0.625rem;cursor:grab;background:var(--road-grey-000);border:none;border-radius:1.625rem;box-shadow:0 0.1875rem 0.375rem rgba(0, 0, 0, 0.24);-moz-appearance:none;appearance:none}.focus-visible.sc-road-range-h .form-range-input.sc-road-range::-webkit-slider-thumb,.sc-road-range-h:active .form-range-input.sc-road-range::-webkit-slider-thumb{background:var(--road-primary-700);border:0.5rem solid var(--road-grey-000)}.focus-visible.sc-road-range-h .form-range-input.sc-road-range::-moz-range-thumb,.sc-road-range-h:active .form-range-input.sc-road-range::-moz-range-thumb{background:var(--road-primary-700);border:0.5rem solid var(--road-grey-000)}';var Range=function(){function e(e){var r=this;registerInstance(this,e);this.roadchange=createEvent(this,"roadchange",7);this.roadChange=createEvent(this,"roadChange",7);this.rangeId="road-range-"+rangeIds++;this.value="";this.showValue=false;this.showTick=false;this.onInput=function(e){var a=e.target;if(a){r.value=a.value||""}if(r.value!==null&&r.value!==undefined){r.el.style.setProperty("--value",""+r.value)}}}e.prototype.valueChanged=function(){this.roadchange.emit({value:this.value==null?this.value:this.value.toString()});this.roadChange.emit({value:this.value==null?this.value:this.value.toString()})};e.prototype.getValue=function(){return typeof this.value==="number"?this.value.toString():(this.value||"").toString()};e.prototype.render=function(){var e=this.getValue();return h("div",{class:"form-group d-flex align-items-end"},this.showTick&&h("road-icon",{icon:navigationAddLess,class:"mr-8",size:"sm"}),h("div",{class:"form-range",style:{"--min:":this.min,"--max":this.max,"--value":e}},this.showValue&&h("output",null),h("input",{type:"range",class:"form-range-input",id:this.rangeId,min:this.min,max:this.max,value:e,onInput:this.onInput}),h("div",{class:"form-range-progress"})),this.showTick&&h("road-icon",{icon:navigationAddMore,class:"ml-8",size:"sm"}))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{value:["valueChanged"]}},enumerable:false,configurable:true});return e}();var rangeIds=0;Range.style=rangeCss;export{Range as road_range};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __spreadArray=this&&this.__spreadArray||function(r,a){for(var s=0,t=a.length,e=r.length;s<t;s++,e++)r[e]=a[s];return r};import{r as registerInstance,h,H as Host}from"./index-0c8a0e04.js";import{s as star,
|
|
1
|
+
var __spreadArray=this&&this.__spreadArray||function(r,a){for(var s=0,t=a.length,e=r.length;s<t;s++,e++)r[e]=a[s];return r};import{r as registerInstance,h,H as Host}from"./index-0c8a0e04.js";import{s as star,i as starHalfColor}from"./index-5e24bf37.js";var ratingCss=":host{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.rating-stars{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-negative:0;flex-shrink:0}.rating-star{color:var(--road-grey-400)}.rating-number{margin-left:0.5rem;font-size:1rem;color:var(--road-grey-900)}";var Rating=function(){function r(r){registerInstance(this,r);this.rate=0;this.reviews=0;this.reviewsText="reviews"}r.prototype.render=function(){var r=Math.floor(this.rate);var a=this.rate-Math.floor(this.rate)>0?1:0;return h(Host,null,h("div",{class:"rating-stars"},__spreadArray([],Array(r)).map((function(){return h("road-icon",{icon:star,size:"sm",color:"warning"})})),__spreadArray([],Array(a)).map((function(){return h("road-icon",{icon:starHalfColor,size:"sm",class:"rating-star"})})),__spreadArray([],Array(5-r-a)).map((function(){return h("road-icon",{icon:star,size:"sm",class:"rating-star"})}))),h("span",{class:"rating-number"},"(",this.reviews,this.reviewsText&&" "+this.reviewsText,")"))};return r}();Rating.style=ratingCss;export{Rating as road_rating};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r))e[r]=t[r]};return e(t,r)};return function(t,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function i(){this.constructor=t}t.prototype=r===null?Object.create(r):(i.prototype=r.prototype,new i)}}();var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,r=1,i=arguments.length;r<i;r++){t=arguments[r];for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n))e[n]=t[n]}return e};return __assign.apply(this,arguments)};var __spreadArray=this&&this.__spreadArray||function(e,t){for(var r=0,i=t.length,n=e.length;r<i;r++,n++)e[n]=t[r];return e};import{r as registerInstance,c as createEvent,h,H as Host,e as getElement}from"./index-0c8a0e04.js";function isArray(e){return!Array.isArray?getTag(e)==="[object Array]":Array.isArray(e)}var INFINITY=1/0;function baseToString(e){if(typeof e=="string"){return e}var t=e+"";return t=="0"&&1/e==-INFINITY?"-0":t}function toString(e){return e==null?"":baseToString(e)}function isString(e){return typeof e==="string"}function isNumber(e){return typeof e==="number"}function isBoolean(e){return e===true||e===false||isObjectLike(e)&&getTag(e)=="[object Boolean]"}function isObject(e){return typeof e==="object"}function isObjectLike(e){return isObject(e)&&e!==null}function isDefined(e){return e!==undefined&&e!==null}function isBlank(e){return!e.trim().length}function getTag(e){return e==null?e===undefined?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}var EXTENDED_SEARCH_UNAVAILABLE="Extended search is not available";var INCORRECT_INDEX_TYPE="Incorrect 'index' type";var LOGICAL_SEARCH_INVALID_QUERY_FOR_KEY=function(e){return"Invalid value for key "+e};var PATTERN_LENGTH_TOO_LARGE=function(e){return"Pattern length exceeds max of "+e+"."};var MISSING_KEY_PROPERTY=function(e){return"Missing "+e+" property in key"};var INVALID_KEY_WEIGHT_VALUE=function(e){return"Property 'weight' in key '"+e+"' must be a positive integer"};var hasOwn=Object.prototype.hasOwnProperty;var KeyStore=function(){function e(e){var t=this;this._keys=[];this._keyMap={};var r=0;e.forEach((function(e){var i=createKey(e);r+=i.weight;t._keys.push(i);t._keyMap[i.id]=i;r+=i.weight}));this._keys.forEach((function(e){e.weight/=r}))}e.prototype.get=function(e){return this._keyMap[e]};e.prototype.keys=function(){return this._keys};e.prototype.toJSON=function(){return JSON.stringify(this._keys)};return e}();function createKey(e){var t=null;var r=null;var i=null;var n=1;if(isString(e)||isArray(e)){i=e;t=createKeyPath(e);r=createKeyId(e)}else{if(!hasOwn.call(e,"name")){throw new Error(MISSING_KEY_PROPERTY("name"))}var a=e.name;i=a;if(hasOwn.call(e,"weight")){n=e.weight;if(n<=0){throw new Error(INVALID_KEY_WEIGHT_VALUE(a))}}t=createKeyPath(a);r=createKeyId(a)}return{path:t,id:r,weight:n,src:i}}function createKeyPath(e){return isArray(e)?e:e.split(".")}function createKeyId(e){return isArray(e)?e.join("."):e}function get(e,t){var r=[];var i=false;var n=function(e,t,a){if(!isDefined(e)){return}if(!t[a]){r.push(e)}else{var o=t[a];var s=e[o];if(!isDefined(s)){return}if(a===t.length-1&&(isString(s)||isNumber(s)||isBoolean(s))){r.push(toString(s))}else if(isArray(s)){i=true;for(var c=0,u=s.length;c<u;c+=1){n(s[c],t,a+1)}}else if(t.length){n(s,t,a+1)}}};n(e,isString(t)?t.split("."):t,0);return i?r:r[0]}var MatchOptions={includeMatches:false,findAllMatches:false,minMatchCharLength:1};var BasicOptions={isCaseSensitive:false,includeScore:false,keys:[],shouldSort:true,sortFn:function(e,t){return e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1}};var FuzzyOptions={location:0,threshold:.6,distance:100};var AdvancedOptions={useExtendedSearch:false,getFn:get,ignoreLocation:false,ignoreFieldNorm:false,fieldNormWeight:1};var Config=__assign(__assign(__assign(__assign({},BasicOptions),MatchOptions),FuzzyOptions),AdvancedOptions);var SPACE=/[^ ]+/g;function norm(e,t){if(e===void 0){e=1}if(t===void 0){t=3}var r=new Map;var i=Math.pow(10,t);return{get:function(t){var n=t.match(SPACE).length;if(r.has(n)){return r.get(n)}var a=1/Math.pow(n,.5*e);var o=parseFloat(Math.round(a*i)/i);r.set(n,o);return o},clear:function(){r.clear()}}}var FuseIndex=function(){function e(e){var t=e===void 0?{}:e,r=t.getFn,i=r===void 0?Config.getFn:r,n=t.fieldNormWeight,a=n===void 0?Config.fieldNormWeight:n;this.norm=norm(a,3);this.getFn=i;this.isCreated=false;this.setIndexRecords()}e.prototype.setSources=function(e){if(e===void 0){e=[]}this.docs=e};e.prototype.setIndexRecords=function(e){if(e===void 0){e=[]}this.records=e};e.prototype.setKeys=function(e){var t=this;if(e===void 0){e=[]}this.keys=e;this._keysMap={};e.forEach((function(e,r){t._keysMap[e.id]=r}))};e.prototype.create=function(){var e=this;if(this.isCreated||!this.docs.length){return}this.isCreated=true;if(isString(this.docs[0])){this.docs.forEach((function(t,r){e._addString(t,r)}))}else{this.docs.forEach((function(t,r){e._addObject(t,r)}))}this.norm.clear()};e.prototype.add=function(e){var t=this.size();if(isString(e)){this._addString(e,t)}else{this._addObject(e,t)}};e.prototype.removeAt=function(e){this.records.splice(e,1);for(var t=e,r=this.size();t<r;t+=1){this.records[t].i-=1}};e.prototype.getValueForItemAtKeyId=function(e,t){return e[this._keysMap[t]]};e.prototype.size=function(){return this.records.length};e.prototype._addString=function(e,t){if(!isDefined(e)||isBlank(e)){return}var r={v:e,i:t,n:this.norm.get(e)};this.records.push(r)};e.prototype._addObject=function(e,t){var r=this;var i={i:t,$:{}};this.keys.forEach((function(t,n){var a=r.getFn(e,t.path);if(!isDefined(a)){return}if(isArray(a)){var o=[];var s=[{nestedArrIndex:-1,value:a}];while(s.length){var c=s.pop(),u=c.nestedArrIndex,h=c.value;if(!isDefined(h)){continue}if(isString(h)&&!isBlank(h)){var f={v:h,i:u,n:r.norm.get(h)};o.push(f)}else if(isArray(h)){h.forEach((function(e,t){s.push({nestedArrIndex:t,value:e})}))}else;}i.$[n]=o}else if(!isBlank(a)){var f={v:a,n:r.norm.get(a)};i.$[n]=f}}));this.records.push(i)};e.prototype.toJSON=function(){return{keys:this.keys,records:this.records}};return e}();function createIndex(e,t,r){var i=r===void 0?{}:r,n=i.getFn,a=n===void 0?Config.getFn:n,o=i.fieldNormWeight,s=o===void 0?Config.fieldNormWeight:o;var c=new FuseIndex({getFn:a,fieldNormWeight:s});c.setKeys(e.map(createKey));c.setSources(t);c.create();return c}function parseIndex(e,t){var r=t===void 0?{}:t,i=r.getFn,n=i===void 0?Config.getFn:i,a=r.fieldNormWeight,o=a===void 0?Config.fieldNormWeight:a;var s=e.keys,c=e.records;var u=new FuseIndex({getFn:n,fieldNormWeight:o});u.setKeys(s);u.setIndexRecords(c);return u}function computeScore$1(e,t){var r=t===void 0?{}:t,i=r.errors,n=i===void 0?0:i,a=r.currentLocation,o=a===void 0?0:a,s=r.expectedLocation,c=s===void 0?0:s,u=r.distance,h=u===void 0?Config.distance:u,f=r.ignoreLocation,l=f===void 0?Config.ignoreLocation:f;var d=n/e.length;if(l){return d}var v=Math.abs(c-o);if(!h){return v?1:d}return d+v/h}function convertMaskToIndices(e,t){if(e===void 0){e=[]}if(t===void 0){t=Config.minMatchCharLength}var r=[];var i=-1;var n=-1;var a=0;for(var o=e.length;a<o;a+=1){var s=e[a];if(s&&i===-1){i=a}else if(!s&&i!==-1){n=a-1;if(n-i+1>=t){r.push([i,n])}i=-1}}if(e[a-1]&&a-i>=t){r.push([i,a-1])}return r}var MAX_BITS=32;function search(e,t,r,i){var n=i===void 0?{}:i,a=n.location,o=a===void 0?Config.location:a,s=n.distance,c=s===void 0?Config.distance:s,u=n.threshold,h=u===void 0?Config.threshold:u,f=n.findAllMatches,l=f===void 0?Config.findAllMatches:f,d=n.minMatchCharLength,v=d===void 0?Config.minMatchCharLength:d,p=n.includeMatches,g=p===void 0?Config.includeMatches:p,y=n.ignoreLocation,m=y===void 0?Config.ignoreLocation:y;if(t.length>MAX_BITS){throw new Error(PATTERN_LENGTH_TOO_LARGE(MAX_BITS))}var _=t.length;var M=e.length;var x=Math.max(0,Math.min(o,M));var b=h;var S=x;var E=v>1||g;var C=E?Array(M):[];var I;while((I=e.indexOf(t,S))>-1){var A=computeScore$1(t,{currentLocation:I,expectedLocation:x,distance:c,ignoreLocation:m});b=Math.min(A,b);S=I+_;if(E){var O=0;while(O<_){C[I+O]=1;O+=1}}}S=-1;var L=[];var k=1;var w=_+M;var P=1<<_-1;for(var O=0;O<_;O+=1){var N=0;var T=w;while(N<T){var j=computeScore$1(t,{errors:O,currentLocation:x+T,expectedLocation:x,distance:c,ignoreLocation:m});if(j<=b){N=T}else{w=T}T=Math.floor((w-N)/2+N)}w=T;var F=Math.max(1,x-T+1);var R=l?M:Math.min(x+T,M)+_;var $=Array(R+2);$[R+1]=(1<<O)-1;for(var B=R;B>=F;B-=1){var K=B-1;var D=r[e.charAt(K)];if(E){C[K]=+!!D}$[B]=($[B+1]<<1|1)&D;if(O){$[B]|=(L[B+1]|L[B])<<1|1|L[B+1]}if($[B]&P){k=computeScore$1(t,{errors:O,currentLocation:K,expectedLocation:x,distance:c,ignoreLocation:m});if(k<=b){b=k;S=K;if(S<=x){break}F=Math.max(1,2*x-S)}}}var A=computeScore$1(t,{errors:O+1,currentLocation:x,expectedLocation:x,distance:c,ignoreLocation:m});if(A>b){break}L=$}var z={isMatch:S>=0,score:Math.max(.001,k)};if(E){var W=convertMaskToIndices(C,v);if(!W.length){z.isMatch=false}else if(g){z.indices=W}}return z}function createPatternAlphabet(e){var t={};for(var r=0,i=e.length;r<i;r+=1){var n=e.charAt(r);t[n]=(t[n]||0)|1<<i-r-1}return t}var BitapSearch=function(){function e(e,t){var r=this;var i=t===void 0?{}:t,n=i.location,a=n===void 0?Config.location:n,o=i.threshold,s=o===void 0?Config.threshold:o,c=i.distance,u=c===void 0?Config.distance:c,h=i.includeMatches,f=h===void 0?Config.includeMatches:h,l=i.findAllMatches,d=l===void 0?Config.findAllMatches:l,v=i.minMatchCharLength,p=v===void 0?Config.minMatchCharLength:v,g=i.isCaseSensitive,y=g===void 0?Config.isCaseSensitive:g,m=i.ignoreLocation,_=m===void 0?Config.ignoreLocation:m;this.options={location:a,threshold:s,distance:u,includeMatches:f,findAllMatches:d,minMatchCharLength:p,isCaseSensitive:y,ignoreLocation:_};this.pattern=y?e:e.toLowerCase();this.chunks=[];if(!this.pattern.length){return}var M=function(e,t){r.chunks.push({pattern:e,alphabet:createPatternAlphabet(e),startIndex:t})};var x=this.pattern.length;if(x>MAX_BITS){var b=0;var S=x%MAX_BITS;var E=x-S;while(b<E){M(this.pattern.substr(b,MAX_BITS),b);b+=MAX_BITS}if(S){var C=x-MAX_BITS;M(this.pattern.substr(C),C)}}else{M(this.pattern,0)}}e.prototype.searchIn=function(e){var t=this.options,r=t.isCaseSensitive,i=t.includeMatches;if(!r){e=e.toLowerCase()}if(this.pattern===e){var n={isMatch:true,score:0};if(i){n.indices=[[0,e.length-1]]}return n}var a=this.options,o=a.location,s=a.distance,c=a.threshold,u=a.findAllMatches,h=a.minMatchCharLength,f=a.ignoreLocation;var l=[];var d=0;var v=false;this.chunks.forEach((function(t){var r=t.pattern,n=t.alphabet,a=t.startIndex;var p=search(e,r,n,{location:o+a,distance:s,threshold:c,findAllMatches:u,minMatchCharLength:h,includeMatches:i,ignoreLocation:f}),g=p.isMatch,y=p.score,m=p.indices;if(g){v=true}d+=y;if(g&&m){l=__spreadArray(__spreadArray([],l),m)}}));var p={isMatch:v,score:v?d/this.chunks.length:1};if(v&&i){p.indices=l}return p};return e}();var BaseMatch=function(){function e(e){this.pattern=e}e.isMultiMatch=function(e){return getMatch(e,this.multiRegex)};e.isSingleMatch=function(e){return getMatch(e,this.singleRegex)};e.prototype.search=function(){};return e}();function getMatch(e,t){var r=e.match(t);return r?r[1]:null}var ExactMatch=function(e){__extends(t,e);function t(t){return e.call(this,t)||this}Object.defineProperty(t,"type",{get:function(){return"exact"},enumerable:false,configurable:true});Object.defineProperty(t,"multiRegex",{get:function(){return/^="(.*)"$/},enumerable:false,configurable:true});Object.defineProperty(t,"singleRegex",{get:function(){return/^=(.*)$/},enumerable:false,configurable:true});t.prototype.search=function(e){var t=e===this.pattern;return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}};return t}(BaseMatch);var InverseExactMatch=function(e){__extends(t,e);function t(t){return e.call(this,t)||this}Object.defineProperty(t,"type",{get:function(){return"inverse-exact"},enumerable:false,configurable:true});Object.defineProperty(t,"multiRegex",{get:function(){return/^!"(.*)"$/},enumerable:false,configurable:true});Object.defineProperty(t,"singleRegex",{get:function(){return/^!(.*)$/},enumerable:false,configurable:true});t.prototype.search=function(e){var t=e.indexOf(this.pattern);var r=t===-1;return{isMatch:r,score:r?0:1,indices:[0,e.length-1]}};return t}(BaseMatch);var PrefixExactMatch=function(e){__extends(t,e);function t(t){return e.call(this,t)||this}Object.defineProperty(t,"type",{get:function(){return"prefix-exact"},enumerable:false,configurable:true});Object.defineProperty(t,"multiRegex",{get:function(){return/^\^"(.*)"$/},enumerable:false,configurable:true});Object.defineProperty(t,"singleRegex",{get:function(){return/^\^(.*)$/},enumerable:false,configurable:true});t.prototype.search=function(e){var t=e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}};return t}(BaseMatch);var InversePrefixExactMatch=function(e){__extends(t,e);function t(t){return e.call(this,t)||this}Object.defineProperty(t,"type",{get:function(){return"inverse-prefix-exact"},enumerable:false,configurable:true});Object.defineProperty(t,"multiRegex",{get:function(){return/^!\^"(.*)"$/},enumerable:false,configurable:true});Object.defineProperty(t,"singleRegex",{get:function(){return/^!\^(.*)$/},enumerable:false,configurable:true});t.prototype.search=function(e){var t=!e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}};return t}(BaseMatch);var SuffixExactMatch=function(e){__extends(t,e);function t(t){return e.call(this,t)||this}Object.defineProperty(t,"type",{get:function(){return"suffix-exact"},enumerable:false,configurable:true});Object.defineProperty(t,"multiRegex",{get:function(){return/^"(.*)"\$$/},enumerable:false,configurable:true});Object.defineProperty(t,"singleRegex",{get:function(){return/^(.*)\$$/},enumerable:false,configurable:true});t.prototype.search=function(e){var t=e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[e.length-this.pattern.length,e.length-1]}};return t}(BaseMatch);var InverseSuffixExactMatch=function(e){__extends(t,e);function t(t){return e.call(this,t)||this}Object.defineProperty(t,"type",{get:function(){return"inverse-suffix-exact"},enumerable:false,configurable:true});Object.defineProperty(t,"multiRegex",{get:function(){return/^!"(.*)"\$$/},enumerable:false,configurable:true});Object.defineProperty(t,"singleRegex",{get:function(){return/^!(.*)\$$/},enumerable:false,configurable:true});t.prototype.search=function(e){var t=!e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}};return t}(BaseMatch);var FuzzyMatch=function(e){__extends(t,e);function t(t,r){var i=r===void 0?{}:r,n=i.location,a=n===void 0?Config.location:n,o=i.threshold,s=o===void 0?Config.threshold:o,c=i.distance,u=c===void 0?Config.distance:c,h=i.includeMatches,f=h===void 0?Config.includeMatches:h,l=i.findAllMatches,d=l===void 0?Config.findAllMatches:l,v=i.minMatchCharLength,p=v===void 0?Config.minMatchCharLength:v,g=i.isCaseSensitive,y=g===void 0?Config.isCaseSensitive:g,m=i.ignoreLocation,_=m===void 0?Config.ignoreLocation:m;var M=e.call(this,t)||this;M._bitapSearch=new BitapSearch(t,{location:a,threshold:s,distance:u,includeMatches:f,findAllMatches:d,minMatchCharLength:p,isCaseSensitive:y,ignoreLocation:_});return M}Object.defineProperty(t,"type",{get:function(){return"fuzzy"},enumerable:false,configurable:true});Object.defineProperty(t,"multiRegex",{get:function(){return/^"(.*)"$/},enumerable:false,configurable:true});Object.defineProperty(t,"singleRegex",{get:function(){return/^(.*)$/},enumerable:false,configurable:true});t.prototype.search=function(e){return this._bitapSearch.searchIn(e)};return t}(BaseMatch);var IncludeMatch=function(e){__extends(t,e);function t(t){return e.call(this,t)||this}Object.defineProperty(t,"type",{get:function(){return"include"},enumerable:false,configurable:true});Object.defineProperty(t,"multiRegex",{get:function(){return/^'"(.*)"$/},enumerable:false,configurable:true});Object.defineProperty(t,"singleRegex",{get:function(){return/^'(.*)$/},enumerable:false,configurable:true});t.prototype.search=function(e){var t=0;var r;var i=[];var n=this.pattern.length;while((r=e.indexOf(this.pattern,t))>-1){t=r+n;i.push([r,t-1])}var a=!!i.length;return{isMatch:a,score:a?0:1,indices:i}};return t}(BaseMatch);var searchers=[ExactMatch,IncludeMatch,PrefixExactMatch,InversePrefixExactMatch,InverseSuffixExactMatch,SuffixExactMatch,InverseExactMatch,FuzzyMatch];var searchersLen=searchers.length;var SPACE_RE=/ +(?=([^\"]*\"[^\"]*\")*[^\"]*$)/;var OR_TOKEN="|";function parseQuery(e,t){if(t===void 0){t={}}return e.split(OR_TOKEN).map((function(e){var r=e.trim().split(SPACE_RE).filter((function(e){return e&&!!e.trim()}));var i=[];for(var n=0,a=r.length;n<a;n+=1){var o=r[n];var s=false;var c=-1;while(!s&&++c<searchersLen){var u=searchers[c];var h=u.isMultiMatch(o);if(h){i.push(new u(h,t));s=true}}if(s){continue}c=-1;while(++c<searchersLen){var u=searchers[c];var h=u.isSingleMatch(o);if(h){i.push(new u(h,t));break}}}return i}))}var MultiMatchSet=new Set([FuzzyMatch.type,IncludeMatch.type]);var ExtendedSearch=function(){function e(e,t){var r=t===void 0?{}:t,i=r.isCaseSensitive,n=i===void 0?Config.isCaseSensitive:i,a=r.includeMatches,o=a===void 0?Config.includeMatches:a,s=r.minMatchCharLength,c=s===void 0?Config.minMatchCharLength:s,u=r.ignoreLocation,h=u===void 0?Config.ignoreLocation:u,f=r.findAllMatches,l=f===void 0?Config.findAllMatches:f,d=r.location,v=d===void 0?Config.location:d,p=r.threshold,g=p===void 0?Config.threshold:p,y=r.distance,m=y===void 0?Config.distance:y;this.query=null;this.options={isCaseSensitive:n,includeMatches:o,minMatchCharLength:c,findAllMatches:l,ignoreLocation:h,location:v,threshold:g,distance:m};this.pattern=n?e:e.toLowerCase();this.query=parseQuery(this.pattern,this.options)}e.condition=function(e,t){return t.useExtendedSearch};e.prototype.searchIn=function(e){var t=this.query;if(!t){return{isMatch:false,score:1}}var r=this.options,i=r.includeMatches,n=r.isCaseSensitive;e=n?e:e.toLowerCase();var a=0;var o=[];var s=0;for(var c=0,u=t.length;c<u;c+=1){var h=t[c];o.length=0;a=0;for(var f=0,l=h.length;f<l;f+=1){var d=h[f];var v=d.search(e),p=v.isMatch,g=v.indices,y=v.score;if(p){a+=1;s+=y;if(i){var m=d.constructor.type;if(MultiMatchSet.has(m)){o=__spreadArray(__spreadArray([],o),g)}else{o.push(g)}}}else{s=0;a=0;o.length=0;break}}if(a){var _={isMatch:true,score:s/a};if(i){_.indices=o}return _}}return{isMatch:false,score:1}};return e}();var registeredSearchers=[];function register(){var e=[];for(var t=0;t<arguments.length;t++){e[t]=arguments[t]}registeredSearchers.push.apply(registeredSearchers,e)}function createSearcher(e,t){for(var r=0,i=registeredSearchers.length;r<i;r+=1){var n=registeredSearchers[r];if(n.condition(e,t)){return new n(e,t)}}return new BitapSearch(e,t)}var LogicalOperator={AND:"$and",OR:"$or"};var KeyType={PATH:"$path",PATTERN:"$val"};var isExpression=function(e){return!!(e[LogicalOperator.AND]||e[LogicalOperator.OR])};var isPath=function(e){return!!e[KeyType.PATH]};var isLeaf=function(e){return!isArray(e)&&isObject(e)&&!isExpression(e)};var convertToExplicit=function(e){var t;return t={},t[LogicalOperator.AND]=Object.keys(e).map((function(t){var r;return r={},r[t]=e[t],r})),t};function parse(e,t,r){var i=r===void 0?{}:r,n=i.auto,a=n===void 0?true:n;var o=function(e){var r=Object.keys(e);var i=isPath(e);if(!i&&r.length>1&&!isExpression(e)){return o(convertToExplicit(e))}if(isLeaf(e)){var n=i?e[KeyType.PATH]:r[0];var s=i?e[KeyType.PATTERN]:e[n];if(!isString(s)){throw new Error(LOGICAL_SEARCH_INVALID_QUERY_FOR_KEY(n))}var c={keyId:createKeyId(n),pattern:s};if(a){c.searcher=createSearcher(s,t)}return c}var u={children:[],operator:r[0]};r.forEach((function(t){var r=e[t];if(isArray(r)){r.forEach((function(e){u.children.push(o(e))}))}}));return u};if(!isExpression(e)){e=convertToExplicit(e)}return o(e)}function computeScore(e,t){var r=t.ignoreFieldNorm,i=r===void 0?Config.ignoreFieldNorm:r;e.forEach((function(e){var t=1;e.matches.forEach((function(e){var r=e.key,n=e.norm,a=e.score;var o=r?r.weight:null;t*=Math.pow(a===0&&o?Number.EPSILON:a,(o||1)*(i?1:n))}));e.score=t}))}function transformMatches(e,t){var r=e.matches;t.matches=[];if(!isDefined(r)){return}r.forEach((function(e){if(!isDefined(e.indices)||!e.indices.length){return}var r=e.indices,i=e.value;var n={indices:r,value:i};if(e.key){n.key=e.key.src}if(e.idx>-1){n.refIndex=e.idx}t.matches.push(n)}))}function transformScore(e,t){t.score=e.score}function format(e,t,r){var i=r===void 0?{}:r,n=i.includeMatches,a=n===void 0?Config.includeMatches:n,o=i.includeScore,s=o===void 0?Config.includeScore:o;var c=[];if(a)c.push(transformMatches);if(s)c.push(transformScore);return e.map((function(e){var r=e.idx;var i={item:t[r],refIndex:r};if(c.length){c.forEach((function(t){t(e,i)}))}return i}))}var Fuse=function(){function e(e,t,r){if(t===void 0){t={}}this.options=__assign(__assign({},Config),t);if(this.options.useExtendedSearch&&!true){throw new Error(EXTENDED_SEARCH_UNAVAILABLE)}this._keyStore=new KeyStore(this.options.keys);this.setCollection(e,r)}e.prototype.setCollection=function(e,t){this._docs=e;if(t&&!(t instanceof FuseIndex)){throw new Error(INCORRECT_INDEX_TYPE)}this._myIndex=t||createIndex(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})};e.prototype.add=function(e){if(!isDefined(e)){return}this._docs.push(e);this._myIndex.add(e)};e.prototype.remove=function(e){if(e===void 0){e=function(){return false}}var t=[];for(var r=0,i=this._docs.length;r<i;r+=1){var n=this._docs[r];if(e(n,r)){this.removeAt(r);r-=1;i-=1;t.push(n)}}return t};e.prototype.removeAt=function(e){this._docs.splice(e,1);this._myIndex.removeAt(e)};e.prototype.getIndex=function(){return this._myIndex};e.prototype.search=function(e,t){var r=t===void 0?{}:t,i=r.limit,n=i===void 0?-1:i;var a=this.options,o=a.includeMatches,s=a.includeScore,c=a.shouldSort,u=a.sortFn,h=a.ignoreFieldNorm;var f=isString(e)?isString(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);computeScore(f,{ignoreFieldNorm:h});if(c){f.sort(u)}if(isNumber(n)&&n>-1){f=f.slice(0,n)}return format(f,this._docs,{includeMatches:o,includeScore:s})};e.prototype._searchStringList=function(e){var t=createSearcher(e,this.options);var r=this._myIndex.records;var i=[];r.forEach((function(e){var r=e.v,n=e.i,a=e.n;if(!isDefined(r)){return}var o=t.searchIn(r),s=o.isMatch,c=o.score,u=o.indices;if(s){i.push({item:r,idx:n,matches:[{score:c,value:r,norm:a,indices:u}]})}}));return i};e.prototype._searchLogical=function(e){var t=this;var r=parse(e,this.options);var i=function(e,r,n){if(!e.children){var a=e.keyId,o=e.searcher;var s=t._findMatches({key:t._keyStore.get(a),value:t._myIndex.getValueForItemAtKeyId(r,a),searcher:o});if(s&&s.length){return[{idx:n,item:r,matches:s}]}return[]}var c=[];for(var u=0,h=e.children.length;u<h;u+=1){var f=e.children[u];var l=i(f,r,n);if(l.length){c.push.apply(c,l)}else if(e.operator===LogicalOperator.AND){return[]}}return c};var n=this._myIndex.records;var a={};var o=[];n.forEach((function(e){var t=e.$,n=e.i;if(isDefined(t)){var s=i(r,t,n);if(s.length){if(!a[n]){a[n]={idx:n,item:t,matches:[]};o.push(a[n])}s.forEach((function(e){var t;var r=e.matches;(t=a[n].matches).push.apply(t,r)}))}}}));return o};e.prototype._searchObjectList=function(e){var t=this;var r=createSearcher(e,this.options);var i=this._myIndex,n=i.keys,a=i.records;var o=[];a.forEach((function(e){var i=e.$,a=e.i;if(!isDefined(i)){return}var s=[];n.forEach((function(e,n){s.push.apply(s,t._findMatches({key:e,value:i[n],searcher:r}))}));if(s.length){o.push({idx:a,item:i,matches:s})}}));return o};e.prototype._findMatches=function(e){var t=e.key,r=e.value,i=e.searcher;if(!isDefined(r)){return[]}var n=[];if(isArray(r)){r.forEach((function(e){var r=e.v,a=e.i,o=e.n;if(!isDefined(r)){return}var s=i.searchIn(r),c=s.isMatch,u=s.score,h=s.indices;if(c){n.push({score:u,key:t,value:r,idx:a,norm:o,indices:h})}}))}else{var a=r.v,o=r.n;var s=i.searchIn(a),c=s.isMatch,u=s.score,h=s.indices;if(c){n.push({score:u,key:t,value:a,norm:o,indices:h})}}return n};return e}();Fuse.version="6.5.3";Fuse.createIndex=createIndex;Fuse.parseIndex=parseIndex;Fuse.config=Config;{Fuse.parseQuery=parse}{register(ExtendedSearch)}var selectFilterCss=".sc-road-select-filter-h{--margin-top:3rem;position:relative;display:block}.select-filter-list.sc-road-select-filter{position:absolute;top:var(--margin-top);z-index:1;width:100%;max-height:16rem;padding:0.5rem 0;margin:0;overflow-y:scroll;font-family:var(--road-font, sans-serif);font-size:0.875rem;color:var(--road-grey-900);list-style-type:none;background:var(--road-grey-000);border-radius:0 0 0.25rem 0.25rem;-webkit-box-shadow:0 3px 6px rgba(0, 0, 0, 0.16);box-shadow:0 3px 6px rgba(0, 0, 0, 0.16)}.select-filter-item.sc-road-select-filter{padding:0.75rem 1rem;cursor:pointer}.select-filter-item.sc-road-select-filter:hover,.select-filter-item.highlight.sc-road-select-filter{color:var(--road-primary-contrast);background:var(--road-primary-500)}";var SelectFilter=function(){function e(e){var t=this;registerInstance(this,e);this.roadselected=createEvent(this,"roadselected",7);this.roadSelected=createEvent(this,"roadSelected",7);this.isOpen=false;this.currentValue="";this.options=[];this.parameters={keys:["value","label"],threshold:.3,ignoreLocation:true};this.onlySelect=true;this.onClick=function(e,r){t.el.querySelector("road-input").value=r;t.isOpen=false;t.roadselected.emit({value:e.toString(),label:r});t.roadSelected.emit({value:e.toString(),label:r})}}e.prototype.handleFocus=function(){this.isOpen=true};e.prototype.handleChange=function(e){this.currentValue=e.detail.value.toLowerCase()};e.prototype.onClickOutside=function(e){if(this.isOpen&&!this.el.contains(e.target)){this.isOpen=false;var t=this.el.querySelector("road-input").value;if(this.onlySelect&&!this.options.some((function(e){return e["label"]===t}))){this.el.querySelector("road-input").value=""}}};e.prototype.render=function(){var e=this;var t=new Fuse(this.options,this.parameters);var r=this.currentValue===""?this.options.map((function(e,t){return{item:e,score:1,refIndex:t}})):t.search(this.currentValue);return h(Host,null,h("slot",null),this.isOpen&&h("ul",{class:"select-filter-list",role:"listbox"},r.map((function(t){return h("li",{class:"select-filter-item",role:"option",onClick:function(){return e.onClick(t.item.value,t.item.label.replace(/(<([^>]+)>)/gi,""))},innerHTML:t.item.label})}))))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();SelectFilter.style=selectFilterCss;export{SelectFilter as road_select_filter};
|
|
1
|
+
var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r))e[r]=t[r]};return e(t,r)};return function(t,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function i(){this.constructor=t}t.prototype=r===null?Object.create(r):(i.prototype=r.prototype,new i)}}();var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,r=1,i=arguments.length;r<i;r++){t=arguments[r];for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n))e[n]=t[n]}return e};return __assign.apply(this,arguments)};var __spreadArray=this&&this.__spreadArray||function(e,t){for(var r=0,i=t.length,n=e.length;r<i;r++,n++)e[n]=t[r];return e};import{r as registerInstance,c as createEvent,h,H as Host,e as getElement}from"./index-0c8a0e04.js";function isArray(e){return!Array.isArray?getTag(e)==="[object Array]":Array.isArray(e)}var INFINITY=1/0;function baseToString(e){if(typeof e=="string"){return e}var t=e+"";return t=="0"&&1/e==-INFINITY?"-0":t}function toString(e){return e==null?"":baseToString(e)}function isString(e){return typeof e==="string"}function isNumber(e){return typeof e==="number"}function isBoolean(e){return e===true||e===false||isObjectLike(e)&&getTag(e)=="[object Boolean]"}function isObject(e){return typeof e==="object"}function isObjectLike(e){return isObject(e)&&e!==null}function isDefined(e){return e!==undefined&&e!==null}function isBlank(e){return!e.trim().length}function getTag(e){return e==null?e===undefined?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}var EXTENDED_SEARCH_UNAVAILABLE="Extended search is not available";var INCORRECT_INDEX_TYPE="Incorrect 'index' type";var LOGICAL_SEARCH_INVALID_QUERY_FOR_KEY=function(e){return"Invalid value for key "+e};var PATTERN_LENGTH_TOO_LARGE=function(e){return"Pattern length exceeds max of "+e+"."};var MISSING_KEY_PROPERTY=function(e){return"Missing "+e+" property in key"};var INVALID_KEY_WEIGHT_VALUE=function(e){return"Property 'weight' in key '"+e+"' must be a positive integer"};var hasOwn=Object.prototype.hasOwnProperty;var KeyStore=function(){function e(e){var t=this;this._keys=[];this._keyMap={};var r=0;e.forEach((function(e){var i=createKey(e);r+=i.weight;t._keys.push(i);t._keyMap[i.id]=i;r+=i.weight}));this._keys.forEach((function(e){e.weight/=r}))}e.prototype.get=function(e){return this._keyMap[e]};e.prototype.keys=function(){return this._keys};e.prototype.toJSON=function(){return JSON.stringify(this._keys)};return e}();function createKey(e){var t=null;var r=null;var i=null;var n=1;if(isString(e)||isArray(e)){i=e;t=createKeyPath(e);r=createKeyId(e)}else{if(!hasOwn.call(e,"name")){throw new Error(MISSING_KEY_PROPERTY("name"))}var a=e.name;i=a;if(hasOwn.call(e,"weight")){n=e.weight;if(n<=0){throw new Error(INVALID_KEY_WEIGHT_VALUE(a))}}t=createKeyPath(a);r=createKeyId(a)}return{path:t,id:r,weight:n,src:i}}function createKeyPath(e){return isArray(e)?e:e.split(".")}function createKeyId(e){return isArray(e)?e.join("."):e}function get(e,t){var r=[];var i=false;var n=function(e,t,a){if(!isDefined(e)){return}if(!t[a]){r.push(e)}else{var o=t[a];var s=e[o];if(!isDefined(s)){return}if(a===t.length-1&&(isString(s)||isNumber(s)||isBoolean(s))){r.push(toString(s))}else if(isArray(s)){i=true;for(var c=0,u=s.length;c<u;c+=1){n(s[c],t,a+1)}}else if(t.length){n(s,t,a+1)}}};n(e,isString(t)?t.split("."):t,0);return i?r:r[0]}var MatchOptions={includeMatches:false,findAllMatches:false,minMatchCharLength:1};var BasicOptions={isCaseSensitive:false,includeScore:false,keys:[],shouldSort:true,sortFn:function(e,t){return e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1}};var FuzzyOptions={location:0,threshold:.6,distance:100};var AdvancedOptions={useExtendedSearch:false,getFn:get,ignoreLocation:false,ignoreFieldNorm:false,fieldNormWeight:1};var Config=__assign(__assign(__assign(__assign({},BasicOptions),MatchOptions),FuzzyOptions),AdvancedOptions);var SPACE=/[^ ]+/g;function norm(e,t){if(e===void 0){e=1}if(t===void 0){t=3}var r=new Map;var i=Math.pow(10,t);return{get:function(t){var n=t.match(SPACE).length;if(r.has(n)){return r.get(n)}var a=1/Math.pow(n,.5*e);var o=parseFloat(Math.round(a*i)/i);r.set(n,o);return o},clear:function(){r.clear()}}}var FuseIndex=function(){function e(e){var t=e===void 0?{}:e,r=t.getFn,i=r===void 0?Config.getFn:r,n=t.fieldNormWeight,a=n===void 0?Config.fieldNormWeight:n;this.norm=norm(a,3);this.getFn=i;this.isCreated=false;this.setIndexRecords()}e.prototype.setSources=function(e){if(e===void 0){e=[]}this.docs=e};e.prototype.setIndexRecords=function(e){if(e===void 0){e=[]}this.records=e};e.prototype.setKeys=function(e){var t=this;if(e===void 0){e=[]}this.keys=e;this._keysMap={};e.forEach((function(e,r){t._keysMap[e.id]=r}))};e.prototype.create=function(){var e=this;if(this.isCreated||!this.docs.length){return}this.isCreated=true;if(isString(this.docs[0])){this.docs.forEach((function(t,r){e._addString(t,r)}))}else{this.docs.forEach((function(t,r){e._addObject(t,r)}))}this.norm.clear()};e.prototype.add=function(e){var t=this.size();if(isString(e)){this._addString(e,t)}else{this._addObject(e,t)}};e.prototype.removeAt=function(e){this.records.splice(e,1);for(var t=e,r=this.size();t<r;t+=1){this.records[t].i-=1}};e.prototype.getValueForItemAtKeyId=function(e,t){return e[this._keysMap[t]]};e.prototype.size=function(){return this.records.length};e.prototype._addString=function(e,t){if(!isDefined(e)||isBlank(e)){return}var r={v:e,i:t,n:this.norm.get(e)};this.records.push(r)};e.prototype._addObject=function(e,t){var r=this;var i={i:t,$:{}};this.keys.forEach((function(t,n){var a=r.getFn(e,t.path);if(!isDefined(a)){return}if(isArray(a)){var o=[];var s=[{nestedArrIndex:-1,value:a}];while(s.length){var c=s.pop(),u=c.nestedArrIndex,h=c.value;if(!isDefined(h)){continue}if(isString(h)&&!isBlank(h)){var f={v:h,i:u,n:r.norm.get(h)};o.push(f)}else if(isArray(h)){h.forEach((function(e,t){s.push({nestedArrIndex:t,value:e})}))}else;}i.$[n]=o}else if(!isBlank(a)){var f={v:a,n:r.norm.get(a)};i.$[n]=f}}));this.records.push(i)};e.prototype.toJSON=function(){return{keys:this.keys,records:this.records}};return e}();function createIndex(e,t,r){var i=r===void 0?{}:r,n=i.getFn,a=n===void 0?Config.getFn:n,o=i.fieldNormWeight,s=o===void 0?Config.fieldNormWeight:o;var c=new FuseIndex({getFn:a,fieldNormWeight:s});c.setKeys(e.map(createKey));c.setSources(t);c.create();return c}function parseIndex(e,t){var r=t===void 0?{}:t,i=r.getFn,n=i===void 0?Config.getFn:i,a=r.fieldNormWeight,o=a===void 0?Config.fieldNormWeight:a;var s=e.keys,c=e.records;var u=new FuseIndex({getFn:n,fieldNormWeight:o});u.setKeys(s);u.setIndexRecords(c);return u}function computeScore$1(e,t){var r=t===void 0?{}:t,i=r.errors,n=i===void 0?0:i,a=r.currentLocation,o=a===void 0?0:a,s=r.expectedLocation,c=s===void 0?0:s,u=r.distance,h=u===void 0?Config.distance:u,f=r.ignoreLocation,l=f===void 0?Config.ignoreLocation:f;var d=n/e.length;if(l){return d}var v=Math.abs(c-o);if(!h){return v?1:d}return d+v/h}function convertMaskToIndices(e,t){if(e===void 0){e=[]}if(t===void 0){t=Config.minMatchCharLength}var r=[];var i=-1;var n=-1;var a=0;for(var o=e.length;a<o;a+=1){var s=e[a];if(s&&i===-1){i=a}else if(!s&&i!==-1){n=a-1;if(n-i+1>=t){r.push([i,n])}i=-1}}if(e[a-1]&&a-i>=t){r.push([i,a-1])}return r}var MAX_BITS=32;function search(e,t,r,i){var n=i===void 0?{}:i,a=n.location,o=a===void 0?Config.location:a,s=n.distance,c=s===void 0?Config.distance:s,u=n.threshold,h=u===void 0?Config.threshold:u,f=n.findAllMatches,l=f===void 0?Config.findAllMatches:f,d=n.minMatchCharLength,v=d===void 0?Config.minMatchCharLength:d,p=n.includeMatches,g=p===void 0?Config.includeMatches:p,y=n.ignoreLocation,m=y===void 0?Config.ignoreLocation:y;if(t.length>MAX_BITS){throw new Error(PATTERN_LENGTH_TOO_LARGE(MAX_BITS))}var _=t.length;var M=e.length;var x=Math.max(0,Math.min(o,M));var b=h;var S=x;var E=v>1||g;var C=E?Array(M):[];var A;while((A=e.indexOf(t,S))>-1){var I=computeScore$1(t,{currentLocation:A,expectedLocation:x,distance:c,ignoreLocation:m});b=Math.min(I,b);S=A+_;if(E){var O=0;while(O<_){C[A+O]=1;O+=1}}}S=-1;var L=[];var k=1;var w=_+M;var P=1<<_-1;for(var O=0;O<_;O+=1){var N=0;var T=w;while(N<T){var j=computeScore$1(t,{errors:O,currentLocation:x+T,expectedLocation:x,distance:c,ignoreLocation:m});if(j<=b){N=T}else{w=T}T=Math.floor((w-N)/2+N)}w=T;var F=Math.max(1,x-T+1);var R=l?M:Math.min(x+T,M)+_;var $=Array(R+2);$[R+1]=(1<<O)-1;for(var B=R;B>=F;B-=1){var K=B-1;var D=r[e.charAt(K)];if(E){C[K]=+!!D}$[B]=($[B+1]<<1|1)&D;if(O){$[B]|=(L[B+1]|L[B])<<1|1|L[B+1]}if($[B]&P){k=computeScore$1(t,{errors:O,currentLocation:K,expectedLocation:x,distance:c,ignoreLocation:m});if(k<=b){b=k;S=K;if(S<=x){break}F=Math.max(1,2*x-S)}}}var I=computeScore$1(t,{errors:O+1,currentLocation:x,expectedLocation:x,distance:c,ignoreLocation:m});if(I>b){break}L=$}var z={isMatch:S>=0,score:Math.max(.001,k)};if(E){var W=convertMaskToIndices(C,v);if(!W.length){z.isMatch=false}else if(g){z.indices=W}}return z}function createPatternAlphabet(e){var t={};for(var r=0,i=e.length;r<i;r+=1){var n=e.charAt(r);t[n]=(t[n]||0)|1<<i-r-1}return t}var BitapSearch=function(){function e(e,t){var r=this;var i=t===void 0?{}:t,n=i.location,a=n===void 0?Config.location:n,o=i.threshold,s=o===void 0?Config.threshold:o,c=i.distance,u=c===void 0?Config.distance:c,h=i.includeMatches,f=h===void 0?Config.includeMatches:h,l=i.findAllMatches,d=l===void 0?Config.findAllMatches:l,v=i.minMatchCharLength,p=v===void 0?Config.minMatchCharLength:v,g=i.isCaseSensitive,y=g===void 0?Config.isCaseSensitive:g,m=i.ignoreLocation,_=m===void 0?Config.ignoreLocation:m;this.options={location:a,threshold:s,distance:u,includeMatches:f,findAllMatches:d,minMatchCharLength:p,isCaseSensitive:y,ignoreLocation:_};this.pattern=y?e:e.toLowerCase();this.chunks=[];if(!this.pattern.length){return}var M=function(e,t){r.chunks.push({pattern:e,alphabet:createPatternAlphabet(e),startIndex:t})};var x=this.pattern.length;if(x>MAX_BITS){var b=0;var S=x%MAX_BITS;var E=x-S;while(b<E){M(this.pattern.substr(b,MAX_BITS),b);b+=MAX_BITS}if(S){var C=x-MAX_BITS;M(this.pattern.substr(C),C)}}else{M(this.pattern,0)}}e.prototype.searchIn=function(e){var t=this.options,r=t.isCaseSensitive,i=t.includeMatches;if(!r){e=e.toLowerCase()}if(this.pattern===e){var n={isMatch:true,score:0};if(i){n.indices=[[0,e.length-1]]}return n}var a=this.options,o=a.location,s=a.distance,c=a.threshold,u=a.findAllMatches,h=a.minMatchCharLength,f=a.ignoreLocation;var l=[];var d=0;var v=false;this.chunks.forEach((function(t){var r=t.pattern,n=t.alphabet,a=t.startIndex;var p=search(e,r,n,{location:o+a,distance:s,threshold:c,findAllMatches:u,minMatchCharLength:h,includeMatches:i,ignoreLocation:f}),g=p.isMatch,y=p.score,m=p.indices;if(g){v=true}d+=y;if(g&&m){l=__spreadArray(__spreadArray([],l),m)}}));var p={isMatch:v,score:v?d/this.chunks.length:1};if(v&&i){p.indices=l}return p};return e}();var BaseMatch=function(){function e(e){this.pattern=e}e.isMultiMatch=function(e){return getMatch(e,this.multiRegex)};e.isSingleMatch=function(e){return getMatch(e,this.singleRegex)};e.prototype.search=function(){};return e}();function getMatch(e,t){var r=e.match(t);return r?r[1]:null}var ExactMatch=function(e){__extends(t,e);function t(t){return e.call(this,t)||this}Object.defineProperty(t,"type",{get:function(){return"exact"},enumerable:false,configurable:true});Object.defineProperty(t,"multiRegex",{get:function(){return/^="(.*)"$/},enumerable:false,configurable:true});Object.defineProperty(t,"singleRegex",{get:function(){return/^=(.*)$/},enumerable:false,configurable:true});t.prototype.search=function(e){var t=e===this.pattern;return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}};return t}(BaseMatch);var InverseExactMatch=function(e){__extends(t,e);function t(t){return e.call(this,t)||this}Object.defineProperty(t,"type",{get:function(){return"inverse-exact"},enumerable:false,configurable:true});Object.defineProperty(t,"multiRegex",{get:function(){return/^!"(.*)"$/},enumerable:false,configurable:true});Object.defineProperty(t,"singleRegex",{get:function(){return/^!(.*)$/},enumerable:false,configurable:true});t.prototype.search=function(e){var t=e.indexOf(this.pattern);var r=t===-1;return{isMatch:r,score:r?0:1,indices:[0,e.length-1]}};return t}(BaseMatch);var PrefixExactMatch=function(e){__extends(t,e);function t(t){return e.call(this,t)||this}Object.defineProperty(t,"type",{get:function(){return"prefix-exact"},enumerable:false,configurable:true});Object.defineProperty(t,"multiRegex",{get:function(){return/^\^"(.*)"$/},enumerable:false,configurable:true});Object.defineProperty(t,"singleRegex",{get:function(){return/^\^(.*)$/},enumerable:false,configurable:true});t.prototype.search=function(e){var t=e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}};return t}(BaseMatch);var InversePrefixExactMatch=function(e){__extends(t,e);function t(t){return e.call(this,t)||this}Object.defineProperty(t,"type",{get:function(){return"inverse-prefix-exact"},enumerable:false,configurable:true});Object.defineProperty(t,"multiRegex",{get:function(){return/^!\^"(.*)"$/},enumerable:false,configurable:true});Object.defineProperty(t,"singleRegex",{get:function(){return/^!\^(.*)$/},enumerable:false,configurable:true});t.prototype.search=function(e){var t=!e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}};return t}(BaseMatch);var SuffixExactMatch=function(e){__extends(t,e);function t(t){return e.call(this,t)||this}Object.defineProperty(t,"type",{get:function(){return"suffix-exact"},enumerable:false,configurable:true});Object.defineProperty(t,"multiRegex",{get:function(){return/^"(.*)"\$$/},enumerable:false,configurable:true});Object.defineProperty(t,"singleRegex",{get:function(){return/^(.*)\$$/},enumerable:false,configurable:true});t.prototype.search=function(e){var t=e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[e.length-this.pattern.length,e.length-1]}};return t}(BaseMatch);var InverseSuffixExactMatch=function(e){__extends(t,e);function t(t){return e.call(this,t)||this}Object.defineProperty(t,"type",{get:function(){return"inverse-suffix-exact"},enumerable:false,configurable:true});Object.defineProperty(t,"multiRegex",{get:function(){return/^!"(.*)"\$$/},enumerable:false,configurable:true});Object.defineProperty(t,"singleRegex",{get:function(){return/^!(.*)\$$/},enumerable:false,configurable:true});t.prototype.search=function(e){var t=!e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}};return t}(BaseMatch);var FuzzyMatch=function(e){__extends(t,e);function t(t,r){var i=r===void 0?{}:r,n=i.location,a=n===void 0?Config.location:n,o=i.threshold,s=o===void 0?Config.threshold:o,c=i.distance,u=c===void 0?Config.distance:c,h=i.includeMatches,f=h===void 0?Config.includeMatches:h,l=i.findAllMatches,d=l===void 0?Config.findAllMatches:l,v=i.minMatchCharLength,p=v===void 0?Config.minMatchCharLength:v,g=i.isCaseSensitive,y=g===void 0?Config.isCaseSensitive:g,m=i.ignoreLocation,_=m===void 0?Config.ignoreLocation:m;var M=e.call(this,t)||this;M._bitapSearch=new BitapSearch(t,{location:a,threshold:s,distance:u,includeMatches:f,findAllMatches:d,minMatchCharLength:p,isCaseSensitive:y,ignoreLocation:_});return M}Object.defineProperty(t,"type",{get:function(){return"fuzzy"},enumerable:false,configurable:true});Object.defineProperty(t,"multiRegex",{get:function(){return/^"(.*)"$/},enumerable:false,configurable:true});Object.defineProperty(t,"singleRegex",{get:function(){return/^(.*)$/},enumerable:false,configurable:true});t.prototype.search=function(e){return this._bitapSearch.searchIn(e)};return t}(BaseMatch);var IncludeMatch=function(e){__extends(t,e);function t(t){return e.call(this,t)||this}Object.defineProperty(t,"type",{get:function(){return"include"},enumerable:false,configurable:true});Object.defineProperty(t,"multiRegex",{get:function(){return/^'"(.*)"$/},enumerable:false,configurable:true});Object.defineProperty(t,"singleRegex",{get:function(){return/^'(.*)$/},enumerable:false,configurable:true});t.prototype.search=function(e){var t=0;var r;var i=[];var n=this.pattern.length;while((r=e.indexOf(this.pattern,t))>-1){t=r+n;i.push([r,t-1])}var a=!!i.length;return{isMatch:a,score:a?0:1,indices:i}};return t}(BaseMatch);var searchers=[ExactMatch,IncludeMatch,PrefixExactMatch,InversePrefixExactMatch,InverseSuffixExactMatch,SuffixExactMatch,InverseExactMatch,FuzzyMatch];var searchersLen=searchers.length;var SPACE_RE=/ +(?=([^\"]*\"[^\"]*\")*[^\"]*$)/;var OR_TOKEN="|";function parseQuery(e,t){if(t===void 0){t={}}return e.split(OR_TOKEN).map((function(e){var r=e.trim().split(SPACE_RE).filter((function(e){return e&&!!e.trim()}));var i=[];for(var n=0,a=r.length;n<a;n+=1){var o=r[n];var s=false;var c=-1;while(!s&&++c<searchersLen){var u=searchers[c];var h=u.isMultiMatch(o);if(h){i.push(new u(h,t));s=true}}if(s){continue}c=-1;while(++c<searchersLen){var u=searchers[c];var h=u.isSingleMatch(o);if(h){i.push(new u(h,t));break}}}return i}))}var MultiMatchSet=new Set([FuzzyMatch.type,IncludeMatch.type]);var ExtendedSearch=function(){function e(e,t){var r=t===void 0?{}:t,i=r.isCaseSensitive,n=i===void 0?Config.isCaseSensitive:i,a=r.includeMatches,o=a===void 0?Config.includeMatches:a,s=r.minMatchCharLength,c=s===void 0?Config.minMatchCharLength:s,u=r.ignoreLocation,h=u===void 0?Config.ignoreLocation:u,f=r.findAllMatches,l=f===void 0?Config.findAllMatches:f,d=r.location,v=d===void 0?Config.location:d,p=r.threshold,g=p===void 0?Config.threshold:p,y=r.distance,m=y===void 0?Config.distance:y;this.query=null;this.options={isCaseSensitive:n,includeMatches:o,minMatchCharLength:c,findAllMatches:l,ignoreLocation:h,location:v,threshold:g,distance:m};this.pattern=n?e:e.toLowerCase();this.query=parseQuery(this.pattern,this.options)}e.condition=function(e,t){return t.useExtendedSearch};e.prototype.searchIn=function(e){var t=this.query;if(!t){return{isMatch:false,score:1}}var r=this.options,i=r.includeMatches,n=r.isCaseSensitive;e=n?e:e.toLowerCase();var a=0;var o=[];var s=0;for(var c=0,u=t.length;c<u;c+=1){var h=t[c];o.length=0;a=0;for(var f=0,l=h.length;f<l;f+=1){var d=h[f];var v=d.search(e),p=v.isMatch,g=v.indices,y=v.score;if(p){a+=1;s+=y;if(i){var m=d.constructor.type;if(MultiMatchSet.has(m)){o=__spreadArray(__spreadArray([],o),g)}else{o.push(g)}}}else{s=0;a=0;o.length=0;break}}if(a){var _={isMatch:true,score:s/a};if(i){_.indices=o}return _}}return{isMatch:false,score:1}};return e}();var registeredSearchers=[];function register(){var e=[];for(var t=0;t<arguments.length;t++){e[t]=arguments[t]}registeredSearchers.push.apply(registeredSearchers,e)}function createSearcher(e,t){for(var r=0,i=registeredSearchers.length;r<i;r+=1){var n=registeredSearchers[r];if(n.condition(e,t)){return new n(e,t)}}return new BitapSearch(e,t)}var LogicalOperator={AND:"$and",OR:"$or"};var KeyType={PATH:"$path",PATTERN:"$val"};var isExpression=function(e){return!!(e[LogicalOperator.AND]||e[LogicalOperator.OR])};var isPath=function(e){return!!e[KeyType.PATH]};var isLeaf=function(e){return!isArray(e)&&isObject(e)&&!isExpression(e)};var convertToExplicit=function(e){var t;return t={},t[LogicalOperator.AND]=Object.keys(e).map((function(t){var r;return r={},r[t]=e[t],r})),t};function parse(e,t,r){var i=r===void 0?{}:r,n=i.auto,a=n===void 0?true:n;var o=function(e){var r=Object.keys(e);var i=isPath(e);if(!i&&r.length>1&&!isExpression(e)){return o(convertToExplicit(e))}if(isLeaf(e)){var n=i?e[KeyType.PATH]:r[0];var s=i?e[KeyType.PATTERN]:e[n];if(!isString(s)){throw new Error(LOGICAL_SEARCH_INVALID_QUERY_FOR_KEY(n))}var c={keyId:createKeyId(n),pattern:s};if(a){c.searcher=createSearcher(s,t)}return c}var u={children:[],operator:r[0]};r.forEach((function(t){var r=e[t];if(isArray(r)){r.forEach((function(e){u.children.push(o(e))}))}}));return u};if(!isExpression(e)){e=convertToExplicit(e)}return o(e)}function computeScore(e,t){var r=t.ignoreFieldNorm,i=r===void 0?Config.ignoreFieldNorm:r;e.forEach((function(e){var t=1;e.matches.forEach((function(e){var r=e.key,n=e.norm,a=e.score;var o=r?r.weight:null;t*=Math.pow(a===0&&o?Number.EPSILON:a,(o||1)*(i?1:n))}));e.score=t}))}function transformMatches(e,t){var r=e.matches;t.matches=[];if(!isDefined(r)){return}r.forEach((function(e){if(!isDefined(e.indices)||!e.indices.length){return}var r=e.indices,i=e.value;var n={indices:r,value:i};if(e.key){n.key=e.key.src}if(e.idx>-1){n.refIndex=e.idx}t.matches.push(n)}))}function transformScore(e,t){t.score=e.score}function format(e,t,r){var i=r===void 0?{}:r,n=i.includeMatches,a=n===void 0?Config.includeMatches:n,o=i.includeScore,s=o===void 0?Config.includeScore:o;var c=[];if(a)c.push(transformMatches);if(s)c.push(transformScore);return e.map((function(e){var r=e.idx;var i={item:t[r],refIndex:r};if(c.length){c.forEach((function(t){t(e,i)}))}return i}))}var Fuse=function(){function e(e,t,r){if(t===void 0){t={}}this.options=__assign(__assign({},Config),t);if(this.options.useExtendedSearch&&!true){throw new Error(EXTENDED_SEARCH_UNAVAILABLE)}this._keyStore=new KeyStore(this.options.keys);this.setCollection(e,r)}e.prototype.setCollection=function(e,t){this._docs=e;if(t&&!(t instanceof FuseIndex)){throw new Error(INCORRECT_INDEX_TYPE)}this._myIndex=t||createIndex(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})};e.prototype.add=function(e){if(!isDefined(e)){return}this._docs.push(e);this._myIndex.add(e)};e.prototype.remove=function(e){if(e===void 0){e=function(){return false}}var t=[];for(var r=0,i=this._docs.length;r<i;r+=1){var n=this._docs[r];if(e(n,r)){this.removeAt(r);r-=1;i-=1;t.push(n)}}return t};e.prototype.removeAt=function(e){this._docs.splice(e,1);this._myIndex.removeAt(e)};e.prototype.getIndex=function(){return this._myIndex};e.prototype.search=function(e,t){var r=t===void 0?{}:t,i=r.limit,n=i===void 0?-1:i;var a=this.options,o=a.includeMatches,s=a.includeScore,c=a.shouldSort,u=a.sortFn,h=a.ignoreFieldNorm;var f=isString(e)?isString(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);computeScore(f,{ignoreFieldNorm:h});if(c){f.sort(u)}if(isNumber(n)&&n>-1){f=f.slice(0,n)}return format(f,this._docs,{includeMatches:o,includeScore:s})};e.prototype._searchStringList=function(e){var t=createSearcher(e,this.options);var r=this._myIndex.records;var i=[];r.forEach((function(e){var r=e.v,n=e.i,a=e.n;if(!isDefined(r)){return}var o=t.searchIn(r),s=o.isMatch,c=o.score,u=o.indices;if(s){i.push({item:r,idx:n,matches:[{score:c,value:r,norm:a,indices:u}]})}}));return i};e.prototype._searchLogical=function(e){var t=this;var r=parse(e,this.options);var i=function(e,r,n){if(!e.children){var a=e.keyId,o=e.searcher;var s=t._findMatches({key:t._keyStore.get(a),value:t._myIndex.getValueForItemAtKeyId(r,a),searcher:o});if(s&&s.length){return[{idx:n,item:r,matches:s}]}return[]}var c=[];for(var u=0,h=e.children.length;u<h;u+=1){var f=e.children[u];var l=i(f,r,n);if(l.length){c.push.apply(c,l)}else if(e.operator===LogicalOperator.AND){return[]}}return c};var n=this._myIndex.records;var a={};var o=[];n.forEach((function(e){var t=e.$,n=e.i;if(isDefined(t)){var s=i(r,t,n);if(s.length){if(!a[n]){a[n]={idx:n,item:t,matches:[]};o.push(a[n])}s.forEach((function(e){var t;var r=e.matches;(t=a[n].matches).push.apply(t,r)}))}}}));return o};e.prototype._searchObjectList=function(e){var t=this;var r=createSearcher(e,this.options);var i=this._myIndex,n=i.keys,a=i.records;var o=[];a.forEach((function(e){var i=e.$,a=e.i;if(!isDefined(i)){return}var s=[];n.forEach((function(e,n){s.push.apply(s,t._findMatches({key:e,value:i[n],searcher:r}))}));if(s.length){o.push({idx:a,item:i,matches:s})}}));return o};e.prototype._findMatches=function(e){var t=e.key,r=e.value,i=e.searcher;if(!isDefined(r)){return[]}var n=[];if(isArray(r)){r.forEach((function(e){var r=e.v,a=e.i,o=e.n;if(!isDefined(r)){return}var s=i.searchIn(r),c=s.isMatch,u=s.score,h=s.indices;if(c){n.push({score:u,key:t,value:r,idx:a,norm:o,indices:h})}}))}else{var a=r.v,o=r.n;var s=i.searchIn(a),c=s.isMatch,u=s.score,h=s.indices;if(c){n.push({score:u,key:t,value:a,norm:o,indices:h})}}return n};return e}();Fuse.version="6.5.3";Fuse.createIndex=createIndex;Fuse.parseIndex=parseIndex;Fuse.config=Config;{Fuse.parseQuery=parse}{register(ExtendedSearch)}var selectFilterCss=".sc-road-select-filter-h{--margin-top:3rem;position:relative;display:block}.select-filter-list.sc-road-select-filter{position:absolute;top:var(--margin-top);z-index:1;width:100%;max-height:16rem;padding:0.5rem 0;margin:0;overflow-y:scroll;font-family:var(--road-font, sans-serif);font-size:0.875rem;color:var(--road-grey-900);list-style-type:none;background:var(--road-grey-000);border-radius:0 0 0.25rem 0.25rem;-webkit-box-shadow:0 3px 6px rgba(0, 0, 0, 0.16);box-shadow:0 3px 6px rgba(0, 0, 0, 0.16)}.select-filter-item.sc-road-select-filter{padding:0.75rem 1rem;cursor:pointer}.select-filter-item.sc-road-select-filter:hover,.select-filter-item.highlight.sc-road-select-filter{color:var(--road-primary-contrast);background:var(--road-primary-500)}";var SelectFilter=function(){function e(e){var t=this;registerInstance(this,e);this.roadselected=createEvent(this,"roadselected",7);this.roadSelected=createEvent(this,"roadSelected",7);this.isOpen=false;this.currentValue="";this.options=[];this.parameters={keys:["value","label"],threshold:.3,ignoreLocation:true};this.isActive=false;this.onlySelect=true;this.onClick=function(e,r){t.el.querySelector("road-input").value=r;t.isOpen=false;t.roadselected.emit({value:e.toString(),label:r});t.roadSelected.emit({value:e.toString(),label:r})}}e.prototype.handleFocus=function(){this.isOpen=true;this.isActive=true};e.prototype.handleBlur=function(){this.isOpen=false;this.isActive=false};e.prototype.handleChange=function(e){this.currentValue=e.detail.value.toLowerCase()};e.prototype.onClickOutside=function(e){if(this.isOpen&&!this.el.contains(e.target)){this.isOpen=false;this.isActive=false;var t=this.el.querySelector("road-input").value;if(this.onlySelect&&!this.options.some((function(e){return e["label"]===t}))){this.el.querySelector("road-input").value=""}}};e.prototype.render=function(){var e=this;var t=new Fuse(this.options,this.parameters);var r=this.currentValue===""?this.options.map((function(e,t){return{item:e,score:1,refIndex:t}})):t.search(this.currentValue);var i=this.isActive?"true":"false";return h(Host,{"is-active":i},h("slot",null),this.isOpen&&h("ul",{class:"select-filter-list",role:"listbox"},r.map((function(t){return h("li",{class:"select-filter-item",role:"option",onClick:function(){return e.onClick(t.item.value,t.item.label.replace(/(<([^>]+)>)/gi,""))},innerHTML:t.item.label})}))))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();SelectFilter.style=selectFilterCss;export{SelectFilter as road_select_filter};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(t,o,e,r){function i(t){return t instanceof e?t:new e((function(o){o(t)}))}return new(e||(e=Promise))((function(e,a){function n(t){try{c(r.next(t))}catch(o){a(o)}}function s(t){try{c(r["throw"](t))}catch(o){a(o)}}function c(t){t.done?e(t.value):i(t.value).then(n,s)}c((r=r.apply(t,o||[])).next())}))};var __generator=this&&this.__generator||function(t,o){var e={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,n;return n={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(n[Symbol.iterator]=function(){return this}),n;function s(t){return function(o){return c([t,o])}}function c(n){if(r)throw new TypeError("Generator is already executing.");while(e)try{if(r=1,i&&(a=n[0]&2?i["return"]:n[0]?i["throw"]||((a=i["return"])&&a.call(i),0):i.next)&&!(a=a.call(i,n[1])).done)return a;if(i=0,a)n=[n[0]&2,a.value];switch(n[0]){case 0:case 1:a=n;break;case 4:e.label++;return{value:n[1],done:false};case 5:e.label++;i=n[1];n=[0];continue;case 7:n=e.ops.pop();e.trys.pop();continue;default:if(!(a=e.trys,a=a.length>0&&a[a.length-1])&&(n[0]===6||n[0]===2)){e=0;continue}if(n[0]===3&&(!a||n[1]>a[0]&&n[1]<a[3])){e.label=n[1];break}if(n[0]===6&&e.label<a[1]){e.label=a[1];a=n;break}if(a&&e.label<a[2]){e.label=a[2];e.ops.push(n);break}if(a[2])e.ops.pop();e.trys.pop();continue}n=o.call(t,e)}catch(s){n=[6,s];i=0}finally{r=a=0}if(n[0]&5)throw n[1];return{value:n[0]?n[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,H as Host}from"./index-0c8a0e04.js";import{a as navigationClose,
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(t,o,e,r){function i(t){return t instanceof e?t:new e((function(o){o(t)}))}return new(e||(e=Promise))((function(e,a){function n(t){try{c(r.next(t))}catch(o){a(o)}}function s(t){try{c(r["throw"](t))}catch(o){a(o)}}function c(t){t.done?e(t.value):i(t.value).then(n,s)}c((r=r.apply(t,o||[])).next())}))};var __generator=this&&this.__generator||function(t,o){var e={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,n;return n={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(n[Symbol.iterator]=function(){return this}),n;function s(t){return function(o){return c([t,o])}}function c(n){if(r)throw new TypeError("Generator is already executing.");while(e)try{if(r=1,i&&(a=n[0]&2?i["return"]:n[0]?i["throw"]||((a=i["return"])&&a.call(i),0):i.next)&&!(a=a.call(i,n[1])).done)return a;if(i=0,a)n=[n[0]&2,a.value];switch(n[0]){case 0:case 1:a=n;break;case 4:e.label++;return{value:n[1],done:false};case 5:e.label++;i=n[1];n=[0];continue;case 7:n=e.ops.pop();e.trys.pop();continue;default:if(!(a=e.trys,a=a.length>0&&a[a.length-1])&&(n[0]===6||n[0]===2)){e=0;continue}if(n[0]===3&&(!a||n[1]>a[0]&&n[1]<a[3])){e.label=n[1];break}if(n[0]===6&&e.label<a[1]){e.label=a[1];a=n;break}if(a&&e.label<a[2]){e.label=a[2];e.ops.push(n);break}if(a[2])e.ops.pop();e.trys.pop();continue}n=o.call(t,e)}catch(s){n=[6,s];i=0}finally{r=a=0}if(n[0]&5)throw n[1];return{value:n[0]?n[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,H as Host}from"./index-0c8a0e04.js";import{a as navigationClose,j as alertInfo,k as alertDanger,m as alertWarning,o as alertSuccess}from"./index-5e24bf37.js";var toastCss=":host{position:fixed;left:0;z-index:1;display:block;width:100%;visibility:hidden;opacity:0;-webkit-transition:opacity 0.3s ease-in-out, visibility 0.15s, -webkit-transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, visibility 0.15s, -webkit-transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, visibility 0.15s, transform 0.3s ease-in-out;transition:opacity 0.3s ease-in-out, visibility 0.15s, transform 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out}:host(.toast-top){top:0;-webkit-transform:translateY(-100%);transform:translateY(-100%)}:host(.toast-bottom){bottom:0;-webkit-transform:translateY(100%);transform:translateY(100%)}:host(.toast-open){visibility:visible;opacity:1;-webkit-transform:none;transform:none}.toast{position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex:0 0 100%;flex:0 0 100%;-ms-flex-align:center;align-items:center;max-width:100%;padding:1.5rem 2rem 1.5rem 3rem;margin-right:0.5rem;margin-left:0.5rem;font-family:var(--road-font, sans-serif);font-size:0.875rem;line-height:1.4;text-align:left}:host(.toast-top) .toast{border-radius:0 0 0.25rem 0.25rem}:host(.toast-bottom) .toast{border-radius:0.25rem 0.25rem 0 0}@media (min-width: 576px){.toast{-ms-flex:0 0 83.3333%;flex:0 0 83.3333%;-ms-flex-pack:center;justify-content:center;max-width:83.3333%;padding:1rem 2rem;margin-right:auto;margin-left:auto}}.toast-danger{color:var(--road-danger-contrast);background:var(--road-danger-default)}.toast-danger road-icon{color:var(--road-danger-contrast)}.toast-warning{color:var(--road-warning-contrast);background:var(--road-warning-default)}.toast-warning road-icon{color:var(--road-grey-000)}.toast-success{color:var(--road-success-contrast);background:var(--road-success-default)}.toast-success road-icon{color:var(--road-success-contrast)}.toast-info{color:var(--road-info-contrast);background:var(--road-info-default)}.toast-info road-icon{color:var(--road-info-contrast)}.toast-icon{position:absolute;top:1rem;left:0.5rem}@media (min-width: 576px){.toast-icon{position:relative;top:auto;left:auto;margin-right:0.5rem}}.toast-close{position:absolute;top:4px;right:4px;display:inline-block;padding:0;color:inherit;cursor:pointer;background:none;border:1px solid transparent;border-radius:4px;-webkit-tap-highlight-color:rgba(0, 0, 0, 0)}.toast-close:focus{border-color:var(--road-info-default);outline:none}";var Toast=function(){function t(t){var o=this;registerInstance(this,t);this.onClose=createEvent(this,"close",7);this.isOpen=false;this.color="info";this.timeout=8e3;this.position="bottom";this.onClick=function(t){t.stopPropagation();t.preventDefault();o.close()}}t.prototype.isOpenChanged=function(){var t=this;if(this.isOpen&&this.timeout>0){setTimeout((function(){return t.close()}),this.timeout)}};t.prototype.open=function(){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(o){this.isOpen=true;if(this.timeout>0){setTimeout((function(){t.close()}),this.timeout)}return[2]}))}))};t.prototype.close=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.isOpen=false;this.onClose.emit();return[2]}))}))};t.prototype.componentDidLoad=function(){var t=this;if(this.isOpen&&this.timeout>0){setTimeout((function(){return t.close()}),this.timeout)}};t.prototype.render=function(){var t=this.isOpen?"toast-open":"";var o;switch(this.color){case"info":o=alertInfo;break;case"success":o=alertSuccess;break;case"warning":o=alertWarning;break;case"danger":o=alertDanger;break;default:o=alertInfo;break}return h(Host,{class:t+" toast-"+this.position,role:"alert"},h("div",{class:"toast toast-"+this.color},h("road-icon",{class:"toast-icon",icon:o,"aria-hidden":"true"}),this.label,h("button",{type:"button",class:"toast-close","aria-label":"Close",onClick:this.onClick},h("road-icon",{icon:navigationClose,size:"md"}))))};Object.defineProperty(t,"watchers",{get:function(){return{isOpen:["isOpenChanged"]}},enumerable:false,configurable:true});return t}();Toast.style=toastCss;export{Toast as road_toast};
|
package/dist/esm-es5/roadtrip.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as plt,w as win,d as doc,N as NAMESPACE,a as promiseResolve,b as bootstrapLazy}from"./index-0c8a0e04.js";import"./app-a32f9d74.js";var getDynamicImportFunction=function(e){return"__sc_import_"+e.replace(/\s|-/g,"_")};var patchBrowser=function(){{plt.$cssShim$=win.__cssshim}var e=Array.from(doc.querySelectorAll("script")).find((function(e){return new RegExp("/"+NAMESPACE+"(\\.esm)?\\.js($|\\?|#)").test(e.src)||e.getAttribute("data-stencil-namespace")===NAMESPACE}));var a={};if("onbeforeload"in e&&!history.scrollRestoration){return{then:function(){}}}{a.resourcesUrl=new URL(".",new URL(e.getAttribute("data-resources-url")||e.src,win.location.href)).href;{patchDynamicImport(a.resourcesUrl,e)}if(!win.customElements){return import("./dom-ba83fb9d.js").then((function(){return a}))}}return promiseResolve(a)};var patchDynamicImport=function(e,a){var o=getDynamicImportFunction(NAMESPACE);try{win[o]=new Function("w","return import(w);//"+Math.random())}catch(t){var r=new Map;win[o]=function(t){var d=new URL(t,e).href;var
|
|
1
|
+
import{p as plt,w as win,d as doc,N as NAMESPACE,a as promiseResolve,b as bootstrapLazy}from"./index-0c8a0e04.js";import"./app-a32f9d74.js";var getDynamicImportFunction=function(e){return"__sc_import_"+e.replace(/\s|-/g,"_")};var patchBrowser=function(){{plt.$cssShim$=win.__cssshim}var e=Array.from(doc.querySelectorAll("script")).find((function(e){return new RegExp("/"+NAMESPACE+"(\\.esm)?\\.js($|\\?|#)").test(e.src)||e.getAttribute("data-stencil-namespace")===NAMESPACE}));var a={};if("onbeforeload"in e&&!history.scrollRestoration){return{then:function(){}}}{a.resourcesUrl=new URL(".",new URL(e.getAttribute("data-resources-url")||e.src,win.location.href)).href;{patchDynamicImport(a.resourcesUrl,e)}if(!win.customElements){return import("./dom-ba83fb9d.js").then((function(){return a}))}}return promiseResolve(a)};var patchDynamicImport=function(e,a){var o=getDynamicImportFunction(NAMESPACE);try{win[o]=new Function("w","return import(w);//"+Math.random())}catch(t){var r=new Map;win[o]=function(t){var d=new URL(t,e).href;var i=r.get(d);if(!i){var n=doc.createElement("script");n.type="module";n.crossOrigin=a.crossOrigin;n.src=URL.createObjectURL(new Blob(["import * as m from '"+d+"'; window."+o+".m = m;"],{type:"application/javascript"}));i=new Promise((function(e){n.onload=function(){e(win[o].m);n.remove()}}));r.set(d,i);doc.head.appendChild(n)}return i}}};patchBrowser().then((function(e){return bootstrapLazy([["road-badge_11",[[1,"road-item",{button:[4],detail:[4],active:[4],detailIcon:[1,"detail-icon"],disabled:[4],download:[1],href:[1],rel:[1],lines:[1],target:[1],type:[1],multipleInputs:[32]}],[1,"road-badge",{color:[1],bubble:[4]}],[1,"road-list",{lines:[1]}],[1,"road-toolbar",{color:[1]}],[33,"road-drawer",{isOpen:[1028,"is-open"],position:[1],drawerWidth:[2,"drawer-width"],hasInverseHeader:[4,"has-inverse-header"],hasBackIcon:[4,"has-back-icon"],backText:[1,"back-text"],drawerTitle:[1,"drawer-title"],hasCloseIcon:[4,"has-close-icon"],open:[64],close:[64],back:[64]},[[4,"keyup","onEscape"]]],[1,"road-col"],[1,"road-grid"],[1,"road-label"],[1,"road-row"],[1,"road-button",{color:[1],size:[513],buttonType:[1,"button-type"],disabled:[516],expand:[516],download:[1],href:[1],rel:[1],target:[1],outline:[4]}],[1,"road-icon",{color:[1],ariaLabel:[1537,"aria-label"],ariaHidden:[513,"aria-hidden"],name:[1],src:[1],icon:[8],size:[1],rotate:[1],lazy:[4],sanitize:[4],svgContent:[32],isVisible:[32]}]]],["road-duration",[[1,"road-duration",{isOpen:[1028,"is-open"],header:[1],min:[2],max:[2],step:[2],open:[64],close:[64]},[[0,"roadcardclick","handleClick"]]]]],["road-counter",[[2,"road-counter",{inputId:[1,"input-id"],min:[1],max:[1],step:[1],value:[2],size:[1]}]]],["road-plate-number",[[2,"road-plate-number",{country:[1],disabled:[4],placeholder:[1],readonly:[4],value:[1032],motorbike:[4]}]]],["road-accordion",[[1,"road-accordion",{isOpen:[1028,"is-open"],isLight:[4,"is-light"]}]]],["road-banner",[[1,"road-banner",{isOpen:[1028,"is-open"],label:[1],link:[1],url:[1],close:[64]}]]],["road-carousel",[[4,"road-carousel",{options:[8],pager:[4],arrows:[4],update:[64],updateAutoHeight:[64],slideTo:[64],slideNext:[64],slidePrev:[64],getActiveIndex:[64],getPreviousIndex:[64],length:[64],isEnd:[64],isBeginning:[64],startAutoplay:[64],stopAutoplay:[64],lockSwipeToNext:[64],lockSwipeToPrev:[64],lockSwipes:[64],getSwiper:[64]}]]],["road-checkbox",[[6,"road-checkbox",{checkboxId:[1,"checkbox-id"],name:[1],required:[4],checked:[1028],indeterminate:[4],disabled:[4],value:[1],label:[1],inverse:[4],error:[1],helper:[1]}]]],["road-chip",[[1,"road-chip",{color:[1],outline:[4],size:[1],hasCloseIcon:[4,"has-close-icon"]}]]],["road-collapse",[[1,"road-collapse",{isOpen:[1028,"is-open"],showMore:[1,"show-more"],showLess:[1,"show-less"],centered:[4]}]]],["road-dialog",[[1,"road-dialog",{isOpen:[1028,"is-open"],hasCloseIcon:[4,"has-close-icon"],color:[1],icon:[1],label:[1],description:[1],open:[64],close:[64]},[[4,"keyup","onEscape"]]]]],["road-modal",[[1,"road-modal",{maxWidth:[2,"max-width"],isOpen:[1028,"is-open"],hasInverseHeader:[4,"has-inverse-header"],modalTitle:[1,"modal-title"],hasCloseIcon:[4,"has-close-icon"],open:[64],close:[64]},[[4,"keyup","onEscape"]]]]],["road-range",[[2,"road-range",{rangeId:[1,"range-id"],value:[1032],min:[1],max:[1],step:[1],showValue:[4,"show-value"],showTick:[4,"show-tick"]}]]],["road-rating",[[1,"road-rating",{rate:[2],reviews:[2],reviewsText:[1,"reviews-text"]}]]],["road-toast",[[1,"road-toast",{isOpen:[1028,"is-open"],color:[1],label:[1],timeout:[2],position:[1],open:[64],close:[64]}]]],["road-alert",[[1,"road-alert",{color:[1]}]]],["road-autocomplete",[[6,"road-autocomplete",{options:[16],visible:[32]},[[0,"roadFocus","handleFocus"],[0,"roadfocus","handleFocus"],[4,"click","onClickOutside"]]]]],["road-avatar",[[1,"road-avatar"]]],["road-carousel-item",[[4,"road-carousel-item"]]],["road-dropdown",[[1,"road-dropdown",{isOpen:[1028,"is-open"]}]]],["road-flap",[[1,"road-flap",{color:[1],size:[513]}]]],["road-img",[[1,"road-img",{alt:[1],src:[1],loadSrc:[32],loadError:[32]}]]],["road-navbar",[[1,"road-navbar",{selectedTab:[1,"selected-tab"]},[[0,"roadNavbarItemClick","onNavbarChanged"],[0,"roadnavbaritemclick","onNavbarChanged"]]]]],["road-navbar-item",[[1,"road-navbar-item",{disabled:[4],download:[1],href:[1],rel:[1],selected:[1028],tab:[1],target:[1]},[[8,"roadNavbarChanged","onNavbarChanged"],[8,"roadnavbarchanged","onNavbarChanged"]]]]],["road-progress",[[1,"road-progress",{value:[2],color:[1]}]]],["road-radio",[[2,"road-radio",{radioId:[1,"radio-id"],name:[1],required:[4],disabled:[4],value:[8],label:[1],inverse:[4],error:[4],helper:[1],inline:[4],checked:[32]},[[8,"roadChange","onRoadChangedChanged"],[8,"roadchange","onRoadChangedChanged"]]]]],["road-radio-group",[[6,"road-radio-group",{radioGroupId:[1,"radio-group-id"],allowEmptySelection:[4,"allow-empty-selection"],name:[1],value:[1032],label:[1],asterisk:[4],ariaLabel:[513,"aria-label"],error:[1025],helper:[1]}]]],["road-select",[[2,"road-select",{selectId:[1,"select-id"],options:[16],autofocus:[4],disabled:[4],name:[1],required:[4],size:[2],sizes:[1],label:[1],error:[1],value:[1032]}]]],["road-select-filter",[[6,"road-select-filter",{options:[16],parameters:[8],isActive:[4,"is-active"],onlySelect:[4,"only-select"],isOpen:[32],currentValue:[32]},[[0,"roadFocus","handleFocus"],[0,"roadfocus","handleFocus"],[0,"roadBlur","handleBlur"],[0,"roadblur","handleBlur"],[0,"roadChange","handleChange"],[0,"roadchange","handleChange"],[4,"click","onClickOutside"]]]]],["road-skeleton",[[1,"road-skeleton"]]],["road-spinner",[[1,"road-spinner"]]],["road-switch",[[2,"road-switch",{switchId:[1,"switch-id"],name:[1],checked:[1028],disabled:[4],label:[1],color:[1],hasLeftLabel:[4,"has-left-label"],isSpaced:[4,"is-spaced"],value:[1],on:[1],off:[1]}]]],["road-tab",[[1,"road-tab",{active:[1028],tab:[1],setActive:[64]}]]],["road-tab-bar",[[1,"road-tab-bar",{expand:[4],center:[4],selectedTab:[1,"selected-tab"]}]]],["road-tab-button",[[1,"road-tab-button",{download:[1],href:[1],rel:[1],layout:[1],selected:[1028],tab:[1],target:[1]},[[8,"roadTabBarChanged","onTabBarChanged"],[8,"roadTabbarchanged","onTabBarChanged"]]]]],["road-table",[[6,"road-table"]]],["road-tabs",[[1,"road-tabs",{selectedTab:[32],select:[64],getTab:[64],getSelected:[64]}]]],["road-text",[[1,"road-text",{color:[1]}]]],["road-textarea",[[2,"road-textarea",{textareaId:[1,"textarea-id"],autocapitalize:[1],autofocus:[4],disabled:[4],inputmode:[1],enterkeyhint:[1],maxlength:[2],minlength:[2],name:[1],placeholder:[1],sizes:[1],readonly:[4],required:[4],spellcheck:[4],cols:[2],rows:[2],wrap:[1],value:[1025],label:[1],error:[1],helper:[1]}]]],["road-toggle",[[2,"road-toggle",{toggleId:[1,"toggle-id"],name:[1],checked:[1028],disabled:[4],label:[1],color:[1],hasLeftLabel:[4,"has-left-label"],isSpaced:[4,"is-spaced"],value:[1],on:[1],off:[1]}]]],["road-toolbar-title",[[1,"road-toolbar-title"]]],["road-tooltip",[[1,"road-tooltip",{tooltipId:[1,"tooltip-id"],content:[1],position:[1],isOpen:[1028,"is-open"],trigger:[1],open:[64],close:[64]}]]],["road-card",[[1,"road-card",{button:[4],value:[1],type:[1],download:[1],href:[1],rel:[1],target:[1]}]]],["road-input",[[2,"road-input",{inputId:[1,"input-id"],autocapitalize:[1],autocomplete:[1],autocorrect:[1],autofocus:[4],disabled:[4],enterkeyhint:[1],inputmode:[1],max:[1],maxlength:[2],min:[1],minlength:[2],name:[1],pattern:[1],placeholder:[1],readonly:[4],required:[4],spellcheck:[4],step:[1],size:[2],sizes:[1],type:[1],value:[1032],label:[1],error:[1],helper:[1],debounce:[2]}]]],["road-input-group",[[1,"road-input-group"]]]],e)}));
|
package/dist/html.html-data.json
CHANGED
|
@@ -1753,6 +1753,10 @@
|
|
|
1753
1753
|
"name": "range-id",
|
|
1754
1754
|
"description": "The id of range"
|
|
1755
1755
|
},
|
|
1756
|
+
{
|
|
1757
|
+
"name": "show-tick",
|
|
1758
|
+
"description": "Display Tick of the range"
|
|
1759
|
+
},
|
|
1756
1760
|
{
|
|
1757
1761
|
"name": "show-value",
|
|
1758
1762
|
"description": "Display the current value of the range"
|
|
@@ -1884,6 +1888,10 @@
|
|
|
1884
1888
|
"value": ""
|
|
1885
1889
|
},
|
|
1886
1890
|
"attributes": [
|
|
1891
|
+
{
|
|
1892
|
+
"name": "is-active",
|
|
1893
|
+
"description": "If `true`, add class Active"
|
|
1894
|
+
},
|
|
1887
1895
|
{
|
|
1888
1896
|
"name": "only-select",
|
|
1889
1897
|
"description": "If `false`, the user can submit custom value"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r))e[r]=t[r]};return e(t,r)};return function(t,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i))e[i]=t[i]}return e};return __assign.apply(this,arguments)};var __spreadArray=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};System.register(["./p-f33e4ac5.system.js"],(function(e){"use strict";var t,r,n,i,o;return{setters:[function(e){t=e.r;r=e.c;n=e.h;i=e.H;o=e.e}],execute:function(){function a(e){return!Array.isArray?y(e)==="[object Array]":Array.isArray(e)}var s=1/0;function c(e){if(typeof e=="string"){return e}var t=e+"";return t=="0"&&1/e==-s?"-0":t}function u(e){return e==null?"":c(e)}function h(e){return typeof e==="string"}function f(e){return typeof e==="number"}function l(e){return e===true||e===false||v(e)&&y(e)=="[object Boolean]"}function d(e){return typeof e==="object"}function v(e){return d(e)&&e!==null}function p(e){return e!==undefined&&e!==null}function g(e){return!e.trim().length}function y(e){return e==null?e===undefined?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}var m="Extended search is not available";var b="Incorrect 'index' type";var _=function(e){return"Invalid value for key "+e};var x=function(e){return"Pattern length exceeds max of "+e+"."};var M=function(e){return"Missing "+e+" property in key"};var L=function(e){return"Property 'weight' in key '"+e+"' must be a positive integer"};var O=Object.prototype.hasOwnProperty;var w=function(){function e(e){var t=this;this._keys=[];this._keyMap={};var r=0;e.forEach((function(e){var n=k(e);r+=n.weight;t._keys.push(n);t._keyMap[n.id]=n;r+=n.weight}));this._keys.forEach((function(e){e.weight/=r}))}e.prototype.get=function(e){return this._keyMap[e]};e.prototype.keys=function(){return this._keys};e.prototype.toJSON=function(){return JSON.stringify(this._keys)};return e}();function k(e){var t=null;var r=null;var n=null;var i=1;if(h(e)||a(e)){n=e;t=S(e);r=A(e)}else{if(!O.call(e,"name")){throw new Error(M("name"))}var o=e.name;n=o;if(O.call(e,"weight")){i=e.weight;if(i<=0){throw new Error(L(o))}}t=S(o);r=A(o)}return{path:t,id:r,weight:i,src:n}}function S(e){return a(e)?e:e.split(".")}function A(e){return a(e)?e.join("."):e}function j(e,t){var r=[];var n=false;var i=function(e,t,o){if(!p(e)){return}if(!t[o]){r.push(e)}else{var s=t[o];var c=e[s];if(!p(c)){return}if(o===t.length-1&&(h(c)||f(c)||l(c))){r.push(u(c))}else if(a(c)){n=true;for(var d=0,v=c.length;d<v;d+=1){i(c[d],t,o+1)}}else if(t.length){i(c,t,o+1)}}};i(e,h(t)?t.split("."):t,0);return n?r:r[0]}var C={includeMatches:false,findAllMatches:false,minMatchCharLength:1};var I={isCaseSensitive:false,includeScore:false,keys:[],shouldSort:true,sortFn:function(e,t){return e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1}};var P={location:0,threshold:.6,distance:100};var E={useExtendedSearch:false,getFn:j,ignoreLocation:false,ignoreFieldNorm:false,fieldNormWeight:1};var $=__assign(__assign(__assign(__assign({},I),C),P),E);var N=/[^ ]+/g;function R(e,t){if(e===void 0){e=1}if(t===void 0){t=3}var r=new Map;var n=Math.pow(10,t);return{get:function(t){var i=t.match(N).length;if(r.has(i)){return r.get(i)}var o=1/Math.pow(i,.5*e);var a=parseFloat(Math.round(o*n)/n);r.set(i,a);return a},clear:function(){r.clear()}}}var F=function(){function e(e){var t=e===void 0?{}:e,r=t.getFn,n=r===void 0?$.getFn:r,i=t.fieldNormWeight,o=i===void 0?$.fieldNormWeight:i;this.norm=R(o,3);this.getFn=n;this.isCreated=false;this.setIndexRecords()}e.prototype.setSources=function(e){if(e===void 0){e=[]}this.docs=e};e.prototype.setIndexRecords=function(e){if(e===void 0){e=[]}this.records=e};e.prototype.setKeys=function(e){var t=this;if(e===void 0){e=[]}this.keys=e;this._keysMap={};e.forEach((function(e,r){t._keysMap[e.id]=r}))};e.prototype.create=function(){var e=this;if(this.isCreated||!this.docs.length){return}this.isCreated=true;if(h(this.docs[0])){this.docs.forEach((function(t,r){e._addString(t,r)}))}else{this.docs.forEach((function(t,r){e._addObject(t,r)}))}this.norm.clear()};e.prototype.add=function(e){var t=this.size();if(h(e)){this._addString(e,t)}else{this._addObject(e,t)}};e.prototype.removeAt=function(e){this.records.splice(e,1);for(var t=e,r=this.size();t<r;t+=1){this.records[t].i-=1}};e.prototype.getValueForItemAtKeyId=function(e,t){return e[this._keysMap[t]]};e.prototype.size=function(){return this.records.length};e.prototype._addString=function(e,t){if(!p(e)||g(e)){return}var r={v:e,i:t,n:this.norm.get(e)};this.records.push(r)};e.prototype._addObject=function(e,t){var r=this;var n={i:t,$:{}};this.keys.forEach((function(t,i){var o=r.getFn(e,t.path);if(!p(o)){return}if(a(o)){var s=[];var c=[{nestedArrIndex:-1,value:o}];while(c.length){var u=c.pop(),f=u.nestedArrIndex,l=u.value;if(!p(l)){continue}if(h(l)&&!g(l)){var d={v:l,i:f,n:r.norm.get(l)};s.push(d)}else if(a(l)){l.forEach((function(e,t){c.push({nestedArrIndex:t,value:e})}))}else;}n.$[i]=s}else if(!g(o)){var d={v:o,n:r.norm.get(o)};n.$[i]=d}}));this.records.push(n)};e.prototype.toJSON=function(){return{keys:this.keys,records:this.records}};return e}();function W(e,t,r){var n=r===void 0?{}:r,i=n.getFn,o=i===void 0?$.getFn:i,a=n.fieldNormWeight,s=a===void 0?$.fieldNormWeight:a;var c=new F({getFn:o,fieldNormWeight:s});c.setKeys(e.map(k));c.setSources(t);c.create();return c}function T(e,t){var r=t===void 0?{}:t,n=r.getFn,i=n===void 0?$.getFn:n,o=r.fieldNormWeight,a=o===void 0?$.fieldNormWeight:o;var s=e.keys,c=e.records;var u=new F({getFn:i,fieldNormWeight:a});u.setKeys(s);u.setIndexRecords(c);return u}function z(e,t){var r=t===void 0?{}:t,n=r.errors,i=n===void 0?0:n,o=r.currentLocation,a=o===void 0?0:o,s=r.expectedLocation,c=s===void 0?0:s,u=r.distance,h=u===void 0?$.distance:u,f=r.ignoreLocation,l=f===void 0?$.ignoreLocation:f;var d=i/e.length;if(l){return d}var v=Math.abs(c-a);if(!h){return v?1:d}return d+v/h}function q(e,t){if(e===void 0){e=[]}if(t===void 0){t=$.minMatchCharLength}var r=[];var n=-1;var i=-1;var o=0;for(var a=e.length;o<a;o+=1){var s=e[o];if(s&&n===-1){n=o}else if(!s&&n!==-1){i=o-1;if(i-n+1>=t){r.push([n,i])}n=-1}}if(e[o-1]&&o-n>=t){r.push([n,o-1])}return r}var V=32;function H(e,t,r,n){var i=n===void 0?{}:n,o=i.location,a=o===void 0?$.location:o,s=i.distance,c=s===void 0?$.distance:s,u=i.threshold,h=u===void 0?$.threshold:u,f=i.findAllMatches,l=f===void 0?$.findAllMatches:f,d=i.minMatchCharLength,v=d===void 0?$.minMatchCharLength:d,p=i.includeMatches,g=p===void 0?$.includeMatches:p,y=i.ignoreLocation,m=y===void 0?$.ignoreLocation:y;if(t.length>V){throw new Error(x(V))}var b=t.length;var _=e.length;var M=Math.max(0,Math.min(a,_));var L=h;var O=M;var w=v>1||g;var k=w?Array(_):[];var S;while((S=e.indexOf(t,O))>-1){var A=z(t,{currentLocation:S,expectedLocation:M,distance:c,ignoreLocation:m});L=Math.min(A,L);O=S+b;if(w){var j=0;while(j<b){k[S+j]=1;j+=1}}}O=-1;var C=[];var I=1;var P=b+_;var E=1<<b-1;for(var j=0;j<b;j+=1){var N=0;var R=P;while(N<R){var F=z(t,{errors:j,currentLocation:M+R,expectedLocation:M,distance:c,ignoreLocation:m});if(F<=L){N=R}else{P=R}R=Math.floor((P-N)/2+N)}P=R;var W=Math.max(1,M-R+1);var T=l?_:Math.min(M+R,_)+b;var H=Array(T+2);H[T+1]=(1<<j)-1;for(var K=T;K>=W;K-=1){var D=K-1;var J=r[e.charAt(D)];if(w){k[D]=+!!J}H[K]=(H[K+1]<<1|1)&J;if(j){H[K]|=(C[K+1]|C[K])<<1|1|C[K+1]}if(H[K]&E){I=z(t,{errors:j,currentLocation:D,expectedLocation:M,distance:c,ignoreLocation:m});if(I<=L){L=I;O=D;if(O<=M){break}W=Math.max(1,2*M-O)}}}var A=z(t,{errors:j+1,currentLocation:M,expectedLocation:M,distance:c,ignoreLocation:m});if(A>L){break}C=H}var B={isMatch:O>=0,score:Math.max(.001,I)};if(w){var Q=q(k,v);if(!Q.length){B.isMatch=false}else if(g){B.indices=Q}}return B}function K(e){var t={};for(var r=0,n=e.length;r<n;r+=1){var i=e.charAt(r);t[i]=(t[i]||0)|1<<n-r-1}return t}var D=function(){function e(e,t){var r=this;var n=t===void 0?{}:t,i=n.location,o=i===void 0?$.location:i,a=n.threshold,s=a===void 0?$.threshold:a,c=n.distance,u=c===void 0?$.distance:c,h=n.includeMatches,f=h===void 0?$.includeMatches:h,l=n.findAllMatches,d=l===void 0?$.findAllMatches:l,v=n.minMatchCharLength,p=v===void 0?$.minMatchCharLength:v,g=n.isCaseSensitive,y=g===void 0?$.isCaseSensitive:g,m=n.ignoreLocation,b=m===void 0?$.ignoreLocation:m;this.options={location:o,threshold:s,distance:u,includeMatches:f,findAllMatches:d,minMatchCharLength:p,isCaseSensitive:y,ignoreLocation:b};this.pattern=y?e:e.toLowerCase();this.chunks=[];if(!this.pattern.length){return}var _=function(e,t){r.chunks.push({pattern:e,alphabet:K(e),startIndex:t})};var x=this.pattern.length;if(x>V){var M=0;var L=x%V;var O=x-L;while(M<O){_(this.pattern.substr(M,V),M);M+=V}if(L){var w=x-V;_(this.pattern.substr(w),w)}}else{_(this.pattern,0)}}e.prototype.searchIn=function(e){var t=this.options,r=t.isCaseSensitive,n=t.includeMatches;if(!r){e=e.toLowerCase()}if(this.pattern===e){var i={isMatch:true,score:0};if(n){i.indices=[[0,e.length-1]]}return i}var o=this.options,a=o.location,s=o.distance,c=o.threshold,u=o.findAllMatches,h=o.minMatchCharLength,f=o.ignoreLocation;var l=[];var d=0;var v=false;this.chunks.forEach((function(t){var r=t.pattern,i=t.alphabet,o=t.startIndex;var p=H(e,r,i,{location:a+o,distance:s,threshold:c,findAllMatches:u,minMatchCharLength:h,includeMatches:n,ignoreLocation:f}),g=p.isMatch,y=p.score,m=p.indices;if(g){v=true}d+=y;if(g&&m){l=__spreadArray(__spreadArray([],l),m)}}));var p={isMatch:v,score:v?d/this.chunks.length:1};if(v&&n){p.indices=l}return p};return e}();var J=function(){function e(e){this.pattern=e}e.isMultiMatch=function(e){return B(e,this.multiRegex)};e.isSingleMatch=function(e){return B(e,this.singleRegex)};e.prototype.search=function(){};return e}();function B(e,t){var r=e.match(t);return r?r[1]:null}var Q=function(e){__extends(t,e);function t(t){return e.call(this,t)||this}Object.defineProperty(t,"type",{get:function(){return"exact"},enumerable:false,configurable:true});Object.defineProperty(t,"multiRegex",{get:function(){return/^="(.*)"$/},enumerable:false,configurable:true});Object.defineProperty(t,"singleRegex",{get:function(){return/^=(.*)$/},enumerable:false,configurable:true});t.prototype.search=function(e){var t=e===this.pattern;return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}};return t}(J);var U=function(e){__extends(t,e);function t(t){return e.call(this,t)||this}Object.defineProperty(t,"type",{get:function(){return"inverse-exact"},enumerable:false,configurable:true});Object.defineProperty(t,"multiRegex",{get:function(){return/^!"(.*)"$/},enumerable:false,configurable:true});Object.defineProperty(t,"singleRegex",{get:function(){return/^!(.*)$/},enumerable:false,configurable:true});t.prototype.search=function(e){var t=e.indexOf(this.pattern);var r=t===-1;return{isMatch:r,score:r?0:1,indices:[0,e.length-1]}};return t}(J);var G=function(e){__extends(t,e);function t(t){return e.call(this,t)||this}Object.defineProperty(t,"type",{get:function(){return"prefix-exact"},enumerable:false,configurable:true});Object.defineProperty(t,"multiRegex",{get:function(){return/^\^"(.*)"$/},enumerable:false,configurable:true});Object.defineProperty(t,"singleRegex",{get:function(){return/^\^(.*)$/},enumerable:false,configurable:true});t.prototype.search=function(e){var t=e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}};return t}(J);var X=function(e){__extends(t,e);function t(t){return e.call(this,t)||this}Object.defineProperty(t,"type",{get:function(){return"inverse-prefix-exact"},enumerable:false,configurable:true});Object.defineProperty(t,"multiRegex",{get:function(){return/^!\^"(.*)"$/},enumerable:false,configurable:true});Object.defineProperty(t,"singleRegex",{get:function(){return/^!\^(.*)$/},enumerable:false,configurable:true});t.prototype.search=function(e){var t=!e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}};return t}(J);var Y=function(e){__extends(t,e);function t(t){return e.call(this,t)||this}Object.defineProperty(t,"type",{get:function(){return"suffix-exact"},enumerable:false,configurable:true});Object.defineProperty(t,"multiRegex",{get:function(){return/^"(.*)"\$$/},enumerable:false,configurable:true});Object.defineProperty(t,"singleRegex",{get:function(){return/^(.*)\$$/},enumerable:false,configurable:true});t.prototype.search=function(e){var t=e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[e.length-this.pattern.length,e.length-1]}};return t}(J);var Z=function(e){__extends(t,e);function t(t){return e.call(this,t)||this}Object.defineProperty(t,"type",{get:function(){return"inverse-suffix-exact"},enumerable:false,configurable:true});Object.defineProperty(t,"multiRegex",{get:function(){return/^!"(.*)"\$$/},enumerable:false,configurable:true});Object.defineProperty(t,"singleRegex",{get:function(){return/^!(.*)\$$/},enumerable:false,configurable:true});t.prototype.search=function(e){var t=!e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}};return t}(J);var ee=function(e){__extends(t,e);function t(t,r){var n=r===void 0?{}:r,i=n.location,o=i===void 0?$.location:i,a=n.threshold,s=a===void 0?$.threshold:a,c=n.distance,u=c===void 0?$.distance:c,h=n.includeMatches,f=h===void 0?$.includeMatches:h,l=n.findAllMatches,d=l===void 0?$.findAllMatches:l,v=n.minMatchCharLength,p=v===void 0?$.minMatchCharLength:v,g=n.isCaseSensitive,y=g===void 0?$.isCaseSensitive:g,m=n.ignoreLocation,b=m===void 0?$.ignoreLocation:m;var _=e.call(this,t)||this;_._bitapSearch=new D(t,{location:o,threshold:s,distance:u,includeMatches:f,findAllMatches:d,minMatchCharLength:p,isCaseSensitive:y,ignoreLocation:b});return _}Object.defineProperty(t,"type",{get:function(){return"fuzzy"},enumerable:false,configurable:true});Object.defineProperty(t,"multiRegex",{get:function(){return/^"(.*)"$/},enumerable:false,configurable:true});Object.defineProperty(t,"singleRegex",{get:function(){return/^(.*)$/},enumerable:false,configurable:true});t.prototype.search=function(e){return this._bitapSearch.searchIn(e)};return t}(J);var te=function(e){__extends(t,e);function t(t){return e.call(this,t)||this}Object.defineProperty(t,"type",{get:function(){return"include"},enumerable:false,configurable:true});Object.defineProperty(t,"multiRegex",{get:function(){return/^'"(.*)"$/},enumerable:false,configurable:true});Object.defineProperty(t,"singleRegex",{get:function(){return/^'(.*)$/},enumerable:false,configurable:true});t.prototype.search=function(e){var t=0;var r;var n=[];var i=this.pattern.length;while((r=e.indexOf(this.pattern,t))>-1){t=r+i;n.push([r,t-1])}var o=!!n.length;return{isMatch:o,score:o?0:1,indices:n}};return t}(J);var re=[Q,te,G,X,Z,Y,U,ee];var ne=re.length;var ie=/ +(?=([^\"]*\"[^\"]*\")*[^\"]*$)/;var oe="|";function ae(e,t){if(t===void 0){t={}}return e.split(oe).map((function(e){var r=e.trim().split(ie).filter((function(e){return e&&!!e.trim()}));var n=[];for(var i=0,o=r.length;i<o;i+=1){var a=r[i];var s=false;var c=-1;while(!s&&++c<ne){var u=re[c];var h=u.isMultiMatch(a);if(h){n.push(new u(h,t));s=true}}if(s){continue}c=-1;while(++c<ne){var u=re[c];var h=u.isSingleMatch(a);if(h){n.push(new u(h,t));break}}}return n}))}var se=new Set([ee.type,te.type]);var ce=function(){function e(e,t){var r=t===void 0?{}:t,n=r.isCaseSensitive,i=n===void 0?$.isCaseSensitive:n,o=r.includeMatches,a=o===void 0?$.includeMatches:o,s=r.minMatchCharLength,c=s===void 0?$.minMatchCharLength:s,u=r.ignoreLocation,h=u===void 0?$.ignoreLocation:u,f=r.findAllMatches,l=f===void 0?$.findAllMatches:f,d=r.location,v=d===void 0?$.location:d,p=r.threshold,g=p===void 0?$.threshold:p,y=r.distance,m=y===void 0?$.distance:y;this.query=null;this.options={isCaseSensitive:i,includeMatches:a,minMatchCharLength:c,findAllMatches:l,ignoreLocation:h,location:v,threshold:g,distance:m};this.pattern=i?e:e.toLowerCase();this.query=ae(this.pattern,this.options)}e.condition=function(e,t){return t.useExtendedSearch};e.prototype.searchIn=function(e){var t=this.query;if(!t){return{isMatch:false,score:1}}var r=this.options,n=r.includeMatches,i=r.isCaseSensitive;e=i?e:e.toLowerCase();var o=0;var a=[];var s=0;for(var c=0,u=t.length;c<u;c+=1){var h=t[c];a.length=0;o=0;for(var f=0,l=h.length;f<l;f+=1){var d=h[f];var v=d.search(e),p=v.isMatch,g=v.indices,y=v.score;if(p){o+=1;s+=y;if(n){var m=d.constructor.type;if(se.has(m)){a=__spreadArray(__spreadArray([],a),g)}else{a.push(g)}}}else{s=0;o=0;a.length=0;break}}if(o){var b={isMatch:true,score:s/o};if(n){b.indices=a}return b}}return{isMatch:false,score:1}};return e}();var ue=[];function he(){var e=[];for(var t=0;t<arguments.length;t++){e[t]=arguments[t]}ue.push.apply(ue,e)}function fe(e,t){for(var r=0,n=ue.length;r<n;r+=1){var i=ue[r];if(i.condition(e,t)){return new i(e,t)}}return new D(e,t)}var le={AND:"$and",OR:"$or"};var de={PATH:"$path",PATTERN:"$val"};var ve=function(e){return!!(e[le.AND]||e[le.OR])};var pe=function(e){return!!e[de.PATH]};var ge=function(e){return!a(e)&&d(e)&&!ve(e)};var ye=function(e){var t;return t={},t[le.AND]=Object.keys(e).map((function(t){var r;return r={},r[t]=e[t],r})),t};function me(e,t,r){var n=r===void 0?{}:r,i=n.auto,o=i===void 0?true:i;var s=function(e){var r=Object.keys(e);var n=pe(e);if(!n&&r.length>1&&!ve(e)){return s(ye(e))}if(ge(e)){var i=n?e[de.PATH]:r[0];var c=n?e[de.PATTERN]:e[i];if(!h(c)){throw new Error(_(i))}var u={keyId:A(i),pattern:c};if(o){u.searcher=fe(c,t)}return u}var f={children:[],operator:r[0]};r.forEach((function(t){var r=e[t];if(a(r)){r.forEach((function(e){f.children.push(s(e))}))}}));return f};if(!ve(e)){e=ye(e)}return s(e)}function be(e,t){var r=t.ignoreFieldNorm,n=r===void 0?$.ignoreFieldNorm:r;e.forEach((function(e){var t=1;e.matches.forEach((function(e){var r=e.key,i=e.norm,o=e.score;var a=r?r.weight:null;t*=Math.pow(o===0&&a?Number.EPSILON:o,(a||1)*(n?1:i))}));e.score=t}))}function _e(e,t){var r=e.matches;t.matches=[];if(!p(r)){return}r.forEach((function(e){if(!p(e.indices)||!e.indices.length){return}var r=e.indices,n=e.value;var i={indices:r,value:n};if(e.key){i.key=e.key.src}if(e.idx>-1){i.refIndex=e.idx}t.matches.push(i)}))}function xe(e,t){t.score=e.score}function Me(e,t,r){var n=r===void 0?{}:r,i=n.includeMatches,o=i===void 0?$.includeMatches:i,a=n.includeScore,s=a===void 0?$.includeScore:a;var c=[];if(o)c.push(_e);if(s)c.push(xe);return e.map((function(e){var r=e.idx;var n={item:t[r],refIndex:r};if(c.length){c.forEach((function(t){t(e,n)}))}return n}))}var Le=function(){function e(e,t,r){if(t===void 0){t={}}this.options=__assign(__assign({},$),t);if(this.options.useExtendedSearch&&!true){throw new Error(m)}this._keyStore=new w(this.options.keys);this.setCollection(e,r)}e.prototype.setCollection=function(e,t){this._docs=e;if(t&&!(t instanceof F)){throw new Error(b)}this._myIndex=t||W(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})};e.prototype.add=function(e){if(!p(e)){return}this._docs.push(e);this._myIndex.add(e)};e.prototype.remove=function(e){if(e===void 0){e=function(){return false}}var t=[];for(var r=0,n=this._docs.length;r<n;r+=1){var i=this._docs[r];if(e(i,r)){this.removeAt(r);r-=1;n-=1;t.push(i)}}return t};e.prototype.removeAt=function(e){this._docs.splice(e,1);this._myIndex.removeAt(e)};e.prototype.getIndex=function(){return this._myIndex};e.prototype.search=function(e,t){var r=t===void 0?{}:t,n=r.limit,i=n===void 0?-1:n;var o=this.options,a=o.includeMatches,s=o.includeScore,c=o.shouldSort,u=o.sortFn,l=o.ignoreFieldNorm;var d=h(e)?h(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);be(d,{ignoreFieldNorm:l});if(c){d.sort(u)}if(f(i)&&i>-1){d=d.slice(0,i)}return Me(d,this._docs,{includeMatches:a,includeScore:s})};e.prototype._searchStringList=function(e){var t=fe(e,this.options);var r=this._myIndex.records;var n=[];r.forEach((function(e){var r=e.v,i=e.i,o=e.n;if(!p(r)){return}var a=t.searchIn(r),s=a.isMatch,c=a.score,u=a.indices;if(s){n.push({item:r,idx:i,matches:[{score:c,value:r,norm:o,indices:u}]})}}));return n};e.prototype._searchLogical=function(e){var t=this;var r=me(e,this.options);var n=function(e,r,i){if(!e.children){var o=e.keyId,a=e.searcher;var s=t._findMatches({key:t._keyStore.get(o),value:t._myIndex.getValueForItemAtKeyId(r,o),searcher:a});if(s&&s.length){return[{idx:i,item:r,matches:s}]}return[]}var c=[];for(var u=0,h=e.children.length;u<h;u+=1){var f=e.children[u];var l=n(f,r,i);if(l.length){c.push.apply(c,l)}else if(e.operator===le.AND){return[]}}return c};var i=this._myIndex.records;var o={};var a=[];i.forEach((function(e){var t=e.$,i=e.i;if(p(t)){var s=n(r,t,i);if(s.length){if(!o[i]){o[i]={idx:i,item:t,matches:[]};a.push(o[i])}s.forEach((function(e){var t;var r=e.matches;(t=o[i].matches).push.apply(t,r)}))}}}));return a};e.prototype._searchObjectList=function(e){var t=this;var r=fe(e,this.options);var n=this._myIndex,i=n.keys,o=n.records;var a=[];o.forEach((function(e){var n=e.$,o=e.i;if(!p(n)){return}var s=[];i.forEach((function(e,i){s.push.apply(s,t._findMatches({key:e,value:n[i],searcher:r}))}));if(s.length){a.push({idx:o,item:n,matches:s})}}));return a};e.prototype._findMatches=function(e){var t=e.key,r=e.value,n=e.searcher;if(!p(r)){return[]}var i=[];if(a(r)){r.forEach((function(e){var r=e.v,o=e.i,a=e.n;if(!p(r)){return}var s=n.searchIn(r),c=s.isMatch,u=s.score,h=s.indices;if(c){i.push({score:u,key:t,value:r,idx:o,norm:a,indices:h})}}))}else{var o=r.v,s=r.n;var c=n.searchIn(o),u=c.isMatch,h=c.score,f=c.indices;if(u){i.push({score:h,key:t,value:o,norm:s,indices:f})}}return i};return e}();Le.version="6.5.3";Le.createIndex=W;Le.parseIndex=T;Le.config=$;{Le.parseQuery=me}{he(ce)}var Oe=".sc-road-select-filter-h{--margin-top:3rem;position:relative;display:block}.select-filter-list.sc-road-select-filter{position:absolute;top:var(--margin-top);z-index:1;width:100%;max-height:16rem;padding:0.5rem 0;margin:0;overflow-y:scroll;font-family:var(--road-font, sans-serif);font-size:0.875rem;color:var(--road-grey-900);list-style-type:none;background:var(--road-grey-000);border-radius:0 0 0.25rem 0.25rem;-webkit-box-shadow:0 3px 6px rgba(0, 0, 0, 0.16);box-shadow:0 3px 6px rgba(0, 0, 0, 0.16)}.select-filter-item.sc-road-select-filter{padding:0.75rem 1rem;cursor:pointer}.select-filter-item.sc-road-select-filter:hover,.select-filter-item.highlight.sc-road-select-filter{color:var(--road-primary-contrast);background:var(--road-primary-500)}";var we=e("road_select_filter",function(){function e(e){var n=this;t(this,e);this.roadselected=r(this,"roadselected",7);this.roadSelected=r(this,"roadSelected",7);this.isOpen=false;this.currentValue="";this.options=[];this.parameters={keys:["value","label"],threshold:.3,ignoreLocation:true};this.onlySelect=true;this.onClick=function(e,t){n.el.querySelector("road-input").value=t;n.isOpen=false;n.roadselected.emit({value:e.toString(),label:t});n.roadSelected.emit({value:e.toString(),label:t})}}e.prototype.handleFocus=function(){this.isOpen=true};e.prototype.handleChange=function(e){this.currentValue=e.detail.value.toLowerCase()};e.prototype.onClickOutside=function(e){if(this.isOpen&&!this.el.contains(e.target)){this.isOpen=false;var t=this.el.querySelector("road-input").value;if(this.onlySelect&&!this.options.some((function(e){return e["label"]===t}))){this.el.querySelector("road-input").value=""}}};e.prototype.render=function(){var e=this;var t=new Le(this.options,this.parameters);var r=this.currentValue===""?this.options.map((function(e,t){return{item:e,score:1,refIndex:t}})):t.search(this.currentValue);return n(i,null,n("slot",null),this.isOpen&&n("ul",{class:"select-filter-list",role:"listbox"},r.map((function(t){return n("li",{class:"select-filter-item",role:"option",onClick:function(){return e.onClick(t.item.value,t.item.label.replace(/(<([^>]+)>)/gi,""))},innerHTML:t.item.label})}))))};Object.defineProperty(e.prototype,"el",{get:function(){return o(this)},enumerable:false,configurable:true});return e}());we.style=Oe}}}));
|
|
1
|
+
var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r))e[r]=t[r]};return e(t,r)};return function(t,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i))e[i]=t[i]}return e};return __assign.apply(this,arguments)};var __spreadArray=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};System.register(["./p-f33e4ac5.system.js"],(function(e){"use strict";var t,r,n,i,o;return{setters:[function(e){t=e.r;r=e.c;n=e.h;i=e.H;o=e.e}],execute:function(){function a(e){return!Array.isArray?y(e)==="[object Array]":Array.isArray(e)}var s=1/0;function c(e){if(typeof e=="string"){return e}var t=e+"";return t=="0"&&1/e==-s?"-0":t}function u(e){return e==null?"":c(e)}function h(e){return typeof e==="string"}function f(e){return typeof e==="number"}function l(e){return e===true||e===false||v(e)&&y(e)=="[object Boolean]"}function d(e){return typeof e==="object"}function v(e){return d(e)&&e!==null}function p(e){return e!==undefined&&e!==null}function g(e){return!e.trim().length}function y(e){return e==null?e===undefined?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}var m="Extended search is not available";var b="Incorrect 'index' type";var _=function(e){return"Invalid value for key "+e};var x=function(e){return"Pattern length exceeds max of "+e+"."};var M=function(e){return"Missing "+e+" property in key"};var O=function(e){return"Property 'weight' in key '"+e+"' must be a positive integer"};var L=Object.prototype.hasOwnProperty;var w=function(){function e(e){var t=this;this._keys=[];this._keyMap={};var r=0;e.forEach((function(e){var n=k(e);r+=n.weight;t._keys.push(n);t._keyMap[n.id]=n;r+=n.weight}));this._keys.forEach((function(e){e.weight/=r}))}e.prototype.get=function(e){return this._keyMap[e]};e.prototype.keys=function(){return this._keys};e.prototype.toJSON=function(){return JSON.stringify(this._keys)};return e}();function k(e){var t=null;var r=null;var n=null;var i=1;if(h(e)||a(e)){n=e;t=A(e);r=S(e)}else{if(!L.call(e,"name")){throw new Error(M("name"))}var o=e.name;n=o;if(L.call(e,"weight")){i=e.weight;if(i<=0){throw new Error(O(o))}}t=A(o);r=S(o)}return{path:t,id:r,weight:i,src:n}}function A(e){return a(e)?e:e.split(".")}function S(e){return a(e)?e.join("."):e}function j(e,t){var r=[];var n=false;var i=function(e,t,o){if(!p(e)){return}if(!t[o]){r.push(e)}else{var s=t[o];var c=e[s];if(!p(c)){return}if(o===t.length-1&&(h(c)||f(c)||l(c))){r.push(u(c))}else if(a(c)){n=true;for(var d=0,v=c.length;d<v;d+=1){i(c[d],t,o+1)}}else if(t.length){i(c,t,o+1)}}};i(e,h(t)?t.split("."):t,0);return n?r:r[0]}var C={includeMatches:false,findAllMatches:false,minMatchCharLength:1};var I={isCaseSensitive:false,includeScore:false,keys:[],shouldSort:true,sortFn:function(e,t){return e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1}};var P={location:0,threshold:.6,distance:100};var E={useExtendedSearch:false,getFn:j,ignoreLocation:false,ignoreFieldNorm:false,fieldNormWeight:1};var $=__assign(__assign(__assign(__assign({},I),C),P),E);var N=/[^ ]+/g;function R(e,t){if(e===void 0){e=1}if(t===void 0){t=3}var r=new Map;var n=Math.pow(10,t);return{get:function(t){var i=t.match(N).length;if(r.has(i)){return r.get(i)}var o=1/Math.pow(i,.5*e);var a=parseFloat(Math.round(o*n)/n);r.set(i,a);return a},clear:function(){r.clear()}}}var F=function(){function e(e){var t=e===void 0?{}:e,r=t.getFn,n=r===void 0?$.getFn:r,i=t.fieldNormWeight,o=i===void 0?$.fieldNormWeight:i;this.norm=R(o,3);this.getFn=n;this.isCreated=false;this.setIndexRecords()}e.prototype.setSources=function(e){if(e===void 0){e=[]}this.docs=e};e.prototype.setIndexRecords=function(e){if(e===void 0){e=[]}this.records=e};e.prototype.setKeys=function(e){var t=this;if(e===void 0){e=[]}this.keys=e;this._keysMap={};e.forEach((function(e,r){t._keysMap[e.id]=r}))};e.prototype.create=function(){var e=this;if(this.isCreated||!this.docs.length){return}this.isCreated=true;if(h(this.docs[0])){this.docs.forEach((function(t,r){e._addString(t,r)}))}else{this.docs.forEach((function(t,r){e._addObject(t,r)}))}this.norm.clear()};e.prototype.add=function(e){var t=this.size();if(h(e)){this._addString(e,t)}else{this._addObject(e,t)}};e.prototype.removeAt=function(e){this.records.splice(e,1);for(var t=e,r=this.size();t<r;t+=1){this.records[t].i-=1}};e.prototype.getValueForItemAtKeyId=function(e,t){return e[this._keysMap[t]]};e.prototype.size=function(){return this.records.length};e.prototype._addString=function(e,t){if(!p(e)||g(e)){return}var r={v:e,i:t,n:this.norm.get(e)};this.records.push(r)};e.prototype._addObject=function(e,t){var r=this;var n={i:t,$:{}};this.keys.forEach((function(t,i){var o=r.getFn(e,t.path);if(!p(o)){return}if(a(o)){var s=[];var c=[{nestedArrIndex:-1,value:o}];while(c.length){var u=c.pop(),f=u.nestedArrIndex,l=u.value;if(!p(l)){continue}if(h(l)&&!g(l)){var d={v:l,i:f,n:r.norm.get(l)};s.push(d)}else if(a(l)){l.forEach((function(e,t){c.push({nestedArrIndex:t,value:e})}))}else;}n.$[i]=s}else if(!g(o)){var d={v:o,n:r.norm.get(o)};n.$[i]=d}}));this.records.push(n)};e.prototype.toJSON=function(){return{keys:this.keys,records:this.records}};return e}();function W(e,t,r){var n=r===void 0?{}:r,i=n.getFn,o=i===void 0?$.getFn:i,a=n.fieldNormWeight,s=a===void 0?$.fieldNormWeight:a;var c=new F({getFn:o,fieldNormWeight:s});c.setKeys(e.map(k));c.setSources(t);c.create();return c}function T(e,t){var r=t===void 0?{}:t,n=r.getFn,i=n===void 0?$.getFn:n,o=r.fieldNormWeight,a=o===void 0?$.fieldNormWeight:o;var s=e.keys,c=e.records;var u=new F({getFn:i,fieldNormWeight:a});u.setKeys(s);u.setIndexRecords(c);return u}function z(e,t){var r=t===void 0?{}:t,n=r.errors,i=n===void 0?0:n,o=r.currentLocation,a=o===void 0?0:o,s=r.expectedLocation,c=s===void 0?0:s,u=r.distance,h=u===void 0?$.distance:u,f=r.ignoreLocation,l=f===void 0?$.ignoreLocation:f;var d=i/e.length;if(l){return d}var v=Math.abs(c-a);if(!h){return v?1:d}return d+v/h}function q(e,t){if(e===void 0){e=[]}if(t===void 0){t=$.minMatchCharLength}var r=[];var n=-1;var i=-1;var o=0;for(var a=e.length;o<a;o+=1){var s=e[o];if(s&&n===-1){n=o}else if(!s&&n!==-1){i=o-1;if(i-n+1>=t){r.push([n,i])}n=-1}}if(e[o-1]&&o-n>=t){r.push([n,o-1])}return r}var V=32;function H(e,t,r,n){var i=n===void 0?{}:n,o=i.location,a=o===void 0?$.location:o,s=i.distance,c=s===void 0?$.distance:s,u=i.threshold,h=u===void 0?$.threshold:u,f=i.findAllMatches,l=f===void 0?$.findAllMatches:f,d=i.minMatchCharLength,v=d===void 0?$.minMatchCharLength:d,p=i.includeMatches,g=p===void 0?$.includeMatches:p,y=i.ignoreLocation,m=y===void 0?$.ignoreLocation:y;if(t.length>V){throw new Error(x(V))}var b=t.length;var _=e.length;var M=Math.max(0,Math.min(a,_));var O=h;var L=M;var w=v>1||g;var k=w?Array(_):[];var A;while((A=e.indexOf(t,L))>-1){var S=z(t,{currentLocation:A,expectedLocation:M,distance:c,ignoreLocation:m});O=Math.min(S,O);L=A+b;if(w){var j=0;while(j<b){k[A+j]=1;j+=1}}}L=-1;var C=[];var I=1;var P=b+_;var E=1<<b-1;for(var j=0;j<b;j+=1){var N=0;var R=P;while(N<R){var F=z(t,{errors:j,currentLocation:M+R,expectedLocation:M,distance:c,ignoreLocation:m});if(F<=O){N=R}else{P=R}R=Math.floor((P-N)/2+N)}P=R;var W=Math.max(1,M-R+1);var T=l?_:Math.min(M+R,_)+b;var H=Array(T+2);H[T+1]=(1<<j)-1;for(var K=T;K>=W;K-=1){var D=K-1;var J=r[e.charAt(D)];if(w){k[D]=+!!J}H[K]=(H[K+1]<<1|1)&J;if(j){H[K]|=(C[K+1]|C[K])<<1|1|C[K+1]}if(H[K]&E){I=z(t,{errors:j,currentLocation:D,expectedLocation:M,distance:c,ignoreLocation:m});if(I<=O){O=I;L=D;if(L<=M){break}W=Math.max(1,2*M-L)}}}var S=z(t,{errors:j+1,currentLocation:M,expectedLocation:M,distance:c,ignoreLocation:m});if(S>O){break}C=H}var B={isMatch:L>=0,score:Math.max(.001,I)};if(w){var Q=q(k,v);if(!Q.length){B.isMatch=false}else if(g){B.indices=Q}}return B}function K(e){var t={};for(var r=0,n=e.length;r<n;r+=1){var i=e.charAt(r);t[i]=(t[i]||0)|1<<n-r-1}return t}var D=function(){function e(e,t){var r=this;var n=t===void 0?{}:t,i=n.location,o=i===void 0?$.location:i,a=n.threshold,s=a===void 0?$.threshold:a,c=n.distance,u=c===void 0?$.distance:c,h=n.includeMatches,f=h===void 0?$.includeMatches:h,l=n.findAllMatches,d=l===void 0?$.findAllMatches:l,v=n.minMatchCharLength,p=v===void 0?$.minMatchCharLength:v,g=n.isCaseSensitive,y=g===void 0?$.isCaseSensitive:g,m=n.ignoreLocation,b=m===void 0?$.ignoreLocation:m;this.options={location:o,threshold:s,distance:u,includeMatches:f,findAllMatches:d,minMatchCharLength:p,isCaseSensitive:y,ignoreLocation:b};this.pattern=y?e:e.toLowerCase();this.chunks=[];if(!this.pattern.length){return}var _=function(e,t){r.chunks.push({pattern:e,alphabet:K(e),startIndex:t})};var x=this.pattern.length;if(x>V){var M=0;var O=x%V;var L=x-O;while(M<L){_(this.pattern.substr(M,V),M);M+=V}if(O){var w=x-V;_(this.pattern.substr(w),w)}}else{_(this.pattern,0)}}e.prototype.searchIn=function(e){var t=this.options,r=t.isCaseSensitive,n=t.includeMatches;if(!r){e=e.toLowerCase()}if(this.pattern===e){var i={isMatch:true,score:0};if(n){i.indices=[[0,e.length-1]]}return i}var o=this.options,a=o.location,s=o.distance,c=o.threshold,u=o.findAllMatches,h=o.minMatchCharLength,f=o.ignoreLocation;var l=[];var d=0;var v=false;this.chunks.forEach((function(t){var r=t.pattern,i=t.alphabet,o=t.startIndex;var p=H(e,r,i,{location:a+o,distance:s,threshold:c,findAllMatches:u,minMatchCharLength:h,includeMatches:n,ignoreLocation:f}),g=p.isMatch,y=p.score,m=p.indices;if(g){v=true}d+=y;if(g&&m){l=__spreadArray(__spreadArray([],l),m)}}));var p={isMatch:v,score:v?d/this.chunks.length:1};if(v&&n){p.indices=l}return p};return e}();var J=function(){function e(e){this.pattern=e}e.isMultiMatch=function(e){return B(e,this.multiRegex)};e.isSingleMatch=function(e){return B(e,this.singleRegex)};e.prototype.search=function(){};return e}();function B(e,t){var r=e.match(t);return r?r[1]:null}var Q=function(e){__extends(t,e);function t(t){return e.call(this,t)||this}Object.defineProperty(t,"type",{get:function(){return"exact"},enumerable:false,configurable:true});Object.defineProperty(t,"multiRegex",{get:function(){return/^="(.*)"$/},enumerable:false,configurable:true});Object.defineProperty(t,"singleRegex",{get:function(){return/^=(.*)$/},enumerable:false,configurable:true});t.prototype.search=function(e){var t=e===this.pattern;return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}};return t}(J);var U=function(e){__extends(t,e);function t(t){return e.call(this,t)||this}Object.defineProperty(t,"type",{get:function(){return"inverse-exact"},enumerable:false,configurable:true});Object.defineProperty(t,"multiRegex",{get:function(){return/^!"(.*)"$/},enumerable:false,configurable:true});Object.defineProperty(t,"singleRegex",{get:function(){return/^!(.*)$/},enumerable:false,configurable:true});t.prototype.search=function(e){var t=e.indexOf(this.pattern);var r=t===-1;return{isMatch:r,score:r?0:1,indices:[0,e.length-1]}};return t}(J);var G=function(e){__extends(t,e);function t(t){return e.call(this,t)||this}Object.defineProperty(t,"type",{get:function(){return"prefix-exact"},enumerable:false,configurable:true});Object.defineProperty(t,"multiRegex",{get:function(){return/^\^"(.*)"$/},enumerable:false,configurable:true});Object.defineProperty(t,"singleRegex",{get:function(){return/^\^(.*)$/},enumerable:false,configurable:true});t.prototype.search=function(e){var t=e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}};return t}(J);var X=function(e){__extends(t,e);function t(t){return e.call(this,t)||this}Object.defineProperty(t,"type",{get:function(){return"inverse-prefix-exact"},enumerable:false,configurable:true});Object.defineProperty(t,"multiRegex",{get:function(){return/^!\^"(.*)"$/},enumerable:false,configurable:true});Object.defineProperty(t,"singleRegex",{get:function(){return/^!\^(.*)$/},enumerable:false,configurable:true});t.prototype.search=function(e){var t=!e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}};return t}(J);var Y=function(e){__extends(t,e);function t(t){return e.call(this,t)||this}Object.defineProperty(t,"type",{get:function(){return"suffix-exact"},enumerable:false,configurable:true});Object.defineProperty(t,"multiRegex",{get:function(){return/^"(.*)"\$$/},enumerable:false,configurable:true});Object.defineProperty(t,"singleRegex",{get:function(){return/^(.*)\$$/},enumerable:false,configurable:true});t.prototype.search=function(e){var t=e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[e.length-this.pattern.length,e.length-1]}};return t}(J);var Z=function(e){__extends(t,e);function t(t){return e.call(this,t)||this}Object.defineProperty(t,"type",{get:function(){return"inverse-suffix-exact"},enumerable:false,configurable:true});Object.defineProperty(t,"multiRegex",{get:function(){return/^!"(.*)"\$$/},enumerable:false,configurable:true});Object.defineProperty(t,"singleRegex",{get:function(){return/^!(.*)\$$/},enumerable:false,configurable:true});t.prototype.search=function(e){var t=!e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}};return t}(J);var ee=function(e){__extends(t,e);function t(t,r){var n=r===void 0?{}:r,i=n.location,o=i===void 0?$.location:i,a=n.threshold,s=a===void 0?$.threshold:a,c=n.distance,u=c===void 0?$.distance:c,h=n.includeMatches,f=h===void 0?$.includeMatches:h,l=n.findAllMatches,d=l===void 0?$.findAllMatches:l,v=n.minMatchCharLength,p=v===void 0?$.minMatchCharLength:v,g=n.isCaseSensitive,y=g===void 0?$.isCaseSensitive:g,m=n.ignoreLocation,b=m===void 0?$.ignoreLocation:m;var _=e.call(this,t)||this;_._bitapSearch=new D(t,{location:o,threshold:s,distance:u,includeMatches:f,findAllMatches:d,minMatchCharLength:p,isCaseSensitive:y,ignoreLocation:b});return _}Object.defineProperty(t,"type",{get:function(){return"fuzzy"},enumerable:false,configurable:true});Object.defineProperty(t,"multiRegex",{get:function(){return/^"(.*)"$/},enumerable:false,configurable:true});Object.defineProperty(t,"singleRegex",{get:function(){return/^(.*)$/},enumerable:false,configurable:true});t.prototype.search=function(e){return this._bitapSearch.searchIn(e)};return t}(J);var te=function(e){__extends(t,e);function t(t){return e.call(this,t)||this}Object.defineProperty(t,"type",{get:function(){return"include"},enumerable:false,configurable:true});Object.defineProperty(t,"multiRegex",{get:function(){return/^'"(.*)"$/},enumerable:false,configurable:true});Object.defineProperty(t,"singleRegex",{get:function(){return/^'(.*)$/},enumerable:false,configurable:true});t.prototype.search=function(e){var t=0;var r;var n=[];var i=this.pattern.length;while((r=e.indexOf(this.pattern,t))>-1){t=r+i;n.push([r,t-1])}var o=!!n.length;return{isMatch:o,score:o?0:1,indices:n}};return t}(J);var re=[Q,te,G,X,Z,Y,U,ee];var ne=re.length;var ie=/ +(?=([^\"]*\"[^\"]*\")*[^\"]*$)/;var oe="|";function ae(e,t){if(t===void 0){t={}}return e.split(oe).map((function(e){var r=e.trim().split(ie).filter((function(e){return e&&!!e.trim()}));var n=[];for(var i=0,o=r.length;i<o;i+=1){var a=r[i];var s=false;var c=-1;while(!s&&++c<ne){var u=re[c];var h=u.isMultiMatch(a);if(h){n.push(new u(h,t));s=true}}if(s){continue}c=-1;while(++c<ne){var u=re[c];var h=u.isSingleMatch(a);if(h){n.push(new u(h,t));break}}}return n}))}var se=new Set([ee.type,te.type]);var ce=function(){function e(e,t){var r=t===void 0?{}:t,n=r.isCaseSensitive,i=n===void 0?$.isCaseSensitive:n,o=r.includeMatches,a=o===void 0?$.includeMatches:o,s=r.minMatchCharLength,c=s===void 0?$.minMatchCharLength:s,u=r.ignoreLocation,h=u===void 0?$.ignoreLocation:u,f=r.findAllMatches,l=f===void 0?$.findAllMatches:f,d=r.location,v=d===void 0?$.location:d,p=r.threshold,g=p===void 0?$.threshold:p,y=r.distance,m=y===void 0?$.distance:y;this.query=null;this.options={isCaseSensitive:i,includeMatches:a,minMatchCharLength:c,findAllMatches:l,ignoreLocation:h,location:v,threshold:g,distance:m};this.pattern=i?e:e.toLowerCase();this.query=ae(this.pattern,this.options)}e.condition=function(e,t){return t.useExtendedSearch};e.prototype.searchIn=function(e){var t=this.query;if(!t){return{isMatch:false,score:1}}var r=this.options,n=r.includeMatches,i=r.isCaseSensitive;e=i?e:e.toLowerCase();var o=0;var a=[];var s=0;for(var c=0,u=t.length;c<u;c+=1){var h=t[c];a.length=0;o=0;for(var f=0,l=h.length;f<l;f+=1){var d=h[f];var v=d.search(e),p=v.isMatch,g=v.indices,y=v.score;if(p){o+=1;s+=y;if(n){var m=d.constructor.type;if(se.has(m)){a=__spreadArray(__spreadArray([],a),g)}else{a.push(g)}}}else{s=0;o=0;a.length=0;break}}if(o){var b={isMatch:true,score:s/o};if(n){b.indices=a}return b}}return{isMatch:false,score:1}};return e}();var ue=[];function he(){var e=[];for(var t=0;t<arguments.length;t++){e[t]=arguments[t]}ue.push.apply(ue,e)}function fe(e,t){for(var r=0,n=ue.length;r<n;r+=1){var i=ue[r];if(i.condition(e,t)){return new i(e,t)}}return new D(e,t)}var le={AND:"$and",OR:"$or"};var de={PATH:"$path",PATTERN:"$val"};var ve=function(e){return!!(e[le.AND]||e[le.OR])};var pe=function(e){return!!e[de.PATH]};var ge=function(e){return!a(e)&&d(e)&&!ve(e)};var ye=function(e){var t;return t={},t[le.AND]=Object.keys(e).map((function(t){var r;return r={},r[t]=e[t],r})),t};function me(e,t,r){var n=r===void 0?{}:r,i=n.auto,o=i===void 0?true:i;var s=function(e){var r=Object.keys(e);var n=pe(e);if(!n&&r.length>1&&!ve(e)){return s(ye(e))}if(ge(e)){var i=n?e[de.PATH]:r[0];var c=n?e[de.PATTERN]:e[i];if(!h(c)){throw new Error(_(i))}var u={keyId:S(i),pattern:c};if(o){u.searcher=fe(c,t)}return u}var f={children:[],operator:r[0]};r.forEach((function(t){var r=e[t];if(a(r)){r.forEach((function(e){f.children.push(s(e))}))}}));return f};if(!ve(e)){e=ye(e)}return s(e)}function be(e,t){var r=t.ignoreFieldNorm,n=r===void 0?$.ignoreFieldNorm:r;e.forEach((function(e){var t=1;e.matches.forEach((function(e){var r=e.key,i=e.norm,o=e.score;var a=r?r.weight:null;t*=Math.pow(o===0&&a?Number.EPSILON:o,(a||1)*(n?1:i))}));e.score=t}))}function _e(e,t){var r=e.matches;t.matches=[];if(!p(r)){return}r.forEach((function(e){if(!p(e.indices)||!e.indices.length){return}var r=e.indices,n=e.value;var i={indices:r,value:n};if(e.key){i.key=e.key.src}if(e.idx>-1){i.refIndex=e.idx}t.matches.push(i)}))}function xe(e,t){t.score=e.score}function Me(e,t,r){var n=r===void 0?{}:r,i=n.includeMatches,o=i===void 0?$.includeMatches:i,a=n.includeScore,s=a===void 0?$.includeScore:a;var c=[];if(o)c.push(_e);if(s)c.push(xe);return e.map((function(e){var r=e.idx;var n={item:t[r],refIndex:r};if(c.length){c.forEach((function(t){t(e,n)}))}return n}))}var Oe=function(){function e(e,t,r){if(t===void 0){t={}}this.options=__assign(__assign({},$),t);if(this.options.useExtendedSearch&&!true){throw new Error(m)}this._keyStore=new w(this.options.keys);this.setCollection(e,r)}e.prototype.setCollection=function(e,t){this._docs=e;if(t&&!(t instanceof F)){throw new Error(b)}this._myIndex=t||W(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})};e.prototype.add=function(e){if(!p(e)){return}this._docs.push(e);this._myIndex.add(e)};e.prototype.remove=function(e){if(e===void 0){e=function(){return false}}var t=[];for(var r=0,n=this._docs.length;r<n;r+=1){var i=this._docs[r];if(e(i,r)){this.removeAt(r);r-=1;n-=1;t.push(i)}}return t};e.prototype.removeAt=function(e){this._docs.splice(e,1);this._myIndex.removeAt(e)};e.prototype.getIndex=function(){return this._myIndex};e.prototype.search=function(e,t){var r=t===void 0?{}:t,n=r.limit,i=n===void 0?-1:n;var o=this.options,a=o.includeMatches,s=o.includeScore,c=o.shouldSort,u=o.sortFn,l=o.ignoreFieldNorm;var d=h(e)?h(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);be(d,{ignoreFieldNorm:l});if(c){d.sort(u)}if(f(i)&&i>-1){d=d.slice(0,i)}return Me(d,this._docs,{includeMatches:a,includeScore:s})};e.prototype._searchStringList=function(e){var t=fe(e,this.options);var r=this._myIndex.records;var n=[];r.forEach((function(e){var r=e.v,i=e.i,o=e.n;if(!p(r)){return}var a=t.searchIn(r),s=a.isMatch,c=a.score,u=a.indices;if(s){n.push({item:r,idx:i,matches:[{score:c,value:r,norm:o,indices:u}]})}}));return n};e.prototype._searchLogical=function(e){var t=this;var r=me(e,this.options);var n=function(e,r,i){if(!e.children){var o=e.keyId,a=e.searcher;var s=t._findMatches({key:t._keyStore.get(o),value:t._myIndex.getValueForItemAtKeyId(r,o),searcher:a});if(s&&s.length){return[{idx:i,item:r,matches:s}]}return[]}var c=[];for(var u=0,h=e.children.length;u<h;u+=1){var f=e.children[u];var l=n(f,r,i);if(l.length){c.push.apply(c,l)}else if(e.operator===le.AND){return[]}}return c};var i=this._myIndex.records;var o={};var a=[];i.forEach((function(e){var t=e.$,i=e.i;if(p(t)){var s=n(r,t,i);if(s.length){if(!o[i]){o[i]={idx:i,item:t,matches:[]};a.push(o[i])}s.forEach((function(e){var t;var r=e.matches;(t=o[i].matches).push.apply(t,r)}))}}}));return a};e.prototype._searchObjectList=function(e){var t=this;var r=fe(e,this.options);var n=this._myIndex,i=n.keys,o=n.records;var a=[];o.forEach((function(e){var n=e.$,o=e.i;if(!p(n)){return}var s=[];i.forEach((function(e,i){s.push.apply(s,t._findMatches({key:e,value:n[i],searcher:r}))}));if(s.length){a.push({idx:o,item:n,matches:s})}}));return a};e.prototype._findMatches=function(e){var t=e.key,r=e.value,n=e.searcher;if(!p(r)){return[]}var i=[];if(a(r)){r.forEach((function(e){var r=e.v,o=e.i,a=e.n;if(!p(r)){return}var s=n.searchIn(r),c=s.isMatch,u=s.score,h=s.indices;if(c){i.push({score:u,key:t,value:r,idx:o,norm:a,indices:h})}}))}else{var o=r.v,s=r.n;var c=n.searchIn(o),u=c.isMatch,h=c.score,f=c.indices;if(u){i.push({score:h,key:t,value:o,norm:s,indices:f})}}return i};return e}();Oe.version="6.5.3";Oe.createIndex=W;Oe.parseIndex=T;Oe.config=$;{Oe.parseQuery=me}{he(ce)}var Le=".sc-road-select-filter-h{--margin-top:3rem;position:relative;display:block}.select-filter-list.sc-road-select-filter{position:absolute;top:var(--margin-top);z-index:1;width:100%;max-height:16rem;padding:0.5rem 0;margin:0;overflow-y:scroll;font-family:var(--road-font, sans-serif);font-size:0.875rem;color:var(--road-grey-900);list-style-type:none;background:var(--road-grey-000);border-radius:0 0 0.25rem 0.25rem;-webkit-box-shadow:0 3px 6px rgba(0, 0, 0, 0.16);box-shadow:0 3px 6px rgba(0, 0, 0, 0.16)}.select-filter-item.sc-road-select-filter{padding:0.75rem 1rem;cursor:pointer}.select-filter-item.sc-road-select-filter:hover,.select-filter-item.highlight.sc-road-select-filter{color:var(--road-primary-contrast);background:var(--road-primary-500)}";var we=e("road_select_filter",function(){function e(e){var n=this;t(this,e);this.roadselected=r(this,"roadselected",7);this.roadSelected=r(this,"roadSelected",7);this.isOpen=false;this.currentValue="";this.options=[];this.parameters={keys:["value","label"],threshold:.3,ignoreLocation:true};this.isActive=false;this.onlySelect=true;this.onClick=function(e,t){n.el.querySelector("road-input").value=t;n.isOpen=false;n.roadselected.emit({value:e.toString(),label:t});n.roadSelected.emit({value:e.toString(),label:t})}}e.prototype.handleFocus=function(){this.isOpen=true;this.isActive=true};e.prototype.handleBlur=function(){this.isOpen=false;this.isActive=false};e.prototype.handleChange=function(e){this.currentValue=e.detail.value.toLowerCase()};e.prototype.onClickOutside=function(e){if(this.isOpen&&!this.el.contains(e.target)){this.isOpen=false;this.isActive=false;var t=this.el.querySelector("road-input").value;if(this.onlySelect&&!this.options.some((function(e){return e["label"]===t}))){this.el.querySelector("road-input").value=""}}};e.prototype.render=function(){var e=this;var t=new Oe(this.options,this.parameters);var r=this.currentValue===""?this.options.map((function(e,t){return{item:e,score:1,refIndex:t}})):t.search(this.currentValue);var o=this.isActive?"true":"false";return n(i,{"is-active":o},n("slot",null),this.isOpen&&n("ul",{class:"select-filter-list",role:"listbox"},r.map((function(t){return n("li",{class:"select-filter-item",role:"option",onClick:function(){return e.onClick(t.item.value,t.item.label.replace(/(<([^>]+)>)/gi,""))},innerHTML:t.item.label})}))))};Object.defineProperty(e.prototype,"el",{get:function(){return o(this)},enumerable:false,configurable:true});return e}());we.style=Le}}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./p-f33e4ac5.system.js","./p-8e5e066c.system.js"],(function(r){"use strict";var e,a,n,o,t,i;return{setters:[function(r){e=r.r;a=r.c;n=r.h;o=r.e},function(r){t=r.h;i=r.b}],execute:function(){var s='.sc-road-range-h{display:block}.form-group.sc-road-range{width:100%}.form-range.sc-road-range{position:relative;display:block;width:100%;margin-bottom:6px}.form-range-input.sc-road-range{position:relative;z-index:1;width:100%;height:0.5rem;background:transparent;outline:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}.form-range.sc-road-range>output.sc-road-range::after{display:block;font-size:0.875rem;text-align:right;content:counter(variable);counter-reset:variable var(--value)}.form-range-progress.sc-road-range{position:relative;z-index:0;display:block;width:100%;margin-top:-0.875rem}.form-range-input.sc-road-range::-webkit-slider-runnable-track{height:0.5rem;border:0;-webkit-appearance:none;appearance:none}.form-range-input.sc-road-range::-moz-range-track{height:0.5rem;border:0;-moz-appearance:none;appearance:none}.form-range-progress.sc-road-range::before{display:block;height:0.5rem;content:"";background-color:var(--road-grey-200);border:0;border-radius:1.125rem}.form-range-progress.sc-road-range::after{position:absolute;top:0;right:0;left:0;display:block;width:calc((var(--value) * 100%) / var(--max));height:0.5rem;content:"";background:var(--road-primary-500);border-radius:1.125rem}.form-range-input.sc-road-range::-webkit-slider-thumb{position:relative;z-index:1;width:1.625rem;height:1.625rem;margin-top:-0.625rem;cursor:-webkit-grab;cursor:grab;background:var(--road-grey-000);border:none;border-radius:1.625rem;-webkit-box-shadow:0 0.1875rem 0.375rem rgba(0, 0, 0, 0.24);box-shadow:0 0.1875rem 0.375rem rgba(0, 0, 0, 0.24);-webkit-appearance:none;appearance:none}.form-range-input.sc-road-range::-moz-range-thumb{position:relative;z-index:1;box-sizing:border-box;width:1.625rem;height:1.625rem;margin-top:-0.625rem;cursor:grab;background:var(--road-grey-000);border:none;border-radius:1.625rem;box-shadow:0 0.1875rem 0.375rem rgba(0, 0, 0, 0.24);-moz-appearance:none;appearance:none}.focus-visible.sc-road-range-h .form-range-input.sc-road-range::-webkit-slider-thumb,.sc-road-range-h:active .form-range-input.sc-road-range::-webkit-slider-thumb{background:var(--road-primary-700);border:0.5rem solid var(--road-grey-000)}.focus-visible.sc-road-range-h .form-range-input.sc-road-range::-moz-range-thumb,.sc-road-range-h:active .form-range-input.sc-road-range::-moz-range-thumb{background:var(--road-primary-700);border:0.5rem solid var(--road-grey-000)}';var u=r("road_range",function(){function r(r){var n=this;e(this,r);this.roadchange=a(this,"roadchange",7);this.roadChange=a(this,"roadChange",7);this.rangeId="road-range-"+g++;this.value="";this.showValue=false;this.showTick=false;this.onInput=function(r){var e=r.target;if(e){n.value=e.value||""}if(n.value!==null&&n.value!==undefined){n.el.style.setProperty("--value",""+n.value)}}}r.prototype.valueChanged=function(){this.roadchange.emit({value:this.value==null?this.value:this.value.toString()});this.roadChange.emit({value:this.value==null?this.value:this.value.toString()})};r.prototype.getValue=function(){return typeof this.value==="number"?this.value.toString():(this.value||"").toString()};r.prototype.render=function(){var r=this.getValue();return n("div",{class:"form-group d-flex align-items-end"},this.showTick&&n("road-icon",{icon:i,class:"mr-8",size:"sm"}),n("div",{class:"form-range",style:{"--min:":this.min,"--max":this.max,"--value":r}},this.showValue&&n("output",null),n("input",{type:"range",class:"form-range-input",id:this.rangeId,min:this.min,max:this.max,value:r,onInput:this.onInput}),n("div",{class:"form-range-progress"})),this.showTick&&n("road-icon",{icon:t,class:"ml-8",size:"sm"}))};Object.defineProperty(r.prototype,"el",{get:function(){return o(this)},enumerable:false,configurable:true});Object.defineProperty(r,"watchers",{get:function(){return{value:["valueChanged"]}},enumerable:false,configurable:true});return r}());var g=0;u.style=s}}}));
|