@raspberrypifoundation/design-system-react 2.1.0 → 2.2.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
4
4
 
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## 2.2.0 Beta
8
+
9
+ - Fix vulnerabilities by updating dependencies
10
+ - try to export in ways that also work with webpack
11
+ - add some generated typescript typings
12
+
7
13
  ## 2.1.0 - 2025-02-26
8
14
 
9
15
  ### Added
@@ -0,0 +1,35 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("react/jsx-runtime"),Dt=require("react");function Ft(e){if(e&&e.__esModule)return e;const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const d=Ft(Dt);function ot(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ce={exports:{}};/*!
2
+ Copyright (c) 2018 Jed Watson.
3
+ Licensed under the MIT License (MIT), see
4
+ http://jedwatson.github.io/classnames
5
+ */var Ye;function qt(){return Ye||(Ye=1,function(e){(function(){var t={}.hasOwnProperty;function r(){for(var a="",s=0;s<arguments.length;s++){var o=arguments[s];o&&(a=n(a,i(o)))}return a}function i(a){if(typeof a=="string"||typeof a=="number")return a;if(typeof a!="object")return"";if(Array.isArray(a))return r.apply(null,a);if(a.toString!==Object.prototype.toString&&!a.toString.toString().includes("[native code]"))return a.toString();var s="";for(var o in a)t.call(a,o)&&a[o]&&(s=n(s,o));return s}function n(a,s){return s?a?a+" "+s:a+s:a}e.exports?(r.default=r,e.exports=r):window.classNames=r})()}(Ce)),Ce.exports}var Wt=qt();const W=ot(Wt);var fe={exports:{}},de={exports:{}},L={};/** @license React v16.13.1
6
+ * react-is.production.min.js
7
+ *
8
+ * Copyright (c) Facebook, Inc. and its affiliates.
9
+ *
10
+ * This source code is licensed under the MIT license found in the
11
+ * LICENSE file in the root directory of this source tree.
12
+ */var He;function Bt(){if(He)return L;He=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,i=e?Symbol.for("react.fragment"):60107,n=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,o=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,h=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,g=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,R=e?Symbol.for("react.block"):60121,T=e?Symbol.for("react.fundamental"):60117,x=e?Symbol.for("react.responder"):60118,C=e?Symbol.for("react.scope"):60119;function S(b){if(typeof b=="object"&&b!==null){var B=b.$$typeof;switch(B){case t:switch(b=b.type,b){case u:case c:case i:case a:case n:case h:return b;default:switch(b=b&&b.$$typeof,b){case o:case f:case m:case g:case s:return b;default:return B}}case r:return B}}}function $(b){return S(b)===c}return L.AsyncMode=u,L.ConcurrentMode=c,L.ContextConsumer=o,L.ContextProvider=s,L.Element=t,L.ForwardRef=f,L.Fragment=i,L.Lazy=m,L.Memo=g,L.Portal=r,L.Profiler=a,L.StrictMode=n,L.Suspense=h,L.isAsyncMode=function(b){return $(b)||S(b)===u},L.isConcurrentMode=$,L.isContextConsumer=function(b){return S(b)===o},L.isContextProvider=function(b){return S(b)===s},L.isElement=function(b){return typeof b=="object"&&b!==null&&b.$$typeof===t},L.isForwardRef=function(b){return S(b)===f},L.isFragment=function(b){return S(b)===i},L.isLazy=function(b){return S(b)===m},L.isMemo=function(b){return S(b)===g},L.isPortal=function(b){return S(b)===r},L.isProfiler=function(b){return S(b)===a},L.isStrictMode=function(b){return S(b)===n},L.isSuspense=function(b){return S(b)===h},L.isValidElementType=function(b){return typeof b=="string"||typeof b=="function"||b===i||b===c||b===a||b===n||b===h||b===p||typeof b=="object"&&b!==null&&(b.$$typeof===m||b.$$typeof===g||b.$$typeof===s||b.$$typeof===o||b.$$typeof===f||b.$$typeof===T||b.$$typeof===x||b.$$typeof===C||b.$$typeof===R)},L.typeOf=S,L}var M={};/** @license React v16.13.1
13
+ * react-is.development.js
14
+ *
15
+ * Copyright (c) Facebook, Inc. and its affiliates.
16
+ *
17
+ * This source code is licensed under the MIT license found in the
18
+ * LICENSE file in the root directory of this source tree.
19
+ */var Ve;function Ut(){return Ve||(Ve=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,i=e?Symbol.for("react.fragment"):60107,n=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,o=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,h=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,g=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,R=e?Symbol.for("react.block"):60121,T=e?Symbol.for("react.fundamental"):60117,x=e?Symbol.for("react.responder"):60118,C=e?Symbol.for("react.scope"):60119;function S(E){return typeof E=="string"||typeof E=="function"||E===i||E===c||E===a||E===n||E===h||E===p||typeof E=="object"&&E!==null&&(E.$$typeof===m||E.$$typeof===g||E.$$typeof===s||E.$$typeof===o||E.$$typeof===f||E.$$typeof===T||E.$$typeof===x||E.$$typeof===C||E.$$typeof===R)}function $(E){if(typeof E=="object"&&E!==null){var J=E.$$typeof;switch(J){case t:var ce=E.type;switch(ce){case u:case c:case i:case a:case n:case h:return ce;default:var ze=ce&&ce.$$typeof;switch(ze){case o:case f:case m:case g:case s:return ze;default:return J}}case r:return J}}}var b=u,B=c,z=o,H=s,F=t,Y=f,Q=i,Ee=m,we=g,ne=r,Re=a,V=n,ee=h,ue=!1;function Te(E){return ue||(ue=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),y(E)||$(E)===u}function y(E){return $(E)===c}function w(E){return $(E)===o}function k(E){return $(E)===s}function O(E){return typeof E=="object"&&E!==null&&E.$$typeof===t}function P(E){return $(E)===f}function N(E){return $(E)===i}function _(E){return $(E)===m}function j(E){return $(E)===g}function I(E){return $(E)===r}function D(E){return $(E)===a}function A(E){return $(E)===n}function U(E){return $(E)===h}M.AsyncMode=b,M.ConcurrentMode=B,M.ContextConsumer=z,M.ContextProvider=H,M.Element=F,M.ForwardRef=Y,M.Fragment=Q,M.Lazy=Ee,M.Memo=we,M.Portal=ne,M.Profiler=Re,M.StrictMode=V,M.Suspense=ee,M.isAsyncMode=Te,M.isConcurrentMode=y,M.isContextConsumer=w,M.isContextProvider=k,M.isElement=O,M.isForwardRef=P,M.isFragment=N,M.isLazy=_,M.isMemo=j,M.isPortal=I,M.isProfiler=D,M.isStrictMode=A,M.isSuspense=U,M.isValidElementType=S,M.typeOf=$}()),M}var Je;function st(){return Je||(Je=1,process.env.NODE_ENV==="production"?de.exports=Bt():de.exports=Ut()),de.exports}/*
20
+ object-assign
21
+ (c) Sindre Sorhus
22
+ @license MIT
23
+ */var Se,Ke;function zt(){if(Ke)return Se;Ke=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function i(a){if(a==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(a)}function n(){try{if(!Object.assign)return!1;var a=new String("abc");if(a[5]="de",Object.getOwnPropertyNames(a)[0]==="5")return!1;for(var s={},o=0;o<10;o++)s["_"+String.fromCharCode(o)]=o;var u=Object.getOwnPropertyNames(s).map(function(f){return s[f]});if(u.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(f){c[f]=f}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Se=n()?Object.assign:function(a,s){for(var o,u=i(a),c,f=1;f<arguments.length;f++){o=Object(arguments[f]);for(var h in o)t.call(o,h)&&(u[h]=o[h]);if(e){c=e(o);for(var p=0;p<c.length;p++)r.call(o,c[p])&&(u[c[p]]=o[c[p]])}}return u},Se}var Pe,Ge;function Ae(){if(Ge)return Pe;Ge=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Pe=e,Pe}var _e,Xe;function lt(){return Xe||(Xe=1,_e=Function.call.bind(Object.prototype.hasOwnProperty)),_e}var Oe,Ze;function Yt(){if(Ze)return Oe;Ze=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Ae(),r={},i=lt();e=function(a){var s="Warning: "+a;typeof console<"u"&&console.error(s);try{throw new Error(s)}catch{}}}function n(a,s,o,u,c){if(process.env.NODE_ENV!=="production"){for(var f in a)if(i(a,f)){var h;try{if(typeof a[f]!="function"){var p=Error((u||"React class")+": "+o+" type `"+f+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[f]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw p.name="Invariant Violation",p}h=a[f](s,f,u,o,null,t)}catch(m){h=m}if(h&&!(h instanceof Error)&&e((u||"React class")+": type specification of "+o+" `"+f+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof h+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),h instanceof Error&&!(h.message in r)){r[h.message]=!0;var g=c?c():"";e("Failed "+o+" type: "+h.message+(g??""))}}}}return n.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},Oe=n,Oe}var je,Qe;function Ht(){if(Qe)return je;Qe=1;var e=st(),t=zt(),r=Ae(),i=lt(),n=Yt(),a=function(){};process.env.NODE_ENV!=="production"&&(a=function(o){var u="Warning: "+o;typeof console<"u"&&console.error(u);try{throw new Error(u)}catch{}});function s(){return null}return je=function(o,u){var c=typeof Symbol=="function"&&Symbol.iterator,f="@@iterator";function h(y){var w=y&&(c&&y[c]||y[f]);if(typeof w=="function")return w}var p="<<anonymous>>",g={array:x("array"),bigint:x("bigint"),bool:x("boolean"),func:x("function"),number:x("number"),object:x("object"),string:x("string"),symbol:x("symbol"),any:C(),arrayOf:S,element:$(),elementType:b(),instanceOf:B,node:Y(),objectOf:H,oneOf:z,oneOfType:F,shape:Ee,exact:we};function m(y,w){return y===w?y!==0||1/y===1/w:y!==y&&w!==w}function R(y,w){this.message=y,this.data=w&&typeof w=="object"?w:{},this.stack=""}R.prototype=Error.prototype;function T(y){if(process.env.NODE_ENV!=="production")var w={},k=0;function O(N,_,j,I,D,A,U){if(I=I||p,A=A||j,U!==r){if(u){var E=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw E.name="Invariant Violation",E}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var J=I+":"+j;!w[J]&&k<3&&(a("You are manually calling a React.PropTypes validation function for the `"+A+"` prop on `"+I+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),w[J]=!0,k++)}}return _[j]==null?N?_[j]===null?new R("The "+D+" `"+A+"` is marked as required "+("in `"+I+"`, but its value is `null`.")):new R("The "+D+" `"+A+"` is marked as required in "+("`"+I+"`, but its value is `undefined`.")):null:y(_,j,I,D,A)}var P=O.bind(null,!1);return P.isRequired=O.bind(null,!0),P}function x(y){function w(k,O,P,N,_,j){var I=k[O],D=V(I);if(D!==y){var A=ee(I);return new R("Invalid "+N+" `"+_+"` of type "+("`"+A+"` supplied to `"+P+"`, expected ")+("`"+y+"`."),{expectedType:y})}return null}return T(w)}function C(){return T(s)}function S(y){function w(k,O,P,N,_){if(typeof y!="function")return new R("Property `"+_+"` of component `"+P+"` has invalid PropType notation inside arrayOf.");var j=k[O];if(!Array.isArray(j)){var I=V(j);return new R("Invalid "+N+" `"+_+"` of type "+("`"+I+"` supplied to `"+P+"`, expected an array."))}for(var D=0;D<j.length;D++){var A=y(j,D,P,N,_+"["+D+"]",r);if(A instanceof Error)return A}return null}return T(w)}function $(){function y(w,k,O,P,N){var _=w[k];if(!o(_)){var j=V(_);return new R("Invalid "+P+" `"+N+"` of type "+("`"+j+"` supplied to `"+O+"`, expected a single ReactElement."))}return null}return T(y)}function b(){function y(w,k,O,P,N){var _=w[k];if(!e.isValidElementType(_)){var j=V(_);return new R("Invalid "+P+" `"+N+"` of type "+("`"+j+"` supplied to `"+O+"`, expected a single ReactElement type."))}return null}return T(y)}function B(y){function w(k,O,P,N,_){if(!(k[O]instanceof y)){var j=y.name||p,I=Te(k[O]);return new R("Invalid "+N+" `"+_+"` of type "+("`"+I+"` supplied to `"+P+"`, expected ")+("instance of `"+j+"`."))}return null}return T(w)}function z(y){if(!Array.isArray(y))return process.env.NODE_ENV!=="production"&&(arguments.length>1?a("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):a("Invalid argument supplied to oneOf, expected an array.")),s;function w(k,O,P,N,_){for(var j=k[O],I=0;I<y.length;I++)if(m(j,y[I]))return null;var D=JSON.stringify(y,function(U,E){var J=ee(E);return J==="symbol"?String(E):E});return new R("Invalid "+N+" `"+_+"` of value `"+String(j)+"` "+("supplied to `"+P+"`, expected one of "+D+"."))}return T(w)}function H(y){function w(k,O,P,N,_){if(typeof y!="function")return new R("Property `"+_+"` of component `"+P+"` has invalid PropType notation inside objectOf.");var j=k[O],I=V(j);if(I!=="object")return new R("Invalid "+N+" `"+_+"` of type "+("`"+I+"` supplied to `"+P+"`, expected an object."));for(var D in j)if(i(j,D)){var A=y(j,D,P,N,_+"."+D,r);if(A instanceof Error)return A}return null}return T(w)}function F(y){if(!Array.isArray(y))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),s;for(var w=0;w<y.length;w++){var k=y[w];if(typeof k!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+ue(k)+" at index "+w+"."),s}function O(P,N,_,j,I){for(var D=[],A=0;A<y.length;A++){var U=y[A],E=U(P,N,_,j,I,r);if(E==null)return null;E.data&&i(E.data,"expectedType")&&D.push(E.data.expectedType)}var J=D.length>0?", expected one of type ["+D.join(", ")+"]":"";return new R("Invalid "+j+" `"+I+"` supplied to "+("`"+_+"`"+J+"."))}return T(O)}function Y(){function y(w,k,O,P,N){return ne(w[k])?null:new R("Invalid "+P+" `"+N+"` supplied to "+("`"+O+"`, expected a ReactNode."))}return T(y)}function Q(y,w,k,O,P){return new R((y||"React class")+": "+w+" type `"+k+"."+O+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+P+"`.")}function Ee(y){function w(k,O,P,N,_){var j=k[O],I=V(j);if(I!=="object")return new R("Invalid "+N+" `"+_+"` of type `"+I+"` "+("supplied to `"+P+"`, expected `object`."));for(var D in y){var A=y[D];if(typeof A!="function")return Q(P,N,_,D,ee(A));var U=A(j,D,P,N,_+"."+D,r);if(U)return U}return null}return T(w)}function we(y){function w(k,O,P,N,_){var j=k[O],I=V(j);if(I!=="object")return new R("Invalid "+N+" `"+_+"` of type `"+I+"` "+("supplied to `"+P+"`, expected `object`."));var D=t({},k[O],y);for(var A in D){var U=y[A];if(i(y,A)&&typeof U!="function")return Q(P,N,_,A,ee(U));if(!U)return new R("Invalid "+N+" `"+_+"` key `"+A+"` supplied to `"+P+"`.\nBad object: "+JSON.stringify(k[O],null," ")+`
24
+ Valid keys: `+JSON.stringify(Object.keys(y),null," "));var E=U(j,A,P,N,_+"."+A,r);if(E)return E}return null}return T(w)}function ne(y){switch(typeof y){case"number":case"string":case"undefined":return!0;case"boolean":return!y;case"object":if(Array.isArray(y))return y.every(ne);if(y===null||o(y))return!0;var w=h(y);if(w){var k=w.call(y),O;if(w!==y.entries){for(;!(O=k.next()).done;)if(!ne(O.value))return!1}else for(;!(O=k.next()).done;){var P=O.value;if(P&&!ne(P[1]))return!1}}else return!1;return!0;default:return!1}}function Re(y,w){return y==="symbol"?!0:w?w["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&w instanceof Symbol:!1}function V(y){var w=typeof y;return Array.isArray(y)?"array":y instanceof RegExp?"object":Re(w,y)?"symbol":w}function ee(y){if(typeof y>"u"||y===null)return""+y;var w=V(y);if(w==="object"){if(y instanceof Date)return"date";if(y instanceof RegExp)return"regexp"}return w}function ue(y){var w=ee(y);switch(w){case"array":case"object":return"an "+w;case"boolean":case"date":case"regexp":return"a "+w;default:return w}}function Te(y){return!y.constructor||!y.constructor.name?p:y.constructor.name}return g.checkPropTypes=n,g.resetWarningCache=n.resetWarningCache,g.PropTypes=g,g},je}var ke,et;function Vt(){if(et)return ke;et=1;var e=Ae();function t(){}function r(){}return r.resetWarningCache=t,ke=function(){function i(s,o,u,c,f,h){if(h!==e){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}i.isRequired=i;function n(){return i}var a={array:i,bigint:i,bool:i,func:i,number:i,object:i,string:i,symbol:i,any:i,arrayOf:n,element:i,elementType:i,instanceOf:n,node:i,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:r,resetWarningCache:t};return a.PropTypes=a,a},ke}var tt;function Jt(){if(tt)return fe.exports;if(tt=1,process.env.NODE_ENV!=="production"){var e=st(),t=!0;fe.exports=Ht()(e.isElement,t)}else fe.exports=Vt()();return fe.exports}var Kt=Jt();const l=ot(Kt),ut=({content:e,title:t,className:r,id:i="accordion"})=>{const n=W("rpf-accordion",r);return v.jsxs("details",{className:n,id:`${i}`,children:[v.jsxs("summary",{className:"rpf-accordion__title",role:"button",children:[t,v.jsx("span",{className:"rpf-accordion__icon"})]}),v.jsx("p",{className:"rpf-accordion__text",children:e})]})};ut.propTypes={content:l.string.isRequired,title:l.string.isRequired,id:l.string,className:l.string};var ie={},rt;function Gt(){if(rt)return ie;rt=1,Object.defineProperty(ie,"__esModule",{value:!0}),ie.parse=s,ie.serialize=c;const e=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,t=/^[\u0021-\u003A\u003C-\u007E]*$/,r=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,i=/^[\u0020-\u003A\u003D-\u007E]*$/,n=Object.prototype.toString,a=(()=>{const p=function(){};return p.prototype=Object.create(null),p})();function s(p,g){const m=new a,R=p.length;if(R<2)return m;const T=(g==null?void 0:g.decode)||f;let x=0;do{const C=p.indexOf("=",x);if(C===-1)break;const S=p.indexOf(";",x),$=S===-1?R:S;if(C>$){x=p.lastIndexOf(";",C-1)+1;continue}const b=o(p,x,C),B=u(p,C,b),z=p.slice(b,B);if(m[z]===void 0){let H=o(p,C+1,$),F=u(p,$,H);const Y=T(p.slice(H,F));m[z]=Y}x=$+1}while(x<R);return m}function o(p,g,m){do{const R=p.charCodeAt(g);if(R!==32&&R!==9)return g}while(++g<m);return m}function u(p,g,m){for(;g>m;){const R=p.charCodeAt(--g);if(R!==32&&R!==9)return g+1}return m}function c(p,g,m){const R=(m==null?void 0:m.encode)||encodeURIComponent;if(!e.test(p))throw new TypeError(`argument name is invalid: ${p}`);const T=R(g);if(!t.test(T))throw new TypeError(`argument val is invalid: ${g}`);let x=p+"="+T;if(!m)return x;if(m.maxAge!==void 0){if(!Number.isInteger(m.maxAge))throw new TypeError(`option maxAge is invalid: ${m.maxAge}`);x+="; Max-Age="+m.maxAge}if(m.domain){if(!r.test(m.domain))throw new TypeError(`option domain is invalid: ${m.domain}`);x+="; Domain="+m.domain}if(m.path){if(!i.test(m.path))throw new TypeError(`option path is invalid: ${m.path}`);x+="; Path="+m.path}if(m.expires){if(!h(m.expires)||!Number.isFinite(m.expires.valueOf()))throw new TypeError(`option expires is invalid: ${m.expires}`);x+="; Expires="+m.expires.toUTCString()}if(m.httpOnly&&(x+="; HttpOnly"),m.secure&&(x+="; Secure"),m.partitioned&&(x+="; Partitioned"),m.priority)switch(typeof m.priority=="string"?m.priority.toLowerCase():void 0){case"low":x+="; Priority=Low";break;case"medium":x+="; Priority=Medium";break;case"high":x+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${m.priority}`)}if(m.sameSite)switch(typeof m.sameSite=="string"?m.sameSite.toLowerCase():m.sameSite){case!0:case"strict":x+="; SameSite=Strict";break;case"lax":x+="; SameSite=Lax";break;case"none":x+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${m.sameSite}`)}return x}function f(p){if(p.indexOf("%")===-1)return p;try{return decodeURIComponent(p)}catch{return p}}function h(p){return n.call(p)==="[object Date]"}return ie}Gt();/**
25
+ * react-router v7.2.0
26
+ *
27
+ * Copyright (c) Remix Software Inc.
28
+ *
29
+ * This source code is licensed under the MIT license found in the
30
+ * LICENSE.md file in the root directory of this source tree.
31
+ *
32
+ * @license MIT
33
+ */function q(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function G(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Ie({pathname:e="/",search:t="",hash:r=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function Le(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let i=e.indexOf("?");i>=0&&(t.search=e.substring(i),e=e.substring(0,i)),e&&(t.pathname=e)}return t}function ct(e,t,r="/"){return Xt(e,t,r,!1)}function Xt(e,t,r,i){let n=typeof t=="string"?Le(t):t,a=te(n.pathname||"/",r);if(a==null)return null;let s=ft(e);Zt(s);let o=null;for(let u=0;o==null&&u<s.length;++u){let c=ur(a);o=sr(s[u],c,i)}return o}function ft(e,t=[],r=[],i=""){let n=(a,s,o)=>{let u={relativePath:o===void 0?a.path||"":o,caseSensitive:a.caseSensitive===!0,childrenIndex:s,route:a};u.relativePath.startsWith("/")&&(q(u.relativePath.startsWith(i),`Absolute route path "${u.relativePath}" nested under path "${i}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),u.relativePath=u.relativePath.slice(i.length));let c=K([i,u.relativePath]),f=r.concat(u);a.children&&a.children.length>0&&(q(a.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${c}".`),ft(a.children,t,f,c)),!(a.path==null&&!a.index)&&t.push({path:c,score:ir(c,a.index),routesMeta:f})};return e.forEach((a,s)=>{var o;if(a.path===""||!((o=a.path)!=null&&o.includes("?")))n(a,s);else for(let u of dt(a.path))n(a,s,u)}),t}function dt(e){let t=e.split("/");if(t.length===0)return[];let[r,...i]=t,n=r.endsWith("?"),a=r.replace(/\?$/,"");if(i.length===0)return n?[a,""]:[a];let s=dt(i.join("/")),o=[];return o.push(...s.map(u=>u===""?a:[a,u].join("/"))),n&&o.push(...s),o.map(u=>e.startsWith("/")&&u===""?"/":u)}function Zt(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:or(t.routesMeta.map(i=>i.childrenIndex),r.routesMeta.map(i=>i.childrenIndex)))}var Qt=/^:[\w-]+$/,er=3,tr=2,rr=1,nr=10,ar=-2,nt=e=>e==="*";function ir(e,t){let r=e.split("/"),i=r.length;return r.some(nt)&&(i+=ar),t&&(i+=tr),r.filter(n=>!nt(n)).reduce((n,a)=>n+(Qt.test(a)?er:a===""?rr:nr),i)}function or(e,t){return e.length===t.length&&e.slice(0,-1).every((i,n)=>i===t[n])?e[e.length-1]-t[t.length-1]:0}function sr(e,t,r=!1){let{routesMeta:i}=e,n={},a="/",s=[];for(let o=0;o<i.length;++o){let u=i[o],c=o===i.length-1,f=a==="/"?t:t.slice(a.length)||"/",h=ye({path:u.relativePath,caseSensitive:u.caseSensitive,end:c},f),p=u.route;if(!h&&c&&r&&!i[i.length-1].route.index&&(h=ye({path:u.relativePath,caseSensitive:u.caseSensitive,end:!1},f)),!h)return null;Object.assign(n,h.params),s.push({params:n,pathname:K([a,h.pathname]),pathnameBase:pr(K([a,h.pathnameBase])),route:p}),h.pathnameBase!=="/"&&(a=K([a,h.pathnameBase]))}return s}function ye(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,i]=lr(e.path,e.caseSensitive,e.end),n=t.match(r);if(!n)return null;let a=n[0],s=a.replace(/(.)\/+$/,"$1"),o=n.slice(1);return{params:i.reduce((c,{paramName:f,isOptional:h},p)=>{if(f==="*"){let m=o[p]||"";s=a.slice(0,a.length-m.length).replace(/(.)\/+$/,"$1")}const g=o[p];return h&&!g?c[f]=void 0:c[f]=(g||"").replace(/%2F/g,"/"),c},{}),pathname:a,pathnameBase:s,pattern:e}}function lr(e,t=!1,r=!0){G(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let i=[],n="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,o,u)=>(i.push({paramName:o,isOptional:u!=null}),u?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(i.push({paramName:"*"}),n+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?n+="\\/*$":e!==""&&e!=="/"&&(n+="(?:(?=\\/|$))"),[new RegExp(n,t?void 0:"i"),i]}function ur(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return G(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function te(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,i=e.charAt(r);return i&&i!=="/"?null:e.slice(r)||"/"}function cr(e,t="/"){let{pathname:r,search:i="",hash:n=""}=typeof e=="string"?Le(e):e;return{pathname:r?r.startsWith("/")?r:fr(r,t):t,search:hr(i),hash:mr(n)}}function fr(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(n=>{n===".."?r.length>1&&r.pop():n!=="."&&r.push(n)}),r.length>1?r.join("/"):"/"}function $e(e,t,r,i){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(i)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function dr(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function pt(e){let t=dr(e);return t.map((r,i)=>i===t.length-1?r.pathname:r.pathnameBase)}function ht(e,t,r,i=!1){let n;typeof e=="string"?n=Le(e):(n={...e},q(!n.pathname||!n.pathname.includes("?"),$e("?","pathname","search",n)),q(!n.pathname||!n.pathname.includes("#"),$e("#","pathname","hash",n)),q(!n.search||!n.search.includes("#"),$e("#","search","hash",n)));let a=e===""||n.pathname==="",s=a?"/":n.pathname,o;if(s==null)o=r;else{let h=t.length-1;if(!i&&s.startsWith("..")){let p=s.split("/");for(;p[0]==="..";)p.shift(),h-=1;n.pathname=p.join("/")}o=h>=0?t[h]:"/"}let u=cr(n,o),c=s&&s!=="/"&&s.endsWith("/"),f=(a||s===".")&&r.endsWith("/");return!u.pathname.endsWith("/")&&(c||f)&&(u.pathname+="/"),u}var K=e=>e.join("/").replace(/\/\/+/g,"/"),pr=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),hr=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,mr=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function yr(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}var mt=["POST","PUT","PATCH","DELETE"];new Set(mt);var vr=["GET",...mt];new Set(vr);var ae=d.createContext(null);ae.displayName="DataRouter";var ge=d.createContext(null);ge.displayName="DataRouterState";var yt=d.createContext({isTransitioning:!1});yt.displayName="ViewTransition";var gr=d.createContext(new Map);gr.displayName="Fetchers";var br=d.createContext(null);br.displayName="Await";var X=d.createContext(null);X.displayName="Navigation";var Me=d.createContext(null);Me.displayName="Location";var Z=d.createContext({outlet:null,matches:[],isDataRoute:!1});Z.displayName="Route";var De=d.createContext(null);De.displayName="RouteError";function xr(e,{relative:t}={}){q(be(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:i}=d.useContext(X),{hash:n,pathname:a,search:s}=se(e,{relative:t}),o=a;return r!=="/"&&(o=a==="/"?r:K([r,a])),i.createHref({pathname:o,search:s,hash:n})}function be(){return d.useContext(Me)!=null}function re(){return q(be(),"useLocation() may be used only in the context of a <Router> component."),d.useContext(Me).location}var vt="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function gt(e){d.useContext(X).static||d.useLayoutEffect(e)}function Er(){let{isDataRoute:e}=d.useContext(Z);return e?Ir():wr()}function wr(){q(be(),"useNavigate() may be used only in the context of a <Router> component.");let e=d.useContext(ae),{basename:t,navigator:r}=d.useContext(X),{matches:i}=d.useContext(Z),{pathname:n}=re(),a=JSON.stringify(pt(i)),s=d.useRef(!1);return gt(()=>{s.current=!0}),d.useCallback((u,c={})=>{if(G(s.current,vt),!s.current)return;if(typeof u=="number"){r.go(u);return}let f=ht(u,JSON.parse(a),n,c.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:K([t,f.pathname])),(c.replace?r.replace:r.push)(f,c.state,c)},[t,r,a,n,e])}d.createContext(null);function se(e,{relative:t}={}){let{matches:r}=d.useContext(Z),{pathname:i}=re(),n=JSON.stringify(pt(r));return d.useMemo(()=>ht(e,JSON.parse(n),i,t==="path"),[e,n,i,t])}function Rr(e,t,r,i){q(be(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:n,static:a}=d.useContext(X),{matches:s}=d.useContext(Z),o=s[s.length-1],u=o?o.params:{},c=o?o.pathname:"/",f=o?o.pathnameBase:"/",h=o&&o.route;{let C=h&&h.path||"";bt(c,!h||C.endsWith("*")||C.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${c}" (under <Route path="${C}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
34
+
35
+ Please change the parent <Route path="${C}"> to <Route path="${C==="/"?"*":`${C}/*`}">.`)}let p=re(),g;g=p;let m=g.pathname||"/",R=m;if(f!=="/"){let C=f.replace(/^\//,"").split("/");R="/"+m.replace(/^\//,"").split("/").slice(C.length).join("/")}let T=!a&&r&&r.matches&&r.matches.length>0?r.matches:ct(e,{pathname:R});return G(h||T!=null,`No routes matched location "${g.pathname}${g.search}${g.hash}" `),G(T==null||T[T.length-1].route.element!==void 0||T[T.length-1].route.Component!==void 0||T[T.length-1].route.lazy!==void 0,`Matched leaf route at location "${g.pathname}${g.search}${g.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),_r(T&&T.map(C=>Object.assign({},C,{params:Object.assign({},u,C.params),pathname:K([f,n.encodeLocation?n.encodeLocation(C.pathname).pathname:C.pathname]),pathnameBase:C.pathnameBase==="/"?f:K([f,n.encodeLocation?n.encodeLocation(C.pathnameBase).pathname:C.pathnameBase])})),s,r,i)}function Tr(){let e=Nr(),t=yr(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,i="rgba(200,200,200, 0.5)",n={padding:"0.5rem",backgroundColor:i},a={padding:"2px 4px",backgroundColor:i},s=null;return console.error("Error handled by React Router default ErrorBoundary:",e),s=d.createElement(d.Fragment,null,d.createElement("p",null,"💿 Hey developer 👋"),d.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",d.createElement("code",{style:a},"ErrorBoundary")," or"," ",d.createElement("code",{style:a},"errorElement")," prop on your route.")),d.createElement(d.Fragment,null,d.createElement("h2",null,"Unexpected Application Error!"),d.createElement("h3",{style:{fontStyle:"italic"}},t),r?d.createElement("pre",{style:n},r):null,s)}var Cr=d.createElement(Tr,null),Sr=class extends d.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error!==void 0?d.createElement(Z.Provider,{value:this.props.routeContext},d.createElement(De.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function Pr({routeContext:e,match:t,children:r}){let i=d.useContext(ae);return i&&i.static&&i.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=t.route.id),d.createElement(Z.Provider,{value:e},r)}function _r(e,t=[],r=null,i=null){if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let n=e,a=r==null?void 0:r.errors;if(a!=null){let u=n.findIndex(c=>c.route.id&&(a==null?void 0:a[c.route.id])!==void 0);q(u>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(",")}`),n=n.slice(0,Math.min(n.length,u+1))}let s=!1,o=-1;if(r)for(let u=0;u<n.length;u++){let c=n[u];if((c.route.HydrateFallback||c.route.hydrateFallbackElement)&&(o=u),c.route.id){let{loaderData:f,errors:h}=r,p=c.route.loader&&!f.hasOwnProperty(c.route.id)&&(!h||h[c.route.id]===void 0);if(c.route.lazy||p){s=!0,o>=0?n=n.slice(0,o+1):n=[n[0]];break}}}return n.reduceRight((u,c,f)=>{let h,p=!1,g=null,m=null;r&&(h=a&&c.route.id?a[c.route.id]:void 0,g=c.route.errorElement||Cr,s&&(o<0&&f===0?(bt("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),p=!0,m=null):o===f&&(p=!0,m=c.route.hydrateFallbackElement||null)));let R=t.concat(n.slice(0,f+1)),T=()=>{let x;return h?x=g:p?x=m:c.route.Component?x=d.createElement(c.route.Component,null):c.route.element?x=c.route.element:x=u,d.createElement(Pr,{match:c,routeContext:{outlet:u,matches:R,isDataRoute:r!=null},children:x})};return r&&(c.route.ErrorBoundary||c.route.errorElement||f===0)?d.createElement(Sr,{location:r.location,revalidation:r.revalidation,component:g,error:h,children:T(),routeContext:{outlet:null,matches:R,isDataRoute:!0}}):T()},null)}function Fe(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Or(e){let t=d.useContext(ae);return q(t,Fe(e)),t}function jr(e){let t=d.useContext(ge);return q(t,Fe(e)),t}function kr(e){let t=d.useContext(Z);return q(t,Fe(e)),t}function qe(e){let t=kr(e),r=t.matches[t.matches.length-1];return q(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function $r(){return qe("useRouteId")}function Nr(){var i;let e=d.useContext(De),t=jr("useRouteError"),r=qe("useRouteError");return e!==void 0?e:(i=t.errors)==null?void 0:i[r]}function Ir(){let{router:e}=Or("useNavigate"),t=qe("useNavigate"),r=d.useRef(!1);return gt(()=>{r.current=!0}),d.useCallback(async(n,a={})=>{G(r.current,vt),r.current&&(typeof n=="number"?e.navigate(n):await e.navigate(n,{fromRouteId:t,...a}))},[e,t])}var at={};function bt(e,t,r){!t&&!at[e]&&(at[e]=!0,G(!1,r))}d.memo(Ar);function Ar({routes:e,future:t,state:r}){return Rr(e,void 0,r,t)}var he="get",me="application/x-www-form-urlencoded";function xe(e){return e!=null&&typeof e.tagName=="string"}function Lr(e){return xe(e)&&e.tagName.toLowerCase()==="button"}function Mr(e){return xe(e)&&e.tagName.toLowerCase()==="form"}function Dr(e){return xe(e)&&e.tagName.toLowerCase()==="input"}function Fr(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function qr(e,t){return e.button===0&&(!t||t==="_self")&&!Fr(e)}var pe=null;function Wr(){if(pe===null)try{new FormData(document.createElement("form"),0),pe=!1}catch{pe=!0}return pe}var Br=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Ne(e){return e!=null&&!Br.has(e)?(G(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${me}"`),null):e}function Ur(e,t){let r,i,n,a,s;if(Mr(e)){let o=e.getAttribute("action");i=o?te(o,t):null,r=e.getAttribute("method")||he,n=Ne(e.getAttribute("enctype"))||me,a=new FormData(e)}else if(Lr(e)||Dr(e)&&(e.type==="submit"||e.type==="image")){let o=e.form;if(o==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let u=e.getAttribute("formaction")||o.getAttribute("action");if(i=u?te(u,t):null,r=e.getAttribute("formmethod")||o.getAttribute("method")||he,n=Ne(e.getAttribute("formenctype"))||Ne(o.getAttribute("enctype"))||me,a=new FormData(o,e),!Wr()){let{name:c,type:f,value:h}=e;if(f==="image"){let p=c?`${c}.`:"";a.append(`${p}x`,"0"),a.append(`${p}y`,"0")}else c&&a.append(c,h)}}else{if(xe(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=he,i=null,n=me,s=e}return a&&n==="text/plain"&&(s=a,a=void 0),{action:i,method:r.toLowerCase(),encType:n,formData:a,body:s}}function We(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}async function zr(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(r){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Yr(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function Hr(e,t,r){let i=await Promise.all(e.map(async n=>{let a=t.routes[n.route.id];if(a){let s=await zr(a,r);return s.links?s.links():[]}return[]}));return Gr(i.flat(1).filter(Yr).filter(n=>n.rel==="stylesheet"||n.rel==="preload").map(n=>n.rel==="stylesheet"?{...n,rel:"prefetch",as:"style"}:{...n,rel:"prefetch"}))}function it(e,t,r,i,n,a){let s=(u,c)=>r[c]?u.route.id!==r[c].route.id:!0,o=(u,c)=>{var f;return r[c].pathname!==u.pathname||((f=r[c].route.path)==null?void 0:f.endsWith("*"))&&r[c].params["*"]!==u.params["*"]};return a==="assets"?t.filter((u,c)=>s(u,c)||o(u,c)):a==="data"?t.filter((u,c)=>{var h;let f=i.routes[u.route.id];if(!f||!f.hasLoader)return!1;if(s(u,c)||o(u,c))return!0;if(u.route.shouldRevalidate){let p=u.route.shouldRevalidate({currentUrl:new URL(n.pathname+n.search+n.hash,window.origin),currentParams:((h=r[0])==null?void 0:h.params)||{},nextUrl:new URL(e,window.origin),nextParams:u.params,defaultShouldRevalidate:!0});if(typeof p=="boolean")return p}return!0}):[]}function Vr(e,t,{includeHydrateFallback:r}={}){return Jr(e.map(i=>{let n=t.routes[i.route.id];if(!n)return[];let a=[n.module];return n.clientActionModule&&(a=a.concat(n.clientActionModule)),n.clientLoaderModule&&(a=a.concat(n.clientLoaderModule)),r&&n.hydrateFallbackModule&&(a=a.concat(n.hydrateFallbackModule)),n.imports&&(a=a.concat(n.imports)),a}).flat(1))}function Jr(e){return[...new Set(e)]}function Kr(e){let t={},r=Object.keys(e).sort();for(let i of r)t[i]=e[i];return t}function Gr(e,t){let r=new Set;return new Set(t),e.reduce((i,n)=>{let a=JSON.stringify(Kr(n));return r.has(a)||(r.add(a),i.push({key:a,link:n})),i},[])}function Xr(e){let t=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return t.pathname==="/"?t.pathname="_root.data":t.pathname=`${t.pathname.replace(/\/$/,"")}.data`,t}function Zr(){let e=d.useContext(ae);return We(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function Qr(){let e=d.useContext(ge);return We(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Be=d.createContext(void 0);Be.displayName="FrameworkContext";function xt(){let e=d.useContext(Be);return We(e,"You must render this element inside a <HydratedRouter> element"),e}function en(e,t){let r=d.useContext(Be),[i,n]=d.useState(!1),[a,s]=d.useState(!1),{onFocus:o,onBlur:u,onMouseEnter:c,onMouseLeave:f,onTouchStart:h}=t,p=d.useRef(null);d.useEffect(()=>{if(e==="render"&&s(!0),e==="viewport"){let R=x=>{x.forEach(C=>{s(C.isIntersecting)})},T=new IntersectionObserver(R,{threshold:.5});return p.current&&T.observe(p.current),()=>{T.disconnect()}}},[e]),d.useEffect(()=>{if(i){let R=setTimeout(()=>{s(!0)},100);return()=>{clearTimeout(R)}}},[i]);let g=()=>{n(!0)},m=()=>{n(!1),s(!1)};return r?e!=="intent"?[a,p,{}]:[a,p,{onFocus:oe(o,g),onBlur:oe(u,m),onMouseEnter:oe(c,g),onMouseLeave:oe(f,m),onTouchStart:oe(h,g)}]:[!1,p,{}]}function oe(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function tn({page:e,...t}){let{router:r}=Zr(),i=d.useMemo(()=>ct(r.routes,e,r.basename),[r.routes,e,r.basename]);return i?d.createElement(nn,{page:e,matches:i,...t}):null}function rn(e){let{manifest:t,routeModules:r}=xt(),[i,n]=d.useState([]);return d.useEffect(()=>{let a=!1;return Hr(e,t,r).then(s=>{a||n(s)}),()=>{a=!0}},[e,t,r]),i}function nn({page:e,matches:t,...r}){let i=re(),{manifest:n,routeModules:a}=xt(),{loaderData:s,matches:o}=Qr(),u=d.useMemo(()=>it(e,t,o,n,i,"data"),[e,t,o,n,i]),c=d.useMemo(()=>it(e,t,o,n,i,"assets"),[e,t,o,n,i]),f=d.useMemo(()=>{if(e===i.pathname+i.search+i.hash)return[];let g=new Set,m=!1;if(t.forEach(T=>{var C;let x=n.routes[T.route.id];!x||!x.hasLoader||(!u.some(S=>S.route.id===T.route.id)&&T.route.id in s&&((C=a[T.route.id])!=null&&C.shouldRevalidate)||x.hasClientLoader?m=!0:g.add(T.route.id))}),g.size===0)return[];let R=Xr(e);return m&&g.size>0&&R.searchParams.set("_routes",t.filter(T=>g.has(T.route.id)).map(T=>T.route.id).join(",")),[R.pathname+R.search]},[s,i,n,u,t,e,a]),h=d.useMemo(()=>Vr(c,n),[c,n]),p=rn(c);return d.createElement(d.Fragment,null,f.map(g=>d.createElement("link",{key:g,rel:"prefetch",as:"fetch",href:g,...r})),h.map(g=>d.createElement("link",{key:g,rel:"modulepreload",href:g,...r})),p.map(({key:g,link:m})=>d.createElement("link",{key:g,...m})))}function an(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var Et=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Et&&(window.__reactRouterVersion="7.2.0")}catch{}var wt=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ue=d.forwardRef(function({onClick:t,discover:r="render",prefetch:i="none",relative:n,reloadDocument:a,replace:s,state:o,target:u,to:c,preventScrollReset:f,viewTransition:h,...p},g){let{basename:m}=d.useContext(X),R=typeof c=="string"&&wt.test(c),T,x=!1;if(typeof c=="string"&&R&&(T=c,Et))try{let F=new URL(window.location.href),Y=c.startsWith("//")?new URL(F.protocol+c):new URL(c),Q=te(Y.pathname,m);Y.origin===F.origin&&Q!=null?c=Q+Y.search+Y.hash:x=!0}catch{G(!1,`<Link to="${c}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let C=xr(c,{relative:n}),[S,$,b]=en(i,p),B=un(c,{replace:s,state:o,target:u,preventScrollReset:f,relative:n,viewTransition:h});function z(F){t&&t(F),F.defaultPrevented||B(F)}let H=d.createElement("a",{...p,...b,href:T||C,onClick:x||a?t:z,ref:an(g,$),target:u,"data-discover":!R&&r==="render"?"true":void 0});return S&&!R?d.createElement(d.Fragment,null,H,d.createElement(tn,{page:C})):H});Ue.displayName="Link";var on=d.forwardRef(function({"aria-current":t="page",caseSensitive:r=!1,className:i="",end:n=!1,style:a,to:s,viewTransition:o,children:u,...c},f){let h=se(s,{relative:c.relative}),p=re(),g=d.useContext(ge),{navigator:m,basename:R}=d.useContext(X),T=g!=null&&hn(h)&&o===!0,x=m.encodeLocation?m.encodeLocation(h).pathname:h.pathname,C=p.pathname,S=g&&g.navigation&&g.navigation.location?g.navigation.location.pathname:null;r||(C=C.toLowerCase(),S=S?S.toLowerCase():null,x=x.toLowerCase()),S&&R&&(S=te(S,R)||S);const $=x!=="/"&&x.endsWith("/")?x.length-1:x.length;let b=C===x||!n&&C.startsWith(x)&&C.charAt($)==="/",B=S!=null&&(S===x||!n&&S.startsWith(x)&&S.charAt(x.length)==="/"),z={isActive:b,isPending:B,isTransitioning:T},H=b?t:void 0,F;typeof i=="function"?F=i(z):F=[i,b?"active":null,B?"pending":null,T?"transitioning":null].filter(Boolean).join(" ");let Y=typeof a=="function"?a(z):a;return d.createElement(Ue,{...c,"aria-current":H,className:F,ref:f,style:Y,to:s,viewTransition:o},typeof u=="function"?u(z):u)});on.displayName="NavLink";var sn=d.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:i,replace:n,state:a,method:s=he,action:o,onSubmit:u,relative:c,preventScrollReset:f,viewTransition:h,...p},g)=>{let m=dn(),R=pn(o,{relative:c}),T=s.toLowerCase()==="get"?"get":"post",x=typeof o=="string"&&wt.test(o),C=S=>{if(u&&u(S),S.defaultPrevented)return;S.preventDefault();let $=S.nativeEvent.submitter,b=($==null?void 0:$.getAttribute("formmethod"))||s;m($||S.currentTarget,{fetcherKey:t,method:b,navigate:r,replace:n,state:a,relative:c,preventScrollReset:f,viewTransition:h})};return d.createElement("form",{ref:g,method:T,action:R,onSubmit:i?u:C,...p,"data-discover":!x&&e==="render"?"true":void 0})});sn.displayName="Form";function ln(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Rt(e){let t=d.useContext(ae);return q(t,ln(e)),t}function un(e,{target:t,replace:r,state:i,preventScrollReset:n,relative:a,viewTransition:s}={}){let o=Er(),u=re(),c=se(e,{relative:a});return d.useCallback(f=>{if(qr(f,t)){f.preventDefault();let h=r!==void 0?r:Ie(u)===Ie(c);o(e,{replace:h,state:i,preventScrollReset:n,relative:a,viewTransition:s})}},[u,o,c,r,i,t,e,n,a,s])}var cn=0,fn=()=>`__${String(++cn)}__`;function dn(){let{router:e}=Rt("useSubmit"),{basename:t}=d.useContext(X),r=$r();return d.useCallback(async(i,n={})=>{let{action:a,method:s,encType:o,formData:u,body:c}=Ur(i,t);if(n.navigate===!1){let f=n.fetcherKey||fn();await e.fetch(f,r,n.action||a,{preventScrollReset:n.preventScrollReset,formData:u,body:c,formMethod:n.method||s,formEncType:n.encType||o,flushSync:n.flushSync})}else await e.navigate(n.action||a,{preventScrollReset:n.preventScrollReset,formData:u,body:c,formMethod:n.method||s,formEncType:n.encType||o,replace:n.replace,state:n.state,fromRouteId:r,flushSync:n.flushSync,viewTransition:n.viewTransition})},[e,t,r])}function pn(e,{relative:t}={}){let{basename:r}=d.useContext(X),i=d.useContext(Z);q(i,"useFormAction must be used inside a RouteContext");let[n]=i.matches.slice(-1),a={...se(e||".",{relative:t})},s=re();if(e==null){a.search=s.search;let o=new URLSearchParams(a.search),u=o.getAll("index");if(u.some(f=>f==="")){o.delete("index"),u.filter(h=>h).forEach(h=>o.append("index",h));let f=o.toString();a.search=f?`?${f}`:""}}return(!e||e===".")&&n.route.index&&(a.search=a.search?a.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(a.pathname=a.pathname==="/"?r:K([r,a.pathname])),Ie(a)}function hn(e,t={}){let r=d.useContext(yt);q(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:i}=Rt("useViewTransitionState"),n=se(e,{relative:t.relative});if(!r.isTransitioning)return!1;let a=te(r.currentLocation.pathname,i)||r.currentLocation.pathname,s=te(r.nextLocation.pathname,i)||r.nextLocation.pathname;return ye(n.pathname,s)!=null||ye(n.pathname,a)!=null}new TextEncoder;const ve=({text:e,href:t,title:r,className:i,type:n="primary",variant:a="",size:s="default",icon:o="",iconOnly:u=!1,iconPosition:c="left",fullWidth:f=!1,disabled:h=!1,onClick:p=()=>{},"aria-label":g=""})=>{const m=o&&u,R=W("rpf-button",{[`rpf-button--${n}`]:n,"rpf-button--danger":a==="danger","rpf-button--sm":s==="small","rpf-button--icon-only":m,"rpf-button--full-width":f,disabled:h},i);let T="rpf-button__icon";d.default.isValidElement(o)?(T+=" icon",console.warn("DEPRECATED: icons as React elements will not be supported in future releases")):T+=" material-symbols-sharp";const x=$=>o&&c===$&&v.jsx("span",{className:T,children:o}),C=()=>e&&!m&&v.jsx("span",{className:"text",children:e}),S=v.jsxs(v.Fragment,{children:[x("left"),C(),x("right")]});return t?v.jsx(Ue,{className:R,to:t,onClick:p,"aria-label":g,children:S}):v.jsx("button",{className:R,title:r,onClick:p,disabled:h,"aria-label":g,children:S})};ve.propTypes={type:l.string,className:l.string,disabled:l.bool,icon:l.oneOfType([l.string,l.element]),href:l.string,onClick:l.func,text:l.string,iconOnly:l.bool,title:l.string,iconPosition:l.oneOf(["left","right"]),size:l.oneOf(["default","small"]),"aria-label":l.string,fullWidth:l.bool,variant:l.string};const Tt=({title:e,text:t,children:r,type:i,actions:n,onClose:a})=>v.jsxs("div",{className:`rpf-alert rpf-alert--${i}`,children:[v.jsxs("div",{className:"rpf-alert__header",children:[v.jsx("span",{className:"rpf-alert__icon material-symbols-sharp"}),v.jsx("p",{className:"rpf-alert__title",children:e}),!!a&&v.jsx("div",{className:"rpf-alert__close",children:v.jsx(ve,{type:"tertiary",icon:"close",size:"small",iconOnly:!0,onClick:a})})]}),(t||r||n)&&v.jsxs("div",{className:"rpf-alert__body",children:[!r&&t&&v.jsx("p",{children:t}),r&&v.jsx("div",{children:r}),n&&n.length>0&&v.jsx("div",{className:"rpf-alert__actions",children:n.map(s=>v.jsx(ve,{text:s.label,size:"small",type:"tertiary",href:s.href,onClick:s.onClick},s.key||s.label))})]})]});Tt.propTypes={title:l.string,text:l.string,type:l.oneOf(["error","warning","information","success"]),actions:l.arrayOf(l.shape({href:l.string,label:l.string,onClick:l.func})),children:l.node,onClose:l.func};const Ct=({id:e,label:t,name:r,checked:i=!1,disabled:n=!1,error:a="",onChange:s=()=>{},value:o="",className:u=""})=>v.jsxs(v.Fragment,{children:[v.jsxs("label",{className:W("rpf-input-checkbox",{"rpf-input-checkbox--error":a,className:u}),children:[v.jsx("span",{children:v.jsx("input",{checked:!!i,disabled:n,id:e,name:r,onChange:s,type:"checkbox",value:o})}),v.jsx("span",{className:"checkmark"}),t]}),a&&v.jsxs("div",{className:"rpf-error-message",children:[v.jsx("span",{className:"rpf-error-message__icon material-symbols-sharp",children:"error"}),a]})]});Ct.propTypes={checked:l.bool,disabled:l.bool,error:l.string,id:l.string.isRequired,label:l.oneOfType([l.string,l.object]).isRequired,name:l.string.isRequired,onChange:l.func,value:l.string,className:l.string};const St=({disabled:e=!1,errorText:t="",fullWidth:r=!1,legendText:i,legendHintText:n="",children:a})=>v.jsxs("fieldset",{className:W("rpf-fieldset",{"rpf-fieldset--disabled":e,"rpf-fieldset--full-width":r,"rpf-fieldset--error":t}),disabled:e,children:[v.jsxs("legend",{className:"rpf-label",children:[i,n.length>0?v.jsx("small",{className:"rpf-label__hint",children:n}):null]}),v.jsx("div",{className:"rpf-fieldset__inputs",children:a}),t.length>0?v.jsxs("div",{className:"rpf-error-message",children:[v.jsx("span",{className:"rpf-error-message__icon material-symbols-sharp",children:"error"}),t]}):null]});St.propTypes={disabled:l.bool,errorText:l.string,fullWidth:l.bool,legendText:l.string.isRequired,legendHintText:l.string,children:l.node};const le=({id:e,label:t,children:r,disabled:i=!1,error:n="",hint:a=""})=>v.jsxs("div",{className:"rpf-input-field",children:[(t||a)&&v.jsxs("label",{htmlFor:e,className:W("rpf-label",{"rpf-label--disabled":i}),children:[t,v.jsx("small",{className:"rpf-label__hint",children:a})]}),r,n&&v.jsxs("div",{className:"rpf-error-message",children:[v.jsx("span",{className:"rpf-error-message__icon material-symbols-sharp",children:"error"}),n]})]});le.propTypes={disabled:l.bool,error:l.string,hint:l.oneOfType([l.string,l.object]),label:l.oneOfType([l.string,l.object]).isRequired,id:l.string.isRequired,children:l.node};const Pt=({label:e,inputFieldId:t,disabled:r=!1,hint:i=""})=>v.jsx("div",{className:"rpf-label",children:v.jsxs("label",{htmlFor:t,className:W("rpf-label",{"rpf-label--disabled":r}),children:[e,i&&v.jsx("div",{className:"rpf-label__hint",children:i})]})});Pt.propTypes={disabled:l.bool,hint:l.oneOfType([l.string,l.object]),label:l.oneOfType([l.string,l.object]).isRequired,inputFieldId:l.string.isRequired};const _t=({text:e="",percent:t})=>v.jsx("div",{className:"rpf-progress-bar",children:v.jsxs("label",{className:"rpf-progress-bar__label",children:[v.jsx("span",{children:e}),v.jsx("progress",{className:"rpf-progress-bar__bar",value:t,max:"100",children:`${t}%`})]})});_t.propTypes={text:l.string,percent:l.number.isRequired};const Ot=({id:e,label:t,name:r,checked:i=!1,disabled:n=!1,fullWidth:a=!1,onChange:s=()=>{},value:o=""})=>v.jsx(v.Fragment,{children:v.jsxs("label",{className:W("rpf-input-radio",{"rpf-input-radio--disabled":n,"rpf-input--full-width":a}),children:[v.jsx("input",{checked:!!i,disabled:n,id:e,name:r,onChange:s,type:"radio",value:o}),t]})});Ot.propTypes={checked:l.bool,disabled:l.bool,fullWidth:l.bool,id:l.string.isRequired,label:l.oneOfType([l.string,l.object]).isRequired,name:l.string.isRequired,onChange:l.func,value:l.string};const jt=({label:e,inputFieldId:t,disabled:r=!1,error:i="",hint:n="",placeholder:a="",defaultValue:s="",onClick:o=()=>{},onChange:u=c=>{}})=>v.jsxs("div",{className:"rpf-input-field",children:[v.jsxs("label",{htmlFor:t,className:W("rpf-label",{"rpf-label--disabled":r}),children:[e,n&&v.jsx("small",{className:"rpf-label__hint",children:n})]}),v.jsxs("div",{className:"rpf-input-search-container",children:[v.jsx("input",{className:W("rpf-input rpf-input-search",{"rpf-input--disabled":r,"rpf-input--error":i}),disabled:r,id:t,name:"search",type:"search","aria-label":"Search",defaultValue:s,placeholder:a,onChange:u}),v.jsx("button",{type:"button",className:W("rpf-button rpf-button-search",{"rpf-button--disabled":r,"rpf-button--error":i}),disabled:r,onClick:o,children:v.jsx("span",{className:"rpf-button__icon material-symbols-sharp",children:"search"})})]}),i&&v.jsxs("div",{className:"rpf-error-message",children:[v.jsx("span",{className:"rpf-error-message__icon material-symbols-sharp",children:"info"}),i]})]});jt.propTypes={disabled:l.bool,error:l.string,hint:l.string,inputFieldId:l.string.isRequired,label:l.string.isRequired,onClick:l.func,onChange:l.func,placeholder:l.string,defaultValue:l.string};const kt=({id:e,label:t,name:r,options:i,disabled:n=!1,error:a="",fullWidth:s=!1,hint:o="",onChange:u=()=>{},placeholder:c="",value:f=""})=>v.jsx(le,{id:e,disabled:n,error:a,hint:o,label:t,children:v.jsxs("select",{className:W("rpf-input rpf-input-select",{"rpf-input--error":a,"rpf-input--full-width":s}),disabled:n,id:e,name:r,onChange:u,type:"text",value:f,children:[!f&&!!c&&v.jsx("option",{value:"",disabled:!0,children:c}),i.map(h=>v.jsx("option",{value:h.key,children:h.value},h.key))]})});kt.propTypes={disabled:l.bool,error:l.string,fullWidth:l.bool,hint:l.oneOfType([l.string,l.object]),label:l.oneOfType([l.string,l.object]).isRequired,id:l.string.isRequired,name:l.string.isRequired,onChange:l.func,options:l.array.isRequired,placeholder:l.string,value:l.string};const $t=({headerRow:e,bodyRows:t,fullWidth:r})=>v.jsx("div",{"data-testid":"table-container",className:W("rpf-table",{"rpf-table--full-width":r}),children:v.jsxs("table",{className:W("rpf-table__table",{"rpf-table__table--full-width":r}),children:[v.jsx("thead",{children:v.jsx("tr",{className:"rpf-table-row",children:e})}),v.jsx("tbody",{children:t.map((i,n)=>v.jsx("tr",{className:"rpf-table-row",children:i},n))})]})});$t.propTypes={headerRow:l.node.isRequired,bodyRows:l.arrayOf(l.node).isRequired,fullWidth:l.bool};const Nt=({children:e})=>v.jsx("td",{className:"rpf-table-cell rpf-table-cell--body",children:v.jsx("div",{className:"rpf-table-cell__content",children:e})});Nt.propTypes={children:l.node};const It=({sortDirection:e,children:t})=>{if(e!==void 0){const i=e==="up"?"arrow_drop_up":"arrow_drop_down";t=v.jsxs("div",{className:"rpf-table-cell__sort-header",children:[t,v.jsx("span",{className:"material-symbols-sharp",children:i})]})}const r=e!==void 0?"rpf-table-cell--sortable-header":"rpf-table-cell--header";return v.jsx("th",{className:`rpf-table-cell ${r}`,children:v.jsx("div",{className:"rpf-table-cell__content",children:t})})};It.propTypes={sortDirection:l.oneOf(["up","down"]),children:l.node};const At=({text:e,variant:t,secondary:r,icon:i,iconPosition:n})=>(i&&(i=v.jsx("span",{className:"rpf-tag__icon material-symbols-sharp",children:i})),i&&!n&&(n="left"),t&&t!=="default"?t=`rpf-tag--${t}`:t=null,v.jsxs("span",{className:W("rpf-tag",t,{"rpf-tag--secondary":r}),children:[n==="left"&&i,e,n==="right"&&i]}));At.propTypes={text:l.string.isRequired,variant:l.oneOf(["default","information","success","warning","error"]),secondary:l.bool,icon:l.string,iconPosition:l.oneOf(["left","right"])};const Lt=({id:e,label:t,name:r,value:i,disabled:n=!1,readOnly:a=!1,error:s="",fullWidth:o=!1,hint:u="",onChange:c=()=>{}})=>v.jsx(le,{id:e,disabled:n,error:s,hint:u,label:t,children:v.jsx("textarea",{className:W("rpf-input rpf-input-textarea",{"rpf-input--error":s,"rpf-input--full-width":o,"rpf-input--disabled":n}),disabled:n,readOnly:a,id:e,name:r,onChange:c,type:"text",value:i})});Lt.propTypes={disabled:l.bool,readOnly:l.bool,error:l.string,fullWidth:l.bool,hint:l.oneOfType([l.string,l.object]),label:l.oneOfType([l.string,l.object]).isRequired,id:l.string.isRequired,name:l.string.isRequired,onChange:l.func,value:l.string.isRequired};const Mt=({id:e,label:t,name:r,value:i,disabled:n=!1,error:a="",fullWidth:s=!1,hint:o="",onChange:u=()=>{}})=>v.jsx(le,{id:e,disabled:n,error:a,hint:o,label:t,children:v.jsx("input",{className:W("rpf-input rpf-input-text",{"rpf-input--error":a,"rpf-input--full-width":s}),disabled:n,id:e,name:r,onChange:u,type:"text",value:i})});Mt.propTypes={disabled:l.bool,error:l.string,fullWidth:l.bool,hint:l.oneOfType([l.string,l.object]),label:l.oneOfType([l.string,l.object]).isRequired,id:l.string.isRequired,name:l.string.isRequired,onChange:l.func,value:l.string.isRequired};exports.Accordion=ut;exports.Alert=Tt;exports.Button=ve;exports.CheckboxInput=Ct;exports.Fieldset=St;exports.InputField=le;exports.InputLabel=Pt;exports.ProgressBar=_t;exports.RadioInput=Ot;exports.SearchInput=jt;exports.SelectInput=kt;exports.Table=$t;exports.TableBodyCell=Nt;exports.TableHeaderCell=It;exports.Tag=At;exports.TextInput=Mt;exports.TextareaInput=Lt;