@spscommerce/ds-react 8.7.4 → 8.7.6
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/lib/index.cjs.js +147 -147
- package/lib/index.es.js +6549 -6212
- package/package.json +12 -12
- /package/{vite.config.js → vite.config.mjs} +0 -0
package/lib/index.cjs.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
"use strict";var Jb=Object.defineProperty;var Zb=(e,t,n)=>t in e?Jb(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Kt=(e,t,n)=>(Zb(e,typeof t!="symbol"?t+"":t,n),n),hc=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var Bn=(e,t,n)=>(hc(e,t,"read from private field"),n?n.call(e):t.get(e)),Ns=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},cn=(e,t,n,r)=>(hc(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const U=require("react"),y=require("@spscommerce/utils"),np=require("moment-timezone"),$=require("@spscommerce/ds-shared"),ea=require("react-dom"),Co=require("@spscommerce/ds-colors"),Xb=require("@sps-woodland/tabs"),pr=require("@react-stately/collections"),rp=require("@sps-woodland/illustrations"),zo=e=>e&&typeof e=="object"&&"default"in e?e:{default:e};function sp(e){if(e&&e.__esModule)return e;const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const s=sp(U),X=zo(U),Sr=sp(np),ut=zo(np),Qb=zo(ea);function ap(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=ap(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function H(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=ap(e))&&(r&&(r+=" "),r+=t);return r}let bt=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((t,n)=>(n&=63,n<36?t+=n.toString(36):n<62?t+=(n-26).toString(36).toUpperCase():n>62?t+="-":t+="_",t),"");function Cn(e){return U.useRef(e||bt())}function yt(e,t){const n=Cn(e),r=U.useRef(`${n.current}_ctrl`);return U.useEffect(()=>{t&&(t.id=r.current,t.update())},[t]),{wrapperId:n.current||void 0,controlId:r.current}}var Jt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},ev="[object Object]";function tv(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}function nv(e,t){return function(n){return e(t(n))}}var rv=Function.prototype,op=Object.prototype,ip=rv.toString,sv=op.hasOwnProperty,av=ip.call(Object),ov=op.toString,iv=nv(Object.getPrototypeOf,Object);function lv(e){return!!e&&typeof e=="object"}function cv(e){if(!lv(e)||ov.call(e)!=ev||tv(e))return!1;var t=iv(e);if(t===null)return!0;var n=sv.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&ip.call(n)==av}var lp=cv;const xt=new Set,Er=new Set,un=new Set,ta=new Set;function cp(e){xt.has(e)||un.has(e)||ta.has(e)||Er.add(e)}function dp(e){xt.has(e)||un.has(e)||Er.has(e)||ta.add(e)}const tt=Sr.default||Sr,gr="MM/DD/YYYY",dv="MM/DD/YYYY hh:mm A",pv="MM/DD/YYYY HH:mm",uv="hh:mm A",mv="HH:mm",fv=/^(\d{1,2})\/(\d{1,2})\/(\d{4})$/,Yr=Symbol("Date Parse Error");function lr(e){return tt.isMoment(e)?e.year()*1e4+(e.month()+1)*100+e.date():e.year*1e4+e.month*100+e.date}const Q=Object.freeze({createFrom(e,t){if(!e)return null;if(typeof e=="string"){if(t){const n=tt(e,t,!0);if(n.isValid())return Object.freeze({year:n.year(),month:n.month()+1,date:n.date()})}else{const n=fv.exec(e);if(n){const[,r,a,o]=n;return Object.freeze({year:Number(o),month:Number(r),date:Number(a)})}}return Object.freeze({[Yr]:!0,year:void 0,month:void 0,date:void 0})}return Object.freeze({year:e.year(),month:e.month()+1,date:e.date()})},createMomentFrom(e,t){if(!e)return null;let n=null;return typeof e=="string"?t?n=tt(e,t,!0):n=tt(e):tt.isMoment(e)?n=e:n=Q.toMoment(e),n!==null&&tt.isMoment(n)&&n.isValid()?n:Object.freeze({[Yr]:!0,year:void 0,month:void 0,date:void 0})},getRangeSeparator(e){return e!=null&&e.includes("-")?"/":"-"},createRangeFrom(e,t){if(!e)return null;if(t){const n=Q.getRangeSeparator(t),r=new RegExp(`[^\\d]*${n}[^\\d]*`);return e.split(r).slice(0,2).map(a=>Q.createFrom(a,t))}else return e.split(/[^\d]*-[^\d]*/).slice(0,2).map(n=>Q.createFrom(n))},isValid(e){var t;return e?tt.isMoment(e)?e.isValid():typeof e=="object"&&typeof e.year=="number"&&typeof e.month=="number"&&typeof e.date=="number"&&((t=Q.toMoment(e))==null?void 0:t.isValid()):!1},nullifyInvalidDate(e){return Q.isValid(e)?e:null},toMoment(e){return e?tt.isMoment(e)?e:tt({...e,month:e.month-1}):null},toString(e,t){const n=Q.toMoment(e);return n&&n.isValid()?n.format(t||gr):""},toStringRange(e,t){if(!e)return"";const n=Q.getRangeSeparator(t);return e.slice(0,2).map(r=>Q.toString(r,t)).join(n)},toDateTimeString(e,t=!1,n){return e&&tt.isMoment(e)&&e.isValid()?n?t?e.format(`${n} ${mv}`):e.format(`${n} ${uv}`):t?e.format(pv):e.format(dv):""},toDateTimeStringRange(e,t=!1,n){if(!e)return"";const r=Q.getRangeSeparator(n);return e.map(a=>Q.toDateTimeString(a,t,n)).join(r)},create(){const e=new Date;return Object.freeze({year:e.getFullYear(),month:e.getMonth()+1,date:e.getDate()})},isSameDate(e,t){return e&&t&&e.year===t.year&&e.month===t.month&&e.date===t.date},isSameMonth(e,t){return e&&t&&e.year===t.year&&e.month===t.month},isAfter(e,t){return!e||!t?null:lr(e)>lr(t)},isBefore(e,t){return!e||!t?null:lr(e)<lr(t)},isInRange(e,t,n=!0){if(!e||!t||!t[0]||!t[1])return null;const r=lr(e),[a,o]=t.map(lr);return e&&a&&o&&(n&&r>=a&&r<=o||!n&&r>a&&r<o)},prevMonth(e){return Object.freeze({year:e.month===1?e.year-1:e.year,month:e.month-1||12,date:e.date})},nextMonth(e){return Object.freeze({year:e.month===12?e.year+1:e.year,month:e.month+1>12?1:e.month+1,date:e.date})},createRangeFromPreset(e,t){if(typeof e.definition=="function")return e.definition();const n=tt(),r=n.clone().subtract(tt.duration(e.definition));return[Q.createFrom(r,t),Q.createFrom(n,t)]},createDateTimeRangeFromPreset(e){if(typeof e.definition=="function")return e.definition();let t;e.definition==="P0D"?t=tt().startOf("day"):t=tt().subtract(tt.duration(e.definition));const n=tt().endOf("day");return[t,n]},splitMomentInDateTimeParts(e,t=!1,n){return e&&tt.isMoment(e)&&e.isValid()?Q.toDateTimeString(e,t,n).split(" "):["",t?"00:00":"12:00",t?void 0:"AM"]},getCurrentMoment(){return tt()},validateTimeString(e,t=!1){if(!e)return!0;const n=e.split(":"),r=n[0]||"0",a=n[1]||"0",o=Number.isNaN(Number(r))?NaN:parseInt(r,10),l=Number.isNaN(Number(a))?NaN:parseInt(a,10),c=n.length<=2&&r.length<=2&&a.length<=2;return t?c&&o>=0&&o<=23&&l>=0&&l<=59:c&&(!Number.isNaN(o)&&r.length===1||o>=1)&&o<=12&&l>=0&&l<=59},padIncompleteTimeString(e,t=!1){if(!e)return"";const n=e.split(":"),r=parseInt(n[0]||"0",10),a=parseInt(n[1]||"0",10);if(t){const o=r<10?`0${r}`:`${r}`,l=a<10?`0${a}`:`${a}`;return`${o}:${l}`}else{const o=r===0?"12":r<10?`0${r}`:`${r}`,l=a<10?`0${a}`:`${a}`;return`${o}:${l}`}}}),Do=["01:00","02:00","03:00","04:00","05:00","06:00","07:00","08:00","09:00","10:00","11:00","12:00"],No=["00:00","01:00","02:00","03:00","04:00","05:00","06:00","07:00","08:00","09:00","10:00","11:00","12:00","13:00","14:00","15:00","16:00","17:00","18:00","19:00","20:00","21:00","22:00","23:00"];let Hs=gr;function pp(e){Hs=e}const Ur=function(t){if(Array.isArray(t)){const n=Ur(t[0]),r=Ur(t[1]);return n||r}if(t&&t.hasOwnProperty("year")){if(t[Yr])return{dateFormat:Hs};if(!Q.isValid(t))return{dateValidity:!0}}return null};xt.add("dateFormat");xt.add("dateValidity");const up=function(t){if(Array.isArray(t)){const n=Ur(t);if(n)return n;if(t&&Q.isBefore(t[1],t[0]))return{dateRangeOrder:!0}}return null};xt.add("dateRangeOrder");const mp=function({minDate:t,maxDate:n}){function r(a){const o=Q.isBefore(a,t),l=Q.isAfter(a,n),c={minExceeded:o?Q.toString(t,Hs):null,maxExceeded:l?Q.toString(n,Hs):null};return o||l?{dateConstraint:c}:null}return function(o){if(!o)return null;if(Array.isArray(o)){const l=r(o[0]),c=r(o[1]);return l||c}return o.hasOwnProperty("year")?r(o):null}};xt.add("dateConstraint");const hv=Object.freeze(Object.defineProperty({__proto__:null,setDateFormat:pp,date:Ur,dateRange:up,dateConstraint:mp},Symbol.toStringTag,{value:"Module"}));function Dn(e,t){for(const n of[].concat(e)){const r=t(n);if(r)return r}return null}const Sv=function(t){function n(r){return Number(r)>=t?null:{min:t}}return r=>Dn(r,n)};xt.add("min");const gv=function(t){function n(r){return Number(r)<=t?null:{max:t}}return r=>Dn(r,n)};Er.add("max");const bv=function(t){return typeof t>"u"||t===null||t===""||Number.isNaN(t)||(t==null?void 0:t.length)===0?{required:!0}:null};Er.add("required");const vv=function(t){function n(r){return r===void 0||r.toString().length<t?{minLength:t}:null}return r=>Dn(r,n)};xt.add("minLength");const yv=function(t){function n(r){return r==null||Array.isArray(r)&&r.length<t?{minLengthArray:t}:null}return r=>n(r)};xt.add("minLengthArray");const Tv=function(t){function n(r){return r===void 0||r.toString().length<=t?null:{maxLength:t}}return r=>Dn(r,n)};un.add("maxLength");const Ev=function(t){function n(r){return r==null||Array.isArray(r)&&r.length<=t?null:{maxLengthArray:t}}return r=>n(r)};xt.add("maxLengthArray");const wv=function(t){const n=t instanceof RegExp?t:new RegExp(t);function r(a){return n.test(a)?null:{pattern:t}}return a=>Dn(a,r)};xt.add("pattern");const Cv=function(e){function t(n){return/^\p{L}*$/u.test(n)?null:{alpha:!0}}return Dn(e,t)};un.add("alpha");const Dv=function(e){function t(n){return/^[0-9,. ]*$/.test(n)?null:{numeric:!0}}return Dn(e,t)};un.add("numeric");const Nv=function(e){function t(n){return/^[^0-9]*$/.test(n)?null:{nonNumeric:!0}}return Dn(e,t)};un.add("nonNumeric");const na=Object.freeze({...hv,min:Sv,max:gv,required:bv,minLength:vv,minLengthArray:yv,maxLength:Tv,maxLengthArray:Ev,pattern:wv,alpha:Cv,numeric:Dv,nonNumeric:Nv,OnBlurErrorKeys:xt});function ra(e,t=[]){const n=t.reduce((r,a)=>Object.assign(r,a(e)||{}),{});return Object.keys(n).length?n:null}var zt=(e=>(e[e.ON_CHANGE=0]="ON_CHANGE",e[e.ON_BLUR=1]="ON_BLUR",e[e.ON_SUBMIT=2]="ON_SUBMIT",e))(zt||{});function xv(e,t={},n=[]){for(const[r,a]of Object.entries(t))a===0?cp(r):a===2&&dp(r);return s.useCallback(e,n)}var Gn,bn,vn;class Kn{constructor(t,n){Kt(this,"validators",[]);Ns(this,Gn,null);Ns(this,bn,null);Ns(this,vn,null);Kt(this,"preventativeErrors",[]);Kt(this,"submitted",!1);this.path=t,this.update=n}get errors(){var t,n,r;return Bn(this,Gn)===null&&Bn(this,bn)===null&&Bn(this,vn)===null?null:{...(t=Bn(this,Gn))!=null?t:{},...(n=Bn(this,bn))!=null?n:{},...(r=Bn(this,vn))!=null?r:{}}}setValidators(t){return this.update(this.path,null,void 0,t),this}validate(t,n,r=!1){if(this.validators&&this.validators.length>0){const a=ra(t,this.validators);let o={onSubmit:{},onChange:{},onBlur:{}};a&&(o=Object.keys(a).reduce((l,c)=>(ta.has(c)?l.onSubmit[c]=a[c]:Er.has(c)?l.onChange[c]=a[c]:l.onBlur[c]=a[c],l),o)),(typeof n>"u"||n===zt.ON_CHANGE)&&cn(this,bn,Object.keys(o.onChange).length===0?null:o.onChange),(typeof n>"u"||n===zt.ON_BLUR)&&cn(this,vn,Object.keys(o.onBlur).length===0?null:o.onBlur),(typeof n>"u"||n===zt.ON_SUBMIT)&&(cn(this,Gn,Object.keys(o.onSubmit).length===0?null:o.onSubmit),cn(this,bn,Object.keys(o.onChange).length===0?null:o.onChange),cn(this,vn,Object.keys(o.onBlur).length===0?null:o.onBlur)),r||this.update(),this.isFocused()&&this.onFocus&&this.onFocus()}else this.errors&&(cn(this,Gn,null),cn(this,vn,null),cn(this,bn,null),r||this.update());return this}isValid(){return!this.errors||this.isPristine()}hasErrors(){return!!this.errors}isVisibilyInvalid(){return!this.isValid()}hasError(t){return this.errors&&Object.prototype.hasOwnProperty.call(this.errors,t)}hasPreventativeError(t){return this.preventativeErrors.includes(t)}hasPreventativeErrors(){return this.preventativeErrors.length>0}isRequired(){return this.validators&&this.validators.indexOf(na.required)>-1}isSubmitted(){return this.submitted}onFocus(){}onBlur(){}}Gn=new WeakMap,bn=new WeakMap,vn=new WeakMap;class jr extends Kn{constructor(){super(...arguments);Kt(this,"id",bt());Kt(this,"focused",!1);Kt(this,"pristine",!0)}setValue(n){if(this.preventativeErrors=[],this.validators&&this.validators.length>0){const r=ra(n,this.validators);if(r&&Object.keys(r).filter(o=>un.has(o)).length>0){this.preventativeErrors=Object.keys(r);return}}this.update(this.path,n)}isPristine(){return this.pristine}markAsPristine(){return this.pristine=!0,this.update(),this}markAsDirty(){return this.pristine=!1,this.update(),this}isFocused(){return this.focused}markAsFocused(){return this.focused=!0,this.update(),this.onFocus&&this.onFocus(),this}markAsBlurred(){return this.update(this.path,null,!0),this.onBlur&&this.onBlur(),this.preventativeErrors=[],this}markAsSubmitted(){return this.submitted=!0,this.update(this.path,null,!1,void 0,!0),this}}class Hn extends jr{constructor(n,r,a){super(a?r:n,a||r);Kt(this,"fields");a&&this.inferMembers(n)}isFocused(){return super.isFocused()||this.rollup("isFocused")}isValid(){return super.isValid()&&this.rollup("isValid")}hasErrors(){return super.hasErrors()||Object.keys(this.fields).some(n=>this.fields[n].hasErrors())}contentsAreValid(){return this.rollup("isValid")&&this.rollup("contentsAreValid")}isPristine(){return super.isPristine()&&this.rollup("isPristine")}markAsPristine(){super.markAsPristine();for(const n of Object.keys(this.fields))this.fields[n].markAsPristine();return this}markAsDirty(){super.markAsDirty();for(const n of Object.keys(this.fields))this.fields[n].markAsDirty();return this}markAsBlurred(){super.markAsBlurred();for(const n of Object.keys(this.fields))this.fields[n].markAsBlurred();return this}markAsSubmitted(){super.markAsSubmitted();for(const n of Object.keys(this.fields))this.fields[n].markAsSubmitted();return this}inferSpsControl(n,r){return Fs(n,[...this.path,r],this.update)}rollup(n){return Object.keys(this.fields).reduce((r,a)=>r&&(!this.fields[a][n]||this.fields[a][n]()),!0)}}class fp extends Hn{inferMembers(t){this.fields={};for(const n of Object.keys(t))this.fields[n]=this.inferSpsControl(t[n],n)}}class hp extends Hn{inferMembers(t){this.fields=t.map((n,r)=>this.inferSpsControl(n,String(r)))}}function Fs(e,t,n){return e instanceof Kn?(e.path=t,e.update=n,e):Array.isArray(e)?new hp(e,t,n):lp(e)?new fp(e,t,n):new jr(t,n)}function $r(e,t){return t.length===0||!e?e:$r(e.fields[t[0]],t.slice(1,t.length))}function xo(e,t){if(t.length===0||!e)return[e];const n=t[0];if(t=t.slice(1,t.length),n==="*"){const r=Array.isArray(e.fields)?e.fields:Object.keys(e.fields).map(a=>e.fields[a]);return t.length===0?r:r.reduce((a,o)=>[...a,...xo(o,t)],[])}return xo(e.fields[n],t)}function Sp(e,t,n){for(const r of Object.keys(t)){const a=t[r];for(const o of xo(e,r.split(".")))o&&a&&n(o,a)}}function xs(e,t,n,r=!1,a=!1){Sp(t,n,(o,l)=>{o.validators=typeof l=="function"?l(e):l,r&&o.validate(y.getPath(e,o.path),void 0,a)})}function ko(e,t){const n=t[0];return t=t.slice(1),Array.isArray(e)?e.map((r,a)=>a===Number(n)?ko(r,t):r):lp(e)?Object.keys(e).reduce((r,a)=>Object.assign(r,{[a]:a===n?ko(e[a],t):e[a]}),{}):e}function kv(e){if(typeof e!="object"||e===null||Array.isArray(e))throw new TypeError("The initial value of useSpsForm() hook must be an object.")}function gp(e,t={}){kv(e);const n=U.useMemo(()=>{y.deepFreeze(e);const m=Fs(e,[],p);return t&&xs(e,m,t,!1,!0),m},[]),r=U.useRef(),a=U.useRef(t),o=U.useCallback((m,u)=>{var g,v,C;let h;if(r.current=void 0,u)if(u.path)if(u.markAsBlurred){const T=$r(m.formMeta,u.path);if(T){T.focused=!1;const E=y.getPath(m.formValue,u.path);T.validate(E,zt.ON_BLUR)}}else if(u.newValidators){if(a.current){const T=u.path.join(".");a.current={...a.current,[T]:u.newValidators},xs(m.formValue,m.formMeta,a.current,!0)}}else if(u.markAsSubmitted){const T=$r(m.formMeta,u.path);if(T){T.submitted=!0;const E=y.getPath(m.formValue,u.path);T.validate(E,zt.ON_SUBMIT)}}else h=ko(m.formValue,u.path),y.setPath(h,u.path,u.value);else h=u.value;if((g=u.updateFormOptions)!=null&&g.validators&&(a.current={...a.current,...u.updateFormOptions.validators},xs(m.formValue,m.formMeta,a.current,(C=(v=u.updateFormOptions)==null?void 0:v.runValidators)!=null?C:!0)),h){m.formMeta.submitted=!1,y.deepFreeze(h);const T=y.diff(m.formValue,h);for(const{type:N,key:x,parentPath:k,objects:[,I]}of T){const A=$r(m.formMeta,k);if(typeof x!="symbol"&&A){let R;switch(N){case y.DiffChange.ADDITION:A.fields[x]=Fs(I[x],[...k,x],p);break;case y.DiffChange.DELETION:Array.isArray(A.fields)?A.fields[x]=void 0:delete A.fields[x];break;case y.DiffChange.ALTERATION:R=Fs(I[x],[...k,x],p),(R instanceof Hn&&!(A.fields[x]instanceof Hn)||!(R instanceof Hn)&&A.fields[x]instanceof Hn)&&(A.fields[x]=R);break}}}const E=new Set;if(T.filter(N=>N.type===y.DiffChange.DELETION).reduce((N,x)=>(N.has(x.parentPath)||N.add(x.parentPath),N),E),Array.from(E).forEach(N=>{const x=$r(m.formMeta,N);Array.isArray(x.fields)&&(x.fields=x.fields.filter(k=>k!==void 0))}),a.current){xs(h,m.formMeta,a.current);const N=new Set;t&&Sp(m.formMeta,t,(x,k)=>{typeof k=="function"&&(x.validate(y.getPath(h,x.path)),N.add(x))});for(const{type:x,key:k,parentPath:I,objects:[,A]}of T)if(typeof k!="symbol"){let R=m.formMeta,w=h;if(R){for(const _ of I)R=R.fields[_],w=w[_],N.has(R)||R.validate(w,zt.ON_CHANGE);if(x===y.DiffChange.ADDITION||x===y.DiffChange.ALTERATION){const _=R.fields[k];if(!N.has(_)&&(R.fields[k].validate(A[k],zt.ON_CHANGE),x===y.DiffChange.ADDITION&&_.fields))for(const[O,K]of Object.entries(_.fields))K.validate(A[k][O],zt.ON_CHANGE)}}}}}return{formValue:h||m.formValue,formMeta:m.formMeta,updateForm:m.updateForm}},[]),[l,c]=U.useReducer(o,{formValue:e,formMeta:n,updateForm:f});function p(m,u,h=!1,g,v=!1){m?c({path:m,value:u,markAsBlurred:h,newValidators:g,markAsSubmitted:v}):f()}function f(m,u){if(m||u){r.current&&window.clearTimeout(r.current);const h=window.setTimeout(c,0,{value:m,updateFormOptions:u});r.current=h}else if(!(r!=null&&r.current)){const h=window.setTimeout(c,0,{});r.current=h}}return U.useEffect(()=>()=>{r.current&&window.clearTimeout(r.current)},[]),l}const ot=s.forwardRef((e,t)=>{const{className:n,children:r,focusInputOnClick:a,formControl:o,formMeta:l,inputRef:c,onClick:p,...f}=e,m=s.useRef(),h=c||(t||m);function g(){h&&h!==t&&h.current&&h.current.focus()}function v(){h&&h!==t&&h.current&&l&&l instanceof jr&&l.markAsFocused()}function C(){h&&h!==t&&h.current&&l&&l instanceof jr&&l.markAsBlurred()}const T=H("sps-form-group",(o&&o.isRequired()||l&&l.isRequired())&&"sps-form-group--required",(o&&!o.isValid()||l&&l.isVisibilyInvalid())&&"sps-form-group--error",l&&l.hasPreventativeErrors()&&"sps-form-group--preventative-error",n);function E(N){a&&g(),p&&p(N)}return s.useEffect(()=>{function N(x){x.target.classList.contains("sps-form-control__clear-btn")&&x.preventDefault()}return document.addEventListener("mousedown",N),()=>{document.removeEventListener("mousedown",N)}},[]),s.createElement("div",{...f,className:T,ref:t,tabIndex:-1,onClick:E,onFocus:v,onBlur:C},r)});Object.assign(ot,{displayName:"SpsFormComponentWrapper"});function Sc(e){return typeof e=="object"&&e!=null&&e.nodeType===1}function gc(e,t){return(!t||e!=="hidden")&&e!=="visible"&&e!=="clip"}function za(e,t){if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){var n=getComputedStyle(e,null);return gc(n.overflowY,t)||gc(n.overflowX,t)||function(r){var a=function(o){if(!o.ownerDocument||!o.ownerDocument.defaultView)return null;try{return o.ownerDocument.defaultView.frameElement}catch{return null}}(r);return!!a&&(a.clientHeight<r.scrollHeight||a.clientWidth<r.scrollWidth)}(e)}return!1}function ks(e,t,n,r,a,o,l,c){return o<e&&l>t||o>e&&l<t?0:o<=e&&c<=n||l>=t&&c>=n?o-e-r:l>t&&c<n||o<e&&c>n?l-t+a:0}var bc=function(e,t){var n=window,r=t.scrollMode,a=t.block,o=t.inline,l=t.boundary,c=t.skipOverflowHiddenElements,p=typeof l=="function"?l:function(Re){return Re!==l};if(!Sc(e))throw new TypeError("Invalid target");for(var f,m,u=document.scrollingElement||document.documentElement,h=[],g=e;Sc(g)&&p(g);){if((g=(m=(f=g).parentElement)==null?f.getRootNode().host||null:m)===u){h.push(g);break}g!=null&&g===document.body&&za(g)&&!za(document.documentElement)||g!=null&&za(g,c)&&h.push(g)}for(var v=n.visualViewport?n.visualViewport.width:innerWidth,C=n.visualViewport?n.visualViewport.height:innerHeight,T=window.scrollX||pageXOffset,E=window.scrollY||pageYOffset,N=e.getBoundingClientRect(),x=N.height,k=N.width,I=N.top,A=N.right,R=N.bottom,w=N.left,_=a==="start"||a==="nearest"?I:a==="end"?R:I+x/2,O=o==="center"?w+k/2:o==="end"?A:w,K=[],z=0;z<h.length;z++){var M=h[z],Y=M.getBoundingClientRect(),W=Y.height,j=Y.width,B=Y.top,re=Y.right,de=Y.bottom,L=Y.left;if(r==="if-needed"&&I>=0&&w>=0&&R<=C&&A<=v&&I>=B&&R<=de&&w>=L&&A<=re)return K;var G=getComputedStyle(M),se=parseInt(G.borderLeftWidth,10),ae=parseInt(G.borderTopWidth,10),ee=parseInt(G.borderRightWidth,10),F=parseInt(G.borderBottomWidth,10),J=0,Z=0,ie="offsetWidth"in M?M.offsetWidth-M.clientWidth-se-ee:0,te="offsetHeight"in M?M.offsetHeight-M.clientHeight-ae-F:0,fe="offsetWidth"in M?M.offsetWidth===0?0:j/M.offsetWidth:0,le="offsetHeight"in M?M.offsetHeight===0?0:W/M.offsetHeight:0;if(u===M)J=a==="start"?_:a==="end"?_-C:a==="nearest"?ks(E,E+C,C,ae,F,E+_,E+_+x,x):_-C/2,Z=o==="start"?O:o==="center"?O-v/2:o==="end"?O-v:ks(T,T+v,v,se,ee,T+O,T+O+k,k),J=Math.max(0,J+E),Z=Math.max(0,Z+T);else{J=a==="start"?_-B-ae:a==="end"?_-de+F+te:a==="nearest"?ks(B,de,W,ae,F+te,_,_+x,x):_-(B+W/2)+te/2,Z=o==="start"?O-L-se:o==="center"?O-(L+j/2)+ie/2:o==="end"?O-re+ee+ie:ks(L,re,j,se,ee+ie,O,O+k,k);var ne=M.scrollLeft,Ce=M.scrollTop;_+=Ce-(J=Math.max(0,Math.min(Ce+J/le,M.scrollHeight-W/le+te))),O+=ne-(Z=Math.max(0,Math.min(ne+Z/fe,M.scrollWidth-j/fe+ie)))}K.push({el:M,top:J,left:Z})}return K};function bp(e){return e===Object(e)&&Object.keys(e).length!==0}function Iv(e,t){t===void 0&&(t="auto");var n="scrollBehavior"in document.body.style;e.forEach(function(r){var a=r.el,o=r.top,l=r.left;a.scroll&&n?a.scroll({top:o,left:l,behavior:t}):(a.scrollTop=o,a.scrollLeft=l)})}function Mv(e){return e===!1?{block:"end",inline:"nearest"}:bp(e)?e:{block:"start",inline:"nearest"}}function vp(e,t){var n=e.isConnected||e.ownerDocument.documentElement.contains(e);if(bp(t)&&typeof t.behavior=="function")return t.behavior(n?bc(e,t):[]);if(!!n){var r=Mv(t);return Iv(bc(e,r),r.behavior)}}const _v=Object.freeze(Object.defineProperty({__proto__:null,default:vp},Symbol.toStringTag,{value:"Module"})),He=s.createContext($.noI18nI18n),Rv={alt:"string",size:"SpinnerSize",title:"string"};function qo(e){const{alt:t,className:n,size:r=$.SpinnerSize.MEDIUM,"data-testid":a,title:o,unsafelyReplaceClassName:l,...c}=e,{t:p}=s.useContext(He),f=t||o||p("design-system:spinner.defaultAltText"),m=H(l||"sps-spinner",`sps-spinner--${r}`,n);return s.createElement("i",{className:m,"data-testid":a,title:f,...c})}Object.assign(qo,{props:Rv,displayName:"SpsSpinner"});const Ov=60;function Is(e){return typeof e>"u"?"inherit":`${e}px`}function Jo(e){switch(e){case $.Position.TOP_LEFT:return $.Position.BOTTOM_LEFT;case $.Position.TOP_MIDDLE:return $.Position.BOTTOM_MIDDLE;case $.Position.TOP_RIGHT:return $.Position.BOTTOM_RIGHT;case $.Position.RIGHT_TOP:return $.Position.LEFT_TOP;case $.Position.RIGHT_MIDDLE:return $.Position.LEFT_MIDDLE;case $.Position.RIGHT_BOTTOM:return $.Position.LEFT_BOTTOM;case $.Position.BOTTOM_RIGHT:return $.Position.TOP_RIGHT;case $.Position.BOTTOM_MIDDLE:return $.Position.TOP_MIDDLE;case $.Position.BOTTOM_LEFT:return $.Position.TOP_LEFT;case $.Position.LEFT_BOTTOM:return $.Position.RIGHT_BOTTOM;case $.Position.LEFT_MIDDLE:return $.Position.RIGHT_MIDDLE;case $.Position.LEFT_TOP:return $.Position.RIGHT_TOP}}function Lv(e,t,n,r,a,o,l,c){const p=l&&l.current,f=p?p.scrollTop:window.pageYOffset,m=c?0:f,u=p?p.scrollLeft:window.pageXOffset,h=c?0:u,[g,v]=e.split(" ");let C,T,E,N;switch(g){case"top":E=t.height-n.top-m-o[0];break;case"left":T=t.width-n.left-h-o[0];break;case"right":N=n.right+h-o[0];break;case"bottom":C=n.bottom+m-o[0];break;default:throw new Error(`Invalid position ${e}`)}switch(v){case"left":N=n.left+h+o[1];break;case"top":C=n.top+m+o[1];break;case"middle":g==="top"||g==="bottom"?N=n.left+h+n.width/2-a/2+o[1]:(g==="left"||g==="right")&&(C=n.top+m+n.height/2-r.height/2+o[1]);break;case"bottom":E=t.height-n.bottom-m+o[1];break;case"right":T=t.width-n.right-h+o[1];break;default:throw new Error(`Invalid position ${e}`)}return[C,T,E,N]}function Yn(e,t,n,{altPosition:r,setMinWidth:a=!1,setWidth:o=!1,parentElementRef:l,fixed:c=!1,offsets:p=[0,0]}){if(e.current&&t.current){const f=Math.max(document.documentElement.clientHeight,window.innerHeight||0),m=document.documentElement.getBoundingClientRect().width,u=l&&l.current?l.current:document.documentElement,h=c?{width:m,height:f,top:0,left:0,bottom:f,right:m}:u.getBoundingClientRect(),g=e.current.getBoundingClientRect(),v=t.current.getBoundingClientRect(),[C]=n.split(" ");let T=n;r&&(C==="top"&&v.top-g.height<Ov||C==="right"&&v.right+g.width>m||C==="bottom"&&v.bottom+g.height>f||C==="left"&&v.left-g.width<0)&&(T=r);const E=a?Math.max(v.width,g.width):g.width,N=o?v.width:E,[x,k,I,A]=Lv(T,h,v,g,N,p,l,c),R={top:Is(x),right:Is(k),bottom:Is(I),left:Is(A)};return c&&(R.position="fixed",R.zIndex=$.ZStratum.BAR),a&&(R.minWidth=`${v.width}px`),o&&(R.width=`${v.width}px`),[R,T===r]}return[{},!1]}const Pt=U.createContext(null);function wr(e,t=[]){const n=U.useContext(Pt);return U.useMemo(()=>r=>{const o=n&&n.parentElementRef&&n.parentElementRef.current||document.body;let l=null,c=o.lastElementChild;for(;c&&c!==o.firstElementChild;){if(c.hasAttribute("data-portalid")&&c.getAttribute("data-portalid")===e){l=c;break}c=c.previousElementSibling}if(l)o.contains(l)||o.appendChild(l);else{l=document.createElement("div"),l.setAttribute("data-portalid",e);for(const p of t)l.classList.add(p);o.appendChild(l)}return ea.createPortal(r,l)},[n])}async function vc(e,t,n,r,a,o){const l=typeof e.options=="function"?e.options(t.value):e.options||[],c=l instanceof Promise,p=u=>u.replace(/([.?*+^$[\]\\(){}|-])/g,"");n({pending:c}),o.current=c?l:null;const f=c?await l||[]:l||[];if(c&&o.current!==l)return;let m=Array.from(f).filter(Boolean).map(u=>new $.SpsOptionListOption(u,typeof u=="function"?{textKey:"label",captionKey:"caption"}:{textKey:e.textKey,captionKey:e.captionKey}));if(e.nullOption&&m.unshift(new $.SpsOptionListOption(null,{text:e.nullOption})),t.value&&!e.disableDefaultOptionsFiltering){const u=p(t.value);n({replacementPattern:new RegExp(`(${u})`,"ig")}),m=m.filter(h=>{const g=new RegExp(u,"i"),v=p(h.text);return e.filterByTextAndCaptionKey?g.test(v)||g.test(p(h.caption)):g.test(v)})}else n({replacementPattern:null});if(e.disabledOptions)for(const u of m)e.disabledOptions.includes(u.value)&&(u.disabled=!0);r(Object.freeze(m)),e.onOptionListChanged&&e.onOptionListChanged(m.length),a(m.some(u=>u.value&&!!u.value.icon)),n({pending:!1})}function Pv(e,t,n){const[r,a]=s.useState(Object.freeze([])),[o,l]=s.useState(!1),c=s.useRef(null),p=s.useRef(e.options);(typeof e.options!="function"||e.disableOptionsMemoization)&&(p.current=e.options);const f=s.useMemo(()=>typeof p.current=="function"?y.debounce(vc,typeof e.searchDebounce<"u"?e.searchDebounce:500):vc,[p.current,e.disabledOptions]);return s.useEffect(()=>{f(e,t,n,a,l,c)},[p.current,t.value,e.disabledOptions]),[r,o]}class Nn{constructor(t,n){Kt(this,"nativeEvent");Kt(this,"currentTarget");Kt(this,"isPgStoppedInternal",!1);this.target=t,this.currentTarget=t,this.nativeEvent=new CustomEvent("change",n),Object.defineProperty(this.nativeEvent,"target",{value:t,writable:!1,configurable:!1,enumerable:!0})}get bubbles(){return this.nativeEvent.bubbles}get cancelable(){return this.nativeEvent.cancelable}get defaultPrevented(){return this.nativeEvent.defaultPrevented}get eventPhase(){return this.nativeEvent.eventPhase}get isTrusted(){return this.nativeEvent.isTrusted}get timeStamp(){return this.nativeEvent.timeStamp}get type(){return this.nativeEvent.type}preventDefault(){this.nativeEvent.preventDefault()}isDefaultPrevented(){return this.defaultPrevented}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPgStoppedInternal=!0}isPropagationStopped(){return this.isPgStoppedInternal}persist(){throw new Error("This is not a real React ChangeEvent. React does not permit the creation of SyntheticEvents in userland.")}}function Bv(e,t){return{...e,...t}}function Zt(e){return U.useReducer(Bv,e)}function Av({hideInlineSearch:e,options:t,onSearchChange:n,search:r="",searchPlaceholder:a="Search\u2026",searchInputRef:o}){const[l,c]=Zt({isAsync:typeof t=="function",pending:!1,value:r,replacementPattern:null}),p=s.useCallback(g=>{c({value:g.target.value}),n&&n(g)},[n]),f=s.useCallback(g=>{g.nativeEvent.stopImmediatePropagation(),g.stopPropagation()},[]),m=s.useCallback(g=>{g.nativeEvent.stopImmediatePropagation(),c({value:""}),o!=null&&o.current&&(n&&n(new Nn(o.current)),o.current.focus())},[n]),u=g=>{!g||["Tab","Escape","Enter","Up","ArrowUp","Down","ArrowDown"].includes(g.key)||g.stopPropagation()};return s.useEffect(()=>{c({value:r})},[r]),[l.isAsync&&!e?s.createElement("div",{className:"sps-option-list__search sps-form-group sps-text-input"},s.createElement("div",{className:"sps-form-control"},!l.value&&s.createElement("i",{className:"sps-icon sps-icon-filter sps-text-input__icon"}),s.createElement("input",{type:"text",className:"sps-text-input__input",placeholder:a,ref:o,value:l.value,onChange:p,onClick:f,onKeyDown:u}),l.value&&s.createElement("i",{className:"sps-icon sps-icon-x-circle sps-form-control__clear-btn",onClick:m}))):s.createElement(s.Fragment,null),l,c]}const Fv=vp||_v,Vv=["Tab","Escape","Enter","Up","ArrowUp","Down","ArrowDown"],$v=["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"];function Kv(e,t,n){return n?(e&&e[n])===(t&&t[n]):e===t}function yc(e,t,n){return typeof n.value=="function"&&n.disabled?!0:t?!!(e!=null&&e.find(r=>{var a;return r[t]&&r[t]===((a=n==null?void 0:n.value)==null?void 0:a[t])})):!1}const rs=s.forwardRef((e,t)=>{const{captionKey:n,comparisonKey:r,disabledOptions:a,options:o,tall:l,textKey:c,valueKey:p,zeroState:f,hideInlineSearch:m,onSearchChange:u,search:h,searchDebounce:g,searchPlaceholder:v,onSpecialActionSelect:C,attachTo:T,className:E,conformWidth:N,id:x,ignoreWidthStyles:k,isOpen:I,keepOpen:A,keyDown:R,nullOption:w,onOptionListChanged:_,onOptionSelected:O,onPositionFlip:K,onSelfToggle:z,optionRole:M,positionOverride:Y,selectedOption:W,specialAction:j,unsafelyReplaceClassName:B,loading:re,filterByTextAndCaptionKey:de,maxHeightPx:L,maxHeightRem:G,disableOptionsMemoization:se,disableDefaultOptionsFiltering:ae,"data-testid":ee,...F}=e,J=s.useMemo(()=>j?new $.SpsOptionListOption(j,{textKey:"label",captionKey:"caption"}):null,[j]),[Z,ie]=s.useState(-1),[te,fe]=s.useState(I),le=t||s.useRef(null),ne=s.useRef(null),Ce=s.useRef(null),Re=wr("sps-option-list-portal"),it=s.useContext(Pt),[mt,lt]=Y||[$.Position.BOTTOM_LEFT,$.Position.TOP_LEFT],[[ye,Be],Ze]=s.useState([{},!1]),he=s.useRef(null),[We,Ae,Tt]=Av({...e,searchInputRef:he}),[Ye,Qe]=Pv(e,Ae,Tt);s.useEffect(()=>{Ze(te?Yn(le,T,mt,{altPosition:lt,setMinWidth:!k,setWidth:!k&&N,...it}):[{},!1])},[te,mt,lt,Ye]),s.useEffect(()=>{const be=()=>{te&&Ze(Yn(le,T,mt,{altPosition:lt,setMinWidth:!k,setWidth:!k&&N,...it}))};return document.addEventListener("scroll",be),()=>{document.removeEventListener("scroll",be)}},[te]),s.useEffect(()=>{ie(-1)},[Ae]);const ce=H(B||"sps-option-list","z-stratum-dropdown",te&&"sps-option-list--open",Ae.isAsync&&"sps-option-list--searchable",Be&&"sps-option-list--opens-upward",j&&j.label&&"sps-option-list--has-special-action",E),xe=H(B||"sps-option-list__options",l&&"sps-option-list__options--tall"),we=s.useCallback(()=>{te||(fe(!0),he.current&&he.current.focus(),ie(-1),z&&z(!0))},[te,z]),Ee=s.useCallback(()=>{te&&(fe(!1),ie(-1),z&&z(!1))},[te,z]),ke=s.useCallback((be,ve)=>{ve||be&&!be.disabled&&(typeof be.value=="function"?(be.value(),C&&C()):typeof O=="function"&&O(be.value),A||Ee())},[O,Ee]),ft=s.useCallback((be,ve,Je)=>{be.stopPropagation(),ke(ve,Je)},[ke]),ct=s.useRef(a||[]);ct.current=a||[];const Ke=s.useCallback(be=>{switch(be.key){case"Tab":case"Escape":Ee();break;case"Enter":if(Z>-1){const ve=Ye[Z]||J;be.preventDefault();const Je=!!ve&&yc(ct.current,r||"",ve);!Je&&ve&&typeof O=="function"&&typeof ve.value=="function"?ve.value():ve&&ke(ve,Je)}break;case"Up":case"ArrowUp":{let ve=Z;Be?Z<=-1?ve=Ye.length-1:Z===0?j&&(ve=Ye.length):Z<Ye.length&&(ve=Z-1):Z>-1&&(ve=Z-1),ve!==Z&&(be.preventDefault(),ie(ve));break}case"Down":case"ArrowDown":{we();let ve=Z;Be?Z!==-1&&(Z>=Ye.length?ve=0:Z===Ye.length-1?ve=-1:ve=Z+1):Z<Ye.length-1+Number(!!j)&&(ve=Z+1),ve!==Z&&(be.preventDefault(),ie(ve));break}default:we()}},[Ee,we,Z,ke,O,Be,Ye]),dt=s.useCallback(be=>{const ve=Ye.findIndex(Je=>{if(Je.textKey){const Ft=Je.textKey;return Je.value[Ft].toLowerCase().charAt([0])===be.key.toLocaleLowerCase()}return Je.value.toString().toLowerCase().charAt([0])===be.key.toLocaleLowerCase()});ve>-1&&ie(ve)},[Ye]),kt=s.useCallback(be=>{!be||(Vv.includes(be.key)?Ke(be):$v.includes(be.key)&&!m&&dt(be))},[Ee,we,Z,ke,O,Be,Ye]);s.useEffect(()=>{if(it!==null&&document.getElementsByClassName("sps-modal__body").length>0){const be=()=>{z&&z(!1)},ve=document.getElementsByClassName("sps-modal__body")[0];return ve.addEventListener("scroll",be),()=>{ve.removeEventListener("scroll",be)}}},[]),s.useEffect(()=>{Ce.current&&Fv(Ce.current,{scrollMode:"if-needed",block:"nearest",inline:"nearest"})},[Z]),s.useEffect(()=>{fe(I),I?he.current&&he.current.focus():ie(-1)},[I]),s.useEffect(()=>{R&&kt(R)},[R]),s.useEffect(()=>{!te&&ne.current&&(Tt({value:""}),ne.current.scrollTop=0),te&&K&&K(Be)},[te]);const At=L?L/16:G,ka=At?{maxHeight:`${At}rem`}:{};function _n(be,ve){return ve?s.createElement(s.Fragment,null,be.split(ve).map((Je,Ft)=>ve.test(Je)?s.createElement("u",{key:Ft},Je):s.createElement(s.Fragment,{key:Ft},Je))):s.createElement(s.Fragment,null,be)}return Re(s.createElement("div",{className:ce,id:x,"aria-activedescendant":Z>-1?`${x}-option-${Z}`:"",tabIndex:-1,ref:le,style:ye,onMouseLeave:()=>ie(-1),"data-testid":ee,...F},We,s.createElement("div",{className:xe,ref:ne,"data-testid":`${ee}-options`,style:ka},!re&&!Ae.pending&&f&&Ye.length===0&&s.createElement("div",{className:"sps-option-list__zero-state"},f),(re||Ae.pending)&&s.createElement("div",{className:"sps-option-list__loading"},s.createElement(qo,null)),!re&&!Ae.pending&&Ye.map((be,ve)=>{const Je=`${x}-option-${ve}`,Ft=Kv(be.value,W,r),Rn=yc(ct.current,r||"",be);return s.createElement("a",{key:Je,id:Je,role:M,"aria-selected":Ft,href:be.href,className:H("sps-option-list__option",be.caption&&"sps-option-list__option--has-caption",be.disabled&&"sps-option-list__option--disabled",be.bold&&"sps-option-list__option--bold",(Ft||Rn)&&"sps-option-list__option--selected",Z===ve&&"sps-option-list__option--highlighted"),onClick:ue=>ft(ue,be,Rn),onMouseOver:()=>ie(ve),tabIndex:-1,ref:Z===ve?Ce:null,"data-testid":`${ee}-option-${ve}`},be.value&&be.value.icon&&s.createElement("i",{className:H("sps-icon","sps-option-list__option-icon",`sps-icon-${String(be.value.icon)}`)}),(!be.value||!be.value.icon&&Qe)&&s.createElement("span",{className:"sps-option-list__option-icon-spacer"}),s.createElement("span",null,_n(be.text,Ae.replacementPattern)),be.caption&&s.createElement("div",{className:"sps-option-list__option-caption"},s.createElement("span",null,_n(be.caption,Ae.replacementPattern))))})),J&&(j==null?void 0:j.label)&&s.createElement("a",{className:H("sps-option-list__option","sps-option-list__special-action",Z===Ye.length&&"sps-option-list__option--highlighted",j.disabled&&"sps-option-list__special-action--disabled"),href:J.href,target:J.href&&j.newTab?"_blank":"_self",onClick:be=>ft(be,J),onMouseOver:()=>ie(Ye.length),"data-testid":`${ee}-special-action`},j.icon&&s.createElement("i",{className:H("sps-icon","sps-option-list__option-icon",`sps-icon-${String(j.icon)}`)}),!j.icon&&Qe&&s.createElement("span",{className:"sps-option-list__option-icon-spacer"}),s.createElement("span",null,j.label))))});Object.assign(rs,{displayName:"SpsOptionList"});function Hv(e,t,n=[]){return s.useMemo(()=>{function r(a){return s.createElement(e,{...a,...t},a.children)}return r},n)}function Ct(e){return typeof e=="function"?e():e}const yp=function({children:e,elements:t}){if(t.length===0)return s.createElement(s.Fragment,null,e);const[n,r]=Array.isArray(t[0])?t[0]:[t[0]];return s.createElement(n,{...r!=null?r:{}},s.createElement(yp,{elements:t.slice(1)},e))},Tp=function({children:e,providers:t=[],...n}){return s.createElement("div",{...n},s.createElement(yp,{elements:t},e))},Wv=function({children:e,className:t,...n}){return s.createElement(Tp,{className:`sps-app ${t}`,...n},e)};function Bt(e=[],t=[]){const n=Array.isArray(e)?y.flatten(e):[e],r=t.map(o=>Array.isArray(o)?o:[o]),a=new Array(r.length+1).fill(null).map(()=>[]);for(const o of n){let l=!1;for(let c=0;c<r.length;c+=1)for(const{type:p,props:f={}}of r[c])if(o.type===p&&Object.keys(f).every(u=>f[u]===o.props[u])){l=!0,a[c].push(o);break}l||a[a.length-1].push(o)}return a}function Ep(e,t,n){const r=Object.entries(t).filter(([,o])=>typeof o!="string"&&o.deprecated).map(([o])=>o),a=r.map(o=>n[o]);s.useEffect(()=>{a.find(o=>typeof o<"u")&&console.warn(`The following prop(s) of ${e} are deprecated: ${r.join(", ")}`)},a)}function Zo(e,t){const n=U.useRef(!1);U.useEffect(()=>{if(n.current)return e();n.current=!0},t)}function Io(e,t,n){const r=s.useRef(t(...n));s.useEffect(()=>(document.addEventListener(e,r.current),()=>document.removeEventListener(e,r.current)),[]),s.useEffect(()=>{document.removeEventListener(e,r.current),r.current=t(...n),document.addEventListener(e,r.current)},n)}function Tc(e,t,n){return function(a){var o,l;!((o=e.current)!=null&&o.contains(a.target))&&!((l=t.current)!=null&&l.contains(a.target))&&n()}}function Cr(e,t,n){const r=s.useRef(!1),[a,o]=s.useState(!1),l=s.useCallback(()=>{r.current?r.current=!1:o(!0)},[]),c=s.useCallback((p=!1)=>{o(!1),r.current=p,n&&n()},[]);return Io("mousedown",Tc,[e,t,c]),Io("pointerdown",Tc,[e,t,c]),{showPopup:a,doShowPopup:l,doHidePopup:c}}const Gv={debounce:"number",disabled:"boolean",formMeta:"SpsFormFieldMeta<string>",icon:"SpsIcon",onChange:"React.ChangeEventHandler",onSelectionChange:"(newValue: string) => void",placeholder:"string",suggestions:{type:`
|
|
1
|
+
"use strict";var qb=Object.defineProperty;var Jb=(e,t,n)=>t in e?qb(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var $t=(e,t,n)=>(Jb(e,typeof t!="symbol"?t+"":t,n),n),gc=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var Ln=(e,t,n)=>(gc(e,t,"read from private field"),n?n.call(e):t.get(e)),Ds=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},ln=(e,t,n,r)=>(gc(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("react"),y=require("@spscommerce/utils"),ot=require("moment-timezone"),K=require("@spscommerce/ds-shared"),Qs=require("react-dom"),Ea=require("@spscommerce/ds-colors"),Zb=require("@sps-woodland/tabs"),dr=require("@react-stately/collections"),rp=require("@sps-woodland/illustrations");function sp(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const s=sp(_),hr=sp(ot);function op(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=op(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function H(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=op(e))&&(r&&(r+=" "),r+=t);return r}let gt=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((t,n)=>(n&=63,n<36?t+=n.toString(36):n<62?t+=(n-26).toString(36).toUpperCase():n>62?t+="-":t+="_",t),"");function En(e){return _.useRef(e||gt())}function vt(e,t){const n=En(e),r=_.useRef(`${n.current}_ctrl`);return _.useEffect(()=>{t&&(t.id=r.current,t.update())},[t]),{wrapperId:n.current||void 0,controlId:r.current}}var qt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function za(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Xb="[object Object]";function Qb(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}function ev(e,t){return function(n){return e(t(n))}}var tv=Function.prototype,ap=Object.prototype,ip=tv.toString,nv=ap.hasOwnProperty,rv=ip.call(Object),sv=ap.toString,ov=ev(Object.getPrototypeOf,Object);function av(e){return!!e&&typeof e=="object"}function iv(e){if(!av(e)||sv.call(e)!=Xb||Qb(e))return!1;var t=ov(e);if(t===null)return!0;var n=nv.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&ip.call(n)==rv}var lv=iv;const lp=za(lv),Nt=new Set,Tr=new Set,pn=new Set,eo=new Set;function cp(e){Nt.has(e)||pn.has(e)||eo.has(e)||Tr.add(e)}function dp(e){Nt.has(e)||pn.has(e)||Tr.has(e)||eo.add(e)}const et=hr.default||hr,Sr="MM/DD/YYYY",cv="MM/DD/YYYY hh:mm A",dv="MM/DD/YYYY HH:mm",pv="hh:mm A",uv="HH:mm",mv=/^(\d{1,2})\/(\d{1,2})\/(\d{4})$/,Gr=Symbol("Date Parse Error");function ar(e){return et.isMoment(e)?e.year()*1e4+(e.month()+1)*100+e.date():e.year*1e4+e.month*100+e.date}const X=Object.freeze({createFrom(e,t){if(!e)return null;if(typeof e=="string"){if(t){const n=et(e,t,!0);if(n.isValid())return Object.freeze({year:n.year(),month:n.month()+1,date:n.date()})}else{const n=mv.exec(e);if(n){const[,r,o,a]=n;return Object.freeze({year:Number(a),month:Number(r),date:Number(o)})}}return Object.freeze({[Gr]:!0,year:void 0,month:void 0,date:void 0})}return Object.freeze({year:e.year(),month:e.month()+1,date:e.date()})},createMomentFrom(e,t){if(!e)return null;let n=null;return typeof e=="string"?t?n=et(e,t,!0):n=et(e):et.isMoment(e)?n=e:n=X.toMoment(e),n!==null&&et.isMoment(n)&&n.isValid()?n:Object.freeze({[Gr]:!0,year:void 0,month:void 0,date:void 0})},getRangeSeparator(e){return e!=null&&e.includes("-")?"/":"-"},createRangeFrom(e,t){if(!e)return null;if(t){const n=X.getRangeSeparator(t),r=new RegExp(`[^\\d]*${n}[^\\d]*`);return e.split(r).slice(0,2).map(o=>X.createFrom(o,t))}else return e.split(/[^\d]*-[^\d]*/).slice(0,2).map(n=>X.createFrom(n))},isValid(e){var t;return e?et.isMoment(e)?e.isValid():typeof e=="object"&&typeof e.year=="number"&&typeof e.month=="number"&&typeof e.date=="number"&&((t=X.toMoment(e))==null?void 0:t.isValid()):!1},nullifyInvalidDate(e){return X.isValid(e)?e:null},toMoment(e){return e?et.isMoment(e)?e:et({...e,month:e.month-1}):null},toString(e,t){const n=X.toMoment(e);return n&&n.isValid()?n.format(t||Sr):""},toStringRange(e,t){if(!e)return"";const n=X.getRangeSeparator(t);return e.slice(0,2).map(r=>X.toString(r,t)).join(n)},toDateTimeString(e,t=!1,n){return e&&et.isMoment(e)&&e.isValid()?n?t?e.format(`${n} ${uv}`):e.format(`${n} ${pv}`):t?e.format(dv):e.format(cv):""},toDateTimeStringRange(e,t=!1,n){if(!e)return"";const r=X.getRangeSeparator(n);return e.map(o=>X.toDateTimeString(o,t,n)).join(r)},create(){const e=new Date;return Object.freeze({year:e.getFullYear(),month:e.getMonth()+1,date:e.getDate()})},isSameDate(e,t){return e&&t&&e.year===t.year&&e.month===t.month&&e.date===t.date},isSameMonth(e,t){return e&&t&&e.year===t.year&&e.month===t.month},isAfter(e,t){return!e||!t?null:ar(e)>ar(t)},isBefore(e,t){return!e||!t?null:ar(e)<ar(t)},isInRange(e,t,n=!0){if(!e||!t||!t[0]||!t[1])return null;const r=ar(e),[o,a]=t.map(ar);return e&&o&&a&&(n&&r>=o&&r<=a||!n&&r>o&&r<a)},prevMonth(e){return Object.freeze({year:e.month===1?e.year-1:e.year,month:e.month-1||12,date:e.date})},nextMonth(e){return Object.freeze({year:e.month===12?e.year+1:e.year,month:e.month+1>12?1:e.month+1,date:e.date})},createRangeFromPreset(e,t){if(typeof e.definition=="function")return e.definition();const n=et(),r=n.clone().subtract(et.duration(e.definition));return[X.createFrom(r,t),X.createFrom(n,t)]},createDateTimeRangeFromPreset(e){if(typeof e.definition=="function")return e.definition();let t;e.definition==="P0D"?t=et().startOf("day"):t=et().subtract(et.duration(e.definition));const n=et().endOf("day");return[t,n]},splitMomentInDateTimeParts(e,t=!1,n){return e&&et.isMoment(e)&&e.isValid()?X.toDateTimeString(e,t,n).split(" "):["",t?"00:00":"12:00",t?void 0:"AM"]},getCurrentMoment(){return et()},validateTimeString(e,t=!1){if(!e)return!0;const n=e.split(":"),r=n[0]||"0",o=n[1]||"0",a=Number.isNaN(Number(r))?NaN:parseInt(r,10),l=Number.isNaN(Number(o))?NaN:parseInt(o,10),c=n.length<=2&&r.length<=2&&o.length<=2;return t?c&&a>=0&&a<=23&&l>=0&&l<=59:c&&(!Number.isNaN(a)&&r.length===1||a>=1)&&a<=12&&l>=0&&l<=59},padIncompleteTimeString(e,t=!1){if(!e)return"";const n=e.split(":"),r=parseInt(n[0]||"0",10),o=parseInt(n[1]||"0",10);if(t){const a=r<10?`0${r}`:`${r}`,l=o<10?`0${o}`:`${o}`;return`${a}:${l}`}else{const a=r===0?"12":r<10?`0${r}`:`${r}`,l=o<10?`0${o}`:`${o}`;return`${a}:${l}`}}}),wa=["01:00","02:00","03:00","04:00","05:00","06:00","07:00","08:00","09:00","10:00","11:00","12:00"],Ca=["00:00","01:00","02:00","03:00","04:00","05:00","06:00","07:00","08:00","09:00","10:00","11:00","12:00","13:00","14:00","15:00","16:00","17:00","18:00","19:00","20:00","21:00","22:00","23:00"];let Ks=Sr;function pp(e){Ks=e}const Yr=function(t){if(Array.isArray(t)){const n=Yr(t[0]),r=Yr(t[1]);return n||r}if(t&&t.hasOwnProperty("year")){if(t[Gr])return{dateFormat:Ks};if(!X.isValid(t))return{dateValidity:!0}}return null};Nt.add("dateFormat");Nt.add("dateValidity");const up=function(t){if(Array.isArray(t)){const n=Yr(t);if(n)return n;if(t&&X.isBefore(t[1],t[0]))return{dateRangeOrder:!0}}return null};Nt.add("dateRangeOrder");const mp=function({minDate:t,maxDate:n}){function r(o){const a=X.isBefore(o,t),l=X.isAfter(o,n),c={minExceeded:a?X.toString(t,Ks):null,maxExceeded:l?X.toString(n,Ks):null};return a||l?{dateConstraint:c}:null}return function(a){if(!a)return null;if(Array.isArray(a)){const l=r(a[0]),c=r(a[1]);return l||c}return a.hasOwnProperty("year")?r(a):null}};Nt.add("dateConstraint");const fv=Object.freeze(Object.defineProperty({__proto__:null,date:Yr,dateConstraint:mp,dateRange:up,setDateFormat:pp},Symbol.toStringTag,{value:"Module"}));function wn(e,t){for(const n of[].concat(e)){const r=t(n);if(r)return r}return null}const hv=function(t){function n(r){return Number(r)>=t?null:{min:t}}return r=>wn(r,n)};Nt.add("min");const Sv=function(t){function n(r){return Number(r)<=t?null:{max:t}}return r=>wn(r,n)};Tr.add("max");const gv=function(t){return typeof t>"u"||t===null||t===""||Number.isNaN(t)||(t==null?void 0:t.length)===0?{required:!0}:null};Tr.add("required");const bv=function(t){function n(r){return r===void 0||r.toString().length<t?{minLength:t}:null}return r=>wn(r,n)};Nt.add("minLength");const vv=function(t){function n(r){return r==null||Array.isArray(r)&&r.length<t?{minLengthArray:t}:null}return r=>n(r)};Nt.add("minLengthArray");const yv=function(t){function n(r){return r===void 0||r.toString().length<=t?null:{maxLength:t}}return r=>wn(r,n)};pn.add("maxLength");const Tv=function(t){function n(r){return r==null||Array.isArray(r)&&r.length<=t?null:{maxLengthArray:t}}return r=>n(r)};Nt.add("maxLengthArray");const Ev=function(t){const n=t instanceof RegExp?t:new RegExp(t);function r(o){return n.test(o)?null:{pattern:t}}return o=>wn(o,r)};Nt.add("pattern");const wv=function(e){function t(n){return new RegExp("^\\p{L}*$","u").test(n)?null:{alpha:!0}}return wn(e,t)};pn.add("alpha");const Cv=function(e){function t(n){return/^[0-9,. ]*$/.test(n)?null:{numeric:!0}}return wn(e,t)};pn.add("numeric");const Dv=function(e){function t(n){return/^[^0-9]*$/.test(n)?null:{nonNumeric:!0}}return wn(e,t)};pn.add("nonNumeric");const to=Object.freeze({...fv,min:hv,max:Sv,required:gv,minLength:bv,minLengthArray:vv,maxLength:yv,maxLengthArray:Tv,pattern:Ev,alpha:wv,numeric:Cv,nonNumeric:Dv,OnBlurErrorKeys:Nt});function no(e,t=[]){const n=t.reduce((r,o)=>Object.assign(r,o(e)||{}),{});return Object.keys(n).length?n:null}var jt=(e=>(e[e.ON_CHANGE=0]="ON_CHANGE",e[e.ON_BLUR=1]="ON_BLUR",e[e.ON_SUBMIT=2]="ON_SUBMIT",e))(jt||{});function Nv(e,t={},n=[]){for(const[r,o]of Object.entries(t))o===0?cp(r):o===2&&dp(r);return s.useCallback(e,n)}var Hn,Sn,gn;class Vn{constructor(t,n){$t(this,"validators",[]);Ds(this,Hn,null);Ds(this,Sn,null);Ds(this,gn,null);$t(this,"preventativeErrors",[]);$t(this,"submitted",!1);this.path=t,this.update=n}get errors(){return Ln(this,Hn)===null&&Ln(this,Sn)===null&&Ln(this,gn)===null?null:{...Ln(this,Hn)??{},...Ln(this,Sn)??{},...Ln(this,gn)??{}}}setValidators(t){return this.update(this.path,null,void 0,t),this}validate(t,n,r=!1){if(this.validators&&this.validators.length>0){const o=no(t,this.validators);let a={onSubmit:{},onChange:{},onBlur:{}};o&&(a=Object.keys(o).reduce((l,c)=>(eo.has(c)?l.onSubmit[c]=o[c]:Tr.has(c)?l.onChange[c]=o[c]:l.onBlur[c]=o[c],l),a)),(typeof n>"u"||n===jt.ON_CHANGE)&&ln(this,Sn,Object.keys(a.onChange).length===0?null:a.onChange),(typeof n>"u"||n===jt.ON_BLUR)&&ln(this,gn,Object.keys(a.onBlur).length===0?null:a.onBlur),(typeof n>"u"||n===jt.ON_SUBMIT)&&(ln(this,Hn,Object.keys(a.onSubmit).length===0?null:a.onSubmit),ln(this,Sn,Object.keys(a.onChange).length===0?null:a.onChange),ln(this,gn,Object.keys(a.onBlur).length===0?null:a.onBlur)),r||this.update(),this.isFocused()&&this.onFocus&&this.onFocus()}else this.errors&&(ln(this,Hn,null),ln(this,gn,null),ln(this,Sn,null),r||this.update());return this}isValid(){return!this.errors||this.isPristine()}hasErrors(){return!!this.errors}isVisibilyInvalid(){return!this.isValid()}hasError(t){return this.errors&&Object.prototype.hasOwnProperty.call(this.errors,t)}hasPreventativeError(t){return this.preventativeErrors.includes(t)}hasPreventativeErrors(){return this.preventativeErrors.length>0}isRequired(){return this.validators&&this.validators.indexOf(to.required)>-1}isSubmitted(){return this.submitted}onFocus(){}onBlur(){}}Hn=new WeakMap,Sn=new WeakMap,gn=new WeakMap;class Ur extends Vn{constructor(){super(...arguments);$t(this,"id",gt());$t(this,"focused",!1);$t(this,"pristine",!0)}setValue(n){if(this.preventativeErrors=[],this.validators&&this.validators.length>0){const r=no(n,this.validators);if(r&&Object.keys(r).filter(a=>pn.has(a)).length>0){this.preventativeErrors=Object.keys(r);return}}this.update(this.path,n)}isPristine(){return this.pristine}markAsPristine(){return this.pristine=!0,this.update(),this}markAsDirty(){return this.pristine=!1,this.update(),this}isFocused(){return this.focused}markAsFocused(){return this.focused=!0,this.update(),this.onFocus&&this.onFocus(),this}markAsBlurred(){return this.update(this.path,null,!0),this.onBlur&&this.onBlur(),this.preventativeErrors=[],this}markAsSubmitted(){return this.submitted=!0,this.update(this.path,null,!1,void 0,!0),this}}class $n extends Ur{constructor(n,r,o){super(o?r:n,o||r);$t(this,"fields");o&&this.inferMembers(n)}isFocused(){return super.isFocused()||this.rollup("isFocused")}isValid(){return super.isValid()&&this.rollup("isValid")}hasErrors(){return super.hasErrors()||Object.keys(this.fields).some(n=>this.fields[n].hasErrors())}contentsAreValid(){return this.rollup("isValid")&&this.rollup("contentsAreValid")}isPristine(){return super.isPristine()&&this.rollup("isPristine")}markAsPristine(){super.markAsPristine();for(const n of Object.keys(this.fields))this.fields[n].markAsPristine();return this}markAsDirty(){super.markAsDirty();for(const n of Object.keys(this.fields))this.fields[n].markAsDirty();return this}markAsBlurred(){super.markAsBlurred();for(const n of Object.keys(this.fields))this.fields[n].markAsBlurred();return this}markAsSubmitted(){super.markAsSubmitted();for(const n of Object.keys(this.fields))this.fields[n].markAsSubmitted();return this}inferSpsControl(n,r){return As(n,[...this.path,r],this.update)}rollup(n){return Object.keys(this.fields).reduce((r,o)=>r&&(!this.fields[o][n]||this.fields[o][n]()),!0)}}class fp extends $n{inferMembers(t){this.fields={};for(const n of Object.keys(t))this.fields[n]=this.inferSpsControl(t[n],n)}}class hp extends $n{inferMembers(t){this.fields=t.map((n,r)=>this.inferSpsControl(n,String(r)))}}function As(e,t,n){return e instanceof Vn?(e.path=t,e.update=n,e):Array.isArray(e)?new hp(e,t,n):lp(e)?new fp(e,t,n):new Ur(t,n)}function Vr(e,t){return t.length===0||!e?e:Vr(e.fields[t[0]],t.slice(1,t.length))}function Da(e,t){if(t.length===0||!e)return[e];const n=t[0];if(t=t.slice(1,t.length),n==="*"){const r=Array.isArray(e.fields)?e.fields:Object.keys(e.fields).map(o=>e.fields[o]);return t.length===0?r:r.reduce((o,a)=>[...o,...Da(a,t)],[])}return Da(e.fields[n],t)}function Sp(e,t,n){for(const r of Object.keys(t)){const o=t[r];for(const a of Da(e,r.split(".")))a&&o&&n(a,o)}}function Ns(e,t,n,r=!1,o=!1){Sp(t,n,(a,l)=>{a.validators=typeof l=="function"?l(e):l,r&&a.validate(y.getPath(e,a.path),void 0,o)})}function Na(e,t){const n=t[0];return t=t.slice(1),Array.isArray(e)?e.map((r,o)=>o===Number(n)?Na(r,t):r):lp(e)?Object.keys(e).reduce((r,o)=>Object.assign(r,{[o]:o===n?Na(e[o],t):e[o]}),{}):e}function xv(e){if(typeof e!="object"||e===null||Array.isArray(e))throw new TypeError("The initial value of useSpsForm() hook must be an object.")}function gp(e,t={}){xv(e);const n=_.useMemo(()=>{y.deepFreeze(e);const m=As(e,[],p);return t&&Ns(e,m,t,!1,!0),m},[]),r=_.useRef(),o=_.useRef(t),a=_.useCallback((m,u)=>{var g,v;let h;if(r.current=void 0,u)if(u.path)if(u.markAsBlurred){const w=Vr(m.formMeta,u.path);if(w){w.focused=!1;const T=y.getPath(m.formValue,u.path);w.validate(T,jt.ON_BLUR)}}else if(u.newValidators){if(o.current){const w=u.path.join(".");o.current={...o.current,[w]:u.newValidators},Ns(m.formValue,m.formMeta,o.current,!0)}}else if(u.markAsSubmitted){const w=Vr(m.formMeta,u.path);if(w){w.submitted=!0;const T=y.getPath(m.formValue,u.path);w.validate(T,jt.ON_SUBMIT)}}else h=Na(m.formValue,u.path),y.setPath(h,u.path,u.value);else h=u.value;if((g=u.updateFormOptions)!=null&&g.validators&&(o.current={...o.current,...u.updateFormOptions.validators},Ns(m.formValue,m.formMeta,o.current,((v=u.updateFormOptions)==null?void 0:v.runValidators)??!0)),h){m.formMeta.submitted=!1,y.deepFreeze(h);const w=y.diff(m.formValue,h);for(const{type:E,key:D,parentPath:k,objects:[,I]}of w){const x=Vr(m.formMeta,k);if(typeof D!="symbol"&&x){let F;switch(E){case y.DiffChange.ADDITION:x.fields[D]=As(I[D],[...k,D],p);break;case y.DiffChange.DELETION:Array.isArray(x.fields)?x.fields[D]=void 0:delete x.fields[D];break;case y.DiffChange.ALTERATION:F=As(I[D],[...k,D],p),(F instanceof $n&&!(x.fields[D]instanceof $n)||!(F instanceof $n)&&x.fields[D]instanceof $n)&&(x.fields[D]=F);break}}}const T=new Set;if(w.filter(E=>E.type===y.DiffChange.DELETION).reduce((E,D)=>(E.has(D.parentPath)||E.add(D.parentPath),E),T),Array.from(T).forEach(E=>{const D=Vr(m.formMeta,E);Array.isArray(D.fields)&&(D.fields=D.fields.filter(k=>k!==void 0))}),o.current){Ns(h,m.formMeta,o.current);const E=new Set;t&&Sp(m.formMeta,t,(D,k)=>{typeof k=="function"&&(D.validate(y.getPath(h,D.path)),E.add(D))});for(const{type:D,key:k,parentPath:I,objects:[,x]}of w)if(typeof k!="symbol"){let F=m.formMeta,L=h;if(F){for(const C of I)F=F.fields[C],L=L[C],E.has(F)||F.validate(L,jt.ON_CHANGE);if(D===y.DiffChange.ADDITION||D===y.DiffChange.ALTERATION){const C=F.fields[k];if(!E.has(C)&&(F.fields[k].validate(x[k],jt.ON_CHANGE),D===y.DiffChange.ADDITION&&C.fields))for(const[R,O]of Object.entries(C.fields))O.validate(x[k][R],jt.ON_CHANGE)}}}}}return{formValue:h||m.formValue,formMeta:m.formMeta,updateForm:m.updateForm}},[]),[l,c]=_.useReducer(a,{formValue:e,formMeta:n,updateForm:f});function p(m,u,h=!1,g,v=!1){m?c({path:m,value:u,markAsBlurred:h,newValidators:g,markAsSubmitted:v}):f()}function f(m,u){if(m||u){r.current&&window.clearTimeout(r.current);const h=window.setTimeout(c,0,{value:m,updateFormOptions:u});r.current=h}else if(!(r!=null&&r.current)){const h=window.setTimeout(c,0,{});r.current=h}}return _.useEffect(()=>()=>{r.current&&window.clearTimeout(r.current)},[]),l}const at=s.forwardRef((e,t)=>{const{className:n,children:r,focusInputOnClick:o,formControl:a,formMeta:l,inputRef:c,onClick:p,...f}=e,m=s.useRef(),h=c||(t||m);function g(){h&&h!==t&&h.current&&h.current.focus()}function v(){h&&h!==t&&h.current&&l&&l instanceof Ur&&l.markAsFocused()}function w(){h&&h!==t&&h.current&&l&&l instanceof Ur&&l.markAsBlurred()}const T=H("sps-form-group",(a&&a.isRequired()||l&&l.isRequired())&&"sps-form-group--required",(a&&!a.isValid()||l&&l.isVisibilyInvalid())&&"sps-form-group--error",l&&l.hasPreventativeErrors()&&"sps-form-group--preventative-error",n);function E(D){o&&g(),p&&p(D)}return s.useEffect(()=>{function D(k){k.target.classList.contains("sps-form-control__clear-btn")&&k.preventDefault()}return document.addEventListener("mousedown",D),()=>{document.removeEventListener("mousedown",D)}},[]),s.createElement("div",{...f,className:T,ref:t,tabIndex:-1,onClick:E,onFocus:v,onBlur:w},r)});Object.assign(at,{displayName:"SpsFormComponentWrapper"});function bc(e){return typeof e=="object"&&e!=null&&e.nodeType===1}function vc(e,t){return(!t||e!=="hidden")&&e!=="visible"&&e!=="clip"}function jo(e,t){if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){var n=getComputedStyle(e,null);return vc(n.overflowY,t)||vc(n.overflowX,t)||function(r){var o=function(a){if(!a.ownerDocument||!a.ownerDocument.defaultView)return null;try{return a.ownerDocument.defaultView.frameElement}catch{return null}}(r);return!!o&&(o.clientHeight<r.scrollHeight||o.clientWidth<r.scrollWidth)}(e)}return!1}function xs(e,t,n,r,o,a,l,c){return a<e&&l>t||a>e&&l<t?0:a<=e&&c<=n||l>=t&&c>=n?a-e-r:l>t&&c<n||a<e&&c>n?l-t+o:0}var yc=function(e,t){var n=window,r=t.scrollMode,o=t.block,a=t.inline,l=t.boundary,c=t.skipOverflowHiddenElements,p=typeof l=="function"?l:function(Me){return Me!==l};if(!bc(e))throw new TypeError("Invalid target");for(var f,m,u=document.scrollingElement||document.documentElement,h=[],g=e;bc(g)&&p(g);){if((g=(m=(f=g).parentElement)==null?f.getRootNode().host||null:m)===u){h.push(g);break}g!=null&&g===document.body&&jo(g)&&!jo(document.documentElement)||g!=null&&jo(g,c)&&h.push(g)}for(var v=n.visualViewport?n.visualViewport.width:innerWidth,w=n.visualViewport?n.visualViewport.height:innerHeight,T=window.scrollX||pageXOffset,E=window.scrollY||pageYOffset,D=e.getBoundingClientRect(),k=D.height,I=D.width,x=D.top,F=D.right,L=D.bottom,C=D.left,R=o==="start"||o==="nearest"?x:o==="end"?L:x+k/2,O=a==="center"?C+I/2:a==="end"?F:C,W=[],z=0;z<h.length;z++){var M=h[z],U=M.getBoundingClientRect(),G=U.height,j=U.width,A=U.top,ee=U.right,le=U.bottom,P=U.left;if(r==="if-needed"&&x>=0&&C>=0&&L<=w&&F<=v&&x>=A&&L<=le&&C>=P&&F<=ee)return W;var Y=getComputedStyle(M),se=parseInt(Y.borderLeftWidth,10),re=parseInt(Y.borderTopWidth,10),Q=parseInt(Y.borderRightWidth,10),V=parseInt(Y.borderBottomWidth,10),Z=0,J=0,ae="offsetWidth"in M?M.offsetWidth-M.clientWidth-se-Q:0,te="offsetHeight"in M?M.offsetHeight-M.clientHeight-re-V:0,me="offsetWidth"in M?M.offsetWidth===0?0:j/M.offsetWidth:0,ie="offsetHeight"in M?M.offsetHeight===0?0:G/M.offsetHeight:0;if(u===M)Z=o==="start"?R:o==="end"?R-w:o==="nearest"?xs(E,E+w,w,re,V,E+R,E+R+k,k):R-w/2,J=a==="start"?O:a==="center"?O-v/2:a==="end"?O-v:xs(T,T+v,v,se,Q,T+O,T+O+I,I),Z=Math.max(0,Z+E),J=Math.max(0,J+T);else{Z=o==="start"?R-A-re:o==="end"?R-le+V+te:o==="nearest"?xs(A,le,G,re,V+te,R,R+k,k):R-(A+G/2)+te/2,J=a==="start"?O-P-se:a==="center"?O-(P+j/2)+ae/2:a==="end"?O-ee+Q+ae:xs(P,ee,j,se,Q+ae,O,O+I,I);var ne=M.scrollLeft,Ee=M.scrollTop;R+=Ee-(Z=Math.max(0,Math.min(Ee+Z/ie,M.scrollHeight-G/ie+te))),O+=ne-(J=Math.max(0,Math.min(ne+J/me,M.scrollWidth-j/me+ae)))}W.push({el:M,top:Z,left:J})}return W};function bp(e){return e===Object(e)&&Object.keys(e).length!==0}function kv(e,t){t===void 0&&(t="auto");var n="scrollBehavior"in document.body.style;e.forEach(function(r){var o=r.el,a=r.top,l=r.left;o.scroll&&n?o.scroll({top:a,left:l,behavior:t}):(o.scrollTop=a,o.scrollLeft=l)})}function Iv(e){return e===!1?{block:"end",inline:"nearest"}:bp(e)?e:{block:"start",inline:"nearest"}}function vp(e,t){var n=e.isConnected||e.ownerDocument.documentElement.contains(e);if(bp(t)&&typeof t.behavior=="function")return t.behavior(n?yc(e,t):[]);if(n){var r=Iv(t);return kv(yc(e,r),r.behavior)}}const Mv=Object.freeze(Object.defineProperty({__proto__:null,default:vp},Symbol.toStringTag,{value:"Module"})),Ke=s.createContext(K.noI18nI18n),_v={alt:"string",size:"SpinnerSize",title:"string"};function qa(e){const{alt:t,className:n,size:r=K.SpinnerSize.MEDIUM,"data-testid":o,title:a,unsafelyReplaceClassName:l,...c}=e,{t:p}=s.useContext(Ke),f=t||a||p("design-system:spinner.defaultAltText"),m=H(l||"sps-spinner",`sps-spinner--${r}`,n);return s.createElement("i",{className:m,"data-testid":o,title:f,...c})}Object.assign(qa,{props:_v,displayName:"SpsSpinner"});const Rv=60;function ks(e){return typeof e>"u"?"inherit":`${e}px`}function Ja(e){switch(e){case K.Position.TOP_LEFT:return K.Position.BOTTOM_LEFT;case K.Position.TOP_MIDDLE:return K.Position.BOTTOM_MIDDLE;case K.Position.TOP_RIGHT:return K.Position.BOTTOM_RIGHT;case K.Position.RIGHT_TOP:return K.Position.LEFT_TOP;case K.Position.RIGHT_MIDDLE:return K.Position.LEFT_MIDDLE;case K.Position.RIGHT_BOTTOM:return K.Position.LEFT_BOTTOM;case K.Position.BOTTOM_RIGHT:return K.Position.TOP_RIGHT;case K.Position.BOTTOM_MIDDLE:return K.Position.TOP_MIDDLE;case K.Position.BOTTOM_LEFT:return K.Position.TOP_LEFT;case K.Position.LEFT_BOTTOM:return K.Position.RIGHT_BOTTOM;case K.Position.LEFT_MIDDLE:return K.Position.RIGHT_MIDDLE;case K.Position.LEFT_TOP:return K.Position.RIGHT_TOP}}function Ov(e,t,n,r,o,a,l,c){const p=l&&l.current,f=p?p.scrollTop:window.pageYOffset,m=c?0:f,u=p?p.scrollLeft:window.pageXOffset,h=c?0:u,[g,v]=e.split(" ");let w,T,E,D;switch(g){case"top":E=t.height-n.top-m-a[0];break;case"left":T=t.width-n.left-h-a[0];break;case"right":D=n.right+h-a[0];break;case"bottom":w=n.bottom+m-a[0];break;default:throw new Error(`Invalid position ${e}`)}switch(v){case"left":D=n.left+h+a[1];break;case"top":w=n.top+m+a[1];break;case"middle":g==="top"||g==="bottom"?D=n.left+h+n.width/2-o/2+a[1]:(g==="left"||g==="right")&&(w=n.top+m+n.height/2-r.height/2+a[1]);break;case"bottom":E=t.height-n.bottom-m+a[1];break;case"right":T=t.width-n.right-h+a[1];break;default:throw new Error(`Invalid position ${e}`)}return[w,T,E,D]}function Wn(e,t,n,{altPosition:r,setMinWidth:o=!1,setWidth:a=!1,parentElementRef:l,fixed:c=!1,offsets:p=[0,0]}){if(e.current&&t.current){const f=Math.max(document.documentElement.clientHeight,window.innerHeight||0),m=document.documentElement.getBoundingClientRect().width,u=l&&l.current?l.current:document.documentElement,h=c?{width:m,height:f,top:0,left:0,bottom:f,right:m}:u.getBoundingClientRect(),g=e.current.getBoundingClientRect(),v=t.current.getBoundingClientRect(),[w]=n.split(" ");let T=n;r&&(w==="top"&&v.top-g.height<Rv||w==="right"&&v.right+g.width>m||w==="bottom"&&v.bottom+g.height>f||w==="left"&&v.left-g.width<0)&&(T=r);const E=o?Math.max(v.width,g.width):g.width,D=a?v.width:E,[k,I,x,F]=Ov(T,h,v,g,D,p,l,c),L={top:ks(k),right:ks(I),bottom:ks(x),left:ks(F)};return c&&(L.position="fixed",L.zIndex=K.ZStratum.BAR),o&&(L.minWidth=`${v.width}px`),a&&(L.width=`${v.width}px`),[L,T===r]}return[{},!1]}const Lt=_.createContext(null);function Er(e,t=[]){const n=_.useContext(Lt);return _.useMemo(()=>r=>{const a=n&&n.parentElementRef&&n.parentElementRef.current||document.body;let l=null,c=a.lastElementChild;for(;c&&c!==a.firstElementChild;){if(c.hasAttribute("data-portalid")&&c.getAttribute("data-portalid")===e){l=c;break}c=c.previousElementSibling}if(l)a.contains(l)||a.appendChild(l);else{l=document.createElement("div"),l.setAttribute("data-portalid",e);for(const p of t)l.classList.add(p);a.appendChild(l)}return Qs.createPortal(r,l)},[n])}async function Tc(e,t,n,r,o,a){const l=typeof e.options=="function"?e.options(t.value):e.options||[],c=l instanceof Promise,p=u=>u.replace(/([.?*+^$[\]\\(){}|-])/g,"");n({pending:c}),a.current=c?l:null;const f=c?await l||[]:l||[];if(c&&a.current!==l)return;let m=Array.from(f).filter(Boolean).map(u=>new K.SpsOptionListOption(u,typeof u=="function"?{textKey:"label",captionKey:"caption"}:{textKey:e.textKey,captionKey:e.captionKey}));if(e.nullOption&&m.unshift(new K.SpsOptionListOption(null,{text:e.nullOption})),t.value&&!e.disableDefaultOptionsFiltering){const u=p(t.value);n({replacementPattern:new RegExp(`(${u})`,"ig")}),m=m.filter(h=>{const g=new RegExp(u,"i"),v=p(h.text);return e.filterByTextAndCaptionKey?g.test(v)||g.test(p(h.caption)):g.test(v)})}else n({replacementPattern:null});if(e.disabledOptions)for(const u of m)e.disabledOptions.includes(u.value)&&(u.disabled=!0);r(Object.freeze(m)),e.onOptionListChanged&&e.onOptionListChanged(m.length),o(m.some(u=>u.value&&!!u.value.icon)),n({pending:!1})}function Lv(e,t,n){const[r,o]=s.useState(Object.freeze([])),[a,l]=s.useState(!1),c=s.useRef(null),p=s.useRef(e.options);(typeof e.options!="function"||e.disableOptionsMemoization)&&(p.current=e.options);const f=s.useMemo(()=>typeof p.current=="function"?y.debounce(Tc,typeof e.searchDebounce<"u"?e.searchDebounce:500):Tc,[p.current,e.disabledOptions]);return s.useEffect(()=>{f(e,t,n,o,l,c)},[p.current,t.value,e.disabledOptions]),[r,a]}class Cn{constructor(t,n){$t(this,"nativeEvent");$t(this,"currentTarget");$t(this,"isPgStoppedInternal",!1);this.target=t,this.currentTarget=t,this.nativeEvent=new CustomEvent("change",n),Object.defineProperty(this.nativeEvent,"target",{value:t,writable:!1,configurable:!1,enumerable:!0})}get bubbles(){return this.nativeEvent.bubbles}get cancelable(){return this.nativeEvent.cancelable}get defaultPrevented(){return this.nativeEvent.defaultPrevented}get eventPhase(){return this.nativeEvent.eventPhase}get isTrusted(){return this.nativeEvent.isTrusted}get timeStamp(){return this.nativeEvent.timeStamp}get type(){return this.nativeEvent.type}preventDefault(){this.nativeEvent.preventDefault()}isDefaultPrevented(){return this.defaultPrevented}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPgStoppedInternal=!0}isPropagationStopped(){return this.isPgStoppedInternal}persist(){throw new Error("This is not a real React ChangeEvent. React does not permit the creation of SyntheticEvents in userland.")}}function Pv(e,t){return{...e,...t}}function Jt(e){return _.useReducer(Pv,e)}function Bv({hideInlineSearch:e,options:t,onSearchChange:n,search:r="",searchPlaceholder:o="Search…",searchInputRef:a}){const[l,c]=Jt({isAsync:typeof t=="function",pending:!1,value:r,replacementPattern:null}),p=s.useCallback(g=>{c({value:g.target.value}),n&&n(g)},[n]),f=s.useCallback(g=>{g.nativeEvent.stopImmediatePropagation(),g.stopPropagation()},[]),m=s.useCallback(g=>{g.nativeEvent.stopImmediatePropagation(),c({value:""}),a!=null&&a.current&&(n&&n(new Cn(a.current)),a.current.focus())},[n]),u=g=>{g&&(["Tab","Escape","Enter","Up","ArrowUp","Down","ArrowDown"].includes(g.key)||g.stopPropagation())};return s.useEffect(()=>{c({value:r})},[r]),[l.isAsync&&!e?s.createElement("div",{className:"sps-option-list__search sps-form-group sps-text-input"},s.createElement("div",{className:"sps-form-control"},!l.value&&s.createElement("i",{className:"sps-icon sps-icon-filter sps-text-input__icon"}),s.createElement("input",{type:"text",className:"sps-text-input__input",placeholder:o,ref:a,value:l.value,onChange:p,onClick:f,onKeyDown:u}),l.value&&s.createElement("i",{className:"sps-icon sps-icon-x-circle sps-form-control__clear-btn",onClick:m}))):s.createElement(s.Fragment,null),l,c]}const Av=vp||Mv,Fv=["Tab","Escape","Enter","Up","ArrowUp","Down","ArrowDown"],Vv=["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"];function $v(e,t,n){return n?(e&&e[n])===(t&&t[n]):e===t}function Ec(e,t,n){return typeof n.value=="function"&&n.disabled?!0:t?!!(e!=null&&e.find(r=>{var o;return r[t]&&r[t]===((o=n==null?void 0:n.value)==null?void 0:o[t])})):!1}const ns=s.forwardRef((e,t)=>{const{captionKey:n,comparisonKey:r,disabledOptions:o,options:a,tall:l,textKey:c,valueKey:p,zeroState:f,hideInlineSearch:m,onSearchChange:u,search:h,searchDebounce:g,searchPlaceholder:v,onSpecialActionSelect:w,attachTo:T,className:E,conformWidth:D,id:k,ignoreWidthStyles:I,isOpen:x,keepOpen:F,keyDown:L,nullOption:C,onOptionListChanged:R,onOptionSelected:O,onPositionFlip:W,onSelfToggle:z,optionRole:M,positionOverride:U,selectedOption:G,specialAction:j,unsafelyReplaceClassName:A,loading:ee,filterByTextAndCaptionKey:le,maxHeightPx:P,maxHeightRem:Y,disableOptionsMemoization:se,disableDefaultOptionsFiltering:re,"data-testid":Q,...V}=e,Z=s.useMemo(()=>j?new K.SpsOptionListOption(j,{textKey:"label",captionKey:"caption"}):null,[j]),[J,ae]=s.useState(-1),[te,me]=s.useState(x),ie=t||s.useRef(null),ne=s.useRef(null),Ee=s.useRef(null),Me=Er("sps-option-list-portal"),it=s.useContext(Lt),[ut,lt]=U||[K.Position.BOTTOM_LEFT,K.Position.TOP_LEFT],[[ve,Pe],Je]=s.useState([{},!1]),fe=s.useRef(null),[He,Be,yt]=Bv({...e,searchInputRef:fe}),[Ge,Xe]=Lv(e,Be,yt);s.useEffect(()=>{Je(te?Wn(ie,T,ut,{altPosition:lt,setMinWidth:!I,setWidth:!I&&D,...it}):[{},!1])},[te,ut,lt,Ge]),s.useEffect(()=>{const ge=()=>{te&&Je(Wn(ie,T,ut,{altPosition:lt,setMinWidth:!I,setWidth:!I&&D,...it}))};return document.addEventListener("scroll",ge),()=>{document.removeEventListener("scroll",ge)}},[te]),s.useEffect(()=>{ae(-1)},[Be]);const de=H(A||"sps-option-list","z-stratum-dropdown",te&&"sps-option-list--open",Be.isAsync&&"sps-option-list--searchable",Pe&&"sps-option-list--opens-upward",j&&j.label&&"sps-option-list--has-special-action",E),Re=H(A||"sps-option-list__options",l&&"sps-option-list__options--tall"),ke=s.useCallback(()=>{te||(me(!0),fe.current&&fe.current.focus(),ae(-1),z&&z(!0))},[te,z]),Te=s.useCallback(()=>{te&&(me(!1),ae(-1),z&&z(!1))},[te,z]),De=s.useCallback((ge,be)=>{be||ge&&!ge.disabled&&(typeof ge.value=="function"?(ge.value(),w&&w()):typeof O=="function"&&O(ge.value),F||Te())},[O,Te]),mt=s.useCallback((ge,be,qe)=>{ge.stopPropagation(),De(be,qe)},[De]),ct=s.useRef(o||[]);ct.current=o||[];const $e=s.useCallback(ge=>{switch(ge.key){case"Tab":case"Escape":Te();break;case"Enter":if(J>-1){const be=Ge[J]||Z;ge.preventDefault();const qe=!!be&&Ec(ct.current,r||"",be);!qe&&be&&typeof O=="function"&&typeof be.value=="function"?be.value():be&&De(be,qe)}break;case"Up":case"ArrowUp":{let be=J;Pe?J<=-1?be=Ge.length-1:J===0?j&&(be=Ge.length):J<Ge.length&&(be=J-1):J>-1&&(be=J-1),be!==J&&(ge.preventDefault(),ae(be));break}case"Down":case"ArrowDown":{ke();let be=J;Pe?J!==-1&&(J>=Ge.length?be=0:J===Ge.length-1?be=-1:be=J+1):J<Ge.length-1+ +!!j&&(be=J+1),be!==J&&(ge.preventDefault(),ae(be));break}default:ke()}},[Te,ke,J,De,O,Pe,Ge]),dt=s.useCallback(ge=>{const be=Ge.findIndex(qe=>{if(qe.textKey){const At=qe.textKey;return qe.value[At].toLowerCase().charAt([0])===ge.key.toLocaleLowerCase()}return qe.value.toString().toLowerCase().charAt([0])===ge.key.toLocaleLowerCase()});be>-1&&ae(be)},[Ge]),xt=s.useCallback(ge=>{ge&&(Fv.includes(ge.key)?$e(ge):Vv.includes(ge.key)&&!m&&dt(ge))},[Te,ke,J,De,O,Pe,Ge]);s.useEffect(()=>{if(it!==null&&document.getElementsByClassName("sps-modal__body").length>0){const ge=()=>{z&&z(!1)},be=document.getElementsByClassName("sps-modal__body")[0];return be.addEventListener("scroll",ge),()=>{be.removeEventListener("scroll",ge)}}},[]),s.useEffect(()=>{Ee.current&&Av(Ee.current,{scrollMode:"if-needed",block:"nearest",inline:"nearest"})},[J]),s.useEffect(()=>{me(x),x?fe.current&&fe.current.focus():ae(-1)},[x]),s.useEffect(()=>{L&&xt(L)},[L]),s.useEffect(()=>{!te&&ne.current&&(yt({value:""}),ne.current.scrollTop=0),te&&W&&W(Pe)},[te]);const Bt=P?P/16:Y,xo=Bt?{maxHeight:`${Bt}rem`}:{};function In(ge,be){return be?s.createElement(s.Fragment,null,ge.split(be).map((qe,At)=>be.test(qe)?s.createElement("u",{key:At},qe):s.createElement(s.Fragment,{key:At},qe))):s.createElement(s.Fragment,null,ge)}return Me(s.createElement("div",{className:de,id:k,"aria-activedescendant":J>-1?`${k}-option-${J}`:"",tabIndex:-1,ref:ie,style:ve,onMouseLeave:()=>ae(-1),"data-testid":Q,...V},He,s.createElement("div",{className:Re,ref:ne,"data-testid":`${Q}-options`,style:xo},!ee&&!Be.pending&&f&&Ge.length===0&&s.createElement("div",{className:"sps-option-list__zero-state"},f),(ee||Be.pending)&&s.createElement("div",{className:"sps-option-list__loading"},s.createElement(qa,null)),!ee&&!Be.pending&&Ge.map((ge,be)=>{const qe=`${k}-option-${be}`,At=$v(ge.value,G,r),Mn=Ec(ct.current,r||"",ge);return s.createElement("a",{key:qe,id:qe,role:M,"aria-selected":At,href:ge.href,className:H("sps-option-list__option",ge.caption&&"sps-option-list__option--has-caption",ge.disabled&&"sps-option-list__option--disabled",ge.bold&&"sps-option-list__option--bold",(At||Mn)&&"sps-option-list__option--selected",J===be&&"sps-option-list__option--highlighted"),onClick:pe=>mt(pe,ge,Mn),onMouseOver:()=>ae(be),tabIndex:-1,ref:J===be?Ee:null,"data-testid":`${Q}-option-${be}`},ge.value&&ge.value.icon&&s.createElement("i",{className:H("sps-icon","sps-option-list__option-icon",`sps-icon-${String(ge.value.icon)}`)}),(!ge.value||!ge.value.icon&&Xe)&&s.createElement("span",{className:"sps-option-list__option-icon-spacer"}),s.createElement("span",null,In(ge.text,Be.replacementPattern)),ge.caption&&s.createElement("div",{className:"sps-option-list__option-caption"},s.createElement("span",null,In(ge.caption,Be.replacementPattern))))})),Z&&(j==null?void 0:j.label)&&s.createElement("a",{className:H("sps-option-list__option","sps-option-list__special-action",J===Ge.length&&"sps-option-list__option--highlighted",j.disabled&&"sps-option-list__special-action--disabled"),href:Z.href,target:Z.href&&j.newTab?"_blank":"_self",onClick:ge=>mt(ge,Z),onMouseOver:()=>ae(Ge.length),"data-testid":`${Q}-special-action`},j.icon&&s.createElement("i",{className:H("sps-icon","sps-option-list__option-icon",`sps-icon-${String(j.icon)}`)}),!j.icon&&Xe&&s.createElement("span",{className:"sps-option-list__option-icon-spacer"}),s.createElement("span",null,j.label))))});Object.assign(ns,{displayName:"SpsOptionList"});function Kv(e,t,n=[]){return s.useMemo(()=>{function r(o){return s.createElement(e,{...o,...t},o.children)}return r},n)}function wt(e){return typeof e=="function"?e():e}const yp=function({children:e,elements:t}){if(t.length===0)return s.createElement(s.Fragment,null,e);const[n,r]=Array.isArray(t[0])?t[0]:[t[0]];return s.createElement(n,{...r??{}},s.createElement(yp,{elements:t.slice(1)},e))},Tp=function({children:e,providers:t=[],...n}){return s.createElement("div",{...n},s.createElement(yp,{elements:t},e))},Hv=function({children:e,className:t,...n}){return s.createElement(Tp,{className:`sps-app ${t}`,...n},e)};function Pt(e=[],t=[]){const n=Array.isArray(e)?y.flatten(e):[e],r=t.map(a=>Array.isArray(a)?a:[a]),o=new Array(r.length+1).fill(null).map(()=>[]);for(const a of n){let l=!1;for(let c=0;c<r.length;c+=1)for(const{type:p,props:f={}}of r[c])if(a.type===p&&Object.keys(f).every(u=>f[u]===a.props[u])){l=!0,o[c].push(a);break}l||o[o.length-1].push(a)}return o}function Ep(e,t,n){const r=Object.entries(t).filter(([,a])=>typeof a!="string"&&a.deprecated).map(([a])=>a),o=r.map(a=>n[a]);s.useEffect(()=>{o.find(a=>typeof a<"u")&&console.warn(`The following prop(s) of ${e} are deprecated: ${r.join(", ")}`)},o)}function Za(e,t){const n=_.useRef(!1);_.useEffect(()=>{if(n.current)return e();n.current=!0},t)}function xa(e,t,n){const r=s.useRef(t(...n));s.useEffect(()=>(document.addEventListener(e,r.current),()=>document.removeEventListener(e,r.current)),[]),s.useEffect(()=>{document.removeEventListener(e,r.current),r.current=t(...n),document.addEventListener(e,r.current)},n)}function wc(e,t,n){return function(o){var a,l;!((a=e.current)!=null&&a.contains(o.target))&&!((l=t.current)!=null&&l.contains(o.target))&&n()}}function wr(e,t,n){const r=s.useRef(!1),[o,a]=s.useState(!1),l=s.useCallback(()=>{r.current?r.current=!1:a(!0)},[]),c=s.useCallback((p=!1)=>{a(!1),r.current=p,n&&n()},[]);return xa("mousedown",wc,[e,t,c]),xa("pointerdown",wc,[e,t,c]),{showPopup:o,doShowPopup:l,doHidePopup:c}}const Wv={debounce:"number",disabled:"boolean",formMeta:"SpsFormFieldMeta<string>",icon:"SpsIcon",onChange:"React.ChangeEventHandler",onSelectionChange:"(newValue: string) => void",placeholder:"string",suggestions:{type:`
|
|
2
2
|
Eventually<Iterable<string>>
|
|
3
3
|
| ((filter?: string) => Eventually<Iterable<string>>)
|
|
4
|
-
`,required:!0},tallOptionList:"boolean",value:"string",zeroState:"string",loading:"boolean",maxHeightOptionListPx:"number",maxHeightOptionListRem:"number",disableOptionsMemoization:"boolean",inputNotClearable:"boolean",autoFocusOnSelection:"boolean"};function
|
|
4
|
+
`,required:!0},tallOptionList:"boolean",value:"string",zeroState:"string",loading:"boolean",maxHeightOptionListPx:"number",maxHeightOptionListRem:"number",disableOptionsMemoization:"boolean",inputNotClearable:"boolean",autoFocusOnSelection:"boolean"};function zt({className:e,debounce:t=0,disabled:n,formControl:r,formMeta:o,onChange:a,onSelectionChange:l,icon:c,id:p,placeholder:f="",suggestions:m,unsafelyReplaceClassName:u,tallOptionList:h,value:g="",zeroState:v,loading:w,maxHeightOptionListPx:T,maxHeightOptionListRem:E,disableOptionsMemoization:D,inputNotClearable:k,autoFocusOnSelection:I,"data-testid":x,...F}){const L=o||r,{wrapperId:C,controlId:R}=vt(p,L),[O,W]=Jt({keyDown:null,opensUpward:!1}),z=s.useRef(null),M=s.useRef(null),U=s.useRef(null),{showPopup:G,doShowPopup:j,doHidePopup:A}=wr(z,U);function ee(V,Z,J=!1){L&&(L.setValue(V),L.markAsDirty()),l&&J?l(V):a&&a(Z||new Cn({value:V}))}function le(V){M.current&&(M.current.value="",ee("")),V.stopPropagation()}function P(V){ee(V.target.value,V)}function Y(V){n||(["Up","ArrowUp","Down","ArrowDown","Enter"].indexOf(V.key)>-1&&(V.preventDefault(),V.persist()),V.stopPropagation(),W({keyDown:V})),V.key==="Tab"&&A()}function se(V){V?j():A()}function re(V){W({opensUpward:V})}const Q=H(u||"sps-autocomplete",G&&"sps-autocomplete--open",G&&"z-stratum-dropdown",O.opensUpward&&"sps-autocomplete--opens-upward",n&&"sps-form-control--disabled",e);return s.createElement(at,{id:C,className:Q,formControl:r,formMeta:o,inputRef:M,ref:z,focusInputOnClick:!0,onClick:V=>V.nativeEvent.stopImmediatePropagation(),"data-testid":`${x}`},s.createElement("div",{className:"sps-text-input"},s.createElement("div",{className:"sps-form-control"},c&&s.createElement("i",{className:H("sps-text-input__icon","sps-icon",`sps-icon-${c}`)}),s.createElement("input",{type:"text",ref:M,value:g,className:"sps-text-input__input",placeholder:f,onFocus:j,onClick:j,onChange:P,onKeyDown:Y,disabled:n,id:R,"data-testid":`${x}__input`,...F}),g&&!n&&!k&&s.createElement("i",{"aria-label":"clear",className:"sps-icon sps-icon-x-circle sps-form-control__clear-btn",onClick:V=>le(V)}))),s.createElement(ns,{id:`${C}_options`,ref:U,attachTo:z,isOpen:G,options:m,hideInlineSearch:!0,keyDown:O.keyDown,onOptionSelected:V=>{var Z;ee(V,void 0,!0),I&&((Z=M.current)==null||Z.focus())},onPositionFlip:re,onSelfToggle:se,offsets:[1,0],search:g,searchDebounce:t,tall:h,zeroState:v,loading:w,maxHeightPx:T,maxHeightRem:E,disableOptionsMemoization:D}))}Object.assign(zt,{props:Wv,displayName:"SpsAutocomplete"});const wp={basic:{label:"Basic",examples:{basic:{react:y.code`
|
|
5
5
|
import { SpsAutocomplete } from "@spscommerce/ds-react";
|
|
6
6
|
|
|
7
7
|
function DemoComponent() {
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
<SpsAutocomplete suggestions={colorSearch} value={color} onChange={handleChange} placeholder="Enter a color"/>
|
|
109
109
|
);
|
|
110
110
|
}
|
|
111
|
-
`}}}},
|
|
111
|
+
`}}}},Gv={checked:"boolean",disabled:"boolean",formMeta:"SpsFormFieldMeta<boolean>",indeterminate:"boolean",inline:"boolean",label:"string",onChange:"ChangeEventHandler"};function Jn({checked:e,className:t,disabled:n,formControl:r,formMeta:o,id:a,indeterminate:l=!1,inline:c,label:p,onChange:f,"data-testid":m,unsafelyReplaceClassName:u,...h}){const g=o||r,v=s.useRef(null),[w,T]=s.useState(e),[E,D]=s.useState(l),{wrapperId:k,controlId:I}=vt(a,g);s.useEffect(()=>T(e),[e]),s.useEffect(()=>D(l),[l]),s.useEffect(()=>{v.current&&(v.current.indeterminate=E)},[E]);const x=H(u||"sps-checkbox","sps-checkable",c&&"sps-checkable--inline",!p&&"sps-checkable--no-label",t);function F(L){var C;T(L.target.checked),D(!1),g&&(g.setValue(L.target.checked),g.markAsDirty()),f&&f(L),(C=v.current)==null||C.focus()}return s.createElement(at,{id:k,className:x,formControl:r,formMeta:o,inputRef:v,"data-testid":m},s.createElement("input",{type:"checkbox",ref:v,className:"sps-checkable__input",id:I,checked:w,disabled:n,"data-testid":`${m}__checkbox-input`,onChange:F,...h}),s.createElement("label",{className:"sps-checkable__label",htmlFor:I},p||""))}Object.assign(Jn,{props:Gv,displayName:"SpsCheckbox"});const Cp={labels:{label:"Labels",description:y.code`
|
|
112
112
|
<p>An individual checkbox should be labeled with its own <code>label</code> prop,
|
|
113
113
|
not the <code><SpsLabel></code> component.</p>
|
|
114
114
|
`,examples:{label:{react:y.code`
|
|
@@ -223,7 +223,7 @@
|
|
|
223
223
|
</SpsSummaryListRow>
|
|
224
224
|
);
|
|
225
225
|
}
|
|
226
|
-
`}}}},
|
|
226
|
+
`}}}},Yv={disabled:"boolean",href:"string",kind:"ClickableTagKind",onAdd:"() => void",onRemove:"() => void"};function rs(e){const{children:t,className:n,disabled:r,href:o,kind:a=K.ClickableTagKind.BLUE,onAdd:l,onRemove:c,onClick:p,"data-testid":f,unsafelyReplaceClassName:m,...u}=e,h=H(m||"sps-clickable-tag",`sps-clickable-tag--${a}`,n,r&&"sps-clickable-tag--disabled",(l||c)&&"sps-clickable-tag--icon"),g=H("sps-clickable-tag__label",(o||p)&&"sps-clickable-tag__label--link"),v=s.Children.toArray(t).filter(E=>typeof E=="string").join("");function w(E){l?l():c&&c(),E.stopPropagation()}s.useEffect(()=>{if(c&&l)throw new Error("Clickable tag should have onRemove or onAdd, not both")},[l,c]);function T(E){E.stopPropagation(),p&&p(E)}return s.createElement("div",{className:h,"data-testid":f,...u},s.createElement("span",{className:g,title:v,onClick:T},o&&s.createElement("a",{href:o},t),!o&&t),(l||c)&&!r&&s.createElement("div",{className:"sps-clickable-tag__icon",onClick:r?void 0:w,tabIndex:-1,"aria-label":l?"Add":"Remove"},s.createElement("i",{"aria-hidden":"true",className:`sps-icon sps-icon-${l?K.SpsIcon.PLUS_SIGN:K.SpsIcon.X}`,"data-testid":`${f}__icon`})))}Object.assign(rs,{props:Yv,displayName:"SpsClickableTag"});const Dp={basic:{label:"Basic",examples:{basic:{react:y.code`
|
|
227
227
|
import { SpsClickableTag } from "@spscommerce/ds-react";
|
|
228
228
|
import { ClickableTagKind } from "@spscommerce/ds-shared";
|
|
229
229
|
function Component() {
|
|
@@ -323,75 +323,75 @@
|
|
|
323
323
|
</>
|
|
324
324
|
);
|
|
325
325
|
}
|
|
326
|
-
`}}}};function
|
|
326
|
+
`}}}};function ka(e,t){return ka=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},ka(e,t)}function Np(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,ka(e,t)}function Se(){return Se=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Se.apply(this,arguments)}function jr(e){"@babel/helpers - typeof";return jr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},jr(e)}function Uv(e,t){if(jr(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(jr(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function jv(e){var t=Uv(e,"string");return jr(t)=="symbol"?t:t+""}function zv(e,t,n){return t=jv(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Cc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Dc(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Cc(Object(n),!0).forEach(function(r){zv(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Cc(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function bt(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var Nc=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),zo=function(){return Math.random().toString(36).substring(7).split("").join(".")},xc={INIT:"@@redux/INIT"+zo(),REPLACE:"@@redux/REPLACE"+zo(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+zo()}};function qv(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Jv(e){if(e===void 0)return"undefined";if(e===null)return"null";var t=typeof e;switch(t){case"boolean":case"string":case"number":case"symbol":case"function":return t}if(Array.isArray(e))return"array";if(Qv(e))return"date";if(Xv(e))return"error";var n=Zv(e);switch(n){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return n}return t.slice(8,-1).toLowerCase().replace(/\s/g,"")}function Zv(e){return typeof e.constructor=="function"?e.constructor.name:null}function Xv(e){return e instanceof Error||typeof e.message=="string"&&e.constructor&&typeof e.constructor.stackTraceLimit=="number"}function Qv(e){return e instanceof Date?!0:typeof e.toDateString=="function"&&typeof e.getDate=="function"&&typeof e.setDate=="function"}function An(e){var t=typeof e;return process.env.NODE_ENV!=="production"&&(t=Jv(e)),t}function xp(e,t,n){var r;if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?bt(0):"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(process.env.NODE_ENV==="production"?bt(1):"Expected the enhancer to be a function. Instead, received: '"+An(n)+"'");return n(xp)(e,t)}if(typeof e!="function")throw new Error(process.env.NODE_ENV==="production"?bt(2):"Expected the root reducer to be a function. Instead, received: '"+An(e)+"'");var o=e,a=t,l=[],c=l,p=!1;function f(){c===l&&(c=l.slice())}function m(){if(p)throw new Error(process.env.NODE_ENV==="production"?bt(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return a}function u(w){if(typeof w!="function")throw new Error(process.env.NODE_ENV==="production"?bt(4):"Expected the listener to be a function. Instead, received: '"+An(w)+"'");if(p)throw new Error(process.env.NODE_ENV==="production"?bt(5):"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");var T=!0;return f(),c.push(w),function(){if(T){if(p)throw new Error(process.env.NODE_ENV==="production"?bt(6):"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");T=!1,f();var D=c.indexOf(w);c.splice(D,1),l=null}}}function h(w){if(!qv(w))throw new Error(process.env.NODE_ENV==="production"?bt(7):"Actions must be plain objects. Instead, the actual type was: '"+An(w)+"'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.");if(typeof w.type>"u")throw new Error(process.env.NODE_ENV==="production"?bt(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(p)throw new Error(process.env.NODE_ENV==="production"?bt(9):"Reducers may not dispatch actions.");try{p=!0,a=o(a,w)}finally{p=!1}for(var T=l=c,E=0;E<T.length;E++){var D=T[E];D()}return w}function g(w){if(typeof w!="function")throw new Error(process.env.NODE_ENV==="production"?bt(10):"Expected the nextReducer to be a function. Instead, received: '"+An(w));o=w,h({type:xc.REPLACE})}function v(){var w,T=u;return w={subscribe:function(D){if(typeof D!="object"||D===null)throw new Error(process.env.NODE_ENV==="production"?bt(11):"Expected the observer to be an object. Instead, received: '"+An(D)+"'");function k(){D.next&&D.next(m())}k();var I=T(k);return{unsubscribe:I}}},w[Nc]=function(){return this},w}return h({type:xc.INIT}),r={dispatch:h,subscribe:u,getState:m,replaceReducer:g},r[Nc]=v,r}function kc(e,t){return function(){return t(e.apply(this,arguments))}}function Ic(e,t){if(typeof e=="function")return kc(e,t);if(typeof e!="object"||e===null)throw new Error(process.env.NODE_ENV==="production"?bt(16):"bindActionCreators expected an object or a function, but instead received: '"+An(e)+`'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?`);var n={};for(var r in e){var o=e[r];typeof o=="function"&&(n[r]=kc(o,t))}return n}function kp(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.length===0?function(r){return r}:t.length===1?t[0]:t.reduce(function(r,o){return function(){return r(o.apply(void 0,arguments))}})}function ey(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){return function(){var o=r.apply(void 0,arguments),a=function(){throw new Error(process.env.NODE_ENV==="production"?bt(15):"Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},l={getState:o.getState,dispatch:function(){return a.apply(void 0,arguments)}},c=t.map(function(p){return p(l)});return a=kp.apply(void 0,c)(o.dispatch),Dc(Dc({},o),{},{dispatch:a})}}}var Ia={exports:{}},Ma={exports:{}},Oe={};/** @license React v16.13.1
|
|
327
327
|
* react-is.production.min.js
|
|
328
328
|
*
|
|
329
329
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
330
330
|
*
|
|
331
331
|
* This source code is licensed under the MIT license found in the
|
|
332
332
|
* LICENSE file in the root directory of this source tree.
|
|
333
|
-
*/var
|
|
333
|
+
*/var Mc;function ty(){if(Mc)return Oe;Mc=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,l=e?Symbol.for("react.provider"):60109,c=e?Symbol.for("react.context"):60110,p=e?Symbol.for("react.async_mode"):60111,f=e?Symbol.for("react.concurrent_mode"):60111,m=e?Symbol.for("react.forward_ref"):60112,u=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,g=e?Symbol.for("react.memo"):60115,v=e?Symbol.for("react.lazy"):60116,w=e?Symbol.for("react.block"):60121,T=e?Symbol.for("react.fundamental"):60117,E=e?Symbol.for("react.responder"):60118,D=e?Symbol.for("react.scope"):60119;function k(x){if(typeof x=="object"&&x!==null){var F=x.$$typeof;switch(F){case t:switch(x=x.type,x){case p:case f:case r:case a:case o:case u:return x;default:switch(x=x&&x.$$typeof,x){case c:case m:case v:case g:case l:return x;default:return F}}case n:return F}}}function I(x){return k(x)===f}return Oe.AsyncMode=p,Oe.ConcurrentMode=f,Oe.ContextConsumer=c,Oe.ContextProvider=l,Oe.Element=t,Oe.ForwardRef=m,Oe.Fragment=r,Oe.Lazy=v,Oe.Memo=g,Oe.Portal=n,Oe.Profiler=a,Oe.StrictMode=o,Oe.Suspense=u,Oe.isAsyncMode=function(x){return I(x)||k(x)===p},Oe.isConcurrentMode=I,Oe.isContextConsumer=function(x){return k(x)===c},Oe.isContextProvider=function(x){return k(x)===l},Oe.isElement=function(x){return typeof x=="object"&&x!==null&&x.$$typeof===t},Oe.isForwardRef=function(x){return k(x)===m},Oe.isFragment=function(x){return k(x)===r},Oe.isLazy=function(x){return k(x)===v},Oe.isMemo=function(x){return k(x)===g},Oe.isPortal=function(x){return k(x)===n},Oe.isProfiler=function(x){return k(x)===a},Oe.isStrictMode=function(x){return k(x)===o},Oe.isSuspense=function(x){return k(x)===u},Oe.isValidElementType=function(x){return typeof x=="string"||typeof x=="function"||x===r||x===f||x===a||x===o||x===u||x===h||typeof x=="object"&&x!==null&&(x.$$typeof===v||x.$$typeof===g||x.$$typeof===l||x.$$typeof===c||x.$$typeof===m||x.$$typeof===T||x.$$typeof===E||x.$$typeof===D||x.$$typeof===w)},Oe.typeOf=k,Oe}var Le={};/** @license React v16.13.1
|
|
334
334
|
* react-is.development.js
|
|
335
335
|
*
|
|
336
336
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
337
337
|
*
|
|
338
338
|
* This source code is licensed under the MIT license found in the
|
|
339
339
|
* LICENSE file in the root directory of this source tree.
|
|
340
|
-
*/var
|
|
340
|
+
*/var _c;function ny(){return _c||(_c=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,l=e?Symbol.for("react.provider"):60109,c=e?Symbol.for("react.context"):60110,p=e?Symbol.for("react.async_mode"):60111,f=e?Symbol.for("react.concurrent_mode"):60111,m=e?Symbol.for("react.forward_ref"):60112,u=e?Symbol.for("react.suspense"):60113,h=e?Symbol.for("react.suspense_list"):60120,g=e?Symbol.for("react.memo"):60115,v=e?Symbol.for("react.lazy"):60116,w=e?Symbol.for("react.block"):60121,T=e?Symbol.for("react.fundamental"):60117,E=e?Symbol.for("react.responder"):60118,D=e?Symbol.for("react.scope"):60119;function k(ne){return typeof ne=="string"||typeof ne=="function"||ne===r||ne===f||ne===a||ne===o||ne===u||ne===h||typeof ne=="object"&&ne!==null&&(ne.$$typeof===v||ne.$$typeof===g||ne.$$typeof===l||ne.$$typeof===c||ne.$$typeof===m||ne.$$typeof===T||ne.$$typeof===E||ne.$$typeof===D||ne.$$typeof===w)}function I(ne){if(typeof ne=="object"&&ne!==null){var Ee=ne.$$typeof;switch(Ee){case t:var Me=ne.type;switch(Me){case p:case f:case r:case a:case o:case u:return Me;default:var it=Me&&Me.$$typeof;switch(it){case c:case m:case v:case g:case l:return it;default:return Ee}}case n:return Ee}}}var x=p,F=f,L=c,C=l,R=t,O=m,W=r,z=v,M=g,U=n,G=a,j=o,A=u,ee=!1;function le(ne){return ee||(ee=!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.")),P(ne)||I(ne)===p}function P(ne){return I(ne)===f}function Y(ne){return I(ne)===c}function se(ne){return I(ne)===l}function re(ne){return typeof ne=="object"&&ne!==null&&ne.$$typeof===t}function Q(ne){return I(ne)===m}function V(ne){return I(ne)===r}function Z(ne){return I(ne)===v}function J(ne){return I(ne)===g}function ae(ne){return I(ne)===n}function te(ne){return I(ne)===a}function me(ne){return I(ne)===o}function ie(ne){return I(ne)===u}Le.AsyncMode=x,Le.ConcurrentMode=F,Le.ContextConsumer=L,Le.ContextProvider=C,Le.Element=R,Le.ForwardRef=O,Le.Fragment=W,Le.Lazy=z,Le.Memo=M,Le.Portal=U,Le.Profiler=G,Le.StrictMode=j,Le.Suspense=A,Le.isAsyncMode=le,Le.isConcurrentMode=P,Le.isContextConsumer=Y,Le.isContextProvider=se,Le.isElement=re,Le.isForwardRef=Q,Le.isFragment=V,Le.isLazy=Z,Le.isMemo=J,Le.isPortal=ae,Le.isProfiler=te,Le.isStrictMode=me,Le.isSuspense=ie,Le.isValidElementType=k,Le.typeOf=I}()),Le}process.env.NODE_ENV==="production"?Ma.exports=ty():Ma.exports=ny();var Xa=Ma.exports;/*
|
|
341
341
|
object-assign
|
|
342
342
|
(c) Sindre Sorhus
|
|
343
343
|
@license MIT
|
|
344
|
-
*/var
|
|
345
|
-
Valid keys: `+JSON.stringify(Object.keys(
|
|
344
|
+
*/var qo,Rc;function ry(){if(Rc)return qo;Rc=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(a){if(a==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(a)}function o(){try{if(!Object.assign)return!1;var a=new String("abc");if(a[5]="de",Object.getOwnPropertyNames(a)[0]==="5")return!1;for(var l={},c=0;c<10;c++)l["_"+String.fromCharCode(c)]=c;var p=Object.getOwnPropertyNames(l).map(function(m){return l[m]});if(p.join("")!=="0123456789")return!1;var f={};return"abcdefghijklmnopqrst".split("").forEach(function(m){f[m]=m}),Object.keys(Object.assign({},f)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return qo=o()?Object.assign:function(a,l){for(var c,p=r(a),f,m=1;m<arguments.length;m++){c=Object(arguments[m]);for(var u in c)t.call(c,u)&&(p[u]=c[u]);if(e){f=e(c);for(var h=0;h<f.length;h++)n.call(c,f[h])&&(p[f[h]]=c[f[h]])}}return p},qo}var Jo,Oc;function Qa(){if(Oc)return Jo;Oc=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Jo=e,Jo}var Zo,Lc;function Ip(){return Lc||(Lc=1,Zo=Function.call.bind(Object.prototype.hasOwnProperty)),Zo}var Xo,Pc;function sy(){if(Pc)return Xo;Pc=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Qa(),n={},r=Ip();e=function(a){var l="Warning: "+a;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}}}function o(a,l,c,p,f){if(process.env.NODE_ENV!=="production"){for(var m in a)if(r(a,m)){var u;try{if(typeof a[m]!="function"){var h=Error((p||"React class")+": "+c+" type `"+m+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[m]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw h.name="Invariant Violation",h}u=a[m](l,m,p,c,null,t)}catch(v){u=v}if(u&&!(u instanceof Error)&&e((p||"React class")+": type specification of "+c+" `"+m+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof u+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),u instanceof Error&&!(u.message in n)){n[u.message]=!0;var g=f?f():"";e("Failed "+c+" type: "+u.message+(g??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Xo=o,Xo}var Qo,Bc;function oy(){if(Bc)return Qo;Bc=1;var e=Xa,t=ry(),n=Qa(),r=Ip(),o=sy(),a=function(){};process.env.NODE_ENV!=="production"&&(a=function(c){var p="Warning: "+c;typeof console<"u"&&console.error(p);try{throw new Error(p)}catch{}});function l(){return null}return Qo=function(c,p){var f=typeof Symbol=="function"&&Symbol.iterator,m="@@iterator";function u(P){var Y=P&&(f&&P[f]||P[m]);if(typeof Y=="function")return Y}var h="<<anonymous>>",g={array:E("array"),bigint:E("bigint"),bool:E("boolean"),func:E("function"),number:E("number"),object:E("object"),string:E("string"),symbol:E("symbol"),any:D(),arrayOf:k,element:I(),elementType:x(),instanceOf:F,node:O(),objectOf:C,oneOf:L,oneOfType:R,shape:z,exact:M};function v(P,Y){return P===Y?P!==0||1/P===1/Y:P!==P&&Y!==Y}function w(P,Y){this.message=P,this.data=Y&&typeof Y=="object"?Y:{},this.stack=""}w.prototype=Error.prototype;function T(P){if(process.env.NODE_ENV!=="production")var Y={},se=0;function re(V,Z,J,ae,te,me,ie){if(ae=ae||h,me=me||J,ie!==n){if(p){var ne=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 ne.name="Invariant Violation",ne}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var Ee=ae+":"+J;!Y[Ee]&&se<3&&(a("You are manually calling a React.PropTypes validation function for the `"+me+"` prop on `"+ae+"`. 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."),Y[Ee]=!0,se++)}}return Z[J]==null?V?Z[J]===null?new w("The "+te+" `"+me+"` is marked as required "+("in `"+ae+"`, but its value is `null`.")):new w("The "+te+" `"+me+"` is marked as required in "+("`"+ae+"`, but its value is `undefined`.")):null:P(Z,J,ae,te,me)}var Q=re.bind(null,!1);return Q.isRequired=re.bind(null,!0),Q}function E(P){function Y(se,re,Q,V,Z,J){var ae=se[re],te=j(ae);if(te!==P){var me=A(ae);return new w("Invalid "+V+" `"+Z+"` of type "+("`"+me+"` supplied to `"+Q+"`, expected ")+("`"+P+"`."),{expectedType:P})}return null}return T(Y)}function D(){return T(l)}function k(P){function Y(se,re,Q,V,Z){if(typeof P!="function")return new w("Property `"+Z+"` of component `"+Q+"` has invalid PropType notation inside arrayOf.");var J=se[re];if(!Array.isArray(J)){var ae=j(J);return new w("Invalid "+V+" `"+Z+"` of type "+("`"+ae+"` supplied to `"+Q+"`, expected an array."))}for(var te=0;te<J.length;te++){var me=P(J,te,Q,V,Z+"["+te+"]",n);if(me instanceof Error)return me}return null}return T(Y)}function I(){function P(Y,se,re,Q,V){var Z=Y[se];if(!c(Z)){var J=j(Z);return new w("Invalid "+Q+" `"+V+"` of type "+("`"+J+"` supplied to `"+re+"`, expected a single ReactElement."))}return null}return T(P)}function x(){function P(Y,se,re,Q,V){var Z=Y[se];if(!e.isValidElementType(Z)){var J=j(Z);return new w("Invalid "+Q+" `"+V+"` of type "+("`"+J+"` supplied to `"+re+"`, expected a single ReactElement type."))}return null}return T(P)}function F(P){function Y(se,re,Q,V,Z){if(!(se[re]instanceof P)){var J=P.name||h,ae=le(se[re]);return new w("Invalid "+V+" `"+Z+"` of type "+("`"+ae+"` supplied to `"+Q+"`, expected ")+("instance of `"+J+"`."))}return null}return T(Y)}function L(P){if(!Array.isArray(P))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.")),l;function Y(se,re,Q,V,Z){for(var J=se[re],ae=0;ae<P.length;ae++)if(v(J,P[ae]))return null;var te=JSON.stringify(P,function(ie,ne){var Ee=A(ne);return Ee==="symbol"?String(ne):ne});return new w("Invalid "+V+" `"+Z+"` of value `"+String(J)+"` "+("supplied to `"+Q+"`, expected one of "+te+"."))}return T(Y)}function C(P){function Y(se,re,Q,V,Z){if(typeof P!="function")return new w("Property `"+Z+"` of component `"+Q+"` has invalid PropType notation inside objectOf.");var J=se[re],ae=j(J);if(ae!=="object")return new w("Invalid "+V+" `"+Z+"` of type "+("`"+ae+"` supplied to `"+Q+"`, expected an object."));for(var te in J)if(r(J,te)){var me=P(J,te,Q,V,Z+"."+te,n);if(me instanceof Error)return me}return null}return T(Y)}function R(P){if(!Array.isArray(P))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),l;for(var Y=0;Y<P.length;Y++){var se=P[Y];if(typeof se!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+ee(se)+" at index "+Y+"."),l}function re(Q,V,Z,J,ae){for(var te=[],me=0;me<P.length;me++){var ie=P[me],ne=ie(Q,V,Z,J,ae,n);if(ne==null)return null;ne.data&&r(ne.data,"expectedType")&&te.push(ne.data.expectedType)}var Ee=te.length>0?", expected one of type ["+te.join(", ")+"]":"";return new w("Invalid "+J+" `"+ae+"` supplied to "+("`"+Z+"`"+Ee+"."))}return T(re)}function O(){function P(Y,se,re,Q,V){return U(Y[se])?null:new w("Invalid "+Q+" `"+V+"` supplied to "+("`"+re+"`, expected a ReactNode."))}return T(P)}function W(P,Y,se,re,Q){return new w((P||"React class")+": "+Y+" type `"+se+"."+re+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+Q+"`.")}function z(P){function Y(se,re,Q,V,Z){var J=se[re],ae=j(J);if(ae!=="object")return new w("Invalid "+V+" `"+Z+"` of type `"+ae+"` "+("supplied to `"+Q+"`, expected `object`."));for(var te in P){var me=P[te];if(typeof me!="function")return W(Q,V,Z,te,A(me));var ie=me(J,te,Q,V,Z+"."+te,n);if(ie)return ie}return null}return T(Y)}function M(P){function Y(se,re,Q,V,Z){var J=se[re],ae=j(J);if(ae!=="object")return new w("Invalid "+V+" `"+Z+"` of type `"+ae+"` "+("supplied to `"+Q+"`, expected `object`."));var te=t({},se[re],P);for(var me in te){var ie=P[me];if(r(P,me)&&typeof ie!="function")return W(Q,V,Z,me,A(ie));if(!ie)return new w("Invalid "+V+" `"+Z+"` key `"+me+"` supplied to `"+Q+"`.\nBad object: "+JSON.stringify(se[re],null," ")+`
|
|
345
|
+
Valid keys: `+JSON.stringify(Object.keys(P),null," "));var ne=ie(J,me,Q,V,Z+"."+me,n);if(ne)return ne}return null}return T(Y)}function U(P){switch(typeof P){case"number":case"string":case"undefined":return!0;case"boolean":return!P;case"object":if(Array.isArray(P))return P.every(U);if(P===null||c(P))return!0;var Y=u(P);if(Y){var se=Y.call(P),re;if(Y!==P.entries){for(;!(re=se.next()).done;)if(!U(re.value))return!1}else for(;!(re=se.next()).done;){var Q=re.value;if(Q&&!U(Q[1]))return!1}}else return!1;return!0;default:return!1}}function G(P,Y){return P==="symbol"?!0:Y?Y["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&Y instanceof Symbol:!1}function j(P){var Y=typeof P;return Array.isArray(P)?"array":P instanceof RegExp?"object":G(Y,P)?"symbol":Y}function A(P){if(typeof P>"u"||P===null)return""+P;var Y=j(P);if(Y==="object"){if(P instanceof Date)return"date";if(P instanceof RegExp)return"regexp"}return Y}function ee(P){var Y=A(P);switch(Y){case"array":case"object":return"an "+Y;case"boolean":case"date":case"regexp":return"a "+Y;default:return Y}}function le(P){return!P.constructor||!P.constructor.name?h:P.constructor.name}return g.checkPropTypes=o,g.resetWarningCache=o.resetWarningCache,g.PropTypes=g,g},Qo}var ea,Ac;function ay(){if(Ac)return ea;Ac=1;var e=Qa();function t(){}function n(){}return n.resetWarningCache=t,ea=function(){function r(l,c,p,f,m,u){if(u!==e){var h=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 h.name="Invariant Violation",h}}r.isRequired=r;function o(){return r}var a={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return a.PropTypes=a,a},ea}if(process.env.NODE_ENV!=="production"){var iy=Xa,ly=!0;Ia.exports=oy()(iy.isElement,ly)}else Ia.exports=ay()();var cy=Ia.exports;const ir=za(cy);var ei=_.createContext(null);process.env.NODE_ENV!=="production"&&(ei.displayName="ReactRedux");function dy(e){e()}var Mp=dy,py=function(t){return Mp=t},uy=function(){return Mp};function my(){var e=uy(),t=null,n=null;return{clear:function(){t=null,n=null},notify:function(){e(function(){for(var o=t;o;)o.callback(),o=o.next})},get:function(){for(var o=[],a=t;a;)o.push(a),a=a.next;return o},subscribe:function(o){var a=!0,l=n={callback:o,next:null,prev:n};return l.prev?l.prev.next=l:t=l,function(){!a||t===null||(a=!1,l.next?l.next.prev=l.prev:n=l.prev,l.prev?l.prev.next=l.next:t=l.next)}}}}var Fc={notify:function(){},get:function(){return[]}};function _p(e,t){var n,r=Fc;function o(u){return p(),r.subscribe(u)}function a(){r.notify()}function l(){m.onStateChange&&m.onStateChange()}function c(){return!!n}function p(){n||(n=t?t.addNestedSub(l):e.subscribe(l),r=my())}function f(){n&&(n(),n=void 0,r.clear(),r=Fc)}var m={addNestedSub:o,notifyNestedSubs:a,handleChangeWrapper:l,isSubscribed:c,trySubscribe:p,tryUnsubscribe:f,getListeners:function(){return r}};return m}var Rp=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?_.useLayoutEffect:_.useEffect;function Op(e){var t=e.store,n=e.context,r=e.children,o=_.useMemo(function(){var c=_p(t);return{store:t,subscription:c}},[t]),a=_.useMemo(function(){return t.getState()},[t]);Rp(function(){var c=o.subscription;return c.onStateChange=c.notifyNestedSubs,c.trySubscribe(),a!==t.getState()&&c.notifyNestedSubs(),function(){c.tryUnsubscribe(),c.onStateChange=null}},[o,a]);var l=n||ei;return _.createElement(l.Provider,{value:o},r)}process.env.NODE_ENV!=="production"&&(Op.propTypes={store:ir.shape({subscribe:ir.func.isRequired,dispatch:ir.func.isRequired,getState:ir.func.isRequired}),context:ir.object,children:ir.any});function Hs(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var ti=Xa,fy={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},hy={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Sy={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Lp={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},ni={};ni[ti.ForwardRef]=Sy;ni[ti.Memo]=Lp;function Vc(e){return ti.isMemo(e)?Lp:ni[e.$$typeof]||fy}var gy=Object.defineProperty,by=Object.getOwnPropertyNames,$c=Object.getOwnPropertySymbols,vy=Object.getOwnPropertyDescriptor,yy=Object.getPrototypeOf,Kc=Object.prototype;function Pp(e,t,n){if(typeof t!="string"){if(Kc){var r=yy(t);r&&r!==Kc&&Pp(e,r,n)}var o=by(t);$c&&(o=o.concat($c(t)));for(var a=Vc(e),l=Vc(t),c=0;c<o.length;++c){var p=o[c];if(!hy[p]&&!(n&&n[p])&&!(l&&l[p])&&!(a&&a[p])){var f=vy(t,p);try{gy(e,p,f)}catch{}}}}return e}var Ty=Pp;const Hc=za(Ty);var _a={exports:{}},Fe={};/** @license React v17.0.2
|
|
346
346
|
* react-is.production.min.js
|
|
347
347
|
*
|
|
348
348
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
349
349
|
*
|
|
350
350
|
* This source code is licensed under the MIT license found in the
|
|
351
351
|
* LICENSE file in the root directory of this source tree.
|
|
352
|
-
*/var
|
|
352
|
+
*/var Wc;function Ey(){if(Wc)return Fe;Wc=1;var e=60103,t=60106,n=60107,r=60108,o=60114,a=60109,l=60110,c=60112,p=60113,f=60120,m=60115,u=60116,h=60121,g=60122,v=60117,w=60129,T=60131;if(typeof Symbol=="function"&&Symbol.for){var E=Symbol.for;e=E("react.element"),t=E("react.portal"),n=E("react.fragment"),r=E("react.strict_mode"),o=E("react.profiler"),a=E("react.provider"),l=E("react.context"),c=E("react.forward_ref"),p=E("react.suspense"),f=E("react.suspense_list"),m=E("react.memo"),u=E("react.lazy"),h=E("react.block"),g=E("react.server.block"),v=E("react.fundamental"),w=E("react.debug_trace_mode"),T=E("react.legacy_hidden")}function D(M){if(typeof M=="object"&&M!==null){var U=M.$$typeof;switch(U){case e:switch(M=M.type,M){case n:case o:case r:case p:case f:return M;default:switch(M=M&&M.$$typeof,M){case l:case c:case u:case m:case a:return M;default:return U}}case t:return U}}}var k=a,I=e,x=c,F=n,L=u,C=m,R=t,O=o,W=r,z=p;return Fe.ContextConsumer=l,Fe.ContextProvider=k,Fe.Element=I,Fe.ForwardRef=x,Fe.Fragment=F,Fe.Lazy=L,Fe.Memo=C,Fe.Portal=R,Fe.Profiler=O,Fe.StrictMode=W,Fe.Suspense=z,Fe.isAsyncMode=function(){return!1},Fe.isConcurrentMode=function(){return!1},Fe.isContextConsumer=function(M){return D(M)===l},Fe.isContextProvider=function(M){return D(M)===a},Fe.isElement=function(M){return typeof M=="object"&&M!==null&&M.$$typeof===e},Fe.isForwardRef=function(M){return D(M)===c},Fe.isFragment=function(M){return D(M)===n},Fe.isLazy=function(M){return D(M)===u},Fe.isMemo=function(M){return D(M)===m},Fe.isPortal=function(M){return D(M)===t},Fe.isProfiler=function(M){return D(M)===o},Fe.isStrictMode=function(M){return D(M)===r},Fe.isSuspense=function(M){return D(M)===p},Fe.isValidElementType=function(M){return typeof M=="string"||typeof M=="function"||M===n||M===o||M===w||M===r||M===p||M===f||M===T||typeof M=="object"&&M!==null&&(M.$$typeof===u||M.$$typeof===m||M.$$typeof===a||M.$$typeof===l||M.$$typeof===c||M.$$typeof===v||M.$$typeof===h||M[0]===g)},Fe.typeOf=D,Fe}var Ve={};/** @license React v17.0.2
|
|
353
353
|
* react-is.development.js
|
|
354
354
|
*
|
|
355
355
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
356
356
|
*
|
|
357
357
|
* This source code is licensed under the MIT license found in the
|
|
358
358
|
* LICENSE file in the root directory of this source tree.
|
|
359
|
-
*/var Hc;function Ey(){return Hc||(Hc=1,process.env.NODE_ENV!=="production"&&function(){var e=60103,t=60106,n=60107,r=60108,a=60114,o=60109,l=60110,c=60112,p=60113,f=60120,m=60115,u=60116,h=60121,g=60122,v=60117,C=60129,T=60131;if(typeof Symbol=="function"&&Symbol.for){var E=Symbol.for;e=E("react.element"),t=E("react.portal"),n=E("react.fragment"),r=E("react.strict_mode"),a=E("react.profiler"),o=E("react.provider"),l=E("react.context"),c=E("react.forward_ref"),p=E("react.suspense"),f=E("react.suspense_list"),m=E("react.memo"),u=E("react.lazy"),h=E("react.block"),g=E("react.server.block"),v=E("react.fundamental"),E("react.scope"),E("react.opaque.id"),C=E("react.debug_trace_mode"),E("react.offscreen"),T=E("react.legacy_hidden")}var N=!1;function x(le){return!!(typeof le=="string"||typeof le=="function"||le===n||le===a||le===C||le===r||le===p||le===f||le===T||N||typeof le=="object"&&le!==null&&(le.$$typeof===u||le.$$typeof===m||le.$$typeof===o||le.$$typeof===l||le.$$typeof===c||le.$$typeof===v||le.$$typeof===h||le[0]===g))}function k(le){if(typeof le=="object"&&le!==null){var ne=le.$$typeof;switch(ne){case e:var Ce=le.type;switch(Ce){case n:case a:case r:case p:case f:return Ce;default:var Re=Ce&&Ce.$$typeof;switch(Re){case l:case c:case u:case m:case o:return Re;default:return ne}}case t:return ne}}}var I=l,A=o,R=e,w=c,_=n,O=u,K=m,z=t,M=a,Y=r,W=p,j=!1,B=!1;function re(le){return j||(j=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function de(le){return B||(B=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function L(le){return k(le)===l}function G(le){return k(le)===o}function se(le){return typeof le=="object"&&le!==null&&le.$$typeof===e}function ae(le){return k(le)===c}function ee(le){return k(le)===n}function F(le){return k(le)===u}function J(le){return k(le)===m}function Z(le){return k(le)===t}function ie(le){return k(le)===a}function te(le){return k(le)===r}function fe(le){return k(le)===p}$e.ContextConsumer=I,$e.ContextProvider=A,$e.Element=R,$e.ForwardRef=w,$e.Fragment=_,$e.Lazy=O,$e.Memo=K,$e.Portal=z,$e.Profiler=M,$e.StrictMode=Y,$e.Suspense=W,$e.isAsyncMode=re,$e.isConcurrentMode=de,$e.isContextConsumer=L,$e.isContextProvider=G,$e.isElement=se,$e.isForwardRef=ae,$e.isFragment=ee,$e.isLazy=F,$e.isMemo=J,$e.isPortal=Z,$e.isProfiler=ie,$e.isStrictMode=te,$e.isSuspense=fe,$e.isValidElementType=x,$e.typeOf=k}()),$e}(function(e){process.env.NODE_ENV==="production"?e.exports=Ty():e.exports=Ey()})(_o);var wy=["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"],Cy=["reactReduxForwardedRef"],Dy=[],Ny=[null,null],xy=function(t){try{return JSON.stringify(t)}catch{return String(t)}};function ky(e,t){var n=e[1];return[t.payload,n+1]}function Wc(e,t,n){Rp(function(){return e.apply(void 0,t)},n)}function Iy(e,t,n,r,a,o,l){e.current=r,t.current=a,n.current=!1,o.current&&(o.current=null,l())}function My(e,t,n,r,a,o,l,c,p,f){if(!!e){var m=!1,u=null,h=function(){if(!m){var C=t.getState(),T,E;try{T=r(C,a.current)}catch(N){E=N,u=N}E||(u=null),T===o.current?l.current||p():(o.current=T,c.current=T,l.current=!0,f({type:"STORE_UPDATED",payload:{error:E}}))}};n.onStateChange=h,n.trySubscribe(),h();var g=function(){if(m=!0,n.tryUnsubscribe(),n.onStateChange=null,u)throw u};return g}}var _y=function(){return[null,0]};function Ry(e,t){t===void 0&&(t={});var n=t,r=n.getDisplayName,a=r===void 0?function(A){return"ConnectAdvanced("+A+")"}:r,o=n.methodName,l=o===void 0?"connectAdvanced":o,c=n.renderCountProp,p=c===void 0?void 0:c,f=n.shouldHandleStateChanges,m=f===void 0?!0:f,u=n.storeKey,h=u===void 0?"store":u,g=n.withRef,v=g===void 0?!1:g,C=n.forwardRef,T=C===void 0?!1:C,E=n.context,N=E===void 0?Qo:E,x=Ws(n,wy);if(process.env.NODE_ENV!=="production"){if(p!==void 0)throw new Error("renderCountProp is removed. render counting is built into the latest React Dev Tools profiling extension");if(v)throw new Error("withRef is removed. To access the wrapped instance, use a ref on the connected component");var k="To use a custom Redux store for specific components, create a custom React context with React.createContext(), and pass the context object to React Redux's Provider and specific components like: <Provider context={MyContext}><ConnectedComponent context={MyContext} /></Provider>. You may also pass a {context : MyContext} option to connect";if(h!=="store")throw new Error("storeKey has been removed and does not do anything. "+k)}var I=N;return function(R){if(process.env.NODE_ENV!=="production"&&!_o.exports.isValidElementType(R))throw new Error("You must pass a component to the function returned by "+(l+". Instead received "+xy(R)));var w=R.displayName||R.name||"Component",_=a(w),O=ge({},x,{getDisplayName:a,methodName:l,renderCountProp:p,shouldHandleStateChanges:m,storeKey:h,displayName:_,wrappedComponentName:w,WrappedComponent:R}),K=x.pure;function z(B){return e(B.dispatch,O)}var M=K?U.useMemo:function(B){return B()};function Y(B){var re=U.useMemo(function(){var Ae=B.reactReduxForwardedRef,Tt=Ws(B,Cy);return[B.context,Ae,Tt]},[B]),de=re[0],L=re[1],G=re[2],se=U.useMemo(function(){return de&&de.Consumer&&_o.exports.isContextConsumer(X.default.createElement(de.Consumer,null))?de:I},[de,I]),ae=U.useContext(se),ee=Boolean(B.store)&&Boolean(B.store.getState)&&Boolean(B.store.dispatch),F=Boolean(ae)&&Boolean(ae.store);if(process.env.NODE_ENV!=="production"&&!ee&&!F)throw new Error('Could not find "store" in the context of '+('"'+_+'". Either wrap the root component in a <Provider>, ')+"or pass a custom React context provider to <Provider> and the corresponding "+("React context consumer to "+_+" in connect options."));var J=ee?B.store:ae.store,Z=U.useMemo(function(){return z(J)},[J]),ie=U.useMemo(function(){if(!m)return Ny;var Ae=_p(J,ee?null:ae.subscription),Tt=Ae.notifyNestedSubs.bind(Ae);return[Ae,Tt]},[J,ee,ae]),te=ie[0],fe=ie[1],le=U.useMemo(function(){return ee?ae:ge({},ae,{subscription:te})},[ee,ae,te]),ne=U.useReducer(ky,Dy,_y),Ce=ne[0],Re=Ce[0],it=ne[1];if(Re&&Re.error)throw Re.error;var mt=U.useRef(),lt=U.useRef(G),ye=U.useRef(),Be=U.useRef(!1),Ze=M(function(){return ye.current&&G===lt.current?ye.current:Z(J.getState(),G)},[J,Re,G]);Wc(Iy,[lt,mt,Be,G,Ze,ye,fe]),Wc(My,[m,J,te,Z,lt,mt,Be,ye,fe,it],[J,te,Z]);var he=U.useMemo(function(){return X.default.createElement(R,ge({},Ze,{ref:L}))},[L,R,Ze]),We=U.useMemo(function(){return m?X.default.createElement(se.Provider,{value:le},he):he},[se,he,le]);return We}var W=K?X.default.memo(Y):Y;if(W.WrappedComponent=R,W.displayName=Y.displayName=_,T){var j=X.default.forwardRef(function(re,de){return X.default.createElement(W,ge({},re,{reactReduxForwardedRef:de}))});return j.displayName=_,j.WrappedComponent=R,$c(j,R)}return $c(W,R)}}function Gc(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function no(e,t){if(Gc(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var a=0;a<n.length;a++)if(!Object.prototype.hasOwnProperty.call(t,n[a])||!Gc(e[n[a]],t[n[a]]))return!1;return!0}function Oy(e,t){var n={},r=function(l){var c=e[l];typeof c=="function"&&(n[l]=function(){return t(c.apply(void 0,arguments))})};for(var a in e)r(a);return n}function Ly(e){if(typeof e!="object"||e===null)return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var n=t;Object.getPrototypeOf(n)!==null;)n=Object.getPrototypeOf(n);return t===n}function Bp(e){typeof console<"u"&&typeof console.error=="function"&&console.error(e);try{throw new Error(e)}catch{}}function Ap(e,t,n){Ly(e)||Bp(n+"() in "+t+" must return a plain object. Instead received "+e+".")}function ni(e){return function(n,r){var a=e(n,r);function o(){return a}return o.dependsOnOwnProps=!1,o}}function Yc(e){return e.dependsOnOwnProps!==null&&e.dependsOnOwnProps!==void 0?Boolean(e.dependsOnOwnProps):e.length!==1}function Fp(e,t){return function(r,a){var o=a.displayName,l=function(p,f){return l.dependsOnOwnProps?l.mapToProps(p,f):l.mapToProps(p)};return l.dependsOnOwnProps=!0,l.mapToProps=function(p,f){l.mapToProps=e,l.dependsOnOwnProps=Yc(e);var m=l(p,f);return typeof m=="function"&&(l.mapToProps=m,l.dependsOnOwnProps=Yc(m),m=l(p,f)),process.env.NODE_ENV!=="production"&&Ap(m,o,t),m},l}}function Py(e){return typeof e=="function"?Fp(e,"mapDispatchToProps"):void 0}function By(e){return e?void 0:ni(function(t){return{dispatch:t}})}function Ay(e){return e&&typeof e=="object"?ni(function(t){return Oy(e,t)}):void 0}const Fy=[Py,By,Ay];function Vy(e){return typeof e=="function"?Fp(e,"mapStateToProps"):void 0}function $y(e){return e?void 0:ni(function(){return{}})}const Ky=[Vy,$y];function Hy(e,t,n){return ge({},n,e,t)}function Wy(e){return function(n,r){var a=r.displayName,o=r.pure,l=r.areMergedPropsEqual,c=!1,p;return function(m,u,h){var g=e(m,u,h);return c?(!o||!l(g,p))&&(p=g):(c=!0,p=g,process.env.NODE_ENV!=="production"&&Ap(p,a,"mergeProps")),p}}}function Gy(e){return typeof e=="function"?Wy(e):void 0}function Yy(e){return e?void 0:function(){return Hy}}const Uy=[Gy,Yy];function ro(e,t,n){if(e)(t==="mapStateToProps"||t==="mapDispatchToProps")&&(Object.prototype.hasOwnProperty.call(e,"dependsOnOwnProps")||Bp("The selector for "+t+" of "+n+" did not specify a value for dependsOnOwnProps."));else throw new Error("Unexpected value for "+t+" in "+n+".")}function jy(e,t,n,r){ro(e,"mapStateToProps",r),ro(t,"mapDispatchToProps",r),ro(n,"mergeProps",r)}var zy=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function qy(e,t,n,r){return function(o,l){return n(e(o,l),t(r,l),l)}}function Jy(e,t,n,r,a){var o=a.areStatesEqual,l=a.areOwnPropsEqual,c=a.areStatePropsEqual,p=!1,f,m,u,h,g;function v(x,k){return f=x,m=k,u=e(f,m),h=t(r,m),g=n(u,h,m),p=!0,g}function C(){return u=e(f,m),t.dependsOnOwnProps&&(h=t(r,m)),g=n(u,h,m),g}function T(){return e.dependsOnOwnProps&&(u=e(f,m)),t.dependsOnOwnProps&&(h=t(r,m)),g=n(u,h,m),g}function E(){var x=e(f,m),k=!c(x,u);return u=x,k&&(g=n(u,h,m)),g}function N(x,k){var I=!l(k,m),A=!o(x,f,k,m);return f=x,m=k,I&&A?C():I?T():A?E():g}return function(k,I){return p?N(k,I):v(k,I)}}function Zy(e,t){var n=t.initMapStateToProps,r=t.initMapDispatchToProps,a=t.initMergeProps,o=Ws(t,zy),l=n(e,o),c=r(e,o),p=a(e,o);process.env.NODE_ENV!=="production"&&jy(l,c,p,o.displayName);var f=o.pure?Jy:qy;return f(l,c,p,e,o)}var Xy=["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"];function so(e,t,n){for(var r=t.length-1;r>=0;r--){var a=t[r](e);if(a)return a}return function(o,l){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+l.wrappedComponentName+".")}}function Qy(e,t){return e===t}function eT(e){var t=e===void 0?{}:e,n=t.connectHOC,r=n===void 0?Ry:n,a=t.mapStateToPropsFactories,o=a===void 0?Ky:a,l=t.mapDispatchToPropsFactories,c=l===void 0?Fy:l,p=t.mergePropsFactories,f=p===void 0?Uy:p,m=t.selectorFactory,u=m===void 0?Zy:m;return function(g,v,C,T){T===void 0&&(T={});var E=T,N=E.pure,x=N===void 0?!0:N,k=E.areStatesEqual,I=k===void 0?Qy:k,A=E.areOwnPropsEqual,R=A===void 0?no:A,w=E.areStatePropsEqual,_=w===void 0?no:w,O=E.areMergedPropsEqual,K=O===void 0?no:O,z=Ws(E,Xy),M=so(g,o,"mapStateToProps"),Y=so(v,c,"mapDispatchToProps"),W=so(C,f,"mergeProps");return r(u,ge({methodName:"connect",getDisplayName:function(B){return"Connect("+B+")"},shouldHandleStateChanges:Boolean(g),initMapStateToProps:M,initMapDispatchToProps:Y,initMergeProps:W,pure:x,areStatesEqual:I,areOwnPropsEqual:R,areStatePropsEqual:_,areMergedPropsEqual:K},z))}}const Vp=eT();py(ea.unstable_batchedUpdates);function tT(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function $p(e,t){var n=U.useState(function(){return{inputs:t,result:e()}})[0],r=U.useRef(!0),a=U.useRef(n),o=r.current||Boolean(t&&a.current.inputs&&tT(t,a.current.inputs)),l=o?a.current:{inputs:t,result:e()};return U.useEffect(function(){r.current=!1,a.current=l},[l]),l.result}function nT(e,t){return $p(function(){return e},t)}var _e=$p,Se=nT,rT=process.env.NODE_ENV==="production",ao="Invariant failed";function Uc(e,t){if(!e){if(rT)throw new Error(ao);var n=typeof t=="function"?t():t,r=n?"".concat(ao,": ").concat(n):ao;throw new Error(r)}}var Gt=function(t){var n=t.top,r=t.right,a=t.bottom,o=t.left,l=r-o,c=a-n,p={top:n,right:r,bottom:a,left:o,width:l,height:c,x:o,y:n,center:{x:(r+o)/2,y:(a+n)/2}};return p},ri=function(t,n){return{top:t.top-n.top,left:t.left-n.left,bottom:t.bottom+n.bottom,right:t.right+n.right}},jc=function(t,n){return{top:t.top+n.top,left:t.left+n.left,bottom:t.bottom-n.bottom,right:t.right-n.right}},sT=function(t,n){return{top:t.top+n.y,left:t.left+n.x,bottom:t.bottom+n.y,right:t.right+n.x}},oo={top:0,right:0,bottom:0,left:0},si=function(t){var n=t.borderBox,r=t.margin,a=r===void 0?oo:r,o=t.border,l=o===void 0?oo:o,c=t.padding,p=c===void 0?oo:c,f=Gt(ri(n,a)),m=Gt(jc(n,l)),u=Gt(jc(m,p));return{marginBox:f,borderBox:Gt(n),paddingBox:m,contentBox:u,margin:a,border:l,padding:p}},Mt=function(t){var n=t.slice(0,-2),r=t.slice(-2);if(r!=="px")return 0;var a=Number(n);return isNaN(a)&&(process.env.NODE_ENV!=="production"?Uc(!1,"Could not parse value [raw: "+t+", without suffix: "+n+"]"):Uc(!1)),a},aT=function(){return{x:window.pageXOffset,y:window.pageYOffset}},Gs=function(t,n){var r=t.borderBox,a=t.border,o=t.margin,l=t.padding,c=sT(r,n);return si({borderBox:c,border:a,margin:o,padding:l})},Ys=function(t,n){return n===void 0&&(n=aT()),Gs(t,n)},Kp=function(t,n){var r={top:Mt(n.marginTop),right:Mt(n.marginRight),bottom:Mt(n.marginBottom),left:Mt(n.marginLeft)},a={top:Mt(n.paddingTop),right:Mt(n.paddingRight),bottom:Mt(n.paddingBottom),left:Mt(n.paddingLeft)},o={top:Mt(n.borderTopWidth),right:Mt(n.borderRightWidth),bottom:Mt(n.borderBottomWidth),left:Mt(n.borderLeftWidth)};return si({borderBox:t,margin:r,padding:a,border:o})},Hp=function(t){var n=t.getBoundingClientRect(),r=window.getComputedStyle(t);return Kp(n,r)},zc=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function oT(e,t){return!!(e===t||zc(e)&&zc(t))}function iT(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!oT(e[n],t[n]))return!1;return!0}function rt(e,t){t===void 0&&(t=iT);var n,r=[],a,o=!1;function l(){for(var c=[],p=0;p<arguments.length;p++)c[p]=arguments[p];return o&&n===this&&t(c,r)||(a=e.apply(this,c),o=!0,n=this,r=c),a}return l}var lT=function(t){var n=[],r=null,a=function(){for(var l=arguments.length,c=new Array(l),p=0;p<l;p++)c[p]=arguments[p];n=c,!r&&(r=requestAnimationFrame(function(){r=null,t.apply(void 0,n)}))};return a.cancel=function(){!r||(cancelAnimationFrame(r),r=null)},a};const qr=lT;var cT=process.env.NODE_ENV==="production",dT=/[ \t]{2,}/g,pT=/^[ \t]*/gm,qc=function(t){return t.replace(dT," ").replace(pT,"").trim()},uT=function(t){return qc(`
|
|
359
|
+
*/var Gc;function wy(){return Gc||(Gc=1,process.env.NODE_ENV!=="production"&&function(){var e=60103,t=60106,n=60107,r=60108,o=60114,a=60109,l=60110,c=60112,p=60113,f=60120,m=60115,u=60116,h=60121,g=60122,v=60117,w=60129,T=60131;if(typeof Symbol=="function"&&Symbol.for){var E=Symbol.for;e=E("react.element"),t=E("react.portal"),n=E("react.fragment"),r=E("react.strict_mode"),o=E("react.profiler"),a=E("react.provider"),l=E("react.context"),c=E("react.forward_ref"),p=E("react.suspense"),f=E("react.suspense_list"),m=E("react.memo"),u=E("react.lazy"),h=E("react.block"),g=E("react.server.block"),v=E("react.fundamental"),E("react.scope"),E("react.opaque.id"),w=E("react.debug_trace_mode"),E("react.offscreen"),T=E("react.legacy_hidden")}var D=!1;function k(ie){return!!(typeof ie=="string"||typeof ie=="function"||ie===n||ie===o||ie===w||ie===r||ie===p||ie===f||ie===T||D||typeof ie=="object"&&ie!==null&&(ie.$$typeof===u||ie.$$typeof===m||ie.$$typeof===a||ie.$$typeof===l||ie.$$typeof===c||ie.$$typeof===v||ie.$$typeof===h||ie[0]===g))}function I(ie){if(typeof ie=="object"&&ie!==null){var ne=ie.$$typeof;switch(ne){case e:var Ee=ie.type;switch(Ee){case n:case o:case r:case p:case f:return Ee;default:var Me=Ee&&Ee.$$typeof;switch(Me){case l:case c:case u:case m:case a:return Me;default:return ne}}case t:return ne}}}var x=l,F=a,L=e,C=c,R=n,O=u,W=m,z=t,M=o,U=r,G=p,j=!1,A=!1;function ee(ie){return j||(j=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function le(ie){return A||(A=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function P(ie){return I(ie)===l}function Y(ie){return I(ie)===a}function se(ie){return typeof ie=="object"&&ie!==null&&ie.$$typeof===e}function re(ie){return I(ie)===c}function Q(ie){return I(ie)===n}function V(ie){return I(ie)===u}function Z(ie){return I(ie)===m}function J(ie){return I(ie)===t}function ae(ie){return I(ie)===o}function te(ie){return I(ie)===r}function me(ie){return I(ie)===p}Ve.ContextConsumer=x,Ve.ContextProvider=F,Ve.Element=L,Ve.ForwardRef=C,Ve.Fragment=R,Ve.Lazy=O,Ve.Memo=W,Ve.Portal=z,Ve.Profiler=M,Ve.StrictMode=U,Ve.Suspense=G,Ve.isAsyncMode=ee,Ve.isConcurrentMode=le,Ve.isContextConsumer=P,Ve.isContextProvider=Y,Ve.isElement=se,Ve.isForwardRef=re,Ve.isFragment=Q,Ve.isLazy=V,Ve.isMemo=Z,Ve.isPortal=J,Ve.isProfiler=ae,Ve.isStrictMode=te,Ve.isSuspense=me,Ve.isValidElementType=k,Ve.typeOf=I}()),Ve}process.env.NODE_ENV==="production"?_a.exports=Ey():_a.exports=wy();var Yc=_a.exports,Cy=["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"],Dy=["reactReduxForwardedRef"],Ny=[],xy=[null,null],ky=function(t){try{return JSON.stringify(t)}catch{return String(t)}};function Iy(e,t){var n=e[1];return[t.payload,n+1]}function Uc(e,t,n){Rp(function(){return e.apply(void 0,t)},n)}function My(e,t,n,r,o,a,l){e.current=r,t.current=o,n.current=!1,a.current&&(a.current=null,l())}function _y(e,t,n,r,o,a,l,c,p,f){if(e){var m=!1,u=null,h=function(){if(!m){var w=t.getState(),T,E;try{T=r(w,o.current)}catch(D){E=D,u=D}E||(u=null),T===a.current?l.current||p():(a.current=T,c.current=T,l.current=!0,f({type:"STORE_UPDATED",payload:{error:E}}))}};n.onStateChange=h,n.trySubscribe(),h();var g=function(){if(m=!0,n.tryUnsubscribe(),n.onStateChange=null,u)throw u};return g}}var Ry=function(){return[null,0]};function Oy(e,t){t===void 0&&(t={});var n=t,r=n.getDisplayName,o=r===void 0?function(F){return"ConnectAdvanced("+F+")"}:r,a=n.methodName,l=a===void 0?"connectAdvanced":a,c=n.renderCountProp,p=c===void 0?void 0:c,f=n.shouldHandleStateChanges,m=f===void 0?!0:f,u=n.storeKey,h=u===void 0?"store":u,g=n.withRef,v=g===void 0?!1:g,w=n.forwardRef,T=w===void 0?!1:w,E=n.context,D=E===void 0?ei:E,k=Hs(n,Cy);if(process.env.NODE_ENV!=="production"){if(p!==void 0)throw new Error("renderCountProp is removed. render counting is built into the latest React Dev Tools profiling extension");if(v)throw new Error("withRef is removed. To access the wrapped instance, use a ref on the connected component");var I="To use a custom Redux store for specific components, create a custom React context with React.createContext(), and pass the context object to React Redux's Provider and specific components like: <Provider context={MyContext}><ConnectedComponent context={MyContext} /></Provider>. You may also pass a {context : MyContext} option to connect";if(h!=="store")throw new Error("storeKey has been removed and does not do anything. "+I)}var x=D;return function(L){if(process.env.NODE_ENV!=="production"&&!Yc.isValidElementType(L))throw new Error("You must pass a component to the function returned by "+(l+". Instead received "+ky(L)));var C=L.displayName||L.name||"Component",R=o(C),O=Se({},k,{getDisplayName:o,methodName:l,renderCountProp:p,shouldHandleStateChanges:m,storeKey:h,displayName:R,wrappedComponentName:C,WrappedComponent:L}),W=k.pure;function z(A){return e(A.dispatch,O)}var M=W?_.useMemo:function(A){return A()};function U(A){var ee=_.useMemo(function(){var Be=A.reactReduxForwardedRef,yt=Hs(A,Dy);return[A.context,Be,yt]},[A]),le=ee[0],P=ee[1],Y=ee[2],se=_.useMemo(function(){return le&&le.Consumer&&Yc.isContextConsumer(_.createElement(le.Consumer,null))?le:x},[le,x]),re=_.useContext(se),Q=!!A.store&&!!A.store.getState&&!!A.store.dispatch,V=!!re&&!!re.store;if(process.env.NODE_ENV!=="production"&&!Q&&!V)throw new Error('Could not find "store" in the context of '+('"'+R+'". Either wrap the root component in a <Provider>, ')+"or pass a custom React context provider to <Provider> and the corresponding "+("React context consumer to "+R+" in connect options."));var Z=Q?A.store:re.store,J=_.useMemo(function(){return z(Z)},[Z]),ae=_.useMemo(function(){if(!m)return xy;var Be=_p(Z,Q?null:re.subscription),yt=Be.notifyNestedSubs.bind(Be);return[Be,yt]},[Z,Q,re]),te=ae[0],me=ae[1],ie=_.useMemo(function(){return Q?re:Se({},re,{subscription:te})},[Q,re,te]),ne=_.useReducer(Iy,Ny,Ry),Ee=ne[0],Me=Ee[0],it=ne[1];if(Me&&Me.error)throw Me.error;var ut=_.useRef(),lt=_.useRef(Y),ve=_.useRef(),Pe=_.useRef(!1),Je=M(function(){return ve.current&&Y===lt.current?ve.current:J(Z.getState(),Y)},[Z,Me,Y]);Uc(My,[lt,ut,Pe,Y,Je,ve,me]),Uc(_y,[m,Z,te,J,lt,ut,Pe,ve,me,it],[Z,te,J]);var fe=_.useMemo(function(){return _.createElement(L,Se({},Je,{ref:P}))},[P,L,Je]),He=_.useMemo(function(){return m?_.createElement(se.Provider,{value:ie},fe):fe},[se,fe,ie]);return He}var G=W?_.memo(U):U;if(G.WrappedComponent=L,G.displayName=U.displayName=R,T){var j=_.forwardRef(function(ee,le){return _.createElement(G,Se({},ee,{reactReduxForwardedRef:le}))});return j.displayName=R,j.WrappedComponent=L,Hc(j,L)}return Hc(G,L)}}function jc(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function ta(e,t){if(jc(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var o=0;o<n.length;o++)if(!Object.prototype.hasOwnProperty.call(t,n[o])||!jc(e[n[o]],t[n[o]]))return!1;return!0}function Ly(e,t){var n={},r=function(l){var c=e[l];typeof c=="function"&&(n[l]=function(){return t(c.apply(void 0,arguments))})};for(var o in e)r(o);return n}function Py(e){if(typeof e!="object"||e===null)return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var n=t;Object.getPrototypeOf(n)!==null;)n=Object.getPrototypeOf(n);return t===n}function Bp(e){typeof console<"u"&&typeof console.error=="function"&&console.error(e);try{throw new Error(e)}catch{}}function Ap(e,t,n){Py(e)||Bp(n+"() in "+t+" must return a plain object. Instead received "+e+".")}function ri(e){return function(n,r){var o=e(n,r);function a(){return o}return a.dependsOnOwnProps=!1,a}}function zc(e){return e.dependsOnOwnProps!==null&&e.dependsOnOwnProps!==void 0?!!e.dependsOnOwnProps:e.length!==1}function Fp(e,t){return function(r,o){var a=o.displayName,l=function(p,f){return l.dependsOnOwnProps?l.mapToProps(p,f):l.mapToProps(p)};return l.dependsOnOwnProps=!0,l.mapToProps=function(p,f){l.mapToProps=e,l.dependsOnOwnProps=zc(e);var m=l(p,f);return typeof m=="function"&&(l.mapToProps=m,l.dependsOnOwnProps=zc(m),m=l(p,f)),process.env.NODE_ENV!=="production"&&Ap(m,a,t),m},l}}function By(e){return typeof e=="function"?Fp(e,"mapDispatchToProps"):void 0}function Ay(e){return e?void 0:ri(function(t){return{dispatch:t}})}function Fy(e){return e&&typeof e=="object"?ri(function(t){return Ly(e,t)}):void 0}const Vy=[By,Ay,Fy];function $y(e){return typeof e=="function"?Fp(e,"mapStateToProps"):void 0}function Ky(e){return e?void 0:ri(function(){return{}})}const Hy=[$y,Ky];function Wy(e,t,n){return Se({},n,e,t)}function Gy(e){return function(n,r){var o=r.displayName,a=r.pure,l=r.areMergedPropsEqual,c=!1,p;return function(m,u,h){var g=e(m,u,h);return c?(!a||!l(g,p))&&(p=g):(c=!0,p=g,process.env.NODE_ENV!=="production"&&Ap(p,o,"mergeProps")),p}}}function Yy(e){return typeof e=="function"?Gy(e):void 0}function Uy(e){return e?void 0:function(){return Wy}}const jy=[Yy,Uy];function na(e,t,n){if(e)(t==="mapStateToProps"||t==="mapDispatchToProps")&&(Object.prototype.hasOwnProperty.call(e,"dependsOnOwnProps")||Bp("The selector for "+t+" of "+n+" did not specify a value for dependsOnOwnProps."));else throw new Error("Unexpected value for "+t+" in "+n+".")}function zy(e,t,n,r){na(e,"mapStateToProps",r),na(t,"mapDispatchToProps",r),na(n,"mergeProps",r)}var qy=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function Jy(e,t,n,r){return function(a,l){return n(e(a,l),t(r,l),l)}}function Zy(e,t,n,r,o){var a=o.areStatesEqual,l=o.areOwnPropsEqual,c=o.areStatePropsEqual,p=!1,f,m,u,h,g;function v(k,I){return f=k,m=I,u=e(f,m),h=t(r,m),g=n(u,h,m),p=!0,g}function w(){return u=e(f,m),t.dependsOnOwnProps&&(h=t(r,m)),g=n(u,h,m),g}function T(){return e.dependsOnOwnProps&&(u=e(f,m)),t.dependsOnOwnProps&&(h=t(r,m)),g=n(u,h,m),g}function E(){var k=e(f,m),I=!c(k,u);return u=k,I&&(g=n(u,h,m)),g}function D(k,I){var x=!l(I,m),F=!a(k,f,I,m);return f=k,m=I,x&&F?w():x?T():F?E():g}return function(I,x){return p?D(I,x):v(I,x)}}function Xy(e,t){var n=t.initMapStateToProps,r=t.initMapDispatchToProps,o=t.initMergeProps,a=Hs(t,qy),l=n(e,a),c=r(e,a),p=o(e,a);process.env.NODE_ENV!=="production"&&zy(l,c,p,a.displayName);var f=a.pure?Zy:Jy;return f(l,c,p,e,a)}var Qy=["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"];function ra(e,t,n){for(var r=t.length-1;r>=0;r--){var o=t[r](e);if(o)return o}return function(a,l){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+l.wrappedComponentName+".")}}function eT(e,t){return e===t}function tT(e){var t={},n=t.connectHOC,r=n===void 0?Oy:n,o=t.mapStateToPropsFactories,a=o===void 0?Hy:o,l=t.mapDispatchToPropsFactories,c=l===void 0?Vy:l,p=t.mergePropsFactories,f=p===void 0?jy:p,m=t.selectorFactory,u=m===void 0?Xy:m;return function(g,v,w,T){T===void 0&&(T={});var E=T,D=E.pure,k=D===void 0?!0:D,I=E.areStatesEqual,x=I===void 0?eT:I,F=E.areOwnPropsEqual,L=F===void 0?ta:F,C=E.areStatePropsEqual,R=C===void 0?ta:C,O=E.areMergedPropsEqual,W=O===void 0?ta:O,z=Hs(E,Qy),M=ra(g,a,"mapStateToProps"),U=ra(v,c,"mapDispatchToProps"),G=ra(w,f,"mergeProps");return r(u,Se({methodName:"connect",getDisplayName:function(A){return"Connect("+A+")"},shouldHandleStateChanges:!!g,initMapStateToProps:M,initMapDispatchToProps:U,initMergeProps:G,pure:k,areStatesEqual:x,areOwnPropsEqual:L,areStatePropsEqual:R,areMergedPropsEqual:W},z))}}const Vp=tT();py(Qs.unstable_batchedUpdates);function nT(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function $p(e,t){var n=_.useState(function(){return{inputs:t,result:e()}})[0],r=_.useRef(!0),o=_.useRef(n),a=r.current||!!(t&&o.current.inputs&&nT(t,o.current.inputs)),l=a?o.current:{inputs:t,result:e()};return _.useEffect(function(){r.current=!1,o.current=l},[l]),l.result}function rT(e,t){return $p(function(){return e},t)}var Ie=$p,he=rT,sT=process.env.NODE_ENV==="production",sa="Invariant failed";function qc(e,t){if(sT)throw new Error(sa);var n=typeof t=="function"?t():t,r=n?"".concat(sa,": ").concat(n):sa;throw new Error(r)}var Wt=function(t){var n=t.top,r=t.right,o=t.bottom,a=t.left,l=r-a,c=o-n,p={top:n,right:r,bottom:o,left:a,width:l,height:c,x:a,y:n,center:{x:(r+a)/2,y:(o+n)/2}};return p},si=function(t,n){return{top:t.top-n.top,left:t.left-n.left,bottom:t.bottom+n.bottom,right:t.right+n.right}},Jc=function(t,n){return{top:t.top+n.top,left:t.left+n.left,bottom:t.bottom-n.bottom,right:t.right-n.right}},oT=function(t,n){return{top:t.top+n.y,left:t.left+n.x,bottom:t.bottom+n.y,right:t.right+n.x}},oa={top:0,right:0,bottom:0,left:0},oi=function(t){var n=t.borderBox,r=t.margin,o=r===void 0?oa:r,a=t.border,l=a===void 0?oa:a,c=t.padding,p=c===void 0?oa:c,f=Wt(si(n,o)),m=Wt(Jc(n,l)),u=Wt(Jc(m,p));return{marginBox:f,borderBox:Wt(n),paddingBox:m,contentBox:u,margin:o,border:l,padding:p}},It=function(t){var n=t.slice(0,-2),r=t.slice(-2);if(r!=="px")return 0;var o=Number(n);return isNaN(o)&&(process.env.NODE_ENV!=="production"?qc(!1,"Could not parse value [raw: "+t+", without suffix: "+n+"]"):qc()),o},aT=function(){return{x:window.pageXOffset,y:window.pageYOffset}},Ws=function(t,n){var r=t.borderBox,o=t.border,a=t.margin,l=t.padding,c=oT(r,n);return oi({borderBox:c,border:o,margin:a,padding:l})},Gs=function(t,n){return n===void 0&&(n=aT()),Ws(t,n)},Kp=function(t,n){var r={top:It(n.marginTop),right:It(n.marginRight),bottom:It(n.marginBottom),left:It(n.marginLeft)},o={top:It(n.paddingTop),right:It(n.paddingRight),bottom:It(n.paddingBottom),left:It(n.paddingLeft)},a={top:It(n.borderTopWidth),right:It(n.borderRightWidth),bottom:It(n.borderBottomWidth),left:It(n.borderLeftWidth)};return oi({borderBox:t,margin:r,padding:o,border:a})},Hp=function(t){var n=t.getBoundingClientRect(),r=window.getComputedStyle(t);return Kp(n,r)},Zc=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function iT(e,t){return!!(e===t||Zc(e)&&Zc(t))}function lT(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!iT(e[n],t[n]))return!1;return!0}function nt(e,t){t===void 0&&(t=lT);var n,r=[],o,a=!1;function l(){for(var c=[],p=0;p<arguments.length;p++)c[p]=arguments[p];return a&&n===this&&t(c,r)||(o=e.apply(this,c),a=!0,n=this,r=c),o}return l}var zr=function(t){var n=[],r=null,o=function(){for(var l=arguments.length,c=new Array(l),p=0;p<l;p++)c[p]=arguments[p];n=c,!r&&(r=requestAnimationFrame(function(){r=null,t.apply(void 0,n)}))};return o.cancel=function(){r&&(cancelAnimationFrame(r),r=null)},o},cT=process.env.NODE_ENV==="production",dT=/[ \t]{2,}/g,pT=/^[ \t]*/gm,Xc=function(t){return t.replace(dT," ").replace(pT,"").trim()},uT=function(t){return Xc(`
|
|
360
360
|
%creact-beautiful-dnd
|
|
361
361
|
|
|
362
|
-
%c`+
|
|
362
|
+
%c`+Xc(t)+`
|
|
363
363
|
|
|
364
|
-
%c
|
|
365
|
-
`)},mT=function(t){return[uT(t),"color: #00C584; font-size: 1.2em; font-weight: bold;","line-height: 1.5","color: #723874;"]},fT="__react-beautiful-dnd-disable-dev-warnings";function Wp(e,t){var n;cT||typeof window<"u"&&window[fT]||(n=console)[e].apply(n,mT(t))}var
|
|
364
|
+
%c👷 This is a development only message. It will be removed in production builds.
|
|
365
|
+
`)},mT=function(t){return[uT(t),"color: #00C584; font-size: 1.2em; font-weight: bold;","line-height: 1.5","color: #723874;"]},fT="__react-beautiful-dnd-disable-dev-warnings";function Wp(e,t){var n;cT||typeof window<"u"&&window[fT]||(n=console)[e].apply(n,mT(t))}var We=Wp.bind(null,"warn"),Ra=Wp.bind(null,"error");function bn(){}function hT(e,t){return Se({},e,{},t)}function _t(e,t,n){var r=t.map(function(o){var a=hT(n,o.options);return e.addEventListener(o.eventName,o.fn,a),function(){e.removeEventListener(o.eventName,o.fn,a)}});return function(){r.forEach(function(a){a()})}}var ST=process.env.NODE_ENV==="production",Qc="Invariant failed";function qr(e){this.message=e}qr.prototype.toString=function(){return this.message};function $(e,t){throw ST?new qr(Qc):new qr(Qc+": "+(t||""))}var gT=function(e){Np(t,e);function t(){for(var r,o=arguments.length,a=new Array(o),l=0;l<o;l++)a[l]=arguments[l];return r=e.call.apply(e,[this].concat(a))||this,r.callbacks=null,r.unbind=bn,r.onWindowError=function(c){var p=r.getCallbacks();p.isDragging()&&(p.tryAbort(),process.env.NODE_ENV!=="production"&&We(`
|
|
366
366
|
An error was caught by our window 'error' event listener while a drag was occurring.
|
|
367
367
|
The active drag has been aborted.
|
|
368
|
-
`));var f=c.error;f instanceof
|
|
368
|
+
`));var f=c.error;f instanceof qr&&(c.preventDefault(),process.env.NODE_ENV!=="production"&&Ra(f.message))},r.getCallbacks=function(){if(!r.callbacks)throw new Error("Unable to find AppCallbacks in <ErrorBoundary/>");return r.callbacks},r.setCallbacks=function(c){r.callbacks=c},r}var n=t.prototype;return n.componentDidMount=function(){this.unbind=_t(window,[{eventName:"error",fn:this.onWindowError}])},n.componentDidCatch=function(o){if(o instanceof qr){process.env.NODE_ENV!=="production"&&Ra(o.message),this.setState({});return}throw o},n.componentWillUnmount=function(){this.unbind()},n.render=function(){return this.props.children(this.setCallbacks)},t}(_.Component),bT=`
|
|
369
369
|
Press space bar to start a drag.
|
|
370
370
|
When dragging you can use the arrow keys to move the item around and escape to cancel.
|
|
371
371
|
Some screen readers may require you to be in focus mode or to use your pass through key
|
|
372
|
-
`,
|
|
373
|
-
You have lifted an item in position `+
|
|
374
|
-
`},Gp=function(t,n){var r=t.droppableId===n.droppableId,
|
|
375
|
-
You have moved the item from position `+
|
|
376
|
-
to position `+
|
|
372
|
+
`,Ys=function(t){return t+1},vT=function(t){return`
|
|
373
|
+
You have lifted an item in position `+Ys(t.source.index)+`
|
|
374
|
+
`},Gp=function(t,n){var r=t.droppableId===n.droppableId,o=Ys(t.index),a=Ys(n.index);return r?`
|
|
375
|
+
You have moved the item from position `+o+`
|
|
376
|
+
to position `+a+`
|
|
377
377
|
`:`
|
|
378
|
-
You have moved the item from position `+
|
|
378
|
+
You have moved the item from position `+o+`
|
|
379
379
|
in list `+t.droppableId+`
|
|
380
380
|
to list `+n.droppableId+`
|
|
381
|
-
in position `+
|
|
382
|
-
`},Yp=function(t,n,r){var
|
|
381
|
+
in position `+a+`
|
|
382
|
+
`},Yp=function(t,n,r){var o=n.droppableId===r.droppableId;return o?`
|
|
383
383
|
The item `+t+`
|
|
384
384
|
has been combined with `+r.draggableId:`
|
|
385
385
|
The item `+t+`
|
|
386
386
|
in list `+n.droppableId+`
|
|
387
387
|
has been combined with `+r.draggableId+`
|
|
388
388
|
in list `+r.droppableId+`
|
|
389
|
-
`},yT=function(t){var n=t.destination;if(n)return Gp(t.source,n);var r=t.combine;return r?Yp(t.draggableId,t.source,r):"You are over an area that cannot be dropped on"},
|
|
389
|
+
`},yT=function(t){var n=t.destination;if(n)return Gp(t.source,n);var r=t.combine;return r?Yp(t.draggableId,t.source,r):"You are over an area that cannot be dropped on"},ed=function(t){return`
|
|
390
390
|
The item has returned to its starting position
|
|
391
|
-
of `+
|
|
391
|
+
of `+Ys(t.index)+`
|
|
392
392
|
`},TT=function(t){if(t.reason==="CANCEL")return`
|
|
393
393
|
Movement cancelled.
|
|
394
|
-
`+
|
|
394
|
+
`+ed(t.source)+`
|
|
395
395
|
`;var n=t.destination,r=t.combine;return n?`
|
|
396
396
|
You have dropped the item.
|
|
397
397
|
`+Gp(t.source,n)+`
|
|
@@ -400,37 +400,37 @@ Valid keys: `+JSON.stringify(Object.keys(L),null," "));var ne=le(Z,fe,ee,F,J+".
|
|
|
400
400
|
`+Yp(t.draggableId,t.source,r)+`
|
|
401
401
|
`:`
|
|
402
402
|
The item has been dropped while not over a drop area.
|
|
403
|
-
`+
|
|
404
|
-
`},Vs={dragHandleUsageInstructions:bT,onDragStart:vT,onDragUpdate:yT,onDragEnd:TT},st={x:0,y:0},at=function(t,n){return{x:t.x+n.x,y:t.y+n.y}},wt=function(t,n){return{x:t.x-n.x,y:t.y-n.y}},Tn=function(t,n){return t.x===n.x&&t.y===n.y},Dr=function(t){return{x:t.x!==0?-t.x:0,y:t.y!==0?-t.y:0}},Un=function(t,n,r){var a;return r===void 0&&(r=0),a={},a[t]=n,a[t==="x"?"y":"x"]=r,a},Zr=function(t,n){return Math.sqrt(Math.pow(n.x-t.x,2)+Math.pow(n.y-t.y,2))},Xc=function(t,n){return Math.min.apply(Math,n.map(function(r){return Zr(t,r)}))},Up=function(t){return function(n){return{x:t(n.x),y:t(n.y)}}},ET=function(e,t){var n=Gt({top:Math.max(t.top,e.top),right:Math.min(t.right,e.right),bottom:Math.min(t.bottom,e.bottom),left:Math.max(t.left,e.left)});return n.width<=0||n.height<=0?null:n},as=function(t,n){return{top:t.top+n.y,left:t.left+n.x,bottom:t.bottom+n.y,right:t.right+n.x}},Qc=function(t){return[{x:t.left,y:t.top},{x:t.right,y:t.top},{x:t.left,y:t.bottom},{x:t.right,y:t.bottom}]},wT={top:0,right:0,bottom:0,left:0},CT=function(t,n){return n?as(t,n.scroll.diff.displacement):t},DT=function(t,n,r){if(r&&r.increasedBy){var a;return ge({},t,(a={},a[n.end]=t[n.end]+r.increasedBy[n.line],a))}return t},NT=function(t,n){return n&&n.shouldClipSubject?ET(n.pageMarginBox,t):Gt(t)},br=function(e){var t=e.page,n=e.withPlaceholder,r=e.axis,a=e.frame,o=CT(t.marginBox,a),l=DT(o,r,n),c=NT(l,a);return{page:t,withPlaceholder:n,active:c}},ai=function(e,t){e.frame||(process.env.NODE_ENV,V(!1));var n=e.frame,r=wt(t,n.scroll.initial),a=Dr(r),o=ge({},n,{scroll:{initial:n.scroll.initial,current:t,diff:{value:r,displacement:a},max:n.scroll.max}}),l=br({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:o}),c=ge({},e,{frame:o,subject:l});return c};function xT(e){return Number.isInteger?Number.isInteger(e):typeof e=="number"&&isFinite(e)&&Math.floor(e)===e}function js(e){return Object.values?Object.values(e):Object.keys(e).map(function(t){return e[t]})}function oi(e,t){if(e.findIndex)return e.findIndex(t);for(var n=0;n<e.length;n++)if(t(e[n]))return n;return-1}function xn(e,t){if(e.find)return e.find(t);var n=oi(e,t);if(n!==-1)return e[n]}function jp(e){return Array.prototype.slice.call(e)}var zp=rt(function(e){return e.reduce(function(t,n){return t[n.descriptor.id]=n,t},{})}),qp=rt(function(e){return e.reduce(function(t,n){return t[n.descriptor.id]=n,t},{})}),aa=rt(function(e){return js(e)}),kT=rt(function(e){return js(e)}),Qn=rt(function(e,t){var n=kT(t).filter(function(r){return e===r.descriptor.droppableId}).sort(function(r,a){return r.descriptor.index-a.descriptor.index});return n});function ii(e){return e.at&&e.at.type==="REORDER"?e.at.destination:null}function oa(e){return e.at&&e.at.type==="COMBINE"?e.at.combine:null}var ia=rt(function(e,t){return t.filter(function(n){return n.descriptor.id!==e.descriptor.id})}),IT=function(e){var t=e.isMovingForward,n=e.draggable,r=e.destination,a=e.insideDestination,o=e.previousImpact;if(!r.isCombineEnabled)return null;var l=ii(o);if(!l)return null;function c(C){var T={type:"COMBINE",combine:{draggableId:C,droppableId:r.descriptor.id}};return ge({},o,{at:T})}var p=o.displaced.all,f=p.length?p[0]:null;if(t)return f?c(f):null;var m=ia(n,a);if(!f){if(!m.length)return null;var u=m[m.length-1];return c(u.descriptor.id)}var h=oi(m,function(C){return C.descriptor.id===f});h===-1&&(process.env.NODE_ENV!=="production"?V(!1,"Could not find displaced item in set"):V(!1));var g=h-1;if(g<0)return null;var v=m[g];return c(v.descriptor.id)},Nr=function(e,t){return e.descriptor.droppableId===t.descriptor.id},Jp={point:st,value:0},Xr={invisible:{},visible:{},all:[]},MT={displaced:Xr,displacedBy:Jp,at:null},Lt=function(e,t){return function(n){return e<=n&&n<=t}},Zp=function(e){var t=Lt(e.top,e.bottom),n=Lt(e.left,e.right);return function(r){var a=t(r.top)&&t(r.bottom)&&n(r.left)&&n(r.right);if(a)return!0;var o=t(r.top)||t(r.bottom),l=n(r.left)||n(r.right),c=o&&l;if(c)return!0;var p=r.top<e.top&&r.bottom>e.bottom,f=r.left<e.left&&r.right>e.right,m=p&&f;if(m)return!0;var u=p&&l||f&&o;return u}},_T=function(e){var t=Lt(e.top,e.bottom),n=Lt(e.left,e.right);return function(r){var a=t(r.top)&&t(r.bottom)&&n(r.left)&&n(r.right);return a}},li={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},Xp={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},RT=function(e){return function(t){var n=Lt(t.top,t.bottom),r=Lt(t.left,t.right);return function(a){return e===li?n(a.top)&&n(a.bottom):r(a.left)&&r(a.right)}}},OT=function(t,n){var r=n.frame?n.frame.scroll.diff.displacement:st;return as(t,r)},LT=function(t,n,r){return n.subject.active?r(n.subject.active)(t):!1},PT=function(t,n,r){return r(n)(t)},ci=function(t){var n=t.target,r=t.destination,a=t.viewport,o=t.withDroppableDisplacement,l=t.isVisibleThroughFrameFn,c=o?OT(n,r):n;return LT(c,r,l)&&PT(c,a,l)},BT=function(t){return ci(ge({},t,{isVisibleThroughFrameFn:Zp}))},Qp=function(t){return ci(ge({},t,{isVisibleThroughFrameFn:_T}))},AT=function(t){return ci(ge({},t,{isVisibleThroughFrameFn:RT(t.destination.axis)}))},FT=function(t,n,r){if(typeof r=="boolean")return r;if(!n)return!0;var a=n.invisible,o=n.visible;if(a[t])return!1;var l=o[t];return l?l.shouldAnimate:!0};function VT(e,t){var n=e.page.marginBox,r={top:t.point.y,right:0,bottom:0,left:t.point.x};return Gt(ri(n,r))}function Qr(e){var t=e.afterDragging,n=e.destination,r=e.displacedBy,a=e.viewport,o=e.forceShouldAnimate,l=e.last;return t.reduce(function(p,f){var m=VT(f,r),u=f.descriptor.id;p.all.push(u);var h=BT({target:m,destination:n,viewport:a,withDroppableDisplacement:!0});if(!h)return p.invisible[f.descriptor.id]=!0,p;var g=FT(u,l,o),v={draggableId:u,shouldAnimate:g};return p.visible[u]=v,p},{all:[],visible:{},invisible:{}})}function $T(e,t){if(!e.length)return 0;var n=e[e.length-1].descriptor.index;return t.inHomeList?n:n+1}function ed(e){var t=e.insideDestination,n=e.inHomeList,r=e.displacedBy,a=e.destination,o=$T(t,{inHomeList:n});return{displaced:Xr,displacedBy:r,at:{type:"REORDER",destination:{droppableId:a.descriptor.id,index:o}}}}function zs(e){var t=e.draggable,n=e.insideDestination,r=e.destination,a=e.viewport,o=e.displacedBy,l=e.last,c=e.index,p=e.forceShouldAnimate,f=Nr(t,r);if(c==null)return ed({insideDestination:n,inHomeList:f,displacedBy:o,destination:r});var m=xn(n,function(C){return C.descriptor.index===c});if(!m)return ed({insideDestination:n,inHomeList:f,displacedBy:o,destination:r});var u=ia(t,n),h=n.indexOf(m),g=u.slice(h),v=Qr({afterDragging:g,destination:r,displacedBy:o,last:l,viewport:a.frame,forceShouldAnimate:p});return{displaced:v,displacedBy:o,at:{type:"REORDER",destination:{droppableId:r.descriptor.id,index:c}}}}function wn(e,t){return Boolean(t.effected[e])}var KT=function(e){var t=e.isMovingForward,n=e.destination,r=e.draggables,a=e.combine,o=e.afterCritical;if(!n.isCombineEnabled)return null;var l=a.draggableId,c=r[l],p=c.descriptor.index,f=wn(l,o);return f?t?p:p-1:t?p+1:p},HT=function(e){var t=e.isMovingForward,n=e.isInHomeList,r=e.insideDestination,a=e.location;if(!r.length)return null;var o=a.index,l=t?o+1:o-1,c=r[0].descriptor.index,p=r[r.length-1].descriptor.index,f=n?p:p+1;return l<c||l>f?null:l},WT=function(e){var t=e.isMovingForward,n=e.isInHomeList,r=e.draggable,a=e.draggables,o=e.destination,l=e.insideDestination,c=e.previousImpact,p=e.viewport,f=e.afterCritical,m=c.at;if(m||(process.env.NODE_ENV!=="production"?V(!1,"Cannot move in direction without previous impact location"):V(!1)),m.type==="REORDER"){var u=HT({isMovingForward:t,isInHomeList:n,location:m.destination,insideDestination:l});return u==null?null:zs({draggable:r,insideDestination:l,destination:o,viewport:p,last:c.displaced,displacedBy:c.displacedBy,index:u})}var h=KT({isMovingForward:t,destination:o,displaced:c.displaced,draggables:a,combine:m.combine,afterCritical:f});return h==null?null:zs({draggable:r,insideDestination:l,destination:o,viewport:p,last:c.displaced,displacedBy:c.displacedBy,index:h})},GT=function(e){var t=e.displaced,n=e.afterCritical,r=e.combineWith,a=e.displacedBy,o=Boolean(t.visible[r]||t.invisible[r]);return wn(r,n)?o?st:Dr(a.point):o?a.point:st},YT=function(e){var t=e.afterCritical,n=e.impact,r=e.draggables,a=oa(n);a||(process.env.NODE_ENV,V(!1));var o=a.draggableId,l=r[o].page.borderBox.center,c=GT({displaced:n.displaced,afterCritical:t,combineWith:o,displacedBy:n.displacedBy});return at(l,c)},eu=function(t,n){return n.margin[t.start]+n.borderBox[t.size]/2},UT=function(t,n){return n.margin[t.end]+n.borderBox[t.size]/2},di=function(t,n,r){return n[t.crossAxisStart]+r.margin[t.crossAxisStart]+r.borderBox[t.crossAxisSize]/2},td=function(t){var n=t.axis,r=t.moveRelativeTo,a=t.isMoving;return Un(n.line,r.marginBox[n.end]+eu(n,a),di(n,r.marginBox,a))},nd=function(t){var n=t.axis,r=t.moveRelativeTo,a=t.isMoving;return Un(n.line,r.marginBox[n.start]-UT(n,a),di(n,r.marginBox,a))},jT=function(t){var n=t.axis,r=t.moveInto,a=t.isMoving;return Un(n.line,r.contentBox[n.start]+eu(n,a),di(n,r.contentBox,a))},zT=function(e){var t=e.impact,n=e.draggable,r=e.draggables,a=e.droppable,o=e.afterCritical,l=Qn(a.descriptor.id,r),c=n.page,p=a.axis;if(!l.length)return jT({axis:p,moveInto:a.page,isMoving:c});var f=t.displaced,m=t.displacedBy,u=f.all[0];if(u){var h=r[u];if(wn(u,o))return nd({axis:p,moveRelativeTo:h.page,isMoving:c});var g=Gs(h.page,m.point);return nd({axis:p,moveRelativeTo:g,isMoving:c})}var v=l[l.length-1];if(v.descriptor.id===n.descriptor.id)return c.borderBox.center;if(wn(v.descriptor.id,o)){var C=Gs(v.page,Dr(o.displacedBy.point));return td({axis:p,moveRelativeTo:C,isMoving:c})}return td({axis:p,moveRelativeTo:v.page,isMoving:c})},Oo=function(e,t){var n=e.frame;return n?at(t,n.scroll.diff.displacement):t},qT=function(t){var n=t.impact,r=t.draggable,a=t.droppable,o=t.draggables,l=t.afterCritical,c=r.page.borderBox.center,p=n.at;return!a||!p?c:p.type==="REORDER"?zT({impact:n,draggable:r,draggables:o,droppable:a,afterCritical:l}):YT({impact:n,draggables:o,afterCritical:l})},la=function(e){var t=qT(e),n=e.droppable,r=n?Oo(n,t):t;return r},tu=function(e,t){var n=wt(t,e.scroll.initial),r=Dr(n),a=Gt({top:t.y,bottom:t.y+e.frame.height,left:t.x,right:t.x+e.frame.width}),o={frame:a,scroll:{initial:e.scroll.initial,max:e.scroll.max,current:t,diff:{value:n,displacement:r}}};return o};function rd(e,t){return e.map(function(n){return t[n]})}function JT(e,t){for(var n=0;n<t.length;n++){var r=t[n].visible[e];if(r)return r}return null}var ZT=function(e){var t=e.impact,n=e.viewport,r=e.destination,a=e.draggables,o=e.maxScrollChange,l=tu(n,at(n.scroll.current,o)),c=r.frame?ai(r,at(r.frame.scroll.current,o)):r,p=t.displaced,f=Qr({afterDragging:rd(p.all,a),destination:r,displacedBy:t.displacedBy,viewport:l.frame,last:p,forceShouldAnimate:!1}),m=Qr({afterDragging:rd(p.all,a),destination:c,displacedBy:t.displacedBy,viewport:n.frame,last:p,forceShouldAnimate:!1}),u={},h={},g=[p,f,m];p.all.forEach(function(C){var T=JT(C,g);if(T){h[C]=T;return}u[C]=!0});var v=ge({},t,{displaced:{all:p.all,invisible:u,visible:h}});return v},XT=function(e,t){return at(e.scroll.diff.displacement,t)},pi=function(e){var t=e.pageBorderBoxCenter,n=e.draggable,r=e.viewport,a=XT(r,t),o=wt(a,n.page.borderBox.center);return at(n.client.borderBox.center,o)},nu=function(e){var t=e.draggable,n=e.destination,r=e.newPageBorderBoxCenter,a=e.viewport,o=e.withDroppableDisplacement,l=e.onlyOnMainAxis,c=l===void 0?!1:l,p=wt(r,t.page.borderBox.center),f=as(t.page.borderBox,p),m={target:f,destination:n,withDroppableDisplacement:o,viewport:a};return c?AT(m):Qp(m)},QT=function(e){var t=e.isMovingForward,n=e.draggable,r=e.destination,a=e.draggables,o=e.previousImpact,l=e.viewport,c=e.previousPageBorderBoxCenter,p=e.previousClientSelection,f=e.afterCritical;if(!r.isEnabled)return null;var m=Qn(r.descriptor.id,a),u=Nr(n,r),h=IT({isMovingForward:t,draggable:n,destination:r,insideDestination:m,previousImpact:o})||WT({isMovingForward:t,isInHomeList:u,draggable:n,draggables:a,destination:r,insideDestination:m,previousImpact:o,viewport:l,afterCritical:f});if(!h)return null;var g=la({impact:h,draggable:n,droppable:r,draggables:a,afterCritical:f}),v=nu({draggable:n,destination:r,newPageBorderBoxCenter:g,viewport:l.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0});if(v){var C=pi({pageBorderBoxCenter:g,draggable:n,viewport:l});return{clientSelection:C,impact:h,scrollJumpRequest:null}}var T=wt(g,c),E=ZT({impact:h,viewport:l,destination:r,draggables:a,maxScrollChange:T});return{clientSelection:p,impact:E,scrollJumpRequest:T}},St=function(t){var n=t.subject.active;return n||(process.env.NODE_ENV!=="production"?V(!1,"Cannot get clipped area from droppable"):V(!1)),n},eE=function(e){var t=e.isMovingForward,n=e.pageBorderBoxCenter,r=e.source,a=e.droppables,o=e.viewport,l=r.subject.active;if(!l)return null;var c=r.axis,p=Lt(l[c.start],l[c.end]),f=aa(a).filter(function(u){return u!==r}).filter(function(u){return u.isEnabled}).filter(function(u){return Boolean(u.subject.active)}).filter(function(u){return Zp(o.frame)(St(u))}).filter(function(u){var h=St(u);return t?l[c.crossAxisEnd]<h[c.crossAxisEnd]:h[c.crossAxisStart]<l[c.crossAxisStart]}).filter(function(u){var h=St(u),g=Lt(h[c.start],h[c.end]);return p(h[c.start])||p(h[c.end])||g(l[c.start])||g(l[c.end])}).sort(function(u,h){var g=St(u)[c.crossAxisStart],v=St(h)[c.crossAxisStart];return t?g-v:v-g}).filter(function(u,h,g){return St(u)[c.crossAxisStart]===St(g[0])[c.crossAxisStart]});if(!f.length)return null;if(f.length===1)return f[0];var m=f.filter(function(u){var h=Lt(St(u)[c.start],St(u)[c.end]);return h(n[c.line])});return m.length===1?m[0]:m.length>1?m.sort(function(u,h){return St(u)[c.start]-St(h)[c.start]})[0]:f.sort(function(u,h){var g=Xc(n,Qc(St(u))),v=Xc(n,Qc(St(h)));return g!==v?g-v:St(u)[c.start]-St(h)[c.start]})[0]},sd=function(t,n){var r=t.page.borderBox.center;return wn(t.descriptor.id,n)?wt(r,n.displacedBy.point):r},tE=function(t,n){var r=t.page.borderBox;return wn(t.descriptor.id,n)?as(r,Dr(n.displacedBy.point)):r},nE=function(e){var t=e.pageBorderBoxCenter,n=e.viewport,r=e.destination,a=e.insideDestination,o=e.afterCritical,l=a.filter(function(c){return Qp({target:tE(c,o),destination:r,viewport:n.frame,withDroppableDisplacement:!0})}).sort(function(c,p){var f=Zr(t,Oo(r,sd(c,o))),m=Zr(t,Oo(r,sd(p,o)));return f<m?-1:m<f?1:c.descriptor.index-p.descriptor.index});return l[0]||null},os=rt(function(t,n){var r=n[t.line];return{value:r,point:Un(t.line,r)}}),rE=function(t,n,r){var a=t.axis;if(t.descriptor.mode==="virtual")return Un(a.line,n[a.line]);var o=t.subject.page.contentBox[a.size],l=Qn(t.descriptor.id,r),c=l.reduce(function(m,u){return m+u.client.marginBox[a.size]},0),p=c+n[a.line],f=p-o;return f<=0?null:Un(a.line,f)},ru=function(t,n){return ge({},t,{scroll:ge({},t.scroll,{max:n})})},su=function(t,n,r){var a=t.frame;Nr(n,t)&&(process.env.NODE_ENV!=="production"?V(!1,"Should not add placeholder space to home list"):V(!1)),t.subject.withPlaceholder&&(process.env.NODE_ENV!=="production"?V(!1,"Cannot add placeholder size to a subject when it already has one"):V(!1));var o=os(t.axis,n.displaceBy).point,l=rE(t,o,r),c={placeholderSize:o,increasedBy:l,oldFrameMaxScroll:t.frame?t.frame.scroll.max:null};if(!a){var p=br({page:t.subject.page,withPlaceholder:c,axis:t.axis,frame:t.frame});return ge({},t,{subject:p})}var f=l?at(a.scroll.max,l):a.scroll.max,m=ru(a,f),u=br({page:t.subject.page,withPlaceholder:c,axis:t.axis,frame:m});return ge({},t,{subject:u,frame:m})},sE=function(t){var n=t.subject.withPlaceholder;n||(process.env.NODE_ENV!=="production"?V(!1,"Cannot remove placeholder form subject when there was none"):V(!1));var r=t.frame;if(!r){var a=br({page:t.subject.page,axis:t.axis,frame:null,withPlaceholder:null});return ge({},t,{subject:a})}var o=n.oldFrameMaxScroll;o||(process.env.NODE_ENV!=="production"?V(!1,"Expected droppable with frame to have old max frame scroll when removing placeholder"):V(!1));var l=ru(r,o),c=br({page:t.subject.page,axis:t.axis,frame:l,withPlaceholder:null});return ge({},t,{subject:c,frame:l})},aE=function(e){var t=e.previousPageBorderBoxCenter,n=e.moveRelativeTo,r=e.insideDestination,a=e.draggable,o=e.draggables,l=e.destination,c=e.viewport,p=e.afterCritical;if(!n){if(r.length)return null;var f={displaced:Xr,displacedBy:Jp,at:{type:"REORDER",destination:{droppableId:l.descriptor.id,index:0}}},m=la({impact:f,draggable:a,droppable:l,draggables:o,afterCritical:p}),u=Nr(a,l)?l:su(l,a,o),h=nu({draggable:a,destination:u,newPageBorderBoxCenter:m,viewport:c.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0});return h?f:null}var g=Boolean(t[l.axis.line]<=n.page.borderBox.center[l.axis.line]),v=function(){var T=n.descriptor.index;return n.descriptor.id===a.descriptor.id||g?T:T+1}(),C=os(l.axis,a.displaceBy);return zs({draggable:a,insideDestination:r,destination:l,viewport:c,displacedBy:C,last:Xr,index:v})},oE=function(e){var t=e.isMovingForward,n=e.previousPageBorderBoxCenter,r=e.draggable,a=e.isOver,o=e.draggables,l=e.droppables,c=e.viewport,p=e.afterCritical,f=eE({isMovingForward:t,pageBorderBoxCenter:n,source:a,droppables:l,viewport:c});if(!f)return null;var m=Qn(f.descriptor.id,o),u=nE({pageBorderBoxCenter:n,viewport:c,destination:f,insideDestination:m,afterCritical:p}),h=aE({previousPageBorderBoxCenter:n,destination:f,draggable:r,draggables:o,moveRelativeTo:u,insideDestination:m,viewport:c,afterCritical:p});if(!h)return null;var g=la({impact:h,draggable:r,droppable:f,draggables:o,afterCritical:p}),v=pi({pageBorderBoxCenter:g,draggable:r,viewport:c});return{clientSelection:v,impact:h,scrollJumpRequest:null}},Dt=function(e){var t=e.at;return t?t.type==="REORDER"?t.destination.droppableId:t.combine.droppableId:null},iE=function(t,n){var r=Dt(t);return r?n[r]:null},lE=function(e){var t=e.state,n=e.type,r=iE(t.impact,t.dimensions.droppables),a=Boolean(r),o=t.dimensions.droppables[t.critical.droppable.id],l=r||o,c=l.axis.direction,p=c==="vertical"&&(n==="MOVE_UP"||n==="MOVE_DOWN")||c==="horizontal"&&(n==="MOVE_LEFT"||n==="MOVE_RIGHT");if(p&&!a)return null;var f=n==="MOVE_DOWN"||n==="MOVE_RIGHT",m=t.dimensions.draggables[t.critical.draggable.id],u=t.current.page.borderBoxCenter,h=t.dimensions,g=h.draggables,v=h.droppables;return p?QT({isMovingForward:f,previousPageBorderBoxCenter:u,draggable:m,destination:l,draggables:g,viewport:t.viewport,previousClientSelection:t.current.client.selection,previousImpact:t.impact,afterCritical:t.afterCritical}):oE({isMovingForward:f,previousPageBorderBoxCenter:u,draggable:m,isOver:l,draggables:g,droppables:v,viewport:t.viewport,afterCritical:t.afterCritical})};function $n(e){return e.phase==="DRAGGING"||e.phase==="COLLECTING"}function au(e){var t=Lt(e.top,e.bottom),n=Lt(e.left,e.right);return function(a){return t(a.y)&&n(a.x)}}function cE(e,t){return e.left<t.right&&e.right>t.left&&e.top<t.bottom&&e.bottom>t.top}function dE(e){var t=e.pageBorderBox,n=e.draggable,r=e.candidates,a=n.page.borderBox.center,o=r.map(function(l){var c=l.axis,p=Un(l.axis.line,t.center[c.line],l.page.borderBox.center[c.crossAxisLine]);return{id:l.descriptor.id,distance:Zr(a,p)}}).sort(function(l,c){return c.distance-l.distance});return o[0]?o[0].id:null}function pE(e){var t=e.pageBorderBox,n=e.draggable,r=e.droppables,a=aa(r).filter(function(o){if(!o.isEnabled)return!1;var l=o.subject.active;if(!l||!cE(t,l))return!1;if(au(l)(t.center))return!0;var c=o.axis,p=l.center[c.crossAxisLine],f=t[c.crossAxisStart],m=t[c.crossAxisEnd],u=Lt(l[c.crossAxisStart],l[c.crossAxisEnd]),h=u(f),g=u(m);return!h&&!g?!0:h?f<p:m>p});return a.length?a.length===1?a[0].descriptor.id:dE({pageBorderBox:t,draggable:n,candidates:a}):null}var ou=function(t,n){return Gt(as(t,n))},uE=function(e,t){var n=e.frame;return n?ou(t,n.scroll.diff.value):t};function iu(e){var t=e.displaced,n=e.id;return Boolean(t.visible[n]||t.invisible[n])}function mE(e){var t=e.draggable,n=e.closest,r=e.inHomeList;return n?r&&n.descriptor.index>t.descriptor.index?n.descriptor.index-1:n.descriptor.index:null}var fE=function(e){var t=e.pageBorderBoxWithDroppableScroll,n=e.draggable,r=e.destination,a=e.insideDestination,o=e.last,l=e.viewport,c=e.afterCritical,p=r.axis,f=os(r.axis,n.displaceBy),m=f.value,u=t[p.start],h=t[p.end],g=ia(n,a),v=xn(g,function(T){var E=T.descriptor.id,N=T.page.borderBox.center[p.line],x=wn(E,c),k=iu({displaced:o,id:E});return x?k?h<=N:u<N-m:k?h<=N+m:u<N}),C=mE({draggable:n,closest:v,inHomeList:Nr(n,r)});return zs({draggable:n,insideDestination:a,destination:r,viewport:l,last:o,displacedBy:f,index:C})},hE=4,SE=function(e){var t=e.draggable,n=e.pageBorderBoxWithDroppableScroll,r=e.previousImpact,a=e.destination,o=e.insideDestination,l=e.afterCritical;if(!a.isCombineEnabled)return null;var c=a.axis,p=os(a.axis,t.displaceBy),f=p.value,m=n[c.start],u=n[c.end],h=ia(t,o),g=xn(h,function(C){var T=C.descriptor.id,E=C.page.borderBox,N=E[c.size],x=N/hE,k=wn(T,l),I=iu({displaced:r.displaced,id:T});return k?I?u>E[c.start]+x&&u<E[c.end]-x:m>E[c.start]-f+x&&m<E[c.end]-f-x:I?u>E[c.start]+f+x&&u<E[c.end]+f-x:m>E[c.start]+x&&m<E[c.end]-x});if(!g)return null;var v={displacedBy:p,displaced:r.displaced,at:{type:"COMBINE",combine:{draggableId:g.descriptor.id,droppableId:a.descriptor.id}}};return v},lu=function(e){var t=e.pageOffset,n=e.draggable,r=e.draggables,a=e.droppables,o=e.previousImpact,l=e.viewport,c=e.afterCritical,p=ou(n.page.borderBox,t),f=pE({pageBorderBox:p,draggable:n,droppables:a});if(!f)return MT;var m=a[f],u=Qn(m.descriptor.id,r),h=uE(m,p);return SE({pageBorderBoxWithDroppableScroll:h,draggable:n,previousImpact:o,destination:m,insideDestination:u,afterCritical:c})||fE({pageBorderBoxWithDroppableScroll:h,draggable:n,destination:m,insideDestination:u,last:o.displaced,viewport:l,afterCritical:c})},ui=function(e,t){var n;return ge({},e,(n={},n[t.descriptor.id]=t,n))},gE=function(t){var n=t.previousImpact,r=t.impact,a=t.droppables,o=Dt(n),l=Dt(r);if(!o||o===l)return a;var c=a[o];if(!c.subject.withPlaceholder)return a;var p=sE(c);return ui(a,p)},bE=function(e){var t=e.draggable,n=e.draggables,r=e.droppables,a=e.previousImpact,o=e.impact,l=gE({previousImpact:a,impact:o,droppables:r}),c=Dt(o);if(!c)return l;var p=r[c];if(Nr(t,p)||p.subject.withPlaceholder)return l;var f=su(p,t,n);return ui(l,f)},Hr=function(e){var t=e.state,n=e.clientSelection,r=e.dimensions,a=e.viewport,o=e.impact,l=e.scrollJumpRequest,c=a||t.viewport,p=r||t.dimensions,f=n||t.current.client.selection,m=wt(f,t.initial.client.selection),u={offset:m,selection:f,borderBoxCenter:at(t.initial.client.borderBoxCenter,m)},h={selection:at(u.selection,c.scroll.current),borderBoxCenter:at(u.borderBoxCenter,c.scroll.current),offset:at(u.offset,c.scroll.diff.value)},g={client:u,page:h};if(t.phase==="COLLECTING")return ge({phase:"COLLECTING"},t,{dimensions:p,viewport:c,current:g});var v=p.draggables[t.critical.draggable.id],C=o||lu({pageOffset:h.offset,draggable:v,draggables:p.draggables,droppables:p.droppables,previousImpact:t.impact,viewport:c,afterCritical:t.afterCritical}),T=bE({draggable:v,impact:C,previousImpact:t.impact,draggables:p.draggables,droppables:p.droppables}),E=ge({},t,{current:g,dimensions:{draggables:p.draggables,droppables:T},impact:C,viewport:c,scrollJumpRequest:l||null,forceShouldAnimate:l?!1:null});return E};function vE(e,t){return e.map(function(n){return t[n]})}var cu=function(e){var t=e.impact,n=e.viewport,r=e.draggables,a=e.destination,o=e.forceShouldAnimate,l=t.displaced,c=vE(l.all,r),p=Qr({afterDragging:c,destination:a,displacedBy:t.displacedBy,viewport:n.frame,forceShouldAnimate:o,last:l});return ge({},t,{displaced:p})},du=function(e){var t=e.impact,n=e.draggable,r=e.droppable,a=e.draggables,o=e.viewport,l=e.afterCritical,c=la({impact:t,draggable:n,draggables:a,droppable:r,afterCritical:l});return pi({pageBorderBoxCenter:c,draggable:n,viewport:o})},pu=function(e){var t=e.state,n=e.dimensions,r=e.viewport;t.movementMode!=="SNAP"&&(process.env.NODE_ENV,V(!1));var a=t.impact,o=r||t.viewport,l=n||t.dimensions,c=l.draggables,p=l.droppables,f=c[t.critical.draggable.id],m=Dt(a);m||(process.env.NODE_ENV!=="production"?V(!1,"Must be over a destination in SNAP movement mode"):V(!1));var u=p[m],h=cu({impact:a,viewport:o,destination:u,draggables:c}),g=du({impact:h,draggable:f,droppable:u,draggables:c,viewport:o,afterCritical:t.afterCritical});return Hr({impact:h,clientSelection:g,state:t,dimensions:l,viewport:o})},yE=function(e){return{index:e.index,droppableId:e.droppableId}},uu=function(e){var t=e.draggable,n=e.home,r=e.draggables,a=e.viewport,o=os(n.axis,t.displaceBy),l=Qn(n.descriptor.id,r),c=l.indexOf(t);c===-1&&(process.env.NODE_ENV!=="production"?V(!1,"Expected draggable to be inside home list"):V(!1));var p=l.slice(c+1),f=p.reduce(function(g,v){return g[v.descriptor.id]=!0,g},{}),m={inVirtualList:n.descriptor.mode==="virtual",displacedBy:o,effected:f},u=Qr({afterDragging:p,destination:n,displacedBy:o,last:null,viewport:a.frame,forceShouldAnimate:!1}),h={displaced:u,displacedBy:o,at:{type:"REORDER",destination:yE(t.descriptor)}};return{impact:h,afterCritical:m}},TE=function(e,t){return{draggables:e.draggables,droppables:ui(e.droppables,t)}},is=function(t){process.env.NODE_ENV},ls=function(t){process.env.NODE_ENV},EE=function(e){var t=e.draggable,n=e.offset,r=e.initialWindowScroll,a=Gs(t.client,n),o=Ys(a,r),l=ge({},t,{placeholder:ge({},t.placeholder,{client:a}),client:a,page:o});return l},wE=function(e){var t=e.frame;return t||(process.env.NODE_ENV!=="production"?V(!1,"Expected Droppable to have a frame"):V(!1)),t},CE=function(e){var t=e.additions,n=e.updatedDroppables,r=e.viewport,a=r.scroll.diff.value;return t.map(function(o){var l=o.descriptor.droppableId,c=n[l],p=wE(c),f=p.scroll.diff.value,m=at(a,f),u=EE({draggable:o,offset:m,initialWindowScroll:r.scroll.initial});return u})},DE=function(e){var t=e.state,n=e.published;is();var r=n.modified.map(function(x){var k=t.dimensions.droppables[x.droppableId],I=ai(k,x.scroll);return I}),a=ge({},t.dimensions.droppables,{},zp(r)),o=qp(CE({additions:n.additions,updatedDroppables:a,viewport:t.viewport})),l=ge({},t.dimensions.draggables,{},o);n.removals.forEach(function(x){delete l[x]});var c={droppables:a,draggables:l},p=Dt(t.impact),f=p?c.droppables[p]:null,m=c.draggables[t.critical.draggable.id],u=c.droppables[t.critical.droppable.id],h=uu({draggable:m,home:u,draggables:l,viewport:t.viewport}),g=h.impact,v=h.afterCritical,C=f&&f.isCombineEnabled?t.impact:g,T=lu({pageOffset:t.current.page.offset,draggable:c.draggables[t.critical.draggable.id],draggables:c.draggables,droppables:c.droppables,previousImpact:C,viewport:t.viewport,afterCritical:v});ls();var E=ge({phase:"DRAGGING"},t,{phase:"DRAGGING",impact:T,onLiftImpact:g,dimensions:c,afterCritical:v,forceShouldAnimate:!1});if(t.phase==="COLLECTING")return E;var N=ge({phase:"DROP_PENDING"},E,{phase:"DROP_PENDING",reason:t.reason,isWaiting:!1});return N},Lo=function(t){return t.movementMode==="SNAP"},io=function(t,n,r){var a=TE(t.dimensions,n);return!Lo(t)||r?Hr({state:t,dimensions:a}):pu({state:t,dimensions:a})};function lo(e){return e.isDragging&&e.movementMode==="SNAP"?ge({phase:"DRAGGING"},e,{scrollJumpRequest:null}):e}var ad={phase:"IDLE",completed:null,shouldFlush:!1},NE=function(e,t){if(e===void 0&&(e=ad),t.type==="FLUSH")return ge({},ad,{shouldFlush:!0});if(t.type==="INITIAL_PUBLISH"){e.phase!=="IDLE"&&(process.env.NODE_ENV!=="production"?V(!1,"INITIAL_PUBLISH must come after a IDLE phase"):V(!1));var n=t.payload,r=n.critical,a=n.clientSelection,o=n.viewport,l=n.dimensions,c=n.movementMode,p=l.draggables[r.draggable.id],f=l.droppables[r.droppable.id],m={selection:a,borderBoxCenter:p.client.borderBox.center,offset:st},u={client:m,page:{selection:at(m.selection,o.scroll.initial),borderBoxCenter:at(m.selection,o.scroll.initial),offset:at(m.selection,o.scroll.diff.value)}},h=aa(l.droppables).every(function(le){return!le.isFixedOnPage}),g=uu({draggable:p,home:f,draggables:l.draggables,viewport:o}),v=g.impact,C=g.afterCritical,T={phase:"DRAGGING",isDragging:!0,critical:r,movementMode:c,dimensions:l,initial:u,current:u,isWindowScrollAllowed:h,impact:v,afterCritical:C,onLiftImpact:v,viewport:o,scrollJumpRequest:null,forceShouldAnimate:null};return T}if(t.type==="COLLECTION_STARTING"){if(e.phase==="COLLECTING"||e.phase==="DROP_PENDING")return e;e.phase!=="DRAGGING"&&(process.env.NODE_ENV!=="production"?V(!1,"Collection cannot start from phase "+e.phase):V(!1));var E=ge({phase:"COLLECTING"},e,{phase:"COLLECTING"});return E}if(t.type==="PUBLISH_WHILE_DRAGGING")return e.phase==="COLLECTING"||e.phase==="DROP_PENDING"||(process.env.NODE_ENV!=="production"?V(!1,"Unexpected "+t.type+" received in phase "+e.phase):V(!1)),DE({state:e,published:t.payload});if(t.type==="MOVE"){if(e.phase==="DROP_PENDING")return e;$n(e)||(process.env.NODE_ENV!=="production"?V(!1,t.type+" not permitted in phase "+e.phase):V(!1));var N=t.payload.client;return Tn(N,e.current.client.selection)?e:Hr({state:e,clientSelection:N,impact:Lo(e)?e.impact:null})}if(t.type==="UPDATE_DROPPABLE_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="COLLECTING")return lo(e);$n(e)||(process.env.NODE_ENV!=="production"?V(!1,t.type+" not permitted in phase "+e.phase):V(!1));var x=t.payload,k=x.id,I=x.newScroll,A=e.dimensions.droppables[k];if(!A)return e;var R=ai(A,I);return io(e,R,!1)}if(t.type==="UPDATE_DROPPABLE_IS_ENABLED"){if(e.phase==="DROP_PENDING")return e;$n(e)||(process.env.NODE_ENV!=="production"?V(!1,"Attempting to move in an unsupported phase "+e.phase):V(!1));var w=t.payload,_=w.id,O=w.isEnabled,K=e.dimensions.droppables[_];K||(process.env.NODE_ENV!=="production"?V(!1,"Cannot find Droppable[id: "+_+"] to toggle its enabled state"):V(!1)),K.isEnabled===O&&(process.env.NODE_ENV!=="production"?V(!1,"Trying to set droppable isEnabled to "+String(O)+`
|
|
405
|
-
but it is already `+String(
|
|
406
|
-
but it is already `+String(j.isCombineEnabled))
|
|
403
|
+
`+ed(t.source)+`
|
|
404
|
+
`},Fs={dragHandleUsageInstructions:bT,onDragStart:vT,onDragUpdate:yT,onDragEnd:TT},rt={x:0,y:0},st=function(t,n){return{x:t.x+n.x,y:t.y+n.y}},Et=function(t,n){return{x:t.x-n.x,y:t.y-n.y}},vn=function(t,n){return t.x===n.x&&t.y===n.y},Cr=function(t){return{x:t.x!==0?-t.x:0,y:t.y!==0?-t.y:0}},Gn=function(t,n,r){var o;return r===void 0&&(r=0),o={},o[t]=n,o[t==="x"?"y":"x"]=r,o},Jr=function(t,n){return Math.sqrt(Math.pow(n.x-t.x,2)+Math.pow(n.y-t.y,2))},td=function(t,n){return Math.min.apply(Math,n.map(function(r){return Jr(t,r)}))},Up=function(t){return function(n){return{x:t(n.x),y:t(n.y)}}},ET=function(e,t){var n=Wt({top:Math.max(t.top,e.top),right:Math.min(t.right,e.right),bottom:Math.min(t.bottom,e.bottom),left:Math.max(t.left,e.left)});return n.width<=0||n.height<=0?null:n},ss=function(t,n){return{top:t.top+n.y,left:t.left+n.x,bottom:t.bottom+n.y,right:t.right+n.x}},nd=function(t){return[{x:t.left,y:t.top},{x:t.right,y:t.top},{x:t.left,y:t.bottom},{x:t.right,y:t.bottom}]},wT={top:0,right:0,bottom:0,left:0},CT=function(t,n){return n?ss(t,n.scroll.diff.displacement):t},DT=function(t,n,r){if(r&&r.increasedBy){var o;return Se({},t,(o={},o[n.end]=t[n.end]+r.increasedBy[n.line],o))}return t},NT=function(t,n){return n&&n.shouldClipSubject?ET(n.pageMarginBox,t):Wt(t)},gr=function(e){var t=e.page,n=e.withPlaceholder,r=e.axis,o=e.frame,a=CT(t.marginBox,o),l=DT(a,r,n),c=NT(l,o);return{page:t,withPlaceholder:n,active:c}},ai=function(e,t){e.frame||(process.env.NODE_ENV,$());var n=e.frame,r=Et(t,n.scroll.initial),o=Cr(r),a=Se({},n,{scroll:{initial:n.scroll.initial,current:t,diff:{value:r,displacement:o},max:n.scroll.max}}),l=gr({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:a}),c=Se({},e,{frame:a,subject:l});return c};function xT(e){return Number.isInteger?Number.isInteger(e):typeof e=="number"&&isFinite(e)&&Math.floor(e)===e}function Us(e){return Object.values?Object.values(e):Object.keys(e).map(function(t){return e[t]})}function ii(e,t){if(e.findIndex)return e.findIndex(t);for(var n=0;n<e.length;n++)if(t(e[n]))return n;return-1}function Dn(e,t){if(e.find)return e.find(t);var n=ii(e,t);if(n!==-1)return e[n]}function jp(e){return Array.prototype.slice.call(e)}var zp=nt(function(e){return e.reduce(function(t,n){return t[n.descriptor.id]=n,t},{})}),qp=nt(function(e){return e.reduce(function(t,n){return t[n.descriptor.id]=n,t},{})}),ro=nt(function(e){return Us(e)}),kT=nt(function(e){return Us(e)}),Zn=nt(function(e,t){var n=kT(t).filter(function(r){return e===r.descriptor.droppableId}).sort(function(r,o){return r.descriptor.index-o.descriptor.index});return n});function li(e){return e.at&&e.at.type==="REORDER"?e.at.destination:null}function so(e){return e.at&&e.at.type==="COMBINE"?e.at.combine:null}var oo=nt(function(e,t){return t.filter(function(n){return n.descriptor.id!==e.descriptor.id})}),IT=function(e){var t=e.isMovingForward,n=e.draggable,r=e.destination,o=e.insideDestination,a=e.previousImpact;if(!r.isCombineEnabled)return null;var l=li(a);if(!l)return null;function c(w){var T={type:"COMBINE",combine:{draggableId:w,droppableId:r.descriptor.id}};return Se({},a,{at:T})}var p=a.displaced.all,f=p.length?p[0]:null;if(t)return f?c(f):null;var m=oo(n,o);if(!f){if(!m.length)return null;var u=m[m.length-1];return c(u.descriptor.id)}var h=ii(m,function(w){return w.descriptor.id===f});h===-1&&(process.env.NODE_ENV!=="production"?$(!1,"Could not find displaced item in set"):$());var g=h-1;if(g<0)return null;var v=m[g];return c(v.descriptor.id)},Dr=function(e,t){return e.descriptor.droppableId===t.descriptor.id},Jp={point:rt,value:0},Zr={invisible:{},visible:{},all:[]},MT={displaced:Zr,displacedBy:Jp,at:null},Ot=function(e,t){return function(n){return e<=n&&n<=t}},Zp=function(e){var t=Ot(e.top,e.bottom),n=Ot(e.left,e.right);return function(r){var o=t(r.top)&&t(r.bottom)&&n(r.left)&&n(r.right);if(o)return!0;var a=t(r.top)||t(r.bottom),l=n(r.left)||n(r.right),c=a&&l;if(c)return!0;var p=r.top<e.top&&r.bottom>e.bottom,f=r.left<e.left&&r.right>e.right,m=p&&f;if(m)return!0;var u=p&&l||f&&a;return u}},_T=function(e){var t=Ot(e.top,e.bottom),n=Ot(e.left,e.right);return function(r){var o=t(r.top)&&t(r.bottom)&&n(r.left)&&n(r.right);return o}},ci={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},Xp={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},RT=function(e){return function(t){var n=Ot(t.top,t.bottom),r=Ot(t.left,t.right);return function(o){return e===ci?n(o.top)&&n(o.bottom):r(o.left)&&r(o.right)}}},OT=function(t,n){var r=n.frame?n.frame.scroll.diff.displacement:rt;return ss(t,r)},LT=function(t,n,r){return n.subject.active?r(n.subject.active)(t):!1},PT=function(t,n,r){return r(n)(t)},di=function(t){var n=t.target,r=t.destination,o=t.viewport,a=t.withDroppableDisplacement,l=t.isVisibleThroughFrameFn,c=a?OT(n,r):n;return LT(c,r,l)&&PT(c,o,l)},BT=function(t){return di(Se({},t,{isVisibleThroughFrameFn:Zp}))},Qp=function(t){return di(Se({},t,{isVisibleThroughFrameFn:_T}))},AT=function(t){return di(Se({},t,{isVisibleThroughFrameFn:RT(t.destination.axis)}))},FT=function(t,n,r){if(typeof r=="boolean")return r;if(!n)return!0;var o=n.invisible,a=n.visible;if(o[t])return!1;var l=a[t];return l?l.shouldAnimate:!0};function VT(e,t){var n=e.page.marginBox,r={top:t.point.y,right:0,bottom:0,left:t.point.x};return Wt(si(n,r))}function Xr(e){var t=e.afterDragging,n=e.destination,r=e.displacedBy,o=e.viewport,a=e.forceShouldAnimate,l=e.last;return t.reduce(function(p,f){var m=VT(f,r),u=f.descriptor.id;p.all.push(u);var h=BT({target:m,destination:n,viewport:o,withDroppableDisplacement:!0});if(!h)return p.invisible[f.descriptor.id]=!0,p;var g=FT(u,l,a),v={draggableId:u,shouldAnimate:g};return p.visible[u]=v,p},{all:[],visible:{},invisible:{}})}function $T(e,t){if(!e.length)return 0;var n=e[e.length-1].descriptor.index;return t.inHomeList?n:n+1}function rd(e){var t=e.insideDestination,n=e.inHomeList,r=e.displacedBy,o=e.destination,a=$T(t,{inHomeList:n});return{displaced:Zr,displacedBy:r,at:{type:"REORDER",destination:{droppableId:o.descriptor.id,index:a}}}}function js(e){var t=e.draggable,n=e.insideDestination,r=e.destination,o=e.viewport,a=e.displacedBy,l=e.last,c=e.index,p=e.forceShouldAnimate,f=Dr(t,r);if(c==null)return rd({insideDestination:n,inHomeList:f,displacedBy:a,destination:r});var m=Dn(n,function(w){return w.descriptor.index===c});if(!m)return rd({insideDestination:n,inHomeList:f,displacedBy:a,destination:r});var u=oo(t,n),h=n.indexOf(m),g=u.slice(h),v=Xr({afterDragging:g,destination:r,displacedBy:a,last:l,viewport:o.frame,forceShouldAnimate:p});return{displaced:v,displacedBy:a,at:{type:"REORDER",destination:{droppableId:r.descriptor.id,index:c}}}}function Tn(e,t){return!!t.effected[e]}var KT=function(e){var t=e.isMovingForward,n=e.destination,r=e.draggables,o=e.combine,a=e.afterCritical;if(!n.isCombineEnabled)return null;var l=o.draggableId,c=r[l],p=c.descriptor.index,f=Tn(l,a);return f?t?p:p-1:t?p+1:p},HT=function(e){var t=e.isMovingForward,n=e.isInHomeList,r=e.insideDestination,o=e.location;if(!r.length)return null;var a=o.index,l=t?a+1:a-1,c=r[0].descriptor.index,p=r[r.length-1].descriptor.index,f=n?p:p+1;return l<c||l>f?null:l},WT=function(e){var t=e.isMovingForward,n=e.isInHomeList,r=e.draggable,o=e.draggables,a=e.destination,l=e.insideDestination,c=e.previousImpact,p=e.viewport,f=e.afterCritical,m=c.at;if(m||(process.env.NODE_ENV!=="production"?$(!1,"Cannot move in direction without previous impact location"):$()),m.type==="REORDER"){var u=HT({isMovingForward:t,isInHomeList:n,location:m.destination,insideDestination:l});return u==null?null:js({draggable:r,insideDestination:l,destination:a,viewport:p,last:c.displaced,displacedBy:c.displacedBy,index:u})}var h=KT({isMovingForward:t,destination:a,displaced:c.displaced,draggables:o,combine:m.combine,afterCritical:f});return h==null?null:js({draggable:r,insideDestination:l,destination:a,viewport:p,last:c.displaced,displacedBy:c.displacedBy,index:h})},GT=function(e){var t=e.displaced,n=e.afterCritical,r=e.combineWith,o=e.displacedBy,a=!!(t.visible[r]||t.invisible[r]);return Tn(r,n)?a?rt:Cr(o.point):a?o.point:rt},YT=function(e){var t=e.afterCritical,n=e.impact,r=e.draggables,o=so(n);o||(process.env.NODE_ENV,$());var a=o.draggableId,l=r[a].page.borderBox.center,c=GT({displaced:n.displaced,afterCritical:t,combineWith:a,displacedBy:n.displacedBy});return st(l,c)},eu=function(t,n){return n.margin[t.start]+n.borderBox[t.size]/2},UT=function(t,n){return n.margin[t.end]+n.borderBox[t.size]/2},pi=function(t,n,r){return n[t.crossAxisStart]+r.margin[t.crossAxisStart]+r.borderBox[t.crossAxisSize]/2},sd=function(t){var n=t.axis,r=t.moveRelativeTo,o=t.isMoving;return Gn(n.line,r.marginBox[n.end]+eu(n,o),pi(n,r.marginBox,o))},od=function(t){var n=t.axis,r=t.moveRelativeTo,o=t.isMoving;return Gn(n.line,r.marginBox[n.start]-UT(n,o),pi(n,r.marginBox,o))},jT=function(t){var n=t.axis,r=t.moveInto,o=t.isMoving;return Gn(n.line,r.contentBox[n.start]+eu(n,o),pi(n,r.contentBox,o))},zT=function(e){var t=e.impact,n=e.draggable,r=e.draggables,o=e.droppable,a=e.afterCritical,l=Zn(o.descriptor.id,r),c=n.page,p=o.axis;if(!l.length)return jT({axis:p,moveInto:o.page,isMoving:c});var f=t.displaced,m=t.displacedBy,u=f.all[0];if(u){var h=r[u];if(Tn(u,a))return od({axis:p,moveRelativeTo:h.page,isMoving:c});var g=Ws(h.page,m.point);return od({axis:p,moveRelativeTo:g,isMoving:c})}var v=l[l.length-1];if(v.descriptor.id===n.descriptor.id)return c.borderBox.center;if(Tn(v.descriptor.id,a)){var w=Ws(v.page,Cr(a.displacedBy.point));return sd({axis:p,moveRelativeTo:w,isMoving:c})}return sd({axis:p,moveRelativeTo:v.page,isMoving:c})},Oa=function(e,t){var n=e.frame;return n?st(t,n.scroll.diff.displacement):t},qT=function(t){var n=t.impact,r=t.draggable,o=t.droppable,a=t.draggables,l=t.afterCritical,c=r.page.borderBox.center,p=n.at;return!o||!p?c:p.type==="REORDER"?zT({impact:n,draggable:r,draggables:a,droppable:o,afterCritical:l}):YT({impact:n,draggables:a,afterCritical:l})},ao=function(e){var t=qT(e),n=e.droppable,r=n?Oa(n,t):t;return r},tu=function(e,t){var n=Et(t,e.scroll.initial),r=Cr(n),o=Wt({top:t.y,bottom:t.y+e.frame.height,left:t.x,right:t.x+e.frame.width}),a={frame:o,scroll:{initial:e.scroll.initial,max:e.scroll.max,current:t,diff:{value:n,displacement:r}}};return a};function ad(e,t){return e.map(function(n){return t[n]})}function JT(e,t){for(var n=0;n<t.length;n++){var r=t[n].visible[e];if(r)return r}return null}var ZT=function(e){var t=e.impact,n=e.viewport,r=e.destination,o=e.draggables,a=e.maxScrollChange,l=tu(n,st(n.scroll.current,a)),c=r.frame?ai(r,st(r.frame.scroll.current,a)):r,p=t.displaced,f=Xr({afterDragging:ad(p.all,o),destination:r,displacedBy:t.displacedBy,viewport:l.frame,last:p,forceShouldAnimate:!1}),m=Xr({afterDragging:ad(p.all,o),destination:c,displacedBy:t.displacedBy,viewport:n.frame,last:p,forceShouldAnimate:!1}),u={},h={},g=[p,f,m];p.all.forEach(function(w){var T=JT(w,g);if(T){h[w]=T;return}u[w]=!0});var v=Se({},t,{displaced:{all:p.all,invisible:u,visible:h}});return v},XT=function(e,t){return st(e.scroll.diff.displacement,t)},ui=function(e){var t=e.pageBorderBoxCenter,n=e.draggable,r=e.viewport,o=XT(r,t),a=Et(o,n.page.borderBox.center);return st(n.client.borderBox.center,a)},nu=function(e){var t=e.draggable,n=e.destination,r=e.newPageBorderBoxCenter,o=e.viewport,a=e.withDroppableDisplacement,l=e.onlyOnMainAxis,c=l===void 0?!1:l,p=Et(r,t.page.borderBox.center),f=ss(t.page.borderBox,p),m={target:f,destination:n,withDroppableDisplacement:a,viewport:o};return c?AT(m):Qp(m)},QT=function(e){var t=e.isMovingForward,n=e.draggable,r=e.destination,o=e.draggables,a=e.previousImpact,l=e.viewport,c=e.previousPageBorderBoxCenter,p=e.previousClientSelection,f=e.afterCritical;if(!r.isEnabled)return null;var m=Zn(r.descriptor.id,o),u=Dr(n,r),h=IT({isMovingForward:t,draggable:n,destination:r,insideDestination:m,previousImpact:a})||WT({isMovingForward:t,isInHomeList:u,draggable:n,draggables:o,destination:r,insideDestination:m,previousImpact:a,viewport:l,afterCritical:f});if(!h)return null;var g=ao({impact:h,draggable:n,droppable:r,draggables:o,afterCritical:f}),v=nu({draggable:n,destination:r,newPageBorderBoxCenter:g,viewport:l.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0});if(v){var w=ui({pageBorderBoxCenter:g,draggable:n,viewport:l});return{clientSelection:w,impact:h,scrollJumpRequest:null}}var T=Et(g,c),E=ZT({impact:h,viewport:l,destination:r,draggables:o,maxScrollChange:T});return{clientSelection:p,impact:E,scrollJumpRequest:T}},ht=function(t){var n=t.subject.active;return n||(process.env.NODE_ENV!=="production"?$(!1,"Cannot get clipped area from droppable"):$()),n},eE=function(e){var t=e.isMovingForward,n=e.pageBorderBoxCenter,r=e.source,o=e.droppables,a=e.viewport,l=r.subject.active;if(!l)return null;var c=r.axis,p=Ot(l[c.start],l[c.end]),f=ro(o).filter(function(u){return u!==r}).filter(function(u){return u.isEnabled}).filter(function(u){return!!u.subject.active}).filter(function(u){return Zp(a.frame)(ht(u))}).filter(function(u){var h=ht(u);return t?l[c.crossAxisEnd]<h[c.crossAxisEnd]:h[c.crossAxisStart]<l[c.crossAxisStart]}).filter(function(u){var h=ht(u),g=Ot(h[c.start],h[c.end]);return p(h[c.start])||p(h[c.end])||g(l[c.start])||g(l[c.end])}).sort(function(u,h){var g=ht(u)[c.crossAxisStart],v=ht(h)[c.crossAxisStart];return t?g-v:v-g}).filter(function(u,h,g){return ht(u)[c.crossAxisStart]===ht(g[0])[c.crossAxisStart]});if(!f.length)return null;if(f.length===1)return f[0];var m=f.filter(function(u){var h=Ot(ht(u)[c.start],ht(u)[c.end]);return h(n[c.line])});return m.length===1?m[0]:m.length>1?m.sort(function(u,h){return ht(u)[c.start]-ht(h)[c.start]})[0]:f.sort(function(u,h){var g=td(n,nd(ht(u))),v=td(n,nd(ht(h)));return g!==v?g-v:ht(u)[c.start]-ht(h)[c.start]})[0]},id=function(t,n){var r=t.page.borderBox.center;return Tn(t.descriptor.id,n)?Et(r,n.displacedBy.point):r},tE=function(t,n){var r=t.page.borderBox;return Tn(t.descriptor.id,n)?ss(r,Cr(n.displacedBy.point)):r},nE=function(e){var t=e.pageBorderBoxCenter,n=e.viewport,r=e.destination,o=e.insideDestination,a=e.afterCritical,l=o.filter(function(c){return Qp({target:tE(c,a),destination:r,viewport:n.frame,withDroppableDisplacement:!0})}).sort(function(c,p){var f=Jr(t,Oa(r,id(c,a))),m=Jr(t,Oa(r,id(p,a)));return f<m?-1:m<f?1:c.descriptor.index-p.descriptor.index});return l[0]||null},os=nt(function(t,n){var r=n[t.line];return{value:r,point:Gn(t.line,r)}}),rE=function(t,n,r){var o=t.axis;if(t.descriptor.mode==="virtual")return Gn(o.line,n[o.line]);var a=t.subject.page.contentBox[o.size],l=Zn(t.descriptor.id,r),c=l.reduce(function(m,u){return m+u.client.marginBox[o.size]},0),p=c+n[o.line],f=p-a;return f<=0?null:Gn(o.line,f)},ru=function(t,n){return Se({},t,{scroll:Se({},t.scroll,{max:n})})},su=function(t,n,r){var o=t.frame;Dr(n,t)&&(process.env.NODE_ENV!=="production"?$(!1,"Should not add placeholder space to home list"):$()),t.subject.withPlaceholder&&(process.env.NODE_ENV!=="production"?$(!1,"Cannot add placeholder size to a subject when it already has one"):$());var a=os(t.axis,n.displaceBy).point,l=rE(t,a,r),c={placeholderSize:a,increasedBy:l,oldFrameMaxScroll:t.frame?t.frame.scroll.max:null};if(!o){var p=gr({page:t.subject.page,withPlaceholder:c,axis:t.axis,frame:t.frame});return Se({},t,{subject:p})}var f=l?st(o.scroll.max,l):o.scroll.max,m=ru(o,f),u=gr({page:t.subject.page,withPlaceholder:c,axis:t.axis,frame:m});return Se({},t,{subject:u,frame:m})},sE=function(t){var n=t.subject.withPlaceholder;n||(process.env.NODE_ENV!=="production"?$(!1,"Cannot remove placeholder form subject when there was none"):$());var r=t.frame;if(!r){var o=gr({page:t.subject.page,axis:t.axis,frame:null,withPlaceholder:null});return Se({},t,{subject:o})}var a=n.oldFrameMaxScroll;a||(process.env.NODE_ENV!=="production"?$(!1,"Expected droppable with frame to have old max frame scroll when removing placeholder"):$());var l=ru(r,a),c=gr({page:t.subject.page,axis:t.axis,frame:l,withPlaceholder:null});return Se({},t,{subject:c,frame:l})},oE=function(e){var t=e.previousPageBorderBoxCenter,n=e.moveRelativeTo,r=e.insideDestination,o=e.draggable,a=e.draggables,l=e.destination,c=e.viewport,p=e.afterCritical;if(!n){if(r.length)return null;var f={displaced:Zr,displacedBy:Jp,at:{type:"REORDER",destination:{droppableId:l.descriptor.id,index:0}}},m=ao({impact:f,draggable:o,droppable:l,draggables:a,afterCritical:p}),u=Dr(o,l)?l:su(l,o,a),h=nu({draggable:o,destination:u,newPageBorderBoxCenter:m,viewport:c.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0});return h?f:null}var g=t[l.axis.line]<=n.page.borderBox.center[l.axis.line],v=function(){var T=n.descriptor.index;return n.descriptor.id===o.descriptor.id||g?T:T+1}(),w=os(l.axis,o.displaceBy);return js({draggable:o,insideDestination:r,destination:l,viewport:c,displacedBy:w,last:Zr,index:v})},aE=function(e){var t=e.isMovingForward,n=e.previousPageBorderBoxCenter,r=e.draggable,o=e.isOver,a=e.draggables,l=e.droppables,c=e.viewport,p=e.afterCritical,f=eE({isMovingForward:t,pageBorderBoxCenter:n,source:o,droppables:l,viewport:c});if(!f)return null;var m=Zn(f.descriptor.id,a),u=nE({pageBorderBoxCenter:n,viewport:c,destination:f,insideDestination:m,afterCritical:p}),h=oE({previousPageBorderBoxCenter:n,destination:f,draggable:r,draggables:a,moveRelativeTo:u,insideDestination:m,viewport:c,afterCritical:p});if(!h)return null;var g=ao({impact:h,draggable:r,droppable:f,draggables:a,afterCritical:p}),v=ui({pageBorderBoxCenter:g,draggable:r,viewport:c});return{clientSelection:v,impact:h,scrollJumpRequest:null}},Ct=function(e){var t=e.at;return t?t.type==="REORDER"?t.destination.droppableId:t.combine.droppableId:null},iE=function(t,n){var r=Ct(t);return r?n[r]:null},lE=function(e){var t=e.state,n=e.type,r=iE(t.impact,t.dimensions.droppables),o=!!r,a=t.dimensions.droppables[t.critical.droppable.id],l=r||a,c=l.axis.direction,p=c==="vertical"&&(n==="MOVE_UP"||n==="MOVE_DOWN")||c==="horizontal"&&(n==="MOVE_LEFT"||n==="MOVE_RIGHT");if(p&&!o)return null;var f=n==="MOVE_DOWN"||n==="MOVE_RIGHT",m=t.dimensions.draggables[t.critical.draggable.id],u=t.current.page.borderBoxCenter,h=t.dimensions,g=h.draggables,v=h.droppables;return p?QT({isMovingForward:f,previousPageBorderBoxCenter:u,draggable:m,destination:l,draggables:g,viewport:t.viewport,previousClientSelection:t.current.client.selection,previousImpact:t.impact,afterCritical:t.afterCritical}):aE({isMovingForward:f,previousPageBorderBoxCenter:u,draggable:m,isOver:l,draggables:g,droppables:v,viewport:t.viewport,afterCritical:t.afterCritical})};function Fn(e){return e.phase==="DRAGGING"||e.phase==="COLLECTING"}function ou(e){var t=Ot(e.top,e.bottom),n=Ot(e.left,e.right);return function(o){return t(o.y)&&n(o.x)}}function cE(e,t){return e.left<t.right&&e.right>t.left&&e.top<t.bottom&&e.bottom>t.top}function dE(e){var t=e.pageBorderBox,n=e.draggable,r=e.candidates,o=n.page.borderBox.center,a=r.map(function(l){var c=l.axis,p=Gn(l.axis.line,t.center[c.line],l.page.borderBox.center[c.crossAxisLine]);return{id:l.descriptor.id,distance:Jr(o,p)}}).sort(function(l,c){return c.distance-l.distance});return a[0]?a[0].id:null}function pE(e){var t=e.pageBorderBox,n=e.draggable,r=e.droppables,o=ro(r).filter(function(a){if(!a.isEnabled)return!1;var l=a.subject.active;if(!l||!cE(t,l))return!1;if(ou(l)(t.center))return!0;var c=a.axis,p=l.center[c.crossAxisLine],f=t[c.crossAxisStart],m=t[c.crossAxisEnd],u=Ot(l[c.crossAxisStart],l[c.crossAxisEnd]),h=u(f),g=u(m);return!h&&!g?!0:h?f<p:m>p});return o.length?o.length===1?o[0].descriptor.id:dE({pageBorderBox:t,draggable:n,candidates:o}):null}var au=function(t,n){return Wt(ss(t,n))},uE=function(e,t){var n=e.frame;return n?au(t,n.scroll.diff.value):t};function iu(e){var t=e.displaced,n=e.id;return!!(t.visible[n]||t.invisible[n])}function mE(e){var t=e.draggable,n=e.closest,r=e.inHomeList;return n?r&&n.descriptor.index>t.descriptor.index?n.descriptor.index-1:n.descriptor.index:null}var fE=function(e){var t=e.pageBorderBoxWithDroppableScroll,n=e.draggable,r=e.destination,o=e.insideDestination,a=e.last,l=e.viewport,c=e.afterCritical,p=r.axis,f=os(r.axis,n.displaceBy),m=f.value,u=t[p.start],h=t[p.end],g=oo(n,o),v=Dn(g,function(T){var E=T.descriptor.id,D=T.page.borderBox.center[p.line],k=Tn(E,c),I=iu({displaced:a,id:E});return k?I?h<=D:u<D-m:I?h<=D+m:u<D}),w=mE({draggable:n,closest:v,inHomeList:Dr(n,r)});return js({draggable:n,insideDestination:o,destination:r,viewport:l,last:a,displacedBy:f,index:w})},hE=4,SE=function(e){var t=e.draggable,n=e.pageBorderBoxWithDroppableScroll,r=e.previousImpact,o=e.destination,a=e.insideDestination,l=e.afterCritical;if(!o.isCombineEnabled)return null;var c=o.axis,p=os(o.axis,t.displaceBy),f=p.value,m=n[c.start],u=n[c.end],h=oo(t,a),g=Dn(h,function(w){var T=w.descriptor.id,E=w.page.borderBox,D=E[c.size],k=D/hE,I=Tn(T,l),x=iu({displaced:r.displaced,id:T});return I?x?u>E[c.start]+k&&u<E[c.end]-k:m>E[c.start]-f+k&&m<E[c.end]-f-k:x?u>E[c.start]+f+k&&u<E[c.end]+f-k:m>E[c.start]+k&&m<E[c.end]-k});if(!g)return null;var v={displacedBy:p,displaced:r.displaced,at:{type:"COMBINE",combine:{draggableId:g.descriptor.id,droppableId:o.descriptor.id}}};return v},lu=function(e){var t=e.pageOffset,n=e.draggable,r=e.draggables,o=e.droppables,a=e.previousImpact,l=e.viewport,c=e.afterCritical,p=au(n.page.borderBox,t),f=pE({pageBorderBox:p,draggable:n,droppables:o});if(!f)return MT;var m=o[f],u=Zn(m.descriptor.id,r),h=uE(m,p);return SE({pageBorderBoxWithDroppableScroll:h,draggable:n,previousImpact:a,destination:m,insideDestination:u,afterCritical:c})||fE({pageBorderBoxWithDroppableScroll:h,draggable:n,destination:m,insideDestination:u,last:a.displaced,viewport:l,afterCritical:c})},mi=function(e,t){var n;return Se({},e,(n={},n[t.descriptor.id]=t,n))},gE=function(t){var n=t.previousImpact,r=t.impact,o=t.droppables,a=Ct(n),l=Ct(r);if(!a||a===l)return o;var c=o[a];if(!c.subject.withPlaceholder)return o;var p=sE(c);return mi(o,p)},bE=function(e){var t=e.draggable,n=e.draggables,r=e.droppables,o=e.previousImpact,a=e.impact,l=gE({previousImpact:o,impact:a,droppables:r}),c=Ct(a);if(!c)return l;var p=r[c];if(Dr(t,p)||p.subject.withPlaceholder)return l;var f=su(p,t,n);return mi(l,f)},Kr=function(e){var t=e.state,n=e.clientSelection,r=e.dimensions,o=e.viewport,a=e.impact,l=e.scrollJumpRequest,c=o||t.viewport,p=r||t.dimensions,f=n||t.current.client.selection,m=Et(f,t.initial.client.selection),u={offset:m,selection:f,borderBoxCenter:st(t.initial.client.borderBoxCenter,m)},h={selection:st(u.selection,c.scroll.current),borderBoxCenter:st(u.borderBoxCenter,c.scroll.current),offset:st(u.offset,c.scroll.diff.value)},g={client:u,page:h};if(t.phase==="COLLECTING")return Se({phase:"COLLECTING"},t,{dimensions:p,viewport:c,current:g});var v=p.draggables[t.critical.draggable.id],w=a||lu({pageOffset:h.offset,draggable:v,draggables:p.draggables,droppables:p.droppables,previousImpact:t.impact,viewport:c,afterCritical:t.afterCritical}),T=bE({draggable:v,impact:w,previousImpact:t.impact,draggables:p.draggables,droppables:p.droppables}),E=Se({},t,{current:g,dimensions:{draggables:p.draggables,droppables:T},impact:w,viewport:c,scrollJumpRequest:l||null,forceShouldAnimate:l?!1:null});return E};function vE(e,t){return e.map(function(n){return t[n]})}var cu=function(e){var t=e.impact,n=e.viewport,r=e.draggables,o=e.destination,a=e.forceShouldAnimate,l=t.displaced,c=vE(l.all,r),p=Xr({afterDragging:c,destination:o,displacedBy:t.displacedBy,viewport:n.frame,forceShouldAnimate:a,last:l});return Se({},t,{displaced:p})},du=function(e){var t=e.impact,n=e.draggable,r=e.droppable,o=e.draggables,a=e.viewport,l=e.afterCritical,c=ao({impact:t,draggable:n,draggables:o,droppable:r,afterCritical:l});return ui({pageBorderBoxCenter:c,draggable:n,viewport:a})},pu=function(e){var t=e.state,n=e.dimensions,r=e.viewport;t.movementMode!=="SNAP"&&(process.env.NODE_ENV,$());var o=t.impact,a=r||t.viewport,l=n||t.dimensions,c=l.draggables,p=l.droppables,f=c[t.critical.draggable.id],m=Ct(o);m||(process.env.NODE_ENV!=="production"?$(!1,"Must be over a destination in SNAP movement mode"):$());var u=p[m],h=cu({impact:o,viewport:a,destination:u,draggables:c}),g=du({impact:h,draggable:f,droppable:u,draggables:c,viewport:a,afterCritical:t.afterCritical});return Kr({impact:h,clientSelection:g,state:t,dimensions:l,viewport:a})},yE=function(e){return{index:e.index,droppableId:e.droppableId}},uu=function(e){var t=e.draggable,n=e.home,r=e.draggables,o=e.viewport,a=os(n.axis,t.displaceBy),l=Zn(n.descriptor.id,r),c=l.indexOf(t);c===-1&&(process.env.NODE_ENV!=="production"?$(!1,"Expected draggable to be inside home list"):$());var p=l.slice(c+1),f=p.reduce(function(g,v){return g[v.descriptor.id]=!0,g},{}),m={inVirtualList:n.descriptor.mode==="virtual",displacedBy:a,effected:f},u=Xr({afterDragging:p,destination:n,displacedBy:a,last:null,viewport:o.frame,forceShouldAnimate:!1}),h={displaced:u,displacedBy:a,at:{type:"REORDER",destination:yE(t.descriptor)}};return{impact:h,afterCritical:m}},TE=function(e,t){return{draggables:e.draggables,droppables:mi(e.droppables,t)}},as=function(t){process.env.NODE_ENV},is=function(t){process.env.NODE_ENV},EE=function(e){var t=e.draggable,n=e.offset,r=e.initialWindowScroll,o=Ws(t.client,n),a=Gs(o,r),l=Se({},t,{placeholder:Se({},t.placeholder,{client:o}),client:o,page:a});return l},wE=function(e){var t=e.frame;return t||(process.env.NODE_ENV!=="production"?$(!1,"Expected Droppable to have a frame"):$()),t},CE=function(e){var t=e.additions,n=e.updatedDroppables,r=e.viewport,o=r.scroll.diff.value;return t.map(function(a){var l=a.descriptor.droppableId,c=n[l],p=wE(c),f=p.scroll.diff.value,m=st(o,f),u=EE({draggable:a,offset:m,initialWindowScroll:r.scroll.initial});return u})},DE=function(e){var t=e.state,n=e.published;as();var r=n.modified.map(function(k){var I=t.dimensions.droppables[k.droppableId],x=ai(I,k.scroll);return x}),o=Se({},t.dimensions.droppables,{},zp(r)),a=qp(CE({additions:n.additions,updatedDroppables:o,viewport:t.viewport})),l=Se({},t.dimensions.draggables,{},a);n.removals.forEach(function(k){delete l[k]});var c={droppables:o,draggables:l},p=Ct(t.impact),f=p?c.droppables[p]:null,m=c.draggables[t.critical.draggable.id],u=c.droppables[t.critical.droppable.id],h=uu({draggable:m,home:u,draggables:l,viewport:t.viewport}),g=h.impact,v=h.afterCritical,w=f&&f.isCombineEnabled?t.impact:g,T=lu({pageOffset:t.current.page.offset,draggable:c.draggables[t.critical.draggable.id],draggables:c.draggables,droppables:c.droppables,previousImpact:w,viewport:t.viewport,afterCritical:v});is();var E=Se({phase:"DRAGGING"},t,{phase:"DRAGGING",impact:T,onLiftImpact:g,dimensions:c,afterCritical:v,forceShouldAnimate:!1});if(t.phase==="COLLECTING")return E;var D=Se({phase:"DROP_PENDING"},E,{phase:"DROP_PENDING",reason:t.reason,isWaiting:!1});return D},La=function(t){return t.movementMode==="SNAP"},aa=function(t,n,r){var o=TE(t.dimensions,n);return!La(t)||r?Kr({state:t,dimensions:o}):pu({state:t,dimensions:o})};function ia(e){return e.isDragging&&e.movementMode==="SNAP"?Se({phase:"DRAGGING"},e,{scrollJumpRequest:null}):e}var ld={phase:"IDLE",completed:null,shouldFlush:!1},NE=function(e,t){if(e===void 0&&(e=ld),t.type==="FLUSH")return Se({},ld,{shouldFlush:!0});if(t.type==="INITIAL_PUBLISH"){e.phase!=="IDLE"&&(process.env.NODE_ENV!=="production"?$(!1,"INITIAL_PUBLISH must come after a IDLE phase"):$());var n=t.payload,r=n.critical,o=n.clientSelection,a=n.viewport,l=n.dimensions,c=n.movementMode,p=l.draggables[r.draggable.id],f=l.droppables[r.droppable.id],m={selection:o,borderBoxCenter:p.client.borderBox.center,offset:rt},u={client:m,page:{selection:st(m.selection,a.scroll.initial),borderBoxCenter:st(m.selection,a.scroll.initial),offset:st(m.selection,a.scroll.diff.value)}},h=ro(l.droppables).every(function(ie){return!ie.isFixedOnPage}),g=uu({draggable:p,home:f,draggables:l.draggables,viewport:a}),v=g.impact,w=g.afterCritical,T={phase:"DRAGGING",isDragging:!0,critical:r,movementMode:c,dimensions:l,initial:u,current:u,isWindowScrollAllowed:h,impact:v,afterCritical:w,onLiftImpact:v,viewport:a,scrollJumpRequest:null,forceShouldAnimate:null};return T}if(t.type==="COLLECTION_STARTING"){if(e.phase==="COLLECTING"||e.phase==="DROP_PENDING")return e;e.phase!=="DRAGGING"&&(process.env.NODE_ENV!=="production"?$(!1,"Collection cannot start from phase "+e.phase):$());var E=Se({phase:"COLLECTING"},e,{phase:"COLLECTING"});return E}if(t.type==="PUBLISH_WHILE_DRAGGING")return e.phase==="COLLECTING"||e.phase==="DROP_PENDING"||(process.env.NODE_ENV!=="production"?$(!1,"Unexpected "+t.type+" received in phase "+e.phase):$()),DE({state:e,published:t.payload});if(t.type==="MOVE"){if(e.phase==="DROP_PENDING")return e;Fn(e)||(process.env.NODE_ENV!=="production"?$(!1,t.type+" not permitted in phase "+e.phase):$());var D=t.payload.client;return vn(D,e.current.client.selection)?e:Kr({state:e,clientSelection:D,impact:La(e)?e.impact:null})}if(t.type==="UPDATE_DROPPABLE_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="COLLECTING")return ia(e);Fn(e)||(process.env.NODE_ENV!=="production"?$(!1,t.type+" not permitted in phase "+e.phase):$());var k=t.payload,I=k.id,x=k.newScroll,F=e.dimensions.droppables[I];if(!F)return e;var L=ai(F,x);return aa(e,L,!1)}if(t.type==="UPDATE_DROPPABLE_IS_ENABLED"){if(e.phase==="DROP_PENDING")return e;Fn(e)||(process.env.NODE_ENV!=="production"?$(!1,"Attempting to move in an unsupported phase "+e.phase):$());var C=t.payload,R=C.id,O=C.isEnabled,W=e.dimensions.droppables[R];W||(process.env.NODE_ENV!=="production"?$(!1,"Cannot find Droppable[id: "+R+"] to toggle its enabled state"):$()),W.isEnabled===O&&(process.env.NODE_ENV!=="production"?$(!1,"Trying to set droppable isEnabled to "+String(O)+`
|
|
405
|
+
but it is already `+String(W.isEnabled)):$());var z=Se({},W,{isEnabled:O});return aa(e,z,!0)}if(t.type==="UPDATE_DROPPABLE_IS_COMBINE_ENABLED"){if(e.phase==="DROP_PENDING")return e;Fn(e)||(process.env.NODE_ENV!=="production"?$(!1,"Attempting to move in an unsupported phase "+e.phase):$());var M=t.payload,U=M.id,G=M.isCombineEnabled,j=e.dimensions.droppables[U];j||(process.env.NODE_ENV!=="production"?$(!1,"Cannot find Droppable[id: "+U+"] to toggle its isCombineEnabled state"):$()),j.isCombineEnabled===G&&(process.env.NODE_ENV!=="production"?$(!1,"Trying to set droppable isCombineEnabled to "+String(G)+`
|
|
406
|
+
but it is already `+String(j.isCombineEnabled)):$());var A=Se({},j,{isCombineEnabled:G});return aa(e,A,!0)}if(t.type==="MOVE_BY_WINDOW_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="DROP_ANIMATING")return e;Fn(e)||(process.env.NODE_ENV!=="production"?$(!1,"Cannot move by window in phase "+e.phase):$()),e.isWindowScrollAllowed||(process.env.NODE_ENV!=="production"?$(!1,"Window scrolling is currently not supported for fixed lists"):$());var ee=t.payload.newScroll;if(vn(e.viewport.scroll.current,ee))return ia(e);var le=tu(e.viewport,ee);return La(e)?pu({state:e,viewport:le}):Kr({state:e,viewport:le})}if(t.type==="UPDATE_VIEWPORT_MAX_SCROLL"){if(!Fn(e))return e;var P=t.payload.maxScroll;if(vn(P,e.viewport.scroll.max))return e;var Y=Se({},e.viewport,{scroll:Se({},e.viewport.scroll,{max:P})});return Se({phase:"DRAGGING"},e,{viewport:Y})}if(t.type==="MOVE_UP"||t.type==="MOVE_DOWN"||t.type==="MOVE_LEFT"||t.type==="MOVE_RIGHT"){if(e.phase==="COLLECTING"||e.phase==="DROP_PENDING")return e;e.phase!=="DRAGGING"&&(process.env.NODE_ENV!=="production"?$(!1,t.type+" received while not in DRAGGING phase"):$());var se=lE({state:e,type:t.type});return se?Kr({state:e,impact:se.impact,clientSelection:se.clientSelection,scrollJumpRequest:se.scrollJumpRequest}):e}if(t.type==="DROP_PENDING"){var re=t.payload.reason;e.phase!=="COLLECTING"&&(process.env.NODE_ENV!=="production"?$(!1,"Can only move into the DROP_PENDING phase from the COLLECTING phase"):$());var Q=Se({phase:"DROP_PENDING"},e,{phase:"DROP_PENDING",isWaiting:!0,reason:re});return Q}if(t.type==="DROP_ANIMATE"){var V=t.payload,Z=V.completed,J=V.dropDuration,ae=V.newHomeClientOffset;e.phase==="DRAGGING"||e.phase==="DROP_PENDING"||(process.env.NODE_ENV!=="production"?$(!1,"Cannot animate drop from phase "+e.phase):$());var te={phase:"DROP_ANIMATING",completed:Z,dropDuration:J,newHomeClientOffset:ae,dimensions:e.dimensions};return te}if(t.type==="DROP_COMPLETE"){var me=t.payload.completed;return{phase:"IDLE",completed:me,shouldFlush:!1}}return e},xE=function(t){return{type:"BEFORE_INITIAL_CAPTURE",payload:t}},kE=function(t){return{type:"LIFT",payload:t}},IE=function(t){return{type:"INITIAL_PUBLISH",payload:t}},ME=function(t){return{type:"PUBLISH_WHILE_DRAGGING",payload:t}},_E=function(){return{type:"COLLECTION_STARTING",payload:null}},RE=function(t){return{type:"UPDATE_DROPPABLE_SCROLL",payload:t}},OE=function(t){return{type:"UPDATE_DROPPABLE_IS_ENABLED",payload:t}},LE=function(t){return{type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:t}},mu=function(t){return{type:"MOVE",payload:t}},PE=function(t){return{type:"MOVE_BY_WINDOW_SCROLL",payload:t}},BE=function(t){return{type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:t}},AE=function(){return{type:"MOVE_UP",payload:null}},FE=function(){return{type:"MOVE_DOWN",payload:null}},VE=function(){return{type:"MOVE_RIGHT",payload:null}},$E=function(){return{type:"MOVE_LEFT",payload:null}},fi=function(){return{type:"FLUSH",payload:null}},KE=function(t){return{type:"DROP_ANIMATE",payload:t}},hi=function(t){return{type:"DROP_COMPLETE",payload:t}},fu=function(t){return{type:"DROP",payload:t}},HE=function(t){return{type:"DROP_PENDING",payload:t}},hu=function(){return{type:"DROP_ANIMATION_FINISHED",payload:null}};function WE(e){if(!(e.length<=1)){for(var t=e.map(function(c){return c.descriptor.index}),n={},r=1;r<t.length;r++){var o=t[r],a=t[r-1];o!==a+1&&(n[o]=!0)}if(Object.keys(n).length){var l=t.map(function(c){var p=!!n[c];return p?"[🔥"+c+"]":""+c}).join(", ");process.env.NODE_ENV!=="production"&&We(`
|
|
407
407
|
Detected non-consecutive <Draggable /> indexes.
|
|
408
408
|
|
|
409
409
|
(This can cause unexpected bugs)
|
|
410
410
|
|
|
411
411
|
`+l+`
|
|
412
|
-
`)}}}function GE(e,t){if(process.env.NODE_ENV!=="production"){var n=
|
|
412
|
+
`)}}}function GE(e,t){if(process.env.NODE_ENV!=="production"){var n=Zn(e.droppable.id,t.draggables);WE(n)}}var YE=function(e){return function(t){var n=t.getState,r=t.dispatch;return function(o){return function(a){if(a.type!=="LIFT"){o(a);return}var l=a.payload,c=l.id,p=l.clientSelection,f=l.movementMode,m=n();m.phase==="DROP_ANIMATING"&&r(hi({completed:m.completed})),n().phase!=="IDLE"&&(process.env.NODE_ENV!=="production"?$(!1,"Unexpected phase to start a drag"):$()),r(fi()),r(xE({draggableId:c,movementMode:f}));var u={shouldPublishImmediately:f==="SNAP"},h={draggableId:c,scrollOptions:u},g=e.startPublishing(h),v=g.critical,w=g.dimensions,T=g.viewport;GE(v,w),r(IE({critical:v,dimensions:w,clientSelection:p,movementMode:f,viewport:T}))}}}},UE=function(e){return function(){return function(t){return function(n){n.type==="INITIAL_PUBLISH"&&e.dragging(),n.type==="DROP_ANIMATE"&&e.dropping(n.payload.completed.result.reason),(n.type==="FLUSH"||n.type==="DROP_COMPLETE")&&e.resting(),t(n)}}}},Si={outOfTheWay:"cubic-bezier(0.2, 0, 0, 1)",drop:"cubic-bezier(.2,1,.1,1)"},Qr={opacity:{drop:0,combining:.7},scale:{drop:.75}},gi={outOfTheWay:.2,minDropTime:.33,maxDropTime:.55},Pn=gi.outOfTheWay+"s "+Si.outOfTheWay,Hr={fluid:"opacity "+Pn,snap:"transform "+Pn+", opacity "+Pn,drop:function(t){var n=t+"s "+Si.drop;return"transform "+n+", opacity "+n},outOfTheWay:"transform "+Pn,placeholder:"height "+Pn+", width "+Pn+", margin "+Pn},cd=function(t){return vn(t,rt)?null:"translate("+t.x+"px, "+t.y+"px)"},Pa={moveTo:cd,drop:function(t,n){var r=cd(t);return r?n?r+" scale("+Qr.scale.drop+")":r:null}},Ba=gi.minDropTime,Su=gi.maxDropTime,jE=Su-Ba,dd=1500,zE=.6,qE=function(e){var t=e.current,n=e.destination,r=e.reason,o=Jr(t,n);if(o<=0)return Ba;if(o>=dd)return Su;var a=o/dd,l=Ba+jE*a,c=r==="CANCEL"?l*zE:l;return Number(c.toFixed(2))},JE=function(e){var t=e.impact,n=e.draggable,r=e.dimensions,o=e.viewport,a=e.afterCritical,l=r.draggables,c=r.droppables,p=Ct(t),f=p?c[p]:null,m=c[n.descriptor.droppableId],u=du({impact:t,draggable:n,draggables:l,afterCritical:a,droppable:f||m,viewport:o}),h=Et(u,n.client.borderBox.center);return h},ZE=function(e){var t=e.draggables,n=e.reason,r=e.lastImpact,o=e.home,a=e.viewport,l=e.onLiftImpact;if(!r.at||n!=="DROP"){var c=cu({draggables:t,impact:l,destination:o,viewport:a,forceShouldAnimate:!0});return{impact:c,didDropInsideDroppable:!1}}if(r.at.type==="REORDER")return{impact:r,didDropInsideDroppable:!0};var p=Se({},r,{displaced:Zr});return{impact:p,didDropInsideDroppable:!0}},XE=function(e){var t=e.getState,n=e.dispatch;return function(r){return function(o){if(o.type!=="DROP"){r(o);return}var a=t(),l=o.payload.reason;if(a.phase==="COLLECTING"){n(HE({reason:l}));return}if(a.phase!=="IDLE"){var c=a.phase==="DROP_PENDING"&&a.isWaiting;c&&(process.env.NODE_ENV!=="production"?$(!1,"A DROP action occurred while DROP_PENDING and still waiting"):$()),a.phase==="DRAGGING"||a.phase==="DROP_PENDING"||(process.env.NODE_ENV!=="production"?$(!1,"Cannot drop in phase: "+a.phase):$());var p=a.critical,f=a.dimensions,m=f.draggables[a.critical.draggable.id],u=ZE({reason:l,lastImpact:a.impact,afterCritical:a.afterCritical,onLiftImpact:a.onLiftImpact,home:a.dimensions.droppables[a.critical.droppable.id],viewport:a.viewport,draggables:a.dimensions.draggables}),h=u.impact,g=u.didDropInsideDroppable,v=g?li(h):null,w=g?so(h):null,T={index:p.draggable.index,droppableId:p.droppable.id},E={draggableId:m.descriptor.id,type:m.descriptor.type,source:T,reason:l,mode:a.movementMode,destination:v,combine:w},D=JE({impact:h,draggable:m,dimensions:f,viewport:a.viewport,afterCritical:a.afterCritical}),k={critical:a.critical,afterCritical:a.afterCritical,result:E,impact:h},I=!vn(a.current.client.offset,D)||!!E.combine;if(!I){n(hi({completed:k}));return}var x=qE({current:a.current.client.offset,destination:D,reason:l}),F={newHomeClientOffset:D,dropDuration:x,completed:k};n(KE(F))}}}},gu=function(){return{x:window.pageXOffset,y:window.pageYOffset}};function QE(e){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(n){n.target!==window&&n.target!==window.document||e()}}}function ew(e){var t=e.onWindowScroll;function n(){t(gu())}var r=zr(n),o=QE(r),a=bn;function l(){return a!==bn}function c(){l()&&(process.env.NODE_ENV!=="production"?$(!1,"Cannot start scroll listener when already active"):$()),a=_t(window,[o])}function p(){l()||(process.env.NODE_ENV!=="production"?$(!1,"Cannot stop scroll listener when not active"):$()),r.cancel(),a(),a=bn}return{start:c,stop:p,isActive:l}}var tw=function(t){return t.type==="DROP_COMPLETE"||t.type==="DROP_ANIMATE"||t.type==="FLUSH"},nw=function(e){var t=ew({onWindowScroll:function(r){e.dispatch(PE({newScroll:r}))}});return function(n){return function(r){!t.isActive()&&r.type==="INITIAL_PUBLISH"&&t.start(),t.isActive()&&tw(r)&&t.stop(),n(r)}}},rw=function(e){var t=!1,n=!1,r=setTimeout(function(){n=!0}),o=function(l){if(t){process.env.NODE_ENV!=="production"&&We("Announcement already made. Not making a second announcement");return}if(n){process.env.NODE_ENV!=="production"&&We(`
|
|
413
413
|
Announcements cannot be made asynchronously.
|
|
414
414
|
Default message has already been announced.
|
|
415
|
-
`);return}t=!0,e(l),clearTimeout(r)};return
|
|
415
|
+
`);return}t=!0,e(l),clearTimeout(r)};return o.wasCalled=function(){return t},o},sw=function(){var e=[],t=function(a){var l=ii(e,function(f){return f.timerId===a});l===-1&&(process.env.NODE_ENV!=="production"?$(!1,"Could not find timer"):$());var c=e.splice(l,1),p=c[0];p.callback()},n=function(a){var l=setTimeout(function(){return t(l)}),c={timerId:l,callback:a};e.push(c)},r=function(){if(e.length){var a=[].concat(e);e.length=0,a.forEach(function(l){clearTimeout(l.timerId),l.callback()})}};return{add:n,flush:r}},ow=function(t,n){return t==null&&n==null?!0:t==null||n==null?!1:t.droppableId===n.droppableId&&t.index===n.index},aw=function(t,n){return t==null&&n==null?!0:t==null||n==null?!1:t.draggableId===n.draggableId&&t.droppableId===n.droppableId},iw=function(t,n){if(t===n)return!0;var r=t.draggable.id===n.draggable.id&&t.draggable.droppableId===n.draggable.droppableId&&t.draggable.type===n.draggable.type&&t.draggable.index===n.draggable.index,o=t.droppable.id===n.droppable.id&&t.droppable.type===n.droppable.type;return r&&o},Pr=function(t,n){as(),n(),is()},Is=function(t,n){return{draggableId:t.draggable.id,type:t.droppable.type,source:{droppableId:t.droppable.id,index:t.draggable.index},mode:n}},la=function(t,n,r,o){if(!t){r(o(n));return}var a=rw(r),l={announce:a};t(n,l),a.wasCalled()||r(o(n))},lw=function(e,t){var n=sw(),r=null,o=function(h,g){r&&(process.env.NODE_ENV!=="production"?$(!1,"Cannot fire onBeforeCapture as a drag start has already been published"):$()),Pr("onBeforeCapture",function(){var v=e().onBeforeCapture;if(v){var w={draggableId:h,mode:g};v(w)}})},a=function(h,g){r&&(process.env.NODE_ENV!=="production"?$(!1,"Cannot fire onBeforeDragStart as a drag start has already been published"):$()),Pr("onBeforeDragStart",function(){var v=e().onBeforeDragStart;v&&v(Is(h,g))})},l=function(h,g){r&&(process.env.NODE_ENV!=="production"?$(!1,"Cannot fire onBeforeDragStart as a drag start has already been published"):$());var v=Is(h,g);r={mode:g,lastCritical:h,lastLocation:v.source,lastCombine:null},n.add(function(){Pr("onDragStart",function(){return la(e().onDragStart,v,t,Fs.onDragStart)})})},c=function(h,g){var v=li(g),w=so(g);r||(process.env.NODE_ENV!=="production"?$(!1,"Cannot fire onDragMove when onDragStart has not been called"):$());var T=!iw(h,r.lastCritical);T&&(r.lastCritical=h);var E=!ow(r.lastLocation,v);E&&(r.lastLocation=v);var D=!aw(r.lastCombine,w);if(D&&(r.lastCombine=w),!(!T&&!E&&!D)){var k=Se({},Is(h,r.mode),{combine:w,destination:v});n.add(function(){Pr("onDragUpdate",function(){return la(e().onDragUpdate,k,t,Fs.onDragUpdate)})})}},p=function(){r||(process.env.NODE_ENV!=="production"?$(!1,"Can only flush responders while dragging"):$()),n.flush()},f=function(h){r||(process.env.NODE_ENV!=="production"?$(!1,"Cannot fire onDragEnd when there is no matching onDragStart"):$()),r=null,Pr("onDragEnd",function(){return la(e().onDragEnd,h,t,Fs.onDragEnd)})},m=function(){if(r){var h=Se({},Is(r.lastCritical,r.mode),{combine:null,destination:null,reason:"CANCEL"});f(h)}};return{beforeCapture:o,beforeStart:a,start:l,update:c,flush:p,drop:f,abort:m}},cw=function(e,t){var n=lw(e,t);return function(r){return function(o){return function(a){if(a.type==="BEFORE_INITIAL_CAPTURE"){n.beforeCapture(a.payload.draggableId,a.payload.movementMode);return}if(a.type==="INITIAL_PUBLISH"){var l=a.payload.critical;n.beforeStart(l,a.payload.movementMode),o(a),n.start(l,a.payload.movementMode);return}if(a.type==="DROP_COMPLETE"){var c=a.payload.completed.result;n.flush(),o(a),n.drop(c);return}if(o(a),a.type==="FLUSH"){n.abort();return}var p=r.getState();p.phase==="DRAGGING"&&n.update(p.critical,p.impact)}}}},dw=function(e){return function(t){return function(n){if(n.type!=="DROP_ANIMATION_FINISHED"){t(n);return}var r=e.getState();r.phase!=="DROP_ANIMATING"&&(process.env.NODE_ENV!=="production"?$(!1,"Cannot finish a drop animating when no drop is occurring"):$()),e.dispatch(hi({completed:r.completed}))}}},pw=function(e){var t=null,n=null;function r(){n&&(cancelAnimationFrame(n),n=null),t&&(t(),t=null)}return function(o){return function(a){if((a.type==="FLUSH"||a.type==="DROP_COMPLETE"||a.type==="DROP_ANIMATION_FINISHED")&&r(),o(a),a.type==="DROP_ANIMATE"){var l={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){var p=e.getState();p.phase==="DROP_ANIMATING"&&e.dispatch(hu())}};n=requestAnimationFrame(function(){n=null,t=_t(window,[l])})}}}},uw=function(e){return function(){return function(t){return function(n){(n.type==="DROP_COMPLETE"||n.type==="FLUSH"||n.type==="DROP_ANIMATE")&&e.stopPublishing(),t(n)}}}},mw=function(e){var t=!1;return function(){return function(n){return function(r){if(r.type==="INITIAL_PUBLISH"){t=!0,e.tryRecordFocus(r.payload.critical.draggable.id),n(r),e.tryRestoreFocusRecorded();return}if(n(r),!!t){if(r.type==="FLUSH"){t=!1,e.tryRestoreFocusRecorded();return}if(r.type==="DROP_COMPLETE"){t=!1;var o=r.payload.completed.result;o.combine&&e.tryShiftRecord(o.draggableId,o.combine.draggableId),e.tryRestoreFocusRecorded()}}}}}},fw=function(t){return t.type==="DROP_COMPLETE"||t.type==="DROP_ANIMATE"||t.type==="FLUSH"},hw=function(e){return function(t){return function(n){return function(r){if(fw(r)){e.stop(),n(r);return}if(r.type==="INITIAL_PUBLISH"){n(r);var o=t.getState();o.phase!=="DRAGGING"&&(process.env.NODE_ENV!=="production"?$(!1,"Expected phase to be DRAGGING after INITIAL_PUBLISH"):$()),e.start(o);return}n(r),e.scroll(t.getState())}}}},Sw=function(e){return function(t){return function(n){if(t(n),n.type==="PUBLISH_WHILE_DRAGGING"){var r=e.getState();r.phase==="DROP_PENDING"&&(r.isWaiting||e.dispatch(fu({reason:r.reason})))}}}},gw=process.env.NODE_ENV!=="production"&&typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({name:"react-beautiful-dnd"}):kp,bw=function(e){var t=e.dimensionMarshal,n=e.focusMarshal,r=e.styleMarshal,o=e.getResponders,a=e.announce,l=e.autoScroller;return xp(NE,gw(ey(UE(r),uw(t),YE(t),XE,dw,pw,Sw,hw(l),nw,mw(n),cw(o,a))))},ca=function(){return{additions:{},removals:{},modified:{}}};function vw(e){var t=e.registry,n=e.callbacks,r=ca(),o=null,a=function(){o||(n.collectionStarting(),o=requestAnimationFrame(function(){o=null,as();var m=r,u=m.additions,h=m.removals,g=m.modified,v=Object.keys(u).map(function(E){return t.draggable.getById(E).getDimension(rt)}).sort(function(E,D){return E.descriptor.index-D.descriptor.index}),w=Object.keys(g).map(function(E){var D=t.droppable.getById(E),k=D.callbacks.getScrollWhileDragging();return{droppableId:E,scroll:k}}),T={additions:v,removals:Object.keys(h),modified:w};r=ca(),is(),n.publish(T)}))},l=function(m){var u=m.descriptor.id;r.additions[u]=m,r.modified[m.descriptor.droppableId]=!0,r.removals[u]&&delete r.removals[u],a()},c=function(m){var u=m.descriptor;r.removals[u.id]=!0,r.modified[u.droppableId]=!0,r.additions[u.id]&&delete r.additions[u.id],a()},p=function(){o&&(cancelAnimationFrame(o),o=null,r=ca())};return{add:l,remove:c,stop:p}}var bu=function(e){var t=e.scrollHeight,n=e.scrollWidth,r=e.height,o=e.width,a=Et({x:n,y:t},{x:o,y:r}),l={x:Math.max(0,a.x),y:Math.max(0,a.y)};return l},vu=function(){var e=document.documentElement;return e||(process.env.NODE_ENV!=="production"?$(!1,"Cannot find document.documentElement"):$()),e},yu=function(){var e=vu(),t=bu({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight});return t},yw=function(){var e=gu(),t=yu(),n=e.y,r=e.x,o=vu(),a=o.clientWidth,l=o.clientHeight,c=r+a,p=n+l,f=Wt({top:n,left:r,right:c,bottom:p}),m={frame:f,scroll:{initial:e,current:e,max:t,diff:{value:rt,displacement:rt}}};return m},Tw=function(e){var t=e.critical,n=e.scrollOptions,r=e.registry;as();var o=yw(),a=o.scroll.current,l=t.droppable,c=r.droppable.getAllByType(l.type).map(function(u){return u.callbacks.getDimensionAndWatchScroll(a,n)}),p=r.draggable.getAllByType(t.draggable.type).map(function(u){return u.getDimension(a)}),f={draggables:qp(p),droppables:zp(c)};is();var m={dimensions:f,critical:t,viewport:o};return m};function pd(e,t,n){if(n.descriptor.id===t.id||n.descriptor.type!==t.type)return!1;var r=e.droppable.getById(n.descriptor.droppableId);return r.descriptor.mode!=="virtual"?(process.env.NODE_ENV!=="production"&&We(`
|
|
416
416
|
You are attempting to add or remove a Draggable [id: `+n.descriptor.id+`]
|
|
417
417
|
while a drag is occurring. This is only supported for virtual lists.
|
|
418
418
|
|
|
419
419
|
See https://github.com/atlassian/react-beautiful-dnd/blob/master/docs/patterns/virtual-lists.md
|
|
420
|
-
`),!1):!0}var Ew=function(e,t){var n=null,r=vw({callbacks:{publish:t.publishWhileDragging,collectionStarting:t.collectionStarting},registry:e}),
|
|
420
|
+
`),!1):!0}var Ew=function(e,t){var n=null,r=vw({callbacks:{publish:t.publishWhileDragging,collectionStarting:t.collectionStarting},registry:e}),o=function(g,v){e.droppable.exists(g)||(process.env.NODE_ENV!=="production"?$(!1,"Cannot update is enabled flag of Droppable "+g+" as it is not registered"):$()),n&&t.updateDroppableIsEnabled({id:g,isEnabled:v})},a=function(g,v){n&&(e.droppable.exists(g)||(process.env.NODE_ENV!=="production"?$(!1,"Cannot update isCombineEnabled flag of Droppable "+g+" as it is not registered"):$()),t.updateDroppableIsCombineEnabled({id:g,isCombineEnabled:v}))},l=function(g,v){n&&(e.droppable.exists(g)||(process.env.NODE_ENV!=="production"?$(!1,"Cannot update the scroll on Droppable "+g+" as it is not registered"):$()),t.updateDroppableScroll({id:g,newScroll:v}))},c=function(g,v){n&&e.droppable.getById(g).callbacks.scroll(v)},p=function(){if(n){r.stop();var g=n.critical.droppable;e.droppable.getAllByType(g.type).forEach(function(v){return v.callbacks.dragStopped()}),n.unsubscribe(),n=null}},f=function(g){n||(process.env.NODE_ENV!=="production"?$(!1,"Should only be subscribed when a collection is occurring"):$());var v=n.critical.draggable;g.type==="ADDITION"&&pd(e,v,g.value)&&r.add(g.value),g.type==="REMOVAL"&&pd(e,v,g.value)&&r.remove(g.value)},m=function(g){n&&(process.env.NODE_ENV!=="production"?$(!1,"Cannot start capturing critical dimensions as there is already a collection"):$());var v=e.draggable.getById(g.draggableId),w=e.droppable.getById(v.descriptor.droppableId),T={draggable:v.descriptor,droppable:w.descriptor},E=e.subscribe(f);return n={critical:T,unsubscribe:E},Tw({critical:T,registry:e,scrollOptions:g.scrollOptions})},u={updateDroppableIsEnabled:o,updateDroppableIsCombineEnabled:a,scrollDroppable:c,updateDroppableScroll:l,startPublishing:m,stopPublishing:p};return u},Tu=function(e,t){return e.phase==="IDLE"?!0:e.phase!=="DROP_ANIMATING"||e.completed.result.draggableId===t?!1:e.completed.result.reason==="DROP"},ww=function(e){window.scrollBy(e.x,e.y)},Cw=nt(function(e){return ro(e).filter(function(t){return!(!t.isEnabled||!t.frame)})}),Dw=function(t,n){var r=Dn(Cw(n),function(o){return o.frame||(process.env.NODE_ENV!=="production"?$(!1,"Invalid result"):$()),ou(o.frame.pageMarginBox)(t)});return r},Nw=function(e){var t=e.center,n=e.destination,r=e.droppables;if(n){var o=r[n];return o.frame?o:null}var a=Dw(t,r);return a},yn={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:function(t){return Math.pow(t,2)},durationDampening:{stopDampeningAt:1200,accelerateAt:360}},xw=function(e,t){var n=e[t.size]*yn.startFromPercentage,r=e[t.size]*yn.maxScrollAtPercentage,o={startScrollingFrom:n,maxScrollValueAt:r};return o},Eu=function(e){var t=e.startOfRange,n=e.endOfRange,r=e.current,o=n-t;if(o===0)return process.env.NODE_ENV!=="production"&&We(`
|
|
421
421
|
Detected distance range of 0 in the fluid auto scroller
|
|
422
422
|
This is unexpected and would cause a divide by 0 issue.
|
|
423
423
|
Not allowing an auto scroll
|
|
424
|
-
`),0;var
|
|
424
|
+
`),0;var a=r-t,l=a/o;return l},bi=1,kw=function(e,t){if(e>t.startScrollingFrom)return 0;if(e<=t.maxScrollValueAt)return yn.maxPixelScroll;if(e===t.startScrollingFrom)return bi;var n=Eu({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e}),r=1-n,o=yn.maxPixelScroll*yn.ease(r);return Math.ceil(o)},ud=yn.durationDampening.accelerateAt,md=yn.durationDampening.stopDampeningAt,Iw=function(e,t){var n=t,r=md,o=Date.now(),a=o-n;if(a>=md)return e;if(a<ud)return bi;var l=Eu({startOfRange:ud,endOfRange:r,current:a}),c=e*yn.ease(l);return Math.ceil(c)},fd=function(e){var t=e.distanceToEdge,n=e.thresholds,r=e.dragStartTime,o=e.shouldUseTimeDampening,a=kw(t,n);return a===0?0:o?Math.max(Iw(a,r),bi):a},hd=function(e){var t=e.container,n=e.distanceToEdges,r=e.dragStartTime,o=e.axis,a=e.shouldUseTimeDampening,l=xw(t,o),c=n[o.end]<n[o.start];return c?fd({distanceToEdge:n[o.end],thresholds:l,dragStartTime:r,shouldUseTimeDampening:a}):-1*fd({distanceToEdge:n[o.start],thresholds:l,dragStartTime:r,shouldUseTimeDampening:a})},Mw=function(e){var t=e.container,n=e.subject,r=e.proposedScroll,o=n.height>t.height,a=n.width>t.width;return!a&&!o?r:a&&o?null:{x:a?0:r.x,y:o?0:r.y}},_w=Up(function(e){return e===0?0:e}),wu=function(e){var t=e.dragStartTime,n=e.container,r=e.subject,o=e.center,a=e.shouldUseTimeDampening,l={top:o.y-n.top,right:n.right-o.x,bottom:n.bottom-o.y,left:o.x-n.left},c=hd({container:n,distanceToEdges:l,dragStartTime:t,axis:ci,shouldUseTimeDampening:a}),p=hd({container:n,distanceToEdges:l,dragStartTime:t,axis:Xp,shouldUseTimeDampening:a}),f=_w({x:p,y:c});if(vn(f,rt))return null;var m=Mw({container:n,subject:r,proposedScroll:f});return m?vn(m,rt)?null:m:null},Rw=Up(function(e){return e===0?0:e>0?1:-1}),vi=function(){var e=function(n,r){return n<0?n:n>r?n-r:0};return function(t){var n=t.current,r=t.max,o=t.change,a=st(n,o),l={x:e(a.x,r.x),y:e(a.y,r.y)};return vn(l,rt)?null:l}}(),Cu=function(t){var n=t.max,r=t.current,o=t.change,a={x:Math.max(r.x,n.x),y:Math.max(r.y,n.y)},l=Rw(o),c=vi({max:a,current:r,change:l});return!c||l.x!==0&&c.x===0||l.y!==0&&c.y===0},yi=function(t,n){return Cu({current:t.scroll.current,max:t.scroll.max,change:n})},Ow=function(t,n){if(!yi(t,n))return null;var r=t.scroll.max,o=t.scroll.current;return vi({current:o,max:r,change:n})},Ti=function(t,n){var r=t.frame;return r?Cu({current:r.scroll.current,max:r.scroll.max,change:n}):!1},Lw=function(t,n){var r=t.frame;return!r||!Ti(t,n)?null:vi({current:r.scroll.current,max:r.scroll.max,change:n})},Pw=function(e){var t=e.viewport,n=e.subject,r=e.center,o=e.dragStartTime,a=e.shouldUseTimeDampening,l=wu({dragStartTime:o,container:t.frame,subject:n,center:r,shouldUseTimeDampening:a});return l&&yi(t,l)?l:null},Bw=function(e){var t=e.droppable,n=e.subject,r=e.center,o=e.dragStartTime,a=e.shouldUseTimeDampening,l=t.frame;if(!l)return null;var c=wu({dragStartTime:o,container:l.pageMarginBox,subject:n,center:r,shouldUseTimeDampening:a});return c&&Ti(t,c)?c:null},Sd=function(e){var t=e.state,n=e.dragStartTime,r=e.shouldUseTimeDampening,o=e.scrollWindow,a=e.scrollDroppable,l=t.current.page.borderBoxCenter,c=t.dimensions.draggables[t.critical.draggable.id],p=c.page.marginBox;if(t.isWindowScrollAllowed){var f=t.viewport,m=Pw({dragStartTime:n,viewport:f,subject:p,center:l,shouldUseTimeDampening:r});if(m){o(m);return}}var u=Nw({center:l,destination:Ct(t.impact),droppables:t.dimensions.droppables});if(u){var h=Bw({dragStartTime:n,droppable:u,subject:p,center:l,shouldUseTimeDampening:r});h&&a(u.descriptor.id,h)}},Aw=function(e){var t=e.scrollWindow,n=e.scrollDroppable,r=zr(t),o=zr(n),a=null,l=function(m){a||(process.env.NODE_ENV!=="production"?$(!1,"Cannot fluid scroll if not dragging"):$());var u=a,h=u.shouldUseTimeDampening,g=u.dragStartTime;Sd({state:m,scrollWindow:r,scrollDroppable:o,dragStartTime:g,shouldUseTimeDampening:h})},c=function(m){as(),a&&(process.env.NODE_ENV!=="production"?$(!1,"Cannot start auto scrolling when already started"):$());var u=Date.now(),h=!1,g=function(){h=!0};Sd({state:m,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:g,scrollDroppable:g}),a={dragStartTime:u,shouldUseTimeDampening:h},is(),h&&l(m)},p=function(){a&&(r.cancel(),o.cancel(),a=null)};return{start:c,stop:p,scroll:l}},Fw=function(e){var t=e.move,n=e.scrollDroppable,r=e.scrollWindow,o=function(f,m){var u=st(f.current.client.selection,m);t({client:u})},a=function(f,m){if(!Ti(f,m))return m;var u=Lw(f,m);if(!u)return n(f.descriptor.id,m),null;var h=Et(m,u);n(f.descriptor.id,h);var g=Et(m,h);return g},l=function(f,m,u){if(!f||!yi(m,u))return u;var h=Ow(m,u);if(!h)return r(u),null;var g=Et(u,h);r(g);var v=Et(u,g);return v},c=function(f){var m=f.scrollJumpRequest;if(m){var u=Ct(f.impact);u||(process.env.NODE_ENV!=="production"?$(!1,"Cannot perform a jump scroll when there is no destination"):$());var h=a(f.dimensions.droppables[u],m);if(h){var g=f.viewport,v=l(f.isWindowScrollAllowed,g,h);v&&o(f,v)}}};return c},Vw=function(e){var t=e.scrollDroppable,n=e.scrollWindow,r=e.move,o=Aw({scrollWindow:n,scrollDroppable:t}),a=Fw({move:r,scrollWindow:n,scrollDroppable:t}),l=function(f){if(f.phase==="DRAGGING"){if(f.movementMode==="FLUID"){o.scroll(f);return}f.scrollJumpRequest&&a(f)}},c={scroll:l,start:o.start,stop:o.stop};return c},br="data-rbd",vr=function(){var e=br+"-drag-handle";return{base:e,draggableId:e+"-draggable-id",contextId:e+"-context-id"}}(),Aa=function(){var e=br+"-draggable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),$w=function(){var e=br+"-droppable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),gd={contextId:br+"-scroll-container-context-id"},Kw=function(t){return function(n){return"["+n+'="'+t+'"]'}},Br=function(t,n){return t.map(function(r){var o=r.styles[n];return o?r.selector+" { "+o+" }":""}).join(" ")},Hw="pointer-events: none;",Ww=function(e){var t=Kw(e),n=function(){var c=`
|
|
425
425
|
cursor: -webkit-grab;
|
|
426
426
|
cursor: grab;
|
|
427
|
-
`;return{selector:t(
|
|
427
|
+
`;return{selector:t(vr.contextId),styles:{always:`
|
|
428
428
|
-webkit-touch-callout: none;
|
|
429
429
|
-webkit-tap-highlight-color: rgba(0,0,0,0);
|
|
430
430
|
touch-action: manipulation;
|
|
431
431
|
`,resting:c,dragging:Hw,dropAnimating:c}}}(),r=function(){var c=`
|
|
432
|
-
transition: `+
|
|
433
|
-
`;return{selector:t(
|
|
432
|
+
transition: `+Hr.outOfTheWay+`;
|
|
433
|
+
`;return{selector:t(Aa.contextId),styles:{dragging:c,dropAnimating:c,userCancel:c}}}(),o={selector:t($w.contextId),styles:{always:"overflow-anchor: none;"}},a={selector:"body",styles:{dragging:`
|
|
434
434
|
cursor: grabbing;
|
|
435
435
|
cursor: -webkit-grabbing;
|
|
436
436
|
user-select: none;
|
|
@@ -438,7 +438,7 @@ Valid keys: `+JSON.stringify(Object.keys(L),null," "));var ne=le(Z,fe,ee,F,J+".
|
|
|
438
438
|
-moz-user-select: none;
|
|
439
439
|
-ms-user-select: none;
|
|
440
440
|
overflow-anchor: none;
|
|
441
|
-
`}},l=[r,n,a
|
|
441
|
+
`}},l=[r,n,o,a];return{always:Br(l,"always"),resting:Br(l,"resting"),dragging:Br(l,"dragging"),dropAnimating:Br(l,"dropAnimating"),userCancel:Br(l,"userCancel")}},Dt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?_.useLayoutEffect:_.useEffect,da=function(){var t=document.querySelector("head");return t||(process.env.NODE_ENV!=="production"?$(!1,"Cannot find the head to append a style to"):$()),t},bd=function(t){var n=document.createElement("style");return t&&n.setAttribute("nonce",t),n.type="text/css",n};function Gw(e,t){var n=Ie(function(){return Ww(e)},[e]),r=_.useRef(null),o=_.useRef(null),a=he(nt(function(u){var h=o.current;h||(process.env.NODE_ENV!=="production"?$(!1,"Cannot set dynamic style element if it is not set"):$()),h.textContent=u}),[]),l=he(function(u){var h=r.current;h||(process.env.NODE_ENV!=="production"?$(!1,"Cannot set dynamic style element if it is not set"):$()),h.textContent=u},[]);Dt(function(){!r.current&&!o.current||(process.env.NODE_ENV!=="production"?$(!1,"style elements already mounted"):$());var u=bd(t),h=bd(t);return r.current=u,o.current=h,u.setAttribute(br+"-always",e),h.setAttribute(br+"-dynamic",e),da().appendChild(u),da().appendChild(h),l(n.always),a(n.resting),function(){var g=function(w){var T=w.current;T||(process.env.NODE_ENV!=="production"?$(!1,"Cannot unmount ref as it is not set"):$()),da().removeChild(T),w.current=null};g(r),g(o)}},[t,l,a,n.always,n.resting,e]);var c=he(function(){return a(n.dragging)},[a,n.dragging]),p=he(function(u){if(u==="DROP"){a(n.dropAnimating);return}a(n.userCancel)},[a,n.dropAnimating,n.userCancel]),f=he(function(){o.current&&a(n.resting)},[a,n.resting]),m=Ie(function(){return{dragging:c,dropping:p,resting:f}},[c,p,f]);return m}var Du=function(e){return e&&e.ownerDocument?e.ownerDocument.defaultView:window};function ls(e){return e instanceof Du(e).HTMLElement}function Nu(e,t){var n="["+vr.contextId+'="'+e+'"]',r=jp(document.querySelectorAll(n));if(!r.length)return process.env.NODE_ENV!=="production"&&We('Unable to find any drag handles in the context "'+e+'"'),null;var o=Dn(r,function(a){return a.getAttribute(vr.draggableId)===t});return o?ls(o)?o:(process.env.NODE_ENV!=="production"&&We("drag handle needs to be a HTMLElement"),null):(process.env.NODE_ENV!=="production"&&We('Unable to find drag handle with id "'+t+'" as no handle with a matching id was found'),null)}function Yw(e){var t=_.useRef({}),n=_.useRef(null),r=_.useRef(null),o=_.useRef(!1),a=he(function(h,g){var v={id:h,focus:g};return t.current[h]=v,function(){var T=t.current,E=T[h];E!==v&&delete T[h]}},[]),l=he(function(h){var g=Nu(e,h);g&&g!==document.activeElement&&g.focus()},[e]),c=he(function(h,g){n.current===h&&(n.current=g)},[]),p=he(function(){r.current||o.current&&(r.current=requestAnimationFrame(function(){r.current=null;var h=n.current;h&&l(h)}))},[l]),f=he(function(h){n.current=null;var g=document.activeElement;g&&g.getAttribute(vr.draggableId)===h&&(n.current=h)},[]);Dt(function(){return o.current=!0,function(){o.current=!1;var h=r.current;h&&cancelAnimationFrame(h)}},[]);var m=Ie(function(){return{register:a,tryRecordFocus:f,tryRestoreFocusRecorded:p,tryShiftRecord:c}},[a,f,p,c]);return m}function Uw(){var e={draggables:{},droppables:{}},t=[];function n(u){return t.push(u),function(){var g=t.indexOf(u);g!==-1&&t.splice(g,1)}}function r(u){t.length&&t.forEach(function(h){return h(u)})}function o(u){return e.draggables[u]||null}function a(u){var h=o(u);return h||(process.env.NODE_ENV!=="production"?$(!1,"Cannot find draggable entry with id ["+u+"]"):$()),h}var l={register:function(h){e.draggables[h.descriptor.id]=h,r({type:"ADDITION",value:h})},update:function(h,g){var v=e.draggables[g.descriptor.id];v&&v.uniqueId===h.uniqueId&&(delete e.draggables[g.descriptor.id],e.draggables[h.descriptor.id]=h)},unregister:function(h){var g=h.descriptor.id,v=o(g);v&&h.uniqueId===v.uniqueId&&(delete e.draggables[g],r({type:"REMOVAL",value:h}))},getById:a,findById:o,exists:function(h){return!!o(h)},getAllByType:function(h){return Us(e.draggables).filter(function(g){return g.descriptor.type===h})}};function c(u){return e.droppables[u]||null}function p(u){var h=c(u);return h||(process.env.NODE_ENV!=="production"?$(!1,"Cannot find droppable entry with id ["+u+"]"):$()),h}var f={register:function(h){e.droppables[h.descriptor.id]=h},unregister:function(h){var g=c(h.descriptor.id);g&&h.uniqueId===g.uniqueId&&delete e.droppables[h.descriptor.id]},getById:p,findById:c,exists:function(h){return!!c(h)},getAllByType:function(h){return Us(e.droppables).filter(function(g){return g.descriptor.type===h})}};function m(){e.draggables={},e.droppables={},t.length=0}return{draggable:l,droppable:f,subscribe:n,clean:m}}function jw(){var e=Ie(Uw,[]);return _.useEffect(function(){return function(){requestAnimationFrame(e.clean)}},[e]),e}var Ei=_.createContext(null),es=function(){var e=document.body;return e||(process.env.NODE_ENV!=="production"?$(!1,"Cannot find document.body"):$()),e},zw={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},qw=function(t){return"rbd-announcement-"+t};function Jw(e){var t=Ie(function(){return qw(e)},[e]),n=_.useRef(null);_.useEffect(function(){var a=document.createElement("div");return n.current=a,a.id=t,a.setAttribute("aria-live","assertive"),a.setAttribute("aria-atomic","true"),Se(a.style,zw),es().appendChild(a),function(){setTimeout(function(){var p=es();p.contains(a)&&p.removeChild(a),a===n.current&&(n.current=null)})}},[t]);var r=he(function(o){var a=n.current;if(a){a.textContent=o;return}process.env.NODE_ENV!=="production"&&We(`
|
|
442
442
|
A screen reader message was trying to be announced but it was unable to do so.
|
|
443
443
|
This can occur if you unmount your <DragDropContext /> in your onDragEnd.
|
|
444
444
|
Consider calling provided.announce() before the unmount so that the instruction will
|
|
@@ -446,35 +446,35 @@ Valid keys: `+JSON.stringify(Object.keys(L),null," "));var ne=le(Z,fe,ee,F,J+".
|
|
|
446
446
|
|
|
447
447
|
Message not passed to screen reader:
|
|
448
448
|
|
|
449
|
-
"`+
|
|
450
|
-
`)},[]);return r}var xu=0,Zw={separator:"::"};function Xw(){xu=0}function
|
|
449
|
+
"`+o+`"
|
|
450
|
+
`)},[]);return r}var xu=0,Zw={separator:"::"};function Xw(){xu=0}function wi(e,t){return t===void 0&&(t=Zw),Ie(function(){return""+e+t.separator+xu++},[t.separator,e])}function Qw(e){var t=e.contextId,n=e.uniqueId;return"rbd-hidden-text-"+t+"-"+n}function eC(e){var t=e.contextId,n=e.text,r=wi("hidden-text",{separator:"-"}),o=Ie(function(){return Qw({contextId:t,uniqueId:r})},[r,t]);return _.useEffect(function(){var l=document.createElement("div");return l.id=o,l.textContent=n,l.style.display="none",es().appendChild(l),function(){var p=es();p.contains(l)&&p.removeChild(l)}},[o,n]),o}var io=_.createContext(null),tC={react:"^16.8.5 || ^17.0.0 || ^18.0.0","react-dom":"^16.8.5 || ^17.0.0 || ^18.0.0"},nC=/(\d+)\.(\d+)\.(\d+)/,vd=function(t){var n=nC.exec(t);n==null&&(process.env.NODE_ENV!=="production"?$(!1,"Unable to parse React version "+t):$());var r=Number(n[1]),o=Number(n[2]),a=Number(n[3]);return{major:r,minor:o,patch:a,raw:t}},rC=function(t,n){return n.major>t.major?!0:n.major<t.major?!1:n.minor>t.minor?!0:n.minor<t.minor?!1:n.patch>=t.patch},sC=function(e,t){var n=vd(e),r=vd(t);rC(n,r)||process.env.NODE_ENV!=="production"&&We(`
|
|
451
451
|
React version: [`+r.raw+`]
|
|
452
452
|
does not satisfy expected peer dependency version: [`+n.raw+`]
|
|
453
453
|
|
|
454
454
|
This can result in run time bugs, and even fatal crashes
|
|
455
|
-
`)},
|
|
455
|
+
`)},pa=`
|
|
456
456
|
We expect a html5 doctype: <!doctype html>
|
|
457
457
|
This is to ensure consistent browser layout and measurement
|
|
458
458
|
|
|
459
459
|
More information: https://github.com/atlassian/react-beautiful-dnd/blob/master/docs/guides/doctype.md
|
|
460
|
-
`,
|
|
460
|
+
`,oC=function(e){var t=e.doctype;if(!t){process.env.NODE_ENV!=="production"&&We(`
|
|
461
461
|
No <!doctype html> found.
|
|
462
462
|
|
|
463
|
-
`+
|
|
464
|
-
`);return}t.name.toLowerCase()!=="html"&&process.env.NODE_ENV!=="production"&&
|
|
463
|
+
`+pa+`
|
|
464
|
+
`);return}t.name.toLowerCase()!=="html"&&process.env.NODE_ENV!=="production"&&We(`
|
|
465
465
|
Unexpected <!doctype> found: (`+t.name+`)
|
|
466
466
|
|
|
467
|
-
`+
|
|
468
|
-
`),t.publicId!==""&&process.env.NODE_ENV!=="production"&&
|
|
467
|
+
`+pa+`
|
|
468
|
+
`),t.publicId!==""&&process.env.NODE_ENV!=="production"&&We(`
|
|
469
469
|
Unexpected <!doctype> publicId found: (`+t.publicId+`)
|
|
470
470
|
A html5 doctype does not have a publicId
|
|
471
471
|
|
|
472
|
-
`+
|
|
473
|
-
`)};function
|
|
472
|
+
`+pa+`
|
|
473
|
+
`)};function Ci(e){process.env.NODE_ENV!=="production"&&e()}function cs(e,t){Ci(function(){_.useEffect(function(){try{e()}catch(n){Ra(`
|
|
474
474
|
A setup problem was encountered.
|
|
475
475
|
|
|
476
476
|
> `+n.message+`
|
|
477
|
-
`)}},t)})}function
|
|
477
|
+
`)}},t)})}function aC(){cs(function(){sC(tC.react,_.version),oC(document)},[])}function Di(e){var t=_.useRef(e);return _.useEffect(function(){t.current=e}),t}function iC(){var e=null;function t(){return!!e}function n(l){return l===e}function r(l){e&&(process.env.NODE_ENV!=="production"?$(!1,"Cannot claim lock as it is already claimed"):$());var c={abandon:l};return e=c,c}function o(){e||(process.env.NODE_ENV!=="production"?$(!1,"Cannot release lock when there is no lock"):$()),e=null}function a(){e&&(e.abandon(),o())}return{isClaimed:t,isActive:n,claim:r,release:o,tryAbandon:a}}var lC=9,cC=13,Ni=27,ku=32,dC=33,pC=34,uC=35,mC=36,fC=37,hC=38,SC=39,gC=40,Ms,bC=(Ms={},Ms[cC]=!0,Ms[lC]=!0,Ms),Iu=function(e){bC[e.keyCode]&&e.preventDefault()},lo=function(){var e="visibilitychange";if(typeof document>"u")return e;var t=[e,"ms"+e,"webkit"+e,"moz"+e,"o"+e],n=Dn(t,function(r){return"on"+r in document});return n||e}(),Mu=0,yd=5;function vC(e,t){return Math.abs(t.x-e.x)>=yd||Math.abs(t.y-e.y)>=yd}var Td={type:"IDLE"};function yC(e){var t=e.cancel,n=e.completed,r=e.getPhase,o=e.setPhase;return[{eventName:"mousemove",fn:function(l){var c=l.button,p=l.clientX,f=l.clientY;if(c===Mu){var m={x:p,y:f},u=r();if(u.type==="DRAGGING"){l.preventDefault(),u.actions.move(m);return}u.type!=="PENDING"&&(process.env.NODE_ENV!=="production"?$(!1,"Cannot be IDLE"):$());var h=u.point;if(vC(h,m)){l.preventDefault();var g=u.actions.fluidLift(m);o({type:"DRAGGING",actions:g})}}}},{eventName:"mouseup",fn:function(l){var c=r();if(c.type!=="DRAGGING"){t();return}l.preventDefault(),c.actions.drop({shouldBlockNextClick:!0}),n()}},{eventName:"mousedown",fn:function(l){r().type==="DRAGGING"&&l.preventDefault(),t()}},{eventName:"keydown",fn:function(l){var c=r();if(c.type==="PENDING"){t();return}if(l.keyCode===Ni){l.preventDefault(),t();return}Iu(l)}},{eventName:"resize",fn:t},{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(){r().type==="PENDING"&&t()}},{eventName:"webkitmouseforcedown",fn:function(l){var c=r();if(c.type==="IDLE"&&(process.env.NODE_ENV!=="production"?$(!1,"Unexpected phase"):$()),c.actions.shouldRespectForcePress()){t();return}l.preventDefault()}},{eventName:lo,fn:t}]}function _u(e){var t=_.useRef(Td),n=_.useRef(bn),r=Ie(function(){return{eventName:"mousedown",fn:function(u){if(!u.defaultPrevented&&u.button===Mu&&!(u.ctrlKey||u.metaKey||u.shiftKey||u.altKey)){var h=e.findClosestDraggableId(u);if(h){var g=e.tryGetLock(h,l,{sourceEvent:u});if(g){u.preventDefault();var v={x:u.clientX,y:u.clientY};n.current(),f(g,v)}}}}}},[e]),o=Ie(function(){return{eventName:"webkitmouseforcewillbegin",fn:function(u){if(!u.defaultPrevented){var h=e.findClosestDraggableId(u);if(h){var g=e.findOptionsForDraggable(h);g&&(g.shouldRespectForcePress||e.canGetLock(h)&&u.preventDefault())}}}}},[e]),a=he(function(){var u={passive:!1,capture:!0};n.current=_t(window,[o,r],u)},[o,r]),l=he(function(){var m=t.current;m.type!=="IDLE"&&(t.current=Td,n.current(),a())},[a]),c=he(function(){var m=t.current;l(),m.type==="DRAGGING"&&m.actions.cancel({shouldBlockNextClick:!0}),m.type==="PENDING"&&m.actions.abort()},[l]),p=he(function(){var u={capture:!0,passive:!1},h=yC({cancel:c,completed:l,getPhase:function(){return t.current},setPhase:function(v){t.current=v}});n.current=_t(window,h,u)},[c,l]),f=he(function(u,h){t.current.type!=="IDLE"&&(process.env.NODE_ENV!=="production"?$(!1,"Expected to move from IDLE to PENDING drag"):$()),t.current={type:"PENDING",point:h,actions:u},p()},[p]);Dt(function(){return a(),function(){n.current()}},[a])}var lr;function TC(){}var EC=(lr={},lr[pC]=!0,lr[dC]=!0,lr[mC]=!0,lr[uC]=!0,lr);function wC(e,t){function n(){t(),e.cancel()}function r(){t(),e.drop()}return[{eventName:"keydown",fn:function(a){if(a.keyCode===Ni){a.preventDefault(),n();return}if(a.keyCode===ku){a.preventDefault(),r();return}if(a.keyCode===gC){a.preventDefault(),e.moveDown();return}if(a.keyCode===hC){a.preventDefault(),e.moveUp();return}if(a.keyCode===SC){a.preventDefault(),e.moveRight();return}if(a.keyCode===fC){a.preventDefault(),e.moveLeft();return}if(EC[a.keyCode]){a.preventDefault();return}Iu(a)}},{eventName:"mousedown",fn:n},{eventName:"mouseup",fn:n},{eventName:"click",fn:n},{eventName:"touchstart",fn:n},{eventName:"resize",fn:n},{eventName:"wheel",fn:n,options:{passive:!0}},{eventName:lo,fn:n}]}function Ru(e){var t=_.useRef(TC),n=Ie(function(){return{eventName:"keydown",fn:function(a){if(a.defaultPrevented||a.keyCode!==ku)return;var l=e.findClosestDraggableId(a);if(!l)return;var c=e.tryGetLock(l,m,{sourceEvent:a});if(!c)return;a.preventDefault();var p=!0,f=c.snapLift();t.current();function m(){p||(process.env.NODE_ENV!=="production"?$(!1,"Cannot stop capturing a keyboard drag when not capturing"):$()),p=!1,t.current(),r()}t.current=_t(window,wC(f,m),{capture:!0,passive:!1})}}},[e]),r=he(function(){var a={passive:!1,capture:!0};t.current=_t(window,[n],a)},[n]);Dt(function(){return r(),function(){t.current()}},[r])}var ua={type:"IDLE"},CC=120,DC=.15;function NC(e){var t=e.cancel,n=e.getPhase;return[{eventName:"orientationchange",fn:t},{eventName:"resize",fn:t},{eventName:"contextmenu",fn:function(o){o.preventDefault()}},{eventName:"keydown",fn:function(o){if(n().type!=="DRAGGING"){t();return}o.keyCode===Ni&&o.preventDefault(),t()}},{eventName:lo,fn:t}]}function xC(e){var t=e.cancel,n=e.completed,r=e.getPhase;return[{eventName:"touchmove",options:{capture:!1},fn:function(a){var l=r();if(l.type!=="DRAGGING"){t();return}l.hasMoved=!0;var c=a.touches[0],p=c.clientX,f=c.clientY,m={x:p,y:f};a.preventDefault(),l.actions.move(m)}},{eventName:"touchend",fn:function(a){var l=r();if(l.type!=="DRAGGING"){t();return}a.preventDefault(),l.actions.drop({shouldBlockNextClick:!0}),n()}},{eventName:"touchcancel",fn:function(a){if(r().type!=="DRAGGING"){t();return}a.preventDefault(),t()}},{eventName:"touchforcechange",fn:function(a){var l=r();l.type==="IDLE"&&(process.env.NODE_ENV,$());var c=a.touches[0];if(c){var p=c.force>=DC;if(p){var f=l.actions.shouldRespectForcePress();if(l.type==="PENDING"){f&&t();return}if(f){if(l.hasMoved){a.preventDefault();return}t();return}a.preventDefault()}}}},{eventName:lo,fn:t}]}function Ou(e){var t=_.useRef(ua),n=_.useRef(bn),r=he(function(){return t.current},[]),o=he(function(g){t.current=g},[]),a=Ie(function(){return{eventName:"touchstart",fn:function(g){if(!g.defaultPrevented){var v=e.findClosestDraggableId(g);if(v){var w=e.tryGetLock(v,c,{sourceEvent:g});if(w){var T=g.touches[0],E=T.clientX,D=T.clientY,k={x:E,y:D};n.current(),u(w,k)}}}}}},[e]),l=he(function(){var g={capture:!0,passive:!1};n.current=_t(window,[a],g)},[a]),c=he(function(){var h=t.current;h.type!=="IDLE"&&(h.type==="PENDING"&&clearTimeout(h.longPressTimerId),o(ua),n.current(),l())},[l,o]),p=he(function(){var h=t.current;c(),h.type==="DRAGGING"&&h.actions.cancel({shouldBlockNextClick:!0}),h.type==="PENDING"&&h.actions.abort()},[c]),f=he(function(){var g={capture:!0,passive:!1},v={cancel:p,completed:c,getPhase:r},w=_t(window,xC(v),g),T=_t(window,NC(v),g);n.current=function(){w(),T()}},[p,r,c]),m=he(function(){var g=r();g.type!=="PENDING"&&(process.env.NODE_ENV!=="production"?$(!1,"Cannot start dragging from phase "+g.type):$());var v=g.actions.fluidLift(g.point);o({type:"DRAGGING",actions:v,hasMoved:!1})},[r,o]),u=he(function(g,v){r().type!=="IDLE"&&(process.env.NODE_ENV!=="production"?$(!1,"Expected to move from IDLE to PENDING drag"):$());var w=setTimeout(m,CC);o({type:"PENDING",point:v,actions:g,longPressTimerId:w}),f()},[f,r,o,m]);Dt(function(){return l(),function(){n.current();var v=r();v.type==="PENDING"&&(clearTimeout(v.longPressTimerId),o(ua))}},[r,l,o]),Dt(function(){var g=_t(window,[{eventName:"touchmove",fn:function(){},options:{capture:!1,passive:!1}}]);return g},[])}function kC(e){Ci(function(){var t=Di(e);cs(function(){t.current.length!==e.length&&(process.env.NODE_ENV!=="production"?$(!1,"Cannot change the amount of sensor hooks after mounting"):$(!1))})})}var IC={input:!0,button:!0,textarea:!0,select:!0,option:!0,optgroup:!0,video:!0,audio:!0};function Lu(e,t){if(t==null)return!1;var n=!!IC[t.tagName.toLowerCase()];if(n)return!0;var r=t.getAttribute("contenteditable");return r==="true"||r===""?!0:t===e?!1:Lu(e,t.parentElement)}function MC(e,t){var n=t.target;return ls(n)?Lu(e,n):!1}var _C=function(e){return Wt(e.getBoundingClientRect()).center};function RC(e){return e instanceof Du(e).Element}var OC=function(){var e="matches";if(typeof document>"u")return e;var t=[e,"msMatchesSelector","webkitMatchesSelector"],n=Dn(t,function(r){return r in Element.prototype});return n||e}();function Pu(e,t){return e==null?null:e[OC](t)?e:Pu(e.parentElement,t)}function LC(e,t){return e.closest?e.closest(t):Pu(e,t)}function PC(e){return"["+vr.contextId+'="'+e+'"]'}function BC(e,t){var n=t.target;if(!RC(n))return process.env.NODE_ENV!=="production"&&We("event.target must be a Element"),null;var r=PC(e),o=LC(n,r);return o?ls(o)?o:(process.env.NODE_ENV!=="production"&&We("drag handle must be a HTMLElement"),null):null}function AC(e,t){var n=BC(e,t);return n?n.getAttribute(vr.draggableId):null}function FC(e,t){var n="["+Aa.contextId+'="'+e+'"]',r=jp(document.querySelectorAll(n)),o=Dn(r,function(a){return a.getAttribute(Aa.id)===t});return o?ls(o)?o:(process.env.NODE_ENV!=="production"&&We("Draggable element is not a HTMLElement"),null):null}function VC(e){e.preventDefault()}function _s(e){var t=e.expected,n=e.phase,r=e.isLockActive,o=e.shouldWarn;return r()?t!==n?(o&&process.env.NODE_ENV!=="production"&&We(`
|
|
478
478
|
Cannot perform action.
|
|
479
479
|
The actions you used belong to an outdated phase
|
|
480
480
|
|
|
@@ -484,7 +484,7 @@ Valid keys: `+JSON.stringify(Object.keys(L),null," "));var ne=le(Z,fe,ee,F,J+".
|
|
|
484
484
|
Tips:
|
|
485
485
|
|
|
486
486
|
- Do not use preDragActions actions after calling preDragActions.lift()
|
|
487
|
-
`),!1):!0:(
|
|
487
|
+
`),!1):!0:(o&&process.env.NODE_ENV!=="production"&&We(`
|
|
488
488
|
Cannot perform action.
|
|
489
489
|
The sensor no longer has an action lock.
|
|
490
490
|
|
|
@@ -492,7 +492,7 @@ Valid keys: `+JSON.stringify(Object.keys(L),null," "));var ne=le(Z,fe,ee,F,J+".
|
|
|
492
492
|
|
|
493
493
|
- Throw away your action handlers when forceStop() is called
|
|
494
494
|
- Check actions.isActive() if you really need to
|
|
495
|
-
`),!1)}function Bu(e){var t=e.lockAPI,n=e.store,r=e.registry,
|
|
495
|
+
`),!1)}function Bu(e){var t=e.lockAPI,n=e.store,r=e.registry,o=e.draggableId;if(t.isClaimed())return!1;var a=r.draggable.findById(o);return a?!(!a.options.isEnabled||!Tu(n.getState(),o)):(process.env.NODE_ENV!=="production"&&We("Unable to find draggable with id: "+o),!1)}function $C(e){var t=e.lockAPI,n=e.contextId,r=e.store,o=e.registry,a=e.draggableId,l=e.forceSensorStop,c=e.sourceEvent,p=Bu({lockAPI:t,store:r,registry:o,draggableId:a});if(!p)return null;var f=o.draggable.getById(a),m=FC(n,f.descriptor.id);if(!m)return process.env.NODE_ENV!=="production"&&We("Unable to find draggable element with id: "+a),null;if(c&&!f.options.canDragInteractiveElements&&MC(m,c))return null;var u=t.claim(l||bn),h="PRE_DRAG";function g(){return f.options.shouldRespectForcePress}function v(){return t.isActive(u)}function w(F,L){_s({expected:F,phase:h,isLockActive:v,shouldWarn:!0})&&r.dispatch(L())}var T=w.bind(null,"DRAGGING");function E(F){function L(){t.release(),h="COMPLETED"}h!=="PRE_DRAG"&&(L(),h!=="PRE_DRAG"&&(process.env.NODE_ENV!=="production"?$(!1,"Cannot lift in phase "+h):$())),r.dispatch(kE(F.liftActionArgs)),h="DRAGGING";function C(R,O){if(O===void 0&&(O={shouldBlockNextClick:!1}),F.cleanup(),O.shouldBlockNextClick){var W=_t(window,[{eventName:"click",fn:VC,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(W)}L(),r.dispatch(fu({reason:R}))}return Se({isActive:function(){return _s({expected:"DRAGGING",phase:h,isLockActive:v,shouldWarn:!1})},shouldRespectForcePress:g,drop:function(O){return C("DROP",O)},cancel:function(O){return C("CANCEL",O)}},F.actions)}function D(F){var L=zr(function(R){T(function(){return mu({client:R})})}),C=E({liftActionArgs:{id:a,clientSelection:F,movementMode:"FLUID"},cleanup:function(){return L.cancel()},actions:{move:L}});return Se({},C,{move:L})}function k(){var F={moveUp:function(){return T(AE)},moveRight:function(){return T(VE)},moveDown:function(){return T(FE)},moveLeft:function(){return T($E)}};return E({liftActionArgs:{id:a,clientSelection:_C(m),movementMode:"SNAP"},cleanup:bn,actions:F})}function I(){var F=_s({expected:"PRE_DRAG",phase:h,isLockActive:v,shouldWarn:!0});F&&t.release()}var x={isActive:function(){return _s({expected:"PRE_DRAG",phase:h,isLockActive:v,shouldWarn:!1})},shouldRespectForcePress:g,fluidLift:D,snapLift:k,abort:I};return x}var KC=[_u,Ru,Ou];function HC(e){var t=e.contextId,n=e.store,r=e.registry,o=e.customSensors,a=e.enableDefaultSensors,l=[].concat(a?KC:[],o||[]),c=_.useState(function(){return iC()})[0],p=he(function(D,k){D.isDragging&&!k.isDragging&&c.tryAbandon()},[c]);Dt(function(){var D=n.getState(),k=n.subscribe(function(){var I=n.getState();p(D,I),D=I});return k},[c,n,p]),Dt(function(){return c.tryAbandon},[c.tryAbandon]);var f=he(function(E){return Bu({lockAPI:c,registry:r,store:n,draggableId:E})},[c,r,n]),m=he(function(E,D,k){return $C({lockAPI:c,registry:r,contextId:t,store:n,draggableId:E,forceSensorStop:D,sourceEvent:k&&k.sourceEvent?k.sourceEvent:null})},[t,c,r,n]),u=he(function(E){return AC(t,E)},[t]),h=he(function(E){var D=r.draggable.findById(E);return D?D.options:null},[r.draggable]),g=he(function(){c.isClaimed()&&(c.tryAbandon(),n.getState().phase!=="IDLE"&&n.dispatch(fi()))},[c,n]),v=he(c.isClaimed,[c]),w=Ie(function(){return{canGetLock:f,tryGetLock:m,findClosestDraggableId:u,findOptionsForDraggable:h,tryReleaseLock:g,isLockClaimed:v}},[f,m,u,h,g,v]);kC(l);for(var T=0;T<l.length;T++)l[T](w)}var WC=function(t){return{onBeforeCapture:t.onBeforeCapture,onBeforeDragStart:t.onBeforeDragStart,onDragStart:t.onDragStart,onDragEnd:t.onDragEnd,onDragUpdate:t.onDragUpdate}};function Ar(e){return e.current||(process.env.NODE_ENV!=="production"?$(!1,"Could not find store from lazy ref"):$()),e.current}function GC(e){var t=e.contextId,n=e.setCallbacks,r=e.sensors,o=e.nonce,a=e.dragHandleUsageInstructions,l=_.useRef(null);aC();var c=Di(e),p=he(function(){return WC(c.current)},[c]),f=Jw(t),m=eC({contextId:t,text:a}),u=Gw(t,o),h=he(function(R){Ar(l).dispatch(R)},[]),g=Ie(function(){return Ic({publishWhileDragging:ME,updateDroppableScroll:RE,updateDroppableIsEnabled:OE,updateDroppableIsCombineEnabled:LE,collectionStarting:_E},h)},[h]),v=jw(),w=Ie(function(){return Ew(v,g)},[v,g]),T=Ie(function(){return Vw(Se({scrollWindow:ww,scrollDroppable:w.scrollDroppable},Ic({move:mu},h)))},[w.scrollDroppable,h]),E=Yw(t),D=Ie(function(){return bw({announce:f,autoScroller:T,dimensionMarshal:w,focusMarshal:E,getResponders:p,styleMarshal:u})},[f,T,w,E,p,u]);process.env.NODE_ENV!=="production"&&l.current&&l.current!==D&&process.env.NODE_ENV!=="production"&&We("unexpected store change"),l.current=D;var k=he(function(){var R=Ar(l),O=R.getState();O.phase!=="IDLE"&&R.dispatch(fi())},[]),I=he(function(){var R=Ar(l).getState();return R.isDragging||R.phase==="DROP_ANIMATING"},[]),x=Ie(function(){return{isDragging:I,tryAbort:k}},[I,k]);n(x);var F=he(function(R){return Tu(Ar(l).getState(),R)},[]),L=he(function(){return Fn(Ar(l).getState())},[]),C=Ie(function(){return{marshal:w,focus:E,contextId:t,canLift:F,isMovementAllowed:L,dragHandleUsageInstructionsId:m,registry:v}},[t,w,m,E,F,L,v]);return HC({contextId:t,store:D,registry:v,customSensors:r,enableDefaultSensors:e.enableDefaultSensors!==!1}),_.useEffect(function(){return k},[k]),_.createElement(io.Provider,{value:C},_.createElement(Op,{context:Ei,store:D},e.children))}var Au=0;function YC(){Au=0}function UC(){return Ie(function(){return""+Au++},[])}function jC(){YC(),Xw()}function Fu(e){var t=UC(),n=e.dragHandleUsageInstructions||Fs.dragHandleUsageInstructions;return _.createElement(gT,null,function(r){return _.createElement(GC,{nonce:e.nonce,contextId:t,setCallbacks:r,dragHandleUsageInstructions:n,enableDefaultSensors:e.enableDefaultSensors,sensors:e.sensors,onBeforeCapture:e.onBeforeCapture,onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragUpdate:e.onDragUpdate,onDragEnd:e.onDragEnd},e.children)})}var xi=function(t){return function(n){return t===n}},zC=xi("scroll"),qC=xi("auto"),JC=xi("visible"),Ed=function(t,n){return n(t.overflowX)||n(t.overflowY)},ZC=function(t,n){return n(t.overflowX)&&n(t.overflowY)},Vu=function(t){var n=window.getComputedStyle(t),r={overflowX:n.overflowX,overflowY:n.overflowY};return Ed(r,zC)||Ed(r,qC)},XC=function(){if(process.env.NODE_ENV==="production")return!1;var t=es(),n=document.documentElement;if(n||(process.env.NODE_ENV,$()),!Vu(t))return!1;var r=window.getComputedStyle(n),o={overflowX:r.overflowX,overflowY:r.overflowY};return ZC(o,JC)||process.env.NODE_ENV!=="production"&&We(`
|
|
496
496
|
We have detected that your <body> element might be a scroll container.
|
|
497
497
|
We have found no reliable way of detecting whether the <body> element is a scroll container.
|
|
498
498
|
Under most circumstances a <body> scroll bar will be on the <html> element (document.documentElement)
|
|
@@ -501,25 +501,25 @@ Valid keys: `+JSON.stringify(Object.keys(L),null," "));var ne=le(Z,fe,ee,F,J+".
|
|
|
501
501
|
we will be treating the <body> as *not* a scroll container
|
|
502
502
|
|
|
503
503
|
More information: https://github.com/atlassian/react-beautiful-dnd/blob/master/docs/guides/how-we-detect-scroll-containers.md
|
|
504
|
-
`),!1},$u=function e(t){return t==null?null:t===document.body?XC()?t:null:t===document.documentElement?null:Vu(t)?t:e(t.parentElement)},QC=function(e){if(
|
|
504
|
+
`),!1},$u=function e(t){return t==null?null:t===document.body?XC()?t:null:t===document.documentElement?null:Vu(t)?t:e(t.parentElement)},QC=function(e){if(e){var t=$u(e.parentElement);t&&process.env.NODE_ENV!=="production"&&We(`
|
|
505
505
|
Droppable: unsupported nested scroll container detected.
|
|
506
506
|
A Droppable can only have one scroll parent (which can be itself)
|
|
507
507
|
Nested scroll containers are currently not supported.
|
|
508
508
|
|
|
509
509
|
We hope to support nested scroll containers soon: https://github.com/atlassian/react-beautiful-dnd/issues/131
|
|
510
|
-
`)}},
|
|
510
|
+
`)}},Fa=function(e){return{x:e.scrollLeft,y:e.scrollTop}},eD=function e(t){if(!t)return!1;var n=window.getComputedStyle(t);return n.position==="fixed"?!0:e(t.parentElement)},tD=function(e){var t=$u(e),n=eD(e);return{closestScrollable:t,isFixedOnPage:n}},nD=function(e){var t=e.descriptor,n=e.isEnabled,r=e.isCombineEnabled,o=e.isFixedOnPage,a=e.direction,l=e.client,c=e.page,p=e.closest,f=function(){if(!p)return null;var g=p.scrollSize,v=p.client,w=bu({scrollHeight:g.scrollHeight,scrollWidth:g.scrollWidth,height:v.paddingBox.height,width:v.paddingBox.width});return{pageMarginBox:p.page.marginBox,frameClient:v,scrollSize:g,shouldClipSubject:p.shouldClipSubject,scroll:{initial:p.scroll,current:p.scroll,max:w,diff:{value:rt,displacement:rt}}}}(),m=a==="vertical"?ci:Xp,u=gr({page:c,withPlaceholder:null,axis:m,frame:f}),h={descriptor:t,isCombineEnabled:r,isFixedOnPage:o,axis:m,isEnabled:n,client:l,page:c,frame:f,subject:u};return h},rD=function(t,n){var r=Hp(t);if(!n||t!==n)return r;var o=r.paddingBox.top-n.scrollTop,a=r.paddingBox.left-n.scrollLeft,l=o+n.scrollHeight,c=a+n.scrollWidth,p={top:o,right:c,bottom:l,left:a},f=si(p,r.border),m=oi({borderBox:f,margin:r.margin,border:r.border,padding:r.padding});return m},sD=function(e){var t=e.ref,n=e.descriptor,r=e.env,o=e.windowScroll,a=e.direction,l=e.isDropDisabled,c=e.isCombineEnabled,p=e.shouldClipSubject,f=r.closestScrollable,m=rD(t,f),u=Gs(m,o),h=function(){if(!f)return null;var v=Hp(f),w={scrollHeight:f.scrollHeight,scrollWidth:f.scrollWidth};return{client:v,page:Gs(v,o),scroll:Fa(f),scrollSize:w,shouldClipSubject:p}}(),g=nD({descriptor:n,isEnabled:!l,isCombineEnabled:c,isFixedOnPage:r.isFixedOnPage,direction:a,client:m,page:u,closest:h});return g},oD={passive:!1},aD={passive:!0},wd=function(e){return e.shouldPublishImmediately?oD:aD};function zs(e){var t=_.useContext(e);return t||(process.env.NODE_ENV!=="production"?$(!1,"Could not find required context"):$()),t}var Rs=function(t){return t&&t.env.closestScrollable||null};function iD(e){var t=_.useRef(null),n=zs(io),r=wi("droppable"),o=n.registry,a=n.marshal,l=Di(e),c=Ie(function(){return{id:e.droppableId,type:e.type,mode:e.mode}},[e.droppableId,e.mode,e.type]),p=_.useRef(c),f=Ie(function(){return nt(function(I,x){t.current||(process.env.NODE_ENV!=="production"?$(!1,"Can only update scroll when dragging"):$());var F={x:I,y:x};a.updateDroppableScroll(c.id,F)})},[c.id,a]),m=he(function(){var I=t.current;return!I||!I.env.closestScrollable?rt:Fa(I.env.closestScrollable)},[]),u=he(function(){var I=m();f(I.x,I.y)},[m,f]),h=Ie(function(){return zr(u)},[u]),g=he(function(){var I=t.current,x=Rs(I);I&&x||(process.env.NODE_ENV!=="production"?$(!1,"Could not find scroll options while scrolling"):$());var F=I.scrollOptions;if(F.shouldPublishImmediately){u();return}h()},[h,u]),v=he(function(I,x){t.current&&(process.env.NODE_ENV!=="production"?$(!1,"Cannot collect a droppable while a drag is occurring"):$());var F=l.current,L=F.getDroppableRef();L||(process.env.NODE_ENV!=="production"?$(!1,"Cannot collect without a droppable ref"):$());var C=tD(L),R={ref:L,descriptor:c,env:C,scrollOptions:x};t.current=R;var O=sD({ref:L,descriptor:c,env:C,windowScroll:I,direction:F.direction,isDropDisabled:F.isDropDisabled,isCombineEnabled:F.isCombineEnabled,shouldClipSubject:!F.ignoreContainerClipping}),W=C.closestScrollable;return W&&(W.setAttribute(gd.contextId,n.contextId),W.addEventListener("scroll",g,wd(R.scrollOptions)),process.env.NODE_ENV!=="production"&&QC(W)),O},[n.contextId,c,g,l]),w=he(function(){var I=t.current,x=Rs(I);return I&&x||(process.env.NODE_ENV!=="production"?$(!1,"Can only recollect Droppable client for Droppables that have a scroll container"):$()),Fa(x)},[]),T=he(function(){var I=t.current;I||(process.env.NODE_ENV!=="production"?$(!1,"Cannot stop drag when no active drag"):$());var x=Rs(I);t.current=null,x&&(h.cancel(),x.removeAttribute(gd.contextId),x.removeEventListener("scroll",g,wd(I.scrollOptions)))},[g,h]),E=he(function(I){var x=t.current;x||(process.env.NODE_ENV!=="production"?$(!1,"Cannot scroll when there is no drag"):$());var F=Rs(x);F||(process.env.NODE_ENV!=="production"?$(!1,"Cannot scroll a droppable with no closest scrollable"):$()),F.scrollTop+=I.y,F.scrollLeft+=I.x},[]),D=Ie(function(){return{getDimensionAndWatchScroll:v,getScrollWhileDragging:w,dragStopped:T,scroll:E}},[T,v,w,E]),k=Ie(function(){return{uniqueId:r,descriptor:c,callbacks:D}},[D,c,r]);Dt(function(){return p.current=k.descriptor,o.droppable.register(k),function(){t.current&&(process.env.NODE_ENV!=="production"&&We("Unsupported: changing the droppableId or type of a Droppable during a drag"),T()),o.droppable.unregister(k)}},[D,c,T,k,a,o.droppable]),Dt(function(){t.current&&a.updateDroppableIsEnabled(p.current.id,!e.isDropDisabled)},[e.isDropDisabled,a]),Dt(function(){t.current&&a.updateDroppableIsCombineEnabled(p.current.id,e.isCombineEnabled)},[e.isCombineEnabled,a])}function ma(){}var Cd={width:0,height:0,margin:wT},lD=function(t){var n=t.isAnimatingOpenOnMount,r=t.placeholder,o=t.animate;return n||o==="close"?Cd:{height:r.client.borderBox.height,width:r.client.borderBox.width,margin:r.client.margin}},cD=function(t){var n=t.isAnimatingOpenOnMount,r=t.placeholder,o=t.animate,a=lD({isAnimatingOpenOnMount:n,placeholder:r,animate:o});return{display:r.display,boxSizing:"border-box",width:a.width,height:a.height,marginTop:a.margin.top,marginRight:a.margin.right,marginBottom:a.margin.bottom,marginLeft:a.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:o!=="none"?Hr.placeholder:null}};function dD(e){var t=_.useRef(null),n=he(function(){t.current&&(clearTimeout(t.current),t.current=null)},[]),r=e.animate,o=e.onTransitionEnd,a=e.onClose,l=e.contextId,c=_.useState(e.animate==="open"),p=c[0],f=c[1];_.useEffect(function(){return p?r!=="open"?(n(),f(!1),ma):t.current?ma:(t.current=setTimeout(function(){t.current=null,f(!1)}),n):ma},[r,p,n]);var m=he(function(h){h.propertyName==="height"&&(o(),r==="close"&&a())},[r,a,o]),u=cD({isAnimatingOpenOnMount:p,animate:e.animate,placeholder:e.placeholder});return _.createElement(e.placeholder.tagName,{style:u,"data-rbd-placeholder-context-id":l,onTransitionEnd:m,ref:e.innerRef})}var pD=_.memo(dD),ki=_.createContext(null);function Ku(e){e&&ls(e)||(process.env.NODE_ENV!=="production"?$(!1,`
|
|
511
511
|
provided.innerRef has not been provided with a HTMLElement.
|
|
512
512
|
|
|
513
513
|
You can find a guide on using the innerRef callback functions at:
|
|
514
514
|
https://github.com/atlassian/react-beautiful-dnd/blob/master/docs/guides/using-inner-ref.md
|
|
515
|
-
`)
|
|
515
|
+
`):$())}function fa(e){return typeof e=="boolean"}function ha(e,t){t.forEach(function(n){return n(e)})}var uD=[function(t){var n=t.props;n.droppableId||(process.env.NODE_ENV!=="production"?$(!1,"A Droppable requires a droppableId prop"):$()),typeof n.droppableId!="string"&&(process.env.NODE_ENV!=="production"?$(!1,"A Droppable requires a [string] droppableId. Provided: ["+typeof n.droppableId+"]"):$())},function(t){var n=t.props;fa(n.isDropDisabled)||(process.env.NODE_ENV!=="production"?$(!1,"isDropDisabled must be a boolean"):$()),fa(n.isCombineEnabled)||(process.env.NODE_ENV!=="production"?$(!1,"isCombineEnabled must be a boolean"):$()),fa(n.ignoreContainerClipping)||(process.env.NODE_ENV!=="production"?$(!1,"ignoreContainerClipping must be a boolean"):$())},function(t){var n=t.getDroppableRef;Ku(n())}],mD=[function(t){var n=t.props,r=t.getPlaceholderRef;if(n.placeholder){var o=r();o||process.env.NODE_ENV!=="production"&&We(`
|
|
516
516
|
Droppable setup issue [droppableId: "`+n.droppableId+`"]:
|
|
517
517
|
DroppableProvided > placeholder could not be found.
|
|
518
518
|
|
|
519
519
|
Please be sure to add the {provided.placeholder} React Node as a child of your Droppable.
|
|
520
520
|
More information: https://github.com/atlassian/react-beautiful-dnd/blob/master/docs/api/droppable.md
|
|
521
|
-
`)}}],fD=[function(t){var n=t.props;n.renderClone||(process.env.NODE_ENV!=="production"
|
|
522
|
-
Provided: [type: `+typeof a+"] (value: "+a+")"):V(!1)),xT(e.index)||(process.env.NODE_ENV!=="production"?V(!1,r(a)+" requires an integer index prop"):V(!1)),e.mapped.type!=="DRAGGING"&&(Ku(n()),e.isEnabled&&(Nu(t,a)||(process.env.NODE_ENV!=="production"?V(!1,r(a)+" Unable to find drag handle"):V(!1))))})}function ND(e){wi(function(){var t=U.useRef(e);ds(function(){e!==t.current&&(process.env.NODE_ENV!=="production"?V(!1,"Draggable isClone prop value changed during component life"):V(!1))},[e])})}function xD(e){e.preventDefault()}function kD(e){var t=U.useRef(null),n=Se(function(_){t.current=_},[]),r=Se(function(){return t.current},[]),a=qs(ca),o=a.contextId,l=a.dragHandleUsageInstructionsId,c=a.registry,p=qs(xi),f=p.type,m=p.droppableId,u=_e(function(){return{id:e.draggableId,index:e.index,type:f,droppableId:m}},[e.draggableId,e.index,f,m]),h=e.children,g=e.draggableId,v=e.isEnabled,C=e.shouldRespectForcePress,T=e.canDragInteractiveElements,E=e.isClone,N=e.mapped,x=e.dropAnimationFinished;if(DD(e,o,r),ND(E),!E){var k=_e(function(){return{descriptor:u,registry:c,getDraggableRef:r,canDragInteractiveElements:T,shouldRespectForcePress:C,isEnabled:v}},[u,c,r,T,C,v]);CD(k)}var I=_e(function(){return v?{tabIndex:0,role:"button","aria-describedby":l,"data-rbd-drag-handle-draggable-id":g,"data-rbd-drag-handle-context-id":o,draggable:!1,onDragStart:xD}:null},[o,l,g,v]),A=Se(function(_){N.type==="DRAGGING"&&(!N.dropping||_.propertyName==="transform"&&x())},[x,N]),R=_e(function(){var _=ED(N),O=N.type==="DRAGGING"&&N.dropping?A:null,K={innerRef:n,draggableProps:{"data-rbd-draggable-context-id":o,"data-rbd-draggable-id":g,style:_,onTransitionEnd:O},dragHandleProps:I};return K},[o,I,g,N,A,n]),w=_e(function(){return{draggableId:u.id,type:u.type,source:{index:u.index,droppableId:u.droppableId}}},[u.droppableId,u.id,u.index,u.type]);return h(R,N.snapshot,w)}var Hu=function(e,t){return e===t},Wu=function(e){var t=e.combine,n=e.destination;return n?n.droppableId:t?t.droppableId:null},ID=function(t){return t.combine?t.combine.draggableId:null},MD=function(t){return t.at&&t.at.type==="COMBINE"?t.at.combine.draggableId:null};function _D(){var e=rt(function(a,o){return{x:a,y:o}}),t=rt(function(a,o,l,c,p){return{isDragging:!0,isClone:o,isDropAnimating:Boolean(p),dropAnimation:p,mode:a,draggingOver:l,combineWith:c,combineTargetFor:null}}),n=rt(function(a,o,l,c,p,f,m){return{mapped:{type:"DRAGGING",dropping:null,draggingOver:p,combineWith:f,mode:o,offset:a,dimension:l,forceShouldAnimate:m,snapshot:t(o,c,p,f,null)}}}),r=function(o,l){if(o.isDragging){if(o.critical.draggable.id!==l.draggableId)return null;var c=o.current.client.offset,p=o.dimensions.draggables[l.draggableId],f=Dt(o.impact),m=MD(o.impact),u=o.forceShouldAnimate;return n(e(c.x,c.y),o.movementMode,p,l.isClone,f,m,u)}if(o.phase==="DROP_ANIMATING"){var h=o.completed;if(h.result.draggableId!==l.draggableId)return null;var g=l.isClone,v=o.dimensions.draggables[l.draggableId],C=h.result,T=C.mode,E=Wu(C),N=ID(C),x=o.dropDuration,k={duration:x,curve:hi.drop,moveTo:o.newHomeClientOffset,opacity:N?es.opacity.drop:null,scale:N?es.scale.drop:null};return{mapped:{type:"DRAGGING",offset:o.newHomeClientOffset,dimension:v,dropping:k,draggingOver:E,combineWith:N,mode:T,forceShouldAnimate:null,snapshot:t(T,g,E,N,k)}}}return null};return r}function Gu(e){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:e,combineWith:null}}var RD={mapped:{type:"SECONDARY",offset:st,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:Gu(null)}};function OD(){var e=rt(function(l,c){return{x:l,y:c}}),t=rt(Gu),n=rt(function(l,c,p){return c===void 0&&(c=null),{mapped:{type:"SECONDARY",offset:l,combineTargetFor:c,shouldAnimateDisplacement:p,snapshot:t(c)}}}),r=function(c){return c?n(st,c,!0):null},a=function(c,p,f,m){var u=f.displaced.visible[c],h=Boolean(m.inVirtualList&&m.effected[c]),g=oa(f),v=g&&g.draggableId===c?p:null;if(!u){if(!h)return r(v);if(f.displaced.invisible[c])return null;var C=Dr(m.displacedBy.point),T=e(C.x,C.y);return n(T,v,!0)}if(h)return r(v);var E=f.displacedBy.point,N=e(E.x,E.y);return n(N,v,u.shouldAnimate)},o=function(c,p){if(c.isDragging)return c.critical.draggable.id===p.draggableId?null:a(p.draggableId,c.critical.draggable.id,c.impact,c.afterCritical);if(c.phase==="DROP_ANIMATING"){var f=c.completed;return f.result.draggableId===p.draggableId?null:a(p.draggableId,f.result.draggableId,f.impact,f.afterCritical)}return null};return o}var LD=function(){var t=_D(),n=OD(),r=function(o,l){return t(o,l)||n(o,l)||RD};return r},PD={dropAnimationFinished:hu},BD=Vp(LD,PD,null,{context:Ti,pure:!0,areStatePropsEqual:Hu})(kD);function Yu(e){var t=qs(xi),n=t.isUsingCloneFor;return n===e.draggableId&&!e.isClone?null:X.default.createElement(BD,e)}function Uu(e){var t=typeof e.isDragDisabled=="boolean"?!e.isDragDisabled:!0,n=Boolean(e.disableInteractiveElementBlocking),r=Boolean(e.shouldRespectForcePress);return X.default.createElement(Yu,ge({},e,{isClone:!1,isEnabled:t,canDragInteractiveElements:n,shouldRespectForcePress:r}))}function AD(e){var t=U.useContext(ca);t||(process.env.NODE_ENV!=="production"?V(!1,"Could not find app context"):V(!1));var n=t.contextId,r=t.isMovementAllowed,a=U.useRef(null),o=U.useRef(null),l=e.children,c=e.droppableId,p=e.type,f=e.mode,m=e.direction,u=e.ignoreContainerClipping,h=e.isDropDisabled,g=e.isCombineEnabled,v=e.snapshot,C=e.useClone,T=e.updateViewportMaxScroll,E=e.getContainerForClone,N=Se(function(){return a.current},[]),x=Se(function(z){a.current=z},[]),k=Se(function(){return o.current},[]),I=Se(function(z){o.current=z},[]);hD({props:e,getDroppableRef:N,getPlaceholderRef:k});var A=Se(function(){r()&&T({maxScroll:yu()})},[r,T]);iD({droppableId:c,type:p,mode:f,direction:m,isDropDisabled:h,isCombineEnabled:g,ignoreContainerClipping:u,getDroppableRef:N});var R=X.default.createElement(SD,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder},function(z){var M=z.onClose,Y=z.data,W=z.animate;return X.default.createElement(pD,{placeholder:Y,onClose:M,innerRef:I,animate:W,contextId:n,onTransitionEnd:A})}),w=_e(function(){return{innerRef:x,placeholder:R,droppableProps:{"data-rbd-droppable-id":c,"data-rbd-droppable-context-id":n}}},[n,c,R,x]),_=C?C.dragging.draggableId:null,O=_e(function(){return{droppableId:c,type:p,isUsingCloneFor:_}},[c,_,p]);function K(){if(!C)return null;var z=C.dragging,M=C.render,Y=X.default.createElement(Yu,{draggableId:z.draggableId,index:z.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},function(W,j){return M(W,j,z)});return Qb.default.createPortal(Y,E())}return X.default.createElement(xi.Provider,{value:O},l(w,v),K())}var bo=function(t,n){return t===n.droppable.type},wd=function(t,n){return n.draggables[t.draggable.id]},FD=function(){var t={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},n=ge({},t,{shouldAnimatePlaceholder:!1}),r=rt(function(l){return{draggableId:l.id,type:l.type,source:{index:l.index,droppableId:l.droppableId}}}),a=rt(function(l,c,p,f,m,u){var h=m.descriptor.id,g=m.descriptor.droppableId===l;if(g){var v=u?{render:u,dragging:r(m.descriptor)}:null,C={isDraggingOver:p,draggingOverWith:p?h:null,draggingFromThisWith:h,isUsingPlaceholder:!0};return{placeholder:m.placeholder,shouldAnimatePlaceholder:!1,snapshot:C,useClone:v}}if(!c)return n;if(!f)return t;var T={isDraggingOver:p,draggingOverWith:h,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:m.placeholder,shouldAnimatePlaceholder:!0,snapshot:T,useClone:null}}),o=function(c,p){var f=p.droppableId,m=p.type,u=!p.isDropDisabled,h=p.renderClone;if(c.isDragging){var g=c.critical;if(!bo(m,g))return n;var v=wd(g,c.dimensions),C=Dt(c.impact)===f;return a(f,u,C,C,v,h)}if(c.phase==="DROP_ANIMATING"){var T=c.completed;if(!bo(m,T.critical))return n;var E=wd(T.critical,c.dimensions);return a(f,u,Wu(T.result)===f,Dt(T.impact)===f,E,h)}if(c.phase==="IDLE"&&c.completed&&!c.shouldFlush){var N=c.completed;if(!bo(m,N.critical))return n;var x=Dt(N.impact)===f,k=Boolean(N.impact.at&&N.impact.at.type==="COMBINE"),I=N.critical.droppable.id===f;return x?k?t:n:I?t:n}return n};return o},VD={updateViewportMaxScroll:BE};function $D(){return document.body||(process.env.NODE_ENV!=="production"?V(!1,"document.body is not ready"):V(!1)),document.body}var KD={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:$D},ki=Vp(FD,VD,null,{context:Ti,pure:!0,areStatePropsEqual:Hu})(AD);ki.defaultProps=KD;const HD={disabled:"boolean",href:"string",icon:"SpsIcon",kind:"ButtonKind",spinning:"boolean",spinningTitle:"string",type:"ButtonType"};function qe(e){const{children:t,className:n,href:r,icon:a,kind:o=$.ButtonKind.DEFAULT,spinning:l,spinningTitle:c,type:p=$.ButtonType.BUTTON,unsafelyReplaceClassName:f,...m}=e;let{disabled:u}=e;l&&(u=!0);const{t:h}=s.useContext(He),g=H(f||"sps-button",`sps-button--${o}`,u&&"sps-button--disabled",l&&"sps-button--spinning",n),v=a&&s.createElement("i",{className:H("sps-icon",`sps-icon-${a}`),"aria-hidden":"true"}),C=l&&s.createElement("div",{className:"sps-spinner"},c||h("design-system:button.spinningTitle"));return s.createElement("div",{className:g},r?s.createElement("a",{...m,href:r,className:"sps-button__clickable-element"},v,t,C):s.createElement("button",{...m,type:p,className:"sps-button__clickable-element",disabled:u},v,t,C))}Object.assign(qe,{props:HD,displayName:"SpsButton"});const WD={content:"ReactNodeLike",icon:"SpsIcon",title:"string"};function ju(e){const{content:t,className:n,icon:r,title:a,"data-testid":o,unsafelyReplaceClassName:l,...c}=e,p=H(l||"sps-card__header",n);return s.createElement("div",{className:p,title:a,...c},s.createElement("div",{className:"sps-card__title"}," ",r&&s.createElement("i",{"aria-hidden":"true",className:`sps-icon sps-icon-${r}`})," ",a),s.createElement("div",{className:"sps-card__header-content"},t))}Object.assign(ju,{props:WD,displayName:"SpsCardHeader"});const GD={icon:"SpsIcon",kind:"TagKind"};function Yt(e){const{children:t,className:n,icon:r,kind:a=$.TagKind.DEFAULT,"data-testid":o,unsafelyReplaceClassName:l,...c}=e,p=s.Children.toArray(t).filter(m=>typeof m=="string").join(""),f=H(l||"sps-tag",`sps-tag--${a}`,n);return s.createElement("span",{className:f,"data-testid":`${o}__tag`,title:p,...c},r&&s.createElement("i",{"aria-hidden":"true",className:`sps-icon sps-icon-${r}`,"data-testid":`${o}__icon`}),t)}Object.assign(Yt,{props:GD,displayName:"SpsTag"});const YD={activateTab:"Function",active:"boolean",icon:"SpsIcon",label:"string",index:"number",tag:"string",tagKind:"TagKind",tagIcon:"SpsIcon"};function Ii(e){const{activateTab:t,active:n,children:r,className:a,label:o,icon:l,id:c,index:p=0,tag:f,tagKind:m,tagIcon:u,"data-testid":h,unsafelyReplaceClassName:g,...v}=e,C=()=>{t&&t(this,p,r)},T=N=>{(N.key==="Enter"||N.key===" "||N.key==="Spacebar")&&(N.preventDefault(),N.stopPropagation(),t&&t(this,p,r))},E=H(g||"sps-nav__item","sps-nav__link",n&&"active",a);return s.createElement("a",{className:E,onClick:C,"data-toggle":"tab",id:c,role:"tab","aria-controls":c,...v,tabIndex:0,onKeyDown:T},l&&s.createElement("i",{className:`sps-icon sps-icon-${l}`}),s.createElement("span",null,o),f&&s.createElement(Yt,{kind:m||$.TagKind.KEY,icon:u},f))}Object.assign(Ii,{props:YD,displayName:"SpsCardTabbedPane"});function UD(e,t,n){const[r,a]=s.useState({index:0,content:null}),o=s.useCallback((l,c,p)=>{a({index:c,content:p})},[]);return s.useEffect(()=>{function l(f){for(const m of f){const u=m.props;a({...r,content:u.children});break}}function c(f,m){for(let u=0;u<=f.length;u+=1){const h=f[u];if(h&&h.props&&(h.props.id&&h.props.id===m||h.props.label&&h.props.label===m)){a({content:h.props.children,index:u});break}}}const p=s.Children.toArray(e);n&&t?c(p,t):n&&l(p)},[t,e]),[r,o]}const jD={activeTab:"string",footer:"ReactNodeOrRenderFn",headerContent:"ReactNodeOrRenderFn",headerIcon:"SpsIcon",headerTitle:"string"};function Mi(e){s.useEffect(()=>{console.log(["App developers: There's a new card component! Update for improved performance,","fewer bugs, and increased flexibility. Reach out to the design system help Slack","channel if you have any questions!"].join(" "))},[]);const{activeTab:t,children:n,className:r,footer:a,headerContent:o,headerIcon:l,headerTitle:c,"data-testid":p,unsafelyReplaceClassName:f,...m}=e,u=s.Children.toArray(n).some(C=>s.isValidElement(C)&&C.type===Ii),[h,g]=UD(n,t,u),v=H(f||"sps-card",r);return s.createElement("div",{...m,className:v,"data-testid":`${p}__card`},(c||o)&&s.createElement(ju,{title:c,content:Ct(o),icon:l,"data-testid":`${p}__header`}),u===!0?s.createElement(s.Fragment,null,s.createElement("nav",{className:"sps-nav sps-nav--tabs",role:"tablist","data-testid":`${p}__tabs`},s.Children.map(n,(C,T)=>{if(s.isValidElement(C))return s.cloneElement(C,{active:T===h.index,index:T,activateTab:g,"data-testid":`${p}__tab`})})),s.createElement("div",{className:"sps-card__body","data-testid":`${p}__body--tab-active`},h.content)):s.createElement("div",{className:"sps-card__body","data-testid":`${p}__body`},n),a&&s.createElement("div",{className:"sps-card__footer","data-testid":`${p}__footer`},Ct(a)))}Object.assign(Mi,{props:jD,displayName:"SpsCard"});function _i(e,t){const[n,...r]=y.crumblePath(t);return r.length?e.members[n].get(r):e.members[n]}function zD(e=[],t={}){return{validators:[],...t,_type:"Array",members:[...e],errors:null,invalid:!1,isValid(){const n=this;return!n.invalid&&n.members.every(r=>r.isValid())},isRequired(){const n=this;return n.validators&&n.validators.indexOf(na.required)>-1},hasError(n){const r=this;return r.errors&&Object.prototype.hasOwnProperty.call(r.errors,n)},length:e.length,setInitValue(n){for(const[r,a]of this.members.entries())a.setInitValue(n[r]);return this},getValue(){return this.members.map(n=>n.getValue())},setValue(n=[]){for(const[r,a]of this.members.entries())a.setValue(n[r]);return this},update(){return this},isFocused(){return this.members.some(n=>n.isFocused())},focus(){const n=this;return n.members.length&&n.members[0].focus(),this},blur(){for(const n of this.members)n.blur();return this},isPristine(){return this.members.every(n=>n.isPristine())},markAsPristine(){for(const n of this.members)n.markAsPristine();return this},markAsDirty(){for(const n of this.members)n.markAsDirty();return this},reset(n){const r=this;r.members=[...e],r.length=e.length;for(const[a,o]of r.members.entries())n&&a<n.length?o.reset(n[a]):o.reset();return r.update(),this},get(n){return _i(this,n)},at(n){return this.members[n]},push(n){const r=this;return r.members.push(n),r.length=r.members.length,r.update(),this},insert(n,r){const a=this;return a.members.splice(n,0,r),a.length=a.members.length,a.update(),this},removeAt(n){const r=this;return r.members.splice(n,1),r.length=r.members.length,r.update(),this},setControl(n,r){const a=this;return a.members[n]=r,a.update(),this}}}function qD(e,t={}){return{validators:[],id:bt(),...t,_type:"Control",initValue:e,setInitValue(n){return this.value=n,this.initValue=n,this},value:e,getValue(){return this.value},setValue(n){return this.value=n,this.update(),this},errors:null,invalid:!1,isValid(){return!this.invalid},hasError(n){return this.errors&&Object.prototype.hasOwnProperty.call(this.errors,n)},focused:!1,isFocused(){return this.focused},pristine:!0,isPristine(){return this.pristine},isRequired(){return this.validators&&this.validators.indexOf(na.required)>-1},update(){return this},focus(){return this.focused=!0,this.update(),this.onFocus&&this.onFocus(),this},blur(){return this.focused=!1,this.update(),this.onBlur&&this.onBlur(),this},markAsPristine(){return this.pristine=!0,this.update(),this},markAsDirty(){return this.pristine=!1,this.update(),this},reset(n=this.initValue){return this.value=n,this.pristine=!0,this.update(),this}}}function JD(e={},t={}){return{validators:[],...t,_type:"Group",members:{...e},errors:null,invalid:!1,isValid(){return!this.invalid&&Object.keys(this.members).every(n=>this.members[n].isValid())},hasError(n){return this.errors&&Object.prototype.hasOwnProperty.call(this.errors,n)},setInitValue(n={}){for(const r of Object.keys(this.members))this.members[r].setInitValue(n[r]);return this},getValue(){return Object.keys(this.members).reduce((n,r)=>Object.assign(n,{[r]:this.members[r].getValue()}),{})},setValue(n={}){for(const r of Object.keys(this.members))this.members[r].setValue(n[r]);return this},update(){return this},isFocused(){return Object.keys(this.members).some(n=>this.members[n].isFocused())},focus(){const n=Object.keys(this.members);return n.length&&this.members[n[0]].focus(),this},blur(){for(const n of Object.keys(this.members))this.members[n].blur();return this},isPristine(){return Object.keys(this.members).every(n=>this.members[n].isPristine())},markAsPristine(){for(const n of Object.keys(this.members))this.members[n].markAsPristine();return this},markAsDirty(){for(const n of Object.keys(this.members))this.members[n].markAsDirty();return this},reset(n){this.members={...e};for(const r of Object.keys(this.members))n&&Object.prototype.hasOwnProperty.call(n,r)?this.members[r].reset(n[r]):this.members[r].reset();return this.update(),this},get(n){return _i(this,n)},addControl(n,r){if(this.contains(n))throw new Error(`Form group already contains a control called "${n}".`);return this.members[n]=r,this.update(),this},removeControl(n){return delete this.members[n],this.update(),this},setControl(n,r){return this.members[n]=r,this.update(),this},contains(n){return Object.keys(this.members).indexOf(n)>-1}}}function ZD(e,t){t&&e.setInitValue(t);const[n,r]=U.useState(),[a,o]=U.useState([]),[l,c]=U.useReducer(p=>{for(const f of a)for(const m of y.traversePath(p,f))m.validators&&m.validators.length&&(m.errors=ra(m.getValue(),m.validators),m.invalid=!!m.errors&&!m.pristine);return r(void 0),o([]),{...p}},e);return y.forEachNestedObject(l,(p,f)=>{f._type&&(f.update=function(){return a.push(p),o(a),n||r(window.setTimeout(c,0)),this})}),l}function XD(e,t=null){const[n,r]=U.useState(t),a=U.useRef(()=>null);return U.useEffect(()=>{const o=()=>n;if(e.validators){const l=e.validators.indexOf(a.current);l===-1?e.validators.push(o):e.validators[l]=o,e.update(),a.current=o}},[n]),[n,r]}const zu={formMeta:"SpsFormSetMeta<any>",onSubmit:"React.FormEventHandler"},ps=s.forwardRef((e,t)=>{const{children:n,onSubmit:r,formArray:a,formGroup:o,formMeta:l,...c}=e,p=o||a;function f(m){m.preventDefault(),p&&p.markAsDirty(),l&&(l.markAsDirty(),l.markAsBlurred(),l.markAsSubmitted()),r&&r(m)}return s.createElement("form",{ref:t,onSubmit:f,...c},n)});Object.assign(ps,{props:zu,displayName:"SpsForm"});const qu={},QD={ideal:{label:"Ideal",examples:{ideal:{react:y.code`
|
|
521
|
+
`)}}],fD=[function(t){var n=t.props;n.renderClone||(process.env.NODE_ENV!=="production"?$(!1,"Must provide a clone render function (renderClone) for virtual lists"):$())},function(t){var n=t.getPlaceholderRef;n()&&(process.env.NODE_ENV!=="production"?$(!1,"Expected virtual list to not have a placeholder"):$())}];function hD(e){cs(function(){ha(e,uD),e.props.mode==="standard"&&ha(e,mD),e.props.mode==="virtual"&&ha(e,fD)})}var SD=function(e){Np(t,e);function t(){for(var r,o=arguments.length,a=new Array(o),l=0;l<o;l++)a[l]=arguments[l];return r=e.call.apply(e,[this].concat(a))||this,r.state={isVisible:!!r.props.on,data:r.props.on,animate:r.props.shouldAnimate&&r.props.on?"open":"none"},r.onClose=function(){r.state.animate==="close"&&r.setState({isVisible:!1})},r}t.getDerivedStateFromProps=function(o,a){return o.shouldAnimate?o.on?{isVisible:!0,data:o.on,animate:"open"}:a.isVisible?{isVisible:!0,data:a.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:!!o.on,data:o.on,animate:"none"}};var n=t.prototype;return n.render=function(){if(!this.state.isVisible)return null;var o={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(o)},t}(_.PureComponent),Dd={dragging:5e3,dropAnimating:4500},gD=function(t,n){return n?Hr.drop(n.duration):t?Hr.snap:Hr.fluid},bD=function(t,n){return t?n?Qr.opacity.drop:Qr.opacity.combining:null},vD=function(t){return t.forceShouldAnimate!=null?t.forceShouldAnimate:t.mode==="SNAP"};function yD(e){var t=e.dimension,n=t.client,r=e.offset,o=e.combineWith,a=e.dropping,l=!!o,c=vD(e),p=!!a,f=p?Pa.drop(r,l):Pa.moveTo(r),m={position:"fixed",top:n.marginBox.top,left:n.marginBox.left,boxSizing:"border-box",width:n.borderBox.width,height:n.borderBox.height,transition:gD(c,a),transform:f,opacity:bD(l,p),zIndex:p?Dd.dropAnimating:Dd.dragging,pointerEvents:"none"};return m}function TD(e){return{transform:Pa.moveTo(e.offset),transition:e.shouldAnimateDisplacement?null:"none"}}function ED(e){return e.type==="DRAGGING"?yD(e):TD(e)}function wD(e,t,n){n===void 0&&(n=rt);var r=window.getComputedStyle(t),o=t.getBoundingClientRect(),a=Kp(o,r),l=Gs(a,n),c={client:a,tagName:t.tagName.toLowerCase(),display:r.display},p={x:a.marginBox.width,y:a.marginBox.height},f={descriptor:e,placeholder:c,displaceBy:p,client:a,page:l};return f}function CD(e){var t=wi("draggable"),n=e.descriptor,r=e.registry,o=e.getDraggableRef,a=e.canDragInteractiveElements,l=e.shouldRespectForcePress,c=e.isEnabled,p=Ie(function(){return{canDragInteractiveElements:a,shouldRespectForcePress:l,isEnabled:c}},[a,c,l]),f=he(function(g){var v=o();return v||(process.env.NODE_ENV!=="production"?$(!1,"Cannot get dimension when no ref is set"):$()),wD(n,v,g)},[n,o]),m=Ie(function(){return{uniqueId:t,descriptor:n,options:p,getDimension:f}},[n,f,p,t]),u=_.useRef(m),h=_.useRef(!0);Dt(function(){return r.draggable.register(u.current),function(){return r.draggable.unregister(u.current)}},[r.draggable]),Dt(function(){if(h.current){h.current=!1;return}var g=u.current;u.current=m,r.draggable.update(m,g)},[m,r.draggable])}function DD(e,t,n){cs(function(){function r(a){return"Draggable[id: "+a+"]: "}var o=e.draggableId;o||(process.env.NODE_ENV!=="production"?$(!1,"Draggable requires a draggableId"):$(!1)),typeof o!="string"&&(process.env.NODE_ENV!=="production"?$(!1,`Draggable requires a [string] draggableId.
|
|
522
|
+
Provided: [type: `+typeof o+"] (value: "+o+")"):$(!1)),xT(e.index)||(process.env.NODE_ENV!=="production"?$(!1,r(o)+" requires an integer index prop"):$(!1)),e.mapped.type!=="DRAGGING"&&(Ku(n()),e.isEnabled&&(Nu(t,o)||(process.env.NODE_ENV!=="production"?$(!1,r(o)+" Unable to find drag handle"):$(!1))))})}function ND(e){Ci(function(){var t=_.useRef(e);cs(function(){e!==t.current&&(process.env.NODE_ENV!=="production"?$(!1,"Draggable isClone prop value changed during component life"):$(!1))},[e])})}function xD(e){e.preventDefault()}function kD(e){var t=_.useRef(null),n=he(function(R){t.current=R},[]),r=he(function(){return t.current},[]),o=zs(io),a=o.contextId,l=o.dragHandleUsageInstructionsId,c=o.registry,p=zs(ki),f=p.type,m=p.droppableId,u=Ie(function(){return{id:e.draggableId,index:e.index,type:f,droppableId:m}},[e.draggableId,e.index,f,m]),h=e.children,g=e.draggableId,v=e.isEnabled,w=e.shouldRespectForcePress,T=e.canDragInteractiveElements,E=e.isClone,D=e.mapped,k=e.dropAnimationFinished;if(DD(e,a,r),ND(E),!E){var I=Ie(function(){return{descriptor:u,registry:c,getDraggableRef:r,canDragInteractiveElements:T,shouldRespectForcePress:w,isEnabled:v}},[u,c,r,T,w,v]);CD(I)}var x=Ie(function(){return v?{tabIndex:0,role:"button","aria-describedby":l,"data-rbd-drag-handle-draggable-id":g,"data-rbd-drag-handle-context-id":a,draggable:!1,onDragStart:xD}:null},[a,l,g,v]),F=he(function(R){D.type==="DRAGGING"&&D.dropping&&R.propertyName==="transform"&&k()},[k,D]),L=Ie(function(){var R=ED(D),O=D.type==="DRAGGING"&&D.dropping?F:null,W={innerRef:n,draggableProps:{"data-rbd-draggable-context-id":a,"data-rbd-draggable-id":g,style:R,onTransitionEnd:O},dragHandleProps:x};return W},[a,x,g,D,F,n]),C=Ie(function(){return{draggableId:u.id,type:u.type,source:{index:u.index,droppableId:u.droppableId}}},[u.droppableId,u.id,u.index,u.type]);return h(L,D.snapshot,C)}var Hu=function(e,t){return e===t},Wu=function(e){var t=e.combine,n=e.destination;return n?n.droppableId:t?t.droppableId:null},ID=function(t){return t.combine?t.combine.draggableId:null},MD=function(t){return t.at&&t.at.type==="COMBINE"?t.at.combine.draggableId:null};function _D(){var e=nt(function(o,a){return{x:o,y:a}}),t=nt(function(o,a,l,c,p){return{isDragging:!0,isClone:a,isDropAnimating:!!p,dropAnimation:p,mode:o,draggingOver:l,combineWith:c,combineTargetFor:null}}),n=nt(function(o,a,l,c,p,f,m){return{mapped:{type:"DRAGGING",dropping:null,draggingOver:p,combineWith:f,mode:a,offset:o,dimension:l,forceShouldAnimate:m,snapshot:t(a,c,p,f,null)}}}),r=function(a,l){if(a.isDragging){if(a.critical.draggable.id!==l.draggableId)return null;var c=a.current.client.offset,p=a.dimensions.draggables[l.draggableId],f=Ct(a.impact),m=MD(a.impact),u=a.forceShouldAnimate;return n(e(c.x,c.y),a.movementMode,p,l.isClone,f,m,u)}if(a.phase==="DROP_ANIMATING"){var h=a.completed;if(h.result.draggableId!==l.draggableId)return null;var g=l.isClone,v=a.dimensions.draggables[l.draggableId],w=h.result,T=w.mode,E=Wu(w),D=ID(w),k=a.dropDuration,I={duration:k,curve:Si.drop,moveTo:a.newHomeClientOffset,opacity:D?Qr.opacity.drop:null,scale:D?Qr.scale.drop:null};return{mapped:{type:"DRAGGING",offset:a.newHomeClientOffset,dimension:v,dropping:I,draggingOver:E,combineWith:D,mode:T,forceShouldAnimate:null,snapshot:t(T,g,E,D,I)}}}return null};return r}function Gu(e){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:e,combineWith:null}}var RD={mapped:{type:"SECONDARY",offset:rt,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:Gu(null)}};function OD(){var e=nt(function(l,c){return{x:l,y:c}}),t=nt(Gu),n=nt(function(l,c,p){return c===void 0&&(c=null),{mapped:{type:"SECONDARY",offset:l,combineTargetFor:c,shouldAnimateDisplacement:p,snapshot:t(c)}}}),r=function(c){return c?n(rt,c,!0):null},o=function(c,p,f,m){var u=f.displaced.visible[c],h=!!(m.inVirtualList&&m.effected[c]),g=so(f),v=g&&g.draggableId===c?p:null;if(!u){if(!h)return r(v);if(f.displaced.invisible[c])return null;var w=Cr(m.displacedBy.point),T=e(w.x,w.y);return n(T,v,!0)}if(h)return r(v);var E=f.displacedBy.point,D=e(E.x,E.y);return n(D,v,u.shouldAnimate)},a=function(c,p){if(c.isDragging)return c.critical.draggable.id===p.draggableId?null:o(p.draggableId,c.critical.draggable.id,c.impact,c.afterCritical);if(c.phase==="DROP_ANIMATING"){var f=c.completed;return f.result.draggableId===p.draggableId?null:o(p.draggableId,f.result.draggableId,f.impact,f.afterCritical)}return null};return a}var LD=function(){var t=_D(),n=OD(),r=function(a,l){return t(a,l)||n(a,l)||RD};return r},PD={dropAnimationFinished:hu},BD=Vp(LD,PD,null,{context:Ei,pure:!0,areStatePropsEqual:Hu})(kD);function Yu(e){var t=zs(ki),n=t.isUsingCloneFor;return n===e.draggableId&&!e.isClone?null:_.createElement(BD,e)}function Uu(e){var t=typeof e.isDragDisabled=="boolean"?!e.isDragDisabled:!0,n=!!e.disableInteractiveElementBlocking,r=!!e.shouldRespectForcePress;return _.createElement(Yu,Se({},e,{isClone:!1,isEnabled:t,canDragInteractiveElements:n,shouldRespectForcePress:r}))}function AD(e){var t=_.useContext(io);t||(process.env.NODE_ENV!=="production"?$(!1,"Could not find app context"):$());var n=t.contextId,r=t.isMovementAllowed,o=_.useRef(null),a=_.useRef(null),l=e.children,c=e.droppableId,p=e.type,f=e.mode,m=e.direction,u=e.ignoreContainerClipping,h=e.isDropDisabled,g=e.isCombineEnabled,v=e.snapshot,w=e.useClone,T=e.updateViewportMaxScroll,E=e.getContainerForClone,D=he(function(){return o.current},[]),k=he(function(z){o.current=z},[]),I=he(function(){return a.current},[]),x=he(function(z){a.current=z},[]);hD({props:e,getDroppableRef:D,getPlaceholderRef:I});var F=he(function(){r()&&T({maxScroll:yu()})},[r,T]);iD({droppableId:c,type:p,mode:f,direction:m,isDropDisabled:h,isCombineEnabled:g,ignoreContainerClipping:u,getDroppableRef:D});var L=_.createElement(SD,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder},function(z){var M=z.onClose,U=z.data,G=z.animate;return _.createElement(pD,{placeholder:U,onClose:M,innerRef:x,animate:G,contextId:n,onTransitionEnd:F})}),C=Ie(function(){return{innerRef:k,placeholder:L,droppableProps:{"data-rbd-droppable-id":c,"data-rbd-droppable-context-id":n}}},[n,c,L,k]),R=w?w.dragging.draggableId:null,O=Ie(function(){return{droppableId:c,type:p,isUsingCloneFor:R}},[c,R,p]);function W(){if(!w)return null;var z=w.dragging,M=w.render,U=_.createElement(Yu,{draggableId:z.draggableId,index:z.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},function(G,j){return M(G,j,z)});return Qs.createPortal(U,E())}return _.createElement(ki.Provider,{value:O},l(C,v),W())}var Sa=function(t,n){return t===n.droppable.type},Nd=function(t,n){return n.draggables[t.draggable.id]},FD=function(){var t={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},n=Se({},t,{shouldAnimatePlaceholder:!1}),r=nt(function(l){return{draggableId:l.id,type:l.type,source:{index:l.index,droppableId:l.droppableId}}}),o=nt(function(l,c,p,f,m,u){var h=m.descriptor.id,g=m.descriptor.droppableId===l;if(g){var v=u?{render:u,dragging:r(m.descriptor)}:null,w={isDraggingOver:p,draggingOverWith:p?h:null,draggingFromThisWith:h,isUsingPlaceholder:!0};return{placeholder:m.placeholder,shouldAnimatePlaceholder:!1,snapshot:w,useClone:v}}if(!c)return n;if(!f)return t;var T={isDraggingOver:p,draggingOverWith:h,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:m.placeholder,shouldAnimatePlaceholder:!0,snapshot:T,useClone:null}}),a=function(c,p){var f=p.droppableId,m=p.type,u=!p.isDropDisabled,h=p.renderClone;if(c.isDragging){var g=c.critical;if(!Sa(m,g))return n;var v=Nd(g,c.dimensions),w=Ct(c.impact)===f;return o(f,u,w,w,v,h)}if(c.phase==="DROP_ANIMATING"){var T=c.completed;if(!Sa(m,T.critical))return n;var E=Nd(T.critical,c.dimensions);return o(f,u,Wu(T.result)===f,Ct(T.impact)===f,E,h)}if(c.phase==="IDLE"&&c.completed&&!c.shouldFlush){var D=c.completed;if(!Sa(m,D.critical))return n;var k=Ct(D.impact)===f,I=!!(D.impact.at&&D.impact.at.type==="COMBINE"),x=D.critical.droppable.id===f;return k?I?t:n:x?t:n}return n};return a},VD={updateViewportMaxScroll:BE};function $D(){return document.body||(process.env.NODE_ENV!=="production"?$(!1,"document.body is not ready"):$()),document.body}var KD={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:$D},Ii=Vp(FD,VD,null,{context:Ei,pure:!0,areStatePropsEqual:Hu})(AD);Ii.defaultProps=KD;const HD={disabled:"boolean",href:"string",icon:"SpsIcon",kind:"ButtonKind",spinning:"boolean",spinningTitle:"string",type:"ButtonType"};function ze(e){const{children:t,className:n,href:r,icon:o,kind:a=K.ButtonKind.DEFAULT,spinning:l,spinningTitle:c,type:p=K.ButtonType.BUTTON,unsafelyReplaceClassName:f,...m}=e;let{disabled:u}=e;l&&(u=!0);const{t:h}=s.useContext(Ke),g=H(f||"sps-button",`sps-button--${a}`,u&&"sps-button--disabled",l&&"sps-button--spinning",n),v=o&&s.createElement("i",{className:H("sps-icon",`sps-icon-${o}`),"aria-hidden":"true"}),w=l&&s.createElement("div",{className:"sps-spinner"},c||h("design-system:button.spinningTitle"));return s.createElement("div",{className:g},r?s.createElement("a",{...m,href:r,className:"sps-button__clickable-element"},v,t,w):s.createElement("button",{...m,type:p,className:"sps-button__clickable-element",disabled:u},v,t,w))}Object.assign(ze,{props:HD,displayName:"SpsButton"});const WD={content:"ReactNodeLike",icon:"SpsIcon",title:"string"};function ju(e){const{content:t,className:n,icon:r,title:o,"data-testid":a,unsafelyReplaceClassName:l,...c}=e,p=H(l||"sps-card__header",n);return s.createElement("div",{className:p,title:o,...c},s.createElement("div",{className:"sps-card__title"}," ",r&&s.createElement("i",{"aria-hidden":"true",className:`sps-icon sps-icon-${r}`})," ",o),s.createElement("div",{className:"sps-card__header-content"},t))}Object.assign(ju,{props:WD,displayName:"SpsCardHeader"});const GD={icon:"SpsIcon",kind:"TagKind"};function Gt(e){const{children:t,className:n,icon:r,kind:o=K.TagKind.DEFAULT,"data-testid":a,unsafelyReplaceClassName:l,...c}=e,p=s.Children.toArray(t).filter(m=>typeof m=="string").join(""),f=H(l||"sps-tag",`sps-tag--${o}`,n);return s.createElement("span",{className:f,"data-testid":`${a}__tag`,title:p,...c},r&&s.createElement("i",{"aria-hidden":"true",className:`sps-icon sps-icon-${r}`,"data-testid":`${a}__icon`}),t)}Object.assign(Gt,{props:GD,displayName:"SpsTag"});const YD={activateTab:"Function",active:"boolean",icon:"SpsIcon",label:"string",index:"number",tag:"string",tagKind:"TagKind",tagIcon:"SpsIcon"};function Mi(e){const{activateTab:t,active:n,children:r,className:o,label:a,icon:l,id:c,index:p=0,tag:f,tagKind:m,tagIcon:u,"data-testid":h,unsafelyReplaceClassName:g,...v}=e,w=()=>{t&&t(this,p,r)},T=D=>{(D.key==="Enter"||D.key===" "||D.key==="Spacebar")&&(D.preventDefault(),D.stopPropagation(),t&&t(this,p,r))},E=H(g||"sps-nav__item","sps-nav__link",n&&"active",o);return s.createElement("a",{className:E,onClick:w,"data-toggle":"tab",id:c,role:"tab","aria-controls":c,...v,tabIndex:0,onKeyDown:T},l&&s.createElement("i",{className:`sps-icon sps-icon-${l}`}),s.createElement("span",null,a),f&&s.createElement(Gt,{kind:m||K.TagKind.KEY,icon:u},f))}Object.assign(Mi,{props:YD,displayName:"SpsCardTabbedPane"});function UD(e,t,n){const[r,o]=s.useState({index:0,content:null}),a=s.useCallback((l,c,p)=>{o({index:c,content:p})},[]);return s.useEffect(()=>{function l(f){for(const m of f){const u=m.props;o({...r,content:u.children});break}}function c(f,m){for(let u=0;u<=f.length;u+=1){const h=f[u];if(h&&h.props&&(h.props.id&&h.props.id===m||h.props.label&&h.props.label===m)){o({content:h.props.children,index:u});break}}}const p=s.Children.toArray(e);n&&t?c(p,t):n&&l(p)},[t,e]),[r,a]}const jD={activeTab:"string",footer:"ReactNodeOrRenderFn",headerContent:"ReactNodeOrRenderFn",headerIcon:"SpsIcon",headerTitle:"string"};function _i(e){s.useEffect(()=>{console.log(["App developers: There's a new card component! Update for improved performance,","fewer bugs, and increased flexibility. Reach out to the design system help Slack","channel if you have any questions!"].join(" "))},[]);const{activeTab:t,children:n,className:r,footer:o,headerContent:a,headerIcon:l,headerTitle:c,"data-testid":p,unsafelyReplaceClassName:f,...m}=e,u=s.Children.toArray(n).some(w=>s.isValidElement(w)&&w.type===Mi),[h,g]=UD(n,t,u),v=H(f||"sps-card",r);return s.createElement("div",{...m,className:v,"data-testid":`${p}__card`},(c||a)&&s.createElement(ju,{title:c,content:wt(a),icon:l,"data-testid":`${p}__header`}),u===!0?s.createElement(s.Fragment,null,s.createElement("nav",{className:"sps-nav sps-nav--tabs",role:"tablist","data-testid":`${p}__tabs`},s.Children.map(n,(w,T)=>{if(s.isValidElement(w))return s.cloneElement(w,{active:T===h.index,index:T,activateTab:g,"data-testid":`${p}__tab`})})),s.createElement("div",{className:"sps-card__body","data-testid":`${p}__body--tab-active`},h.content)):s.createElement("div",{className:"sps-card__body","data-testid":`${p}__body`},n),o&&s.createElement("div",{className:"sps-card__footer","data-testid":`${p}__footer`},wt(o)))}Object.assign(_i,{props:jD,displayName:"SpsCard"});function Ri(e,t){const[n,...r]=y.crumblePath(t);return r.length?e.members[n].get(r):e.members[n]}function zD(e=[],t={}){return{validators:[],...t,_type:"Array",members:[...e],errors:null,invalid:!1,isValid(){const n=this;return!n.invalid&&n.members.every(r=>r.isValid())},isRequired(){const n=this;return n.validators&&n.validators.indexOf(to.required)>-1},hasError(n){const r=this;return r.errors&&Object.prototype.hasOwnProperty.call(r.errors,n)},length:e.length,setInitValue(n){for(const[r,o]of this.members.entries())o.setInitValue(n[r]);return this},getValue(){return this.members.map(n=>n.getValue())},setValue(n=[]){for(const[r,o]of this.members.entries())o.setValue(n[r]);return this},update(){return this},isFocused(){return this.members.some(n=>n.isFocused())},focus(){const n=this;return n.members.length&&n.members[0].focus(),this},blur(){for(const n of this.members)n.blur();return this},isPristine(){return this.members.every(n=>n.isPristine())},markAsPristine(){for(const n of this.members)n.markAsPristine();return this},markAsDirty(){for(const n of this.members)n.markAsDirty();return this},reset(n){const r=this;r.members=[...e],r.length=e.length;for(const[o,a]of r.members.entries())n&&o<n.length?a.reset(n[o]):a.reset();return r.update(),this},get(n){return Ri(this,n)},at(n){return this.members[n]},push(n){const r=this;return r.members.push(n),r.length=r.members.length,r.update(),this},insert(n,r){const o=this;return o.members.splice(n,0,r),o.length=o.members.length,o.update(),this},removeAt(n){const r=this;return r.members.splice(n,1),r.length=r.members.length,r.update(),this},setControl(n,r){const o=this;return o.members[n]=r,o.update(),this}}}function qD(e,t={}){return{validators:[],id:gt(),...t,_type:"Control",initValue:e,setInitValue(n){return this.value=n,this.initValue=n,this},value:e,getValue(){return this.value},setValue(n){return this.value=n,this.update(),this},errors:null,invalid:!1,isValid(){return!this.invalid},hasError(n){return this.errors&&Object.prototype.hasOwnProperty.call(this.errors,n)},focused:!1,isFocused(){return this.focused},pristine:!0,isPristine(){return this.pristine},isRequired(){return this.validators&&this.validators.indexOf(to.required)>-1},update(){return this},focus(){return this.focused=!0,this.update(),this.onFocus&&this.onFocus(),this},blur(){return this.focused=!1,this.update(),this.onBlur&&this.onBlur(),this},markAsPristine(){return this.pristine=!0,this.update(),this},markAsDirty(){return this.pristine=!1,this.update(),this},reset(n=this.initValue){return this.value=n,this.pristine=!0,this.update(),this}}}function JD(e={},t={}){return{validators:[],...t,_type:"Group",members:{...e},errors:null,invalid:!1,isValid(){return!this.invalid&&Object.keys(this.members).every(n=>this.members[n].isValid())},hasError(n){return this.errors&&Object.prototype.hasOwnProperty.call(this.errors,n)},setInitValue(n={}){for(const r of Object.keys(this.members))this.members[r].setInitValue(n[r]);return this},getValue(){return Object.keys(this.members).reduce((n,r)=>Object.assign(n,{[r]:this.members[r].getValue()}),{})},setValue(n={}){for(const r of Object.keys(this.members))this.members[r].setValue(n[r]);return this},update(){return this},isFocused(){return Object.keys(this.members).some(n=>this.members[n].isFocused())},focus(){const n=Object.keys(this.members);return n.length&&this.members[n[0]].focus(),this},blur(){for(const n of Object.keys(this.members))this.members[n].blur();return this},isPristine(){return Object.keys(this.members).every(n=>this.members[n].isPristine())},markAsPristine(){for(const n of Object.keys(this.members))this.members[n].markAsPristine();return this},markAsDirty(){for(const n of Object.keys(this.members))this.members[n].markAsDirty();return this},reset(n){this.members={...e};for(const r of Object.keys(this.members))n&&Object.prototype.hasOwnProperty.call(n,r)?this.members[r].reset(n[r]):this.members[r].reset();return this.update(),this},get(n){return Ri(this,n)},addControl(n,r){if(this.contains(n))throw new Error(`Form group already contains a control called "${n}".`);return this.members[n]=r,this.update(),this},removeControl(n){return delete this.members[n],this.update(),this},setControl(n,r){return this.members[n]=r,this.update(),this},contains(n){return Object.keys(this.members).indexOf(n)>-1}}}function ZD(e,t){t&&e.setInitValue(t);const[n,r]=_.useState(),[o,a]=_.useState([]),[l,c]=_.useReducer(p=>{for(const f of o)for(const m of y.traversePath(p,f))m.validators&&m.validators.length&&(m.errors=no(m.getValue(),m.validators),m.invalid=!!m.errors&&!m.pristine);return r(void 0),a([]),{...p}},e);return y.forEachNestedObject(l,(p,f)=>{f._type&&(f.update=function(){return o.push(p),a(o),n||r(window.setTimeout(c,0)),this})}),l}function XD(e,t=null){const[n,r]=_.useState(t),o=_.useRef(()=>null);return _.useEffect(()=>{const a=()=>n;if(e.validators){const l=e.validators.indexOf(o.current);l===-1?e.validators.push(a):e.validators[l]=a,e.update(),o.current=a}},[n]),[n,r]}const zu={formMeta:"SpsFormSetMeta<any>",onSubmit:"React.FormEventHandler"},ds=s.forwardRef((e,t)=>{const{children:n,onSubmit:r,formArray:o,formGroup:a,formMeta:l,...c}=e,p=a||o;function f(m){m.preventDefault(),p&&p.markAsDirty(),l&&(l.markAsDirty(),l.markAsBlurred(),l.markAsSubmitted()),r&&r(m)}return s.createElement("form",{ref:t,onSubmit:f,...c},n)});Object.assign(ds,{props:zu,displayName:"SpsForm"});const qu={},QD={ideal:{label:"Ideal",examples:{ideal:{react:y.code`
|
|
523
523
|
import {
|
|
524
524
|
SpsForm,
|
|
525
525
|
SpsLabel,
|
|
@@ -671,7 +671,7 @@ Valid keys: `+JSON.stringify(Object.keys(L),null," "));var ne=le(Z,fe,ee,F,J+".
|
|
|
671
671
|
</>
|
|
672
672
|
)
|
|
673
673
|
}
|
|
674
|
-
`}}}},eN={index:"number",key:"string",columnId:"string",name:"string",value:"string",onDelete:"(columnValue: string) => void",mandatory:"boolean"};function
|
|
674
|
+
`}}}},eN={index:"number",key:"string",columnId:"string",name:"string",value:"string",onDelete:"(columnValue: string) => void",mandatory:"boolean"};function co(e){const{index:t,key:n,columnId:r,name:o,value:a,onDelete:l,mandatory:c,ref:p,...f}=e,{t:m}=s.useContext(Ke);return s.createElement(Uu,{key:r,draggableId:r||"",index:t||0,...f},u=>s.createElement("div",{ref:u.innerRef,...u.draggableProps,...u.dragHandleProps,className:"sps-content-row"},s.createElement("div",{className:"sps-content-row__col-group","data-col-value":a},s.createElement("div",{className:"sps-content-row__col sps-column-chooser__grab-col"},s.createElement("i",{className:"sps-column-chooser__drag-handle"})),s.createElement("div",{className:"sps-content-row__col--borderless"},s.createElement("div",{className:"sps-body-12"},o)),s.createElement("div",{className:"sps-content-row__col sps-column-chooser__delete-col"},!c&&s.createElement(ze,{"aria-label":m("design-system:columnChooser.removeButton",{elementName:o}),kind:K.ButtonKind.ICON,icon:K.SpsIcon.X,onClick:()=>{l&&l(a||"")}})))))}Object.assign(co,{props:eN,displayName:"SpsColumnChooserColumn"});const tN={maxSelectedColumns:"number | null",unselectedColumns:"ColumnProps[]",selectedColumns:"ColumnProps[]",onApplyChanges:"(selectedColumns: ColumnProps[]) => void"};function Oi(e){const{unselectedColumns:t=[],selectedColumns:n=[],maxSelectedColumns:r=8,onApplyChanges:o,maxVisibleUnselectedColumns:a,updateInitialState:l,className:c,unsafelyReplaceClassName:p,...f}=e,[m,u]=Jt({isVisible:!1,unselectedColumns:[...t.map(L=>({...L,label:L.name,columnId:gt()}))],selectedColumns:[...n.map(L=>({...L,columnId:gt()}))],searchSelectedColumn:null,pendingUnselectedColumns:[...t.map(L=>({...L,label:L.name,columnId:gt()}))],pendingSelectedColumns:[...n.map(L=>({...L,columnId:gt()}))]}),h={searchSelectedColumn:""},g=H(m.isVisible&&"sps-button--open",c),{formMeta:v,formValue:w,updateForm:T}=gp(h);function E(L){if(L.target.value){const C=[...m.pendingSelectedColumns],R=[];m.pendingUnselectedColumns.forEach(O=>{L.target.value===O.name?(T(h),C.push({columnId:gt(),name:O.name,value:O.value})):R.push(O)}),u({pendingSelectedColumns:C,pendingUnselectedColumns:R})}}function D(L){const C=[],R=[...m.pendingUnselectedColumns];m.pendingSelectedColumns.forEach(O=>{L===O.value?R.push({columnId:gt(),name:O.name,value:O.value}):C.push(O)}),u({pendingSelectedColumns:C,pendingUnselectedColumns:R})}function k(L){if(!L.destination)return;const C=[...m.pendingSelectedColumns],[R]=C.splice(L.source.index,1);C.splice(L.destination.index,0,R),u({pendingSelectedColumns:C})}function I(){const L=m.pendingSelectedColumns.map(C=>{const R={...C};return R.columnId&&delete R.columnId,R});T(h),u({isVisible:!1,selectedColumns:[...m.pendingSelectedColumns],unselectedColumns:[...m.pendingUnselectedColumns]}),o&&o(L)}function x(){u({isVisible:!m.isVisible}),m.isVisible&&u({pendingSelectedColumns:[...m.selectedColumns],pendingUnselectedColumns:[...m.unselectedColumns]})}const F=s.useCallback(L=>{const C=new RegExp(L??"","i");return a?m.pendingUnselectedColumns.filter(R=>C.test(R.name)).map(R=>R.name).slice(0,a):m.pendingUnselectedColumns.map(R=>R.name)},[m.pendingUnselectedColumns,a]);return s.useEffect(()=>{l&&u({unselectedColumns:[...t.map(L=>({...L,label:L.name,columnId:gt()}))],pendingUnselectedColumns:[...t.map(L=>({...L,label:L.name,columnId:gt()}))]})},[t]),s.useEffect(()=>{l&&u({selectedColumns:[...n.map(L=>({...L,columnId:gt()}))],pendingSelectedColumns:[...n.map(L=>({...L,columnId:gt()}))]})},[n]),s.createElement("div",{className:"sps-column-chooser z-stratum-dropdown",...f},s.createElement(ze,{className:g,"aria-label":`${m.isVisible?"Close":"Open"} Column Chooser`,kind:K.ButtonKind.ICON,icon:K.SpsIcon.TABLE,onClick:x,"data-testid":"button"}),m.isVisible&&s.createElement(_i,{"data-testid":"open",footer:()=>s.createElement(ze,{"aria-label":"Apply Changes",kind:K.ButtonKind.LINK,onClick:I},"Apply Changes")},s.createElement("div",{className:"sps-column-chooser__search-container"},s.createElement(zt,{suggestions:F,disabled:!!(r&&m.pendingSelectedColumns.length>=r),value:w.searchSelectedColumn?w.searchSelectedColumn:"",formMeta:v.fields.searchSelectedColumn,onChange:E,placeholder:"Find Columns to Add","data-testid":"autocomplete",disableOptionsMemoization:!0})),s.createElement("div",{className:"sps-column-chooser__selected-title"},"Selected"),s.createElement(Fu,{onDragEnd:k},s.createElement(Ii,{droppableId:"column-chooser"},L=>s.createElement("div",{...L.droppableProps,ref:L.innerRef},m.pendingSelectedColumns.map((C,R)=>s.createElement(co,{index:R,key:C.columnId,columnId:C.columnId,name:C.name,value:C.value,onDelete:D,mandatory:C.mandatory})),L.placeholder)))))}Object.assign(Oi,{props:tN,displayName:"SpsColumnChooser"});const Ju={basic:{label:"Basic",description:"Column chooser component",examples:{basic:{react:y.code`
|
|
675
675
|
import { SpsColumnChooser } from "@spscommerce/ds-react";
|
|
676
676
|
function DemoComponent() {
|
|
677
677
|
const unselectedCols = [
|
|
@@ -690,7 +690,7 @@ Valid keys: `+JSON.stringify(Object.keys(L),null," "));var ne=le(Z,fe,ee,F,J+".
|
|
|
690
690
|
/>
|
|
691
691
|
);
|
|
692
692
|
}
|
|
693
|
-
`}}}},nN={icon:{type:"SpsIcon",required:!0},size:"SpsIconSize"};function
|
|
693
|
+
`}}}},nN={icon:{type:"SpsIcon",required:!0},size:"SpsIconSize"};function Yt(e){const{className:t,"data-testid":n,icon:r,size:o=K.SpsIconSize.MEDIUM,unsafelyReplaceClassName:a,...l}=e,c=H(a||"sps-icon",`sps-icon-${r}`,`sps-icon--${o}`,e.onClick&&"interactive-icon",t);return s.createElement("i",{className:c,"aria-hidden":"true","data-testid":n,...l})}Object.assign(Yt,{props:nN,displayName:"SpsI"});const rN={borderless:"boolean",lean:"boolean",leaner:{type:"boolean",deprecated:!0},widthPx:"number",widthRem:"number"};function Kn(e){const{borderless:t,children:n,className:r,lean:o,leaner:a,style:l,unsafelyReplaceClassName:c,widthPx:p,widthRem:f,...m}=e;s.useEffect(()=>{a&&console.log(["The 'leaner' prop on SpsContentRowCol is deprecated. The padding for Content","Rows has been updated so the old 'lean' padding is the default, and the","'leaner' padding is enabled with 'lean'. This column will be displayed as","a new 'lean' column, but you should change the prop you're passing as well."].join(" "))},[a]);const u=H(c||"sps-content-row__col",t&&"sps-content-row__col--borderless",(o||a)&&"sps-content-row__col--lean",r),h=p?p/16:f,g=h?{...l,width:`${h}rem`}:l;return s.createElement("div",{...m,className:u,style:g},n)}Object.assign(Kn,{props:rN,displayName:"SpsContentRowCol"});const sN={};function po(e){const{children:t,className:n,"data-testid":r,unsafelyReplaceClassName:o,...a}=e,l=H(o||"sps-content-row__expansion",n);return s.createElement("div",{className:l,...a,"data-testid":`${r}__expansion`},t)}Object.assign(po,{props:sN,displayName:"SpsContentRowExpansion"});const oN={alternateLayout:"boolean",initiallyExpanded:"boolean",cardSpacing:"boolean",expanded:"boolean",onBeforeCollapsed:"() => boolean",onBeforeExpanded:"() => boolean",onSelectionChange:"ChangeEventHandler",onCollapsed:"() => void",onExpanded:"() => void",selectable:"boolean",selected:"boolean"};function Li(e){const{alternateLayout:t=!1,children:n,className:r,expanded:o,onBeforeCollapsed:a,onBeforeExpanded:l,onSelectionChange:c,onCollapsed:p,onExpanded:f,initiallyExpanded:m=!1,cardSpacing:u=!1,selectable:h=!1,selected:g,"data-testid":v,unsafelyReplaceClassName:w,...T}=e,{t:E}=s.useContext(Ke),[D,k]=s.useState(m),I=typeof o=="boolean"?o:D;function x(W){W.stopPropagation(),I&&(!a||a())?(k(!1),p&&p()):!I&&(!l||l())&&(k(!0),f&&f())}const F=()=>s.createElement(Jn,{checked:g,onChange:c}),L=()=>s.createElement("button",{type:"button",className:"sps-content-row__expand-btn",onClick:x,"aria-label":E(`design-system:contentRow.${I?"collapse":"expand"}`)},s.createElement(Yt,{icon:I?K.SpsIcon.MINUS_CIRCLE:K.SpsIcon.PLUS_CIRCLE})),C=H(w||"sps-content-row",I&&"sps-content-row--expanded",u&&"sps-content-row--card-spaced",g&&"sps-content-row--selected",t&&"sps-content-row--alternate-layout",r),[R,[O]]=Pt(n,[{type:Kn},{type:po}]);return s.createElement("div",{className:C,"data-testid":v,...T},s.createElement("div",{className:"sps-content-row__col-group","data-testid":`${v}__children`},h&&!t&&s.createElement(Kn,{widthPx:46},s.createElement(F,null)),O&&!t&&s.createElement(Kn,{widthPx:44},s.createElement(L,null)),O&&h&&t&&s.createElement(Kn,{widthPx:46},s.createElement("section",null,s.createElement(F,null)),s.createElement("section",null,s.createElement(L,null))),R),O)}Object.assign(Li,{props:oN,displayName:"SpsContentRow"});const Zu={basic:{label:"Content rows",examples:{basic:{react:y.code`
|
|
694
694
|
import {
|
|
695
695
|
SpsContentRow,
|
|
696
696
|
SpsContentRowCol,
|
|
@@ -1158,7 +1158,7 @@ Valid keys: `+JSON.stringify(Object.keys(L),null," "));var ne=le(Z,fe,ee,F,J+".
|
|
|
1158
1158
|
</>
|
|
1159
1159
|
)
|
|
1160
1160
|
}
|
|
1161
|
-
`}}}},
|
|
1161
|
+
`}}}},aN=hr.default||hr;function iN(){return new Array(7).fill(null)}function xd(e){const t=aN({year:e.year,month:e.month-1,date:1}),n=t.weekday(),r=t.daysInMonth(),o=Math.ceil((r+n)/7),a=o*7,l=new Array(o).fill(!0).map(iN);t.subtract(n,"days");for(let c=0;c<a;c+=1){const p=l[Math.floor(c/7)],f=c%7;p[f]=Object.freeze({year:t.year(),month:t.month()+1,date:t.date()}),f===6&&Object.freeze(p),t.add(1,"day")}return l}function kd(e){const[t,n]=s.useState(()=>xd(e));return s.useEffect(()=>{n(xd(e))},[e]),t}function Id(e){const[t,n]=s.useState(()=>X.toMoment(e));return s.useEffect(()=>n(X.toMoment(e)),[e]),t}const Md=hr.default||hr,St="sps-datepicker__calendar";function Fr({maxDate:e,selectedDate:t,selectedRange:n}){const r=n?X.nullifyInvalidDate(n[1])||X.nullifyInvalidDate(n[0]):null;return X.nullifyInvalidDate(t)||r||X.nullifyInvalidDate(e)||X.create()}function uo(e){const{children:t,className:n,isOpen:r,maxDate:o,minDate:a,onNewSelection:l,selectedDate:c,selectedRange:p,selectedPreset:f,showTwoMonths:m=!1,"data-testid":u,...h}=e,{t:g}=s.useContext(Ke),[v,w]=s.useState(()=>Fr(e)),[T,E]=s.useState(X.nextMonth({...v,date:15})),D=s.useMemo(()=>X.create(),[]);s.useEffect(()=>{if(p&&p[0]&&p[1]&&p[0].month!==v.month&&p[0].month!==T.month&&p[1].month!==v.month&&p[1].month!==T.month){const G=Fr(e);w(G),E(X.nextMonth({month:G.month,date:15,year:G.year}))}else if(p&&p[0]&&!p[1]&&p[0].month!==v.month&&p[0].month!==T.month){const G=Fr(e);w(G),E(X.nextMonth({month:G.month,date:15,year:G.year}))}else if(p&&!p[0]&&p[1]&&p[1].month!==v.month&&p[1].month!==T.month){const G=Fr(e);w(G),E(X.nextMonth({month:G.month,date:15,year:G.year}))}else w(Fr(e))},[c,p,o,r]);const k=Id(v),I=kd(v),x=Id(T),F=kd(T),[L,C]=s.useState();function R(){w(X.prevMonth({...v,date:15})),m&&E(X.prevMonth({...T,date:15}))}function O(){w(X.nextMonth({...v,date:15})),m&&E(X.nextMonth({...T,date:15}))}function W(G){G.target&&G.target.classList.contains(`${St}-day`)?m&&G.target.classList.contains(`${T.month}`)?C({...T,date:Number(G.target.textContent)}):C({...v,date:Number(G.target.textContent)}):(!G.target||!G.target.classList.contains(`${St}-row`))&&C(void 0)}function z(G){const j=`${St}-day`;return H(`${St}-cell`,G&&v&&G.month===v.month&&j,m&&G.month===T.month&&j,X.isSameDate(D,G)&&`${j}--current-day`,(X.isSameDate(G,c)&&X.isInRange(G,[a,o])!==!1||p&&X.isSameDate(G,p[0])||X.isInRange(G,p))&&`${j}--selected`,X.isInRange(G,[a,o])===!1&&`${j}--disabled`,p&&p[1]&&X.isSameDate(G,p[0])&&!X.isSameDate(G,p[1])&&`${j}--selection-start`,X.isInRange(G,p,!1)&&`${j}--selection-middle`,p&&X.isSameDate(G,p[1])&&!X.isSameDate(G,p[0])&&`${j}--selection-end`,p&&p[0]&&!p[1]&&(!a&&!o||X.isInRange(L,[a,o]))&&X.isInRange(G,[p[0],L],!1)&&`${j}--pending-selection`,f&&f==="After"&&p&&p[0]&&p[1]===null&&(!a&&!o||X.isInRange(G,[p[0],o]))&&X.isInRange(G,[p[0],{month:12,date:31,year:3e3}],!1)&&`${j}--selected`,f&&f==="Before"&&p&&p[0]===null&&p[1]&&(!a&&!o||X.isInRange(G,[a,p[1]]))&&X.isInRange(G,[{month:1,date:1,year:1900},p[1]])&&`${j}--selected`)}function M(G){G&&v&&G.month===v.month&&X.isInRange(G,[a,o])!==!1&&l(G),G&&m&&T&&G.month===T.month&&X.isInRange(G,[a,o])!==!1&&l(G)}const U=H(St,n);return v?s.createElement(s.Fragment,null,s.createElement("div",{"data-testid":`${u}`,className:U,...h,onMouseOver:W},s.createElement("div",{className:`${St}-head`},s.createElement("button",{"data-testid":`${u}_prev_month`,type:"button",tabIndex:-1,disabled:X.isSameMonth(v,a),title:g("design-system:datepicker.calendar.prevMonth"),className:"sps-datepicker__button sps-datepicker__button-previous-month",onClick:R},s.createElement("i",{className:"sps-icon sps-icon-chevron-left"})),s.createElement("span",{className:`${St}-head-label`},s.createElement("span",{className:`${St}-head-label-month`},k?k.format("MMMM"):""),s.createElement("span",{className:`${St}-head-label-year`},v.year)),!m&&s.createElement("button",{type:"button","data-testid":`${u}_next_month`,tabIndex:-1,disabled:X.isSameMonth(v,o),title:g("design-system:datepicker.calendar.nextMonth"),className:"sps-datepicker__button sps-datepicker__button-next-month",onClick:O},s.createElement("i",{className:"sps-icon sps-icon-chevron-right"}))),s.createElement("div",{className:`${St}-body`},s.createElement("div",{className:"sps-datepicker__calendar-row"},Md.weekdaysShort().map(G=>s.createElement("div",{key:G,className:"sps-datepicker__calendar-header-cell"},G))),I.map((G,j)=>s.createElement("div",{key:j,className:"sps-datepicker__calendar-row"},G.map((A,ee)=>s.createElement("div",{key:ee,className:z(A),onClick:()=>M(A),"data-testid":`${u}_${X.toString(A)}`},A?A.date:"")))))),m&&s.createElement("div",{"data-testid":`${u}`,className:U,...h,onMouseOver:W},s.createElement("div",{className:`${St}-head`},s.createElement("span",{className:`${St}-head-label`},s.createElement("span",{className:`${St}-head-label-month`},x?x.format("MMMM"):""),s.createElement("span",{className:`${St}-head-label-year`},T.year)),s.createElement("button",{type:"button","data-testid":`${u}_next_month`,tabIndex:-1,disabled:X.isSameMonth(T,o),title:g("design-system:datepicker.calendar.nextMonth"),className:"sps-datepicker__button sps-datepicker__button-next-month",onClick:O},s.createElement("i",{className:"sps-icon sps-icon-chevron-right"}))),s.createElement("div",{className:`${St}-body`},s.createElement("div",{className:"sps-datepicker__calendar-row"},Md.weekdaysShort().map(G=>s.createElement("div",{key:G,className:"sps-datepicker__calendar-header-cell"},G))),F.map((G,j)=>s.createElement("div",{key:j,className:"sps-datepicker__calendar-row"},G.map((A,ee)=>s.createElement("div",{key:ee,className:H(z(A),`${T.month.toString()}`),onClick:()=>M(A),"data-testid":`${u}_${X.toString(A)}`},A?A.date:""))))))):s.createElement(s.Fragment,null)}Object.assign(uo,{displayName:"SpsDatepickerCalendar"});const _d="sps-datepicker__popup",mo=s.forwardRef(({attachTo:e,children:t,className:n,isOpen:r,...o},a)=>{const l=a||s.useRef(null),c=Er("sps-datepicker-popup-portal"),p=s.useContext(Lt),[f]=r?Wn(l,e,K.Position.BOTTOM_LEFT,{altPosition:Ja(K.Position.BOTTOM_LEFT),...p}):[{}],m=H(_d,"z-stratum-dropdown",r&&`${_d}--open`,n);return c(s.createElement("div",{...o,className:m,ref:l,style:f},t))});Object.assign(mo,{displayName:"SpsDatepickerPopup"});const lN={disabled:"boolean",formMeta:"SpsFormFieldMeta<SimpleDate>",maxDate:"SimpleDate",minDate:"SimpleDate",onChange:"(newDate: SimpleDate) => void",value:"SimpleDate",format:"string"},Rd="sps-datepicker";function Pi({children:e,className:t,disabled:n,formMeta:r,id:o,maxDate:a,minDate:l,onChange:c,value:p,format:f,"data-testid":m,...u}){const{wrapperId:h,controlId:g}=vt(o,r),v=s.useRef(null),w=s.useRef(null),T=s.useRef(null),[E,D]=s.useState(X.toString(p,f)),{showPopup:k,doShowPopup:I,doHidePopup:x}=wr(v,w);function F(M){r&&(r.setValue(M),r.markAsDirty()),c&&c(M)}function L(M){F(M),D(X.toString(M,f)),T&&T.current&&T.current.focus()}function C(M){D(M.target.value);const U=X.createFrom(M.target.value,f);F(U)}function R(){x(),D(""),F()}function O(M){switch(M.key){case"Tab":x();break;case"Backspace":M.target.selectionStart===0&&p&&!Array.isArray(p)&&R();break}}const W=H(Rd,"sps-text-input",k&&`${Rd}--open`,t),z=s.useRef(!1);return s.useEffect(()=>{z.current?p?X.isValid(p)&&D(X.toString(p,f)):R():z.current=!0},[p,f]),s.createElement(s.Fragment,null,s.createElement(at,{id:h,className:W,formMeta:r,inputRef:T,focusInputOnClick:!0,ref:v},s.createElement("div",{className:H("sps-form-control",n&&"disabled")},s.createElement("i",{className:H("sps-text-input__icon","sps-icon","sps-icon-calendar-blank")}),s.createElement("input",{type:"text",ref:T,className:"sps-text-input__input",id:g,placeholder:(f==null?void 0:f.toUpperCase())||Sr,onChange:C,onClick:I,onFocus:I,onKeyDown:O,value:E,disabled:n,"data-testid":`${m}_date_input`,...u}),p&&!n&&s.createElement("i",{className:"sps-icon sps-icon-x-circle sps-form-control__clear-btn",onClick:R}))),s.createElement(mo,{isOpen:k,attachTo:v,ref:w},s.createElement(uo,{"data-testid":`${m}_calendar`,selectedDate:p,onNewSelection:L,minDate:l,maxDate:a})))}Object.assign(Pi,{props:lN,displayName:"SpsDatepicker"});const Xu={basic:{label:"Basic",examples:{basic:{react:y.code`
|
|
1162
1162
|
import {
|
|
1163
1163
|
useSpsForm,
|
|
1164
1164
|
SpsLabel,
|
|
@@ -1306,7 +1306,7 @@ Valid keys: `+JSON.stringify(Object.keys(L),null," "));var ne=le(Z,fe,ee,F,J+".
|
|
|
1306
1306
|
</div>
|
|
1307
1307
|
);
|
|
1308
1308
|
}
|
|
1309
|
-
`}}}},cN={disabled:"boolean",formMeta:"SpsFormFieldMeta<SimpleDateRange | DatePreset>",maxDate:"SimpleDate",minDate:"SimpleDate",onChange:'(newDateRange: SimpleDateRange | DatePreset | null, preset?: DatePreset["definition"]) => void',presets:"Array<DatePreset>",selectedPreset:"string",onPresetChange:"(newPreset?: string) => void",value:"SimpleDateRange | DatePreset",showTwoMonths:"boolean",format:"string"},
|
|
1309
|
+
`}}}},cN={disabled:"boolean",formMeta:"SpsFormFieldMeta<SimpleDateRange | DatePreset>",maxDate:"SimpleDate",minDate:"SimpleDate",onChange:'(newDateRange: SimpleDateRange | DatePreset | null, preset?: DatePreset["definition"]) => void',presets:"Array<DatePreset>",selectedPreset:"string",onPresetChange:"(newPreset?: string) => void",value:"SimpleDateRange | DatePreset",showTwoMonths:"boolean",format:"string"},Od="sps-datepicker",Va=[{definition:"P0D",label:"design-system:datepicker.preset.today"},{definition:"Before",label:"design-system:datepicker.preset.before"},{definition:"After",label:"design-system:datepicker.preset.after"},{definition:"P7D",label:"design-system:datepicker.preset.sevenDays"},{definition:"P30D",label:"design-system:datepicker.preset.thirtyDays"},{definition:"P60D",label:"design-system:datepicker.preset.sixtyDays"},{definition:"P90D",label:"design-system:datepicker.preset.ninetyDays"},{definition:"P1Y",label:"design-system:datepicker.preset.oneYear"}];function Ld(e,t=""){return e.find(n=>n.definition===t)}function dN(e,t){return e.length===t.length&&e.every((n,r)=>n.definition===t[r].definition&&n.label===t[r].label)}function Bi({children:e,className:t,disabled:n,formMeta:r,id:o,maxDate:a,minDate:l,onChange:c,presets:p=Va,selectedPreset:f,onPresetChange:m,value:u,showTwoMonths:h=!1,format:g,"data-testid":v,...w}){const{t:T}=s.useContext(Ke),{wrapperId:E,controlId:D}=vt(o,r),k=s.useRef(null),I=s.useRef(null),x=s.useRef(null),[F,L]=s.useState(Array.isArray(u)?X.toStringRange(u,g):""),[C,R]=s.useState(Ld(p,f)||null),[O,W]=s.useState(),{showPopup:z,doShowPopup:M,doHidePopup:U}=wr(k,x);function G(V,Z){r&&(r.setValue(V),r.markAsDirty()),c&&c(V,Z)}s.useEffect(()=>{R(Ld(p,f)||null)},[f]);function j(V){return V&&/^design-system:/.test(V.label)?T(V.label):(V==null?void 0:V.label)??""}function A(V){const Z=u||[];let J,ae=C;const te=ae?j(ae):"";te==="Before"?J=[null,V]:te==="After"?J=[V,null]:!Z[0]||Z[1]||X.isBefore(V,Z[0])?J=[V,null]:J=[Z[0],V],(J[0]&&J[1]||te==="Before"||te==="After")&&(U(!0),I&&I.current&&I.current.focus()),ae&&te!=="Before"&&te!=="After"&&(R(null),ae=null),G(J,ae==null?void 0:ae.definition),L(X.toStringRange(J,g)),W(void 0)}function ee(V){L(V.target.value);let Z=X.createRangeFrom(V.target.value,g),J=C;const ae=J?j(J):"";Array.isArray(Z)&&(Z[0]&&Z[1]&&(ae==="Before"||ae==="After")?(R(null),J=null):ae==="Before"&&Z[0]!==null?Z=[null,Z[0]]:ae==="After"&&Z[0]!==null&&(Z=[Z[0],null])),G(Z,J==null?void 0:J.definition),W(void 0)}function le(){L(""),G(),W(void 0),R(null)}function P(V){switch(V.key){case"Tab":U();break;case"Backspace":V.target.selectionStart===0&&u&&C&&le();break}}function Y(V){if(m&&(V==null?void 0:V.definition)!==f&&m(typeof(V==null?void 0:V.definition)=="string"?V==null?void 0:V.definition:""),!V){R(null),G();return}R(V);let Z=X.createRangeFromPreset(V,g);const J=V&&j(V),ae=X.getRangeSeparator(g);(J==="Before"||J==="After")&&u&&u[0]&&u[1]?Z=X.createRangeFrom(ae,g):J==="Before"?Z=X.createRangeFrom(`${ae}${X.toString(u&&(u[0]||u[1]),g)}`):J==="After"&&(Z=X.createRangeFrom(`${X.toString(u&&(u[0]||u[1]),g)}${ae}`)),JSON.stringify(u)!==JSON.stringify(Z)&&G(Z,V==null?void 0:V.definition)}s.useEffect(()=>{if(!u){R(null);return}if(!dN(p,Va)&&Array.isArray(u)){const V=X.toStringRange(u,g),Z=p.find(J=>V===X.toStringRange(X.createRangeFromPreset(J,g),g));Z?Y(Z):u[0]&&u[1]&&R(null)}},[u,g]),s.useEffect(()=>{const V=["Before","After"].includes(j(C));!u||C&&!V?L(""):Array.isArray(u)&&((!u[0]||!u[0].hasOwnProperty(Gr))&&(!u[1]||!u[1].hasOwnProperty(Gr))&&L(X.toStringRange(u,g)),C||W(void 0))},[u,C,g]);const se=H(Od,"sps-text-input",z&&`${Od}--open`,t);let re=F;const Q=X.getRangeSeparator(g);return C&&j(C)==="Before"&&F.startsWith(Q)?re=F.substring(1):C&&j(C)==="After"&&F.endsWith(Q)&&(re=F.substring(0,F.length-1)),s.createElement(s.Fragment,null,s.createElement(at,{id:E,className:se,formMeta:r,inputRef:I,focusInputOnClick:!0,ref:k},s.createElement("div",{className:H("sps-form-control",n&&"disabled")},s.createElement("i",{className:H("sps-text-input__icon","sps-icon","sps-icon-calendar")}),C&&s.createElement("div",{"data-testid":`${v}_selected_preset`,className:"sps-datepicker__selected-preset"},s.createElement("span",{className:"sps-tag sps-tag--info"},j(C))),s.createElement("input",{type:"text",ref:I,className:"sps-text-input__input","data-testid":`${v}_date_input`,id:D,placeholder:!F&&!C?(g==null?void 0:g.toUpperCase())||Sr:void 0,onChange:ee,onClick:M,onFocus:M,onKeyDown:P,value:re,disabled:n,...w}),u&&!n&&s.createElement("i",{className:"sps-icon sps-icon-x-circle sps-form-control__clear-btn",onClick:le}))),s.createElement(mo,{isOpen:z,attachTo:k,ref:x},s.createElement("div",{className:"sps-datepicker__presets"},s.createElement("fieldset",null,s.createElement("legend",{className:"sps-datepicker__presets-label"},T("design-system:datepicker.presetsLabel")),s.createElement("div",{className:"sps-custom-control sps-custom-radio sps-custom-control--no-error"},s.createElement("input",{"data-testid":`${v}_presets_custom_input`,type:"radio",id:`sps-date-range-picker-${E}__range-custom`,className:"sps-custom-control__input",checked:!C,name:`sps-date-range-picker-${E}__range`,onChange:()=>Y()}),s.createElement("label",{className:"sps-custom-control__label",htmlFor:`sps-date-range-picker-${E}__range-custom`},T("design-system:datepicker.preset.custom"))),p.map((V,Z)=>s.createElement("div",{key:j(V),className:"sps-custom-control sps-custom-radio sps-custom-control--no-error"},s.createElement("input",{type:"radio","data-testid":`${v}_preset_option_${V.label}`,id:`sps-date-range-picker-${E}__range-${Z}`,name:`sps-date-range-picker-${E}__range`,onChange:()=>Y(V),checked:C!=null&&C.definition?C.definition===V.definition:!1,className:"sps-custom-control__input"}),s.createElement("label",{className:"sps-custom-control__label",htmlFor:`sps-date-range-picker-${E}__range-${Z}`},j(V)))))),s.createElement(uo,{"data-testid":`${v}_calendar`,selectedRange:Array.isArray(u)?u:O,onNewSelection:A,minDate:l,maxDate:a,showTwoMonths:h,selectedPreset:C&&j(C),isOpen:z})))}Object.assign(Bi,{props:cN,displayName:"SpsDateRangePicker"});const Qu={basic:{label:"Basic",examples:{basic:{react:y.code`
|
|
1310
1310
|
import {
|
|
1311
1311
|
useSpsForm,
|
|
1312
1312
|
SpsLabel,
|
|
@@ -1479,7 +1479,7 @@ Valid keys: `+JSON.stringify(Object.keys(L),null," "));var ne=le(Z,fe,ee,F,J+".
|
|
|
1479
1479
|
</div>
|
|
1480
1480
|
);
|
|
1481
1481
|
}
|
|
1482
|
-
`}}}},pN={action:"SpsActionMethod",captionKey:"string",comparisonKey:"string",disabled:"boolean",formMeta:"SpsFormFieldMeta<any>",notClearable:"boolean",options:"Eventually<any[]> | (filter?: string) => Eventually<any[]>",onChange:"ChangeEventHandler",onOpen:"OnOpenHandler",placeholder:"string",searchDebounce:"number",searchPlaceholder:"string",tallOptionList:"boolean",textKey:"string",valueKey:"string",value:"any",zeroState:"string",autoFixWidth:"boolean",loading:"boolean",filterByTextAndCaptionKey:"boolean",maxHeightOptionListPx:"number",maxHeightOptionListRem:"number",disableOptionsMemoization:"boolean"},
|
|
1482
|
+
`}}}},pN={action:"SpsActionMethod",captionKey:"string",comparisonKey:"string",disabled:"boolean",formMeta:"SpsFormFieldMeta<any>",notClearable:"boolean",options:"Eventually<any[]> | (filter?: string) => Eventually<any[]>",onChange:"ChangeEventHandler",onOpen:"OnOpenHandler",placeholder:"string",searchDebounce:"number",searchPlaceholder:"string",tallOptionList:"boolean",textKey:"string",valueKey:"string",value:"any",zeroState:"string",autoFixWidth:"boolean",loading:"boolean",filterByTextAndCaptionKey:"boolean",maxHeightOptionListPx:"number",maxHeightOptionListRem:"number",disableOptionsMemoization:"boolean"},Yn=s.forwardRef((e,t)=>{const{action:n,autoFixWidth:r=!1,captionKey:o,className:a,comparisonKey:l,disabled:c,formControl:p,formMeta:f,id:m,notClearable:u,options:h,onChange:g,onClick:v,onOpen:w,placeholder:T,searchDebounce:E,searchPlaceholder:D="Search…",tallOptionList:k,textKey:I,valueKey:x,unsafelyReplaceClassName:F,value:L,zeroState:C,loading:R,filterByTextAndCaptionKey:O,maxHeightOptionListPx:W,maxHeightOptionListRem:z,"data-testid":M,disableOptionsMemoization:U,disableDefaultOptionsFiltering:G,...j}=e,A=f||p,{wrapperId:ee,controlId:le}=vt(m,A),P=s.useRef(null),Y=s.useRef(null),se=s.useRef(null),{t:re}=s.useContext(Ke),[Q,V]=Jt({isOpen:!1,value:L,text:"",keyDown:null,opensUpward:!1,optionIds:""});function Z(ve){V({value:ve,text:ve&&I?ve[I]:ve})}function J(ve){Z(ve);const Pe=ve&&x&&typeof ve=="object"?ve[x]:ve;A&&(A.setValue(Pe),A.markAsDirty()),g&&g(new Cn({value:Pe}))}s.useEffect(()=>{Z(L)},[L,I]);function ae(){J(void 0)}function te(){V({isOpen:!1})}function me(ve){ve.nativeEvent.stopImmediatePropagation(),c||V({isOpen:!Q.isOpen})}function ie(ve){c||(["Up","ArrowUp","Down","ArrowDown"," ","Spacebar"].indexOf(ve.key)>-1&&ve.preventDefault(),ve.persist(),V({keyDown:ve}))}function ne(ve){V({isOpen:ve})}function Ee(ve){V({opensUpward:ve})}function Me(ve){ve.detail!==ee&&V({isOpen:!1})}function it(ve){V({optionIds:new Array(ve).fill("").map((Pe,Je)=>`${ee}-options-option-${Je}`).join(",")})}s.useEffect(()=>(document.addEventListener("click",te),document.addEventListener("DropdownOpened",Me),()=>{document.removeEventListener("click",te),document.removeEventListener("DropdownOpened",Me)}),[]),s.useLayoutEffect(()=>{if(r&&se.current&&P.current){P.current.style.width="";const Pe=`${P.current.getBoundingClientRect().width+6}px`;P.current.style.width=Pe,se.current.style.width=Pe,se.current.style.maxWidth=Pe}}),Za(()=>{var ve;if(Q.isOpen){w==null||w();const Pe=document.createEvent("CustomEvent");Pe.initCustomEvent("DropdownOpened",!1,!1,ee),document.dispatchEvent(Pe)}else(ve=Y.current)==null||ve.focus()},[Q.isOpen]),s.useImperativeHandle(t,()=>({focus:()=>{var ve;(ve=Y.current)==null||ve.focus()}}));const ut=H(F||"sps-select",Q.isOpen&&"sps-select--open",Q.isOpen&&"z-stratum-dropdown",Q.opensUpward&&"sps-select--opens-upward",a),lt=Q.text||T||re("design-system:select.defaultPlaceholder");return s.createElement(at,{id:ee,className:ut,onKeyDown:ie,formControl:p,formMeta:f,ref:Y,role:"listbox","aria-owns":Q.optionIds,"data-testid":M,onClick:v,...j},s.createElement("div",{className:H("sps-select__dropctrl",c&&"disabled"),id:le,tabIndex:0,onClick:me,ref:se,title:lt,"data-testid":`${M}-dropctrl`},s.createElement("div",{className:"sps-select__dropctrl-content"},s.createElement("span",{className:H("sps-select__value",!Q.text&&"sps-select__value--placeholder"),"data-testid":`${M}-value`},lt),Q.value&&!u&&!c&&s.createElement("i",{className:"sps-icon sps-icon-x-circle sps-select__clear-btn",onClick:ae,"data-testid":`${M}-clear-value`}),s.createElement("i",{className:"sps-icon sps-icon-chevron-down"}))),s.createElement(ns,{id:`${ee}-options`,ref:P,attachTo:se,captionKey:o,comparisonKey:l,isOpen:Q.isOpen,keyDown:Q.keyDown,options:h,onOptionSelected:J,onPositionFlip:Ee,onSelfToggle:ne,searchDebounce:E,searchPlaceholder:D,selectedOption:Q.value,specialAction:n,tall:k,textKey:I,filterByTextAndCaptionKey:O,optionRole:"option",valueKey:x,onOptionListChanged:it,zeroState:C,ignoreWidthStyles:r,loading:R,maxHeightPx:W,maxHeightRem:z,disableOptionsMemoization:U,disableDefaultOptionsFiltering:G,"data-testid":`${M}-option-list`}))});Object.assign(Yn,{props:pN,displayName:"SpsSelect"});const em={general:{label:"General Usage",description:({NavigateTo:e})=>_.createElement(_.Fragment,null,_.createElement("h5",null,"Use a Select:"),_.createElement("ul",null,_.createElement("li",{className:"mb-2"},"When a list of predetermined values can be provided.")),_.createElement("h5",null,"Do Not Use a Select:"),_.createElement("ul",null,_.createElement("li",{className:"mb-2"},"When there are only two possible options. Consider"," ",_.createElement(e,{to:"checkbox"},"Checkboxes")," or"," ",_.createElement(e,{to:"radio-buttons"},"Radio Buttons")," insead."),_.createElement("li",{className:"mb-2"},"When it is ideal to display all available options without requiring a click. Consider"," ",_.createElement(e,{to:"checkbox"},"Checkboxes")," or"," ",_.createElement(e,{to:"radio-buttons"},"Radio Buttons")," insead.")),_.createElement("h5",null,"Using Selects in a Form"),_.createElement("p",null,"Reference the ",_.createElement(e,{to:"form"},"Forms")," page for guidelines for placing inputs in Form layouts"))},basic:{label:"Basic Select",description:()=>_.createElement("p",null,"Basic Selects include a label and dropdown menu containing a list of options. The user is allowed to make a single selection."),examples:{basic:{react:y.code`
|
|
1483
1483
|
import { SpsLabel, SpsSelect, useSpsForm } from "@spscommerce/ds-react";
|
|
1484
1484
|
function DemoComponent() {
|
|
1485
1485
|
const colors = ["red", "blue", "green"];
|
|
@@ -1497,7 +1497,7 @@ Valid keys: `+JSON.stringify(Object.keys(L),null," "));var ne=le(Z,fe,ee,F,J+".
|
|
|
1497
1497
|
</div>
|
|
1498
1498
|
)
|
|
1499
1499
|
}
|
|
1500
|
-
`},placeholderText:{description:()=>
|
|
1500
|
+
`},placeholderText:{description:()=>_.createElement(_.Fragment,null,_.createElement("h4",null,"Customizable Placeholder Text"),_.createElement("p",null,"Placeholder text can be customized to specifically reference the content in the dropdown menu.")),react:y.code`
|
|
1501
1501
|
import { SpsLabel, SpsSelect, useSpsForm } from "@spscommerce/ds-react";
|
|
1502
1502
|
function DemoComponent() {
|
|
1503
1503
|
const colors = ["red", "blue", "green"];
|
|
@@ -1519,7 +1519,7 @@ Valid keys: `+JSON.stringify(Object.keys(L),null," "));var ne=le(Z,fe,ee,F,J+".
|
|
|
1519
1519
|
</div>
|
|
1520
1520
|
)
|
|
1521
1521
|
}
|
|
1522
|
-
`},defaultSelection:{description:()=>
|
|
1522
|
+
`},defaultSelection:{description:()=>_.createElement(_.Fragment,null,_.createElement("h4",null,"Default Selection / No Clear Button"),_.createElement("p",null,"Selects can default to a selection in certain cases. Use Default Selections only when a selection is required and a default selection can be confidently made. Selects with a default selection do not have a clear option.")),react:y.code`
|
|
1523
1523
|
import { SpsLabel, SpsSelect, useSpsForm } from "@spscommerce/ds-react";
|
|
1524
1524
|
function DemoComponent() {
|
|
1525
1525
|
const colors = ["Small", "Medium", "Large"];
|
|
@@ -1541,7 +1541,7 @@ Valid keys: `+JSON.stringify(Object.keys(L),null," "));var ne=le(Z,fe,ee,F,J+".
|
|
|
1541
1541
|
</div>
|
|
1542
1542
|
)
|
|
1543
1543
|
}
|
|
1544
|
-
`},zeroState:{description:()=>
|
|
1544
|
+
`},zeroState:{description:()=>_.createElement(_.Fragment,null,_.createElement("h4",null,"Zero State / No Available Options"),_.createElement("p",null,"If no options are available in the dropdown menu, a zero state message appears. This option is most commonly used with the Select with Filter option.")),react:y.code`
|
|
1545
1545
|
import { SpsLabel, SpsSelect, useSpsForm } from "@spscommerce/ds-react";
|
|
1546
1546
|
function DemoComponent() {
|
|
1547
1547
|
const { formValue, formMeta, updateForm } = useSpsForm({
|
|
@@ -1561,7 +1561,7 @@ Valid keys: `+JSON.stringify(Object.keys(L),null," "));var ne=le(Z,fe,ee,F,J+".
|
|
|
1561
1561
|
</div>
|
|
1562
1562
|
)
|
|
1563
1563
|
}
|
|
1564
|
-
`},formHooks:{description:({NavigateTo:e})=>
|
|
1564
|
+
`},formHooks:{description:({NavigateTo:e})=>_.createElement(_.Fragment,null,_.createElement("h4",null,"Form Hooks"),_.createElement("p",null,"The ",_.createElement("code",null,"formMeta")," and ",_.createElement("code",null,"formValue")," props are used with the"," ",_.createElement("code",null,"useSpsForm")," hook. By using the ",_.createElement("code",null,"useSpsForm")," hook you can add validators, get the form value, update the form value, and more. The form is documented on the ",_.createElement(e,{to:"form"},"Forms")," page.")),react:y.code`
|
|
1565
1565
|
import { SpsLabel, SpsSelect, useSpsForm } from "@spscommerce/ds-react";
|
|
1566
1566
|
function DemoComponent() {
|
|
1567
1567
|
const colors = ["red", "blue", "green"];
|
|
@@ -1582,7 +1582,7 @@ Valid keys: `+JSON.stringify(Object.keys(L),null," "));var ne=le(Z,fe,ee,F,J+".
|
|
|
1582
1582
|
</div>
|
|
1583
1583
|
)
|
|
1584
1584
|
}
|
|
1585
|
-
`}}},filter:{label:"Select with Filter",description:()=>
|
|
1585
|
+
`}}},filter:{label:"Select with Filter",description:()=>_.createElement("p",null,"It can be helpful to add a filter field to dropdown menus that contain a large amount of options to aid the user in finding the option they need."),examples:{basic:{react:y.code`
|
|
1586
1586
|
import { SpsLabel, SpsSelect, useSpsForm } from "@spscommerce/ds-react";
|
|
1587
1587
|
function DemoComponent() {
|
|
1588
1588
|
function colorSearch(search) {
|
|
@@ -1605,7 +1605,7 @@ Valid keys: `+JSON.stringify(Object.keys(L),null," "));var ne=le(Z,fe,ee,F,J+".
|
|
|
1605
1605
|
</div>
|
|
1606
1606
|
)
|
|
1607
1607
|
}
|
|
1608
|
-
`},promise:{description:()=>
|
|
1608
|
+
`},promise:{description:()=>_.createElement(_.Fragment,null,_.createElement("h4",null,"Return a Promise"),_.createElement("p",null,"A promise should be used when the options are being returned asynchronously. A common use case for this is when the options are being returned as a result of an API call.")),react:y.code`
|
|
1609
1609
|
import { SpsLabel, SpsSelect, useSpsForm } from "@spscommerce/ds-react";
|
|
1610
1610
|
function DemoComponent() {
|
|
1611
1611
|
function colorSearch(search) {
|
|
@@ -1628,7 +1628,7 @@ Valid keys: `+JSON.stringify(Object.keys(L),null," "));var ne=le(Z,fe,ee,F,J+".
|
|
|
1628
1628
|
</div>
|
|
1629
1629
|
)
|
|
1630
1630
|
}
|
|
1631
|
-
`},debounce:{description:()=>
|
|
1631
|
+
`},debounce:{description:()=>_.createElement(_.Fragment,null,_.createElement("h4",null,"Debounce"),_.createElement("p",null,"When the options are a result of a search or are not available right away a debounce may be helpful. A debounce adds a delay to the option search so the search function is not getting called repeatedly.")),react:y.code`
|
|
1632
1632
|
import { SpsLabel, SpsSelect, useSpsForm } from "@spscommerce/ds-react";
|
|
1633
1633
|
function DemoComponent() {
|
|
1634
1634
|
function colorSearch(search) {
|
|
@@ -1652,7 +1652,7 @@ Valid keys: `+JSON.stringify(Object.keys(L),null," "));var ne=le(Z,fe,ee,F,J+".
|
|
|
1652
1652
|
</div>
|
|
1653
1653
|
)
|
|
1654
1654
|
}
|
|
1655
|
-
`}}},objectOptions:{label:"Object Options",description:()=>
|
|
1655
|
+
`}}},objectOptions:{label:"Object Options",description:()=>_.createElement("p",null,"The values in the select menu can be modified to provide more detail to the user or the system, when necessary."),examples:{basic:{react:y.code`
|
|
1656
1656
|
import { SpsLabel, SpsSelect, useSpsForm } from "@spscommerce/ds-react";
|
|
1657
1657
|
function DemoComponent() {
|
|
1658
1658
|
const sizes = [
|
|
@@ -1678,7 +1678,7 @@ Valid keys: `+JSON.stringify(Object.keys(L),null," "));var ne=le(Z,fe,ee,F,J+".
|
|
|
1678
1678
|
</div>
|
|
1679
1679
|
)
|
|
1680
1680
|
}
|
|
1681
|
-
`},extendedDetails:{description:()=>
|
|
1681
|
+
`},extendedDetails:{description:()=>_.createElement(_.Fragment,null,_.createElement("h4",null,"Extended Details"),_.createElement("p",null,"Extended details can be displayed in the dropdown menu. Only the primary detail is displayed as the selection.")),react:y.code`
|
|
1682
1682
|
import { SpsLabel, SpsSelect, useSpsForm } from "@spscommerce/ds-react";
|
|
1683
1683
|
function DemoComponent() {
|
|
1684
1684
|
const sizes = [
|
|
@@ -1705,7 +1705,7 @@ Valid keys: `+JSON.stringify(Object.keys(L),null," "));var ne=le(Z,fe,ee,F,J+".
|
|
|
1705
1705
|
</div>
|
|
1706
1706
|
)
|
|
1707
1707
|
}
|
|
1708
|
-
`}}},selectWithAction:{label:"Select with Action Button",description:()=>
|
|
1708
|
+
`}}},selectWithAction:{label:"Select with Action Button",description:()=>_.createElement("p",null,"A Text Button can be added to the bottom of the dropdown menu to provide a specific action."),examples:{basic:{react:y.code`
|
|
1709
1709
|
import { SpsSelect, useSpsAction } from "@spscommerce/ds-react";
|
|
1710
1710
|
function DemoComponent() {
|
|
1711
1711
|
const colors = ["red", "blue", "green"];
|
|
@@ -1731,7 +1731,7 @@ Valid keys: `+JSON.stringify(Object.keys(L),null," "));var ne=le(Z,fe,ee,F,J+".
|
|
|
1731
1731
|
</div>
|
|
1732
1732
|
)
|
|
1733
1733
|
}
|
|
1734
|
-
`}}},disabled:{label:"Disabled State",description:()=>
|
|
1734
|
+
`}}},disabled:{label:"Disabled State",description:()=>_.createElement("p",null,"In the disabled state, select inputs display the current selection or placeholder text, but cannot be interacted with."),examples:{basic:{react:y.code`
|
|
1735
1735
|
import { SpsLabel, SpsSelect, useSpsForm } from "@spscommerce/ds-react";
|
|
1736
1736
|
function DemoComponent() {
|
|
1737
1737
|
const colors = ["red", "blue", "green"];
|
|
@@ -1749,7 +1749,7 @@ Valid keys: `+JSON.stringify(Object.keys(L),null," "));var ne=le(Z,fe,ee,F,J+".
|
|
|
1749
1749
|
</div>
|
|
1750
1750
|
)
|
|
1751
1751
|
}
|
|
1752
|
-
`}}}},uN={formMeta:"SpsFormSetMeta<any>",stacked:"boolean"};function Tr({children:e,className:t,formArray:n,formGroup:r,formMeta:a,stacked:o,"data-testid":l,unsafelyReplaceClassName:c,...p}){const f=r||n,m=f||a,[u,h]=s.useState(!1);s.useEffect(()=>{if(m){const v=m.isFocused();!u&&v&&m.onFocus?m.onFocus():u&&!v&&m.onBlur&&m.onBlur(),h(v)}});const g=H(c||"sps-form-group",(f&&f.invalid||a&&(!a.isValid()||!a.contentsAreValid()))&&"sps-form-group--error",t);return s.createElement("div",{className:g,"data-testid":l,...p},s.createElement("div",{className:H("sps-input-group",o&&"sps-input-group--stacked")},e))}Object.assign(Tr,{props:uN,displayName:"SpsInputGroup"});const mN={disabled:"boolean",formMeta:"SpsFormFieldMeta<SimpleMomentRange>",maxDate:"SimpleDate",minDate:"SimpleDate",onChange:"(newMomentRange: SimpleMomentRange) => void",presets:"Array<DateTimePreset>",value:"SimpleMomentRange",showTwoMonths:"boolean",twentyFourHour:"boolean",format:"string"},Rd="sps-datepicker",Od=["AM","PM"],tm=[{definition:"P0D",label:"design-system:datepicker.preset.today"},{definition:"() => [null, {month: 1, date: 1, year: 3000}]",label:"design-system:datepicker.preset.before"},{definition:"() => [{month: 1, date: 1, year: 1990}, null]",label:"design-system:datepicker.preset.after"},{definition:"P7D",label:"design-system:datepicker.preset.sevenDays"},{definition:"P30D",label:"design-system:datepicker.preset.thirtyDays"},{definition:"P60D",label:"design-system:datepicker.preset.sixtyDays"},{definition:"P90D",label:"design-system:datepicker.preset.ninetyDays"},{definition:"P1Y",label:"design-system:datepicker.preset.oneYear"}];function Bi({className:e,disabled:t,formMeta:n,id:r,maxDate:a,minDate:o,onChange:l,presets:c=tm,value:p,showTwoMonths:f=!1,twentyFourHour:m=!1,format:u,"data-testid":h}){const{t:g}=s.useContext(He),{wrapperId:v,controlId:C}=yt(r&&`${r}_from`,n),{wrapperId:T,controlId:E}=yt(r&&`${r}_to`,n),N=s.useRef(null),x=s.useRef(null),k=s.useRef(null),I=s.useRef(null),A=s.useRef(null),R=Q.splitMomentInDateTimeParts(Array.isArray(p)?p[0]:void 0,m,u),w=Q.splitMomentInDateTimeParts(Array.isArray(p)?p[1]:void 0,m,u),[_,O]=s.useState(R[0]),[K,z]=s.useState(w[0]),[M,Y]=s.useState(R[1]),[W,j]=s.useState(w[1]),[B,re]=s.useState(R[2]),[de,L]=s.useState(w[2]),[G,se]=s.useState(null),{showPopup:ae,doShowPopup:ee,doHidePopup:F}=Cr(N,A);function J(ce){n&&(n.setValue(ce),n.markAsDirty()),l&&l(ce)}function Z(ce){return ce&&/^design-system:/.test(ce.label)?g(ce.label):ce.label}const ie=G&&Z(G)==="Before",te=G&&Z(G)==="After";function fe(ce){const xe=p||[],we=Q.toMoment(ce);let Ee;if(ie)Ee=[null,we],F(!0);else if(te)Ee=[we,null],F(!0);else if(!xe[0]||xe[1]||(we==null?void 0:we.isBefore(xe[0]))){let ke=parseInt((M==null?void 0:M.split(":")[0])||"0",10);!m&&ke===12&&(ke=0);const ft=parseInt((M==null?void 0:M.split(":")[1])||"0",10);we==null||we.set("hour",B==="PM"?12+ke:ke<12?ke:0),we==null||we.set("minute",ft),Ee=[we,null],se(null)}else{let ke=parseInt((W==null?void 0:W.split(":")[0])||"0",10);!m&&ke===12&&(ke=0);const ft=parseInt((W==null?void 0:W.split(":")[1])||"0",10);we==null||we.set("hour",de==="PM"?12+ke:ke),we==null||we.set("minute",ft),Ee=[xe[0],we],F(!0),se(null)}J(Ee)}function le(ce){O(ce.target.value)}function ne(ce){Q.validateTimeString(ce.target.value,m)&&Y(ce.target.value)}function Ce(ce,xe,we){const Ee=ce!=null?ce:_,ke=xe!=null?xe:M,ft=we!=null?we:B;if(Ee===R[0]&&ke===R[1]&&ft===R[2])return;const ct=Q.createFrom(Ee,u);if(ct&&Q.isValid(ct)){const Ke=Q.toMoment(ct);let dt=parseInt((ke==null?void 0:ke.split(":")[0])||"0",10);!m&&dt===12&&(dt=0);const kt=parseInt((ke==null?void 0:ke.split(":")[1])||"0",10);Ke==null||Ke.set("hour",ft==="PM"?12+dt:dt),Ke==null||Ke.set("minute",kt);const At=[Ke,(Ke==null?void 0:Ke.isBefore(p==null?void 0:p[1]))&&(p==null?void 0:p[1])||null];J(At)}}function Re(ce){Q.validateTimeString(ce!=null?ce:M,m)&&(Y(Q.padIncompleteTimeString(ce!=null?ce:M,m)),setTimeout(()=>Ce(void 0,ce,void 0),0))}function it(ce){re(ce.target.value)}function mt(ce){Q.validateTimeString(ce,m)&&(Y(ce),setTimeout(()=>Re(ce),0))}s.useEffect(()=>{B!==R[2]&&Ce()},[B]);function lt(ce){z(ce.target.value)}function ye(ce){Q.validateTimeString(ce.target.value,m)&&j(ce.target.value)}function Be(ce,xe,we){const Ee=ce!=null?ce:K,ke=xe!=null?xe:W,ft=we!=null?we:de;if(Ee===w[0]&&ke===w[1]&&ft===w[2])return;const ct=Q.createFrom(Ee,u);if(ct&&Q.isValid(ct)){const Ke=Q.toMoment(ct);let dt=parseInt((ke==null?void 0:ke.split(":")[0])||"0",10);!m&&dt===12&&(dt=0);const kt=parseInt((ke==null?void 0:ke.split(":")[1])||"0",10);Ke==null||Ke.set("hour",ft==="PM"?12+dt:dt),Ke==null||Ke.set("minute",kt);const At=[(Ke==null?void 0:Ke.isAfter(p==null?void 0:p[0]))&&(p==null?void 0:p[0])||null,Ke];J(At)}}function Ze(ce){Q.validateTimeString(ce!=null?ce:W,m)&&(j(Q.padIncompleteTimeString(ce!=null?ce:W,m)),setTimeout(()=>Be(void 0,ce,void 0),0))}function he(ce){L(ce.target.value)}function We(ce){Q.validateTimeString(ce,m)&&(j(ce),setTimeout(()=>Ze(ce),0))}s.useEffect(()=>{de!==w[2]&&Be()},[de]);function Ae(){J([null,null]),se(null)}function Tt(ce){return function(xe){switch(xe.key){case"Tab":F();break;case"Backspace":xe.target.selectionStart===0&&p&&!Array.isArray(p)&&Ae();break;case"Enter":ce==="from"?Ce():ce==="to"&&Be();break}}}function Ye(ce){if(!ce){se(null),J([null,null]);return}se(ce);const xe=Q.createDateTimeRangeFromPreset(ce);ce&&Z(ce)==="Before"?!p||Array.isArray(p)&&p[0]&&p[1]?J([null,null]):Array.isArray(p)&&p[0]?J([null,Q.toMoment(Q.createFrom(p[0],u))]):Array.isArray(p)&&p[1]&&J([null,Q.toMoment(Q.createFrom(p[1],u))]):ce&&Z(ce)==="After"?!p||Array.isArray(p)&&p[0]&&p[1]?J([null,null]):Array.isArray(p)&&p[0]?J([Q.toMoment(Q.createFrom(p[0],u)),null]):Array.isArray(p)&&p[1]&&J([Q.toMoment(Q.createFrom(p[1],u)),null]):JSON.stringify(p)!==JSON.stringify(xe)&&J([xe[0],xe[1]])}s.useEffect(()=>{if(!!p&&Array.isArray(p)){if(p[0]&&!p[1]){const ce=c.find(xe=>Z(xe)==="After");ce&&Ye(ce)}else if(!p[0]&&p[1]){const ce=c.find(xe=>Z(xe)==="Before");ce&&Ye(ce)}else if(p[0]&&p[1]){const ce=Q.toDateTimeStringRange(p,m,u),xe=c.find(we=>ce===Q.toDateTimeStringRange(Q.createDateTimeRangeFromPreset(we),m,u));xe&&Ye(xe)}}},[]),s.useEffect(()=>{R[0]?O(R[0]):O(""),R[1]?Y(R[1]):Y(m?"00:00":"12:00"),m||(R[2]?re(R[2]):re("AM")),w[0]?z(w[0]):z(""),w[1]?j(w[1]):j(m?"00:00":"12:00"),m||(w[2]?L(w[2]):L("AM"))},[R[0],R[1],R[2],w[0],w[1],w[2],m]);const Qe=H(Rd,"sps-text-input",ae&&`${Rd}--open`,e);return s.createElement(s.Fragment,null,s.createElement("div",{className:H("sps-datetime-range-picker")},s.createElement("div",{className:H("sps-datetime-range-picker__pair")},s.createElement(ot,{id:v,className:Qe,formMeta:n,inputRef:x,focusInputOnClick:!0,ref:N},s.createElement("div",{className:H("sps-form-control",t&&"disabled")},s.createElement("i",{className:H("sps-text-input__icon","sps-icon","sps-icon-calendar")}),G&&s.createElement("div",{"data-testid":`${h}_selected_preset`,className:"sps-datepicker__selected-preset"},s.createElement("span",{className:"sps-tag sps-tag--info"},Z(G))),s.createElement("input",{type:"text",ref:x,className:"sps-text-input__input","data-testid":`${h}_from_date_input`,id:C,placeholder:!_&&!G?(u==null?void 0:u.toUpperCase())||gr:ie?w[0]:te?R[0]:void 0,onChange:le,onClick:ee,onFocus:ee,onBlur:()=>Ce(),onKeyDown:Tt("from"),value:G?"":_,disabled:t}),p&&!t&&s.createElement("i",{className:"sps-icon sps-icon-x-circle sps-form-control__clear-btn",onClick:Ae}))),!G&&!m?s.createElement(Tr,null,s.createElement(qt,{className:"sps-time-input",placeholder:"12:00",suggestions:Do,zeroState:"Custom time",value:M,onChange:ne,onBlur:()=>Re(),onSelectionChange:mt,disabled:t,inputNotClearable:!0,autoFocusOnSelection:!0}),s.createElement(jn,{options:Od,value:B,onChange:it,disabled:t,notClearable:!0})):s.createElement(qt,{className:"sps-time-input",placeholder:"00:00",suggestions:No,zeroState:"Custom time",value:M,onChange:ne,onBlur:()=>Re(),onSelectionChange:mt,disabled:t,inputNotClearable:!0,autoFocusOnSelection:!0})),!G&&s.createElement("span",{className:H("sps-datepicker__to")},"to"),!G&&s.createElement("div",{className:H("sps-datetime-range-picker__pair")},s.createElement(ot,{id:T,className:Qe,formMeta:n,inputRef:I,focusInputOnClick:!0,ref:k},s.createElement("div",{className:H("sps-form-control",t&&"disabled")},s.createElement("i",{className:H("sps-text-input__icon","sps-icon","sps-icon-calendar")}),G&&s.createElement("div",{"data-testid":`${h}_selected_preset`,className:"sps-datepicker__selected-preset"},s.createElement("span",{className:"sps-tag sps-tag--info"},Z(G))),s.createElement("input",{type:"text",ref:I,className:"sps-text-input__input","data-testid":`${h}_to_date_input`,id:E,placeholder:!K&&!G?(u==null?void 0:u.toUpperCase())||gr:void 0,onChange:lt,onClick:ee,onFocus:ee,onKeyDown:Tt("to"),onBlur:()=>Be(),value:K,disabled:t}),p&&!t&&s.createElement("i",{className:"sps-icon sps-icon-x-circle sps-form-control__clear-btn",onClick:Ae}))),m?s.createElement(qt,{className:"sps-time-input",placeholder:"00:00",suggestions:No,zeroState:"Custom time",value:W,onChange:ye,onBlur:()=>Ze(),onSelectionChange:We,disabled:t,inputNotClearable:!0,autoFocusOnSelection:!0}):s.createElement(Tr,null,s.createElement(qt,{className:"sps-time-input",placeholder:"12:00",suggestions:Do,zeroState:"Custom time",value:W,onChange:ye,onBlur:()=>Ze(),onSelectionChange:We,disabled:t,inputNotClearable:!0,autoFocusOnSelection:!0}),s.createElement(jn,{options:Od,value:de,onChange:he,disabled:t,notClearable:!0})))),s.createElement(fa,{isOpen:ae,attachTo:N,ref:A},s.createElement("div",{className:"sps-datepicker__presets"},s.createElement("fieldset",null,s.createElement("legend",{className:"sps-datepicker__presets-label"},g("design-system:datepicker.presetsLabel")),s.createElement("div",{className:"sps-custom-control sps-custom-radio sps-custom-control--no-error"},s.createElement("input",{"data-testid":`${h}_presets_custom_input`,type:"radio",id:`sps-date-range-picker-${v}__range-custom`,className:"sps-custom-control__input",checked:!G,name:`sps-date-range-picker-${v}__range`,onChange:()=>Ye()}),s.createElement("label",{className:"sps-custom-control__label",htmlFor:`sps-date-range-picker-${v}__range-custom`},g("design-system:datepicker.preset.custom"))),c.map((ce,xe)=>s.createElement("div",{key:Z(ce),className:"sps-custom-control sps-custom-radio sps-custom-control--no-error"},s.createElement("input",{type:"radio","data-testid":`${h}_preset_option_${ce.label}`,id:`sps-date-range-picker-${v}__range-${xe}`,name:`sps-date-range-picker-${v}__range`,onChange:()=>Ye(ce),checked:G!=null&&G.definition?G.definition===ce.definition:!1,className:"sps-custom-control__input"}),s.createElement("label",{className:"sps-custom-control__label",htmlFor:`sps-date-range-picker-${v}__range-${xe}`},Z(ce)))))),s.createElement(ma,{"data-testid":`${h}_calendar`,selectedRange:Array.isArray(p)?[Q.createFrom(p[0],u),Q.createFrom(p[1],u)]:void 0,onNewSelection:fe,minDate:o,maxDate:a,showTwoMonths:f,selectedPreset:G&&Z(G)})))}Object.assign(Bi,{props:mN,displayName:"SpsDateTimeRangePicker"});const nm={basic:{label:"Basic",examples:{basic:{react:y.code`
|
|
1752
|
+
`}}}},uN={formMeta:"SpsFormSetMeta<any>",stacked:"boolean"};function yr({children:e,className:t,formArray:n,formGroup:r,formMeta:o,stacked:a,"data-testid":l,unsafelyReplaceClassName:c,...p}){const f=r||n,m=f||o,[u,h]=s.useState(!1);s.useEffect(()=>{if(m){const v=m.isFocused();!u&&v&&m.onFocus?m.onFocus():u&&!v&&m.onBlur&&m.onBlur(),h(v)}});const g=H(c||"sps-form-group",(f&&f.invalid||o&&(!o.isValid()||!o.contentsAreValid()))&&"sps-form-group--error",t);return s.createElement("div",{className:g,"data-testid":l,...p},s.createElement("div",{className:H("sps-input-group",a&&"sps-input-group--stacked")},e))}Object.assign(yr,{props:uN,displayName:"SpsInputGroup"});const mN={disabled:"boolean",formMeta:"SpsFormFieldMeta<SimpleMomentRange>",maxDate:"SimpleDate",minDate:"SimpleDate",onChange:"(newMomentRange: SimpleMomentRange) => void",presets:"Array<DateTimePreset>",value:"SimpleMomentRange",showTwoMonths:"boolean",twentyFourHour:"boolean",format:"string"},Pd="sps-datepicker",Bd=["AM","PM"],tm=[{definition:"P0D",label:"design-system:datepicker.preset.today"},{definition:"() => [null, {month: 1, date: 1, year: 3000}]",label:"design-system:datepicker.preset.before"},{definition:"() => [{month: 1, date: 1, year: 1990}, null]",label:"design-system:datepicker.preset.after"},{definition:"P7D",label:"design-system:datepicker.preset.sevenDays"},{definition:"P30D",label:"design-system:datepicker.preset.thirtyDays"},{definition:"P60D",label:"design-system:datepicker.preset.sixtyDays"},{definition:"P90D",label:"design-system:datepicker.preset.ninetyDays"},{definition:"P1Y",label:"design-system:datepicker.preset.oneYear"}];function Ai({className:e,disabled:t,formMeta:n,id:r,maxDate:o,minDate:a,onChange:l,presets:c=tm,value:p,showTwoMonths:f=!1,twentyFourHour:m=!1,format:u,"data-testid":h}){const{t:g}=s.useContext(Ke),{wrapperId:v,controlId:w}=vt(r&&`${r}_from`,n),{wrapperId:T,controlId:E}=vt(r&&`${r}_to`,n),D=s.useRef(null),k=s.useRef(null),I=s.useRef(null),x=s.useRef(null),F=s.useRef(null),L=X.splitMomentInDateTimeParts(Array.isArray(p)?p[0]:void 0,m,u),C=X.splitMomentInDateTimeParts(Array.isArray(p)?p[1]:void 0,m,u),[R,O]=s.useState(L[0]),[W,z]=s.useState(C[0]),[M,U]=s.useState(L[1]),[G,j]=s.useState(C[1]),[A,ee]=s.useState(L[2]),[le,P]=s.useState(C[2]),[Y,se]=s.useState(null),{showPopup:re,doShowPopup:Q,doHidePopup:V}=wr(D,F);function Z(de){n&&(n.setValue(de),n.markAsDirty()),l&&l(de)}function J(de){return de&&/^design-system:/.test(de.label)?g(de.label):de.label}const ae=Y&&J(Y)==="Before",te=Y&&J(Y)==="After";function me(de){const Re=p||[],ke=X.toMoment(de);let Te;if(ae)Te=[null,ke],V(!0);else if(te)Te=[ke,null],V(!0);else if(!Re[0]||Re[1]||ke!=null&&ke.isBefore(Re[0])){let De=parseInt((M==null?void 0:M.split(":")[0])||"0",10);!m&&De===12&&(De=0);const mt=parseInt((M==null?void 0:M.split(":")[1])||"0",10);ke==null||ke.set("hour",A==="PM"?12+De:De<12?De:0),ke==null||ke.set("minute",mt),Te=[ke,null],se(null)}else{let De=parseInt((G==null?void 0:G.split(":")[0])||"0",10);!m&&De===12&&(De=0);const mt=parseInt((G==null?void 0:G.split(":")[1])||"0",10);ke==null||ke.set("hour",le==="PM"?12+De:De),ke==null||ke.set("minute",mt),Te=[Re[0],ke],V(!0),se(null)}Z(Te)}function ie(de){O(de.target.value)}function ne(de){X.validateTimeString(de.target.value,m)&&U(de.target.value)}function Ee(de,Re,ke){const Te=R,De=Re??M,mt=A;if(Te===L[0]&&De===L[1]&&mt===L[2])return;const ct=X.createFrom(Te,u);if(ct&&X.isValid(ct)){const $e=X.toMoment(ct);let dt=parseInt((De==null?void 0:De.split(":")[0])||"0",10);!m&&dt===12&&(dt=0);const xt=parseInt((De==null?void 0:De.split(":")[1])||"0",10);$e==null||$e.set("hour",mt==="PM"?12+dt:dt),$e==null||$e.set("minute",xt);const Bt=[$e,($e==null?void 0:$e.isBefore(p==null?void 0:p[1]))&&(p==null?void 0:p[1])||null];Z(Bt)}}function Me(de){X.validateTimeString(de??M,m)&&(U(X.padIncompleteTimeString(de??M,m)),setTimeout(()=>Ee(void 0,de),0))}function it(de){ee(de.target.value)}function ut(de){X.validateTimeString(de,m)&&(U(de),setTimeout(()=>Me(de),0))}s.useEffect(()=>{A!==L[2]&&Ee()},[A]);function lt(de){z(de.target.value)}function ve(de){X.validateTimeString(de.target.value,m)&&j(de.target.value)}function Pe(de,Re,ke){const Te=W,De=Re??G,mt=le;if(Te===C[0]&&De===C[1]&&mt===C[2])return;const ct=X.createFrom(Te,u);if(ct&&X.isValid(ct)){const $e=X.toMoment(ct);let dt=parseInt((De==null?void 0:De.split(":")[0])||"0",10);!m&&dt===12&&(dt=0);const xt=parseInt((De==null?void 0:De.split(":")[1])||"0",10);$e==null||$e.set("hour",mt==="PM"?12+dt:dt),$e==null||$e.set("minute",xt);const Bt=[($e==null?void 0:$e.isAfter(p==null?void 0:p[0]))&&(p==null?void 0:p[0])||null,$e];Z(Bt)}}function Je(de){X.validateTimeString(de??G,m)&&(j(X.padIncompleteTimeString(de??G,m)),setTimeout(()=>Pe(void 0,de),0))}function fe(de){P(de.target.value)}function He(de){X.validateTimeString(de,m)&&(j(de),setTimeout(()=>Je(de),0))}s.useEffect(()=>{le!==C[2]&&Pe()},[le]);function Be(){Z([null,null]),se(null)}function yt(de){return function(Re){switch(Re.key){case"Tab":V();break;case"Backspace":Re.target.selectionStart===0&&p&&!Array.isArray(p)&&Be();break;case"Enter":de==="from"?Ee():de==="to"&&Pe();break}}}function Ge(de){if(!de){se(null),Z([null,null]);return}se(de);const Re=X.createDateTimeRangeFromPreset(de);de&&J(de)==="Before"?!p||Array.isArray(p)&&p[0]&&p[1]?Z([null,null]):Array.isArray(p)&&p[0]?Z([null,X.toMoment(X.createFrom(p[0],u))]):Array.isArray(p)&&p[1]&&Z([null,X.toMoment(X.createFrom(p[1],u))]):de&&J(de)==="After"?!p||Array.isArray(p)&&p[0]&&p[1]?Z([null,null]):Array.isArray(p)&&p[0]?Z([X.toMoment(X.createFrom(p[0],u)),null]):Array.isArray(p)&&p[1]&&Z([X.toMoment(X.createFrom(p[1],u)),null]):JSON.stringify(p)!==JSON.stringify(Re)&&Z([Re[0],Re[1]])}s.useEffect(()=>{if(p&&Array.isArray(p)){if(p[0]&&!p[1]){const de=c.find(Re=>J(Re)==="After");de&&Ge(de)}else if(!p[0]&&p[1]){const de=c.find(Re=>J(Re)==="Before");de&&Ge(de)}else if(p[0]&&p[1]){const de=X.toDateTimeStringRange(p,m,u),Re=c.find(ke=>de===X.toDateTimeStringRange(X.createDateTimeRangeFromPreset(ke),m,u));Re&&Ge(Re)}}},[]),s.useEffect(()=>{L[0]?O(L[0]):O(""),L[1]?U(L[1]):U(m?"00:00":"12:00"),m||(L[2]?ee(L[2]):ee("AM")),C[0]?z(C[0]):z(""),C[1]?j(C[1]):j(m?"00:00":"12:00"),m||(C[2]?P(C[2]):P("AM"))},[L[0],L[1],L[2],C[0],C[1],C[2],m]);const Xe=H(Pd,"sps-text-input",re&&`${Pd}--open`,e);return s.createElement(s.Fragment,null,s.createElement("div",{className:H("sps-datetime-range-picker")},s.createElement("div",{className:H("sps-datetime-range-picker__pair")},s.createElement(at,{id:v,className:Xe,formMeta:n,inputRef:k,focusInputOnClick:!0,ref:D},s.createElement("div",{className:H("sps-form-control",t&&"disabled")},s.createElement("i",{className:H("sps-text-input__icon","sps-icon","sps-icon-calendar")}),Y&&s.createElement("div",{"data-testid":`${h}_selected_preset`,className:"sps-datepicker__selected-preset"},s.createElement("span",{className:"sps-tag sps-tag--info"},J(Y))),s.createElement("input",{type:"text",ref:k,className:"sps-text-input__input","data-testid":`${h}_from_date_input`,id:w,placeholder:!R&&!Y?(u==null?void 0:u.toUpperCase())||Sr:ae?C[0]:te?L[0]:void 0,onChange:ie,onClick:Q,onFocus:Q,onBlur:()=>Ee(),onKeyDown:yt("from"),value:Y?"":R,disabled:t}),p&&!t&&s.createElement("i",{className:"sps-icon sps-icon-x-circle sps-form-control__clear-btn",onClick:Be}))),!Y&&!m?s.createElement(yr,null,s.createElement(zt,{className:"sps-time-input",placeholder:"12:00",suggestions:wa,zeroState:"Custom time",value:M,onChange:ne,onBlur:()=>Me(),onSelectionChange:ut,disabled:t,inputNotClearable:!0,autoFocusOnSelection:!0}),s.createElement(Yn,{options:Bd,value:A,onChange:it,disabled:t,notClearable:!0})):s.createElement(zt,{className:"sps-time-input",placeholder:"00:00",suggestions:Ca,zeroState:"Custom time",value:M,onChange:ne,onBlur:()=>Me(),onSelectionChange:ut,disabled:t,inputNotClearable:!0,autoFocusOnSelection:!0})),!Y&&s.createElement("span",{className:H("sps-datepicker__to")},"to"),!Y&&s.createElement("div",{className:H("sps-datetime-range-picker__pair")},s.createElement(at,{id:T,className:Xe,formMeta:n,inputRef:x,focusInputOnClick:!0,ref:I},s.createElement("div",{className:H("sps-form-control",t&&"disabled")},s.createElement("i",{className:H("sps-text-input__icon","sps-icon","sps-icon-calendar")}),Y&&s.createElement("div",{"data-testid":`${h}_selected_preset`,className:"sps-datepicker__selected-preset"},s.createElement("span",{className:"sps-tag sps-tag--info"},J(Y))),s.createElement("input",{type:"text",ref:x,className:"sps-text-input__input","data-testid":`${h}_to_date_input`,id:E,placeholder:!W&&!Y?(u==null?void 0:u.toUpperCase())||Sr:void 0,onChange:lt,onClick:Q,onFocus:Q,onKeyDown:yt("to"),onBlur:()=>Pe(),value:W,disabled:t}),p&&!t&&s.createElement("i",{className:"sps-icon sps-icon-x-circle sps-form-control__clear-btn",onClick:Be}))),m?s.createElement(zt,{className:"sps-time-input",placeholder:"00:00",suggestions:Ca,zeroState:"Custom time",value:G,onChange:ve,onBlur:()=>Je(),onSelectionChange:He,disabled:t,inputNotClearable:!0,autoFocusOnSelection:!0}):s.createElement(yr,null,s.createElement(zt,{className:"sps-time-input",placeholder:"12:00",suggestions:wa,zeroState:"Custom time",value:G,onChange:ve,onBlur:()=>Je(),onSelectionChange:He,disabled:t,inputNotClearable:!0,autoFocusOnSelection:!0}),s.createElement(Yn,{options:Bd,value:le,onChange:fe,disabled:t,notClearable:!0})))),s.createElement(mo,{isOpen:re,attachTo:D,ref:F},s.createElement("div",{className:"sps-datepicker__presets"},s.createElement("fieldset",null,s.createElement("legend",{className:"sps-datepicker__presets-label"},g("design-system:datepicker.presetsLabel")),s.createElement("div",{className:"sps-custom-control sps-custom-radio sps-custom-control--no-error"},s.createElement("input",{"data-testid":`${h}_presets_custom_input`,type:"radio",id:`sps-date-range-picker-${v}__range-custom`,className:"sps-custom-control__input",checked:!Y,name:`sps-date-range-picker-${v}__range`,onChange:()=>Ge()}),s.createElement("label",{className:"sps-custom-control__label",htmlFor:`sps-date-range-picker-${v}__range-custom`},g("design-system:datepicker.preset.custom"))),c.map((de,Re)=>s.createElement("div",{key:J(de),className:"sps-custom-control sps-custom-radio sps-custom-control--no-error"},s.createElement("input",{type:"radio","data-testid":`${h}_preset_option_${de.label}`,id:`sps-date-range-picker-${v}__range-${Re}`,name:`sps-date-range-picker-${v}__range`,onChange:()=>Ge(de),checked:Y!=null&&Y.definition?Y.definition===de.definition:!1,className:"sps-custom-control__input"}),s.createElement("label",{className:"sps-custom-control__label",htmlFor:`sps-date-range-picker-${v}__range-${Re}`},J(de)))))),s.createElement(uo,{"data-testid":`${h}_calendar`,selectedRange:Array.isArray(p)?[X.createFrom(p[0],u),X.createFrom(p[1],u)]:void 0,onNewSelection:me,minDate:a,maxDate:o,showTwoMonths:f,selectedPreset:Y&&J(Y)})))}Object.assign(Ai,{props:mN,displayName:"SpsDateTimeRangePicker"});const nm={basic:{label:"Basic",examples:{basic:{react:y.code`
|
|
1753
1753
|
import {
|
|
1754
1754
|
useSpsForm,
|
|
1755
1755
|
SpsLabel,
|
|
@@ -1897,20 +1897,20 @@ Valid keys: `+JSON.stringify(Object.keys(L),null," "));var ne=le(Z,fe,ee,F,J+".
|
|
|
1897
1897
|
</>
|
|
1898
1898
|
);
|
|
1899
1899
|
}
|
|
1900
|
-
`}}}};function
|
|
1901
|
-
[`+
|
|
1900
|
+
`}}}};function Zt(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var ga={exports:{}},Ad;function un(){return Ad||(Ad=1,function(e,t){(function(n,r){e.exports=r()})(qt,function(){var n;function r(){return n.apply(null,arguments)}function o(i){n=i}function a(i){return i instanceof Array||Object.prototype.toString.call(i)==="[object Array]"}function l(i){return i!=null&&Object.prototype.toString.call(i)==="[object Object]"}function c(i,d){return Object.prototype.hasOwnProperty.call(i,d)}function p(i){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(i).length===0;var d;for(d in i)if(c(i,d))return!1;return!0}function f(i){return i===void 0}function m(i){return typeof i=="number"||Object.prototype.toString.call(i)==="[object Number]"}function u(i){return i instanceof Date||Object.prototype.toString.call(i)==="[object Date]"}function h(i,d){var S=[],b,N=i.length;for(b=0;b<N;++b)S.push(d(i[b],b));return S}function g(i,d){for(var S in d)c(d,S)&&(i[S]=d[S]);return c(d,"toString")&&(i.toString=d.toString),c(d,"valueOf")&&(i.valueOf=d.valueOf),i}function v(i,d,S,b){return zl(i,d,S,b,!0).utc()}function w(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function T(i){return i._pf==null&&(i._pf=w()),i._pf}var E;Array.prototype.some?E=Array.prototype.some:E=function(i){var d=Object(this),S=d.length>>>0,b;for(b=0;b<S;b++)if(b in d&&i.call(this,d[b],b,d))return!0;return!1};function D(i){var d=null,S=!1,b=i._d&&!isNaN(i._d.getTime());if(b&&(d=T(i),S=E.call(d.parsedDateParts,function(N){return N!=null}),b=d.overflow<0&&!d.empty&&!d.invalidEra&&!d.invalidMonth&&!d.invalidWeekday&&!d.weekdayMismatch&&!d.nullInput&&!d.invalidFormat&&!d.userInvalidated&&(!d.meridiem||d.meridiem&&S),i._strict&&(b=b&&d.charsLeftOver===0&&d.unusedTokens.length===0&&d.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(i))i._isValid=b;else return b;return i._isValid}function k(i){var d=v(NaN);return i!=null?g(T(d),i):T(d).userInvalidated=!0,d}var I=r.momentProperties=[],x=!1;function F(i,d){var S,b,N,B=I.length;if(f(d._isAMomentObject)||(i._isAMomentObject=d._isAMomentObject),f(d._i)||(i._i=d._i),f(d._f)||(i._f=d._f),f(d._l)||(i._l=d._l),f(d._strict)||(i._strict=d._strict),f(d._tzm)||(i._tzm=d._tzm),f(d._isUTC)||(i._isUTC=d._isUTC),f(d._offset)||(i._offset=d._offset),f(d._pf)||(i._pf=T(d)),f(d._locale)||(i._locale=d._locale),B>0)for(S=0;S<B;S++)b=I[S],N=d[b],f(N)||(i[b]=N);return i}function L(i){F(this,i),this._d=new Date(i._d!=null?i._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),x===!1&&(x=!0,r.updateOffset(this),x=!1)}function C(i){return i instanceof L||i!=null&&i._isAMomentObject!=null}function R(i){r.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+i)}function O(i,d){var S=!0;return g(function(){if(r.deprecationHandler!=null&&r.deprecationHandler(null,i),S){var b=[],N,B,q,ue=arguments.length;for(B=0;B<ue;B++){if(N="",typeof arguments[B]=="object"){N+=`
|
|
1901
|
+
[`+B+"] ";for(q in arguments[0])c(arguments[0],q)&&(N+=q+": "+arguments[0][q]+", ");N=N.slice(0,-2)}else N=arguments[B];b.push(N)}R(i+`
|
|
1902
1902
|
Arguments: `+Array.prototype.slice.call(b).join("")+`
|
|
1903
|
-
`+new Error().stack),S=!1}return d.apply(this,arguments)},d)}var K={};function z(i,d){r.deprecationHandler!=null&&r.deprecationHandler(i,d),K[i]||(_(d),K[i]=!0)}r.suppressDeprecationWarnings=!1,r.deprecationHandler=null;function M(i){return typeof Function<"u"&&i instanceof Function||Object.prototype.toString.call(i)==="[object Function]"}function Y(i){var d,S;for(S in i)c(i,S)&&(d=i[S],M(d)?this[S]=d:this["_"+S]=d);this._config=i,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function W(i,d){var S=g({},i),b;for(b in d)c(d,b)&&(l(i[b])&&l(d[b])?(S[b]={},g(S[b],i[b]),g(S[b],d[b])):d[b]!=null?S[b]=d[b]:delete S[b]);for(b in i)c(i,b)&&!c(d,b)&&l(i[b])&&(S[b]=g({},S[b]));return S}function j(i){i!=null&&this.set(i)}var B;Object.keys?B=Object.keys:B=function(i){var d,S=[];for(d in i)c(i,d)&&S.push(d);return S};var re={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function de(i,d,S){var b=this._calendar[i]||this._calendar.sameElse;return M(b)?b.call(d,S):b}function L(i,d,S){var b=""+Math.abs(i),D=d-b.length,P=i>=0;return(P?S?"+":"":"-")+Math.pow(10,Math.max(0,D)).toString().substr(1)+b}var G=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,se=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,ae={},ee={};function F(i,d,S,b){var D=b;typeof b=="string"&&(D=function(){return this[b]()}),i&&(ee[i]=D),d&&(ee[d[0]]=function(){return L(D.apply(this,arguments),d[1],d[2])}),S&&(ee[S]=function(){return this.localeData().ordinal(D.apply(this,arguments),i)})}function J(i){return i.match(/\[[\s\S]/)?i.replace(/^\[|\]$/g,""):i.replace(/\\/g,"")}function Z(i){var d=i.match(G),S,b;for(S=0,b=d.length;S<b;S++)ee[d[S]]?d[S]=ee[d[S]]:d[S]=J(d[S]);return function(D){var P="",q;for(q=0;q<b;q++)P+=M(d[q])?d[q].call(D,i):d[q];return P}}function ie(i,d){return i.isValid()?(d=te(d,i.localeData()),ae[d]=ae[d]||Z(d),ae[d](i)):i.localeData().invalidDate()}function te(i,d){var S=5;function b(D){return d.longDateFormat(D)||D}for(se.lastIndex=0;S>=0&&se.test(i);)i=i.replace(se,b),se.lastIndex=0,S-=1;return i}var fe={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function le(i){var d=this._longDateFormat[i],S=this._longDateFormat[i.toUpperCase()];return d||!S?d:(this._longDateFormat[i]=S.match(G).map(function(b){return b==="MMMM"||b==="MM"||b==="DD"||b==="dddd"?b.slice(1):b}).join(""),this._longDateFormat[i])}var ne="Invalid date";function Ce(){return this._invalidDate}var Re="%d",it=/\d{1,2}/;function mt(i){return this._ordinal.replace("%d",i)}var lt={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function ye(i,d,S,b){var D=this._relativeTime[S];return M(D)?D(i,d,S,b):D.replace(/%d/i,i)}function Be(i,d){var S=this._relativeTime[i>0?"future":"past"];return M(S)?S(d):S.replace(/%s/i,d)}var Ze={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function he(i){return typeof i=="string"?Ze[i]||Ze[i.toLowerCase()]:void 0}function We(i){var d={},S,b;for(b in i)c(i,b)&&(S=he(b),S&&(d[S]=i[b]));return d}var Ae={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function Tt(i){var d=[],S;for(S in i)c(i,S)&&d.push({unit:S,priority:Ae[S]});return d.sort(function(b,D){return b.priority-D.priority}),d}var Ye=/\d/,Qe=/\d\d/,ce=/\d{3}/,xe=/\d{4}/,we=/[+-]?\d{6}/,Ee=/\d\d?/,ke=/\d\d\d\d?/,ft=/\d\d\d\d\d\d?/,ct=/\d{1,3}/,Ke=/\d{1,4}/,dt=/[+-]?\d{1,6}/,kt=/\d+/,At=/[+-]?\d+/,ka=/Z|[+-]\d\d:?\d\d/gi,_n=/Z|[+-]\d\d(?::?\d\d)?/gi,be=/[+-]?\d+(\.\d{1,3})?/,ve=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,Je=/^[1-9]\d?/,Ft=/^([1-9]\d|\d)/,Rn;Rn={};function ue(i,d,S){Rn[i]=M(d)?d:function(b,D){return b&&S?S:d}}function gh(i,d){return c(Rn,i)?Rn[i](d._strict,d._locale):new RegExp(bh(i))}function bh(i){return Qt(i.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(d,S,b,D,P){return S||b||D||P}))}function Qt(i){return i.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function It(i){return i<0?Math.ceil(i)||0:Math.floor(i)}function De(i){var d=+i,S=0;return d!==0&&isFinite(d)&&(S=It(d)),S}var Ia={};function Fe(i,d){var S,b=d,D;for(typeof i=="string"&&(i=[i]),m(d)&&(b=function(P,q){q[d]=De(P)}),D=i.length,S=0;S<D;S++)Ia[i[S]]=b}function kr(i,d){Fe(i,function(S,b,D,P){D._w=D._w||{},d(S,D._w,D,P)})}function vh(i,d,S){d!=null&&c(Ia,i)&&Ia[i](d,S._a,S,i)}function fs(i){return i%4===0&&i%100!==0||i%400===0}var pt=0,en=1,jt=2,et=3,Vt=4,tn=5,On=6,yh=7,Th=8;F("Y",0,0,function(){var i=this.year();return i<=9999?L(i,4):"+"+i}),F(0,["YY",2],0,function(){return this.year()%100}),F(0,["YYYY",4],0,"year"),F(0,["YYYYY",5],0,"year"),F(0,["YYYYYY",6,!0],0,"year"),ue("Y",At),ue("YY",Ee,Qe),ue("YYYY",Ke,xe),ue("YYYYY",dt,we),ue("YYYYYY",dt,we),Fe(["YYYYY","YYYYYY"],pt),Fe("YYYY",function(i,d){d[pt]=i.length===2?r.parseTwoDigitYear(i):De(i)}),Fe("YY",function(i,d){d[pt]=r.parseTwoDigitYear(i)}),Fe("Y",function(i,d){d[pt]=parseInt(i,10)});function Ir(i){return fs(i)?366:365}r.parseTwoDigitYear=function(i){return De(i)+(De(i)>68?1900:2e3)};var Ml=nr("FullYear",!0);function Eh(){return fs(this.year())}function nr(i,d){return function(S){return S!=null?(_l(this,i,S),r.updateOffset(this,d),this):Mr(this,i)}}function Mr(i,d){if(!i.isValid())return NaN;var S=i._d,b=i._isUTC;switch(d){case"Milliseconds":return b?S.getUTCMilliseconds():S.getMilliseconds();case"Seconds":return b?S.getUTCSeconds():S.getSeconds();case"Minutes":return b?S.getUTCMinutes():S.getMinutes();case"Hours":return b?S.getUTCHours():S.getHours();case"Date":return b?S.getUTCDate():S.getDate();case"Day":return b?S.getUTCDay():S.getDay();case"Month":return b?S.getUTCMonth():S.getMonth();case"FullYear":return b?S.getUTCFullYear():S.getFullYear();default:return NaN}}function _l(i,d,S){var b,D,P,q,me;if(!(!i.isValid()||isNaN(S))){switch(b=i._d,D=i._isUTC,d){case"Milliseconds":return void(D?b.setUTCMilliseconds(S):b.setMilliseconds(S));case"Seconds":return void(D?b.setUTCSeconds(S):b.setSeconds(S));case"Minutes":return void(D?b.setUTCMinutes(S):b.setMinutes(S));case"Hours":return void(D?b.setUTCHours(S):b.setHours(S));case"Date":return void(D?b.setUTCDate(S):b.setDate(S));case"FullYear":break;default:return}P=S,q=i.month(),me=i.date(),me=me===29&&q===1&&!fs(P)?28:me,D?b.setUTCFullYear(P,q,me):b.setFullYear(P,q,me)}}function wh(i){return i=he(i),M(this[i])?this[i]():this}function Ch(i,d){if(typeof i=="object"){i=We(i);var S=Tt(i),b,D=S.length;for(b=0;b<D;b++)this[S[b].unit](i[S[b].unit])}else if(i=he(i),M(this[i]))return this[i](d);return this}function Dh(i,d){return(i%d+d)%d}var Xe;Array.prototype.indexOf?Xe=Array.prototype.indexOf:Xe=function(i){var d;for(d=0;d<this.length;++d)if(this[d]===i)return d;return-1};function Ma(i,d){if(isNaN(i)||isNaN(d))return NaN;var S=Dh(d,12);return i+=(d-S)/12,S===1?fs(i)?29:28:31-S%7%2}F("M",["MM",2],"Mo",function(){return this.month()+1}),F("MMM",0,0,function(i){return this.localeData().monthsShort(this,i)}),F("MMMM",0,0,function(i){return this.localeData().months(this,i)}),ue("M",Ee,Je),ue("MM",Ee,Qe),ue("MMM",function(i,d){return d.monthsShortRegex(i)}),ue("MMMM",function(i,d){return d.monthsRegex(i)}),Fe(["M","MM"],function(i,d){d[en]=De(i)-1}),Fe(["MMM","MMMM"],function(i,d,S,b){var D=S._locale.monthsParse(i,b,S._strict);D!=null?d[en]=D:T(S).invalidMonth=i});var Nh="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Rl="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Ol=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,xh=ve,kh=ve;function Ih(i,d){return i?o(this._months)?this._months[i.month()]:this._months[(this._months.isFormat||Ol).test(d)?"format":"standalone"][i.month()]:o(this._months)?this._months:this._months.standalone}function Mh(i,d){return i?o(this._monthsShort)?this._monthsShort[i.month()]:this._monthsShort[Ol.test(d)?"format":"standalone"][i.month()]:o(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function _h(i,d,S){var b,D,P,q=i.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],b=0;b<12;++b)P=v([2e3,b]),this._shortMonthsParse[b]=this.monthsShort(P,"").toLocaleLowerCase(),this._longMonthsParse[b]=this.months(P,"").toLocaleLowerCase();return S?d==="MMM"?(D=Xe.call(this._shortMonthsParse,q),D!==-1?D:null):(D=Xe.call(this._longMonthsParse,q),D!==-1?D:null):d==="MMM"?(D=Xe.call(this._shortMonthsParse,q),D!==-1?D:(D=Xe.call(this._longMonthsParse,q),D!==-1?D:null)):(D=Xe.call(this._longMonthsParse,q),D!==-1?D:(D=Xe.call(this._shortMonthsParse,q),D!==-1?D:null))}function Rh(i,d,S){var b,D,P;if(this._monthsParseExact)return _h.call(this,i,d,S);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),b=0;b<12;b++){if(D=v([2e3,b]),S&&!this._longMonthsParse[b]&&(this._longMonthsParse[b]=new RegExp("^"+this.months(D,"").replace(".","")+"$","i"),this._shortMonthsParse[b]=new RegExp("^"+this.monthsShort(D,"").replace(".","")+"$","i")),!S&&!this._monthsParse[b]&&(P="^"+this.months(D,"")+"|^"+this.monthsShort(D,""),this._monthsParse[b]=new RegExp(P.replace(".",""),"i")),S&&d==="MMMM"&&this._longMonthsParse[b].test(i))return b;if(S&&d==="MMM"&&this._shortMonthsParse[b].test(i))return b;if(!S&&this._monthsParse[b].test(i))return b}}function Ll(i,d){if(!i.isValid())return i;if(typeof d=="string"){if(/^\d+$/.test(d))d=De(d);else if(d=i.localeData().monthsParse(d),!m(d))return i}var S=d,b=i.date();return b=b<29?b:Math.min(b,Ma(i.year(),S)),i._isUTC?i._d.setUTCMonth(S,b):i._d.setMonth(S,b),i}function Pl(i){return i!=null?(Ll(this,i),r.updateOffset(this,!0),this):Mr(this,"Month")}function Oh(){return Ma(this.year(),this.month())}function Lh(i){return this._monthsParseExact?(c(this,"_monthsRegex")||Bl.call(this),i?this._monthsShortStrictRegex:this._monthsShortRegex):(c(this,"_monthsShortRegex")||(this._monthsShortRegex=xh),this._monthsShortStrictRegex&&i?this._monthsShortStrictRegex:this._monthsShortRegex)}function Ph(i){return this._monthsParseExact?(c(this,"_monthsRegex")||Bl.call(this),i?this._monthsStrictRegex:this._monthsRegex):(c(this,"_monthsRegex")||(this._monthsRegex=kh),this._monthsStrictRegex&&i?this._monthsStrictRegex:this._monthsRegex)}function Bl(){function i(Te,Ie){return Ie.length-Te.length}var d=[],S=[],b=[],D,P,q,me;for(D=0;D<12;D++)P=v([2e3,D]),q=Qt(this.monthsShort(P,"")),me=Qt(this.months(P,"")),d.push(q),S.push(me),b.push(me),b.push(q);d.sort(i),S.sort(i),b.sort(i),this._monthsRegex=new RegExp("^("+b.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+S.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+d.join("|")+")","i")}function Bh(i,d,S,b,D,P,q){var me;return i<100&&i>=0?(me=new Date(i+400,d,S,b,D,P,q),isFinite(me.getFullYear())&&me.setFullYear(i)):me=new Date(i,d,S,b,D,P,q),me}function _r(i){var d,S;return i<100&&i>=0?(S=Array.prototype.slice.call(arguments),S[0]=i+400,d=new Date(Date.UTC.apply(null,S)),isFinite(d.getUTCFullYear())&&d.setUTCFullYear(i)):d=new Date(Date.UTC.apply(null,arguments)),d}function hs(i,d,S){var b=7+d-S,D=(7+_r(i,0,b).getUTCDay()-d)%7;return-D+b-1}function Al(i,d,S,b,D){var P=(7+S-b)%7,q=hs(i,b,D),me=1+7*(d-1)+P+q,Te,Ie;return me<=0?(Te=i-1,Ie=Ir(Te)+me):me>Ir(i)?(Te=i+1,Ie=me-Ir(i)):(Te=i,Ie=me),{year:Te,dayOfYear:Ie}}function Rr(i,d,S){var b=hs(i.year(),d,S),D=Math.floor((i.dayOfYear()-b-1)/7)+1,P,q;return D<1?(q=i.year()-1,P=D+nn(q,d,S)):D>nn(i.year(),d,S)?(P=D-nn(i.year(),d,S),q=i.year()+1):(q=i.year(),P=D),{week:P,year:q}}function nn(i,d,S){var b=hs(i,d,S),D=hs(i+1,d,S);return(Ir(i)-b+D)/7}F("w",["ww",2],"wo","week"),F("W",["WW",2],"Wo","isoWeek"),ue("w",Ee,Je),ue("ww",Ee,Qe),ue("W",Ee,Je),ue("WW",Ee,Qe),kr(["w","ww","W","WW"],function(i,d,S,b){d[b.substr(0,1)]=De(i)});function Ah(i){return Rr(i,this._week.dow,this._week.doy).week}var Fh={dow:0,doy:6};function Vh(){return this._week.dow}function $h(){return this._week.doy}function Kh(i){var d=this.localeData().week(this);return i==null?d:this.add((i-d)*7,"d")}function Hh(i){var d=Rr(this,1,4).week;return i==null?d:this.add((i-d)*7,"d")}F("d",0,"do","day"),F("dd",0,0,function(i){return this.localeData().weekdaysMin(this,i)}),F("ddd",0,0,function(i){return this.localeData().weekdaysShort(this,i)}),F("dddd",0,0,function(i){return this.localeData().weekdays(this,i)}),F("e",0,0,"weekday"),F("E",0,0,"isoWeekday"),ue("d",Ee),ue("e",Ee),ue("E",Ee),ue("dd",function(i,d){return d.weekdaysMinRegex(i)}),ue("ddd",function(i,d){return d.weekdaysShortRegex(i)}),ue("dddd",function(i,d){return d.weekdaysRegex(i)}),kr(["dd","ddd","dddd"],function(i,d,S,b){var D=S._locale.weekdaysParse(i,b,S._strict);D!=null?d.d=D:T(S).invalidWeekday=i}),kr(["d","e","E"],function(i,d,S,b){d[b]=De(i)});function Wh(i,d){return typeof i!="string"?i:isNaN(i)?(i=d.weekdaysParse(i),typeof i=="number"?i:null):parseInt(i,10)}function Gh(i,d){return typeof i=="string"?d.weekdaysParse(i)%7||7:isNaN(i)?null:i}function _a(i,d){return i.slice(d,7).concat(i.slice(0,d))}var Yh="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Fl="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Uh="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),jh=ve,zh=ve,qh=ve;function Jh(i,d){var S=o(this._weekdays)?this._weekdays:this._weekdays[i&&i!==!0&&this._weekdays.isFormat.test(d)?"format":"standalone"];return i===!0?_a(S,this._week.dow):i?S[i.day()]:S}function Zh(i){return i===!0?_a(this._weekdaysShort,this._week.dow):i?this._weekdaysShort[i.day()]:this._weekdaysShort}function Xh(i){return i===!0?_a(this._weekdaysMin,this._week.dow):i?this._weekdaysMin[i.day()]:this._weekdaysMin}function Qh(i,d,S){var b,D,P,q=i.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],b=0;b<7;++b)P=v([2e3,1]).day(b),this._minWeekdaysParse[b]=this.weekdaysMin(P,"").toLocaleLowerCase(),this._shortWeekdaysParse[b]=this.weekdaysShort(P,"").toLocaleLowerCase(),this._weekdaysParse[b]=this.weekdays(P,"").toLocaleLowerCase();return S?d==="dddd"?(D=Xe.call(this._weekdaysParse,q),D!==-1?D:null):d==="ddd"?(D=Xe.call(this._shortWeekdaysParse,q),D!==-1?D:null):(D=Xe.call(this._minWeekdaysParse,q),D!==-1?D:null):d==="dddd"?(D=Xe.call(this._weekdaysParse,q),D!==-1||(D=Xe.call(this._shortWeekdaysParse,q),D!==-1)?D:(D=Xe.call(this._minWeekdaysParse,q),D!==-1?D:null)):d==="ddd"?(D=Xe.call(this._shortWeekdaysParse,q),D!==-1||(D=Xe.call(this._weekdaysParse,q),D!==-1)?D:(D=Xe.call(this._minWeekdaysParse,q),D!==-1?D:null)):(D=Xe.call(this._minWeekdaysParse,q),D!==-1||(D=Xe.call(this._weekdaysParse,q),D!==-1)?D:(D=Xe.call(this._shortWeekdaysParse,q),D!==-1?D:null))}function eS(i,d,S){var b,D,P;if(this._weekdaysParseExact)return Qh.call(this,i,d,S);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),b=0;b<7;b++){if(D=v([2e3,1]).day(b),S&&!this._fullWeekdaysParse[b]&&(this._fullWeekdaysParse[b]=new RegExp("^"+this.weekdays(D,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[b]=new RegExp("^"+this.weekdaysShort(D,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[b]=new RegExp("^"+this.weekdaysMin(D,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[b]||(P="^"+this.weekdays(D,"")+"|^"+this.weekdaysShort(D,"")+"|^"+this.weekdaysMin(D,""),this._weekdaysParse[b]=new RegExp(P.replace(".",""),"i")),S&&d==="dddd"&&this._fullWeekdaysParse[b].test(i))return b;if(S&&d==="ddd"&&this._shortWeekdaysParse[b].test(i))return b;if(S&&d==="dd"&&this._minWeekdaysParse[b].test(i))return b;if(!S&&this._weekdaysParse[b].test(i))return b}}function tS(i){if(!this.isValid())return i!=null?this:NaN;var d=Mr(this,"Day");return i!=null?(i=Wh(i,this.localeData()),this.add(i-d,"d")):d}function nS(i){if(!this.isValid())return i!=null?this:NaN;var d=(this.day()+7-this.localeData()._week.dow)%7;return i==null?d:this.add(i-d,"d")}function rS(i){if(!this.isValid())return i!=null?this:NaN;if(i!=null){var d=Gh(i,this.localeData());return this.day(this.day()%7?d:d-7)}else return this.day()||7}function sS(i){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||Ra.call(this),i?this._weekdaysStrictRegex:this._weekdaysRegex):(c(this,"_weekdaysRegex")||(this._weekdaysRegex=jh),this._weekdaysStrictRegex&&i?this._weekdaysStrictRegex:this._weekdaysRegex)}function aS(i){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||Ra.call(this),i?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(c(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=zh),this._weekdaysShortStrictRegex&&i?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function oS(i){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||Ra.call(this),i?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(c(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=qh),this._weekdaysMinStrictRegex&&i?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Ra(){function i(ht,ln){return ln.length-ht.length}var d=[],S=[],b=[],D=[],P,q,me,Te,Ie;for(P=0;P<7;P++)q=v([2e3,1]).day(P),me=Qt(this.weekdaysMin(q,"")),Te=Qt(this.weekdaysShort(q,"")),Ie=Qt(this.weekdays(q,"")),d.push(me),S.push(Te),b.push(Ie),D.push(me),D.push(Te),D.push(Ie);d.sort(i),S.sort(i),b.sort(i),D.sort(i),this._weekdaysRegex=new RegExp("^("+D.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+b.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+S.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+d.join("|")+")","i")}function Oa(){return this.hours()%12||12}function iS(){return this.hours()||24}F("H",["HH",2],0,"hour"),F("h",["hh",2],0,Oa),F("k",["kk",2],0,iS),F("hmm",0,0,function(){return""+Oa.apply(this)+L(this.minutes(),2)}),F("hmmss",0,0,function(){return""+Oa.apply(this)+L(this.minutes(),2)+L(this.seconds(),2)}),F("Hmm",0,0,function(){return""+this.hours()+L(this.minutes(),2)}),F("Hmmss",0,0,function(){return""+this.hours()+L(this.minutes(),2)+L(this.seconds(),2)});function Vl(i,d){F(i,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),d)})}Vl("a",!0),Vl("A",!1);function $l(i,d){return d._meridiemParse}ue("a",$l),ue("A",$l),ue("H",Ee,Ft),ue("h",Ee,Je),ue("k",Ee,Je),ue("HH",Ee,Qe),ue("hh",Ee,Qe),ue("kk",Ee,Qe),ue("hmm",ke),ue("hmmss",ft),ue("Hmm",ke),ue("Hmmss",ft),Fe(["H","HH"],et),Fe(["k","kk"],function(i,d,S){var b=De(i);d[et]=b===24?0:b}),Fe(["a","A"],function(i,d,S){S._isPm=S._locale.isPM(i),S._meridiem=i}),Fe(["h","hh"],function(i,d,S){d[et]=De(i),T(S).bigHour=!0}),Fe("hmm",function(i,d,S){var b=i.length-2;d[et]=De(i.substr(0,b)),d[Vt]=De(i.substr(b)),T(S).bigHour=!0}),Fe("hmmss",function(i,d,S){var b=i.length-4,D=i.length-2;d[et]=De(i.substr(0,b)),d[Vt]=De(i.substr(b,2)),d[tn]=De(i.substr(D)),T(S).bigHour=!0}),Fe("Hmm",function(i,d,S){var b=i.length-2;d[et]=De(i.substr(0,b)),d[Vt]=De(i.substr(b))}),Fe("Hmmss",function(i,d,S){var b=i.length-4,D=i.length-2;d[et]=De(i.substr(0,b)),d[Vt]=De(i.substr(b,2)),d[tn]=De(i.substr(D))});function lS(i){return(i+"").toLowerCase().charAt(0)==="p"}var cS=/[ap]\.?m?\.?/i,dS=nr("Hours",!0);function pS(i,d,S){return i>11?S?"pm":"PM":S?"am":"AM"}var Kl={calendar:re,longDateFormat:fe,invalidDate:ne,ordinal:Re,dayOfMonthOrdinalParse:it,relativeTime:lt,months:Nh,monthsShort:Rl,week:Fh,weekdays:Yh,weekdaysMin:Uh,weekdaysShort:Fl,meridiemParse:cS},ze={},Or={},Lr;function uS(i,d){var S,b=Math.min(i.length,d.length);for(S=0;S<b;S+=1)if(i[S]!==d[S])return S;return b}function Hl(i){return i&&i.toLowerCase().replace("_","-")}function mS(i){for(var d=0,S,b,D,P;d<i.length;){for(P=Hl(i[d]).split("-"),S=P.length,b=Hl(i[d+1]),b=b?b.split("-"):null;S>0;){if(D=Ss(P.slice(0,S).join("-")),D)return D;if(b&&b.length>=S&&uS(P,b)>=S-1)break;S--}d++}return Lr}function fS(i){return!!(i&&i.match("^[^/\\\\]*$"))}function Ss(i){var d=null,S;if(ze[i]===void 0&&!0&&e&&e.exports&&fS(i))try{d=Lr._abbr,S=Xt,S("./locale/"+i),fn(d)}catch{ze[i]=null}return ze[i]}function fn(i,d){var S;return i&&(f(d)?S=rn(i):S=La(i,d),S?Lr=S:typeof console<"u"&&console.warn&&console.warn("Locale "+i+" not found. Did you forget to load it?")),Lr._abbr}function La(i,d){if(d!==null){var S,b=Kl;if(d.abbr=i,ze[i]!=null)z("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),b=ze[i]._config;else if(d.parentLocale!=null)if(ze[d.parentLocale]!=null)b=ze[d.parentLocale]._config;else if(S=Ss(d.parentLocale),S!=null)b=S._config;else return Or[d.parentLocale]||(Or[d.parentLocale]=[]),Or[d.parentLocale].push({name:i,config:d}),null;return ze[i]=new j(W(b,d)),Or[i]&&Or[i].forEach(function(D){La(D.name,D.config)}),fn(i),ze[i]}else return delete ze[i],null}function hS(i,d){if(d!=null){var S,b,D=Kl;ze[i]!=null&&ze[i].parentLocale!=null?ze[i].set(W(ze[i]._config,d)):(b=Ss(i),b!=null&&(D=b._config),d=W(D,d),b==null&&(d.abbr=i),S=new j(d),S.parentLocale=ze[i],ze[i]=S),fn(i)}else ze[i]!=null&&(ze[i].parentLocale!=null?(ze[i]=ze[i].parentLocale,i===fn()&&fn(i)):ze[i]!=null&&delete ze[i]);return ze[i]}function rn(i){var d;if(i&&i._locale&&i._locale._abbr&&(i=i._locale._abbr),!i)return Lr;if(!o(i)){if(d=Ss(i),d)return d;i=[i]}return mS(i)}function SS(){return B(ze)}function Pa(i){var d,S=i._a;return S&&T(i).overflow===-2&&(d=S[en]<0||S[en]>11?en:S[jt]<1||S[jt]>Ma(S[pt],S[en])?jt:S[et]<0||S[et]>24||S[et]===24&&(S[Vt]!==0||S[tn]!==0||S[On]!==0)?et:S[Vt]<0||S[Vt]>59?Vt:S[tn]<0||S[tn]>59?tn:S[On]<0||S[On]>999?On:-1,T(i)._overflowDayOfYear&&(d<pt||d>jt)&&(d=jt),T(i)._overflowWeeks&&d===-1&&(d=yh),T(i)._overflowWeekday&&d===-1&&(d=Th),T(i).overflow=d),i}var gS=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,bS=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,vS=/Z|[+-]\d\d(?::?\d\d)?/,gs=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Ba=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],yS=/^\/?Date\((-?\d+)/i,TS=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,ES={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function Wl(i){var d,S,b=i._i,D=gS.exec(b)||bS.exec(b),P,q,me,Te,Ie=gs.length,ht=Ba.length;if(D){for(T(i).iso=!0,d=0,S=Ie;d<S;d++)if(gs[d][1].exec(D[1])){q=gs[d][0],P=gs[d][2]!==!1;break}if(q==null){i._isValid=!1;return}if(D[3]){for(d=0,S=ht;d<S;d++)if(Ba[d][1].exec(D[3])){me=(D[2]||" ")+Ba[d][0];break}if(me==null){i._isValid=!1;return}}if(!P&&me!=null){i._isValid=!1;return}if(D[4])if(vS.exec(D[4]))Te="Z";else{i._isValid=!1;return}i._f=q+(me||"")+(Te||""),Fa(i)}else i._isValid=!1}function wS(i,d,S,b,D,P){var q=[CS(i),Rl.indexOf(d),parseInt(S,10),parseInt(b,10),parseInt(D,10)];return P&&q.push(parseInt(P,10)),q}function CS(i){var d=parseInt(i,10);return d<=49?2e3+d:d<=999?1900+d:d}function DS(i){return i.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function NS(i,d,S){if(i){var b=Fl.indexOf(i),D=new Date(d[0],d[1],d[2]).getDay();if(b!==D)return T(S).weekdayMismatch=!0,S._isValid=!1,!1}return!0}function xS(i,d,S){if(i)return ES[i];if(d)return 0;var b=parseInt(S,10),D=b%100,P=(b-D)/100;return P*60+D}function Gl(i){var d=TS.exec(DS(i._i)),S;if(d){if(S=wS(d[4],d[3],d[2],d[5],d[6],d[7]),!NS(d[1],S,i))return;i._a=S,i._tzm=xS(d[8],d[9],d[10]),i._d=_r.apply(null,i._a),i._d.setUTCMinutes(i._d.getUTCMinutes()-i._tzm),T(i).rfc2822=!0}else i._isValid=!1}function kS(i){var d=yS.exec(i._i);if(d!==null){i._d=new Date(+d[1]);return}if(Wl(i),i._isValid===!1)delete i._isValid;else return;if(Gl(i),i._isValid===!1)delete i._isValid;else return;i._strict?i._isValid=!1:r.createFromInputFallback(i)}r.createFromInputFallback=O("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(i){i._d=new Date(i._i+(i._useUTC?" UTC":""))});function rr(i,d,S){return i!=null?i:d!=null?d:S}function IS(i){var d=new Date(r.now());return i._useUTC?[d.getUTCFullYear(),d.getUTCMonth(),d.getUTCDate()]:[d.getFullYear(),d.getMonth(),d.getDate()]}function Aa(i){var d,S,b=[],D,P,q;if(!i._d){for(D=IS(i),i._w&&i._a[jt]==null&&i._a[en]==null&&MS(i),i._dayOfYear!=null&&(q=rr(i._a[pt],D[pt]),(i._dayOfYear>Ir(q)||i._dayOfYear===0)&&(T(i)._overflowDayOfYear=!0),S=_r(q,0,i._dayOfYear),i._a[en]=S.getUTCMonth(),i._a[jt]=S.getUTCDate()),d=0;d<3&&i._a[d]==null;++d)i._a[d]=b[d]=D[d];for(;d<7;d++)i._a[d]=b[d]=i._a[d]==null?d===2?1:0:i._a[d];i._a[et]===24&&i._a[Vt]===0&&i._a[tn]===0&&i._a[On]===0&&(i._nextDay=!0,i._a[et]=0),i._d=(i._useUTC?_r:Bh).apply(null,b),P=i._useUTC?i._d.getUTCDay():i._d.getDay(),i._tzm!=null&&i._d.setUTCMinutes(i._d.getUTCMinutes()-i._tzm),i._nextDay&&(i._a[et]=24),i._w&&typeof i._w.d<"u"&&i._w.d!==P&&(T(i).weekdayMismatch=!0)}}function MS(i){var d,S,b,D,P,q,me,Te,Ie;d=i._w,d.GG!=null||d.W!=null||d.E!=null?(P=1,q=4,S=rr(d.GG,i._a[pt],Rr(Ue(),1,4).year),b=rr(d.W,1),D=rr(d.E,1),(D<1||D>7)&&(Te=!0)):(P=i._locale._week.dow,q=i._locale._week.doy,Ie=Rr(Ue(),P,q),S=rr(d.gg,i._a[pt],Ie.year),b=rr(d.w,Ie.week),d.d!=null?(D=d.d,(D<0||D>6)&&(Te=!0)):d.e!=null?(D=d.e+P,(d.e<0||d.e>6)&&(Te=!0)):D=P),b<1||b>nn(S,P,q)?T(i)._overflowWeeks=!0:Te!=null?T(i)._overflowWeekday=!0:(me=Al(S,b,D,P,q),i._a[pt]=me.year,i._dayOfYear=me.dayOfYear)}r.ISO_8601=function(){},r.RFC_2822=function(){};function Fa(i){if(i._f===r.ISO_8601){Wl(i);return}if(i._f===r.RFC_2822){Gl(i);return}i._a=[],T(i).empty=!0;var d=""+i._i,S,b,D,P,q,me=d.length,Te=0,Ie,ht;for(D=te(i._f,i._locale).match(G)||[],ht=D.length,S=0;S<ht;S++)P=D[S],b=(d.match(gh(P,i))||[])[0],b&&(q=d.substr(0,d.indexOf(b)),q.length>0&&T(i).unusedInput.push(q),d=d.slice(d.indexOf(b)+b.length),Te+=b.length),ee[P]?(b?T(i).empty=!1:T(i).unusedTokens.push(P),vh(P,b,i)):i._strict&&!b&&T(i).unusedTokens.push(P);T(i).charsLeftOver=me-Te,d.length>0&&T(i).unusedInput.push(d),i._a[et]<=12&&T(i).bigHour===!0&&i._a[et]>0&&(T(i).bigHour=void 0),T(i).parsedDateParts=i._a.slice(0),T(i).meridiem=i._meridiem,i._a[et]=_S(i._locale,i._a[et],i._meridiem),Ie=T(i).era,Ie!==null&&(i._a[pt]=i._locale.erasConvertYear(Ie,i._a[pt])),Aa(i),Pa(i)}function _S(i,d,S){var b;return S==null?d:i.meridiemHour!=null?i.meridiemHour(d,S):(i.isPM!=null&&(b=i.isPM(S),b&&d<12&&(d+=12),!b&&d===12&&(d=0)),d)}function RS(i){var d,S,b,D,P,q,me=!1,Te=i._f.length;if(Te===0){T(i).invalidFormat=!0,i._d=new Date(NaN);return}for(D=0;D<Te;D++)P=0,q=!1,d=A({},i),i._useUTC!=null&&(d._useUTC=i._useUTC),d._f=i._f[D],Fa(d),N(d)&&(q=!0),P+=T(d).charsLeftOver,P+=T(d).unusedTokens.length*10,T(d).score=P,me?P<b&&(b=P,S=d):(b==null||P<b||q)&&(b=P,S=d,q&&(me=!0));g(i,S||d)}function OS(i){if(!i._d){var d=We(i._i),S=d.day===void 0?d.date:d.day;i._a=h([d.year,d.month,S,d.hour,d.minute,d.second,d.millisecond],function(b){return b&&parseInt(b,10)}),Aa(i)}}function LS(i){var d=new R(Pa(Yl(i)));return d._nextDay&&(d.add(1,"d"),d._nextDay=void 0),d}function Yl(i){var d=i._i,S=i._f;return i._locale=i._locale||rn(i._l),d===null||S===void 0&&d===""?x({nullInput:!0}):(typeof d=="string"&&(i._i=d=i._locale.preparse(d)),w(d)?new R(Pa(d)):(u(d)?i._d=d:o(S)?RS(i):S?Fa(i):PS(i),N(i)||(i._d=null),i))}function PS(i){var d=i._i;f(d)?i._d=new Date(r.now()):u(d)?i._d=new Date(d.valueOf()):typeof d=="string"?kS(i):o(d)?(i._a=h(d.slice(0),function(S){return parseInt(S,10)}),Aa(i)):l(d)?OS(i):m(d)?i._d=new Date(d):r.createFromInputFallback(i)}function Ul(i,d,S,b,D){var P={};return(d===!0||d===!1)&&(b=d,d=void 0),(S===!0||S===!1)&&(b=S,S=void 0),(l(i)&&p(i)||o(i)&&i.length===0)&&(i=void 0),P._isAMomentObject=!0,P._useUTC=P._isUTC=D,P._l=S,P._i=i,P._f=d,P._strict=b,LS(P)}function Ue(i,d,S,b){return Ul(i,d,S,b,!1)}var BS=O("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var i=Ue.apply(null,arguments);return this.isValid()&&i.isValid()?i<this?this:i:x()}),AS=O("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var i=Ue.apply(null,arguments);return this.isValid()&&i.isValid()?i>this?this:i:x()});function jl(i,d){var S,b;if(d.length===1&&o(d[0])&&(d=d[0]),!d.length)return Ue();for(S=d[0],b=1;b<d.length;++b)(!d[b].isValid()||d[b][i](S))&&(S=d[b]);return S}function FS(){var i=[].slice.call(arguments,0);return jl("isBefore",i)}function VS(){var i=[].slice.call(arguments,0);return jl("isAfter",i)}var $S=function(){return Date.now?Date.now():+new Date},Pr=["year","quarter","month","week","day","hour","minute","second","millisecond"];function KS(i){var d,S=!1,b,D=Pr.length;for(d in i)if(c(i,d)&&!(Xe.call(Pr,d)!==-1&&(i[d]==null||!isNaN(i[d]))))return!1;for(b=0;b<D;++b)if(i[Pr[b]]){if(S)return!1;parseFloat(i[Pr[b]])!==De(i[Pr[b]])&&(S=!0)}return!0}function HS(){return this._isValid}function WS(){return $t(NaN)}function bs(i){var d=We(i),S=d.year||0,b=d.quarter||0,D=d.month||0,P=d.week||d.isoWeek||0,q=d.day||0,me=d.hour||0,Te=d.minute||0,Ie=d.second||0,ht=d.millisecond||0;this._isValid=KS(d),this._milliseconds=+ht+Ie*1e3+Te*6e4+me*1e3*60*60,this._days=+q+P*7,this._months=+D+b*3+S*12,this._data={},this._locale=rn(),this._bubble()}function vs(i){return i instanceof bs}function Va(i){return i<0?Math.round(-1*i)*-1:Math.round(i)}function GS(i,d,S){var b=Math.min(i.length,d.length),D=Math.abs(i.length-d.length),P=0,q;for(q=0;q<b;q++)(S&&i[q]!==d[q]||!S&&De(i[q])!==De(d[q]))&&P++;return P+D}function zl(i,d){F(i,0,0,function(){var S=this.utcOffset(),b="+";return S<0&&(S=-S,b="-"),b+L(~~(S/60),2)+d+L(~~S%60,2)})}zl("Z",":"),zl("ZZ",""),ue("Z",_n),ue("ZZ",_n),Fe(["Z","ZZ"],function(i,d,S){S._useUTC=!0,S._tzm=$a(_n,i)});var YS=/([\+\-]|\d\d)/gi;function $a(i,d){var S=(d||"").match(i),b,D,P;return S===null?null:(b=S[S.length-1]||[],D=(b+"").match(YS)||["-",0,0],P=+(D[1]*60)+De(D[2]),P===0?0:D[0]==="+"?P:-P)}function Ka(i,d){var S,b;return d._isUTC?(S=d.clone(),b=(w(i)||u(i)?i.valueOf():Ue(i).valueOf())-S.valueOf(),S._d.setTime(S._d.valueOf()+b),r.updateOffset(S,!1),S):Ue(i).local()}function Ha(i){return-Math.round(i._d.getTimezoneOffset())}r.updateOffset=function(){};function US(i,d,S){var b=this._offset||0,D;if(!this.isValid())return i!=null?this:NaN;if(i!=null){if(typeof i=="string"){if(i=$a(_n,i),i===null)return this}else Math.abs(i)<16&&!S&&(i=i*60);return!this._isUTC&&d&&(D=Ha(this)),this._offset=i,this._isUTC=!0,D!=null&&this.add(D,"m"),b!==i&&(!d||this._changeInProgress?Xl(this,$t(i-b,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,r.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?b:Ha(this)}function jS(i,d){return i!=null?(typeof i!="string"&&(i=-i),this.utcOffset(i,d),this):-this.utcOffset()}function zS(i){return this.utcOffset(0,i)}function qS(i){return this._isUTC&&(this.utcOffset(0,i),this._isUTC=!1,i&&this.subtract(Ha(this),"m")),this}function JS(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var i=$a(ka,this._i);i!=null?this.utcOffset(i):this.utcOffset(0,!0)}return this}function ZS(i){return this.isValid()?(i=i?Ue(i).utcOffset():0,(this.utcOffset()-i)%60===0):!1}function XS(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function QS(){if(!f(this._isDSTShifted))return this._isDSTShifted;var i={},d;return A(i,this),i=Yl(i),i._a?(d=i._isUTC?v(i._a):Ue(i._a),this._isDSTShifted=this.isValid()&&GS(i._a,d.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function eg(){return this.isValid()?!this._isUTC:!1}function tg(){return this.isValid()?this._isUTC:!1}function ql(){return this.isValid()?this._isUTC&&this._offset===0:!1}var ng=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,rg=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function $t(i,d){var S=i,b=null,D,P,q;return vs(i)?S={ms:i._milliseconds,d:i._days,M:i._months}:m(i)||!isNaN(+i)?(S={},d?S[d]=+i:S.milliseconds=+i):(b=ng.exec(i))?(D=b[1]==="-"?-1:1,S={y:0,d:De(b[jt])*D,h:De(b[et])*D,m:De(b[Vt])*D,s:De(b[tn])*D,ms:De(Va(b[On]*1e3))*D}):(b=rg.exec(i))?(D=b[1]==="-"?-1:1,S={y:Ln(b[2],D),M:Ln(b[3],D),w:Ln(b[4],D),d:Ln(b[5],D),h:Ln(b[6],D),m:Ln(b[7],D),s:Ln(b[8],D)}):S==null?S={}:typeof S=="object"&&("from"in S||"to"in S)&&(q=sg(Ue(S.from),Ue(S.to)),S={},S.ms=q.milliseconds,S.M=q.months),P=new bs(S),vs(i)&&c(i,"_locale")&&(P._locale=i._locale),vs(i)&&c(i,"_isValid")&&(P._isValid=i._isValid),P}$t.fn=bs.prototype,$t.invalid=WS;function Ln(i,d){var S=i&&parseFloat(i.replace(",","."));return(isNaN(S)?0:S)*d}function Jl(i,d){var S={};return S.months=d.month()-i.month()+(d.year()-i.year())*12,i.clone().add(S.months,"M").isAfter(d)&&--S.months,S.milliseconds=+d-+i.clone().add(S.months,"M"),S}function sg(i,d){var S;return i.isValid()&&d.isValid()?(d=Ka(d,i),i.isBefore(d)?S=Jl(i,d):(S=Jl(d,i),S.milliseconds=-S.milliseconds,S.months=-S.months),S):{milliseconds:0,months:0}}function Zl(i,d){return function(S,b){var D,P;return b!==null&&!isNaN(+b)&&(z(d,"moment()."+d+"(period, number) is deprecated. Please use moment()."+d+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),P=S,S=b,b=P),D=$t(S,b),Xl(this,D,i),this}}function Xl(i,d,S,b){var D=d._milliseconds,P=Va(d._days),q=Va(d._months);!i.isValid()||(b=b==null?!0:b,q&&Ll(i,Mr(i,"Month")+q*S),P&&_l(i,"Date",Mr(i,"Date")+P*S),D&&i._d.setTime(i._d.valueOf()+D*S),b&&r.updateOffset(i,P||q))}var ag=Zl(1,"add"),og=Zl(-1,"subtract");function Ql(i){return typeof i=="string"||i instanceof String}function ig(i){return w(i)||u(i)||Ql(i)||m(i)||cg(i)||lg(i)||i===null||i===void 0}function lg(i){var d=l(i)&&!p(i),S=!1,b=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],D,P,q=b.length;for(D=0;D<q;D+=1)P=b[D],S=S||c(i,P);return d&&S}function cg(i){var d=o(i),S=!1;return d&&(S=i.filter(function(b){return!m(b)&&Ql(i)}).length===0),d&&S}function dg(i){var d=l(i)&&!p(i),S=!1,b=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],D,P;for(D=0;D<b.length;D+=1)P=b[D],S=S||c(i,P);return d&&S}function pg(i,d){var S=i.diff(d,"days",!0);return S<-6?"sameElse":S<-1?"lastWeek":S<0?"lastDay":S<1?"sameDay":S<2?"nextDay":S<7?"nextWeek":"sameElse"}function ug(i,d){arguments.length===1&&(arguments[0]?ig(arguments[0])?(i=arguments[0],d=void 0):dg(arguments[0])&&(d=arguments[0],i=void 0):(i=void 0,d=void 0));var S=i||Ue(),b=Ka(S,this).startOf("day"),D=r.calendarFormat(this,b)||"sameElse",P=d&&(M(d[D])?d[D].call(this,S):d[D]);return this.format(P||this.localeData().calendar(D,this,Ue(S)))}function mg(){return new R(this)}function fg(i,d){var S=w(i)?i:Ue(i);return this.isValid()&&S.isValid()?(d=he(d)||"millisecond",d==="millisecond"?this.valueOf()>S.valueOf():S.valueOf()<this.clone().startOf(d).valueOf()):!1}function hg(i,d){var S=w(i)?i:Ue(i);return this.isValid()&&S.isValid()?(d=he(d)||"millisecond",d==="millisecond"?this.valueOf()<S.valueOf():this.clone().endOf(d).valueOf()<S.valueOf()):!1}function Sg(i,d,S,b){var D=w(i)?i:Ue(i),P=w(d)?d:Ue(d);return this.isValid()&&D.isValid()&&P.isValid()?(b=b||"()",(b[0]==="("?this.isAfter(D,S):!this.isBefore(D,S))&&(b[1]===")"?this.isBefore(P,S):!this.isAfter(P,S))):!1}function gg(i,d){var S=w(i)?i:Ue(i),b;return this.isValid()&&S.isValid()?(d=he(d)||"millisecond",d==="millisecond"?this.valueOf()===S.valueOf():(b=S.valueOf(),this.clone().startOf(d).valueOf()<=b&&b<=this.clone().endOf(d).valueOf())):!1}function bg(i,d){return this.isSame(i,d)||this.isAfter(i,d)}function vg(i,d){return this.isSame(i,d)||this.isBefore(i,d)}function yg(i,d,S){var b,D,P;if(!this.isValid())return NaN;if(b=Ka(i,this),!b.isValid())return NaN;switch(D=(b.utcOffset()-this.utcOffset())*6e4,d=he(d),d){case"year":P=ys(this,b)/12;break;case"month":P=ys(this,b);break;case"quarter":P=ys(this,b)/3;break;case"second":P=(this-b)/1e3;break;case"minute":P=(this-b)/6e4;break;case"hour":P=(this-b)/36e5;break;case"day":P=(this-b-D)/864e5;break;case"week":P=(this-b-D)/6048e5;break;default:P=this-b}return S?P:It(P)}function ys(i,d){if(i.date()<d.date())return-ys(d,i);var S=(d.year()-i.year())*12+(d.month()-i.month()),b=i.clone().add(S,"months"),D,P;return d-b<0?(D=i.clone().add(S-1,"months"),P=(d-b)/(b-D)):(D=i.clone().add(S+1,"months"),P=(d-b)/(D-b)),-(S+P)||0}r.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",r.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function Tg(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function Eg(i){if(!this.isValid())return null;var d=i!==!0,S=d?this.clone().utc():this;return S.year()<0||S.year()>9999?ie(S,d?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):M(Date.prototype.toISOString)?d?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",ie(S,"Z")):ie(S,d?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function wg(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var i="moment",d="",S,b,D,P;return this.isLocal()||(i=this.utcOffset()===0?"moment.utc":"moment.parseZone",d="Z"),S="["+i+'("]',b=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",D="-MM-DD[T]HH:mm:ss.SSS",P=d+'[")]',this.format(S+b+D+P)}function Cg(i){i||(i=this.isUtc()?r.defaultFormatUtc:r.defaultFormat);var d=ie(this,i);return this.localeData().postformat(d)}function Dg(i,d){return this.isValid()&&(w(i)&&i.isValid()||Ue(i).isValid())?$t({to:this,from:i}).locale(this.locale()).humanize(!d):this.localeData().invalidDate()}function Ng(i){return this.from(Ue(),i)}function xg(i,d){return this.isValid()&&(w(i)&&i.isValid()||Ue(i).isValid())?$t({from:this,to:i}).locale(this.locale()).humanize(!d):this.localeData().invalidDate()}function kg(i){return this.to(Ue(),i)}function ec(i){var d;return i===void 0?this._locale._abbr:(d=rn(i),d!=null&&(this._locale=d),this)}var tc=O("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(i){return i===void 0?this.localeData():this.locale(i)});function nc(){return this._locale}var Ts=1e3,sr=60*Ts,Es=60*sr,rc=(365*400+97)*24*Es;function ar(i,d){return(i%d+d)%d}function sc(i,d,S){return i<100&&i>=0?new Date(i+400,d,S)-rc:new Date(i,d,S).valueOf()}function ac(i,d,S){return i<100&&i>=0?Date.UTC(i+400,d,S)-rc:Date.UTC(i,d,S)}function Ig(i){var d,S;if(i=he(i),i===void 0||i==="millisecond"||!this.isValid())return this;switch(S=this._isUTC?ac:sc,i){case"year":d=S(this.year(),0,1);break;case"quarter":d=S(this.year(),this.month()-this.month()%3,1);break;case"month":d=S(this.year(),this.month(),1);break;case"week":d=S(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":d=S(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":d=S(this.year(),this.month(),this.date());break;case"hour":d=this._d.valueOf(),d-=ar(d+(this._isUTC?0:this.utcOffset()*sr),Es);break;case"minute":d=this._d.valueOf(),d-=ar(d,sr);break;case"second":d=this._d.valueOf(),d-=ar(d,Ts);break}return this._d.setTime(d),r.updateOffset(this,!0),this}function Mg(i){var d,S;if(i=he(i),i===void 0||i==="millisecond"||!this.isValid())return this;switch(S=this._isUTC?ac:sc,i){case"year":d=S(this.year()+1,0,1)-1;break;case"quarter":d=S(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":d=S(this.year(),this.month()+1,1)-1;break;case"week":d=S(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":d=S(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":d=S(this.year(),this.month(),this.date()+1)-1;break;case"hour":d=this._d.valueOf(),d+=Es-ar(d+(this._isUTC?0:this.utcOffset()*sr),Es)-1;break;case"minute":d=this._d.valueOf(),d+=sr-ar(d,sr)-1;break;case"second":d=this._d.valueOf(),d+=Ts-ar(d,Ts)-1;break}return this._d.setTime(d),r.updateOffset(this,!0),this}function _g(){return this._d.valueOf()-(this._offset||0)*6e4}function Rg(){return Math.floor(this.valueOf()/1e3)}function Og(){return new Date(this.valueOf())}function Lg(){var i=this;return[i.year(),i.month(),i.date(),i.hour(),i.minute(),i.second(),i.millisecond()]}function Pg(){var i=this;return{years:i.year(),months:i.month(),date:i.date(),hours:i.hours(),minutes:i.minutes(),seconds:i.seconds(),milliseconds:i.milliseconds()}}function Bg(){return this.isValid()?this.toISOString():null}function Ag(){return N(this)}function Fg(){return g({},T(this))}function Vg(){return T(this).overflow}function $g(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}F("N",0,0,"eraAbbr"),F("NN",0,0,"eraAbbr"),F("NNN",0,0,"eraAbbr"),F("NNNN",0,0,"eraName"),F("NNNNN",0,0,"eraNarrow"),F("y",["y",1],"yo","eraYear"),F("y",["yy",2],0,"eraYear"),F("y",["yyy",3],0,"eraYear"),F("y",["yyyy",4],0,"eraYear"),ue("N",Wa),ue("NN",Wa),ue("NNN",Wa),ue("NNNN",Zg),ue("NNNNN",Xg),Fe(["N","NN","NNN","NNNN","NNNNN"],function(i,d,S,b){var D=S._locale.erasParse(i,b,S._strict);D?T(S).era=D:T(S).invalidEra=i}),ue("y",kt),ue("yy",kt),ue("yyy",kt),ue("yyyy",kt),ue("yo",Qg),Fe(["y","yy","yyy","yyyy"],pt),Fe(["yo"],function(i,d,S,b){var D;S._locale._eraYearOrdinalRegex&&(D=i.match(S._locale._eraYearOrdinalRegex)),S._locale.eraYearOrdinalParse?d[pt]=S._locale.eraYearOrdinalParse(i,D):d[pt]=parseInt(i,10)});function Kg(i,d){var S,b,D,P=this._eras||rn("en")._eras;for(S=0,b=P.length;S<b;++S){switch(typeof P[S].since){case"string":D=r(P[S].since).startOf("day"),P[S].since=D.valueOf();break}switch(typeof P[S].until){case"undefined":P[S].until=1/0;break;case"string":D=r(P[S].until).startOf("day").valueOf(),P[S].until=D.valueOf();break}}return P}function Hg(i,d,S){var b,D,P=this.eras(),q,me,Te;for(i=i.toUpperCase(),b=0,D=P.length;b<D;++b)if(q=P[b].name.toUpperCase(),me=P[b].abbr.toUpperCase(),Te=P[b].narrow.toUpperCase(),S)switch(d){case"N":case"NN":case"NNN":if(me===i)return P[b];break;case"NNNN":if(q===i)return P[b];break;case"NNNNN":if(Te===i)return P[b];break}else if([q,me,Te].indexOf(i)>=0)return P[b]}function Wg(i,d){var S=i.since<=i.until?1:-1;return d===void 0?r(i.since).year():r(i.since).year()+(d-i.offset)*S}function Gg(){var i,d,S,b=this.localeData().eras();for(i=0,d=b.length;i<d;++i)if(S=this.clone().startOf("day").valueOf(),b[i].since<=S&&S<=b[i].until||b[i].until<=S&&S<=b[i].since)return b[i].name;return""}function Yg(){var i,d,S,b=this.localeData().eras();for(i=0,d=b.length;i<d;++i)if(S=this.clone().startOf("day").valueOf(),b[i].since<=S&&S<=b[i].until||b[i].until<=S&&S<=b[i].since)return b[i].narrow;return""}function Ug(){var i,d,S,b=this.localeData().eras();for(i=0,d=b.length;i<d;++i)if(S=this.clone().startOf("day").valueOf(),b[i].since<=S&&S<=b[i].until||b[i].until<=S&&S<=b[i].since)return b[i].abbr;return""}function jg(){var i,d,S,b,D=this.localeData().eras();for(i=0,d=D.length;i<d;++i)if(S=D[i].since<=D[i].until?1:-1,b=this.clone().startOf("day").valueOf(),D[i].since<=b&&b<=D[i].until||D[i].until<=b&&b<=D[i].since)return(this.year()-r(D[i].since).year())*S+D[i].offset;return this.year()}function zg(i){return c(this,"_erasNameRegex")||Ga.call(this),i?this._erasNameRegex:this._erasRegex}function qg(i){return c(this,"_erasAbbrRegex")||Ga.call(this),i?this._erasAbbrRegex:this._erasRegex}function Jg(i){return c(this,"_erasNarrowRegex")||Ga.call(this),i?this._erasNarrowRegex:this._erasRegex}function Wa(i,d){return d.erasAbbrRegex(i)}function Zg(i,d){return d.erasNameRegex(i)}function Xg(i,d){return d.erasNarrowRegex(i)}function Qg(i,d){return d._eraYearOrdinalRegex||kt}function Ga(){var i=[],d=[],S=[],b=[],D,P,q,me,Te,Ie=this.eras();for(D=0,P=Ie.length;D<P;++D)q=Qt(Ie[D].name),me=Qt(Ie[D].abbr),Te=Qt(Ie[D].narrow),d.push(q),i.push(me),S.push(Te),b.push(q),b.push(me),b.push(Te);this._erasRegex=new RegExp("^("+b.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+d.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+i.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+S.join("|")+")","i")}F(0,["gg",2],0,function(){return this.weekYear()%100}),F(0,["GG",2],0,function(){return this.isoWeekYear()%100});function ws(i,d){F(0,[i,i.length],0,d)}ws("gggg","weekYear"),ws("ggggg","weekYear"),ws("GGGG","isoWeekYear"),ws("GGGGG","isoWeekYear"),ue("G",At),ue("g",At),ue("GG",Ee,Qe),ue("gg",Ee,Qe),ue("GGGG",Ke,xe),ue("gggg",Ke,xe),ue("GGGGG",dt,we),ue("ggggg",dt,we),kr(["gggg","ggggg","GGGG","GGGGG"],function(i,d,S,b){d[b.substr(0,2)]=De(i)}),kr(["gg","GG"],function(i,d,S,b){d[b]=r.parseTwoDigitYear(i)});function eb(i){return oc.call(this,i,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function tb(i){return oc.call(this,i,this.isoWeek(),this.isoWeekday(),1,4)}function nb(){return nn(this.year(),1,4)}function rb(){return nn(this.isoWeekYear(),1,4)}function sb(){var i=this.localeData()._week;return nn(this.year(),i.dow,i.doy)}function ab(){var i=this.localeData()._week;return nn(this.weekYear(),i.dow,i.doy)}function oc(i,d,S,b,D){var P;return i==null?Rr(this,b,D).year:(P=nn(i,b,D),d>P&&(d=P),ob.call(this,i,d,S,b,D))}function ob(i,d,S,b,D){var P=Al(i,d,S,b,D),q=_r(P.year,0,P.dayOfYear);return this.year(q.getUTCFullYear()),this.month(q.getUTCMonth()),this.date(q.getUTCDate()),this}F("Q",0,"Qo","quarter"),ue("Q",Ye),Fe("Q",function(i,d){d[en]=(De(i)-1)*3});function ib(i){return i==null?Math.ceil((this.month()+1)/3):this.month((i-1)*3+this.month()%3)}F("D",["DD",2],"Do","date"),ue("D",Ee,Je),ue("DD",Ee,Qe),ue("Do",function(i,d){return i?d._dayOfMonthOrdinalParse||d._ordinalParse:d._dayOfMonthOrdinalParseLenient}),Fe(["D","DD"],jt),Fe("Do",function(i,d){d[jt]=De(i.match(Ee)[0])});var ic=nr("Date",!0);F("DDD",["DDDD",3],"DDDo","dayOfYear"),ue("DDD",ct),ue("DDDD",ce),Fe(["DDD","DDDD"],function(i,d,S){S._dayOfYear=De(i)});function lb(i){var d=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return i==null?d:this.add(i-d,"d")}F("m",["mm",2],0,"minute"),ue("m",Ee,Ft),ue("mm",Ee,Qe),Fe(["m","mm"],Vt);var cb=nr("Minutes",!1);F("s",["ss",2],0,"second"),ue("s",Ee,Ft),ue("ss",Ee,Qe),Fe(["s","ss"],tn);var db=nr("Seconds",!1);F("S",0,0,function(){return~~(this.millisecond()/100)}),F(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),F(0,["SSS",3],0,"millisecond"),F(0,["SSSS",4],0,function(){return this.millisecond()*10}),F(0,["SSSSS",5],0,function(){return this.millisecond()*100}),F(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),F(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),F(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),F(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),ue("S",ct,Ye),ue("SS",ct,Qe),ue("SSS",ct,ce);var hn,lc;for(hn="SSSS";hn.length<=9;hn+="S")ue(hn,kt);function pb(i,d){d[On]=De(("0."+i)*1e3)}for(hn="S";hn.length<=9;hn+="S")Fe(hn,pb);lc=nr("Milliseconds",!1),F("z",0,0,"zoneAbbr"),F("zz",0,0,"zoneName");function ub(){return this._isUTC?"UTC":""}function mb(){return this._isUTC?"Coordinated Universal Time":""}var oe=R.prototype;oe.add=ag,oe.calendar=ug,oe.clone=mg,oe.diff=yg,oe.endOf=Mg,oe.format=Cg,oe.from=Dg,oe.fromNow=Ng,oe.to=xg,oe.toNow=kg,oe.get=wh,oe.invalidAt=Vg,oe.isAfter=fg,oe.isBefore=hg,oe.isBetween=Sg,oe.isSame=gg,oe.isSameOrAfter=bg,oe.isSameOrBefore=vg,oe.isValid=Ag,oe.lang=tc,oe.locale=ec,oe.localeData=nc,oe.max=AS,oe.min=BS,oe.parsingFlags=Fg,oe.set=Ch,oe.startOf=Ig,oe.subtract=og,oe.toArray=Lg,oe.toObject=Pg,oe.toDate=Og,oe.toISOString=Eg,oe.inspect=wg,typeof Symbol<"u"&&Symbol.for!=null&&(oe[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),oe.toJSON=Bg,oe.toString=Tg,oe.unix=Rg,oe.valueOf=_g,oe.creationData=$g,oe.eraName=Gg,oe.eraNarrow=Yg,oe.eraAbbr=Ug,oe.eraYear=jg,oe.year=Ml,oe.isLeapYear=Eh,oe.weekYear=eb,oe.isoWeekYear=tb,oe.quarter=oe.quarters=ib,oe.month=Pl,oe.daysInMonth=Oh,oe.week=oe.weeks=Kh,oe.isoWeek=oe.isoWeeks=Hh,oe.weeksInYear=sb,oe.weeksInWeekYear=ab,oe.isoWeeksInYear=nb,oe.isoWeeksInISOWeekYear=rb,oe.date=ic,oe.day=oe.days=tS,oe.weekday=nS,oe.isoWeekday=rS,oe.dayOfYear=lb,oe.hour=oe.hours=dS,oe.minute=oe.minutes=cb,oe.second=oe.seconds=db,oe.millisecond=oe.milliseconds=lc,oe.utcOffset=US,oe.utc=zS,oe.local=qS,oe.parseZone=JS,oe.hasAlignedHourOffset=ZS,oe.isDST=XS,oe.isLocal=eg,oe.isUtcOffset=tg,oe.isUtc=ql,oe.isUTC=ql,oe.zoneAbbr=ub,oe.zoneName=mb,oe.dates=O("dates accessor is deprecated. Use date instead.",ic),oe.months=O("months accessor is deprecated. Use month instead",Pl),oe.years=O("years accessor is deprecated. Use year instead",Ml),oe.zone=O("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",jS),oe.isDSTShifted=O("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",QS);function fb(i){return Ue(i*1e3)}function hb(){return Ue.apply(null,arguments).parseZone()}function cc(i){return i}var Oe=j.prototype;Oe.calendar=de,Oe.longDateFormat=le,Oe.invalidDate=Ce,Oe.ordinal=mt,Oe.preparse=cc,Oe.postformat=cc,Oe.relativeTime=ye,Oe.pastFuture=Be,Oe.set=Y,Oe.eras=Kg,Oe.erasParse=Hg,Oe.erasConvertYear=Wg,Oe.erasAbbrRegex=qg,Oe.erasNameRegex=zg,Oe.erasNarrowRegex=Jg,Oe.months=Ih,Oe.monthsShort=Mh,Oe.monthsParse=Rh,Oe.monthsRegex=Ph,Oe.monthsShortRegex=Lh,Oe.week=Ah,Oe.firstDayOfYear=$h,Oe.firstDayOfWeek=Vh,Oe.weekdays=Jh,Oe.weekdaysMin=Xh,Oe.weekdaysShort=Zh,Oe.weekdaysParse=eS,Oe.weekdaysRegex=sS,Oe.weekdaysShortRegex=aS,Oe.weekdaysMinRegex=oS,Oe.isPM=lS,Oe.meridiem=pS;function Cs(i,d,S,b){var D=rn(),P=v().set(b,d);return D[S](P,i)}function dc(i,d,S){if(m(i)&&(d=i,i=void 0),i=i||"",d!=null)return Cs(i,d,S,"month");var b,D=[];for(b=0;b<12;b++)D[b]=Cs(i,b,S,"month");return D}function Ya(i,d,S,b){typeof i=="boolean"?(m(d)&&(S=d,d=void 0),d=d||""):(d=i,S=d,i=!1,m(d)&&(S=d,d=void 0),d=d||"");var D=rn(),P=i?D._week.dow:0,q,me=[];if(S!=null)return Cs(d,(S+P)%7,b,"day");for(q=0;q<7;q++)me[q]=Cs(d,(q+P)%7,b,"day");return me}function Sb(i,d){return dc(i,d,"months")}function gb(i,d){return dc(i,d,"monthsShort")}function bb(i,d,S){return Ya(i,d,S,"weekdays")}function vb(i,d,S){return Ya(i,d,S,"weekdaysShort")}function yb(i,d,S){return Ya(i,d,S,"weekdaysMin")}fn("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(i){var d=i%10,S=De(i%100/10)===1?"th":d===1?"st":d===2?"nd":d===3?"rd":"th";return i+S}}),r.lang=O("moment.lang is deprecated. Use moment.locale instead.",fn),r.langData=O("moment.langData is deprecated. Use moment.localeData instead.",rn);var sn=Math.abs;function Tb(){var i=this._data;return this._milliseconds=sn(this._milliseconds),this._days=sn(this._days),this._months=sn(this._months),i.milliseconds=sn(i.milliseconds),i.seconds=sn(i.seconds),i.minutes=sn(i.minutes),i.hours=sn(i.hours),i.months=sn(i.months),i.years=sn(i.years),this}function pc(i,d,S,b){var D=$t(d,S);return i._milliseconds+=b*D._milliseconds,i._days+=b*D._days,i._months+=b*D._months,i._bubble()}function Eb(i,d){return pc(this,i,d,1)}function wb(i,d){return pc(this,i,d,-1)}function uc(i){return i<0?Math.floor(i):Math.ceil(i)}function Cb(){var i=this._milliseconds,d=this._days,S=this._months,b=this._data,D,P,q,me,Te;return i>=0&&d>=0&&S>=0||i<=0&&d<=0&&S<=0||(i+=uc(Ua(S)+d)*864e5,d=0,S=0),b.milliseconds=i%1e3,D=It(i/1e3),b.seconds=D%60,P=It(D/60),b.minutes=P%60,q=It(P/60),b.hours=q%24,d+=It(q/24),Te=It(mc(d)),S+=Te,d-=uc(Ua(Te)),me=It(S/12),S%=12,b.days=d,b.months=S,b.years=me,this}function mc(i){return i*4800/146097}function Ua(i){return i*146097/4800}function Db(i){if(!this.isValid())return NaN;var d,S,b=this._milliseconds;if(i=he(i),i==="month"||i==="quarter"||i==="year")switch(d=this._days+b/864e5,S=this._months+mc(d),i){case"month":return S;case"quarter":return S/3;case"year":return S/12}else switch(d=this._days+Math.round(Ua(this._months)),i){case"week":return d/7+b/6048e5;case"day":return d+b/864e5;case"hour":return d*24+b/36e5;case"minute":return d*1440+b/6e4;case"second":return d*86400+b/1e3;case"millisecond":return Math.floor(d*864e5)+b;default:throw new Error("Unknown unit "+i)}}function an(i){return function(){return this.as(i)}}var fc=an("ms"),Nb=an("s"),xb=an("m"),kb=an("h"),Ib=an("d"),Mb=an("w"),_b=an("M"),Rb=an("Q"),Ob=an("y"),Lb=fc;function Pb(){return $t(this)}function Bb(i){return i=he(i),this.isValid()?this[i+"s"]():NaN}function Pn(i){return function(){return this.isValid()?this._data[i]:NaN}}var Ab=Pn("milliseconds"),Fb=Pn("seconds"),Vb=Pn("minutes"),$b=Pn("hours"),Kb=Pn("days"),Hb=Pn("months"),Wb=Pn("years");function Gb(){return It(this.days()/7)}var on=Math.round,or={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Yb(i,d,S,b,D){return D.relativeTime(d||1,!!S,i,b)}function Ub(i,d,S,b){var D=$t(i).abs(),P=on(D.as("s")),q=on(D.as("m")),me=on(D.as("h")),Te=on(D.as("d")),Ie=on(D.as("M")),ht=on(D.as("w")),ln=on(D.as("y")),Sn=P<=S.ss&&["s",P]||P<S.s&&["ss",P]||q<=1&&["m"]||q<S.m&&["mm",q]||me<=1&&["h"]||me<S.h&&["hh",me]||Te<=1&&["d"]||Te<S.d&&["dd",Te];return S.w!=null&&(Sn=Sn||ht<=1&&["w"]||ht<S.w&&["ww",ht]),Sn=Sn||Ie<=1&&["M"]||Ie<S.M&&["MM",Ie]||ln<=1&&["y"]||["yy",ln],Sn[2]=d,Sn[3]=+i>0,Sn[4]=b,Yb.apply(null,Sn)}function jb(i){return i===void 0?on:typeof i=="function"?(on=i,!0):!1}function zb(i,d){return or[i]===void 0?!1:d===void 0?or[i]:(or[i]=d,i==="s"&&(or.ss=d-1),!0)}function qb(i,d){if(!this.isValid())return this.localeData().invalidDate();var S=!1,b=or,D,P;return typeof i=="object"&&(d=i,i=!1),typeof i=="boolean"&&(S=i),typeof d=="object"&&(b=Object.assign({},or,d),d.s!=null&&d.ss==null&&(b.ss=d.s-1)),D=this.localeData(),P=Ub(this,!S,b,D),S&&(P=D.pastFuture(+this,P)),D.postformat(P)}var ja=Math.abs;function ir(i){return(i>0)-(i<0)||+i}function Ds(){if(!this.isValid())return this.localeData().invalidDate();var i=ja(this._milliseconds)/1e3,d=ja(this._days),S=ja(this._months),b,D,P,q,me=this.asSeconds(),Te,Ie,ht,ln;return me?(b=It(i/60),D=It(b/60),i%=60,b%=60,P=It(S/12),S%=12,q=i?i.toFixed(3).replace(/\.?0+$/,""):"",Te=me<0?"-":"",Ie=ir(this._months)!==ir(me)?"-":"",ht=ir(this._days)!==ir(me)?"-":"",ln=ir(this._milliseconds)!==ir(me)?"-":"",Te+"P"+(P?Ie+P+"Y":"")+(S?Ie+S+"M":"")+(d?ht+d+"D":"")+(D||b||i?"T":"")+(D?ln+D+"H":"")+(b?ln+b+"M":"")+(i?ln+q+"S":"")):"P0D"}var Me=bs.prototype;Me.isValid=HS,Me.abs=Tb,Me.add=Eb,Me.subtract=wb,Me.as=Db,Me.asMilliseconds=fc,Me.asSeconds=Nb,Me.asMinutes=xb,Me.asHours=kb,Me.asDays=Ib,Me.asWeeks=Mb,Me.asMonths=_b,Me.asQuarters=Rb,Me.asYears=Ob,Me.valueOf=Lb,Me._bubble=Cb,Me.clone=Pb,Me.get=Bb,Me.milliseconds=Ab,Me.seconds=Fb,Me.minutes=Vb,Me.hours=$b,Me.days=Kb,Me.weeks=Gb,Me.months=Hb,Me.years=Wb,Me.humanize=qb,Me.toISOString=Ds,Me.toString=Ds,Me.toJSON=Ds,Me.locale=ec,Me.localeData=nc,Me.toIsoString=O("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Ds),Me.lang=tc,F("X",0,0,"unix"),F("x",0,0,"valueOf"),ue("x",At),ue("X",be),Fe("X",function(i,d,S){S._d=new Date(parseFloat(i)*1e3)}),Fe("x",function(i,d,S){S._d=new Date(De(i))});//! moment.js
|
|
1904
|
-
return r.version="2.30.1",
|
|
1905
|
-
var r=n.defineLocale("en-au",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(
|
|
1906
|
-
var r=n.defineLocale("en-ca",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"YYYY-MM-DD",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(
|
|
1907
|
-
var r=n.defineLocale("en-ie",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(
|
|
1908
|
-
var r=n.defineLocale("en-gb",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(
|
|
1909
|
-
var r=n.defineLocale("fr-ca",{months:"janvier_f
|
|
1910
|
-
var r=/^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,
|
|
1911
|
-
var r="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),
|
|
1912
|
-
var r=n.defineLocale("zh-cn",{months:"
|
|
1913
|
-
var r=n.defineLocale("zh-tw",{months:"
|
|
1903
|
+
`+new Error().stack),S=!1}return d.apply(this,arguments)},d)}var W={};function z(i,d){r.deprecationHandler!=null&&r.deprecationHandler(i,d),W[i]||(R(d),W[i]=!0)}r.suppressDeprecationWarnings=!1,r.deprecationHandler=null;function M(i){return typeof Function<"u"&&i instanceof Function||Object.prototype.toString.call(i)==="[object Function]"}function U(i){var d,S;for(S in i)c(i,S)&&(d=i[S],M(d)?this[S]=d:this["_"+S]=d);this._config=i,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function G(i,d){var S=g({},i),b;for(b in d)c(d,b)&&(l(i[b])&&l(d[b])?(S[b]={},g(S[b],i[b]),g(S[b],d[b])):d[b]!=null?S[b]=d[b]:delete S[b]);for(b in i)c(i,b)&&!c(d,b)&&l(i[b])&&(S[b]=g({},S[b]));return S}function j(i){i!=null&&this.set(i)}var A;Object.keys?A=Object.keys:A=function(i){var d,S=[];for(d in i)c(i,d)&&S.push(d);return S};var ee={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function le(i,d,S){var b=this._calendar[i]||this._calendar.sameElse;return M(b)?b.call(d,S):b}function P(i,d,S){var b=""+Math.abs(i),N=d-b.length,B=i>=0;return(B?S?"+":"":"-")+Math.pow(10,Math.max(0,N)).toString().substr(1)+b}var Y=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,se=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,re={},Q={};function V(i,d,S,b){var N=b;typeof b=="string"&&(N=function(){return this[b]()}),i&&(Q[i]=N),d&&(Q[d[0]]=function(){return P(N.apply(this,arguments),d[1],d[2])}),S&&(Q[S]=function(){return this.localeData().ordinal(N.apply(this,arguments),i)})}function Z(i){return i.match(/\[[\s\S]/)?i.replace(/^\[|\]$/g,""):i.replace(/\\/g,"")}function J(i){var d=i.match(Y),S,b;for(S=0,b=d.length;S<b;S++)Q[d[S]]?d[S]=Q[d[S]]:d[S]=Z(d[S]);return function(N){var B="",q;for(q=0;q<b;q++)B+=M(d[q])?d[q].call(N,i):d[q];return B}}function ae(i,d){return i.isValid()?(d=te(d,i.localeData()),re[d]=re[d]||J(d),re[d](i)):i.localeData().invalidDate()}function te(i,d){var S=5;function b(N){return d.longDateFormat(N)||N}for(se.lastIndex=0;S>=0&&se.test(i);)i=i.replace(se,b),se.lastIndex=0,S-=1;return i}var me={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function ie(i){var d=this._longDateFormat[i],S=this._longDateFormat[i.toUpperCase()];return d||!S?d:(this._longDateFormat[i]=S.match(Y).map(function(b){return b==="MMMM"||b==="MM"||b==="DD"||b==="dddd"?b.slice(1):b}).join(""),this._longDateFormat[i])}var ne="Invalid date";function Ee(){return this._invalidDate}var Me="%d",it=/\d{1,2}/;function ut(i){return this._ordinal.replace("%d",i)}var lt={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function ve(i,d,S,b){var N=this._relativeTime[S];return M(N)?N(i,d,S,b):N.replace(/%d/i,i)}function Pe(i,d){var S=this._relativeTime[i>0?"future":"past"];return M(S)?S(d):S.replace(/%s/i,d)}var Je={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function fe(i){return typeof i=="string"?Je[i]||Je[i.toLowerCase()]:void 0}function He(i){var d={},S,b;for(b in i)c(i,b)&&(S=fe(b),S&&(d[S]=i[b]));return d}var Be={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function yt(i){var d=[],S;for(S in i)c(i,S)&&d.push({unit:S,priority:Be[S]});return d.sort(function(b,N){return b.priority-N.priority}),d}var Ge=/\d/,Xe=/\d\d/,de=/\d{3}/,Re=/\d{4}/,ke=/[+-]?\d{6}/,Te=/\d\d?/,De=/\d\d\d\d?/,mt=/\d\d\d\d\d\d?/,ct=/\d{1,3}/,$e=/\d{1,4}/,dt=/[+-]?\d{1,6}/,xt=/\d+/,Bt=/[+-]?\d+/,xo=/Z|[+-]\d\d:?\d\d/gi,In=/Z|[+-]\d\d(?::?\d\d)?/gi,ge=/[+-]?\d+(\.\d{1,3})?/,be=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,qe=/^[1-9]\d?/,At=/^([1-9]\d|\d)/,Mn;Mn={};function pe(i,d,S){Mn[i]=M(d)?d:function(b,N){return b&&S?S:d}}function Sh(i,d){return c(Mn,i)?Mn[i](d._strict,d._locale):new RegExp(gh(i))}function gh(i){return Xt(i.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(d,S,b,N,B){return S||b||N||B}))}function Xt(i){return i.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function kt(i){return i<0?Math.ceil(i)||0:Math.floor(i)}function we(i){var d=+i,S=0;return d!==0&&isFinite(d)&&(S=kt(d)),S}var ko={};function Ae(i,d){var S,b=d,N;for(typeof i=="string"&&(i=[i]),m(d)&&(b=function(B,q){q[d]=we(B)}),N=i.length,S=0;S<N;S++)ko[i[S]]=b}function xr(i,d){Ae(i,function(S,b,N,B){N._w=N._w||{},d(S,N._w,N,B)})}function bh(i,d,S){d!=null&&c(ko,i)&&ko[i](d,S._a,S,i)}function ms(i){return i%4===0&&i%100!==0||i%400===0}var pt=0,Qt=1,Ut=2,Qe=3,Ft=4,en=5,_n=6,vh=7,yh=8;V("Y",0,0,function(){var i=this.year();return i<=9999?P(i,4):"+"+i}),V(0,["YY",2],0,function(){return this.year()%100}),V(0,["YYYY",4],0,"year"),V(0,["YYYYY",5],0,"year"),V(0,["YYYYYY",6,!0],0,"year"),pe("Y",Bt),pe("YY",Te,Xe),pe("YYYY",$e,Re),pe("YYYYY",dt,ke),pe("YYYYYY",dt,ke),Ae(["YYYYY","YYYYYY"],pt),Ae("YYYY",function(i,d){d[pt]=i.length===2?r.parseTwoDigitYear(i):we(i)}),Ae("YY",function(i,d){d[pt]=r.parseTwoDigitYear(i)}),Ae("Y",function(i,d){d[pt]=parseInt(i,10)});function kr(i){return ms(i)?366:365}r.parseTwoDigitYear=function(i){return we(i)+(we(i)>68?1900:2e3)};var Rl=er("FullYear",!0);function Th(){return ms(this.year())}function er(i,d){return function(S){return S!=null?(Ol(this,i,S),r.updateOffset(this,d),this):Ir(this,i)}}function Ir(i,d){if(!i.isValid())return NaN;var S=i._d,b=i._isUTC;switch(d){case"Milliseconds":return b?S.getUTCMilliseconds():S.getMilliseconds();case"Seconds":return b?S.getUTCSeconds():S.getSeconds();case"Minutes":return b?S.getUTCMinutes():S.getMinutes();case"Hours":return b?S.getUTCHours():S.getHours();case"Date":return b?S.getUTCDate():S.getDate();case"Day":return b?S.getUTCDay():S.getDay();case"Month":return b?S.getUTCMonth():S.getMonth();case"FullYear":return b?S.getUTCFullYear():S.getFullYear();default:return NaN}}function Ol(i,d,S){var b,N,B,q,ue;if(!(!i.isValid()||isNaN(S))){switch(b=i._d,N=i._isUTC,d){case"Milliseconds":return void(N?b.setUTCMilliseconds(S):b.setMilliseconds(S));case"Seconds":return void(N?b.setUTCSeconds(S):b.setSeconds(S));case"Minutes":return void(N?b.setUTCMinutes(S):b.setMinutes(S));case"Hours":return void(N?b.setUTCHours(S):b.setHours(S));case"Date":return void(N?b.setUTCDate(S):b.setDate(S));case"FullYear":break;default:return}B=S,q=i.month(),ue=i.date(),ue=ue===29&&q===1&&!ms(B)?28:ue,N?b.setUTCFullYear(B,q,ue):b.setFullYear(B,q,ue)}}function Eh(i){return i=fe(i),M(this[i])?this[i]():this}function wh(i,d){if(typeof i=="object"){i=He(i);var S=yt(i),b,N=S.length;for(b=0;b<N;b++)this[S[b].unit](i[S[b].unit])}else if(i=fe(i),M(this[i]))return this[i](d);return this}function Ch(i,d){return(i%d+d)%d}var Ze;Array.prototype.indexOf?Ze=Array.prototype.indexOf:Ze=function(i){var d;for(d=0;d<this.length;++d)if(this[d]===i)return d;return-1};function Io(i,d){if(isNaN(i)||isNaN(d))return NaN;var S=Ch(d,12);return i+=(d-S)/12,S===1?ms(i)?29:28:31-S%7%2}V("M",["MM",2],"Mo",function(){return this.month()+1}),V("MMM",0,0,function(i){return this.localeData().monthsShort(this,i)}),V("MMMM",0,0,function(i){return this.localeData().months(this,i)}),pe("M",Te,qe),pe("MM",Te,Xe),pe("MMM",function(i,d){return d.monthsShortRegex(i)}),pe("MMMM",function(i,d){return d.monthsRegex(i)}),Ae(["M","MM"],function(i,d){d[Qt]=we(i)-1}),Ae(["MMM","MMMM"],function(i,d,S,b){var N=S._locale.monthsParse(i,b,S._strict);N!=null?d[Qt]=N:T(S).invalidMonth=i});var Dh="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Ll="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Pl=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Nh=be,xh=be;function kh(i,d){return i?a(this._months)?this._months[i.month()]:this._months[(this._months.isFormat||Pl).test(d)?"format":"standalone"][i.month()]:a(this._months)?this._months:this._months.standalone}function Ih(i,d){return i?a(this._monthsShort)?this._monthsShort[i.month()]:this._monthsShort[Pl.test(d)?"format":"standalone"][i.month()]:a(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function Mh(i,d,S){var b,N,B,q=i.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],b=0;b<12;++b)B=v([2e3,b]),this._shortMonthsParse[b]=this.monthsShort(B,"").toLocaleLowerCase(),this._longMonthsParse[b]=this.months(B,"").toLocaleLowerCase();return S?d==="MMM"?(N=Ze.call(this._shortMonthsParse,q),N!==-1?N:null):(N=Ze.call(this._longMonthsParse,q),N!==-1?N:null):d==="MMM"?(N=Ze.call(this._shortMonthsParse,q),N!==-1?N:(N=Ze.call(this._longMonthsParse,q),N!==-1?N:null)):(N=Ze.call(this._longMonthsParse,q),N!==-1?N:(N=Ze.call(this._shortMonthsParse,q),N!==-1?N:null))}function _h(i,d,S){var b,N,B;if(this._monthsParseExact)return Mh.call(this,i,d,S);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),b=0;b<12;b++){if(N=v([2e3,b]),S&&!this._longMonthsParse[b]&&(this._longMonthsParse[b]=new RegExp("^"+this.months(N,"").replace(".","")+"$","i"),this._shortMonthsParse[b]=new RegExp("^"+this.monthsShort(N,"").replace(".","")+"$","i")),!S&&!this._monthsParse[b]&&(B="^"+this.months(N,"")+"|^"+this.monthsShort(N,""),this._monthsParse[b]=new RegExp(B.replace(".",""),"i")),S&&d==="MMMM"&&this._longMonthsParse[b].test(i))return b;if(S&&d==="MMM"&&this._shortMonthsParse[b].test(i))return b;if(!S&&this._monthsParse[b].test(i))return b}}function Bl(i,d){if(!i.isValid())return i;if(typeof d=="string"){if(/^\d+$/.test(d))d=we(d);else if(d=i.localeData().monthsParse(d),!m(d))return i}var S=d,b=i.date();return b=b<29?b:Math.min(b,Io(i.year(),S)),i._isUTC?i._d.setUTCMonth(S,b):i._d.setMonth(S,b),i}function Al(i){return i!=null?(Bl(this,i),r.updateOffset(this,!0),this):Ir(this,"Month")}function Rh(){return Io(this.year(),this.month())}function Oh(i){return this._monthsParseExact?(c(this,"_monthsRegex")||Fl.call(this),i?this._monthsShortStrictRegex:this._monthsShortRegex):(c(this,"_monthsShortRegex")||(this._monthsShortRegex=Nh),this._monthsShortStrictRegex&&i?this._monthsShortStrictRegex:this._monthsShortRegex)}function Lh(i){return this._monthsParseExact?(c(this,"_monthsRegex")||Fl.call(this),i?this._monthsStrictRegex:this._monthsRegex):(c(this,"_monthsRegex")||(this._monthsRegex=xh),this._monthsStrictRegex&&i?this._monthsStrictRegex:this._monthsRegex)}function Fl(){function i(ye,Ne){return Ne.length-ye.length}var d=[],S=[],b=[],N,B,q,ue;for(N=0;N<12;N++)B=v([2e3,N]),q=Xt(this.monthsShort(B,"")),ue=Xt(this.months(B,"")),d.push(q),S.push(ue),b.push(ue),b.push(q);d.sort(i),S.sort(i),b.sort(i),this._monthsRegex=new RegExp("^("+b.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+S.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+d.join("|")+")","i")}function Ph(i,d,S,b,N,B,q){var ue;return i<100&&i>=0?(ue=new Date(i+400,d,S,b,N,B,q),isFinite(ue.getFullYear())&&ue.setFullYear(i)):ue=new Date(i,d,S,b,N,B,q),ue}function Mr(i){var d,S;return i<100&&i>=0?(S=Array.prototype.slice.call(arguments),S[0]=i+400,d=new Date(Date.UTC.apply(null,S)),isFinite(d.getUTCFullYear())&&d.setUTCFullYear(i)):d=new Date(Date.UTC.apply(null,arguments)),d}function fs(i,d,S){var b=7+d-S,N=(7+Mr(i,0,b).getUTCDay()-d)%7;return-N+b-1}function Vl(i,d,S,b,N){var B=(7+S-b)%7,q=fs(i,b,N),ue=1+7*(d-1)+B+q,ye,Ne;return ue<=0?(ye=i-1,Ne=kr(ye)+ue):ue>kr(i)?(ye=i+1,Ne=ue-kr(i)):(ye=i,Ne=ue),{year:ye,dayOfYear:Ne}}function _r(i,d,S){var b=fs(i.year(),d,S),N=Math.floor((i.dayOfYear()-b-1)/7)+1,B,q;return N<1?(q=i.year()-1,B=N+tn(q,d,S)):N>tn(i.year(),d,S)?(B=N-tn(i.year(),d,S),q=i.year()+1):(q=i.year(),B=N),{week:B,year:q}}function tn(i,d,S){var b=fs(i,d,S),N=fs(i+1,d,S);return(kr(i)-b+N)/7}V("w",["ww",2],"wo","week"),V("W",["WW",2],"Wo","isoWeek"),pe("w",Te,qe),pe("ww",Te,Xe),pe("W",Te,qe),pe("WW",Te,Xe),xr(["w","ww","W","WW"],function(i,d,S,b){d[b.substr(0,1)]=we(i)});function Bh(i){return _r(i,this._week.dow,this._week.doy).week}var Ah={dow:0,doy:6};function Fh(){return this._week.dow}function Vh(){return this._week.doy}function $h(i){var d=this.localeData().week(this);return i==null?d:this.add((i-d)*7,"d")}function Kh(i){var d=_r(this,1,4).week;return i==null?d:this.add((i-d)*7,"d")}V("d",0,"do","day"),V("dd",0,0,function(i){return this.localeData().weekdaysMin(this,i)}),V("ddd",0,0,function(i){return this.localeData().weekdaysShort(this,i)}),V("dddd",0,0,function(i){return this.localeData().weekdays(this,i)}),V("e",0,0,"weekday"),V("E",0,0,"isoWeekday"),pe("d",Te),pe("e",Te),pe("E",Te),pe("dd",function(i,d){return d.weekdaysMinRegex(i)}),pe("ddd",function(i,d){return d.weekdaysShortRegex(i)}),pe("dddd",function(i,d){return d.weekdaysRegex(i)}),xr(["dd","ddd","dddd"],function(i,d,S,b){var N=S._locale.weekdaysParse(i,b,S._strict);N!=null?d.d=N:T(S).invalidWeekday=i}),xr(["d","e","E"],function(i,d,S,b){d[b]=we(i)});function Hh(i,d){return typeof i!="string"?i:isNaN(i)?(i=d.weekdaysParse(i),typeof i=="number"?i:null):parseInt(i,10)}function Wh(i,d){return typeof i=="string"?d.weekdaysParse(i)%7||7:isNaN(i)?null:i}function Mo(i,d){return i.slice(d,7).concat(i.slice(0,d))}var Gh="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),$l="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Yh="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Uh=be,jh=be,zh=be;function qh(i,d){var S=a(this._weekdays)?this._weekdays:this._weekdays[i&&i!==!0&&this._weekdays.isFormat.test(d)?"format":"standalone"];return i===!0?Mo(S,this._week.dow):i?S[i.day()]:S}function Jh(i){return i===!0?Mo(this._weekdaysShort,this._week.dow):i?this._weekdaysShort[i.day()]:this._weekdaysShort}function Zh(i){return i===!0?Mo(this._weekdaysMin,this._week.dow):i?this._weekdaysMin[i.day()]:this._weekdaysMin}function Xh(i,d,S){var b,N,B,q=i.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],b=0;b<7;++b)B=v([2e3,1]).day(b),this._minWeekdaysParse[b]=this.weekdaysMin(B,"").toLocaleLowerCase(),this._shortWeekdaysParse[b]=this.weekdaysShort(B,"").toLocaleLowerCase(),this._weekdaysParse[b]=this.weekdays(B,"").toLocaleLowerCase();return S?d==="dddd"?(N=Ze.call(this._weekdaysParse,q),N!==-1?N:null):d==="ddd"?(N=Ze.call(this._shortWeekdaysParse,q),N!==-1?N:null):(N=Ze.call(this._minWeekdaysParse,q),N!==-1?N:null):d==="dddd"?(N=Ze.call(this._weekdaysParse,q),N!==-1||(N=Ze.call(this._shortWeekdaysParse,q),N!==-1)?N:(N=Ze.call(this._minWeekdaysParse,q),N!==-1?N:null)):d==="ddd"?(N=Ze.call(this._shortWeekdaysParse,q),N!==-1||(N=Ze.call(this._weekdaysParse,q),N!==-1)?N:(N=Ze.call(this._minWeekdaysParse,q),N!==-1?N:null)):(N=Ze.call(this._minWeekdaysParse,q),N!==-1||(N=Ze.call(this._weekdaysParse,q),N!==-1)?N:(N=Ze.call(this._shortWeekdaysParse,q),N!==-1?N:null))}function Qh(i,d,S){var b,N,B;if(this._weekdaysParseExact)return Xh.call(this,i,d,S);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),b=0;b<7;b++){if(N=v([2e3,1]).day(b),S&&!this._fullWeekdaysParse[b]&&(this._fullWeekdaysParse[b]=new RegExp("^"+this.weekdays(N,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[b]=new RegExp("^"+this.weekdaysShort(N,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[b]=new RegExp("^"+this.weekdaysMin(N,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[b]||(B="^"+this.weekdays(N,"")+"|^"+this.weekdaysShort(N,"")+"|^"+this.weekdaysMin(N,""),this._weekdaysParse[b]=new RegExp(B.replace(".",""),"i")),S&&d==="dddd"&&this._fullWeekdaysParse[b].test(i))return b;if(S&&d==="ddd"&&this._shortWeekdaysParse[b].test(i))return b;if(S&&d==="dd"&&this._minWeekdaysParse[b].test(i))return b;if(!S&&this._weekdaysParse[b].test(i))return b}}function eS(i){if(!this.isValid())return i!=null?this:NaN;var d=Ir(this,"Day");return i!=null?(i=Hh(i,this.localeData()),this.add(i-d,"d")):d}function tS(i){if(!this.isValid())return i!=null?this:NaN;var d=(this.day()+7-this.localeData()._week.dow)%7;return i==null?d:this.add(i-d,"d")}function nS(i){if(!this.isValid())return i!=null?this:NaN;if(i!=null){var d=Wh(i,this.localeData());return this.day(this.day()%7?d:d-7)}else return this.day()||7}function rS(i){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||_o.call(this),i?this._weekdaysStrictRegex:this._weekdaysRegex):(c(this,"_weekdaysRegex")||(this._weekdaysRegex=Uh),this._weekdaysStrictRegex&&i?this._weekdaysStrictRegex:this._weekdaysRegex)}function sS(i){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||_o.call(this),i?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(c(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=jh),this._weekdaysShortStrictRegex&&i?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function oS(i){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||_o.call(this),i?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(c(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=zh),this._weekdaysMinStrictRegex&&i?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function _o(){function i(ft,an){return an.length-ft.length}var d=[],S=[],b=[],N=[],B,q,ue,ye,Ne;for(B=0;B<7;B++)q=v([2e3,1]).day(B),ue=Xt(this.weekdaysMin(q,"")),ye=Xt(this.weekdaysShort(q,"")),Ne=Xt(this.weekdays(q,"")),d.push(ue),S.push(ye),b.push(Ne),N.push(ue),N.push(ye),N.push(Ne);d.sort(i),S.sort(i),b.sort(i),N.sort(i),this._weekdaysRegex=new RegExp("^("+N.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+b.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+S.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+d.join("|")+")","i")}function Ro(){return this.hours()%12||12}function aS(){return this.hours()||24}V("H",["HH",2],0,"hour"),V("h",["hh",2],0,Ro),V("k",["kk",2],0,aS),V("hmm",0,0,function(){return""+Ro.apply(this)+P(this.minutes(),2)}),V("hmmss",0,0,function(){return""+Ro.apply(this)+P(this.minutes(),2)+P(this.seconds(),2)}),V("Hmm",0,0,function(){return""+this.hours()+P(this.minutes(),2)}),V("Hmmss",0,0,function(){return""+this.hours()+P(this.minutes(),2)+P(this.seconds(),2)});function Kl(i,d){V(i,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),d)})}Kl("a",!0),Kl("A",!1);function Hl(i,d){return d._meridiemParse}pe("a",Hl),pe("A",Hl),pe("H",Te,At),pe("h",Te,qe),pe("k",Te,qe),pe("HH",Te,Xe),pe("hh",Te,Xe),pe("kk",Te,Xe),pe("hmm",De),pe("hmmss",mt),pe("Hmm",De),pe("Hmmss",mt),Ae(["H","HH"],Qe),Ae(["k","kk"],function(i,d,S){var b=we(i);d[Qe]=b===24?0:b}),Ae(["a","A"],function(i,d,S){S._isPm=S._locale.isPM(i),S._meridiem=i}),Ae(["h","hh"],function(i,d,S){d[Qe]=we(i),T(S).bigHour=!0}),Ae("hmm",function(i,d,S){var b=i.length-2;d[Qe]=we(i.substr(0,b)),d[Ft]=we(i.substr(b)),T(S).bigHour=!0}),Ae("hmmss",function(i,d,S){var b=i.length-4,N=i.length-2;d[Qe]=we(i.substr(0,b)),d[Ft]=we(i.substr(b,2)),d[en]=we(i.substr(N)),T(S).bigHour=!0}),Ae("Hmm",function(i,d,S){var b=i.length-2;d[Qe]=we(i.substr(0,b)),d[Ft]=we(i.substr(b))}),Ae("Hmmss",function(i,d,S){var b=i.length-4,N=i.length-2;d[Qe]=we(i.substr(0,b)),d[Ft]=we(i.substr(b,2)),d[en]=we(i.substr(N))});function iS(i){return(i+"").toLowerCase().charAt(0)==="p"}var lS=/[ap]\.?m?\.?/i,cS=er("Hours",!0);function dS(i,d,S){return i>11?S?"pm":"PM":S?"am":"AM"}var Wl={calendar:ee,longDateFormat:me,invalidDate:ne,ordinal:Me,dayOfMonthOrdinalParse:it,relativeTime:lt,months:Dh,monthsShort:Ll,week:Ah,weekdays:Gh,weekdaysMin:Yh,weekdaysShort:$l,meridiemParse:lS},je={},Rr={},Or;function pS(i,d){var S,b=Math.min(i.length,d.length);for(S=0;S<b;S+=1)if(i[S]!==d[S])return S;return b}function Gl(i){return i&&i.toLowerCase().replace("_","-")}function uS(i){for(var d=0,S,b,N,B;d<i.length;){for(B=Gl(i[d]).split("-"),S=B.length,b=Gl(i[d+1]),b=b?b.split("-"):null;S>0;){if(N=hs(B.slice(0,S).join("-")),N)return N;if(b&&b.length>=S&&pS(B,b)>=S-1)break;S--}d++}return Or}function mS(i){return!!(i&&i.match("^[^/\\\\]*$"))}function hs(i){var d=null,S;if(je[i]===void 0&&e&&e.exports&&mS(i))try{d=Or._abbr,S=Zt,S("./locale/"+i),mn(d)}catch{je[i]=null}return je[i]}function mn(i,d){var S;return i&&(f(d)?S=nn(i):S=Oo(i,d),S?Or=S:typeof console<"u"&&console.warn&&console.warn("Locale "+i+" not found. Did you forget to load it?")),Or._abbr}function Oo(i,d){if(d!==null){var S,b=Wl;if(d.abbr=i,je[i]!=null)z("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),b=je[i]._config;else if(d.parentLocale!=null)if(je[d.parentLocale]!=null)b=je[d.parentLocale]._config;else if(S=hs(d.parentLocale),S!=null)b=S._config;else return Rr[d.parentLocale]||(Rr[d.parentLocale]=[]),Rr[d.parentLocale].push({name:i,config:d}),null;return je[i]=new j(G(b,d)),Rr[i]&&Rr[i].forEach(function(N){Oo(N.name,N.config)}),mn(i),je[i]}else return delete je[i],null}function fS(i,d){if(d!=null){var S,b,N=Wl;je[i]!=null&&je[i].parentLocale!=null?je[i].set(G(je[i]._config,d)):(b=hs(i),b!=null&&(N=b._config),d=G(N,d),b==null&&(d.abbr=i),S=new j(d),S.parentLocale=je[i],je[i]=S),mn(i)}else je[i]!=null&&(je[i].parentLocale!=null?(je[i]=je[i].parentLocale,i===mn()&&mn(i)):je[i]!=null&&delete je[i]);return je[i]}function nn(i){var d;if(i&&i._locale&&i._locale._abbr&&(i=i._locale._abbr),!i)return Or;if(!a(i)){if(d=hs(i),d)return d;i=[i]}return uS(i)}function hS(){return A(je)}function Lo(i){var d,S=i._a;return S&&T(i).overflow===-2&&(d=S[Qt]<0||S[Qt]>11?Qt:S[Ut]<1||S[Ut]>Io(S[pt],S[Qt])?Ut:S[Qe]<0||S[Qe]>24||S[Qe]===24&&(S[Ft]!==0||S[en]!==0||S[_n]!==0)?Qe:S[Ft]<0||S[Ft]>59?Ft:S[en]<0||S[en]>59?en:S[_n]<0||S[_n]>999?_n:-1,T(i)._overflowDayOfYear&&(d<pt||d>Ut)&&(d=Ut),T(i)._overflowWeeks&&d===-1&&(d=vh),T(i)._overflowWeekday&&d===-1&&(d=yh),T(i).overflow=d),i}var SS=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,gS=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,bS=/Z|[+-]\d\d(?::?\d\d)?/,Ss=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Po=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],vS=/^\/?Date\((-?\d+)/i,yS=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,TS={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function Yl(i){var d,S,b=i._i,N=SS.exec(b)||gS.exec(b),B,q,ue,ye,Ne=Ss.length,ft=Po.length;if(N){for(T(i).iso=!0,d=0,S=Ne;d<S;d++)if(Ss[d][1].exec(N[1])){q=Ss[d][0],B=Ss[d][2]!==!1;break}if(q==null){i._isValid=!1;return}if(N[3]){for(d=0,S=ft;d<S;d++)if(Po[d][1].exec(N[3])){ue=(N[2]||" ")+Po[d][0];break}if(ue==null){i._isValid=!1;return}}if(!B&&ue!=null){i._isValid=!1;return}if(N[4])if(bS.exec(N[4]))ye="Z";else{i._isValid=!1;return}i._f=q+(ue||"")+(ye||""),Ao(i)}else i._isValid=!1}function ES(i,d,S,b,N,B){var q=[wS(i),Ll.indexOf(d),parseInt(S,10),parseInt(b,10),parseInt(N,10)];return B&&q.push(parseInt(B,10)),q}function wS(i){var d=parseInt(i,10);return d<=49?2e3+d:d<=999?1900+d:d}function CS(i){return i.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function DS(i,d,S){if(i){var b=$l.indexOf(i),N=new Date(d[0],d[1],d[2]).getDay();if(b!==N)return T(S).weekdayMismatch=!0,S._isValid=!1,!1}return!0}function NS(i,d,S){if(i)return TS[i];if(d)return 0;var b=parseInt(S,10),N=b%100,B=(b-N)/100;return B*60+N}function Ul(i){var d=yS.exec(CS(i._i)),S;if(d){if(S=ES(d[4],d[3],d[2],d[5],d[6],d[7]),!DS(d[1],S,i))return;i._a=S,i._tzm=NS(d[8],d[9],d[10]),i._d=Mr.apply(null,i._a),i._d.setUTCMinutes(i._d.getUTCMinutes()-i._tzm),T(i).rfc2822=!0}else i._isValid=!1}function xS(i){var d=vS.exec(i._i);if(d!==null){i._d=new Date(+d[1]);return}if(Yl(i),i._isValid===!1)delete i._isValid;else return;if(Ul(i),i._isValid===!1)delete i._isValid;else return;i._strict?i._isValid=!1:r.createFromInputFallback(i)}r.createFromInputFallback=O("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(i){i._d=new Date(i._i+(i._useUTC?" UTC":""))});function tr(i,d,S){return i??d??S}function kS(i){var d=new Date(r.now());return i._useUTC?[d.getUTCFullYear(),d.getUTCMonth(),d.getUTCDate()]:[d.getFullYear(),d.getMonth(),d.getDate()]}function Bo(i){var d,S,b=[],N,B,q;if(!i._d){for(N=kS(i),i._w&&i._a[Ut]==null&&i._a[Qt]==null&&IS(i),i._dayOfYear!=null&&(q=tr(i._a[pt],N[pt]),(i._dayOfYear>kr(q)||i._dayOfYear===0)&&(T(i)._overflowDayOfYear=!0),S=Mr(q,0,i._dayOfYear),i._a[Qt]=S.getUTCMonth(),i._a[Ut]=S.getUTCDate()),d=0;d<3&&i._a[d]==null;++d)i._a[d]=b[d]=N[d];for(;d<7;d++)i._a[d]=b[d]=i._a[d]==null?d===2?1:0:i._a[d];i._a[Qe]===24&&i._a[Ft]===0&&i._a[en]===0&&i._a[_n]===0&&(i._nextDay=!0,i._a[Qe]=0),i._d=(i._useUTC?Mr:Ph).apply(null,b),B=i._useUTC?i._d.getUTCDay():i._d.getDay(),i._tzm!=null&&i._d.setUTCMinutes(i._d.getUTCMinutes()-i._tzm),i._nextDay&&(i._a[Qe]=24),i._w&&typeof i._w.d<"u"&&i._w.d!==B&&(T(i).weekdayMismatch=!0)}}function IS(i){var d,S,b,N,B,q,ue,ye,Ne;d=i._w,d.GG!=null||d.W!=null||d.E!=null?(B=1,q=4,S=tr(d.GG,i._a[pt],_r(Ye(),1,4).year),b=tr(d.W,1),N=tr(d.E,1),(N<1||N>7)&&(ye=!0)):(B=i._locale._week.dow,q=i._locale._week.doy,Ne=_r(Ye(),B,q),S=tr(d.gg,i._a[pt],Ne.year),b=tr(d.w,Ne.week),d.d!=null?(N=d.d,(N<0||N>6)&&(ye=!0)):d.e!=null?(N=d.e+B,(d.e<0||d.e>6)&&(ye=!0)):N=B),b<1||b>tn(S,B,q)?T(i)._overflowWeeks=!0:ye!=null?T(i)._overflowWeekday=!0:(ue=Vl(S,b,N,B,q),i._a[pt]=ue.year,i._dayOfYear=ue.dayOfYear)}r.ISO_8601=function(){},r.RFC_2822=function(){};function Ao(i){if(i._f===r.ISO_8601){Yl(i);return}if(i._f===r.RFC_2822){Ul(i);return}i._a=[],T(i).empty=!0;var d=""+i._i,S,b,N,B,q,ue=d.length,ye=0,Ne,ft;for(N=te(i._f,i._locale).match(Y)||[],ft=N.length,S=0;S<ft;S++)B=N[S],b=(d.match(Sh(B,i))||[])[0],b&&(q=d.substr(0,d.indexOf(b)),q.length>0&&T(i).unusedInput.push(q),d=d.slice(d.indexOf(b)+b.length),ye+=b.length),Q[B]?(b?T(i).empty=!1:T(i).unusedTokens.push(B),bh(B,b,i)):i._strict&&!b&&T(i).unusedTokens.push(B);T(i).charsLeftOver=ue-ye,d.length>0&&T(i).unusedInput.push(d),i._a[Qe]<=12&&T(i).bigHour===!0&&i._a[Qe]>0&&(T(i).bigHour=void 0),T(i).parsedDateParts=i._a.slice(0),T(i).meridiem=i._meridiem,i._a[Qe]=MS(i._locale,i._a[Qe],i._meridiem),Ne=T(i).era,Ne!==null&&(i._a[pt]=i._locale.erasConvertYear(Ne,i._a[pt])),Bo(i),Lo(i)}function MS(i,d,S){var b;return S==null?d:i.meridiemHour!=null?i.meridiemHour(d,S):(i.isPM!=null&&(b=i.isPM(S),b&&d<12&&(d+=12),!b&&d===12&&(d=0)),d)}function _S(i){var d,S,b,N,B,q,ue=!1,ye=i._f.length;if(ye===0){T(i).invalidFormat=!0,i._d=new Date(NaN);return}for(N=0;N<ye;N++)B=0,q=!1,d=F({},i),i._useUTC!=null&&(d._useUTC=i._useUTC),d._f=i._f[N],Ao(d),D(d)&&(q=!0),B+=T(d).charsLeftOver,B+=T(d).unusedTokens.length*10,T(d).score=B,ue?B<b&&(b=B,S=d):(b==null||B<b||q)&&(b=B,S=d,q&&(ue=!0));g(i,S||d)}function RS(i){if(!i._d){var d=He(i._i),S=d.day===void 0?d.date:d.day;i._a=h([d.year,d.month,S,d.hour,d.minute,d.second,d.millisecond],function(b){return b&&parseInt(b,10)}),Bo(i)}}function OS(i){var d=new L(Lo(jl(i)));return d._nextDay&&(d.add(1,"d"),d._nextDay=void 0),d}function jl(i){var d=i._i,S=i._f;return i._locale=i._locale||nn(i._l),d===null||S===void 0&&d===""?k({nullInput:!0}):(typeof d=="string"&&(i._i=d=i._locale.preparse(d)),C(d)?new L(Lo(d)):(u(d)?i._d=d:a(S)?_S(i):S?Ao(i):LS(i),D(i)||(i._d=null),i))}function LS(i){var d=i._i;f(d)?i._d=new Date(r.now()):u(d)?i._d=new Date(d.valueOf()):typeof d=="string"?xS(i):a(d)?(i._a=h(d.slice(0),function(S){return parseInt(S,10)}),Bo(i)):l(d)?RS(i):m(d)?i._d=new Date(d):r.createFromInputFallback(i)}function zl(i,d,S,b,N){var B={};return(d===!0||d===!1)&&(b=d,d=void 0),(S===!0||S===!1)&&(b=S,S=void 0),(l(i)&&p(i)||a(i)&&i.length===0)&&(i=void 0),B._isAMomentObject=!0,B._useUTC=B._isUTC=N,B._l=S,B._i=i,B._f=d,B._strict=b,OS(B)}function Ye(i,d,S,b){return zl(i,d,S,b,!1)}var PS=O("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var i=Ye.apply(null,arguments);return this.isValid()&&i.isValid()?i<this?this:i:k()}),BS=O("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var i=Ye.apply(null,arguments);return this.isValid()&&i.isValid()?i>this?this:i:k()});function ql(i,d){var S,b;if(d.length===1&&a(d[0])&&(d=d[0]),!d.length)return Ye();for(S=d[0],b=1;b<d.length;++b)(!d[b].isValid()||d[b][i](S))&&(S=d[b]);return S}function AS(){var i=[].slice.call(arguments,0);return ql("isBefore",i)}function FS(){var i=[].slice.call(arguments,0);return ql("isAfter",i)}var VS=function(){return Date.now?Date.now():+new Date},Lr=["year","quarter","month","week","day","hour","minute","second","millisecond"];function $S(i){var d,S=!1,b,N=Lr.length;for(d in i)if(c(i,d)&&!(Ze.call(Lr,d)!==-1&&(i[d]==null||!isNaN(i[d]))))return!1;for(b=0;b<N;++b)if(i[Lr[b]]){if(S)return!1;parseFloat(i[Lr[b]])!==we(i[Lr[b]])&&(S=!0)}return!0}function KS(){return this._isValid}function HS(){return Vt(NaN)}function gs(i){var d=He(i),S=d.year||0,b=d.quarter||0,N=d.month||0,B=d.week||d.isoWeek||0,q=d.day||0,ue=d.hour||0,ye=d.minute||0,Ne=d.second||0,ft=d.millisecond||0;this._isValid=$S(d),this._milliseconds=+ft+Ne*1e3+ye*6e4+ue*1e3*60*60,this._days=+q+B*7,this._months=+N+b*3+S*12,this._data={},this._locale=nn(),this._bubble()}function bs(i){return i instanceof gs}function Fo(i){return i<0?Math.round(-1*i)*-1:Math.round(i)}function WS(i,d,S){var b=Math.min(i.length,d.length),N=Math.abs(i.length-d.length),B=0,q;for(q=0;q<b;q++)we(i[q])!==we(d[q])&&B++;return B+N}function Jl(i,d){V(i,0,0,function(){var S=this.utcOffset(),b="+";return S<0&&(S=-S,b="-"),b+P(~~(S/60),2)+d+P(~~S%60,2)})}Jl("Z",":"),Jl("ZZ",""),pe("Z",In),pe("ZZ",In),Ae(["Z","ZZ"],function(i,d,S){S._useUTC=!0,S._tzm=Vo(In,i)});var GS=/([\+\-]|\d\d)/gi;function Vo(i,d){var S=(d||"").match(i),b,N,B;return S===null?null:(b=S[S.length-1]||[],N=(b+"").match(GS)||["-",0,0],B=+(N[1]*60)+we(N[2]),B===0?0:N[0]==="+"?B:-B)}function $o(i,d){var S,b;return d._isUTC?(S=d.clone(),b=(C(i)||u(i)?i.valueOf():Ye(i).valueOf())-S.valueOf(),S._d.setTime(S._d.valueOf()+b),r.updateOffset(S,!1),S):Ye(i).local()}function Ko(i){return-Math.round(i._d.getTimezoneOffset())}r.updateOffset=function(){};function YS(i,d,S){var b=this._offset||0,N;if(!this.isValid())return i!=null?this:NaN;if(i!=null){if(typeof i=="string"){if(i=Vo(In,i),i===null)return this}else Math.abs(i)<16&&!S&&(i=i*60);return!this._isUTC&&d&&(N=Ko(this)),this._offset=i,this._isUTC=!0,N!=null&&this.add(N,"m"),b!==i&&(!d||this._changeInProgress?ec(this,Vt(i-b,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,r.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?b:Ko(this)}function US(i,d){return i!=null?(typeof i!="string"&&(i=-i),this.utcOffset(i,d),this):-this.utcOffset()}function jS(i){return this.utcOffset(0,i)}function zS(i){return this._isUTC&&(this.utcOffset(0,i),this._isUTC=!1,i&&this.subtract(Ko(this),"m")),this}function qS(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var i=Vo(xo,this._i);i!=null?this.utcOffset(i):this.utcOffset(0,!0)}return this}function JS(i){return this.isValid()?(i=i?Ye(i).utcOffset():0,(this.utcOffset()-i)%60===0):!1}function ZS(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function XS(){if(!f(this._isDSTShifted))return this._isDSTShifted;var i={},d;return F(i,this),i=jl(i),i._a?(d=i._isUTC?v(i._a):Ye(i._a),this._isDSTShifted=this.isValid()&&WS(i._a,d.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function QS(){return this.isValid()?!this._isUTC:!1}function eg(){return this.isValid()?this._isUTC:!1}function Zl(){return this.isValid()?this._isUTC&&this._offset===0:!1}var tg=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,ng=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Vt(i,d){var S=i,b=null,N,B,q;return bs(i)?S={ms:i._milliseconds,d:i._days,M:i._months}:m(i)||!isNaN(+i)?(S={},d?S[d]=+i:S.milliseconds=+i):(b=tg.exec(i))?(N=b[1]==="-"?-1:1,S={y:0,d:we(b[Ut])*N,h:we(b[Qe])*N,m:we(b[Ft])*N,s:we(b[en])*N,ms:we(Fo(b[_n]*1e3))*N}):(b=ng.exec(i))?(N=b[1]==="-"?-1:1,S={y:Rn(b[2],N),M:Rn(b[3],N),w:Rn(b[4],N),d:Rn(b[5],N),h:Rn(b[6],N),m:Rn(b[7],N),s:Rn(b[8],N)}):S==null?S={}:typeof S=="object"&&("from"in S||"to"in S)&&(q=rg(Ye(S.from),Ye(S.to)),S={},S.ms=q.milliseconds,S.M=q.months),B=new gs(S),bs(i)&&c(i,"_locale")&&(B._locale=i._locale),bs(i)&&c(i,"_isValid")&&(B._isValid=i._isValid),B}Vt.fn=gs.prototype,Vt.invalid=HS;function Rn(i,d){var S=i&&parseFloat(i.replace(",","."));return(isNaN(S)?0:S)*d}function Xl(i,d){var S={};return S.months=d.month()-i.month()+(d.year()-i.year())*12,i.clone().add(S.months,"M").isAfter(d)&&--S.months,S.milliseconds=+d-+i.clone().add(S.months,"M"),S}function rg(i,d){var S;return i.isValid()&&d.isValid()?(d=$o(d,i),i.isBefore(d)?S=Xl(i,d):(S=Xl(d,i),S.milliseconds=-S.milliseconds,S.months=-S.months),S):{milliseconds:0,months:0}}function Ql(i,d){return function(S,b){var N,B;return b!==null&&!isNaN(+b)&&(z(d,"moment()."+d+"(period, number) is deprecated. Please use moment()."+d+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),B=S,S=b,b=B),N=Vt(S,b),ec(this,N,i),this}}function ec(i,d,S,b){var N=d._milliseconds,B=Fo(d._days),q=Fo(d._months);i.isValid()&&(b=b??!0,q&&Bl(i,Ir(i,"Month")+q*S),B&&Ol(i,"Date",Ir(i,"Date")+B*S),N&&i._d.setTime(i._d.valueOf()+N*S),b&&r.updateOffset(i,B||q))}var sg=Ql(1,"add"),og=Ql(-1,"subtract");function tc(i){return typeof i=="string"||i instanceof String}function ag(i){return C(i)||u(i)||tc(i)||m(i)||lg(i)||ig(i)||i===null||i===void 0}function ig(i){var d=l(i)&&!p(i),S=!1,b=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],N,B,q=b.length;for(N=0;N<q;N+=1)B=b[N],S=S||c(i,B);return d&&S}function lg(i){var d=a(i),S=!1;return d&&(S=i.filter(function(b){return!m(b)&&tc(i)}).length===0),d&&S}function cg(i){var d=l(i)&&!p(i),S=!1,b=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],N,B;for(N=0;N<b.length;N+=1)B=b[N],S=S||c(i,B);return d&&S}function dg(i,d){var S=i.diff(d,"days",!0);return S<-6?"sameElse":S<-1?"lastWeek":S<0?"lastDay":S<1?"sameDay":S<2?"nextDay":S<7?"nextWeek":"sameElse"}function pg(i,d){arguments.length===1&&(arguments[0]?ag(arguments[0])?(i=arguments[0],d=void 0):cg(arguments[0])&&(d=arguments[0],i=void 0):(i=void 0,d=void 0));var S=i||Ye(),b=$o(S,this).startOf("day"),N=r.calendarFormat(this,b)||"sameElse",B=d&&(M(d[N])?d[N].call(this,S):d[N]);return this.format(B||this.localeData().calendar(N,this,Ye(S)))}function ug(){return new L(this)}function mg(i,d){var S=C(i)?i:Ye(i);return this.isValid()&&S.isValid()?(d=fe(d)||"millisecond",d==="millisecond"?this.valueOf()>S.valueOf():S.valueOf()<this.clone().startOf(d).valueOf()):!1}function fg(i,d){var S=C(i)?i:Ye(i);return this.isValid()&&S.isValid()?(d=fe(d)||"millisecond",d==="millisecond"?this.valueOf()<S.valueOf():this.clone().endOf(d).valueOf()<S.valueOf()):!1}function hg(i,d,S,b){var N=C(i)?i:Ye(i),B=C(d)?d:Ye(d);return this.isValid()&&N.isValid()&&B.isValid()?(b=b||"()",(b[0]==="("?this.isAfter(N,S):!this.isBefore(N,S))&&(b[1]===")"?this.isBefore(B,S):!this.isAfter(B,S))):!1}function Sg(i,d){var S=C(i)?i:Ye(i),b;return this.isValid()&&S.isValid()?(d=fe(d)||"millisecond",d==="millisecond"?this.valueOf()===S.valueOf():(b=S.valueOf(),this.clone().startOf(d).valueOf()<=b&&b<=this.clone().endOf(d).valueOf())):!1}function gg(i,d){return this.isSame(i,d)||this.isAfter(i,d)}function bg(i,d){return this.isSame(i,d)||this.isBefore(i,d)}function vg(i,d,S){var b,N,B;if(!this.isValid())return NaN;if(b=$o(i,this),!b.isValid())return NaN;switch(N=(b.utcOffset()-this.utcOffset())*6e4,d=fe(d),d){case"year":B=vs(this,b)/12;break;case"month":B=vs(this,b);break;case"quarter":B=vs(this,b)/3;break;case"second":B=(this-b)/1e3;break;case"minute":B=(this-b)/6e4;break;case"hour":B=(this-b)/36e5;break;case"day":B=(this-b-N)/864e5;break;case"week":B=(this-b-N)/6048e5;break;default:B=this-b}return S?B:kt(B)}function vs(i,d){if(i.date()<d.date())return-vs(d,i);var S=(d.year()-i.year())*12+(d.month()-i.month()),b=i.clone().add(S,"months"),N,B;return d-b<0?(N=i.clone().add(S-1,"months"),B=(d-b)/(b-N)):(N=i.clone().add(S+1,"months"),B=(d-b)/(N-b)),-(S+B)||0}r.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",r.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function yg(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function Tg(i){if(!this.isValid())return null;var d=i!==!0,S=d?this.clone().utc():this;return S.year()<0||S.year()>9999?ae(S,d?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):M(Date.prototype.toISOString)?d?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",ae(S,"Z")):ae(S,d?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function Eg(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var i="moment",d="",S,b,N,B;return this.isLocal()||(i=this.utcOffset()===0?"moment.utc":"moment.parseZone",d="Z"),S="["+i+'("]',b=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",N="-MM-DD[T]HH:mm:ss.SSS",B=d+'[")]',this.format(S+b+N+B)}function wg(i){i||(i=this.isUtc()?r.defaultFormatUtc:r.defaultFormat);var d=ae(this,i);return this.localeData().postformat(d)}function Cg(i,d){return this.isValid()&&(C(i)&&i.isValid()||Ye(i).isValid())?Vt({to:this,from:i}).locale(this.locale()).humanize(!d):this.localeData().invalidDate()}function Dg(i){return this.from(Ye(),i)}function Ng(i,d){return this.isValid()&&(C(i)&&i.isValid()||Ye(i).isValid())?Vt({from:this,to:i}).locale(this.locale()).humanize(!d):this.localeData().invalidDate()}function xg(i){return this.to(Ye(),i)}function nc(i){var d;return i===void 0?this._locale._abbr:(d=nn(i),d!=null&&(this._locale=d),this)}var rc=O("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(i){return i===void 0?this.localeData():this.locale(i)});function sc(){return this._locale}var ys=1e3,nr=60*ys,Ts=60*nr,oc=(365*400+97)*24*Ts;function rr(i,d){return(i%d+d)%d}function ac(i,d,S){return i<100&&i>=0?new Date(i+400,d,S)-oc:new Date(i,d,S).valueOf()}function ic(i,d,S){return i<100&&i>=0?Date.UTC(i+400,d,S)-oc:Date.UTC(i,d,S)}function kg(i){var d,S;if(i=fe(i),i===void 0||i==="millisecond"||!this.isValid())return this;switch(S=this._isUTC?ic:ac,i){case"year":d=S(this.year(),0,1);break;case"quarter":d=S(this.year(),this.month()-this.month()%3,1);break;case"month":d=S(this.year(),this.month(),1);break;case"week":d=S(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":d=S(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":d=S(this.year(),this.month(),this.date());break;case"hour":d=this._d.valueOf(),d-=rr(d+(this._isUTC?0:this.utcOffset()*nr),Ts);break;case"minute":d=this._d.valueOf(),d-=rr(d,nr);break;case"second":d=this._d.valueOf(),d-=rr(d,ys);break}return this._d.setTime(d),r.updateOffset(this,!0),this}function Ig(i){var d,S;if(i=fe(i),i===void 0||i==="millisecond"||!this.isValid())return this;switch(S=this._isUTC?ic:ac,i){case"year":d=S(this.year()+1,0,1)-1;break;case"quarter":d=S(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":d=S(this.year(),this.month()+1,1)-1;break;case"week":d=S(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":d=S(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":d=S(this.year(),this.month(),this.date()+1)-1;break;case"hour":d=this._d.valueOf(),d+=Ts-rr(d+(this._isUTC?0:this.utcOffset()*nr),Ts)-1;break;case"minute":d=this._d.valueOf(),d+=nr-rr(d,nr)-1;break;case"second":d=this._d.valueOf(),d+=ys-rr(d,ys)-1;break}return this._d.setTime(d),r.updateOffset(this,!0),this}function Mg(){return this._d.valueOf()-(this._offset||0)*6e4}function _g(){return Math.floor(this.valueOf()/1e3)}function Rg(){return new Date(this.valueOf())}function Og(){var i=this;return[i.year(),i.month(),i.date(),i.hour(),i.minute(),i.second(),i.millisecond()]}function Lg(){var i=this;return{years:i.year(),months:i.month(),date:i.date(),hours:i.hours(),minutes:i.minutes(),seconds:i.seconds(),milliseconds:i.milliseconds()}}function Pg(){return this.isValid()?this.toISOString():null}function Bg(){return D(this)}function Ag(){return g({},T(this))}function Fg(){return T(this).overflow}function Vg(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}V("N",0,0,"eraAbbr"),V("NN",0,0,"eraAbbr"),V("NNN",0,0,"eraAbbr"),V("NNNN",0,0,"eraName"),V("NNNNN",0,0,"eraNarrow"),V("y",["y",1],"yo","eraYear"),V("y",["yy",2],0,"eraYear"),V("y",["yyy",3],0,"eraYear"),V("y",["yyyy",4],0,"eraYear"),pe("N",Ho),pe("NN",Ho),pe("NNN",Ho),pe("NNNN",Jg),pe("NNNNN",Zg),Ae(["N","NN","NNN","NNNN","NNNNN"],function(i,d,S,b){var N=S._locale.erasParse(i,b,S._strict);N?T(S).era=N:T(S).invalidEra=i}),pe("y",xt),pe("yy",xt),pe("yyy",xt),pe("yyyy",xt),pe("yo",Xg),Ae(["y","yy","yyy","yyyy"],pt),Ae(["yo"],function(i,d,S,b){var N;S._locale._eraYearOrdinalRegex&&(N=i.match(S._locale._eraYearOrdinalRegex)),S._locale.eraYearOrdinalParse?d[pt]=S._locale.eraYearOrdinalParse(i,N):d[pt]=parseInt(i,10)});function $g(i,d){var S,b,N,B=this._eras||nn("en")._eras;for(S=0,b=B.length;S<b;++S){switch(typeof B[S].since){case"string":N=r(B[S].since).startOf("day"),B[S].since=N.valueOf();break}switch(typeof B[S].until){case"undefined":B[S].until=1/0;break;case"string":N=r(B[S].until).startOf("day").valueOf(),B[S].until=N.valueOf();break}}return B}function Kg(i,d,S){var b,N,B=this.eras(),q,ue,ye;for(i=i.toUpperCase(),b=0,N=B.length;b<N;++b)if(q=B[b].name.toUpperCase(),ue=B[b].abbr.toUpperCase(),ye=B[b].narrow.toUpperCase(),S)switch(d){case"N":case"NN":case"NNN":if(ue===i)return B[b];break;case"NNNN":if(q===i)return B[b];break;case"NNNNN":if(ye===i)return B[b];break}else if([q,ue,ye].indexOf(i)>=0)return B[b]}function Hg(i,d){var S=i.since<=i.until?1:-1;return d===void 0?r(i.since).year():r(i.since).year()+(d-i.offset)*S}function Wg(){var i,d,S,b=this.localeData().eras();for(i=0,d=b.length;i<d;++i)if(S=this.clone().startOf("day").valueOf(),b[i].since<=S&&S<=b[i].until||b[i].until<=S&&S<=b[i].since)return b[i].name;return""}function Gg(){var i,d,S,b=this.localeData().eras();for(i=0,d=b.length;i<d;++i)if(S=this.clone().startOf("day").valueOf(),b[i].since<=S&&S<=b[i].until||b[i].until<=S&&S<=b[i].since)return b[i].narrow;return""}function Yg(){var i,d,S,b=this.localeData().eras();for(i=0,d=b.length;i<d;++i)if(S=this.clone().startOf("day").valueOf(),b[i].since<=S&&S<=b[i].until||b[i].until<=S&&S<=b[i].since)return b[i].abbr;return""}function Ug(){var i,d,S,b,N=this.localeData().eras();for(i=0,d=N.length;i<d;++i)if(S=N[i].since<=N[i].until?1:-1,b=this.clone().startOf("day").valueOf(),N[i].since<=b&&b<=N[i].until||N[i].until<=b&&b<=N[i].since)return(this.year()-r(N[i].since).year())*S+N[i].offset;return this.year()}function jg(i){return c(this,"_erasNameRegex")||Wo.call(this),i?this._erasNameRegex:this._erasRegex}function zg(i){return c(this,"_erasAbbrRegex")||Wo.call(this),i?this._erasAbbrRegex:this._erasRegex}function qg(i){return c(this,"_erasNarrowRegex")||Wo.call(this),i?this._erasNarrowRegex:this._erasRegex}function Ho(i,d){return d.erasAbbrRegex(i)}function Jg(i,d){return d.erasNameRegex(i)}function Zg(i,d){return d.erasNarrowRegex(i)}function Xg(i,d){return d._eraYearOrdinalRegex||xt}function Wo(){var i=[],d=[],S=[],b=[],N,B,q,ue,ye,Ne=this.eras();for(N=0,B=Ne.length;N<B;++N)q=Xt(Ne[N].name),ue=Xt(Ne[N].abbr),ye=Xt(Ne[N].narrow),d.push(q),i.push(ue),S.push(ye),b.push(q),b.push(ue),b.push(ye);this._erasRegex=new RegExp("^("+b.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+d.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+i.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+S.join("|")+")","i")}V(0,["gg",2],0,function(){return this.weekYear()%100}),V(0,["GG",2],0,function(){return this.isoWeekYear()%100});function Es(i,d){V(0,[i,i.length],0,d)}Es("gggg","weekYear"),Es("ggggg","weekYear"),Es("GGGG","isoWeekYear"),Es("GGGGG","isoWeekYear"),pe("G",Bt),pe("g",Bt),pe("GG",Te,Xe),pe("gg",Te,Xe),pe("GGGG",$e,Re),pe("gggg",$e,Re),pe("GGGGG",dt,ke),pe("ggggg",dt,ke),xr(["gggg","ggggg","GGGG","GGGGG"],function(i,d,S,b){d[b.substr(0,2)]=we(i)}),xr(["gg","GG"],function(i,d,S,b){d[b]=r.parseTwoDigitYear(i)});function Qg(i){return lc.call(this,i,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function eb(i){return lc.call(this,i,this.isoWeek(),this.isoWeekday(),1,4)}function tb(){return tn(this.year(),1,4)}function nb(){return tn(this.isoWeekYear(),1,4)}function rb(){var i=this.localeData()._week;return tn(this.year(),i.dow,i.doy)}function sb(){var i=this.localeData()._week;return tn(this.weekYear(),i.dow,i.doy)}function lc(i,d,S,b,N){var B;return i==null?_r(this,b,N).year:(B=tn(i,b,N),d>B&&(d=B),ob.call(this,i,d,S,b,N))}function ob(i,d,S,b,N){var B=Vl(i,d,S,b,N),q=Mr(B.year,0,B.dayOfYear);return this.year(q.getUTCFullYear()),this.month(q.getUTCMonth()),this.date(q.getUTCDate()),this}V("Q",0,"Qo","quarter"),pe("Q",Ge),Ae("Q",function(i,d){d[Qt]=(we(i)-1)*3});function ab(i){return i==null?Math.ceil((this.month()+1)/3):this.month((i-1)*3+this.month()%3)}V("D",["DD",2],"Do","date"),pe("D",Te,qe),pe("DD",Te,Xe),pe("Do",function(i,d){return i?d._dayOfMonthOrdinalParse||d._ordinalParse:d._dayOfMonthOrdinalParseLenient}),Ae(["D","DD"],Ut),Ae("Do",function(i,d){d[Ut]=we(i.match(Te)[0])});var cc=er("Date",!0);V("DDD",["DDDD",3],"DDDo","dayOfYear"),pe("DDD",ct),pe("DDDD",de),Ae(["DDD","DDDD"],function(i,d,S){S._dayOfYear=we(i)});function ib(i){var d=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return i==null?d:this.add(i-d,"d")}V("m",["mm",2],0,"minute"),pe("m",Te,At),pe("mm",Te,Xe),Ae(["m","mm"],Ft);var lb=er("Minutes",!1);V("s",["ss",2],0,"second"),pe("s",Te,At),pe("ss",Te,Xe),Ae(["s","ss"],en);var cb=er("Seconds",!1);V("S",0,0,function(){return~~(this.millisecond()/100)}),V(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),V(0,["SSS",3],0,"millisecond"),V(0,["SSSS",4],0,function(){return this.millisecond()*10}),V(0,["SSSSS",5],0,function(){return this.millisecond()*100}),V(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),V(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),V(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),V(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),pe("S",ct,Ge),pe("SS",ct,Xe),pe("SSS",ct,de);var fn,dc;for(fn="SSSS";fn.length<=9;fn+="S")pe(fn,xt);function db(i,d){d[_n]=we(("0."+i)*1e3)}for(fn="S";fn.length<=9;fn+="S")Ae(fn,db);dc=er("Milliseconds",!1),V("z",0,0,"zoneAbbr"),V("zz",0,0,"zoneName");function pb(){return this._isUTC?"UTC":""}function ub(){return this._isUTC?"Coordinated Universal Time":""}var oe=L.prototype;oe.add=sg,oe.calendar=pg,oe.clone=ug,oe.diff=vg,oe.endOf=Ig,oe.format=wg,oe.from=Cg,oe.fromNow=Dg,oe.to=Ng,oe.toNow=xg,oe.get=Eh,oe.invalidAt=Fg,oe.isAfter=mg,oe.isBefore=fg,oe.isBetween=hg,oe.isSame=Sg,oe.isSameOrAfter=gg,oe.isSameOrBefore=bg,oe.isValid=Bg,oe.lang=rc,oe.locale=nc,oe.localeData=sc,oe.max=BS,oe.min=PS,oe.parsingFlags=Ag,oe.set=wh,oe.startOf=kg,oe.subtract=og,oe.toArray=Og,oe.toObject=Lg,oe.toDate=Rg,oe.toISOString=Tg,oe.inspect=Eg,typeof Symbol<"u"&&Symbol.for!=null&&(oe[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),oe.toJSON=Pg,oe.toString=yg,oe.unix=_g,oe.valueOf=Mg,oe.creationData=Vg,oe.eraName=Wg,oe.eraNarrow=Gg,oe.eraAbbr=Yg,oe.eraYear=Ug,oe.year=Rl,oe.isLeapYear=Th,oe.weekYear=Qg,oe.isoWeekYear=eb,oe.quarter=oe.quarters=ab,oe.month=Al,oe.daysInMonth=Rh,oe.week=oe.weeks=$h,oe.isoWeek=oe.isoWeeks=Kh,oe.weeksInYear=rb,oe.weeksInWeekYear=sb,oe.isoWeeksInYear=tb,oe.isoWeeksInISOWeekYear=nb,oe.date=cc,oe.day=oe.days=eS,oe.weekday=tS,oe.isoWeekday=nS,oe.dayOfYear=ib,oe.hour=oe.hours=cS,oe.minute=oe.minutes=lb,oe.second=oe.seconds=cb,oe.millisecond=oe.milliseconds=dc,oe.utcOffset=YS,oe.utc=jS,oe.local=zS,oe.parseZone=qS,oe.hasAlignedHourOffset=JS,oe.isDST=ZS,oe.isLocal=QS,oe.isUtcOffset=eg,oe.isUtc=Zl,oe.isUTC=Zl,oe.zoneAbbr=pb,oe.zoneName=ub,oe.dates=O("dates accessor is deprecated. Use date instead.",cc),oe.months=O("months accessor is deprecated. Use month instead",Al),oe.years=O("years accessor is deprecated. Use year instead",Rl),oe.zone=O("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",US),oe.isDSTShifted=O("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",XS);function mb(i){return Ye(i*1e3)}function fb(){return Ye.apply(null,arguments).parseZone()}function pc(i){return i}var _e=j.prototype;_e.calendar=le,_e.longDateFormat=ie,_e.invalidDate=Ee,_e.ordinal=ut,_e.preparse=pc,_e.postformat=pc,_e.relativeTime=ve,_e.pastFuture=Pe,_e.set=U,_e.eras=$g,_e.erasParse=Kg,_e.erasConvertYear=Hg,_e.erasAbbrRegex=zg,_e.erasNameRegex=jg,_e.erasNarrowRegex=qg,_e.months=kh,_e.monthsShort=Ih,_e.monthsParse=_h,_e.monthsRegex=Lh,_e.monthsShortRegex=Oh,_e.week=Bh,_e.firstDayOfYear=Vh,_e.firstDayOfWeek=Fh,_e.weekdays=qh,_e.weekdaysMin=Zh,_e.weekdaysShort=Jh,_e.weekdaysParse=Qh,_e.weekdaysRegex=rS,_e.weekdaysShortRegex=sS,_e.weekdaysMinRegex=oS,_e.isPM=iS,_e.meridiem=dS;function ws(i,d,S,b){var N=nn(),B=v().set(b,d);return N[S](B,i)}function uc(i,d,S){if(m(i)&&(d=i,i=void 0),i=i||"",d!=null)return ws(i,d,S,"month");var b,N=[];for(b=0;b<12;b++)N[b]=ws(i,b,S,"month");return N}function Go(i,d,S,b){typeof i=="boolean"?(m(d)&&(S=d,d=void 0),d=d||""):(d=i,S=d,i=!1,m(d)&&(S=d,d=void 0),d=d||"");var N=nn(),B=i?N._week.dow:0,q,ue=[];if(S!=null)return ws(d,(S+B)%7,b,"day");for(q=0;q<7;q++)ue[q]=ws(d,(q+B)%7,b,"day");return ue}function hb(i,d){return uc(i,d,"months")}function Sb(i,d){return uc(i,d,"monthsShort")}function gb(i,d,S){return Go(i,d,S,"weekdays")}function bb(i,d,S){return Go(i,d,S,"weekdaysShort")}function vb(i,d,S){return Go(i,d,S,"weekdaysMin")}mn("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(i){var d=i%10,S=we(i%100/10)===1?"th":d===1?"st":d===2?"nd":d===3?"rd":"th";return i+S}}),r.lang=O("moment.lang is deprecated. Use moment.locale instead.",mn),r.langData=O("moment.langData is deprecated. Use moment.localeData instead.",nn);var rn=Math.abs;function yb(){var i=this._data;return this._milliseconds=rn(this._milliseconds),this._days=rn(this._days),this._months=rn(this._months),i.milliseconds=rn(i.milliseconds),i.seconds=rn(i.seconds),i.minutes=rn(i.minutes),i.hours=rn(i.hours),i.months=rn(i.months),i.years=rn(i.years),this}function mc(i,d,S,b){var N=Vt(d,S);return i._milliseconds+=b*N._milliseconds,i._days+=b*N._days,i._months+=b*N._months,i._bubble()}function Tb(i,d){return mc(this,i,d,1)}function Eb(i,d){return mc(this,i,d,-1)}function fc(i){return i<0?Math.floor(i):Math.ceil(i)}function wb(){var i=this._milliseconds,d=this._days,S=this._months,b=this._data,N,B,q,ue,ye;return i>=0&&d>=0&&S>=0||i<=0&&d<=0&&S<=0||(i+=fc(Yo(S)+d)*864e5,d=0,S=0),b.milliseconds=i%1e3,N=kt(i/1e3),b.seconds=N%60,B=kt(N/60),b.minutes=B%60,q=kt(B/60),b.hours=q%24,d+=kt(q/24),ye=kt(hc(d)),S+=ye,d-=fc(Yo(ye)),ue=kt(S/12),S%=12,b.days=d,b.months=S,b.years=ue,this}function hc(i){return i*4800/146097}function Yo(i){return i*146097/4800}function Cb(i){if(!this.isValid())return NaN;var d,S,b=this._milliseconds;if(i=fe(i),i==="month"||i==="quarter"||i==="year")switch(d=this._days+b/864e5,S=this._months+hc(d),i){case"month":return S;case"quarter":return S/3;case"year":return S/12}else switch(d=this._days+Math.round(Yo(this._months)),i){case"week":return d/7+b/6048e5;case"day":return d+b/864e5;case"hour":return d*24+b/36e5;case"minute":return d*1440+b/6e4;case"second":return d*86400+b/1e3;case"millisecond":return Math.floor(d*864e5)+b;default:throw new Error("Unknown unit "+i)}}function sn(i){return function(){return this.as(i)}}var Sc=sn("ms"),Db=sn("s"),Nb=sn("m"),xb=sn("h"),kb=sn("d"),Ib=sn("w"),Mb=sn("M"),_b=sn("Q"),Rb=sn("y"),Ob=Sc;function Lb(){return Vt(this)}function Pb(i){return i=fe(i),this.isValid()?this[i+"s"]():NaN}function On(i){return function(){return this.isValid()?this._data[i]:NaN}}var Bb=On("milliseconds"),Ab=On("seconds"),Fb=On("minutes"),Vb=On("hours"),$b=On("days"),Kb=On("months"),Hb=On("years");function Wb(){return kt(this.days()/7)}var on=Math.round,sr={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Gb(i,d,S,b,N){return N.relativeTime(d||1,!!S,i,b)}function Yb(i,d,S,b){var N=Vt(i).abs(),B=on(N.as("s")),q=on(N.as("m")),ue=on(N.as("h")),ye=on(N.as("d")),Ne=on(N.as("M")),ft=on(N.as("w")),an=on(N.as("y")),hn=B<=S.ss&&["s",B]||B<S.s&&["ss",B]||q<=1&&["m"]||q<S.m&&["mm",q]||ue<=1&&["h"]||ue<S.h&&["hh",ue]||ye<=1&&["d"]||ye<S.d&&["dd",ye];return S.w!=null&&(hn=hn||ft<=1&&["w"]||ft<S.w&&["ww",ft]),hn=hn||Ne<=1&&["M"]||Ne<S.M&&["MM",Ne]||an<=1&&["y"]||["yy",an],hn[2]=d,hn[3]=+i>0,hn[4]=b,Gb.apply(null,hn)}function Ub(i){return i===void 0?on:typeof i=="function"?(on=i,!0):!1}function jb(i,d){return sr[i]===void 0?!1:d===void 0?sr[i]:(sr[i]=d,i==="s"&&(sr.ss=d-1),!0)}function zb(i,d){if(!this.isValid())return this.localeData().invalidDate();var S=!1,b=sr,N,B;return typeof i=="object"&&(d=i,i=!1),typeof i=="boolean"&&(S=i),typeof d=="object"&&(b=Object.assign({},sr,d),d.s!=null&&d.ss==null&&(b.ss=d.s-1)),N=this.localeData(),B=Yb(this,!S,b,N),S&&(B=N.pastFuture(+this,B)),N.postformat(B)}var Uo=Math.abs;function or(i){return(i>0)-(i<0)||+i}function Cs(){if(!this.isValid())return this.localeData().invalidDate();var i=Uo(this._milliseconds)/1e3,d=Uo(this._days),S=Uo(this._months),b,N,B,q,ue=this.asSeconds(),ye,Ne,ft,an;return ue?(b=kt(i/60),N=kt(b/60),i%=60,b%=60,B=kt(S/12),S%=12,q=i?i.toFixed(3).replace(/\.?0+$/,""):"",ye=ue<0?"-":"",Ne=or(this._months)!==or(ue)?"-":"",ft=or(this._days)!==or(ue)?"-":"",an=or(this._milliseconds)!==or(ue)?"-":"",ye+"P"+(B?Ne+B+"Y":"")+(S?Ne+S+"M":"")+(d?ft+d+"D":"")+(N||b||i?"T":"")+(N?an+N+"H":"")+(b?an+b+"M":"")+(i?an+q+"S":"")):"P0D"}var xe=gs.prototype;xe.isValid=KS,xe.abs=yb,xe.add=Tb,xe.subtract=Eb,xe.as=Cb,xe.asMilliseconds=Sc,xe.asSeconds=Db,xe.asMinutes=Nb,xe.asHours=xb,xe.asDays=kb,xe.asWeeks=Ib,xe.asMonths=Mb,xe.asQuarters=_b,xe.asYears=Rb,xe.valueOf=Ob,xe._bubble=wb,xe.clone=Lb,xe.get=Pb,xe.milliseconds=Bb,xe.seconds=Ab,xe.minutes=Fb,xe.hours=Vb,xe.days=$b,xe.weeks=Wb,xe.months=Kb,xe.years=Hb,xe.humanize=zb,xe.toISOString=Cs,xe.toString=Cs,xe.toJSON=Cs,xe.locale=nc,xe.localeData=sc,xe.toIsoString=O("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Cs),xe.lang=rc,V("X",0,0,"unix"),V("x",0,0,"valueOf"),pe("x",Bt),pe("X",ge),Ae("X",function(i,d,S){S._d=new Date(parseFloat(i)*1e3)}),Ae("x",function(i,d,S){S._d=new Date(we(i))});//! moment.js
|
|
1904
|
+
return r.version="2.30.1",o(Ye),r.fn=oe,r.min=AS,r.max=FS,r.now=VS,r.utc=v,r.unix=mb,r.months=hb,r.isDate=u,r.locale=mn,r.invalid=k,r.duration=Vt,r.isMoment=C,r.weekdays=gb,r.parseZone=fb,r.localeData=nn,r.isDuration=bs,r.monthsShort=Sb,r.weekdaysMin=vb,r.defineLocale=Oo,r.updateLocale=fS,r.locales=hS,r.weekdaysShort=bb,r.normalizeUnits=fe,r.relativeTimeRounding=Ub,r.relativeTimeThreshold=jb,r.calendarFormat=dg,r.prototype=oe,r.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},r})}(ga)),ga.exports}(function(e,t){(function(n,r){r(typeof Zt=="function"?un():n.moment)})(qt,function(n){//! moment.js locale configuration
|
|
1905
|
+
var r=n.defineLocale("en-au",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(o){var a=o%10,l=~~(o%100/10)===1?"th":a===1?"st":a===2?"nd":a===3?"rd":"th";return o+l},week:{dow:0,doy:4}});return r})})();(function(e,t){(function(n,r){r(typeof Zt=="function"?un():n.moment)})(qt,function(n){//! moment.js locale configuration
|
|
1906
|
+
var r=n.defineLocale("en-ca",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"YYYY-MM-DD",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(o){var a=o%10,l=~~(o%100/10)===1?"th":a===1?"st":a===2?"nd":a===3?"rd":"th";return o+l}});return r})})();(function(e,t){(function(n,r){r(typeof Zt=="function"?un():n.moment)})(qt,function(n){//! moment.js locale configuration
|
|
1907
|
+
var r=n.defineLocale("en-ie",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(o){var a=o%10,l=~~(o%100/10)===1?"th":a===1?"st":a===2?"nd":a===3?"rd":"th";return o+l},week:{dow:1,doy:4}});return r})})();(function(e,t){(function(n,r){r(typeof Zt=="function"?un():n.moment)})(qt,function(n){//! moment.js locale configuration
|
|
1908
|
+
var r=n.defineLocale("en-gb",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(o){var a=o%10,l=~~(o%100/10)===1?"th":a===1?"st":a===2?"nd":a===3?"rd":"th";return o+l},week:{dow:1,doy:4}});return r})})();(function(e,t){(function(n,r){r(typeof Zt=="function"?un():n.moment)})(qt,function(n){//! moment.js locale configuration
|
|
1909
|
+
var r=n.defineLocale("fr-ca",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|e)/,ordinal:function(o,a){switch(a){default:case"M":case"Q":case"D":case"DDD":case"d":return o+(o===1?"er":"e");case"w":case"W":return o+(o===1?"re":"e")}}});return r})})();(function(e,t){(function(n,r){r(typeof Zt=="function"?un():n.moment)})(qt,function(n){//! moment.js locale configuration
|
|
1910
|
+
var r=/^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,o=/(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?)/i,a=/(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?|janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,l=[/^janv/i,/^févr/i,/^mars/i,/^avr/i,/^mai/i,/^juin/i,/^juil/i,/^août/i,/^sept/i,/^oct/i,/^nov/i,/^déc/i],c=n.defineLocale("fr",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsRegex:a,monthsShortRegex:a,monthsStrictRegex:r,monthsShortStrictRegex:o,monthsParse:l,longMonthsParse:l,shortMonthsParse:l,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",w:"une semaine",ww:"%d semaines",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|)/,ordinal:function(p,f){switch(f){case"D":return p+(p===1?"er":"");default:case"M":case"Q":case"DDD":case"d":return p+(p===1?"er":"e");case"w":case"W":return p+(p===1?"re":"e")}},week:{dow:1,doy:4}});return c})})();(function(e,t){(function(n,r){r(typeof Zt=="function"?un():n.moment)})(qt,function(n){//! moment.js locale configuration
|
|
1911
|
+
var r="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),o="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),a=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],l=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,c=n.defineLocale("es",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(p,f){return p?/-MMM-/.test(f)?o[p.month()]:r[p.month()]:r},monthsRegex:l,monthsShortRegex:l,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:a,longMonthsParse:a,shortMonthsParse:a,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoy a la"+(this.hours()!==1?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(this.hours()!==1?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(this.hours()!==1?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(this.hours()!==1?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(this.hours()!==1?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4},invalidDate:"Fecha inválida"});return c})})();(function(e,t){(function(n,r){r(typeof Zt=="function"?un():n.moment)})(qt,function(n){//! moment.js locale configuration
|
|
1912
|
+
var r=n.defineLocale("zh-cn",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(o,a){return o===12&&(o=0),a==="凌晨"||a==="早上"||a==="上午"?o:a==="下午"||a==="晚上"?o+12:o>=11?o:o+12},meridiem:function(o,a,l){var c=o*100+a;return c<600?"凌晨":c<900?"早上":c<1130?"上午":c<1230?"中午":c<1800?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:function(o){return o.week()!==this.week()?"[下]dddLT":"[本]dddLT"},lastDay:"[昨天]LT",lastWeek:function(o){return this.week()!==o.week()?"[上]dddLT":"[本]dddLT"},sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|周)/,ordinal:function(o,a){switch(a){case"d":case"D":case"DDD":return o+"日";case"M":return o+"月";case"w":case"W":return o+"周";default:return o}},relativeTime:{future:"%s后",past:"%s前",s:"几秒",ss:"%d 秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",w:"1 周",ww:"%d 周",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},week:{dow:1,doy:4}});return r})})();(function(e,t){(function(n,r){r(typeof Zt=="function"?un():n.moment)})(qt,function(n){//! moment.js locale configuration
|
|
1913
|
+
var r=n.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(o,a){if(o===12&&(o=0),a==="凌晨"||a==="早上"||a==="上午")return o;if(a==="中午")return o>=11?o:o+12;if(a==="下午"||a==="晚上")return o+12},meridiem:function(o,a,l){var c=o*100+a;return c<600?"凌晨":c<900?"早上":c<1130?"上午":c<1230?"中午":c<1800?"下午":"晚上"},calendar:{sameDay:"[今天] LT",nextDay:"[明天] LT",nextWeek:"[下]dddd LT",lastDay:"[昨天] LT",lastWeek:"[上]dddd LT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(o,a){switch(a){case"d":case"D":case"DDD":return o+"日";case"M":return o+"月";case"w":case"W":return o+"週";default:return o}},relativeTime:{future:"%s後",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}});return r})})();const fN=ot.locale(),Nr=ot.locales();Nr.indexOf("en-US")===-1&&ot.defineLocale("en-US",{parentLocale:"en",longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY @ LT",LLLL:"dddd MMMM D, YYYY @ LT"}});Nr.indexOf("en-US24")===-1&&ot.defineLocale("en-US24",{parentLocale:"en-US",longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss"}});Nr.indexOf("en-PH")===-1&&(ot.defineLocale("en-PH",{parentLocale:"en-GB"}),ot.updateLocale("en-PH",{longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A"}}));Nr.indexOf("en-IN")===-1&&(ot.defineLocale("en-IN",{parentLocale:"en-GB"}),ot.updateLocale("en-IN",{longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",ll:"D-MMM-YYYY"}}));Nr.indexOf("en-SG")===-1&&(ot.defineLocale("en-SG",{parentLocale:"en-IN"}),ot.updateLocale("en-SG",{longDateFormat:{ll:"D MMM YYYY"}}));Nr.indexOf("en-HK")===-1&&ot.defineLocale("en-HK",{parentLocale:"en-GB"});ot.locale(fN);const hN={ISO_8601:"ISO_8601",ISO_8601_UTC:"ISO_8601_UTC",SHORT_TIME:"LT",SHORT_TIME_ZONE:"LT z",LONG_TIME:"LTS",LONG_TIME_ZONE:"LTS z",NUM_DATE:"L",SHORT_DATE:"ll",LONG_DATE:"LL",SHORT_DATETIME:"lll",SHORT_DATETIME_ZONE:"lll z",LONG_DATETIME:"LLL",LONG_DATETIME_ZONE:"LLL z",SHORT_FULLDATETIME:"llll",SHORT_FULLDATETIME_ZONE:"llll z",LONG_FULLDATETIME:"LLLL",LONG_FULLDATETIME_ZONE:"LLLL z"},SN={currentUser:"any",dateToFormat:"string | Date",format:"string",locale:"string",relative:"boolean",relativeHrs:"number",tz:"string"};function gN(e,t,n=0){if(!n&&!t)return!1;if(t)return!0;const r=ot(e);return ot().diff(r,"hours")<n}function bN({locale:e=window.navigator.language,tz:t=ot.tz.guess(),dateToFormat:n,format:r,currentUser:o,relative:a,relativeHrs:l,children:c}){let p=t,f=e;o&&o.preferences&&(p=p||o.preferences.timezone,f=f||o.preferences.locale);const m=r?hN[r]:"lll",u=n||String(c),h=ot(u);if(h.locale(f),!h.isValid())throw new Error("invalid date");return h.tz(p),gN(u,a||!1,l)?h.fromNow():h.format(m)}function Fi(e){const{dateToFormat:t,locale:n,tz:r,format:o,currentUser:a,relative:l,relativeHrs:c,children:p,...f}=e;return s.createElement("span",{className:"sps-datetime",...f},bN({locale:n,tz:r,dateToFormat:t,format:o,currentUser:a,relative:l,relativeHrs:c,children:p}))}Object.assign(Fi,{props:SN,displayName:"SpsDateTime"});const rm={basic:{label:"Datetime Component",description:"<p>Formats dates</p>",examples:{basicAttribute:{imports:y.code`
|
|
1914
1914
|
import { SpsDateTime } from "@spscommerce/ds-react";
|
|
1915
1915
|
`,jsx:y.code`
|
|
1916
1916
|
<SpsDateTime dateToFormat="2018-09-11T16:32:52.822000Z" />
|
|
@@ -1918,7 +1918,7 @@ var r=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
1918
1918
|
import { SpsDateTime } from "@spscommerce/ds-react";
|
|
1919
1919
|
`,jsx:y.code`
|
|
1920
1920
|
<SpsDateTime>2018-09-11T16:32:52.822000Z</SpsDateTime>
|
|
1921
|
-
`}}}},sm={compact:"boolean",wideTerms:"boolean",widerTerms:"boolean"};function
|
|
1921
|
+
`}}}},sm={compact:"boolean",wideTerms:"boolean",widerTerms:"boolean"};function fo(e){const{children:t,className:n,compact:r=!1,"data-testid":o,unsafelyReplaceClassName:a,wideTerms:l=!1,widerTerms:c=!1,...p}=e,f=s.Children.map(t,(u,h)=>{if(u.type.toString()!==s.Fragment.toString()){const w=parseInt(`${h/2}`,10)+1;return s.cloneElement(u,{style:{...u.props.style,msGridRow:w}})}const g=u.props.children;return s.Children.map(g,w=>s.cloneElement(w,{style:{...w.props.style,msGridRow:h+1}}))}),m=H(a||"sps-description-list",r&&"sps-description-list--compact",l&&"sps-description-list--wide-terms",c&&"sps-description-list--wider-terms",n);return s.createElement("dl",{className:m,"data-testid":`${o}`,...p},f)}Object.assign(fo,{props:sm,displayName:"SpsDescriptionList / SpsDl"});function om(e){return s.createElement(fo,{...e})}Object.assign(om,{props:sm,displayName:"SpsDescriptionList / SpsDl"});const am={};function ho(e){const{children:t,className:n,"data-testid":r,unsafelyReplaceClassName:o,...a}=e,l=H(o||"sps-description-list__definition",n);return s.createElement("dd",{className:l,"data-testid":`${r}`,...a},t)}Object.assign(ho,{props:am,displayName:"SpsDescriptionListDefinition / SpsDd"});function im(e){return s.createElement(ho,{...e})}Object.assign(im,{props:am,displayName:"SpsDescriptionListDefinition / SpsDd"});var Ce=(e=>(e.VISIBLE="visible",e.DEFER_VISIBLE="defer_visible",e.HIDDEN="hidden",e.DELAYED_HIDDEN="delayed_hidden",e))(Ce||{});function Vs(e){return e==="visible"?"hidden":"visible"}const Fd=13,Bn=new Map,vN={for:{type:"React.MutableRefObject<any> | string",required:!0},hideDelay:"number",isShown:"TooltipVisibility",kind:"TooltipKind",offsets:"[number, number]",onDeferred:"() => void",position:"Position",altPosition:"Position",showOn:"TooltipShowTrigger",title:"string | ReactNode"};function Rt({children:e,className:t,for:n,"data-testid":r,hideDelay:o=K.TOOLTIP_HIDE_DELAY_MS_DEFAULT,isShown:a,kind:l=K.TooltipKind.DEFAULT,offsets:c=[0,0],onDeferred:p,position:f=K.Position.TOP_MIDDLE,altPosition:m=Ja(f),showOn:u=K.TooltipShowTrigger.MOUSEOVER,style:h,title:g,unsafelyReplaceClassName:v}){const w=s.useRef({instanceKey:Symbol("ds-react:tooltip:instance-key"),prevIsShown:a,hideTimer:null}),[T,E]=s.useState(!1),D=s.useRef(null),k=typeof n=="string"?s.useRef(document.getElementById(n)):n,I=s.useRef(null),x=s.useCallback(()=>{w.current.hideTimer&&(window.clearTimeout(w.current.hideTimer),w.current.hideTimer=null)},[]),F=s.useCallback(()=>{x(),E(!1)},[]),L=s.useCallback((ee=!1)=>{var le;if(ee===!0&&Bn.size>0)return p&&p(),!1;if(((le=D.current)==null?void 0:le.textContent)==="")return console.warn("SpsTooltip is empty; aborting show"),!1;x();for(const P of Bn.values())P();return E(!0),!0},[]),C=s.useCallback(ee=>{ee&&ee.stopPropagation(),E(le=>le?(F(),!1):L())},[]),R=s.useCallback(ee=>{D.current&&!D.current.contains(ee.target)&&F()},[]),O=s.useCallback(()=>{x(),w.current.hideTimer=window.setTimeout(F,o)},[]),W=s.useCallback(ee=>{var V,Z,J,ae,te,me;const[le,P]=ee.split(" "),Y=(V=k==null?void 0:k.current)==null?void 0:V.getBoundingClientRect(),se=I.current?parseInt(((Z=getComputedStyle(I.current))==null?void 0:Z.width)||"0",10):0,re=se*Math.sqrt(2),Q=(re-se)/2;if(["top","bottom"].includes(le)&&P!=="middle"){if(!(Y!=null&&Y.width)||Y.width>50)return 0;const ie=I.current?parseInt(((J=getComputedStyle(I.current))==null?void 0:J.left)||"0",10):0,ne=I.current?parseInt(((ae=getComputedStyle(I.current))==null?void 0:ae.right)||"0",10):0,Me=(ie<ne?ie:ne)-Q+re/2;return Y.width/2-Me}else if(["left","right"].includes(le)&&P!=="middle"){if(Y!=null&&Y.height&&Y.height>50)return 0;const ie=I.current?parseInt(((te=getComputedStyle(I.current))==null?void 0:te.top)||"0",10):0,ne=I.current?parseInt(((me=getComputedStyle(I.current))==null?void 0:me.bottom)||"0",10):0,Me=(ie<ne?ie:ne)-Q+re/2;return Y.height/2-Me}else return 0},[]);s.useEffect(()=>{if(typeof n=="string"&&(k.current=document.getElementById(n)),T?Bn.set(w.current.instanceKey,F):Bn.has(w.current.instanceKey)&&Bn.delete(w.current.instanceKey),u===K.TooltipShowTrigger.MANUAL){if(a!==w.current.prevIsShown)switch(a){case"visible":L();break;case"defer_visible":L(!0);break;case"hidden":F();break;case"delayed_hidden":O();break}w.current.prevIsShown=a}},[T,a]),s.useEffect(()=>{if(k.current)switch(u){case K.TooltipShowTrigger.MOUSEOVER:k.current.addEventListener("mouseenter",L),k.current.addEventListener("mouseleave",O);break;case K.TooltipShowTrigger.CLICK:k.current.addEventListener("click",C),document.addEventListener("click",R);break;case K.TooltipShowTrigger.MANUAL:break}},[k]),s.useEffect(()=>{var ee;((ee=D.current)==null?void 0:ee.textContent)===""&&T&&(w.current.hideTimer&&(clearTimeout(w.current.hideTimer),w.current.hideTimer=null),E(!1))},[e,T]),s.useEffect(()=>()=>{Bn.has(w.current.instanceKey)&&Bn.delete(w.current.instanceKey),k.current&&(k.current.removeEventListener("mouseenter",L),k.current.removeEventListener("mouseleave",O),k.current.removeEventListener("click",C),document.removeEventListener("click",R))},[]);const z=Er("sps-tooltip-portal"),M=s.useContext(Lt),[[U,G],j]=s.useState([{},!1]);s.useEffect(()=>{j(T?Wn(D,k,f,{altPosition:m,setMinWidth:!1,offsets:[c[0]-Fd,c[1]+W(f)],...M}):[{},!1])},[T,f,m,c[0],c[1],e]),s.useEffect(()=>{const ee=()=>{T&&j(Wn(D,k,f,{altPosition:m,setMinWidth:!1,offsets:[c[0]-Fd,c[1]+W(f)],...M}))};return document.addEventListener("scroll",ee),()=>{document.removeEventListener("scroll",ee)}},[T]);const A=H(v||"sps-tooltip","z-stratum-tip",`sps-tooltip--${l}`,`sps-tooltip--pos-${(G?m:f).replace(" ","-")}`,T&&"sps-tooltip--shown",t);return z(s.createElement("div",{role:"tooltip",className:A,"data-testid":r,ref:D,style:{...h,...U},onMouseEnter:u===K.TooltipShowTrigger.MOUSEOVER?x:void 0,onMouseLeave:u===K.TooltipShowTrigger.MOUSEOVER?O:void 0},g&&(typeof g=="string"?s.createElement("span",{className:"sps-tooltip__title d-block"},g):g),s.createElement("span",{className:"sps-tooltip__body d-block"},e),s.createElement("span",{ref:I,className:"sps-tooltip__caret"})))}Object.assign(Rt,{props:vN,displayName:"SpsTooltip"});const lm={error:"boolean",errors:"ReactNodeOrRenderFn",help:"ReactNodeOrRenderFn",labelFor:"SpsFormFieldMeta<any>",required:"boolean"};function So(e){const{children:t,className:n,error:r,errors:o,help:a,labelFor:l,required:c,"data-testid":p,unsafelyReplaceClassName:f,...m}=e,u=s.useRef(null),h=s.useRef();function g(){var x;return(h==null?void 0:h.current)&&((x=h.current.parentElement)==null?void 0:x.classList.contains("sps-form-group--error"))}function v(){return l&&!l.isPristine()&&!l.isValid()}const[w,T]=s.useState(),[E,D]=s.useState(Ce.HIDDEN);s.useEffect(()=>{T(v()||g()?K.TooltipKind.ERROR:K.TooltipKind.HELP)}),s.useEffect(()=>{var L;h.current=(L=u==null?void 0:u.current)==null?void 0:L.getElementsByClassName("sps-form-group__label")[0];const x=()=>D(Ce.VISIBLE),F=()=>D(Ce.HIDDEN);return h.current&&(h.current.addEventListener("focus",x),h.current.addEventListener("blur",F)),()=>{h.current&&(h.current.removeEventListener("focus",x),h.current.removeEventListener("blur",F))}}),l&&(l.onFocus=()=>D(Ce.VISIBLE),l.onBlur=()=>D(Ce.HIDDEN));const k=H(f||"sps-description-list__term",(c||l&&l.isRequired())&&"sps-description-list__term--required",(r||v())&&"sps-description-list__term--error",n);function I(){D(E===Ce.VISIBLE?Ce.HIDDEN:Ce.VISIBLE)}return s.createElement(s.Fragment,null,s.createElement("dt",{className:k,"data-testid":`${p}`,ref:u,onMouseEnter:()=>D(Ce.VISIBLE),onMouseLeave:()=>D(Ce.DELAYED_HIDDEN),onClick:I,...m},t),s.createElement(Rt,{kind:w,for:u,showOn:K.TooltipShowTrigger.MANUAL,isShown:E},wt(w===K.TooltipKind.ERROR?o:a)))}Object.assign(So,{props:lm,displayName:"SpsDescriptionListTerm / SpsDt"});function cm(e){return s.createElement(So,{...e})}Object.assign(cm,{props:lm,displayName:"SpsDescriptionListTerm / SpsDt"});const dm={general:{label:"General Usage",description:()=>_.createElement(_.Fragment,null,_.createElement("p",null,"Description Lists should be used to group a series of related terms (and their accompanying descriptions) together in a tabular-like format."),_.createElement("p",null,"Note: Description Lists are not the required pattern for listing terms and descriptions, but should be used when it benefits the legibility of the content over other typographic formats such as unordered lists or tables."),_.createElement("h5",null,"Use a Description List"),_.createElement("ul",null,_.createElement("li",{className:"mb-2"},"To display two or more terms that have accompanying descriptions or values.")),_.createElement("h5",null,"Do Not Use a Description List"),_.createElement("ul",null,_.createElement("li",{className:"mb-2"},"To display a single term"),_.createElement("li",{className:"mb-2"},"If the listed terms do not have descriptions")))},basic:{label:"Basic Description Lists",description:()=>_.createElement("p",null,"Description Lists are available in two sizes. Additionally, the left column can be set to one of three different width options to best accomodate the content in each specific use case."),examples:{oneToThree:{description:()=>_.createElement("h5",null,"1-to-3"),react:y.code`
|
|
1922
1922
|
import { SpsDl, SpsDt, SpsDd } from "@spscommerce/ds-react";
|
|
1923
1923
|
function DemoComponent() {
|
|
1924
1924
|
return (
|
|
@@ -1932,7 +1932,7 @@ var r=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
1932
1932
|
</SpsDl>
|
|
1933
1933
|
)
|
|
1934
1934
|
}
|
|
1935
|
-
`},oneToTwo:{description:()=>
|
|
1935
|
+
`},oneToTwo:{description:()=>_.createElement("h5",null,"1-to-2"),react:y.code`
|
|
1936
1936
|
import { SpsDl, SpsDt, SpsDd } from "@spscommerce/ds-react";
|
|
1937
1937
|
function DemoComponent() {
|
|
1938
1938
|
return (
|
|
@@ -1946,7 +1946,7 @@ var r=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
1946
1946
|
</SpsDl>
|
|
1947
1947
|
)
|
|
1948
1948
|
}
|
|
1949
|
-
`},oneToOne:{description:()=>
|
|
1949
|
+
`},oneToOne:{description:()=>_.createElement("h5",null,"1-to-1"),react:y.code`
|
|
1950
1950
|
import { SpsDl, SpsDt, SpsDd } from "@spscommerce/ds-react";
|
|
1951
1951
|
function DemoComponent() {
|
|
1952
1952
|
return (
|
|
@@ -1960,7 +1960,7 @@ var r=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
1960
1960
|
</SpsDl>
|
|
1961
1961
|
)
|
|
1962
1962
|
}
|
|
1963
|
-
`},compactOneToThree:{description:()=>
|
|
1963
|
+
`},compactOneToThree:{description:()=>_.createElement("h5",null,"Compact 1-to-3"),react:y.code`
|
|
1964
1964
|
import { SpsDl, SpsDt, SpsDd } from "@spscommerce/ds-react";
|
|
1965
1965
|
function DemoComponent() {
|
|
1966
1966
|
return (
|
|
@@ -1974,7 +1974,7 @@ var r=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
1974
1974
|
</SpsDl>
|
|
1975
1975
|
)
|
|
1976
1976
|
}
|
|
1977
|
-
`},compactOneToTwo:{description:()=>
|
|
1977
|
+
`},compactOneToTwo:{description:()=>_.createElement("h5",null,"Compact 1-to-2"),react:y.code`
|
|
1978
1978
|
import { SpsDl, SpsDt, SpsDd } from "@spscommerce/ds-react";
|
|
1979
1979
|
function DemoComponent() {
|
|
1980
1980
|
return (
|
|
@@ -1988,7 +1988,7 @@ var r=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
1988
1988
|
</SpsDl>
|
|
1989
1989
|
)
|
|
1990
1990
|
}
|
|
1991
|
-
`},compactOneToOne:{description:()=>
|
|
1991
|
+
`},compactOneToOne:{description:()=>_.createElement("h5",null,"Compact 1-to-1"),react:y.code`
|
|
1992
1992
|
import { SpsDl, SpsDt, SpsDd } from "@spscommerce/ds-react";
|
|
1993
1993
|
function DemoComponent() {
|
|
1994
1994
|
return (
|
|
@@ -2002,7 +2002,7 @@ var r=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
2002
2002
|
</SpsDl>
|
|
2003
2003
|
)
|
|
2004
2004
|
}
|
|
2005
|
-
`}}},inputFields:{label:"Description Lists with Input Fields",description:({NavigateTo:e})=>
|
|
2005
|
+
`}}},inputFields:{label:"Description Lists with Input Fields",description:({NavigateTo:e})=>_.createElement(_.Fragment,null,_.createElement("p",null,"Description Lists can be used to support form fields. In these instances, the left hand column is used for the label and the right hand column used for the corresponding input field."),_.createElement("p",null,"Description Lists with Input Fields can appear in Standard or Compact sizes in either 1-to-3, 1-to-2 or 1-to-1 layouts."),_.createElement("p",null,"Input Fields inside of Description Lists should follow standard Form rules. Visit the"," ",_.createElement(e,{to:"form"},"Forms")," page for more information regarding Form rules."),_.createElement("p",null,_.createElement("i",null,"Note: Description Lists with Input Fields should only be utilized when it benefits the usability of a form, and should not be used adjacent to forms that are not in Description Lists."))),examples:{oneToThree:{description:()=>_.createElement("h5",null,"1-to-3"),react:y.code`
|
|
2006
2006
|
import {
|
|
2007
2007
|
SpsDl,
|
|
2008
2008
|
SpsDt,
|
|
@@ -2069,7 +2069,7 @@ var r=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
2069
2069
|
</SpsForm>
|
|
2070
2070
|
)
|
|
2071
2071
|
}
|
|
2072
|
-
`},oneToTwo:{description:()=>
|
|
2072
|
+
`},oneToTwo:{description:()=>_.createElement("h5",null,"1-to-2"),react:y.code`
|
|
2073
2073
|
import {
|
|
2074
2074
|
SpsDl,
|
|
2075
2075
|
SpsDt,
|
|
@@ -2133,7 +2133,7 @@ var r=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
2133
2133
|
</SpsForm>
|
|
2134
2134
|
)
|
|
2135
2135
|
}
|
|
2136
|
-
`},oneToOne:{description:()=>
|
|
2136
|
+
`},oneToOne:{description:()=>_.createElement("h5",null,"1-to-1"),react:y.code`
|
|
2137
2137
|
import {
|
|
2138
2138
|
SpsDl,
|
|
2139
2139
|
SpsDt,
|
|
@@ -2197,7 +2197,7 @@ var r=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
2197
2197
|
</SpsForm>
|
|
2198
2198
|
)
|
|
2199
2199
|
}
|
|
2200
|
-
`},compactOneToThree:{description:()=>
|
|
2200
|
+
`},compactOneToThree:{description:()=>_.createElement("h5",null,"Compact 1-to-3"),react:y.code`
|
|
2201
2201
|
import {
|
|
2202
2202
|
SpsDl,
|
|
2203
2203
|
SpsDt,
|
|
@@ -2264,7 +2264,7 @@ var r=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
2264
2264
|
</SpsForm>
|
|
2265
2265
|
)
|
|
2266
2266
|
}
|
|
2267
|
-
`},compactOneToTwo:{description:()=>
|
|
2267
|
+
`},compactOneToTwo:{description:()=>_.createElement("h5",null,"Compact 1-to-2"),react:y.code`
|
|
2268
2268
|
import {
|
|
2269
2269
|
SpsDl,
|
|
2270
2270
|
SpsDt,
|
|
@@ -2328,7 +2328,7 @@ var r=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
2328
2328
|
</SpsForm>
|
|
2329
2329
|
)
|
|
2330
2330
|
}
|
|
2331
|
-
`},compactOneToOne:{description:()=>
|
|
2331
|
+
`},compactOneToOne:{description:()=>_.createElement("h5",null,"Compact 1-to-1"),react:y.code`
|
|
2332
2332
|
import {
|
|
2333
2333
|
SpsDl,
|
|
2334
2334
|
SpsDt,
|
|
@@ -2392,7 +2392,7 @@ var r=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
2392
2392
|
</SpsForm>
|
|
2393
2393
|
)
|
|
2394
2394
|
}
|
|
2395
|
-
`}}}},yN={alignLeft:"boolean",disabled:"boolean",icon:"SpsIcon",kind:"DropdownKind",label:"string",options:"Array<SpsActionMethod | [SpsActionDescriptor, () => void]>",spinning:"boolean",spinningTitle:"string",tallOptionList:"boolean",onOpen:"() => void",onClose:"() => void",loading:"boolean",maxHeightOptionListPx:"number",maxHeightOptionListRem:"number",disableOptionsMemoization:"boolean"};function
|
|
2395
|
+
`}}}},yN={alignLeft:"boolean",disabled:"boolean",icon:"SpsIcon",kind:"DropdownKind",label:"string",options:"Array<SpsActionMethod | [SpsActionDescriptor, () => void]>",spinning:"boolean",spinningTitle:"string",tallOptionList:"boolean",onOpen:"() => void",onClose:"() => void",loading:"boolean",maxHeightOptionListPx:"number",maxHeightOptionListRem:"number",disableOptionsMemoization:"boolean"};function Xn(e){const{action:t,alignLeft:n,className:r,disabled:o,icon:a,id:l,kind:c,label:p,options:f=[],tabIndex:m,spinning:u,spinningTitle:h,tallOptionList:g,unsafelyReplaceClassName:v,onOpen:w,onClose:T,loading:E,maxHeightOptionListPx:D,maxHeightOptionListRem:k,disableOptionsMemoization:I,...x}=e,{t:F}=s.useContext(Ke),L=En(l),[C,R]=s.useState(!1),[O,W]=s.useState(!1),[z,M]=s.useState(),U=f.map(te=>typeof te=="function"?te:Object.assign(te[1],{...K.SPS_ACTION_DEFAULTS,...te[0]})),G=`${L.current}-button`,j=`${L.current}-menu`;let A,ee;p?(ee=c||K.DropdownKind.DEFAULT,A=a):(ee=K.DropdownKind.ICON,A=a||K.SpsIcon.ELLIPSES);const le=s.useRef(null);s.useEffect(()=>{C&&w?w():!C&&T&&T()},[C]);function P(){R(!1)}function Y(te){te.stopPropagation(),te.nativeEvent.stopImmediatePropagation(),te.preventDefault(),!o&&!u&&R(!C)}function se(te){R(te)}function re(){R(!1)}function Q(te){o||(["Up","ArrowUp","Down","ArrowDown"].indexOf(te.key)>-1&&te.preventDefault(),te.persist(),M(te))}function V(te){te.detail!==L.current&&R(!1)}s.useEffect(()=>(document.addEventListener("click",P),document.addEventListener("DropdownOpened",V),()=>{document.removeEventListener("click",P),document.removeEventListener("DropdownOpened",V)}),[]),s.useEffect(()=>{if(C){const te=document.createEvent("CustomEvent");te.initCustomEvent("DropdownOpened",!1,!1,L.current),document.dispatchEvent(te)}},[C]);const Z=H(v||"sps-dropdown",C&&"sps-dropdown--open",C&&"z-stratum-dropdown",O&&"sps-dropdown--opens-upward",!p&&"sps-dropdown--no-label",o&&"disabled",r),J=H("sps-button",`sps-button--${ee}`,o&&"sps-button--disabled",u&&"sps-button--spinning"),ae=ee===K.DropdownKind.ICON&&!n?[K.Position.BOTTOM_RIGHT,K.Position.TOP_RIGHT]:void 0;return s.createElement("div",{...x,id:L.current,className:Z,onKeyDown:Q},s.createElement(ns,{positionOverride:ae,isOpen:C,"aria-labelledby":G,keyDown:z,onOptionSelected:re,id:j,attachTo:le,onPositionFlip:W,onSelfToggle:se,options:U,offsets:[0,0],tall:g,optionRole:"option",loading:E,maxHeightPx:D,maxHeightRem:k,disableOptionsMemoization:I,specialAction:t}),s.createElement("div",{onClick:Y,className:J,ref:le},s.createElement("button",{type:"button",id:G,"aria-haspopup":"true","aria-controls":j,"aria-expanded":C?!0:void 0,tabIndex:m,disabled:o,onClick:Y},s.createElement("i",{className:H("sps-icon",`sps-icon-${A}`)}),p&&s.createElement("span",null,p),u&&s.createElement("div",{className:"sps-spinner",key:1},h||F("design-system:button.spinningTitle")))))}Object.assign(Xn,{props:yN,displayName:"SpsDropdown"});const pm={labelled:{label:"Labelled",examples:{default:{description:"<h3> Default Dropdown</h3>",react:y.code`
|
|
2396
2396
|
import {
|
|
2397
2397
|
SpsDropdown,
|
|
2398
2398
|
useSpsAction,
|
|
@@ -2629,7 +2629,7 @@ var r=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
2629
2629
|
</SpsTable>
|
|
2630
2630
|
)
|
|
2631
2631
|
}
|
|
2632
|
-
`}}}},TN={checked:"boolean",onChange:"ChangeEventHandler",indeterminate:"boolean",disabled:"boolean",options:"Array<SpsActionMethod | [SpsActionDescriptor, () => void]>"};function
|
|
2632
|
+
`}}}},TN={checked:"boolean",onChange:"ChangeEventHandler",indeterminate:"boolean",disabled:"boolean",options:"Array<SpsActionMethod | [SpsActionDescriptor, () => void]>"};function Vi(e){const{options:t,className:n,checked:r,onChange:o,indeterminate:a,disabled:l,"data-testid":c,...p}=e,f=H("sps-checkbox-dropdown",n);return s.createElement("span",{className:f,"data-testid":c,...p},s.createElement(Jn,{indeterminate:a,checked:r,disabled:l,onChange:o,inline:!0,"data-testid":`${c}__checkbox`}),s.createElement(Xn,{disabled:l,options:t,icon:K.SpsIcon.CHEVRON_DOWN,"data-testid":`${c}__dropdown`}))}Object.assign(Vi,{props:TN,displayName:"SpsCheckboxDropdown"});const EN={errors:"ReactNodeOrRenderFn",formMeta:"SpsFormSetMeta<any>",legend:"string",hasRequiredFields:"boolean",optional:"boolean",enabled:"boolean",onToggled:"(isEnabled: boolean) => void",tooltip:"string",applyNestedStyles:"boolean"};function $i({children:e,className:t,errors:n,formArray:r,formGroup:o,formMeta:a,legend:l,unsafelyReplaceClassName:c,hasRequiredFields:p=!1,optional:f=!1,enabled:m=!1,onToggled:u,tooltip:h,applyNestedStyles:g,"data-testid":v}){const w=o||r,T=s.useRef(null),E=s.useRef(null),[D,k]=s.useState(Ce.HIDDEN),[I,x]=s.useState(!1),[F,L]=s.useState(m);Za(()=>{u==null||u(F)},[F]),s.useEffect(()=>{if(w||a){const O=w&&w.isFocused()||a&&a.isFocused();!I&&O?k(Ce.VISIBLE):I&&!O&&k(Ce.HIDDEN),x(O||!1)}});const C=H(c||g?"nested-styles-fieldset":"sps-fieldset",(w&&!w.isPristine()&&w.invalid||a&&(!a.isValid()||!a.contentsAreValid()))&&"sps-fieldset--error",t,f&&!F&&"sps-fieldset--collapsed",p&&"sps-fieldset--required-fields");function R(){k(D===Ce.VISIBLE?Ce.HIDDEN:Ce.VISIBLE)}return s.createElement("div",{className:"sps-fieldset-container"},s.createElement("fieldset",{className:C,"data-testid":v},s.createElement("legend",{className:"sps-fieldset__legend",ref:T,onMouseEnter:()=>k(Ce.VISIBLE),onMouseLeave:()=>k(Ce.DELAYED_HIDDEN),onClick:R},f&&s.createElement(Jn,{checked:F,className:"d-inline-flex pr-1",onChange:()=>{L(!F)},"data-testid":`${v}__checkbox`}),l,h&&s.createElement("span",{className:"sps-fieldset__legend-icon",ref:E},s.createElement(Yt,{icon:K.SpsIcon.INFO_CIRCLE,"data-testid":`${v}__info-icon`}))),h&&s.createElement(Rt,{for:E},h),s.createElement(Rt,{for:T,kind:K.TooltipKind.ERROR,showOn:K.TooltipShowTrigger.MANUAL,isShown:D},wt(n)),e))}Object.assign($i,{props:EN,displayName:"SpsFieldset"});const um={basic:{label:"Basic Fieldsets",description:"info about basic fieldsets",examples:{basic:{react:y.code`
|
|
2633
2633
|
import {
|
|
2634
2634
|
useSpsForm,
|
|
2635
2635
|
SpsFieldset,
|
|
@@ -2906,7 +2906,7 @@ var r=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
2906
2906
|
</SpsForm>
|
|
2907
2907
|
)
|
|
2908
2908
|
}
|
|
2909
|
-
`}}}},wN={disabled:"boolean",defaultValue:"number",min:"number",max:"number",step:"number",onValueChange:"(newValue: number) => void"};function
|
|
2909
|
+
`}}}},wN={disabled:"boolean",defaultValue:"number",min:"number",max:"number",step:"number",onValueChange:"(newValue: number) => void"};function Ki(e){const{autoComplete:t,disabled:n,defaultValue:r=0,min:o=Number.MIN_SAFE_INTEGER,max:a=Number.MAX_SAFE_INTEGER,step:l=1,onValueChange:c,unsafelyReplaceClassName:p,className:f,"data-testid":m,...u}=e,[h,g]=s.useState(Math.max(o,r));s.useEffect(()=>{g(Math.max(o,r))},[r]);const[v,w]=s.useState(!1);s.useEffect(()=>{c&&typeof c=="function"&&c(h),w(h<o||h>a)},[h]);const T=()=>h<=o?!1:(h>a?g(a):g(I=>Math.max(I-l,o)),!0),E=()=>h>=a?!1:(h<o?g(o):g(I=>I+l),!0),D=I=>{I.target.value!==""&&g(parseInt(I.target.value,10))},k=p||H("sps-incrementor sps-input-group sps-input-group__append",f);return s.createElement("div",{className:k,...u,"data-testid":m},s.createElement("div",{className:"sps-button sps-button--icon"},s.createElement("button",{type:"button","data-testid":`${m}__minus`,onClick:T,disabled:n,"aria-label":`Subtract ${l}`},s.createElement("i",{className:"sps-icon sps-icon-minus","aria-hidden":"true"}))),s.createElement("div",{className:"sps-text-input"},s.createElement("input",{type:"text",className:H("sps-form-control",v&&"sps-input--error"),value:h,onChange:D,disabled:n,"data-testid":`${m}__input`,autoComplete:t})),s.createElement("div",{className:"sps-button sps-button--icon"},s.createElement("button",{type:"button","data-testid":`${m}__plus`,onClick:E,disabled:n,"aria-label":`Add ${l}`},s.createElement("i",{className:"sps-icon sps-icon-plus-sign","aria-hidden":"true"}))))}Object.assign(Ki,{props:wN,displayName:"SpsIncrementor"});const mm={stepExample:{label:"Incrementor",description:"info about incrementor",examples:{stacked:{react:y.code`
|
|
2910
2910
|
import { SpsIncrementor } from "@spscommerce/ds-react";
|
|
2911
2911
|
function Component () {
|
|
2912
2912
|
const [value, setValue] = React.useState("");
|
|
@@ -2927,7 +2927,7 @@ var r=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
2927
2927
|
</React.Fragment>
|
|
2928
2928
|
);
|
|
2929
2929
|
}
|
|
2930
|
-
`}}}},CN={for:{type:"SpsFormMetaBase<any>",required:!0},description:"string",stronglySuggested:"boolean",help:"ReactNodeOrRenderFn",helpIcon:"SpsIcon",helpIconColor:"string",errors:"ReactNodeOrRenderFn"};function
|
|
2930
|
+
`}}}},CN={for:{type:"SpsFormMetaBase<any>",required:!0},description:"string",stronglySuggested:"boolean",help:"ReactNodeOrRenderFn",helpIcon:"SpsIcon",helpIconColor:"string",errors:"ReactNodeOrRenderFn"};function Hi({children:e,className:t,description:n,for:r,stronglySuggested:o,help:a,helpIcon:l=K.SpsIcon.QUESTION_CIRCLE,helpIconColor:c="blue200",errors:p,unsafelyReplaceClassName:f,"data-testid":m,...u}){const{t:h}=s.useContext(Ke),g=s.useRef(null),v=s.useRef(null),w=s.useRef(null),T=s.useRef(null),[E,D]=s.useState(Ce.HIDDEN),[k,I]=s.useState(Ce.HIDDEN),[x,F]=s.useState(Ce.HIDDEN),[L,C]=s.useState(Ce.HIDDEN);function R(){D(Ce.HIDDEN),I(Ce.HIDDEN),F(Ce.HIDDEN),C(Ce.HIDDEN)}function O(){D(Ce.DELAYED_HIDDEN),I(Ce.DELAYED_HIDDEN),F(Ce.DELAYED_HIDDEN)}function W(re){re.preventDefault(),R(),F(Vs(x))}function z(){return r&&(r instanceof Vn&&r.isVisibilyInvalid()||!(r instanceof Vn)&&!r.isValid())?[k,I]:r&&r instanceof Vn&&r.hasPreventativeErrors()?[L,C]:a?[E,D]:o?[x,F]:[Ce.HIDDEN,()=>{}]}function M(){R();const[re,Q]=z();Q(Vs(re))}function U(){R();const[,re]=z();re(Ce.VISIBLE)}function G(re){re.preventDefault(),R(),D(Vs(E))}s.useEffect(()=>{r&&(r.onFocus=U,r.onBlur=R)},[r]);const j=H(f||"sps-form-group__label",t),[A,ee]=r instanceof Vn?[r,void 0]:[void 0,r];function le(){var re;if(A){for(const Q of["dateFormat","dateRangeOrder","dateValidity","required","minLength"])if(A.hasError(Q))return h(`design-system:label.errors.${Q}`,{context:A.errors?A.errors[Q]:""});if(A.hasError("dateConstraint")){const Q=(re=A.errors)==null?void 0:re.dateConstraint,V=Q.minExceeded?"min":"max";return h(`design-system:label.errors.dateConstraint.${V}`,{context:Q})}}return null}function P(){if(A){for(const re of pn)if(A.hasPreventativeError(re))return h(`design-system:label.preventativeErrors.${re}`)}return null}const[Y,se]=Pt(e,[{type:Yt}]);return s.useEffect(()=>{A!=null&&A.hasPreventativeErrors()&&C(Ce.VISIBLE)},[A==null?void 0:A.hasPreventativeErrors()]),s.createElement(at,{formMeta:A,formControl:ee},s.createElement("label",{htmlFor:r&&"id"in r?r.id:void 0,className:j,"data-testid":m,...u},s.createElement("i",{ref:v,"data-testid":`${m}__suggested-icon`,className:H("sps-icon","sps-icon-exclamation-triangle","orange200","sps-form-group__label-suggested-icon",!o&&"d-none"),onClick:W,onMouseLeave:O}),s.createElement("i",{ref:g,"data-testid":`${m}__error-icon`,className:H("sps-icon","sps-icon-exclamation-circle","sps-form-group__label--error-icon"),onClick:M,onMouseLeave:O}),s.createElement("span",{ref:T,className:"sps-form-group__label-content"},se),s.createElement("i",{ref:w,"data-testid":`${m}__help-icon`,className:H("sps-icon",`sps-icon-${l}`,c,!a&&"d-none"),onClick:G,onMouseLeave:O}),Y),s.createElement(Rt,{kind:K.TooltipKind.DEFAULT,for:w,showOn:K.TooltipShowTrigger.MANUAL,isShown:E,altPosition:K.Position.TOP_MIDDLE},wt(a)),s.createElement(Rt,{kind:K.TooltipKind.ERROR,for:g,showOn:K.TooltipShowTrigger.MANUAL,isShown:k,altPosition:K.Position.LEFT_MIDDLE},wt(p)||le()),(A==null?void 0:A.hasPreventativeErrors())&&s.createElement(Rt,{kind:K.TooltipKind.WARNING,for:T,showOn:K.TooltipShowTrigger.MANUAL,isShown:L,altPosition:K.Position.LEFT_MIDDLE},wt(p)||P()),s.createElement(Rt,{kind:K.TooltipKind.DEFAULT,for:v,position:K.Position.TOP_LEFT,altPosition:K.Position.TOP_LEFT,offsets:[13,20],showOn:K.TooltipShowTrigger.MANUAL,isShown:x},h("design-system:label.stronglySuggested")),n&&s.createElement("div",{className:"sps-form-control__description","data-testid":`${m}__description`},n))}Object.assign(Hi,{props:CN,displayName:"SpsLabel"});const fm={general:{label:"General Usage",description:()=>s.createElement("p",null,"In almost all cases, input fields should be paired with a label describing the value to be entered into the field. Certain labels can be accompanied by icons to provide additional information or context about that particular field.")},basic:{label:"Basic Label",examples:{basic:{react:y.code`
|
|
2931
2931
|
import {
|
|
2932
2932
|
SpsLabel,
|
|
2933
2933
|
SpsTextInput,
|
|
@@ -3095,11 +3095,11 @@ var r=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
3095
3095
|
></SpsTextInput>
|
|
3096
3096
|
</>;
|
|
3097
3097
|
}
|
|
3098
|
-
`}}}},DN={clearSelected:{type:"() => void",required:!0},itemsSelected:{type:"string | number",required:!0}};function
|
|
3098
|
+
`}}}},DN={clearSelected:{type:"() => void",required:!0},itemsSelected:{type:"string | number",required:!0}};function Wi(e){const{itemsSelected:t,clearSelected:n,children:r,className:o,"data-testid":a,unsafelyReplaceClassName:l,...c}=e,{t:p}=s.useContext(Ke),f=()=>{typeof n=="function"&&n()},m=H(l||"sps-list-action-bar-container","z-stratum-actionbar",o);return t?s.createElement("div",{className:m,...c,"data-testid":a},s.createElement("div",{className:"sps-list-action-bar"},s.createElement("div",{className:"sps-list-action-bar__details"},s.createElement("span",{className:"sps-tag sps-tag--info","data-testid":`${a}__badge`},t),p("design-system:listActionBar.itemsSelected")),s.createElement("div",{className:"sps-list-action-bar__actions"},s.createElement(Lt.Provider,{value:{fixed:!0}},r)),s.createElement("div",{className:"sps-list-action-bar__clear"},s.createElement(ze,{kind:K.ButtonKind.LINK,icon:K.SpsIcon.X,onClick:f,"data-testid":`${a}__clear-button`},p("design-system:listActionBar.clearSelected"))))):s.createElement(s.Fragment,null)}Object.assign(Wi,{props:DN,displayName:"SpsListActionBar"});const go=s.createContext({resizeable:!1,resizeState:{},setResizeState:()=>{},setSingleResizeState:()=>{},sort:[],setSort:()=>{}}),NN=({children:e,resizeable:t=!1,resizeState:n,onResizeStateChange:r,sort:o,onSortChange:a})=>{const[l,c]=s.useState(n||{}),[p,f]=s.useState(o||[]),m=s.useRef(a);m.current=a;const u=s.useRef(r);u.current=r,s.useEffect(()=>{o&&o!==p&&f(o)},[o]);const h=s.useCallback(T=>{var E;f(T),(E=m.current)==null||E.call(m,T)},[]),g=s.useCallback(T=>{var E;c(T),(E=u.current)==null||E.call(u,T)},[]),v=s.useCallback((T,E)=>{c(D=>{var I;const k={...D,[T]:E};return(I=u.current)==null||I.call(u,k),k})},[]),w=s.useMemo(()=>({resizeable:t,resizeState:l,setResizeState:g,setSingleResizeState:v,sort:p,setSort:h}),[t,l,g,v,p,h]);return s.createElement(go.Provider,{value:w},e)},xN=e=>{const t=/(auto|scroll)/,n=(c,p)=>c.parentNode===null?p:n(c.parentNode,p.concat([c])),r=(c,p)=>getComputedStyle(c,null).getPropertyValue(p),o=c=>r(c,"overflow")+r(c,"overflow-y"),a=c=>t.test(o(c));return(c=>{if(!(c instanceof HTMLElement||c instanceof SVGElement))return;const p=n(c.parentNode,[]);for(let f=0;f<p.length;f+=1)if(a(p[f]))return p[f];return null})(e)},hm=(e,t)=>{s.useLayoutEffect(()=>{if(e&&t.current){let n=0,r=!0,o=t.current.previousElementSibling;for(;o!==null;){if(!o.classList.contains("sps-table__cell--pinned")){r=!1;break}o=o.previousElementSibling}if(r){for(o=t.current.previousElementSibling;o!==null;)n+=o.clientWidth,o=o.previousElementSibling;t.current.style.left=`${n}px`}else{let a=t.current.nextElementSibling;for(;a!==null;)n+=a.clientWidth,a=a.nextElementSibling;t.current.style.right=`${n}px`}}})},kN=e=>{s.useLayoutEffect(()=>{const t=()=>{if(!e.current)return;const n=e.current.querySelectorAll("table > thead > tr:first-child > .sps-table__cell--pinned"),r=e.current.offsetWidth-e.current.clientWidth,o=e.current.offsetHeight-e.current.clientHeight;if(n.length>0){const a=[],l=[];n.forEach(f=>{let m=!0,u=f.previousElementSibling;for(;u!==null;){if(!u.classList.contains("sps-table__cell--pinned")){m=!1;break}u=u.previousElementSibling}m?a.push(f):l.push(f)});const c=a.reduce((f,m)=>f+m.clientWidth,0),p=l.reduce((f,m)=>f+m.clientWidth,0);e.current.style.backgroundPosition=`${c}px 0,
|
|
3099
3099
|
calc(100% - ${p}px) 0,
|
|
3100
|
-
${c}px ${-
|
|
3101
|
-
calc(100% - ${p+r}px) ${-
|
|
3102
|
-
calc(100% - ${r}px) ${-a}px`};return e.current&&(t(),e.current.addEventListener("scroll",t),window.addEventListener("scroll",t)),()=>{e.current&&e.current.removeEventListener("scroll",t),window.removeEventListener("scroll",t)}})},IN=(e,t,n)=>{s.useLayoutEffect(()=>{const r=e.current;if(!r)return;const a=r==null?void 0:r.querySelector("thead"),o=r==null?void 0:r.querySelector("table"),l=o==null?void 0:o.querySelector("tbody>tr"),c=l==null?void 0:l.querySelectorAll("td"),p=(a==null?void 0:a.querySelectorAll("th"))||[],f=document.body.querySelector(".sps-navbar-container");let m=r==null?void 0:r.querySelector(".placeholder-head"),u;const h=()=>{a&&(a.style.position=t?"sticky":"",a.style.top=t?"0":"",a.style.overflow="",a.style.maxWidth="",a.style.width="",a.style.minWidth=""),m&&(m.style.width="",m.style.height=""),c&&Array.from(c).forEach((T,E)=>{const N=p[E];if(N){const x=N.getAttribute("data-resizekey"),k=x&&n?n[x]:void 0;if(k){const I=`${k}px`;N.style.minWidth=I,N.style.maxWidth=I,N.style.width=I,T.style.minWidth=I,T.style.maxWidth=I,T.style.width=I}else N.style.minWidth="",N.style.width="",N.style.maxWidth="",T.style.minWidth="",T.style.width="",T.style.maxWidth=""}else T.style.minWidth="",T.style.width="",T.style.maxWidth=""})},g=()=>{a&&r&&(a.scrollLeft=r.scrollLeft)},v=()=>{let T=null;u===window?T=f?f.getBoundingClientRect().height:0:u instanceof HTMLElement&&(T=u.getBoundingClientRect().top);const E=r.scrollLeft,N=a==null?void 0:a.getBoundingClientRect(),x=r.getBoundingClientRect();if(T&&N&&N.top<=T&&T<=x.bottom-N.height&&x.top<=T){if(c&&Array.from(c).forEach((k,I)=>{const A=k.getBoundingClientRect().width,R=p[I].getBoundingClientRect().width,w=`${Math.max(A,R)}px`;p[I].style.minWidth=w,p[I].style.width=w,p[I].style.maxWidth=w,k.style.minWidth=w,k.style.width=w,k.style.maxWidth=w}),a&&e.current){a.style.position="fixed",a.style.top=`${T}px`,a.style.overflow="hidden";const k=e.current.offsetWidth-e.current.clientWidth,I=`${x.width-k}px`;a.style.maxWidth=I,a.style.width=I,a.style.minWidth=I}m||(m=document.createElement("div"),m.style.width=`${N.width}px`,m.style.height=`${N.height}px`,m.className="placeholder-head",r.insertBefore(m,o))}else m&&(r.removeChild(m),m=null,h());r.scrollLeft=E,g()},C=()=>{h(),v(),g()};return a&&a.classList.contains("sps-table__head--pinned")&&(u=xN(r)||window,u.addEventListener("scroll",v),window.addEventListener("resize",C),r.addEventListener("scroll",g),C()),()=>{u&&(u.removeEventListener("scroll",v),window.removeEventListener("resize",C)),r.removeEventListener("scroll",g)}})},MN=(e,t)=>{const n=()=>{if(!e.current||!t)return;const r=e.current,a=r==null?void 0:r.querySelector("table > thead"),o=r==null?void 0:r.querySelector("table"),l=r==null?void 0:r.querySelector(".shadow--top"),c=r==null?void 0:r.querySelector(".shadow--bottom");if(a&&o&&l&&c){c.style.left="0",c.style.bottom="0",l.style.left="0";const p=r.offsetHeight-(r==null?void 0:r.clientHeight),f=o.getBoundingClientRect().height,m=a.getBoundingClientRect().height,u=r.scrollTop,h=f+p-r.getBoundingClientRect().height-r.scrollTop,g=r.scrollLeft;c.style.bottom=`${-u}px`,c.style.left=`${g}px`,c.style.opacity=h>0?"1":"0",l.style.top=`${u+m}px`,l.style.left=`${g}px`,l.style.opacity=u>0?"1":"0"}};s.useLayoutEffect(()=>{if(e.current&&t){const r=e.current.querySelector("table > thead");return r&&(r.style.position="sticky",r.style.top="0",r.style.zIndex="2",r.style.backgroundColor="#fff"),e.current.addEventListener("scroll",n),()=>{var a;(a=e.current)==null||a.removeEventListener("scroll",n)}}},[]),s.useLayoutEffect(()=>{e.current&&t&&n()})},_N={sort:"SortedColumn",onSortChange:"SortChangeHandler",selectable:"boolean",maxHeightPx:"number",maxHeightRem:"number",resizeable:"boolean",resizeState:"ResizeState",onResizeStateChange:"ResizeStateChangeHandler"};function tr({children:e,className:t,onSortChange:n,sort:r,"data-testid":a,unsafelyReplaceClassName:o,maxHeightPx:l,maxHeightRem:c,resizeable:p,resizeState:f,onResizeStateChange:m,...u}){const h=H(o||"sps-table-container",t),g=l?l/16:c,v=g?{maxHeight:`${g}rem`}:{},C=s.useRef(null);return MN(C,g),kN(C),IN(C,g,f),s.createElement(NN,{resizeable:p,resizeState:f,onResizeStateChange:m,sort:r,onSortChange:n},s.createElement("div",{ref:C,className:h,style:v},s.createElement("div",{className:"sps-table__shadow shadow--top"}),s.createElement("div",{className:"sps-table__shadow shadow--bottom"}),s.createElement("table",{className:"sps-table",role:"table","data-testid":`${a}`,...u},e)))}Object.assign(tr,{props:_N,displayName:"SpsTable"});function Sm(e){if(!e||!e.parentElement)return null;let t=e.parentElement;for(;t;){if(t.tagName.toLowerCase()==="table")return t;t=t.parentElement}return null}const gm=({tableHeaderRef:e,resizerRef:t,resizeKey:n})=>{const{resizeable:r,resizeState:a,setSingleResizeState:o}=s.useContext(ba),l=!!r&&!!n,c=l?a==null?void 0:a[n]:0;return s.useLayoutEffect(()=>{var A,R;let p,f=c,m=0;const u=Sm(e.current),h=(A=e.current)==null?void 0:A.querySelector(".sps-table__column-resizer"),g=(R=e.current)==null?void 0:R.querySelector(".sps-table__column-resizer-guide");function v(){if(e.current&&p&&(h&&(h.style.backgroundColor=Co.colors.blue200),g&&u&&(g.style.height=`${u.getBoundingClientRect().height}px`,g.style.display="block"),u)){const w=u.querySelectorAll("thead > tr > th");for(let _=0;_<w.length;_+=1){const O=w[_].querySelector(".sps-table__column-resizer");w[_].style.cursor="col-resize",w[_]!==e.current&&O&&(w[_].classList.remove("sps-table__header--resizeable"),O.style.display="none")}}}function C(){e.current&&p&&h&&g&&(h.style.right=`${m}px`,g.style.right=`${m}px`)}function T(){if(e.current){const w=f?`${f}px`:"";e.current.style.width=w,e.current.style.maxWidth=w,e.current.style.minWidth=w;const _=e.current.querySelector(".sps-table__header-cell-body");if(_&&(_.style.overflow=w?"hidden":"",_.style.textOverflow=w?"ellipsis":""),h&&g&&(h.style.right="0",h.style.backgroundColor="",g.style.right="0",g.style.display="none"),e.current.classList.contains("sps-table__cell--pinned")||(e.current.style.position="relative"),u){const O=u.querySelectorAll("thead > tr > th");for(let K=0;K<O.length;K+=1){const z=O[K].querySelector(".sps-table__header-cell-body"),M=O[K].querySelector(".sps-table__column-resizer");O[K].style.cursor="default",O[K]!==e.current&&M&&(O[K].classList.add("sps-table__header--resizeable"),M.style.display="block"),(z==null?void 0:z.textContent)&&!z.title&&(z.title=z.textContent)}}}}const E=w=>{!e.current||(w.preventDefault(),p=w.clientX,f=e.current.clientWidth,v())},N=w=>{if(!p||!e.current)return;const _=Math.max(Math.min(p-w.clientX,40),-40);_!==0&&(p=w.clientX,m+=_,f=Math.max(f-_,40),C())},x=()=>{!e.current||!p||(p=0,m=0,T(),o(n,f))},k=()=>{f=0,T(),o(n,f)};let I=!1;return l&&t.current&&(t.current.addEventListener("dragstart",E),t.current.addEventListener("mousedown",E),t.current.addEventListener("dblclick",k),window.addEventListener("mousemove",N),window.addEventListener("dragend",x),window.addEventListener("mouseup",x),I=!0,T()),()=>{t.current&&I&&(t.current.removeEventListener("dragstart",E),t.current.removeEventListener("mousedown",E),t.current.removeEventListener("dblclick",k)),I&&(window.removeEventListener("mousemove",N),window.removeEventListener("dragend",x),window.removeEventListener("mouseup",x))}},[l,c,n,o]),{isResizeable:l}},bm=e=>{const{resizeable:t,resizeState:n}=s.useContext(ba);s.useLayoutEffect(()=>{if(!t||!n||!e.current)return;const r=Sm(e.current);if(!r)return;const a=r.querySelector(`thead > tr > th:nth-of-type(${e.current.cellIndex+1})`);if(!a)return;const o=a.getAttribute("data-resizekey");if(!o)return;const l=n[o],c=l?`${l}px`:"";e.current.style.width=c,e.current.style.maxWidth=c,e.current.style.minWidth=c,e.current.style.overflowWrap=c?"break-word":"",e.current.style.whiteSpace=c?"normal":"",e.current.title||(e.current.title=e.current.textContent||"")})},vm={controlCell:"boolean",sortKey:"string",resizeKey:"string",pinned:"boolean"};function nt({children:e,className:t,controlCell:n,sortKey:r,resizeKey:a="","data-testid":o,unsafelyReplaceClassName:l,pinned:c=!1,...p}){const{sort:f,setSort:m}=s.useContext(ba),u=f==null?void 0:f.find(N=>N.key===r),h=()=>{if(r&&!n){const N=(u==null?void 0:u.direction)===$.SortDirection.ASCENDING?$.SortDirection.DESCENDING:$.SortDirection.ASCENDING;m([{key:r,direction:N}])}},g=N=>{(N.key==="Enter"||N.key===" "||N.key==="Spacebar")&&(N.preventDefault(),h())},v=s.useRef(null);hm(c,v);const C=s.useRef(null),{isResizeable:T}=gm({tableHeaderRef:v,resizerRef:C,resizeKey:a}),E=H(l||"sps-table__header",n&&"sps-table__header--control",!r&&"sps-table__header--sort-disabled",(u==null?void 0:u.direction)===$.SortDirection.ASCENDING&&"sps-table__header--sorted-asc",(u==null?void 0:u.direction)===$.SortDirection.DESCENDING&&"sps-table__header--sorted-desc",c&&"sps-table__cell--pinned",T&&"sps-table__header--resizeable",t);return s.createElement("th",{className:E,ref:v,role:"columnheader","aria-sort":(u==null?void 0:u.direction)||"none","data-testid":`${o}__header`,"data-resizekey":a||void 0,...p},s.createElement("span",{className:"sps-table__header-cell-body","data-testid":`${o}__header-cell-body`,onClick:h,tabIndex:r?0:void 0,onKeyDown:g},e),T&&s.createElement(s.Fragment,null,s.createElement("span",{ref:C,className:H("sps-table__column-resizer")}),s.createElement("span",{className:H("sps-table__column-resizer-guide")})))}Object.assign(nt,{props:vm,displayName:"SpsTableHeader"});function ym(e){return s.createElement(nt,{...e})}Object.assign(ym,{props:vm,displayName:"SpsTh"});const Tm={pinned:"boolean"};function kn({children:e,className:t,"data-testid":n,unsafelyReplaceClassName:r,pinned:a,...o}){const l=H(r||"sps-table__head",a&&"sps-table__head--pinned",t);return s.createElement("thead",{className:l,"data-testid":`${n}__head`,...o},e)}Object.assign(kn,{props:Tm,displayName:"SpsTableHead"});function Em(e){return s.createElement(kn,{...e})}Object.assign(Em,{props:Tm,displayName:"SpsThead"});const wm={};function je({children:e,className:t,"data-testid":n,unsafelyReplaceClassName:r,...a}){const o=H(r||"sps-table__row",t);return s.createElement("tr",{className:o,role:"row","data-testid":`${n}__row`,...a},e)}Object.assign(je,{props:wm,displayName:"SpsTableRow"});function Cm(e){return s.createElement(je,{...e})}Object.assign(Cm,{props:wm,displayName:"SpsTr"});const Dm={};function In(e){const{children:t,className:n,"data-testid":r,unsafelyReplaceClassName:a,...o}=e,l=H(a||"sps-table__body",n);return s.createElement("tbody",{className:l,"data-testid":`${r}__body`,...o},t)}Object.assign(In,{props:Dm,displayName:"SpsTableBody"});function Nm(e){return s.createElement(In,{...e})}Object.assign(Nm,{props:Dm,displayName:"SpsTbody"});const xm={buttonCell:"boolean",controlCell:"boolean",wrap:"SpsTableCellWrapWidth",pinned:"boolean"};function pe(e){const{buttonCell:t,children:n,className:r,controlCell:a,"data-testid":o,unsafelyReplaceClassName:l,wrap:c,pinned:p=!1,...f}=e,m=H(l||"sps-table__cell",t&&"sps-table__cell--button-cell",a&&"sps-table__cell--control",c&&`sps-table__cell--text-wrap-${c}`,p&&"sps-table__cell--pinned",r),u=s.useRef(null);return hm(p,u),bm(u),s.createElement("td",{className:m,ref:u,role:"cell","data-testid":`${o}__cell`,...f},n)}Object.assign(pe,{props:xm,displayName:"SpsTableCell"});function km(e){return s.createElement(pe,{...e})}Object.assign(km,{props:xm,displayName:"SpsTd"});const RN={};function Im(e){const{children:t,className:n,unsafelyReplaceClassName:r,...a}=e,[o,l,c]=Bt(t,[{type:qe,props:{kind:$.ButtonKind.LINK}},[{type:qe,props:{kind:$.ButtonKind.ICON}},{type:er}]]),p=o.length>0&&(l.length>0||c.length>0),f=l.length>0&&c.length>0,m=H(r||"sps-button-group",n);return s.createElement("div",{className:m,...a},o.length>0&&o,p&&s.createElement("div",{className:"sps-vertical-rule"}),l.length>0&&l,f&&s.createElement("div",{className:"sps-vertical-rule"}),c.length>0&&c)}Object.assign(Im,{props:RN,displayName:"SpsButtonGroup"});const ON={basic:{label:"Basic Buttons",description:({NavigateTo:e})=>s.createElement("span",{className:"sps-body-14 mt-4"},"The most common type of button that can be used in most cases. Example: Basic Buttons in a"," ",s.createElement(e,{to:"Modal"},"Modal"),"."),examples:{basic:{description:"Without Icons",imports:y.code`
|
|
3100
|
+
${c}px ${-o}px,
|
|
3101
|
+
calc(100% - ${p+r}px) ${-o}px`}else e.current.style.backgroundPosition=`0 0, 100% 0, 0 ${-o}px,
|
|
3102
|
+
calc(100% - ${r}px) ${-o}px`};return e.current&&(t(),e.current.addEventListener("scroll",t),window.addEventListener("scroll",t)),()=>{e.current&&e.current.removeEventListener("scroll",t),window.removeEventListener("scroll",t)}})},IN=(e,t,n)=>{s.useLayoutEffect(()=>{const r=e.current;if(!r)return;const o=r==null?void 0:r.querySelector("thead"),a=r==null?void 0:r.querySelector("table"),l=a==null?void 0:a.querySelector("tbody>tr"),c=l==null?void 0:l.querySelectorAll("td"),p=(o==null?void 0:o.querySelectorAll("th"))||[],f=document.body.querySelector(".sps-navbar-container");let m=r==null?void 0:r.querySelector(".placeholder-head"),u;const h=()=>{o&&(o.style.position=t?"sticky":"",o.style.top=t?"0":"",o.style.overflow="",o.style.maxWidth="",o.style.width="",o.style.minWidth=""),m&&(m.style.width="",m.style.height=""),c&&Array.from(c).forEach((T,E)=>{const D=p[E];if(D){const k=D.getAttribute("data-resizekey"),I=k&&n?n[k]:void 0;if(I){const x=`${I}px`;D.style.minWidth=x,D.style.maxWidth=x,D.style.width=x,T.style.minWidth=x,T.style.maxWidth=x,T.style.width=x}else D.style.minWidth="",D.style.width="",D.style.maxWidth="",T.style.minWidth="",T.style.width="",T.style.maxWidth=""}else T.style.minWidth="",T.style.width="",T.style.maxWidth=""})},g=()=>{o&&r&&(o.scrollLeft=r.scrollLeft)},v=()=>{let T=null;u===window?T=f?f.getBoundingClientRect().height:0:u instanceof HTMLElement&&(T=u.getBoundingClientRect().top);const E=r.scrollLeft,D=o==null?void 0:o.getBoundingClientRect(),k=r.getBoundingClientRect();if(T&&D&&D.top<=T&&T<=k.bottom-D.height&&k.top<=T){if(c&&Array.from(c).forEach((I,x)=>{const F=I.getBoundingClientRect().width,L=p[x].getBoundingClientRect().width,C=`${Math.max(F,L)}px`;p[x].style.minWidth=C,p[x].style.width=C,p[x].style.maxWidth=C,I.style.minWidth=C,I.style.width=C,I.style.maxWidth=C}),o&&e.current){o.style.position="fixed",o.style.top=`${T}px`,o.style.overflow="hidden";const I=e.current.offsetWidth-e.current.clientWidth,x=`${k.width-I}px`;o.style.maxWidth=x,o.style.width=x,o.style.minWidth=x}m||(m=document.createElement("div"),m.style.width=`${D.width}px`,m.style.height=`${D.height}px`,m.className="placeholder-head",r.insertBefore(m,a))}else m&&(r.removeChild(m),m=null,h());r.scrollLeft=E,g()},w=()=>{h(),v(),g()};return o&&o.classList.contains("sps-table__head--pinned")&&(u=xN(r)||window,u.addEventListener("scroll",v),window.addEventListener("resize",w),r.addEventListener("scroll",g),w()),()=>{u&&(u.removeEventListener("scroll",v),window.removeEventListener("resize",w)),r.removeEventListener("scroll",g)}})},MN=(e,t)=>{const n=()=>{if(!e.current||!t)return;const r=e.current,o=r==null?void 0:r.querySelector("table > thead"),a=r==null?void 0:r.querySelector("table"),l=r==null?void 0:r.querySelector(".shadow--top"),c=r==null?void 0:r.querySelector(".shadow--bottom");if(o&&a&&l&&c){c.style.left="0",c.style.bottom="0",l.style.left="0";const p=r.offsetHeight-(r==null?void 0:r.clientHeight),f=a.getBoundingClientRect().height,m=o.getBoundingClientRect().height,u=r.scrollTop,h=f+p-r.getBoundingClientRect().height-r.scrollTop,g=r.scrollLeft;c.style.bottom=`${-u}px`,c.style.left=`${g}px`,c.style.opacity=h>0?"1":"0",l.style.top=`${u+m}px`,l.style.left=`${g}px`,l.style.opacity=u>0?"1":"0"}};s.useLayoutEffect(()=>{if(e.current&&t){const r=e.current.querySelector("table > thead");return r&&(r.style.position="sticky",r.style.top="0",r.style.zIndex="2",r.style.backgroundColor="#fff"),e.current.addEventListener("scroll",n),()=>{var o;(o=e.current)==null||o.removeEventListener("scroll",n)}}},[]),s.useLayoutEffect(()=>{e.current&&t&&n()})},_N={sort:"SortedColumn",onSortChange:"SortChangeHandler",selectable:"boolean",maxHeightPx:"number",maxHeightRem:"number",resizeable:"boolean",resizeState:"ResizeState",onResizeStateChange:"ResizeStateChangeHandler"};function Qn({children:e,className:t,onSortChange:n,sort:r,"data-testid":o,unsafelyReplaceClassName:a,maxHeightPx:l,maxHeightRem:c,resizeable:p,resizeState:f,onResizeStateChange:m,...u}){const h=H(a||"sps-table-container",t),g=l?l/16:c,v=g?{maxHeight:`${g}rem`}:{},w=s.useRef(null);return MN(w,g),kN(w),IN(w,g,f),s.createElement(NN,{resizeable:p,resizeState:f,onResizeStateChange:m,sort:r,onSortChange:n},s.createElement("div",{ref:w,className:h,style:v},s.createElement("div",{className:"sps-table__shadow shadow--top"}),s.createElement("div",{className:"sps-table__shadow shadow--bottom"}),s.createElement("table",{className:"sps-table",role:"table","data-testid":`${o}`,...u},e)))}Object.assign(Qn,{props:_N,displayName:"SpsTable"});function Sm(e){if(!e||!e.parentElement)return null;let t=e.parentElement;for(;t;){if(t.tagName.toLowerCase()==="table")return t;t=t.parentElement}return null}const gm=({tableHeaderRef:e,resizerRef:t,resizeKey:n})=>{const{resizeable:r,resizeState:o,setSingleResizeState:a}=s.useContext(go),l=!!r&&!!n,c=l?o==null?void 0:o[n]:0;return s.useLayoutEffect(()=>{var F,L;let p,f=c,m=0;const u=Sm(e.current),h=(F=e.current)==null?void 0:F.querySelector(".sps-table__column-resizer"),g=(L=e.current)==null?void 0:L.querySelector(".sps-table__column-resizer-guide");function v(){if(e.current&&p&&(h&&(h.style.backgroundColor=Ea.colors.blue200),g&&u&&(g.style.height=`${u.getBoundingClientRect().height}px`,g.style.display="block"),u)){const C=u.querySelectorAll("thead > tr > th");for(let R=0;R<C.length;R+=1){const O=C[R].querySelector(".sps-table__column-resizer");C[R].style.cursor="col-resize",C[R]!==e.current&&O&&(C[R].classList.remove("sps-table__header--resizeable"),O.style.display="none")}}}function w(){e.current&&p&&h&&g&&(h.style.right=`${m}px`,g.style.right=`${m}px`)}function T(){if(e.current){const C=f?`${f}px`:"";e.current.style.width=C,e.current.style.maxWidth=C,e.current.style.minWidth=C;const R=e.current.querySelector(".sps-table__header-cell-body");if(R&&(R.style.overflow=C?"hidden":"",R.style.textOverflow=C?"ellipsis":""),h&&g&&(h.style.right="0",h.style.backgroundColor="",g.style.right="0",g.style.display="none"),e.current.classList.contains("sps-table__cell--pinned")||(e.current.style.position="relative"),u){const O=u.querySelectorAll("thead > tr > th");for(let W=0;W<O.length;W+=1){const z=O[W].querySelector(".sps-table__header-cell-body"),M=O[W].querySelector(".sps-table__column-resizer");O[W].style.cursor="default",O[W]!==e.current&&M&&(O[W].classList.add("sps-table__header--resizeable"),M.style.display="block"),z!=null&&z.textContent&&!z.title&&(z.title=z.textContent)}}}}const E=C=>{e.current&&(C.preventDefault(),p=C.clientX,f=e.current.clientWidth,v())},D=C=>{if(!p||!e.current)return;const R=Math.max(Math.min(p-C.clientX,40),-40);R!==0&&(p=C.clientX,m+=R,f=Math.max(f-R,40),w())},k=()=>{!e.current||!p||(p=0,m=0,T(),a(n,f))},I=()=>{f=0,T(),a(n,f)};let x=!1;return l&&t.current&&(t.current.addEventListener("dragstart",E),t.current.addEventListener("mousedown",E),t.current.addEventListener("dblclick",I),window.addEventListener("mousemove",D),window.addEventListener("dragend",k),window.addEventListener("mouseup",k),x=!0,T()),()=>{t.current&&x&&(t.current.removeEventListener("dragstart",E),t.current.removeEventListener("mousedown",E),t.current.removeEventListener("dblclick",I)),x&&(window.removeEventListener("mousemove",D),window.removeEventListener("dragend",k),window.removeEventListener("mouseup",k))}},[l,c,n,a]),{isResizeable:l}},bm=e=>{const{resizeable:t,resizeState:n}=s.useContext(go);s.useLayoutEffect(()=>{if(!t||!n||!e.current)return;const r=Sm(e.current);if(!r)return;const o=r.querySelector(`thead > tr > th:nth-of-type(${e.current.cellIndex+1})`);if(!o)return;const a=o.getAttribute("data-resizekey");if(!a)return;const l=n[a],c=l?`${l}px`:"";e.current.style.width=c,e.current.style.maxWidth=c,e.current.style.minWidth=c,e.current.style.overflowWrap=c?"break-word":"",e.current.style.whiteSpace=c?"normal":"",e.current.title||(e.current.title=e.current.textContent||"")})},vm={controlCell:"boolean",sortKey:"string",resizeKey:"string",pinned:"boolean"};function tt({children:e,className:t,controlCell:n,sortKey:r,resizeKey:o="","data-testid":a,unsafelyReplaceClassName:l,pinned:c=!1,...p}){const{sort:f,setSort:m}=s.useContext(go),u=f==null?void 0:f.find(D=>D.key===r),h=()=>{if(r&&!n){const D=(u==null?void 0:u.direction)===K.SortDirection.ASCENDING?K.SortDirection.DESCENDING:K.SortDirection.ASCENDING;m([{key:r,direction:D}])}},g=D=>{(D.key==="Enter"||D.key===" "||D.key==="Spacebar")&&(D.preventDefault(),h())},v=s.useRef(null);hm(c,v);const w=s.useRef(null),{isResizeable:T}=gm({tableHeaderRef:v,resizerRef:w,resizeKey:o}),E=H(l||"sps-table__header",n&&"sps-table__header--control",!r&&"sps-table__header--sort-disabled",(u==null?void 0:u.direction)===K.SortDirection.ASCENDING&&"sps-table__header--sorted-asc",(u==null?void 0:u.direction)===K.SortDirection.DESCENDING&&"sps-table__header--sorted-desc",c&&"sps-table__cell--pinned",T&&"sps-table__header--resizeable",t);return s.createElement("th",{className:E,ref:v,role:"columnheader","aria-sort":(u==null?void 0:u.direction)||"none","data-testid":`${a}__header`,"data-resizekey":o||void 0,...p},s.createElement("span",{className:"sps-table__header-cell-body","data-testid":`${a}__header-cell-body`,onClick:h,tabIndex:r?0:void 0,onKeyDown:g},e),T&&s.createElement(s.Fragment,null,s.createElement("span",{ref:w,className:H("sps-table__column-resizer")}),s.createElement("span",{className:H("sps-table__column-resizer-guide")})))}Object.assign(tt,{props:vm,displayName:"SpsTableHeader"});function ym(e){return s.createElement(tt,{...e})}Object.assign(ym,{props:vm,displayName:"SpsTh"});const Tm={pinned:"boolean"};function Nn({children:e,className:t,"data-testid":n,unsafelyReplaceClassName:r,pinned:o,...a}){const l=H(r||"sps-table__head",o&&"sps-table__head--pinned",t);return s.createElement("thead",{className:l,"data-testid":`${n}__head`,...a},e)}Object.assign(Nn,{props:Tm,displayName:"SpsTableHead"});function Em(e){return s.createElement(Nn,{...e})}Object.assign(Em,{props:Tm,displayName:"SpsThead"});const wm={};function Ue({children:e,className:t,"data-testid":n,unsafelyReplaceClassName:r,...o}){const a=H(r||"sps-table__row",t);return s.createElement("tr",{className:a,role:"row","data-testid":`${n}__row`,...o},e)}Object.assign(Ue,{props:wm,displayName:"SpsTableRow"});function Cm(e){return s.createElement(Ue,{...e})}Object.assign(Cm,{props:wm,displayName:"SpsTr"});const Dm={};function xn(e){const{children:t,className:n,"data-testid":r,unsafelyReplaceClassName:o,...a}=e,l=H(o||"sps-table__body",n);return s.createElement("tbody",{className:l,"data-testid":`${r}__body`,...a},t)}Object.assign(xn,{props:Dm,displayName:"SpsTableBody"});function Nm(e){return s.createElement(xn,{...e})}Object.assign(Nm,{props:Dm,displayName:"SpsTbody"});const xm={buttonCell:"boolean",controlCell:"boolean",wrap:"SpsTableCellWrapWidth",pinned:"boolean"};function ce(e){const{buttonCell:t,children:n,className:r,controlCell:o,"data-testid":a,unsafelyReplaceClassName:l,wrap:c,pinned:p=!1,...f}=e,m=H(l||"sps-table__cell",t&&"sps-table__cell--button-cell",o&&"sps-table__cell--control",c&&`sps-table__cell--text-wrap-${c}`,p&&"sps-table__cell--pinned",r),u=s.useRef(null);return hm(p,u),bm(u),s.createElement("td",{className:m,ref:u,role:"cell","data-testid":`${a}__cell`,...f},n)}Object.assign(ce,{props:xm,displayName:"SpsTableCell"});function km(e){return s.createElement(ce,{...e})}Object.assign(km,{props:xm,displayName:"SpsTd"});const RN={};function Im(e){const{children:t,className:n,unsafelyReplaceClassName:r,...o}=e,[a,l,c]=Pt(t,[{type:ze,props:{kind:K.ButtonKind.LINK}},[{type:ze,props:{kind:K.ButtonKind.ICON}},{type:Xn}]]),p=a.length>0&&(l.length>0||c.length>0),f=l.length>0&&c.length>0,m=H(r||"sps-button-group",n);return s.createElement("div",{className:m,...o},a.length>0&&a,p&&s.createElement("div",{className:"sps-vertical-rule"}),l.length>0&&l,f&&s.createElement("div",{className:"sps-vertical-rule"}),c.length>0&&c)}Object.assign(Im,{props:RN,displayName:"SpsButtonGroup"});const ON={basic:{label:"Basic Buttons",description:({NavigateTo:e})=>s.createElement("span",{className:"sps-body-14 mt-4"},"The most common type of button that can be used in most cases. Example: Basic Buttons in a"," ",s.createElement(e,{to:"Modal"},"Modal"),"."),examples:{basic:{description:"Without Icons",imports:y.code`
|
|
3103
3103
|
import { SpsButton } from "@spscommerce/ds-react";
|
|
3104
3104
|
import { ButtonKind } from "@spscommerce/ds-shared";
|
|
3105
3105
|
`,jsx:y.code`
|
|
@@ -3378,7 +3378,7 @@ var r=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
3378
3378
|
</>
|
|
3379
3379
|
);
|
|
3380
3380
|
}
|
|
3381
|
-
`}}},iconButtons:{label:"Icon Buttons",description:({NavigateTo:e})=>s.createElement("span",{className:"sps-body-14 mt-4"},"Use these for quick actions that can clearly be articulated by the use of an icon. Example: A Print button in the ",s.createElement(e,{to:"List Action Bar"},"List Action Bar"),". ",s.createElement("br",null)," ","Do not use an icon that that doesn
|
|
3381
|
+
`}}},iconButtons:{label:"Icon Buttons",description:({NavigateTo:e})=>s.createElement("span",{className:"sps-body-14 mt-4"},"Use these for quick actions that can clearly be articulated by the use of an icon. Example: A Print button in the ",s.createElement(e,{to:"List Action Bar"},"List Action Bar"),". ",s.createElement("br",null)," ","Do not use an icon that that doesn’t have a universally understood meaning; instead use a Basic Button or a Basic Button with an icon. ",s.createElement("br",null)," ",s.createElement("a",{href:"#style-and-layout/icons"},"View All Icons")),examples:{basic:{description:"Standard Icon Buttons",imports:y.code`
|
|
3382
3382
|
import { SpsButton } from "@spscommerce/ds-react";
|
|
3383
3383
|
import { ButtonKind, SpsIcon } from "@spscommerce/ds-shared";
|
|
3384
3384
|
`,jsx:y.code`
|
|
@@ -3554,7 +3554,7 @@ var r=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
3554
3554
|
<SpsButton className="mr-2 mb-1" kind={ButtonKind.KEY}>Button</SpsButton>
|
|
3555
3555
|
<SpsButton className="mr-2 mb-1" kind={ButtonKind.CONFIRM}>Button</SpsButton>
|
|
3556
3556
|
</>
|
|
3557
|
-
`}}}},LN={},PN="sps-icon-button-panel";function Mm({children:e,className:t,...n}){const r=H(PN,t),[
|
|
3557
|
+
`}}}},LN={},PN="sps-icon-button-panel";function Mm({children:e,className:t,...n}){const r=H(PN,t),[o]=Pt(e,[{type:ze,props:{kind:K.ButtonKind.ICON}}]);return s.createElement("div",{className:r,...n},o)}Object.assign(Mm,{props:LN,displayName:"SpsIconButtonPanel"});const _m={generalUsage:{label:"General Usage",customSection:()=>s.createElement("section",{id:"table-general-usage"},s.createElement("div",{className:"flex-color-header"},s.createElement("h4",null,"General Usage"),s.createElement(ze,{onClick:()=>{window.scrollTo({top:0,behavior:"smooth"})},kind:K.ButtonKind.LINK},"Back to Top")),s.createElement("h5",null,"Use Tables:"),s.createElement("ul",{className:"sps-body-14"},s.createElement("li",null,"Each record has more than 6 points of data"),s.createElement("li",null,"When more records need to be shown in the vertical space"),s.createElement("li",null,"When sorting options need to be precise (needs better explanation)."),s.createElement("li",null,"When tabular views are the expected/conventional view of thet data being displayed (one example: if the data is to be exported into a spreadsheet view).")),s.createElement("h5",null,"Avoid Tables:"),s.createElement("ul",{className:"sps-body-14"},s.createElement("li",null,"When large images need to be included amongst the data.")),s.createElement("div",null,"For additional help deciding which option best suits the data being displayed, refer to the List Usage Matrix."))},basic:{label:"Standard Tables",description:({NavigateTo:e})=>s.createElement(s.Fragment,null,s.createElement("div",{className:"sps-body-14"},"Tables display tabular data in columns and rows with a header row used to identify the type of content in each column. The most common style of content displayed in tables is text (Small Body Copy), but additional elements such as tags and icons can be used when necessary."),s.createElement("br",null),s.createElement("div",{className:"sps-body-14"},"Tables can be used in conjunction with the"," ",s.createElement(e,{to:"List Toolbar"},"List Toolbar")," and"," ",s.createElement(e,{to:"Pagination"},"Pagination")," components for extended capabilities.")),examples:{basic:{react:y.code`
|
|
3558
3558
|
import {
|
|
3559
3559
|
SpsTable,
|
|
3560
3560
|
SpsTableHead,
|
|
@@ -4815,7 +4815,7 @@ var r=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
4815
4815
|
</>
|
|
4816
4816
|
)
|
|
4817
4817
|
}
|
|
4818
|
-
`}}}},Rm={general:{label:"General Usage",description:({NavigateTo:e})=>s.createElement(s.Fragment,null,s.createElement("p",null,"The Action Bar is divided into three sections: Selection Counter, Action Buttons, and Clear Button. It spans the entire width of the browser window. The count in the Selection Counter persists across paginated views"),s.createElement("p",null,"For more information on acceptable content varieties in the Action Buttons section, refer to the Button Groups section on the"," ",s.createElement(e,{to:"button"},"Buttons")," page"),s.createElement("img",{src:"assets/images/list-action-bar-example.svg",alt:"A List Action Bar with labels on each section",className:"w-100 mb-3"}),s.createElement(
|
|
4818
|
+
`}}}},Rm={general:{label:"General Usage",description:({NavigateTo:e})=>s.createElement(s.Fragment,null,s.createElement("p",null,"The Action Bar is divided into three sections: Selection Counter, Action Buttons, and Clear Button. It spans the entire width of the browser window. The count in the Selection Counter persists across paginated views"),s.createElement("p",null,"For more information on acceptable content varieties in the Action Buttons section, refer to the Button Groups section on the"," ",s.createElement(e,{to:"button"},"Buttons")," page"),s.createElement("img",{src:"assets/images/list-action-bar-example.svg",alt:"A List Action Bar with labels on each section",className:"w-100 mb-3"}),s.createElement(Qn,null,s.createElement(Nn,null,s.createElement(tt,null,"Order"),s.createElement(tt,null,"Section"),s.createElement(tt,null,"Content Varieties")),s.createElement(xn,null,s.createElement(Ue,null,s.createElement(ce,null,s.createElement("span",{className:"sps-tag sps-tag--info"},"1")),s.createElement(ce,null,"Selection Counter"),s.createElement(ce,null)),s.createElement(Ue,null,s.createElement(ce,null,s.createElement("span",{className:"sps-tag sps-tag--info"},"2")),s.createElement(ce,null,"Action Buttons"),s.createElement(ce,null)),s.createElement(Ue,null,s.createElement(ce,null,s.createElement("span",{className:"sps-tag sps-tag--info"},"3")),s.createElement(ce,null,"Clear Button"),s.createElement(ce,null,s.createElement(Gt,{className:"mr-1"},"Basic Buttons"),s.createElement(Gt,{className:"mr-1"},"Icon Buttons"),s.createElement(Gt,{className:"mr-1"},"Text Buttons"))))))}},AN={kind:"FeedbackBlockKind",message:{type:"string",required:!0}};function Gi(e){const{className:t,kind:n=K.FeedbackBlockKind.INFO,message:r,"data-testid":o,unsafelyReplaceClassName:a,...l}=e,c=H(a||"sps-micro-block",`sps-micro-block--${n}`,t);return s.createElement("div",{className:c,"data-testid":o,...l},s.createElement("i",{className:`sps-icon sps-icon-${K.FeedbackBlockIcons[n]}`,"aria-hidden":"true","data-testid":`${o}__icon`}),s.createElement("span",null,r))}Object.assign(Gi,{props:AN,displayName:"SpsMicroBlock"});const Om={infoBlock:{label:"Info Micro Block",examples:{infoBlock:{imports:y.code`
|
|
4819
4819
|
import { SpsMicroBlock } from "@spscommerce/ds-react";
|
|
4820
4820
|
import { FeedbackBlockKind } from "@spscommerce/ds-shared";
|
|
4821
4821
|
`,jsx:y.code`
|
|
@@ -4840,7 +4840,7 @@ var r=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
4840
4840
|
import { FeedbackBlockKind } from "@spscommerce/ds-shared";
|
|
4841
4841
|
`,jsx:y.code`
|
|
4842
4842
|
<SpsMicroBlock kind={FeedbackBlockKind.TIP} message="Pro Tip: Don't be a loser."/>
|
|
4843
|
-
`}}}},FN={kind:"ModalKind",size:"ModalSize",title:"string",onClose:"() => void",focusElementOnOpen:"React.MutableRefObject<HTMLElement>",fullHeight:"boolean"};function
|
|
4843
|
+
`}}}},FN={kind:"ModalKind",size:"ModalSize",title:"string",onClose:"() => void",focusElementOnOpen:"React.MutableRefObject<HTMLElement>",fullHeight:"boolean"};function bo({children:e}){return s.createElement("div",{className:"sps-modal__footer"},e)}Object.assign(bo,{props:{},propTypes:{},displayName:"SpsModalFooter"});function Yi({children:e,className:t,id:n,kind:r=K.ModalKind.GENERAL,size:o=K.ModalSize.SMALL,onClose:a,focusElementOnOpen:l,title:c,fullHeight:p=!1,...f}){const m=En(n),u=H("sps-modal","z-stratum-dialog",`sps-modal--${r}`,`sps-modal--${o}`,t),{t:h}=s.useContext(Ke),g=s.useRef(null),v=s.useRef(document.body.style.overflow||""),w=s.useRef(document.body.style.paddingRight||"");s.useLayoutEffect(()=>{let k=!1;if(document.body.style.overflow!=="hidden"){const I=`${window.innerWidth-document.body.clientWidth}px`;document.body.style.paddingRight=I,document.body.style.overflow="hidden",k=!0}return()=>{k&&(document.body.style.overflow=v.current,document.body.style.paddingRight=w.current)}},[]),s.useEffect(()=>{l&&l.current?l.current.focus():g.current&&g.current.focus()},[l]);const T=s.useCallback(k=>{if(k&&k.key==="Escape"&&a&&a(),k&&k.key==="Tab"&&g.current){const I=g.current.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'),x=I[0],F=I[I.length-1];I.length===0?k.preventDefault():k.shiftKey&&k.target===x?(k.preventDefault(),F.focus()):!k.shiftKey&&k.target===F&&(k.preventDefault(),x.focus())}},[a]),[[E],D]=Pt(e,[{type:bo}]);return s.createElement("div",{id:m.current,role:"dialog","aria-modal":!0,"aria-labelledby":`${m.current}-title`,className:u,onKeyDown:T,tabIndex:-1,ref:g},s.createElement("div",{...f,className:H("sps-modal__dialog",{"sps-modal__dialog-full-height":p})},s.createElement("div",{className:"sps-modal__titlebar"},s.createElement("div",{className:"sps-modal__title",id:`${m.current}-title`},c||h(`design-system:modal.defaultTitle.${r}`)),a&&s.createElement("div",{className:"sps-button sps-button--icon",onClick:a},s.createElement("button",{"aria-label":h("design-system:modal.close"),type:"button"},s.createElement("i",{className:"sps-icon sps-icon-x"})))),s.createElement("div",{className:"sps-modal__body"},s.createElement(Lt.Provider,{value:{parentElementRef:g,fixed:!0}},D)),E||s.createElement("div",{className:"sps-modal__footer"},s.createElement(ze,{kind:r===K.ModalKind.SERIOUS_WARNING?K.ButtonKind.DELETE:K.ButtonKind.KEY,onClick:a},h("design-system:modal.defaultButtonLabel")))))}Object.assign(Yi,{props:FN,displayName:"SpsModal"});const VN={title:"string",show:"boolean",closeOnEscapePressed:"boolean",onClose:"() => void",focusElementOnOpen:"React.MutableRefObject<HTMLElement>"};function Ui({children:e,className:t,id:n,show:r,closeOnEscapePressed:o=!0,onClose:a,focusElementOnOpen:l,title:c,...p}){const f=En(n),m=H("sps-slide-in-panel","z-stratum-dialog",r?"open":"",t),u=s.useRef(document.body.style.overflow||""),h=s.useRef(document.body.style.paddingRight||""),{t:g}=s.useContext(Ke),v=s.useRef(null);s.useEffect(()=>{if(r){const E=`${window.innerWidth-document.body.clientWidth}px`;document.body.style.paddingRight=E,document.body.style.overflow="hidden"}else document.body.style.overflow=u.current,document.body.style.paddingRight=h.current;return()=>{document.body.style.overflow=u.current,document.body.style.paddingRight=h.current}},[r]),s.useEffect(()=>{l&&l.current?l.current.focus():v.current&&v.current.focus()},[l]);const w=s.useCallback(E=>{if(o&&E&&E.key==="Escape"&&a&&a(),E&&E.key==="Tab"&&v.current){const D=v.current.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'),k=D[0],I=D[D.length-1];D.length===0?E.preventDefault():E.shiftKey&&E.target===k?(E.preventDefault(),I.focus()):!E.shiftKey&&E.target===I&&(E.preventDefault(),k.focus())}},[a]);s.useEffect(()=>(window.addEventListener("keydown",w),()=>{window.removeEventListener("keydown",w)}),[w]);const[T]=Pt(e);return s.createElement("div",{id:f.current,role:"dialog","aria-labelledby":`${f.current}-title`,className:m,tabIndex:-1,ref:v},s.createElement("div",{...p,className:`sps-slide-in-panel__dialog ${r?"open":""}`},s.createElement("div",{className:"sps-slide-in-panel__titlebar"},s.createElement("div",{className:"sps-slide-in-panel__title",id:`${f.current}-title`},c||g("design-system:slideInPanel.defaultTitle")),a&&s.createElement("div",{className:"sps-button sps-button--icon",onClick:a},s.createElement("button",{"aria-label":g("design-system:slideInPanel.close"),type:"button"},s.createElement("i",{className:"sps-icon sps-icon-x"})))),s.createElement("div",{className:"sps-slide-in-panel__body"},s.createElement(Lt.Provider,{value:{parentElementRef:v,fixed:!0}},T))))}Object.assign(Ui,{props:VN,displayName:"SpsSlideInPanel"});const Lm={generalUsage:{label:"General Usage",description:()=>s.createElement(s.Fragment,null),examples:{noCloseButton:{description:()=>s.createElement(s.Fragment,null,s.createElement("p",null,"Click on the button below to show the slide-in panel.")),react:y.code`
|
|
4844
4844
|
import { SpsButton, SpsSlideInPanel } from "@spscommerce/ds-react";
|
|
4845
4845
|
import { ButtonKind } from "@spscommerce/ds-shared";
|
|
4846
4846
|
function Component() {
|
|
@@ -5310,7 +5310,7 @@ var r=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
5310
5310
|
</>
|
|
5311
5311
|
);
|
|
5312
5312
|
}
|
|
5313
|
-
`}}}},$N={captionKey:"string",clearSearchOnBlur:"boolean",debounce:"number",disabled:"boolean",disableSelected:"boolean",comparisonKey:"string",formMeta:"SpsFormFieldMeta<any[]>",hideSelected:"boolean",icon:"SpsIcon",onChange:"ChangeEventHandler",onSearchChange:"(searchText: string) => void",options:"Eventually<any[]> | (filter?: string) => Eventually<any[]>",placeholder:"string",tallOptionList:"boolean",textKey:"string",value:"any",zeroState:"string",loading:"boolean",maxHeightOptionListPx:"number",maxHeightOptionListRem:"number",disableOptionsMemoization:"boolean"};function
|
|
5313
|
+
`}}}},$N={captionKey:"string",clearSearchOnBlur:"boolean",debounce:"number",disabled:"boolean",disableSelected:"boolean",comparisonKey:"string",formMeta:"SpsFormFieldMeta<any[]>",hideSelected:"boolean",icon:"SpsIcon",onChange:"ChangeEventHandler",onSearchChange:"(searchText: string) => void",options:"Eventually<any[]> | (filter?: string) => Eventually<any[]>",placeholder:"string",tallOptionList:"boolean",textKey:"string",value:"any",zeroState:"string",loading:"boolean",maxHeightOptionListPx:"number",maxHeightOptionListRem:"number",disableOptionsMemoization:"boolean"};function ji({action:e,captionKey:t,className:n,clearSearchOnBlur:r,debounce:o,disabled:a,disableSelected:l=!1,comparisonKey:c,formControl:p,formMeta:f,hideSelected:m,id:u,onChange:h,onSearchChange:g,options:v,placeholder:w,tallOptionList:T,textKey:E,unsafelyReplaceClassName:D,value:k,zeroState:I="There are no matching options.",loading:x,icon:F,maxHeightOptionListPx:L,maxHeightOptionListRem:C,disableOptionsMemoization:R,"data-testid":O,...W}){const z=k??[],M=f||p,{wrapperId:U,controlId:G}=vt(u,M),[j,A]=Jt({keyDown:null,opensUpward:!1,searchText:"",activeTagIndex:null,optionIds:""});s.useEffect(()=>{g&&g(j.searchText)},[j.searchText]);const ee=s.useRef(null),le=s.useRef(null),P=s.useRef(null),Y=s.useRef(null),se=s.useRef(null);function re(){r&&A({searchText:""})}const{showPopup:Q,doShowPopup:V,doHidePopup:Z}=wr(ee,Y,re);function J(){A({activeTagIndex:null}),V()}function ae(){setTimeout(()=>{var fe;(fe=P.current)==null||fe.focus()},0)}function te(fe){if(se.current&&se.current.children.length&&typeof fe=="number"){const He=se.current.children[fe],Be=He==null?void 0:He.querySelector(".sps-clickable-tag__icon");Be&&Be.focus()}}function me(fe){A({searchText:""}),M&&(M.setValue(fe),M.markAsDirty()),h&&h(new Cn({value:fe}))}function ie(fe){z.indexOf(fe)===-1&&me([...z,fe]),ae()}function ne(fe){const He=z.filter((Be,yt)=>yt!==fe);me(He)}function Ee(fe){A({searchText:fe.target.value})}function Me(fe){var He;if(!a){const Be=!m&&!fe.target.selectionStart&&z&&z.length;switch(fe.key){case"Backspace":if(j.activeTagIndex===z.length-1){ne(j.activeTagIndex),ae();return}if(j.activeTagIndex!==null){ne(j.activeTagIndex);return}if(Be){me(z.slice(0,z.length-1));return}break;case"Delete":if(j.activeTagIndex!==null){ne(j.activeTagIndex);return}break;case"Up":case"ArrowUp":case"Down":case"ArrowDown":fe.preventDefault();break;case"Left":case"ArrowLeft":if(Be){j.activeTagIndex===null?(A({activeTagIndex:z.length-1}),Z(),te(z.length-1)):j.activeTagIndex>0&&(A({activeTagIndex:j.activeTagIndex-1}),Z(),te(j.activeTagIndex-1));return}break;case"Right":case"ArrowRight":if(j.activeTagIndex!==null){j.activeTagIndex===z.length-1?(A({activeTagIndex:null}),V(),(He=P.current)==null||He.focus()):(A({activeTagIndex:j.activeTagIndex+1}),te(j.activeTagIndex+1));return}break;case"Tab":Z();break}fe.persist(),A({keyDown:fe})}}function it(fe){A({opensUpward:fe})}function ut(fe){me([]),fe.stopPropagation()}function lt(fe){A({optionIds:new Array(fe).fill("").map((He,Be)=>`${U}-options-option-${Be}`).join(",")})}const ve=s.useCallback(()=>{A({searchText:""}),ae()},[]),Pe=H(D||"sps-multi-select",Q&&"sps-multi-select--open",Q&&"z-stratum-dropdown",j.opensUpward&&"sps-multi-select--opens-upward",a&&"sps-form-control--disabled",n),Je=new Array(z.length).fill(0).map((fe,He)=>`${U}_tag-${He}`);return s.createElement(at,{id:U,className:Pe,formControl:p,formMeta:f,ref:ee,inputRef:P,focusInputOnClick:!0,onKeyDown:Me,role:"listbox","aria-multiselectable":!0,"aria-activedescendant":Je[j.activeTagIndex||0],"aria-owns":j.optionIds},s.createElement("div",{className:"sps-text-input",ref:le},s.createElement("div",{className:H("sps-form-control",z&&!a&&"sps-form-control--clearable")},F&&s.createElement("i",{className:H("sps-text-input__icon","sps-icon",`sps-icon-${F}`)}),s.createElement("div",{className:"sps-multi-select__tags-and-input",ref:se},m?null:z.map((fe,He)=>s.createElement(rs,{id:Je[He],role:"option",disabled:a,"aria-selected":"true",key:Je[He],onRemove:()=>ne(He)},E?fe[E]:fe)),s.createElement("input",{type:"text",ref:P,"data-testid":`${O}__option-list-input`,value:j.searchText,className:"sps-text-input__input",placeholder:z.length===0?w:void 0,id:G,onClick:J,onChange:Ee,onFocus:J,onKeyDown:Me,disabled:a,role:"listbox","aria-multiselectable":"true","aria-owns":Je.join(" "),...W})),z.length!==0&&!a?s.createElement("i",{className:"sps-icon sps-icon-x-circle sps-form-control__clear-btn",onClick:fe=>ut(fe)}):null)),s.createElement(ns,{id:`${U}_options`,ref:Y,"data-testid":`${O}__option-list`,attachTo:le,captionKey:t,disabledOptions:l?z:null,isOpen:Q,comparisonKey:c,keepOpen:!0,keyDown:j.keyDown,options:v,specialAction:e,onOptionSelected:ie,onPositionFlip:it,hideInlineSearch:!0,optionRole:"option",onOptionListChanged:lt,searchDebounce:o,search:j.searchText,tall:T,textKey:E,zeroState:I,loading:x,maxHeightPx:L,maxHeightRem:C,disableOptionsMemoization:R,onSpecialActionSelect:ve}))}Object.assign(ji,{props:$N,displayName:"SpsMultiSelect"});const Bm={general:{label:"General Usage",description:({NavigateTo:e})=>s.createElement(s.Fragment,null,s.createElement("h5",null,"Use a Mulit-Select"),s.createElement("ul",null,s.createElement("li",null,"When a list of predetermined values can be provided and the input allows multiple entries.")),s.createElement("h5",null,"Do Not Use a Multi-Select:"),s.createElement("ul",null,s.createElement("li",{className:"mb-2"},"When there are only two possible options. Consider"," ",s.createElement(e,{to:"checkbox"},"Checkboxes")," or"," ",s.createElement(e,{to:"radio-buttons"},"Radio Buttons")," instead."),s.createElement("li",null,"When it is ideal to display all available options without requiring a click. Consider"," ",s.createElement(e,{to:"checkbox"},"Checkboxes")," or"," ",s.createElement(e,{to:"radio-buttons"},"Radio Buttons")," instead.")),s.createElement("h5",null,"Using Multi-Selects in a Form"),s.createElement("p",null,"Reference the ",s.createElement(e,{to:"form"},"Forms")," page for guidelines for placing"," ",s.createElement(e,{to:"text-inputs"},"Inputs")," in Form Layouts."))},basicMuliSelect:{label:"Basic Multi-Selects",description:"Basic Multi-Selects include a label and dropdown menu including a list of options. The user is allowed to make a single selection.",examples:{basic:{react:y.code`
|
|
5314
5314
|
import {
|
|
5315
5315
|
SpsLabel,
|
|
5316
5316
|
SpsMultiSelect,
|
|
@@ -5692,7 +5692,7 @@ var r=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
5692
5692
|
<br />
|
|
5693
5693
|
{JSON.stringify(formValue)}
|
|
5694
5694
|
</>
|
|
5695
|
-
}`}}}},KN={page:"number",numPages:"number",onPageChange:"(number) => void",disabled:"boolean",unknownPageCount:"boolean",nextPageBtnDisabled:"boolean"};function
|
|
5695
|
+
}`}}}},KN={page:"number",numPages:"number",onPageChange:"(number) => void",disabled:"boolean",unknownPageCount:"boolean",nextPageBtnDisabled:"boolean"};function vo(e){const{numPages:t=0,onPageChange:n,page:r=1,unsafelyReplaceClassName:o,className:a,"data-testid":l,disabled:c=!1,unknownPageCount:p=!1,nextPageBtnDisabled:f=!1,...m}=e,{t:u}=s.useContext(Ke),[h,g]=s.useState(r),[v,w]=s.useState(r);s.useEffect(()=>{w(r),g(r)},[r]);function T(I){const x=y.constrain(I,[1,t]);I!==v&&(w(x),g(x),n&&typeof n=="function"&&n(x))}function E(I){g(Number(I.target.value)||"")}const D=H(o||"sps-page-selector",a),k=En();return s.createElement("div",{className:D,"data-testid":l,...m},!p&&s.createElement(s.Fragment,null,s.createElement("div",{className:"sps-pagination__input-wrapper","data-testid":`${l}__input`},s.createElement("div",{className:"sps-form-control sps-pagination__input-sizer"},h),s.createElement("label",{htmlFor:k.current,className:"sr-only"},u("design-system:pagination.page")),s.createElement(ds,{onSubmit:()=>T(Number(h))},s.createElement("input",{id:k.current,type:"text",value:h,onInput:E,onChange:()=>{},className:"sps-form-control sps-pagination__input",disabled:c,onBlur:()=>T(Number(h))}))),s.createElement("span",{className:"sps-page-selector__total-pages","data-testid":`${l}_page-count`},Number.isNaN(t)?u("design-system:pagination.ofMany"):u("design-system:pagination.ofPageCount",{pageCount:t}))),s.createElement("div",{className:"sps-icon-button-panel","data-testid":`${l}__buttons`},s.createElement("div",{className:H("sps-button","sps-button--icon",(v===1||c)&&"sps-button--disabled")},s.createElement("button",{type:"button",onClick:()=>T(v-1),disabled:v===1||c,title:u("design-system:pagination.prevPage")},s.createElement("i",{className:"sps-icon sps-icon-chevron-left","aria-hidden":"true"}))),s.createElement("div",{className:H("sps-button","sps-button--icon",(v===t||c||f)&&"sps-button--disabled")},s.createElement("button",{type:"button",onClick:()=>T(v+1),disabled:v===t||c||f,title:u("design-system:pagination.nextPage")},s.createElement("i",{className:"sps-icon sps-icon-chevron-right","aria-hidden":"true"})))))}Object.assign(vo,{props:KN,displayName:"SpsPageSelector"});const HN={page:"number",pageSize:"number",pageSizeOptions:"Array<number>",totalResults:"number",onPageChange:"(page: number, pageSize: number, indices: [number, number]) => void",disabled:"boolean",unknownPageCount:"boolean",nextPageBtnDisabled:"boolean",resultsOnPage:"number"};function zi(e){const{className:t,onPageChange:n,page:r=1,pageSizeOptions:o=K.DEFAULT_PAGE_SIZE_OPTIONS,pageSize:a=o[0],"data-testid":l,totalResults:c,unsafelyReplaceClassName:p,disabled:f=!1,unknownPageCount:m=!1,nextPageBtnDisabled:u=!1,resultsOnPage:h,...g}=e,[v,w]=Jt({page:r,pageSize:a,numPages:0,indices:[0,0]});function T(C=v.pageSize){return c!==void 0?Math.ceil(c/C):NaN}function E(C=v.page,R=v.pageSize){const O=T(R),W=C===O&&c!==void 0&&c%R||R,z=h||(O===0?0:W),M=(C-1)*R;return O===0?[0,0]:[M+1,M+z]}function D(C){const R={page:C,indices:E(C)};return w(R),R}function k(C,R){const O={page:R,pageSize:C,numPages:T(C),indices:E(R,C)};return w(O),O}s.useEffect(()=>{w({numPages:T(),indices:E()})},[c,h]),s.useEffect(()=>{r!==v.page&&D(r)},[r]),s.useEffect(()=>{a!==v.pageSize&&k(a,r!==v.page?r:v.page)},[a]);function I(){return typeof c=="number"?c:"many"}function x(C){const R=k(C.target.value,1);n(R.page,R.pageSize,R.indices)}function F(C){const R=D(C);n(R.page,v.pageSize,R.indices)}const L=H(p||"sps-pagination",t);return s.createElement("div",{className:L,"data-testid":l,...g},s.createElement("div",{"data-testid":`${l}__size-selector`,className:"sps-page-size-selector"},"View",s.createElement(Yn,{options:o,onChange:x,notClearable:!0,autoFixWidth:!0,value:v.pageSize,className:"ml-1 mr-1",disabled:f}),"Per Page"),m?s.createElement("div",{className:"sps-pagination__details"},`Viewing ${v.indices[0]} - ${v.indices[1]}`):s.createElement("div",{className:"sps-pagination__details"},`Viewing ${v.indices[0]} - ${v.indices[1]} of ${I()}`),s.createElement(vo,{numPages:v.numPages,page:v.page,onPageChange:F,disabled:f,unknownPageCount:m,nextPageBtnDisabled:u}))}Object.assign(zi,{props:HN,displayName:"SpsPagination"});const Am={general:{label:"General Usage",description:()=>s.createElement(s.Fragment,null,s.createElement("p",null,"Use the Standard Pagination Bar on a list page (comprised of a Table, Content Rows, or Content Tiles). It should always appear at the bottom of the listed records."),s.createElement("p",null,"Use the Mini Pagination component when a paginated list of results exists inside a smaller Card."))},pagination:{label:"Standard Pagination Bar",description:({Link:e})=>s.createElement(s.Fragment,null,s.createElement("p",null,"The Standard Pagination Bar is comprised of three main sections. The middle section is hidden from view when the width of its container is at the responsive breakpoint of 767 pixels."),s.createElement("ul",null,s.createElement("li",null,s.createElement("p",null,s.createElement("span",{className:"sps-text-semibold"},"Results-per-page Select")," (left): allows the user to adjust the number of records being displayed per page.*")),s.createElement("li",null,s.createElement("p",null,s.createElement("span",{className:"sps-text-semibold"},"Viewing details")," (middle): describes which results are being displayed on the current page.")),s.createElement("li",null,s.createElement("p",null,s.createElement("span",{className:"sps-text-semibold"},"Page Navigator")," (right): allows the user to navigate between pages of results"))),s.createElement("i",null,"*Note: For Tables and Content Rows, per-page options should be 25, 50, and 100. For Content Tiles, per-page options should be 24, 48, and 100."),s.createElement("br",null),s.createElement("p",{className:"mt-2"},"To see an example of the Standard Pagination Bar in context with a Table, view the Table Lists section on the ",s.createElement(e,{to:"/style-and-layout/page-types"},"Page Types")," page.")),examples:{basic:{description:()=>s.createElement("h4",null,"Building the Standard Pagination Bar"),react:y.code`
|
|
5696
5696
|
import { SpsPagination } from "@spscommerce/ds-react";
|
|
5697
5697
|
function Component() {
|
|
5698
5698
|
const [page, setPage] = React.useState(2);
|
|
@@ -5770,7 +5770,7 @@ var r=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
5770
5770
|
function Component() {
|
|
5771
5771
|
return <SpsPageSelector numPages={25} onPageChange={() => {}} disabled />;
|
|
5772
5772
|
}
|
|
5773
|
-
`}}}},WN={checked:"boolean",disabled:"boolean",formMeta:"SpsFormFieldMeta<any>",inline:"boolean",centered:"boolean",label:"string",name:{type:"string",required:!0},onChange:"ChangeEventHandler",value:"any"};function
|
|
5773
|
+
`}}}},WN={checked:"boolean",disabled:"boolean",formMeta:"SpsFormFieldMeta<any>",inline:"boolean",centered:"boolean",label:"string",name:{type:"string",required:!0},onChange:"ChangeEventHandler",value:"any"};function qi({checked:e,className:t,"data-testid":n,disabled:r,formControl:o,formMeta:a,id:l,inline:c,centered:p,label:f,name:m,onChange:u,ref:h,unsafelyReplaceClassName:g,value:v,...w}){const T=a||o,E=s.useRef(null),{wrapperId:D,controlId:k}=vt(l),I=H(g||"sps-radio-button","sps-checkable",c&&"sps-checkable--inline",p&&"sps-checkable--centered",!f&&"sps-checkable--no-label",t);function x(F){var L;T&&(T.setValue(v),T.markAsDirty()),u&&u(F),(L=E.current)==null||L.focus()}return s.createElement(at,{id:D,className:I,formControl:o,formMeta:a,inputRef:E,ref:h,"data-testid":`${n}`,onClick:()=>{var F;return(F=E.current)==null?void 0:F.click()}},s.createElement("input",{type:"radio",ref:E,className:"sps-checkable__input","data-testid":`${n}__radio-input`,id:k,name:m,checked:e,disabled:r,onChange:x,...w}),s.createElement("label",{className:"sps-checkable__label",htmlFor:k},f||""))}Object.assign(qi,{props:WN,displayName:"SpsRadioButton"});const Fm={general:{label:"General Usage",description:({NavigateTo:e})=>s.createElement(s.Fragment,null,s.createElement("h5",null,"Use Radio Buttons:"),s.createElement("ul",null,s.createElement("li",null,"When only one option can be selected from the available options.")),s.createElement("h5",null,"Do Not Use Radio Buttons:"),s.createElement("ul",null,s.createElement("li",null,"When a selection causes an immediate change in the system. Use a"," ",s.createElement(e,{to:"toggle"},"Toggle")," instead."),s.createElement("li",null,"When multiple options can be selected from the available options. Use"," ",s.createElement(e,{to:"checkbox"},"Checkboxes")," instead."),s.createElement("li",null,"When the list of available options requires too much space to list efficiently. Use"," ",s.createElement(e,{to:"dropdown"},"Dropdown")," instead.")),s.createElement("h5",null,"Using Radio Buttons in a Form"),s.createElement("p",null,"Reference the ",s.createElement(e,{to:"form"},"Forms")," page for guidelines for placing Radio Buttons in Form Layouts."))},basic:{label:"Basic Radio Buttons",description:()=>s.createElement("p",null,"Radio Buttons that represent related options are grouped together with a label. The groups can be arranged horizontally or vertically to best utilize available space."),examples:{horizontal:{description:()=>s.createElement("h4",null,"Horizontal Group"),react:y.code`
|
|
5774
5774
|
import {
|
|
5775
5775
|
useSpsForm,
|
|
5776
5776
|
SpsForm,
|
|
@@ -6131,7 +6131,7 @@ var r=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
6131
6131
|
</SpsForm>
|
|
6132
6132
|
);
|
|
6133
6133
|
}
|
|
6134
|
-
`}}},conditional:{label:"Radio Buttons With Conditional Inputs",description:()=>s.createElement(s.Fragment,null,s.createElement("p",null,"Conditional input fields can be nested
|
|
6134
|
+
`}}},conditional:{label:"Radio Buttons With Conditional Inputs",description:()=>s.createElement(s.Fragment,null,s.createElement("p",null,"Conditional input fields can be nested “underneath” radio buttons. These conditional inputs display only when the corresponding radio option is in the selected state. Multiple conditional inputs can be nested under a single radio buttons."),s.createElement("p",null,s.createElement("i",null,"Note: Conditional Inputs can appear with or without labels, depending on context."))),examples:{horizontal:{description:()=>s.createElement("h4",null,"Horizontal"),react:y.code`
|
|
6135
6135
|
import {
|
|
6136
6136
|
useSpsForm,
|
|
6137
6137
|
SpsForm,
|
|
@@ -6314,7 +6314,7 @@ var r=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
6314
6314
|
</SpsForm>
|
|
6315
6315
|
);
|
|
6316
6316
|
}
|
|
6317
|
-
`}}}},Vm=({branch:e,setActiveBranch:t,activeBranch:n})=>{const[r,
|
|
6317
|
+
`}}}},Vm=({branch:e,setActiveBranch:t,activeBranch:n})=>{const[r,o]=_.useState(e.expanded||!1);return s.createElement("ul",{className:H("sps-side-nav__branch",e.name===n&&"sps-side-nav__branch--active")},s.createElement("li",{className:H("sps-side-nav__leaf",e.name===n&&"sps-side-nav__leaf--active")},s.createElement("span",{className:"sps-side-nav__link",onClick:()=>{o(!r),e.subNavItems||t(e.name,e.key)},onKeyDown:a=>{(a.key==="Enter"||a.key===" ")&&(a.stopPropagation(),a.preventDefault(),o(!r),e.subNavItems||t(e.name,e.key))},role:"tab",tabIndex:0,"aria-selected":e.name===n},e.subNavItems&&s.createElement("i",{className:H("sps-icon sps-side-nav__toggle",r?"sps-icon-chevron-down":"sps-icon-chevron-right")}),s.createElement("span",{className:"sps-side-nav__link-title"},e.icon&&s.createElement("i",{className:`sps-icon sps-icon-${e.icon} mr-2`}),e.name),s.createElement("div",{className:"sps-side-nav__link-tag",style:{marginTop:"-2px"}},e.tag&&s.createElement("span",{className:`sps-tag sps-tag--${e.tag}`},e.tagContent))),e.subNavItems&&r&&e.subNavItems.map(a=>s.createElement(Vm,{branch:{...a,expanded:yo(a.subNavItems||[],n)},setActiveBranch:t,activeBranch:n,key:a.key??a.name}))))},yo=(e,t)=>e?e.some(n=>n.name===t)||e.some(n=>yo(n.subNavItems||[],t)):!1,$m=({title:e,titleIcon:t,navOptions:n,onNavChange:r,activeNavItem:o,tabs:a,onTabChange:l,initialActiveTab:c,filterable:p,filterInputPlaceholder:f})=>{const m=_.useRef(o),[u,h]=_.useState(o),[g,v]=_.useState(c||(a?a[0]:"")),[w,T]=_.useState(""),E=(x,F)=>{h(x),r&&r(x,F)},D=x=>{v(x),l&&l(x)},k=x=>x?x.some(F=>F.name.toLowerCase().includes(w))||x.some(F=>k(F.subNavItems||[])):!1,I=n.map(x=>({...x,navItems:x.navItems.filter(F=>F.name.toLowerCase().includes(w)||k(F.subNavItems||[]))}));return o!==m.current&&(h(o),m.current=o),s.createElement("div",{className:"sps-side-nav sps-card"},e&&s.createElement("div",{className:"sps-card__header",title:e},s.createElement("div",{className:"sps-card__title"},t&&s.createElement("i",{className:`sps-icon sps-icon-${t}`}),e)),a&&s.createElement("nav",{className:"sps-nav sps-nav--tabs"},a.map(x=>s.createElement("span",{className:H("sps-nav__item","sps-nav__link",x===g&&"active"),"data-toggle":"tab",role:"tab",tabIndex:0,key:x,onClick:()=>D(x),onKeyDown:F=>{(F.key==="Enter"||F.key===" ")&&(F.stopPropagation(),F.preventDefault(),D(x))}},s.createElement("span",null,x)))),s.createElement("div",{className:"sps-card__body"},p&&s.createElement("section",{className:"sps-side-nav__section"},s.createElement("div",{className:"sps-text-input"},s.createElement("div",{className:"sps-form-control"},s.createElement("i",{className:"sps-text-input__icon sps-icon sps-icon-filter"}),s.createElement("input",{type:"text",className:"sps-text-input__input",placeholder:f,onChange:x=>{T(x.target.value)}})))),I.map(x=>s.createElement("section",{className:"sps-side-nav__section",key:x.key??x.sectionTitle},x.sectionTitle&&s.createElement("div",{className:"sps-side-nav__section-title",style:{fontWeight:400}},x.sectionTitle),x.navItems.map(F=>s.createElement(Vm,{branch:{...F,expanded:yo(F.subNavItems||[],o)},activeBranch:u,setActiveBranch:(L,C)=>{E(L,C)},key:F.key??F.name}))))))},Km={usage:{label:"Usage",customSection:()=>s.createElement(s.Fragment,null,s.createElement("div",null,s.createElement("span",{className:"sps-body-14 mb-2"},"Use the Side Navigation if:"),s.createElement("ul",{className:"mt-2"},s.createElement("li",{className:"mb-1"},"The navigation benefits from subsections or nested structures"),s.createElement("li",{className:"mb-1"},"There are too many items for Tabbed Navigation"),s.createElement("li",null,"The navigation items have long names"))),s.createElement("div",null,s.createElement("span",{className:"sps-body-14 mb-2"},"Avoid using the Side Navigation if:"),s.createElement("ul",{className:"mt-2"},s.createElement("li",{className:"mb-1"},"Tabbed Navigation is sufficient"),s.createElement("li",{className:"mb-1"},"The full width of the page is required to sufficiently display content"))))},filter:{label:"Filter",description:"Use Filters when the Side Navigation benefits from filtering, usually when it contains a long list of navigation items.",examples:{simple:{react:y.code`
|
|
6318
6318
|
import { SpsSideNav } from "@spscommerce/ds-react";
|
|
6319
6319
|
import { SpsIcon } from "@spscommerce/ds-shared";
|
|
6320
6320
|
function DemoComponent() {
|
|
@@ -6635,7 +6635,7 @@ var r=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
6635
6635
|
</div>
|
|
6636
6636
|
);
|
|
6637
6637
|
}
|
|
6638
|
-
`}}}},GN={disabled:"boolean",href:"string",label:"string",icon:"SpsIcon",kind:"StdButtonKind",options:"Array<SpsActionMethod | [SpsActionDescriptor, () => void]>",spinning:"boolean",spinningTitle:"string"};function
|
|
6638
|
+
`}}}},GN={disabled:"boolean",href:"string",label:"string",icon:"SpsIcon",kind:"StdButtonKind",options:"Array<SpsActionMethod | [SpsActionDescriptor, () => void]>",spinning:"boolean",spinningTitle:"string"};function Ji(e){const{children:t,className:n,"data-testid":r,disabled:o,href:a,label:l,options:c,icon:p,kind:f=K.StdButtonKind.DEFAULT,spinning:m,spinningTitle:u,unsafelyReplaceClassName:h,...g}=e,v=s.useRef(null),[w,T]=s.useState({width:0}),[E,D]=s.useState(!1),[k,I]=s.useState(!1);s.useLayoutEffect(()=>{v.current&&T({width:v.current.offsetWidth})},[]),s.useEffect(()=>{I(!!m)},[m]);const x=()=>{D(!0)},F=()=>{D(!1)},L=H(h||"sps-split-button",`sps-split-button--${f}`,E&&"sps-split-button--open",n);return s.createElement(s.Fragment,null,k?s.createElement(ze,{className:n,"data-testid":r,style:{width:w.width},kind:f,icon:p,href:a,spinning:!0,spinningTitle:u},l):s.createElement("div",{ref:v,className:L,"data-testid":r,...g},s.createElement(ze,{kind:f,icon:p,href:a,disabled:o},l),s.createElement(Xn,{kind:f,options:c,disabled:o,onOpen:x,onClose:F})))}Object.assign(Ji,{props:GN,displayName:"SpsSplitButton"});const Hm={kinds:{label:"Regular Split Buttons",description:y.code`<p>info about split buttons</p>`,examples:{basic:{description:y.code`<p>Basic</p>`,imports:y.code`
|
|
6639
6639
|
import { SpsSplitButton } from "@spscommerce/ds-react";
|
|
6640
6640
|
`,jsx:y.code`
|
|
6641
6641
|
<React.Fragment>
|
|
@@ -6707,7 +6707,7 @@ var r=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
6707
6707
|
]} className="mr-1">
|
|
6708
6708
|
</SpsSplitButton>
|
|
6709
6709
|
</React.Fragment>
|
|
6710
|
-
`}}}},YN={};function
|
|
6710
|
+
`}}}},YN={};function ts(e){const{children:t,className:n,"data-testid":r,unsafelyReplaceClassName:o,...a}=e,l=H(o||"sps-content-row__expansion",n);return s.createElement("div",{className:l,...a,"data-testid":`${r}__expansion`},t)}Object.assign(ts,{props:YN,displayName:"SpsSummaryListExpansion"});const UN={expanded:"boolean",selected:"boolean",onToggle:"(isExpanded: boolean) => void"};function Zi(e){const{children:t,className:n,expanded:r,onToggle:o,selected:a,"data-testid":l,unsafelyReplaceClassName:c,...p}=e,[f,m]=Jt({isExpanded:r,expandable:!1});s.useEffect(()=>{const E=s.Children.toArray(t).some(D=>s.isValidElement(D)&&D.type===ts);m({expandable:E})},[]);function u(){const E=!f.isExpanded;m({isExpanded:E}),o&&o(E)}function h(E){E.stopPropagation(),u()}function g(E){(E.key==="Enter"||E.key===" "||E.key==="Spacebar")&&(E.preventDefault(),E.stopPropagation(),u())}const v=H(c||"sps-summary-list-row","sps-content-row",f.expandable&&"sps-summary-list-row--expandable",f.isExpanded&&"sps-content-row--expanded",a&&"sps-summary-list-row--selected",n),[w,T]=Pt(t,[{type:ts}]);return console.warn(["The SpsSummaryListRow component will be replaced by the SpsContentRow component.","All references to it should be replaced before SpsSummaryListRow is removed.","Reach out to the design system help Slack channel if you have any questions!"].join(" ")),s.createElement("div",{className:v,"data-testid":l,...p},s.createElement("div",{className:"sps-content-row__col-group","data-testid":`${l}__col-group`,onClick:h,onKeyDown:g,tabIndex:0},T),w)}Object.assign(Zi,{props:UN,displayName:"SpsSummaryListRow"});const jN={borderless:"boolean",lean:"boolean",leaner:"boolean",width:"string"};function Xi(e){const{className:t,children:n,borderless:r,lean:o,leaner:a,"data-testid":l,unsafelyReplaceClassName:c,width:p,...f}=e,m=H(c||"sps-content-row__col",o&&"sps-content-row__col--lean",a&&"sps-content-row__col--leaner",r&&"sps-content-row__col--borderless",t);return s.createElement("div",{className:m,style:{width:p},...f,"data-testid":`${l}__col`},n)}Object.assign(Xi,{props:jN,displayName:"SpsSummaryListColumn"});const Wm={basic:{label:"Basic Usage",examples:{basic:{imports:y.code`
|
|
6711
6711
|
import {
|
|
6712
6712
|
SpsSummaryListRow,
|
|
6713
6713
|
SpsSummaryListColumn,
|
|
@@ -7001,7 +7001,7 @@ var r=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
7001
7001
|
</SpsSummaryListRow>
|
|
7002
7002
|
);
|
|
7003
7003
|
}
|
|
7004
|
-
`}}}},zN={tasks:"ReactSpsTask[]",taskQueuePosition:"Position",notificationText:"string",tooltipConfig:"{ position: Position, kind: TooltipKind }",onClose:"() => void",onOpen:"() => void",onClearCompleted:"() => void",suppressTooltips:"boolean"};function
|
|
7004
|
+
`}}}},zN={tasks:"ReactSpsTask[]",taskQueuePosition:"Position",notificationText:"string",tooltipConfig:"{ position: Position, kind: TooltipKind }",onClose:"() => void",onOpen:"() => void",onClearCompleted:"() => void",suppressTooltips:"boolean"};function Qi({tasks:e=[],taskQueuePosition:t=K.Position.BOTTOM_RIGHT,notificationText:n,tooltipConfig:r={},onOpen:o,onClose:a,onClearCompleted:l,className:c,"data-testid":p,unsafelyReplaceClassName:f,suppressTooltips:m=!1,...u}){const{t:h}=s.useContext(Ke),g=!!e.length,[v,w]=s.useState(!1),[T,E]=s.useState(g),D=s.useRef(null),k=s.useRef(null),I=s.useCallback(()=>{w(!1),a&&a()},[]);s.useEffect(()=>{v?window.addEventListener("resize",I):window.removeEventListener("resize",I)},[v]);const x=Er("sps-task-queue-portal"),F=s.useContext(Lt),[L]=v?Wn(k,D,t,{altPosition:t,...F}):[{},!1],C=r.position||K.Position.BOTTOM_RIGHT,R=r.kind||K.TooltipKind.DEFAULT,O=e.filter(P=>P.unread).length,W=e.filter(P=>P.status===K.SpsTaskStatus.IN_PROGRESS).length,z=e.some(P=>P.status===K.SpsTaskStatus.COMPLETED||P.status===K.SpsTaskStatus.ERRORED),M=s.useRef(a);M.current=a;const U=s.useRef(null),G=()=>{g&&!v?(w(!0),o&&o()):v&&(w(!1),a&&a()),U.current&&(U.current.scrollTop=0)},j=P=>P.status===K.SpsTaskStatus.IN_PROGRESS?K.SpsTaskStatusIcons[P.status]:`sps-icon sps-icon-${K.SpsTaskStatusIcons[P.status]}`;s.useEffect(()=>{v&&!g&&(w(!1),M.current&&M.current())},[v,g]);const A=s.useRef();s.useEffect(()=>{O>0?(E(!0),A.current&&window.clearTimeout(A.current),A.current=window.setTimeout(()=>{A.current=void 0,E(!1)},K.TASK_QUEUE_NOTIFICATION_DURATION_MS)):(A.current&&(window.clearTimeout(A.current),A.current=void 0),E(!1))},[O]),s.useEffect(()=>{const P=()=>{w(Y=>(Y&&M.current&&M.current(),!1))};return document.addEventListener("click",P),()=>{document.removeEventListener("click",P)}},[]),s.useEffect(()=>()=>{A.current&&window.clearTimeout(A.current)},[]);const ee=H(f||"sps-task-queue",v&&"sps-task-queue--open",v&&"z-stratum-dropdown",!g&&"sps-task-queue--no-tasks",c);function le(P){return(P.actions||[]).map(Y=>{if(s.isValidElement(Y)){if(Y.type!==ze||Y.props.kind!==K.ButtonKind.ICON)throw new Error("Task queue task action must be a config object or an SpsButton of kind ICON");return Y}return s.createElement("div",{key:Y.icon,className:"sps-button sps-button--icon"},s.createElement("button",{type:"button",title:Y.label,disabled:Y.disabled,onClick:()=>{Y.onClick&&Y.onClick(P)}},Y.caption,Y.icon&&s.createElement("i",{className:`sps-icon sps-icon-${Y.icon}`,"aria-hidden":"true"})))})}return s.createElement("div",{className:ee,onClick:P=>{P.nativeEvent.stopImmediatePropagation()},"data-testid":p,...u},s.createElement("button",{type:"button",ref:D,className:"sps-task-queue__button",title:"Task Queue",onClick:G},!!O&&s.createElement("span",{className:"sps-tag sps-tag--info"},O),W?s.createElement("span",{className:"sps-spinner sps-spinner--small"}):s.createElement("i",{className:"sps-icon sps-icon-list","aria-hidden":"true"})),s.createElement(Rt,{for:D,position:C,kind:R,showOn:g?K.TooltipShowTrigger.MANUAL:K.TooltipShowTrigger.MOUSEOVER,isShown:T&&!v?Ce.VISIBLE:Ce.HIDDEN,hideDelay:Number(g)&&K.TASK_QUEUE_NOTIFICATION_DURATION_MS},!m&&T&&(n||h("design-system:taskQueue.newTask")),!m&&!T&&!g&&h("design-system:taskQueue.noTasks")),x(s.createElement("div",{ref:k,className:H("sps-task-queue__task-list",v&&"sps-task-queue__task-list--open","z-stratum-dropdown"),style:L},s.createElement("div",{ref:U,className:"sps-task-queue__task-list-tasks"},e.map((P,Y)=>s.createElement("div",{key:Y,className:H("sps-task-queue__task",P.unread&&"sps-task-queue__task--unread")},s.createElement("i",{className:j(P)}),s.createElement("div",{className:"sps-task-queue__task-description"},s.createElement("div",{className:"sps-task-queue__task-heading"},P.heading),P.subheading&&s.createElement("div",{className:"sps-task-queue__task-subheading",title:P.subheading},P.subheading)),P.actions&&!!P.actions.length&&s.createElement("div",{className:"sps-task-queue__task-actions"},le(P))))),z&&l&&s.createElement("div",{className:"sps-task-queue__footer"},s.createElement("div",{className:"sps-button sps-button--link"},s.createElement("button",{type:"button",onClick:l},h("design-system:taskQueue.clearCompleted")))))))}Object.assign(Qi,{props:zN,displayName:"SpsTaskQueue"});const Gm={inProgress:{label:"Task Queue in progress",description:"<p>Info about Task Queue</p>",examples:{inProgress:{react:y.code`
|
|
7005
7005
|
import { SpsTaskQueue } from "@spscommerce/ds-react";
|
|
7006
7006
|
import { SpsTaskStatus, SpsIcon } from "@spscommerce/ds-shared";
|
|
7007
7007
|
|
|
@@ -7290,7 +7290,7 @@ var r=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
7290
7290
|
</div>
|
|
7291
7291
|
);
|
|
7292
7292
|
}
|
|
7293
|
-
`}}}},qN={disabled:"boolean",formMeta:"SpsFormFieldMeta<string>",icon:"SpsIcon",name:"string",onChange:"ChangeEventHandler<HTMLInputElement>",placeholder:"string",value:"string",additionalText:"string"},
|
|
7293
|
+
`}}}},qN={disabled:"boolean",formMeta:"SpsFormFieldMeta<string>",icon:"SpsIcon",name:"string",onChange:"ChangeEventHandler<HTMLInputElement>",placeholder:"string",value:"string",additionalText:"string"},To=s.forwardRef(({className:e,disabled:t=!1,formControl:n,formMeta:r,icon:o,id:a,name:l,onChange:c,placeholder:p,"data-testid":f,title:m,unsafelyReplaceClassName:u,value:h="",additionalText:g,notClearable:v,...w},T)=>{const E=r||n,{wrapperId:D,controlId:k}=vt(a,E),I=s.useRef(null);function x(R,O){E&&(E.setValue(R),E.markAsDirty()),c&&I.current&&c(O||new Cn(I.current))}function F(){I.current&&(I.current.value="",x(""))}function L(R){x(R.target.value,R)}const C=H(u||"sps-text-input",e);return s.createElement(at,{id:D,className:C,formControl:n,formMeta:r,inputRef:I,ref:T,focusInputOnClick:!0,"data-testid":`${f}`},s.createElement("div",{className:H("sps-form-control",t&&"disabled")},o&&s.createElement("i",{className:H("sps-text-input__icon","sps-icon",`sps-icon-${o}`)}),s.createElement("input",{type:"text",ref:I,"data-testid":`${f}__input`,className:"sps-text-input__input",id:k,name:l,placeholder:p,onChange:L,title:m,value:h,disabled:t,...w}),!v&&h&&!t&&s.createElement("i",{"data-testid":`${f}__input_clear`,className:"sps-icon sps-icon-x-circle sps-form-control__clear-btn",onClick:F})),g&&s.createElement("p",{className:"sps-input__additional-text"},g))});Object.assign(To,{props:qN,displayName:"SpsTextInput"});const Ym={general:{label:"General Usage",description:({NavigateTo:e})=>s.createElement(s.Fragment,null,s.createElement("h5",null,"Use a Text Input:"),s.createElement("ul",null,s.createElement("li",null,"When the value required is short (a single word or short phrase)."),s.createElement("li",null,"When only one value is required or accepted.")),s.createElement("h5",null,"Do Not Use a Text Input:"),s.createElement("ul",null,s.createElement("li",null,"When a value of considerable length (such as a sentence or paragraph) is required or accepted. Use a ",s.createElement(e,{to:"text-areas"},"Text Area")," instead."),s.createElement("li",null,"When more than one value is required or accepted in the field. Use"," ",s.createElement(e,{to:"multi-select"},"Multi-Select")," instead."),s.createElement("li",null,"When a boolean selection is required (such as on/off, yes/no, etc). Use"," ",s.createElement(e,{to:"checkbox"},"Checkboxes"),","," ",s.createElement(e,{to:"radio-buttons"},"Radio Buttons")," or"," ",s.createElement(e,{to:"toggle"},"Toggles")," instead.")),s.createElement("h5",null,"Using Text Inputs in a Form"),s.createElement("p",null,"Reference the ",s.createElement(e,{to:"form"},"Forms")," page for guidelines for placing Inputs in Form Layouts."))},basic:{label:"Basic Text Inputs",description:()=>s.createElement("p",null,"Basic Text Inputs include a label and an input field."),examples:{standard:{react:y.code`
|
|
7294
7294
|
import { SpsLabel, SpsTextInput, useSpsForm } from "@spscommerce/ds-react";
|
|
7295
7295
|
|
|
7296
7296
|
function DemoComponent() {
|
|
@@ -7365,7 +7365,7 @@ var r=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
7365
7365
|
</div>
|
|
7366
7366
|
);
|
|
7367
7367
|
}
|
|
7368
|
-
`}}}},JN={disabled:"boolean",formMeta:"SpsFormFieldMeta<string>",name:"string",onChange:"ChangeEventHandler",placeholder:"string",rows:"number",value:"string",additionalText:"string"};function
|
|
7368
|
+
`}}}},JN={disabled:"boolean",formMeta:"SpsFormFieldMeta<string>",name:"string",onChange:"ChangeEventHandler",placeholder:"string",rows:"number",value:"string",additionalText:"string"};function el({className:e,disabled:t=!1,formControl:n,formMeta:r,id:o,name:a,onChange:l,placeholder:c="",ref:p,rows:f=2,"data-testid":m,unsafelyReplaceClassName:u,value:h="",additionalText:g,...v}){const w=r||n,{wrapperId:T,controlId:E}=vt(o,w),D=s.useRef(null);function k(L,C){w&&(w.setValue(L),w.markAsDirty()),l&&D.current&&l(C||new Cn(D.current))}function I(){D.current&&(D.current.value="",k(""))}function x(L){k(L.target.value,L)}const F=H(u||"sps-textarea",e);return s.createElement(at,{id:T,className:F,formControl:n,formMeta:r,inputRef:D,ref:p,"data-testid":m},s.createElement("div",{className:"position-relative"},s.createElement("textarea",{ref:D,rows:f,"data-testid":`${m}__input`,className:"sps-form-control input--clearable",id:E,name:a,placeholder:c,onChange:x,"aria-label":c,value:h||"",disabled:t,...v}),h&&!t&&s.createElement("i",{"data-testid":`${m}__input_clear`,className:"sps-icon sps-icon-x-circle sps-form-control__clear-btn",onClick:I})),g&&s.createElement("p",{className:"sps-input__additional-text"},g))}Object.assign(el,{props:JN,displayName:"SpsTextarea"});const Um={general:{label:"General Usage",description:({NavigateTo:e})=>s.createElement(s.Fragment,null,s.createElement("h5",null,"Use a Text Area:"),s.createElement("ul",null,s.createElement("li",null,"When a value of considerable length (such as a sentence or paragraph) is required or accepted.")),s.createElement("h5",null,"Do Not Use a Text Area:"),s.createElement("ul",null,s.createElement("li",null,"When the value required is short (a single word or short phrase). Use a"," ",s.createElement(e,{to:"text-inputs"},"Text Input")," instead."),s.createElement("li",null,"When more than one value is required or accepted in the field. Use"," ",s.createElement(e,{to:"multi-select"},"Multi-Select")," instead."),s.createElement("li",null,"When a boolean selection is required (such as on/off, yes/no, etc). Use"," ",s.createElement(e,{to:"checkbox"},"Checkboxes"),","," ",s.createElement(e,{to:"radio-buttons"},"Radio Buttons")," or"," ",s.createElement(e,{to:"toggle"},"Toggles")," instead.")),s.createElement("h5",null,"Using Text Areas in a Form"),s.createElement("p",null,"Reference the ",s.createElement(e,{to:"form"},"Forms")," page for guidelines for placing Inputs in Form Layouts."))},basic:{label:"Basic Text Areas",description:()=>s.createElement("p",null,"Basic Text Areas include a label and a large input field. By default a Text Area is three lines tall, but the height can be adjusted."),examples:{standard:{react:y.code`
|
|
7369
7369
|
import { SpsLabel, SpsTextarea, useSpsForm } from "@spscommerce/ds-react";
|
|
7370
7370
|
function DemoComponent() {
|
|
7371
7371
|
const { formValue, formMeta, updateForm } = useSpsForm({ notes: "" });
|
|
@@ -7436,7 +7436,7 @@ var r=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
7436
7436
|
</div>
|
|
7437
7437
|
);
|
|
7438
7438
|
}
|
|
7439
|
-
`}}}},jm={active:"boolean",description:"string",disabled:"boolean",formMeta:"SpsFormFieldMeta<boolean>",label:"string",large:"boolean",onChange:"(isActive: boolean) => void"};function
|
|
7439
|
+
`}}}},jm={active:"boolean",description:"string",disabled:"boolean",formMeta:"SpsFormFieldMeta<boolean>",label:"string",large:"boolean",onChange:"(isActive: boolean) => void"};function tl(e){const{active:t,className:n,description:r,disabled:o,formControl:a,formMeta:l,id:c,label:p,large:f,onChange:m,ref:u,"data-testid":h,unsafelyReplaceClassName:g,...v}=e;Ep("SpsToggle",jm,e);const w=l||a,[T,E]=s.useState(t),{wrapperId:D,controlId:k}=vt(c,w),I=`${D}_status-label`,x=`${D}_description`,F=s.useRef(null);s.useEffect(()=>E(t),[t]);function L(R){var O;E(R.target.checked),w&&(w.setValue(R.target.checked),w.markAsDirty()),m&&m(R.target.checked),(O=F.current)==null||O.focus()}const C=H(g||"sps-toggle",T&&"sps-toggle--active",f&&"sps-toggle--large",o&&"sps-toggle--disabled",n);return s.createElement(at,{id:D,formControl:a,formMeta:l,inputRef:F,ref:u,"data-testid":`${h}`},s.createElement("div",{className:C},s.createElement("input",{type:"checkbox",ref:F,className:"sps-toggle__input",id:k,checked:T||!1,disabled:o,onChange:L,"aria-describedby":`${I},${x}`,"data-testid":`${h}__input`,...v}),s.createElement("span",{className:"sps-toggle__slider"}),p&&s.createElement("label",{className:"sps-toggle__status-label",htmlFor:k,id:I},p),r&&s.createElement("span",{className:"sps-toggle__description",id:x},r)))}Object.assign(tl,{props:jm,displayName:"SpsToggle"});const zm={general:{label:"General Usage",description:({NavigateTo:e})=>s.createElement(s.Fragment,null,s.createElement("h5",null,"Use Toggles:"),s.createElement("ul",null,s.createElement("li",{className:"mb-2"},'When an option represents a specific "on/off" state.'),s.createElement("li",{className:"mb-2"},"When the selection causes an imeediate change in the system.")),s.createElement("h5",null,"Do Not Use Toggles:"),s.createElement("ul",null,s.createElement("li",{className:"mb-2"},"When a selection does not cause an immediate change in the system."," ",s.createElement(e,{to:"checkbox"},"Checkboxes")," or"," ",s.createElement(e,{to:"radio-buttons"},"Radio Buttons")," instead."),s.createElement("li",{className:"mb-2"},"Inside a form with a save/submit button as this contradicts the immediate change in the system that a toggle controls.")))},basic:{label:"Basic Toggles",description:()=>s.createElement("p",null,"Basic toggles can appear with or without labels and can include an extended description if necessary."),examples:{basic:{description:()=>s.createElement("h4",{className:"mb-3"},"Toggle"),react:y.code`
|
|
7440
7440
|
import { SpsToggle, useSpsForm } from "@spscommerce/ds-react";
|
|
7441
7441
|
function DemoComponent() {
|
|
7442
7442
|
const { formValue, formMeta, updateForm } = useSpsForm({
|
|
@@ -7603,7 +7603,7 @@ var r=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
7603
7603
|
/>
|
|
7604
7604
|
)
|
|
7605
7605
|
}
|
|
7606
|
-
`}}}},ZN={icon:"SpsIcon",iconSize:"SpsIconSize"};function
|
|
7606
|
+
`}}}},ZN={icon:"SpsIcon",iconSize:"SpsIconSize"};function nl({icon:e,iconSize:t=K.SpsIconSize.SMALL,children:n}){return s.createElement("div",{className:"sps-tooltip__title-component"},e&&s.createElement(Yt,{icon:e,size:t}),s.createElement("span",{className:"sps-tooltip__title"},n))}Object.assign(nl,{props:ZN,displayName:"SpsTooltipTitle"});const qm={basic:{label:"Basic",description:"Info about basic usage of tooltip",examples:{basic:{description:y.code`
|
|
7607
7607
|
<p>There are two ways to tell the tooltip what to attach to. The first is to
|
|
7608
7608
|
pass in a ref.</p>
|
|
7609
7609
|
`,react:y.code`
|
|
@@ -8040,7 +8040,7 @@ var r=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
8040
8040
|
</React.Fragment>
|
|
8041
8041
|
);
|
|
8042
8042
|
}
|
|
8043
|
-
`}}}},Jm={heading:"string",icon:"SpsIcon"};function
|
|
8043
|
+
`}}}},Jm={heading:"string",icon:"SpsIcon"};function Eo(e){const{children:t,className:n,icon:r,title:o,"data-testid":a,unsafelyReplaceClassName:l,...c}=e,p=H(l||"sps-workflow",n);return s.createElement("div",{className:p,"data-testid":`${a}`,...c},o&&s.createElement("h1",{className:"sps-workflow__heading","data-testid":`${a}__title`},s.createElement("span",{className:"sps-workflow__icon","data-testid":`${a}__icon`},s.createElement("i",{"aria-hidden":"true",className:H("sps-icon",`sps-icon-${r}`)})),o),t)}Object.assign(Eo,{props:Jm,displayName:"SpsWorkflow"});function Zm(e){return s.createElement(Eo,{...e})}Object.assign(Zm,{props:Jm,displayName:"SpsWf"});const XN={size:"RingSize",progress:"number"};function rl({size:e=K.RingSize.SMALL,progress:t=0}){const r=e-4,o=r*2*Math.PI,a=o-t/100*o;return s.createElement("div",{className:"sps-progress-ring"},s.createElement("svg",{height:e*2,width:e*2,style:{transform:"rotate(-90deg)"}},s.createElement("circle",{stroke:Ea.colors.gray300,fill:"transparent",strokeWidth:4,strokeDasharray:`${o} ${o}`,r,cx:e,cy:e}),s.createElement("circle",{stroke:Ea.colors.purple200,fill:"transparent",strokeWidth:4,strokeDasharray:`${o} ${o}`,style:{strokeDashoffset:a},r,cx:e,cy:e})))}Object.assign(rl,{props:XN,displayName:"SpsProgressRing"});const QN={phases:"WizardPhase[]"},Kt="sps-wizard-sidebar";function sl({className:e,phases:t=[]}){const n=H(Kt,e);return s.createElement("div",{className:n},t.map(r=>{const o=H(`${Kt}__phase-title`,r.disabled&&`${Kt}__phase-title--disabled`);return s.createElement("div",{className:`${Kt}__phase-wrapper`,key:r.title},s.createElement("div",{className:o},r.title),r.steps.map(a=>{const l=H(`${Kt}__step`,a.active&&`${Kt}__step--active`,a.disabled&&`${Kt}__step--disabled`,!!a.onClick&&!a.disabled&&`${Kt}__step--clickable`);return s.createElement("div",{className:l,key:a.title,onClick:!a.disabled&&a.onClick||void 0},s.createElement("div",{className:`${Kt}__step-progress`},a.percentComplete===100?s.createElement("div",{className:`${Kt}__step-complete`},s.createElement(Yt,{icon:K.SpsIcon.CHECKMARK})):s.createElement(rl,{size:K.RingSize.SMALL,progress:a.percentComplete})),s.createElement("div",{className:`${Kt}__step-title`,role:"button"},a.title))}))}))}Object.assign(sl,{props:QN,displayName:"SpsWizardSidebar"});const ex={display:"string",condition:"WizardSubstepConditions",orderPosition:"string | number"};function ol(e){const{condition:t=K.WizardSubstepConditions.BASIC,orderPosition:n,display:r,children:o}=e;return s.createElement("div",{className:"sps-wizard-substep"},s.createElement("div",{className:H("sps-wizard-substep__heading",`sps-wizard-substep__heading--${t}`)},s.createElement("div",{className:"sps-wizard-substep__heading-icon"},t===K.WizardSubstepConditions.COMPLETED?s.createElement("i",{"aria-hidden":"true",className:"sps-icon sps-icon-checkmark"}):n),s.createElement("p",null,r)),s.createElement("div",{className:H("sps-wizard-substep__body",`sps-wizard-substep__body--${t}`)},o))}Object.assign(ol,{props:ex,displayName:"SpsWizardSubstep"});const Xm={substep:{label:"Substep",examples:{completed:{imports:y.code`
|
|
8044
8044
|
import { SpsWizardSubstep } from "@spscommerce/ds-react";
|
|
8045
8045
|
import { WizardSubstepConditions } from "@spscommerce/ds-shared";
|
|
8046
8046
|
`,jsx:y.code`
|
|
@@ -8118,7 +8118,7 @@ var r=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
8118
8118
|
</div>
|
|
8119
8119
|
)
|
|
8120
8120
|
}
|
|
8121
|
-
`}}}},Qm={};function
|
|
8121
|
+
`}}}},Qm={};function wo(e){const{children:t,className:n,"data-testid":r,unsafelyReplaceClassName:o,...a}=e,l=H(o||"sps-workflow__document",n);return s.createElement("span",{className:l,"data-testid":`${r}__document`,...a},t)}Object.assign(wo,{props:Qm,displayName:"SpsWorkflowDocument"});function ef(e){return s.createElement(wo,{...e})}Object.assign(ef,{props:Qm,displayName:"SpsWfDoc"});const tf={icon:"SpsIcon"};function Co(e){const{children:t,className:n,icon:r,"data-testid":o,unsafelyReplaceClassName:a,...l}=e,c=H(a||"sps-workflow__document-status",n);return s.createElement("span",{className:c,"data-testid":`${o}__doc-status`,...l},r&&s.createElement("i",{"aria-hidden":"true",className:`sps-icon sps-icon-${r}`}),t)}Object.assign(Co,{props:tf,displayName:"SpsWorkflowDocumentStatus"});function nf(e){return s.createElement(Co,{...e})}Object.assign(nf,{props:tf,displayName:"SpsWfDs"});const rf={icon:{type:"SpsIcon",required:!0},title:{type:"string",required:!0}};function Do(e){const{children:t,className:n,icon:r,title:o,"data-testid":a,unsafelyReplaceClassName:l,...c}=e,p=H(l||"sps-workflow__step",n);return s.createElement("div",{className:p,"data-testid":`${a}__step`,...c},s.createElement("i",{"aria-hidden":"true",className:`sps-icon sps-icon-${r} sps-workflow__step-icon`}),s.createElement("h2",{className:"sps-workflow__step-heading","data-testid":`${a}__step-heading`},o),t)}Object.assign(Do,{props:rf,displayName:"SpsWorkflowStep"});function sf(e){return s.createElement(Do,{...e})}Object.assign(sf,{props:rf,displayName:"SpsWfStep"});const of={basic:{label:"Basic Usage",examples:{basic:{imports:y.code`
|
|
8122
8122
|
import { SpsWorkflow, SpsWorkflowStep, SpsWorkflowDocument, SpsWorkflowDocumentStatus } from "@spscommerce/ds-react";
|
|
8123
8123
|
import { SpsIcon } from "@spscommerce/ds-shared";
|
|
8124
8124
|
`,jsx:y.code`
|
|
@@ -8168,7 +8168,7 @@ var r=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
8168
8168
|
</SpsWfStep>
|
|
8169
8169
|
</SpsWf>
|
|
8170
8170
|
</div>
|
|
8171
|
-
`}}}},tx={};function al({children:e,className:t,...n}){return s.createElement("div",{className:H("sps-filter-panel",t),...n},e)}Object.assign(al,{props:tx,displayName:"SpsFilterPanel"});const nx={title:"string | ReactNode",expanded:"boolean",heightPx:"number",heightRem:"number",onExpand:"() => void",onCollapse:"() => void"};function
|
|
8171
|
+
`}}}},tx={};function al({children:e,className:t,...n}){return s.createElement("div",{className:H("sps-filter-panel",t),...n},e)}Object.assign(al,{props:tx,displayName:"SpsFilterPanel"});const nx={title:"string | ReactNode",expanded:"boolean",heightPx:"number",heightRem:"number",onExpand:"() => void",onCollapse:"() => void"};function il({children:e,className:t,title:n,expanded:r,heightPx:o,heightRem:a,onExpand:l,onCollapse:c,...p}){const[f,m]=s.useState(r),u=typeof r<"u"?r:f,h=o?o/16:a,g=h?{overflowY:"scroll",height:`${h}rem`}:{},v=()=>s.createElement("button",{type:"button",className:"sps-filter-panel__section__expand-btn",onClick:()=>{m(!u),!u&&l?l():u&&c&&c()}},s.createElement(Yt,{icon:u?K.SpsIcon.MINUS_CIRCLE:K.SpsIcon.PLUS_CIRCLE}));return s.useEffect(()=>{m(r)},[r]),s.createElement("div",{className:H("sps-filter-panel__section",t),...p},s.createElement("div",{className:"sps-filter-panel__section__title-wrapper"},s.createElement(v,null),n&&(typeof n=="string"?s.createElement("p",null,n):n)),u&&s.createElement("div",{className:"sps-filter-panel__section__content-wrapper",style:g},s.createElement("div",{className:"sps-filter-panel__section__content"},e)))}Object.assign(il,{props:nx,displayName:"SpsFilterPanelSection"});const rx={onClear:"() => void"};function ll({children:e,className:t,onClear:n,...r}){const{t:o}=s.useContext(Ke);return s.createElement("div",{className:H("sps-filter-panel__cap",t),...r},s.createElement("div",{className:"sps-filter-panel__cap__title-wrapper"},s.createElement(Yt,{icon:K.SpsIcon.FILTER,size:K.SpsIconSize.SMALL}),s.createElement("p",null,o("design-system:filterPanel.title"))),s.createElement(ze,{kind:K.ButtonKind.LINK,onClick:n},o("design-system:filterPanel.clear")),e)}Object.assign(ll,{props:rx,displayName:"SpsFilterPanelCap"});const af={generalUsage:{label:"General Usage",examples:{general:{react:y.code`
|
|
8172
8172
|
import {
|
|
8173
8173
|
useSpsForm,
|
|
8174
8174
|
SpsForm,
|
|
@@ -8589,7 +8589,7 @@ var r=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
8589
8589
|
</div>
|
|
8590
8590
|
);
|
|
8591
8591
|
}
|
|
8592
|
-
`}}}},sx={value:"string",placeholder:"string",formMeta:"SpsFormFieldMeta<string>",onFilterChange:"ChangeEventHandler<HTMLInputElement>"};function
|
|
8592
|
+
`}}}},sx={value:"string",placeholder:"string",formMeta:"SpsFormFieldMeta<string>",onFilterChange:"ChangeEventHandler<HTMLInputElement>"};function cl({className:e,value:t,placeholder:n,formMeta:r,onFilterChange:o,...a}){const{t:l}=s.useContext(Ke);return s.createElement("div",{className:H("sps-filter-panel__filter-box",e),...a},s.createElement(To,{value:t,icon:K.SpsIcon.FILTER,formMeta:r,placeholder:n||l("design-system:filterPanel.filterPlaceholder"),onChange:o}))}Object.assign(cl,{props:sx,displayName:"SpsFilterPanelFilterBox"});const ox={showCondition:"boolean"};function dl({showCondition:e=!0,children:t,className:n,...r}){return e?s.createElement("div",{className:H("sps-conditional-field",n),...r},t):null}Object.assign(dl,{props:ox,displayName:"SpsConditionalField"});const lf={generalUsage:{label:"General Usage",examples:{withCheckbox:{react:y.code`
|
|
8593
8593
|
import {
|
|
8594
8594
|
SpsCheckbox,
|
|
8595
8595
|
SpsInputGroup,
|
|
@@ -8725,8 +8725,8 @@ var r=n.defineLocale("zh-tw",{months:"\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u5
|
|
|
8725
8725
|
</SpsForm>
|
|
8726
8726
|
)
|
|
8727
8727
|
}
|
|
8728
|
-
`}}}};function
|
|
8729
|
-
${t.join("").replace("]","\\]").replace(" ","\\s")}]+`);return e.split(n).filter(r=>r!=="")}const
|
|
8728
|
+
`}}}};function Vd(e,t){const n=new RegExp(`[\\t\r
|
|
8729
|
+
${t.join("").replace("]","\\]").replace(" ","\\s")}]+`);return e.split(n).filter(r=>r!=="")}const ax={disabled:"boolean",formMeta:"SpsFormFieldMeta<any[]>",icon:"SpsIcon",onChange:"ChangeEventHandler",onEntryChange:"(searchText: string) => void",placeholder:"string",value:"any",createTagOptions:"string[]"};function pl({className:e,disabled:t,formControl:n,formMeta:r,id:o,onChange:a,onEntryChange:l,placeholder:c,unsafelyReplaceClassName:p,value:f,icon:m,createTagOptions:u=[" ",","],"data-testid":h,...g}){const v=r||n,{wrapperId:w,controlId:T}=vt(o,v),[E,D]=Jt({keyDown:null,searchText:"",activeTagIndex:null,optionIds:""});s.useEffect(()=>{l&&l(E.searchText)},[E.searchText]);const k=s.useRef(null),I=s.useRef(null),x=s.useRef(null);function F(){setTimeout(()=>{var A;(A=I.current)==null||A.focus()},0)}function L(A){D({searchText:""}),v&&(v.setValue(A),v.markAsDirty()),a&&a(new Cn({value:A}))}function C(A){const ee=(f||[]).filter((le,P)=>P!==A);L(ee)}function R(A){D({searchText:A.target.value})}function O(A){if(x.current&&x.current.children.length&&typeof A=="number"){const ee=x.current.children[A],le=ee==null?void 0:ee.querySelector(".sps-clickable-tag__icon");le&&le.focus()}}const W=s.useCallback(A=>{D({activeTagIndex:null,searchText:""});const ee=E.searchText.trim(),le=f||[];ee&&le.indexOf(ee)===-1&&L([...le,...Vd(ee,u)]),!((A.key==="Tab"||A.key==="Enter")&&!E.searchText)&&A.preventDefault()},[E.searchText,f,Vd]);function z(A){W(A)}function M(A){var ee;if(!t){const le=!A.target.selectionStart&&f&&f.length,P=f?f.length:0;switch(A.key){case"Backspace":if(E.activeTagIndex===P-1){C(E.activeTagIndex),F();return}if(E.activeTagIndex!==null){C(E.activeTagIndex);return}if(le){L(f.slice(0,P-1)),F();return}break;case"Delete":E.activeTagIndex!==null&&(C(E.activeTagIndex),F());break;case"Enter":case"Tab":W(A);break;case"Up":case"ArrowUp":case"Down":case"ArrowDown":A.preventDefault();break;case"Left":case"ArrowLeft":if(le){E.activeTagIndex===null?(D({activeTagIndex:P-1}),O(P-1)):E.activeTagIndex>0&&(D({activeTagIndex:E.activeTagIndex-1}),O(E.activeTagIndex-1));return}break;case"Right":case"ArrowRight":if(E.activeTagIndex!==null){E.activeTagIndex===P-1?(D({activeTagIndex:null}),(ee=I.current)==null||ee.focus()):(D({activeTagIndex:E.activeTagIndex+1}),O(E.activeTagIndex+1));return}break}for(const Y of u)A.key===Y&&W(A);A.persist(),D({keyDown:A})}}function U(A){L([]),A.stopPropagation()}const G=H(p||"sps-multi-select",t&&"sps-form-control--disabled",e),j=new Array((f==null?void 0:f.length)||0).fill(0).map((A,ee)=>`${w}_tag-${ee}`);return s.createElement(at,{id:w,className:G,formControl:n,formMeta:r,ref:k,inputRef:I,focusInputOnClick:!0,onKeyDown:M,role:"listbox","aria-multiselectable":!0,"aria-activedescendant":j[E.activeTagIndex||0],"aria-owns":E.optionIds},s.createElement("div",{className:"sps-text-input"},s.createElement("div",{className:H("sps-form-control",f&&!t&&"sps-form-control--clearable")},m&&s.createElement("i",{className:H("sps-text-input__icon","sps-icon",`sps-icon-${m}`)}),s.createElement("div",{className:"sps-multi-select__tags-and-input",ref:x},Array.isArray(f)&&f.map((A,ee)=>s.createElement(rs,{id:j[ee],role:"option",disabled:t,"aria-selected":"true",key:j[ee],onRemove:()=>C(ee)},s.createElement("span",null,A))),s.createElement("input",{type:"text",ref:I,"data-testid":`${h}__multi-value-text-input`,value:E.searchText,className:"sps-text-input__input",placeholder:E.searchText.length===0&&(!f||f.length===0)?c:void 0,id:T,onBlur:z,onChange:R,onKeyDown:M,disabled:t,role:"listbox","aria-multiselectable":"true","aria-owns":j.join(" "),...g})),f&&f.length!==0&&!t?s.createElement("i",{className:"sps-icon sps-icon-x-circle sps-form-control__clear-btn",onClick:A=>U(A)}):null)))}Object.assign(pl,{props:ax,displayName:"SpsMultiValueTextInput"});const cf={general:{label:"General Usage",description:()=>s.createElement(s.Fragment,null,s.createElement("h5",null,"Coming soon"))},basic:{label:"Basic Usage",examples:{basic:{react:y.code`
|
|
8730
8730
|
import { SpsMultiValueTextInput, SpsLabel, useSpsForm } from "@spscommerce/ds-react";
|
|
8731
8731
|
function DemoComponent() {
|
|
8732
8732
|
const { formValue, formMeta, updateForm } = useSpsForm({
|
|
@@ -8853,7 +8853,7 @@ ${t.join("").replace("]","\\]").replace(" ","\\s")}]+`);return e.split(n).filter
|
|
|
8853
8853
|
</>
|
|
8854
8854
|
)
|
|
8855
8855
|
}
|
|
8856
|
-
`}}}},ix={disabled:"boolean",formMeta:"SpsFormFieldMeta<string>",onChange:"(newValue: string) => void",value:"string",twentyFourHour:"boolean"}
|
|
8856
|
+
`}}}},ix={disabled:"boolean",formMeta:"SpsFormFieldMeta<string>",onChange:"(newValue: string) => void",value:"string",twentyFourHour:"boolean"},$d=["AM","PM"];function ul({className:e,disabled:t,formMeta:n,id:r,onChange:o,value:a,twentyFourHour:l=!1,"data-testid":c,...p}){var C;const{current:f}=En(r),m=l?a:a==null?void 0:a.split(" ")[0],u=X.validateTimeString(m,l)?X.padIncompleteTimeString(m,l):"",h=l?"":(C=a==null?void 0:a.split(" ")[1])==null?void 0:C.toUpperCase(),g=u&&$d.find(R=>R===h)||"",[v,w]=s.useState(u),[T,E]=s.useState(g||"AM");function D(R){n&&(n.setValue(R||""),n.markAsDirty()),o&&o(R||"")}function k(R){X.validateTimeString(R.target.value,l)&&w(R.target.value)}function I(R){if(X.validateTimeString(R??v,l)){const O=X.padIncompleteTimeString(R??v,l);w(O),D(O&&!l?`${O} ${T}`:O||"")}else D("")}function x(R){E(R.target.value);const O=X.padIncompleteTimeString(v,l);O&&!l&&D(`${O} ${R.target.value}`)}function F(R){X.validateTimeString(R,l)&&(w(R??""),setTimeout(()=>I(R),0))}s.useEffect(()=>{u!==v&&w(u)},[u]),s.useEffect(()=>{g&&g!==T&&E(g)},[g]);const L=H("sps-time-input",e);return l?s.createElement(zt,{id:f,"data-testid":c,className:L,suggestions:Ca,zeroState:"Custom time",placeholder:"00:00",value:v,onChange:k,onBlur:()=>I(),onSelectionChange:F,onKeyDown:R=>{R.key==="Enter"&&I()},disabled:t,inputNotClearable:!0,autoFocusOnSelection:!0,...p}):s.createElement(yr,null,s.createElement(zt,{id:f,"data-testid":c,className:L,suggestions:wa,zeroState:"Custom time",placeholder:"12:00",value:v,onChange:k,onBlur:()=>I(),onSelectionChange:F,onKeyDown:R=>{R.key==="Enter"&&I()},disabled:t,inputNotClearable:!0,autoFocusOnSelection:!0}),s.createElement(Yn,{id:`${f}__select`,"data-testid":`${c}__select`,options:$d,value:T,onChange:x,disabled:t,notClearable:!0}))}Object.assign(ul,{props:ix,displayName:"SpsTimeInput"});const df={basic:{label:"Basic",examples:{basic:{react:y.code`
|
|
8857
8857
|
import {
|
|
8858
8858
|
useSpsForm,
|
|
8859
8859
|
SpsTimeInput,
|
|
@@ -8906,7 +8906,7 @@ ${t.join("").replace("]","\\]").replace(" ","\\s")}]+`);return e.split(n).filter
|
|
|
8906
8906
|
</>
|
|
8907
8907
|
);
|
|
8908
8908
|
}
|
|
8909
|
-
`}}}},lx={Autocomplete:{components:[qt],examples:wp},Checkbox:{components:[Xn],examples:Cp},"Clickable Tags":{components:[ss],examples:Dp},"Column Chooser":{components:[Ri,pa],examples:Ju},"Conditional Fields":{description:()=>s.createElement("p",null,"A conditional field is one that is only available when a certain option is selected amongst a set of checkboxes or radio buttons."),components:[cl],examples:lf},"Content Rows":{components:[Oi,Wn,ua],examples:Zu},Datepicker:{components:[Li],examples:Xu},"Date Range Picker":{components:[Pi],examples:Qu},"Date Time Range Picker":{components:[Bi],examples:nm},Datetime:{components:[Ai],examples:rm},"Time Input":{components:[pl],examples:df},"Description Lists":{description:()=>s.createElement("p",null,"Description Lists display a series of terms with accompanying descriptions such as a glossary of terms."),components:[ha,Sa,ga],examples:dm},Dropdown:{components:[er,Fi],examples:pm},Fieldset:{components:[Vi],examples:um},"Filter Panel":{components:[al,ol,il,ll],examples:of},Form:{components:[ps],examples:qu},Incrementor:{components:[$i],examples:mm},Label:{description:()=>s.createElement("p",null,"Labels provide a description for the value to be entered or selected in an accompanying input field."),components:[Ki],examples:fm},"List Action Bar":{description:()=>s.createElement("p",null,"The List Action Bar contains the action buttons relevant to selected items from a Table List, Row List, or Card List. The List Action Bar is only visible when one or more list items have been selected and appears anchored to the bottom of the page above all other content."),components:[Hi],examples:Rm},"Micro Block":{components:[Wi],examples:Om},Modals:{description:()=>s.createElement("p",null,"Modals are overlays on a page that focus a user\u2019s attention on an important message or a simple action. Examples of a Modal include confirming the deletion of a record, or making a single selection."),components:[Gi,va],examples:Pm},"Multi Select":{description:()=>s.createElement("p",null,"Multi-Selects consist of a Label and a dropdown menu from which a user selects one or more values from a list of pre-defined options."),components:[Ui],examples:Bm},"Multi Value Text Input":{description:()=>s.createElement("p",null,"To be determined."),components:[dl],examples:cf},Pagination:{description:()=>s.createElement("p",null,"The Pagination component allows users to navigate lists of records and control the number of records displayed on each page. The records can span across multiple pages, or within sections of a page."),components:[ji,ya],examples:Am},"Radio Buttons":{description:"Radio Buttons allow a user to make single selection from a list of predefined options.",components:[zi],examples:Fm},Select:{description:"Selects consist off a Label and a dropdown menu from which a user selects a value from a list of pre-defined options.",components:[jn],examples:em},"Side Navigation":{description:"Side Navigations are used to provide quick access to a series of related pages or content. It can be used to navigate between different page views, or as an anchor-style menu to scroll to specific content on the same page.",components:[$m],examples:Km},"Split Button":{components:[qi],examples:Hm},"Summary List Row":{components:[Ji,Zi,ns],examples:Wm},Tables:{description:({NavigateTo:e})=>s.createElement(s.Fragment,null,s.createElement("div",{className:"sps-body-14"},"Tables (along with ",s.createElement(e,{to:"content-rows"},"Content Rows")," and"," ",s.createElement(e,{to:"content-tiles"},"Content Tiles"),") are one of three options for displaying a list of records on a page."),s.createElement("br",null),s.createElement("div",{className:"sps-body-14"},"Tables are the ideal solution for displaying tabular data, especially when the listed records contain a considerable amount of data points. While tables are primarily used to display an extensive list of records, often in a paginated format, they can also be used to display smaller sets of tabular data in any context.")),components:[tr,In,pe,kn,nt,je],examples:_m},"Task Queue":{components:[Xi],examples:Gm},"Text Inputs":{description:()=>s.createElement("p",null,"Text Inputs consist of a Label and a field in which a user enters a short value."),components:[Ea],examples:Ym},"Text Areas":{description:()=>s.createElement("p",null,"Text Areas consist of a Label and a field in which a user enters a long value."),components:[Qi],examples:Um},Toggle:{description:()=>s.createElement("p",null,"Toggles allow a user to immediately turn a setting on or off."),components:[el],examples:zm},Tooltips:{components:[Ot,tl],examples:qm},Wizard:{components:[rl,sl],examples:Xm},Workflow:{components:[wa,Ca,Da,Na],examples:af},"Slide In Panel":{description:"",components:[Yi],examples:Lm}};function pf(e,t,n){let[r,a]=U.useState(e||t),o=U.useRef(e!==void 0),l=e!==void 0;U.useEffect(()=>{let f=o.current;f!==l&&console.warn(`WARN: A component changed from ${f?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}.`),o.current=l},[l]);let c=l?e:r,p=U.useCallback((f,...m)=>{let u=(h,...g)=>{n&&(Object.is(c,h)||n(h,...g)),l||(c=h)};typeof f=="function"?(console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"),a((g,...v)=>{let C=f(l?c:g,...v);return u(C,...m),l?g:C})):(l||a(f),u(f,...m))},[l,c,n]);return[c,p]}const Js={prefix:String(Math.round(Math.random()*1e10)),current:0},uf=X.default.createContext(Js),cx=X.default.createContext(!1);let dx=Boolean(typeof window<"u"&&window.document&&window.document.createElement),yo=new WeakMap;function px(e=!1){let t=U.useContext(uf),n=U.useRef(null);if(n.current===null&&!e){var r,a;let o=(a=X.default.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||a===void 0||(r=a.ReactCurrentOwner)===null||r===void 0?void 0:r.current;if(o){let l=yo.get(o);l==null?yo.set(o,{id:t.current,state:o.memoizedState}):o.memoizedState!==l.state&&(t.current=l.id,yo.delete(o))}n.current=++t.current}return n.current}function ux(e){let t=U.useContext(uf);t===Js&&!dx&&console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");let n=px(!!e),r=t===Js&&process.env.NODE_ENV==="test"?"react-aria":`react-aria${t.prefix}`;return e||`${r}-${n}`}function mx(e){let t=X.default.useId(),[n]=U.useState(mf()),r=n||process.env.NODE_ENV==="test"?"react-aria":`react-aria${Js.prefix}`;return e||`${r}-${t}`}const fx=typeof X.default.useId=="function"?mx:ux;function hx(){return!1}function Sx(){return!0}function gx(e){return()=>{}}function mf(){return typeof X.default.useSyncExternalStore=="function"?X.default.useSyncExternalStore(gx,hx,Sx):U.useContext(cx)}function ff(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(n=ff(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function bx(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=ff(e))&&(r&&(r+=" "),r+=t);return r}const us=typeof document<"u"?X.default.useLayoutEffect:()=>{};function ur(e){const t=U.useRef(null);return us(()=>{t.current=e},[e]),U.useCallback((...n)=>{const r=t.current;return r==null?void 0:r(...n)},[])}let vx=Boolean(typeof window<"u"&&window.document&&window.document.createElement),Zs=new Map;function hf(e){let[t,n]=U.useState(e),r=U.useRef(null),a=fx(t),o=U.useCallback(l=>{r.current=l},[]);return vx&&Zs.set(a,o),us(()=>{let l=a;return()=>{Zs.delete(l)}},[a]),U.useEffect(()=>{let l=r.current;l&&(r.current=null,n(l))}),a}function yx(e,t){if(e===t)return e;let n=Zs.get(e);if(n)return n(t),t;let r=Zs.get(t);return r?(r(e),e):t}function Sf(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}const Et=e=>{var t;return(t=e==null?void 0:e.ownerDocument)!==null&&t!==void 0?t:document},zn=e=>e&&"window"in e&&e.window===e?e:Et(e).defaultView||window;function Mn(...e){let t={...e[0]};for(let n=1;n<e.length;n++){let r=e[n];for(let a in r){let o=t[a],l=r[a];typeof o=="function"&&typeof l=="function"&&a[0]==="o"&&a[1]==="n"&&a.charCodeAt(2)>=65&&a.charCodeAt(2)<=90?t[a]=Sf(o,l):(a==="className"||a==="UNSAFE_className")&&typeof o=="string"&&typeof l=="string"?t[a]=bx(o,l):a==="id"&&o&&l?t.id=yx(o,l):t[a]=l!==void 0?l:o}}return t}const Tx=new Set(["id"]),Ex=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),wx=new Set(["href","target","rel","download","ping","referrerPolicy"]),Cx=/^(data-.*)$/;function Dx(e,t={}){let{labelable:n,isLink:r,propNames:a}=t,o={};for(const l in e)Object.prototype.hasOwnProperty.call(e,l)&&(Tx.has(l)||n&&Ex.has(l)||r&&wx.has(l)||(a==null?void 0:a.has(l))||Cx.test(l))&&(o[l]=e[l]);return o}function pn(e){if(Nx())e.focus({preventScroll:!0});else{let t=xx(e);e.focus(),kx(t)}}let Ls=null;function Nx(){if(Ls==null){Ls=!1;try{document.createElement("div").focus({get preventScroll(){return Ls=!0,!0}})}catch{}}return Ls}function xx(e){let t=e.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function kx(e){for(let{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}function xa(e){var t;return typeof window>"u"||window.navigator==null?!1:((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.brands.some(n=>e.test(n.brand)))||e.test(window.navigator.userAgent)}function ul(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function qn(){return ul(/^Mac/i)}function Ix(){return ul(/^iPhone/i)}function gf(){return ul(/^iPad/i)||qn()&&navigator.maxTouchPoints>1}function ml(){return Ix()||gf()}function Mx(){return qn()||ml()}function _x(){return xa(/AppleWebKit/i)&&!Rx()}function Rx(){return xa(/Chrome/i)}function bf(){return xa(/Android/i)}function Ox(){return xa(/Firefox/i)}const Lx=U.createContext({isNative:!0,open:Bx});function vf(){return U.useContext(Lx)}function Jn(e,t,n=!0){var r,a;let{metaKey:o,ctrlKey:l,altKey:c,shiftKey:p}=t;Ox()&&((a=window.event)===null||a===void 0||(r=a.type)===null||r===void 0?void 0:r.startsWith("key"))&&e.target==="_blank"&&(qn()?o=!0:l=!0);let f=_x()&&qn()&&!gf()?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:o,ctrlKey:l,altKey:c,shiftKey:p}):new MouseEvent("click",{metaKey:o,ctrlKey:l,altKey:c,shiftKey:p,bubbles:!0,cancelable:!0});Jn.isOpening=n,pn(e),e.dispatchEvent(f),Jn.isOpening=!1}Jn.isOpening=!1;function Px(e,t){if(e instanceof HTMLAnchorElement)t(e);else if(e.hasAttribute("data-href")){let n=document.createElement("a");n.href=e.getAttribute("data-href"),e.hasAttribute("data-target")&&(n.target=e.getAttribute("data-target")),e.hasAttribute("data-rel")&&(n.rel=e.getAttribute("data-rel")),e.hasAttribute("data-download")&&(n.download=e.getAttribute("data-download")),e.hasAttribute("data-ping")&&(n.ping=e.getAttribute("data-ping")),e.hasAttribute("data-referrer-policy")&&(n.referrerPolicy=e.getAttribute("data-referrer-policy")),e.appendChild(n),t(n),e.removeChild(n)}}function Bx(e,t){Px(e,n=>Jn(n,t))}let mr=new Map,$o=new Set;function Fd(){if(typeof window>"u")return;function e(r){return"propertyName"in r}let t=r=>{if(!e(r)||!r.target)return;let a=mr.get(r.target);a||(a=new Set,mr.set(r.target,a),r.target.addEventListener("transitioncancel",n,{once:!0})),a.add(r.propertyName)},n=r=>{if(!e(r)||!r.target)return;let a=mr.get(r.target);if(!!a&&(a.delete(r.propertyName),a.size===0&&(r.target.removeEventListener("transitioncancel",n),mr.delete(r.target)),mr.size===0)){for(let o of $o)o();$o.clear()}};document.body.addEventListener("transitionrun",t),document.body.addEventListener("transitionend",n)}typeof document<"u"&&(document.readyState!=="loading"?Fd():document.addEventListener("DOMContentLoaded",Fd));function yf(e){requestAnimationFrame(()=>{mr.size===0?e():$o.add(e)})}function Tf(){let e=U.useRef(new Map),t=U.useCallback((a,o,l,c)=>{let p=c!=null&&c.once?(...f)=>{e.current.delete(l),l(...f)}:l;e.current.set(l,{type:o,eventTarget:a,fn:p,options:c}),a.addEventListener(o,l,c)},[]),n=U.useCallback((a,o,l,c)=>{var p;let f=((p=e.current.get(l))===null||p===void 0?void 0:p.fn)||l;a.removeEventListener(o,f,c),e.current.delete(l)},[]),r=U.useCallback(()=>{e.current.forEach((a,o)=>{n(a.eventTarget,a.type,o,a.options)})},[n]);return U.useEffect(()=>r,[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}function Ef(e,t){let{id:n,"aria-label":r,"aria-labelledby":a}=e;return n=hf(n),a&&r?a=[...new Set([n,...a.trim().split(/\s+/)])].join(" "):a&&(a=a.trim().split(/\s+/).join(" ")),!r&&!a&&t&&(r=t),{id:n,"aria-label":r,"aria-labelledby":a}}function Ax(e,t){us(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}function Vd(e,t){let n=e;for($d(n,t)&&(n=n.parentElement);n&&!$d(n,t);)n=n.parentElement;return n||document.scrollingElement||document.documentElement}function $d(e,t){let n=window.getComputedStyle(e),r=/(auto|scroll)/.test(n.overflow+n.overflowX+n.overflowY);return r&&t&&(r=e.scrollHeight!==e.clientHeight||e.scrollWidth!==e.clientWidth),r}let Fx=0;const To=new Map;function Vx(e){let[t,n]=U.useState();return us(()=>{if(!e)return;let r=To.get(e);if(r)n(r.element.id);else{let a=`react-aria-description-${Fx++}`;n(a);let o=document.createElement("div");o.id=a,o.style.display="none",o.textContent=e,document.body.appendChild(o),r={refCount:0,element:o},To.set(e,r)}return r.refCount++,()=>{r&&--r.refCount===0&&(r.element.remove(),To.delete(e))}},[e]),{"aria-describedby":e?t:void 0}}function $x(e,t,n,r){let a=ur(n),o=n==null;U.useEffect(()=>{if(o||!e.current)return;let l=e.current;return l.addEventListener(t,a,r),()=>{l.removeEventListener(t,a,r)}},[e,t,r,o,a])}function wf(e,t){let n=Kd(e,t,"left"),r=Kd(e,t,"top"),a=t.offsetWidth,o=t.offsetHeight,l=e.scrollLeft,c=e.scrollTop,{borderTopWidth:p,borderLeftWidth:f}=getComputedStyle(e),m=e.scrollLeft+parseInt(f,10),u=e.scrollTop+parseInt(p,10),h=m+e.clientWidth,g=u+e.clientHeight;n<=l?l=n-parseInt(f,10):n+a>h&&(l+=n+a-h),r<=u?c=r-parseInt(p,10):r+o>g&&(c+=r+o-g),e.scrollLeft=l,e.scrollTop=c}function Kd(e,t,n){const r=n==="left"?"offsetLeft":"offsetTop";let a=0;for(;t.offsetParent&&(a+=t[r],t.offsetParent!==e);){if(t.offsetParent.contains(e)){a-=e[r];break}t=t.offsetParent}return a}function Hd(e,t){if(document.contains(e)){let l=document.scrollingElement||document.documentElement;if(window.getComputedStyle(l).overflow==="hidden"){let p=Vd(e);for(;e&&p&&e!==l&&p!==l;)wf(p,e),e=p,p=Vd(e)}else{var n;let{left:p,top:f}=e.getBoundingClientRect();e==null||(n=e.scrollIntoView)===null||n===void 0||n.call(e,{block:"nearest"});let{left:m,top:u}=e.getBoundingClientRect();if(Math.abs(p-m)>1||Math.abs(f-u)>1){var r,a,o;t==null||(a=t.containingElement)===null||a===void 0||(r=a.scrollIntoView)===null||r===void 0||r.call(a,{block:"center",inline:"center"}),(o=e.scrollIntoView)===null||o===void 0||o.call(e,{block:"nearest"})}}}}function Ko(e){return e.mozInputSource===0&&e.isTrusted?!0:bf()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Kx(e){return!bf()&&e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"}function Hx(e,t){return t.get?t.get.call(e):t.value}function Cf(e,t,n){if(!t.has(e))throw new TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function Wx(e,t){var n=Cf(e,t,"get");return Hx(e,n)}function Gx(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Yx(e,t,n){Gx(e,t),t.set(e,n)}function Ux(e,t,n){if(t.set)t.set.call(e,n);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=n}}function Wd(e,t,n){var r=Cf(e,t,"set");return Ux(e,r,n),n}let hr="default",Ho="",Ks=new WeakMap;function Gd(e){if(ml()){if(hr==="default"){const t=Et(e);Ho=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none"}hr="disabled"}else(e instanceof HTMLElement||e instanceof SVGElement)&&(Ks.set(e,e.style.userSelect),e.style.userSelect="none")}function Ps(e){if(ml()){if(hr!=="disabled")return;hr="restoring",setTimeout(()=>{yf(()=>{if(hr==="restoring"){const t=Et(e);t.documentElement.style.webkitUserSelect==="none"&&(t.documentElement.style.webkitUserSelect=Ho||""),Ho="",hr="default"}})},300)}else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&Ks.has(e)){let t=Ks.get(e);e.style.userSelect==="none"&&(e.style.userSelect=t),e.getAttribute("style")===""&&e.removeAttribute("style"),Ks.delete(e)}}const Df=X.default.createContext({register:()=>{}});Df.displayName="PressResponderContext";function jx(e){let t=U.useContext(Df);if(t){let{register:n,...r}=t;e=Mn(r,e),n()}return Ax(t,e.ref),e}var Bs=new WeakMap;class As{continuePropagation(){Wd(this,Bs,!1)}get shouldStopPropagation(){return Wx(this,Bs)}constructor(t,n,r){Yx(this,Bs,{writable:!0,value:void 0}),Wd(this,Bs,!0),this.type=t,this.pointerType=n,this.target=r.currentTarget,this.shiftKey=r.shiftKey,this.metaKey=r.metaKey,this.ctrlKey=r.ctrlKey,this.altKey=r.altKey}}const Yd=Symbol("linkClicked");function Nf(e){let{onPress:t,onPressChange:n,onPressStart:r,onPressEnd:a,onPressUp:o,isDisabled:l,isPressed:c,preventFocusOnPress:p,shouldCancelOnPointerExit:f,allowTextSelectionOnPress:m,ref:u,...h}=jx(e),[g,v]=U.useState(!1),C=U.useRef({isPressed:!1,ignoreEmulatedMouseEvents:!1,ignoreClickAfterPress:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null}),{addGlobalListener:T,removeAllGlobalListeners:E}=Tf(),N=ur((w,_)=>{let O=C.current;if(l||O.didFirePressStart)return!1;let K=!0;if(O.isTriggeringEvent=!0,r){let z=new As("pressstart",_,w);r(z),K=z.shouldStopPropagation}return n&&n(!0),O.isTriggeringEvent=!1,O.didFirePressStart=!0,v(!0),K}),x=ur((w,_,O=!0)=>{let K=C.current;if(!K.didFirePressStart)return!1;K.ignoreClickAfterPress=!0,K.didFirePressStart=!1,K.isTriggeringEvent=!0;let z=!0;if(a){let M=new As("pressend",_,w);a(M),z=M.shouldStopPropagation}if(n&&n(!1),v(!1),t&&O&&!l){let M=new As("press",_,w);t(M),z&&(z=M.shouldStopPropagation)}return K.isTriggeringEvent=!1,z}),k=ur((w,_)=>{let O=C.current;if(l)return!1;if(o){O.isTriggeringEvent=!0;let K=new As("pressup",_,w);return o(K),O.isTriggeringEvent=!1,K.shouldStopPropagation}return!0}),I=ur(w=>{let _=C.current;_.isPressed&&_.target&&(_.isOverTarget&&_.pointerType!=null&&x(dn(_.target,w),_.pointerType,!1),_.isPressed=!1,_.isOverTarget=!1,_.activePointerId=null,_.pointerType=null,E(),m||Ps(_.target))}),A=ur(w=>{f&&I(w)}),R=U.useMemo(()=>{let w=C.current,_={onKeyDown(K){if(Eo(K.nativeEvent,K.currentTarget)&&K.currentTarget.contains(K.target)){var z;jd(K.target,K.key)&&K.preventDefault();let M=!0;if(!w.isPressed&&!K.repeat){w.target=K.currentTarget,w.isPressed=!0,M=N(K,"keyboard");let Y=K.currentTarget,W=j=>{Eo(j,Y)&&!j.repeat&&Y.contains(j.target)&&w.target&&k(dn(w.target,j),"keyboard")};T(Et(K.currentTarget),"keyup",Sf(W,O),!0)}M&&K.stopPropagation(),K.metaKey&&qn()&&((z=w.metaKeyEvents)===null||z===void 0||z.set(K.key,K.nativeEvent))}else K.key==="Meta"&&(w.metaKeyEvents=new Map)},onClick(K){if(!(K&&!K.currentTarget.contains(K.target))&&K&&K.button===0&&!w.isTriggeringEvent&&!Jn.isOpening){let z=!0;if(l&&K.preventDefault(),!w.ignoreClickAfterPress&&!w.ignoreEmulatedMouseEvents&&!w.isPressed&&(w.pointerType==="virtual"||Ko(K.nativeEvent))){!l&&!p&&pn(K.currentTarget);let M=N(K,"virtual"),Y=k(K,"virtual"),W=x(K,"virtual");z=M&&Y&&W}w.ignoreEmulatedMouseEvents=!1,w.ignoreClickAfterPress=!1,z&&K.stopPropagation()}}},O=K=>{var z;if(w.isPressed&&w.target&&Eo(K,w.target)){var M;jd(K.target,K.key)&&K.preventDefault();let W=K.target;x(dn(w.target,K),"keyboard",w.target.contains(W)),E(),K.key!=="Enter"&&fl(w.target)&&w.target.contains(W)&&!K[Yd]&&(K[Yd]=!0,Jn(w.target,K,!1)),w.isPressed=!1,(M=w.metaKeyEvents)===null||M===void 0||M.delete(K.key)}else if(K.key==="Meta"&&((z=w.metaKeyEvents)===null||z===void 0?void 0:z.size)){var Y;let W=w.metaKeyEvents;w.metaKeyEvents=void 0;for(let j of W.values())(Y=w.target)===null||Y===void 0||Y.dispatchEvent(new KeyboardEvent("keyup",j))}};if(typeof PointerEvent<"u"){_.onPointerDown=Y=>{if(Y.button!==0||!Y.currentTarget.contains(Y.target))return;if(Kx(Y.nativeEvent)){w.pointerType="virtual";return}wo(Y.currentTarget)&&Y.preventDefault(),w.pointerType=Y.pointerType;let W=!0;w.isPressed||(w.isPressed=!0,w.isOverTarget=!0,w.activePointerId=Y.pointerId,w.target=Y.currentTarget,!l&&!p&&pn(Y.currentTarget),m||Gd(w.target),W=N(Y,w.pointerType),T(Et(Y.currentTarget),"pointermove",K,!1),T(Et(Y.currentTarget),"pointerup",z,!1),T(Et(Y.currentTarget),"pointercancel",M,!1)),W&&Y.stopPropagation()},_.onMouseDown=Y=>{!Y.currentTarget.contains(Y.target)||Y.button===0&&(wo(Y.currentTarget)&&Y.preventDefault(),Y.stopPropagation())},_.onPointerUp=Y=>{!Y.currentTarget.contains(Y.target)||w.pointerType==="virtual"||Y.button===0&&dr(Y,Y.currentTarget)&&k(Y,w.pointerType||Y.pointerType)};let K=Y=>{Y.pointerId===w.activePointerId&&(w.target&&dr(Y,w.target)?!w.isOverTarget&&w.pointerType!=null&&(w.isOverTarget=!0,N(dn(w.target,Y),w.pointerType)):w.target&&w.isOverTarget&&w.pointerType!=null&&(w.isOverTarget=!1,x(dn(w.target,Y),w.pointerType,!1),A(Y)))},z=Y=>{Y.pointerId===w.activePointerId&&w.isPressed&&Y.button===0&&w.target&&(dr(Y,w.target)&&w.pointerType!=null?x(dn(w.target,Y),w.pointerType):w.isOverTarget&&w.pointerType!=null&&x(dn(w.target,Y),w.pointerType,!1),w.isPressed=!1,w.isOverTarget=!1,w.activePointerId=null,w.pointerType=null,E(),m||Ps(w.target))},M=Y=>{I(Y)};_.onDragStart=Y=>{!Y.currentTarget.contains(Y.target)||I(Y)}}else{_.onMouseDown=M=>{if(M.button!==0||!M.currentTarget.contains(M.target))return;if(wo(M.currentTarget)&&M.preventDefault(),w.ignoreEmulatedMouseEvents){M.stopPropagation();return}w.isPressed=!0,w.isOverTarget=!0,w.target=M.currentTarget,w.pointerType=Ko(M.nativeEvent)?"virtual":"mouse",!l&&!p&&pn(M.currentTarget),N(M,w.pointerType)&&M.stopPropagation(),T(Et(M.currentTarget),"mouseup",K,!1)},_.onMouseEnter=M=>{if(!M.currentTarget.contains(M.target))return;let Y=!0;w.isPressed&&!w.ignoreEmulatedMouseEvents&&w.pointerType!=null&&(w.isOverTarget=!0,Y=N(M,w.pointerType)),Y&&M.stopPropagation()},_.onMouseLeave=M=>{if(!M.currentTarget.contains(M.target))return;let Y=!0;w.isPressed&&!w.ignoreEmulatedMouseEvents&&w.pointerType!=null&&(w.isOverTarget=!1,Y=x(M,w.pointerType,!1),A(M)),Y&&M.stopPropagation()},_.onMouseUp=M=>{!M.currentTarget.contains(M.target)||!w.ignoreEmulatedMouseEvents&&M.button===0&&k(M,w.pointerType||"mouse")};let K=M=>{if(M.button===0){if(w.isPressed=!1,E(),w.ignoreEmulatedMouseEvents){w.ignoreEmulatedMouseEvents=!1;return}w.target&&dr(M,w.target)&&w.pointerType!=null?x(dn(w.target,M),w.pointerType):w.target&&w.isOverTarget&&w.pointerType!=null&&x(dn(w.target,M),w.pointerType,!1),w.isOverTarget=!1}};_.onTouchStart=M=>{if(!M.currentTarget.contains(M.target))return;let Y=zx(M.nativeEvent);if(!Y)return;w.activePointerId=Y.identifier,w.ignoreEmulatedMouseEvents=!0,w.isOverTarget=!0,w.isPressed=!0,w.target=M.currentTarget,w.pointerType="touch",!l&&!p&&pn(M.currentTarget),m||Gd(w.target),N(M,w.pointerType)&&M.stopPropagation(),T(zn(M.currentTarget),"scroll",z,!0)},_.onTouchMove=M=>{if(!M.currentTarget.contains(M.target))return;if(!w.isPressed){M.stopPropagation();return}let Y=Ud(M.nativeEvent,w.activePointerId),W=!0;Y&&dr(Y,M.currentTarget)?!w.isOverTarget&&w.pointerType!=null&&(w.isOverTarget=!0,W=N(M,w.pointerType)):w.isOverTarget&&w.pointerType!=null&&(w.isOverTarget=!1,W=x(M,w.pointerType,!1),A(M)),W&&M.stopPropagation()},_.onTouchEnd=M=>{if(!M.currentTarget.contains(M.target))return;if(!w.isPressed){M.stopPropagation();return}let Y=Ud(M.nativeEvent,w.activePointerId),W=!0;Y&&dr(Y,M.currentTarget)&&w.pointerType!=null?(k(M,w.pointerType),W=x(M,w.pointerType)):w.isOverTarget&&w.pointerType!=null&&(W=x(M,w.pointerType,!1)),W&&M.stopPropagation(),w.isPressed=!1,w.activePointerId=null,w.isOverTarget=!1,w.ignoreEmulatedMouseEvents=!0,w.target&&!m&&Ps(w.target),E()},_.onTouchCancel=M=>{!M.currentTarget.contains(M.target)||(M.stopPropagation(),w.isPressed&&I(M))};let z=M=>{w.isPressed&&M.target.contains(w.target)&&I({currentTarget:w.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})};_.onDragStart=M=>{!M.currentTarget.contains(M.target)||I(M)}}return _},[T,l,p,E,m,I,A,x,N,k]);return U.useEffect(()=>()=>{var w;m||Ps((w=C.current.target)!==null&&w!==void 0?w:void 0)},[m]),{isPressed:c||g,pressProps:Mn(h,R)}}function fl(e){return e.tagName==="A"&&e.hasAttribute("href")}function Eo(e,t){const{key:n,code:r}=e,a=t,o=a.getAttribute("role");return(n==="Enter"||n===" "||n==="Spacebar"||r==="Space")&&!(a instanceof zn(a).HTMLInputElement&&!xf(a,n)||a instanceof zn(a).HTMLTextAreaElement||a.isContentEditable)&&!((o==="link"||!o&&fl(a))&&n!=="Enter")}function zx(e){const{targetTouches:t}=e;return t.length>0?t[0]:null}function Ud(e,t){const n=e.changedTouches;for(let r=0;r<n.length;r++){const a=n[r];if(a.identifier===t)return a}return null}function dn(e,t){return{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey}}function qx(e){let t=0,n=0;return e.width!==void 0?t=e.width/2:e.radiusX!==void 0&&(t=e.radiusX),e.height!==void 0?n=e.height/2:e.radiusY!==void 0&&(n=e.radiusY),{top:e.clientY-n,right:e.clientX+t,bottom:e.clientY+n,left:e.clientX-t}}function Jx(e,t){return!(e.left>t.right||t.left>e.right||e.top>t.bottom||t.top>e.bottom)}function dr(e,t){let n=t.getBoundingClientRect(),r=qx(e);return Jx(n,r)}function wo(e){return!(e instanceof HTMLElement)||!e.hasAttribute("draggable")}function jd(e,t){return e instanceof HTMLInputElement?!xf(e,t):e instanceof HTMLButtonElement?e.type!=="submit"&&e.type!=="reset":!fl(e)}const Zx=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function xf(e,t){return e.type==="checkbox"||e.type==="radio"?t===" ":Zx.has(e.type)}let ms=null,Xx=new Set,Gr=new Map,Zn=!1,Wo=!1;function hl(e,t){for(let n of Xx)n(e,t)}function Qx(e){return!(e.metaKey||!qn()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function Xs(e){Zn=!0,Qx(e)&&(ms="keyboard",hl("keyboard",e))}function _t(e){ms="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(Zn=!0,hl("pointer",e))}function kf(e){Ko(e)&&(Zn=!0,ms="virtual")}function If(e){e.target===window||e.target===document||(!Zn&&!Wo&&(ms="virtual",hl("virtual",e)),Zn=!1,Wo=!1)}function Mf(){Zn=!1,Wo=!0}function zd(e){if(typeof window>"u"||Gr.get(zn(e)))return;const t=zn(e),n=Et(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){Zn=!0,r.apply(this,arguments)},n.addEventListener("keydown",Xs,!0),n.addEventListener("keyup",Xs,!0),n.addEventListener("click",kf,!0),t.addEventListener("focus",If,!0),t.addEventListener("blur",Mf,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",_t,!0),n.addEventListener("pointermove",_t,!0),n.addEventListener("pointerup",_t,!0)):(n.addEventListener("mousedown",_t,!0),n.addEventListener("mousemove",_t,!0),n.addEventListener("mouseup",_t,!0)),t.addEventListener("beforeunload",()=>{_f(e)},{once:!0}),Gr.set(t,{focus:r})}const _f=(e,t)=>{const n=zn(e),r=Et(e);t&&r.removeEventListener("DOMContentLoaded",t),Gr.has(n)&&(n.HTMLElement.prototype.focus=Gr.get(n).focus,r.removeEventListener("keydown",Xs,!0),r.removeEventListener("keyup",Xs,!0),r.removeEventListener("click",kf,!0),n.removeEventListener("focus",If,!0),n.removeEventListener("blur",Mf,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",_t,!0),r.removeEventListener("pointermove",_t,!0),r.removeEventListener("pointerup",_t,!0)):(r.removeEventListener("mousedown",_t,!0),r.removeEventListener("mousemove",_t,!0),r.removeEventListener("mouseup",_t,!0)),Gr.delete(n))};function ek(e){const t=Et(e);let n;return t.readyState!=="loading"?zd(e):(n=()=>{zd(e)},t.addEventListener("DOMContentLoaded",n)),()=>_f(e,n)}typeof document<"u"&&ek();function Go(){return ms}const tk=500;function nk(e){let{isDisabled:t,onLongPressStart:n,onLongPressEnd:r,onLongPress:a,threshold:o=tk,accessibilityDescription:l}=e;const c=U.useRef();let{addGlobalListener:p,removeGlobalListener:f}=Tf(),{pressProps:m}=Nf({isDisabled:t,onPressStart(h){if(h.continuePropagation(),(h.pointerType==="mouse"||h.pointerType==="touch")&&(n&&n({...h,type:"longpressstart"}),c.current=setTimeout(()=>{h.target.dispatchEvent(new PointerEvent("pointercancel",{bubbles:!0})),a&&a({...h,type:"longpress"}),c.current=void 0},o),h.pointerType==="touch")){let g=v=>{v.preventDefault()};p(h.target,"contextmenu",g,{once:!0}),p(window,"pointerup",()=>{setTimeout(()=>{f(h.target,"contextmenu",g)},30)},{once:!0})}},onPressEnd(h){c.current&&clearTimeout(c.current),r&&(h.pointerType==="mouse"||h.pointerType==="touch")&&r({...h,type:"longpressend"})}}),u=Vx(a&&!t?l:void 0);return{longPressProps:Mn(m,u)}}function Yo(e){const t=Et(e);if(Go()==="virtual"){let n=t.activeElement;yf(()=>{t.activeElement===n&&e.isConnected&&pn(e)})}else pn(e)}function rk(e){const t=zn(e);if(!(e instanceof t.HTMLElement)&&!(e instanceof t.SVGElement))return!1;let{display:n,visibility:r}=e.style,a=n!=="none"&&r!=="hidden"&&r!=="collapse";if(a){const{getComputedStyle:o}=e.ownerDocument.defaultView;let{display:l,visibility:c}=o(e);a=l!=="none"&&c!=="hidden"&&c!=="collapse"}return a}function sk(e,t){return!e.hasAttribute("hidden")&&(e.nodeName==="DETAILS"&&t&&t.nodeName!=="SUMMARY"?e.hasAttribute("open"):!0)}function Rf(e,t){return e.nodeName!=="#comment"&&rk(e)&&sk(e,t)&&(!e.parentElement||Rf(e.parentElement,e))}const Sl=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[contenteditable]"],ak=Sl.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";Sl.push('[tabindex]:not([tabindex="-1"]):not([disabled])');const ok=Sl.join(':not([hidden]):not([tabindex="-1"]),');function Of(e,t){return!e||!t?!1:t.some(n=>n.contains(e))}function Lf(e,t,n){let r=t!=null&&t.tabbable?ok:ak,a=Et(e).createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode(o){var l;return!(t==null||(l=t.from)===null||l===void 0)&&l.contains(o)?NodeFilter.FILTER_REJECT:o.matches(r)&&Rf(o)&&(!n||Of(o,n))&&(!(t!=null&&t.accept)||t.accept(o))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return t!=null&&t.from&&(a.currentNode=t.from),a}class gl{get size(){return this.fastMap.size}getTreeNode(t){return this.fastMap.get(t)}addTreeNode(t,n,r){let a=this.fastMap.get(n!=null?n:null);if(!a)return;let o=new qd({scopeRef:t});a.addChild(o),o.parent=a,this.fastMap.set(t,o),r&&(o.nodeToRestore=r)}addNode(t){this.fastMap.set(t.scopeRef,t)}removeTreeNode(t){if(t===null)return;let n=this.fastMap.get(t);if(!n)return;let r=n.parent;for(let o of this.traverse())o!==n&&n.nodeToRestore&&o.nodeToRestore&&n.scopeRef&&n.scopeRef.current&&Of(o.nodeToRestore,n.scopeRef.current)&&(o.nodeToRestore=n.nodeToRestore);let a=n.children;r&&(r.removeChild(n),a.size>0&&a.forEach(o=>r&&r.addChild(o))),this.fastMap.delete(n.scopeRef)}*traverse(t=this.root){if(t.scopeRef!=null&&(yield t),t.children.size>0)for(let n of t.children)yield*this.traverse(n)}clone(){var t;let n=new gl;var r;for(let a of this.traverse())n.addTreeNode(a.scopeRef,(r=(t=a.parent)===null||t===void 0?void 0:t.scopeRef)!==null&&r!==void 0?r:null,a.nodeToRestore);return n}constructor(){this.fastMap=new Map,this.root=new qd({scopeRef:null}),this.fastMap.set(null,this.root)}}class qd{addChild(t){this.children.add(t),t.parent=this}removeChild(t){this.children.delete(t),t.parent=void 0}constructor(t){this.children=new Set,this.contain=!1,this.scopeRef=t.scopeRef}}new gl;function ik(e,t){let n=t==null?void 0:t.isDisabled,[r,a]=U.useState(!1);return us(()=>{if((e==null?void 0:e.current)&&!n){let o=()=>{if(e.current){let c=Lf(e.current,{tabbable:!0});a(!!c.nextNode())}};o();let l=new MutationObserver(o);return l.observe(e.current,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["tabIndex","disabled"]}),()=>{l.disconnect()}}}),n?!1:r}const lk=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),ck=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function dk(e){if(Intl.Locale){let n=new Intl.Locale(e).maximize(),r=typeof n.getTextInfo=="function"?n.getTextInfo():n.textInfo;if(r)return r.direction==="rtl";if(n.script)return lk.has(n.script)}let t=e.split("-")[0];return ck.has(t)}const pk=Symbol.for("react-aria.i18n.locale");function Pf(){let e=typeof window<"u"&&window[pk]||typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:dk(e)?"rtl":"ltr"}}let Uo=Pf(),Kr=new Set;function Jd(){Uo=Pf();for(let e of Kr)e(Uo)}function uk(){let e=mf(),[t,n]=U.useState(Uo);return U.useEffect(()=>(Kr.size===0&&window.addEventListener("languagechange",Jd),Kr.add(n),()=>{Kr.delete(n),Kr.size===0&&window.removeEventListener("languagechange",Jd)}),[]),e?{locale:"en-US",direction:"ltr"}:t}const mk=X.default.createContext(null);function Bf(){let e=uk();return U.useContext(mk)||e}function jo(e){return Mx()?e.altKey:e.ctrlKey}function fr(e){return qn()?e.metaKey:e.ctrlKey}const fk=1e3;function hk(e){let{keyboardDelegate:t,selectionManager:n,onTypeSelect:r}=e,a=U.useRef({search:"",timeout:null}).current,o=l=>{let c=Sk(l.key);if(!c||l.ctrlKey||l.metaKey||!l.currentTarget.contains(l.target))return;c===" "&&a.search.trim().length>0&&(l.preventDefault(),"continuePropagation"in l||l.stopPropagation()),a.search+=c;let p=t.getKeyForSearch(a.search,n.focusedKey);p==null&&(p=t.getKeyForSearch(a.search)),p!=null&&(n.setFocusedKey(p),r&&r(p)),clearTimeout(a.timeout),a.timeout=setTimeout(()=>{a.search=""},fk)};return{typeSelectProps:{onKeyDownCapture:t.getKeyForSearch?o:null}}}function Sk(e){return e.length===1||!/^[A-Z]/i.test(e)?e:""}function gk(e){let{selectionManager:t,keyboardDelegate:n,ref:r,autoFocus:a=!1,shouldFocusWrap:o=!1,disallowEmptySelection:l=!1,disallowSelectAll:c=!1,selectOnFocus:p=t.selectionBehavior==="replace",disallowTypeAhead:f=!1,shouldUseVirtualFocus:m,allowsTabNavigation:u=!1,isVirtualized:h,scrollRef:g=r,linkBehavior:v="action"}=e,{direction:C}=Bf(),T=vf(),E=O=>{if(O.altKey&&O.key==="Tab"&&O.preventDefault(),!r.current.contains(O.target))return;const K=(L,G)=>{if(L!=null){if(t.isLink(L)&&v==="selection"&&p&&!jo(O)){ea.flushSync(()=>{t.setFocusedKey(L,G)});let se=g.current.querySelector(`[data-key="${CSS.escape(L.toString())}"]`);T.open(se,O);return}if(t.setFocusedKey(L,G),t.isLink(L)&&v==="override")return;O.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(L):p&&!jo(O)&&t.replaceSelection(L)}};switch(O.key){case"ArrowDown":if(n.getKeyBelow){var z,M;O.preventDefault();let L=t.focusedKey!=null?n.getKeyBelow(t.focusedKey):(z=n.getFirstKey)===null||z===void 0?void 0:z.call(n);L==null&&o&&(L=(M=n.getFirstKey)===null||M===void 0?void 0:M.call(n,t.focusedKey)),K(L)}break;case"ArrowUp":if(n.getKeyAbove){var Y,W;O.preventDefault();let L=t.focusedKey!=null?n.getKeyAbove(t.focusedKey):(Y=n.getLastKey)===null||Y===void 0?void 0:Y.call(n);L==null&&o&&(L=(W=n.getLastKey)===null||W===void 0?void 0:W.call(n,t.focusedKey)),K(L)}break;case"ArrowLeft":if(n.getKeyLeftOf){var j,B;O.preventDefault();let L=n.getKeyLeftOf(t.focusedKey);L==null&&o&&(L=C==="rtl"?(j=n.getFirstKey)===null||j===void 0?void 0:j.call(n,t.focusedKey):(B=n.getLastKey)===null||B===void 0?void 0:B.call(n,t.focusedKey)),K(L,C==="rtl"?"first":"last")}break;case"ArrowRight":if(n.getKeyRightOf){var re,de;O.preventDefault();let L=n.getKeyRightOf(t.focusedKey);L==null&&o&&(L=C==="rtl"?(re=n.getLastKey)===null||re===void 0?void 0:re.call(n,t.focusedKey):(de=n.getFirstKey)===null||de===void 0?void 0:de.call(n,t.focusedKey)),K(L,C==="rtl"?"last":"first")}break;case"Home":if(n.getFirstKey){O.preventDefault();let L=n.getFirstKey(t.focusedKey,fr(O));t.setFocusedKey(L),fr(O)&&O.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(L):p&&t.replaceSelection(L)}break;case"End":if(n.getLastKey){O.preventDefault();let L=n.getLastKey(t.focusedKey,fr(O));t.setFocusedKey(L),fr(O)&&O.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(L):p&&t.replaceSelection(L)}break;case"PageDown":if(n.getKeyPageBelow){O.preventDefault();let L=n.getKeyPageBelow(t.focusedKey);K(L)}break;case"PageUp":if(n.getKeyPageAbove){O.preventDefault();let L=n.getKeyPageAbove(t.focusedKey);K(L)}break;case"a":fr(O)&&t.selectionMode==="multiple"&&c!==!0&&(O.preventDefault(),t.selectAll());break;case"Escape":O.preventDefault(),l||t.clearSelection();break;case"Tab":if(!u){if(O.shiftKey)r.current.focus();else{let L=Lf(r.current,{tabbable:!0}),G,se;do se=L.lastChild(),se&&(G=se);while(se);G&&!G.contains(document.activeElement)&&pn(G)}break}}},N=U.useRef({top:0,left:0});$x(g,"scroll",h?null:()=>{N.current={top:g.current.scrollTop,left:g.current.scrollLeft}});let x=O=>{if(t.isFocused){O.currentTarget.contains(O.target)||t.setFocused(!1);return}if(!!O.currentTarget.contains(O.target)){if(t.setFocused(!0),t.focusedKey==null){let M=W=>{W!=null&&(t.setFocusedKey(W),p&&t.replaceSelection(W))},Y=O.relatedTarget;var K,z;Y&&O.currentTarget.compareDocumentPosition(Y)&Node.DOCUMENT_POSITION_FOLLOWING?M((K=t.lastSelectedKey)!==null&&K!==void 0?K:n.getLastKey()):M((z=t.firstSelectedKey)!==null&&z!==void 0?z:n.getFirstKey())}else h||(g.current.scrollTop=N.current.top,g.current.scrollLeft=N.current.left);if(!h&&t.focusedKey!=null){let M=g.current.querySelector(`[data-key="${CSS.escape(t.focusedKey.toString())}"]`);M&&(M.contains(document.activeElement)||pn(M),Go()==="keyboard"&&Hd(M,{containingElement:r.current}))}}},k=O=>{O.currentTarget.contains(O.relatedTarget)||t.setFocused(!1)};const I=U.useRef(a);U.useEffect(()=>{if(I.current){let O=null;a==="first"&&(O=n.getFirstKey()),a==="last"&&(O=n.getLastKey());let K=t.selectedKeys;if(K.size){for(let z of K)if(t.canSelectItem(z)){O=z;break}}t.setFocused(!0),t.setFocusedKey(O),O==null&&!m&&Yo(r.current)}},[]);let A=U.useRef(t.focusedKey);U.useEffect(()=>{let O=Go();if(t.isFocused&&t.focusedKey!=null&&(g==null?void 0:g.current)){let K=g.current.querySelector(`[data-key="${CSS.escape(t.focusedKey.toString())}"]`);K&&(O==="keyboard"||I.current)&&(h||wf(g.current,K),O!=="virtual"&&Hd(K,{containingElement:r.current}))}t.isFocused&&t.focusedKey==null&&A.current!=null&&Yo(r.current),A.current=t.focusedKey,I.current=!1},[h,g,t.focusedKey,t.isFocused,r]);let R={onKeyDown:E,onFocus:x,onBlur:k,onMouseDown(O){g.current===O.target&&O.preventDefault()}},{typeSelectProps:w}=hk({keyboardDelegate:n,selectionManager:t});f||(R=Mn(w,R));let _;return m||(_=t.focusedKey==null?0:-1),{collectionProps:{...R,tabIndex:_}}}function bk(e){let{selectionManager:t,key:n,ref:r,shouldSelectOnPressUp:a,shouldUseVirtualFocus:o,focus:l,isDisabled:c,onAction:p,allowsDifferentPressOrigin:f,linkBehavior:m="action"}=e,u=vf(),h=B=>{if(B.pointerType==="keyboard"&&jo(B))t.toggleSelection(n);else{if(t.selectionMode==="none")return;if(t.isLink(n)){if(m==="selection"){u.open(r.current,B),t.setSelectedKeys(t.selectedKeys);return}else if(m==="override"||m==="none")return}t.selectionMode==="single"?t.isSelected(n)&&!t.disallowEmptySelection?t.toggleSelection(n):t.replaceSelection(n):B&&B.shiftKey?t.extendSelection(n):t.selectionBehavior==="toggle"||B&&(fr(B)||B.pointerType==="touch"||B.pointerType==="virtual")?t.toggleSelection(n):t.replaceSelection(n)}};U.useEffect(()=>{n===t.focusedKey&&t.isFocused&&!o&&(l?l():document.activeElement!==r.current&&Yo(r.current))},[r,n,t.focusedKey,t.childFocusStrategy,t.isFocused,o]),c=c||t.isDisabled(n);let g={};!o&&!c?g={tabIndex:n===t.focusedKey?0:-1,onFocus(B){B.target===r.current&&t.setFocusedKey(n)}}:c&&(g.onMouseDown=B=>{B.preventDefault()});let v=t.isLink(n)&&m==="override",C=t.isLink(n)&&m!=="selection"&&m!=="none",T=!c&&t.canSelectItem(n)&&!v,E=(p||C)&&!c,N=E&&(t.selectionBehavior==="replace"?!T:!T||t.isEmpty),x=E&&T&&t.selectionBehavior==="replace",k=N||x,I=U.useRef(null),A=k&&T,R=U.useRef(!1),w=U.useRef(!1),_=B=>{p&&p(),C&&u.open(r.current,B)},O={};a?(O.onPressStart=B=>{I.current=B.pointerType,R.current=A,B.pointerType==="keyboard"&&(!k||Xd())&&h(B)},f?(O.onPressUp=N?null:B=>{B.pointerType!=="keyboard"&&T&&h(B)},O.onPress=N?_:null):O.onPress=B=>{if(N||x&&B.pointerType!=="mouse"){if(B.pointerType==="keyboard"&&!Zd())return;_(B)}else B.pointerType!=="keyboard"&&T&&h(B)}):(O.onPressStart=B=>{I.current=B.pointerType,R.current=A,w.current=N,T&&(B.pointerType==="mouse"&&!N||B.pointerType==="keyboard"&&(!E||Xd()))&&h(B)},O.onPress=B=>{(B.pointerType==="touch"||B.pointerType==="pen"||B.pointerType==="virtual"||B.pointerType==="keyboard"&&k&&Zd()||B.pointerType==="mouse"&&w.current)&&(k?_(B):T&&h(B))}),g["data-key"]=n,O.preventFocusOnPress=o;let{pressProps:K,isPressed:z}=Nf(O),M=x?B=>{I.current==="mouse"&&(B.stopPropagation(),B.preventDefault(),_(B))}:void 0,{longPressProps:Y}=nk({isDisabled:!A,onLongPress(B){B.pointerType==="touch"&&(h(B),t.setSelectionBehavior("toggle"))}}),W=B=>{I.current==="touch"&&R.current&&B.preventDefault()},j=t.isLink(n)?B=>{Jn.isOpening||B.preventDefault()}:void 0;return{itemProps:Mn(g,T||N?K:{},A?Y:{},{onDoubleClick:M,onDragStartCapture:W,onClick:j}),isPressed:z,isSelected:t.isSelected(n),isFocused:t.isFocused&&t.focusedKey===n,isDisabled:c,allowsSelection:T,hasAction:k}}function Zd(){let e=window.event;return(e==null?void 0:e.key)==="Enter"}function Xd(){let e=window.event;return(e==null?void 0:e.key)===" "||(e==null?void 0:e.code)==="Space"}const Af=new WeakMap;function Qs(e,t,n){return typeof t=="string"&&(t=t.replace(/\s+/g,"")),`${Af.get(e)}-${n}-${t}`}function vk(e,t,n){var r;let{key:a,isDisabled:o,shouldSelectOnPressUp:l}=e,{selectionManager:c,selectedKey:p}=t,f=a===p,m=o||t.isDisabled||t.disabledKeys.has(a),{itemProps:u,isPressed:h}=bk({selectionManager:c,key:a,ref:n,isDisabled:m,shouldSelectOnPressUp:l,linkBehavior:"selection"}),g=Qs(t,a,"tab"),v=Qs(t,a,"tabpanel"),{tabIndex:C}=u,T=t.collection.getItem(a),E=Dx(T==null?void 0:T.props,{isLink:!!(!(T==null||(r=T.props)===null||r===void 0)&&r.href),labelable:!0});return delete E.id,{tabProps:Mn(E,u,{id:g,"aria-selected":f,"aria-disabled":m||void 0,"aria-controls":f?v:void 0,tabIndex:m?void 0:C,role:"tab"}),isSelected:f,isDisabled:m,isPressed:h}}function yk(e,t,n){let r=ik(n)?void 0:0;var a;const o=Qs(t,(a=e.id)!==null&&a!==void 0?a:t==null?void 0:t.selectedKey,"tabpanel"),l=Ef({...e,id:o,"aria-labelledby":Qs(t,t==null?void 0:t.selectedKey,"tab")});return{tabPanelProps:Mn(l,{tabIndex:r,role:"tabpanel","aria-describedby":e["aria-describedby"],"aria-details":e["aria-details"]})}}class Tk{getKeyLeftOf(t){return this.flipDirection?this.getNextKey(t):this.getPreviousKey(t)}getKeyRightOf(t){return this.flipDirection?this.getPreviousKey(t):this.getNextKey(t)}getKeyAbove(t){return this.getPreviousKey(t)}getKeyBelow(t){return this.getNextKey(t)}getFirstKey(){let t=this.collection.getFirstKey();return t!=null&&this.disabledKeys.has(t)&&(t=this.getNextKey(t)),t}getLastKey(){let t=this.collection.getLastKey();return t!=null&&this.disabledKeys.has(t)&&(t=this.getPreviousKey(t)),t}getNextKey(t){do t=this.collection.getKeyAfter(t),t==null&&(t=this.collection.getFirstKey());while(this.disabledKeys.has(t));return t}getPreviousKey(t){do t=this.collection.getKeyBefore(t),t==null&&(t=this.collection.getLastKey());while(this.disabledKeys.has(t));return t}constructor(t,n,r,a=new Set){this.collection=t,this.flipDirection=n==="rtl"&&r==="horizontal",this.disabledKeys=a}}function Ek(e,t,n){let{orientation:r="horizontal",keyboardActivation:a="automatic"}=e,{collection:o,selectionManager:l,disabledKeys:c}=t,{direction:p}=Bf(),f=U.useMemo(()=>new Tk(o,p,r,c),[o,c,r,p]),{collectionProps:m}=gk({ref:n,selectionManager:l,keyboardDelegate:f,selectOnFocus:a==="automatic",disallowEmptySelection:!0,scrollRef:n,linkBehavior:"selection"}),u=hf();Af.set(t,u);let h=Ef({...e,id:u});return{tabListProps:{...Mn(m,h),role:"tablist","aria-orientation":r,tabIndex:void 0}}}function Ff({item:e,state:t}){const{key:n}=e,r=s.useRef(null),{tabProps:a}=vk({key:n},t,r),o=t.selectedKey===n,l=t.disabledKeys.has(n);return s.createElement("div",{...a,ref:r,className:H("sps-nav__item","sps-nav__link",o&&"active",l&&"sps-nav__item--disabled")},e.rendered)}function Vf({state:e,...t}){const n=s.useRef(null),{tabPanelProps:r}=yk(t,e,n);return s.createElement("div",{...r,ref:n,className:"sps-card__body"},e.selectedItem?e.selectedItem.props.children:null)}class Wt extends Set{constructor(t,n,r){super(t),t instanceof Wt?(this.anchorKey=n||t.anchorKey,this.currentKey=r||t.currentKey):(this.anchorKey=n,this.currentKey=r)}}function wk(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function Ck(e){let{selectionMode:t="none",disallowEmptySelection:n,allowDuplicateSelectionEvents:r,selectionBehavior:a="toggle",disabledBehavior:o="all"}=e,l=U.useRef(!1),[,c]=U.useState(!1),p=U.useRef(null),f=U.useRef(null),[,m]=U.useState(null),u=U.useMemo(()=>Qd(e.selectedKeys),[e.selectedKeys]),h=U.useMemo(()=>Qd(e.defaultSelectedKeys,new Wt),[e.defaultSelectedKeys]),[g,v]=pf(u,h,e.onSelectionChange),C=U.useMemo(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),[T,E]=U.useState(a);a==="replace"&&T==="toggle"&&typeof g=="object"&&g.size===0&&E("replace");let N=U.useRef(a);return U.useEffect(()=>{a!==N.current&&(E(a),N.current=a)},[a]),{selectionMode:t,disallowEmptySelection:n,selectionBehavior:T,setSelectionBehavior:E,get isFocused(){return l.current},setFocused(x){l.current=x,c(x)},get focusedKey(){return p.current},get childFocusStrategy(){return f.current},setFocusedKey(x,k="first"){p.current=x,f.current=k,m(x)},selectedKeys:g,setSelectedKeys(x){(r||!wk(x,g))&&v(x)},disabledKeys:C,disabledBehavior:o}}function Qd(e,t){return e?e==="all"?"all":new Wt(e):t}class Dk{get selectionMode(){return this.state.selectionMode}get disallowEmptySelection(){return this.state.disallowEmptySelection}get selectionBehavior(){return this.state.selectionBehavior}setSelectionBehavior(t){this.state.setSelectionBehavior(t)}get isFocused(){return this.state.isFocused}setFocused(t){this.state.setFocused(t)}get focusedKey(){return this.state.focusedKey}get childFocusStrategy(){return this.state.childFocusStrategy}setFocusedKey(t,n){(t==null||this.collection.getItem(t))&&this.state.setFocusedKey(t,n)}get selectedKeys(){return this.state.selectedKeys==="all"?new Set(this.getSelectAllKeys()):this.state.selectedKeys}get rawSelection(){return this.state.selectedKeys}isSelected(t){return this.state.selectionMode==="none"?!1:(t=this.getKey(t),this.state.selectedKeys==="all"?this.canSelectItem(t):this.state.selectedKeys.has(t))}get isEmpty(){return this.state.selectedKeys!=="all"&&this.state.selectedKeys.size===0}get isSelectAll(){if(this.isEmpty)return!1;if(this.state.selectedKeys==="all")return!0;if(this._isSelectAll!=null)return this._isSelectAll;let t=this.getSelectAllKeys(),n=this.state.selectedKeys;return this._isSelectAll=t.every(r=>n.has(r)),this._isSelectAll}get firstSelectedKey(){let t=null;for(let n of this.state.selectedKeys){let r=this.collection.getItem(n);(!t||r&&pr.compareNodeOrder(this.collection,r,t)<0)&&(t=r)}return t==null?void 0:t.key}get lastSelectedKey(){let t=null;for(let n of this.state.selectedKeys){let r=this.collection.getItem(n);(!t||r&&pr.compareNodeOrder(this.collection,r,t)>0)&&(t=r)}return t==null?void 0:t.key}get disabledKeys(){return this.state.disabledKeys}get disabledBehavior(){return this.state.disabledBehavior}extendSelection(t){if(this.selectionMode==="none")return;if(this.selectionMode==="single"){this.replaceSelection(t);return}t=this.getKey(t);let n;if(this.state.selectedKeys==="all")n=new Wt([t],t,t);else{let r=this.state.selectedKeys,a=r.anchorKey||t;n=new Wt(r,a,t);for(let o of this.getKeyRange(a,r.currentKey||t))n.delete(o);for(let o of this.getKeyRange(t,a))this.canSelectItem(o)&&n.add(o)}this.state.setSelectedKeys(n)}getKeyRange(t,n){let r=this.collection.getItem(t),a=this.collection.getItem(n);return r&&a?pr.compareNodeOrder(this.collection,r,a)<=0?this.getKeyRangeInternal(t,n):this.getKeyRangeInternal(n,t):[]}getKeyRangeInternal(t,n){let r=[],a=t;for(;a;){let o=this.collection.getItem(a);if((o&&o.type==="item"||o.type==="cell"&&this.allowsCellSelection)&&r.push(a),a===n)return r;a=this.collection.getKeyAfter(a)}return[]}getKey(t){let n=this.collection.getItem(t);if(!n||n.type==="cell"&&this.allowsCellSelection)return t;for(;n.type!=="item"&&n.parentKey!=null;)n=this.collection.getItem(n.parentKey);return!n||n.type!=="item"?null:n.key}toggleSelection(t){if(this.selectionMode==="none")return;if(this.selectionMode==="single"&&!this.isSelected(t)){this.replaceSelection(t);return}if(t=this.getKey(t),t==null)return;let n=new Wt(this.state.selectedKeys==="all"?this.getSelectAllKeys():this.state.selectedKeys);n.has(t)?n.delete(t):this.canSelectItem(t)&&(n.add(t),n.anchorKey=t,n.currentKey=t),!(this.disallowEmptySelection&&n.size===0)&&this.state.setSelectedKeys(n)}replaceSelection(t){if(this.selectionMode==="none"||(t=this.getKey(t),t==null))return;let n=this.canSelectItem(t)?new Wt([t],t,t):new Wt;this.state.setSelectedKeys(n)}setSelectedKeys(t){if(this.selectionMode==="none")return;let n=new Wt;for(let r of t)if(r=this.getKey(r),r!=null&&(n.add(r),this.selectionMode==="single"))break;this.state.setSelectedKeys(n)}getSelectAllKeys(){let t=[],n=r=>{for(;r;){if(this.canSelectItem(r)){let a=this.collection.getItem(r);a.type==="item"&&t.push(r),a.hasChildNodes&&(this.allowsCellSelection||a.type!=="item")&&n(pr.getFirstItem(pr.getChildNodes(a,this.collection)).key)}r=this.collection.getKeyAfter(r)}};return n(this.collection.getFirstKey()),t}selectAll(){!this.isSelectAll&&this.selectionMode==="multiple"&&this.state.setSelectedKeys("all")}clearSelection(){!this.disallowEmptySelection&&(this.state.selectedKeys==="all"||this.state.selectedKeys.size>0)&&this.state.setSelectedKeys(new Wt)}toggleSelectAll(){this.isSelectAll?this.clearSelection():this.selectAll()}select(t,n){this.selectionMode!=="none"&&(this.selectionMode==="single"?this.isSelected(t)&&!this.disallowEmptySelection?this.toggleSelection(t):this.replaceSelection(t):this.selectionBehavior==="toggle"||n&&(n.pointerType==="touch"||n.pointerType==="virtual")?this.toggleSelection(t):this.replaceSelection(t))}isSelectionEqual(t){if(t===this.state.selectedKeys)return!0;let n=this.selectedKeys;if(t.size!==n.size)return!1;for(let r of t)if(!n.has(r))return!1;for(let r of n)if(!t.has(r))return!1;return!0}canSelectItem(t){if(this.state.selectionMode==="none"||this.state.disabledKeys.has(t))return!1;let n=this.collection.getItem(t);return!(!n||n.type==="cell"&&!this.allowsCellSelection)}isDisabled(t){return this.state.disabledKeys.has(t)&&this.state.disabledBehavior==="all"}isLink(t){var n,r;return!!(!((r=this.collection.getItem(t))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.href)}constructor(t,n,r){this.collection=t,this.state=n;var a;this.allowsCellSelection=(a=r==null?void 0:r.allowsCellSelection)!==null&&a!==void 0?a:!1,this._isSelectAll=null}}class ep{*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(t){let n=this.keyMap.get(t);return n?n.prevKey:null}getKeyAfter(t){let n=this.keyMap.get(t);return n?n.nextKey:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(t){return this.keyMap.get(t)}at(t){const n=[...this.getKeys()];return this.getItem(n[t])}getChildren(t){let n=this.keyMap.get(t);return(n==null?void 0:n.childNodes)||[]}constructor(t){this.keyMap=new Map,this.iterable=t;let n=o=>{if(this.keyMap.set(o.key,o),o.childNodes&&o.type==="section")for(let l of o.childNodes)n(l)};for(let o of t)n(o);let r,a=0;for(let[o,l]of this.keyMap)r?(r.nextKey=o,l.prevKey=r.key):(this.firstKey=o,l.prevKey=void 0),l.type==="item"&&(l.index=a++),r=l,r.nextKey=void 0;this.lastKey=r==null?void 0:r.key}}function Nk(e){let{filter:t}=e,n=Ck(e),r=U.useMemo(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),a=U.useCallback(f=>t?new ep(t(f)):new ep(f),[t]),o=U.useMemo(()=>({suppressTextValueWarning:e.suppressTextValueWarning}),[e.suppressTextValueWarning]),l=pr.useCollection(e,a,o),c=U.useMemo(()=>new Dk(l,n),[l,n]);const p=U.useRef(null);return U.useEffect(()=>{if(n.focusedKey!=null&&!l.getItem(n.focusedKey)){const f=p.current.getItem(n.focusedKey),m=[...p.current.getKeys()].map(C=>{const T=p.current.getItem(C);return T.type==="item"?T:null}).filter(C=>C!==null),u=[...l.getKeys()].map(C=>{const T=l.getItem(C);return T.type==="item"?T:null}).filter(C=>C!==null),h=m.length-u.length;let g=Math.min(h>1?Math.max(f.index-h+1,0):f.index,u.length-1),v;for(;g>=0;){if(!c.isDisabled(u[g].key)){v=u[g];break}g<u.length-1?g++:(g>f.index&&(g=f.index),g--)}n.setFocusedKey(v?v.key:null)}p.current=l},[l,c,n,n.focusedKey]),{collection:l,disabledKeys:r,selectionManager:c}}function xk(e){var t;let[n,r]=pf(e.selectedKey,(t=e.defaultSelectedKey)!==null&&t!==void 0?t:null,e.onSelectionChange),a=U.useMemo(()=>n!=null?[n]:[],[n]),{collection:o,disabledKeys:l,selectionManager:c}=Nk({...e,selectionMode:"single",disallowEmptySelection:!0,allowDuplicateSelectionEvents:!0,selectedKeys:a,onSelectionChange:f=>{var m;let u=(m=f.values().next().value)!==null&&m!==void 0?m:null;u===n&&e.onSelectionChange&&e.onSelectionChange(u),r(u)}}),p=n!=null?o.getItem(n):null;return{collection:o,disabledKeys:l,selectionManager:c,selectedKey:n,setSelectedKey:r,selectedItem:p}}function kk(e){var t;let n=xk({...e,suppressTextValueWarning:!0,defaultSelectedKey:(t=e.defaultSelectedKey)!==null&&t!==void 0?t:tp(e.collection,e.disabledKeys?new Set(e.disabledKeys):new Set)}),{selectionManager:r,collection:a,selectedKey:o}=n,l=U.useRef(o);return U.useEffect(()=>{let c=o;(r.isEmpty||!a.getItem(c))&&(c=tp(a,n.disabledKeys),c!=null&&r.setSelectedKeys([c])),(c!=null&&r.focusedKey==null||!r.isFocused&&c!==l.current)&&r.setFocusedKey(c),l.current=c}),{...n,isDisabled:e.isDisabled||!1}}function tp(e,t){let n=null;if(e){for(n=e.getFirstKey();t.has(n)&&n!==e.getLastKey();)n=e.getKeyAfter(n);t.has(n)&&n===e.getLastKey()&&(n=e.getFirstKey())}return n}const Ik={},Mk={};function bl(e){const t=kk(e),n=s.useRef(null),{tabListProps:r}=Ek(e,t,n);return s.createElement(s.Fragment,null,s.createElement("div",{...r,ref:n,className:"sps-nav sps-nav--tabs sps-tabs-v2"},[...t.collection].map(a=>s.createElement(Ff,{key:a.key,item:a,state:t}))),s.createElement(Vf,{key:t.selectedItem?t.selectedItem.key:null,state:t}))}Object.assign(bl,{props:Ik,propTypes:Mk,displayName:"SpsTabsV2"});const _k={};function vl({children:e,className:t,...n}){return s.createElement("div",{className:H("sps-card__footer",t),...n},e)}Object.assign(vl,{props:_k,displayName:"SpsCardV2Footer"});const Rk={};function yl({children:e,className:t,...n}){return s.createElement("div",{className:H("sps-card__header",t),...n},e)}Object.assign(yl,{props:Rk,displayName:"SpsCardV2Header"});const Ok={};function $f({children:e,className:t,...n}){const[r,a,o,l,c]=Bt(e,[{type:yl},{type:bl},{type:Xb.Tabs},{type:vl}]),p=a.length>0?a:o;return s.createElement("div",{className:H("sps-card",t),...n},r,p.length>0?p:s.createElement("div",{className:"sps-card__body"},c),l)}Object.assign($f,{props:Ok,displayName:"SpsCardV2"});const Lk={};function Kf({children:e,className:t,...n}){return s.createElement("div",{className:H("sps-card__title",t),...n},e)}Object.assign(Kf,{props:Lk,displayName:"SpsCardV2Title"});const Pk={...zu,controlsDisabled:"boolean",footerLinks:"ReactNodeOrRenderFn",formMeta:"SpsFormSetMeta<any>",isOpen:"boolean",onClear:"() => void",onSubmit:"React.FormEventHandler"};function Hf(e){const{children:t,className:n,controlsDisabled:r,footerLinks:a,formArray:o,formGroup:l,formMeta:c,isOpen:p,onClear:f,onSubmit:m,unsafelyReplaceClassName:u,...h}=e,{t:g}=s.useContext(He);function v(){f&&f()}const C=H(u||"sps-advanced-search",p&&"sps-advanced-search--open",n);return s.createElement("div",{className:C,...h},s.createElement(ps,{onSubmit:m,formArray:o,formGroup:l,formMeta:c},s.createElement("div",{className:"sps-advanced-search__form"},t),s.createElement("div",{className:"sps-advanced-search__footer"},a&&s.createElement("div",{id:"footer_links"},Ct(a)),s.createElement("div",{className:"sps-advanced-search__footer-controls"},s.createElement(qe,{kind:$.ButtonKind.DEFAULT,type:$.ButtonType.BUTTON,className:"mr-2",onClick:v,disabled:r},g("design-system:advancedSearch.clear")),s.createElement(qe,{kind:$.ButtonKind.KEY,type:$.ButtonType.SUBMIT,disabled:r},g("design-system:advancedSearch.search"))))))}Object.assign(Hf,{props:Pk,displayName:"SpsAdvancedSearch"});const Bk={general:{label:"General Usage",description:({NavigateTo:e,Link:t})=>s.createElement(s.Fragment,null,s.createElement("p",null,'Advanced Search is comprised of a panel of input fields, and a text button that exposes and hides the panel. By default, the Advanced Search panel is hidden (with the exception of "Advanced Search Only" scenarios).'),s.createElement("p",null,"Advanced Search works in conjunction with the"," ",s.createElement(e,{to:"list-toolbar"},"List Bar")," and"," ",s.createElement(e,{to:"search-results-bar"},"Search Results")," components. Refer to those pages for additional details."),s.createElement("p",null,"Use the following guidelines when including Advanced Search on your page:",s.createElement("ul",null,s.createElement("li",null,"The Advanced Search Panel can contain any number of input fields."),s.createElement("li",null,"The Advanced Search Panel can place input fields in any unique layout to best serve the needs of the search criteria, but must adhere to the rules of the"," ",s.createElement(t,{to:"/style-and-layout/grid/"},"SPS Grid")," and guidelines for"," ",s.createElement(e,{to:"form"},"Form Layouts"),"."))))},basic:{label:"Basic Usage",description:({NavigateTo:e})=>s.createElement(s.Fragment,null,s.createElement("p",null,"A Basic Advanced Search consists of the List Bar with a search input and an Advanced Search text button. For more details on additional button and component options in the List Bar reference the ",s.createElement(e,{to:"list-toolbar"},"List Bar")," page.")),examples:{basic:{react:y.code`
|
|
8909
|
+
`}}}},lx={Autocomplete:{components:[zt],examples:wp},Checkbox:{components:[Jn],examples:Cp},"Clickable Tags":{components:[rs],examples:Dp},"Column Chooser":{components:[Oi,co],examples:Ju},"Conditional Fields":{description:()=>s.createElement("p",null,"A conditional field is one that is only available when a certain option is selected amongst a set of checkboxes or radio buttons."),components:[dl],examples:lf},"Content Rows":{components:[Li,Kn,po],examples:Zu},Datepicker:{components:[Pi],examples:Xu},"Date Range Picker":{components:[Bi],examples:Qu},"Date Time Range Picker":{components:[Ai],examples:nm},Datetime:{components:[Fi],examples:rm},"Time Input":{components:[ul],examples:df},"Description Lists":{description:()=>s.createElement("p",null,"Description Lists display a series of terms with accompanying descriptions such as a glossary of terms."),components:[fo,ho,So],examples:dm},Dropdown:{components:[Xn,Vi],examples:pm},Fieldset:{components:[$i],examples:um},"Filter Panel":{components:[al,il,ll,cl],examples:af},Form:{components:[ds],examples:qu},Incrementor:{components:[Ki],examples:mm},Label:{description:()=>s.createElement("p",null,"Labels provide a description for the value to be entered or selected in an accompanying input field."),components:[Hi],examples:fm},"List Action Bar":{description:()=>s.createElement("p",null,"The List Action Bar contains the action buttons relevant to selected items from a Table List, Row List, or Card List. The List Action Bar is only visible when one or more list items have been selected and appears anchored to the bottom of the page above all other content."),components:[Wi],examples:Rm},"Micro Block":{components:[Gi],examples:Om},Modals:{description:()=>s.createElement("p",null,"Modals are overlays on a page that focus a user’s attention on an important message or a simple action. Examples of a Modal include confirming the deletion of a record, or making a single selection."),components:[Yi,bo],examples:Pm},"Multi Select":{description:()=>s.createElement("p",null,"Multi-Selects consist of a Label and a dropdown menu from which a user selects one or more values from a list of pre-defined options."),components:[ji],examples:Bm},"Multi Value Text Input":{description:()=>s.createElement("p",null,"To be determined."),components:[pl],examples:cf},Pagination:{description:()=>s.createElement("p",null,"The Pagination component allows users to navigate lists of records and control the number of records displayed on each page. The records can span across multiple pages, or within sections of a page."),components:[zi,vo],examples:Am},"Radio Buttons":{description:"Radio Buttons allow a user to make single selection from a list of predefined options.",components:[qi],examples:Fm},Select:{description:"Selects consist off a Label and a dropdown menu from which a user selects a value from a list of pre-defined options.",components:[Yn],examples:em},"Side Navigation":{description:"Side Navigations are used to provide quick access to a series of related pages or content. It can be used to navigate between different page views, or as an anchor-style menu to scroll to specific content on the same page.",components:[$m],examples:Km},"Split Button":{components:[Ji],examples:Hm},"Summary List Row":{components:[Zi,Xi,ts],examples:Wm},Tables:{description:({NavigateTo:e})=>s.createElement(s.Fragment,null,s.createElement("div",{className:"sps-body-14"},"Tables (along with ",s.createElement(e,{to:"content-rows"},"Content Rows")," and"," ",s.createElement(e,{to:"content-tiles"},"Content Tiles"),") are one of three options for displaying a list of records on a page."),s.createElement("br",null),s.createElement("div",{className:"sps-body-14"},"Tables are the ideal solution for displaying tabular data, especially when the listed records contain a considerable amount of data points. While tables are primarily used to display an extensive list of records, often in a paginated format, they can also be used to display smaller sets of tabular data in any context.")),components:[Qn,xn,ce,Nn,tt,Ue],examples:_m},"Task Queue":{components:[Qi],examples:Gm},"Text Inputs":{description:()=>s.createElement("p",null,"Text Inputs consist of a Label and a field in which a user enters a short value."),components:[To],examples:Ym},"Text Areas":{description:()=>s.createElement("p",null,"Text Areas consist of a Label and a field in which a user enters a long value."),components:[el],examples:Um},Toggle:{description:()=>s.createElement("p",null,"Toggles allow a user to immediately turn a setting on or off."),components:[tl],examples:zm},Tooltips:{components:[Rt,nl],examples:qm},Wizard:{components:[sl,ol],examples:Xm},Workflow:{components:[Eo,wo,Co,Do],examples:of},"Slide In Panel":{description:"",components:[Ui],examples:Lm}},pf=new WeakMap;function qs(e,t,n){return typeof t=="string"&&(t=t.replace(/\s+/g,"")),`${pf.get(e)}-${n}-${t}`}const ps=typeof document<"u"?_.useLayoutEffect:()=>{};function pr(e){const t=_.useRef(null);return ps(()=>{t.current=e},[e]),_.useCallback((...n)=>{const r=t.current;return r==null?void 0:r(...n)},[])}const Js={prefix:String(Math.round(Math.random()*1e10)),current:0},uf=_.createContext(Js),cx=_.createContext(!1);let dx=!!(typeof window<"u"&&window.document&&window.document.createElement),ba=new WeakMap;function px(e=!1){let t=_.useContext(uf),n=_.useRef(null);if(n.current===null&&!e){var r,o;let a=(o=_.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||o===void 0||(r=o.ReactCurrentOwner)===null||r===void 0?void 0:r.current;if(a){let l=ba.get(a);l==null?ba.set(a,{id:t.current,state:a.memoizedState}):a.memoizedState!==l.state&&(t.current=l.id,ba.delete(a))}n.current=++t.current}return n.current}function ux(e){let t=_.useContext(uf);t===Js&&!dx&&console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");let n=px(!!e),r=t===Js&&process.env.NODE_ENV==="test"?"react-aria":`react-aria${t.prefix}`;return e||`${r}-${n}`}function mx(e){let t=_.useId(),[n]=_.useState(mf()),r=n||process.env.NODE_ENV==="test"?"react-aria":`react-aria${Js.prefix}`;return e||`${r}-${t}`}const fx=typeof _.useId=="function"?mx:ux;function hx(){return!1}function Sx(){return!0}function gx(e){return()=>{}}function mf(){return typeof _.useSyncExternalStore=="function"?_.useSyncExternalStore(gx,hx,Sx):_.useContext(cx)}let bx=!!(typeof window<"u"&&window.document&&window.document.createElement),Zs=new Map;function ff(e){let[t,n]=_.useState(e),r=_.useRef(null),o=fx(t),a=_.useCallback(l=>{r.current=l},[]);return bx&&Zs.set(o,a),ps(()=>{let l=o;return()=>{Zs.delete(l)}},[o]),_.useEffect(()=>{let l=r.current;l&&(r.current=null,n(l))}),o}function vx(e,t){if(e===t)return e;let n=Zs.get(e);if(n)return n(t),t;let r=Zs.get(t);return r?(r(e),e):t}function hf(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}const Tt=e=>{var t;return(t=e==null?void 0:e.ownerDocument)!==null&&t!==void 0?t:document},Un=e=>e&&"window"in e&&e.window===e?e:Tt(e).defaultView||window;function Sf(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Sf(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function yx(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Sf(e))&&(r&&(r+=" "),r+=t);return r}function kn(...e){let t={...e[0]};for(let n=1;n<e.length;n++){let r=e[n];for(let o in r){let a=t[o],l=r[o];typeof a=="function"&&typeof l=="function"&&o[0]==="o"&&o[1]==="n"&&o.charCodeAt(2)>=65&&o.charCodeAt(2)<=90?t[o]=hf(a,l):(o==="className"||o==="UNSAFE_className")&&typeof a=="string"&&typeof l=="string"?t[o]=yx(a,l):o==="id"&&a&&l?t.id=vx(a,l):t[o]=l!==void 0?l:a}}return t}const Tx=new Set(["id"]),Ex=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),wx=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),Cx=/^(data-.*)$/;function Dx(e,t={}){let{labelable:n,isLink:r,propNames:o}=t,a={};for(const l in e)Object.prototype.hasOwnProperty.call(e,l)&&(Tx.has(l)||n&&Ex.has(l)||r&&wx.has(l)||o!=null&&o.has(l)||Cx.test(l))&&(a[l]=e[l]);return a}function dn(e){if(Nx())e.focus({preventScroll:!0});else{let t=xx(e);e.focus(),kx(t)}}let Os=null;function Nx(){if(Os==null){Os=!1;try{document.createElement("div").focus({get preventScroll(){return Os=!0,!0}})}catch{}}return Os}function xx(e){let t=e.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function kx(e){for(let{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}function No(e){var t;return typeof window>"u"||window.navigator==null?!1:((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.brands.some(n=>e.test(n.brand)))||e.test(window.navigator.userAgent)}function ml(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function jn(){return ml(/^Mac/i)}function Ix(){return ml(/^iPhone/i)}function gf(){return ml(/^iPad/i)||jn()&&navigator.maxTouchPoints>1}function fl(){return Ix()||gf()}function Mx(){return jn()||fl()}function _x(){return No(/AppleWebKit/i)&&!Rx()}function Rx(){return No(/Chrome/i)}function bf(){return No(/Android/i)}function Ox(){return No(/Firefox/i)}const Lx=_.createContext({isNative:!0,open:Bx,useHref:e=>e});function hl(){return _.useContext(Lx)}function zn(e,t,n=!0){var r,o;let{metaKey:a,ctrlKey:l,altKey:c,shiftKey:p}=t;Ox()&&(!((o=window.event)===null||o===void 0||(r=o.type)===null||r===void 0)&&r.startsWith("key"))&&e.target==="_blank"&&(jn()?a=!0:l=!0);let f=_x()&&jn()&&!gf()?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:a,ctrlKey:l,altKey:c,shiftKey:p}):new MouseEvent("click",{metaKey:a,ctrlKey:l,altKey:c,shiftKey:p,bubbles:!0,cancelable:!0});zn.isOpening=n,dn(e),e.dispatchEvent(f),zn.isOpening=!1}zn.isOpening=!1;function Px(e,t){if(e instanceof HTMLAnchorElement)t(e);else if(e.hasAttribute("data-href")){let n=document.createElement("a");n.href=e.getAttribute("data-href"),e.hasAttribute("data-target")&&(n.target=e.getAttribute("data-target")),e.hasAttribute("data-rel")&&(n.rel=e.getAttribute("data-rel")),e.hasAttribute("data-download")&&(n.download=e.getAttribute("data-download")),e.hasAttribute("data-ping")&&(n.ping=e.getAttribute("data-ping")),e.hasAttribute("data-referrer-policy")&&(n.referrerPolicy=e.getAttribute("data-referrer-policy")),e.appendChild(n),t(n),e.removeChild(n)}}function Bx(e,t){Px(e,n=>zn(n,t))}function Ax(e){let t=hl();return{href:e!=null&&e.href?t.useHref(e==null?void 0:e.href):void 0,target:e==null?void 0:e.target,rel:e==null?void 0:e.rel,download:e==null?void 0:e.download,ping:e==null?void 0:e.ping,referrerPolicy:e==null?void 0:e.referrerPolicy}}let ur=new Map,$a=new Set;function Kd(){if(typeof window>"u")return;function e(r){return"propertyName"in r}let t=r=>{if(!e(r)||!r.target)return;let o=ur.get(r.target);o||(o=new Set,ur.set(r.target,o),r.target.addEventListener("transitioncancel",n,{once:!0})),o.add(r.propertyName)},n=r=>{if(!e(r)||!r.target)return;let o=ur.get(r.target);if(o&&(o.delete(r.propertyName),o.size===0&&(r.target.removeEventListener("transitioncancel",n),ur.delete(r.target)),ur.size===0)){for(let a of $a)a();$a.clear()}};document.body.addEventListener("transitionrun",t),document.body.addEventListener("transitionend",n)}typeof document<"u"&&(document.readyState!=="loading"?Kd():document.addEventListener("DOMContentLoaded",Kd));function vf(e){requestAnimationFrame(()=>{ur.size===0?e():$a.add(e)})}function yf(){let e=_.useRef(new Map),t=_.useCallback((o,a,l,c)=>{let p=c!=null&&c.once?(...f)=>{e.current.delete(l),l(...f)}:l;e.current.set(l,{type:a,eventTarget:o,fn:p,options:c}),o.addEventListener(a,l,c)},[]),n=_.useCallback((o,a,l,c)=>{var p;let f=((p=e.current.get(l))===null||p===void 0?void 0:p.fn)||l;o.removeEventListener(a,f,c),e.current.delete(l)},[]),r=_.useCallback(()=>{e.current.forEach((o,a)=>{n(o.eventTarget,o.type,a,o.options)})},[n]);return _.useEffect(()=>r,[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}function Tf(e,t){let{id:n,"aria-label":r,"aria-labelledby":o}=e;return n=ff(n),o&&r?o=[...new Set([n,...o.trim().split(/\s+/)])].join(" "):o&&(o=o.trim().split(/\s+/).join(" ")),!r&&!o&&t&&(r=t),{id:n,"aria-label":r,"aria-labelledby":o}}function Fx(e,t){ps(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}function Vx(e,t){let n=window.getComputedStyle(e),r=/(auto|scroll)/.test(n.overflow+n.overflowX+n.overflowY);return r&&t&&(r=e.scrollHeight!==e.clientHeight||e.scrollWidth!==e.clientWidth),r}function $x(e,t){const n=[];for(;e&&e!==document.documentElement;)Vx(e,t)&&n.push(e),e=e.parentElement;return n}let Kx=0;const va=new Map;function Hx(e){let[t,n]=_.useState();return ps(()=>{if(!e)return;let r=va.get(e);if(r)n(r.element.id);else{let o=`react-aria-description-${Kx++}`;n(o);let a=document.createElement("div");a.id=o,a.style.display="none",a.textContent=e,document.body.appendChild(a),r={refCount:0,element:a},va.set(e,r)}return r.refCount++,()=>{r&&--r.refCount===0&&(r.element.remove(),va.delete(e))}},[e]),{"aria-describedby":e?t:void 0}}function Wx(e,t,n,r){let o=pr(n),a=n==null;_.useEffect(()=>{if(a||!e.current)return;let l=e.current;return l.addEventListener(t,o,r),()=>{l.removeEventListener(t,o,r)}},[e,t,r,a,o])}function Ef(e,t){let n=Hd(e,t,"left"),r=Hd(e,t,"top"),o=t.offsetWidth,a=t.offsetHeight,l=e.scrollLeft,c=e.scrollTop,{borderTopWidth:p,borderLeftWidth:f}=getComputedStyle(e),m=e.scrollLeft+parseInt(f,10),u=e.scrollTop+parseInt(p,10),h=m+e.clientWidth,g=u+e.clientHeight;n<=l?l=n-parseInt(f,10):n+o>h&&(l+=n+o-h),r<=u?c=r-parseInt(p,10):r+a>g&&(c+=r+a-g),e.scrollLeft=l,e.scrollTop=c}function Hd(e,t,n){const r=n==="left"?"offsetLeft":"offsetTop";let o=0;for(;t.offsetParent&&(o+=t[r],t.offsetParent!==e);){if(t.offsetParent.contains(e)){o-=e[r];break}t=t.offsetParent}return o}function Wd(e,t){if(document.contains(e)){let l=document.scrollingElement||document.documentElement;if(window.getComputedStyle(l).overflow==="hidden"){let p=$x(e);for(let f of p)Ef(f,e)}else{var n;let{left:p,top:f}=e.getBoundingClientRect();e==null||(n=e.scrollIntoView)===null||n===void 0||n.call(e,{block:"nearest"});let{left:m,top:u}=e.getBoundingClientRect();if(Math.abs(p-m)>1||Math.abs(f-u)>1){var r,o,a;t==null||(o=t.containingElement)===null||o===void 0||(r=o.scrollIntoView)===null||r===void 0||r.call(o,{block:"center",inline:"center"}),(a=e.scrollIntoView)===null||a===void 0||a.call(e,{block:"nearest"})}}}}function Ka(e){return e.mozInputSource===0&&e.isTrusted?!0:bf()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Gx(e){return!bf()&&e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"}function wf(e,t,n){let[r,o]=_.useState(e||t),a=_.useRef(e!==void 0),l=e!==void 0;_.useEffect(()=>{let f=a.current;f!==l&&console.warn(`WARN: A component changed from ${f?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}.`),a.current=l},[l]);let c=l?e:r,p=_.useCallback((f,...m)=>{let u=(h,...g)=>{n&&(Object.is(c,h)||n(h,...g)),l||(c=h)};typeof f=="function"?(console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"),o((g,...v)=>{let w=f(l?c:g,...v);return u(w,...m),l?g:w})):(l||o(f),u(f,...m))},[l,c,n]);return[c,p]}function Ha(e){return Mx()?e.altKey:e.ctrlKey}function mr(e){return jn()?e.metaKey:e.ctrlKey}const Yx=1e3;function Ux(e){let{keyboardDelegate:t,selectionManager:n,onTypeSelect:r}=e,o=_.useRef({search:"",timeout:null}).current,a=l=>{let c=jx(l.key);if(!c||l.ctrlKey||l.metaKey||!l.currentTarget.contains(l.target))return;c===" "&&o.search.trim().length>0&&(l.preventDefault(),"continuePropagation"in l||l.stopPropagation()),o.search+=c;let p=t.getKeyForSearch(o.search,n.focusedKey);p==null&&(p=t.getKeyForSearch(o.search)),p!=null&&(n.setFocusedKey(p),r&&r(p)),clearTimeout(o.timeout),o.timeout=setTimeout(()=>{o.search=""},Yx)};return{typeSelectProps:{onKeyDownCapture:t.getKeyForSearch?a:null}}}function jx(e){return e.length===1||!/^[A-Z]/i.test(e)?e:""}let fr="default",Wa="",$s=new WeakMap;function Gd(e){if(fl()){if(fr==="default"){const t=Tt(e);Wa=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none"}fr="disabled"}else(e instanceof HTMLElement||e instanceof SVGElement)&&($s.set(e,e.style.userSelect),e.style.userSelect="none")}function Ls(e){if(fl()){if(fr!=="disabled")return;fr="restoring",setTimeout(()=>{vf(()=>{if(fr==="restoring"){const t=Tt(e);t.documentElement.style.webkitUserSelect==="none"&&(t.documentElement.style.webkitUserSelect=Wa||""),Wa="",fr="default"}})},300)}else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&$s.has(e)){let t=$s.get(e);e.style.userSelect==="none"&&(e.style.userSelect=t),e.getAttribute("style")===""&&e.removeAttribute("style"),$s.delete(e)}}const Cf=_.createContext({register:()=>{}});Cf.displayName="PressResponderContext";function zx(e,t){return t.get?t.get.call(e):t.value}function Df(e,t,n){if(!t.has(e))throw new TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function qx(e,t){var n=Df(e,t,"get");return zx(e,n)}function Jx(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Zx(e,t,n){Jx(e,t),t.set(e,n)}function Xx(e,t,n){if(t.set)t.set.call(e,n);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=n}}function Yd(e,t,n){var r=Df(e,t,"set");return Xx(e,r,n),n}function Qx(e){let t=_.useContext(Cf);if(t){let{register:n,...r}=t;e=kn(r,e),n()}return Fx(t,e.ref),e}var Ps=new WeakMap;class Bs{continuePropagation(){Yd(this,Ps,!1)}get shouldStopPropagation(){return qx(this,Ps)}constructor(t,n,r){Zx(this,Ps,{writable:!0,value:void 0}),Yd(this,Ps,!0),this.type=t,this.pointerType=n,this.target=r.currentTarget,this.shiftKey=r.shiftKey,this.metaKey=r.metaKey,this.ctrlKey=r.ctrlKey,this.altKey=r.altKey}}const Ud=Symbol("linkClicked");function Nf(e){let{onPress:t,onPressChange:n,onPressStart:r,onPressEnd:o,onPressUp:a,isDisabled:l,isPressed:c,preventFocusOnPress:p,shouldCancelOnPointerExit:f,allowTextSelectionOnPress:m,ref:u,...h}=Qx(e),[g,v]=_.useState(!1),w=_.useRef({isPressed:!1,ignoreEmulatedMouseEvents:!1,ignoreClickAfterPress:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null}),{addGlobalListener:T,removeAllGlobalListeners:E}=yf(),D=pr((C,R)=>{let O=w.current;if(l||O.didFirePressStart)return!1;let W=!0;if(O.isTriggeringEvent=!0,r){let z=new Bs("pressstart",R,C);r(z),W=z.shouldStopPropagation}return n&&n(!0),O.isTriggeringEvent=!1,O.didFirePressStart=!0,v(!0),W}),k=pr((C,R,O=!0)=>{let W=w.current;if(!W.didFirePressStart)return!1;W.ignoreClickAfterPress=!0,W.didFirePressStart=!1,W.isTriggeringEvent=!0;let z=!0;if(o){let M=new Bs("pressend",R,C);o(M),z=M.shouldStopPropagation}if(n&&n(!1),v(!1),t&&O&&!l){let M=new Bs("press",R,C);t(M),z&&(z=M.shouldStopPropagation)}return W.isTriggeringEvent=!1,z}),I=pr((C,R)=>{let O=w.current;if(l)return!1;if(a){O.isTriggeringEvent=!0;let W=new Bs("pressup",R,C);return a(W),O.isTriggeringEvent=!1,W.shouldStopPropagation}return!0}),x=pr(C=>{let R=w.current;R.isPressed&&R.target&&(R.isOverTarget&&R.pointerType!=null&&k(cn(R.target,C),R.pointerType,!1),R.isPressed=!1,R.isOverTarget=!1,R.activePointerId=null,R.pointerType=null,E(),m||Ls(R.target))}),F=pr(C=>{f&&x(C)}),L=_.useMemo(()=>{let C=w.current,R={onKeyDown(W){if(ya(W.nativeEvent,W.currentTarget)&&W.currentTarget.contains(W.target)){var z;zd(W.target,W.key)&&W.preventDefault();let M=!0;if(!C.isPressed&&!W.repeat){C.target=W.currentTarget,C.isPressed=!0,M=D(W,"keyboard");let U=W.currentTarget,G=j=>{ya(j,U)&&!j.repeat&&U.contains(j.target)&&C.target&&I(cn(C.target,j),"keyboard")};T(Tt(W.currentTarget),"keyup",hf(G,O),!0)}M&&W.stopPropagation(),W.metaKey&&jn()&&((z=C.metaKeyEvents)===null||z===void 0||z.set(W.key,W.nativeEvent))}else W.key==="Meta"&&(C.metaKeyEvents=new Map)},onClick(W){if(!(W&&!W.currentTarget.contains(W.target))&&W&&W.button===0&&!C.isTriggeringEvent&&!zn.isOpening){let z=!0;if(l&&W.preventDefault(),!C.ignoreClickAfterPress&&!C.ignoreEmulatedMouseEvents&&!C.isPressed&&(C.pointerType==="virtual"||Ka(W.nativeEvent))){!l&&!p&&dn(W.currentTarget);let M=D(W,"virtual"),U=I(W,"virtual"),G=k(W,"virtual");z=M&&U&&G}C.ignoreEmulatedMouseEvents=!1,C.ignoreClickAfterPress=!1,z&&W.stopPropagation()}}},O=W=>{var z;if(C.isPressed&&C.target&&ya(W,C.target)){var M;zd(W.target,W.key)&&W.preventDefault();let G=W.target;k(cn(C.target,W),"keyboard",C.target.contains(G)),E(),W.key!=="Enter"&&Sl(C.target)&&C.target.contains(G)&&!W[Ud]&&(W[Ud]=!0,zn(C.target,W,!1)),C.isPressed=!1,(M=C.metaKeyEvents)===null||M===void 0||M.delete(W.key)}else if(W.key==="Meta"&&(!((z=C.metaKeyEvents)===null||z===void 0)&&z.size)){var U;let G=C.metaKeyEvents;C.metaKeyEvents=void 0;for(let j of G.values())(U=C.target)===null||U===void 0||U.dispatchEvent(new KeyboardEvent("keyup",j))}};if(typeof PointerEvent<"u"){R.onPointerDown=U=>{if(U.button!==0||!U.currentTarget.contains(U.target))return;if(Gx(U.nativeEvent)){C.pointerType="virtual";return}Ta(U.currentTarget)&&U.preventDefault(),C.pointerType=U.pointerType;let G=!0;C.isPressed||(C.isPressed=!0,C.isOverTarget=!0,C.activePointerId=U.pointerId,C.target=U.currentTarget,!l&&!p&&dn(U.currentTarget),m||Gd(C.target),G=D(U,C.pointerType),T(Tt(U.currentTarget),"pointermove",W,!1),T(Tt(U.currentTarget),"pointerup",z,!1),T(Tt(U.currentTarget),"pointercancel",M,!1)),G&&U.stopPropagation()},R.onMouseDown=U=>{U.currentTarget.contains(U.target)&&U.button===0&&(Ta(U.currentTarget)&&U.preventDefault(),U.stopPropagation())},R.onPointerUp=U=>{!U.currentTarget.contains(U.target)||C.pointerType==="virtual"||U.button===0&&cr(U,U.currentTarget)&&I(U,C.pointerType||U.pointerType)};let W=U=>{U.pointerId===C.activePointerId&&(C.target&&cr(U,C.target)?!C.isOverTarget&&C.pointerType!=null&&(C.isOverTarget=!0,D(cn(C.target,U),C.pointerType)):C.target&&C.isOverTarget&&C.pointerType!=null&&(C.isOverTarget=!1,k(cn(C.target,U),C.pointerType,!1),F(U)))},z=U=>{U.pointerId===C.activePointerId&&C.isPressed&&U.button===0&&C.target&&(cr(U,C.target)&&C.pointerType!=null?k(cn(C.target,U),C.pointerType):C.isOverTarget&&C.pointerType!=null&&k(cn(C.target,U),C.pointerType,!1),C.isPressed=!1,C.isOverTarget=!1,C.activePointerId=null,C.pointerType=null,E(),m||Ls(C.target))},M=U=>{x(U)};R.onDragStart=U=>{U.currentTarget.contains(U.target)&&x(U)}}else{R.onMouseDown=M=>{if(M.button!==0||!M.currentTarget.contains(M.target))return;if(Ta(M.currentTarget)&&M.preventDefault(),C.ignoreEmulatedMouseEvents){M.stopPropagation();return}C.isPressed=!0,C.isOverTarget=!0,C.target=M.currentTarget,C.pointerType=Ka(M.nativeEvent)?"virtual":"mouse",!l&&!p&&dn(M.currentTarget),D(M,C.pointerType)&&M.stopPropagation(),T(Tt(M.currentTarget),"mouseup",W,!1)},R.onMouseEnter=M=>{if(!M.currentTarget.contains(M.target))return;let U=!0;C.isPressed&&!C.ignoreEmulatedMouseEvents&&C.pointerType!=null&&(C.isOverTarget=!0,U=D(M,C.pointerType)),U&&M.stopPropagation()},R.onMouseLeave=M=>{if(!M.currentTarget.contains(M.target))return;let U=!0;C.isPressed&&!C.ignoreEmulatedMouseEvents&&C.pointerType!=null&&(C.isOverTarget=!1,U=k(M,C.pointerType,!1),F(M)),U&&M.stopPropagation()},R.onMouseUp=M=>{M.currentTarget.contains(M.target)&&!C.ignoreEmulatedMouseEvents&&M.button===0&&I(M,C.pointerType||"mouse")};let W=M=>{if(M.button===0){if(C.isPressed=!1,E(),C.ignoreEmulatedMouseEvents){C.ignoreEmulatedMouseEvents=!1;return}C.target&&cr(M,C.target)&&C.pointerType!=null?k(cn(C.target,M),C.pointerType):C.target&&C.isOverTarget&&C.pointerType!=null&&k(cn(C.target,M),C.pointerType,!1),C.isOverTarget=!1}};R.onTouchStart=M=>{if(!M.currentTarget.contains(M.target))return;let U=ek(M.nativeEvent);if(!U)return;C.activePointerId=U.identifier,C.ignoreEmulatedMouseEvents=!0,C.isOverTarget=!0,C.isPressed=!0,C.target=M.currentTarget,C.pointerType="touch",!l&&!p&&dn(M.currentTarget),m||Gd(C.target),D(M,C.pointerType)&&M.stopPropagation(),T(Un(M.currentTarget),"scroll",z,!0)},R.onTouchMove=M=>{if(!M.currentTarget.contains(M.target))return;if(!C.isPressed){M.stopPropagation();return}let U=jd(M.nativeEvent,C.activePointerId),G=!0;U&&cr(U,M.currentTarget)?!C.isOverTarget&&C.pointerType!=null&&(C.isOverTarget=!0,G=D(M,C.pointerType)):C.isOverTarget&&C.pointerType!=null&&(C.isOverTarget=!1,G=k(M,C.pointerType,!1),F(M)),G&&M.stopPropagation()},R.onTouchEnd=M=>{if(!M.currentTarget.contains(M.target))return;if(!C.isPressed){M.stopPropagation();return}let U=jd(M.nativeEvent,C.activePointerId),G=!0;U&&cr(U,M.currentTarget)&&C.pointerType!=null?(I(M,C.pointerType),G=k(M,C.pointerType)):C.isOverTarget&&C.pointerType!=null&&(G=k(M,C.pointerType,!1)),G&&M.stopPropagation(),C.isPressed=!1,C.activePointerId=null,C.isOverTarget=!1,C.ignoreEmulatedMouseEvents=!0,C.target&&!m&&Ls(C.target),E()},R.onTouchCancel=M=>{M.currentTarget.contains(M.target)&&(M.stopPropagation(),C.isPressed&&x(M))};let z=M=>{C.isPressed&&M.target.contains(C.target)&&x({currentTarget:C.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})};R.onDragStart=M=>{M.currentTarget.contains(M.target)&&x(M)}}return R},[T,l,p,E,m,x,F,k,D,I]);return _.useEffect(()=>()=>{var C;m||Ls((C=w.current.target)!==null&&C!==void 0?C:void 0)},[m]),{isPressed:c||g,pressProps:kn(h,L)}}function Sl(e){return e.tagName==="A"&&e.hasAttribute("href")}function ya(e,t){const{key:n,code:r}=e,o=t,a=o.getAttribute("role");return(n==="Enter"||n===" "||n==="Spacebar"||r==="Space")&&!(o instanceof Un(o).HTMLInputElement&&!xf(o,n)||o instanceof Un(o).HTMLTextAreaElement||o.isContentEditable)&&!((a==="link"||!a&&Sl(o))&&n!=="Enter")}function ek(e){const{targetTouches:t}=e;return t.length>0?t[0]:null}function jd(e,t){const n=e.changedTouches;for(let r=0;r<n.length;r++){const o=n[r];if(o.identifier===t)return o}return null}function cn(e,t){return{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey}}function tk(e){let t=0,n=0;return e.width!==void 0?t=e.width/2:e.radiusX!==void 0&&(t=e.radiusX),e.height!==void 0?n=e.height/2:e.radiusY!==void 0&&(n=e.radiusY),{top:e.clientY-n,right:e.clientX+t,bottom:e.clientY+n,left:e.clientX-t}}function nk(e,t){return!(e.left>t.right||t.left>e.right||e.top>t.bottom||t.top>e.bottom)}function cr(e,t){let n=t.getBoundingClientRect(),r=tk(e);return nk(n,r)}function Ta(e){return!(e instanceof HTMLElement)||!e.hasAttribute("draggable")}function zd(e,t){return e instanceof HTMLInputElement?!xf(e,t):e instanceof HTMLButtonElement?e.type!=="submit"&&e.type!=="reset":!Sl(e)}const rk=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function xf(e,t){return e.type==="checkbox"||e.type==="radio"?t===" ":rk.has(e.type)}let us=null,sk=new Set,Wr=new Map,qn=!1,Ga=!1;function gl(e,t){for(let n of sk)n(e,t)}function ok(e){return!(e.metaKey||!jn()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function Xs(e){qn=!0,ok(e)&&(us="keyboard",gl("keyboard",e))}function Mt(e){us="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(qn=!0,gl("pointer",e))}function kf(e){Ka(e)&&(qn=!0,us="virtual")}function If(e){e.target===window||e.target===document||(!qn&&!Ga&&(us="virtual",gl("virtual",e)),qn=!1,Ga=!1)}function Mf(){qn=!1,Ga=!0}function qd(e){if(typeof window>"u"||Wr.get(Un(e)))return;const t=Un(e),n=Tt(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){qn=!0,r.apply(this,arguments)},n.addEventListener("keydown",Xs,!0),n.addEventListener("keyup",Xs,!0),n.addEventListener("click",kf,!0),t.addEventListener("focus",If,!0),t.addEventListener("blur",Mf,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",Mt,!0),n.addEventListener("pointermove",Mt,!0),n.addEventListener("pointerup",Mt,!0)):(n.addEventListener("mousedown",Mt,!0),n.addEventListener("mousemove",Mt,!0),n.addEventListener("mouseup",Mt,!0)),t.addEventListener("beforeunload",()=>{_f(e)},{once:!0}),Wr.set(t,{focus:r})}const _f=(e,t)=>{const n=Un(e),r=Tt(e);t&&r.removeEventListener("DOMContentLoaded",t),Wr.has(n)&&(n.HTMLElement.prototype.focus=Wr.get(n).focus,r.removeEventListener("keydown",Xs,!0),r.removeEventListener("keyup",Xs,!0),r.removeEventListener("click",kf,!0),n.removeEventListener("focus",If,!0),n.removeEventListener("blur",Mf,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",Mt,!0),r.removeEventListener("pointermove",Mt,!0),r.removeEventListener("pointerup",Mt,!0)):(r.removeEventListener("mousedown",Mt,!0),r.removeEventListener("mousemove",Mt,!0),r.removeEventListener("mouseup",Mt,!0)),Wr.delete(n))};function ak(e){const t=Tt(e);let n;return t.readyState!=="loading"?qd(e):(n=()=>{qd(e)},t.addEventListener("DOMContentLoaded",n)),()=>_f(e,n)}typeof document<"u"&&ak();function Ya(){return us}const ik=500;function lk(e){let{isDisabled:t,onLongPressStart:n,onLongPressEnd:r,onLongPress:o,threshold:a=ik,accessibilityDescription:l}=e;const c=_.useRef();let{addGlobalListener:p,removeGlobalListener:f}=yf(),{pressProps:m}=Nf({isDisabled:t,onPressStart(h){if(h.continuePropagation(),(h.pointerType==="mouse"||h.pointerType==="touch")&&(n&&n({...h,type:"longpressstart"}),c.current=setTimeout(()=>{h.target.dispatchEvent(new PointerEvent("pointercancel",{bubbles:!0})),o&&o({...h,type:"longpress"}),c.current=void 0},a),h.pointerType==="touch")){let g=v=>{v.preventDefault()};p(h.target,"contextmenu",g,{once:!0}),p(window,"pointerup",()=>{setTimeout(()=>{f(h.target,"contextmenu",g)},30)},{once:!0})}},onPressEnd(h){c.current&&clearTimeout(c.current),r&&(h.pointerType==="mouse"||h.pointerType==="touch")&&r({...h,type:"longpressend"})}}),u=Hx(o&&!t?l:void 0);return{longPressProps:kn(m,u)}}function Ua(e){const t=Tt(e);if(Ya()==="virtual"){let n=t.activeElement;vf(()=>{t.activeElement===n&&e.isConnected&&dn(e)})}else dn(e)}function ck(e){const t=Un(e);if(!(e instanceof t.HTMLElement)&&!(e instanceof t.SVGElement))return!1;let{display:n,visibility:r}=e.style,o=n!=="none"&&r!=="hidden"&&r!=="collapse";if(o){const{getComputedStyle:a}=e.ownerDocument.defaultView;let{display:l,visibility:c}=a(e);o=l!=="none"&&c!=="hidden"&&c!=="collapse"}return o}function dk(e,t){return!e.hasAttribute("hidden")&&!e.hasAttribute("data-react-aria-prevent-focus")&&(e.nodeName==="DETAILS"&&t&&t.nodeName!=="SUMMARY"?e.hasAttribute("open"):!0)}function Rf(e,t){return e.nodeName!=="#comment"&&ck(e)&&dk(e,t)&&(!e.parentElement||Rf(e.parentElement,e))}const bl=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[contenteditable]"],pk=bl.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";bl.push('[tabindex]:not([tabindex="-1"]):not([disabled])');const uk=bl.join(':not([hidden]):not([tabindex="-1"]),');function Of(e,t){return!e||!t?!1:t.some(n=>n.contains(e))}function Lf(e,t,n){let r=t!=null&&t.tabbable?uk:pk,o=Tt(e).createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode(a){var l;return!(t==null||(l=t.from)===null||l===void 0)&&l.contains(a)?NodeFilter.FILTER_REJECT:a.matches(r)&&Rf(a)&&(!n||Of(a,n))&&(!(t!=null&&t.accept)||t.accept(a))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return t!=null&&t.from&&(o.currentNode=t.from),o}class vl{get size(){return this.fastMap.size}getTreeNode(t){return this.fastMap.get(t)}addTreeNode(t,n,r){let o=this.fastMap.get(n??null);if(!o)return;let a=new Jd({scopeRef:t});o.addChild(a),a.parent=o,this.fastMap.set(t,a),r&&(a.nodeToRestore=r)}addNode(t){this.fastMap.set(t.scopeRef,t)}removeTreeNode(t){if(t===null)return;let n=this.fastMap.get(t);if(!n)return;let r=n.parent;for(let a of this.traverse())a!==n&&n.nodeToRestore&&a.nodeToRestore&&n.scopeRef&&n.scopeRef.current&&Of(a.nodeToRestore,n.scopeRef.current)&&(a.nodeToRestore=n.nodeToRestore);let o=n.children;r&&(r.removeChild(n),o.size>0&&o.forEach(a=>r&&r.addChild(a))),this.fastMap.delete(n.scopeRef)}*traverse(t=this.root){if(t.scopeRef!=null&&(yield t),t.children.size>0)for(let n of t.children)yield*this.traverse(n)}clone(){var t;let n=new vl;var r;for(let o of this.traverse())n.addTreeNode(o.scopeRef,(r=(t=o.parent)===null||t===void 0?void 0:t.scopeRef)!==null&&r!==void 0?r:null,o.nodeToRestore);return n}constructor(){this.fastMap=new Map,this.root=new Jd({scopeRef:null}),this.fastMap.set(null,this.root)}}class Jd{addChild(t){this.children.add(t),t.parent=this}removeChild(t){this.children.delete(t),t.parent=void 0}constructor(t){this.children=new Set,this.contain=!1,this.scopeRef=t.scopeRef}}new vl;function mk(e,t){let n=t==null?void 0:t.isDisabled,[r,o]=_.useState(!1);return ps(()=>{if(e!=null&&e.current&&!n){let a=()=>{if(e.current){let c=Lf(e.current,{tabbable:!0});o(!!c.nextNode())}};a();let l=new MutationObserver(a);return l.observe(e.current,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["tabIndex","disabled"]}),()=>{l.disconnect()}}}),n?!1:r}const fk=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),hk=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function Sk(e){if(Intl.Locale){let n=new Intl.Locale(e).maximize(),r=typeof n.getTextInfo=="function"?n.getTextInfo():n.textInfo;if(r)return r.direction==="rtl";if(n.script)return fk.has(n.script)}let t=e.split("-")[0];return hk.has(t)}const gk=Symbol.for("react-aria.i18n.locale");function Pf(){let e=typeof window<"u"&&window[gk]||typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:Sk(e)?"rtl":"ltr"}}let ja=Pf(),$r=new Set;function Zd(){ja=Pf();for(let e of $r)e(ja)}function bk(){let e=mf(),[t,n]=_.useState(ja);return _.useEffect(()=>($r.size===0&&window.addEventListener("languagechange",Zd),$r.add(n),()=>{$r.delete(n),$r.size===0&&window.removeEventListener("languagechange",Zd)}),[]),e?{locale:"en-US",direction:"ltr"}:t}const vk=_.createContext(null);function Bf(){let e=bk();return _.useContext(vk)||e}function yk(e){let{selectionManager:t,keyboardDelegate:n,ref:r,autoFocus:o=!1,shouldFocusWrap:a=!1,disallowEmptySelection:l=!1,disallowSelectAll:c=!1,selectOnFocus:p=t.selectionBehavior==="replace",disallowTypeAhead:f=!1,shouldUseVirtualFocus:m,allowsTabNavigation:u=!1,isVirtualized:h,scrollRef:g=r,linkBehavior:v="action"}=e,{direction:w}=Bf(),T=hl(),E=O=>{if(O.altKey&&O.key==="Tab"&&O.preventDefault(),!r.current.contains(O.target))return;const W=(P,Y)=>{if(P!=null){if(t.isLink(P)&&v==="selection"&&p&&!Ha(O)){Qs.flushSync(()=>{t.setFocusedKey(P,Y)});let se=g.current.querySelector(`[data-key="${CSS.escape(P.toString())}"]`),re=t.getItemProps(P);T.open(se,O,re.href,re.routerOptions);return}if(t.setFocusedKey(P,Y),t.isLink(P)&&v==="override")return;O.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(P):p&&!Ha(O)&&t.replaceSelection(P)}};switch(O.key){case"ArrowDown":if(n.getKeyBelow){var z,M;O.preventDefault();let P=t.focusedKey!=null?n.getKeyBelow(t.focusedKey):(z=n.getFirstKey)===null||z===void 0?void 0:z.call(n);P==null&&a&&(P=(M=n.getFirstKey)===null||M===void 0?void 0:M.call(n,t.focusedKey)),W(P)}break;case"ArrowUp":if(n.getKeyAbove){var U,G;O.preventDefault();let P=t.focusedKey!=null?n.getKeyAbove(t.focusedKey):(U=n.getLastKey)===null||U===void 0?void 0:U.call(n);P==null&&a&&(P=(G=n.getLastKey)===null||G===void 0?void 0:G.call(n,t.focusedKey)),W(P)}break;case"ArrowLeft":if(n.getKeyLeftOf){var j,A;O.preventDefault();let P=n.getKeyLeftOf(t.focusedKey);P==null&&a&&(P=w==="rtl"?(j=n.getFirstKey)===null||j===void 0?void 0:j.call(n,t.focusedKey):(A=n.getLastKey)===null||A===void 0?void 0:A.call(n,t.focusedKey)),W(P,w==="rtl"?"first":"last")}break;case"ArrowRight":if(n.getKeyRightOf){var ee,le;O.preventDefault();let P=n.getKeyRightOf(t.focusedKey);P==null&&a&&(P=w==="rtl"?(ee=n.getLastKey)===null||ee===void 0?void 0:ee.call(n,t.focusedKey):(le=n.getFirstKey)===null||le===void 0?void 0:le.call(n,t.focusedKey)),W(P,w==="rtl"?"last":"first")}break;case"Home":if(n.getFirstKey){O.preventDefault();let P=n.getFirstKey(t.focusedKey,mr(O));t.setFocusedKey(P),mr(O)&&O.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(P):p&&t.replaceSelection(P)}break;case"End":if(n.getLastKey){O.preventDefault();let P=n.getLastKey(t.focusedKey,mr(O));t.setFocusedKey(P),mr(O)&&O.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(P):p&&t.replaceSelection(P)}break;case"PageDown":if(n.getKeyPageBelow){O.preventDefault();let P=n.getKeyPageBelow(t.focusedKey);W(P)}break;case"PageUp":if(n.getKeyPageAbove){O.preventDefault();let P=n.getKeyPageAbove(t.focusedKey);W(P)}break;case"a":mr(O)&&t.selectionMode==="multiple"&&c!==!0&&(O.preventDefault(),t.selectAll());break;case"Escape":!l&&t.selectedKeys.size!==0&&(O.stopPropagation(),O.preventDefault(),t.clearSelection());break;case"Tab":if(!u){if(O.shiftKey)r.current.focus();else{let P=Lf(r.current,{tabbable:!0}),Y,se;do se=P.lastChild(),se&&(Y=se);while(se);Y&&!Y.contains(document.activeElement)&&dn(Y)}break}}},D=_.useRef({top:0,left:0});Wx(g,"scroll",h?null:()=>{D.current={top:g.current.scrollTop,left:g.current.scrollLeft}});let k=O=>{if(t.isFocused){O.currentTarget.contains(O.target)||t.setFocused(!1);return}if(O.currentTarget.contains(O.target)){if(t.setFocused(!0),t.focusedKey==null){let M=G=>{G!=null&&(t.setFocusedKey(G),p&&t.replaceSelection(G))},U=O.relatedTarget;var W,z;U&&O.currentTarget.compareDocumentPosition(U)&Node.DOCUMENT_POSITION_FOLLOWING?M((W=t.lastSelectedKey)!==null&&W!==void 0?W:n.getLastKey()):M((z=t.firstSelectedKey)!==null&&z!==void 0?z:n.getFirstKey())}else h||(g.current.scrollTop=D.current.top,g.current.scrollLeft=D.current.left);if(!h&&t.focusedKey!=null){let M=g.current.querySelector(`[data-key="${CSS.escape(t.focusedKey.toString())}"]`);M&&(M.contains(document.activeElement)||dn(M),Ya()==="keyboard"&&Wd(M,{containingElement:r.current}))}}},I=O=>{O.currentTarget.contains(O.relatedTarget)||t.setFocused(!1)};const x=_.useRef(o);_.useEffect(()=>{if(x.current){let O=null;o==="first"&&(O=n.getFirstKey()),o==="last"&&(O=n.getLastKey());let W=t.selectedKeys;if(W.size){for(let z of W)if(t.canSelectItem(z)){O=z;break}}t.setFocused(!0),t.setFocusedKey(O),O==null&&!m&&Ua(r.current)}},[]);let F=_.useRef(t.focusedKey);_.useEffect(()=>{let O=Ya();if(t.isFocused&&t.focusedKey!=null&&(g!=null&&g.current)){let W=g.current.querySelector(`[data-key="${CSS.escape(t.focusedKey.toString())}"]`);W&&(O==="keyboard"||x.current)&&(h||Ef(g.current,W),O!=="virtual"&&Wd(W,{containingElement:r.current}))}t.isFocused&&t.focusedKey==null&&F.current!=null&&Ua(r.current),F.current=t.focusedKey,x.current=!1},[h,g,t.focusedKey,t.isFocused,r]);let L={onKeyDown:E,onFocus:k,onBlur:I,onMouseDown(O){g.current===O.target&&O.preventDefault()}},{typeSelectProps:C}=Ux({keyboardDelegate:n,selectionManager:t});f||(L=kn(C,L));let R;return m||(R=t.focusedKey==null?0:-1),{collectionProps:{...L,tabIndex:R}}}function Tk(e){let{selectionManager:t,key:n,ref:r,shouldSelectOnPressUp:o,shouldUseVirtualFocus:a,focus:l,isDisabled:c,onAction:p,allowsDifferentPressOrigin:f,linkBehavior:m="action"}=e,u=hl(),h=A=>{if(A.pointerType==="keyboard"&&Ha(A))t.toggleSelection(n);else{if(t.selectionMode==="none")return;if(t.isLink(n)){if(m==="selection"){let ee=t.getItemProps(n);u.open(r.current,A,ee.href,ee.routerOptions),t.setSelectedKeys(t.selectedKeys);return}else if(m==="override"||m==="none")return}t.selectionMode==="single"?t.isSelected(n)&&!t.disallowEmptySelection?t.toggleSelection(n):t.replaceSelection(n):A&&A.shiftKey?t.extendSelection(n):t.selectionBehavior==="toggle"||A&&(mr(A)||A.pointerType==="touch"||A.pointerType==="virtual")?t.toggleSelection(n):t.replaceSelection(n)}};_.useEffect(()=>{n===t.focusedKey&&t.isFocused&&!a&&(l?l():document.activeElement!==r.current&&Ua(r.current))},[r,n,t.focusedKey,t.childFocusStrategy,t.isFocused,a]),c=c||t.isDisabled(n);let g={};!a&&!c?g={tabIndex:n===t.focusedKey?0:-1,onFocus(A){A.target===r.current&&t.setFocusedKey(n)}}:c&&(g.onMouseDown=A=>{A.preventDefault()});let v=t.isLink(n)&&m==="override",w=t.isLink(n)&&m!=="selection"&&m!=="none",T=!c&&t.canSelectItem(n)&&!v,E=(p||w)&&!c,D=E&&(t.selectionBehavior==="replace"?!T:!T||t.isEmpty),k=E&&T&&t.selectionBehavior==="replace",I=D||k,x=_.useRef(null),F=I&&T,L=_.useRef(!1),C=_.useRef(!1),R=A=>{if(p&&p(),w){let ee=t.getItemProps(n);u.open(r.current,A,ee.href,ee.routerOptions)}},O={};o?(O.onPressStart=A=>{x.current=A.pointerType,L.current=F,A.pointerType==="keyboard"&&(!I||Qd())&&h(A)},f?(O.onPressUp=D?null:A=>{A.pointerType!=="keyboard"&&T&&h(A)},O.onPress=D?R:null):O.onPress=A=>{if(D||k&&A.pointerType!=="mouse"){if(A.pointerType==="keyboard"&&!Xd())return;R(A)}else A.pointerType!=="keyboard"&&T&&h(A)}):(O.onPressStart=A=>{x.current=A.pointerType,L.current=F,C.current=D,T&&(A.pointerType==="mouse"&&!D||A.pointerType==="keyboard"&&(!E||Qd()))&&h(A)},O.onPress=A=>{(A.pointerType==="touch"||A.pointerType==="pen"||A.pointerType==="virtual"||A.pointerType==="keyboard"&&I&&Xd()||A.pointerType==="mouse"&&C.current)&&(I?R(A):T&&h(A))}),g["data-key"]=n,O.preventFocusOnPress=a;let{pressProps:W,isPressed:z}=Nf(O),M=k?A=>{x.current==="mouse"&&(A.stopPropagation(),A.preventDefault(),R(A))}:void 0,{longPressProps:U}=lk({isDisabled:!F,onLongPress(A){A.pointerType==="touch"&&(h(A),t.setSelectionBehavior("toggle"))}}),G=A=>{x.current==="touch"&&L.current&&A.preventDefault()},j=t.isLink(n)?A=>{zn.isOpening||A.preventDefault()}:void 0;return{itemProps:kn(g,T||D?W:{},F?U:{},{onDoubleClick:M,onDragStartCapture:G,onClick:j}),isPressed:z,isSelected:t.isSelected(n),isFocused:t.isFocused&&t.focusedKey===n,isDisabled:c,allowsSelection:T,hasAction:I}}function Xd(){let e=window.event;return(e==null?void 0:e.key)==="Enter"}function Qd(){let e=window.event;return(e==null?void 0:e.key)===" "||(e==null?void 0:e.code)==="Space"}function Ek(e,t,n){let{key:r,isDisabled:o,shouldSelectOnPressUp:a}=e,{selectionManager:l,selectedKey:c}=t,p=r===c,f=o||t.isDisabled||t.selectionManager.isDisabled(r),{itemProps:m,isPressed:u}=Tk({selectionManager:l,key:r,ref:n,isDisabled:f,shouldSelectOnPressUp:a,linkBehavior:"selection"}),h=qs(t,r,"tab"),g=qs(t,r,"tabpanel"),{tabIndex:v}=m,w=t.collection.getItem(r),T=Dx(w==null?void 0:w.props,{labelable:!0});delete T.id;let E=Ax(w==null?void 0:w.props);return{tabProps:kn(T,E,m,{id:h,"aria-selected":p,"aria-disabled":f||void 0,"aria-controls":p?g:void 0,tabIndex:f?void 0:v,role:"tab"}),isSelected:p,isDisabled:f,isPressed:u}}function wk(e,t,n){let r=mk(n)?void 0:0;var o;const a=qs(t,(o=e.id)!==null&&o!==void 0?o:t==null?void 0:t.selectedKey,"tabpanel"),l=Tf({...e,id:a,"aria-labelledby":qs(t,t==null?void 0:t.selectedKey,"tab")});return{tabPanelProps:kn(l,{tabIndex:r,role:"tabpanel","aria-describedby":e["aria-describedby"],"aria-details":e["aria-details"]})}}class Ck{getKeyLeftOf(t){return this.flipDirection?this.getNextKey(t):this.getPreviousKey(t)}getKeyRightOf(t){return this.flipDirection?this.getPreviousKey(t):this.getNextKey(t)}getKeyAbove(t){return this.getPreviousKey(t)}getKeyBelow(t){return this.getNextKey(t)}isDisabled(t){var n,r;return this.disabledKeys.has(t)||!!(!((r=this.collection.getItem(t))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.isDisabled)}getFirstKey(){let t=this.collection.getFirstKey();return t!=null&&this.isDisabled(t)&&(t=this.getNextKey(t)),t}getLastKey(){let t=this.collection.getLastKey();return t!=null&&this.isDisabled(t)&&(t=this.getPreviousKey(t)),t}getNextKey(t){do t=this.collection.getKeyAfter(t),t==null&&(t=this.collection.getFirstKey());while(this.isDisabled(t));return t}getPreviousKey(t){do t=this.collection.getKeyBefore(t),t==null&&(t=this.collection.getLastKey());while(this.isDisabled(t));return t}constructor(t,n,r,o=new Set){this.collection=t,this.flipDirection=n==="rtl"&&r==="horizontal",this.disabledKeys=o}}function Dk(e,t,n){let{orientation:r="horizontal",keyboardActivation:o="automatic"}=e,{collection:a,selectionManager:l,disabledKeys:c}=t,{direction:p}=Bf(),f=_.useMemo(()=>new Ck(a,p,r,c),[a,c,r,p]),{collectionProps:m}=yk({ref:n,selectionManager:l,keyboardDelegate:f,selectOnFocus:o==="automatic",disallowEmptySelection:!0,scrollRef:n,linkBehavior:"selection"}),u=ff();pf.set(t,u);let h=Tf({...e,id:u});return{tabListProps:{...kn(m,h),role:"tablist","aria-orientation":r,tabIndex:void 0}}}function Af({item:e,state:t}){const{key:n}=e,r=s.useRef(null),{tabProps:o}=Ek({key:n},t,r),a=t.selectedKey===n,l=t.disabledKeys.has(n);return s.createElement("div",{...o,ref:r,className:H("sps-nav__item","sps-nav__link",a&&"active",l&&"sps-nav__item--disabled")},e.rendered)}function Ff({state:e,...t}){const n=s.useRef(null),{tabPanelProps:r}=wk(t,e,n);return s.createElement("div",{...r,ref:n,className:"sps-card__body"},e.selectedItem?e.selectedItem.props.children:null)}class ep{*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(t){let n=this.keyMap.get(t);return n?n.prevKey:null}getKeyAfter(t){let n=this.keyMap.get(t);return n?n.nextKey:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(t){return this.keyMap.get(t)}at(t){const n=[...this.getKeys()];return this.getItem(n[t])}getChildren(t){let n=this.keyMap.get(t);return(n==null?void 0:n.childNodes)||[]}constructor(t){this.keyMap=new Map,this.iterable=t;let n=a=>{if(this.keyMap.set(a.key,a),a.childNodes&&a.type==="section")for(let l of a.childNodes)n(l)};for(let a of t)n(a);let r,o=0;for(let[a,l]of this.keyMap)r?(r.nextKey=a,l.prevKey=r.key):(this.firstKey=a,l.prevKey=void 0),l.type==="item"&&(l.index=o++),r=l,r.nextKey=void 0;this.lastKey=r==null?void 0:r.key}}class Ht extends Set{constructor(t,n,r){super(t),t instanceof Ht?(this.anchorKey=n||t.anchorKey,this.currentKey=r||t.currentKey):(this.anchorKey=n,this.currentKey=r)}}function Nk(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function xk(e){let{selectionMode:t="none",disallowEmptySelection:n,allowDuplicateSelectionEvents:r,selectionBehavior:o="toggle",disabledBehavior:a="all"}=e,l=_.useRef(!1),[,c]=_.useState(!1),p=_.useRef(null),f=_.useRef(null),[,m]=_.useState(null),u=_.useMemo(()=>tp(e.selectedKeys),[e.selectedKeys]),h=_.useMemo(()=>tp(e.defaultSelectedKeys,new Ht),[e.defaultSelectedKeys]),[g,v]=wf(u,h,e.onSelectionChange),w=_.useMemo(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),[T,E]=_.useState(o);o==="replace"&&T==="toggle"&&typeof g=="object"&&g.size===0&&E("replace");let D=_.useRef(o);return _.useEffect(()=>{o!==D.current&&(E(o),D.current=o)},[o]),{selectionMode:t,disallowEmptySelection:n,selectionBehavior:T,setSelectionBehavior:E,get isFocused(){return l.current},setFocused(k){l.current=k,c(k)},get focusedKey(){return p.current},get childFocusStrategy(){return f.current},setFocusedKey(k,I="first"){p.current=k,f.current=I,m(k)},selectedKeys:g,setSelectedKeys(k){(r||!Nk(k,g))&&v(k)},disabledKeys:w,disabledBehavior:a}}function tp(e,t){return e?e==="all"?"all":new Ht(e):t}class kk{get selectionMode(){return this.state.selectionMode}get disallowEmptySelection(){return this.state.disallowEmptySelection}get selectionBehavior(){return this.state.selectionBehavior}setSelectionBehavior(t){this.state.setSelectionBehavior(t)}get isFocused(){return this.state.isFocused}setFocused(t){this.state.setFocused(t)}get focusedKey(){return this.state.focusedKey}get childFocusStrategy(){return this.state.childFocusStrategy}setFocusedKey(t,n){(t==null||this.collection.getItem(t))&&this.state.setFocusedKey(t,n)}get selectedKeys(){return this.state.selectedKeys==="all"?new Set(this.getSelectAllKeys()):this.state.selectedKeys}get rawSelection(){return this.state.selectedKeys}isSelected(t){return this.state.selectionMode==="none"?!1:(t=this.getKey(t),this.state.selectedKeys==="all"?this.canSelectItem(t):this.state.selectedKeys.has(t))}get isEmpty(){return this.state.selectedKeys!=="all"&&this.state.selectedKeys.size===0}get isSelectAll(){if(this.isEmpty)return!1;if(this.state.selectedKeys==="all")return!0;if(this._isSelectAll!=null)return this._isSelectAll;let t=this.getSelectAllKeys(),n=this.state.selectedKeys;return this._isSelectAll=t.every(r=>n.has(r)),this._isSelectAll}get firstSelectedKey(){let t=null;for(let n of this.state.selectedKeys){let r=this.collection.getItem(n);(!t||r&&dr.compareNodeOrder(this.collection,r,t)<0)&&(t=r)}return t==null?void 0:t.key}get lastSelectedKey(){let t=null;for(let n of this.state.selectedKeys){let r=this.collection.getItem(n);(!t||r&&dr.compareNodeOrder(this.collection,r,t)>0)&&(t=r)}return t==null?void 0:t.key}get disabledKeys(){return this.state.disabledKeys}get disabledBehavior(){return this.state.disabledBehavior}extendSelection(t){if(this.selectionMode==="none")return;if(this.selectionMode==="single"){this.replaceSelection(t);return}t=this.getKey(t);let n;if(this.state.selectedKeys==="all")n=new Ht([t],t,t);else{let r=this.state.selectedKeys,o=r.anchorKey||t;n=new Ht(r,o,t);for(let a of this.getKeyRange(o,r.currentKey||t))n.delete(a);for(let a of this.getKeyRange(t,o))this.canSelectItem(a)&&n.add(a)}this.state.setSelectedKeys(n)}getKeyRange(t,n){let r=this.collection.getItem(t),o=this.collection.getItem(n);return r&&o?dr.compareNodeOrder(this.collection,r,o)<=0?this.getKeyRangeInternal(t,n):this.getKeyRangeInternal(n,t):[]}getKeyRangeInternal(t,n){let r=[],o=t;for(;o;){let a=this.collection.getItem(o);if((a&&a.type==="item"||a.type==="cell"&&this.allowsCellSelection)&&r.push(o),o===n)return r;o=this.collection.getKeyAfter(o)}return[]}getKey(t){let n=this.collection.getItem(t);if(!n||n.type==="cell"&&this.allowsCellSelection)return t;for(;n.type!=="item"&&n.parentKey!=null;)n=this.collection.getItem(n.parentKey);return!n||n.type!=="item"?null:n.key}toggleSelection(t){if(this.selectionMode==="none")return;if(this.selectionMode==="single"&&!this.isSelected(t)){this.replaceSelection(t);return}if(t=this.getKey(t),t==null)return;let n=new Ht(this.state.selectedKeys==="all"?this.getSelectAllKeys():this.state.selectedKeys);n.has(t)?n.delete(t):this.canSelectItem(t)&&(n.add(t),n.anchorKey=t,n.currentKey=t),!(this.disallowEmptySelection&&n.size===0)&&this.state.setSelectedKeys(n)}replaceSelection(t){if(this.selectionMode==="none"||(t=this.getKey(t),t==null))return;let n=this.canSelectItem(t)?new Ht([t],t,t):new Ht;this.state.setSelectedKeys(n)}setSelectedKeys(t){if(this.selectionMode==="none")return;let n=new Ht;for(let r of t)if(r=this.getKey(r),r!=null&&(n.add(r),this.selectionMode==="single"))break;this.state.setSelectedKeys(n)}getSelectAllKeys(){let t=[],n=r=>{for(;r;){if(this.canSelectItem(r)){let o=this.collection.getItem(r);o.type==="item"&&t.push(r),o.hasChildNodes&&(this.allowsCellSelection||o.type!=="item")&&n(dr.getFirstItem(dr.getChildNodes(o,this.collection)).key)}r=this.collection.getKeyAfter(r)}};return n(this.collection.getFirstKey()),t}selectAll(){!this.isSelectAll&&this.selectionMode==="multiple"&&this.state.setSelectedKeys("all")}clearSelection(){!this.disallowEmptySelection&&(this.state.selectedKeys==="all"||this.state.selectedKeys.size>0)&&this.state.setSelectedKeys(new Ht)}toggleSelectAll(){this.isSelectAll?this.clearSelection():this.selectAll()}select(t,n){this.selectionMode!=="none"&&(this.selectionMode==="single"?this.isSelected(t)&&!this.disallowEmptySelection?this.toggleSelection(t):this.replaceSelection(t):this.selectionBehavior==="toggle"||n&&(n.pointerType==="touch"||n.pointerType==="virtual")?this.toggleSelection(t):this.replaceSelection(t))}isSelectionEqual(t){if(t===this.state.selectedKeys)return!0;let n=this.selectedKeys;if(t.size!==n.size)return!1;for(let r of t)if(!n.has(r))return!1;for(let r of n)if(!t.has(r))return!1;return!0}canSelectItem(t){var n;if(this.state.selectionMode==="none"||this.state.disabledKeys.has(t))return!1;let r=this.collection.getItem(t);return!(!r||!(r==null||(n=r.props)===null||n===void 0)&&n.isDisabled||r.type==="cell"&&!this.allowsCellSelection)}isDisabled(t){var n,r;return this.state.disabledBehavior==="all"&&(this.state.disabledKeys.has(t)||!!(!((r=this.collection.getItem(t))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.isDisabled))}isLink(t){var n,r;return!!(!((r=this.collection.getItem(t))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.href)}getItemProps(t){var n;return(n=this.collection.getItem(t))===null||n===void 0?void 0:n.props}constructor(t,n,r){this.collection=t,this.state=n;var o;this.allowsCellSelection=(o=r==null?void 0:r.allowsCellSelection)!==null&&o!==void 0?o:!1,this._isSelectAll=null}}function Ik(e){let{filter:t}=e,n=xk(e),r=_.useMemo(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),o=_.useCallback(f=>t?new ep(t(f)):new ep(f),[t]),a=_.useMemo(()=>({suppressTextValueWarning:e.suppressTextValueWarning}),[e.suppressTextValueWarning]),l=dr.useCollection(e,o,a),c=_.useMemo(()=>new kk(l,n),[l,n]);const p=_.useRef(null);return _.useEffect(()=>{if(n.focusedKey!=null&&!l.getItem(n.focusedKey)){const f=p.current.getItem(n.focusedKey),m=[...p.current.getKeys()].map(w=>{const T=p.current.getItem(w);return T.type==="item"?T:null}).filter(w=>w!==null),u=[...l.getKeys()].map(w=>{const T=l.getItem(w);return T.type==="item"?T:null}).filter(w=>w!==null),h=m.length-u.length;let g=Math.min(h>1?Math.max(f.index-h+1,0):f.index,u.length-1),v;for(;g>=0;){if(!c.isDisabled(u[g].key)){v=u[g];break}g<u.length-1?g++:(g>f.index&&(g=f.index),g--)}n.setFocusedKey(v?v.key:null)}p.current=l},[l,c,n,n.focusedKey]),{collection:l,disabledKeys:r,selectionManager:c}}function Mk(e){var t;let[n,r]=wf(e.selectedKey,(t=e.defaultSelectedKey)!==null&&t!==void 0?t:null,e.onSelectionChange),o=_.useMemo(()=>n!=null?[n]:[],[n]),{collection:a,disabledKeys:l,selectionManager:c}=Ik({...e,selectionMode:"single",disallowEmptySelection:!0,allowDuplicateSelectionEvents:!0,selectedKeys:o,onSelectionChange:f=>{var m;let u=(m=f.values().next().value)!==null&&m!==void 0?m:null;u===n&&e.onSelectionChange&&e.onSelectionChange(u),r(u)}}),p=n!=null?a.getItem(n):null;return{collection:a,disabledKeys:l,selectionManager:c,selectedKey:n,setSelectedKey:r,selectedItem:p}}function _k(e){var t;let n=Mk({...e,suppressTextValueWarning:!0,defaultSelectedKey:(t=e.defaultSelectedKey)!==null&&t!==void 0?t:np(e.collection,e.disabledKeys?new Set(e.disabledKeys):new Set)}),{selectionManager:r,collection:o,selectedKey:a}=n,l=_.useRef(a);return _.useEffect(()=>{let c=a;(r.isEmpty||!o.getItem(c))&&(c=np(o,n.disabledKeys),c!=null&&r.setSelectedKeys([c])),(c!=null&&r.focusedKey==null||!r.isFocused&&c!==l.current)&&r.setFocusedKey(c),l.current=c}),{...n,isDisabled:e.isDisabled||!1}}function np(e,t){let n=null;if(e){for(n=e.getFirstKey();t.has(n)&&n!==e.getLastKey();)n=e.getKeyAfter(n);t.has(n)&&n===e.getLastKey()&&(n=e.getFirstKey())}return n}const Rk={},Ok={};function yl(e){const t=_k(e),n=s.useRef(null),{tabListProps:r}=Dk(e,t,n);return s.createElement(s.Fragment,null,s.createElement("div",{...r,ref:n,className:"sps-nav sps-nav--tabs sps-tabs-v2"},[...t.collection].map(o=>s.createElement(Af,{key:o.key,item:o,state:t}))),s.createElement(Ff,{key:t.selectedItem?t.selectedItem.key:null,state:t}))}Object.assign(yl,{props:Rk,propTypes:Ok,displayName:"SpsTabsV2"});const Lk={};function Tl({children:e,className:t,...n}){return s.createElement("div",{className:H("sps-card__footer",t),...n},e)}Object.assign(Tl,{props:Lk,displayName:"SpsCardV2Footer"});const Pk={};function El({children:e,className:t,...n}){return s.createElement("div",{className:H("sps-card__header",t),...n},e)}Object.assign(El,{props:Pk,displayName:"SpsCardV2Header"});const Bk={};function Vf({children:e,className:t,...n}){const[r,o,a,l,c]=Pt(e,[{type:El},{type:yl},{type:Zb.Tabs},{type:Tl}]),p=o.length>0?o:a;return s.createElement("div",{className:H("sps-card",t),...n},r,p.length>0?p:s.createElement("div",{className:"sps-card__body"},c),l)}Object.assign(Vf,{props:Bk,displayName:"SpsCardV2"});const Ak={};function $f({children:e,className:t,...n}){return s.createElement("div",{className:H("sps-card__title",t),...n},e)}Object.assign($f,{props:Ak,displayName:"SpsCardV2Title"});const Fk={...zu,controlsDisabled:"boolean",footerLinks:"ReactNodeOrRenderFn",formMeta:"SpsFormSetMeta<any>",isOpen:"boolean",onClear:"() => void",onSubmit:"React.FormEventHandler"};function Kf(e){const{children:t,className:n,controlsDisabled:r,footerLinks:o,formArray:a,formGroup:l,formMeta:c,isOpen:p,onClear:f,onSubmit:m,unsafelyReplaceClassName:u,...h}=e,{t:g}=s.useContext(Ke);function v(){f&&f()}const w=H(u||"sps-advanced-search",p&&"sps-advanced-search--open",n);return s.createElement("div",{className:w,...h},s.createElement(ds,{onSubmit:m,formArray:a,formGroup:l,formMeta:c},s.createElement("div",{className:"sps-advanced-search__form"},t),s.createElement("div",{className:"sps-advanced-search__footer"},o&&s.createElement("div",{id:"footer_links"},wt(o)),s.createElement("div",{className:"sps-advanced-search__footer-controls"},s.createElement(ze,{kind:K.ButtonKind.DEFAULT,type:K.ButtonType.BUTTON,className:"mr-2",onClick:v,disabled:r},g("design-system:advancedSearch.clear")),s.createElement(ze,{kind:K.ButtonKind.KEY,type:K.ButtonType.SUBMIT,disabled:r},g("design-system:advancedSearch.search"))))))}Object.assign(Kf,{props:Fk,displayName:"SpsAdvancedSearch"});const Vk={general:{label:"General Usage",description:({NavigateTo:e,Link:t})=>s.createElement(s.Fragment,null,s.createElement("p",null,'Advanced Search is comprised of a panel of input fields, and a text button that exposes and hides the panel. By default, the Advanced Search panel is hidden (with the exception of "Advanced Search Only" scenarios).'),s.createElement("p",null,"Advanced Search works in conjunction with the"," ",s.createElement(e,{to:"list-toolbar"},"List Bar")," and"," ",s.createElement(e,{to:"search-results-bar"},"Search Results")," components. Refer to those pages for additional details."),s.createElement("p",null,"Use the following guidelines when including Advanced Search on your page:",s.createElement("ul",null,s.createElement("li",null,"The Advanced Search Panel can contain any number of input fields."),s.createElement("li",null,"The Advanced Search Panel can place input fields in any unique layout to best serve the needs of the search criteria, but must adhere to the rules of the"," ",s.createElement(t,{to:"/style-and-layout/grid/"},"SPS Grid")," and guidelines for"," ",s.createElement(e,{to:"form"},"Form Layouts"),"."))))},basic:{label:"Basic Usage",description:({NavigateTo:e})=>s.createElement(s.Fragment,null,s.createElement("p",null,"A Basic Advanced Search consists of the List Bar with a search input and an Advanced Search text button. For more details on additional button and component options in the List Bar reference the ",s.createElement(e,{to:"list-toolbar"},"List Bar")," page.")),examples:{basic:{react:y.code`
|
|
8910
8910
|
import {
|
|
8911
8911
|
SpsListToolbar,
|
|
8912
8912
|
SpsListToolbarSearch,
|
|
@@ -9137,7 +9137,7 @@ ${t.join("").replace("]","\\]").replace(" ","\\s")}]+`);return e.split(n).filter
|
|
|
9137
9137
|
</SpsAdvancedSearch>
|
|
9138
9138
|
</>;
|
|
9139
9139
|
}
|
|
9140
|
-
`}}}}
|
|
9140
|
+
`}}}},$k=function({viewing:e,in:t,onChange:n}){return s.createElement("div",{className:"sps-context-bar"},"Viewing",s.createElement("span",{className:"sps-context-bar__emphasized"},e),!!t&&s.createElement(s.Fragment,null,"in",s.createElement("span",{className:"sps-context-bar__emphasized"},t)),!!n&&s.createElement(ze,{className:"sps-context-bar__change-button",kind:K.ButtonKind.LINK,onClick:n},"Change"))},Kk={disabled:"boolean",formMeta:"SpsFormFieldMeta<number>",name:"string",onChange:"ChangeEventHandler<number>",value:"number"};function Hk(e){return e?Number.parseInt(e.replace(/[^\d]/g,""),10)/100:null}function Wk(e){return typeof e=="number"?e.toFixed(2):""}function Hf({className:e,disabled:t=!1,formMeta:n,id:r,name:o,onChange:a,ref:l,title:c,value:p,...f}){const{wrapperId:m,controlId:u}=vt(r,n),h=s.useRef(null);function g(D){n&&(n.setValue(D),n.markAsDirty()),a&&a(D)}function v(){g(null)}function w(D){g(Hk(D.target.value))}function T(D){D.currentTarget.setSelectionRange(D.currentTarget.value.length,D.currentTarget.value.length)}const E=H("sps-text-input",e);return s.createElement(at,{id:m,className:E,formMeta:n,inputRef:h,ref:l},s.createElement("div",{className:H("sps-form-control",t&&"disabled")},s.createElement(Yt,{className:"sps-text-input__icon",icon:K.SpsIcon.DOLLAR_SIGN}),s.createElement("input",{type:"text",ref:h,onFocus:T,className:"sps-text-input__input",id:u,name:o,placeholder:"0.00",onChange:w,title:c,value:Wk(p),disabled:t,...f}),p!==null&&!t&&s.createElement("i",{className:"sps-icon sps-icon-x-circle sps-form-control__clear-btn",onClick:v})))}Object.assign(Hf,{props:Kk,displayName:"SpsCurrencyInput"});const Gk={basic:{label:"Basic",examples:{basic:{react:y.code`
|
|
9141
9141
|
import {
|
|
9142
9142
|
useSpsForm,
|
|
9143
9143
|
SpsCurrencyInput,
|
|
@@ -9183,7 +9183,7 @@ ${t.join("").replace("]","\\]").replace(" ","\\s")}]+`);return e.split(n).filter
|
|
|
9183
9183
|
</>
|
|
9184
9184
|
)
|
|
9185
9185
|
}
|
|
9186
|
-
`}}}},
|
|
9186
|
+
`}}}},Yk={kind:"FeedbackBlockKind"};function Wf(e){const{children:t,className:n,kind:r=K.FeedbackBlockKind.TIP,"data-testid":o,unsafelyReplaceClassName:a,...l}=e,c=H(a||"sps-feedback-block",`sps-feedback-block--${r}`,n);return s.createElement("div",{className:c,role:"alert","data-testid":o,...l},s.createElement("i",{className:H("sps-icon",`sps-icon-${K.FeedbackBlockIcons[r]}`),"aria-hidden":"true"}),s.createElement("span",{className:"sps-feedback-block__content","data-testid":`${o}__text`},t))}Object.assign(Wf,{props:Yk,displayName:"SpsFeedbackBlock"});const Uk={standard:{label:"Standard Size",description:"Use Standard Size Feedback Blocks for the majority of cases. If a smaller or more subtle solution is needed, use the Micro Size Feedback Block.",examples:{error:{description:"Error",imports:y.code`
|
|
9187
9187
|
import { SpsFeedbackBlock } from "@spscommerce/ds-react";
|
|
9188
9188
|
import { FeedbackBlockKind } from "@spscommerce/ds-shared";
|
|
9189
9189
|
`,jsx:y.code`
|
|
@@ -9258,7 +9258,7 @@ ${t.join("").replace("]","\\]").replace(" ","\\s")}]+`);return e.split(n).filter
|
|
|
9258
9258
|
kind={FeedbackBlockKind.WARNING}
|
|
9259
9259
|
message="This order is missing a shipment date."
|
|
9260
9260
|
/>
|
|
9261
|
-
`}}}},
|
|
9261
|
+
`}}}},jk={};function wl(e){const{children:t,className:n,unsafelyReplaceClassName:r,...o}=e,a=H(r||"sps-list-action-bar-container","z-stratum-bar",n);return s.createElement("div",{className:a,...o},s.createElement("div",{className:"sps-list-action-bar"},s.createElement("div",{className:"sps-list-action-bar__actions"},t)))}Object.assign(wl,{props:jk,displayName:"SpsFocusedTaskActions"});const zk={fullWidth:"boolean",isOpen:"boolean",onClose:"() => void"};function Cl(e){const{children:t,className:n,fullWidth:r,isOpen:o,onClose:a,title:l,"data-testid":c,unsafelyReplaceClassName:p,...f}=e,m=s.useRef(null),{t:u}=s.useContext(Ke);s.useEffect(()=>{document.body.style.overflow=o?"hidden":""},[o]),s.useEffect(()=>()=>{document.body.style.overflow=""},[]);const h=H(p||"sps-focused-task","z-stratum-dialog",r&&"sps-focused-task--full-width",o&&"sps-focused-task--open",n),[g,v]=Pt(t,[{type:wl}]);return s.createElement("div",{className:h,ref:m,"data-testid":c,...f},s.createElement("div",{className:"sps-focused-task__title"},s.createElement(ze,{className:"sps-focused-task__close-btn",kind:K.ButtonKind.ICON,icon:K.SpsIcon.X,onClick:a,title:u("design-system:focusedTask.close")})),s.createElement("div",{className:"sps-focused-task__body"},s.createElement(Lt.Provider,{value:{parentElementRef:m}},o&&v)),g)}Object.assign(Cl,{props:zk,displayName:"SpsFocusedTask"});const qk={basic:{examples:{basic:{react:y.code`
|
|
9262
9262
|
import {
|
|
9263
9263
|
SpsButton,
|
|
9264
9264
|
SpsFocusedTask,
|
|
@@ -9342,7 +9342,7 @@ ${t.join("").replace("]","\\]").replace(" ","\\s")}]+`);return e.split(n).filter
|
|
|
9342
9342
|
</>
|
|
9343
9343
|
);
|
|
9344
9344
|
}
|
|
9345
|
-
`}}}},
|
|
9345
|
+
`}}}},Jk={imgSrc:"string",kind:"GrowlerKind",onClose:"() => void",persist:"boolean",title:"string"};function Dl(e){const{children:t,className:n,imgSrc:r,kind:o=K.GrowlerKind.INFO,onClose:a,persist:l,title:c,unsafelyReplaceClassName:p,...f}=e,m=s.useRef(a);s.useEffect(()=>{m.current=a},[a]);const{t:u}=s.useContext(Ke),[h,g]=s.useState(!0),[v,w]=s.useState(!1);function T(){return[window.setTimeout(()=>w(!0),K.GROWLER_VISIBLE_DURATION_MS),window.setTimeout(()=>{g(!1),m.current&&m.current()},K.GROWLER_VISIBLE_DURATION_MS+K.GROWLER_FADEOUT_DURATION_MS)]}const E=s.useRef([]);function D(){l||(E.current=T())}function k(){for(const R of E.current)window.clearTimeout(R);E.current=[]}function I(){k(),g(!0),w(!1)}function x(){I(),w(!1),g(!1),a&&a()}const F=o===K.GrowlerKind.PROGRESS?"sps-spinner":H("sps-icon",`sps-icon-${K.GrowlerIcon.get(o)}`),L=H(p||"sps-growler",h&&"show",v&&"fade",`sps-growler--${o}`,n);return s.useEffect(()=>(D(),()=>{k()}),[]),Er("sps-growler-display-area",["sps-growler-area","z-stratum-growlers"])(s.createElement("div",{role:"alert",className:L,onMouseEnter:I,onMouseLeave:D,...f},s.createElement("div",{className:"sps-growler__icon-box"},r&&s.createElement("img",{src:r,alt:""}),!r&&s.createElement("i",{className:F,"aria-hidden":"true"})),s.createElement("div",{className:"sps-growler__message-box"},s.createElement("div",{className:"sps-growler__message-box-text"},c&&s.createElement("span",{className:"sps-growler__message-box-title d-block"},c),s.createElement("div",{className:"sps-growler__message-box-subtitle"},t)),s.createElement("button",{type:"button",className:"sps-growler__close-button","aria-hidden":"true",onClick:x},s.createElement("i",{className:"sps-icon sps-icon-x",title:u("design-system:growler.dismiss")})))))}Object.assign(Dl,{props:Jk,displayName:"SpsGrowler"});function Zk(){const[e,t]=s.useState([]),n=s.useCallback(()=>e.map(o=>s.createElement(Dl,{id:o.id,key:o.id,title:o.title,kind:o.kind,imgSrc:o.imgSrc,persist:o.persist,onClose:()=>{o.onClose&&o.onClose(),o.closed=!0,e.every(a=>a.closed)&&t([])}},wt(o.content))),[e]),r=s.useCallback(o=>{t(a=>[...a,{...o,kind:o.kind||K.GrowlerKind.INFO,id:o.id||gt()}])},[]);return[n,r]}const Xk={writingGuidelines:{label:"Writing Guidelines",customSection:()=>s.createElement(s.Fragment,null,s.createElement("p",null,"Use the following guidelines to write an effective Growler message."),s.createElement("ul",null,s.createElement("li",null,"Write all messages in sentence case.",s.createElement("ul",null,s.createElement("li",null,"Capitalize the first word of the message."),s.createElement("li",null,"Add punctuation, such as a period, at the end of the message."))),s.createElement("li",null,"Keep messages as succinct as possible while also providing sufficient information to the customer."),s.createElement("li",null,"If you can clearly convey your message in a single statement, use only the Primary Message."),s.createElement("li",null,"If the message requires additional details, such as further information or instructions, use both the Primary and Secondary Messages.")),s.createElement("p",null,"For more examples of effective feedback message writing, refer to"," ",s.createElement("a",{href:"https://atlassian.design/content/messaging-guidelines",target:"_blank",rel:"noreferrer"},"Atlassian's Messaging Guidelines"),"."))},error:{label:"Error",description:()=>s.createElement(s.Fragment,null,s.createElement("p",null,"Acceptable message: Document ABC123 has not been sent. Check the form and try sending it again."),s.createElement("p",null,`Unacceptable message: Can't send your document."`)),examples:{primary:{description:"Primary Message Only",react:y.code`
|
|
9346
9346
|
import { SpsButton, SpsGrowler } from "@spscommerce/ds-react";
|
|
9347
9347
|
import { ButtonKind, GrowlerKind } from "@spscommerce/ds-shared";
|
|
9348
9348
|
|
|
@@ -9630,7 +9630,7 @@ ${t.join("").replace("]","\\]").replace(" ","\\s")}]+`);return e.split(n).filter
|
|
|
9630
9630
|
</>
|
|
9631
9631
|
);
|
|
9632
9632
|
}
|
|
9633
|
-
`}}}};function
|
|
9633
|
+
`}}}};function Qk(e){const{children:t}=e;return s.createElement("div",{className:"insight-tile-wrapper"},t)}const eI={horizontal:"boolean",icon:"SpsIcon",kind:"SpsInsightTileKind",title:"string",metric:"number | string",partnerCount:"number",totalPartners:"number"};function Gf(e){const{children:t,className:n,horizontal:r=!1,icon:o,kind:a="general",title:l,metric:c,partnerCount:p,totalPartners:f,unsafelyReplaceClassName:m,...u}=e,h=H(m||"sps-insight-tile",`sps-insight-tile--${a}`,n,r&&"sps-insight-tile--horizontal",t&&"sps-insight-tile--has-detail"),{t:g}=s.useContext(Ke),[v,w,T]=(p?g("design-system:insightTile.partnerCount",{count:p,total:f}):"").split("|");return s.createElement(s.Fragment,null,s.createElement("div",{className:h,...u},s.createElement("div",{className:"sps-insight-tile__body"},o?s.createElement("i",{className:`sps-icon sps-icon-${o}`}):s.createElement("i",{className:`sps-icon sps-icon-${K.SpsInsightTileIcons[a]}`}),c&&s.createElement("div",{className:"sps-insight-tile__metric-count"},c),l&&s.createElement("div",{className:"sps-insight-tile__description"},s.createElement("div",{className:"sps-insight-tile__title",style:{"-webkit-box-orient":"vertical"}},l),s.createElement("div",{className:"sps-insight-tile__detail"},t))),p&&s.createElement("div",{className:"sps-insight-tile__partner-count"},p===f?s.createElement("div",null,g("design-system:insightTile.all")):s.createElement(s.Fragment,null,s.createElement("div",null,v),s.createElement("div",null,w),s.createElement("div",null,T)),s.createElement("div",{className:"sps-insight-tile__partners-text"},g("design-system:insightTile.partners")))))}Object.assign(Gf,{props:eI,displayName:"SpsInsightTile"});const tI={inline:"boolean"};function Yf(e){const{children:t,className:n,inline:r,"data-testid":o,unsafelyReplaceClassName:a,...l}=e,c=H(a||"sps-key-value-list",r&&"sps-key-value-list--inline",n);return s.createElement("div",{className:c,"data-testid":`${o}`,...l},t)}Object.assign(Yf,{props:tI,displayName:"SpsKeyValueList"});const nI={itemKey:{type:"string | nodeOrRenderFn",required:!0},titleColor:"KeyValueListTitleColor"};function Uf(e){const{children:t,className:n,itemKey:r,titleColor:o=K.KeyValueListTitleColor.LIGHT,"data-testid":a,unsafelyReplaceClassName:l,...c}=e,p=H(l||"sps-key-value-list__item",`sps-key-value-list__item--${o}`,n);return s.createElement("div",{className:p,"data-testid":`${a}`,...c},s.createElement("span",{className:"sps-key-value-list__key","data-testid":`${a}__key`},r),s.createElement("span",{className:"sps-key-value-list__value","data-testid":`${a}__value`},t))}Object.assign(Uf,{props:nI,displayName:"SpsKeyValueListItem"});const rI={color:"TagKind",href:"String",icon:"SpsIcon",tagKey:{type:"String",required:!0},value:{type:"String",required:!0}};function jf(e){const{color:t=K.TagKind.KEY,className:n,"data-testid":r,href:o,icon:a,tagKey:l,value:c,unsafelyReplaceClassName:p,...f}=e,m=H(p||"sps-key-value-tag",o&&"sps-key-value-tag--link",n);return s.createElement("span",{className:m,"data-testid":`${r}__key-value-tag`,...f},s.createElement(Gt,{icon:a,kind:t,className:"sps-key-value-tag--key"},l),s.createElement(Gt,{className:`sps-key-value-tag--value ${t}`},o&&s.createElement("a",{href:o},c),!o&&c))}Object.assign(jf,{props:rI,displayName:"SpsKeyValueTag"});const sI={basic:{label:"Basic",examples:{basic:{react:y.code`
|
|
9634
9634
|
import { SpsKeyValueTag } from "@spscommerce/ds-react";
|
|
9635
9635
|
function Component() {
|
|
9636
9636
|
return (
|
|
@@ -9659,7 +9659,7 @@ ${t.join("").replace("]","\\]").replace(" ","\\s")}]+`);return e.split(n).filter
|
|
|
9659
9659
|
</>
|
|
9660
9660
|
)
|
|
9661
9661
|
}
|
|
9662
|
-
`}}}};function
|
|
9662
|
+
`}}}};function zf(e){const{tabs:t,activeTab:n,onTabChange:r,className:o,unsafelyReplaceClassName:a,"data-testid":l,...c}=e,[p,f]=s.useState();s.useEffect(()=>{if(t.length)if(n){const h=t.find(g=>g.label===n.label);f(h)}else f(t[0])},[]);const m=(h,g)=>{h.preventDefault(),f(g),typeof r=="function"&&r(g)},u=H(a||"sps-tabs",o);return s.createElement("div",{className:u},s.createElement("nav",{className:"sps-nav sps-nav--tabs","data-testid":l,...c},t.map(h=>s.createElement("a",{key:h.label,id:h.id,className:H("sps-nav__item","sps-nav__link",h===p&&"active"),role:"tab","data-toggle":"tab",href:h.controlsId?`#${h.controlsId}`:void 0,"aria-controls":h.controlsId,"aria-selected":h===n,onClick:g=>{m(g,h)},"data-testid":`${l}__tab-link`},h.icon&&s.createElement("i",{className:`sps-icon sps-icon-${h.icon}`}),s.createElement("span",null,h.label),h.tag&&s.createElement("span",{className:"sps-tag sps-tag--key"},h.tag)))))}Object.assign(zf,{displayName:"SpsTabs"});const oI={resultsCount:"number",totalResults:"number",onClear:"() => void"};function qf(e){const{children:t,className:n,resultsCount:r,totalResults:o,onClear:a,"data-testid":l,unsafelyReplaceClassName:c,...p}=e,{t:f}=s.useContext(Ke),m=H(c||"sps-search-results-bar",n),[u,h,g]=f("design-system:searchResultsBar.count",{count:r,total:o}).split(" ");return s.createElement("div",{className:m,"data-testid":`${l}`,...p},s.createElement("span",{className:"sps-search-results-bar__label","data-testid":`${l}__label`},f("design-system:searchResultsBar.matchingResults")),u&&!Number.isNaN(Number(u))&&s.createElement("span",{className:"sps-search-results-bar__count","data-testid":`${l}__count`},s.createElement("i",{className:"sps-icon sps-icon-double-angle-right"}),s.createElement("span",null,u)),g&&!Number.isNaN(Number(g))&&s.createElement("span",{className:"sps-search-results-bar__total","data-testid":`${l}__total`},h," ",g),s.createElement("div",{className:"sps-search-results-bar__buttons","data-testid":`${l}__button`},s.createElement("button",{type:"button",onClick:a},f("design-system:searchResultsBar.clear"))))}Object.assign(qf,{props:oI,displayName:"SpsSearchResultsBar"});const aI={results:"number || null",selections:"{ [key: string]: string[] }",zeroStateText:"string",onClear:"() => void"};function Nl(e){const{className:t,results:n,selections:r,zeroStateText:o,onClear:a,"data-testid":l,unsafelyReplaceClassName:c,...p}=e,{t:f}=s.useContext(Ke),m=H(c||"sps-search-results-bar-v2",t),u=r?Object.keys(r).reduce((h,g)=>(r[g].length>0&&(h[g]=r[g]),h),{}):{};return s.createElement("div",{className:m,"data-testid":`${l}`,...p},n!=null&&s.createElement("div",{className:"sps-search-results-bar-v2__results"},s.createElement("span",{"data-testid":`${l}__label`},f("design-system:searchResultsBar.results")),s.createElement(Gt,{kind:K.TagKind.INFO},s.createElement("span",null,n))),s.createElement("div",{className:"sps-search-results-bar-v2__selections"},Object.keys(u).length>0?Object.keys(u).map((h,g)=>s.createElement(s.Fragment,null,s.createElement("span",{key:g,className:"sps-search-results-bar-v2__selection"},h,":"),u[h].map((v,w)=>s.createElement(Gt,{key:w,kind:K.TagKind.KEY},s.createElement("span",null,v))))):s.createElement("span",{className:"font-italic"},o||f("design-system:searchResultsBar.noAdvancedSearchSelections"))),s.createElement("div",{className:"sps-search-results-bar-v2__buttons","data-testid":`${l}__button`},s.createElement(ze,{kind:K.ButtonKind.LINK,onClick:a},f("design-system:searchResultsBar.clearResults"))))}Object.assign(Nl,{props:aI,displayName:"SpsSearchResultsBarV2"});const iI={basic:{label:"Basic",description:({NavigateTo:e})=>s.createElement(s.Fragment,null,s.createElement("p",null,"SpsSearchResultsBarV2 should be used with List Toolbar and Advanced Search."),s.createElement("p",null,"For more examples go to the Advanced Search section on the"," ",s.createElement(e,{to:"list-toolbar"},"List Toolbar")," page.")),examples:{basic:{react:y.code`
|
|
9663
9663
|
import {
|
|
9664
9664
|
useSpsForm,
|
|
9665
9665
|
SpsListToolbar,
|
|
@@ -9877,7 +9877,7 @@ ${t.join("").replace("]","\\]").replace(" ","\\s")}]+`);return e.split(n).filter
|
|
|
9877
9877
|
</>
|
|
9878
9878
|
)
|
|
9879
9879
|
}
|
|
9880
|
-
`}}}},
|
|
9880
|
+
`}}}},lI={onSubmit:"FormEventHandler"};function xl(e){const{children:t,onSubmit:n}=e;function r(o){o.preventDefault(),n&&n(o)}return s.createElement("form",{onSubmit:r,className:"sps-list-toolbar__search-form",noValidate:!0},s.createElement(yr,{className:"sps-list-toolbar__search-field"},t))}Object.assign(xl,{props:lI,displayName:"SpsListToolbarSearch"});const cI={};function kl(e){const{children:t}=e;return s.createElement("div",null,t)}Object.assign(kl,{props:cI,displayName:"SpsListToolbarSearchInfo"});const dI={activeTab:"SpsTab",advancedSearch:"{ isOpen: boolean, enteredFields: number }",onToggleAdvancedSearch:"(boolean) => void",onTabChange:"(SpsTab) => void",title:"string",tabs:"Array<SpsTab>",onToolbarPinned:"(boolean) => void",selectable:"boolean",isSelected:"boolean",isIndeterminate:"boolean",onSelectionChange:"(boolean) => void",pinResultsBar:"boolean",pinToolbar:"boolean"};function Jf(e){const{activeTab:t,advancedSearch:n,children:r,className:o,onToggleAdvancedSearch:a,onTabChange:l,tabs:c,title:p,unsafelyReplaceClassName:f,onToolbarPinned:m,selectable:u,isSelected:h,isIndeterminate:g,onSelectionChange:v,pinResultsBar:w,pinToolbar:T=!0,"data-testid":E,...D}=e,{t:k}=s.useContext(Ke);let I=null;const[x,F]=s.useState(!1),L=s.useRef(null),C=s.useRef(null),R=y.lockToAnimationFrames(()=>{if(L.current&&T){const le=L.current.getBoundingClientRect();le&&le.height>0&&le.top<=60&&(typeof I=="number"?window.scrollY<I&&(I=null,F(!1)):(I=window.scrollY,F(!0),a&&a(!1)))}});s.useEffect(()=>(window.addEventListener("scroll",R),()=>{window.removeEventListener("scroll",R)}),[]);const O=s.useRef();s.useLayoutEffect(()=>{if(C.current&&L.current&&T){if(x&&O.current)C.current.style.height=O.current.height,C.current.style.width=O.current.width,C.current.style.marginBottom=O.current.marginBottom;else if(!x){C.current.style.height="",C.current.style.width="",C.current.style.marginBottom="";const le=window.getComputedStyle(L.current);O.current={height:le.height,width:le.width,marginBottom:le.marginBottom}}}},[x]);function W(le){l&&l(le)}function z(){a&&a(!(n!=null&&n.isOpen))}function M(le){m&&m(le)}s.useEffect(()=>{M(x)},[x]);const U=H(f||"sps-list-toolbar",x&&T&&"sps-list-toolbar--pinned",x&&T&&"z-stratum-toolbar",n&&n.isOpen&&"sps-list-toolbar--advanced-search-open",o),[G,j,A,ee]=Pt(r,[{type:xl},{type:kl},{type:Nl}]);return s.createElement("div",{className:"sps-list-toolbar__wrapper",ref:C},s.createElement("div",{className:U,"data-testid":E,ref:L,...D},s.createElement("div",{className:"sps-list-toolbar__content"},!!u&&s.createElement("div",{className:"sps-list-toolbar__selection-controls"},s.createElement(Jn,{checked:h,indeterminate:g,onChange:()=>{v==null||v(!h)}})),c&&s.createElement(zf,{tabs:c,onTabChange:W,activeTab:t,"data-testid":`${E}__tabs`}),s.createElement("div",{className:"sps-list-toolbar__search-controls"},!p&&G,!p&&j,G.length>0&&n&&s.createElement("div",{className:"sps-list-toolbar__advanced-search-toggle","data-testid":`${E}__advanced-search`},s.createElement("div",{className:"sps-list-toolbar__advanced-search-toggle-button-wrapper"},s.createElement(ze,{kind:K.ButtonKind.LINK,onClick:z},k("design-system:listToolbar.advancedSearchToggle"))),(n.enteredFields||0)>0&&s.createElement(Gt,{"data-testid":`${E}__entered_fields`,kind:K.TagKind.INFO},s.createElement("span",null,n.enteredFields))),p&&s.createElement("div",{"data-testid":`${E}-title`,className:"sps-list-toolbar__advanced-search-title"},p)),x?s.createElement("div",{className:"sps-list-toolbar__header-content"},s.createElement(Lt.Provider,{value:{fixed:!0}},ee)):s.createElement("div",{className:"sps-list-toolbar__header-content"},ee)),s.createElement("div",null,(!x||x&&w)&&A)))}Object.assign(Jf,{props:dI,displayName:"SpsListToolbar"});const pI={options:"SortOption[]",activeOption:"SortOption",onSortChange:"(option: SortOption) => void",defaultOption:"SortOption"};function Zf(e){const{options:t,onSortChange:n,defaultOption:r,activeOption:o,className:a,unsafelyReplaceClassName:l}=e,c=(t||[]).map(f=>[{label:f.label,icon:f.icon},()=>{n&&n(f)}]),p=H(l||"sps-list-toolbar-sort-by",a);return s.createElement(Xn,{className:p,icon:(o==null?void 0:o.icon)||(r==null?void 0:r.icon),label:(o==null?void 0:o.label)||(r==null?void 0:r.label),options:c})}Object.assign(Zf,{props:pI,displayName:"SpsListToolbarSortBy"});function Xf(){const[e,t]=s.useState(!1);function n(){t(!1)}function r(){t(!0)}return s.createElement(s.Fragment,null,s.createElement("p",null,"The List Bar is divided into a number of different sections. It spans the entire width of the corresponding list."),s.createElement(ze,{kind:K.ButtonKind.LINK,onClick:r},"View Content Order Example"),s.createElement(Cl,{isOpen:e,onClose:n},s.createElement("h1",null,"Content Order"),s.createElement("img",{src:"assets/images/list-toolbar-example.svg",alt:"A List Toolbar with labels on each section",className:"w-100 mb-3"}),s.createElement(Qn,null,s.createElement(Nn,null,s.createElement(tt,{style:{width:"80px"}},"Order"),s.createElement(tt,null,"Section"),s.createElement(tt,null,"Notes")),s.createElement(xn,null,s.createElement(Ue,null,s.createElement(ce,null,s.createElement("span",{className:"sps-tag sps-tag--info"},"1")),s.createElement(ce,null,"Checkbox"),s.createElement(ce,null,"For Content Rows and Content Tiles only.")),s.createElement(Ue,null,s.createElement(ce,null,s.createElement("span",{className:"sps-tag sps-tag--info"},"2")),s.createElement(ce,null,"Search/Filter Box"),s.createElement(ce,null)),s.createElement(Ue,null,s.createElement(ce,null,s.createElement("span",{className:"sps-tag sps-tag--info"},"3")),s.createElement(ce,null,"Saved Search"),s.createElement(ce,null)),s.createElement(Ue,null,s.createElement(ce,null,s.createElement("span",{className:"sps-tag sps-tag--info"},"4")),s.createElement(ce,null,"Advanced Search"),s.createElement(ce,null,"For more information, visit the Advanced Search page.")),s.createElement(Ue,null,s.createElement(ce,null,s.createElement("span",{className:"sps-tag sps-tag--info"},"5")),s.createElement(ce,null,"Column Editor"),s.createElement(ce,{wrap:500},"Use for Tables only. For more information, visit the Column Editor page.")),s.createElement(Ue,null,s.createElement(ce,null,s.createElement("span",{className:"sps-tag sps-tag--info"},"6")),s.createElement(ce,null,"List View Selector"),s.createElement(ce,null)),s.createElement(Ue,null,s.createElement(ce,null,s.createElement("span",{className:"sps-tag sps-tag--info"},"7")),s.createElement(ce,null,"Sorting"),s.createElement(ce,null)),s.createElement(Ue,null,s.createElement(ce,null,s.createElement("span",{className:"sps-tag sps-tag--info"},"8")),s.createElement(ce,null,"Buttons"),s.createElement(ce,{wrap:500},"Buttons always appear in the rightmost section of the List Toolbar. For the ordering of Buttons, refer to the Button Groups section on the Buttons page."))))))}const uI={general:{label:"General Usage",description:()=>s.createElement(s.Fragment,null,s.createElement("h5",null,"Use a List Toolbar:"),s.createElement("ul",null,s.createElement("li",null,"When list content needs to be searched, filtered, sorted, or otherwise interacted with.")),s.createElement("h5",null,"Avoid a List Toolbar:"),s.createElement("ul",null,s.createElement("li",null,"When no list is present."),s.createElement("li",null,"When there will always be a small number of elements in the list, or the list does not require searching, filtering, or other actions.")))},contentOrder:{label:"Content Order",description:s.createElement(Xf,null)},checkbox:{label:"Checkbox",description:({NavigateTo:e})=>s.createElement("p",null,"Use a Checkbox in the List Toolbar when items in a"," ",s.createElement(e,{to:"Content rows"},"Content Row")," or"," ",s.createElement(e,{to:"Content tiles"},"Content Tile")," are selectable. The Checkbox selects all items in the list, and will cause the Action Bar to appear. Do not use this with a Table, as Tables have a built-in checkbox in the header row."),examples:{checkbox:{react:y.code`
|
|
9881
9881
|
import {
|
|
9882
9882
|
SpsListToolbar,
|
|
9883
9883
|
SpsListToolbarSearch,
|
|
@@ -10568,7 +10568,7 @@ ${t.join("").replace("]","\\]").replace(" ","\\s")}]+`);return e.split(n).filter
|
|
|
10568
10568
|
</SpsListToolbar>
|
|
10569
10569
|
)
|
|
10570
10570
|
}
|
|
10571
|
-
`}}}};var
|
|
10571
|
+
`}}}};var Qf=(e=>(e.Ok="Ok",e.Cancel="Cancel",e))(Qf||{});const mI=()=>{const[e,t]=_.useState([]),n=f=>{const m=[...e],u={...f};return u.key=gt(),new Promise(g=>{m.push({component:u,resolve:g}),t(m)})},r=f=>{const m=[...e],u=m.pop();u==null||u.resolve(f),t(m)},[o,a]=_.useState(!1),[l,c]=_.useState();_.useEffect(()=>{o&&(r(l),a(!1))},[o]);const p=f=>{a(!0),c(f)};return[e.map(f=>f.component),n,p]};function fI(e,t){const n={...K.SPS_ACTION_DEFAULTS,...e},[r,o]=Jt(n);return Object.assign(t,r),[t,a=>{o(a),Object.assign(t,r)}]}const hI={};function eh(e){const{children:t,className:n,"data-testid":r,unsafelyReplaceClassName:o,...a}=e;let l;const c=[];s.Children.forEach(t,f=>{s.isValidElement(f)&&f.type==="i"?l=f:c.push(f)});const p=H(o||"sps-page-title",n);return s.createElement("div",{className:p,"data-testid":`${r}`,...a},l,s.createElement("div",{className:"sps-page-title__text","data-testid":`${r}__text`},c))}Object.assign(eh,{props:hI,displayName:"SpsPageTitle"});const SI={};function th(e){const{children:t,className:n,"data-testid":r,unsafelyReplaceClassName:o,...a}=e,l=H(o||"sps-page-title__subtitle",n);return s.createElement("div",{className:l,"data-testid":r,...a},t)}Object.assign(th,{props:SI,displayName:"SpsPageSubtitle"});const gI={basic:{label:"Basic",examples:{basic:{imports:y.code`
|
|
10572
10572
|
import { SpsPageTitle } from "@spscommerce/ds-react";
|
|
10573
10573
|
`,jsx:y.code`
|
|
10574
10574
|
<SpsPageTitle>
|
|
@@ -10602,7 +10602,7 @@ ${t.join("").replace("]","\\]").replace(" ","\\s")}]+`);return e.split(n).filter
|
|
|
10602
10602
|
MacNeil Automotive Parts
|
|
10603
10603
|
</SpsPageSubtitle>
|
|
10604
10604
|
</SpsPageTitle>
|
|
10605
|
-
`}}}},
|
|
10605
|
+
`}}}},bI={active:"boolean",as:"React.ElementType"};function Il(e){const{active:t,as:n="a",children:r,className:o,unsafelyReplaceClassName:a,...l}=e,c=H(a||"sps-nav__item","sps-nav__link",t&&"active");return s.createElement(n,{className:c,...l},r)}Object.assign(Il,{props:bI,displayName:"SpsProductBarTab"});const vI={activeTab:"string",fullWidth:"boolean",onTabChange:"(newTab: string) => void",onProductNameClick:"React.MouseEventHandler",productLogoSrc:"string",productName:"string",productNameHref:"string",tabs:"Array<string>"};function nh(e){const{activeTab:t,children:n,className:r,fullWidth:o,onProductNameClick:a,onTabChange:l,productLogoSrc:c,productName:p,productNameHref:f,tabs:m=[],unsafelyReplaceClassName:u,...h}=e,g=s.useRef(null),[v,w]=Pt(n,[{type:Il}]),[T,E]=s.useState(t||m[0]);s.useEffect(()=>{E(t||m[0])},[t]);function D(I){E(I),l&&l(I)}const k=H(u||"sps-navbar-container","z-stratum-bar",r);return s.createElement("div",{className:k,...h,ref:g},s.createElement("nav",{className:H("sps-navbar","sps-navbar--expand-lg",o&&"sps-navbar--full-width")},p||c?s.createElement(s.Fragment,null,s.createElement("a",{className:"sps-navbar__brand",href:f,onClick:a},c&&s.createElement("img",{className:"sps-navbar__brand-logo",src:c,"aria-hidden":"true",alt:`${p} Logo`}),p&&s.createElement("span",{className:"sps-navbar__brand-name"},p)),s.createElement("span",{className:"sps-vertical-rule"})):null,s.createElement("div",{className:"sps-navbar__nav"},m.map(I=>s.createElement("a",{className:H("sps-nav__item","sps-nav__link",I===T&&"active"),key:I,onClick:()=>D(I)},s.createElement("span",null,I),I===T&&s.createElement("span",{className:"sr-only"},"(current)"))),v),s.createElement("div",{className:"sps-navbar__content"},s.createElement(Lt.Provider,{value:{parentElementRef:g,fixed:!0}},w))))}Object.assign(nh,{props:vI,displayName:"SpsProductBar"});const yI={basic:{label:"Basic",description:y.code`
|
|
10606
10606
|
<p>Product navigation bar</p>
|
|
10607
10607
|
`,examples:{basic:{react:y.code`
|
|
10608
10608
|
import { SpsProductBar, SpsButton } from "@spscommerce/ds-react";
|
|
@@ -10707,7 +10707,7 @@ ${t.join("").replace("]","\\]").replace(" ","\\s")}]+`);return e.split(n).filter
|
|
|
10707
10707
|
</SpsProductBar>
|
|
10708
10708
|
)
|
|
10709
10709
|
}
|
|
10710
|
-
`}}}},
|
|
10710
|
+
`}}}},TI={percentComplete:"number",title:"string",detail:"string",disabled:"boolean",onClose:"() => void"};function rh(e){const{children:t,className:n,detail:r,disabled:o,onClose:a,percentComplete:l=0,title:c,"data-testid":p,unsafelyReplaceClassName:f,...m}=e,{t:u}=s.useContext(Ke),h=H(f||"sps-progress-bar",l===1&&"sps-progress-bar--complete",o&&"sps-progress-bar--disabled",n);return s.createElement("div",{className:h,...m},s.createElement("div",{className:"sps-progress-bar__content"},c&&s.createElement("div",{className:"sps-progress-bar__heading"},s.createElement("div",{className:"sps-progress-bar__title"},c),s.createElement("div",{className:"sps-progress-bar__percentage"},`${Math.floor(l*100)}%`)),s.createElement("div",{className:"sps-progress-bar__bar-background"},s.createElement("div",{className:"sps-progress-bar__bar-progress",style:{width:`${l*100}%`}})),r&&s.createElement("div",{className:"sps-progress-bar__detail"},r)),a&&s.createElement("div",{className:"sps-progress-bar__close-button"},s.createElement(ze,{kind:K.ButtonKind.ICON,icon:K.SpsIcon.X,onClick:a,title:u("design-system:progressBar.closeButtonTitle")})))}Object.assign(rh,{props:TI,displayName:"SpsProgressBar"});const EI={general:{label:"General Usage",customSection:()=>s.createElement(s.Fragment,null,s.createElement("h4",null,"General Usage"),s.createElement("p",null,"Progress Bars can be used in a variety of situations, but the most common use case is to show the live progress of a process such as a file upload or the processing of a digital payload."),s.createElement("p",null,"For processes that typically complete within minutes or less, opt for the Standard Progress Bar."),s.createElement("p",null,"For processes that are divided into specific steps that are accomplished over a longer period of time, opt for the Stepped Progress Bar."))},standard:{label:"Standard Progress Bar",description:()=>s.createElement(s.Fragment,null,s.createElement("p",null,"Standard Progress Bars are comprised of the following Required and Optional elements."),s.createElement("img",{src:"assets/images/progress-bar-example.svg",alt:"A Progress Bar with labels on each section",className:"w-100 mb-3"}),s.createElement(Qn,null,s.createElement(Nn,null,s.createElement(tt,null,"Section"),s.createElement(tt,null,"Content Type"),s.createElement(tt,null,"Required"),s.createElement(tt,null,"Description/Guidelines")),s.createElement(xn,null,s.createElement(Ue,null,s.createElement(ce,null,s.createElement("span",{className:"sps-tag sps-tag--info"},"1")),s.createElement(ce,null,"Title"),s.createElement(ce,null,"No"),s.createElement(ce,{wrap:400},"Use the Title when it provides necessary or helpful detail about the file or action that is being processed.")),s.createElement(Ue,null,s.createElement(ce,null,s.createElement("span",{className:"sps-tag sps-tag--info"},"2")),s.createElement(ce,null,"Progress Meter"),s.createElement(ce,null,"Yes"),s.createElement(ce,null)),s.createElement(Ue,null,s.createElement(ce,null,s.createElement("span",{className:"sps-tag sps-tag--info"},"3")),s.createElement(ce,null,"Progress Counter"),s.createElement(ce,null,"No"),s.createElement(ce,{wrap:400},"The Progress Counter should not be used without the existence of a Title.")),s.createElement(Ue,null,s.createElement(ce,null,s.createElement("span",{className:"sps-tag sps-tag--info"},"4")),s.createElement(ce,null,"Clear Button"),s.createElement(ce,null,"No"),s.createElement(ce,{wrap:400},"If the process requires the option to be cancelled or removed from a list the clear button can be used.")),s.createElement(Ue,null,s.createElement(ce,null,s.createElement("span",{className:"sps-tag sps-tag--info"},"5")),s.createElement(ce,null,"Progress Details"),s.createElement(ce,null,"No"),s.createElement(ce,{wrap:400},"Progress Details provide more context for the user and are especially useful when the process includes multiple steps."))))),examples:{standard:{label:"Building Standard Progress Bars",description:()=>s.createElement("p",null,"The Standard Progress Bar is designed to expand to fit the entire width of its container. View the diagram above for rules regarding including or excluding certain elements."),react:y.code`
|
|
10711
10711
|
import { SpsCard, SpsProgressBar } from "@spscommerce/ds-react";
|
|
10712
10712
|
function Component() {
|
|
10713
10713
|
function handleClose() {
|
|
@@ -10756,7 +10756,7 @@ ${t.join("").replace("]","\\]").replace(" ","\\s")}]+`);return e.split(n).filter
|
|
|
10756
10756
|
</SpsCard>
|
|
10757
10757
|
)
|
|
10758
10758
|
}
|
|
10759
|
-
`}}}},
|
|
10759
|
+
`}}}},wI={maxHeight:"string"};function sh(e){const{children:t,maxHeight:n}=e;return s.createElement("div",{className:"sps-scrollable-container",style:{maxHeight:n}},t)}Object.assign(sh,{props:wI,displayName:"SpsScrollableContainer"});const CI={channelId:{type:"string",required:!0}};function oh(e){const{channelId:t,className:n,unsafelyReplaceClassName:r,...o}=e,{t:a}=s.useContext(Ke),l=H(r||"sps-slack-link",n);return s.createElement("a",{className:l,target:"_blank",rel:"noreferrer",href:`https://spscommerce.slack.com/archives/${t}`,...o},s.createElement("i",{className:`sps-icon sps-icon-${K.SpsIcon.CONVERSATION}`,"aria-hidden":"true"}),s.createElement("span",null,a("design-system:slackLink.label")))}Object.assign(oh,{props:CI,displayName:"SpsSlackLink"});const DI={basic:{examples:{basic:{react:y.code`
|
|
10760
10760
|
import { SpsProductBar, SpsSlackLink } from "@spscommerce/ds-react";
|
|
10761
10761
|
function DemoComponent() {
|
|
10762
10762
|
return (
|
|
@@ -10769,7 +10769,7 @@ ${t.join("").replace("]","\\]").replace(" ","\\s")}]+`);return e.split(n).filter
|
|
|
10769
10769
|
><SpsSlackLink channelId="CELEGDK4Y" /></SpsProductBar>
|
|
10770
10770
|
);
|
|
10771
10771
|
}
|
|
10772
|
-
`}}}},
|
|
10772
|
+
`}}}},NI={sortKey:"string",sortDisabled:"boolean",sort:"SortedColumn[]",onSortChange:"SortChangeHandler",widthPx:"number",widthRem:"number"};function Ml({className:e,"data-testid":t,unsafelyReplaceClassName:n,sortKey:r,sort:o,sortDisabled:a,onSortChange:l,onClick:c,children:p,widthPx:f,widthRem:m,style:u,...h}){const g=s.useMemo(()=>{const E=!!r&&!a&&Array.isArray(o)&&o.find(D=>D.key===r);return E?E.direction:void 0},[o,r,a]),v=H(n||"sps-sorting-header__cell",g===K.SortDirection.ASCENDING&&"sps-sorting-header__cell--sorted-asc",g===K.SortDirection.DESCENDING&&"sps-sorting-header__cell--sorted-desc",a&&"sps-sorting-header__cell--sort-disabled",e),w=f?f/16:m,T=w?{...u,width:`${w}rem`}:u;return s.createElement("div",{className:v,onClick:E=>{r&&!a&&l&&l([{key:r,direction:g===K.SortDirection.ASCENDING?K.SortDirection.DESCENDING:K.SortDirection.ASCENDING}]),c&&c(E)},"data-testid":t,style:T,...h},p)}Object.assign(Ml,{props:NI,displayName:"SpsSortingHeaderCell"});const xI={sort:"SortedColumn[]",onSortChange:"SortChangeHandler"};function ah({className:e,"data-testid":t,unsafelyReplaceClassName:n,sort:r,onSortChange:o,children:a,...l}){const c=H(n||"sps-sorting-header",e),p={sort:r,onSortChange:o};return s.createElement("div",{className:c,...l},s.Children.map(a,f=>f&&s.isValidElement(f)&&f.type===Ml?s.cloneElement(f,p):f))}Object.assign(ah,{props:xI,displayName:"SpsSortingHeader"});const kI={basic:{label:"Basic Sorting Header",examples:{basic:{react:y.code`
|
|
10773
10773
|
import { SpsSortingHeader, SpsSortingHeaderCell } from "@spscommerce/ds-react";
|
|
10774
10774
|
function DemoComponent() {
|
|
10775
10775
|
const [sort, setSort] = React.useState([{ key: 'id', direction: SortDirection.DESCENDING }]);
|
|
@@ -10817,7 +10817,7 @@ ${t.join("").replace("]","\\]").replace(" ","\\s")}]+`);return e.split(n).filter
|
|
|
10817
10817
|
</>
|
|
10818
10818
|
)
|
|
10819
10819
|
}
|
|
10820
|
-
`}}}},
|
|
10820
|
+
`}}}},II={title:"string",stepsCount:"number",completedStepsCount:"number",disabled:"boolean",showStepsCounter:"boolean",color:"SteppedProgressBarColor",data:"SteppedProgressBarData[]"};function ih(e){const{title:t,stepsCount:n,completedStepsCount:r=0,disabled:o,showStepsCounter:a,className:l,data:c,color:p=K.SteppedProgressBarColor.PURPLE}=e,f=Array.from(Array(n)).map((u,h)=>({id:En().current||void 0,...c==null?void 0:c.find(g=>g.index===h)})),m=H("sps-stepped-progress-bar",`sps-stepped-progress-bar--${p}`,r===n&&"sps-stepped-progress-bar--complete",o&&"sps-stepped-progress-bar--disabled",l);return s.createElement("div",{className:m},s.createElement("div",{className:"sps-stepped-progress-bar__content"},(t||a)&&s.createElement("div",{className:"sps-progress-bar__heading"},t&&s.createElement("div",{className:"sps-progress-bar__title"},t),a&&s.createElement("div",{className:"sps-stepped-progress-bar__percentage"},`${r} of ${n} Complete`)),s.createElement("ul",{className:"sps-stepped-progress-bar__bar-background d-flex align-items-center list-unstyled mb-0"},f.map((u,h)=>s.createElement("li",{id:u.id,key:u.id,className:H("sps-stepped-progress-bar__step",r>h&&!u.skipped&&"sps-stepped-progress-bar__step-complete")},u.icon&&s.createElement(Yt,{icon:u.icon,size:K.SpsIconSize.SMALL,className:H("d-block",(u.index||0)>r-1?"gray400":"white")}),u.title&&u.id&&s.createElement(Rt,{for:u.id,title:u.title},u.description))))))}Object.assign(ih,{props:II,displayName:"SpsSteppedProgressBar"});const MI={standard:{label:"Stepped Progress Bar",description:()=>s.createElement(s.Fragment,null,s.createElement("p",null,"Stepped Progress Bars are comprised of the following Required and Optional elements."),s.createElement("img",{src:"assets/images/stepped-progress-bar-example.svg",alt:"A Progress Bar with labels on each section",className:"w-100 mb-3"}),s.createElement(Qn,null,s.createElement(Nn,null,s.createElement(tt,null,"Section"),s.createElement(tt,null,"Content Type"),s.createElement(tt,null,"Required"),s.createElement(tt,null,"Description/Guidelines")),s.createElement(xn,null,s.createElement(Ue,null,s.createElement(ce,null,s.createElement("span",{className:"sps-tag sps-tag--info"},"1")),s.createElement(ce,null,"Title"),s.createElement(ce,null,"No"),s.createElement(ce,{wrap:400},"Use the Title when it provides necessary or helpful detail about the file or action that is being processed.")),s.createElement(Ue,null,s.createElement(ce,null,s.createElement("span",{className:"sps-tag sps-tag--info"},"2")),s.createElement(ce,null,"Progress Meter"),s.createElement(ce,null,"Yes"),s.createElement(ce,null)),s.createElement(Ue,null,s.createElement(ce,null,s.createElement("span",{className:"sps-tag sps-tag--info"},"3")),s.createElement(ce,null,"Progress Counter"),s.createElement(ce,null,"No"),s.createElement(ce,{wrap:400},"The Progress Counter should not be used without the existence of a Title.")),s.createElement(Ue,null,s.createElement(ce,null,s.createElement("span",{className:"sps-tag sps-tag--info"},"4")),s.createElement(ce,null,"Step icons"),s.createElement(ce,null,"No"),s.createElement(ce,{wrap:400},"Icons can be set inside of steps for visual emphasis.")),s.createElement(Ue,null,s.createElement(ce,null,s.createElement("span",{className:"sps-tag sps-tag--info"},"5")),s.createElement(ce,null,"Step Tooltips"),s.createElement(ce,null,"No"),s.createElement(ce,{wrap:400},"Tooltips can be utilized to provide more details about each specific step. Tooltips can be exposed on click or hover."))))),examples:{standard:{description:()=>s.createElement(s.Fragment,null,s.createElement("h4",null,"Building Stepped Progress Bars"),s.createElement("p",null,"The Stepped Progress Bar is designed to expand to fit the entire width of its container. View the diagram above for rules regarding including or excluding certain elements.")),react:y.code`
|
|
10821
10821
|
import { SpsCard, SpsSteppedProgressBar } from "@spscommerce/ds-react";
|
|
10822
10822
|
function Component() {
|
|
10823
10823
|
const data = [
|
|
@@ -10913,7 +10913,7 @@ ${t.join("").replace("]","\\]").replace(" ","\\s")}]+`);return e.split(n).filter
|
|
|
10913
10913
|
</SpsCard>
|
|
10914
10914
|
)
|
|
10915
10915
|
}
|
|
10916
|
-
`}}}},
|
|
10916
|
+
`}}}},_I={href:"string",icon:{type:"ReactNodeOrRenderFn",required:"true"},error:"boolean",errorIcon:"ReactNodeOrRenderFn",title:{type:"string",required:"true"},warning:"boolean",warningIcon:"ReactNodeOrRenderFn",disabled:"boolean"};function lh(e){const{className:t,href:n,target:r,icon:o,error:a=!1,errorIcon:l,title:c,unsafelyReplaceClassName:p,warning:f=!1,warningIcon:m,disabled:u=!1,...h}=e,g=H(p||"sps-tile",t,a&&"sps-tile--error",f&&"sps-tile--warning",u&&"sps-tile--disabled");return s.useEffect(()=>{if(f&&a)throw new Error("Tile should have warning or error, not both")},[f,a]),s.createElement("div",{className:"sps-tile-container sfg-col-3 sfg-break-col-6"},s.createElement("a",{className:g,href:u?void 0:n,target:r,rel:r==="_blank"?"noopener noreferrer":void 0,...h},(f||a)&&s.createElement("div",{className:"sps-tile--icon"},f&&(m?wt(m):s.createElement("i",{className:H("sps-icon","sps-icon-status-warning")})),a&&(l?wt(l):s.createElement("i",{className:H("sps-icon","sps-icon-ban")}))),s.createElement("div",{className:"sps-tile--content"},s.createElement("div",{className:"sps-tile--image"},typeof o=="string"?s.createElement("img",{className:"sps-tile--image",src:o,alt:""}):wt(o)),s.createElement("div",{className:"sps-tile--title"},s.createElement("p",null,c,r==="_blank"&&s.createElement("i",{className:H("sps-icon","sps-icon-tabs")}))))))}Object.assign(lh,{props:_I,displayName:"SpsTile"});const RI={};function ch(e){const{children:t,unsafelyReplaceClassName:n,"data-testid":r,className:o,...a}=e,l=H(n||"sps-tile-list",o||"sfg-row");return s.createElement("div",{className:l,"data-testid":r,...a},t)}Object.assign(ch,{props:RI,displayName:"SpsTileList"});const OI={basic:{label:"Basic",examples:{basic:{react:y.code`
|
|
10917
10917
|
import { SpsTileList, SpsTile } from "@spscommerce/ds-react";
|
|
10918
10918
|
function Component() {
|
|
10919
10919
|
const apps = [
|
|
@@ -11115,7 +11115,7 @@ ${t.join("").replace("]","\\]").replace(" ","\\s")}]+`);return e.split(n).filter
|
|
|
11115
11115
|
</>
|
|
11116
11116
|
)
|
|
11117
11117
|
}
|
|
11118
|
-
`}}}},
|
|
11118
|
+
`}}}},LI={value:{type:"number",required:"true"},title:{type:"string",required:"true"},kind:"SpsFilterTileKind",active:"boolean"};function dh(e){const{value:t,title:n,kind:r=K.SpsFilterTileKind.GENERAL,active:o,className:a,unsafelyReplaceClassName:l,...c}=e,[p,f]=s.useState(!1),m=o||p,u=H(l||"sps-filter-tile",a,`sps-filter-tile--${r}`,m&&"active");return s.createElement("div",{className:u,...c},s.createElement("div",{className:"sps-filter-tile__body",onMouseOver:()=>f(!0),onMouseOut:()=>f(!1)},s.createElement("div",{className:"sps-filter-tile__body__value"},t),s.createElement("div",{className:"sps-filter-tile__body__title"},n)),s.createElement("div",{className:"sps-filter-tile__footer"}))}Object.assign(dh,{props:LI,displayName:"SpsFilterTile"});const PI={};function ph(e){const{children:t,unsafelyReplaceClassName:n,"data-testid":r,className:o,...a}=e,l=H(n||"sps-filter-tile-list",o);return s.createElement("div",{className:l,...a},t)}Object.assign(ph,{props:PI,displayName:"SpsFilterTileList"});const BI={basic:{label:"Basic",examples:{basic:{react:y.code`
|
|
11119
11119
|
import {
|
|
11120
11120
|
SpsFilterTileList,
|
|
11121
11121
|
SpsFilterTile,
|
|
@@ -11171,7 +11171,7 @@ ${t.join("").replace("]","\\]").replace(" ","\\s")}]+`);return e.split(n).filter
|
|
|
11171
11171
|
</>
|
|
11172
11172
|
)
|
|
11173
11173
|
}
|
|
11174
|
-
`}}}},
|
|
11174
|
+
`}}}},uh={};function _l(e){const{className:t,...n}=e,r=H("sps-vertical-rule",t);return s.createElement("div",{className:r,...n})}Object.assign(_l,{props:uh,displayName:"SpsVerticalRule / SpsVr"});function mh(e){return s.createElement(_l,{...e})}Object.assign(mh,{props:uh,displayName:"SpsDescriptionListTerm / SpsDt"});const AI={illustration:"string",icon:{type:"SpsIcon",deprecated:!0},heading:"ReactNodeOrRenderFn",subHeading:"ReactNodeOrRenderFn"};function fh(e){const{className:t,heading:n,icon:r,illustration:o=rp.BUILDING_SMALL,subHeading:a,"data-testid":l,unsafelyReplaceClassName:c,...p}=e,f=H(c||"sps-zero-state","sps-zero-state--micro",t);return s.createElement("div",{className:f,"data-testid":`${l}__actual-micro-zero-state`,...p},r?s.createElement("i",{className:`sps-zero-state__icon sps-icon sps-icon-${r}`,"aria-hidden":"true","data-testid":`${l}__icon`}):s.createElement("img",{style:{height:"3rem"},src:o}),n&&s.createElement("h1",{className:"sps-zero-state__heading","data-testid":`${l}__heading`},n),a&&s.createElement("h2",{className:"sps-zero-state__subheading","data-testid":`${l}__subheading`},a))}Object.assign(fh,{props:AI,displayName:"SpsMicroZeroState"});const FI={illustration:"string",artwork:{type:"string",deprecated:!0},heading:{type:"string",required:!0},subHeading:"string"};function hh(e){const{artwork:t,children:n,className:r,heading:o,illustration:a,subHeading:l,"data-testid":c,unsafelyReplaceClassName:p,...f}=e,m=a||t||rp.BUILDING_LARGE,u=H(p||"sps-zero-state",r);return s.createElement("div",{className:"sps-card__body","data-testid":`${c}`},s.createElement("div",{className:u,"data-testid":`${c}__actual-zero-state`,...f},s.createElement("img",{className:"sps-zero-state__image",src:m,alt:"","data-testid":`${c}__artwork`}),s.createElement("h1",{className:"sps-zero-state__heading","data-testid":`${c}__heading`},o),s.createElement("h2",{className:"sps-zero-state__subheading","data-testid":`${c}__subheading`},l),s.createElement("div",{className:"sps-zero-state__content","data-testid":`${c}__content`},n)))}Object.assign(hh,{props:FI,displayName:"SpsZeroState"});const VI={sizes:{label:"Sizes",customSection:()=>s.createElement("section",{id:"zero-states-sizes"},s.createElement("div",{className:"flex-color-header"},s.createElement("h4",null,"Sizes"),s.createElement(ze,{onClick:()=>{window.scrollTo({top:0,behavior:"smooth"})},kind:K.ButtonKind.LINK},"Back to Top")),s.createElement("h5",{className:"mb-3"},"There are 2 sizes of Zero States: Large and Small. They differ in appearance and are used in different cases."),s.createElement("h4",null,"Large Zero States"),s.createElement("h5",{className:"mb-3"},"Use Large Zero States in primary or large areas of a page."),s.createElement("h4",null,"Small Zero States"),s.createElement("h5",{className:"mb-0"},"Use Small Zero States in a secondary or small areas of a page."))},regular:{label:"Usage: Large Zero States",description:({NavigateTo:e})=>s.createElement("span",{className:"sps-body-14 mt-4"},"Large Zero States may be accompanied by other components such as Headings, Subtitles, ",s.createElement(e,{to:"Button"},"Buttons"),","," ",s.createElement(e,{to:"List Toolbar"},"Search Bars"),", or a combination of these"),examples:{illustrationAndHeading:{description:"Illustration + Heading",imports:y.code`
|
|
11175
11175
|
import { SpsCard, SpsZeroState } from "@spscommerce/ds-react";
|
|
11176
11176
|
import { Illustrations } from "@sps-woodland/illustrations";
|
|
11177
11177
|
`,jsx:y.code`
|
|
@@ -11285,4 +11285,4 @@ ${t.join("").replace("]","\\]").replace(" ","\\s")}]+`);return e.split(n).filter
|
|
|
11285
11285
|
</SpsCard>
|
|
11286
11286
|
</div>
|
|
11287
11287
|
</div>
|
|
11288
|
-
`}}}};exports.AsTypingErrorKeys=
|
|
11288
|
+
`}}}};exports.AsTypingErrorKeys=Tr;exports.ContentOrderExample=Xf;exports.DEFAULT_DATETIME_PRESETS=tm;exports.DEFAULT_PRESETS=Va;exports.DragDropContext=Fu;exports.Draggable=Uu;exports.Droppable=Ii;exports.FauxChangeEvent=Cn;exports.I18nContext=Ke;exports.MANIFEST=lx;exports.ModalAction=Qf;exports.OnBlurErrorKeys=Nt;exports.OnSubmitErrorKeys=eo;exports.PortalContext=Lt;exports.PreventativeErrorKeys=pn;exports.Provide=Tp;exports.SimpleDateUtils=X;exports.SpsAddRemoveFormRowExamples=QD;exports.SpsAdvancedSearch=Kf;exports.SpsAdvancedSearchExamples=Vk;exports.SpsApp=Hv;exports.SpsAutocomplete=zt;exports.SpsAutocompleteExamples=wp;exports.SpsButton=ze;exports.SpsButtonExamples=ON;exports.SpsButtonGroup=Im;exports.SpsCard=_i;exports.SpsCardTabbedPane=Mi;exports.SpsCardV2=Vf;exports.SpsCardV2Footer=Tl;exports.SpsCardV2Header=El;exports.SpsCardV2Title=$f;exports.SpsCheckbox=Jn;exports.SpsCheckboxDropdown=Vi;exports.SpsCheckboxExamples=Cp;exports.SpsClickableTag=rs;exports.SpsClickableTagExamples=Dp;exports.SpsColumnChooser=Oi;exports.SpsColumnChooserColumn=co;exports.SpsColumnChooserExamples=Ju;exports.SpsConditionalField=dl;exports.SpsConditionalFieldExamples=lf;exports.SpsContentRow=Li;exports.SpsContentRowCol=Kn;exports.SpsContentRowExamples=Zu;exports.SpsContentRowExpansion=po;exports.SpsContextBar=$k;exports.SpsCurrencyInput=Hf;exports.SpsCurrencyInputExamples=Gk;exports.SpsDateRangePicker=Bi;exports.SpsDateRangePickerExamples=Qu;exports.SpsDateTime=Fi;exports.SpsDateTimeRangePicker=Ai;exports.SpsDateTimeRangePickerExamples=nm;exports.SpsDatepicker=Pi;exports.SpsDatepickerExamples=Xu;exports.SpsDatetimeExamples=rm;exports.SpsDd=im;exports.SpsDescriptionList=fo;exports.SpsDescriptionListDefinition=ho;exports.SpsDescriptionListExamples=dm;exports.SpsDescriptionListTerm=So;exports.SpsDl=om;exports.SpsDropdown=Xn;exports.SpsDropdownExamples=pm;exports.SpsDt=cm;exports.SpsFeedbackBlock=Wf;exports.SpsFeedbackBlockExamples=Uk;exports.SpsFieldset=$i;exports.SpsFieldsetExamples=um;exports.SpsFilterPanel=al;exports.SpsFilterPanelCap=ll;exports.SpsFilterPanelExamples=af;exports.SpsFilterPanelFilterBox=cl;exports.SpsFilterPanelSection=il;exports.SpsFilterTile=dh;exports.SpsFilterTileList=ph;exports.SpsFilterTileListExamples=BI;exports.SpsFocusedTask=Cl;exports.SpsFocusedTaskActions=wl;exports.SpsFocusedTaskExamples=qk;exports.SpsForm=ds;exports.SpsFormArrayMeta=hp;exports.SpsFormComponentWrapper=at;exports.SpsFormExamples=qu;exports.SpsFormFieldMeta=Ur;exports.SpsFormGroupMeta=fp;exports.SpsFormMetaBase=Vn;exports.SpsFormSetMeta=$n;exports.SpsGrowler=Dl;exports.SpsGrowlerExamples=Xk;exports.SpsI=Yt;exports.SpsIconButtonPanel=Mm;exports.SpsIncrementor=Ki;exports.SpsIncrementorExamples=mm;exports.SpsInputGroup=yr;exports.SpsInsightTile=Gf;exports.SpsInsights=Qk;exports.SpsKeyValueList=Yf;exports.SpsKeyValueListItem=Uf;exports.SpsKeyValueTag=jf;exports.SpsKeyValueTagExamples=sI;exports.SpsLabel=Hi;exports.SpsLabelExamples=fm;exports.SpsListActionBar=Wi;exports.SpsListActionBarExamples=Rm;exports.SpsListToolbar=Jf;exports.SpsListToolbarExamples=uI;exports.SpsListToolbarSearch=xl;exports.SpsListToolbarSearchInfo=kl;exports.SpsListToolbarSortBy=Zf;exports.SpsMicroBlock=Gi;exports.SpsMicroBlockExamples=Om;exports.SpsMicroZeroState=fh;exports.SpsModal=Yi;exports.SpsModalExamples=Pm;exports.SpsModalFooter=bo;exports.SpsMultiSelect=ji;exports.SpsMultiSelectExamples=Bm;exports.SpsMultiValueTextInput=pl;exports.SpsMultiValueTextInputExamples=cf;exports.SpsPageSelector=vo;exports.SpsPageSubtitle=th;exports.SpsPageTitle=eh;exports.SpsPageTitleExamples=gI;exports.SpsPagination=zi;exports.SpsPaginationExamples=Am;exports.SpsProductBar=nh;exports.SpsProductBarExamples=yI;exports.SpsProductBarTab=Il;exports.SpsProgressBar=rh;exports.SpsProgressBarExamples=EI;exports.SpsProgressRing=rl;exports.SpsRadioButton=qi;exports.SpsRadioButtonExamples=Fm;exports.SpsScrollableContainer=sh;exports.SpsSearchResultsBar=qf;exports.SpsSearchResultsBarExamples=iI;exports.SpsSearchResultsBarV2=Nl;exports.SpsSelect=Yn;exports.SpsSelectExamples=em;exports.SpsSideNav=$m;exports.SpsSideNavExamples=Km;exports.SpsSlackLink=oh;exports.SpsSlackLinkExamples=DI;exports.SpsSlideInPanel=Ui;exports.SpsSlideInPanelExamples=Lm;exports.SpsSortingHeader=ah;exports.SpsSortingHeaderCell=Ml;exports.SpsSortingHeaderExamples=kI;exports.SpsSpinner=qa;exports.SpsSplitButton=Ji;exports.SpsSplitButtonExamples=Hm;exports.SpsSteppedProgressBar=ih;exports.SpsSteppedProgressBarExamples=MI;exports.SpsSummaryListColumn=Xi;exports.SpsSummaryListExamples=Wm;exports.SpsSummaryListExpansion=ts;exports.SpsSummaryListRow=Zi;exports.SpsTab=Af;exports.SpsTabPanel=Ff;exports.SpsTable=Qn;exports.SpsTableBody=xn;exports.SpsTableCell=ce;exports.SpsTableExamples=_m;exports.SpsTableHead=Nn;exports.SpsTableHeader=tt;exports.SpsTableRow=Ue;exports.SpsTabsV2=yl;exports.SpsTag=Gt;exports.SpsTagExamples=BN;exports.SpsTaskQueue=Qi;exports.SpsTaskQueueExamples=Gm;exports.SpsTbody=Nm;exports.SpsTd=km;exports.SpsTextInput=To;exports.SpsTextInputExamples=Ym;exports.SpsTextarea=el;exports.SpsTextareaExamples=Um;exports.SpsTh=ym;exports.SpsThead=Em;exports.SpsTile=lh;exports.SpsTileList=ch;exports.SpsTileListExamples=OI;exports.SpsTimeInput=ul;exports.SpsTimeInputExamples=df;exports.SpsToggle=tl;exports.SpsToggleExamples=zm;exports.SpsTooltip=Rt;exports.SpsTooltipExamples=qm;exports.SpsTooltipTitle=nl;exports.SpsTr=Cm;exports.SpsValidators=to;exports.SpsVerticalRule=_l;exports.SpsVr=mh;exports.SpsWf=Zm;exports.SpsWfDoc=ef;exports.SpsWfDs=nf;exports.SpsWfStep=sf;exports.SpsWizardExamples=Xm;exports.SpsWizardSidebar=sl;exports.SpsWizardSubstep=ol;exports.SpsWorkflow=Eo;exports.SpsWorkflowDocument=wo;exports.SpsWorkflowDocumentStatus=Co;exports.SpsWorkflowExamples=of;exports.SpsWorkflowStep=Do;exports.SpsZeroState=hh;exports.SpsZeroStateExamples=VI;exports.TooltipVisibility=Ce;exports.ValidationMode=jt;exports.addOnChangeErrorKey=cp;exports.addOnSubmitErrorKey=dp;exports.bindProps=Kv;exports.contentOf=wt;exports.date=Yr;exports.dateConstraint=mp;exports.dateRange=up;exports.findParentBranches=yo;exports.flipPosition=Ja;exports.formArray=zD;exports.formControl=qD;exports.formGroup=JD;exports.getMember=Ri;exports.getPosition=Wn;exports.resetServerContext=jC;exports.selectChildren=Pt;exports.setDateFormat=pp;exports.toggleTooltipState=Vs;exports.useCheckDeprecatedProps=Ep;exports.useColumnCellResizer=bm;exports.useColumnHeaderResizer=gm;exports.useCustomValidator=Nv;exports.useDidUpdateEffect=Za;exports.useDocumentEventListener=xa;exports.useElementId=En;exports.useForm=ZD;exports.useGrowlers=Zk;exports.useInputPopup=wr;exports.useKeyboardSensor=Ru;exports.useModals=mI;exports.useMouseSensor=_u;exports.usePatchReducer=Jt;exports.usePortal=Er;exports.useServerSideValidation=XD;exports.useSpsAction=fI;exports.useSpsForm=gp;exports.useTouchSensor=Ou;exports.validate=no;
|