@theroutingcompany/components 0.0.115 → 0.0.116
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.
|
@@ -1989,7 +1989,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
1989
1989
|
:hover {
|
|
1990
1990
|
background-color: ${p.color_gray_opacity_5};
|
|
1991
1991
|
}
|
|
1992
|
-
`,w1=e=>{var r,o,a;const t=((r=e.formatted_address)==null?void 0:r.length)&&((o=e.name)==null?void 0:o.length)&&!e.formatted_address.startsWith(e.name),n=(a=e.formatted_address)==null?void 0:a.length;return t&&e.name&&e.formatted_address?`${e.name}, ${e.formatted_address}`:n?e.formatted_address:""},RM=["name","formatted_address","geometry.location"],KM=({googleApiKey:e,placeholder:t="Enter an address",options:n={},libraries:r=["places"],googleMapsScriptBaseUrl:o,debounce:a=300,defaultValue:i,value:l,onChange:s,disabled:u,isInvalid:d,label:f,labelId:m="location-input-label",inputId:g="location-input",hideLabel:h=!1,boldLabel:b=!1,autoFocus:v,extraMenuActions:_=[],showExtraActionsWithResults:y=!1,...w})=>{const[D,T]=c.useState(i??l??""),P=c.createRef(),M=c.useRef(null),$=ua({}),{overlayProps:A}=pv({},P),{fields:z=RM}=n;c.useEffect(()=>{l&&T(l)},[l]);const{placesService:x,placePredictions:K,getPlacePredictions:O,isPlacePredictionsLoading:I}=kM({apiKey:e,libraries:r,googleMapsScriptBaseUrl:o,debounce:a,options:{input:D,...n}}),[j,C]=c.useState(-1),q=c.useCallback(X=>{X&&(x==null||x.getDetails({placeId:X.place_id??"",fields:z},(Z,ae)=>{if(Z&&ae===google.maps.places.PlacesServiceStatus.OK){const ee=w1(Z);ee&&T(ee),s==null||s(Z),$.close(),C(-1)}else console.error("Error getting place details.",ae,Z)}))},[s,z,$,x]);oi(()=>{document.activeElement===P.current&&$.close()});const G=X=>{const Z=X.target.value;Z.length===0?(T(Z),s==null||s(null),C(-1)):(O({input:Z,locationRestriction:n.bounds}),T(Z),C(-1))},B=X=>{X.target.select(),$.isOpen||$.open()},N=()=>{$.isOpen&&($.close(),C(-1))},V={extra:_.length&&(y||!I&&K.length===0||D.length===0),predictions:D.length>0&&!I&&K.length>0},J=(X,Z)=>{const ae=(V.predictions?K.length:0)+(V.extra?_.length:0);if(ae===0)return;let ee=j;Z==="down"&&(ee=(j+1)%ae),Z==="up"&&(ee=(j-1+ae)%ae),C(ee)},U=X=>{var Z;X.key==="Tab"?j!==-1&&(V.predictions&&j<K.length?q(K[j]):V.extra&&((Z=_[j-(V.predictions?K.length:0)])==null||Z.onClick(),$.close(),C(-1))):X.key==="Enter"?X.preventDefault():X.key==="ArrowDown"?($.open(),J(X,"down")):X.key==="ArrowUp"?($.open(),J(X,"up")):(C(-1),$.isOpen||$.open())},H=X=>{var Z;X.key==="Enter"&&j!==-1&&(V.predictions&&j<K.length?q(K[j]):V.extra&&((Z=_[j-(V.predictions?K.length:0)])==null||Z.onClick(),$.close(),C(-1)))};return Q(Et,{children:[f?Q(Re,{id:m,htmlFor:g,srOnly:h,mb:p.spacing_150,bold:b,children:[f,w.tooltipContent?E(Qe,{children:w.tooltipContent}):null]}):null,E(Nt,{height:p.spacing_600,type:"text",autoComplete:"off",autoFocus:v,"data-id":w["data-id"]??g,id:g,disabled:u,"data-state":d?"invalid":void 0,value:D,placeholder:t,ref:P,onChange:G,onFocus:B,onBlur:N,onKeyDown:U,onKeyUp:H,onMouseUp:X=>X.preventDefault()}),w.errorMessage?E(St,{children:w.errorMessage}):null,$.isOpen&&(V.extra||V.predictions)?E(Gr,{className:"google-input-popover",targetRef:P,popoverRef:M,state:$,...A,isTargetWidth:!0,placement:"bottom start",isNonModal:!0,children:Q(ge,{onMouseDown:X=>X.preventDefault(),children:[V.predictions?K.map((X,Z)=>E(x1,{p:p.spacing_200,truncate:!0,onClick:()=>q(X),style:{cursor:"pointer"},backgroundColor:j===Z?p.color_gray_opacity_5:"transparent",children:X.description},X.place_id)):null,I?E(tt,{as:"span",italic:!0,p:p.spacing_200,style:{cursor:"pointer"},children:"Loading..."}):null,!V.extra&&!V.predictions?E(tt,{as:"span",p:p.spacing_200,style:{cursor:"pointer"},children:"No results found"}):null,V.extra?E("hr",{style:{margin:0}}):null,V.extra?_.map((X,Z)=>E(x1,{p:p.spacing_200,truncate:!0,onClick:()=>{X.onClick(),$.close()},style:{cursor:"pointer"},backgroundColor:(V.predictions?j===Z+K.length:j===Z)?p.color_gray_opacity_5:"transparent",children:X.label},X.id)):null]})}):null]})};var E1={};E1={Empty:"فارغ"};var S1={};S1={Empty:"Изпразни"};var D1={};D1={Empty:"Prázdné"};var P1={};P1={Empty:"Tom"};var T1={};T1={Empty:"Leer"};var C1={};C1={Empty:"Άδειο"};var k1={};k1={Empty:"Empty"};var A1={};A1={Empty:"Vacío"};var I1={};I1={Empty:"Tühjenda"};var O1={};O1={Empty:"Tyhjä"};var M1={};M1={Empty:"Vide"};var F1={};F1={Empty:"ריק"};var L1={};L1={Empty:"Prazno"};var N1={};N1={Empty:"Üres"};var z1={};z1={Empty:"Vuoto"};var R1={};R1={Empty:"空"};var K1={};K1={Empty:"비어 있음"};var V1={};V1={Empty:"Tuščias"};var B1={};B1={Empty:"Tukšs"};var j1={};j1={Empty:"Tom"};var U1={};U1={Empty:"Leeg"};var W1={};W1={Empty:"Pusty"};var H1={};H1={Empty:"Vazio"};var G1={};G1={Empty:"Vazio"};var Y1={};Y1={Empty:"Gol"};var q1={};q1={Empty:"Не заполнено"};var X1={};X1={Empty:"Prázdne"};var J1={};J1={Empty:"Prazen"};var Z1={};Z1={Empty:"Prazno"};var Q1={};Q1={Empty:"Tomt"};var ex={};ex={Empty:"Boş"};var tx={};tx={Empty:"Пусто"};var nx={};nx={Empty:"空"};var rx={};rx={Empty:"空白"};function VM(e){return e&&e.__esModule?e.default:e}var ox={};ox={"ar-AE":E1,"bg-BG":S1,"cs-CZ":D1,"da-DK":P1,"de-DE":T1,"el-GR":C1,"en-US":k1,"es-ES":A1,"et-EE":I1,"fi-FI":O1,"fr-FR":M1,"he-IL":F1,"hr-HR":L1,"hu-HU":N1,"it-IT":z1,"ja-JP":R1,"ko-KR":K1,"lt-LT":V1,"lv-LV":B1,"nb-NO":j1,"nl-NL":U1,"pl-PL":W1,"pt-BR":H1,"pt-PT":G1,"ro-RO":Y1,"ru-RU":q1,"sk-SK":X1,"sl-SI":J1,"sr-SP":Z1,"sv-SE":Q1,"tr-TR":ex,"uk-UA":tx,"zh-CN":nx,"zh-TW":rx};function BM(e){const t=c.useRef();let{value:n,textValue:r,minValue:o,maxValue:a,isDisabled:i,isReadOnly:l,isRequired:s,onIncrement:u,onIncrementPage:d,onDecrement:f,onDecrementPage:m,onDecrementToMin:g,onIncrementToMax:h}=e;const b=_t(VM(ox),"@react-aria/spinbutton"),v=()=>clearTimeout(t.current);c.useEffect(()=>()=>v(),[]);let _=x=>{if(!(x.ctrlKey||x.metaKey||x.shiftKey||x.altKey||l))switch(x.key){case"PageUp":if(d){x.preventDefault(),d==null||d();break}case"ArrowUp":case"Up":u&&(x.preventDefault(),u==null||u());break;case"PageDown":if(m){x.preventDefault(),m==null||m();break}case"ArrowDown":case"Down":f&&(x.preventDefault(),f==null||f());break;case"Home":g&&(x.preventDefault(),g==null||g());break;case"End":h&&(x.preventDefault(),h==null||h());break}},y=c.useRef(!1),w=()=>{y.current=!0},D=()=>{y.current=!1},T=r===""?b.format("Empty"):(r||`${n}`).replace("-","−");c.useEffect(()=>{y.current&&(z4("assertive"),Mr(T,"assertive"))},[T]);const P=ke(x=>{v(),u==null||u(),t.current=window.setTimeout(()=>{(a===void 0||isNaN(a)||n===void 0||isNaN(n)||n<a)&&P(60)},x)}),M=ke(x=>{v(),f==null||f(),t.current=window.setTimeout(()=>{(o===void 0||isNaN(o)||n===void 0||isNaN(n)||n>o)&&M(60)},x)});let $=x=>{x.preventDefault()},{addGlobalListener:A,removeAllGlobalListeners:z}=Pc();return{spinButtonProps:{role:"spinbutton","aria-valuenow":n!==void 0&&!isNaN(n)?n:void 0,"aria-valuetext":T,"aria-valuemin":o,"aria-valuemax":a,"aria-disabled":i||void 0,"aria-readonly":l||void 0,"aria-required":s||void 0,onKeyDown:_,onFocus:w,onBlur:D},incrementButtonProps:{onPressStart:()=>{P(400),A(window,"contextmenu",$)},onPressEnd:()=>{v(),z()},onFocus:w,onBlur:D},decrementButtonProps:{onPressStart:()=>{M(400),A(window,"contextmenu",$)},onPressEnd:()=>{v(),z()},onFocus:w,onBlur:D}}}function jM(e){return e&&e.__esModule?e.default:e}var ax={},ix={};ix={decrease:e=>`خفض ${e.fieldLabel}`,increase:e=>`زيادة ${e.fieldLabel}`,numberField:"حقل رقمي"};var lx={};lx={decrease:e=>`Намаляване ${e.fieldLabel}`,increase:e=>`Усилване ${e.fieldLabel}`,numberField:"Номер на полето"};var sx={};sx={decrease:e=>`Snížit ${e.fieldLabel}`,increase:e=>`Zvýšit ${e.fieldLabel}`,numberField:"Číselné pole"};var cx={};cx={decrease:e=>`Reducer ${e.fieldLabel}`,increase:e=>`Øg ${e.fieldLabel}`,numberField:"Talfelt"};var ux={};ux={decrease:e=>`${e.fieldLabel} verringern`,increase:e=>`${e.fieldLabel} erhöhen`,numberField:"Nummernfeld"};var dx={};dx={decrease:e=>`Μείωση ${e.fieldLabel}`,increase:e=>`Αύξηση ${e.fieldLabel}`,numberField:"Πεδίο αριθμού"};var fx={};fx={decrease:e=>`Decrease ${e.fieldLabel}`,increase:e=>`Increase ${e.fieldLabel}`,numberField:"Number field"};var px={};px={decrease:e=>`Reducir ${e.fieldLabel}`,increase:e=>`Aumentar ${e.fieldLabel}`,numberField:"Campo de número"};var mx={};mx={decrease:e=>`Vähenda ${e.fieldLabel}`,increase:e=>`Suurenda ${e.fieldLabel}`,numberField:"Numbri väli"};var gx={};gx={decrease:e=>`Vähennä ${e.fieldLabel}`,increase:e=>`Lisää ${e.fieldLabel}`,numberField:"Numerokenttä"};var hx={};hx={decrease:e=>`Diminuer ${e.fieldLabel}`,increase:e=>`Augmenter ${e.fieldLabel}`,numberField:"Champ de nombre"};var bx={};bx={decrease:e=>`הקטן ${e.fieldLabel}`,increase:e=>`הגדל ${e.fieldLabel}`,numberField:"שדה מספר"};var vx={};vx={decrease:e=>`Smanji ${e.fieldLabel}`,increase:e=>`Povećaj ${e.fieldLabel}`,numberField:"Polje broja"};var yx={};yx={decrease:e=>`${e.fieldLabel} csökkentése`,increase:e=>`${e.fieldLabel} növelése`,numberField:"Számmező"};var $x={};$x={decrease:e=>`Riduci ${e.fieldLabel}`,increase:e=>`Aumenta ${e.fieldLabel}`,numberField:"Campo numero"};var _x={};_x={decrease:e=>`${e.fieldLabel}を縮小`,increase:e=>`${e.fieldLabel}を拡大`,numberField:"数値フィールド"};var xx={};xx={decrease:e=>`${e.fieldLabel} 감소`,increase:e=>`${e.fieldLabel} 증가`,numberField:"번호 필드"};var wx={};wx={decrease:e=>`Sumažinti ${e.fieldLabel}`,increase:e=>`Padidinti ${e.fieldLabel}`,numberField:"Numerio laukas"};var Ex={};Ex={decrease:e=>`Samazināšana ${e.fieldLabel}`,increase:e=>`Palielināšana ${e.fieldLabel}`,numberField:"Skaitļu lauks"};var Sx={};Sx={decrease:e=>`Reduser ${e.fieldLabel}`,increase:e=>`Øk ${e.fieldLabel}`,numberField:"Tallfelt"};var Dx={};Dx={decrease:e=>`${e.fieldLabel} verlagen`,increase:e=>`${e.fieldLabel} verhogen`,numberField:"Getalveld"};var Px={};Px={decrease:e=>`Zmniejsz ${e.fieldLabel}`,increase:e=>`Zwiększ ${e.fieldLabel}`,numberField:"Pole numeru"};var Tx={};Tx={decrease:e=>`Diminuir ${e.fieldLabel}`,increase:e=>`Aumentar ${e.fieldLabel}`,numberField:"Campo de número"};var Cx={};Cx={decrease:e=>`Diminuir ${e.fieldLabel}`,increase:e=>`Aumentar ${e.fieldLabel}`,numberField:"Campo numérico"};var kx={};kx={decrease:e=>`Scădere ${e.fieldLabel}`,increase:e=>`Creștere ${e.fieldLabel}`,numberField:"Câmp numeric"};var Ax={};Ax={decrease:e=>`Уменьшение ${e.fieldLabel}`,increase:e=>`Увеличение ${e.fieldLabel}`,numberField:"Числовое поле"};var Ix={};Ix={decrease:e=>`Znížiť ${e.fieldLabel}`,increase:e=>`Zvýšiť ${e.fieldLabel}`,numberField:"Číselné pole"};var Ox={};Ox={decrease:e=>`Upadati ${e.fieldLabel}`,increase:e=>`Povečajte ${e.fieldLabel}`,numberField:"Številčno polje"};var Mx={};Mx={decrease:e=>`Decrease ${e.fieldLabel}`,increase:e=>`Increase ${e.fieldLabel}`,numberField:"Number field"};var Fx={};Fx={decrease:e=>`Minska ${e.fieldLabel}`,increase:e=>`Öka ${e.fieldLabel}`,numberField:"Nummerfält"};var Lx={};Lx={decrease:e=>`${e.fieldLabel} azalt`,increase:e=>`${e.fieldLabel} arttır`,numberField:"Sayı alanı"};var Nx={};Nx={decrease:e=>`Зменшити ${e.fieldLabel}`,increase:e=>`Збільшити ${e.fieldLabel}`,numberField:"Поле номера"};var zx={};zx={decrease:e=>`降低 ${e.fieldLabel}`,increase:e=>`提高 ${e.fieldLabel}`,numberField:"数字字段"};var Rx={};Rx={decrease:e=>`縮小 ${e.fieldLabel}`,increase:e=>`放大 ${e.fieldLabel}`,numberField:"數字欄位"},ax={"ar-AE":ix,"bg-BG":lx,"cs-CZ":sx,"da-DK":cx,"de-DE":ux,"el-GR":dx,"en-US":fx,"es-ES":px,"et-EE":mx,"fi-FI":gx,"fr-FR":hx,"he-IL":bx,"hr-HR":vx,"hu-HU":yx,"it-IT":$x,"ja-JP":_x,"ko-KR":xx,"lt-LT":wx,"lv-LV":Ex,"nb-NO":Sx,"nl-NL":Dx,"pl-PL":Px,"pt-BR":Tx,"pt-PT":Cx,"ro-RO":kx,"ru-RU":Ax,"sk-SK":Ix,"sl-SI":Ox,"sr-SP":Mx,"sv-SE":Fx,"tr-TR":Lx,"uk-UA":Nx,"zh-CN":zx,"zh-TW":Rx};function UM(e,t,n){let{id:r,decrementAriaLabel:o,incrementAriaLabel:a,isDisabled:i,isReadOnly:l,isRequired:s,minValue:u,maxValue:d,autoFocus:f,validationState:m,label:g,formatOptions:h,onBlur:b=()=>{},onFocus:v,onFocusChange:_,onKeyDown:y,onKeyUp:w,description:D,errorMessage:T,...P}=e,{increment:M,incrementToMax:$,decrement:A,decrementToMin:z,numberValue:x,inputValue:K,commit:O}=t;const I=_t(jM(ax));let j=ct(r),{focusProps:C}=zc({onBlur:()=>{O()}}),q=Cb(h),G=c.useMemo(()=>q.resolvedOptions(),[q]),B=Cb({...h,currencySign:void 0}),N=c.useMemo(()=>isNaN(x)?"":B.format(x),[B,x]),{spinButtonProps:V,incrementButtonProps:J,decrementButtonProps:U}=BM({isDisabled:i,isReadOnly:l,isRequired:s,maxValue:d,minValue:u,onIncrement:M,onIncrementToMax:$,onDecrement:A,onDecrementToMin:z,value:x,textValue:N}),[H,X]=c.useState(!1),{focusWithinProps:Z}=Fo({isDisabled:i,onFocusWithinChange:X}),ae=c.useCallback(st=>{Math.abs(st.deltaY)<=Math.abs(st.deltaX)||(st.deltaY>0?M():st.deltaY<0&&A())},[A,M]);hC({onScroll:ae,isDisabled:i||l||!H},n);let re=G.maximumFractionDigits>0,se=isNaN(t.minValue)||t.minValue<0,_e="numeric";Dg()?se?_e="text":re&&(_e="decimal"):Sc()&&(se?_e="numeric":re&&(_e="decimal"));let le=st=>{t.validate(st)&&t.setInputValue(st)},pe=$n(e),{labelProps:Se,inputProps:Fn,descriptionProps:Ln,errorMessageProps:io}=U9({...P,...pe,label:g,autoFocus:f,isDisabled:i,isReadOnly:l,isRequired:s,validationState:m,value:K,defaultValue:void 0,autoComplete:"off","aria-label":e["aria-label"]||null,"aria-labelledby":e["aria-labelledby"]||null,id:j,type:"text",inputMode:_e,onChange:le,onBlur:b,onFocus:v,onFocusChange:_,onKeyDown:y,onKeyUp:w,description:D,errorMessage:T},t,n),lo=fe(V,C,Fn,{role:null,"aria-roledescription":Co()?null:I.format("numberField"),"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null,autoCorrect:"off",spellCheck:"false"}),cn=st=>{document.activeElement!==n.current&&(st.pointerType==="mouse"?n.current.focus():st.target.focus())},Rt=e["aria-label"]||(typeof e.label=="string"?e.label:""),un;Rt||(un=e.label!=null?Se.id:e["aria-labelledby"]);let so=ct(),Zl=ct(),tp=fe(J,{"aria-label":a||I.format("increase",{fieldLabel:Rt}).trim(),id:un&&!a?so:null,"aria-labelledby":un&&!a?`${so} ${un}`:null,"aria-controls":j,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!t.canIncrement,onPressStart:cn}),Ql=fe(U,{"aria-label":o||I.format("decrease",{fieldLabel:Rt}).trim(),id:un&&!o?Zl:null,"aria-labelledby":un&&!o?`${Zl} ${un}`:null,"aria-controls":j,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!t.canDecrement,onPressStart:cn});return{groupProps:{role:"group","aria-disabled":i,"aria-invalid":m==="invalid"?"true":void 0,...Z},labelProps:Se,inputProps:lo,incrementButtonProps:tp,decrementButtonProps:Ql,errorMessageProps:io,descriptionProps:Ln}}function WM(e){let{minValue:t,maxValue:n,step:r,formatOptions:o,value:a,defaultValue:i,onChange:l,locale:s,isDisabled:u,isReadOnly:d}=e,[f,m]=Mt(a,isNaN(i)?NaN:i,l),[g,h]=c.useState(()=>isNaN(f)?"":new Xi(s,o).format(f)),b=c.useMemo(()=>new Eb(s,o),[s,o]),v=c.useMemo(()=>b.getNumberingSystem(g),[b,g]),_=c.useMemo(()=>new Xi(s,{...o,numberingSystem:v}),[s,o,v]),y=c.useMemo(()=>_.resolvedOptions(),[_]),w=c.useCallback(V=>isNaN(V)||V===null?"":_.format(V),[_]),D=isNaN(r)?1:r;y.style==="percent"&&isNaN(r)&&(D=.01);let[T,P]=c.useState(f),[M,$]=c.useState(s),[A,z]=c.useState(o);(!Object.is(f,T)||s!==M||o!==A)&&(h(w(f)),P(f),$(s),z(o));let x=c.useMemo(()=>b.parse(g),[b,g]),K=()=>{if(!g.length){m(NaN),h(a===void 0?"":w(f));return}if(isNaN(x)){h(w(f));return}let V;isNaN(r)?V=fi(x,t,n):V=Un(x,t,n,r),V=b.parse(w(V)),m(V),h(w(a===void 0?V:f))},O=(V,J)=>{let U=x;if(isNaN(U)){let H=isNaN(J)?0:J;return Un(H,t,n,D)}else{let H=Un(U,t,n,D);return V==="+"&&H>U||V==="-"&&H<U?H:Un(Kd(V,U,D),t,n,D)}},I=()=>{let V=O("+",t);V===f&&h(w(V)),m(V)},j=()=>{let V=O("-",n);V===f&&h(w(V)),m(V)},C=()=>{n!=null&&m(Un(n,t,n,D))},q=()=>{t!=null&&m(t)},G=c.useMemo(()=>!u&&!d&&(isNaN(x)||isNaN(n)||Un(x,t,n,D)>x||Kd("+",x,D)<=n),[u,d,t,n,D,x]),B=c.useMemo(()=>!u&&!d&&(isNaN(x)||isNaN(t)||Un(x,t,n,D)<x||Kd("-",x,D)>=t),[u,d,t,n,D,x]);return{validate:V=>b.isValidPartialNumber(V,t,n),increment:I,incrementToMax:C,decrement:j,decrementToMin:q,canIncrement:G,canDecrement:B,minValue:t,maxValue:n,numberValue:x,setInputValue:h,inputValue:g,commit:K}}function Kd(e,t,n){let r=e==="+"?t+n:t-n;if(t%1!==0||n%1!==0){const o=t.toString().split("."),a=n.toString().split("."),i=o[1]&&o[1].length||0,l=a[1]&&a[1].length||0,s=Math.pow(10,Math.max(i,l));t=Math.round(t*s),n=Math.round(n*s),r=e==="+"?t+n:t-n,r/=s}return r}function Kx(e){const t=c.useRef(null),{buttonProps:n,isPressed:r}=Dr(e,t),{children:o,className:a}=e;return E("button",{"data-state":r?"pressed":void 0,ref:t,...n,className:a,children:o})}const HM=L.default.div`
|
|
1992
|
+
`,w1=e=>{var r,o,a;const t=((r=e.formatted_address)==null?void 0:r.length)&&((o=e.name)==null?void 0:o.length)&&!e.formatted_address.startsWith(e.name),n=(a=e.formatted_address)==null?void 0:a.length;return t&&e.name&&e.formatted_address?`${e.name}, ${e.formatted_address}`:n?e.formatted_address:""},RM=["name","formatted_address","geometry.location"],KM=({googleApiKey:e,placeholder:t="Enter an address",options:n={},libraries:r=["places"],googleMapsScriptBaseUrl:o,debounce:a=750,defaultValue:i,value:l,onChange:s,disabled:u,isInvalid:d,label:f,labelId:m="location-input-label",inputId:g="location-input",hideLabel:h=!1,boldLabel:b=!1,autoFocus:v,extraMenuActions:_=[],showExtraActionsWithResults:y=!1,...w})=>{const[D,T]=c.useState(i??l??""),P=c.createRef(),M=c.useRef(null),$=ua({}),{overlayProps:A}=pv({},P),{fields:z=RM}=n;c.useEffect(()=>{l&&T(l)},[l]);const{placesService:x,placePredictions:K,getPlacePredictions:O,isPlacePredictionsLoading:I}=kM({apiKey:e,libraries:r,googleMapsScriptBaseUrl:o,debounce:a,options:{input:D,...n},sessionToken:!0}),[j,C]=c.useState(-1),q=c.useCallback(X=>{X&&(x==null||x.getDetails({placeId:X.place_id??"",fields:z},(Z,ae)=>{if(Z&&ae===google.maps.places.PlacesServiceStatus.OK){const ee=w1(Z);ee&&T(ee),s==null||s(Z),$.close(),C(-1)}else console.error("Error getting place details.",ae,Z)}))},[s,z,$,x]);oi(()=>{document.activeElement===P.current&&$.close()});const G=X=>{const Z=X.target.value;Z.length===0?(T(Z),s==null||s(null),C(-1)):(O({input:Z,locationRestriction:n.bounds}),T(Z),C(-1))},B=X=>{X.target.select(),$.isOpen||$.open()},N=()=>{$.isOpen&&($.close(),C(-1))},V={extra:_.length&&(y||!I&&K.length===0||D.length===0),predictions:D.length>0&&!I&&K.length>0},J=(X,Z)=>{const ae=(V.predictions?K.length:0)+(V.extra?_.length:0);if(ae===0)return;let ee=j;Z==="down"&&(ee=(j+1)%ae),Z==="up"&&(ee=(j-1+ae)%ae),C(ee)},U=X=>{var Z;X.key==="Tab"?j!==-1&&(V.predictions&&j<K.length?q(K[j]):V.extra&&((Z=_[j-(V.predictions?K.length:0)])==null||Z.onClick(),$.close(),C(-1))):X.key==="Enter"?X.preventDefault():X.key==="ArrowDown"?($.open(),J(X,"down")):X.key==="ArrowUp"?($.open(),J(X,"up")):(C(-1),$.isOpen||$.open())},H=X=>{var Z;X.key==="Enter"&&j!==-1&&(V.predictions&&j<K.length?q(K[j]):V.extra&&((Z=_[j-(V.predictions?K.length:0)])==null||Z.onClick(),$.close(),C(-1)))};return Q(Et,{children:[f?Q(Re,{id:m,htmlFor:g,srOnly:h,mb:p.spacing_150,bold:b,children:[f,w.tooltipContent?E(Qe,{children:w.tooltipContent}):null]}):null,E(Nt,{height:p.spacing_600,type:"text",autoComplete:"off",autoFocus:v,"data-id":w["data-id"]??g,id:g,disabled:u,"data-state":d?"invalid":void 0,value:D,placeholder:t,ref:P,onChange:G,onFocus:B,onBlur:N,onKeyDown:U,onKeyUp:H,onMouseUp:X=>X.preventDefault()}),w.errorMessage?E(St,{children:w.errorMessage}):null,$.isOpen&&(V.extra||V.predictions)?E(Gr,{className:"google-input-popover",targetRef:P,popoverRef:M,state:$,...A,isTargetWidth:!0,placement:"bottom start",isNonModal:!0,children:Q(ge,{onMouseDown:X=>X.preventDefault(),children:[V.predictions?K.map((X,Z)=>E(x1,{p:p.spacing_200,truncate:!0,onClick:()=>q(X),style:{cursor:"pointer"},backgroundColor:j===Z?p.color_gray_opacity_5:"transparent",children:X.description},X.place_id)):null,I?E(tt,{as:"span",italic:!0,p:p.spacing_200,style:{cursor:"pointer"},children:"Loading..."}):null,!V.extra&&!V.predictions?E(tt,{as:"span",p:p.spacing_200,style:{cursor:"pointer"},children:"No results found"}):null,V.extra?E("hr",{style:{margin:0}}):null,V.extra?_.map((X,Z)=>E(x1,{p:p.spacing_200,truncate:!0,onClick:()=>{X.onClick(),$.close()},style:{cursor:"pointer"},backgroundColor:(V.predictions?j===Z+K.length:j===Z)?p.color_gray_opacity_5:"transparent",children:X.label},X.id)):null]})}):null]})};var E1={};E1={Empty:"فارغ"};var S1={};S1={Empty:"Изпразни"};var D1={};D1={Empty:"Prázdné"};var P1={};P1={Empty:"Tom"};var T1={};T1={Empty:"Leer"};var C1={};C1={Empty:"Άδειο"};var k1={};k1={Empty:"Empty"};var A1={};A1={Empty:"Vacío"};var I1={};I1={Empty:"Tühjenda"};var O1={};O1={Empty:"Tyhjä"};var M1={};M1={Empty:"Vide"};var F1={};F1={Empty:"ריק"};var L1={};L1={Empty:"Prazno"};var N1={};N1={Empty:"Üres"};var z1={};z1={Empty:"Vuoto"};var R1={};R1={Empty:"空"};var K1={};K1={Empty:"비어 있음"};var V1={};V1={Empty:"Tuščias"};var B1={};B1={Empty:"Tukšs"};var j1={};j1={Empty:"Tom"};var U1={};U1={Empty:"Leeg"};var W1={};W1={Empty:"Pusty"};var H1={};H1={Empty:"Vazio"};var G1={};G1={Empty:"Vazio"};var Y1={};Y1={Empty:"Gol"};var q1={};q1={Empty:"Не заполнено"};var X1={};X1={Empty:"Prázdne"};var J1={};J1={Empty:"Prazen"};var Z1={};Z1={Empty:"Prazno"};var Q1={};Q1={Empty:"Tomt"};var ex={};ex={Empty:"Boş"};var tx={};tx={Empty:"Пусто"};var nx={};nx={Empty:"空"};var rx={};rx={Empty:"空白"};function VM(e){return e&&e.__esModule?e.default:e}var ox={};ox={"ar-AE":E1,"bg-BG":S1,"cs-CZ":D1,"da-DK":P1,"de-DE":T1,"el-GR":C1,"en-US":k1,"es-ES":A1,"et-EE":I1,"fi-FI":O1,"fr-FR":M1,"he-IL":F1,"hr-HR":L1,"hu-HU":N1,"it-IT":z1,"ja-JP":R1,"ko-KR":K1,"lt-LT":V1,"lv-LV":B1,"nb-NO":j1,"nl-NL":U1,"pl-PL":W1,"pt-BR":H1,"pt-PT":G1,"ro-RO":Y1,"ru-RU":q1,"sk-SK":X1,"sl-SI":J1,"sr-SP":Z1,"sv-SE":Q1,"tr-TR":ex,"uk-UA":tx,"zh-CN":nx,"zh-TW":rx};function BM(e){const t=c.useRef();let{value:n,textValue:r,minValue:o,maxValue:a,isDisabled:i,isReadOnly:l,isRequired:s,onIncrement:u,onIncrementPage:d,onDecrement:f,onDecrementPage:m,onDecrementToMin:g,onIncrementToMax:h}=e;const b=_t(VM(ox),"@react-aria/spinbutton"),v=()=>clearTimeout(t.current);c.useEffect(()=>()=>v(),[]);let _=x=>{if(!(x.ctrlKey||x.metaKey||x.shiftKey||x.altKey||l))switch(x.key){case"PageUp":if(d){x.preventDefault(),d==null||d();break}case"ArrowUp":case"Up":u&&(x.preventDefault(),u==null||u());break;case"PageDown":if(m){x.preventDefault(),m==null||m();break}case"ArrowDown":case"Down":f&&(x.preventDefault(),f==null||f());break;case"Home":g&&(x.preventDefault(),g==null||g());break;case"End":h&&(x.preventDefault(),h==null||h());break}},y=c.useRef(!1),w=()=>{y.current=!0},D=()=>{y.current=!1},T=r===""?b.format("Empty"):(r||`${n}`).replace("-","−");c.useEffect(()=>{y.current&&(z4("assertive"),Mr(T,"assertive"))},[T]);const P=ke(x=>{v(),u==null||u(),t.current=window.setTimeout(()=>{(a===void 0||isNaN(a)||n===void 0||isNaN(n)||n<a)&&P(60)},x)}),M=ke(x=>{v(),f==null||f(),t.current=window.setTimeout(()=>{(o===void 0||isNaN(o)||n===void 0||isNaN(n)||n>o)&&M(60)},x)});let $=x=>{x.preventDefault()},{addGlobalListener:A,removeAllGlobalListeners:z}=Pc();return{spinButtonProps:{role:"spinbutton","aria-valuenow":n!==void 0&&!isNaN(n)?n:void 0,"aria-valuetext":T,"aria-valuemin":o,"aria-valuemax":a,"aria-disabled":i||void 0,"aria-readonly":l||void 0,"aria-required":s||void 0,onKeyDown:_,onFocus:w,onBlur:D},incrementButtonProps:{onPressStart:()=>{P(400),A(window,"contextmenu",$)},onPressEnd:()=>{v(),z()},onFocus:w,onBlur:D},decrementButtonProps:{onPressStart:()=>{M(400),A(window,"contextmenu",$)},onPressEnd:()=>{v(),z()},onFocus:w,onBlur:D}}}function jM(e){return e&&e.__esModule?e.default:e}var ax={},ix={};ix={decrease:e=>`خفض ${e.fieldLabel}`,increase:e=>`زيادة ${e.fieldLabel}`,numberField:"حقل رقمي"};var lx={};lx={decrease:e=>`Намаляване ${e.fieldLabel}`,increase:e=>`Усилване ${e.fieldLabel}`,numberField:"Номер на полето"};var sx={};sx={decrease:e=>`Snížit ${e.fieldLabel}`,increase:e=>`Zvýšit ${e.fieldLabel}`,numberField:"Číselné pole"};var cx={};cx={decrease:e=>`Reducer ${e.fieldLabel}`,increase:e=>`Øg ${e.fieldLabel}`,numberField:"Talfelt"};var ux={};ux={decrease:e=>`${e.fieldLabel} verringern`,increase:e=>`${e.fieldLabel} erhöhen`,numberField:"Nummernfeld"};var dx={};dx={decrease:e=>`Μείωση ${e.fieldLabel}`,increase:e=>`Αύξηση ${e.fieldLabel}`,numberField:"Πεδίο αριθμού"};var fx={};fx={decrease:e=>`Decrease ${e.fieldLabel}`,increase:e=>`Increase ${e.fieldLabel}`,numberField:"Number field"};var px={};px={decrease:e=>`Reducir ${e.fieldLabel}`,increase:e=>`Aumentar ${e.fieldLabel}`,numberField:"Campo de número"};var mx={};mx={decrease:e=>`Vähenda ${e.fieldLabel}`,increase:e=>`Suurenda ${e.fieldLabel}`,numberField:"Numbri väli"};var gx={};gx={decrease:e=>`Vähennä ${e.fieldLabel}`,increase:e=>`Lisää ${e.fieldLabel}`,numberField:"Numerokenttä"};var hx={};hx={decrease:e=>`Diminuer ${e.fieldLabel}`,increase:e=>`Augmenter ${e.fieldLabel}`,numberField:"Champ de nombre"};var bx={};bx={decrease:e=>`הקטן ${e.fieldLabel}`,increase:e=>`הגדל ${e.fieldLabel}`,numberField:"שדה מספר"};var vx={};vx={decrease:e=>`Smanji ${e.fieldLabel}`,increase:e=>`Povećaj ${e.fieldLabel}`,numberField:"Polje broja"};var yx={};yx={decrease:e=>`${e.fieldLabel} csökkentése`,increase:e=>`${e.fieldLabel} növelése`,numberField:"Számmező"};var $x={};$x={decrease:e=>`Riduci ${e.fieldLabel}`,increase:e=>`Aumenta ${e.fieldLabel}`,numberField:"Campo numero"};var _x={};_x={decrease:e=>`${e.fieldLabel}を縮小`,increase:e=>`${e.fieldLabel}を拡大`,numberField:"数値フィールド"};var xx={};xx={decrease:e=>`${e.fieldLabel} 감소`,increase:e=>`${e.fieldLabel} 증가`,numberField:"번호 필드"};var wx={};wx={decrease:e=>`Sumažinti ${e.fieldLabel}`,increase:e=>`Padidinti ${e.fieldLabel}`,numberField:"Numerio laukas"};var Ex={};Ex={decrease:e=>`Samazināšana ${e.fieldLabel}`,increase:e=>`Palielināšana ${e.fieldLabel}`,numberField:"Skaitļu lauks"};var Sx={};Sx={decrease:e=>`Reduser ${e.fieldLabel}`,increase:e=>`Øk ${e.fieldLabel}`,numberField:"Tallfelt"};var Dx={};Dx={decrease:e=>`${e.fieldLabel} verlagen`,increase:e=>`${e.fieldLabel} verhogen`,numberField:"Getalveld"};var Px={};Px={decrease:e=>`Zmniejsz ${e.fieldLabel}`,increase:e=>`Zwiększ ${e.fieldLabel}`,numberField:"Pole numeru"};var Tx={};Tx={decrease:e=>`Diminuir ${e.fieldLabel}`,increase:e=>`Aumentar ${e.fieldLabel}`,numberField:"Campo de número"};var Cx={};Cx={decrease:e=>`Diminuir ${e.fieldLabel}`,increase:e=>`Aumentar ${e.fieldLabel}`,numberField:"Campo numérico"};var kx={};kx={decrease:e=>`Scădere ${e.fieldLabel}`,increase:e=>`Creștere ${e.fieldLabel}`,numberField:"Câmp numeric"};var Ax={};Ax={decrease:e=>`Уменьшение ${e.fieldLabel}`,increase:e=>`Увеличение ${e.fieldLabel}`,numberField:"Числовое поле"};var Ix={};Ix={decrease:e=>`Znížiť ${e.fieldLabel}`,increase:e=>`Zvýšiť ${e.fieldLabel}`,numberField:"Číselné pole"};var Ox={};Ox={decrease:e=>`Upadati ${e.fieldLabel}`,increase:e=>`Povečajte ${e.fieldLabel}`,numberField:"Številčno polje"};var Mx={};Mx={decrease:e=>`Decrease ${e.fieldLabel}`,increase:e=>`Increase ${e.fieldLabel}`,numberField:"Number field"};var Fx={};Fx={decrease:e=>`Minska ${e.fieldLabel}`,increase:e=>`Öka ${e.fieldLabel}`,numberField:"Nummerfält"};var Lx={};Lx={decrease:e=>`${e.fieldLabel} azalt`,increase:e=>`${e.fieldLabel} arttır`,numberField:"Sayı alanı"};var Nx={};Nx={decrease:e=>`Зменшити ${e.fieldLabel}`,increase:e=>`Збільшити ${e.fieldLabel}`,numberField:"Поле номера"};var zx={};zx={decrease:e=>`降低 ${e.fieldLabel}`,increase:e=>`提高 ${e.fieldLabel}`,numberField:"数字字段"};var Rx={};Rx={decrease:e=>`縮小 ${e.fieldLabel}`,increase:e=>`放大 ${e.fieldLabel}`,numberField:"數字欄位"},ax={"ar-AE":ix,"bg-BG":lx,"cs-CZ":sx,"da-DK":cx,"de-DE":ux,"el-GR":dx,"en-US":fx,"es-ES":px,"et-EE":mx,"fi-FI":gx,"fr-FR":hx,"he-IL":bx,"hr-HR":vx,"hu-HU":yx,"it-IT":$x,"ja-JP":_x,"ko-KR":xx,"lt-LT":wx,"lv-LV":Ex,"nb-NO":Sx,"nl-NL":Dx,"pl-PL":Px,"pt-BR":Tx,"pt-PT":Cx,"ro-RO":kx,"ru-RU":Ax,"sk-SK":Ix,"sl-SI":Ox,"sr-SP":Mx,"sv-SE":Fx,"tr-TR":Lx,"uk-UA":Nx,"zh-CN":zx,"zh-TW":Rx};function UM(e,t,n){let{id:r,decrementAriaLabel:o,incrementAriaLabel:a,isDisabled:i,isReadOnly:l,isRequired:s,minValue:u,maxValue:d,autoFocus:f,validationState:m,label:g,formatOptions:h,onBlur:b=()=>{},onFocus:v,onFocusChange:_,onKeyDown:y,onKeyUp:w,description:D,errorMessage:T,...P}=e,{increment:M,incrementToMax:$,decrement:A,decrementToMin:z,numberValue:x,inputValue:K,commit:O}=t;const I=_t(jM(ax));let j=ct(r),{focusProps:C}=zc({onBlur:()=>{O()}}),q=Cb(h),G=c.useMemo(()=>q.resolvedOptions(),[q]),B=Cb({...h,currencySign:void 0}),N=c.useMemo(()=>isNaN(x)?"":B.format(x),[B,x]),{spinButtonProps:V,incrementButtonProps:J,decrementButtonProps:U}=BM({isDisabled:i,isReadOnly:l,isRequired:s,maxValue:d,minValue:u,onIncrement:M,onIncrementToMax:$,onDecrement:A,onDecrementToMin:z,value:x,textValue:N}),[H,X]=c.useState(!1),{focusWithinProps:Z}=Fo({isDisabled:i,onFocusWithinChange:X}),ae=c.useCallback(st=>{Math.abs(st.deltaY)<=Math.abs(st.deltaX)||(st.deltaY>0?M():st.deltaY<0&&A())},[A,M]);hC({onScroll:ae,isDisabled:i||l||!H},n);let re=G.maximumFractionDigits>0,se=isNaN(t.minValue)||t.minValue<0,_e="numeric";Dg()?se?_e="text":re&&(_e="decimal"):Sc()&&(se?_e="numeric":re&&(_e="decimal"));let le=st=>{t.validate(st)&&t.setInputValue(st)},pe=$n(e),{labelProps:Se,inputProps:Fn,descriptionProps:Ln,errorMessageProps:io}=U9({...P,...pe,label:g,autoFocus:f,isDisabled:i,isReadOnly:l,isRequired:s,validationState:m,value:K,defaultValue:void 0,autoComplete:"off","aria-label":e["aria-label"]||null,"aria-labelledby":e["aria-labelledby"]||null,id:j,type:"text",inputMode:_e,onChange:le,onBlur:b,onFocus:v,onFocusChange:_,onKeyDown:y,onKeyUp:w,description:D,errorMessage:T},t,n),lo=fe(V,C,Fn,{role:null,"aria-roledescription":Co()?null:I.format("numberField"),"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null,autoCorrect:"off",spellCheck:"false"}),cn=st=>{document.activeElement!==n.current&&(st.pointerType==="mouse"?n.current.focus():st.target.focus())},Rt=e["aria-label"]||(typeof e.label=="string"?e.label:""),un;Rt||(un=e.label!=null?Se.id:e["aria-labelledby"]);let so=ct(),Zl=ct(),tp=fe(J,{"aria-label":a||I.format("increase",{fieldLabel:Rt}).trim(),id:un&&!a?so:null,"aria-labelledby":un&&!a?`${so} ${un}`:null,"aria-controls":j,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!t.canIncrement,onPressStart:cn}),Ql=fe(U,{"aria-label":o||I.format("decrease",{fieldLabel:Rt}).trim(),id:un&&!o?Zl:null,"aria-labelledby":un&&!o?`${Zl} ${un}`:null,"aria-controls":j,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!t.canDecrement,onPressStart:cn});return{groupProps:{role:"group","aria-disabled":i,"aria-invalid":m==="invalid"?"true":void 0,...Z},labelProps:Se,inputProps:lo,incrementButtonProps:tp,decrementButtonProps:Ql,errorMessageProps:io,descriptionProps:Ln}}function WM(e){let{minValue:t,maxValue:n,step:r,formatOptions:o,value:a,defaultValue:i,onChange:l,locale:s,isDisabled:u,isReadOnly:d}=e,[f,m]=Mt(a,isNaN(i)?NaN:i,l),[g,h]=c.useState(()=>isNaN(f)?"":new Xi(s,o).format(f)),b=c.useMemo(()=>new Eb(s,o),[s,o]),v=c.useMemo(()=>b.getNumberingSystem(g),[b,g]),_=c.useMemo(()=>new Xi(s,{...o,numberingSystem:v}),[s,o,v]),y=c.useMemo(()=>_.resolvedOptions(),[_]),w=c.useCallback(V=>isNaN(V)||V===null?"":_.format(V),[_]),D=isNaN(r)?1:r;y.style==="percent"&&isNaN(r)&&(D=.01);let[T,P]=c.useState(f),[M,$]=c.useState(s),[A,z]=c.useState(o);(!Object.is(f,T)||s!==M||o!==A)&&(h(w(f)),P(f),$(s),z(o));let x=c.useMemo(()=>b.parse(g),[b,g]),K=()=>{if(!g.length){m(NaN),h(a===void 0?"":w(f));return}if(isNaN(x)){h(w(f));return}let V;isNaN(r)?V=fi(x,t,n):V=Un(x,t,n,r),V=b.parse(w(V)),m(V),h(w(a===void 0?V:f))},O=(V,J)=>{let U=x;if(isNaN(U)){let H=isNaN(J)?0:J;return Un(H,t,n,D)}else{let H=Un(U,t,n,D);return V==="+"&&H>U||V==="-"&&H<U?H:Un(Kd(V,U,D),t,n,D)}},I=()=>{let V=O("+",t);V===f&&h(w(V)),m(V)},j=()=>{let V=O("-",n);V===f&&h(w(V)),m(V)},C=()=>{n!=null&&m(Un(n,t,n,D))},q=()=>{t!=null&&m(t)},G=c.useMemo(()=>!u&&!d&&(isNaN(x)||isNaN(n)||Un(x,t,n,D)>x||Kd("+",x,D)<=n),[u,d,t,n,D,x]),B=c.useMemo(()=>!u&&!d&&(isNaN(x)||isNaN(t)||Un(x,t,n,D)<x||Kd("-",x,D)>=t),[u,d,t,n,D,x]);return{validate:V=>b.isValidPartialNumber(V,t,n),increment:I,incrementToMax:C,decrement:j,decrementToMin:q,canIncrement:G,canDecrement:B,minValue:t,maxValue:n,numberValue:x,setInputValue:h,inputValue:g,commit:K}}function Kd(e,t,n){let r=e==="+"?t+n:t-n;if(t%1!==0||n%1!==0){const o=t.toString().split("."),a=n.toString().split("."),i=o[1]&&o[1].length||0,l=a[1]&&a[1].length||0,s=Math.pow(10,Math.max(i,l));t=Math.round(t*s),n=Math.round(n*s),r=e==="+"?t+n:t-n,r/=s}return r}function Kx(e){const t=c.useRef(null),{buttonProps:n,isPressed:r}=Dr(e,t),{children:o,className:a}=e;return E("button",{"data-state":r?"pressed":void 0,ref:t,...n,className:a,children:o})}const HM=L.default.div`
|
|
1993
1993
|
/*
|
|
1994
1994
|
--border-color: ${p.color_deprecated_outline_secondary_enabled};
|
|
1995
1995
|
*/
|