freemium-ui 2.0.0-beta.29 → 2.0.0-beta.30
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/index.cjs.js +643 -633
- package/index.js +626 -616
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -746,19 +746,10 @@ height:"24px",size:"12px"},normal:{height:"32px",size:"14px"}},er=on.button`
|
|
|
746
746
|
}),[]),e.createElement(er,{size:t,variant:n,inline:o,disabled:i.disabled||a,
|
|
747
747
|
"aria-disabled":i.disabled||a,"aria-label":"string"==typeof r?r:void 0,
|
|
748
748
|
role:"button",...i
|
|
749
|
-
},a?e.createElement(nr,null):r)),nr=()=>e.createElement(e.Fragment,null,"...")
|
|
750
|
-
|
|
751
|
-
xmlns:"http://www.w3.org/2000/svg",...t},e.createElement("path",{
|
|
752
|
-
d:"M0.696495 5.3465C0.882365 5.34499 1.06086 5.27359 1.19649 5.1465L3.99649 2.3365L6.79649 5.1465C7.07264 5.42264 7.52035 5.42264 7.79649 5.1465C8.07264 4.87035 8.07264 4.42264 7.79649 4.1465L4.49649 0.856495C4.36483 0.722118 4.18462 0.646393 3.99649 0.646393C3.80837 0.646393 3.62816 0.722118 3.49649 0.856495L0.206495 4.1465C0.00332102 4.34556 -0.0591904 4.64778 0.0483378 4.91112C0.155867 5.17445 0.412052 5.34654 0.696495 5.3465Z",
|
|
753
|
-
fill:t.fill})),ar=on(rr)`
|
|
754
|
-
transform: rotate(180deg);
|
|
755
|
-
`,or=on(tr)`
|
|
756
|
-
display: flex;
|
|
757
|
-
align-items: center;
|
|
758
|
-
gap: 10px;
|
|
759
|
-
`;function ir(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){
|
|
749
|
+
},a?e.createElement(nr,null):r)),nr=()=>e.createElement(e.Fragment,null,"...")
|
|
750
|
+
;function rr(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){
|
|
760
751
|
if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}
|
|
761
|
-
function
|
|
752
|
+
function ar(t,n=[]){let r=[];const a=()=>{const n=r.map((t=>e.createContext(t)))
|
|
762
753
|
;return function(r){const a=(null==r?void 0:r[t])||n;return e.useMemo((()=>({
|
|
763
754
|
[`__scope${t}`]:{...r,[t]:a}})),[r,a])}};return a.scopeName=t,[function(n,a){
|
|
764
755
|
const o=e.createContext(a),i=r.length;function l(n){
|
|
@@ -767,21 +758,21 @@ const{scope:r,children:a,...l}=n,c=(null==r?void 0:r[t][i])||o,s=e.useMemo((()=>
|
|
|
767
758
|
return r=[...r,a],l.displayName=n+"Provider",[l,function(r,l){
|
|
768
759
|
const c=(null==l?void 0:l[t][i])||o,s=e.useContext(c);if(s)return s
|
|
769
760
|
;if(void 0!==a)return a;throw new Error(`\`${r}\` must be used within \`${n}\``)
|
|
770
|
-
}]},
|
|
761
|
+
}]},or(a,...n)]}function or(...t){const n=t[0];if(1===t.length)return n
|
|
771
762
|
;const r=()=>{const r=t.map((e=>({useScope:e(),scopeName:e.scopeName})))
|
|
772
763
|
;return function(t){const a=r.reduce(((e,{useScope:n,scopeName:r})=>({...e,
|
|
773
764
|
...n(t)[`__scope${r}`]})),{});return e.useMemo((()=>({
|
|
774
765
|
[`__scope${n.scopeName}`]:a})),[a])}};return r.scopeName=n.scopeName,r}
|
|
775
|
-
function
|
|
766
|
+
function ir(t){const n=e.useRef(t);return e.useEffect((()=>{n.current=t
|
|
776
767
|
})),e.useMemo((()=>(...e)=>{var t
|
|
777
768
|
;return null===(t=n.current)||void 0===t?void 0:t.call(n,...e)}),[])}
|
|
778
|
-
function
|
|
769
|
+
function lr({prop:t,defaultProp:n,onChange:r=(()=>{})}){
|
|
779
770
|
const[a,o]=function({defaultProp:t,onChange:n}){
|
|
780
|
-
const r=e.useState(t),[a]=r,o=e.useRef(a),i=
|
|
771
|
+
const r=e.useState(t),[a]=r,o=e.useRef(a),i=ir(n);return e.useEffect((()=>{
|
|
781
772
|
o.current!==a&&(i(a),o.current=a)}),[a,o,i]),r}({defaultProp:n,onChange:r
|
|
782
|
-
}),i=void 0!==t,l=i?t:a,c=
|
|
773
|
+
}),i=void 0!==t,l=i?t:a,c=ir(r);return[l,e.useCallback((e=>{if(i){
|
|
783
774
|
const n="function"==typeof e?e(t):e;n!==t&&c(n)}else o(e)}),[i,t,o,c])]}
|
|
784
|
-
function
|
|
775
|
+
function cr(t){const n=t+"CollectionProvider",[r,a]=ar(n),[o,i]=r(n,{
|
|
785
776
|
collectionRef:{current:null},itemMap:new Map
|
|
786
777
|
}),l=t+"CollectionSlot",c=t+"CollectionItemSlot",s="data-radix-collection-item"
|
|
787
778
|
;return[{Provider:t=>{
|
|
@@ -797,16 +788,16 @@ const r=i(t+"CollectionConsumer",n),a=e.useCallback((()=>{
|
|
|
797
788
|
const e=r.collectionRef.current;if(!e)return[]
|
|
798
789
|
;const t=Array.from(e.querySelectorAll(`[${s}]`)),n=Array.from(r.itemMap.values()).sort(((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current)))
|
|
799
790
|
;return n}),[r.collectionRef,r.itemMap]);return a},a]}
|
|
800
|
-
const
|
|
791
|
+
const sr=e.createContext(void 0);function ur(t){const n=e.useContext(sr)
|
|
801
792
|
;return t||n||"ltr"}
|
|
802
|
-
const
|
|
803
|
-
;let
|
|
793
|
+
const dr="dismissableLayer.update",hr="dismissableLayer.pointerDownOutside",pr="dismissableLayer.focusOutside"
|
|
794
|
+
;let fr;const mr=e.createContext({layers:new Set,
|
|
804
795
|
layersWithOutsidePointerEventsDisabled:new Set,branches:new Set
|
|
805
|
-
}),
|
|
806
|
-
;const{disableOutsidePointerEvents:a=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:l,onInteractOutside:c,onDismiss:s,...u}=t,d=e.useContext(
|
|
807
|
-
const r=
|
|
796
|
+
}),vr=e.forwardRef(((t,n)=>{var r
|
|
797
|
+
;const{disableOutsidePointerEvents:a=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:l,onInteractOutside:c,onDismiss:s,...u}=t,d=e.useContext(mr),[h,p]=e.useState(null),f=null!==(r=null==h?void 0:h.ownerDocument)&&void 0!==r?r:null===globalThis||void 0===globalThis?void 0:globalThis.document,[,m]=e.useState({}),v=hn(n,(e=>p(e))),g=Array.from(d.layers),[y]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),b=g.indexOf(y),w=h?g.indexOf(h):-1,C=d.layersWithOutsidePointerEventsDisabled.size>0,z=w>=b,M=function(t,n=(null===globalThis||void 0===globalThis?void 0:globalThis.document)){
|
|
798
|
+
const r=ir(t),a=e.useRef(!1),o=e.useRef((()=>{}));return e.useEffect((()=>{
|
|
808
799
|
const e=e=>{if(e.target&&!a.current){const t={originalEvent:e};function i(){
|
|
809
|
-
|
|
800
|
+
br(hr,r,t,{discrete:!0})}
|
|
810
801
|
"touch"===e.pointerType?(n.removeEventListener("click",o.current),
|
|
811
802
|
o.current=i,n.addEventListener("click",o.current,{once:!0})):i()
|
|
812
803
|
}else n.removeEventListener("click",o.current);a.current=!1
|
|
@@ -817,248 +808,248 @@ n.removeEventListener("pointerdown",e),n.removeEventListener("click",o.current)}
|
|
|
817
808
|
const t=e.target,n=[...d.branches].some((e=>e.contains(t)))
|
|
818
809
|
;z&&!n&&(null==i||i(e),null==c||c(e),e.defaultPrevented||null==s||s())
|
|
819
810
|
}),f),x=function(t,n=(null===globalThis||void 0===globalThis?void 0:globalThis.document)){
|
|
820
|
-
const r=
|
|
821
|
-
if(e.target&&!a.current){
|
|
811
|
+
const r=ir(t),a=e.useRef(!1);return e.useEffect((()=>{const e=e=>{
|
|
812
|
+
if(e.target&&!a.current){br(pr,r,{originalEvent:e},{discrete:!1})}}
|
|
822
813
|
;return n.addEventListener("focusin",e),()=>n.removeEventListener("focusin",e)
|
|
823
814
|
}),[n,r]),{onFocusCapture:()=>a.current=!0,onBlurCapture:()=>a.current=!1}
|
|
824
815
|
}((e=>{const t=e.target
|
|
825
816
|
;[...d.branches].some((e=>e.contains(t)))||(null==l||l(e),
|
|
826
817
|
null==c||c(e),e.defaultPrevented||null==s||s())}),f)
|
|
827
818
|
;return function(t,n=(null===globalThis||void 0===globalThis?void 0:globalThis.document)){
|
|
828
|
-
const r=
|
|
819
|
+
const r=ir(t);e.useEffect((()=>{const e=e=>{"Escape"===e.key&&r(e)}
|
|
829
820
|
;return n.addEventListener("keydown",e),()=>n.removeEventListener("keydown",e)
|
|
830
821
|
}),[r,n])}((e=>{
|
|
831
822
|
w===d.layers.size-1&&(null==o||o(e),!e.defaultPrevented&&s&&(e.preventDefault(),
|
|
832
823
|
s()))}),f),e.useEffect((()=>{
|
|
833
|
-
if(h)return a&&(0===d.layersWithOutsidePointerEventsDisabled.size&&(
|
|
824
|
+
if(h)return a&&(0===d.layersWithOutsidePointerEventsDisabled.size&&(fr=f.body.style.pointerEvents,
|
|
834
825
|
f.body.style.pointerEvents="none"),
|
|
835
|
-
d.layersWithOutsidePointerEventsDisabled.add(h)),d.layers.add(h),
|
|
836
|
-
a&&1===d.layersWithOutsidePointerEventsDisabled.size&&(f.body.style.pointerEvents=
|
|
826
|
+
d.layersWithOutsidePointerEventsDisabled.add(h)),d.layers.add(h),yr(),()=>{
|
|
827
|
+
a&&1===d.layersWithOutsidePointerEventsDisabled.size&&(f.body.style.pointerEvents=fr)
|
|
837
828
|
}}),[h,f,a,d]),e.useEffect((()=>()=>{
|
|
838
|
-
h&&(d.layers.delete(h),d.layersWithOutsidePointerEventsDisabled.delete(h),
|
|
829
|
+
h&&(d.layers.delete(h),d.layersWithOutsidePointerEventsDisabled.delete(h),yr())
|
|
839
830
|
}),[h,d]),e.useEffect((()=>{const e=()=>m({})
|
|
840
|
-
;return document.addEventListener(
|
|
831
|
+
;return document.addEventListener(dr,e),()=>document.removeEventListener(dr,e)
|
|
841
832
|
}),[]),e.createElement(yn.div,un({},u,{ref:v,style:{
|
|
842
833
|
pointerEvents:C?z?"auto":"none":void 0,...t.style},
|
|
843
|
-
onFocusCapture:
|
|
844
|
-
onBlurCapture:
|
|
845
|
-
onPointerDownCapture:
|
|
846
|
-
})),
|
|
834
|
+
onFocusCapture:rr(t.onFocusCapture,x.onFocusCapture),
|
|
835
|
+
onBlurCapture:rr(t.onBlurCapture,x.onBlurCapture),
|
|
836
|
+
onPointerDownCapture:rr(t.onPointerDownCapture,M.onPointerDownCapture)}))
|
|
837
|
+
})),gr=e.forwardRef(((t,n)=>{const r=e.useContext(mr),a=e.useRef(null),o=hn(n,a)
|
|
847
838
|
;return e.useEffect((()=>{const e=a.current;if(e)return r.branches.add(e),()=>{
|
|
848
839
|
r.branches.delete(e)}}),[r.branches]),e.createElement(yn.div,un({},t,{ref:o}))
|
|
849
|
-
}));function
|
|
850
|
-
function
|
|
840
|
+
}));function yr(){const e=new CustomEvent(dr);document.dispatchEvent(e)}
|
|
841
|
+
function br(e,t,n,{discrete:r}){
|
|
851
842
|
const a=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,
|
|
852
843
|
detail:n});t&&a.addEventListener(e,t,{once:!0}),r?bn(a,o):a.dispatchEvent(o)}
|
|
853
|
-
const
|
|
844
|
+
const wr=vr,Cr=gr;let zr=0;function Mr(){e.useEffect((()=>{var e,t
|
|
854
845
|
;const n=document.querySelectorAll("[data-radix-focus-guard]")
|
|
855
|
-
;return document.body.insertAdjacentElement("afterbegin",null!==(e=n[0])&&void 0!==e?e:
|
|
856
|
-
document.body.insertAdjacentElement("beforeend",null!==(t=n[1])&&void 0!==t?t:
|
|
857
|
-
|
|
858
|
-
1===
|
|
859
|
-
|
|
846
|
+
;return document.body.insertAdjacentElement("afterbegin",null!==(e=n[0])&&void 0!==e?e:xr()),
|
|
847
|
+
document.body.insertAdjacentElement("beforeend",null!==(t=n[1])&&void 0!==t?t:xr()),
|
|
848
|
+
zr++,()=>{
|
|
849
|
+
1===zr&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),
|
|
850
|
+
zr--}}),[])}function xr(){const e=document.createElement("span")
|
|
860
851
|
;return e.setAttribute("data-radix-focus-guard",""),
|
|
861
852
|
e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",
|
|
862
|
-
e}const
|
|
863
|
-
bubbles:!1,cancelable:!0},
|
|
864
|
-
const{loop:r=!1,trapped:a=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...l}=t,[c,s]=e.useState(null),u=
|
|
853
|
+
e}const Er="focusScope.autoFocusOnMount",Sr="focusScope.autoFocusOnUnmount",_r={
|
|
854
|
+
bubbles:!1,cancelable:!0},Hr=e.forwardRef(((t,n)=>{
|
|
855
|
+
const{loop:r=!1,trapped:a=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...l}=t,[c,s]=e.useState(null),u=ir(o),d=ir(i),h=e.useRef(null),p=hn(n,(e=>s(e))),f=e.useRef({
|
|
865
856
|
paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current
|
|
866
857
|
;e.useEffect((()=>{if(a){function e(e){if(f.paused||!c)return;const t=e.target
|
|
867
|
-
;c.contains(t)?h.current=t:
|
|
858
|
+
;c.contains(t)?h.current=t:Ar(h.current,{select:!0})}function t(e){
|
|
868
859
|
if(f.paused||!c)return;const t=e.relatedTarget
|
|
869
|
-
;null!==t&&(c.contains(t)||
|
|
870
|
-
if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&
|
|
860
|
+
;null!==t&&(c.contains(t)||Ar(h.current,{select:!0}))}function n(e){
|
|
861
|
+
if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&Ar(c)
|
|
871
862
|
}document.addEventListener("focusin",e),document.addEventListener("focusout",t)
|
|
872
863
|
;const r=new MutationObserver(n);return c&&r.observe(c,{childList:!0,subtree:!0
|
|
873
864
|
}),()=>{
|
|
874
865
|
document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),
|
|
875
|
-
r.disconnect()}}}),[a,c,f.paused]),e.useEffect((()=>{if(c){
|
|
866
|
+
r.disconnect()}}}),[a,c,f.paused]),e.useEffect((()=>{if(c){kr.add(f)
|
|
876
867
|
;const e=document.activeElement;if(!c.contains(e)){
|
|
877
|
-
const t=new CustomEvent(
|
|
878
|
-
;c.addEventListener(
|
|
879
|
-
const n=document.activeElement;for(const r of e)if(
|
|
868
|
+
const t=new CustomEvent(Er,_r)
|
|
869
|
+
;c.addEventListener(Er,u),c.dispatchEvent(t),t.defaultPrevented||(!function(e,{select:t=!1}={}){
|
|
870
|
+
const n=document.activeElement;for(const r of e)if(Ar(r,{select:t
|
|
880
871
|
}),document.activeElement!==n)return}(function(e){
|
|
881
|
-
return e.filter((e=>"A"!==e.tagName))}(
|
|
882
|
-
}),document.activeElement===e&&
|
|
883
|
-
c.removeEventListener(
|
|
884
|
-
;c.addEventListener(
|
|
885
|
-
c.dispatchEvent(t),t.defaultPrevented||
|
|
886
|
-
}),c.removeEventListener(
|
|
872
|
+
return e.filter((e=>"A"!==e.tagName))}(Dr(c)),{select:!0
|
|
873
|
+
}),document.activeElement===e&&Ar(c))}return()=>{
|
|
874
|
+
c.removeEventListener(Er,u),setTimeout((()=>{const t=new CustomEvent(Sr,_r)
|
|
875
|
+
;c.addEventListener(Sr,d),
|
|
876
|
+
c.dispatchEvent(t),t.defaultPrevented||Ar(null!=e?e:document.body,{select:!0
|
|
877
|
+
}),c.removeEventListener(Sr,d),kr.remove(f)}),0)}}}),[c,u,d,f])
|
|
887
878
|
;const m=e.useCallback((e=>{if(!r&&!a)return;if(f.paused)return
|
|
888
879
|
;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,n=document.activeElement
|
|
889
880
|
;if(t&&n){const t=e.currentTarget,[a,o]=function(e){
|
|
890
|
-
const t=
|
|
891
|
-
;a&&o?e.shiftKey||n!==o?e.shiftKey&&n===a&&(e.preventDefault(),r&&
|
|
892
|
-
select:!0})):(e.preventDefault(),r&&
|
|
881
|
+
const t=Dr(e),n=Lr(t,e),r=Lr(t.reverse(),e);return[n,r]}(t)
|
|
882
|
+
;a&&o?e.shiftKey||n!==o?e.shiftKey&&n===a&&(e.preventDefault(),r&&Ar(o,{
|
|
883
|
+
select:!0})):(e.preventDefault(),r&&Ar(a,{select:!0})):n===t&&e.preventDefault()
|
|
893
884
|
}}),[r,a,f.paused]);return e.createElement(yn.div,un({tabIndex:-1},l,{ref:p,
|
|
894
|
-
onKeyDown:m}))}));function
|
|
885
|
+
onKeyDown:m}))}));function Dr(e){
|
|
895
886
|
const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{
|
|
896
887
|
acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type
|
|
897
888
|
;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP
|
|
898
|
-
}});for(;n.nextNode();)t.push(n.currentNode);return t}function
|
|
899
|
-
for(const n of e)if(!
|
|
889
|
+
}});for(;n.nextNode();)t.push(n.currentNode);return t}function Lr(e,t){
|
|
890
|
+
for(const n of e)if(!Vr(n,{upTo:t}))return n}function Vr(e,{upTo:t}){
|
|
900
891
|
if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){
|
|
901
892
|
if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0
|
|
902
|
-
;e=e.parentElement}return!1}function
|
|
893
|
+
;e=e.parentElement}return!1}function Ar(e,{select:t=!1}={}){if(e&&e.focus){
|
|
903
894
|
const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(e){
|
|
904
895
|
return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}
|
|
905
|
-
const
|
|
906
|
-
;t!==n&&(null==n||n.pause()),e=
|
|
907
|
-
;e=
|
|
896
|
+
const kr=function(){let e=[];return{add(t){const n=e[0]
|
|
897
|
+
;t!==n&&(null==n||n.pause()),e=Tr(e,t),e.unshift(t)},remove(t){var n
|
|
898
|
+
;e=Tr(e,t),null===(n=e[0])||void 0===n||n.resume()}}}();function Tr(e,t){
|
|
908
899
|
const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}
|
|
909
|
-
const
|
|
910
|
-
;let
|
|
911
|
-
e||n((e=>null!=e?e:String(
|
|
912
|
-
const
|
|
913
|
-
x:e,y:e}),
|
|
914
|
-
start:"end",end:"start"};function
|
|
915
|
-
function
|
|
916
|
-
return e.split("-")[0]}function
|
|
917
|
-
return"x"===e?"y":"x"}function
|
|
918
|
-
function
|
|
919
|
-
return
|
|
920
|
-
function
|
|
921
|
-
function
|
|
922
|
-
bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function
|
|
923
|
-
...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function
|
|
900
|
+
const Rr=Boolean(null===globalThis||void 0===globalThis?void 0:globalThis.document)?e.useLayoutEffect:()=>{},Pr=r["useId".toString()]||(()=>{})
|
|
901
|
+
;let Ir=0;function Or(e){const[t,n]=r.useState(Pr());return Rr((()=>{
|
|
902
|
+
e||n((e=>null!=e?e:String(Ir++)))}),[e]),e||(t?`radix-${t}`:"")}
|
|
903
|
+
const Nr=["top","right","bottom","left"],Fr=Math.min,Br=Math.max,jr=Math.round,Ur=Math.floor,$r=e=>({
|
|
904
|
+
x:e,y:e}),Yr={left:"right",right:"left",bottom:"top",top:"bottom"},Wr={
|
|
905
|
+
start:"end",end:"start"};function Gr(e,t,n){return Br(e,Fr(t,n))}
|
|
906
|
+
function Kr(e,t){return"function"==typeof e?e(t):e}function qr(e){
|
|
907
|
+
return e.split("-")[0]}function Zr(e){return e.split("-")[1]}function Xr(e){
|
|
908
|
+
return"x"===e?"y":"x"}function Qr(e){return"y"===e?"height":"width"}
|
|
909
|
+
function Jr(e){return["top","bottom"].includes(qr(e))?"y":"x"}function ea(e){
|
|
910
|
+
return Xr(Jr(e))}function ta(e){return e.replace(/start|end/g,(e=>Wr[e]))}
|
|
911
|
+
function na(e){return e.replace(/left|right|bottom|top/g,(e=>Yr[e]))}
|
|
912
|
+
function ra(e){return"number"!=typeof e?function(e){return{top:0,right:0,
|
|
913
|
+
bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function aa(e){return{
|
|
914
|
+
...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function oa(e,t,n){
|
|
924
915
|
let{reference:r,floating:a}=e
|
|
925
|
-
;const o=
|
|
916
|
+
;const o=Jr(t),i=ea(t),l=Qr(i),c=qr(t),s="y"===o,u=r.x+r.width/2-a.width/2,d=r.y+r.height/2-a.height/2,h=r[l]/2-a[l]/2
|
|
926
917
|
;let p;switch(c){case"top":p={x:u,y:r.y-a.height};break;case"bottom":p={x:u,
|
|
927
918
|
y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={
|
|
928
|
-
x:r.x-a.width,y:d};break;default:p={x:r.x,y:r.y}}switch(
|
|
919
|
+
x:r.x-a.width,y:d};break;default:p={x:r.x,y:r.y}}switch(Zr(t)){case"start":
|
|
929
920
|
p[i]-=h*(n&&s?-1:1);break;case"end":p[i]+=h*(n&&s?-1:1)}return p}
|
|
930
|
-
async function
|
|
931
|
-
;const{x:r,y:a,platform:o,rects:i,elements:l,strategy:c}=e,{boundary:s="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:h=!1,padding:p=0}=
|
|
921
|
+
async function ia(e,t){var n;void 0===t&&(t={})
|
|
922
|
+
;const{x:r,y:a,platform:o,rects:i,elements:l,strategy:c}=e,{boundary:s="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:h=!1,padding:p=0}=Kr(t,e),f=ra(p),m=l[h?"floating"===d?"reference":"floating":d],v=aa(await o.getClippingRect({
|
|
932
923
|
element:null==(n=await(null==o.isElement?void 0:o.isElement(m)))||n?m:m.contextElement||await(null==o.getDocumentElement?void 0:o.getDocumentElement(l.floating)),
|
|
933
924
|
boundary:s,rootBoundary:u,strategy:c})),g="floating"===d?{...i.floating,x:r,y:a
|
|
934
925
|
}:i.reference,y=await(null==o.getOffsetParent?void 0:o.getOffsetParent(l.floating)),b=await(null==o.isElement?void 0:o.isElement(y))&&await(null==o.getScale?void 0:o.getScale(y))||{
|
|
935
926
|
x:1,y:1
|
|
936
|
-
},w=
|
|
927
|
+
},w=aa(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
937
928
|
elements:l,rect:g,offsetParent:y,strategy:c}):g);return{
|
|
938
929
|
top:(v.top-w.top+f.top)/b.y,bottom:(w.bottom-v.bottom+f.bottom)/b.y,
|
|
939
930
|
left:(v.left-w.left+f.left)/b.x,right:(w.right-v.right+f.right)/b.x}}
|
|
940
|
-
function
|
|
941
|
-
bottom:e.bottom-t.height,left:e.left-t.width}}function
|
|
942
|
-
return
|
|
931
|
+
function la(e,t){return{top:e.top-t.height,right:e.right-t.width,
|
|
932
|
+
bottom:e.bottom-t.height,left:e.left-t.width}}function ca(e){
|
|
933
|
+
return Nr.some((t=>e[t]>=0))}const sa=function(e){return void 0===e&&(e=0),{
|
|
943
934
|
name:"offset",options:e,async fn(t){var n,r
|
|
944
935
|
;const{x:a,y:o,placement:i,middlewareData:l}=t,c=await async function(e,t){
|
|
945
|
-
const{placement:n,platform:r,elements:a}=e,o=await(null==r.isRTL?void 0:r.isRTL(a.floating)),i=
|
|
936
|
+
const{placement:n,platform:r,elements:a}=e,o=await(null==r.isRTL?void 0:r.isRTL(a.floating)),i=qr(n),l=Zr(n),c="y"===Jr(n),s=["left","top"].includes(i)?-1:1,u=o&&c?-1:1,d=Kr(t,e)
|
|
946
937
|
;let{mainAxis:h,crossAxis:p,alignmentAxis:f}="number"==typeof d?{mainAxis:d,
|
|
947
938
|
crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d}
|
|
948
939
|
;return l&&"number"==typeof f&&(p="end"===l?-1*f:f),c?{x:p*u,y:h*s}:{x:h*s,y:p*u
|
|
949
940
|
}}(t,e)
|
|
950
941
|
;return i===(null==(n=l.offset)?void 0:n.placement)&&null!=(r=l.arrow)&&r.alignmentOffset?{}:{
|
|
951
|
-
x:a+c.x,y:o+c.y,data:{...c,placement:i}}}}};function
|
|
952
|
-
return
|
|
942
|
+
x:a+c.x,y:o+c.y,data:{...c,placement:i}}}}};function ua(e){
|
|
943
|
+
return pa(e)?(e.nodeName||"").toLowerCase():"#document"}function da(e){var t
|
|
953
944
|
;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}
|
|
954
|
-
function
|
|
955
|
-
;return null==(t=(
|
|
956
|
-
}function
|
|
957
|
-
function
|
|
958
|
-
function
|
|
959
|
-
function
|
|
960
|
-
return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof
|
|
961
|
-
}function
|
|
945
|
+
function ha(e){var t
|
|
946
|
+
;return null==(t=(pa(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement
|
|
947
|
+
}function pa(e){return e instanceof Node||e instanceof da(e).Node}
|
|
948
|
+
function fa(e){return e instanceof Element||e instanceof da(e).Element}
|
|
949
|
+
function ma(e){return e instanceof HTMLElement||e instanceof da(e).HTMLElement}
|
|
950
|
+
function va(e){
|
|
951
|
+
return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof da(e).ShadowRoot)
|
|
952
|
+
}function ga(e){const{overflow:t,overflowX:n,overflowY:r,display:a}=za(e)
|
|
962
953
|
;return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(a)
|
|
963
|
-
}function
|
|
964
|
-
const t=
|
|
954
|
+
}function ya(e){return["table","td","th"].includes(ua(e))}function ba(e){
|
|
955
|
+
const t=wa(),n=za(e)
|
|
965
956
|
;return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))
|
|
966
|
-
}function
|
|
957
|
+
}function wa(){
|
|
967
958
|
return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")
|
|
968
|
-
}function
|
|
969
|
-
function
|
|
959
|
+
}function Ca(e){return["html","body","#document"].includes(ua(e))}
|
|
960
|
+
function za(e){return da(e).getComputedStyle(e)}function Ma(e){return fa(e)?{
|
|
970
961
|
scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,
|
|
971
|
-
scrollTop:e.pageYOffset}}function
|
|
972
|
-
;const t=e.assignedSlot||e.parentNode||
|
|
973
|
-
;return
|
|
974
|
-
;return
|
|
975
|
-
function
|
|
976
|
-
;const a=
|
|
977
|
-
;return o?t.concat(i,i.visualViewport||[],
|
|
978
|
-
}function
|
|
962
|
+
scrollTop:e.pageYOffset}}function xa(e){if("html"===ua(e))return e
|
|
963
|
+
;const t=e.assignedSlot||e.parentNode||va(e)&&e.host||ha(e)
|
|
964
|
+
;return va(t)?t.host:t}function Ea(e){const t=xa(e)
|
|
965
|
+
;return Ca(t)?e.ownerDocument?e.ownerDocument.body:e.body:ma(t)&&ga(t)?t:Ea(t)}
|
|
966
|
+
function Sa(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0)
|
|
967
|
+
;const a=Ea(e),o=a===(null==(r=e.ownerDocument)?void 0:r.body),i=da(a)
|
|
968
|
+
;return o?t.concat(i,i.visualViewport||[],ga(a)?a:[],i.frameElement&&n?Sa(i.frameElement):[]):t.concat(a,Sa(a,[],n))
|
|
969
|
+
}function _a(e){const t=za(e)
|
|
979
970
|
;let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0
|
|
980
|
-
;const a=
|
|
981
|
-
;return l&&(n=o,r=i),{width:n,height:r,$:l}}function
|
|
982
|
-
return
|
|
983
|
-
;if(!
|
|
984
|
-
;const n=t.getBoundingClientRect(),{width:r,height:a,$:o}=
|
|
985
|
-
;let i=(o?
|
|
971
|
+
;const a=ma(e),o=a?e.offsetWidth:n,i=a?e.offsetHeight:r,l=jr(n)!==o||jr(r)!==i
|
|
972
|
+
;return l&&(n=o,r=i),{width:n,height:r,$:l}}function Ha(e){
|
|
973
|
+
return fa(e)?e:e.contextElement}function Da(e){const t=Ha(e)
|
|
974
|
+
;if(!ma(t))return $r(1)
|
|
975
|
+
;const n=t.getBoundingClientRect(),{width:r,height:a,$:o}=_a(t)
|
|
976
|
+
;let i=(o?jr(n.width):n.width)/r,l=(o?jr(n.height):n.height)/a
|
|
986
977
|
;return i&&Number.isFinite(i)||(i=1),l&&Number.isFinite(l)||(l=1),{x:i,y:l}}
|
|
987
|
-
const
|
|
988
|
-
x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:
|
|
989
|
-
function
|
|
990
|
-
;const a=e.getBoundingClientRect(),o=
|
|
991
|
-
;t&&(r?
|
|
992
|
-
return void 0===t&&(t=!1),!(!n||t&&n!==
|
|
978
|
+
const La=$r(0);function Va(e){const t=da(e);return wa()&&t.visualViewport?{
|
|
979
|
+
x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:La}
|
|
980
|
+
function Aa(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1)
|
|
981
|
+
;const a=e.getBoundingClientRect(),o=Ha(e);let i=$r(1)
|
|
982
|
+
;t&&(r?fa(r)&&(i=Da(r)):i=Da(e));const l=function(e,t,n){
|
|
983
|
+
return void 0===t&&(t=!1),!(!n||t&&n!==da(e))&&t}(o,n,r)?Va(o):$r(0)
|
|
993
984
|
;let c=(a.left+l.x)/i.x,s=(a.top+l.y)/i.y,u=a.width/i.x,d=a.height/i.y;if(o){
|
|
994
|
-
const e=
|
|
995
|
-
const e=
|
|
996
|
-
;c*=e.x,s*=e.y,u*=e.x,d*=e.y,c+=o,s+=i,n=
|
|
997
|
-
width:u,height:d,x:c,y:s})}const
|
|
998
|
-
return
|
|
999
|
-
function
|
|
1000
|
-
;if("viewport"===t)r=function(e,t){const n=
|
|
985
|
+
const e=da(o),t=r&&fa(r)?da(r):r;let n=e,a=n.frameElement;for(;a&&r&&t!==n;){
|
|
986
|
+
const e=Da(a),t=a.getBoundingClientRect(),r=za(a),o=t.left+(a.clientLeft+parseFloat(r.paddingLeft))*e.x,i=t.top+(a.clientTop+parseFloat(r.paddingTop))*e.y
|
|
987
|
+
;c*=e.x,s*=e.y,u*=e.x,d*=e.y,c+=o,s+=i,n=da(a),a=n.frameElement}}return aa({
|
|
988
|
+
width:u,height:d,x:c,y:s})}const ka=[":popover-open",":modal"];function Ta(e){
|
|
989
|
+
return ka.some((t=>{try{return e.matches(t)}catch(e){return!1}}))}
|
|
990
|
+
function Ra(e){return Aa(ha(e)).left+Ma(e).scrollLeft}function Pa(e,t,n){let r
|
|
991
|
+
;if("viewport"===t)r=function(e,t){const n=da(e),r=ha(e),a=n.visualViewport
|
|
1001
992
|
;let o=r.clientWidth,i=r.clientHeight,l=0,c=0;if(a){o=a.width,i=a.height
|
|
1002
|
-
;const e=
|
|
993
|
+
;const e=wa();(!e||e&&"fixed"===t)&&(l=a.offsetLeft,c=a.offsetTop)}return{
|
|
1003
994
|
width:o,height:i,x:l,y:c}}(e,n);else if("document"===t)r=function(e){
|
|
1004
|
-
const t=
|
|
1005
|
-
;let i=-n.scrollLeft+
|
|
1006
|
-
;return"rtl"===
|
|
1007
|
-
height:o,x:i,y:l}}(
|
|
1008
|
-
const n=
|
|
995
|
+
const t=ha(e),n=Ma(e),r=e.ownerDocument.body,a=Br(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Br(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight)
|
|
996
|
+
;let i=-n.scrollLeft+Ra(e);const l=-n.scrollTop
|
|
997
|
+
;return"rtl"===za(r).direction&&(i+=Br(t.clientWidth,r.clientWidth)-a),{width:a,
|
|
998
|
+
height:o,x:i,y:l}}(ha(e));else if(fa(t))r=function(e,t){
|
|
999
|
+
const n=Aa(e,!0,"fixed"===t),r=n.top+e.clientTop,a=n.left+e.clientLeft,o=ma(e)?Da(e):$r(1)
|
|
1009
1000
|
;return{width:e.clientWidth*o.x,height:e.clientHeight*o.y,x:a*o.x,y:r*o.y}
|
|
1010
|
-
}(t,n);else{const n=
|
|
1011
|
-
function
|
|
1012
|
-
;return!(n===t||!
|
|
1013
|
-
function
|
|
1014
|
-
scrollLeft:0,scrollTop:0};const c
|
|
1015
|
-
;if(r||!r&&!o)if(("body"!==
|
|
1016
|
-
;c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else a&&(c.x=
|
|
1001
|
+
}(t,n);else{const n=Va(e);r={...t,x:t.x-n.x,y:t.y-n.y}}return aa(r)}
|
|
1002
|
+
function Ia(e,t){const n=xa(e)
|
|
1003
|
+
;return!(n===t||!fa(n)||Ca(n))&&("fixed"===za(n).position||Ia(n,t))}
|
|
1004
|
+
function Oa(e,t,n){const r=ma(t),a=ha(t),o="fixed"===n,i=Aa(e,!0,o,t);let l={
|
|
1005
|
+
scrollLeft:0,scrollTop:0};const c=$r(0)
|
|
1006
|
+
;if(r||!r&&!o)if(("body"!==ua(t)||ga(a))&&(l=Ma(t)),r){const e=Aa(t,!0,o,t)
|
|
1007
|
+
;c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else a&&(c.x=Ra(a));return{
|
|
1017
1008
|
x:i.left+l.scrollLeft-c.x,y:i.top+l.scrollTop-c.y,width:i.width,height:i.height}
|
|
1018
|
-
}function
|
|
1019
|
-
return
|
|
1020
|
-
function
|
|
1021
|
-
;for(;r&&
|
|
1022
|
-
;return r&&("html"===
|
|
1023
|
-
let t=
|
|
1024
|
-
const
|
|
1009
|
+
}function Na(e,t){
|
|
1010
|
+
return ma(e)&&"fixed"!==za(e).position?t?t(e):e.offsetParent:null}
|
|
1011
|
+
function Fa(e,t){const n=da(e);if(!ma(e)||Ta(e))return n;let r=Na(e,t)
|
|
1012
|
+
;for(;r&&ya(r)&&"static"===za(r).position;)r=Na(r,t)
|
|
1013
|
+
;return r&&("html"===ua(r)||"body"===ua(r)&&"static"===za(r).position&&!ba(r))?n:r||function(e){
|
|
1014
|
+
let t=xa(e);for(;ma(t)&&!Ca(t);){if(ba(t))return t;t=xa(t)}return null}(e)||n}
|
|
1015
|
+
const Ba={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){
|
|
1025
1016
|
let{elements:t,rect:n,offsetParent:r,strategy:a}=e
|
|
1026
|
-
;const o="fixed"===a,i=
|
|
1027
|
-
;let c={scrollLeft:0,scrollTop:0},s
|
|
1028
|
-
;if((d||!d&&!o)&&(("body"!==
|
|
1029
|
-
;s=
|
|
1017
|
+
;const o="fixed"===a,i=ha(r),l=!!t&&Ta(t.floating);if(r===i||l&&o)return n
|
|
1018
|
+
;let c={scrollLeft:0,scrollTop:0},s=$r(1);const u=$r(0),d=ma(r)
|
|
1019
|
+
;if((d||!d&&!o)&&(("body"!==ua(r)||ga(i))&&(c=Ma(r)),ma(r))){const e=Aa(r)
|
|
1020
|
+
;s=Da(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}return{width:n.width*s.x,
|
|
1030
1021
|
height:n.height*s.y,x:n.x*s.x-c.scrollLeft*s.x+u.x,y:n.y*s.y-c.scrollTop*s.y+u.y
|
|
1031
|
-
}},getDocumentElement:
|
|
1022
|
+
}},getDocumentElement:ha,getClippingRect:function(e){
|
|
1032
1023
|
let{element:t,boundary:n,rootBoundary:r,strategy:a}=e
|
|
1033
1024
|
;const o=[..."clippingAncestors"===n?function(e,t){const n=t.get(e)
|
|
1034
|
-
;if(n)return n;let r=
|
|
1035
|
-
;const o="fixed"===
|
|
1036
|
-
const t=
|
|
1037
|
-
;n||"fixed"!==t.position||(a=null),(o?!n&&!a:!n&&"static"===t.position&&a&&["absolute","fixed"].includes(a.position)||
|
|
1038
|
-
i=
|
|
1039
|
-
}(t,this._c):[].concat(n),r],i=o[0],l=o.reduce(((e,n)=>{const r=
|
|
1040
|
-
;return e.top
|
|
1041
|
-
e.right=
|
|
1042
|
-
e.left
|
|
1043
|
-
height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:
|
|
1025
|
+
;if(n)return n;let r=Sa(e,[],!1).filter((e=>fa(e)&&"body"!==ua(e))),a=null
|
|
1026
|
+
;const o="fixed"===za(e).position;let i=o?xa(e):e;for(;fa(i)&&!Ca(i);){
|
|
1027
|
+
const t=za(i),n=ba(i)
|
|
1028
|
+
;n||"fixed"!==t.position||(a=null),(o?!n&&!a:!n&&"static"===t.position&&a&&["absolute","fixed"].includes(a.position)||ga(i)&&!n&&Ia(e,i))?r=r.filter((e=>e!==i)):a=t,
|
|
1029
|
+
i=xa(i)}return t.set(e,r),r
|
|
1030
|
+
}(t,this._c):[].concat(n),r],i=o[0],l=o.reduce(((e,n)=>{const r=Pa(t,n,a)
|
|
1031
|
+
;return e.top=Br(r.top,e.top),
|
|
1032
|
+
e.right=Fr(r.right,e.right),e.bottom=Fr(r.bottom,e.bottom),
|
|
1033
|
+
e.left=Br(r.left,e.left),e}),Pa(t,i,a));return{width:l.right-l.left,
|
|
1034
|
+
height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:Fa,
|
|
1044
1035
|
getElementRects:async function(e){
|
|
1045
|
-
const t=this.getOffsetParent||
|
|
1046
|
-
reference:
|
|
1036
|
+
const t=this.getOffsetParent||Fa,n=this.getDimensions;return{
|
|
1037
|
+
reference:Oa(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,
|
|
1047
1038
|
...await n(e.floating)}}},getClientRects:function(e){
|
|
1048
1039
|
return Array.from(e.getClientRects())},getDimensions:function(e){
|
|
1049
|
-
const{width:t,height:n}=
|
|
1050
|
-
isElement:
|
|
1051
|
-
;function
|
|
1052
|
-
;const{ancestorScroll:a=!0,ancestorResize:o=!0,elementResize:i="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:c=!1}=r,s=
|
|
1040
|
+
const{width:t,height:n}=_a(e);return{width:t,height:n}},getScale:Da,
|
|
1041
|
+
isElement:fa,isRTL:function(e){return"rtl"===za(e).direction}}
|
|
1042
|
+
;function ja(e,t,n,r){void 0===r&&(r={})
|
|
1043
|
+
;const{ancestorScroll:a=!0,ancestorResize:o=!0,elementResize:i="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:c=!1}=r,s=Ha(e),u=a||o?[...s?Sa(s):[],...Sa(t)]:[]
|
|
1053
1044
|
;u.forEach((e=>{a&&e.addEventListener("scroll",n,{passive:!0
|
|
1054
1045
|
}),o&&e.addEventListener("resize",n)}));const d=s&&l?function(e,t){let n,r=null
|
|
1055
|
-
;const a=
|
|
1046
|
+
;const a=ha(e);function o(){var e
|
|
1056
1047
|
;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function i(l,c){
|
|
1057
1048
|
void 0===l&&(l=!1),void 0===c&&(c=1),o()
|
|
1058
1049
|
;const{left:s,top:u,width:d,height:h}=e.getBoundingClientRect()
|
|
1059
1050
|
;if(l||t(),!d||!h)return;const p={
|
|
1060
|
-
rootMargin:-
|
|
1061
|
-
threshold
|
|
1051
|
+
rootMargin:-Ur(u)+"px "+-Ur(a.clientWidth-(s+d))+"px "+-Ur(a.clientHeight-(u+h))+"px "+-Ur(s)+"px",
|
|
1052
|
+
threshold:Br(0,Fr(1,c))||1};let f=!0;function m(e){
|
|
1062
1053
|
const t=e[0].intersectionRatio;if(t!==c){if(!f)return i()
|
|
1063
1054
|
;t?i(!1,t):n=setTimeout((()=>{i(!1,1e-7)}),100)}f=!1}try{
|
|
1064
1055
|
r=new IntersectionObserver(m,{...p,root:a.ownerDocument})}catch(e){
|
|
@@ -1066,36 +1057,36 @@ r=new IntersectionObserver(m,p)}r.observe(e)}(!0),o}(s,n):null;let h,p=-1,f=null
|
|
|
1066
1057
|
;i&&(f=new ResizeObserver((e=>{let[r]=e
|
|
1067
1058
|
;r&&r.target===s&&f&&(f.unobserve(t),cancelAnimationFrame(p),
|
|
1068
1059
|
p=requestAnimationFrame((()=>{var e;null==(e=f)||e.observe(t)}))),n()
|
|
1069
|
-
})),s&&!c&&f.observe(s),f.observe(t));let m=c?
|
|
1070
|
-
const r=
|
|
1060
|
+
})),s&&!c&&f.observe(s),f.observe(t));let m=c?Aa(e):null;return c&&function t(){
|
|
1061
|
+
const r=Aa(e)
|
|
1071
1062
|
;!m||r.x===m.x&&r.y===m.y&&r.width===m.width&&r.height===m.height||n()
|
|
1072
1063
|
;m=r,h=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach((e=>{
|
|
1073
1064
|
a&&e.removeEventListener("scroll",n),o&&e.removeEventListener("resize",n)
|
|
1074
1065
|
})),null==d||d(),null==(e=f)||e.disconnect(),f=null,c&&cancelAnimationFrame(h)}}
|
|
1075
|
-
const
|
|
1066
|
+
const Ua=function(e){return void 0===e&&(e={}),{name:"shift",options:e,
|
|
1076
1067
|
async fn(t){
|
|
1077
1068
|
const{x:n,y:r,placement:a}=t,{mainAxis:o=!0,crossAxis:i=!1,limiter:l={fn:e=>{
|
|
1078
|
-
let{x:t,y:n}=e;return{x:t,y:n}}},...c}=
|
|
1079
|
-
},u=await
|
|
1080
|
-
const e="y"===h?"bottom":"right";p=
|
|
1081
|
-
const e="y"===d?"bottom":"right";f=
|
|
1069
|
+
let{x:t,y:n}=e;return{x:t,y:n}}},...c}=Kr(e,t),s={x:n,y:r
|
|
1070
|
+
},u=await ia(t,c),d=Jr(qr(a)),h=Xr(d);let p=s[h],f=s[d];if(o){
|
|
1071
|
+
const e="y"===h?"bottom":"right";p=Gr(p+u["y"===h?"top":"left"],p,p-u[e])}if(i){
|
|
1072
|
+
const e="y"===d?"bottom":"right";f=Gr(f+u["y"===d?"top":"left"],f,f-u[e])}
|
|
1082
1073
|
const m=l.fn({...t,[h]:p,[d]:f});return{...m,data:{x:m.x-n,y:m.y-r}}}}
|
|
1083
|
-
}
|
|
1074
|
+
},$a=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){
|
|
1084
1075
|
var n,r
|
|
1085
|
-
;const{placement:a,middlewareData:o,rects:i,initialPlacement:l,platform:c,elements:s}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:m=!0,...v}=
|
|
1076
|
+
;const{placement:a,middlewareData:o,rects:i,initialPlacement:l,platform:c,elements:s}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:m=!0,...v}=Kr(e,t)
|
|
1086
1077
|
;if(null!=(n=o.arrow)&&n.alignmentOffset)return{}
|
|
1087
|
-
;const g=
|
|
1088
|
-
const t=
|
|
1089
|
-
;h||"none"===f||w.push(...function(e,t,n,r){const a=
|
|
1078
|
+
;const g=qr(a),y=qr(l)===l,b=await(null==c.isRTL?void 0:c.isRTL(s.floating)),w=h||(y||!m?[na(l)]:function(e){
|
|
1079
|
+
const t=na(e);return[ta(e),t,ta(t)]}(l))
|
|
1080
|
+
;h||"none"===f||w.push(...function(e,t,n,r){const a=Zr(e);let o=function(e,t,n){
|
|
1090
1081
|
const r=["left","right"],a=["right","left"],o=["top","bottom"],i=["bottom","top"]
|
|
1091
1082
|
;switch(e){case"top":case"bottom":return n?t?a:r:t?r:a;case"left":case"right":
|
|
1092
|
-
return t?o:i;default:return[]}}(
|
|
1093
|
-
;return a&&(o=o.map((e=>e+"-"+a)),t&&(o=o.concat(o.map(
|
|
1094
|
-
;const C=[l,...w],z=await
|
|
1083
|
+
return t?o:i;default:return[]}}(qr(e),"start"===n,r)
|
|
1084
|
+
;return a&&(o=o.map((e=>e+"-"+a)),t&&(o=o.concat(o.map(ta)))),o}(l,m,f,b))
|
|
1085
|
+
;const C=[l,...w],z=await ia(t,v),M=[]
|
|
1095
1086
|
;let x=(null==(r=o.flip)?void 0:r.overflows)||[];if(u&&M.push(z[g]),d){
|
|
1096
|
-
const e=function(e,t,n){void 0===n&&(n=!1);const r=
|
|
1087
|
+
const e=function(e,t,n){void 0===n&&(n=!1);const r=Zr(e),a=ea(e),o=Qr(a)
|
|
1097
1088
|
;let i="x"===a?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top"
|
|
1098
|
-
;return t.reference[o]>t.floating[o]&&(i=
|
|
1089
|
+
;return t.reference[o]>t.floating[o]&&(i=na(i)),[i,na(i)]}(a,i,b)
|
|
1099
1090
|
;M.push(z[e[0]],z[e[1]])}if(x=[...x,{placement:a,overflows:M
|
|
1100
1091
|
}],!M.every((e=>e<=0))){var E,S
|
|
1101
1092
|
;const e=((null==(E=o.flip)?void 0:E.index)||0)+1,t=C[e];if(t)return{data:{
|
|
@@ -1104,174 +1095,174 @@ index:e,overflows:x},reset:{placement:t}}
|
|
|
1104
1095
|
;if(!n)switch(p){case"bestFit":{var _
|
|
1105
1096
|
;const e=null==(_=x.map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:_[0]
|
|
1106
1097
|
;e&&(n=e);break}case"initialPlacement":n=l}if(a!==n)return{reset:{placement:n}}}
|
|
1107
|
-
return{}}}},
|
|
1098
|
+
return{}}}},Ya=function(e){return void 0===e&&(e={}),{name:"size",options:e,
|
|
1108
1099
|
async fn(t){
|
|
1109
|
-
const{placement:n,rects:r,platform:a,elements:o}=t,{apply:i=(()=>{}),...l}=
|
|
1100
|
+
const{placement:n,rects:r,platform:a,elements:o}=t,{apply:i=(()=>{}),...l}=Kr(e,t),c=await ia(t,l),s=qr(n),u=Zr(n),d="y"===Jr(n),{width:h,height:p}=r.floating
|
|
1110
1101
|
;let f,m
|
|
1111
1102
|
;"top"===s||"bottom"===s?(f=s,m=u===(await(null==a.isRTL?void 0:a.isRTL(o.floating))?"start":"end")?"left":"right"):(m=s,
|
|
1112
1103
|
f="end"===u?"top":"bottom");const v=p-c[f],g=h-c[m],y=!t.middlewareData.shift
|
|
1113
|
-
;let b=v,w=g;if(d){const e=h-c.left-c.right;w=u||y?
|
|
1114
|
-
const e=p-c.top-c.bottom;b=u||y?
|
|
1115
|
-
const e
|
|
1116
|
-
;d?w=h-2*(0!==e||0!==t?e+t
|
|
1104
|
+
;let b=v,w=g;if(d){const e=h-c.left-c.right;w=u||y?Fr(g,e):e}else{
|
|
1105
|
+
const e=p-c.top-c.bottom;b=u||y?Fr(v,e):e}if(y&&!u){
|
|
1106
|
+
const e=Br(c.left,0),t=Br(c.right,0),n=Br(c.top,0),r=Br(c.bottom,0)
|
|
1107
|
+
;d?w=h-2*(0!==e||0!==t?e+t:Br(c.left,c.right)):b=p-2*(0!==n||0!==r?n+r:Br(c.top,c.bottom))
|
|
1117
1108
|
}await i({...t,availableWidth:w,availableHeight:b})
|
|
1118
1109
|
;const C=await a.getDimensions(o.floating);return h!==C.width||p!==C.height?{
|
|
1119
|
-
reset:{rects:!0}}:{}}}},
|
|
1110
|
+
reset:{rects:!0}}:{}}}},Wa=function(e){return void 0===e&&(e={}),{name:"hide",
|
|
1120
1111
|
options:e,async fn(t){
|
|
1121
|
-
const{rects:n}=t,{strategy:r="referenceHidden",...a}=
|
|
1122
|
-
case"referenceHidden":{const e=
|
|
1123
|
-
}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:
|
|
1124
|
-
case"escaped":{const e=
|
|
1125
|
-
data:{escapedOffsets:e,escaped:
|
|
1112
|
+
const{rects:n}=t,{strategy:r="referenceHidden",...a}=Kr(e,t);switch(r){
|
|
1113
|
+
case"referenceHidden":{const e=la(await ia(t,{...a,elementContext:"reference"
|
|
1114
|
+
}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:ca(e)}}}
|
|
1115
|
+
case"escaped":{const e=la(await ia(t,{...a,altBoundary:!0}),n.floating);return{
|
|
1116
|
+
data:{escapedOffsets:e,escaped:ca(e)}}}default:return{}}}}},Ga=e=>({
|
|
1126
1117
|
name:"arrow",options:e,async fn(t){
|
|
1127
|
-
const{x:n,y:r,placement:a,rects:o,platform:i,elements:l,middlewareData:c}=t,{element:s,padding:u=0}=
|
|
1128
|
-
;if(null==s)return{};const d=
|
|
1129
|
-
},p=
|
|
1118
|
+
const{x:n,y:r,placement:a,rects:o,platform:i,elements:l,middlewareData:c}=t,{element:s,padding:u=0}=Kr(e,t)||{}
|
|
1119
|
+
;if(null==s)return{};const d=ra(u),h={x:n,y:r
|
|
1120
|
+
},p=ea(a),f=Qr(p),m=await i.getDimensions(s),v="y"===p,g=v?"top":"left",y=v?"bottom":"right",b=v?"clientHeight":"clientWidth",w=o.reference[f]+o.reference[p]-h[p]-o.floating[f],C=h[p]-o.reference[p],z=await(null==i.getOffsetParent?void 0:i.getOffsetParent(s))
|
|
1130
1121
|
;let M=z?z[b]:0
|
|
1131
1122
|
;M&&await(null==i.isElement?void 0:i.isElement(z))||(M=l.floating[b]||o.floating[f])
|
|
1132
|
-
;const x=w/2-C/2,E=M/2-m[f]/2-1,S=
|
|
1123
|
+
;const x=w/2-C/2,E=M/2-m[f]/2-1,S=Fr(d[g],E),_=Fr(d[y],E),H=S,D=M-m[f]-_,L=M/2-m[f]/2+x,V=Gr(H,L,D),A=!c.arrow&&null!=Zr(a)&&L!==V&&o.reference[f]/2-(L<H?S:_)-m[f]/2<0,k=A?L<H?L-H:L-D:0
|
|
1133
1124
|
;return{[p]:h[p]+k,data:{[p]:V,centerOffset:L-V-k,...A&&{alignmentOffset:k}},
|
|
1134
|
-
reset:A}}}),
|
|
1135
|
-
const{x:n,y:r,placement:a,rects:o,middlewareData:i}=t,{offset:l=0,mainAxis:c=!0,crossAxis:s=!0}=
|
|
1136
|
-
x:n,y:r},d=
|
|
1137
|
-
;const m=
|
|
1125
|
+
reset:A}}}),Ka=function(e){return void 0===e&&(e={}),{options:e,fn(t){
|
|
1126
|
+
const{x:n,y:r,placement:a,rects:o,middlewareData:i}=t,{offset:l=0,mainAxis:c=!0,crossAxis:s=!0}=Kr(e,t),u={
|
|
1127
|
+
x:n,y:r},d=Jr(a),h=Xr(d);let p=u[h],f=u[d]
|
|
1128
|
+
;const m=Kr(l,t),v="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,
|
|
1138
1129
|
crossAxis:0,...m};if(c){
|
|
1139
1130
|
const e="y"===h?"height":"width",t=o.reference[h]-o.floating[e]+v.mainAxis,n=o.reference[h]+o.reference[e]-v.mainAxis
|
|
1140
1131
|
;p<t?p=t:p>n&&(p=n)}if(s){var g,y
|
|
1141
|
-
;const e="y"===h?"width":"height",t=["top","left"].includes(
|
|
1142
|
-
;f<n?f=n:f>r&&(f=r)}return{[h]:p,[d]:f}}}},
|
|
1143
|
-
platform
|
|
1132
|
+
;const e="y"===h?"width":"height",t=["top","left"].includes(qr(a)),n=o.reference[d]-o.floating[e]+(t&&(null==(g=i.offset)?void 0:g[d])||0)+(t?0:v.crossAxis),r=o.reference[d]+o.reference[e]+(t?0:(null==(y=i.offset)?void 0:y[d])||0)-(t?v.crossAxis:0)
|
|
1133
|
+
;f<n?f=n:f>r&&(f=r)}return{[h]:p,[d]:f}}}},qa=(e,t,n)=>{const r=new Map,a={
|
|
1134
|
+
platform:Ba,...n},o={...a.platform,_c:r};return(async(e,t,n)=>{
|
|
1144
1135
|
const{placement:r="bottom",strategy:a="absolute",middleware:o=[],platform:i}=n,l=o.filter(Boolean),c=await(null==i.isRTL?void 0:i.isRTL(t))
|
|
1145
1136
|
;let s=await i.getElementRects({reference:e,floating:t,strategy:a
|
|
1146
|
-
}),{x:u,y:d}=
|
|
1137
|
+
}),{x:u,y:d}=oa(s,r,c),h=r,p={},f=0;for(let n=0;n<l.length;n++){
|
|
1147
1138
|
const{name:o,fn:m}=l[n],{x:v,y:g,data:y,reset:b}=await m({x:u,y:d,
|
|
1148
1139
|
initialPlacement:r,placement:h,strategy:a,middlewareData:p,rects:s,platform:i,
|
|
1149
1140
|
elements:{reference:e,floating:t}});u=null!=v?v:u,d=null!=g?g:d,p={...p,[o]:{
|
|
1150
1141
|
...p[o],...y}},b&&f<=50&&(f++,"object"==typeof b&&(b.placement&&(h=b.placement),
|
|
1151
1142
|
b.rects&&(s=!0===b.rects?await i.getElementRects({reference:e,floating:t,
|
|
1152
|
-
strategy:a}):b.rects),({x:u,y:d}=
|
|
1153
|
-
strategy:a,middlewareData:p}})(e,t,{...a,platform:o})},
|
|
1143
|
+
strategy:a}):b.rects),({x:u,y:d}=oa(s,h,c))),n=-1)}return{x:u,y:d,placement:h,
|
|
1144
|
+
strategy:a,middlewareData:p}})(e,t,{...a,platform:o})},Za=e=>({name:"arrow",
|
|
1154
1145
|
options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e
|
|
1155
|
-
;return n&&(a=n,{}.hasOwnProperty.call(a,"current"))?null!=n.current?
|
|
1156
|
-
element:n.current,padding:r}).fn(t):{}:n?
|
|
1157
|
-
;var a}});var
|
|
1158
|
-
;function
|
|
1146
|
+
;return n&&(a=n,{}.hasOwnProperty.call(a,"current"))?null!=n.current?Ga({
|
|
1147
|
+
element:n.current,padding:r}).fn(t):{}:n?Ga({element:n,padding:r}).fn(t):{}
|
|
1148
|
+
;var a}});var Xa="undefined"!=typeof document?e.useLayoutEffect:e.useEffect
|
|
1149
|
+
;function Qa(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1
|
|
1159
1150
|
;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,a
|
|
1160
1151
|
;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){
|
|
1161
|
-
if(n=e.length,n!==t.length)return!1;for(r=n;0!=r--;)if(!
|
|
1152
|
+
if(n=e.length,n!==t.length)return!1;for(r=n;0!=r--;)if(!Qa(e[r],t[r]))return!1
|
|
1162
1153
|
;return!0}if(a=Object.keys(e),n=a.length,n!==Object.keys(t).length)return!1
|
|
1163
1154
|
;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,a[r]))return!1;for(r=n;0!=r--;){
|
|
1164
|
-
const n=a[r];if(("_owner"!==n||!e.$$typeof)&&!
|
|
1165
|
-
return e!=e&&t!=t}function
|
|
1155
|
+
const n=a[r];if(("_owner"!==n||!e.$$typeof)&&!Qa(e[n],t[n]))return!1}return!0}
|
|
1156
|
+
return e!=e&&t!=t}function Ja(e){if("undefined"==typeof window)return 1
|
|
1166
1157
|
;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}
|
|
1167
|
-
function
|
|
1168
|
-
const t=r.useRef(e);return
|
|
1169
|
-
const
|
|
1158
|
+
function eo(e,t){const n=Ja(e);return Math.round(t*n)/n}function to(e){
|
|
1159
|
+
const t=r.useRef(e);return Xa((()=>{t.current=e})),t}
|
|
1160
|
+
const no=e.forwardRef(((t,n)=>{const{children:r,width:a=10,height:o=5,...i}=t
|
|
1170
1161
|
;return e.createElement(yn.svg,un({},i,{ref:n,width:a,height:o,
|
|
1171
1162
|
viewBox:"0 0 30 10",preserveAspectRatio:"none"
|
|
1172
1163
|
}),t.asChild?r:e.createElement("polygon",{points:"0,0 30,0 15,10"}))}))
|
|
1173
|
-
;function
|
|
1164
|
+
;function ro(t){const[n,r]=e.useState(void 0);return Rr((()=>{if(t){r({
|
|
1174
1165
|
width:t.offsetWidth,height:t.offsetHeight});const e=new ResizeObserver((e=>{
|
|
1175
1166
|
if(!Array.isArray(e))return;if(!e.length)return;const n=e[0];let a,o
|
|
1176
1167
|
;if("borderBoxSize"in n){const e=n.borderBoxSize,t=Array.isArray(e)?e[0]:e
|
|
1177
1168
|
;a=t.inlineSize,o=t.blockSize}else a=t.offsetWidth,o=t.offsetHeight;r({width:a,
|
|
1178
1169
|
height:o})}));return e.observe(t,{box:"border-box"}),()=>e.unobserve(t)}
|
|
1179
1170
|
r(void 0)}),[t]),n}
|
|
1180
|
-
const
|
|
1181
|
-
const{__scopePopper:r,virtualRef:a,...o}=t,i=
|
|
1171
|
+
const ao="Popper",[oo,io]=ar(ao),[lo,co]=oo(ao),so=e.forwardRef(((t,n)=>{
|
|
1172
|
+
const{__scopePopper:r,virtualRef:a,...o}=t,i=co("PopperAnchor",r),l=e.useRef(null),c=hn(n,l)
|
|
1182
1173
|
;return e.useEffect((()=>{
|
|
1183
1174
|
i.onAnchorChange((null==a?void 0:a.current)||l.current)
|
|
1184
1175
|
})),a?null:e.createElement(yn.div,un({},o,{ref:c}))
|
|
1185
|
-
})),
|
|
1176
|
+
})),uo="PopperContent",[ho,po]=oo(uo),fo=e.forwardRef(((t,n)=>{
|
|
1186
1177
|
var o,i,l,c,s,u,d,h
|
|
1187
|
-
;const{__scopePopper:p,side:f="bottom",sideOffset:m=0,align:v="center",alignOffset:g=0,arrowPadding:y=0,avoidCollisions:b=!0,collisionBoundary:w=[],collisionPadding:C=0,sticky:z="partial",hideWhenDetached:M=!1,updatePositionStrategy:x="optimized",onPlaced:E,...S}=t,_=
|
|
1178
|
+
;const{__scopePopper:p,side:f="bottom",sideOffset:m=0,align:v="center",alignOffset:g=0,arrowPadding:y=0,avoidCollisions:b=!0,collisionBoundary:w=[],collisionPadding:C=0,sticky:z="partial",hideWhenDetached:M=!1,updatePositionStrategy:x="optimized",onPlaced:E,...S}=t,_=co(uo,p),[H,D]=e.useState(null),L=hn(n,(e=>D(e))),[V,A]=e.useState(null),k=ro(V),T=null!==(o=null==k?void 0:k.width)&&void 0!==o?o:0,R=null!==(i=null==k?void 0:k.height)&&void 0!==i?i:0,P=f+("center"!==v?"-"+v:""),I="number"==typeof C?C:{
|
|
1188
1179
|
top:0,right:0,bottom:0,left:0,...C},O=Array.isArray(w)?w:[w],N=O.length>0,F={
|
|
1189
|
-
padding:I,boundary:O.filter(
|
|
1180
|
+
padding:I,boundary:O.filter(yo),altBoundary:N
|
|
1190
1181
|
},{refs:B,floatingStyles:j,placement:U,isPositioned:$,middlewareData:Y}=function(e){
|
|
1191
1182
|
void 0===e&&(e={})
|
|
1192
1183
|
;const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:i,elements:{reference:l,floating:c}={},transform:s=!0,whileElementsMounted:u,open:d}=e,[h,p]=r.useState({
|
|
1193
1184
|
x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1
|
|
1194
|
-
}),[f,m]=r.useState(o);
|
|
1185
|
+
}),[f,m]=r.useState(o);Qa(f,o)||m(o)
|
|
1195
1186
|
;const[v,g]=r.useState(null),[y,b]=r.useState(null),w=r.useCallback((e=>{
|
|
1196
1187
|
e!==x.current&&(x.current=e,g(e))}),[]),C=r.useCallback((e=>{
|
|
1197
1188
|
e!==E.current&&(E.current=e,b(e))
|
|
1198
|
-
}),[]),z=l||v,M=c||y,x=r.useRef(null),E=r.useRef(null),S=r.useRef(h),_=null!=u,H=
|
|
1189
|
+
}),[]),z=l||v,M=c||y,x=r.useRef(null),E=r.useRef(null),S=r.useRef(h),_=null!=u,H=to(u),D=to(i),L=r.useCallback((()=>{
|
|
1199
1190
|
if(!x.current||!E.current)return;const e={placement:t,strategy:n,middleware:f}
|
|
1200
|
-
;D.current&&(e.platform=D.current),
|
|
1191
|
+
;D.current&&(e.platform=D.current),qa(x.current,E.current,e).then((e=>{const t={
|
|
1201
1192
|
...e,isPositioned:!0}
|
|
1202
|
-
;V.current&&!
|
|
1203
|
-
}),[f,t,n,D]);
|
|
1193
|
+
;V.current&&!Qa(S.current,t)&&(S.current=t,a.flushSync((()=>{p(t)})))}))
|
|
1194
|
+
}),[f,t,n,D]);Xa((()=>{
|
|
1204
1195
|
!1===d&&S.current.isPositioned&&(S.current.isPositioned=!1,p((e=>({...e,
|
|
1205
|
-
isPositioned:!1}))))}),[d]);const V=r.useRef(!1);
|
|
1206
|
-
V.current=!1})),[]),
|
|
1196
|
+
isPositioned:!1}))))}),[d]);const V=r.useRef(!1);Xa((()=>(V.current=!0,()=>{
|
|
1197
|
+
V.current=!1})),[]),Xa((()=>{if(z&&(x.current=z),M&&(E.current=M),z&&M){
|
|
1207
1198
|
if(H.current)return H.current(z,M,L);L()}}),[z,M,L,H,_])
|
|
1208
1199
|
;const A=r.useMemo((()=>({reference:x,floating:E,setReference:w,setFloating:C
|
|
1209
1200
|
})),[w,C]),k=r.useMemo((()=>({reference:z,floating:M
|
|
1210
1201
|
})),[z,M]),T=r.useMemo((()=>{const e={position:n,left:0,top:0}
|
|
1211
|
-
;if(!k.floating)return e;const t=
|
|
1202
|
+
;if(!k.floating)return e;const t=eo(k.floating,h.x),r=eo(k.floating,h.y)
|
|
1212
1203
|
;return s?{...e,transform:"translate("+t+"px, "+r+"px)",
|
|
1213
|
-
...
|
|
1204
|
+
...Ja(k.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}
|
|
1214
1205
|
}),[n,s,k.floating,h.x,h.y]);return r.useMemo((()=>({...h,update:L,refs:A,
|
|
1215
1206
|
elements:k,floatingStyles:T})),[h,L,A,k,T])}({strategy:"fixed",placement:P,
|
|
1216
|
-
whileElementsMounted:(...e)=>
|
|
1217
|
-
reference:_.anchor},middleware:[
|
|
1218
|
-
mainAxis:!0,crossAxis:!1,limiter:"partial"===z?
|
|
1219
|
-
}),
|
|
1207
|
+
whileElementsMounted:(...e)=>ja(...e,{animationFrame:"always"===x}),elements:{
|
|
1208
|
+
reference:_.anchor},middleware:[sa({mainAxis:m+R,alignmentAxis:g}),b&&Ua({
|
|
1209
|
+
mainAxis:!0,crossAxis:!1,limiter:"partial"===z?Ka():void 0,...F}),b&&$a({...F
|
|
1210
|
+
}),Ya({...F,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{
|
|
1220
1211
|
const{width:a,height:o}=t.reference,i=e.floating.style
|
|
1221
1212
|
;i.setProperty("--radix-popper-available-width",`${n}px`),
|
|
1222
1213
|
i.setProperty("--radix-popper-available-height",`${r}px`),
|
|
1223
1214
|
i.setProperty("--radix-popper-anchor-width",`${a}px`),
|
|
1224
|
-
i.setProperty("--radix-popper-anchor-height",`${o}px`)}}),V&&
|
|
1225
|
-
padding:y}),
|
|
1226
|
-
...F})]}),[W,G]=
|
|
1215
|
+
i.setProperty("--radix-popper-anchor-height",`${o}px`)}}),V&&Za({element:V,
|
|
1216
|
+
padding:y}),bo({arrowWidth:T,arrowHeight:R}),M&&Wa({strategy:"referenceHidden",
|
|
1217
|
+
...F})]}),[W,G]=wo(U),K=ir(E);Rr((()=>{$&&(null==K||K())}),[$,K])
|
|
1227
1218
|
;const q=null===(l=Y.arrow)||void 0===l?void 0:l.x,Z=null===(c=Y.arrow)||void 0===c?void 0:c.y,X=0!==(null===(s=Y.arrow)||void 0===s?void 0:s.centerOffset),[Q,J]=e.useState()
|
|
1228
|
-
;return
|
|
1219
|
+
;return Rr((()=>{H&&J(window.getComputedStyle(H).zIndex)
|
|
1229
1220
|
}),[H]),e.createElement("div",{ref:B.setFloating,
|
|
1230
1221
|
"data-radix-popper-content-wrapper":"",style:{...j,
|
|
1231
1222
|
transform:$?j.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Q,
|
|
1232
1223
|
"--radix-popper-transform-origin":[null===(u=Y.transformOrigin)||void 0===u?void 0:u.x,null===(d=Y.transformOrigin)||void 0===d?void 0:d.y].join(" ")
|
|
1233
|
-
},dir:t.dir},e.createElement(
|
|
1224
|
+
},dir:t.dir},e.createElement(ho,{scope:p,placedSide:W,onArrowChange:A,arrowX:q,
|
|
1234
1225
|
arrowY:Z,shouldHideArrow:X},e.createElement(yn.div,un({"data-side":W,
|
|
1235
1226
|
"data-align":G},S,{ref:L,style:{...S.style,animation:$?void 0:"none",
|
|
1236
1227
|
opacity:null!==(h=Y.hide)&&void 0!==h&&h.referenceHidden?0:void 0}}))))
|
|
1237
|
-
})),
|
|
1238
|
-
},
|
|
1239
|
-
const{__scopePopper:r,...a}=t,o=
|
|
1228
|
+
})),mo="PopperArrow",vo={top:"bottom",right:"left",bottom:"top",left:"right"
|
|
1229
|
+
},go=e.forwardRef((function(t,n){
|
|
1230
|
+
const{__scopePopper:r,...a}=t,o=po(mo,r),i=vo[o.placedSide]
|
|
1240
1231
|
;return e.createElement("span",{ref:o.onArrowChange,style:{position:"absolute",
|
|
1241
1232
|
left:o.arrowX,top:o.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",
|
|
1242
1233
|
bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{
|
|
1243
1234
|
top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",
|
|
1244
1235
|
bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"
|
|
1245
1236
|
}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0}
|
|
1246
|
-
},e.createElement(
|
|
1247
|
-
;function
|
|
1237
|
+
},e.createElement(no,un({},a,{ref:n,style:{...a.style,display:"block"}})))}))
|
|
1238
|
+
;function yo(e){return null!==e}const bo=e=>({name:"transformOrigin",options:e,
|
|
1248
1239
|
fn(t){var n,r,a,o,i
|
|
1249
|
-
;const{placement:l,rects:c,middlewareData:s}=t,u=0!==(null===(n=s.arrow)||void 0===n?void 0:n.centerOffset),d=u?0:e.arrowWidth,h=u?0:e.arrowHeight,[p,f]=
|
|
1240
|
+
;const{placement:l,rects:c,middlewareData:s}=t,u=0!==(null===(n=s.arrow)||void 0===n?void 0:n.centerOffset),d=u?0:e.arrowWidth,h=u?0:e.arrowHeight,[p,f]=wo(l),m={
|
|
1250
1241
|
start:"0%",center:"50%",end:"100%"
|
|
1251
1242
|
}[f],v=(null!==(r=null===(a=s.arrow)||void 0===a?void 0:a.x)&&void 0!==r?r:0)+d/2,g=(null!==(o=null===(i=s.arrow)||void 0===i?void 0:i.y)&&void 0!==o?o:0)+h/2
|
|
1252
1243
|
;let y="",b=""
|
|
1253
1244
|
;return"bottom"===p?(y=u?m:`${v}px`,b=-h+"px"):"top"===p?(y=u?m:`${v}px`,
|
|
1254
1245
|
b=`${c.floating.height+h}px`):"right"===p?(y=-h+"px",
|
|
1255
1246
|
b=u?m:`${g}px`):"left"===p&&(y=`${c.floating.width+h}px`,b=u?m:`${g}px`),{data:{
|
|
1256
|
-
x:y,y:b}}}});function
|
|
1257
|
-
const
|
|
1258
|
-
;return e.createElement(
|
|
1259
|
-
},
|
|
1247
|
+
x:y,y:b}}}});function wo(e){const[t,n="center"]=e.split("-");return[t,n]}
|
|
1248
|
+
const Co=t=>{const{__scopePopper:n,children:r}=t,[a,o]=e.useState(null)
|
|
1249
|
+
;return e.createElement(lo,{scope:n,anchor:a,onAnchorChange:o},r)
|
|
1250
|
+
},zo=so,Mo=fo,xo=go,Eo=e.forwardRef(((n,r)=>{var a
|
|
1260
1251
|
;const{container:o=(null===globalThis||void 0===globalThis||null===(a=globalThis.document)||void 0===a?void 0:a.body),...i}=n
|
|
1261
1252
|
;return o?t.createPortal(e.createElement(yn.div,un({},i,{ref:r})),o):null}))
|
|
1262
|
-
;const
|
|
1253
|
+
;const So=n=>{const{present:r,children:a}=n,o=function(n){
|
|
1263
1254
|
const[r,a]=e.useState(),o=e.useRef({}),i=e.useRef(n),l=e.useRef("none"),c=n?"mounted":"unmounted",[s,u]=function(t,n){
|
|
1264
1255
|
return e.useReducer(((e,t)=>{const r=n[e][t];return null!=r?r:e}),t)}(c,{
|
|
1265
1256
|
mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},
|
|
1266
1257
|
unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{
|
|
1267
|
-
MOUNT:"mounted"}});return e.useEffect((()=>{const e=
|
|
1268
|
-
;l.current="mounted"===s?e:"none"}),[s]),
|
|
1269
|
-
;if(t!==n){const r=l.current,a=
|
|
1258
|
+
MOUNT:"mounted"}});return e.useEffect((()=>{const e=_o(o.current)
|
|
1259
|
+
;l.current="mounted"===s?e:"none"}),[s]),Rr((()=>{const e=o.current,t=i.current
|
|
1260
|
+
;if(t!==n){const r=l.current,a=_o(e)
|
|
1270
1261
|
;if(n)u("MOUNT");else if("none"===a||"none"===(null==e?void 0:e.display))u("UNMOUNT");else{
|
|
1271
|
-
u(t&&r!==a?"ANIMATION_OUT":"UNMOUNT")}i.current=n}}),[n,u]),
|
|
1272
|
-
const e=e=>{const n=
|
|
1262
|
+
u(t&&r!==a?"ANIMATION_OUT":"UNMOUNT")}i.current=n}}),[n,u]),Rr((()=>{if(r){
|
|
1263
|
+
const e=e=>{const n=_o(o.current).includes(e.animationName)
|
|
1273
1264
|
;e.target===r&&n&&t.flushSync((()=>u("ANIMATION_END")))},n=e=>{
|
|
1274
|
-
e.target===r&&(l.current=
|
|
1265
|
+
e.target===r&&(l.current=_o(o.current))}
|
|
1275
1266
|
;return r.addEventListener("animationstart",n),
|
|
1276
1267
|
r.addEventListener("animationcancel",e),
|
|
1277
1268
|
r.addEventListener("animationend",e),()=>{
|
|
@@ -1282,89 +1273,89 @@ isPresent:["mounted","unmountSuspended"].includes(s),ref:e.useCallback((e=>{
|
|
|
1282
1273
|
e&&(o.current=getComputedStyle(e)),a(e)}),[])}}(r),i="function"==typeof a?a({
|
|
1283
1274
|
present:o.isPresent}):e.Children.only(a),l=hn(o.ref,i.ref)
|
|
1284
1275
|
;return"function"==typeof a||o.isPresent?e.cloneElement(i,{ref:l}):null}
|
|
1285
|
-
;function
|
|
1286
|
-
|
|
1276
|
+
;function _o(e){return(null==e?void 0:e.animationName)||"none"}
|
|
1277
|
+
So.displayName="Presence";const Ho="rovingFocusGroup.onEntryFocus",Do={
|
|
1287
1278
|
bubbles:!1,cancelable:!0
|
|
1288
|
-
},
|
|
1289
|
-
scope:t.__scopeRovingFocusGroup},e.createElement(
|
|
1290
|
-
scope:t.__scopeRovingFocusGroup},e.createElement(
|
|
1291
|
-
})))))),
|
|
1292
|
-
const{__scopeRovingFocusGroup:r,orientation:a,loop:o=!1,dir:i,currentTabStopId:l,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:s,onEntryFocus:u,...d}=t,h=e.useRef(null),p=hn(n,h),f=
|
|
1279
|
+
},Lo="RovingFocusGroup",[Vo,Ao,ko]=cr(Lo),[To,Ro]=ar(Lo,[ko]),[Po,Io]=To(Lo),Oo=e.forwardRef(((t,n)=>e.createElement(Vo.Provider,{
|
|
1280
|
+
scope:t.__scopeRovingFocusGroup},e.createElement(Vo.Slot,{
|
|
1281
|
+
scope:t.__scopeRovingFocusGroup},e.createElement(No,un({},t,{ref:n
|
|
1282
|
+
})))))),No=e.forwardRef(((t,n)=>{
|
|
1283
|
+
const{__scopeRovingFocusGroup:r,orientation:a,loop:o=!1,dir:i,currentTabStopId:l,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:s,onEntryFocus:u,...d}=t,h=e.useRef(null),p=hn(n,h),f=ur(i),[m=null,v]=lr({
|
|
1293
1284
|
prop:l,defaultProp:c,onChange:s
|
|
1294
|
-
}),[g,y]=e.useState(!1),b=
|
|
1285
|
+
}),[g,y]=e.useState(!1),b=ir(u),w=Ao(r),C=e.useRef(!1),[z,M]=e.useState(0)
|
|
1295
1286
|
;return e.useEffect((()=>{const e=h.current
|
|
1296
|
-
;if(e)return e.addEventListener(
|
|
1297
|
-
}),[b]),e.createElement(
|
|
1287
|
+
;if(e)return e.addEventListener(Ho,b),()=>e.removeEventListener(Ho,b)
|
|
1288
|
+
}),[b]),e.createElement(Po,{scope:r,orientation:a,dir:f,loop:o,
|
|
1298
1289
|
currentTabStopId:m,onItemFocus:e.useCallback((e=>v(e)),[v]),
|
|
1299
1290
|
onItemShiftTab:e.useCallback((()=>y(!0)),[]),
|
|
1300
1291
|
onFocusableItemAdd:e.useCallback((()=>M((e=>e+1))),[]),
|
|
1301
1292
|
onFocusableItemRemove:e.useCallback((()=>M((e=>e-1))),[])
|
|
1302
1293
|
},e.createElement(yn.div,un({tabIndex:g||0===z?-1:0,"data-orientation":a},d,{
|
|
1303
|
-
ref:p,style:{outline:"none",...t.style},onMouseDown:
|
|
1304
|
-
C.current=!0})),onFocus:
|
|
1305
|
-
;if(e.target===e.currentTarget&&t&&!g){const t=new CustomEvent(
|
|
1294
|
+
ref:p,style:{outline:"none",...t.style},onMouseDown:rr(t.onMouseDown,(()=>{
|
|
1295
|
+
C.current=!0})),onFocus:rr(t.onFocus,(e=>{const t=!C.current
|
|
1296
|
+
;if(e.target===e.currentTarget&&t&&!g){const t=new CustomEvent(Ho,Do)
|
|
1306
1297
|
;if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){
|
|
1307
1298
|
const e=w().filter((e=>e.focusable))
|
|
1308
|
-
;
|
|
1309
|
-
}}C.current=!1})),onBlur:
|
|
1310
|
-
})),
|
|
1311
|
-
const{__scopeRovingFocusGroup:r,focusable:a=!0,active:o=!1,tabStopId:i,...l}=t,c=
|
|
1299
|
+
;jo([e.find((e=>e.active)),e.find((e=>e.id===m)),...e].filter(Boolean).map((e=>e.ref.current)))
|
|
1300
|
+
}}C.current=!1})),onBlur:rr(t.onBlur,(()=>y(!1)))})))
|
|
1301
|
+
})),Fo=e.forwardRef(((t,n)=>{
|
|
1302
|
+
const{__scopeRovingFocusGroup:r,focusable:a=!0,active:o=!1,tabStopId:i,...l}=t,c=Or(),s=i||c,u=Io("RovingFocusGroupItem",r),d=u.currentTabStopId===s,h=Ao(r),{onFocusableItemAdd:p,onFocusableItemRemove:f}=u
|
|
1312
1303
|
;return e.useEffect((()=>{if(a)return p(),()=>f()
|
|
1313
|
-
}),[a,p,f]),e.createElement(
|
|
1304
|
+
}),[a,p,f]),e.createElement(Vo.ItemSlot,{scope:r,id:s,focusable:a,active:o
|
|
1314
1305
|
},e.createElement(yn.span,un({tabIndex:d?0:-1,"data-orientation":u.orientation
|
|
1315
|
-
},l,{ref:n,onMouseDown:
|
|
1306
|
+
},l,{ref:n,onMouseDown:rr(t.onMouseDown,(e=>{
|
|
1316
1307
|
a?u.onItemFocus(s):e.preventDefault()})),
|
|
1317
|
-
onFocus:
|
|
1308
|
+
onFocus:rr(t.onFocus,(()=>u.onItemFocus(s))),onKeyDown:rr(t.onKeyDown,(e=>{
|
|
1318
1309
|
if("Tab"===e.key&&e.shiftKey)return void u.onItemShiftTab()
|
|
1319
1310
|
;if(e.target!==e.currentTarget)return;const t=function(e,t,n){
|
|
1320
1311
|
const r=function(e,t){
|
|
1321
1312
|
return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e
|
|
1322
1313
|
}(e.key,n)
|
|
1323
|
-
;return"vertical"===t&&["ArrowLeft","ArrowRight"].includes(r)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(r)?void 0
|
|
1314
|
+
;return"vertical"===t&&["ArrowLeft","ArrowRight"].includes(r)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(r)?void 0:Bo[r]
|
|
1324
1315
|
}(e,u.orientation,u.dir);if(void 0!==t){e.preventDefault()
|
|
1325
1316
|
;let n=h().filter((e=>e.focusable)).map((e=>e.ref.current))
|
|
1326
1317
|
;if("last"===t)n.reverse();else if("prev"===t||"next"===t){
|
|
1327
1318
|
"prev"===t&&n.reverse();const r=n.indexOf(e.currentTarget)
|
|
1328
1319
|
;n=u.loop?function(e,t){return e.map(((n,r)=>e[(t+r)%e.length]))
|
|
1329
|
-
}(n,r+1):n.slice(r+1)}setTimeout((()=>
|
|
1320
|
+
}(n,r+1):n.slice(r+1)}setTimeout((()=>jo(n)))}}))})))})),Bo={ArrowLeft:"prev",
|
|
1330
1321
|
ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",
|
|
1331
|
-
PageDown:"last",End:"last"};function
|
|
1322
|
+
PageDown:"last",End:"last"};function jo(e){const t=document.activeElement
|
|
1332
1323
|
;for(const n of e){if(n===t)return
|
|
1333
|
-
;if(n.focus(),document.activeElement!==t)return}}const
|
|
1334
|
-
;var
|
|
1335
|
-
return e&&(e.host||
|
|
1336
|
-
return t.map((function(t){if(e.contains(t))return t;var n=
|
|
1324
|
+
;if(n.focus(),document.activeElement!==t)return}}const Uo=Oo,$o=Fo
|
|
1325
|
+
;var Yo=new WeakMap,Wo=new WeakMap,Go={},Ko=0,qo=function(e){
|
|
1326
|
+
return e&&(e.host||qo(e.parentNode))},Zo=function(e,t,n,r){var a=function(e,t){
|
|
1327
|
+
return t.map((function(t){if(e.contains(t))return t;var n=qo(t)
|
|
1337
1328
|
;return n&&e.contains(n)?n:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),
|
|
1338
1329
|
null)})).filter((function(e){return Boolean(e)}))}(t,Array.isArray(e)?e:[e])
|
|
1339
|
-
;
|
|
1340
|
-
;var o=
|
|
1330
|
+
;Go[n]||(Go[n]=new WeakMap)
|
|
1331
|
+
;var o=Go[n],i=[],l=new Set,c=new Set(a),s=function(e){
|
|
1341
1332
|
e&&!l.has(e)&&(l.add(e),s(e.parentNode))};a.forEach(s);var u=function(e){
|
|
1342
1333
|
e&&!c.has(e)&&Array.prototype.forEach.call(e.children,(function(e){
|
|
1343
1334
|
if(l.has(e))u(e);else{
|
|
1344
|
-
var t=e.getAttribute(r),a=null!==t&&"false"!==t,c=(
|
|
1345
|
-
;
|
|
1346
|
-
o.set(e,s),i.push(e),1===c&&a&&
|
|
1347
|
-
a||e.setAttribute(r,"true")}}))};return u(t),l.clear(),
|
|
1348
|
-
i.forEach((function(e){var t=
|
|
1349
|
-
;
|
|
1350
|
-
|
|
1351
|
-
})),--
|
|
1352
|
-
},
|
|
1335
|
+
var t=e.getAttribute(r),a=null!==t&&"false"!==t,c=(Yo.get(e)||0)+1,s=(o.get(e)||0)+1
|
|
1336
|
+
;Yo.set(e,c),
|
|
1337
|
+
o.set(e,s),i.push(e),1===c&&a&&Wo.set(e,!0),1===s&&e.setAttribute(n,"true"),
|
|
1338
|
+
a||e.setAttribute(r,"true")}}))};return u(t),l.clear(),Ko++,function(){
|
|
1339
|
+
i.forEach((function(e){var t=Yo.get(e)-1,a=o.get(e)-1
|
|
1340
|
+
;Yo.set(e,t),o.set(e,a),t||(Wo.has(e)||e.removeAttribute(r),
|
|
1341
|
+
Wo.delete(e)),a||e.removeAttribute(n)
|
|
1342
|
+
})),--Ko||(Yo=new WeakMap,Yo=new WeakMap,Wo=new WeakMap,Go={})}
|
|
1343
|
+
},Xo=function(e,t,n){void 0===n&&(n="data-aria-hidden")
|
|
1353
1344
|
;var r=Array.from(Array.isArray(e)?e:[e]),a=t||function(e){
|
|
1354
1345
|
return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body
|
|
1355
1346
|
}(e)
|
|
1356
|
-
;return a?(r.push.apply(r,Array.from(a.querySelectorAll("[aria-live]"))),
|
|
1357
|
-
return null}},
|
|
1358
|
-
;function
|
|
1347
|
+
;return a?(r.push.apply(r,Array.from(a.querySelectorAll("[aria-live]"))),Zo(r,a,n,"aria-hidden")):function(){
|
|
1348
|
+
return null}},Qo="right-scroll-bar-position",Jo="width-before-scroll-bar"
|
|
1349
|
+
;function ei(t,n){return r=n||null,a=function(e){return t.forEach((function(t){
|
|
1359
1350
|
return function(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}(t,e)}))
|
|
1360
1351
|
},(o=e.useState((function(){return{value:r,callback:a,facade:{get current(){
|
|
1361
1352
|
return o.value},set current(e){var t=o.value;t!==e&&(o.value=e,o.callback(e,t))}
|
|
1362
|
-
}}}))[0]).callback=a,o.facade;var r,a,o}function
|
|
1363
|
-
var
|
|
1353
|
+
}}}))[0]).callback=a,o.facade;var r,a,o}function ti(e){return e}
|
|
1354
|
+
var ni=function(e){var t=e.sideCar,n=c(e,["sideCar"])
|
|
1364
1355
|
;if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car")
|
|
1365
1356
|
;var a=t.read();if(!a)throw new Error("Sidecar medium not found")
|
|
1366
|
-
;return r.createElement(a,l({},n))};
|
|
1367
|
-
void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=
|
|
1357
|
+
;return r.createElement(a,l({},n))};ni.isSideCarExport=!0;var ri=function(e){
|
|
1358
|
+
void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=ti);var n=[],r=!1,a={
|
|
1368
1359
|
read:function(){
|
|
1369
1360
|
if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.")
|
|
1370
1361
|
;return n.length?n[n.length-1]:e},useMedium:function(e){var a=t(e,r)
|
|
@@ -1376,66 +1367,66 @@ assignMedium:function(e){r=!0;var t=[];if(n.length){var a=n
|
|
|
1376
1367
|
return Promise.resolve().then(o)};i(),n={push:function(e){t.push(e),i()},
|
|
1377
1368
|
filter:function(e){return t=t.filter(e),n}}}};return a}(null)
|
|
1378
1369
|
;return t.options=l({async:!0,ssr:!1},e),t
|
|
1379
|
-
}(),
|
|
1380
|
-
var n=r.useRef(null),a=r.useState({onScrollCapture:
|
|
1381
|
-
onTouchMoveCapture:
|
|
1382
|
-
}),o=a[0],i=a[1],s=e.forwardProps,u=e.children,d=e.className,h=e.removeScrollBar,p=e.enabled,f=e.shards,m=e.sideCar,v=e.noIsolation,g=e.inert,y=e.allowPinchZoom,b=e.as,w=void 0===b?"div":b,C=c(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),z=m,M=
|
|
1383
|
-
;return r.createElement(r.Fragment,null,p&&r.createElement(z,{sideCar:
|
|
1370
|
+
}(),ai=function(){},oi=r.forwardRef((function(e,t){
|
|
1371
|
+
var n=r.useRef(null),a=r.useState({onScrollCapture:ai,onWheelCapture:ai,
|
|
1372
|
+
onTouchMoveCapture:ai
|
|
1373
|
+
}),o=a[0],i=a[1],s=e.forwardProps,u=e.children,d=e.className,h=e.removeScrollBar,p=e.enabled,f=e.shards,m=e.sideCar,v=e.noIsolation,g=e.inert,y=e.allowPinchZoom,b=e.as,w=void 0===b?"div":b,C=c(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),z=m,M=ei([n,t]),x=l(l({},C),o)
|
|
1374
|
+
;return r.createElement(r.Fragment,null,p&&r.createElement(z,{sideCar:ri,
|
|
1384
1375
|
removeScrollBar:h,shards:f,noIsolation:v,inert:g,setCallbacks:i,
|
|
1385
1376
|
allowPinchZoom:!!y,lockRef:n}),s?r.cloneElement(r.Children.only(u),l(l({},x),{
|
|
1386
|
-
ref:M})):r.createElement(w,l({},x,{className:d,ref:M}),u))}));
|
|
1387
|
-
enabled:!0,removeScrollBar:!0,inert:!1},
|
|
1388
|
-
};function
|
|
1377
|
+
ref:M})):r.createElement(w,l({},x,{className:d,ref:M}),u))}));oi.defaultProps={
|
|
1378
|
+
enabled:!0,removeScrollBar:!0,inert:!1},oi.classNames={fullWidth:Jo,zeroRight:Qo
|
|
1379
|
+
};function ii(){if(!document)return null;var e=document.createElement("style")
|
|
1389
1380
|
;e.type="text/css";var t=function(){
|
|
1390
1381
|
if("undefined"!=typeof __webpack_nonce__)return __webpack_nonce__}()
|
|
1391
|
-
;return t&&e.setAttribute("nonce",t),e}var
|
|
1392
|
-
add:function(n){0==e&&(t=
|
|
1382
|
+
;return t&&e.setAttribute("nonce",t),e}var li=function(){var e=0,t=null;return{
|
|
1383
|
+
add:function(n){0==e&&(t=ii())&&(function(e,t){
|
|
1393
1384
|
e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))
|
|
1394
1385
|
}(t,n),function(e){
|
|
1395
1386
|
(document.head||document.getElementsByTagName("head")[0]).appendChild(e)
|
|
1396
1387
|
}(t)),e++},remove:function(){
|
|
1397
|
-
! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},
|
|
1398
|
-
var e,t=(e=
|
|
1388
|
+
! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},ci=function(){
|
|
1389
|
+
var e,t=(e=li(),function(t,n){r.useEffect((function(){
|
|
1399
1390
|
return e.add(t),function(){e.remove()}}),[t&&n])});return function(e){
|
|
1400
|
-
var n=e.styles,r=e.dynamic;return t(n,r),null}},
|
|
1401
|
-
},
|
|
1402
|
-
if(void 0===e&&(e="margin"),"undefined"==typeof window)return
|
|
1391
|
+
var n=e.styles,r=e.dynamic;return t(n,r),null}},si={left:0,top:0,right:0,gap:0
|
|
1392
|
+
},ui=function(e){return parseInt(e||"",10)||0},di=function(e){
|
|
1393
|
+
if(void 0===e&&(e="margin"),"undefined"==typeof window)return si
|
|
1403
1394
|
;var t=function(e){
|
|
1404
1395
|
var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],a=t["padding"===e?"paddingRight":"marginRight"]
|
|
1405
|
-
;return[
|
|
1396
|
+
;return[ui(n),ui(r),ui(a)]
|
|
1406
1397
|
}(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{
|
|
1407
1398
|
left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}
|
|
1408
|
-
},
|
|
1399
|
+
},hi=ci(),pi=function(e,t,n,r){var a=e.left,o=e.top,i=e.right,l=e.gap
|
|
1409
1400
|
;return void 0===n&&(n="margin"),
|
|
1410
|
-
"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(l,"px ").concat(r,";\n }\n body {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(a,"px;\n padding-top: ").concat(o,"px;\n padding-right: ").concat(i,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(l,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(l,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(
|
|
1411
|
-
},
|
|
1401
|
+
"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(l,"px ").concat(r,";\n }\n body {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(a,"px;\n padding-top: ").concat(o,"px;\n padding-right: ").concat(i,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(l,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(l,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(Qo," {\n right: ").concat(l,"px ").concat(r,";\n }\n \n .").concat(Jo," {\n margin-right: ").concat(l,"px ").concat(r,";\n }\n \n .").concat(Qo," .").concat(Qo," {\n right: 0 ").concat(r,";\n }\n \n .").concat(Jo," .").concat(Jo," {\n margin-right: 0 ").concat(r,";\n }\n \n body {\n ").concat("--removed-body-scroll-bar-size",": ").concat(l,"px;\n }\n")
|
|
1402
|
+
},fi=function(e){
|
|
1412
1403
|
var t=e.noRelative,n=e.noImportant,a=e.gapMode,o=void 0===a?"margin":a,i=r.useMemo((function(){
|
|
1413
|
-
return
|
|
1414
|
-
styles:
|
|
1415
|
-
var
|
|
1416
|
-
;window.addEventListener("test",
|
|
1417
|
-
}catch(e){
|
|
1404
|
+
return di(o)}),[o]);return r.createElement(hi,{
|
|
1405
|
+
styles:pi(i,!t,o,n?"":"!important")})},mi=!1;if("undefined"!=typeof window)try{
|
|
1406
|
+
var vi=Object.defineProperty({},"passive",{get:function(){return mi=!0,!0}})
|
|
1407
|
+
;window.addEventListener("test",vi,vi),window.removeEventListener("test",vi,vi)
|
|
1408
|
+
}catch(e){mi=!1}var gi=!!mi&&{passive:!1},yi=function(e,t){
|
|
1418
1409
|
var n=window.getComputedStyle(e)
|
|
1419
1410
|
;return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!function(e){
|
|
1420
|
-
return"TEXTAREA"===e.tagName}(e)&&"visible"===n[t])},
|
|
1411
|
+
return"TEXTAREA"===e.tagName}(e)&&"visible"===n[t])},bi=function(e,t){var n=t
|
|
1421
1412
|
;do{
|
|
1422
|
-
if("undefined"!=typeof ShadowRoot&&n instanceof ShadowRoot&&(n=n.host),
|
|
1423
|
-
var r=
|
|
1424
|
-
;return!1},
|
|
1425
|
-
}(t):function(e){return
|
|
1413
|
+
if("undefined"!=typeof ShadowRoot&&n instanceof ShadowRoot&&(n=n.host),wi(e,n)){
|
|
1414
|
+
var r=Ci(e,n);if(r[1]>r[2])return!0}n=n.parentNode}while(n&&n!==document.body)
|
|
1415
|
+
;return!1},wi=function(e,t){return"v"===e?function(e){return yi(e,"overflowY")
|
|
1416
|
+
}(t):function(e){return yi(e,"overflowX")}(t)},Ci=function(e,t){
|
|
1426
1417
|
return"v"===e?function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]
|
|
1427
1418
|
}(t):function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t)
|
|
1428
|
-
},
|
|
1419
|
+
},zi=function(e){
|
|
1429
1420
|
return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]
|
|
1430
|
-
},
|
|
1431
|
-
return e&&"current"in e?e.current:e},
|
|
1421
|
+
},Mi=function(e){return[e.deltaX,e.deltaY]},xi=function(e){
|
|
1422
|
+
return e&&"current"in e?e.current:e},Ei=function(e){
|
|
1432
1423
|
return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")
|
|
1433
|
-
},
|
|
1434
|
-
var t=r.useRef([]),n=r.useRef([0,0]),a=r.useRef(),o=r.useState(
|
|
1435
|
-
return
|
|
1424
|
+
},Si=0,_i=[];var Hi,Di=(Hi=function(e){
|
|
1425
|
+
var t=r.useRef([]),n=r.useRef([0,0]),a=r.useRef(),o=r.useState(Si++)[0],i=r.useState((function(){
|
|
1426
|
+
return ci()}))[0],l=r.useRef(e);r.useEffect((function(){l.current=e
|
|
1436
1427
|
}),[e]),r.useEffect((function(){if(e.inert){
|
|
1437
1428
|
document.body.classList.add("block-interactivity-".concat(o))
|
|
1438
|
-
;var t=d([e.lockRef.current],(e.shards||[]).map(
|
|
1429
|
+
;var t=d([e.lockRef.current],(e.shards||[]).map(xi),!0).filter(Boolean)
|
|
1439
1430
|
;return t.forEach((function(e){
|
|
1440
1431
|
return e.classList.add("allow-interactivity-".concat(o))})),function(){
|
|
1441
1432
|
document.body.classList.remove("block-interactivity-".concat(o)),
|
|
@@ -1443,68 +1434,68 @@ t.forEach((function(e){
|
|
|
1443
1434
|
return e.classList.remove("allow-interactivity-".concat(o))}))}}
|
|
1444
1435
|
}),[e.inert,e.lockRef.current,e.shards]);var c=r.useCallback((function(e,t){
|
|
1445
1436
|
if("touches"in e&&2===e.touches.length)return!l.current.allowPinchZoom
|
|
1446
|
-
;var r,o=
|
|
1447
|
-
;if("touches"in e&&"h"===d&&"range"===u.type)return!1;var h=
|
|
1448
|
-
;if(!h)return!0;if(h?r=d:(r="v"===d?"h":"v",h=
|
|
1437
|
+
;var r,o=zi(e),i=n.current,c="deltaX"in e?e.deltaX:i[0]-o[0],s="deltaY"in e?e.deltaY:i[1]-o[1],u=e.target,d=Math.abs(c)>Math.abs(s)?"h":"v"
|
|
1438
|
+
;if("touches"in e&&"h"===d&&"range"===u.type)return!1;var h=bi(d,u)
|
|
1439
|
+
;if(!h)return!0;if(h?r=d:(r="v"===d?"h":"v",h=bi(d,u)),!h)return!1
|
|
1449
1440
|
;if(!a.current&&"changedTouches"in e&&(c||s)&&(a.current=r),!r)return!0
|
|
1450
1441
|
;var p=a.current||r;return function(e,t,n,r,a){var o=function(e,t){
|
|
1451
1442
|
return"h"===e&&"rtl"===t?-1:1
|
|
1452
1443
|
}(e,window.getComputedStyle(t).direction),i=o*r,l=n.target,c=t.contains(l),s=!1,u=i>0,d=0,h=0
|
|
1453
|
-
;do{var p=
|
|
1454
|
-
;(f||m)&&
|
|
1444
|
+
;do{var p=Ci(e,l),f=p[0],m=p[1]-p[2]-o*f
|
|
1445
|
+
;(f||m)&&wi(e,l)&&(d+=m,h+=f),l=l.parentNode
|
|
1455
1446
|
}while(!c&&l!==document.body||c&&(t.contains(l)||t===l))
|
|
1456
1447
|
;return(u&&(a&&0===d||!a&&i>d)||!u&&(a&&0===h||!a&&-i>h))&&(s=!0),s
|
|
1457
1448
|
}(p,t,e,"h"===p?c:s,!0)}),[]),s=r.useCallback((function(e){var n=e
|
|
1458
|
-
;if(
|
|
1459
|
-
var r="deltaY"in n?
|
|
1449
|
+
;if(_i.length&&_i[_i.length-1]===i){
|
|
1450
|
+
var r="deltaY"in n?Mi(n):zi(n),a=t.current.filter((function(e){
|
|
1460
1451
|
return e.name===n.type&&e.target===n.target&&function(e,t){
|
|
1461
1452
|
return e[0]===t[0]&&e[1]===t[1]}(e.delta,r)}))[0]
|
|
1462
1453
|
;if(a&&a.should)n.cancelable&&n.preventDefault();else if(!a){
|
|
1463
|
-
var o=(l.current.shards||[]).map(
|
|
1454
|
+
var o=(l.current.shards||[]).map(xi).filter(Boolean).filter((function(e){
|
|
1464
1455
|
return e.contains(n.target)}))
|
|
1465
1456
|
;(o.length>0?c(n,o[0]):!l.current.noIsolation)&&n.cancelable&&n.preventDefault()
|
|
1466
1457
|
}}}),[]),u=r.useCallback((function(e,n,r,a){var o={name:e,delta:n,target:r,
|
|
1467
1458
|
should:a};t.current.push(o),setTimeout((function(){
|
|
1468
1459
|
t.current=t.current.filter((function(e){return e!==o}))}),1)
|
|
1469
|
-
}),[]),h=r.useCallback((function(e){n.current=
|
|
1460
|
+
}),[]),h=r.useCallback((function(e){n.current=zi(e),a.current=void 0
|
|
1470
1461
|
}),[]),p=r.useCallback((function(t){
|
|
1471
|
-
u(t.type,
|
|
1462
|
+
u(t.type,Mi(t),t.target,c(t,e.lockRef.current))
|
|
1472
1463
|
}),[]),f=r.useCallback((function(t){
|
|
1473
|
-
u(t.type,
|
|
1474
|
-
return
|
|
1464
|
+
u(t.type,zi(t),t.target,c(t,e.lockRef.current))}),[]);r.useEffect((function(){
|
|
1465
|
+
return _i.push(i),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,
|
|
1475
1466
|
onTouchMoveCapture:f
|
|
1476
|
-
}),document.addEventListener("wheel",s,
|
|
1477
|
-
document.addEventListener("touchstart",h,
|
|
1478
|
-
|
|
1479
|
-
})),document.removeEventListener("wheel",s,
|
|
1480
|
-
document.removeEventListener("touchmove",s,
|
|
1481
|
-
document.removeEventListener("touchstart",h,
|
|
1467
|
+
}),document.addEventListener("wheel",s,gi),document.addEventListener("touchmove",s,gi),
|
|
1468
|
+
document.addEventListener("touchstart",h,gi),function(){
|
|
1469
|
+
_i=_i.filter((function(e){return e!==i
|
|
1470
|
+
})),document.removeEventListener("wheel",s,gi),
|
|
1471
|
+
document.removeEventListener("touchmove",s,gi),
|
|
1472
|
+
document.removeEventListener("touchstart",h,gi)}}),[])
|
|
1482
1473
|
;var m=e.removeScrollBar,v=e.inert
|
|
1483
|
-
;return r.createElement(r.Fragment,null,v?r.createElement(i,{styles:
|
|
1484
|
-
}):null,m?r.createElement(
|
|
1485
|
-
},
|
|
1486
|
-
return r.createElement(
|
|
1487
|
-
;
|
|
1488
|
-
;const
|
|
1489
|
-
const{__scopeMenu:r,...a}=t,o
|
|
1490
|
-
}))})),
|
|
1491
|
-
}),
|
|
1492
|
-
const r=
|
|
1493
|
-
;return e.createElement(
|
|
1494
|
-
present:a||i.open},e.createElement(
|
|
1495
|
-
},l.modal?e.createElement(
|
|
1496
|
-
})))))})),
|
|
1497
|
-
const r
|
|
1498
|
-
;return e.useEffect((()=>{const e=a.current;if(e)return
|
|
1499
|
-
}),[]),e.createElement(
|
|
1474
|
+
;return r.createElement(r.Fragment,null,v?r.createElement(i,{styles:Ei(o)
|
|
1475
|
+
}):null,m?r.createElement(fi,{gapMode:"margin"}):null)
|
|
1476
|
+
},ri.useMedium(Hi),ni),Li=r.forwardRef((function(e,t){
|
|
1477
|
+
return r.createElement(oi,l({},e,{ref:t,sideCar:Di}))}))
|
|
1478
|
+
;Li.classNames=oi.classNames;var Vi=Li
|
|
1479
|
+
;const Ai=["Enter"," "],ki=["ArrowUp","PageDown","End"],Ti=["ArrowDown","PageUp","Home",...ki],Ri="Menu",[Pi,Ii,Oi]=cr(Ri),[Ni,Fi]=ar(Ri,[Oi,io,Ro]),Bi=io(),ji=Ro(),[Ui,$i]=Ni(Ri),[Yi,Wi]=Ni(Ri),Gi=e.forwardRef(((t,n)=>{
|
|
1480
|
+
const{__scopeMenu:r,...a}=t,o=Bi(r);return e.createElement(zo,un({},o,a,{ref:n
|
|
1481
|
+
}))})),Ki="MenuPortal",[qi,Zi]=Ni(Ki,{forceMount:void 0
|
|
1482
|
+
}),Xi="MenuContent",[Qi,Ji]=Ni(Xi),el=e.forwardRef(((t,n)=>{
|
|
1483
|
+
const r=Zi(Xi,t.__scopeMenu),{forceMount:a=r.forceMount,...o}=t,i=$i(Xi,t.__scopeMenu),l=Wi(Xi,t.__scopeMenu)
|
|
1484
|
+
;return e.createElement(Pi.Provider,{scope:t.__scopeMenu},e.createElement(So,{
|
|
1485
|
+
present:a||i.open},e.createElement(Pi.Slot,{scope:t.__scopeMenu
|
|
1486
|
+
},l.modal?e.createElement(tl,un({},o,{ref:n})):e.createElement(nl,un({},o,{ref:n
|
|
1487
|
+
})))))})),tl=e.forwardRef(((t,n)=>{
|
|
1488
|
+
const r=$i(Xi,t.__scopeMenu),a=e.useRef(null),o=hn(n,a)
|
|
1489
|
+
;return e.useEffect((()=>{const e=a.current;if(e)return Xo(e)
|
|
1490
|
+
}),[]),e.createElement(rl,un({},t,{ref:o,trapFocus:r.open,
|
|
1500
1491
|
disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,
|
|
1501
|
-
onFocusOutside:
|
|
1492
|
+
onFocusOutside:rr(t.onFocusOutside,(e=>e.preventDefault()),{
|
|
1502
1493
|
checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)}))
|
|
1503
|
-
})),
|
|
1504
|
-
;return e.createElement(
|
|
1494
|
+
})),nl=e.forwardRef(((t,n)=>{const r=$i(Xi,t.__scopeMenu)
|
|
1495
|
+
;return e.createElement(rl,un({},t,{ref:n,trapFocus:!1,
|
|
1505
1496
|
disableOutsidePointerEvents:!1,disableOutsideScroll:!1,
|
|
1506
|
-
onDismiss:()=>r.onOpenChange(!1)}))})),
|
|
1507
|
-
const{__scopeMenu:r,loop:a=!1,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:l,disableOutsidePointerEvents:c,onEntryFocus:s,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:h,onInteractOutside:p,onDismiss:f,disableOutsideScroll:m,...v}=t,g
|
|
1497
|
+
onDismiss:()=>r.onOpenChange(!1)}))})),rl=e.forwardRef(((t,n)=>{
|
|
1498
|
+
const{__scopeMenu:r,loop:a=!1,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:l,disableOutsidePointerEvents:c,onEntryFocus:s,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:h,onInteractOutside:p,onDismiss:f,disableOutsideScroll:m,...v}=t,g=$i(Xi,r),y=Wi(Xi,r),b=Bi(r),w=ji(r),C=Ii(r),[z,M]=e.useState(null),x=e.useRef(null),E=hn(n,x,g.onContentChange),S=e.useRef(0),_=e.useRef(""),H=e.useRef(0),D=e.useRef(null),L=e.useRef("right"),V=e.useRef(0),A=m?Vi:e.Fragment,k=m?{
|
|
1508
1499
|
as:pn,allowPinchZoom:!0}:void 0,T=e=>{var t,n
|
|
1509
1500
|
;const r=_.current+e,a=C().filter((e=>!e.disabled)),o=document.activeElement,i=null===(t=a.find((e=>e.ref.current===o)))||void 0===t?void 0:t.textValue,l=function(e,t,n){
|
|
1510
1501
|
const r=t.length>1&&Array.from(t).every((e=>e===t[0])),a=r?t[0]:t,o=n?e.indexOf(n):-1
|
|
@@ -1516,7 +1507,7 @@ const r=t.length>1&&Array.from(t).every((e=>e===t[0])),a=r?t[0]:t,o=n?e.indexOf(
|
|
|
1516
1507
|
;!function e(t){
|
|
1517
1508
|
_.current=t,window.clearTimeout(S.current),""!==t&&(S.current=window.setTimeout((()=>e("")),1e3))
|
|
1518
1509
|
}(r),c&&setTimeout((()=>c.focus()))}
|
|
1519
|
-
;e.useEffect((()=>()=>window.clearTimeout(S.current)),[]),
|
|
1510
|
+
;e.useEffect((()=>()=>window.clearTimeout(S.current)),[]),Mr()
|
|
1520
1511
|
;const R=e.useCallback((e=>{var t,n
|
|
1521
1512
|
;return L.current===(null===(t=D.current)||void 0===t?void 0:t.side)&&function(e,t){
|
|
1522
1513
|
if(!t)return!1;const n={x:e.clientX,y:e.clientY};return function(e,t){
|
|
@@ -1524,64 +1515,64 @@ const{x:n,y:r}=e;let a=!1;for(let e=0,o=t.length-1;e<t.length;o=e++){
|
|
|
1524
1515
|
const i=t[e].x,l=t[e].y,c=t[o].x,s=t[o].y
|
|
1525
1516
|
;l>r!=s>r&&n<(c-i)*(r-l)/(s-l)+i&&(a=!a)}return a}(n,t)
|
|
1526
1517
|
}(e,null===(n=D.current)||void 0===n?void 0:n.area)}),[])
|
|
1527
|
-
;return e.createElement(
|
|
1518
|
+
;return e.createElement(Qi,{scope:r,searchRef:_,onItemEnter:e.useCallback((e=>{
|
|
1528
1519
|
R(e)&&e.preventDefault()}),[R]),onItemLeave:e.useCallback((e=>{var t
|
|
1529
1520
|
;R(e)||(null===(t=x.current)||void 0===t||t.focus(),M(null))}),[R]),
|
|
1530
1521
|
onTriggerLeave:e.useCallback((e=>{R(e)&&e.preventDefault()}),[R]),
|
|
1531
1522
|
pointerGraceTimerRef:H,onPointerGraceIntentChange:e.useCallback((e=>{D.current=e
|
|
1532
|
-
}),[])},e.createElement(A,k,e.createElement(
|
|
1533
|
-
onMountAutoFocus:
|
|
1523
|
+
}),[])},e.createElement(A,k,e.createElement(Hr,{asChild:!0,trapped:o,
|
|
1524
|
+
onMountAutoFocus:rr(i,(e=>{var t
|
|
1534
1525
|
;e.preventDefault(),null===(t=x.current)||void 0===t||t.focus()})),
|
|
1535
|
-
onUnmountAutoFocus:l},e.createElement(
|
|
1526
|
+
onUnmountAutoFocus:l},e.createElement(vr,{asChild:!0,
|
|
1536
1527
|
disableOutsidePointerEvents:c,onEscapeKeyDown:u,onPointerDownOutside:d,
|
|
1537
|
-
onFocusOutside:h,onInteractOutside:p,onDismiss:f},e.createElement(
|
|
1528
|
+
onFocusOutside:h,onInteractOutside:p,onDismiss:f},e.createElement(Uo,un({
|
|
1538
1529
|
asChild:!0},w,{dir:y.dir,orientation:"vertical",loop:a,currentTabStopId:z,
|
|
1539
|
-
onCurrentTabStopIdChange:M,onEntryFocus:
|
|
1540
|
-
y.isUsingKeyboardRef.current||e.preventDefault()}))}),e.createElement(
|
|
1530
|
+
onCurrentTabStopIdChange:M,onEntryFocus:rr(s,(e=>{
|
|
1531
|
+
y.isUsingKeyboardRef.current||e.preventDefault()}))}),e.createElement(Mo,un({
|
|
1541
1532
|
role:"menu","aria-orientation":"vertical",
|
|
1542
1533
|
"data-state":(P=g.open,P?"open":"closed"),"data-radix-menu-content":"",dir:y.dir
|
|
1543
|
-
},b,v,{ref:E,style:{outline:"none",...v.style},onKeyDown:
|
|
1534
|
+
},b,v,{ref:E,style:{outline:"none",...v.style},onKeyDown:rr(v.onKeyDown,(e=>{
|
|
1544
1535
|
const t=e.target.closest("[data-radix-menu-content]")===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=1===e.key.length
|
|
1545
1536
|
;t&&("Tab"===e.key&&e.preventDefault(),!n&&r&&T(e.key));const a=x.current
|
|
1546
|
-
;if(e.target!==a)return;if(!
|
|
1537
|
+
;if(e.target!==a)return;if(!Ti.includes(e.key))return;e.preventDefault()
|
|
1547
1538
|
;const o=C().filter((e=>!e.disabled)).map((e=>e.ref.current))
|
|
1548
|
-
;
|
|
1539
|
+
;ki.includes(e.key)&&o.reverse(),function(e){const t=document.activeElement
|
|
1549
1540
|
;for(const n of e){if(n===t)return
|
|
1550
|
-
;if(n.focus(),document.activeElement!==t)return}}(o)})),onBlur:
|
|
1541
|
+
;if(n.focus(),document.activeElement!==t)return}}(o)})),onBlur:rr(t.onBlur,(e=>{
|
|
1551
1542
|
e.currentTarget.contains(e.target)||(window.clearTimeout(S.current),
|
|
1552
|
-
_.current="")})),onPointerMove:
|
|
1543
|
+
_.current="")})),onPointerMove:rr(t.onPointerMove,sl((e=>{
|
|
1553
1544
|
const t=e.target,n=V.current!==e.clientX;if(e.currentTarget.contains(t)&&n){
|
|
1554
1545
|
const t=e.clientX>V.current?"right":"left";L.current=t,V.current=e.clientX}})))
|
|
1555
|
-
})))))));var P})),
|
|
1556
|
-
const{disabled:r=!1,onSelect:a,...o}=t,i=e.useRef(null),l=
|
|
1557
|
-
;return e.createElement(
|
|
1558
|
-
const e=i.current;if(!r&&e){const t=new CustomEvent(
|
|
1559
|
-
});e.addEventListener(
|
|
1546
|
+
})))))));var P})),al="MenuItem",ol="menu.itemSelect",il=e.forwardRef(((t,n)=>{
|
|
1547
|
+
const{disabled:r=!1,onSelect:a,...o}=t,i=e.useRef(null),l=Wi(al,t.__scopeMenu),c=Ji(al,t.__scopeMenu),s=hn(n,i),u=e.useRef(!1)
|
|
1548
|
+
;return e.createElement(ll,un({},o,{ref:s,disabled:r,onClick:rr(t.onClick,(()=>{
|
|
1549
|
+
const e=i.current;if(!r&&e){const t=new CustomEvent(ol,{bubbles:!0,cancelable:!0
|
|
1550
|
+
});e.addEventListener(ol,(e=>null==a?void 0:a(e)),{once:!0
|
|
1560
1551
|
}),bn(e,t),t.defaultPrevented?u.current=!1:l.onClose()}})),onPointerDown:e=>{
|
|
1561
1552
|
var n;null===(n=t.onPointerDown)||void 0===n||n.call(t,e),u.current=!0},
|
|
1562
|
-
onPointerUp:
|
|
1553
|
+
onPointerUp:rr(t.onPointerUp,(e=>{var t
|
|
1563
1554
|
;u.current||null===(t=e.currentTarget)||void 0===t||t.click()})),
|
|
1564
|
-
onKeyDown:
|
|
1565
|
-
;r||t&&" "===e.key||
|
|
1566
|
-
e.preventDefault())}))}))})),
|
|
1567
|
-
const{__scopeMenu:r,disabled:a=!1,textValue:o,...i}=t,l=
|
|
1555
|
+
onKeyDown:rr(t.onKeyDown,(e=>{const t=""!==c.searchRef.current
|
|
1556
|
+
;r||t&&" "===e.key||Ai.includes(e.key)&&(e.currentTarget.click(),
|
|
1557
|
+
e.preventDefault())}))}))})),ll=e.forwardRef(((t,n)=>{
|
|
1558
|
+
const{__scopeMenu:r,disabled:a=!1,textValue:o,...i}=t,l=Ji(al,r),c=ji(r),s=e.useRef(null),u=hn(n,s),[d,h]=e.useState(!1),[p,f]=e.useState("")
|
|
1568
1559
|
;return e.useEffect((()=>{const e=s.current;var t
|
|
1569
1560
|
;e&&f((null!==(t=e.textContent)&&void 0!==t?t:"").trim())
|
|
1570
|
-
}),[i.children]),e.createElement(
|
|
1571
|
-
textValue:null!=o?o:p},e.createElement(
|
|
1561
|
+
}),[i.children]),e.createElement(Pi.ItemSlot,{scope:r,disabled:a,
|
|
1562
|
+
textValue:null!=o?o:p},e.createElement($o,un({asChild:!0},c,{focusable:!a
|
|
1572
1563
|
}),e.createElement(yn.div,un({role:"menuitem","data-highlighted":d?"":void 0,
|
|
1573
1564
|
"aria-disabled":a||void 0,"data-disabled":a?"":void 0},i,{ref:u,
|
|
1574
|
-
onPointerMove:
|
|
1565
|
+
onPointerMove:rr(t.onPointerMove,sl((e=>{
|
|
1575
1566
|
if(a)l.onItemLeave(e);else if(l.onItemEnter(e),!e.defaultPrevented){
|
|
1576
1567
|
e.currentTarget.focus()}}))),
|
|
1577
|
-
onPointerLeave:
|
|
1578
|
-
onFocus:
|
|
1579
|
-
;
|
|
1580
|
-
;
|
|
1581
|
-
const{__scopeMenu:r,...a}=t,o
|
|
1582
|
-
}))}));function
|
|
1583
|
-
|
|
1584
|
-
const{__scopeMenu:n,open:r=!1,children:a,dir:o,onOpenChange:i,modal:l=!0}=t,c
|
|
1568
|
+
onPointerLeave:rr(t.onPointerLeave,sl((e=>l.onItemLeave(e)))),
|
|
1569
|
+
onFocus:rr(t.onFocus,(()=>h(!0))),onBlur:rr(t.onBlur,(()=>h(!1)))}))))}))
|
|
1570
|
+
;Ni("MenuRadioGroup",{value:void 0,onValueChange:()=>{}})
|
|
1571
|
+
;Ni("MenuItemIndicator",{checked:!1});const cl=e.forwardRef(((t,n)=>{
|
|
1572
|
+
const{__scopeMenu:r,...a}=t,o=Bi(r);return e.createElement(xo,un({},o,a,{ref:n
|
|
1573
|
+
}))}));function sl(e){return t=>"mouse"===t.pointerType?e(t):void 0}
|
|
1574
|
+
Ni("MenuSub");const ul=t=>{
|
|
1575
|
+
const{__scopeMenu:n,open:r=!1,children:a,dir:o,onOpenChange:i,modal:l=!0}=t,c=Bi(n),[s,u]=e.useState(null),d=e.useRef(!1),h=ir(i),p=ur(o)
|
|
1585
1576
|
;return e.useEffect((()=>{const e=()=>{
|
|
1586
1577
|
d.current=!0,document.addEventListener("pointerdown",t,{capture:!0,once:!0
|
|
1587
1578
|
}),document.addEventListener("pointermove",t,{capture:!0,once:!0})
|
|
@@ -1589,38 +1580,38 @@ d.current=!0,document.addEventListener("pointerdown",t,{capture:!0,once:!0
|
|
|
1589
1580
|
()=>{document.removeEventListener("keydown",e,{capture:!0
|
|
1590
1581
|
}),document.removeEventListener("pointerdown",t,{capture:!0
|
|
1591
1582
|
}),document.removeEventListener("pointermove",t,{capture:!0})}
|
|
1592
|
-
}),[]),e.createElement(
|
|
1593
|
-
content:s,onContentChange:u},e.createElement(
|
|
1583
|
+
}),[]),e.createElement(Co,c,e.createElement(Ui,{scope:n,open:r,onOpenChange:h,
|
|
1584
|
+
content:s,onContentChange:u},e.createElement(Yi,{scope:n,
|
|
1594
1585
|
onClose:e.useCallback((()=>h(!1)),[h]),isUsingKeyboardRef:d,dir:p,modal:l},a)))
|
|
1595
|
-
},
|
|
1596
|
-
const{__scopeMenu:n,forceMount:r,children:a,container:o}=t,i
|
|
1597
|
-
;return e.createElement(
|
|
1598
|
-
present:r||i.open},e.createElement(
|
|
1599
|
-
},
|
|
1600
|
-
const{__scopeDropdownMenu:n,children:r,dir:a,open:o,defaultOpen:i,onOpenChange:l,modal:c=!0}=t,s=
|
|
1601
|
-
prop:o,defaultProp:i,onChange:l});return e.createElement(
|
|
1602
|
-
triggerId:
|
|
1586
|
+
},dl=Gi,hl=t=>{
|
|
1587
|
+
const{__scopeMenu:n,forceMount:r,children:a,container:o}=t,i=$i(Ki,n)
|
|
1588
|
+
;return e.createElement(qi,{scope:n,forceMount:r},e.createElement(So,{
|
|
1589
|
+
present:r||i.open},e.createElement(Eo,{asChild:!0,container:o},a)))
|
|
1590
|
+
},pl=el,fl=il,ml=cl,vl="DropdownMenu",[gl,yl]=ar(vl,[Fi]),bl=Fi(),[wl,Cl]=gl(vl),zl=t=>{
|
|
1591
|
+
const{__scopeDropdownMenu:n,children:r,dir:a,open:o,defaultOpen:i,onOpenChange:l,modal:c=!0}=t,s=bl(n),u=e.useRef(null),[d=!1,h]=lr({
|
|
1592
|
+
prop:o,defaultProp:i,onChange:l});return e.createElement(wl,{scope:n,
|
|
1593
|
+
triggerId:Or(),triggerRef:u,contentId:Or(),open:d,onOpenChange:h,
|
|
1603
1594
|
onOpenToggle:e.useCallback((()=>h((e=>!e))),[h]),modal:c
|
|
1604
|
-
},e.createElement(
|
|
1605
|
-
},
|
|
1606
|
-
const{__scopeDropdownMenu:r,disabled:a=!1,...o}=t,i=
|
|
1607
|
-
;return e.createElement(
|
|
1595
|
+
},e.createElement(ul,un({},s,{open:d,onOpenChange:h,dir:a,modal:c}),r))
|
|
1596
|
+
},Ml=e.forwardRef(((t,n)=>{
|
|
1597
|
+
const{__scopeDropdownMenu:r,disabled:a=!1,...o}=t,i=Cl("DropdownMenuTrigger",r),l=bl(r)
|
|
1598
|
+
;return e.createElement(dl,un({asChild:!0},l),e.createElement(yn.button,un({
|
|
1608
1599
|
type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,
|
|
1609
1600
|
"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed",
|
|
1610
1601
|
"data-disabled":a?"":void 0,disabled:a},o,{ref:dn(n,i.triggerRef),
|
|
1611
|
-
onPointerDown:
|
|
1602
|
+
onPointerDown:rr(t.onPointerDown,(e=>{
|
|
1612
1603
|
a||0!==e.button||!1!==e.ctrlKey||(i.onOpenToggle(),i.open||e.preventDefault())
|
|
1613
|
-
})),onKeyDown:
|
|
1604
|
+
})),onKeyDown:rr(t.onKeyDown,(e=>{
|
|
1614
1605
|
a||(["Enter"," "].includes(e.key)&&i.onOpenToggle(),
|
|
1615
1606
|
"ArrowDown"===e.key&&i.onOpenChange(!0),
|
|
1616
|
-
["Enter"," ","ArrowDown"].includes(e.key)&&e.preventDefault())}))})))})),
|
|
1617
|
-
const{__scopeDropdownMenu:n,...r}=t,a=
|
|
1618
|
-
;return e.createElement(
|
|
1619
|
-
const{__scopeDropdownMenu:r,...a}=t,o=
|
|
1620
|
-
;return e.createElement(
|
|
1621
|
-
},i,a,{ref:n,onCloseAutoFocus:
|
|
1607
|
+
["Enter"," ","ArrowDown"].includes(e.key)&&e.preventDefault())}))})))})),xl=t=>{
|
|
1608
|
+
const{__scopeDropdownMenu:n,...r}=t,a=bl(n)
|
|
1609
|
+
;return e.createElement(hl,un({},a,r))},El=e.forwardRef(((t,n)=>{
|
|
1610
|
+
const{__scopeDropdownMenu:r,...a}=t,o=Cl("DropdownMenuContent",r),i=bl(r),l=e.useRef(!1)
|
|
1611
|
+
;return e.createElement(pl,un({id:o.contentId,"aria-labelledby":o.triggerId
|
|
1612
|
+
},i,a,{ref:n,onCloseAutoFocus:rr(t.onCloseAutoFocus,(e=>{var t
|
|
1622
1613
|
;l.current||null===(t=o.triggerRef.current)||void 0===t||t.focus(),l.current=!1,
|
|
1623
|
-
e.preventDefault()})),onInteractOutside:
|
|
1614
|
+
e.preventDefault()})),onInteractOutside:rr(t.onInteractOutside,(e=>{
|
|
1624
1615
|
const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n
|
|
1625
1616
|
;o.modal&&!r||(l.current=!0)})),style:{...t.style,
|
|
1626
1617
|
"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)",
|
|
@@ -1628,13 +1619,13 @@ const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n
|
|
|
1628
1619
|
"--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)",
|
|
1629
1620
|
"--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)",
|
|
1630
1621
|
"--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}}))
|
|
1631
|
-
})),
|
|
1632
|
-
;return e.createElement(
|
|
1633
|
-
const{__scopeDropdownMenu:r,...a}=t,o=
|
|
1634
|
-
;return e.createElement(
|
|
1635
|
-
})),
|
|
1622
|
+
})),Sl=e.forwardRef(((t,n)=>{const{__scopeDropdownMenu:r,...a}=t,o=bl(r)
|
|
1623
|
+
;return e.createElement(fl,un({},o,a,{ref:n}))})),_l=e.forwardRef(((t,n)=>{
|
|
1624
|
+
const{__scopeDropdownMenu:r,...a}=t,o=bl(r)
|
|
1625
|
+
;return e.createElement(ml,un({},o,a,{ref:n}))
|
|
1626
|
+
})),Hl=on(zl)``,Dl=on(Ml)``,Ll=on(xl)``,Vl=on(_l)`
|
|
1636
1627
|
fill: ${({theme:e})=>e.colors.border.light};
|
|
1637
|
-
`,
|
|
1628
|
+
`,Al=on(El)`
|
|
1638
1629
|
padding: 8px;
|
|
1639
1630
|
z-index: 1000;
|
|
1640
1631
|
border-radius: 2px 2px 8px 8px;
|
|
@@ -1660,7 +1651,7 @@ const{__scopeDropdownMenu:r,...a}=t,o=zl(r)
|
|
|
1660
1651
|
animation-duration: ${({theme:e})=>e.transitions.duration.standard};
|
|
1661
1652
|
animation-timing-function: ${({theme:e})=>e.transitions.easing.easeIn};
|
|
1662
1653
|
will-change: transform, opacity;
|
|
1663
|
-
`,
|
|
1654
|
+
`,kl=on(Sl)`
|
|
1664
1655
|
padding: 8px 12px;
|
|
1665
1656
|
border-radius: 4px;
|
|
1666
1657
|
display: flex;
|
|
@@ -1678,36 +1669,55 @@ const{__scopeDropdownMenu:r,...a}=t,o=zl(r)
|
|
|
1678
1669
|
&:hover {
|
|
1679
1670
|
background: ${({disabled:e,theme:t})=>e?t.colors.fill.disabled:t.colors.fill.hilight};
|
|
1680
1671
|
}
|
|
1681
|
-
`,
|
|
1672
|
+
`,Tl=t=>{
|
|
1682
1673
|
const{isOpen:n,trigger:r,closeMenuCallback:a,idAccessor:o="id",nameAccessor:i="name",onSelect:l,itemComponent:c,showArrow:s=!1,options:u=[],value:d,side:h="bottom",align:p="center",sideOffset:f=4,alignOffset:m,arrowPadding:v,avoidCollisions:g}=t
|
|
1683
|
-
;return e.createElement(
|
|
1684
|
-
},e.createElement(
|
|
1685
|
-
},e.createElement(Ln,null,r)),e.createElement(
|
|
1674
|
+
;return e.createElement(Hl,{open:n,onOpenChange:e=>{e||a?.()}
|
|
1675
|
+
},e.createElement(Dl,{asChild:!0
|
|
1676
|
+
},e.createElement(Ln,null,r)),e.createElement(Ll,null,e.createElement(Al,{
|
|
1686
1677
|
side:h,sideOffset:f,align:p,alignOffset:m,arrowPadding:v,avoidCollisions:g,
|
|
1687
1678
|
className:"DropdownMenuContent"},u.map((t=>c?c(t,{disabled:t?.disabled,
|
|
1688
1679
|
className:"DropdownMenuItem",key:t?.[o],onSelect:()=>l?.(t),
|
|
1689
|
-
isSelected:d?.[o]===t?.[o]}):e.createElement(
|
|
1680
|
+
isSelected:d?.[o]===t?.[o]}):e.createElement(kl,{id:t?.[o],disabled:t?.disabled,
|
|
1690
1681
|
className:"DropdownMenuItem",key:t?.[o],onSelect:()=>l?.(t),
|
|
1691
|
-
isSelected:d?.[o]===t?.[o]},t?.[i]))),s&&e.createElement(
|
|
1692
|
-
className:"DropdownMenuArrow"}))))}
|
|
1693
|
-
|
|
1682
|
+
isSelected:d?.[o]===t?.[o]},t?.[i]))),s&&e.createElement(Vl,{
|
|
1683
|
+
className:"DropdownMenuArrow"}))))},Rl=t=>e.createElement("svg",{width:"8",
|
|
1684
|
+
height:"6",viewBox:"0 0 8 6",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t
|
|
1685
|
+
},e.createElement("path",{
|
|
1686
|
+
d:"M0.696495 5.3465C0.882365 5.34499 1.06086 5.27359 1.19649 5.1465L3.99649 2.3365L6.79649 5.1465C7.07264 5.42264 7.52035 5.42264 7.79649 5.1465C8.07264 4.87035 8.07264 4.42264 7.79649 4.1465L4.49649 0.856495C4.36483 0.722118 4.18462 0.646393 3.99649 0.646393C3.80837 0.646393 3.62816 0.722118 3.49649 0.856495L0.206495 4.1465C0.00332102 4.34556 -0.0591904 4.64778 0.0483378 4.91112C0.155867 5.17445 0.412052 5.34654 0.696495 5.3465Z",
|
|
1687
|
+
fill:t.fill})),Pl=on(Rl)`
|
|
1688
|
+
transform: rotate(180deg);
|
|
1689
|
+
path {
|
|
1690
|
+
fill: ${({theme:e,variant:t})=>e.components.button[t].color};
|
|
1691
|
+
}
|
|
1692
|
+
`,Il=on(tr)`
|
|
1693
|
+
display: flex;
|
|
1694
|
+
align-items: center;
|
|
1695
|
+
gap: 4px;
|
|
1696
|
+
padding-right: 0px;
|
|
1697
|
+
|
|
1698
|
+
& ${Ln} {
|
|
1699
|
+
width: 24px;
|
|
1700
|
+
height: 100%;
|
|
1701
|
+
padding-right: 4px;
|
|
1702
|
+
}
|
|
1703
|
+
`;function Ol(t){const n=e.useRef({value:t,previous:t})
|
|
1694
1704
|
;return e.useMemo((()=>(n.current.value!==t&&(n.current.previous=n.current.value,
|
|
1695
1705
|
n.current.value=t),n.current.previous)),[t])}
|
|
1696
|
-
const Nl="Radio",[Fl,Bl]=
|
|
1706
|
+
const Nl="Radio",[Fl,Bl]=ar(Nl),[jl,Ul]=Fl(Nl),$l=e.forwardRef(((t,n)=>{
|
|
1697
1707
|
const{__scopeRadio:r,name:a,checked:o=!1,required:i,disabled:l,value:c="on",onCheck:s,...u}=t,[d,h]=e.useState(null),p=hn(n,(e=>h(e))),f=e.useRef(!1),m=!d||Boolean(d.closest("form"))
|
|
1698
1708
|
;return e.createElement(jl,{scope:r,checked:o,disabled:l
|
|
1699
1709
|
},e.createElement(yn.button,un({type:"button",role:"radio","aria-checked":o,
|
|
1700
1710
|
"data-state":Gl(o),"data-disabled":l?"":void 0,disabled:l,value:c},u,{ref:p,
|
|
1701
|
-
onClick:
|
|
1711
|
+
onClick:rr(t.onClick,(e=>{
|
|
1702
1712
|
o||null==s||s(),m&&(f.current=e.isPropagationStopped(),
|
|
1703
1713
|
f.current||e.stopPropagation())}))})),m&&e.createElement(Wl,{control:d,
|
|
1704
1714
|
bubbles:!f.current,name:a,value:c,checked:o,required:i,disabled:l,style:{
|
|
1705
1715
|
transform:"translateX(-100%)"}}))})),Yl=e.forwardRef(((t,n)=>{
|
|
1706
1716
|
const{__scopeRadio:r,forceMount:a,...o}=t,i=Ul("RadioIndicator",r)
|
|
1707
|
-
;return e.createElement(
|
|
1717
|
+
;return e.createElement(So,{present:a||i.checked},e.createElement(yn.span,un({
|
|
1708
1718
|
"data-state":Gl(i.checked),"data-disabled":i.disabled?"":void 0},o,{ref:n})))
|
|
1709
1719
|
})),Wl=t=>{
|
|
1710
|
-
const{control:n,checked:r,bubbles:a=!0,...o}=t,i=e.useRef(null),l=Ol(r),c=
|
|
1720
|
+
const{control:n,checked:r,bubbles:a=!0,...o}=t,i=e.useRef(null),l=Ol(r),c=ro(n)
|
|
1711
1721
|
;return e.useEffect((()=>{
|
|
1712
1722
|
const e=i.current,t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,"checked").set
|
|
1713
1723
|
;if(l!==r&&n){const t=new Event("click",{bubbles:a})
|
|
@@ -1715,10 +1725,10 @@ const e=i.current,t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDes
|
|
|
1715
1725
|
type:"radio","aria-hidden":!0,defaultChecked:r},o,{tabIndex:-1,ref:i,style:{
|
|
1716
1726
|
...t.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))}
|
|
1717
1727
|
;function Gl(e){return e?"checked":"unchecked"}
|
|
1718
|
-
const Kl=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],ql="RadioGroup",[Zl,Xl]=
|
|
1719
|
-
const{__scopeRadioGroup:r,name:a,defaultValue:o,value:i,required:l=!1,disabled:c=!1,orientation:s,dir:u,loop:d=!0,onValueChange:h,...p}=t,f=Ql(r),m=
|
|
1728
|
+
const Kl=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],ql="RadioGroup",[Zl,Xl]=ar(ql,[Ro,Bl]),Ql=Ro(),Jl=Bl(),[ec,tc]=Zl(ql),nc=e.forwardRef(((t,n)=>{
|
|
1729
|
+
const{__scopeRadioGroup:r,name:a,defaultValue:o,value:i,required:l=!1,disabled:c=!1,orientation:s,dir:u,loop:d=!0,onValueChange:h,...p}=t,f=Ql(r),m=ur(u),[v,g]=lr({
|
|
1720
1730
|
prop:i,defaultProp:o,onChange:h});return e.createElement(ec,{scope:r,name:a,
|
|
1721
|
-
required:l,disabled:c,value:v,onValueChange:g},e.createElement(
|
|
1731
|
+
required:l,disabled:c,value:v,onValueChange:g},e.createElement(Uo,un({asChild:!0
|
|
1722
1732
|
},f,{orientation:s,dir:m,loop:d}),e.createElement(yn.div,un({role:"radiogroup",
|
|
1723
1733
|
"aria-required":l,"aria-orientation":s,"data-disabled":c?"":void 0,dir:m},p,{
|
|
1724
1734
|
ref:n}))))})),rc=nc,ac=e.forwardRef(((t,n)=>{
|
|
@@ -1728,10 +1738,10 @@ const{__scopeRadioGroup:r,disabled:a,...o}=t,i=tc("RadioGroupItem",r),l=i.disabl
|
|
|
1728
1738
|
;return document.addEventListener("keydown",e),document.addEventListener("keyup",t),
|
|
1729
1739
|
()=>{
|
|
1730
1740
|
document.removeEventListener("keydown",e),document.removeEventListener("keyup",t)
|
|
1731
|
-
}}),[]),e.createElement(
|
|
1741
|
+
}}),[]),e.createElement($o,un({asChild:!0},c,{focusable:!l,active:h
|
|
1732
1742
|
}),e.createElement($l,un({disabled:l,required:i.required,checked:h},s,o,{
|
|
1733
|
-
name:i.name,ref:d,onCheck:()=>i.onValueChange(o.value),onKeyDown:
|
|
1734
|
-
"Enter"===e.key&&e.preventDefault()})),onFocus:
|
|
1743
|
+
name:i.name,ref:d,onCheck:()=>i.onValueChange(o.value),onKeyDown:rr((e=>{
|
|
1744
|
+
"Enter"===e.key&&e.preventDefault()})),onFocus:rr(o.onFocus,(()=>{var e
|
|
1735
1745
|
;p.current&&(null===(e=u.current)||void 0===e||e.click())}))})))
|
|
1736
1746
|
})),oc=e.forwardRef(((t,n)=>{const{__scopeRadioGroup:r,...a}=t,o=Jl(r)
|
|
1737
1747
|
;return e.createElement(Yl,un({},o,a,{ref:n}))})),ic=on.div``,lc=on(rc)`
|
|
@@ -1835,8 +1845,8 @@ name:i.name,ref:d,onCheck:()=>i.onValueChange(o.value),onKeyDown:ir((e=>{
|
|
|
1835
1845
|
line-height: 20px;
|
|
1836
1846
|
`,vc=t=>e.createElement(mc,{...t,
|
|
1837
1847
|
className:`input-helper ${t.className??""}`.trim()
|
|
1838
|
-
},t.children),gc="Checkbox",[yc,bc]=
|
|
1839
|
-
const{__scopeCheckbox:r,name:a,checked:o,defaultChecked:i,required:l,disabled:c,value:s="on",onCheckedChange:u,...d}=t,[h,p]=e.useState(null),f=hn(n,(e=>p(e))),m=e.useRef(!1),v=!h||Boolean(h.closest("form")),[g=!1,y]=
|
|
1848
|
+
},t.children),gc="Checkbox",[yc,bc]=ar(gc),[wc,Cc]=yc(gc),zc=e.forwardRef(((t,n)=>{
|
|
1849
|
+
const{__scopeCheckbox:r,name:a,checked:o,defaultChecked:i,required:l,disabled:c,value:s="on",onCheckedChange:u,...d}=t,[h,p]=e.useState(null),f=hn(n,(e=>p(e))),m=e.useRef(!1),v=!h||Boolean(h.closest("form")),[g=!1,y]=lr({
|
|
1840
1850
|
prop:o,defaultProp:i,onChange:u}),b=e.useRef(g);return e.useEffect((()=>{
|
|
1841
1851
|
const e=null==h?void 0:h.form;if(e){const t=()=>y(b.current)
|
|
1842
1852
|
;return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}
|
|
@@ -1844,13 +1854,13 @@ const e=null==h?void 0:h.form;if(e){const t=()=>y(b.current)
|
|
|
1844
1854
|
},e.createElement(yn.button,un({type:"button",role:"checkbox",
|
|
1845
1855
|
"aria-checked":xc(g)?"mixed":g,"aria-required":l,"data-state":Ec(g),
|
|
1846
1856
|
"data-disabled":c?"":void 0,disabled:c,value:s},d,{ref:f,
|
|
1847
|
-
onKeyDown:
|
|
1848
|
-
onClick:
|
|
1857
|
+
onKeyDown:rr(t.onKeyDown,(e=>{"Enter"===e.key&&e.preventDefault()})),
|
|
1858
|
+
onClick:rr(t.onClick,(e=>{
|
|
1849
1859
|
y((e=>!!xc(e)||!e)),v&&(m.current=e.isPropagationStopped(),
|
|
1850
1860
|
m.current||e.stopPropagation())}))})),v&&e.createElement(Mc,{control:h,
|
|
1851
1861
|
bubbles:!m.current,name:a,value:s,checked:g,required:l,disabled:c,style:{
|
|
1852
1862
|
transform:"translateX(-100%)"}}))})),Mc=t=>{
|
|
1853
|
-
const{control:n,checked:r,bubbles:a=!0,...o}=t,i=e.useRef(null),l=Ol(r),c=
|
|
1863
|
+
const{control:n,checked:r,bubbles:a=!0,...o}=t,i=e.useRef(null),l=Ol(r),c=ro(n)
|
|
1854
1864
|
;return e.useEffect((()=>{
|
|
1855
1865
|
const e=i.current,t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,"checked").set
|
|
1856
1866
|
;if(l!==r&&n){const t=new Event("click",{bubbles:a})
|
|
@@ -1862,7 +1872,7 @@ return"indeterminate"===e}function Ec(e){
|
|
|
1862
1872
|
return xc(e)?"indeterminate":e?"checked":"unchecked"}
|
|
1863
1873
|
const Sc=zc,_c=on(e.forwardRef(((t,n)=>{
|
|
1864
1874
|
const{__scopeCheckbox:r,forceMount:a,...o}=t,i=Cc("CheckboxIndicator",r)
|
|
1865
|
-
;return e.createElement(
|
|
1875
|
+
;return e.createElement(So,{present:a||xc(i.state)||!0===i.state
|
|
1866
1876
|
},e.createElement(yn.span,un({"data-state":Ec(i.state),
|
|
1867
1877
|
"data-disabled":i.disabled?"":void 0},o,{ref:n,style:{pointerEvents:"none",
|
|
1868
1878
|
...t.style}})))})))`
|
|
@@ -1926,28 +1936,28 @@ className:"toggle-indeterminate",width:8,height:6,fill:l.colors.common.accent
|
|
|
1926
1936
|
}):e.createElement(Lc,{className:"toggle-on",width:8,height:6,
|
|
1927
1937
|
fill:l.colors.common.accent}))),o&&e.createElement(Cn,{
|
|
1928
1938
|
className:"CheckboxLabel",htmlFor:i.id},o,t&&e.createElement(zn,null,"*")))
|
|
1929
|
-
},kc="Dialog",[Tc,Rc]=
|
|
1939
|
+
},kc="Dialog",[Tc,Rc]=ar(kc),[Pc,Ic]=Tc(kc),Oc="DialogPortal",[Nc,Fc]=Tc(Oc,{
|
|
1930
1940
|
forceMount:void 0}),Bc="DialogOverlay",jc=e.forwardRef(((t,n)=>{
|
|
1931
1941
|
const r=Fc(Bc,t.__scopeDialog),{forceMount:a=r.forceMount,...o}=t,i=Ic(Bc,t.__scopeDialog)
|
|
1932
|
-
;return i.modal?e.createElement(
|
|
1942
|
+
;return i.modal?e.createElement(So,{present:a||i.open
|
|
1933
1943
|
},e.createElement(Uc,un({},o,{ref:n}))):null})),Uc=e.forwardRef(((t,n)=>{
|
|
1934
|
-
const{__scopeDialog:r,...a}=t,o=Ic(Bc,r);return e.createElement(
|
|
1944
|
+
const{__scopeDialog:r,...a}=t,o=Ic(Bc,r);return e.createElement(Vi,{as:pn,
|
|
1935
1945
|
allowPinchZoom:!0,shards:[o.contentRef]},e.createElement(yn.div,un({
|
|
1936
1946
|
"data-state":ts(o.open)},a,{ref:n,style:{pointerEvents:"auto",...a.style}})))
|
|
1937
1947
|
})),$c="DialogContent",Yc=e.forwardRef(((t,n)=>{
|
|
1938
1948
|
const r=Fc($c,t.__scopeDialog),{forceMount:a=r.forceMount,...o}=t,i=Ic($c,t.__scopeDialog)
|
|
1939
|
-
;return e.createElement(
|
|
1949
|
+
;return e.createElement(So,{present:a||i.open
|
|
1940
1950
|
},i.modal?e.createElement(Wc,un({},o,{ref:n})):e.createElement(Gc,un({},o,{ref:n
|
|
1941
1951
|
})))})),Wc=e.forwardRef(((t,n)=>{
|
|
1942
1952
|
const r=Ic($c,t.__scopeDialog),a=e.useRef(null),o=hn(n,r.contentRef,a)
|
|
1943
|
-
;return e.useEffect((()=>{const e=a.current;if(e)return
|
|
1953
|
+
;return e.useEffect((()=>{const e=a.current;if(e)return Xo(e)
|
|
1944
1954
|
}),[]),e.createElement(Kc,un({},t,{ref:o,trapFocus:r.open,
|
|
1945
|
-
disableOutsidePointerEvents:!0,onCloseAutoFocus:
|
|
1955
|
+
disableOutsidePointerEvents:!0,onCloseAutoFocus:rr(t.onCloseAutoFocus,(e=>{var t
|
|
1946
1956
|
;e.preventDefault(),null===(t=r.triggerRef.current)||void 0===t||t.focus()})),
|
|
1947
|
-
onPointerDownOutside:
|
|
1957
|
+
onPointerDownOutside:rr(t.onPointerDownOutside,(e=>{
|
|
1948
1958
|
const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey
|
|
1949
1959
|
;(2===t.button||n)&&e.preventDefault()})),
|
|
1950
|
-
onFocusOutside:
|
|
1960
|
+
onFocusOutside:rr(t.onFocusOutside,(e=>e.preventDefault()))}))
|
|
1951
1961
|
})),Gc=e.forwardRef(((t,n)=>{
|
|
1952
1962
|
const r=Ic($c,t.__scopeDialog),a=e.useRef(!1),o=e.useRef(!1)
|
|
1953
1963
|
;return e.createElement(Kc,un({},t,{ref:n,trapFocus:!1,
|
|
@@ -1962,9 +1972,9 @@ e.defaultPrevented||(a.current=!0,
|
|
|
1962
1972
|
"focusin"===e.detail.originalEvent.type&&o.current&&e.preventDefault()}}))
|
|
1963
1973
|
})),Kc=e.forwardRef(((t,n)=>{
|
|
1964
1974
|
const{__scopeDialog:r,trapFocus:a,onOpenAutoFocus:o,onCloseAutoFocus:i,...l}=t,c=Ic($c,r),s=hn(n,e.useRef(null))
|
|
1965
|
-
;return
|
|
1975
|
+
;return Mr(),e.createElement(e.Fragment,null,e.createElement(Hr,{asChild:!0,
|
|
1966
1976
|
loop:!0,trapped:a,onMountAutoFocus:o,onUnmountAutoFocus:i
|
|
1967
|
-
},e.createElement(
|
|
1977
|
+
},e.createElement(vr,un({role:"dialog",id:c.contentId,
|
|
1968
1978
|
"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,
|
|
1969
1979
|
"data-state":ts(c.open)},l,{ref:s,onDismiss:()=>c.onOpenChange(!1)}))),!1)
|
|
1970
1980
|
})),qc="DialogTitle",Zc=e.forwardRef(((t,n)=>{
|
|
@@ -1973,7 +1983,7 @@ id:o.titleId},a,{ref:n}))})),Xc="DialogDescription",Qc=e.forwardRef(((t,n)=>{
|
|
|
1973
1983
|
const{__scopeDialog:r,...a}=t,o=Ic(Xc,r);return e.createElement(yn.p,un({
|
|
1974
1984
|
id:o.descriptionId},a,{ref:n}))})),Jc="DialogClose",es=e.forwardRef(((t,n)=>{
|
|
1975
1985
|
const{__scopeDialog:r,...a}=t,o=Ic(Jc,r);return e.createElement(yn.button,un({
|
|
1976
|
-
type:"button"},a,{ref:n,onClick:
|
|
1986
|
+
type:"button"},a,{ref:n,onClick:rr(t.onClick,(()=>o.onOpenChange(!1)))}))}))
|
|
1977
1987
|
;function ts(e){return e?"open":"closed"}const[ns,rs]=function(t,n){
|
|
1978
1988
|
const r=e.createContext(n);function a(t){
|
|
1979
1989
|
const{children:n,...a}=t,o=e.useMemo((()=>a),Object.values(a))
|
|
@@ -1982,21 +1992,21 @@ return a.displayName=t+"Provider",[a,function(a){const o=e.useContext(r)
|
|
|
1982
1992
|
;if(o)return o;if(void 0!==n)return n
|
|
1983
1993
|
;throw new Error(`\`${a}\` must be used within \`${t}\``)}]
|
|
1984
1994
|
}("DialogTitleWarning",{contentName:$c,titleName:qc,docsSlug:"dialog"}),as=t=>{
|
|
1985
|
-
const{__scopeDialog:n,children:r,open:a,defaultOpen:o,onOpenChange:i,modal:l=!0}=t,c=e.useRef(null),s=e.useRef(null),[u=!1,d]=
|
|
1995
|
+
const{__scopeDialog:n,children:r,open:a,defaultOpen:o,onOpenChange:i,modal:l=!0}=t,c=e.useRef(null),s=e.useRef(null),[u=!1,d]=lr({
|
|
1986
1996
|
prop:a,defaultProp:o,onChange:i});return e.createElement(Pc,{scope:n,
|
|
1987
|
-
triggerRef:c,contentRef:s,contentId:
|
|
1997
|
+
triggerRef:c,contentRef:s,contentId:Or(),titleId:Or(),descriptionId:Or(),open:u,
|
|
1988
1998
|
onOpenChange:d,onOpenToggle:e.useCallback((()=>d((e=>!e))),[d]),modal:l},r)
|
|
1989
1999
|
},os=t=>{const{__scopeDialog:n,forceMount:r,children:a,container:o}=t,i=Ic(Oc,n)
|
|
1990
2000
|
;return e.createElement(Nc,{scope:n,forceMount:r
|
|
1991
|
-
},e.Children.map(a,(t=>e.createElement(
|
|
1992
|
-
},e.createElement(
|
|
1993
|
-
},is=jc,ls=Yc,cs=Zc,ss=Qc,us=es,[ds,hs]=
|
|
2001
|
+
},e.Children.map(a,(t=>e.createElement(So,{present:r||i.open
|
|
2002
|
+
},e.createElement(Eo,{asChild:!0,container:o},t)))))
|
|
2003
|
+
},is=jc,ls=Yc,cs=Zc,ss=Qc,us=es,[ds,hs]=ar("AlertDialog",[Rc]),ps=Rc(),fs=e.forwardRef(((t,n)=>{
|
|
1994
2004
|
const{__scopeAlertDialog:r,...a}=t,o=ps(r);return e.createElement(is,un({},o,a,{
|
|
1995
2005
|
ref:n}))})),ms="AlertDialogContent",[vs,gs]=ds(ms),ys=e.forwardRef(((t,n)=>{
|
|
1996
2006
|
const{__scopeAlertDialog:r,children:a,...o}=t,i=ps(r),l=hn(n,e.useRef(null)),c=e.useRef(null)
|
|
1997
2007
|
;return e.createElement(ns,{contentName:ms,titleName:bs,docsSlug:"alert-dialog"
|
|
1998
2008
|
},e.createElement(vs,{scope:r,cancelRef:c},e.createElement(ls,un({
|
|
1999
|
-
role:"alertdialog"},i,o,{ref:l,onOpenAutoFocus:
|
|
2009
|
+
role:"alertdialog"},i,o,{ref:l,onOpenAutoFocus:rr(o.onOpenAutoFocus,(e=>{var t
|
|
2000
2010
|
;e.preventDefault(),null===(t=c.current)||void 0===t||t.focus({preventScroll:!0
|
|
2001
2011
|
})})),onPointerDownOutside:e=>e.preventDefault(),
|
|
2002
2012
|
onInteractOutside:e=>e.preventDefault()}),e.createElement(mn,null,a),!1)))
|
|
@@ -2150,31 +2160,31 @@ const qs=e.forwardRef(((t,n)=>e.createElement(yn.span,un({},t,{ref:n,style:{
|
|
|
2150
2160
|
position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,
|
|
2151
2161
|
overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",
|
|
2152
2162
|
...t.style}
|
|
2153
|
-
})))),Zs=qs,Xs=[" ","Enter","ArrowUp","ArrowDown"],Qs=[" ","Enter"],Js="Select",[eu,tu,nu]=
|
|
2163
|
+
})))),Zs=qs,Xs=[" ","Enter","ArrowUp","ArrowDown"],Qs=[" ","Enter"],Js="Select",[eu,tu,nu]=cr(Js),[ru,au]=ar(Js,[nu,io]),ou=io(),[iu,lu]=ru(Js),[cu,su]=ru(Js),uu=e.forwardRef(((t,n)=>{
|
|
2154
2164
|
const{__scopeSelect:r,disabled:a=!1,...o}=t,i=ou(r),l=lu("SelectTrigger",r),c=l.disabled||a,s=hn(n,l.onTriggerChange),u=tu(r),[d,h,p]=Uu((e=>{
|
|
2155
2165
|
const t=u().filter((e=>!e.disabled)),n=t.find((e=>e.value===l.value)),r=$u(t,e,n)
|
|
2156
2166
|
;void 0!==r&&l.onValueChange(r.value)})),f=()=>{c||(l.onOpenChange(!0),p())}
|
|
2157
|
-
;return e.createElement(
|
|
2167
|
+
;return e.createElement(zo,un({asChild:!0},i),e.createElement(yn.button,un({
|
|
2158
2168
|
type:"button",role:"combobox","aria-controls":l.contentId,
|
|
2159
2169
|
"aria-expanded":l.open,"aria-required":l.required,"aria-autocomplete":"none",
|
|
2160
2170
|
dir:l.dir,"data-state":l.open?"open":"closed",disabled:c,
|
|
2161
2171
|
"data-disabled":c?"":void 0,"data-placeholder":Bu(l.value)?"":void 0},o,{ref:s,
|
|
2162
|
-
onClick:
|
|
2163
|
-
onPointerDown:
|
|
2172
|
+
onClick:rr(o.onClick,(e=>{e.currentTarget.focus()})),
|
|
2173
|
+
onPointerDown:rr(o.onPointerDown,(e=>{const t=e.target
|
|
2164
2174
|
;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),
|
|
2165
2175
|
0===e.button&&!1===e.ctrlKey&&(f(),l.triggerPointerDownPosRef.current={
|
|
2166
2176
|
x:Math.round(e.pageX),y:Math.round(e.pageY)},e.preventDefault())})),
|
|
2167
|
-
onKeyDown:
|
|
2177
|
+
onKeyDown:rr(o.onKeyDown,(e=>{const t=""!==d.current
|
|
2168
2178
|
;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||h(e.key),
|
|
2169
2179
|
t&&" "===e.key||Xs.includes(e.key)&&(f(),e.preventDefault())}))})))
|
|
2170
2180
|
})),du=e.forwardRef(((t,n)=>{
|
|
2171
2181
|
const{__scopeSelect:r,className:a,style:o,children:i,placeholder:l="",...c}=t,s=lu("SelectValue",r),{onValueNodeHasChildrenChange:u}=s,d=void 0!==i,h=hn(n,s.onValueNodeChange)
|
|
2172
|
-
;return
|
|
2182
|
+
;return Rr((()=>{u(d)}),[u,d]),e.createElement(yn.span,un({},c,{ref:h,style:{
|
|
2173
2183
|
pointerEvents:"none"}}),Bu(s.value)?e.createElement(e.Fragment,null,l):i)
|
|
2174
2184
|
})),hu=e.forwardRef(((t,n)=>{const{__scopeSelect:r,children:a,...o}=t
|
|
2175
2185
|
;return e.createElement(yn.span,un({"aria-hidden":!0},o,{ref:n}),a||"▼")
|
|
2176
2186
|
})),pu="SelectContent",fu=e.forwardRef(((n,r)=>{
|
|
2177
|
-
const a=lu(pu,n.__scopeSelect),[o,i]=e.useState();if(
|
|
2187
|
+
const a=lu(pu,n.__scopeSelect),[o,i]=e.useState();if(Rr((()=>{
|
|
2178
2188
|
i(new DocumentFragment)}),[]),!a.open){const r=o
|
|
2179
2189
|
;return r?t.createPortal(e.createElement(vu,{scope:n.__scopeSelect
|
|
2180
2190
|
},e.createElement(eu.Slot,{scope:n.__scopeSelect
|
|
@@ -2182,7 +2192,7 @@ i(new DocumentFragment)}),[]),!a.open){const r=o
|
|
|
2182
2192
|
return e.createElement(yu,un({},n,{ref:r}))
|
|
2183
2193
|
})),mu=10,[vu,gu]=ru(pu),yu=e.forwardRef(((t,n)=>{
|
|
2184
2194
|
const{__scopeSelect:r,position:a="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:i,onPointerDownOutside:l,side:c,sideOffset:s,align:u,alignOffset:d,arrowPadding:h,collisionBoundary:p,collisionPadding:f,sticky:m,hideWhenDetached:v,avoidCollisions:g,...y}=t,b=lu(pu,r),[w,C]=e.useState(null),[z,M]=e.useState(null),x=hn(n,(e=>C(e))),[E,S]=e.useState(null),[_,H]=e.useState(null),D=tu(r),[L,V]=e.useState(!1),A=e.useRef(!1)
|
|
2185
|
-
;e.useEffect((()=>{if(w)return
|
|
2195
|
+
;e.useEffect((()=>{if(w)return Xo(w)}),[w]),Mr();const k=e.useCallback((e=>{
|
|
2186
2196
|
const[t,...n]=D().map((e=>e.ref.current)),[r]=n.slice(-1),a=document.activeElement
|
|
2187
2197
|
;for(const n of e){if(n===a)return;if(null==n||n.scrollIntoView({block:"nearest"
|
|
2188
2198
|
}),
|
|
@@ -2216,18 +2226,18 @@ alignOffset:d,arrowPadding:h,collisionBoundary:p,collisionPadding:f,sticky:m,
|
|
|
2216
2226
|
hideWhenDetached:v,avoidCollisions:g}:{};return e.createElement(vu,{scope:r,
|
|
2217
2227
|
content:w,viewport:z,onViewportChange:M,itemRefCallback:N,selectedItem:E,
|
|
2218
2228
|
onItemLeave:F,itemTextRefCallback:B,focusSelectedItem:T,selectedItemText:_,
|
|
2219
|
-
position:a,isPositioned:L,searchRef:I},e.createElement(
|
|
2220
|
-
allowPinchZoom:!0},e.createElement(
|
|
2221
|
-
onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:
|
|
2229
|
+
position:a,isPositioned:L,searchRef:I},e.createElement(Vi,{as:pn,
|
|
2230
|
+
allowPinchZoom:!0},e.createElement(Hr,{asChild:!0,trapped:b.open,
|
|
2231
|
+
onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:rr(o,(e=>{var t
|
|
2222
2232
|
;null===(t=b.trigger)||void 0===t||t.focus({preventScroll:!0
|
|
2223
|
-
}),e.preventDefault()}))},e.createElement(
|
|
2233
|
+
}),e.preventDefault()}))},e.createElement(vr,{asChild:!0,
|
|
2224
2234
|
disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:l,
|
|
2225
2235
|
onFocusOutside:e=>e.preventDefault(),onDismiss:()=>b.onOpenChange(!1)
|
|
2226
2236
|
},e.createElement(j,un({role:"listbox",id:b.contentId,
|
|
2227
2237
|
"data-state":b.open?"open":"closed",dir:b.dir,
|
|
2228
2238
|
onContextMenu:e=>e.preventDefault()},y,U,{onPlaced:()=>V(!0),ref:x,style:{
|
|
2229
2239
|
display:"flex",flexDirection:"column",outline:"none",...y.style},
|
|
2230
|
-
onKeyDown:
|
|
2240
|
+
onKeyDown:rr(y.onKeyDown,(e=>{const t=e.ctrlKey||e.altKey||e.metaKey
|
|
2231
2241
|
;if("Tab"===e.key&&e.preventDefault(),
|
|
2232
2242
|
t||1!==e.key.length||O(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){
|
|
2233
2243
|
let t=D().filter((e=>!e.disabled)).map((e=>e.ref.current))
|
|
@@ -2251,8 +2261,8 @@ const o=p(),l=window.innerHeight-2*mu,s=v.scrollHeight,d=window.getComputedStyle
|
|
|
2251
2261
|
;c.style.height=t+"px",v.scrollTop=H-E+v.offsetTop}
|
|
2252
2262
|
c.style.margin=`${mu}px 0`,c.style.minHeight=C+"px",
|
|
2253
2263
|
c.style.maxHeight=l+"px",null==a||a(),requestAnimationFrame((()=>f.current=!0))}
|
|
2254
|
-
}),[p,i.trigger,i.valueNode,c,u,v,g,y,i.dir,a]);
|
|
2255
|
-
;const[C,z]=e.useState();
|
|
2264
|
+
}),[p,i.trigger,i.valueNode,c,u,v,g,y,i.dir,a]);Rr((()=>w()),[w])
|
|
2265
|
+
;const[C,z]=e.useState();Rr((()=>{u&&z(window.getComputedStyle(u).zIndex)}),[u])
|
|
2256
2266
|
;const M=e.useCallback((e=>{e&&!0===m.current&&(w(),null==b||b(),m.current=!1)
|
|
2257
2267
|
}),[w,b]);return e.createElement(Cu,{scope:r,contentWrapper:c,
|
|
2258
2268
|
shouldExpandOnScrollRef:f,onScrollButtonChange:M},e.createElement("div",{ref:s,
|
|
@@ -2260,7 +2270,7 @@ style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:C}
|
|
|
2260
2270
|
},e.createElement(yn.div,un({},o,{ref:h,style:{boxSizing:"border-box",
|
|
2261
2271
|
maxHeight:"100%",...o.style}}))))})),wu=e.forwardRef(((t,n)=>{
|
|
2262
2272
|
const{__scopeSelect:r,align:a="start",collisionPadding:o=mu,...i}=t,l=ou(r)
|
|
2263
|
-
;return e.createElement(
|
|
2273
|
+
;return e.createElement(Mo,un({},l,i,{ref:n,align:a,collisionPadding:o,style:{
|
|
2264
2274
|
boxSizing:"border-box",...i.style,
|
|
2265
2275
|
"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)",
|
|
2266
2276
|
"--radix-select-content-available-width":"var(--radix-popper-available-width)",
|
|
@@ -2275,7 +2285,7 @@ __html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:non
|
|
|
2275
2285
|
}}),e.createElement(eu.Slot,{scope:r},e.createElement(yn.div,un({
|
|
2276
2286
|
"data-radix-select-viewport":"",role:"presentation"},a,{ref:l,style:{
|
|
2277
2287
|
position:"relative",flex:1,overflow:"auto",...a.style},
|
|
2278
|
-
onScroll:
|
|
2288
|
+
onScroll:rr(a.onScroll,(e=>{
|
|
2279
2289
|
const t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=i
|
|
2280
2290
|
;if(null!=r&&r.current&&n){const e=Math.abs(c.current-t.scrollTop);if(e>0){
|
|
2281
2291
|
const r=window.innerHeight-2*mu,a=parseFloat(n.style.minHeight),o=parseFloat(n.style.height),i=Math.max(a,o)
|
|
@@ -2283,14 +2293,14 @@ const r=window.innerHeight-2*mu,a=parseFloat(n.style.minHeight),o=parseFloat(n.s
|
|
|
2283
2293
|
;n.style.height=o+"px","0px"===n.style.bottom&&(t.scrollTop=l>0?l:0,
|
|
2284
2294
|
n.style.justifyContent="flex-end")}}}c.current=t.scrollTop}))}))))
|
|
2285
2295
|
})),[Eu,Su]=ru("SelectGroup"),_u=e.forwardRef(((t,n)=>{
|
|
2286
|
-
const{__scopeSelect:r,...a}=t,o=
|
|
2296
|
+
const{__scopeSelect:r,...a}=t,o=Or();return e.createElement(Eu,{scope:r,id:o
|
|
2287
2297
|
},e.createElement(yn.div,un({role:"group","aria-labelledby":o},a,{ref:n})))
|
|
2288
2298
|
})),Hu=e.forwardRef(((t,n)=>{const{__scopeSelect:r,...a}=t,o=Su("SelectLabel",r)
|
|
2289
2299
|
;return e.createElement(yn.div,un({id:o.id},a,{ref:n}))
|
|
2290
2300
|
})),Du="SelectItem",[Lu,Vu]=ru(Du),Au=e.forwardRef(((t,n)=>{
|
|
2291
2301
|
const{__scopeSelect:r,value:a,disabled:o=!1,textValue:i,...l}=t,c=lu(Du,r),s=gu(Du,r),u=c.value===a,[d,h]=e.useState(null!=i?i:""),[p,f]=e.useState(!1),m=hn(n,(e=>{
|
|
2292
2302
|
var t;return null===(t=s.itemRefCallback)||void 0===t?void 0:t.call(s,e,a,o)
|
|
2293
|
-
})),v=
|
|
2303
|
+
})),v=Or(),g=()=>{o||(c.onValueChange(a),c.onOpenChange(!1))}
|
|
2294
2304
|
;if(""===a)throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.")
|
|
2295
2305
|
;return e.createElement(Lu,{scope:r,value:a,disabled:o,textId:v,isSelected:u,
|
|
2296
2306
|
onItemTextChange:e.useCallback((e=>{h((t=>{var n
|
|
@@ -2300,12 +2310,12 @@ onItemTextChange:e.useCallback((e=>{h((t=>{var n
|
|
|
2300
2310
|
"data-highlighted":p?"":void 0,"aria-selected":u&&p,
|
|
2301
2311
|
"data-state":u?"checked":"unchecked","aria-disabled":o||void 0,
|
|
2302
2312
|
"data-disabled":o?"":void 0,tabIndex:o?void 0:-1},l,{ref:m,
|
|
2303
|
-
onFocus:
|
|
2304
|
-
onPointerUp:
|
|
2313
|
+
onFocus:rr(l.onFocus,(()=>f(!0))),onBlur:rr(l.onBlur,(()=>f(!1))),
|
|
2314
|
+
onPointerUp:rr(l.onPointerUp,g),onPointerMove:rr(l.onPointerMove,(e=>{var t
|
|
2305
2315
|
;o?null===(t=s.onItemLeave)||void 0===t||t.call(s):e.currentTarget.focus({
|
|
2306
|
-
preventScroll:!0})})),onPointerLeave:
|
|
2316
|
+
preventScroll:!0})})),onPointerLeave:rr(l.onPointerLeave,(e=>{var t
|
|
2307
2317
|
;e.currentTarget===document.activeElement&&(null===(t=s.onItemLeave)||void 0===t||t.call(s))
|
|
2308
|
-
})),onKeyDown:
|
|
2318
|
+
})),onKeyDown:rr(l.onKeyDown,(e=>{var t
|
|
2309
2319
|
;""!==(null===(t=s.searchRef)||void 0===t?void 0:t.current)&&" "===e.key||(Qs.includes(e.key)&&g(),
|
|
2310
2320
|
" "===e.key&&e.preventDefault())}))}))))
|
|
2311
2321
|
})),ku="SelectItemText",Tu=e.forwardRef(((n,r)=>{
|
|
@@ -2315,7 +2325,7 @@ var t
|
|
|
2315
2325
|
})),m=null==h?void 0:h.textContent,v=e.useMemo((()=>e.createElement("option",{
|
|
2316
2326
|
key:u.value,value:u.value,disabled:u.disabled
|
|
2317
2327
|
},m)),[u.disabled,u.value,m]),{onNativeOptionAdd:g,onNativeOptionRemove:y}=d
|
|
2318
|
-
;return
|
|
2328
|
+
;return Rr((()=>(g(v),
|
|
2319
2329
|
()=>y(v))),[g,y,v]),e.createElement(e.Fragment,null,e.createElement(yn.span,un({
|
|
2320
2330
|
id:u.textId},l,{ref:f
|
|
2321
2331
|
})),u.isSelected&&c.valueNode&&!c.valueNodeHasChildren?t.createPortal(l.children,c.valueNode):null)
|
|
@@ -2324,7 +2334,7 @@ id:u.textId},l,{ref:f
|
|
|
2324
2334
|
"aria-hidden":!0},a,{ref:n})):null
|
|
2325
2335
|
})),Pu="SelectScrollUpButton",Iu=e.forwardRef(((t,n)=>{
|
|
2326
2336
|
const r=gu(Pu,t.__scopeSelect),a=zu(Pu,t.__scopeSelect),[o,i]=e.useState(!1),l=hn(n,a.onScrollButtonChange)
|
|
2327
|
-
;return
|
|
2337
|
+
;return Rr((()=>{if(r.viewport&&r.isPositioned){const e=r.viewport;function t(){
|
|
2328
2338
|
const t=e.scrollTop>0;i(t)}
|
|
2329
2339
|
return t(),e.addEventListener("scroll",t),()=>e.removeEventListener("scroll",t)}
|
|
2330
2340
|
}),[r.viewport,r.isPositioned]),o?e.createElement(Fu,un({},t,{ref:l,
|
|
@@ -2332,7 +2342,7 @@ onAutoScroll:()=>{const{viewport:e,selectedItem:t}=r
|
|
|
2332
2342
|
;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}})):null
|
|
2333
2343
|
})),Ou="SelectScrollDownButton",Nu=e.forwardRef(((t,n)=>{
|
|
2334
2344
|
const r=gu(Ou,t.__scopeSelect),a=zu(Ou,t.__scopeSelect),[o,i]=e.useState(!1),l=hn(n,a.onScrollButtonChange)
|
|
2335
|
-
;return
|
|
2345
|
+
;return Rr((()=>{if(r.viewport&&r.isPositioned){const e=r.viewport;function t(){
|
|
2336
2346
|
const t=e.scrollHeight-e.clientHeight,n=Math.ceil(e.scrollTop)<t;i(n)}
|
|
2337
2347
|
return t(),e.addEventListener("scroll",t),()=>e.removeEventListener("scroll",t)}
|
|
2338
2348
|
}),[r.viewport,r.isPositioned]),o?e.createElement(Fu,un({},t,{ref:l,
|
|
@@ -2341,16 +2351,16 @@ onAutoScroll:()=>{const{viewport:e,selectedItem:t}=r
|
|
|
2341
2351
|
})),Fu=e.forwardRef(((t,n)=>{
|
|
2342
2352
|
const{__scopeSelect:r,onAutoScroll:a,...o}=t,i=gu("SelectScrollButton",r),l=e.useRef(null),c=tu(r),s=e.useCallback((()=>{
|
|
2343
2353
|
null!==l.current&&(window.clearInterval(l.current),l.current=null)}),[])
|
|
2344
|
-
;return e.useEffect((()=>()=>s()),[s]),
|
|
2354
|
+
;return e.useEffect((()=>()=>s()),[s]),Rr((()=>{var e
|
|
2345
2355
|
;const t=c().find((e=>e.ref.current===document.activeElement))
|
|
2346
2356
|
;null==t||null===(e=t.ref.current)||void 0===e||e.scrollIntoView({
|
|
2347
2357
|
block:"nearest"})}),[c]),e.createElement(yn.div,un({"aria-hidden":!0},o,{ref:n,
|
|
2348
|
-
style:{flexShrink:0,...o.style},onPointerDown:
|
|
2358
|
+
style:{flexShrink:0,...o.style},onPointerDown:rr(o.onPointerDown,(()=>{
|
|
2349
2359
|
null===l.current&&(l.current=window.setInterval(a,50))})),
|
|
2350
|
-
onPointerMove:
|
|
2360
|
+
onPointerMove:rr(o.onPointerMove,(()=>{var e
|
|
2351
2361
|
;null===(e=i.onItemLeave)||void 0===e||e.call(i),
|
|
2352
2362
|
null===l.current&&(l.current=window.setInterval(a,50))})),
|
|
2353
|
-
onPointerLeave:
|
|
2363
|
+
onPointerLeave:rr(o.onPointerLeave,(()=>{s()}))}))}));function Bu(e){
|
|
2354
2364
|
return""===e||void 0===e}const ju=e.forwardRef(((t,n)=>{
|
|
2355
2365
|
const{value:r,...a}=t,o=e.useRef(null),i=hn(n,o),l=Ol(r)
|
|
2356
2366
|
;return e.useEffect((()=>{
|
|
@@ -2358,7 +2368,7 @@ const e=o.current,t=window.HTMLSelectElement.prototype,n=Object.getOwnPropertyDe
|
|
|
2358
2368
|
;if(l!==r&&n){const t=new Event("change",{bubbles:!0})
|
|
2359
2369
|
;n.call(e,r),e.dispatchEvent(t)}}),[l,r]),e.createElement(qs,{asChild:!0
|
|
2360
2370
|
},e.createElement("select",un({},a,{ref:i,defaultValue:r})))}));function Uu(t){
|
|
2361
|
-
const n=
|
|
2371
|
+
const n=ir(t),r=e.useRef(""),a=e.useRef(0),o=e.useCallback((e=>{
|
|
2362
2372
|
const t=r.current+e;n(t),function e(t){
|
|
2363
2373
|
r.current=t,window.clearTimeout(a.current),
|
|
2364
2374
|
""!==t&&(a.current=window.setTimeout((()=>e("")),1e3))}(t)
|
|
@@ -2370,12 +2380,12 @@ const r=t.length>1&&Array.from(t).every((e=>e===t[0])),a=r?t[0]:t,o=n?e.indexOf(
|
|
|
2370
2380
|
;1===a.length&&(i=i.filter((e=>e!==n)))
|
|
2371
2381
|
;const l=i.find((e=>e.textValue.toLowerCase().startsWith(a.toLowerCase())))
|
|
2372
2382
|
;return l!==n?l:void 0}ju.displayName="BubbleSelect";const Yu=t=>{
|
|
2373
|
-
const{__scopeSelect:n,children:r,open:a,defaultOpen:o,onOpenChange:i,value:l,defaultValue:c,onValueChange:s,dir:u,name:d,autoComplete:h,disabled:p,required:f}=t,m=ou(n),[v,g]=e.useState(null),[y,b]=e.useState(null),[w,C]=e.useState(!1),z=
|
|
2374
|
-
prop:a,defaultProp:o,onChange:i}),[E,S]=
|
|
2383
|
+
const{__scopeSelect:n,children:r,open:a,defaultOpen:o,onOpenChange:i,value:l,defaultValue:c,onValueChange:s,dir:u,name:d,autoComplete:h,disabled:p,required:f}=t,m=ou(n),[v,g]=e.useState(null),[y,b]=e.useState(null),[w,C]=e.useState(!1),z=ur(u),[M=!1,x]=lr({
|
|
2384
|
+
prop:a,defaultProp:o,onChange:i}),[E,S]=lr({prop:l,defaultProp:c,onChange:s
|
|
2375
2385
|
}),_=e.useRef(null),H=!v||Boolean(v.closest("form")),[D,L]=e.useState(new Set),V=Array.from(D).map((e=>e.props.value)).join(";")
|
|
2376
|
-
;return e.createElement(
|
|
2386
|
+
;return e.createElement(Co,m,e.createElement(iu,{required:f,scope:n,trigger:v,
|
|
2377
2387
|
onTriggerChange:g,valueNode:y,onValueNodeChange:b,valueNodeHasChildren:w,
|
|
2378
|
-
onValueNodeHasChildrenChange:C,contentId:
|
|
2388
|
+
onValueNodeHasChildrenChange:C,contentId:Or(),value:E,onValueChange:S,open:M,
|
|
2379
2389
|
onOpenChange:x,dir:z,triggerPointerDownPosRef:_,disabled:p
|
|
2380
2390
|
},e.createElement(eu.Provider,{scope:n},e.createElement(cu,{
|
|
2381
2391
|
scope:t.__scopeSelect,onNativeOptionAdd:e.useCallback((e=>{
|
|
@@ -2384,13 +2394,13 @@ const n=new Set(t);return n.delete(e),n}))}),[])},r)),H?e.createElement(ju,{
|
|
|
2384
2394
|
key:V,"aria-hidden":!0,required:f,tabIndex:-1,name:d,autoComplete:h,value:E,
|
|
2385
2395
|
onChange:e=>S(e.target.value),disabled:p},void 0===E?e.createElement("option",{
|
|
2386
2396
|
value:""}):null,Array.from(D)):null))
|
|
2387
|
-
},Wu=uu,Gu=du,Ku=hu,qu=t=>e.createElement(
|
|
2397
|
+
},Wu=uu,Gu=du,Ku=hu,qu=t=>e.createElement(Eo,un({asChild:!0
|
|
2388
2398
|
},t)),Zu=fu,Xu=xu,Qu=_u,Ju=Hu,ed=Au,td=Tu,nd=Ru,rd=Iu,ad=Nu,od=t=>e.createElement("svg",{
|
|
2389
2399
|
width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",
|
|
2390
2400
|
xmlns:"http://www.w3.org/2000/svg",...t},e.createElement("path",{
|
|
2391
2401
|
fillRule:"evenodd",clipRule:"evenodd",
|
|
2392
2402
|
d:"M8.49996 3.55C8.49193 3.14514 8.64578 2.75382 8.92738 2.46283C9.20899 2.17184 9.59506 2.00525 9.99996 2C10.4049 2.00525 10.7909 2.17184 11.0725 2.46283C11.3541 2.75382 11.508 3.14514 11.5 3.55C11.5053 3.95314 11.3503 4.34188 11.0689 4.6307C10.7876 4.91951 10.4031 5.08473 9.99996 5.09C9.59682 5.08473 9.21229 4.91951 8.93097 4.6307C8.64966 4.34188 8.49462 3.95314 8.49996 3.55ZM9.99995 14.91C9.19475 14.9748 8.57435 15.6472 8.57435 16.455C8.57435 17.2628 9.19475 17.9352 9.99995 18C10.8051 17.9352 11.4256 17.2628 11.4256 16.455C11.4256 15.6472 10.8051 14.9748 9.99995 14.91ZM8.44995 10C8.44995 9.14396 9.14391 8.45 9.99995 8.45C10.856 8.45 11.55 9.14396 11.55 10C11.55 10.856 10.856 11.55 9.99995 11.55C9.14391 11.55 8.44995 10.856 8.44995 10Z",
|
|
2393
|
-
fill:t.fill})),id=on(
|
|
2403
|
+
fill:t.fill})),id=on(Rl)`
|
|
2394
2404
|
transform: rotate(${({isOpen:e})=>e?"0deg":"-180deg"});
|
|
2395
2405
|
transition: transform 0.2s ease-in-out;
|
|
2396
2406
|
`,ld=on.div`
|
|
@@ -3613,24 +3623,24 @@ className:"input-label","aria-label":a,htmlFor:o
|
|
|
3613
3623
|
},a,d&&e.createElement(zn,null,"*"))),e.createElement(md,{open:x,defaultOpen:M,
|
|
3614
3624
|
name:f,required:d,disabled:u,value:b?.[r]??void 0,onValueChange:e=>{if(s)return
|
|
3615
3625
|
;const t=i.find((t=>t?.[r]===e));l?.(t??null)}},e.createElement(Dd,{
|
|
3616
|
-
className:`SelectTrigger ${g
|
|
3626
|
+
className:`SelectTrigger ${g||""}`.trim(),"aria-label":"Food",disabled:u,id:o,
|
|
3617
3627
|
isErrored:!!w,"aria-invalid":!!w,width:v,style:y},e.createElement(gd,{
|
|
3618
3628
|
className:"SelectValue",placeholder:c}),e.createElement(Hd,{
|
|
3619
|
-
className:"SelectIcon"},e.createElement(
|
|
3629
|
+
className:"SelectIcon"},e.createElement(Rl,{fill:n.colors.text.primary
|
|
3620
3630
|
}))),e.createElement(yd,null,e.createElement(zd,{className:"SelectContent",
|
|
3621
3631
|
position:"popper",side:"bottom",sideOffset:4,sticky:"partial"
|
|
3622
3632
|
},C?e.createElement(hd,null,e.createElement(em,null)):e.createElement(e.Fragment,null,e.createElement(Sd,{
|
|
3623
|
-
className:"SelectScrollButton"},e.createElement(
|
|
3633
|
+
className:"SelectScrollButton"},e.createElement(Rl,{fill:n.colors.text.primary
|
|
3624
3634
|
})),e.createElement(xd,{className:"SelectViewport"
|
|
3625
3635
|
},E.map((t=>e.createElement(vd,{key:t.key,className:"SelectGroup"
|
|
3626
3636
|
},"default"!==t.key&&e.createElement(Cd,{className:"SelectLabel"
|
|
3627
3637
|
},t.key,e.createElement(wd,null)),t.items.map(((t,n)=>{
|
|
3628
3638
|
const a="string"==typeof t?t:t?.[r],o=t?.[r]??""
|
|
3629
3639
|
;return o&&""!==o||console.warn("No value for item",t),
|
|
3630
|
-
e.createElement(e.Fragment,null,m?m(t,{key:a,value:o
|
|
3631
|
-
showTick:h}):e.createElement(am,{key:a,value:o||a,
|
|
3632
|
-
showTick:h},p(t,"list-item")))})))))),e.createElement(_d,{
|
|
3633
|
-
className:"SelectScrollButton"},e.createElement(
|
|
3640
|
+
e.createElement(e.Fragment,null,m?m(t,{key:a,value:o||a.trim,
|
|
3641
|
+
disabled:!!t.disabled,showTick:h}):e.createElement(am,{key:a,value:o||a,
|
|
3642
|
+
disabled:!!t.disabled,showTick:h},p(t,"list-item")))})))))),e.createElement(_d,{
|
|
3643
|
+
className:"SelectScrollButton"},e.createElement(Rl,{fill:n.colors.text.primary
|
|
3634
3644
|
})))))),w&&z&&e.createElement(vc,null,z))
|
|
3635
3645
|
},rm=({itemIdentifier:t="id",label:n,id:r,items:a=[],placeholder:o,readOnly:i=!1,disabled:l=!1,isRequired:c=!1,hideClear:s=!1,itemToString:u,name:d,filterKey:h,width:p,customValues:f,onCustomValueAdd:m,itemComponent:v,emptyItemsText:g,getCustomMessage:y,onChange:b,useComboboxProps:w,isErrored:C,errorText:z,defaultSelectedItem:M,isMenuLoading:x})=>{
|
|
3636
3646
|
const E=qt(),[S,_]=e.useState(a),{isOpen:H,selectedItem:D,getToggleButtonProps:L,getLabelProps:V,getMenuProps:A,openMenu:k,highlightedIndex:T,setHighlightedIndex:R,setInputValue:P,inputValue:I,getItemProps:O,getInputProps:N}=ff({
|
|
@@ -3808,17 +3818,17 @@ default:"512px",small:"424px",medium:"600px",large:"800px","x-large":"1200px"
|
|
|
3808
3818
|
line-height: ${({theme:e})=>e.typography.primary.lineHeight};
|
|
3809
3819
|
}
|
|
3810
3820
|
`;on.span``
|
|
3811
|
-
;const pm="Avatar",[fm,mm]=
|
|
3821
|
+
;const pm="Avatar",[fm,mm]=ar(pm),[vm,gm]=fm(pm),ym=e.forwardRef(((t,n)=>{
|
|
3812
3822
|
const{__scopeAvatar:r,...a}=t,[o,i]=e.useState("idle")
|
|
3813
3823
|
;return e.createElement(vm,{scope:r,imageLoadingStatus:o,
|
|
3814
3824
|
onImageLoadingStatusChange:i},e.createElement(yn.span,un({},a,{ref:n})))}))
|
|
3815
3825
|
;const bm=e.forwardRef(((t,n)=>{
|
|
3816
3826
|
const{__scopeAvatar:r,src:a,onLoadingStatusChange:o=(()=>{}),...i}=t,l=gm("AvatarImage",r),c=function(t){
|
|
3817
|
-
const[n,r]=e.useState("idle");return
|
|
3827
|
+
const[n,r]=e.useState("idle");return Rr((()=>{if(!t)return void r("error")
|
|
3818
3828
|
;let e=!0;const n=new window.Image,a=t=>()=>{e&&r(t)}
|
|
3819
3829
|
;return r("loading"),n.onload=a("loaded"),n.onerror=a("error"),n.src=t,()=>{e=!1
|
|
3820
|
-
}}),[t]),n}(a),s=
|
|
3821
|
-
;return
|
|
3830
|
+
}}),[t]),n}(a),s=ir((e=>{o(e),l.onImageLoadingStatusChange(e)}))
|
|
3831
|
+
;return Rr((()=>{"idle"!==c&&s(c)
|
|
3822
3832
|
}),[c,s]),"loaded"===c?e.createElement(yn.img,un({},i,{ref:n,src:a})):null
|
|
3823
3833
|
})),wm=e.forwardRef(((t,n)=>{
|
|
3824
3834
|
const{__scopeAvatar:r,delayMs:a,...o}=t,i=gm("AvatarFallback",r),[l,c]=e.useState(void 0===a)
|
|
@@ -12466,32 +12476,32 @@ return e.createElement(tm,{items:n,
|
|
|
12466
12476
|
itemToString:(e,n)=>"list-item"===n?e?.name??"":"months"===t.name&&e?.name?jR?.[e?.name?.toString().toLowerCase()]:e?.name??"",
|
|
12467
12477
|
type:"button",disabled:!!t.disabled,
|
|
12468
12478
|
defaultSelectedItem:n.find((e=>e.id===t.value))??null,style:t.style,
|
|
12469
|
-
className:`${t.className
|
|
12479
|
+
className:`${t.className} bp-custom-dropdown bp-custom-dropdown-${t.name}`.trim(),
|
|
12470
12480
|
onChange:e=>{t?.onChange?.({target:{value:e?.id}})}})}
|
|
12471
12481
|
return e.createElement(tm,{itemToString:()=>"",type:"button"})},$R=[{id:"AM",
|
|
12472
12482
|
name:"AM"},{id:"PM",name:"PM"
|
|
12473
|
-
}],YR="Popover",[WR,GR]=
|
|
12483
|
+
}],YR="Popover",[WR,GR]=ar(YR,[io]),KR=io(),[qR,ZR]=WR(YR),XR=e.forwardRef(((t,n)=>{
|
|
12474
12484
|
const{__scopePopover:r,...a}=t,o=ZR("PopoverTrigger",r),i=KR(r),l=hn(n,o.triggerRef),c=e.createElement(yn.button,un({
|
|
12475
12485
|
type:"button","aria-haspopup":"dialog","aria-expanded":o.open,
|
|
12476
12486
|
"aria-controls":o.contentId,"data-state":iP(o.open)},a,{ref:l,
|
|
12477
|
-
onClick:
|
|
12478
|
-
;return o.hasCustomAnchor?c:e.createElement(
|
|
12487
|
+
onClick:rr(t.onClick,o.onOpenToggle)}))
|
|
12488
|
+
;return o.hasCustomAnchor?c:e.createElement(zo,un({asChild:!0},i),c)
|
|
12479
12489
|
})),QR="PopoverPortal",[JR,eP]=WR(QR,{forceMount:void 0
|
|
12480
12490
|
}),tP="PopoverContent",nP=e.forwardRef(((t,n)=>{
|
|
12481
12491
|
const r=eP(tP,t.__scopePopover),{forceMount:a=r.forceMount,...o}=t,i=ZR(tP,t.__scopePopover)
|
|
12482
|
-
;return e.createElement(
|
|
12492
|
+
;return e.createElement(So,{present:a||i.open
|
|
12483
12493
|
},i.modal?e.createElement(rP,un({},o,{ref:n})):e.createElement(aP,un({},o,{ref:n
|
|
12484
12494
|
})))})),rP=e.forwardRef(((t,n)=>{
|
|
12485
12495
|
const r=ZR(tP,t.__scopePopover),a=e.useRef(null),o=hn(n,a),i=e.useRef(!1)
|
|
12486
|
-
;return e.useEffect((()=>{const e=a.current;if(e)return
|
|
12487
|
-
}),[]),e.createElement(
|
|
12496
|
+
;return e.useEffect((()=>{const e=a.current;if(e)return Xo(e)
|
|
12497
|
+
}),[]),e.createElement(Vi,{as:pn,allowPinchZoom:!0},e.createElement(oP,un({},t,{
|
|
12488
12498
|
ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,
|
|
12489
|
-
onCloseAutoFocus:
|
|
12499
|
+
onCloseAutoFocus:rr(t.onCloseAutoFocus,(e=>{var t
|
|
12490
12500
|
;e.preventDefault(),i.current||null===(t=r.triggerRef.current)||void 0===t||t.focus()
|
|
12491
|
-
})),onPointerDownOutside:
|
|
12501
|
+
})),onPointerDownOutside:rr(t.onPointerDownOutside,(e=>{
|
|
12492
12502
|
const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n
|
|
12493
12503
|
;i.current=r}),{checkForDefaultPrevented:!1}),
|
|
12494
|
-
onFocusOutside:
|
|
12504
|
+
onFocusOutside:rr(t.onFocusOutside,(e=>e.preventDefault()),{
|
|
12495
12505
|
checkForDefaultPrevented:!1})})))})),aP=e.forwardRef(((t,n)=>{
|
|
12496
12506
|
const r=ZR(tP,t.__scopePopover),a=e.useRef(!1),o=e.useRef(!1)
|
|
12497
12507
|
;return e.createElement(oP,un({},t,{ref:n,trapFocus:!1,
|
|
@@ -12506,11 +12516,11 @@ e.defaultPrevented||(a.current=!0,
|
|
|
12506
12516
|
"focusin"===e.detail.originalEvent.type&&o.current&&e.preventDefault()}}))
|
|
12507
12517
|
})),oP=e.forwardRef(((t,n)=>{
|
|
12508
12518
|
const{__scopePopover:r,trapFocus:a,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:l,onEscapeKeyDown:c,onPointerDownOutside:s,onFocusOutside:u,onInteractOutside:d,...h}=t,p=ZR(tP,r),f=KR(r)
|
|
12509
|
-
;return
|
|
12510
|
-
onMountAutoFocus:o,onUnmountAutoFocus:i},e.createElement(
|
|
12519
|
+
;return Mr(),e.createElement(Hr,{asChild:!0,loop:!0,trapped:a,
|
|
12520
|
+
onMountAutoFocus:o,onUnmountAutoFocus:i},e.createElement(vr,{asChild:!0,
|
|
12511
12521
|
disableOutsidePointerEvents:l,onInteractOutside:d,onEscapeKeyDown:c,
|
|
12512
12522
|
onPointerDownOutside:s,onFocusOutside:u,onDismiss:()=>p.onOpenChange(!1)
|
|
12513
|
-
},e.createElement(
|
|
12523
|
+
},e.createElement(Mo,un({"data-state":iP(p.open),role:"dialog",id:p.contentId
|
|
12514
12524
|
},f,h,{ref:n,style:{...h.style,
|
|
12515
12525
|
"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)",
|
|
12516
12526
|
"--radix-popover-content-available-width":"var(--radix-popper-available-width)",
|
|
@@ -12518,20 +12528,20 @@ onPointerDownOutside:s,onFocusOutside:u,onDismiss:()=>p.onOpenChange(!1)
|
|
|
12518
12528
|
"--radix-popover-trigger-width":"var(--radix-popper-anchor-width)",
|
|
12519
12529
|
"--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}}))))}))
|
|
12520
12530
|
;function iP(e){return e?"open":"closed"}const lP=t=>{
|
|
12521
|
-
const{__scopePopover:n,children:r,open:a,defaultOpen:o,onOpenChange:i,modal:l=!1}=t,c=KR(n),s=e.useRef(null),[u,d]=e.useState(!1),[h=!1,p]=
|
|
12531
|
+
const{__scopePopover:n,children:r,open:a,defaultOpen:o,onOpenChange:i,modal:l=!1}=t,c=KR(n),s=e.useRef(null),[u,d]=e.useState(!1),[h=!1,p]=lr({
|
|
12522
12532
|
prop:a,defaultProp:o,onChange:i})
|
|
12523
|
-
;return e.createElement(
|
|
12533
|
+
;return e.createElement(Co,c,e.createElement(qR,{scope:n,contentId:Or(),
|
|
12524
12534
|
triggerRef:s,open:h,onOpenChange:p,
|
|
12525
12535
|
onOpenToggle:e.useCallback((()=>p((e=>!e))),[p]),hasCustomAnchor:u,
|
|
12526
12536
|
onCustomAnchorAdd:e.useCallback((()=>d(!0)),[]),
|
|
12527
12537
|
onCustomAnchorRemove:e.useCallback((()=>d(!1)),[]),modal:l},r))},cP=XR,sP=t=>{
|
|
12528
12538
|
const{__scopePopover:n,forceMount:r,children:a,container:o}=t,i=ZR(QR,n)
|
|
12529
|
-
;return e.createElement(JR,{scope:n,forceMount:r},e.createElement(
|
|
12530
|
-
present:r||i.open},e.createElement(
|
|
12539
|
+
;return e.createElement(JR,{scope:n,forceMount:r},e.createElement(So,{
|
|
12540
|
+
present:r||i.open},e.createElement(Eo,{asChild:!0,container:o},a)))
|
|
12531
12541
|
},uP=e.forwardRef(((t,n)=>{const{__scopePopover:r,...a}=t,o=ZR("PopoverClose",r)
|
|
12532
12542
|
;return e.createElement(yn.button,un({type:"button"},a,{ref:n,
|
|
12533
|
-
onClick:
|
|
12534
|
-
const{__scopePopover:r,...a}=t,o=KR(r);return e.createElement(
|
|
12543
|
+
onClick:rr(t.onClick,(()=>o.onOpenChange(!1)))}))})),dP=e.forwardRef(((t,n)=>{
|
|
12544
|
+
const{__scopePopover:r,...a}=t,o=KR(r);return e.createElement(xo,un({},o,a,{
|
|
12535
12545
|
ref:n}))})),hP=on(nP)`
|
|
12536
12546
|
background: white;
|
|
12537
12547
|
border-radius: 8px;
|
|
@@ -15067,9 +15077,9 @@ fillRule:"evenodd",clipRule:"evenodd",
|
|
|
15067
15077
|
d:"M4.16 2H11.84C13.0329 2 14 2.96706 14 4.16V11.84C14 12.4129 13.7724 12.9623 13.3674 13.3674C12.9623 13.7724 12.4129 14 11.84 14H4.16C3.58713 14 3.03773 13.7724 2.63265 13.3674C2.22757 12.9623 2 12.4129 2 11.84V4.16C2 2.96706 2.96706 2 4.16 2ZM3.12 4.16V11.84C3.12 12.4144 3.58562 12.88 4.16 12.88H9.93599V3.12H4.16C3.88417 3.12 3.61964 3.22957 3.4246 3.42461C3.22957 3.61965 3.12 3.88417 3.12 4.16ZM11.84 12.88H11.04V3.12H11.84C12.1158 3.12 12.3804 3.22957 12.5754 3.42461C12.7704 3.61965 12.88 3.88417 12.88 4.16V11.84C12.88 12.4144 12.4144 12.88 11.84 12.88ZM5.74401 10.168C5.8945 10.168 6.03866 10.1075 6.14401 10L7.712 8.4C7.92739 8.17682 7.92739 7.82317 7.712 7.6L6.15201 6C5.93109 5.77908 5.57292 5.77908 5.35201 6C5.13109 6.22091 5.13109 6.57908 5.35201 6.8L6.52001 8L5.35201 9.2C5.13236 9.42144 5.13236 9.77856 5.35201 10C5.45436 10.107 5.59592 10.1677 5.74401 10.168Z",
|
|
15068
15078
|
fill:t.fill}))))`
|
|
15069
15079
|
transition: all 0.3s ease-in-out;
|
|
15070
|
-
`,uF=on(
|
|
15080
|
+
`,uF=on(Rl)`
|
|
15071
15081
|
transform: rotate(270deg);
|
|
15072
|
-
`,dF=on(
|
|
15082
|
+
`,dF=on(Rl)`
|
|
15073
15083
|
transform: rotate(90deg);
|
|
15074
15084
|
`,hF=on.div`
|
|
15075
15085
|
display: flex;
|
|
@@ -15278,30 +15288,30 @@ onClick:()=>{a((e=>({...e,[t.id]:!1}))),i((e=>e.filter((e=>e.id!==t.id))))}
|
|
|
15278
15288
|
},e.createElement(tr,{variant:"secondary"},"Cancel")),e.createElement(tr,{
|
|
15279
15289
|
onClick:()=>{t.setColumnOrder(o.map((e=>e.id))),t.setColumnVisibility(r)}
|
|
15280
15290
|
},"Update")))
|
|
15281
|
-
},BF="Tabs",[jF,UF]=
|
|
15282
|
-
const{__scopeTabs:r,value:a,onValueChange:o,defaultValue:i,orientation:l="horizontal",dir:c,activationMode:s="automatic",...u}=t,d=
|
|
15291
|
+
},BF="Tabs",[jF,UF]=ar(BF,[Ro]),$F=Ro(),[YF,WF]=jF(BF),GF=e.forwardRef(((t,n)=>{
|
|
15292
|
+
const{__scopeTabs:r,value:a,onValueChange:o,defaultValue:i,orientation:l="horizontal",dir:c,activationMode:s="automatic",...u}=t,d=ur(c),[h,p]=lr({
|
|
15283
15293
|
prop:a,onChange:o,defaultProp:i});return e.createElement(YF,{scope:r,
|
|
15284
|
-
baseId:
|
|
15294
|
+
baseId:Or(),value:h,onValueChange:p,orientation:l,dir:d,activationMode:s
|
|
15285
15295
|
},e.createElement(yn.div,un({dir:d,"data-orientation":l},u,{ref:n})))}))
|
|
15286
15296
|
;function KF(e,t){return`${e}-trigger-${t}`}function qF(e,t){
|
|
15287
15297
|
return`${e}-content-${t}`}const ZF=e.forwardRef(((t,n)=>{
|
|
15288
15298
|
const{__scopeTabs:r,loop:a=!0,...o}=t,i=WF("TabsList",r),l=$F(r)
|
|
15289
|
-
;return e.createElement(
|
|
15299
|
+
;return e.createElement(Uo,un({asChild:!0},l,{orientation:i.orientation,
|
|
15290
15300
|
dir:i.dir,loop:a}),e.createElement(yn.div,un({role:"tablist",
|
|
15291
15301
|
"aria-orientation":i.orientation},o,{ref:n})))})),XF=e.forwardRef(((t,n)=>{
|
|
15292
15302
|
const{__scopeTabs:r,value:a,disabled:o=!1,...i}=t,l=WF("TabsTrigger",r),c=$F(r),s=KF(l.baseId,a),u=qF(l.baseId,a),d=a===l.value
|
|
15293
|
-
;return e.createElement(
|
|
15303
|
+
;return e.createElement($o,un({asChild:!0},c,{focusable:!o,active:d
|
|
15294
15304
|
}),e.createElement(yn.button,un({type:"button",role:"tab","aria-selected":d,
|
|
15295
15305
|
"aria-controls":u,"data-state":d?"active":"inactive",
|
|
15296
15306
|
"data-disabled":o?"":void 0,disabled:o,id:s},i,{ref:n,
|
|
15297
|
-
onMouseDown:
|
|
15307
|
+
onMouseDown:rr(t.onMouseDown,(e=>{
|
|
15298
15308
|
o||0!==e.button||!1!==e.ctrlKey?e.preventDefault():l.onValueChange(a)})),
|
|
15299
|
-
onKeyDown:
|
|
15300
|
-
})),onFocus:
|
|
15309
|
+
onKeyDown:rr(t.onKeyDown,(e=>{[" ","Enter"].includes(e.key)&&l.onValueChange(a)
|
|
15310
|
+
})),onFocus:rr(t.onFocus,(()=>{const e="manual"!==l.activationMode
|
|
15301
15311
|
;d||o||!e||l.onValueChange(a)}))})))})),QF=e.forwardRef(((t,n)=>{
|
|
15302
15312
|
const{__scopeTabs:r,value:a,forceMount:o,children:i,...l}=t,c=WF("TabsContent",r),s=KF(c.baseId,a),u=qF(c.baseId,a),d=a===c.value,h=e.useRef(d)
|
|
15303
15313
|
;return e.useEffect((()=>{const e=requestAnimationFrame((()=>h.current=!1))
|
|
15304
|
-
;return()=>cancelAnimationFrame(e)}),[]),e.createElement(
|
|
15314
|
+
;return()=>cancelAnimationFrame(e)}),[]),e.createElement(So,{present:o||d
|
|
15305
15315
|
},(({present:r})=>e.createElement(yn.div,un({"data-state":d?"active":"inactive",
|
|
15306
15316
|
"data-orientation":c.orientation,role:"tabpanel","aria-labelledby":s,hidden:!r,
|
|
15307
15317
|
id:u,tabIndex:0},l,{ref:n,style:{...t.style,
|
|
@@ -15330,7 +15340,7 @@ animationDuration:h.current?"0s":void 0}}),r&&i)))
|
|
|
15330
15340
|
}
|
|
15331
15341
|
`,rB=e.createContext({toasts:[],windowState:"focus",addToast:()=>{},
|
|
15332
15342
|
updateToasts:()=>{}
|
|
15333
|
-
}),aB="ToastProvider",[oB,iB,lB]=
|
|
15343
|
+
}),aB="ToastProvider",[oB,iB,lB]=cr("Toast"),[cB,sB]=ar("Toast",[lB]),[uB,dB]=cB(aB),hB=t=>{
|
|
15334
15344
|
const{__scopeToast:n,label:r="Notification",duration:a=5e3,swipeDirection:o="right",swipeThreshold:i=50,children:l}=t,[c,s]=e.useState(null),[u,d]=e.useState(0),h=e.useRef(!1),p=e.useRef(!1)
|
|
15335
15345
|
;return e.createElement(oB.Provider,{scope:n},e.createElement(uB,{scope:n,
|
|
15336
15346
|
label:r,duration:a,swipeDirection:o,swipeThreshold:i,toastCount:u,viewport:c,
|
|
@@ -15371,7 +15381,7 @@ const e=h.current;if(e){const t=t=>{const n=t.altKey||t.ctrlKey||t.metaKey
|
|
|
15371
15381
|
}),c=l.findIndex((e=>e===n));var a,o
|
|
15372
15382
|
;if(AB(l.slice(c+1)))t.preventDefault();else i?null===(a=u.current)||void 0===a||a.focus():null===(o=d.current)||void 0===o||o.focus()
|
|
15373
15383
|
}};return e.addEventListener("keydown",t),()=>e.removeEventListener("keydown",t)
|
|
15374
|
-
}}),[c,v]),e.createElement(
|
|
15384
|
+
}}),[c,v]),e.createElement(Cr,{ref:s,role:"region",
|
|
15375
15385
|
"aria-label":o.replace("{hotkey}",f),tabIndex:-1,style:{
|
|
15376
15386
|
pointerEvents:m?void 0:"none"}},m&&e.createElement(gB,{ref:u,
|
|
15377
15387
|
onFocusFromOutsideViewport:()=>{AB(v({tabbingDirection:"forwards"}))}
|
|
@@ -15383,30 +15393,30 @@ const{__scopeToast:r,onFocusFromOutsideViewport:a,...o}=t,i=dB("ToastFocusProxy"
|
|
|
15383
15393
|
position:"fixed"},onFocus:e=>{var t;const n=e.relatedTarget
|
|
15384
15394
|
;!(null!==(t=i.viewport)&&void 0!==t&&t.contains(n))&&a()}}))
|
|
15385
15395
|
})),yB="Toast",bB=e.forwardRef(((t,n)=>{
|
|
15386
|
-
const{forceMount:r,open:a,defaultOpen:o,onOpenChange:i,...l}=t,[c=!0,s]=
|
|
15387
|
-
prop:a,defaultProp:o,onChange:i});return e.createElement(
|
|
15396
|
+
const{forceMount:r,open:a,defaultOpen:o,onOpenChange:i,...l}=t,[c=!0,s]=lr({
|
|
15397
|
+
prop:a,defaultProp:o,onChange:i});return e.createElement(So,{present:r||c
|
|
15388
15398
|
},e.createElement(zB,un({open:c},l,{ref:n,onClose:()=>s(!1),
|
|
15389
|
-
onPause:
|
|
15390
|
-
onSwipeStart:
|
|
15399
|
+
onPause:ir(t.onPause),onResume:ir(t.onResume),
|
|
15400
|
+
onSwipeStart:rr(t.onSwipeStart,(e=>{
|
|
15391
15401
|
e.currentTarget.setAttribute("data-swipe","start")})),
|
|
15392
|
-
onSwipeMove:
|
|
15402
|
+
onSwipeMove:rr(t.onSwipeMove,(e=>{const{x:t,y:n}=e.detail.delta
|
|
15393
15403
|
;e.currentTarget.setAttribute("data-swipe","move"),
|
|
15394
15404
|
e.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${t}px`),
|
|
15395
15405
|
e.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${n}px`)})),
|
|
15396
|
-
onSwipeCancel:
|
|
15406
|
+
onSwipeCancel:rr(t.onSwipeCancel,(e=>{
|
|
15397
15407
|
e.currentTarget.setAttribute("data-swipe","cancel"),
|
|
15398
15408
|
e.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),
|
|
15399
15409
|
e.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),
|
|
15400
15410
|
e.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),
|
|
15401
15411
|
e.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")})),
|
|
15402
|
-
onSwipeEnd:
|
|
15412
|
+
onSwipeEnd:rr(t.onSwipeEnd,(e=>{const{x:t,y:n}=e.detail.delta
|
|
15403
15413
|
;e.currentTarget.setAttribute("data-swipe","end"),
|
|
15404
15414
|
e.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),
|
|
15405
15415
|
e.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),
|
|
15406
15416
|
e.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${t}px`),
|
|
15407
15417
|
e.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${n}px`),s(!1)}))
|
|
15408
15418
|
})))})),[wB,CB]=cB(yB,{onClose(){}}),zB=e.forwardRef(((n,r)=>{
|
|
15409
|
-
const{__scopeToast:a,type:o="foreground",duration:i,open:l,onClose:c,onEscapeKeyDown:s,onPause:u,onResume:d,onSwipeStart:h,onSwipeMove:p,onSwipeCancel:f,onSwipeEnd:m,...v}=n,g=dB(yB,a),[y,b]=e.useState(null),w=hn(r,(e=>b(e))),C=e.useRef(null),z=e.useRef(null),M=i||g.duration,x=e.useRef(0),E=e.useRef(M),S=e.useRef(0),{onToastAdd:_,onToastRemove:H}=g,D=
|
|
15419
|
+
const{__scopeToast:a,type:o="foreground",duration:i,open:l,onClose:c,onEscapeKeyDown:s,onPause:u,onResume:d,onSwipeStart:h,onSwipeMove:p,onSwipeCancel:f,onSwipeEnd:m,...v}=n,g=dB(yB,a),[y,b]=e.useState(null),w=hn(r,(e=>b(e))),C=e.useRef(null),z=e.useRef(null),M=i||g.duration,x=e.useRef(0),E=e.useRef(M),S=e.useRef(0),{onToastAdd:_,onToastRemove:H}=g,D=ir((()=>{
|
|
15410
15420
|
var e
|
|
15411
15421
|
;(null==y?void 0:y.contains(document.activeElement))&&(null===(e=g.viewport)||void 0===e||e.focus()),
|
|
15412
15422
|
c()})),L=e.useCallback((e=>{
|
|
@@ -15423,24 +15433,24 @@ e.removeEventListener(fB,n),e.removeEventListener(mB,t)}}
|
|
|
15423
15433
|
;return g.viewport?e.createElement(e.Fragment,null,V&&e.createElement(MB,{
|
|
15424
15434
|
__scopeToast:a,role:"status","aria-live":"foreground"===o?"assertive":"polite",
|
|
15425
15435
|
"aria-atomic":!0},V),e.createElement(wB,{scope:a,onClose:D
|
|
15426
|
-
},t.createPortal(e.createElement(oB.ItemSlot,{scope:a},e.createElement(
|
|
15427
|
-
asChild:!0,onEscapeKeyDown:
|
|
15436
|
+
},t.createPortal(e.createElement(oB.ItemSlot,{scope:a},e.createElement(wr,{
|
|
15437
|
+
asChild:!0,onEscapeKeyDown:rr(s,(()=>{
|
|
15428
15438
|
g.isFocusedToastEscapeKeyDownRef.current||D(),
|
|
15429
15439
|
g.isFocusedToastEscapeKeyDownRef.current=!1}))},e.createElement(yn.li,un({
|
|
15430
15440
|
role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,
|
|
15431
15441
|
"data-state":l?"open":"closed","data-swipe-direction":g.swipeDirection},v,{
|
|
15432
15442
|
ref:w,style:{userSelect:"none",touchAction:"none",...n.style},
|
|
15433
|
-
onKeyDown:
|
|
15443
|
+
onKeyDown:rr(n.onKeyDown,(e=>{
|
|
15434
15444
|
"Escape"===e.key&&(null==s||s(e.nativeEvent),e.nativeEvent.defaultPrevented||(g.isFocusedToastEscapeKeyDownRef.current=!0,
|
|
15435
|
-
D()))})),onPointerDown:
|
|
15436
|
-
x:e.clientX,y:e.clientY})})),onPointerMove:
|
|
15445
|
+
D()))})),onPointerDown:rr(n.onPointerDown,(e=>{0===e.button&&(C.current={
|
|
15446
|
+
x:e.clientX,y:e.clientY})})),onPointerMove:rr(n.onPointerMove,(e=>{
|
|
15437
15447
|
if(!C.current)return
|
|
15438
15448
|
;const t=e.clientX-C.current.x,n=e.clientY-C.current.y,r=Boolean(z.current),a=["left","right"].includes(g.swipeDirection),o=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,i=a?o(0,t):0,l=a?0:o(0,n),c="touch"===e.pointerType?10:2,s={
|
|
15439
15449
|
x:i,y:l},u={originalEvent:e,delta:s};r?(z.current=s,DB("toast.swipeMove",p,u,{
|
|
15440
15450
|
discrete:!1})):LB(s,g.swipeDirection,c)?(z.current=s,DB("toast.swipeStart",h,u,{
|
|
15441
15451
|
discrete:!1
|
|
15442
15452
|
}),e.target.setPointerCapture(e.pointerId)):(Math.abs(t)>c||Math.abs(n)>c)&&(C.current=null)
|
|
15443
|
-
})),onPointerUp:
|
|
15453
|
+
})),onPointerUp:rr(n.onPointerUp,(e=>{const t=z.current,n=e.target
|
|
15444
15454
|
;if(n.hasPointerCapture(e.pointerId)&&n.releasePointerCapture(e.pointerId),
|
|
15445
15455
|
z.current=null,C.current=null,t){const n=e.currentTarget,r={originalEvent:e,
|
|
15446
15456
|
delta:t};LB(t,g.swipeDirection,g.swipeThreshold)?DB("toast.swipeEnd",m,r,{
|
|
@@ -15451,11 +15461,11 @@ if(e.type&&!["foreground","background"].includes(e.type)){
|
|
|
15451
15461
|
return new Error(`Invalid prop \`type\` supplied to \`${yB}\`. Expected \`foreground | background\`.`)
|
|
15452
15462
|
}return null}};const MB=t=>{
|
|
15453
15463
|
const{__scopeToast:n,children:r,...a}=t,o=dB(yB,n),[i,l]=e.useState(!1),[c,s]=e.useState(!1)
|
|
15454
|
-
;return function(e=(()=>{})){const t=
|
|
15464
|
+
;return function(e=(()=>{})){const t=ir(e);Rr((()=>{let e=0,n=0
|
|
15455
15465
|
;return e=window.requestAnimationFrame((()=>n=window.requestAnimationFrame(t))),
|
|
15456
15466
|
()=>{window.cancelAnimationFrame(e),window.cancelAnimationFrame(n)}}),[t])
|
|
15457
15467
|
}((()=>l(!0))),e.useEffect((()=>{const e=window.setTimeout((()=>s(!0)),1e3)
|
|
15458
|
-
;return()=>window.clearTimeout(e)}),[]),c?null:e.createElement(
|
|
15468
|
+
;return()=>window.clearTimeout(e)}),[]),c?null:e.createElement(Eo,{asChild:!0
|
|
15459
15469
|
},e.createElement(qs,a,i&&e.createElement(e.Fragment,null,o.label," ",r)))
|
|
15460
15470
|
},xB=e.forwardRef(((t,n)=>{const{__scopeToast:r,...a}=t
|
|
15461
15471
|
;return e.createElement(yn.div,un({},a,{ref:n}))})),EB=e.forwardRef(((t,n)=>{
|
|
@@ -15465,7 +15475,7 @@ altText:e=>e.altText?null:new Error("Missing prop `altText` expected on `ToastAc
|
|
|
15465
15475
|
};const SB=e.forwardRef(((t,n)=>{
|
|
15466
15476
|
const{__scopeToast:r,...a}=t,o=CB("ToastClose",r);return e.createElement(_B,{
|
|
15467
15477
|
asChild:!0},e.createElement(yn.button,un({type:"button"},a,{ref:n,
|
|
15468
|
-
onClick:
|
|
15478
|
+
onClick:rr(t.onClick,o.onClose)})))})),_B=e.forwardRef(((t,n)=>{
|
|
15469
15479
|
const{__scopeToast:r,altText:a,...o}=t;return e.createElement(yn.div,un({
|
|
15470
15480
|
"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":a||void 0
|
|
15471
15481
|
},o,{ref:n}))}));function HB(e){const t=[]
|
|
@@ -15627,7 +15637,7 @@ d:"M8 0C3.58172 0 0 3.58172 0 8C0 12.4183 3.58172 16 8 16C12.4183 16 16 12.4183
|
|
|
15627
15637
|
fill:n.colors.text.semantic.error}))},XB=({index:t,...n})=>{
|
|
15628
15638
|
const r=qt(),{updateToasts:a,windowState:o}=e.useContext(rB)??{},i=e.useRef(null)
|
|
15629
15639
|
;return e.createElement(e.Fragment,null,e.createElement(FB,{ref:i,
|
|
15630
|
-
toastType:n.type,toastIndex:t,className:`ToastRoot Toast-${n.id
|
|
15640
|
+
toastType:n.type,toastIndex:t,className:`ToastRoot Toast-${n.id}`.trim(),
|
|
15631
15641
|
duration:n.delay??3e3,onOpenChange:e=>{e||a((e=>e.filter((e=>e.id!==n.id))))}
|
|
15632
15642
|
},e.createElement(YB,{className:"ToastProgress",windowState:o,toastType:n.type,
|
|
15633
15643
|
delay:n.delay??3e3
|
|
@@ -15654,18 +15664,18 @@ r("focus")}),!1),window.addEventListener("blur",(()=>{r("blur")}),!1)),()=>{
|
|
|
15654
15664
|
window.removeEventListener("focus",(()=>{})),
|
|
15655
15665
|
window.removeEventListener("blur",(()=>{}))})),[]),e.createElement(rB.Provider,{
|
|
15656
15666
|
value:c},e.createElement(QB,null),t.children)
|
|
15657
|
-
},ej="Switch",[tj,nj]=
|
|
15658
|
-
const{__scopeSwitch:r,name:a,checked:o,defaultChecked:i,required:l,disabled:c,value:s="on",onCheckedChange:u,...d}=t,[h,p]=e.useState(null),f=hn(n,(e=>p(e))),m=e.useRef(!1),v=!h||Boolean(h.closest("form")),[g=!1,y]=
|
|
15667
|
+
},ej="Switch",[tj,nj]=ar(ej),[rj,aj]=tj(ej),oj=e.forwardRef(((t,n)=>{
|
|
15668
|
+
const{__scopeSwitch:r,name:a,checked:o,defaultChecked:i,required:l,disabled:c,value:s="on",onCheckedChange:u,...d}=t,[h,p]=e.useState(null),f=hn(n,(e=>p(e))),m=e.useRef(!1),v=!h||Boolean(h.closest("form")),[g=!1,y]=lr({
|
|
15659
15669
|
prop:o,defaultProp:i,onChange:u});return e.createElement(rj,{scope:r,checked:g,
|
|
15660
15670
|
disabled:c},e.createElement(yn.button,un({type:"button",role:"switch",
|
|
15661
15671
|
"aria-checked":g,"aria-required":l,"data-state":lj(g),
|
|
15662
15672
|
"data-disabled":c?"":void 0,disabled:c,value:s},d,{ref:f,
|
|
15663
|
-
onClick:
|
|
15673
|
+
onClick:rr(t.onClick,(e=>{
|
|
15664
15674
|
y((e=>!e)),v&&(m.current=e.isPropagationStopped(),m.current||e.stopPropagation())
|
|
15665
15675
|
}))})),v&&e.createElement(ij,{control:h,bubbles:!m.current,name:a,value:s,
|
|
15666
15676
|
checked:g,required:l,disabled:c,style:{transform:"translateX(-100%)"}}))
|
|
15667
15677
|
})),ij=t=>{
|
|
15668
|
-
const{control:n,checked:r,bubbles:a=!0,...o}=t,i=e.useRef(null),l=Ol(r),c=
|
|
15678
|
+
const{control:n,checked:r,bubbles:a=!0,...o}=t,i=e.useRef(null),l=Ol(r),c=ro(n)
|
|
15669
15679
|
;return e.useEffect((()=>{
|
|
15670
15680
|
const e=i.current,t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,"checked").set
|
|
15671
15681
|
;if(l!==r&&n){const t=new Event("click",{bubbles:a})
|
|
@@ -15746,22 +15756,22 @@ thumb:24,offTransform:[-2,-2.5],onTransform:[20,-2.5]}},uj=on(oj)`
|
|
|
15746
15756
|
}
|
|
15747
15757
|
`,hj={sm:{width:6,height:4.3},md:{width:8,height:5.73},lg:{width:10,height:7.16}
|
|
15748
15758
|
},pj={sm:{width:4.5,height:4.5},md:{width:6,height:6},lg:{width:8,height:8}
|
|
15749
|
-
},[fj,mj]=
|
|
15759
|
+
},[fj,mj]=ar("Tooltip",[io]),vj=io(),gj=700,yj="tooltip.open",[bj,wj]=fj("TooltipProvider"),Cj="Tooltip",[zj,Mj]=fj(Cj),xj="TooltipTrigger",Ej=e.forwardRef(((t,n)=>{
|
|
15750
15760
|
const{__scopeTooltip:r,...a}=t,o=Mj(xj,r),i=wj(xj,r),l=vj(r),c=hn(n,e.useRef(null),o.onTriggerChange),s=e.useRef(!1),u=e.useRef(!1),d=e.useCallback((()=>s.current=!1),[])
|
|
15751
15761
|
;return e.useEffect((()=>()=>document.removeEventListener("pointerup",d)),[d]),
|
|
15752
|
-
e.createElement(
|
|
15762
|
+
e.createElement(zo,un({asChild:!0},l),e.createElement(yn.button,un({
|
|
15753
15763
|
"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute},a,{
|
|
15754
|
-
ref:c,onPointerMove:
|
|
15764
|
+
ref:c,onPointerMove:rr(t.onPointerMove,(e=>{
|
|
15755
15765
|
"touch"!==e.pointerType&&(u.current||i.isPointerInTransitRef.current||(o.onTriggerEnter(),
|
|
15756
|
-
u.current=!0))})),onPointerLeave:
|
|
15757
|
-
o.onTriggerLeave(),u.current=!1})),onPointerDown:
|
|
15766
|
+
u.current=!0))})),onPointerLeave:rr(t.onPointerLeave,(()=>{
|
|
15767
|
+
o.onTriggerLeave(),u.current=!1})),onPointerDown:rr(t.onPointerDown,(()=>{
|
|
15758
15768
|
s.current=!0,document.addEventListener("pointerup",d,{once:!0})})),
|
|
15759
|
-
onFocus:
|
|
15760
|
-
onBlur:
|
|
15769
|
+
onFocus:rr(t.onFocus,(()=>{s.current||o.onOpen()})),
|
|
15770
|
+
onBlur:rr(t.onBlur,o.onClose),onClick:rr(t.onClick,o.onClose)})))
|
|
15761
15771
|
})),Sj="TooltipPortal",[_j,Hj]=fj(Sj,{forceMount:void 0
|
|
15762
15772
|
}),Dj="TooltipContent",Lj=e.forwardRef(((t,n)=>{
|
|
15763
15773
|
const r=Hj(Dj,t.__scopeTooltip),{forceMount:a=r.forceMount,side:o="top",...i}=t,l=Mj(Dj,t.__scopeTooltip)
|
|
15764
|
-
;return e.createElement(
|
|
15774
|
+
;return e.createElement(So,{present:a||l.open
|
|
15765
15775
|
},l.disableHoverableContent?e.createElement(Tj,un({side:o},i,{ref:n
|
|
15766
15776
|
})):e.createElement(Vj,un({side:o},i,{ref:n})))})),Vj=e.forwardRef(((t,n)=>{
|
|
15767
15777
|
const r=Mj(Dj,t.__scopeTooltip),a=wj(Dj,t.__scopeTooltip),o=e.useRef(null),i=hn(n,o),[l,c]=e.useState(null),{trigger:s,onClose:u}=r,d=o.current,{onPointerInTransitChange:h}=a,p=e.useCallback((()=>{
|
|
@@ -15809,9 +15819,9 @@ const{__scopeTooltip:r,children:a,"aria-label":o,onEscapeKeyDown:i,onPointerDown
|
|
|
15809
15819
|
const e=e=>{const t=e.target;null!=t&&t.contains(s.trigger)&&d()}
|
|
15810
15820
|
;return window.addEventListener("scroll",e,{capture:!0
|
|
15811
15821
|
}),()=>window.removeEventListener("scroll",e,{capture:!0})}
|
|
15812
|
-
}),[s.trigger,d]),e.createElement(
|
|
15822
|
+
}),[s.trigger,d]),e.createElement(vr,{asChild:!0,disableOutsidePointerEvents:!1,
|
|
15813
15823
|
onEscapeKeyDown:i,onPointerDownOutside:l,onFocusOutside:e=>e.preventDefault(),
|
|
15814
|
-
onDismiss:d},e.createElement(
|
|
15824
|
+
onDismiss:d},e.createElement(Mo,un({"data-state":s.stateAttribute},u,c,{ref:n,
|
|
15815
15825
|
style:{...c.style,
|
|
15816
15826
|
"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)",
|
|
15817
15827
|
"--radix-tooltip-content-available-width":"var(--radix-popper-available-width)",
|
|
@@ -15828,7 +15838,7 @@ onClose:e.useCallback((()=>{
|
|
|
15828
15838
|
window.clearTimeout(u.current),u.current=window.setTimeout((()=>c(!0)),a)
|
|
15829
15839
|
}),[a]),isPointerInTransitRef:s,onPointerInTransitChange:e.useCallback((e=>{
|
|
15830
15840
|
s.current=e}),[]),disableHoverableContent:o},i)},Pj=t=>{
|
|
15831
|
-
const{__scopeTooltip:n,children:r,open:a,defaultOpen:o=!1,onOpenChange:i,disableHoverableContent:l,delayDuration:c}=t,s=wj(Cj,t.__scopeTooltip),u=vj(n),[d,h]=e.useState(null),p=
|
|
15841
|
+
const{__scopeTooltip:n,children:r,open:a,defaultOpen:o=!1,onOpenChange:i,disableHoverableContent:l,delayDuration:c}=t,s=wj(Cj,t.__scopeTooltip),u=vj(n),[d,h]=e.useState(null),p=Or(),f=e.useRef(0),m=null!=l?l:s.disableHoverableContent,v=null!=c?c:s.delayDuration,g=e.useRef(!1),[y=!1,b]=lr({
|
|
15832
15842
|
prop:a,defaultProp:o,onChange:e=>{
|
|
15833
15843
|
e?(s.onOpen(),document.dispatchEvent(new CustomEvent(yj))):s.onClose(),
|
|
15834
15844
|
null==i||i(e)}
|
|
@@ -15838,16 +15848,16 @@ window.clearTimeout(f.current),b(!1)}),[b]),M=e.useCallback((()=>{
|
|
|
15838
15848
|
window.clearTimeout(f.current),f.current=window.setTimeout((()=>{
|
|
15839
15849
|
g.current=!0,b(!0)}),v)}),[v,b])
|
|
15840
15850
|
;return e.useEffect((()=>()=>window.clearTimeout(f.current)),[]),
|
|
15841
|
-
e.createElement(
|
|
15851
|
+
e.createElement(Co,u,e.createElement(zj,{scope:n,contentId:p,open:y,
|
|
15842
15852
|
stateAttribute:w,trigger:d,onTriggerChange:h,onTriggerEnter:e.useCallback((()=>{
|
|
15843
15853
|
s.isOpenDelayed?M():C()}),[s.isOpenDelayed,M,C]),
|
|
15844
15854
|
onTriggerLeave:e.useCallback((()=>{m?z():window.clearTimeout(f.current)
|
|
15845
15855
|
}),[z,m]),onOpen:C,onClose:z,disableHoverableContent:m},r))},Ij=Ej,Oj=t=>{
|
|
15846
15856
|
const{__scopeTooltip:n,forceMount:r,children:a,container:o}=t,i=Mj(Sj,n)
|
|
15847
|
-
;return e.createElement(_j,{scope:n,forceMount:r},e.createElement(
|
|
15848
|
-
present:r||i.open},e.createElement(
|
|
15857
|
+
;return e.createElement(_j,{scope:n,forceMount:r},e.createElement(So,{
|
|
15858
|
+
present:r||i.open},e.createElement(Eo,{asChild:!0,container:o},a)))
|
|
15849
15859
|
},Nj=Lj,Fj=on(e.forwardRef(((t,n)=>{const{__scopeTooltip:r,...a}=t,o=vj(r)
|
|
15850
|
-
;return kj("TooltipArrow",r).isInside?null:e.createElement(
|
|
15860
|
+
;return kj("TooltipArrow",r).isInside?null:e.createElement(xo,un({},o,a,{ref:n
|
|
15851
15861
|
}))})))`
|
|
15852
15862
|
fill: ${({theme:e})=>e.colors.fill.inverse};
|
|
15853
15863
|
`,Bj=on(Nj)`
|
|
@@ -16030,19 +16040,19 @@ className:"BoxedRadioLabelHeading"
|
|
|
16030
16040
|
},n):e.createElement(e.Fragment,null,n),a&&e.createElement(pc,{
|
|
16031
16041
|
className:"BoxedRadioLabelDescription"},a))))
|
|
16032
16042
|
}))),o&&i&&e.createElement(vc,null,i)),
|
|
16033
|
-
exports.Button=tr,exports.ButtonDropdown=({size:t="normal",variant:n="primary",loading:r=!1,inline:a=!0,defaultSelectedItem:o,idAccessor:i="id",nameAccessor:l="name",onClick:c,options:s,side:u="bottom",sideOffset:d=4,align:h="end",alignOffset:p,arrowPadding:f,avoidCollisions:m,disabled:v,id:g,name:y})=>{
|
|
16034
|
-
|
|
16035
|
-
|
|
16043
|
+
exports.Button=tr,exports.ButtonDropdown=({size:t="normal",variant:n="primary",loading:r=!1,inline:a=!0,defaultSelectedItem:o,idAccessor:i="id",nameAccessor:l="name",onClick:c,options:s,side:u="bottom",sideOffset:d=4,align:h="end",alignOffset:p,arrowPadding:f,avoidCollisions:m,disabled:v,id:g,name:y})=>e.createElement(Il,{
|
|
16044
|
+
id:g,name:y,size:t,variant:n,inline:a,disabled:v||r,"aria-disabled":v||r,
|
|
16045
|
+
onClick:e=>c?.(o,e),
|
|
16036
16046
|
"aria-describedby":"string"===(typeof o?.[l]??s?.[0]?.[l])?o?.[l]??s?.[0]?.[l]:void 0,
|
|
16037
16047
|
role:"button"
|
|
16038
|
-
},e.createElement("span",null,o?.[l]??s?.[0]?.[l]??""),e.createElement(
|
|
16039
|
-
trigger:e.createElement(
|
|
16048
|
+
},e.createElement("span",null,o?.[l]??s?.[0]?.[l]??""),e.createElement(Tl,{
|
|
16049
|
+
trigger:e.createElement(Pl,{variant:n}),onSelect:e=>c?.(e),
|
|
16040
16050
|
options:s?.filter((e=>e?.[i]!==o?.[i]))||[],showArrow:!1,side:u,align:h,
|
|
16041
16051
|
alignOffset:p,arrowPadding:f,avoidCollisions:m,sideOffset:d,idAccessor:i,
|
|
16042
|
-
nameAccessor:l
|
|
16043
|
-
},exports.CardActions=Sn,exports.CardContent=En,exports.CardDescription=Hn,
|
|
16052
|
+
nameAccessor:l
|
|
16053
|
+
})),exports.CardActions=Sn,exports.CardContent=En,exports.CardDescription=Hn,
|
|
16044
16054
|
exports.CardText=Dn,
|
|
16045
|
-
exports.CardTitle=_n,exports.Checkbox=Ac,exports.ChevronUp=
|
|
16055
|
+
exports.CardTitle=_n,exports.Checkbox=Ac,exports.ChevronUp=Rl,
|
|
16046
16056
|
exports.Confirmation=({isOpen:t,title:n,description:r,onConfirm:a,onDismiss:o,cancelButtonText:i,children:l,cancelButtonDisabled:c,confirmButtonDisabled:s,confirmButtonText:u,bodyStyles:d,contentStyles:h,footerStyles:p,width:f="520px"})=>e.createElement(Ds,{
|
|
16047
16057
|
open:t,onOpenChange:e=>{e||o?.("overlay")}
|
|
16048
16058
|
},e.createElement(Ls,null,e.createElement(ks,{forceMount:!0,style:d,
|
|
@@ -16117,20 +16127,20 @@ formatDate:e=>e?Lm(e).format(u):"",...d}),i&&l&&e.createElement(vc,null,l))
|
|
|
16117
16127
|
const u=qt();return e.createElement(Ws,{open:t,onOpenChange:e=>{e||s?.()}
|
|
16118
16128
|
},e.createElement(Gs,null,e.createElement(js,{forceMount:!0,
|
|
16119
16129
|
className:"DialogOverlay",onClick:()=>{c&&s?.()}}),e.createElement(Us,{
|
|
16120
|
-
forceMount:!0,className:`DialogContent ${a
|
|
16130
|
+
forceMount:!0,className:`DialogContent ${a}`.trim(),isFullHeight:i,size:o,
|
|
16121
16131
|
placement:l},!r&&e.createElement(Ys,{asChild:!0},e.createElement($s,{
|
|
16122
16132
|
"aria-label":"Close"},e.createElement(qn,{fill:u.colors.text.inverse}))),n)))
|
|
16123
16133
|
},exports.Dropdown=tm,
|
|
16124
|
-
exports.DropdownInputItem=ud,exports.DropdownItem=am,exports.DropdownMenuItem=
|
|
16134
|
+
exports.DropdownInputItem=ud,exports.DropdownItem=am,exports.DropdownMenuItem=kl,
|
|
16125
16135
|
exports.Fade=t=>{const{timeout:n=150,...r}=t;return e.createElement(Wj,{
|
|
16126
16136
|
transition:`all ${n}ms cubic-bezier(0.175, 0.885, 0.320, 1.175)`,styles:Gj,
|
|
16127
16137
|
timeout:{enter:0,exit:n},...r})
|
|
16128
16138
|
},exports.FreshLink=xn,exports.IconButton=Mn,exports.Input=Kf,
|
|
16129
16139
|
exports.InputLabel=Cn,
|
|
16130
|
-
exports.Loader=em,exports.Menu=
|
|
16140
|
+
exports.Loader=em,exports.Menu=Tl,exports.Minus=Vc,exports.Modal=({isOpen:t,children:n,align:r="center",customClass:a="",fullWidth:o=!1,customModalContentStyles:i={},onDismiss:l,position:c="center",size:s})=>e.createElement(cm,{
|
|
16131
16141
|
open:t,onOpenChange:e=>{e||l?.()}},e.createElement(sm,null,e.createElement(um,{
|
|
16132
16142
|
forceMount:!0,className:"DialogOverlay",onClick:()=>l?.()}),e.createElement(dm,{
|
|
16133
|
-
forceMount:!0,className:`DialogContent ${a
|
|
16143
|
+
forceMount:!0,className:`DialogContent ${a}`.trim(),size:s??"default",
|
|
16134
16144
|
fullWidth:o,align:r,position:c,style:i
|
|
16135
16145
|
},n))),exports.MoreVertical=od,exports.MultiSelectDropdown=({itemIdentifier:t="id",label:n,id:r,items:a=[],onChange:o,placeholder:i,readOnly:l=!1,disabled:c=!1,isRequired:s=!1,itemToString:u,name:d,filterKey:h,width:p,useComboboxProps:f,useMultipleSelectionProps:m,emptyItemsText:v,getCustomMessage:g,onCustomValueAdd:y,customValues:b,inputValue:w,hideClear:C,removeSelectedItem:z,defaultSelectedItems:M=[],handleInputChange:x,isErrored:E,isMenuLoading:S,errorText:_,InputProps:H,itemComponent:D,isDynamicMenu:L,locale:V,maxAllowedLength:A,minAllowedLength:k,onBackSpace:T})=>{
|
|
16136
16146
|
const R=qt(),[P,I]=e.useState(""),[O,N]=e.useState([]),F=e.useMemo((()=>a.filter((e=>!P||("string"==typeof e?e:e?.[h||t]).toLowerCase().includes(P.toLowerCase())))),[a,h,t,P]),{getSelectedItemProps:B,getDropdownProps:j,removeSelectedItem:U,setSelectedItems:$}=Bf({
|
|
@@ -16179,7 +16189,7 @@ index:r})
|
|
|
16179
16189
|
fill:R.colors.common.accent})))})))),E&&_&&e.createElement(vc,null,_))
|
|
16180
16190
|
},exports.Popover=yP,
|
|
16181
16191
|
exports.PopoverClose=gP,exports.Radio=({checked:t,className:n,disabled:r,id:a,isRequired:o,label:i,name:l,readOnly:c,...s})=>e.createElement(wP,{
|
|
16182
|
-
className:`RadioGroupRoot ${n
|
|
16192
|
+
className:`RadioGroupRoot ${n}`.trim(),id:a,name:l,"aria-label":i,
|
|
16183
16193
|
value:t?"default":"",required:o,disabled:r,"aria-readonly":c,...s
|
|
16184
16194
|
},e.createElement(MP,null,e.createElement(zP,{checked:t,"aria-checked":t,
|
|
16185
16195
|
className:"RadioGroupItem",disabled:r,"aria-readonly":c,value:"default",
|
|
@@ -16197,7 +16207,7 @@ value:t?.[r],id:t?.[r],"aria-label":t?.[a]},e.createElement(CP,{
|
|
|
16197
16207
|
className:"RadioGroupIndicator"})),e.createElement(Cn,{className:"RadioLabel",
|
|
16198
16208
|
disabled:t.disabled,htmlFor:t?.[r]
|
|
16199
16209
|
},t?.[a]))))),c&&s&&e.createElement(vc,null,s)),
|
|
16200
|
-
exports.RadixMenuItem=
|
|
16210
|
+
exports.RadixMenuItem=Sl,exports.RadixSelectItem=ed,
|
|
16201
16211
|
exports.Reorder=hN,exports.RequiredIndicator=zn,exports.Slide=t=>{
|
|
16202
16212
|
const{placement:n="left",timeout:r=150,children:a,...o}=t,i=function(e){
|
|
16203
16213
|
const t={bottom:"100%",top:"-100%",left:"-100%",right:"100%"};return{init:{
|
|
@@ -16225,7 +16235,7 @@ disabled:!t.getCanSelect(),indeterminate:t.getIsSomeSelected(),
|
|
|
16225
16235
|
onCheckedChange:e=>{t.toggleSelected(!0===e),k?.(t.original,!0===e)}})
|
|
16226
16236
|
}],...a.map((e=>q.accessor(e.id,{header:e.Header,id:e.id??e.Header,
|
|
16227
16237
|
cell:t=>e.accessorFn(t.row.original)}))),..._?[{id:"rowMenuOptions",
|
|
16228
|
-
header:()=>e.createElement("div",null),cell:({row:t})=>e.createElement(
|
|
16238
|
+
header:()=>e.createElement("div",null),cell:({row:t})=>e.createElement(Tl,{
|
|
16229
16239
|
trigger:e.createElement(od,{fill:W.colors.text.primary}),
|
|
16230
16240
|
options:_(t.original)||[],onSelect:e=>{e.id&&T?.(e.id,t.original)},
|
|
16231
16241
|
side:"bottom",align:"end"})
|