@spscommerce/ds-react 8.34.6 → 8.34.8
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.umd.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
(function(_,I){typeof exports=="object"&&typeof module<"u"?I(exports,require("react"),require("@spscommerce/utils"),require("moment-timezone"),require("@spscommerce/ds-shared"),require("@spscommerce/i18n"),require("react-dom"),require("@spscommerce/ds-colors"),require("@sps-woodland/tabs"),require("@react-stately/collections"),require("@sps-woodland/illustrations")):typeof define=="function"&&define.amd?define(["exports","react","@spscommerce/utils","moment-timezone","@spscommerce/ds-shared","@spscommerce/i18n","react-dom","@spscommerce/ds-colors","@sps-woodland/tabs","@react-stately/collections","@sps-woodland/illustrations"],I):(_=typeof globalThis<"u"?globalThis:_||self,I(_.DSReact={},_.React,_.utils,_.moment$5,_.dsShared,_.i18n,_.ReactDOM,_.dsColors,_.tabs,_.collections,_.illustrations))})(this,function(_,I,v,Ze,Y,$e,vo,Pa,Gh,or,Jl){"use strict";var SM=Object.defineProperty;var Hh=_=>{throw TypeError(_)};var gM=(_,I,v)=>I in _?SM(_,I,{enumerable:!0,configurable:!0,writable:!0,value:v}):_[I]=v;var jt=(_,I,v)=>gM(_,typeof I!="symbol"?I+"":I,v),Wh=(_,I,v)=>I.has(_)||Hh("Cannot "+v);var rr=(_,I,v)=>(Wh(_,I,"read from private field"),v?v.call(_):I.get(_)),Ba=(_,I,v)=>I.has(_)?Hh("Cannot add the same private member more than once"):I instanceof WeakSet?I.add(_):I.set(_,v),Sn=(_,I,v,Ze)=>(Wh(_,I,"write to private field"),Ze?Ze.call(_,v):I.set(_,v),v);var Qn,In,Mn;function Zl(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 o=Zl(I),ar=Zl(Ze);function Xl(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=Xl(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function U(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Xl(e))&&(r&&(r+=" "),r+=t);return r}const Yh="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let ht=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+=Yh[n[e]&63];return t};function gn(e){return I.useRef(e||ht())}function St(e,t){const n=gn(e),r=I.useRef(`${n.current}_ctrl`);return I.useEffect(()=>{t&&(t.id=r.current,t.update())},[t]),{wrapperId:n.current||void 0,controlId:r.current}}function Aa(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Fa,Ql;function Uh(){if(Ql)return Fa;Ql=1;var e="[object Object]";function t(h){var S=!1;if(h!=null&&typeof h.toString!="function")try{S=!!(h+"")}catch{}return S}function n(h,S){return function(y){return h(S(y))}}var r=Function.prototype,a=Object.prototype,s=r.toString,l=a.hasOwnProperty,c=s.call(Object),p=a.toString,f=n(Object.getPrototypeOf,Object);function m(h){return!!h&&typeof h=="object"}function u(h){if(!m(h)||p.call(h)!=e||t(h))return!1;var S=f(h);if(S===null)return!0;var y=l.call(S,"constructor")&&S.constructor;return typeof y=="function"&&y instanceof y&&s.call(y)==c}return Fa=u,Fa}var zh=Uh();const ec=Aa(zh),Ct=new Set,sr=new Set,qt=new Set,yo=new Set;function tc(e){Ct.has(e)||qt.has(e)||yo.has(e)||sr.add(e)}function nc(e){Ct.has(e)||qt.has(e)||sr.has(e)||yo.add(e)}const pt=ar.default||ar,ir="MM/DD/YYYY",jh="MM/DD/YYYY hh:mm A",qh="MM/DD/YYYY HH:mm",Jh="hh:mm A",Zh="HH:mm",Xh=/^(\d{1,2})\/(\d{1,2})\/(\d{4})$/,_r=Symbol("Date Parse Error");function lr(e){return pt.isMoment(e)?e.year()*1e4+(e.month()+1)*100+e.date():e.year*1e4+e.month*100+e.date}const ne=Object.freeze({createFrom(e,t){if(!e)return null;if(typeof e=="string"){if(t){const n=pt(e,t,!0);if(n.isValid())return Object.freeze({year:n.year(),month:n.month()+1,date:n.date()})}else{const n=Xh.exec(e);if(n){const[,r,a,s]=n;return Object.freeze({year:Number(s),month:Number(r),date:Number(a)})}}return Object.freeze({[_r]:!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=pt(e,t,!0):n=pt(e):pt.isMoment(e)?n=e:n=ne.toMoment(e),n!==null&&pt.isMoment(n)&&n.isValid()?n:Object.freeze({[_r]:!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=ne.getRangeSeparator(t),r=new RegExp(`[^\\d]*${n}[^\\d]*`);return e.split(r).slice(0,2).map(a=>ne.createFrom(a,t))}else return e.split(/[^\d]*-[^\d]*/).slice(0,2).map(n=>ne.createFrom(n))},isValid(e){var t;return e?pt.isMoment(e)?e.isValid():typeof e=="object"&&typeof e.year=="number"&&typeof e.month=="number"&&typeof e.date=="number"&&((t=ne.toMoment(e))==null?void 0:t.isValid()):!1},nullifyInvalidDate(e){return ne.isValid(e)?e:null},toMoment(e){return e?pt.isMoment(e)?e:pt({...e,month:e.month-1}):null},toString(e,t){const n=ne.toMoment(e);return n&&n.isValid()?n.format(t||ir):""},toStringRange(e,t){if(!e)return"";const n=ne.getRangeSeparator(t);return e.slice(0,2).map(r=>ne.toString(r,t)).join(n)},toDateTimeString(e,t=!1,n){return e&&pt.isMoment(e)&&e.isValid()?n?t?e.format(`${n} ${Zh}`):e.format(`${n} ${Jh}`):t?e.format(qh):e.format(jh):""},toDateTimeStringRange(e,t=!1,n){if(!e)return"";const r=ne.getRangeSeparator(n);return e.map(a=>ne.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,s]=t.map(lr);return a&&s&&(n&&r>=a&&r<=s||!n&&r>a&&r<s)},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=pt(),r=n.clone().subtract(pt.duration(e.definition));return[ne.createFrom(r,t),ne.createFrom(n,t)]},createDateTimeRangeFromPreset(e){if(typeof e.definition=="function")return e.definition();const t=pt().subtract(pt.duration(e.definition)).startOf("day"),n=pt().endOf("day");return[t,n]},splitMomentInDateTimeParts(e,t=!1,n,r=!1){let a="";t?a=r?"23:59":"00:00":a=r?"11:59":"12:00";const s=r?"PM":"AM";return e&&pt.isMoment(e)&&e.isValid()?ne.toDateTimeString(e,t,n).split(" "):["",a,t?void 0:s]},getCurrentMoment(){return pt()},validateTimeString(e,t=!1){if(!e)return!0;const n=e.split(":"),r=n[0]||"0",a=n[1]||"0",s=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&&s>=0&&s<=23&&l>=0&&l<=59:c&&(!Number.isNaN(s)&&r.length===1||s>=1)&&s<=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 s=r<10?`0${r}`:`${r}`,l=a<10?`0${a}`:`${a}`;return`${s}:${l}`}else{const s=r===0?"12":r<10?`0${r}`:`${r}`,l=a<10?`0${a}`:`${a}`;return`${s}:${l}`}}}),Va=["01:00","02:00","03:00","04:00","05:00","06:00","07:00","08:00","09:00","10:00","11:00","12:00"],$a=["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 To=ir;function rc(e){To=e}const Lr=function(t){if(Array.isArray(t)){const n=Lr(t[0]),r=Lr(t[1]);return n||r}if(t&&t.hasOwnProperty("year")){if(t[_r])return{dateFormat:To};if(!ne.isValid(t))return{dateValidity:!0}}return null};Ct.add("dateFormat"),Ct.add("dateValidity");const oc=function(t){if(Array.isArray(t)){const n=Lr(t);if(n)return n;if(t&&ne.isBefore(t[1],t[0]))return{dateRangeOrder:!0}}return null};Ct.add("dateRangeOrder");const ac=function({minDate:t,maxDate:n}){function r(a){const s=ne.isBefore(a,t),l=ne.isAfter(a,n),c={minExceeded:s?ne.toString(t,To):null,maxExceeded:l?ne.toString(n,To):null};return s||l?{dateConstraint:c}:null}return function(s){if(!s)return null;if(Array.isArray(s)){const l=r(s[0]),c=r(s[1]);return l||c}return s.hasOwnProperty("year")?r(s):null}};Ct.add("dateConstraint");const Qh=Object.freeze(Object.defineProperty({__proto__:null,date:Lr,dateConstraint:ac,dateRange:oc,setDateFormat:rc},Symbol.toStringTag,{value:"Module"}));function tn(e,t){for(const n of[].concat(e)){const r=t(n);if(r)return r}return null}const eS=function(t){function n(r){return Number(r)>=t?null:{min:t}}return r=>tn(r,n)};Ct.add("min");const tS=function(t){function n(r){return Number(r)<=t?null:{max:t}}return r=>tn(r,n)};sr.add("max");const nS=function(t){return typeof t>"u"||t===null||t===""||Number.isNaN(t)||(t==null?void 0:t.length)===0?{required:!0}:null};sr.add("required");const rS=function(t){function n(r){return r===void 0||r.toString().length<t?{minLength:t}:null}return r=>tn(r,n)};Ct.add("minLength");const oS=function(t){function n(r){return r==null||Array.isArray(r)&&r.length<t?{minLengthArray:t}:null}return r=>n(r)};Ct.add("minLengthArray");const aS=function(t){function n(r){return r===void 0||r.toString().length<=t?null:{maxLength:t}}return r=>tn(r,n)};qt.add("maxLength");const sS=function(t){function n(r){return r==null||Array.isArray(r)&&r.length<=t?null:{maxLengthArray:t}}return r=>n(r)};Ct.add("maxLengthArray");const iS=function(t){const n=t instanceof RegExp?t:new RegExp(t);function r(a){return n.test(a)?null:{pattern:t}}return a=>tn(a,r)};Ct.add("pattern");const lS=function(e){function t(n){return new RegExp("^\\p{L}*$","u").test(n)?null:{alpha:!0}}return tn(e,t)};qt.add("alpha");const cS=function(e){function t(n){return/^[0-9,. ]*$/.test(n)?null:{numeric:!0}}return tn(e,t)};qt.add("numeric");const dS=function(e){function t(n){return/^-?[0-9,. ]*$/.test(n)?null:{positiveOrNegativeNumber:!0}}return tn(e,t)};qt.add("positiveOrNegativeNumber");const pS=function(e){function t(n){return/^[^0-9]*$/.test(n)?null:{nonNumeric:!0}}return tn(e,t)};qt.add("nonNumeric");const Eo=Object.freeze({...Qh,min:eS,max:tS,required:nS,minLength:rS,minLengthArray:oS,maxLength:aS,maxLengthArray:sS,pattern:iS,alpha:lS,numeric:cS,nonNumeric:pS,positiveOrNegativeNumber:dS,OnBlurErrorKeys:Ct});function wo(e,t=[]){const n=t.reduce((r,a)=>Object.assign(r,a(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 uS(e,t={},n=[]){for(const[r,a]of Object.entries(t))a===0?tc(r):a===2&&nc(r);return o.useCallback(e,n)}class Bn{constructor(t,n){jt(this,"validators",[]);Ba(this,Qn,null);Ba(this,In,null);Ba(this,Mn,null);jt(this,"preventativeErrors",[]);jt(this,"submitted",!1);this.path=t,this.update=n}get errors(){return rr(this,Qn)===null&&rr(this,In)===null&&rr(this,Mn)===null?null:{...rr(this,Qn)??{},...rr(this,In)??{},...rr(this,Mn)??{}}}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=wo(t,this.validators);let s={onSubmit:{},onChange:{},onBlur:{}};a&&(s=Object.keys(a).reduce((l,c)=>(yo.has(c)?l.onSubmit[c]=a[c]:sr.has(c)?l.onChange[c]=a[c]:l.onBlur[c]=a[c],l),s)),(typeof n>"u"||n===Jt.ON_CHANGE)&&Sn(this,In,Object.keys(s.onChange).length===0?null:s.onChange),(typeof n>"u"||n===Jt.ON_BLUR)&&Sn(this,Mn,Object.keys(s.onBlur).length===0?null:s.onBlur),(typeof n>"u"||n===Jt.ON_SUBMIT)&&(Sn(this,Qn,Object.keys(s.onSubmit).length===0?null:s.onSubmit),Sn(this,In,Object.keys(s.onChange).length===0?null:s.onChange),Sn(this,Mn,Object.keys(s.onBlur).length===0?null:s.onBlur)),r||this.update(),this.isFocused()&&this.onFocus&&this.onFocus()}else this.errors&&(Sn(this,Qn,null),Sn(this,Mn,null),Sn(this,In,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(Eo.required)>-1}isSubmitted(){return this.submitted}onFocus(){}onBlur(){}}Qn=new WeakMap,In=new WeakMap,Mn=new WeakMap;class Or extends Bn{constructor(){super(...arguments);jt(this,"id",ht());jt(this,"focused",!1);jt(this,"pristine",!0)}setValue(n){if(this.preventativeErrors=[],this.validators&&this.validators.length>0){const r=wo(n,this.validators);if(r&&Object.keys(r).filter(s=>qt.has(s)).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 Pn extends Or{constructor(n,r,a){super(a?r:n,a||r);jt(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 Co(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 sc extends Pn{inferMembers(t){this.fields={};for(const n of Object.keys(t))this.fields[n]=this.inferSpsControl(t[n],n)}}class ic extends Pn{inferMembers(t){this.fields=t.map((n,r)=>this.inferSpsControl(n,String(r)))}}function Co(e,t,n){return e instanceof Bn?(e.path=t,e.update=n,e):Array.isArray(e)?new ic(e,t,n):ec(e)?new sc(e,t,n):new Or(t,n)}function Rr(e,t){return t.length===0||!e?e:Rr(e.fields[t[0]],t.slice(1,t.length))}function Ka(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,s)=>[...a,...Ka(s,t)],[])}return Ka(e.fields[n],t)}function Ha(e,t,n){for(const r of Object.keys(t)){const a=t[r];for(const s of Ka(e,r.split(".")))s&&a&&n(s,a)}}function Do(e,t,n,r=!1,a=!1){Ha(t,n,(s,l)=>{s.validators=typeof l=="function"?l(e):l,r&&s.validate(v.getPath(e,s.path),void 0,a)})}function Wa(e,t){const n=t[0];return t=t.slice(1),Array.isArray(e)?e.map((r,a)=>a===Number(n)?Wa(r,t):r):ec(e)?Object.keys(e).reduce((r,a)=>Object.assign(r,{[a]:a===n?Wa(e[a],t):e[a]}),{}):e}function mS(e){if(typeof e!="object"||e===null||Array.isArray(e))throw new TypeError("The initial value of useSpsForm() hook must be an object.")}function lc(e,t={}){mS(e);const[,n]=I.useState({}),r=I.useRef(!1);r.current=!1;const a=I.useRef(t),s=I.useCallback(h=>{var w,T;const S=u.current;let y;if(h)if(h.path)if(h.markAsBlurred){const C=Rr(S.formMeta,h.path);if(C){C.focused=!1;const D=v.getPath(S.formValue,h.path);C.validate(D,Jt.ON_BLUR)}}else if(h.newValidators){if(a.current){const C=h.path.join(".");a.current={...a.current,[C]:h.newValidators},Do(S.formValue,S.formMeta,a.current,!0)}}else if(h.markAsSubmitted){const C=Rr(S.formMeta,h.path);if(C){C.submitted=!0;const D=v.getPath(S.formValue,h.path);C.validate(D,Jt.ON_SUBMIT)}}else y=Wa(S.formValue,h.path),v.setPath(y,h.path,h.value);else y=h.value;if((w=h==null?void 0:h.updateFormOptions)!=null&&w.validators&&(a.current={...a.current,...h.updateFormOptions.validators},Do(S.formValue,S.formMeta,a.current,((T=h.updateFormOptions)==null?void 0:T.runValidators)??!0)),y){S.formMeta.submitted=!1,v.deepFreeze(y);const C=v.diff(S.formValue,y);for(const{type:M,key:x,parentPath:k,objects:[,P]}of C){const G=Rr(S.formMeta,k);if(typeof x!="symbol"&&G){let E;switch(M){case v.DiffChange.ADDITION:G.fields[x]=Co(P[x],[...k,x],c);break;case v.DiffChange.DELETION:Array.isArray(G.fields)?G.fields[x]=void 0:delete G.fields[x];break;case v.DiffChange.ALTERATION:E=Co(P[x],[...k,x],c),(E instanceof Pn&&!(G.fields[x]instanceof Pn)||!(E instanceof Pn)&&G.fields[x]instanceof Pn)&&(E.pristine=!1,G.fields[x]=E);break}}}const D=new Set;if(C.filter(M=>M.type===v.DiffChange.DELETION).reduce((M,x)=>(M.has(x.parentPath)||M.add(x.parentPath),M),D),Array.from(D).forEach(M=>{const x=Rr(S.formMeta,M);Array.isArray(x.fields)&&(x.fields=x.fields.filter(k=>k!==void 0))}),a.current){Do(y,S.formMeta,a.current);const M=new Set;t&&Ha(S.formMeta,t,(x,k)=>{typeof k=="function"&&(x.validate(v.getPath(y,x.path)),M.add(x))});for(const{type:x,key:k,parentPath:P,objects:[,G]}of C)if(typeof k!="symbol"){let E=S.formMeta,R=y;if(E){for(const O of P)E=E.fields[O],R=R[O],M.has(E)||E.validate(R,Jt.ON_CHANGE);if(x===v.DiffChange.ADDITION||x===v.DiffChange.ALTERATION){const O=E.fields[k];if(!M.has(O)&&(E.fields[k].validate(G[k],Jt.ON_CHANGE),x===v.DiffChange.ADDITION&&O.fields))for(const[A,j]of Object.entries(O.fields))j.validate(G[k][A],Jt.ON_CHANGE)}}}}}u.current={...S,formValue:y||S.formValue},r.current||n({})},[]),l=I.useCallback((h,S)=>{h||S?s({value:h,updateFormOptions:S}):s()},[s]),c=I.useCallback((h,S,y=!1,w,T=!1)=>{h?s({path:h,value:S,markAsBlurred:y,newValidators:w,markAsSubmitted:T}):l()},[s,l]),p=I.useMemo(()=>{v.deepFreeze(e);const h=Co(e,[],c);return t&&Do(e,h,t,!1,!0),h},[]),f=I.useCallback(()=>(u.current.formMeta.markAsDirty(),a.current&&Ha(u.current.formMeta,a.current,(h,S)=>{(typeof S=="function"||Array.isArray(S))&&h.validate(v.getPath(u.current.formValue,h.path))}),u.current.formMeta.isValid()),[]),m=I.useCallback(()=>u.current.formValue,[]),u=I.useRef({formValue:e,formMeta:p,updateForm:l,validateForm:f,getCurrentFormValue:m});return u.current}const nt=o.forwardRef((e,t)=>{const{className:n,children:r,focusInputOnClick:a,formControl:s,formMeta:l,inputRef:c,onClick:p,...f}=e,m=o.useRef(),h=c||(t||m);function S(){h&&h!==t&&h.current&&h.current.focus()}function y(){h&&h!==t&&h.current&&l&&l instanceof Or&&l.markAsFocused()}function w(){h&&h!==t&&h.current&&l&&l instanceof Or&&l.markAsBlurred()}const T=U("sps-form-group",(s&&s.isRequired()||l&&l.isRequired())&&"sps-form-group--required",(s&&!s.isValid()||l&&l.isVisibilyInvalid())&&"sps-form-group--error",l&&l.hasPreventativeErrors()&&"sps-form-group--preventative-error",n);function C(D){a&&S(),p&&p(D)}return o.useEffect(()=>{function D(M){M.target.classList.contains("sps-form-control__clear-btn")&&M.preventDefault()}return document.addEventListener("mousedown",D),()=>{document.removeEventListener("mousedown",D)}},[]),o.createElement("div",{...f,className:T,ref:t,tabIndex:-1,onClick:C,onFocus:y,onBlur:w},r)});Object.assign(nt,{displayName:"SpsFormComponentWrapper"});function cc(e){return typeof e=="object"&&e!=null&&e.nodeType===1}function dc(e,t){return(!t||e!=="hidden")&&e!=="visible"&&e!=="clip"}function Ga(e,t){if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){var n=getComputedStyle(e,null);return dc(n.overflowY,t)||dc(n.overflowX,t)||function(r){var a=function(s){if(!s.ownerDocument||!s.ownerDocument.defaultView)return null;try{return s.ownerDocument.defaultView.frameElement}catch{return null}}(r);return!!a&&(a.clientHeight<r.scrollHeight||a.clientWidth<r.scrollWidth)}(e)}return!1}function No(e,t,n,r,a,s,l,c){return s<e&&l>t||s>e&&l<t?0:s<=e&&c<=n||l>=t&&c>=n?s-e-r:l>t&&c<n||s<e&&c>n?l-t+a:0}var pc=function(e,t){var n=window,r=t.scrollMode,a=t.block,s=t.inline,l=t.boundary,c=t.skipOverflowHiddenElements,p=typeof l=="function"?l:function(Le){return Le!==l};if(!cc(e))throw new TypeError("Invalid target");for(var f,m,u=document.scrollingElement||document.documentElement,h=[],S=e;cc(S)&&p(S);){if((S=(m=(f=S).parentElement)==null?f.getRootNode().host||null:m)===u){h.push(S);break}S!=null&&S===document.body&&Ga(S)&&!Ga(document.documentElement)||S!=null&&Ga(S,c)&&h.push(S)}for(var y=n.visualViewport?n.visualViewport.width:innerWidth,w=n.visualViewport?n.visualViewport.height:innerHeight,T=window.scrollX||pageXOffset,C=window.scrollY||pageYOffset,D=e.getBoundingClientRect(),M=D.height,x=D.width,k=D.top,P=D.right,G=D.bottom,E=D.left,R=a==="start"||a==="nearest"?k:a==="end"?G:k+M/2,O=s==="center"?E+x/2:s==="end"?P:E,A=[],j=0;j<h.length;j++){var L=h[j],re=L.getBoundingClientRect(),B=re.height,Z=re.width,H=re.top,q=re.right,ae=re.bottom,$=re.left;if(r==="if-needed"&&k>=0&&E>=0&&G<=w&&P<=y&&k>=H&&G<=ae&&E>=$&&P<=q)return A;var z=getComputedStyle(L),oe=parseInt(z.borderLeftWidth,10),ie=parseInt(z.borderTopWidth,10),J=parseInt(z.borderRightWidth,10),V=parseInt(z.borderBottomWidth,10),W=0,X=0,te="offsetWidth"in L?L.offsetWidth-L.clientWidth-oe-J:0,pe="offsetHeight"in L?L.offsetHeight-L.clientHeight-ie-V:0,ce="offsetWidth"in L?L.offsetWidth===0?0:Z/L.offsetWidth:0,Q="offsetHeight"in L?L.offsetHeight===0?0:B/L.offsetHeight:0;if(u===L)W=a==="start"?R:a==="end"?R-w:a==="nearest"?No(C,C+w,w,ie,V,C+R,C+R+M,M):R-w/2,X=s==="start"?O:s==="center"?O-y/2:s==="end"?O-y:No(T,T+y,y,oe,J,T+O,T+O+x,x),W=Math.max(0,W+C),X=Math.max(0,X+T);else{W=a==="start"?R-H-ie:a==="end"?R-ae+V+pe:a==="nearest"?No(H,ae,B,ie,V+pe,R,R+M,M):R-(H+B/2)+pe/2,X=s==="start"?O-$-oe:s==="center"?O-($+Z/2)+te/2:s==="end"?O-q+J+te:No($,q,Z,oe,J+te,O,O+x,x);var se=L.scrollLeft,we=L.scrollTop;R+=we-(W=Math.max(0,Math.min(we+W/Q,L.scrollHeight-B/Q+pe))),O+=se-(X=Math.max(0,Math.min(se+X/ce,L.scrollWidth-Z/ce+te)))}A.push({el:L,top:W,left:X})}return A};function uc(e){return e===Object(e)&&Object.keys(e).length!==0}function fS(e,t){t===void 0&&(t="auto");var n="scrollBehavior"in document.body.style;e.forEach(function(r){var a=r.el,s=r.top,l=r.left;a.scroll&&n?a.scroll({top:s,left:l,behavior:t}):(a.scrollTop=s,a.scrollLeft=l)})}function hS(e){return e===!1?{block:"end",inline:"nearest"}:uc(e)?e:{block:"start",inline:"nearest"}}function ko(e,t){var n=e.isConnected||e.ownerDocument.documentElement.contains(e);if(uc(t)&&typeof t.behavior=="function")return t.behavior(n?pc(e,t):[]);if(n){var r=hS(t);return fS(pc(e,r),r.behavior)}}const Ya=Object.freeze(Object.defineProperty({__proto__:null,default:ko},Symbol.toStringTag,{value:"Module"})),SS={alt:"string",size:"SpinnerSize",title:"string"};function Ua(e){const{alt:t,className:n,size:r=Y.SpinnerSize.MEDIUM,"data-testid":a,title:s,unsafelyReplaceClassName:l,...c}=e,{t:p}=$e.useWoodlandLanguage(),f=t||s||p("spinner.defaultAltText",{defaultValue:"Loading..."}),m=U(l||"sps-spinner",`sps-spinner--${r}`,n);return o.createElement("i",{className:m,"data-testid":a,title:f,...c})}Object.assign(Ua,{props:SS,displayName:"SpsSpinner"});const gS=60;function xo(e){return typeof e>"u"?"inherit":`${e}px`}function za(e){switch(e){case Y.Position.TOP_LEFT:return Y.Position.BOTTOM_LEFT;case Y.Position.TOP_MIDDLE:return Y.Position.BOTTOM_MIDDLE;case Y.Position.TOP_RIGHT:return Y.Position.BOTTOM_RIGHT;case Y.Position.RIGHT_TOP:return Y.Position.LEFT_TOP;case Y.Position.RIGHT_MIDDLE:return Y.Position.LEFT_MIDDLE;case Y.Position.RIGHT_BOTTOM:return Y.Position.LEFT_BOTTOM;case Y.Position.BOTTOM_RIGHT:return Y.Position.TOP_RIGHT;case Y.Position.BOTTOM_MIDDLE:return Y.Position.TOP_MIDDLE;case Y.Position.BOTTOM_LEFT:return Y.Position.TOP_LEFT;case Y.Position.LEFT_BOTTOM:return Y.Position.RIGHT_BOTTOM;case Y.Position.LEFT_MIDDLE:return Y.Position.RIGHT_MIDDLE;case Y.Position.LEFT_TOP:return Y.Position.RIGHT_TOP}}function bS(e,t,n,r,a,s,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,[S,y]=e.split(" ");let w,T,C,D;switch(S){case"top":C=t.height-n.top-m-s[0];break;case"left":T=t.width-n.left-h-s[0];break;case"right":D=n.right+h-s[0];break;case"bottom":w=n.bottom+m-s[0];break;default:throw new Error(`Invalid position ${e}`)}switch(y){case"left":D=n.left+h+s[1];break;case"top":w=n.top+m+s[1];break;case"middle":S==="top"||S==="bottom"?D=n.left+h+n.width/2-a/2+s[1]:(S==="left"||S==="right")&&(w=n.top+m+n.height/2-r.height/2+s[1]);break;case"bottom":C=t.height-n.bottom-m+s[1];break;case"right":T=t.width-n.right-h+s[1];break;default:throw new Error(`Invalid position ${e}`)}return[w,T,C,D]}function An(e,t,n,{altPosition:r,setMinWidth:a=!1,setWidth:s=!1,parentElementRef:l,fixed:c=!1,offsets:p=[0,0]}){if(e.current&&t.current){const f=e.current.getBoundingClientRect(),m=t.current.getBoundingClientRect(),u=Math.max(document.documentElement.clientHeight,window.innerHeight||0),h=document.documentElement.getBoundingClientRect().width;let y=((l==null?void 0:l.current)??document.documentElement).getBoundingClientRect();c&&(y={x:0,y:0,width:h,height:u,top:0,left:0,bottom:u,right:h,toJSON(){return{width:h,height:u,top:0,left:0,bottom:u,right:h}}});const[w,T]=n.split(" ");let C=n;if(r&&(w==="top"&&m.top-f.height<gS||w==="right"&&m.right+f.width>h||w==="bottom"&&m.bottom+f.height>u||w==="left"&&m.left-f.width<0)&&(C=r),T==="left"&&m.left+f.width+((p==null?void 0:p[1])??0)>document.documentElement.getBoundingClientRect().right)switch(w){case"bottom":C=Y.Position.BOTTOM_RIGHT;break;case"top":C=Y.Position.TOP_RIGHT;break}const D=a?Math.max(m.width,f.width):f.width,M=s?m.width:D,[x,k,P,G]=bS(C,y,m,f,M,p,l,c),E={top:xo(x),right:xo(k),bottom:xo(P),left:xo(G)};return c&&(E.position="fixed",E.zIndex=Y.ZStratum.BAR),a&&(E.minWidth=`${m.width}px`),s&&(E.width=`${m.width}px`),[E,C===r]}return[{},!1]}const Mt=I.createContext(null);function cr(e,t=[]){const n=I.useContext(Mt);return I.useMemo(()=>r=>{const s=n&&n.parentElementRef&&n.parentElementRef.current||document.body;let l=null,c=s.lastElementChild;for(;c&&c!==s.firstElementChild;){if(c.hasAttribute("data-portalid")&&c.getAttribute("data-portalid")===e){l=c;break}c=c.previousElementSibling}if(l)s.contains(l)||s.appendChild(l);else{l=document.createElement("div"),l.setAttribute("data-portalid",e);for(const p of t)l.classList.add(p);s.appendChild(l)}return vo.createPortal(r,l)},[n])}const ja=["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","1","2","3","4","5","6","7","8","9","0"];async function mc(e,t,n,r,a,s){const l=typeof e.options=="function"?e.options(t.value):e.options||[],c=l instanceof Promise,p=u=>u.replace(/([.?*+^$[\]\\(){}|-])/g,"");n({pending:c}),s.current=c?l:null;const f=c?await l||[]:l||[];if(c&&s.current!==l)return;let m=Array.from(f).filter(Boolean).map(u=>new Y.SpsOptionListOption(u,typeof u=="function"?{textKey:"label",captionKey:"caption"}:{textKey:e.textKey,captionKey:e.captionKey}));if(e.nullOption&&m.unshift(new Y.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 S=new RegExp(u,"i"),y=p(h.text);return e.filterByTextAndCaptionKey?S.test(y)||S.test(p(h.caption)):S.test(y)})}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 vS(e,t,n){const[r,a]=o.useState(Object.freeze([])),[s,l]=o.useState(!1),c=o.useRef(null),p=o.useRef(e.options);(typeof e.options!="function"||e.disableOptionsMemoization)&&(p.current=e.options);const f=o.useMemo(()=>typeof p.current=="function"?v.debounce(mc,typeof e.searchDebounce<"u"?e.searchDebounce:500):mc,[p.current,e.disabledOptions]);return o.useEffect(()=>{f(e,t,n,a,l,c)},[p.current,t.value,e.disabledOptions]),[r,s]}class bn{constructor(t,n){jt(this,"nativeEvent");jt(this,"currentTarget");jt(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 yS(e,t){return{...e,...t}}function Zt(e){return I.useReducer(yS,e)}function TS({hideInlineSearch:e,options:t,onSearchChange:n,search:r="",searchPlaceholder:a="Search…",searchInputRef:s}){const[l,c]=Zt({isAsync:typeof t=="function",pending:!1,value:r,replacementPattern:null}),p=o.useCallback(S=>{c({value:S.target.value}),n&&n(S)},[n]),f=o.useCallback(S=>{S.nativeEvent.stopImmediatePropagation(),S.stopPropagation()},[]),m=o.useCallback(S=>{S.nativeEvent.stopImmediatePropagation(),c({value:""}),s!=null&&s.current&&(n&&n(new bn(s.current)),s.current.focus())},[n]),u=S=>{S&&(["Tab","Escape","Enter","Up","ArrowUp","Down","ArrowDown"].includes(S.key)||S.stopPropagation())};return o.useEffect(()=>{c({value:r})},[r]),[l.isAsync&&!e?o.createElement("div",{className:"sps-option-list__search sps-form-group sps-text-input"},o.createElement("div",{className:"sps-form-control"},!l.value&&o.createElement("i",{className:"sps-icon sps-icon-filter sps-text-input__icon"}),o.createElement("input",{type:"text",className:"sps-text-input__input",placeholder:a,ref:s,value:l.value,onChange:p,onClick:f,onKeyDown:u}),l.value&&o.createElement("i",{className:"sps-icon sps-icon-x-circle sps-form-control__clear-btn",onClick:m}))):o.createElement(o.Fragment,null),l,c]}const ES=ko||Ya,wS=["Tab","Escape","Enter","Up","ArrowUp","Down","ArrowDown"];function CS(e,t,n){return n?(e&&e[n])===(t&&t[n]):e===t}function fc(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 Br=o.forwardRef((e,t)=>{const{captionKey:n,comparisonKey:r,disabledOptions:a,options:s,tall:l,textKey:c,valueKey:p,zeroState:f,hideInlineSearch:m,onSearchChange:u,search:h,searchDebounce:S,searchPlaceholder:y,onSpecialActionSelect:w,attachTo:T,className:C,conformWidth:D,id:M,ignoreWidthStyles:x,isOpen:k,keepOpen:P,keyDown:G,nullOption:E,onOptionListChanged:R,onOptionSelected:O,onPositionFlip:A,onSelfToggle:j,optionRole:L,positionOverride:re,selectedOption:B,specialAction:Z,unsafelyReplaceClassName:H,loading:q,filterByTextAndCaptionKey:ae,maxHeightPx:$,maxHeightRem:z,disableOptionsMemoization:oe,disableDefaultOptionsFiltering:ie,"data-testid":J,typeaheadEvent:V,...W}=e,X=o.useMemo(()=>Z?new Y.SpsOptionListOption(Z,{textKey:"label",captionKey:"caption"}):null,[Z]),[te,pe]=o.useState(-1),[ce,Q]=o.useState(k),se=t||o.useRef(null),we=o.useRef(null),Le=o.useRef(null),wt=cr("sps-option-list-portal"),lt=o.useContext(Mt),[ct,Xe]=re||[Y.Position.BOTTOM_LEFT,Y.Position.TOP_LEFT],[[At,Qe],Ke]=o.useState([{},!1]),Se=o.useRef(null),[Ue,We,Te]=TS({...e,searchInputRef:Se}),[ve,rt]=vS(e,We,Te);o.useEffect(()=>{V&&vt(V)},[V]),o.useEffect(()=>{Ke(ce?An(se,T,ct,{altPosition:Xe,setMinWidth:!x,setWidth:!x&&D,...lt}):[{},!1])},[ce,ct,Xe,ve]),o.useEffect(()=>{let he;return ce&&(he=()=>{ce&&Ke(An(se,T,ct,{altPosition:Xe,setMinWidth:!x,setWidth:!x&&D,...lt}))},document.addEventListener("scroll",he)),()=>{he&&document.removeEventListener("scroll",he)}},[ce]),o.useEffect(()=>{pe(-1)},[We]);const It=U(H||"sps-option-list","z-stratum-dropdown",ce&&"sps-option-list--open",We.isAsync&&"sps-option-list--searchable",Qe&&"sps-option-list--opens-upward",Z&&Z.label&&"sps-option-list--has-special-action",C),Ft=U(H||"sps-option-list__options",l&&"sps-option-list__options--tall"),xe=o.useCallback(()=>{ce||(Q(!0),Se.current&&Se.current.focus(),pe(-1),j&&j(!0))},[ce,j]),de=o.useCallback(()=>{ce&&(Q(!1),pe(-1),j&&j(!1))},[ce,j]),De=o.useCallback((he,ye)=>{ye||he&&!he.disabled&&(typeof he.value=="function"?(he.value(),w&&w()):typeof O=="function"&&O(he.value),P||de())},[O,de]),Ne=o.useCallback((he,ye,tt)=>{he.stopPropagation(),De(ye,tt)},[De]),et=o.useRef(a||[]);et.current=a||[];const Oe=o.useCallback(he=>{switch(he.key){case"Tab":case"Escape":de();break;case"Enter":if(te>-1){const ye=ve[te]||X;he.preventDefault();const tt=!!ye&&fc(et.current,r||"",ye);!tt&&ye&&typeof O=="function"&&typeof ye.value=="function"?ye.value():ye&&De(ye,tt)}break;case"Up":case"ArrowUp":{let ye=te;Qe?te<=-1?ye=ve.length-1:te===0?Z&&(ye=ve.length):te<ve.length&&(ye=te-1):te>-1&&(ye=te-1),ye!==te&&(he.preventDefault(),pe(ye));break}case"Down":case"ArrowDown":{xe();let ye=te;Qe?te!==-1&&(te>=ve.length?ye=0:te===ve.length-1?ye=-1:ye=te+1):te<ve.length-1+ +!!Z&&(ye=te+1),ye!==te&&(he.preventDefault(),pe(ye));break}default:xe()}},[de,xe,te,De,O,Qe,ve]),dt=o.useCallback(he=>{xe();const ye=ve.findIndex(tt=>{if(tt.textKey){const Vt=tt.textKey;return tt.value[Vt].toLowerCase().charAt([0])===he.key.toLocaleLowerCase()}return tt.value.toString().toLowerCase().charAt([0])===he.key.toLocaleLowerCase()});ye>-1&&pe(ye)},[ve]),vt=o.useCallback(he=>{he&&(wS.includes(he.key)?Oe(he):ja.includes(he.key)&&!m&&dt(he))},[de,xe,te,De,O,Qe,ve]);o.useEffect(()=>{if(lt!==null&&document.getElementsByClassName("sps-modal__body").length>0){const he=()=>{j&&j(!1)},ye=document.getElementsByClassName("sps-modal__body")[0];return ye.addEventListener("scroll",he),()=>{ye.removeEventListener("scroll",he)}}},[]),o.useEffect(()=>{ce&&Le.current&&ES(Le.current,{scrollMode:"if-needed",block:"nearest",inline:"nearest"})},[te,ce]),o.useEffect(()=>{Q(k),k?Se.current&&Se.current.focus():pe(-1)},[k]),o.useEffect(()=>{G&&vt(G)},[G]),o.useEffect(()=>{!ce&&we.current&&(Te({value:""}),we.current.scrollTop=0),ce&&A&&A(Qe)},[ce]);const Ge=$?$/16:z,mt=Ge?{maxHeight:`${Ge}rem`}:{};function _n(he,ye){return ye?o.createElement(o.Fragment,null,he.split(ye).map((tt,Vt)=>ye.test(tt)?o.createElement("u",{key:Vt},tt):o.createElement(o.Fragment,{key:Vt},tt))):o.createElement(o.Fragment,null,he)}return wt(o.createElement("div",{className:It,id:M,"aria-activedescendant":te>-1?`${M}-option-${te}`:"",tabIndex:-1,ref:se,style:At,onMouseLeave:()=>pe(-1),"data-testid":J,...W},Ue,o.createElement("div",{className:Ft,ref:we,"data-testid":`${J}-options`,style:mt},!q&&!We.pending&&f&&ve.length===0&&o.createElement("div",{className:"sps-option-list__zero-state"},f),(q||We.pending)&&o.createElement("div",{className:"sps-option-list__loading"},o.createElement(Ua,null)),!q&&!We.pending&&ve.map((he,ye)=>{const tt=`${M}-option-${ye}`,Vt=CS(he.value,B,r),me=fc(et.current,r||"",he);return o.createElement("a",{key:tt,id:tt,role:L,"aria-selected":Vt,href:he.href,className:U("sps-option-list__option",he.caption&&"sps-option-list__option--has-caption",he.disabled&&"sps-option-list__option--disabled",he.bold&&"sps-option-list__option--bold",(Vt||me)&&"sps-option-list__option--selected",te===ye&&"sps-option-list__option--highlighted"),onClick:Ml=>Ne(Ml,he,me),onMouseOver:()=>pe(ye),tabIndex:-1,ref:te===ye?Le:null,"data-testid":`${J}-option-${ye}`},he.value&&he.value.icon&&o.createElement("i",{className:U("sps-icon","sps-option-list__option-icon",`sps-icon-${String(he.value.icon)}`)}),(!he.value||!he.value.icon&&rt)&&o.createElement("span",{className:"sps-option-list__option-icon-spacer"}),o.createElement("span",null,_n(he.text,We.replacementPattern)),he.caption&&o.createElement("div",{className:"sps-option-list__option-caption"},o.createElement("span",null,_n(he.caption,We.replacementPattern))))})),X&&(Z==null?void 0:Z.label)&&o.createElement("a",{className:U("sps-option-list__option","sps-option-list__special-action",te===ve.length&&"sps-option-list__option--highlighted",Z.disabled&&"sps-option-list__special-action--disabled"),href:X.href,target:X.href&&Z.newTab?"_blank":"_self",onClick:he=>Ne(he,X),onMouseOver:()=>pe(ve.length),"data-testid":`${J}-special-action`},Z.icon&&o.createElement("i",{className:U("sps-icon","sps-option-list__option-icon",`sps-icon-${String(Z.icon)}`)}),!Z.icon&&rt&&o.createElement("span",{className:"sps-option-list__option-icon-spacer"}),o.createElement("span",null,Z.label))))});Object.assign(Br,{displayName:"SpsOptionList"});function DS(e,t,n=[]){return o.useMemo(()=>{function r(a){return o.createElement(e,{...a,...t},a.children)}return r},n)}function Tt(e){return typeof e=="function"?e():e}const hc=function({children:e,elements:t}){if(t.length===0)return o.createElement(o.Fragment,null,e);const[n,r]=Array.isArray(t[0])?t[0]:[t[0]];return o.createElement(n,{...r??{}},o.createElement(hc,{elements:t.slice(1)},e))},Sc=function({children:e,providers:t=[],...n}){return o.createElement("div",{...n},o.createElement(hc,{elements:t},e))},NS=function({children:e,className:t,...n}){return o.createElement(Sc,{className:`sps-app ${t}`,...n},e)};function _t(e=[],t=[]){const n=Array.isArray(e)?v.flatten(e):[e],r=t.map(s=>Array.isArray(s)?s:[s]),a=new Array(r.length+1).fill(null).map(()=>[]);for(const s of n){let l=!1;for(let c=0;c<r.length;c+=1)for(const{type:p,props:f={}}of r[c])if(s.type===p&&Object.keys(f).every(u=>f[u]===s.props[u])){l=!0,a[c].push(s);break}l||a[a.length-1].push(s)}return a}function gc(e,t,n){const r=Object.entries(t).filter(([,s])=>typeof s!="string"&&s.deprecated).map(([s])=>s),a=r.map(s=>n[s]);o.useEffect(()=>{a.find(s=>typeof s<"u")&&console.warn(`The following prop(s) of ${e} are deprecated: ${r.join(", ")}`)},a)}function qa(e,t){const n=I.useRef(!1);I.useEffect(()=>{if(n.current)return e();n.current=!0},t)}function Ja(e,t,n){const r=o.useRef(t(...n));o.useEffect(()=>(document.addEventListener(e,r.current,{capture:!0}),()=>document.removeEventListener(e,r.current)),[]),o.useEffect(()=>{document.removeEventListener(e,r.current),r.current=t(...n),document.addEventListener(e,r.current,{capture:!0})},n)}function bc(e,t,n){return function(a){var s,l;!((s=e.current)!=null&&s.contains(a.target))&&!((l=t.current)!=null&&l.contains(a.target))&&n()}}function dr(e,t,n){const r=o.useRef(!1),[a,s]=o.useState(!1),l=o.useCallback(()=>{r.current?r.current=!1:s(!0)},[]),c=o.useCallback((p=!1)=>{s(!1),r.current=p,n&&n()},[]);return Ja("mousedown",bc,[e,t,c]),Ja("pointerdown",bc,[e,t,c]),{showPopup:a,doShowPopup:l,doHidePopup:c}}const vc=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),a=c=>r(c,"overflow")+r(c,"overflow-y"),s=c=>t.test(a(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(s(p[f]))return p[f];return null})(e)};let Za=0;function Pr({isOpen:e,rootRef:t}){o.useLayoutEffect(()=>{let n,r,a;if(e&&t.current){Za+=1,n=vc(t.current)||document.body,r=n===document.body?window.innerWidth-document.documentElement.clientWidth:n.offsetWidth-n.clientWidth,n.style.overflow="hidden";const s=window.getComputedStyle(n).paddingRight;if(n.style.paddingRight=s&&s!=="0px"?`calc(${s} + ${r}px)`:`${r}px`,n===document.body)if(a=document.getElementsByClassName("sps-navbar-container").item(0),a&&window.getComputedStyle(a).position==="fixed"){const l=window.getComputedStyle(a).paddingRight;a.style.paddingRight=l&&l!=="0px"?`calc(${l} + ${r}px)`:`${r}px`}else{const l=document.getElementsByTagName("nav").item(0);if(a=l==null?void 0:l.parentElement,a&&window.getComputedStyle(a).position==="fixed"){const c=window.getComputedStyle(a).paddingRight;a.style.paddingRight=c&&c!=="0px"?`calc(${c} + ${r}px)`:`${r}px`}}}return()=>{n&&(Za-=1,Za===0&&(n.style.overflow=null,n.style.paddingRight=null,a&&(a.style.paddingRight=null)))}},[e])}const kS={debounce:"number",disabled:"boolean",conformWidth:"boolean",formMeta:"SpsFormFieldMeta<string>",icon:"SpsIcon",onChange:"React.ChangeEventHandler",onSelectionChange:"(newValue: string) => void",placeholder:"string",suggestions:{type:`
|
|
1
|
+
(function(_,x){typeof exports=="object"&&typeof module<"u"?x(exports,require("react"),require("@spscommerce/utils"),require("moment-timezone"),require("@spscommerce/ds-shared"),require("@spscommerce/i18n"),require("react-dom"),require("@spscommerce/ds-colors"),require("@sps-woodland/tabs"),require("@react-stately/collections"),require("@sps-woodland/illustrations")):typeof define=="function"&&define.amd?define(["exports","react","@spscommerce/utils","moment-timezone","@spscommerce/ds-shared","@spscommerce/i18n","react-dom","@spscommerce/ds-colors","@sps-woodland/tabs","@react-stately/collections","@sps-woodland/illustrations"],x):(_=typeof globalThis<"u"?globalThis:_||self,x(_.DSReact={},_.React,_.utils,_.moment$5,_.dsShared,_.i18n,_.ReactDOM,_.dsColors,_.tabs,_.collections,_.illustrations))})(this,function(_,x,v,Ze,Y,Be,vo,Pa,Gh,or,Jl){"use strict";var SM=Object.defineProperty;var Hh=_=>{throw TypeError(_)};var gM=(_,x,v)=>x in _?SM(_,x,{enumerable:!0,configurable:!0,writable:!0,value:v}):_[x]=v;var jt=(_,x,v)=>gM(_,typeof x!="symbol"?x+"":x,v),Wh=(_,x,v)=>x.has(_)||Hh("Cannot "+v);var rr=(_,x,v)=>(Wh(_,x,"read from private field"),v?v.call(_):x.get(_)),Ba=(_,x,v)=>x.has(_)?Hh("Cannot add the same private member more than once"):x instanceof WeakSet?x.add(_):x.set(_,v),Sn=(_,x,v,Ze)=>(Wh(_,x,"write to private field"),Ze?Ze.call(_,v):x.set(_,v),v);var Qn,In,Mn;function Zl(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 o=Zl(x),ar=Zl(Ze);function Xl(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=Xl(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function U(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Xl(e))&&(r&&(r+=" "),r+=t);return r}const Yh="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let ht=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+=Yh[n[e]&63];return t};function gn(e){return x.useRef(e||ht())}function St(e,t){const n=gn(e),r=x.useRef(`${n.current}_ctrl`);return x.useEffect(()=>{t&&(t.id=r.current,t.update())},[t]),{wrapperId:n.current||void 0,controlId:r.current}}function Aa(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Fa,Ql;function Uh(){if(Ql)return Fa;Ql=1;var e="[object Object]";function t(h){var S=!1;if(h!=null&&typeof h.toString!="function")try{S=!!(h+"")}catch{}return S}function n(h,S){return function(y){return h(S(y))}}var r=Function.prototype,a=Object.prototype,s=r.toString,l=a.hasOwnProperty,c=s.call(Object),p=a.toString,f=n(Object.getPrototypeOf,Object);function m(h){return!!h&&typeof h=="object"}function u(h){if(!m(h)||p.call(h)!=e||t(h))return!1;var S=f(h);if(S===null)return!0;var y=l.call(S,"constructor")&&S.constructor;return typeof y=="function"&&y instanceof y&&s.call(y)==c}return Fa=u,Fa}var zh=Uh();const ec=Aa(zh),Ct=new Set,sr=new Set,qt=new Set,yo=new Set;function tc(e){Ct.has(e)||qt.has(e)||yo.has(e)||sr.add(e)}function nc(e){Ct.has(e)||qt.has(e)||sr.has(e)||yo.add(e)}const pt=ar.default||ar,ir="MM/DD/YYYY",jh="MM/DD/YYYY hh:mm A",qh="MM/DD/YYYY HH:mm",Jh="hh:mm A",Zh="HH:mm",Xh=/^(\d{1,2})\/(\d{1,2})\/(\d{4})$/,_r=Symbol("Date Parse Error");function lr(e){return pt.isMoment(e)?e.year()*1e4+(e.month()+1)*100+e.date():e.year*1e4+e.month*100+e.date}const ne=Object.freeze({createFrom(e,t){if(!e)return null;if(typeof e=="string"){if(t){const n=pt(e,t,!0);if(n.isValid())return Object.freeze({year:n.year(),month:n.month()+1,date:n.date()})}else{const n=Xh.exec(e);if(n){const[,r,a,s]=n;return Object.freeze({year:Number(s),month:Number(r),date:Number(a)})}}return Object.freeze({[_r]:!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=pt(e,t,!0):n=pt(e):pt.isMoment(e)?n=e:n=ne.toMoment(e),n!==null&&pt.isMoment(n)&&n.isValid()?n:Object.freeze({[_r]:!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=ne.getRangeSeparator(t),r=new RegExp(`[^\\d]*${n}[^\\d]*`);return e.split(r).slice(0,2).map(a=>ne.createFrom(a,t))}else return e.split(/[^\d]*-[^\d]*/).slice(0,2).map(n=>ne.createFrom(n))},isValid(e){var t;return e?pt.isMoment(e)?e.isValid():typeof e=="object"&&typeof e.year=="number"&&typeof e.month=="number"&&typeof e.date=="number"&&((t=ne.toMoment(e))==null?void 0:t.isValid()):!1},nullifyInvalidDate(e){return ne.isValid(e)?e:null},toMoment(e){return e?pt.isMoment(e)?e:pt({...e,month:e.month-1}):null},toString(e,t){const n=ne.toMoment(e);return n&&n.isValid()?n.format(t||ir):""},toStringRange(e,t){if(!e)return"";const n=ne.getRangeSeparator(t);return e.slice(0,2).map(r=>ne.toString(r,t)).join(n)},toDateTimeString(e,t=!1,n){return e&&pt.isMoment(e)&&e.isValid()?n?t?e.format(`${n} ${Zh}`):e.format(`${n} ${Jh}`):t?e.format(qh):e.format(jh):""},toDateTimeStringRange(e,t=!1,n){if(!e)return"";const r=ne.getRangeSeparator(n);return e.map(a=>ne.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,s]=t.map(lr);return a&&s&&(n&&r>=a&&r<=s||!n&&r>a&&r<s)},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=pt(),r=n.clone().subtract(pt.duration(e.definition));return[ne.createFrom(r,t),ne.createFrom(n,t)]},createDateTimeRangeFromPreset(e){if(typeof e.definition=="function")return e.definition();const t=pt().subtract(pt.duration(e.definition)).startOf("day"),n=pt().endOf("day");return[t,n]},splitMomentInDateTimeParts(e,t=!1,n,r=!1){let a="";t?a=r?"23:59":"00:00":a=r?"11:59":"12:00";const s=r?"PM":"AM";return e&&pt.isMoment(e)&&e.isValid()?ne.toDateTimeString(e,t,n).split(" "):["",a,t?void 0:s]},getCurrentMoment(){return pt()},validateTimeString(e,t=!1){if(!e)return!0;const n=e.split(":"),r=n[0]||"0",a=n[1]||"0",s=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&&s>=0&&s<=23&&l>=0&&l<=59:c&&(!Number.isNaN(s)&&r.length===1||s>=1)&&s<=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 s=r<10?`0${r}`:`${r}`,l=a<10?`0${a}`:`${a}`;return`${s}:${l}`}else{const s=r===0?"12":r<10?`0${r}`:`${r}`,l=a<10?`0${a}`:`${a}`;return`${s}:${l}`}}}),Va=["01:00","02:00","03:00","04:00","05:00","06:00","07:00","08:00","09:00","10:00","11:00","12:00"],$a=["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 To=ir;function rc(e){To=e}const Lr=function(t){if(Array.isArray(t)){const n=Lr(t[0]),r=Lr(t[1]);return n||r}if(t&&t.hasOwnProperty("year")){if(t[_r])return{dateFormat:To};if(!ne.isValid(t))return{dateValidity:!0}}return null};Ct.add("dateFormat"),Ct.add("dateValidity");const oc=function(t){if(Array.isArray(t)){const n=Lr(t);if(n)return n;if(t&&ne.isBefore(t[1],t[0]))return{dateRangeOrder:!0}}return null};Ct.add("dateRangeOrder");const ac=function({minDate:t,maxDate:n}){function r(a){const s=ne.isBefore(a,t),l=ne.isAfter(a,n),c={minExceeded:s?ne.toString(t,To):null,maxExceeded:l?ne.toString(n,To):null};return s||l?{dateConstraint:c}:null}return function(s){if(!s)return null;if(Array.isArray(s)){const l=r(s[0]),c=r(s[1]);return l||c}return s.hasOwnProperty("year")?r(s):null}};Ct.add("dateConstraint");const Qh=Object.freeze(Object.defineProperty({__proto__:null,date:Lr,dateConstraint:ac,dateRange:oc,setDateFormat:rc},Symbol.toStringTag,{value:"Module"}));function tn(e,t){for(const n of[].concat(e)){const r=t(n);if(r)return r}return null}const eS=function(t){function n(r){return Number(r)>=t?null:{min:t}}return r=>tn(r,n)};Ct.add("min");const tS=function(t){function n(r){return Number(r)<=t?null:{max:t}}return r=>tn(r,n)};sr.add("max");const nS=function(t){return typeof t>"u"||t===null||t===""||Number.isNaN(t)||(t==null?void 0:t.length)===0?{required:!0}:null};sr.add("required");const rS=function(t){function n(r){return r===void 0||r.toString().length<t?{minLength:t}:null}return r=>tn(r,n)};Ct.add("minLength");const oS=function(t){function n(r){return r==null||Array.isArray(r)&&r.length<t?{minLengthArray:t}:null}return r=>n(r)};Ct.add("minLengthArray");const aS=function(t){function n(r){return r===void 0||r.toString().length<=t?null:{maxLength:t}}return r=>tn(r,n)};qt.add("maxLength");const sS=function(t){function n(r){return r==null||Array.isArray(r)&&r.length<=t?null:{maxLengthArray:t}}return r=>n(r)};Ct.add("maxLengthArray");const iS=function(t){const n=t instanceof RegExp?t:new RegExp(t);function r(a){return n.test(a)?null:{pattern:t}}return a=>tn(a,r)};Ct.add("pattern");const lS=function(e){function t(n){return new RegExp("^\\p{L}*$","u").test(n)?null:{alpha:!0}}return tn(e,t)};qt.add("alpha");const cS=function(e){function t(n){return/^[0-9,. ]*$/.test(n)?null:{numeric:!0}}return tn(e,t)};qt.add("numeric");const dS=function(e){function t(n){return/^-?[0-9,. ]*$/.test(n)?null:{positiveOrNegativeNumber:!0}}return tn(e,t)};qt.add("positiveOrNegativeNumber");const pS=function(e){function t(n){return/^[^0-9]*$/.test(n)?null:{nonNumeric:!0}}return tn(e,t)};qt.add("nonNumeric");const Eo=Object.freeze({...Qh,min:eS,max:tS,required:nS,minLength:rS,minLengthArray:oS,maxLength:aS,maxLengthArray:sS,pattern:iS,alpha:lS,numeric:cS,nonNumeric:pS,positiveOrNegativeNumber:dS,OnBlurErrorKeys:Ct});function wo(e,t=[]){const n=t.reduce((r,a)=>Object.assign(r,a(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 uS(e,t={},n=[]){for(const[r,a]of Object.entries(t))a===0?tc(r):a===2&&nc(r);return o.useCallback(e,n)}class Bn{constructor(t,n){jt(this,"validators",[]);Ba(this,Qn,null);Ba(this,In,null);Ba(this,Mn,null);jt(this,"preventativeErrors",[]);jt(this,"submitted",!1);this.path=t,this.update=n}get errors(){return rr(this,Qn)===null&&rr(this,In)===null&&rr(this,Mn)===null?null:{...rr(this,Qn)??{},...rr(this,In)??{},...rr(this,Mn)??{}}}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=wo(t,this.validators);let s={onSubmit:{},onChange:{},onBlur:{}};a&&(s=Object.keys(a).reduce((l,c)=>(yo.has(c)?l.onSubmit[c]=a[c]:sr.has(c)?l.onChange[c]=a[c]:l.onBlur[c]=a[c],l),s)),(typeof n>"u"||n===Jt.ON_CHANGE)&&Sn(this,In,Object.keys(s.onChange).length===0?null:s.onChange),(typeof n>"u"||n===Jt.ON_BLUR)&&Sn(this,Mn,Object.keys(s.onBlur).length===0?null:s.onBlur),(typeof n>"u"||n===Jt.ON_SUBMIT)&&(Sn(this,Qn,Object.keys(s.onSubmit).length===0?null:s.onSubmit),Sn(this,In,Object.keys(s.onChange).length===0?null:s.onChange),Sn(this,Mn,Object.keys(s.onBlur).length===0?null:s.onBlur)),r||this.update(),this.isFocused()&&this.onFocus&&this.onFocus()}else this.errors&&(Sn(this,Qn,null),Sn(this,Mn,null),Sn(this,In,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(Eo.required)>-1}isSubmitted(){return this.submitted}onFocus(){}onBlur(){}}Qn=new WeakMap,In=new WeakMap,Mn=new WeakMap;class Or extends Bn{constructor(){super(...arguments);jt(this,"id",ht());jt(this,"focused",!1);jt(this,"pristine",!0)}setValue(n){if(this.preventativeErrors=[],this.validators&&this.validators.length>0){const r=wo(n,this.validators);if(r&&Object.keys(r).filter(s=>qt.has(s)).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 Pn extends Or{constructor(n,r,a){super(a?r:n,a||r);jt(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 Co(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 sc extends Pn{inferMembers(t){this.fields={};for(const n of Object.keys(t))this.fields[n]=this.inferSpsControl(t[n],n)}}class ic extends Pn{inferMembers(t){this.fields=t.map((n,r)=>this.inferSpsControl(n,String(r)))}}function Co(e,t,n){return e instanceof Bn?(e.path=t,e.update=n,e):Array.isArray(e)?new ic(e,t,n):ec(e)?new sc(e,t,n):new Or(t,n)}function Rr(e,t){return t.length===0||!e?e:Rr(e.fields[t[0]],t.slice(1,t.length))}function Ka(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,s)=>[...a,...Ka(s,t)],[])}return Ka(e.fields[n],t)}function Ha(e,t,n){for(const r of Object.keys(t)){const a=t[r];for(const s of Ka(e,r.split(".")))s&&a&&n(s,a)}}function Do(e,t,n,r=!1,a=!1){Ha(t,n,(s,l)=>{s.validators=typeof l=="function"?l(e):l,r&&s.validate(v.getPath(e,s.path),void 0,a)})}function Wa(e,t){const n=t[0];return t=t.slice(1),Array.isArray(e)?e.map((r,a)=>a===Number(n)?Wa(r,t):r):ec(e)?Object.keys(e).reduce((r,a)=>Object.assign(r,{[a]:a===n?Wa(e[a],t):e[a]}),{}):e}function mS(e){if(typeof e!="object"||e===null||Array.isArray(e))throw new TypeError("The initial value of useSpsForm() hook must be an object.")}function lc(e,t={}){mS(e);const[,n]=x.useState({}),r=x.useRef(!1);r.current=!1;const a=x.useRef(t),s=x.useCallback(h=>{var C,T;const S=u.current;let y;if(h)if(h.path)if(h.markAsBlurred){const w=Rr(S.formMeta,h.path);if(w){w.focused=!1;const D=v.getPath(S.formValue,h.path);w.validate(D,Jt.ON_BLUR)}}else if(h.newValidators){if(a.current){const w=h.path.join(".");a.current={...a.current,[w]:h.newValidators},Do(S.formValue,S.formMeta,a.current,!0)}}else if(h.markAsSubmitted){const w=Rr(S.formMeta,h.path);if(w){w.submitted=!0;const D=v.getPath(S.formValue,h.path);w.validate(D,Jt.ON_SUBMIT)}}else y=Wa(S.formValue,h.path),v.setPath(y,h.path,h.value);else y=h.value;if((C=h==null?void 0:h.updateFormOptions)!=null&&C.validators&&(a.current={...a.current,...h.updateFormOptions.validators},Do(S.formValue,S.formMeta,a.current,((T=h.updateFormOptions)==null?void 0:T.runValidators)??!0)),y){S.formMeta.submitted=!1,v.deepFreeze(y);const w=v.diff(S.formValue,y);for(const{type:M,key:I,parentPath:k,objects:[,A]}of w){const G=Rr(S.formMeta,k);if(typeof I!="symbol"&&G){let E;switch(M){case v.DiffChange.ADDITION:G.fields[I]=Co(A[I],[...k,I],c);break;case v.DiffChange.DELETION:Array.isArray(G.fields)?G.fields[I]=void 0:delete G.fields[I];break;case v.DiffChange.ALTERATION:E=Co(A[I],[...k,I],c),(E instanceof Pn&&!(G.fields[I]instanceof Pn)||!(E instanceof Pn)&&G.fields[I]instanceof Pn)&&(E.pristine=!1,G.fields[I]=E);break}}}const D=new Set;if(w.filter(M=>M.type===v.DiffChange.DELETION).reduce((M,I)=>(M.has(I.parentPath)||M.add(I.parentPath),M),D),Array.from(D).forEach(M=>{const I=Rr(S.formMeta,M);Array.isArray(I.fields)&&(I.fields=I.fields.filter(k=>k!==void 0))}),a.current){Do(y,S.formMeta,a.current);const M=new Set;t&&Ha(S.formMeta,t,(I,k)=>{typeof k=="function"&&(I.validate(v.getPath(y,I.path)),M.add(I))});for(const{type:I,key:k,parentPath:A,objects:[,G]}of w)if(typeof k!="symbol"){let E=S.formMeta,R=y;if(E){for(const O of A)E=E.fields[O],R=R[O],M.has(E)||E.validate(R,Jt.ON_CHANGE);if(I===v.DiffChange.ADDITION||I===v.DiffChange.ALTERATION){const O=E.fields[k];if(!M.has(O)&&(E.fields[k].validate(G[k],Jt.ON_CHANGE),I===v.DiffChange.ADDITION&&O.fields))for(const[P,z]of Object.entries(O.fields))z.validate(G[k][P],Jt.ON_CHANGE)}}}}}u.current={...S,formValue:y||S.formValue},r.current||n({})},[]),l=x.useCallback((h,S)=>{h||S?s({value:h,updateFormOptions:S}):s()},[s]),c=x.useCallback((h,S,y=!1,C,T=!1)=>{h?s({path:h,value:S,markAsBlurred:y,newValidators:C,markAsSubmitted:T}):l()},[s,l]),p=x.useMemo(()=>{v.deepFreeze(e);const h=Co(e,[],c);return t&&Do(e,h,t,!1,!0),h},[]),f=x.useCallback(()=>(u.current.formMeta.markAsDirty(),a.current&&Ha(u.current.formMeta,a.current,(h,S)=>{(typeof S=="function"||Array.isArray(S))&&h.validate(v.getPath(u.current.formValue,h.path))}),u.current.formMeta.isValid()),[]),m=x.useCallback(()=>u.current.formValue,[]),u=x.useRef({formValue:e,formMeta:p,updateForm:l,validateForm:f,getCurrentFormValue:m});return u.current}const nt=o.forwardRef((e,t)=>{const{className:n,children:r,focusInputOnClick:a,formControl:s,formMeta:l,inputRef:c,onClick:p,...f}=e,m=o.useRef(),h=c||(t||m);function S(){h&&h!==t&&h.current&&h.current.focus()}function y(){h&&h!==t&&h.current&&l&&l instanceof Or&&l.markAsFocused()}function C(){h&&h!==t&&h.current&&l&&l instanceof Or&&l.markAsBlurred()}const T=U("sps-form-group",(s&&s.isRequired()||l&&l.isRequired())&&"sps-form-group--required",(s&&!s.isValid()||l&&l.isVisibilyInvalid())&&"sps-form-group--error",l&&l.hasPreventativeErrors()&&"sps-form-group--preventative-error",n);function w(D){a&&S(),p&&p(D)}return o.useEffect(()=>{function D(M){M.target.classList.contains("sps-form-control__clear-btn")&&M.preventDefault()}return document.addEventListener("mousedown",D),()=>{document.removeEventListener("mousedown",D)}},[]),o.createElement("div",{...f,className:T,ref:t,tabIndex:-1,onClick:w,onFocus:y,onBlur:C},r)});Object.assign(nt,{displayName:"SpsFormComponentWrapper"});function cc(e){return typeof e=="object"&&e!=null&&e.nodeType===1}function dc(e,t){return(!t||e!=="hidden")&&e!=="visible"&&e!=="clip"}function Ga(e,t){if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){var n=getComputedStyle(e,null);return dc(n.overflowY,t)||dc(n.overflowX,t)||function(r){var a=function(s){if(!s.ownerDocument||!s.ownerDocument.defaultView)return null;try{return s.ownerDocument.defaultView.frameElement}catch{return null}}(r);return!!a&&(a.clientHeight<r.scrollHeight||a.clientWidth<r.scrollWidth)}(e)}return!1}function No(e,t,n,r,a,s,l,c){return s<e&&l>t||s>e&&l<t?0:s<=e&&c<=n||l>=t&&c>=n?s-e-r:l>t&&c<n||s<e&&c>n?l-t+a:0}var pc=function(e,t){var n=window,r=t.scrollMode,a=t.block,s=t.inline,l=t.boundary,c=t.skipOverflowHiddenElements,p=typeof l=="function"?l:function(Le){return Le!==l};if(!cc(e))throw new TypeError("Invalid target");for(var f,m,u=document.scrollingElement||document.documentElement,h=[],S=e;cc(S)&&p(S);){if((S=(m=(f=S).parentElement)==null?f.getRootNode().host||null:m)===u){h.push(S);break}S!=null&&S===document.body&&Ga(S)&&!Ga(document.documentElement)||S!=null&&Ga(S,c)&&h.push(S)}for(var y=n.visualViewport?n.visualViewport.width:innerWidth,C=n.visualViewport?n.visualViewport.height:innerHeight,T=window.scrollX||pageXOffset,w=window.scrollY||pageYOffset,D=e.getBoundingClientRect(),M=D.height,I=D.width,k=D.top,A=D.right,G=D.bottom,E=D.left,R=a==="start"||a==="nearest"?k:a==="end"?G:k+M/2,O=s==="center"?E+I/2:s==="end"?A:E,P=[],z=0;z<h.length;z++){var L=h[z],re=L.getBoundingClientRect(),B=re.height,Z=re.width,H=re.top,q=re.right,ae=re.bottom,$=re.left;if(r==="if-needed"&&k>=0&&E>=0&&G<=C&&A<=y&&k>=H&&G<=ae&&E>=$&&A<=q)return P;var j=getComputedStyle(L),oe=parseInt(j.borderLeftWidth,10),ie=parseInt(j.borderTopWidth,10),J=parseInt(j.borderRightWidth,10),V=parseInt(j.borderBottomWidth,10),W=0,X=0,te="offsetWidth"in L?L.offsetWidth-L.clientWidth-oe-J:0,pe="offsetHeight"in L?L.offsetHeight-L.clientHeight-ie-V:0,ce="offsetWidth"in L?L.offsetWidth===0?0:Z/L.offsetWidth:0,Q="offsetHeight"in L?L.offsetHeight===0?0:B/L.offsetHeight:0;if(u===L)W=a==="start"?R:a==="end"?R-C:a==="nearest"?No(w,w+C,C,ie,V,w+R,w+R+M,M):R-C/2,X=s==="start"?O:s==="center"?O-y/2:s==="end"?O-y:No(T,T+y,y,oe,J,T+O,T+O+I,I),W=Math.max(0,W+w),X=Math.max(0,X+T);else{W=a==="start"?R-H-ie:a==="end"?R-ae+V+pe:a==="nearest"?No(H,ae,B,ie,V+pe,R,R+M,M):R-(H+B/2)+pe/2,X=s==="start"?O-$-oe:s==="center"?O-($+Z/2)+te/2:s==="end"?O-q+J+te:No($,q,Z,oe,J+te,O,O+I,I);var se=L.scrollLeft,we=L.scrollTop;R+=we-(W=Math.max(0,Math.min(we+W/Q,L.scrollHeight-B/Q+pe))),O+=se-(X=Math.max(0,Math.min(se+X/ce,L.scrollWidth-Z/ce+te)))}P.push({el:L,top:W,left:X})}return P};function uc(e){return e===Object(e)&&Object.keys(e).length!==0}function fS(e,t){t===void 0&&(t="auto");var n="scrollBehavior"in document.body.style;e.forEach(function(r){var a=r.el,s=r.top,l=r.left;a.scroll&&n?a.scroll({top:s,left:l,behavior:t}):(a.scrollTop=s,a.scrollLeft=l)})}function hS(e){return e===!1?{block:"end",inline:"nearest"}:uc(e)?e:{block:"start",inline:"nearest"}}function ko(e,t){var n=e.isConnected||e.ownerDocument.documentElement.contains(e);if(uc(t)&&typeof t.behavior=="function")return t.behavior(n?pc(e,t):[]);if(n){var r=hS(t);return fS(pc(e,r),r.behavior)}}const Ya=Object.freeze(Object.defineProperty({__proto__:null,default:ko},Symbol.toStringTag,{value:"Module"})),SS={alt:"string",size:"SpinnerSize",title:"string"};function Ua(e){const{alt:t,className:n,size:r=Y.SpinnerSize.MEDIUM,"data-testid":a,title:s,unsafelyReplaceClassName:l,...c}=e,{t:p}=Be.useWoodlandLanguage(),f=t||s||p("spinner.defaultAltText",{defaultValue:"Loading..."}),m=U(l||"sps-spinner",`sps-spinner--${r}`,n);return o.createElement("i",{className:m,"data-testid":a,title:f,...c})}Object.assign(Ua,{props:SS,displayName:"SpsSpinner"});const gS=60;function xo(e){return typeof e>"u"?"inherit":`${e}px`}function za(e){switch(e){case Y.Position.TOP_LEFT:return Y.Position.BOTTOM_LEFT;case Y.Position.TOP_MIDDLE:return Y.Position.BOTTOM_MIDDLE;case Y.Position.TOP_RIGHT:return Y.Position.BOTTOM_RIGHT;case Y.Position.RIGHT_TOP:return Y.Position.LEFT_TOP;case Y.Position.RIGHT_MIDDLE:return Y.Position.LEFT_MIDDLE;case Y.Position.RIGHT_BOTTOM:return Y.Position.LEFT_BOTTOM;case Y.Position.BOTTOM_RIGHT:return Y.Position.TOP_RIGHT;case Y.Position.BOTTOM_MIDDLE:return Y.Position.TOP_MIDDLE;case Y.Position.BOTTOM_LEFT:return Y.Position.TOP_LEFT;case Y.Position.LEFT_BOTTOM:return Y.Position.RIGHT_BOTTOM;case Y.Position.LEFT_MIDDLE:return Y.Position.RIGHT_MIDDLE;case Y.Position.LEFT_TOP:return Y.Position.RIGHT_TOP}}function bS(e,t,n,r,a,s,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,[S,y]=e.split(" ");let C,T,w,D;switch(S){case"top":w=t.height-n.top-m-s[0];break;case"left":T=t.width-n.left-h-s[0];break;case"right":D=n.right+h-s[0];break;case"bottom":C=n.bottom+m-s[0];break;default:throw new Error(`Invalid position ${e}`)}switch(y){case"left":D=n.left+h+s[1];break;case"top":C=n.top+m+s[1];break;case"middle":S==="top"||S==="bottom"?D=n.left+h+n.width/2-a/2+s[1]:(S==="left"||S==="right")&&(C=n.top+m+n.height/2-r.height/2+s[1]);break;case"bottom":w=t.height-n.bottom-m+s[1];break;case"right":T=t.width-n.right-h+s[1];break;default:throw new Error(`Invalid position ${e}`)}return[C,T,w,D]}function An(e,t,n,{altPosition:r,setMinWidth:a=!1,setWidth:s=!1,parentElementRef:l,fixed:c=!1,offsets:p=[0,0]}){if(e.current&&t.current){const f=e.current.getBoundingClientRect(),m=t.current.getBoundingClientRect(),u=Math.max(document.documentElement.clientHeight,window.innerHeight||0),h=document.documentElement.getBoundingClientRect().width;let y=((l==null?void 0:l.current)??document.documentElement).getBoundingClientRect();c&&(y={x:0,y:0,width:h,height:u,top:0,left:0,bottom:u,right:h,toJSON(){return{width:h,height:u,top:0,left:0,bottom:u,right:h}}});const[C,T]=n.split(" ");let w=n;if(r&&(C==="top"&&m.top-f.height<gS||C==="right"&&m.right+f.width>h||C==="bottom"&&m.bottom+f.height>u||C==="left"&&m.left-f.width<0)&&(w=r),T==="left"&&m.left+f.width+((p==null?void 0:p[1])??0)>document.documentElement.getBoundingClientRect().right)switch(C){case"bottom":w=Y.Position.BOTTOM_RIGHT;break;case"top":w=Y.Position.TOP_RIGHT;break}const D=a?Math.max(m.width,f.width):f.width,M=s?m.width:D,[I,k,A,G]=bS(w,y,m,f,M,p,l,c),E={top:xo(I),right:xo(k),bottom:xo(A),left:xo(G)};return c&&(E.position="fixed",E.zIndex=Y.ZStratum.BAR),a&&(E.minWidth=`${m.width}px`),s&&(E.width=`${m.width}px`),[E,w===r]}return[{},!1]}const Mt=x.createContext(null);function cr(e,t=[]){const n=x.useContext(Mt);return x.useMemo(()=>r=>{const s=n&&n.parentElementRef&&n.parentElementRef.current||document.body;let l=null,c=s.lastElementChild;for(;c&&c!==s.firstElementChild;){if(c.hasAttribute("data-portalid")&&c.getAttribute("data-portalid")===e){l=c;break}c=c.previousElementSibling}if(l)s.contains(l)||s.appendChild(l);else{l=document.createElement("div"),l.setAttribute("data-portalid",e);for(const p of t)l.classList.add(p);s.appendChild(l)}return vo.createPortal(r,l)},[n])}const ja=["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","1","2","3","4","5","6","7","8","9","0"];async function mc(e,t,n,r,a,s){const l=typeof e.options=="function"?e.options(t.value):e.options||[],c=l instanceof Promise,p=u=>u.replace(/([.?*+^$[\]\\(){}|-])/g,"");n({pending:c}),s.current=c?l:null;const f=c?await l||[]:l||[];if(c&&s.current!==l)return;let m=Array.from(f).filter(Boolean).map(u=>new Y.SpsOptionListOption(u,typeof u=="function"?{textKey:"label",captionKey:"caption"}:{textKey:e.textKey,captionKey:e.captionKey}));if(e.nullOption&&m.unshift(new Y.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 S=new RegExp(u,"i"),y=p(h.text);return e.filterByTextAndCaptionKey?S.test(y)||S.test(p(h.caption)):S.test(y)})}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 vS(e,t,n){const[r,a]=o.useState(Object.freeze([])),[s,l]=o.useState(!1),c=o.useRef(null),p=o.useRef(e.options);(typeof e.options!="function"||e.disableOptionsMemoization)&&(p.current=e.options);const f=o.useMemo(()=>typeof p.current=="function"?v.debounce(mc,typeof e.searchDebounce<"u"?e.searchDebounce:500):mc,[p.current,e.disabledOptions]);return o.useEffect(()=>{f(e,t,n,a,l,c)},[p.current,t.value,e.disabledOptions]),[r,s]}class bn{constructor(t,n){jt(this,"nativeEvent");jt(this,"currentTarget");jt(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 yS(e,t){return{...e,...t}}function Zt(e){return x.useReducer(yS,e)}function TS({hideInlineSearch:e,options:t,onSearchChange:n,search:r="",searchPlaceholder:a="Search…",searchInputRef:s}){const[l,c]=Zt({isAsync:typeof t=="function",pending:!1,value:r,replacementPattern:null}),p=o.useCallback(S=>{c({value:S.target.value}),n&&n(S)},[n]),f=o.useCallback(S=>{S.nativeEvent.stopImmediatePropagation(),S.stopPropagation()},[]),m=o.useCallback(S=>{S.nativeEvent.stopImmediatePropagation(),c({value:""}),s!=null&&s.current&&(n&&n(new bn(s.current)),s.current.focus())},[n]),u=S=>{S&&(["Tab","Escape","Enter","Up","ArrowUp","Down","ArrowDown"].includes(S.key)||S.stopPropagation())};return o.useEffect(()=>{c({value:r})},[r]),[l.isAsync&&!e?o.createElement("div",{className:"sps-option-list__search sps-form-group sps-text-input"},o.createElement("div",{className:"sps-form-control"},!l.value&&o.createElement("i",{className:"sps-icon sps-icon-filter sps-text-input__icon"}),o.createElement("input",{type:"text",className:"sps-text-input__input",placeholder:a,ref:s,value:l.value,onChange:p,onClick:f,onKeyDown:u}),l.value&&o.createElement("i",{className:"sps-icon sps-icon-x-circle sps-form-control__clear-btn",onClick:m}))):o.createElement(o.Fragment,null),l,c]}const ES=ko||Ya,wS=["Tab","Escape","Enter","Up","ArrowUp","Down","ArrowDown"];function CS(e,t,n){return n?(e&&e[n])===(t&&t[n]):e===t}function fc(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 Br=o.forwardRef((e,t)=>{const{captionKey:n,comparisonKey:r,disabledOptions:a,options:s,tall:l,textKey:c,valueKey:p,zeroState:f,hideInlineSearch:m,onSearchChange:u,search:h,searchDebounce:S,searchPlaceholder:y,onSpecialActionSelect:C,attachTo:T,className:w,conformWidth:D,id:M,ignoreWidthStyles:I,isOpen:k,keepOpen:A,keyDown:G,nullOption:E,onOptionListChanged:R,onOptionSelected:O,onPositionFlip:P,onSelfToggle:z,optionRole:L,positionOverride:re,selectedOption:B,specialAction:Z,unsafelyReplaceClassName:H,loading:q,filterByTextAndCaptionKey:ae,maxHeightPx:$,maxHeightRem:j,disableOptionsMemoization:oe,disableDefaultOptionsFiltering:ie,"data-testid":J,typeaheadEvent:V,...W}=e,X=o.useMemo(()=>Z?new Y.SpsOptionListOption(Z,{textKey:"label",captionKey:"caption"}):null,[Z]),[te,pe]=o.useState(-1),[ce,Q]=o.useState(k),se=t||o.useRef(null),we=o.useRef(null),Le=o.useRef(null),wt=cr("sps-option-list-portal"),lt=o.useContext(Mt),[ct,Xe]=re||[Y.Position.BOTTOM_LEFT,Y.Position.TOP_LEFT],[[At,Qe],Ke]=o.useState([{},!1]),Se=o.useRef(null),[Ue,We,Te]=TS({...e,searchInputRef:Se}),[ve,rt]=vS(e,We,Te);o.useEffect(()=>{V&&vt(V)},[V]),o.useEffect(()=>{Ke(ce?An(se,T,ct,{altPosition:Xe,setMinWidth:!I,setWidth:!I&&D,...lt}):[{},!1])},[ce,ct,Xe,ve]),o.useEffect(()=>{let he;return ce&&(he=()=>{ce&&Ke(An(se,T,ct,{altPosition:Xe,setMinWidth:!I,setWidth:!I&&D,...lt}))},document.addEventListener("scroll",he)),()=>{he&&document.removeEventListener("scroll",he)}},[ce]),o.useEffect(()=>{pe(-1)},[We]);const It=U(H||"sps-option-list","z-stratum-dropdown",ce&&"sps-option-list--open",We.isAsync&&"sps-option-list--searchable",Qe&&"sps-option-list--opens-upward",Z&&Z.label&&"sps-option-list--has-special-action",w),Ft=U(H||"sps-option-list__options",l&&"sps-option-list__options--tall"),xe=o.useCallback(()=>{ce||(Q(!0),Se.current&&Se.current.focus(),pe(-1),z&&z(!0))},[ce,z]),de=o.useCallback(()=>{ce&&(Q(!1),pe(-1),z&&z(!1))},[ce,z]),De=o.useCallback((he,ye)=>{ye||he&&!he.disabled&&(typeof he.value=="function"?(he.value(),C&&C()):typeof O=="function"&&O(he.value),A||de())},[O,de]),Ne=o.useCallback((he,ye,tt)=>{he.stopPropagation(),De(ye,tt)},[De]),et=o.useRef(a||[]);et.current=a||[];const Oe=o.useCallback(he=>{switch(he.key){case"Tab":case"Escape":de();break;case"Enter":if(te>-1){const ye=ve[te]||X;he.preventDefault();const tt=!!ye&&fc(et.current,r||"",ye);!tt&&ye&&typeof O=="function"&&typeof ye.value=="function"?ye.value():ye&&De(ye,tt)}break;case"Up":case"ArrowUp":{let ye=te;Qe?te<=-1?ye=ve.length-1:te===0?Z&&(ye=ve.length):te<ve.length&&(ye=te-1):te>-1&&(ye=te-1),ye!==te&&(he.preventDefault(),pe(ye));break}case"Down":case"ArrowDown":{xe();let ye=te;Qe?te!==-1&&(te>=ve.length?ye=0:te===ve.length-1?ye=-1:ye=te+1):te<ve.length-1+ +!!Z&&(ye=te+1),ye!==te&&(he.preventDefault(),pe(ye));break}default:xe()}},[de,xe,te,De,O,Qe,ve]),dt=o.useCallback(he=>{xe();const ye=ve.findIndex(tt=>{if(tt.textKey){const Vt=tt.textKey;return tt.value[Vt].toLowerCase().charAt([0])===he.key.toLocaleLowerCase()}return tt.value.toString().toLowerCase().charAt([0])===he.key.toLocaleLowerCase()});ye>-1&&pe(ye)},[ve]),vt=o.useCallback(he=>{he&&(wS.includes(he.key)?Oe(he):ja.includes(he.key)&&!m&&dt(he))},[de,xe,te,De,O,Qe,ve]);o.useEffect(()=>{if(lt!==null&&document.getElementsByClassName("sps-modal__body").length>0){const he=()=>{z&&z(!1)},ye=document.getElementsByClassName("sps-modal__body")[0];return ye.addEventListener("scroll",he),()=>{ye.removeEventListener("scroll",he)}}},[]),o.useEffect(()=>{ce&&Le.current&&ES(Le.current,{scrollMode:"if-needed",block:"nearest",inline:"nearest"})},[te,ce]),o.useEffect(()=>{Q(k),k?Se.current&&Se.current.focus():pe(-1)},[k]),o.useEffect(()=>{G&&vt(G)},[G]),o.useEffect(()=>{!ce&&we.current&&(Te({value:""}),we.current.scrollTop=0),ce&&P&&P(Qe)},[ce]);const Ge=$?$/16:j,mt=Ge?{maxHeight:`${Ge}rem`}:{};function _n(he,ye){return ye?o.createElement(o.Fragment,null,he.split(ye).map((tt,Vt)=>ye.test(tt)?o.createElement("u",{key:Vt},tt):o.createElement(o.Fragment,{key:Vt},tt))):o.createElement(o.Fragment,null,he)}return wt(o.createElement("div",{className:It,id:M,"aria-activedescendant":te>-1?`${M}-option-${te}`:"",tabIndex:-1,ref:se,style:At,onMouseLeave:()=>pe(-1),"data-testid":J,...W},Ue,o.createElement("div",{className:Ft,ref:we,"data-testid":`${J}-options`,style:mt},!q&&!We.pending&&f&&ve.length===0&&o.createElement("div",{className:"sps-option-list__zero-state"},f),(q||We.pending)&&o.createElement("div",{className:"sps-option-list__loading"},o.createElement(Ua,null)),!q&&!We.pending&&ve.map((he,ye)=>{const tt=`${M}-option-${ye}`,Vt=CS(he.value,B,r),me=fc(et.current,r||"",he);return o.createElement("a",{key:tt,id:tt,role:L,"aria-selected":Vt,href:he.href,className:U("sps-option-list__option",he.caption&&"sps-option-list__option--has-caption",he.disabled&&"sps-option-list__option--disabled",he.bold&&"sps-option-list__option--bold",(Vt||me)&&"sps-option-list__option--selected",te===ye&&"sps-option-list__option--highlighted"),onClick:Ml=>Ne(Ml,he,me),onMouseOver:()=>pe(ye),tabIndex:-1,ref:te===ye?Le:null,"data-testid":`${J}-option-${ye}`},he.value&&he.value.icon&&o.createElement("i",{className:U("sps-icon","sps-option-list__option-icon",`sps-icon-${String(he.value.icon)}`)}),(!he.value||!he.value.icon&&rt)&&o.createElement("span",{className:"sps-option-list__option-icon-spacer"}),o.createElement("span",null,_n(he.text,We.replacementPattern)),he.caption&&o.createElement("div",{className:"sps-option-list__option-caption"},o.createElement("span",null,_n(he.caption,We.replacementPattern))))})),X&&(Z==null?void 0:Z.label)&&o.createElement("a",{className:U("sps-option-list__option","sps-option-list__special-action",te===ve.length&&"sps-option-list__option--highlighted",Z.disabled&&"sps-option-list__special-action--disabled"),href:X.href,target:X.href&&Z.newTab?"_blank":"_self",onClick:he=>Ne(he,X),onMouseOver:()=>pe(ve.length),"data-testid":`${J}-special-action`},Z.icon&&o.createElement("i",{className:U("sps-icon","sps-option-list__option-icon",`sps-icon-${String(Z.icon)}`)}),!Z.icon&&rt&&o.createElement("span",{className:"sps-option-list__option-icon-spacer"}),o.createElement("span",null,Z.label))))});Object.assign(Br,{displayName:"SpsOptionList"});function DS(e,t,n=[]){return o.useMemo(()=>{function r(a){return o.createElement(e,{...a,...t},a.children)}return r},n)}function Tt(e){return typeof e=="function"?e():e}const hc=function({children:e,elements:t}){if(t.length===0)return o.createElement(o.Fragment,null,e);const[n,r]=Array.isArray(t[0])?t[0]:[t[0]];return o.createElement(n,{...r??{}},o.createElement(hc,{elements:t.slice(1)},e))},Sc=function({children:e,providers:t=[],...n}){return o.createElement("div",{...n},o.createElement(hc,{elements:t},e))},NS=function({children:e,className:t,...n}){return o.createElement(Sc,{className:`sps-app ${t}`,...n},e)};function _t(e=[],t=[]){const n=Array.isArray(e)?v.flatten(e):[e],r=t.map(s=>Array.isArray(s)?s:[s]),a=new Array(r.length+1).fill(null).map(()=>[]);for(const s of n){let l=!1;for(let c=0;c<r.length;c+=1)for(const{type:p,props:f={}}of r[c])if(s.type===p&&Object.keys(f).every(u=>f[u]===s.props[u])){l=!0,a[c].push(s);break}l||a[a.length-1].push(s)}return a}function gc(e,t,n){const r=Object.entries(t).filter(([,s])=>typeof s!="string"&&s.deprecated).map(([s])=>s),a=r.map(s=>n[s]);o.useEffect(()=>{a.find(s=>typeof s<"u")&&console.warn(`The following prop(s) of ${e} are deprecated: ${r.join(", ")}`)},a)}function qa(e,t){const n=x.useRef(!1);x.useEffect(()=>{if(n.current)return e();n.current=!0},t)}function Ja(e,t,n){const r=o.useRef(t(...n));o.useEffect(()=>(document.addEventListener(e,r.current,{capture:!0}),()=>document.removeEventListener(e,r.current)),[]),o.useEffect(()=>{document.removeEventListener(e,r.current),r.current=t(...n),document.addEventListener(e,r.current,{capture:!0})},n)}function bc(e,t,n){return function(a){var s,l;!((s=e.current)!=null&&s.contains(a.target))&&!((l=t.current)!=null&&l.contains(a.target))&&n()}}function dr(e,t,n){const r=o.useRef(!1),[a,s]=o.useState(!1),l=o.useCallback(()=>{r.current?r.current=!1:s(!0)},[]),c=o.useCallback((p=!1)=>{s(!1),r.current=p,n&&n()},[]);return Ja("mousedown",bc,[e,t,c]),Ja("pointerdown",bc,[e,t,c]),{showPopup:a,doShowPopup:l,doHidePopup:c}}const vc=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),a=c=>r(c,"overflow")+r(c,"overflow-y"),s=c=>t.test(a(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(s(p[f]))return p[f];return null})(e)};let Za=0;function Pr({isOpen:e,rootRef:t}){o.useLayoutEffect(()=>{let n,r,a;if(e&&t.current){Za+=1,n=vc(t.current)||document.body,r=n===document.body?window.innerWidth-document.documentElement.clientWidth:n.offsetWidth-n.clientWidth,n.style.overflow="hidden";const s=window.getComputedStyle(n).paddingRight;if(n.style.paddingRight=s&&s!=="0px"?`calc(${s} + ${r}px)`:`${r}px`,n===document.body)if(a=document.getElementsByClassName("sps-navbar-container").item(0),a&&window.getComputedStyle(a).position==="fixed"){const l=window.getComputedStyle(a).paddingRight;a.style.paddingRight=l&&l!=="0px"?`calc(${l} + ${r}px)`:`${r}px`}else{const l=document.getElementsByTagName("nav").item(0);if(a=l==null?void 0:l.parentElement,a&&window.getComputedStyle(a).position==="fixed"){const c=window.getComputedStyle(a).paddingRight;a.style.paddingRight=c&&c!=="0px"?`calc(${c} + ${r}px)`:`${r}px`}}}return()=>{n&&(Za-=1,Za===0&&(n.style.overflow=null,n.style.paddingRight=null,a&&(a.style.paddingRight=null)))}},[e])}const kS={debounce:"number",disabled:"boolean",conformWidth:"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 Xt({className:e,debounce:t=0,disabled:n,conformWidth:r,formControl:a,formMeta:s,onChange:l,onSelectionChange:c,icon:p,id:f,placeholder:m="",suggestions:u,unsafelyReplaceClassName:h,tallOptionList:S,value:y="",zeroState:
|
|
4
|
+
`,required:!0},tallOptionList:"boolean",value:"string",zeroState:"string",loading:"boolean",maxHeightOptionListPx:"number",maxHeightOptionListRem:"number",disableOptionsMemoization:"boolean",inputNotClearable:"boolean",autoFocusOnSelection:"boolean"};function Xt({className:e,debounce:t=0,disabled:n,conformWidth:r,formControl:a,formMeta:s,onChange:l,onSelectionChange:c,icon:p,id:f,placeholder:m="",suggestions:u,unsafelyReplaceClassName:h,tallOptionList:S,value:y="",zeroState:C,loading:T,maxHeightOptionListPx:w,maxHeightOptionListRem:D,disableOptionsMemoization:M,inputNotClearable:I,autoFocusOnSelection:k,"data-testid":A,...G}){const E=s||a,{wrapperId:R,controlId:O}=St(f,E),[P,z]=Zt({keyDown:null,opensUpward:!1}),L=o.useRef(null),re=o.useRef(null),B=o.useRef(null),{showPopup:Z,doShowPopup:H,doHidePopup:q}=dr(L,B);function ae(W,X,te=!1){E&&(E.setValue(W),E.markAsDirty()),c&&te?c(W):l&&l(X||new bn({value:W}))}function $(W){re.current&&(re.current.value="",ae("")),W.stopPropagation()}function j(W){ae(W.target.value,W)}function oe(W){n||(["Up","ArrowUp","Down","ArrowDown","Enter"].indexOf(W.key)>-1&&(W.preventDefault(),W.persist()),W.stopPropagation(),z({keyDown:W})),W.key==="Tab"&&q()}function ie(W){W?H():q()}function J(W){z({opensUpward:W})}const V=U(h||"sps-autocomplete",Z&&"sps-autocomplete--open",Z&&"z-stratum-dropdown",P.opensUpward&&"sps-autocomplete--opens-upward",n&&"sps-form-control--disabled",e);return o.useEffect(()=>{let W;return Z&&(W=()=>{q()},window.addEventListener("resize",W)),()=>{W&&window.removeEventListener("resize",W)}},[Z]),Pr({isOpen:Z,rootRef:L}),o.createElement(nt,{id:R,className:V,formControl:a,formMeta:s,inputRef:re,ref:L,focusInputOnClick:!0,onClick:W=>W.nativeEvent.stopImmediatePropagation(),"data-testid":`${A}`},o.createElement("div",{className:"sps-text-input"},o.createElement("div",{className:"sps-form-control"},p&&o.createElement("i",{className:U("sps-text-input__icon","sps-icon",`sps-icon-${p}`)}),o.createElement("input",{type:"text",ref:re,value:y,className:"sps-text-input__input",placeholder:m,onFocus:H,onClick:H,onChange:j,onKeyDown:oe,disabled:n,id:O,"data-testid":`${A}__input`,...G}),y&&!n&&!I&&o.createElement("i",{"aria-label":"clear",className:"sps-icon sps-icon-x-circle sps-form-control__clear-btn",onClick:W=>$(W)}))),o.createElement(Br,{id:`${R}_options`,ref:B,attachTo:L,isOpen:Z,options:u,hideInlineSearch:!0,keyDown:P.keyDown,onOptionSelected:W=>{var X;ae(W,void 0,!0),k&&((X=re.current)==null||X.focus())},onPositionFlip:J,onSelfToggle:ie,offsets:[1,0],search:y,searchDebounce:t,tall:S,zeroState:C,loading:T,maxHeightPx:w,maxHeightRem:D,disableOptionsMemoization:M,conformWidth:r}))}Object.assign(Xt,{props:kS,displayName:"SpsAutocomplete"});const yc={basic:{label:"Basic",examples:{basic:{react:v.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
|
-
`}}}},xS={checked:"boolean",disabled:"boolean",formMeta:"SpsFormFieldMeta<boolean>",indeterminate:"boolean",inline:"boolean",label:"string",onChange:"ChangeEventHandler"};function Fn({checked:e,className:t,disabled:n,formControl:r,formMeta:a,id:s,indeterminate:l=!1,inline:c,label:p,onChange:f,"data-testid":m,unsafelyReplaceClassName:u,...h}){const S=a||r,y=o.useRef(null),[
|
|
111
|
+
`}}}},xS={checked:"boolean",disabled:"boolean",formMeta:"SpsFormFieldMeta<boolean>",indeterminate:"boolean",inline:"boolean",label:"string",onChange:"ChangeEventHandler"};function Fn({checked:e,className:t,disabled:n,formControl:r,formMeta:a,id:s,indeterminate:l=!1,inline:c,label:p,onChange:f,"data-testid":m,unsafelyReplaceClassName:u,...h}){const S=a||r,y=o.useRef(null),[C,T]=o.useState(e),[w,D]=o.useState(l),{wrapperId:M,controlId:I}=St(s,S);o.useEffect(()=>T(e),[e]),o.useEffect(()=>D(l),[l]),o.useEffect(()=>{y.current&&(y.current.indeterminate=w)},[w]);const k=U(u||"sps-checkbox","sps-checkable",c&&"sps-checkable--inline",!p&&"sps-checkable--no-label",t);function A(G){var E;T(G.target.checked),D(!1),S&&(S.setValue(G.target.checked),S.markAsDirty()),f&&f(G),(E=y.current)==null||E.focus()}return o.createElement(nt,{id:M,className:k,formControl:r,formMeta:a,inputRef:y,"data-testid":m},o.createElement("input",{type:"checkbox",ref:y,className:"sps-checkable__input",id:I,checked:C,disabled:n,"data-testid":`${m}__checkbox-input`,"data-checked":C?"checked":void 0,onChange:A,...h}),o.createElement("label",{className:"sps-checkable__label",htmlFor:I},p||""))}Object.assign(Fn,{props:xS,displayName:"SpsCheckbox"});const Tc={labels:{label:"Labels",description:v.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:v.code`
|
|
@@ -223,7 +223,7 @@
|
|
|
223
223
|
</SpsSummaryListRow>
|
|
224
224
|
);
|
|
225
225
|
}
|
|
226
|
-
`}}}},IS={disabled:"boolean",href:"string",kind:"ClickableTagKind",onAdd:"() => void",onRemove:"() => void"};function Ar(e){const{children:t,className:n,disabled:r,href:a,kind:s=Y.ClickableTagKind.BLUE,onAdd:l,onRemove:c,onClick:p,"data-testid":f,unsafelyReplaceClassName:m,wrap:u=!1,...h}=e,S=U(m||"sps-clickable-tag",`sps-clickable-tag--${s}`,n,r&&"sps-clickable-tag--disabled",(l||c)&&"sps-clickable-tag--icon",u&&"sps-clickable-tag--wrap"),y=U("sps-clickable-tag__label",(a||p)&&"sps-clickable-tag__label--link"),
|
|
226
|
+
`}}}},IS={disabled:"boolean",href:"string",kind:"ClickableTagKind",onAdd:"() => void",onRemove:"() => void"};function Ar(e){const{children:t,className:n,disabled:r,href:a,kind:s=Y.ClickableTagKind.BLUE,onAdd:l,onRemove:c,onClick:p,"data-testid":f,unsafelyReplaceClassName:m,wrap:u=!1,...h}=e,S=U(m||"sps-clickable-tag",`sps-clickable-tag--${s}`,n,r&&"sps-clickable-tag--disabled",(l||c)&&"sps-clickable-tag--icon",u&&"sps-clickable-tag--wrap"),y=U("sps-clickable-tag__label",(a||p)&&"sps-clickable-tag__label--link"),C=o.Children.toArray(t).filter(D=>typeof D=="string").join("");function T(D){l?l():c&&c(),D.stopPropagation()}o.useEffect(()=>{if(c&&l)throw new Error("Clickable tag should have onRemove or onAdd, not both")},[l,c]);function w(D){D.stopPropagation(),p&&p(D)}return o.createElement("div",{className:S,"data-testid":f,...h},o.createElement("span",{className:y,title:C,onClick:w},a&&o.createElement("a",{href:a},t),!a&&t),(l||c)&&!r&&o.createElement("div",{className:"sps-clickable-tag__icon",onClick:T,tabIndex:-1,"aria-label":l?"Add":"Remove"},o.createElement("i",{"aria-hidden":"true",className:`sps-icon sps-icon-${l?Y.SpsIcon.PLUS_SIGN:Y.SpsIcon.X}`,"data-testid":`${f}__icon`})))}Object.assign(Ar,{props:IS,displayName:"SpsClickableTag"});const Ec={basic:{label:"Basic",examples:{basic:{react:v.code`
|
|
227
227
|
import { SpsClickableTag } from "@spscommerce/ds-react";
|
|
228
228
|
import { ClickableTagKind } from "@spscommerce/ds-shared";
|
|
229
229
|
function Component() {
|
|
@@ -323,40 +323,40 @@
|
|
|
323
323
|
</>
|
|
324
324
|
);
|
|
325
325
|
}
|
|
326
|
-
`}}}};function Xa(e,t){return Xa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Xa(e,t)}function wc(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Xa(e,t)}function be(){return be=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},be.apply(null,arguments)}function Fr(e){"@babel/helpers - typeof";return Fr=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},Fr(e)}function MS(e,t){if(Fr(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Fr(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function _S(e){var t=MS(e,"string");return Fr(t)=="symbol"?t:t+""}function LS(e,t,n){return(t=_S(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(a){return Object.getOwnPropertyDescriptor(e,a).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){LS(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 Et(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"}(),kc=function(){return Math.random().toString(36).substring(7).split("").join(".")},xc={INIT:"@@redux/INIT"+kc(),REPLACE:"@@redux/REPLACE"+kc()};function OS(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 RS(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(AS(e))return"date";if(PS(e))return"error";var n=BS(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 BS(e){return typeof e.constructor=="function"?e.constructor.name:null}function PS(e){return e instanceof Error||typeof e.message=="string"&&e.constructor&&typeof e.constructor.stackTraceLimit=="number"}function AS(e){return e instanceof Date?!0:typeof e.toDateString=="function"&&typeof e.getDate=="function"&&typeof e.setDate=="function"}function Vn(e){var t=typeof e;return process.env.NODE_ENV!=="production"&&(t=RS(e)),t}function Ic(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"?Et(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"?Et(1):"Expected the enhancer to be a function. Instead, received: '"+Vn(n)+"'");return n(Ic)(e,t)}if(typeof e!="function")throw new Error(process.env.NODE_ENV==="production"?Et(2):"Expected the root reducer to be a function. Instead, received: '"+Vn(e)+"'");var a=e,s=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"?Et(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 s}function u(
|
|
326
|
+
`}}}};function Xa(e,t){return Xa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Xa(e,t)}function wc(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Xa(e,t)}function be(){return be=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},be.apply(null,arguments)}function Fr(e){"@babel/helpers - typeof";return Fr=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},Fr(e)}function MS(e,t){if(Fr(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Fr(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function _S(e){var t=MS(e,"string");return Fr(t)=="symbol"?t:t+""}function LS(e,t,n){return(t=_S(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(a){return Object.getOwnPropertyDescriptor(e,a).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){LS(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 Et(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"}(),kc=function(){return Math.random().toString(36).substring(7).split("").join(".")},xc={INIT:"@@redux/INIT"+kc(),REPLACE:"@@redux/REPLACE"+kc()};function OS(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 RS(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(AS(e))return"date";if(PS(e))return"error";var n=BS(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 BS(e){return typeof e.constructor=="function"?e.constructor.name:null}function PS(e){return e instanceof Error||typeof e.message=="string"&&e.constructor&&typeof e.constructor.stackTraceLimit=="number"}function AS(e){return e instanceof Date?!0:typeof e.toDateString=="function"&&typeof e.getDate=="function"&&typeof e.setDate=="function"}function Vn(e){var t=typeof e;return process.env.NODE_ENV!=="production"&&(t=RS(e)),t}function Ic(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"?Et(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"?Et(1):"Expected the enhancer to be a function. Instead, received: '"+Vn(n)+"'");return n(Ic)(e,t)}if(typeof e!="function")throw new Error(process.env.NODE_ENV==="production"?Et(2):"Expected the root reducer to be a function. Instead, received: '"+Vn(e)+"'");var a=e,s=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"?Et(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 s}function u(C){if(typeof C!="function")throw new Error(process.env.NODE_ENV==="production"?Et(4):"Expected the listener to be a function. Instead, received: '"+Vn(C)+"'");if(p)throw new Error(process.env.NODE_ENV==="production"?Et(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(C),function(){if(T){if(p)throw new Error(process.env.NODE_ENV==="production"?Et(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(C);c.splice(D,1),l=null}}}function h(C){if(!OS(C))throw new Error(process.env.NODE_ENV==="production"?Et(7):"Actions must be plain objects. Instead, the actual type was: '"+Vn(C)+"'. 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 C.type>"u")throw new Error(process.env.NODE_ENV==="production"?Et(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"?Et(9):"Reducers may not dispatch actions.");try{p=!0,s=a(s,C)}finally{p=!1}for(var T=l=c,w=0;w<T.length;w++){var D=T[w];D()}return C}function S(C){if(typeof C!="function")throw new Error(process.env.NODE_ENV==="production"?Et(10):"Expected the nextReducer to be a function. Instead, received: '"+Vn(C));a=C,h({type:xc.REPLACE})}function y(){var C,T=u;return C={subscribe:function(D){if(typeof D!="object"||D===null)throw new Error(process.env.NODE_ENV==="production"?Et(11):"Expected the observer to be an object. Instead, received: '"+Vn(D)+"'");function M(){D.next&&D.next(m())}M();var I=T(M);return{unsubscribe:I}}},C[Nc]=function(){return this},C}return h({type:xc.INIT}),r={dispatch:h,subscribe:u,getState:m,replaceReducer:S},r[Nc]=y,r}function Mc(e,t){return function(){return t(e.apply(this,arguments))}}function _c(e,t){if(typeof e=="function")return Mc(e,t);if(typeof e!="object"||e===null)throw new Error(process.env.NODE_ENV==="production"?Et(16):"bindActionCreators expected an object or a function, but instead received: '"+Vn(e)+`'. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?`);var n={};for(var r in e){var a=e[r];typeof a=="function"&&(n[r]=Mc(a,t))}return n}function Lc(){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,a){return function(){return r(a.apply(void 0,arguments))}})}function FS(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){return function(){var a=r.apply(void 0,arguments),s=function(){throw new Error(process.env.NODE_ENV==="production"?Et(15):"Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")},l={getState:a.getState,dispatch:function(){return s.apply(void 0,arguments)}},c=t.map(function(p){return p(l)});return s=Lc.apply(void 0,c)(a.dispatch),Dc(Dc({},a),{},{dispatch:s})}}}var Io={exports:{}},Mo={exports:{}},Pe={};/** @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 Oc;function VS(){if(Oc)return
|
|
333
|
+
*/var Oc;function VS(){if(Oc)return Pe;Oc=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,a=e?Symbol.for("react.strict_mode"):60108,s=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,S=e?Symbol.for("react.memo"):60115,y=e?Symbol.for("react.lazy"):60116,C=e?Symbol.for("react.block"):60121,T=e?Symbol.for("react.fundamental"):60117,w=e?Symbol.for("react.responder"):60118,D=e?Symbol.for("react.scope"):60119;function M(k){if(typeof k=="object"&&k!==null){var A=k.$$typeof;switch(A){case t:switch(k=k.type,k){case p:case f:case r:case s:case a:case u:return k;default:switch(k=k&&k.$$typeof,k){case c:case m:case y:case S:case l:return k;default:return A}}case n:return A}}}function I(k){return M(k)===f}return Pe.AsyncMode=p,Pe.ConcurrentMode=f,Pe.ContextConsumer=c,Pe.ContextProvider=l,Pe.Element=t,Pe.ForwardRef=m,Pe.Fragment=r,Pe.Lazy=y,Pe.Memo=S,Pe.Portal=n,Pe.Profiler=s,Pe.StrictMode=a,Pe.Suspense=u,Pe.isAsyncMode=function(k){return I(k)||M(k)===p},Pe.isConcurrentMode=I,Pe.isContextConsumer=function(k){return M(k)===c},Pe.isContextProvider=function(k){return M(k)===l},Pe.isElement=function(k){return typeof k=="object"&&k!==null&&k.$$typeof===t},Pe.isForwardRef=function(k){return M(k)===m},Pe.isFragment=function(k){return M(k)===r},Pe.isLazy=function(k){return M(k)===y},Pe.isMemo=function(k){return M(k)===S},Pe.isPortal=function(k){return M(k)===n},Pe.isProfiler=function(k){return M(k)===s},Pe.isStrictMode=function(k){return M(k)===a},Pe.isSuspense=function(k){return M(k)===u},Pe.isValidElementType=function(k){return typeof k=="string"||typeof k=="function"||k===r||k===f||k===s||k===a||k===u||k===h||typeof k=="object"&&k!==null&&(k.$$typeof===y||k.$$typeof===S||k.$$typeof===l||k.$$typeof===c||k.$$typeof===m||k.$$typeof===T||k.$$typeof===w||k.$$typeof===D||k.$$typeof===C)},Pe.typeOf=M,Pe}var Ae={};/** @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 Rc;function $S(){return Rc||(Rc=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,a=e?Symbol.for("react.strict_mode"):60108,s=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,S=e?Symbol.for("react.memo"):60115,y=e?Symbol.for("react.lazy"):60116,
|
|
340
|
+
*/var Rc;function $S(){return Rc||(Rc=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,a=e?Symbol.for("react.strict_mode"):60108,s=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,S=e?Symbol.for("react.memo"):60115,y=e?Symbol.for("react.lazy"):60116,C=e?Symbol.for("react.block"):60121,T=e?Symbol.for("react.fundamental"):60117,w=e?Symbol.for("react.responder"):60118,D=e?Symbol.for("react.scope"):60119;function M(se){return typeof se=="string"||typeof se=="function"||se===r||se===f||se===s||se===a||se===u||se===h||typeof se=="object"&&se!==null&&(se.$$typeof===y||se.$$typeof===S||se.$$typeof===l||se.$$typeof===c||se.$$typeof===m||se.$$typeof===T||se.$$typeof===w||se.$$typeof===D||se.$$typeof===C)}function I(se){if(typeof se=="object"&&se!==null){var we=se.$$typeof;switch(we){case t:var Le=se.type;switch(Le){case p:case f:case r:case s:case a:case u:return Le;default:var wt=Le&&Le.$$typeof;switch(wt){case c:case m:case y:case S:case l:return wt;default:return we}}case n:return we}}}var k=p,A=f,G=c,E=l,R=t,O=m,P=r,z=y,L=S,re=n,B=s,Z=a,H=u,q=!1;function ae(se){return q||(q=!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.")),$(se)||I(se)===p}function $(se){return I(se)===f}function j(se){return I(se)===c}function oe(se){return I(se)===l}function ie(se){return typeof se=="object"&&se!==null&&se.$$typeof===t}function J(se){return I(se)===m}function V(se){return I(se)===r}function W(se){return I(se)===y}function X(se){return I(se)===S}function te(se){return I(se)===n}function pe(se){return I(se)===s}function ce(se){return I(se)===a}function Q(se){return I(se)===u}Ae.AsyncMode=k,Ae.ConcurrentMode=A,Ae.ContextConsumer=G,Ae.ContextProvider=E,Ae.Element=R,Ae.ForwardRef=O,Ae.Fragment=P,Ae.Lazy=z,Ae.Memo=L,Ae.Portal=re,Ae.Profiler=B,Ae.StrictMode=Z,Ae.Suspense=H,Ae.isAsyncMode=ae,Ae.isConcurrentMode=$,Ae.isContextConsumer=j,Ae.isContextProvider=oe,Ae.isElement=ie,Ae.isForwardRef=J,Ae.isFragment=V,Ae.isLazy=W,Ae.isMemo=X,Ae.isPortal=te,Ae.isProfiler=pe,Ae.isStrictMode=ce,Ae.isSuspense=Q,Ae.isValidElementType=M,Ae.typeOf=I}()),Ae}var Bc;function Qa(){return Bc||(Bc=1,process.env.NODE_ENV==="production"?Mo.exports=VS():Mo.exports=$S()),Mo.exports}/*
|
|
341
341
|
object-assign
|
|
342
342
|
(c) Sindre Sorhus
|
|
343
343
|
@license MIT
|
|
344
|
-
*/var es,Pc;function KS(){if(Pc)return es;Pc=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}function a(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[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 es=a()?Object.assign:function(s,l){for(var c,p=r(s),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},es}var ts,Ac;function ns(){if(Ac)return ts;Ac=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return ts=e,ts}var rs,Fc;function Vc(){return Fc||(Fc=1,rs=Function.call.bind(Object.prototype.hasOwnProperty)),rs}var os,$c;function HS(){if($c)return os;$c=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=ns(),n={},r=Vc();e=function(s){var l="Warning: "+s;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}}}function a(s,l,c,p,f){if(process.env.NODE_ENV!=="production"){for(var m in s)if(r(s,m)){var u;try{if(typeof s[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 s[m]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw h.name="Invariant Violation",h}u=s[m](l,m,p,c,null,t)}catch(y){u=y}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 S=f?f():"";e("Failed "+c+" type: "+u.message+(S??""))}}}}return a.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},os=a,os}var as,Kc;function WS(){if(Kc)return as;Kc=1;var e=Qa(),t=KS(),n=ns(),r=Vc(),a=HS(),s=function(){};process.env.NODE_ENV!=="production"&&(s=function(c){var p="Warning: "+c;typeof console<"u"&&console.error(p);try{throw new Error(p)}catch{}});function l(){return null}return as=function(c,p){var f=typeof Symbol=="function"&&Symbol.iterator,m="@@iterator";function u($){var
|
|
345
|
-
Valid keys: `+JSON.stringify(Object.keys($),null," "));var se=Q(X,ce,J,V,W+"."+ce,n);if(se)return se}return null}return T(
|
|
344
|
+
*/var es,Pc;function KS(){if(Pc)return es;Pc=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}function a(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[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 es=a()?Object.assign:function(s,l){for(var c,p=r(s),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},es}var ts,Ac;function ns(){if(Ac)return ts;Ac=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return ts=e,ts}var rs,Fc;function Vc(){return Fc||(Fc=1,rs=Function.call.bind(Object.prototype.hasOwnProperty)),rs}var os,$c;function HS(){if($c)return os;$c=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=ns(),n={},r=Vc();e=function(s){var l="Warning: "+s;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}}}function a(s,l,c,p,f){if(process.env.NODE_ENV!=="production"){for(var m in s)if(r(s,m)){var u;try{if(typeof s[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 s[m]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw h.name="Invariant Violation",h}u=s[m](l,m,p,c,null,t)}catch(y){u=y}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 S=f?f():"";e("Failed "+c+" type: "+u.message+(S??""))}}}}return a.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},os=a,os}var as,Kc;function WS(){if(Kc)return as;Kc=1;var e=Qa(),t=KS(),n=ns(),r=Vc(),a=HS(),s=function(){};process.env.NODE_ENV!=="production"&&(s=function(c){var p="Warning: "+c;typeof console<"u"&&console.error(p);try{throw new Error(p)}catch{}});function l(){return null}return as=function(c,p){var f=typeof Symbol=="function"&&Symbol.iterator,m="@@iterator";function u($){var j=$&&(f&&$[f]||$[m]);if(typeof j=="function")return j}var h="<<anonymous>>",S={array:w("array"),bigint:w("bigint"),bool:w("boolean"),func:w("function"),number:w("number"),object:w("object"),string:w("string"),symbol:w("symbol"),any:D(),arrayOf:M,element:I(),elementType:k(),instanceOf:A,node:O(),objectOf:E,oneOf:G,oneOfType:R,shape:z,exact:L};function y($,j){return $===j?$!==0||1/$===1/j:$!==$&&j!==j}function C($,j){this.message=$,this.data=j&&typeof j=="object"?j:{},this.stack=""}C.prototype=Error.prototype;function T($){if(process.env.NODE_ENV!=="production")var j={},oe=0;function ie(V,W,X,te,pe,ce,Q){if(te=te||h,ce=ce||X,Q!==n){if(p){var se=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 se.name="Invariant Violation",se}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var we=te+":"+X;!j[we]&&oe<3&&(s("You are manually calling a React.PropTypes validation function for the `"+ce+"` prop on `"+te+"`. 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."),j[we]=!0,oe++)}}return W[X]==null?V?W[X]===null?new C("The "+pe+" `"+ce+"` is marked as required "+("in `"+te+"`, but its value is `null`.")):new C("The "+pe+" `"+ce+"` is marked as required in "+("`"+te+"`, but its value is `undefined`.")):null:$(W,X,te,pe,ce)}var J=ie.bind(null,!1);return J.isRequired=ie.bind(null,!0),J}function w($){function j(oe,ie,J,V,W,X){var te=oe[ie],pe=Z(te);if(pe!==$){var ce=H(te);return new C("Invalid "+V+" `"+W+"` of type "+("`"+ce+"` supplied to `"+J+"`, expected ")+("`"+$+"`."),{expectedType:$})}return null}return T(j)}function D(){return T(l)}function M($){function j(oe,ie,J,V,W){if(typeof $!="function")return new C("Property `"+W+"` of component `"+J+"` has invalid PropType notation inside arrayOf.");var X=oe[ie];if(!Array.isArray(X)){var te=Z(X);return new C("Invalid "+V+" `"+W+"` of type "+("`"+te+"` supplied to `"+J+"`, expected an array."))}for(var pe=0;pe<X.length;pe++){var ce=$(X,pe,J,V,W+"["+pe+"]",n);if(ce instanceof Error)return ce}return null}return T(j)}function I(){function $(j,oe,ie,J,V){var W=j[oe];if(!c(W)){var X=Z(W);return new C("Invalid "+J+" `"+V+"` of type "+("`"+X+"` supplied to `"+ie+"`, expected a single ReactElement."))}return null}return T($)}function k(){function $(j,oe,ie,J,V){var W=j[oe];if(!e.isValidElementType(W)){var X=Z(W);return new C("Invalid "+J+" `"+V+"` of type "+("`"+X+"` supplied to `"+ie+"`, expected a single ReactElement type."))}return null}return T($)}function A($){function j(oe,ie,J,V,W){if(!(oe[ie]instanceof $)){var X=$.name||h,te=ae(oe[ie]);return new C("Invalid "+V+" `"+W+"` of type "+("`"+te+"` supplied to `"+J+"`, expected ")+("instance of `"+X+"`."))}return null}return T(j)}function G($){if(!Array.isArray($))return process.env.NODE_ENV!=="production"&&(arguments.length>1?s("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])."):s("Invalid argument supplied to oneOf, expected an array.")),l;function j(oe,ie,J,V,W){for(var X=oe[ie],te=0;te<$.length;te++)if(y(X,$[te]))return null;var pe=JSON.stringify($,function(Q,se){var we=H(se);return we==="symbol"?String(se):se});return new C("Invalid "+V+" `"+W+"` of value `"+String(X)+"` "+("supplied to `"+J+"`, expected one of "+pe+"."))}return T(j)}function E($){function j(oe,ie,J,V,W){if(typeof $!="function")return new C("Property `"+W+"` of component `"+J+"` has invalid PropType notation inside objectOf.");var X=oe[ie],te=Z(X);if(te!=="object")return new C("Invalid "+V+" `"+W+"` of type "+("`"+te+"` supplied to `"+J+"`, expected an object."));for(var pe in X)if(r(X,pe)){var ce=$(X,pe,J,V,W+"."+pe,n);if(ce instanceof Error)return ce}return null}return T(j)}function R($){if(!Array.isArray($))return process.env.NODE_ENV!=="production"&&s("Invalid argument supplied to oneOfType, expected an instance of array."),l;for(var j=0;j<$.length;j++){var oe=$[j];if(typeof oe!="function")return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+q(oe)+" at index "+j+"."),l}function ie(J,V,W,X,te){for(var pe=[],ce=0;ce<$.length;ce++){var Q=$[ce],se=Q(J,V,W,X,te,n);if(se==null)return null;se.data&&r(se.data,"expectedType")&&pe.push(se.data.expectedType)}var we=pe.length>0?", expected one of type ["+pe.join(", ")+"]":"";return new C("Invalid "+X+" `"+te+"` supplied to "+("`"+W+"`"+we+"."))}return T(ie)}function O(){function $(j,oe,ie,J,V){return re(j[oe])?null:new C("Invalid "+J+" `"+V+"` supplied to "+("`"+ie+"`, expected a ReactNode."))}return T($)}function P($,j,oe,ie,J){return new C(($||"React class")+": "+j+" type `"+oe+"."+ie+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+J+"`.")}function z($){function j(oe,ie,J,V,W){var X=oe[ie],te=Z(X);if(te!=="object")return new C("Invalid "+V+" `"+W+"` of type `"+te+"` "+("supplied to `"+J+"`, expected `object`."));for(var pe in $){var ce=$[pe];if(typeof ce!="function")return P(J,V,W,pe,H(ce));var Q=ce(X,pe,J,V,W+"."+pe,n);if(Q)return Q}return null}return T(j)}function L($){function j(oe,ie,J,V,W){var X=oe[ie],te=Z(X);if(te!=="object")return new C("Invalid "+V+" `"+W+"` of type `"+te+"` "+("supplied to `"+J+"`, expected `object`."));var pe=t({},oe[ie],$);for(var ce in pe){var Q=$[ce];if(r($,ce)&&typeof Q!="function")return P(J,V,W,ce,H(Q));if(!Q)return new C("Invalid "+V+" `"+W+"` key `"+ce+"` supplied to `"+J+"`.\nBad object: "+JSON.stringify(oe[ie],null," ")+`
|
|
345
|
+
Valid keys: `+JSON.stringify(Object.keys($),null," "));var se=Q(X,ce,J,V,W+"."+ce,n);if(se)return se}return null}return T(j)}function re($){switch(typeof $){case"number":case"string":case"undefined":return!0;case"boolean":return!$;case"object":if(Array.isArray($))return $.every(re);if($===null||c($))return!0;var j=u($);if(j){var oe=j.call($),ie;if(j!==$.entries){for(;!(ie=oe.next()).done;)if(!re(ie.value))return!1}else for(;!(ie=oe.next()).done;){var J=ie.value;if(J&&!re(J[1]))return!1}}else return!1;return!0;default:return!1}}function B($,j){return $==="symbol"?!0:j?j["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&j instanceof Symbol:!1}function Z($){var j=typeof $;return Array.isArray($)?"array":$ instanceof RegExp?"object":B(j,$)?"symbol":j}function H($){if(typeof $>"u"||$===null)return""+$;var j=Z($);if(j==="object"){if($ instanceof Date)return"date";if($ instanceof RegExp)return"regexp"}return j}function q($){var j=H($);switch(j){case"array":case"object":return"an "+j;case"boolean":case"date":case"regexp":return"a "+j;default:return j}}function ae($){return!$.constructor||!$.constructor.name?h:$.constructor.name}return S.checkPropTypes=a,S.resetWarningCache=a.resetWarningCache,S.PropTypes=S,S},as}var ss,Hc;function GS(){if(Hc)return ss;Hc=1;var e=ns();function t(){}function n(){}return n.resetWarningCache=t,ss=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 a(){return r}var s={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:a,element:r,elementType:r,instanceOf:a,node:r,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:n,resetWarningCache:t};return s.PropTypes=s,s},ss}var Wc;function YS(){if(Wc)return Io.exports;if(Wc=1,process.env.NODE_ENV!=="production"){var e=Qa(),t=!0;Io.exports=WS()(e.isElement,t)}else Io.exports=GS()();return Io.exports}var US=YS();const pr=Aa(US);var is=x.createContext(null);process.env.NODE_ENV!=="production"&&(is.displayName="ReactRedux");function zS(e){e()}var Gc=zS,jS=function(t){return Gc=t},qS=function(){return Gc};function JS(){var e=qS(),t=null,n=null;return{clear:function(){t=null,n=null},notify:function(){e(function(){for(var a=t;a;)a.callback(),a=a.next})},get:function(){for(var a=[],s=t;s;)a.push(s),s=s.next;return a},subscribe:function(a){var s=!0,l=n={callback:a,next:null,prev:n};return l.prev?l.prev.next=l:t=l,function(){!s||t===null||(s=!1,l.next?l.next.prev=l.prev:n=l.prev,l.prev?l.prev.next=l.next:t=l.next)}}}}var Yc={notify:function(){},get:function(){return[]}};function Uc(e,t){var n,r=Yc;function a(u){return p(),r.subscribe(u)}function s(){r.notify()}function l(){m.onStateChange&&m.onStateChange()}function c(){return!!n}function p(){n||(n=t?t.addNestedSub(l):e.subscribe(l),r=JS())}function f(){n&&(n(),n=void 0,r.clear(),r=Yc)}var m={addNestedSub:a,notifyNestedSubs:s,handleChangeWrapper:l,isSubscribed:c,trySubscribe:p,tryUnsubscribe:f,getListeners:function(){return r}};return m}var zc=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?x.useLayoutEffect:x.useEffect;function jc(e){var t=e.store,n=e.context,r=e.children,a=x.useMemo(function(){var c=Uc(t);return{store:t,subscription:c}},[t]),s=x.useMemo(function(){return t.getState()},[t]);zc(function(){var c=a.subscription;return c.onStateChange=c.notifyNestedSubs,c.trySubscribe(),s!==t.getState()&&c.notifyNestedSubs(),function(){c.tryUnsubscribe(),c.onStateChange=null}},[a,s]);var l=n||is;return x.createElement(l.Provider,{value:a},r)}process.env.NODE_ENV!=="production"&&(jc.propTypes={store:pr.shape({subscribe:pr.func.isRequired,dispatch:pr.func.isRequired,getState:pr.func.isRequired}),context:pr.object,children:pr.any});function _o(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var ls,qc;function ZS(){if(qc)return ls;qc=1;var e=Qa(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},r={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};s[e.ForwardRef]=r,s[e.Memo]=a;function l(y){return e.isMemo(y)?a:s[y.$$typeof]||t}var c=Object.defineProperty,p=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,m=Object.getOwnPropertyDescriptor,u=Object.getPrototypeOf,h=Object.prototype;function S(y,C,T){if(typeof C!="string"){if(h){var w=u(C);w&&w!==h&&S(y,w,T)}var D=p(C);f&&(D=D.concat(f(C)));for(var M=l(y),I=l(C),k=0;k<D.length;++k){var A=D[k];if(!n[A]&&!(T&&T[A])&&!(I&&I[A])&&!(M&&M[A])){var G=m(C,A);try{c(y,A,G)}catch{}}}}return y}return ls=S,ls}var XS=ZS();const Jc=Aa(XS);var Lo={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 Zc;function QS(){if(Zc)return
|
|
352
|
+
*/var Zc;function QS(){if(Zc)return Fe;Zc=1;var e=60103,t=60106,n=60107,r=60108,a=60114,s=60109,l=60110,c=60112,p=60113,f=60120,m=60115,u=60116,h=60121,S=60122,y=60117,C=60129,T=60131;if(typeof Symbol=="function"&&Symbol.for){var w=Symbol.for;e=w("react.element"),t=w("react.portal"),n=w("react.fragment"),r=w("react.strict_mode"),a=w("react.profiler"),s=w("react.provider"),l=w("react.context"),c=w("react.forward_ref"),p=w("react.suspense"),f=w("react.suspense_list"),m=w("react.memo"),u=w("react.lazy"),h=w("react.block"),S=w("react.server.block"),y=w("react.fundamental"),C=w("react.debug_trace_mode"),T=w("react.legacy_hidden")}function D(L){if(typeof L=="object"&&L!==null){var re=L.$$typeof;switch(re){case e:switch(L=L.type,L){case n:case a:case r:case p:case f:return L;default:switch(L=L&&L.$$typeof,L){case l:case c:case u:case m:case s:return L;default:return re}}case t:return re}}}var M=s,I=e,k=c,A=n,G=u,E=m,R=t,O=a,P=r,z=p;return Fe.ContextConsumer=l,Fe.ContextProvider=M,Fe.Element=I,Fe.ForwardRef=k,Fe.Fragment=A,Fe.Lazy=G,Fe.Memo=E,Fe.Portal=R,Fe.Profiler=O,Fe.StrictMode=P,Fe.Suspense=z,Fe.isAsyncMode=function(){return!1},Fe.isConcurrentMode=function(){return!1},Fe.isContextConsumer=function(L){return D(L)===l},Fe.isContextProvider=function(L){return D(L)===s},Fe.isElement=function(L){return typeof L=="object"&&L!==null&&L.$$typeof===e},Fe.isForwardRef=function(L){return D(L)===c},Fe.isFragment=function(L){return D(L)===n},Fe.isLazy=function(L){return D(L)===u},Fe.isMemo=function(L){return D(L)===m},Fe.isPortal=function(L){return D(L)===t},Fe.isProfiler=function(L){return D(L)===a},Fe.isStrictMode=function(L){return D(L)===r},Fe.isSuspense=function(L){return D(L)===p},Fe.isValidElementType=function(L){return typeof L=="string"||typeof L=="function"||L===n||L===a||L===C||L===r||L===p||L===f||L===T||typeof L=="object"&&L!==null&&(L.$$typeof===u||L.$$typeof===m||L.$$typeof===s||L.$$typeof===l||L.$$typeof===c||L.$$typeof===y||L.$$typeof===h||L[0]===S)},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 Xc;function eg(){return Xc||(Xc=1,process.env.NODE_ENV!=="production"&&function(){var e=60103,t=60106,n=60107,r=60108,a=60114,s=60109,l=60110,c=60112,p=60113,f=60120,m=60115,u=60116,h=60121,S=60122,y=60117,w=60129,T=60131;if(typeof Symbol=="function"&&Symbol.for){var C=Symbol.for;e=C("react.element"),t=C("react.portal"),n=C("react.fragment"),r=C("react.strict_mode"),a=C("react.profiler"),s=C("react.provider"),l=C("react.context"),c=C("react.forward_ref"),p=C("react.suspense"),f=C("react.suspense_list"),m=C("react.memo"),u=C("react.lazy"),h=C("react.block"),S=C("react.server.block"),y=C("react.fundamental"),C("react.scope"),C("react.opaque.id"),w=C("react.debug_trace_mode"),C("react.offscreen"),T=C("react.legacy_hidden")}var D=!1;function M(Q){return!!(typeof Q=="string"||typeof Q=="function"||Q===n||Q===a||Q===w||Q===r||Q===p||Q===f||Q===T||D||typeof Q=="object"&&Q!==null&&(Q.$$typeof===u||Q.$$typeof===m||Q.$$typeof===s||Q.$$typeof===l||Q.$$typeof===c||Q.$$typeof===y||Q.$$typeof===h||Q[0]===S))}function x(Q){if(typeof Q=="object"&&Q!==null){var se=Q.$$typeof;switch(se){case e:var we=Q.type;switch(we){case n:case a:case r:case p:case f:return we;default:var Le=we&&we.$$typeof;switch(Le){case l:case c:case u:case m:case s:return Le;default:return se}}case t:return se}}}var k=l,P=s,G=e,E=c,R=n,O=u,A=m,j=t,L=a,re=r,B=p,Z=!1,H=!1;function q(Q){return Z||(Z=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function ae(Q){return H||(H=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function $(Q){return x(Q)===l}function z(Q){return x(Q)===s}function oe(Q){return typeof Q=="object"&&Q!==null&&Q.$$typeof===e}function ie(Q){return x(Q)===c}function J(Q){return x(Q)===n}function V(Q){return x(Q)===u}function W(Q){return x(Q)===m}function X(Q){return x(Q)===t}function te(Q){return x(Q)===a}function pe(Q){return x(Q)===r}function ce(Q){return x(Q)===p}Fe.ContextConsumer=k,Fe.ContextProvider=P,Fe.Element=G,Fe.ForwardRef=E,Fe.Fragment=R,Fe.Lazy=O,Fe.Memo=A,Fe.Portal=j,Fe.Profiler=L,Fe.StrictMode=re,Fe.Suspense=B,Fe.isAsyncMode=q,Fe.isConcurrentMode=ae,Fe.isContextConsumer=$,Fe.isContextProvider=z,Fe.isElement=oe,Fe.isForwardRef=ie,Fe.isFragment=J,Fe.isLazy=V,Fe.isMemo=W,Fe.isPortal=X,Fe.isProfiler=te,Fe.isStrictMode=pe,Fe.isSuspense=ce,Fe.isValidElementType=M,Fe.typeOf=x}()),Fe}var Qc;function tg(){return Qc||(Qc=1,process.env.NODE_ENV==="production"?Lo.exports=QS():Lo.exports=eg()),Lo.exports}var ed=tg(),ng=["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"],rg=["reactReduxForwardedRef"],og=[],ag=[null,null],sg=function(t){try{return JSON.stringify(t)}catch{return String(t)}};function ig(e,t){var n=e[1];return[t.payload,n+1]}function td(e,t,n){zc(function(){return e.apply(void 0,t)},n)}function lg(e,t,n,r,a,s,l){e.current=r,t.current=a,n.current=!1,s.current&&(s.current=null,l())}function cg(e,t,n,r,a,s,l,c,p,f){if(e){var m=!1,u=null,h=function(){if(!m){var w=t.getState(),T,C;try{T=r(w,a.current)}catch(D){C=D,u=D}C||(u=null),T===s.current?l.current||p():(s.current=T,c.current=T,l.current=!0,f({type:"STORE_UPDATED",payload:{error:C}}))}};n.onStateChange=h,n.trySubscribe(),h();var S=function(){if(m=!0,n.tryUnsubscribe(),n.onStateChange=null,u)throw u};return S}}var dg=function(){return[null,0]};function pg(e,t){t===void 0&&(t={});var n=t,r=n.getDisplayName,a=r===void 0?function(P){return"ConnectAdvanced("+P+")"}:r,s=n.methodName,l=s===void 0?"connectAdvanced":s,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,S=n.withRef,y=S===void 0?!1:S,w=n.forwardRef,T=w===void 0?!1:w,C=n.context,D=C===void 0?is:C,M=_o(n,ng);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(y)throw new Error("withRef is removed. To access the wrapped instance, use a ref on the connected component");var x="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. "+x)}var k=D;return function(G){if(process.env.NODE_ENV!=="production"&&!ed.isValidElementType(G))throw new Error("You must pass a component to the function returned by "+(l+". Instead received "+sg(G)));var E=G.displayName||G.name||"Component",R=a(E),O=be({},M,{getDisplayName:a,methodName:l,renderCountProp:p,shouldHandleStateChanges:m,storeKey:h,displayName:R,wrappedComponentName:E,WrappedComponent:G}),A=M.pure;function j(H){return e(H.dispatch,O)}var L=A?I.useMemo:function(H){return H()};function re(H){var q=I.useMemo(function(){var Ue=H.reactReduxForwardedRef,We=_o(H,rg);return[H.context,Ue,We]},[H]),ae=q[0],$=q[1],z=q[2],oe=I.useMemo(function(){return ae&&ae.Consumer&&ed.isContextConsumer(I.createElement(ae.Consumer,null))?ae:k},[ae,k]),ie=I.useContext(oe),J=!!H.store&&!!H.store.getState&&!!H.store.dispatch,V=!!ie&&!!ie.store;if(process.env.NODE_ENV!=="production"&&!J&&!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 W=J?H.store:ie.store,X=I.useMemo(function(){return j(W)},[W]),te=I.useMemo(function(){if(!m)return ag;var Ue=Uc(W,J?null:ie.subscription),We=Ue.notifyNestedSubs.bind(Ue);return[Ue,We]},[W,J,ie]),pe=te[0],ce=te[1],Q=I.useMemo(function(){return J?ie:be({},ie,{subscription:pe})},[J,ie,pe]),se=I.useReducer(ig,og,dg),we=se[0],Le=we[0],wt=se[1];if(Le&&Le.error)throw Le.error;var lt=I.useRef(),ct=I.useRef(z),Xe=I.useRef(),At=I.useRef(!1),Qe=L(function(){return Xe.current&&z===ct.current?Xe.current:X(W.getState(),z)},[W,Le,z]);td(lg,[ct,lt,At,z,Qe,Xe,ce]),td(cg,[m,W,pe,X,ct,lt,At,Xe,ce,wt],[W,pe,X]);var Ke=I.useMemo(function(){return I.createElement(G,be({},Qe,{ref:$}))},[$,G,Qe]),Se=I.useMemo(function(){return m?I.createElement(oe.Provider,{value:Q},Ke):Ke},[oe,Ke,Q]);return Se}var B=A?I.memo(re):re;if(B.WrappedComponent=G,B.displayName=re.displayName=R,T){var Z=I.forwardRef(function(q,ae){return I.createElement(B,be({},q,{reactReduxForwardedRef:ae}))});return Z.displayName=R,Z.WrappedComponent=G,Jc(Z,G)}return Jc(B,G)}}function nd(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function cs(e,t){if(nd(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])||!nd(e[n[a]],t[n[a]]))return!1;return!0}function ug(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 mg(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 rd(e){typeof console<"u"&&typeof console.error=="function"&&console.error(e);try{throw new Error(e)}catch{}}function od(e,t,n){mg(e)||rd(n+"() in "+t+" must return a plain object. Instead received "+e+".")}function ds(e){return function(n,r){var a=e(n,r);function s(){return a}return s.dependsOnOwnProps=!1,s}}function ad(e){return e.dependsOnOwnProps!==null&&e.dependsOnOwnProps!==void 0?!!e.dependsOnOwnProps:e.length!==1}function sd(e,t){return function(r,a){var s=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=ad(e);var m=l(p,f);return typeof m=="function"&&(l.mapToProps=m,l.dependsOnOwnProps=ad(m),m=l(p,f)),process.env.NODE_ENV!=="production"&&od(m,s,t),m},l}}function fg(e){return typeof e=="function"?sd(e,"mapDispatchToProps"):void 0}function hg(e){return e?void 0:ds(function(t){return{dispatch:t}})}function Sg(e){return e&&typeof e=="object"?ds(function(t){return ug(e,t)}):void 0}const gg=[fg,hg,Sg];function bg(e){return typeof e=="function"?sd(e,"mapStateToProps"):void 0}function vg(e){return e?void 0:ds(function(){return{}})}const yg=[bg,vg];function Tg(e,t,n){return be({},n,e,t)}function Eg(e){return function(n,r){var a=r.displayName,s=r.pure,l=r.areMergedPropsEqual,c=!1,p;return function(m,u,h){var S=e(m,u,h);return c?(!s||!l(S,p))&&(p=S):(c=!0,p=S,process.env.NODE_ENV!=="production"&&od(p,a,"mergeProps")),p}}}function wg(e){return typeof e=="function"?Eg(e):void 0}function Cg(e){return e?void 0:function(){return Tg}}const Dg=[wg,Cg];function ps(e,t,n){if(e)(t==="mapStateToProps"||t==="mapDispatchToProps")&&(Object.prototype.hasOwnProperty.call(e,"dependsOnOwnProps")||rd("The selector for "+t+" of "+n+" did not specify a value for dependsOnOwnProps."));else throw new Error("Unexpected value for "+t+" in "+n+".")}function Ng(e,t,n,r){ps(e,"mapStateToProps",r),ps(t,"mapDispatchToProps",r),ps(n,"mergeProps",r)}var kg=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function xg(e,t,n,r){return function(s,l){return n(e(s,l),t(r,l),l)}}function Ig(e,t,n,r,a){var s=a.areStatesEqual,l=a.areOwnPropsEqual,c=a.areStatePropsEqual,p=!1,f,m,u,h,S;function y(M,x){return f=M,m=x,u=e(f,m),h=t(r,m),S=n(u,h,m),p=!0,S}function w(){return u=e(f,m),t.dependsOnOwnProps&&(h=t(r,m)),S=n(u,h,m),S}function T(){return e.dependsOnOwnProps&&(u=e(f,m)),t.dependsOnOwnProps&&(h=t(r,m)),S=n(u,h,m),S}function C(){var M=e(f,m),x=!c(M,u);return u=M,x&&(S=n(u,h,m)),S}function D(M,x){var k=!l(x,m),P=!s(M,f,x,m);return f=M,m=x,k&&P?w():k?T():P?C():S}return function(x,k){return p?D(x,k):y(x,k)}}function Mg(e,t){var n=t.initMapStateToProps,r=t.initMapDispatchToProps,a=t.initMergeProps,s=_o(t,kg),l=n(e,s),c=r(e,s),p=a(e,s);process.env.NODE_ENV!=="production"&&Ng(l,c,p,s.displayName);var f=s.pure?Ig:xg;return f(l,c,p,e,s)}var _g=["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"];function us(e,t,n){for(var r=t.length-1;r>=0;r--){var a=t[r](e);if(a)return a}return function(s,l){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+l.wrappedComponentName+".")}}function Lg(e,t){return e===t}function Og(e){var t=e===void 0?{}:e,n=t.connectHOC,r=n===void 0?pg:n,a=t.mapStateToPropsFactories,s=a===void 0?yg:a,l=t.mapDispatchToPropsFactories,c=l===void 0?gg:l,p=t.mergePropsFactories,f=p===void 0?Dg:p,m=t.selectorFactory,u=m===void 0?Mg:m;return function(S,y,w,T){T===void 0&&(T={});var C=T,D=C.pure,M=D===void 0?!0:D,x=C.areStatesEqual,k=x===void 0?Lg:x,P=C.areOwnPropsEqual,G=P===void 0?cs:P,E=C.areStatePropsEqual,R=E===void 0?cs:E,O=C.areMergedPropsEqual,A=O===void 0?cs:O,j=_o(C,_g),L=us(S,s,"mapStateToProps"),re=us(y,c,"mapDispatchToProps"),B=us(w,f,"mergeProps");return r(u,be({methodName:"connect",getDisplayName:function(H){return"Connect("+H+")"},shouldHandleStateChanges:!!S,initMapStateToProps:L,initMapDispatchToProps:re,initMergeProps:B,pure:M,areStatesEqual:k,areOwnPropsEqual:G,areStatePropsEqual:R,areMergedPropsEqual:A},j))}}const id=Og();jS(vo.unstable_batchedUpdates);function Rg(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 ld(e,t){var n=I.useState(function(){return{inputs:t,result:e()}})[0],r=I.useRef(!0),a=I.useRef(n),s=r.current||!!(t&&a.current.inputs&&Rg(t,a.current.inputs)),l=s?a.current:{inputs:t,result:e()};return I.useEffect(function(){r.current=!1,a.current=l},[l]),l.result}function Bg(e,t){return ld(function(){return e},t)}var Me=ld,ge=Bg,Pg=process.env.NODE_ENV==="production",ms="Invariant failed";function cd(e,t){if(Pg)throw new Error(ms);var n=typeof t=="function"?t():t,r=n?"".concat(ms,": ").concat(n):ms;throw new Error(r)}var Kt=function(t){var n=t.top,r=t.right,a=t.bottom,s=t.left,l=r-s,c=a-n,p={top:n,right:r,bottom:a,left:s,width:l,height:c,x:s,y:n,center:{x:(r+s)/2,y:(a+n)/2}};return p},fs=function(t,n){return{top:t.top-n.top,left:t.left-n.left,bottom:t.bottom+n.bottom,right:t.right+n.right}},dd=function(t,n){return{top:t.top+n.top,left:t.left+n.left,bottom:t.bottom-n.bottom,right:t.right-n.right}},Ag=function(t,n){return{top:t.top+n.y,left:t.left+n.x,bottom:t.bottom+n.y,right:t.right+n.x}},hs={top:0,right:0,bottom:0,left:0},Ss=function(t){var n=t.borderBox,r=t.margin,a=r===void 0?hs:r,s=t.border,l=s===void 0?hs:s,c=t.padding,p=c===void 0?hs:c,f=Kt(fs(n,a)),m=Kt(dd(n,l)),u=Kt(dd(m,p));return{marginBox:f,borderBox:Kt(n),paddingBox:m,contentBox:u,margin:a,border:l,padding:p}},Lt=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"?cd(!1,"Could not parse value [raw: "+t+", without suffix: "+n+"]"):cd()),a},Fg=function(){return{x:window.pageXOffset,y:window.pageYOffset}},Oo=function(t,n){var r=t.borderBox,a=t.border,s=t.margin,l=t.padding,c=Ag(r,n);return Ss({borderBox:c,border:a,margin:s,padding:l})},Ro=function(t,n){return n===void 0&&(n=Fg()),Oo(t,n)},pd=function(t,n){var r={top:Lt(n.marginTop),right:Lt(n.marginRight),bottom:Lt(n.marginBottom),left:Lt(n.marginLeft)},a={top:Lt(n.paddingTop),right:Lt(n.paddingRight),bottom:Lt(n.paddingBottom),left:Lt(n.paddingLeft)},s={top:Lt(n.borderTopWidth),right:Lt(n.borderRightWidth),bottom:Lt(n.borderBottomWidth),left:Lt(n.borderLeftWidth)};return Ss({borderBox:t,margin:r,padding:a,border:s})},ud=function(t){var n=t.getBoundingClientRect(),r=window.getComputedStyle(t);return pd(n,r)},md=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function Vg(e,t){return!!(e===t||md(e)&&md(t))}function $g(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!Vg(e[n],t[n]))return!1;return!0}function at(e,t){t===void 0&&(t=$g);var n,r=[],a,s=!1;function l(){for(var c=[],p=0;p<arguments.length;p++)c[p]=arguments[p];return s&&n===this&&t(c,r)||(a=e.apply(this,c),s=!0,n=this,r=c),a}return l}var Vr=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},Kg=process.env.NODE_ENV==="production",Hg=/[ \t]{2,}/g,Wg=/^[ \t]*/gm,fd=function(t){return t.replace(Hg," ").replace(Wg,"").trim()},Gg=function(t){return fd(`
|
|
359
|
+
*/var Xc;function eg(){return Xc||(Xc=1,process.env.NODE_ENV!=="production"&&function(){var e=60103,t=60106,n=60107,r=60108,a=60114,s=60109,l=60110,c=60112,p=60113,f=60120,m=60115,u=60116,h=60121,S=60122,y=60117,C=60129,T=60131;if(typeof Symbol=="function"&&Symbol.for){var w=Symbol.for;e=w("react.element"),t=w("react.portal"),n=w("react.fragment"),r=w("react.strict_mode"),a=w("react.profiler"),s=w("react.provider"),l=w("react.context"),c=w("react.forward_ref"),p=w("react.suspense"),f=w("react.suspense_list"),m=w("react.memo"),u=w("react.lazy"),h=w("react.block"),S=w("react.server.block"),y=w("react.fundamental"),w("react.scope"),w("react.opaque.id"),C=w("react.debug_trace_mode"),w("react.offscreen"),T=w("react.legacy_hidden")}var D=!1;function M(Q){return!!(typeof Q=="string"||typeof Q=="function"||Q===n||Q===a||Q===C||Q===r||Q===p||Q===f||Q===T||D||typeof Q=="object"&&Q!==null&&(Q.$$typeof===u||Q.$$typeof===m||Q.$$typeof===s||Q.$$typeof===l||Q.$$typeof===c||Q.$$typeof===y||Q.$$typeof===h||Q[0]===S))}function I(Q){if(typeof Q=="object"&&Q!==null){var se=Q.$$typeof;switch(se){case e:var we=Q.type;switch(we){case n:case a:case r:case p:case f:return we;default:var Le=we&&we.$$typeof;switch(Le){case l:case c:case u:case m:case s:return Le;default:return se}}case t:return se}}}var k=l,A=s,G=e,E=c,R=n,O=u,P=m,z=t,L=a,re=r,B=p,Z=!1,H=!1;function q(Q){return Z||(Z=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function ae(Q){return H||(H=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function $(Q){return I(Q)===l}function j(Q){return I(Q)===s}function oe(Q){return typeof Q=="object"&&Q!==null&&Q.$$typeof===e}function ie(Q){return I(Q)===c}function J(Q){return I(Q)===n}function V(Q){return I(Q)===u}function W(Q){return I(Q)===m}function X(Q){return I(Q)===t}function te(Q){return I(Q)===a}function pe(Q){return I(Q)===r}function ce(Q){return I(Q)===p}Ve.ContextConsumer=k,Ve.ContextProvider=A,Ve.Element=G,Ve.ForwardRef=E,Ve.Fragment=R,Ve.Lazy=O,Ve.Memo=P,Ve.Portal=z,Ve.Profiler=L,Ve.StrictMode=re,Ve.Suspense=B,Ve.isAsyncMode=q,Ve.isConcurrentMode=ae,Ve.isContextConsumer=$,Ve.isContextProvider=j,Ve.isElement=oe,Ve.isForwardRef=ie,Ve.isFragment=J,Ve.isLazy=V,Ve.isMemo=W,Ve.isPortal=X,Ve.isProfiler=te,Ve.isStrictMode=pe,Ve.isSuspense=ce,Ve.isValidElementType=M,Ve.typeOf=I}()),Ve}var Qc;function tg(){return Qc||(Qc=1,process.env.NODE_ENV==="production"?Lo.exports=QS():Lo.exports=eg()),Lo.exports}var ed=tg(),ng=["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"],rg=["reactReduxForwardedRef"],og=[],ag=[null,null],sg=function(t){try{return JSON.stringify(t)}catch{return String(t)}};function ig(e,t){var n=e[1];return[t.payload,n+1]}function td(e,t,n){zc(function(){return e.apply(void 0,t)},n)}function lg(e,t,n,r,a,s,l){e.current=r,t.current=a,n.current=!1,s.current&&(s.current=null,l())}function cg(e,t,n,r,a,s,l,c,p,f){if(e){var m=!1,u=null,h=function(){if(!m){var C=t.getState(),T,w;try{T=r(C,a.current)}catch(D){w=D,u=D}w||(u=null),T===s.current?l.current||p():(s.current=T,c.current=T,l.current=!0,f({type:"STORE_UPDATED",payload:{error:w}}))}};n.onStateChange=h,n.trySubscribe(),h();var S=function(){if(m=!0,n.tryUnsubscribe(),n.onStateChange=null,u)throw u};return S}}var dg=function(){return[null,0]};function pg(e,t){t===void 0&&(t={});var n=t,r=n.getDisplayName,a=r===void 0?function(A){return"ConnectAdvanced("+A+")"}:r,s=n.methodName,l=s===void 0?"connectAdvanced":s,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,S=n.withRef,y=S===void 0?!1:S,C=n.forwardRef,T=C===void 0?!1:C,w=n.context,D=w===void 0?is:w,M=_o(n,ng);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(y)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 k=D;return function(G){if(process.env.NODE_ENV!=="production"&&!ed.isValidElementType(G))throw new Error("You must pass a component to the function returned by "+(l+". Instead received "+sg(G)));var E=G.displayName||G.name||"Component",R=a(E),O=be({},M,{getDisplayName:a,methodName:l,renderCountProp:p,shouldHandleStateChanges:m,storeKey:h,displayName:R,wrappedComponentName:E,WrappedComponent:G}),P=M.pure;function z(H){return e(H.dispatch,O)}var L=P?x.useMemo:function(H){return H()};function re(H){var q=x.useMemo(function(){var Ue=H.reactReduxForwardedRef,We=_o(H,rg);return[H.context,Ue,We]},[H]),ae=q[0],$=q[1],j=q[2],oe=x.useMemo(function(){return ae&&ae.Consumer&&ed.isContextConsumer(x.createElement(ae.Consumer,null))?ae:k},[ae,k]),ie=x.useContext(oe),J=!!H.store&&!!H.store.getState&&!!H.store.dispatch,V=!!ie&&!!ie.store;if(process.env.NODE_ENV!=="production"&&!J&&!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 W=J?H.store:ie.store,X=x.useMemo(function(){return z(W)},[W]),te=x.useMemo(function(){if(!m)return ag;var Ue=Uc(W,J?null:ie.subscription),We=Ue.notifyNestedSubs.bind(Ue);return[Ue,We]},[W,J,ie]),pe=te[0],ce=te[1],Q=x.useMemo(function(){return J?ie:be({},ie,{subscription:pe})},[J,ie,pe]),se=x.useReducer(ig,og,dg),we=se[0],Le=we[0],wt=se[1];if(Le&&Le.error)throw Le.error;var lt=x.useRef(),ct=x.useRef(j),Xe=x.useRef(),At=x.useRef(!1),Qe=L(function(){return Xe.current&&j===ct.current?Xe.current:X(W.getState(),j)},[W,Le,j]);td(lg,[ct,lt,At,j,Qe,Xe,ce]),td(cg,[m,W,pe,X,ct,lt,At,Xe,ce,wt],[W,pe,X]);var Ke=x.useMemo(function(){return x.createElement(G,be({},Qe,{ref:$}))},[$,G,Qe]),Se=x.useMemo(function(){return m?x.createElement(oe.Provider,{value:Q},Ke):Ke},[oe,Ke,Q]);return Se}var B=P?x.memo(re):re;if(B.WrappedComponent=G,B.displayName=re.displayName=R,T){var Z=x.forwardRef(function(q,ae){return x.createElement(B,be({},q,{reactReduxForwardedRef:ae}))});return Z.displayName=R,Z.WrappedComponent=G,Jc(Z,G)}return Jc(B,G)}}function nd(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function cs(e,t){if(nd(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])||!nd(e[n[a]],t[n[a]]))return!1;return!0}function ug(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 mg(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 rd(e){typeof console<"u"&&typeof console.error=="function"&&console.error(e);try{throw new Error(e)}catch{}}function od(e,t,n){mg(e)||rd(n+"() in "+t+" must return a plain object. Instead received "+e+".")}function ds(e){return function(n,r){var a=e(n,r);function s(){return a}return s.dependsOnOwnProps=!1,s}}function ad(e){return e.dependsOnOwnProps!==null&&e.dependsOnOwnProps!==void 0?!!e.dependsOnOwnProps:e.length!==1}function sd(e,t){return function(r,a){var s=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=ad(e);var m=l(p,f);return typeof m=="function"&&(l.mapToProps=m,l.dependsOnOwnProps=ad(m),m=l(p,f)),process.env.NODE_ENV!=="production"&&od(m,s,t),m},l}}function fg(e){return typeof e=="function"?sd(e,"mapDispatchToProps"):void 0}function hg(e){return e?void 0:ds(function(t){return{dispatch:t}})}function Sg(e){return e&&typeof e=="object"?ds(function(t){return ug(e,t)}):void 0}const gg=[fg,hg,Sg];function bg(e){return typeof e=="function"?sd(e,"mapStateToProps"):void 0}function vg(e){return e?void 0:ds(function(){return{}})}const yg=[bg,vg];function Tg(e,t,n){return be({},n,e,t)}function Eg(e){return function(n,r){var a=r.displayName,s=r.pure,l=r.areMergedPropsEqual,c=!1,p;return function(m,u,h){var S=e(m,u,h);return c?(!s||!l(S,p))&&(p=S):(c=!0,p=S,process.env.NODE_ENV!=="production"&&od(p,a,"mergeProps")),p}}}function wg(e){return typeof e=="function"?Eg(e):void 0}function Cg(e){return e?void 0:function(){return Tg}}const Dg=[wg,Cg];function ps(e,t,n){if(e)(t==="mapStateToProps"||t==="mapDispatchToProps")&&(Object.prototype.hasOwnProperty.call(e,"dependsOnOwnProps")||rd("The selector for "+t+" of "+n+" did not specify a value for dependsOnOwnProps."));else throw new Error("Unexpected value for "+t+" in "+n+".")}function Ng(e,t,n,r){ps(e,"mapStateToProps",r),ps(t,"mapDispatchToProps",r),ps(n,"mergeProps",r)}var kg=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function xg(e,t,n,r){return function(s,l){return n(e(s,l),t(r,l),l)}}function Ig(e,t,n,r,a){var s=a.areStatesEqual,l=a.areOwnPropsEqual,c=a.areStatePropsEqual,p=!1,f,m,u,h,S;function y(M,I){return f=M,m=I,u=e(f,m),h=t(r,m),S=n(u,h,m),p=!0,S}function C(){return u=e(f,m),t.dependsOnOwnProps&&(h=t(r,m)),S=n(u,h,m),S}function T(){return e.dependsOnOwnProps&&(u=e(f,m)),t.dependsOnOwnProps&&(h=t(r,m)),S=n(u,h,m),S}function w(){var M=e(f,m),I=!c(M,u);return u=M,I&&(S=n(u,h,m)),S}function D(M,I){var k=!l(I,m),A=!s(M,f,I,m);return f=M,m=I,k&&A?C():k?T():A?w():S}return function(I,k){return p?D(I,k):y(I,k)}}function Mg(e,t){var n=t.initMapStateToProps,r=t.initMapDispatchToProps,a=t.initMergeProps,s=_o(t,kg),l=n(e,s),c=r(e,s),p=a(e,s);process.env.NODE_ENV!=="production"&&Ng(l,c,p,s.displayName);var f=s.pure?Ig:xg;return f(l,c,p,e,s)}var _g=["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"];function us(e,t,n){for(var r=t.length-1;r>=0;r--){var a=t[r](e);if(a)return a}return function(s,l){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+l.wrappedComponentName+".")}}function Lg(e,t){return e===t}function Og(e){var t=e===void 0?{}:e,n=t.connectHOC,r=n===void 0?pg:n,a=t.mapStateToPropsFactories,s=a===void 0?yg:a,l=t.mapDispatchToPropsFactories,c=l===void 0?gg:l,p=t.mergePropsFactories,f=p===void 0?Dg:p,m=t.selectorFactory,u=m===void 0?Mg:m;return function(S,y,C,T){T===void 0&&(T={});var w=T,D=w.pure,M=D===void 0?!0:D,I=w.areStatesEqual,k=I===void 0?Lg:I,A=w.areOwnPropsEqual,G=A===void 0?cs:A,E=w.areStatePropsEqual,R=E===void 0?cs:E,O=w.areMergedPropsEqual,P=O===void 0?cs:O,z=_o(w,_g),L=us(S,s,"mapStateToProps"),re=us(y,c,"mapDispatchToProps"),B=us(C,f,"mergeProps");return r(u,be({methodName:"connect",getDisplayName:function(H){return"Connect("+H+")"},shouldHandleStateChanges:!!S,initMapStateToProps:L,initMapDispatchToProps:re,initMergeProps:B,pure:M,areStatesEqual:k,areOwnPropsEqual:G,areStatePropsEqual:R,areMergedPropsEqual:P},z))}}const id=Og();jS(vo.unstable_batchedUpdates);function Rg(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 ld(e,t){var n=x.useState(function(){return{inputs:t,result:e()}})[0],r=x.useRef(!0),a=x.useRef(n),s=r.current||!!(t&&a.current.inputs&&Rg(t,a.current.inputs)),l=s?a.current:{inputs:t,result:e()};return x.useEffect(function(){r.current=!1,a.current=l},[l]),l.result}function Bg(e,t){return ld(function(){return e},t)}var Me=ld,ge=Bg,Pg=process.env.NODE_ENV==="production",ms="Invariant failed";function cd(e,t){if(Pg)throw new Error(ms);var n=typeof t=="function"?t():t,r=n?"".concat(ms,": ").concat(n):ms;throw new Error(r)}var Kt=function(t){var n=t.top,r=t.right,a=t.bottom,s=t.left,l=r-s,c=a-n,p={top:n,right:r,bottom:a,left:s,width:l,height:c,x:s,y:n,center:{x:(r+s)/2,y:(a+n)/2}};return p},fs=function(t,n){return{top:t.top-n.top,left:t.left-n.left,bottom:t.bottom+n.bottom,right:t.right+n.right}},dd=function(t,n){return{top:t.top+n.top,left:t.left+n.left,bottom:t.bottom-n.bottom,right:t.right-n.right}},Ag=function(t,n){return{top:t.top+n.y,left:t.left+n.x,bottom:t.bottom+n.y,right:t.right+n.x}},hs={top:0,right:0,bottom:0,left:0},Ss=function(t){var n=t.borderBox,r=t.margin,a=r===void 0?hs:r,s=t.border,l=s===void 0?hs:s,c=t.padding,p=c===void 0?hs:c,f=Kt(fs(n,a)),m=Kt(dd(n,l)),u=Kt(dd(m,p));return{marginBox:f,borderBox:Kt(n),paddingBox:m,contentBox:u,margin:a,border:l,padding:p}},Lt=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"?cd(!1,"Could not parse value [raw: "+t+", without suffix: "+n+"]"):cd()),a},Fg=function(){return{x:window.pageXOffset,y:window.pageYOffset}},Oo=function(t,n){var r=t.borderBox,a=t.border,s=t.margin,l=t.padding,c=Ag(r,n);return Ss({borderBox:c,border:a,margin:s,padding:l})},Ro=function(t,n){return n===void 0&&(n=Fg()),Oo(t,n)},pd=function(t,n){var r={top:Lt(n.marginTop),right:Lt(n.marginRight),bottom:Lt(n.marginBottom),left:Lt(n.marginLeft)},a={top:Lt(n.paddingTop),right:Lt(n.paddingRight),bottom:Lt(n.paddingBottom),left:Lt(n.paddingLeft)},s={top:Lt(n.borderTopWidth),right:Lt(n.borderRightWidth),bottom:Lt(n.borderBottomWidth),left:Lt(n.borderLeftWidth)};return Ss({borderBox:t,margin:r,padding:a,border:s})},ud=function(t){var n=t.getBoundingClientRect(),r=window.getComputedStyle(t);return pd(n,r)},md=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function Vg(e,t){return!!(e===t||md(e)&&md(t))}function $g(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!Vg(e[n],t[n]))return!1;return!0}function at(e,t){t===void 0&&(t=$g);var n,r=[],a,s=!1;function l(){for(var c=[],p=0;p<arguments.length;p++)c[p]=arguments[p];return s&&n===this&&t(c,r)||(a=e.apply(this,c),s=!0,n=this,r=c),a}return l}var Vr=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},Kg=process.env.NODE_ENV==="production",Hg=/[ \t]{2,}/g,Wg=/^[ \t]*/gm,fd=function(t){return t.replace(Hg," ").replace(Wg,"").trim()},Gg=function(t){return fd(`
|
|
360
360
|
%creact-beautiful-dnd
|
|
361
361
|
|
|
362
362
|
%c`+fd(t)+`
|
|
@@ -365,7 +365,7 @@ Valid keys: `+JSON.stringify(Object.keys($),null," "));var se=Q(X,ce,J,V,W+"."+
|
|
|
365
365
|
`)},Yg=function(t){return[Gg(t),"color: #00C584; font-size: 1.2em; font-weight: bold;","line-height: 1.5","color: #723874;"]},Ug="__react-beautiful-dnd-disable-dev-warnings";function hd(e,t){var n;Kg||typeof window<"u"&&window[Ug]||(n=console)[e].apply(n,Yg(t))}var He=hd.bind(null,"warn"),gs=hd.bind(null,"error");function vn(){}function zg(e,t){return be({},e,{},t)}function Ot(e,t,n){var r=t.map(function(a){var s=zg(n,a.options);return e.addEventListener(a.eventName,a.fn,s),function(){e.removeEventListener(a.eventName,a.fn,s)}});return function(){r.forEach(function(s){s()})}}var jg=process.env.NODE_ENV==="production",Sd="Invariant failed";function $r(e){this.message=e}$r.prototype.toString=function(){return this.message};function K(e,t){throw jg?new $r(Sd):new $r(Sd+": "+(t||""))}var qg=function(e){wc(t,e);function t(){for(var r,a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];return r=e.call.apply(e,[this].concat(s))||this,r.callbacks=null,r.unbind=vn,r.onWindowError=function(c){var p=r.getCallbacks();p.isDragging()&&(p.tryAbort(),process.env.NODE_ENV!=="production"&&He(`
|
|
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 $r&&(c.preventDefault(),process.env.NODE_ENV!=="production"&&gs(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=Ot(window,[{eventName:"error",fn:this.onWindowError}])},n.componentDidCatch=function(a){if(a instanceof $r){process.env.NODE_ENV!=="production"&&gs(a.message),this.setState({});return}throw a},n.componentWillUnmount=function(){this.unbind()},n.render=function(){return this.props.children(this.setCallbacks)},t}(
|
|
368
|
+
`));var f=c.error;f instanceof $r&&(c.preventDefault(),process.env.NODE_ENV!=="production"&&gs(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=Ot(window,[{eventName:"error",fn:this.onWindowError}])},n.componentDidCatch=function(a){if(a instanceof $r){process.env.NODE_ENV!=="production"&&gs(a.message),this.setState({});return}throw a},n.componentWillUnmount=function(){this.unbind()},n.render=function(){return this.props.children(this.setCallbacks)},t}(x.Component),Jg=`
|
|
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
|
|
@@ -401,23 +401,23 @@ Valid keys: `+JSON.stringify(Object.keys($),null," "));var se=Q(X,ce,J,V,W+"."+
|
|
|
401
401
|
`:`
|
|
402
402
|
The item has been dropped while not over a drop area.
|
|
403
403
|
`+vd(t.source)+`
|
|
404
|
-
`},Po={dragHandleUsageInstructions:Jg,onDragStart:Zg,onDragUpdate:Xg,onDragEnd:Qg},st={x:0,y:0},ut=function(t,n){return{x:t.x+n.x,y:t.y+n.y}},Dt=function(t,n){return{x:t.x-n.x,y:t.y-n.y}},yn=function(t,n){return t.x===n.x&&t.y===n.y},ur=function(t){return{x:t.x!==0?-t.x:0,y:t.y!==0?-t.y:0}},$n=function(t,n,r){var a;return r===void 0&&(r=0),a={},a[t]=n,a[t==="x"?"y":"x"]=r,a},Kr=function(t,n){return Math.sqrt(Math.pow(n.x-t.x,2)+Math.pow(n.y-t.y,2))},yd=function(t,n){return Math.min.apply(Math,n.map(function(r){return Kr(t,r)}))},Td=function(t){return function(n){return{x:t(n.x),y:t(n.y)}}},eb=function(e,t){var n=Kt({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},Hr=function(t,n){return{top:t.top+n.y,left:t.left+n.x,bottom:t.bottom+n.y,right:t.right+n.x}},Ed=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}]},tb={top:0,right:0,bottom:0,left:0},nb=function(t,n){return n?Hr(t,n.scroll.diff.displacement):t},rb=function(t,n,r){if(r&&r.increasedBy){var a;return be({},t,(a={},a[n.end]=t[n.end]+r.increasedBy[n.line],a))}return t},ob=function(t,n){return n&&n.shouldClipSubject?eb(n.pageMarginBox,t):Kt(t)},mr=function(e){var t=e.page,n=e.withPlaceholder,r=e.axis,a=e.frame,s=nb(t.marginBox,a),l=rb(s,r,n),c=ob(l,a);return{page:t,withPlaceholder:n,active:c}},bs=function(e,t){e.frame||(process.env.NODE_ENV,K());var n=e.frame,r=Dt(t,n.scroll.initial),a=ur(r),s=be({},n,{scroll:{initial:n.scroll.initial,current:t,diff:{value:r,displacement:a},max:n.scroll.max}}),l=mr({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:s}),c=be({},e,{frame:s,subject:l});return c};function ab(e){return Number.isInteger?Number.isInteger(e):typeof e=="number"&&isFinite(e)&&Math.floor(e)===e}function Ao(e){return Object.values?Object.values(e):Object.keys(e).map(function(t){return e[t]})}function vs(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 Tn(e,t){if(e.find)return e.find(t);var n=vs(e,t);if(n!==-1)return e[n]}function wd(e){return Array.prototype.slice.call(e)}var Cd=at(function(e){return e.reduce(function(t,n){return t[n.descriptor.id]=n,t},{})}),Dd=at(function(e){return e.reduce(function(t,n){return t[n.descriptor.id]=n,t},{})}),Fo=at(function(e){return Ao(e)}),sb=at(function(e){return Ao(e)}),Kn=at(function(e,t){var n=sb(t).filter(function(r){return e===r.descriptor.droppableId}).sort(function(r,a){return r.descriptor.index-a.descriptor.index});return n});function ys(e){return e.at&&e.at.type==="REORDER"?e.at.destination:null}function Vo(e){return e.at&&e.at.type==="COMBINE"?e.at.combine:null}var $o=at(function(e,t){return t.filter(function(n){return n.descriptor.id!==e.descriptor.id})}),ib=function(e){var t=e.isMovingForward,n=e.draggable,r=e.destination,a=e.insideDestination,s=e.previousImpact;if(!r.isCombineEnabled)return null;var l=ys(s);if(!l)return null;function c(w){var T={type:"COMBINE",combine:{draggableId:w,droppableId:r.descriptor.id}};return be({},s,{at:T})}var p=s.displaced.all,f=p.length?p[0]:null;if(t)return f?c(f):null;var m=$o(n,a);if(!f){if(!m.length)return null;var u=m[m.length-1];return c(u.descriptor.id)}var h=vs(m,function(w){return w.descriptor.id===f});h===-1&&(process.env.NODE_ENV!=="production"?K(!1,"Could not find displaced item in set"):K());var S=h-1;if(S<0)return null;var y=m[S];return c(y.descriptor.id)},fr=function(e,t){return e.descriptor.droppableId===t.descriptor.id},Nd={point:st,value:0},Wr={invisible:{},visible:{},all:[]},lb={displaced:Wr,displacedBy:Nd,at:null},Rt=function(e,t){return function(n){return e<=n&&n<=t}},kd=function(e){var t=Rt(e.top,e.bottom),n=Rt(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 s=t(r.top)||t(r.bottom),l=n(r.left)||n(r.right),c=s&&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&&s;return u}},cb=function(e){var t=Rt(e.top,e.bottom),n=Rt(e.left,e.right);return function(r){var a=t(r.top)&&t(r.bottom)&&n(r.left)&&n(r.right);return a}},Ts={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},xd={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},db=function(e){return function(t){var n=Rt(t.top,t.bottom),r=Rt(t.left,t.right);return function(a){return e===Ts?n(a.top)&&n(a.bottom):r(a.left)&&r(a.right)}}},pb=function(t,n){var r=n.frame?n.frame.scroll.diff.displacement:st;return Hr(t,r)},ub=function(t,n,r){return n.subject.active?r(n.subject.active)(t):!1},mb=function(t,n,r){return r(n)(t)},Es=function(t){var n=t.target,r=t.destination,a=t.viewport,s=t.withDroppableDisplacement,l=t.isVisibleThroughFrameFn,c=s?pb(n,r):n;return ub(c,r,l)&&mb(c,a,l)},fb=function(t){return Es(be({},t,{isVisibleThroughFrameFn:kd}))},Id=function(t){return Es(be({},t,{isVisibleThroughFrameFn:cb}))},hb=function(t){return Es(be({},t,{isVisibleThroughFrameFn:db(t.destination.axis)}))},Sb=function(t,n,r){if(typeof r=="boolean")return r;if(!n)return!0;var a=n.invisible,s=n.visible;if(a[t])return!1;var l=s[t];return l?l.shouldAnimate:!0};function gb(e,t){var n=e.page.marginBox,r={top:t.point.y,right:0,bottom:0,left:t.point.x};return Kt(fs(n,r))}function Gr(e){var t=e.afterDragging,n=e.destination,r=e.displacedBy,a=e.viewport,s=e.forceShouldAnimate,l=e.last;return t.reduce(function(p,f){var m=gb(f,r),u=f.descriptor.id;p.all.push(u);var h=fb({target:m,destination:n,viewport:a,withDroppableDisplacement:!0});if(!h)return p.invisible[f.descriptor.id]=!0,p;var S=Sb(u,l,s),y={draggableId:u,shouldAnimate:S};return p.visible[u]=y,p},{all:[],visible:{},invisible:{}})}function bb(e,t){if(!e.length)return 0;var n=e[e.length-1].descriptor.index;return t.inHomeList?n:n+1}function Md(e){var t=e.insideDestination,n=e.inHomeList,r=e.displacedBy,a=e.destination,s=bb(t,{inHomeList:n});return{displaced:Wr,displacedBy:r,at:{type:"REORDER",destination:{droppableId:a.descriptor.id,index:s}}}}function Ko(e){var t=e.draggable,n=e.insideDestination,r=e.destination,a=e.viewport,s=e.displacedBy,l=e.last,c=e.index,p=e.forceShouldAnimate,f=fr(t,r);if(c==null)return Md({insideDestination:n,inHomeList:f,displacedBy:s,destination:r});var m=Tn(n,function(w){return w.descriptor.index===c});if(!m)return Md({insideDestination:n,inHomeList:f,displacedBy:s,destination:r});var u=$o(t,n),h=n.indexOf(m),S=u.slice(h),y=Gr({afterDragging:S,destination:r,displacedBy:s,last:l,viewport:a.frame,forceShouldAnimate:p});return{displaced:y,displacedBy:s,at:{type:"REORDER",destination:{droppableId:r.descriptor.id,index:c}}}}function En(e,t){return!!t.effected[e]}var vb=function(e){var t=e.isMovingForward,n=e.destination,r=e.draggables,a=e.combine,s=e.afterCritical;if(!n.isCombineEnabled)return null;var l=a.draggableId,c=r[l],p=c.descriptor.index,f=En(l,s);return f?t?p:p-1:t?p+1:p},yb=function(e){var t=e.isMovingForward,n=e.isInHomeList,r=e.insideDestination,a=e.location;if(!r.length)return null;var s=a.index,l=t?s+1:s-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},Tb=function(e){var t=e.isMovingForward,n=e.isInHomeList,r=e.draggable,a=e.draggables,s=e.destination,l=e.insideDestination,c=e.previousImpact,p=e.viewport,f=e.afterCritical,m=c.at;if(m||(process.env.NODE_ENV!=="production"?K(!1,"Cannot move in direction without previous impact location"):K()),m.type==="REORDER"){var u=yb({isMovingForward:t,isInHomeList:n,location:m.destination,insideDestination:l});return u==null?null:Ko({draggable:r,insideDestination:l,destination:s,viewport:p,last:c.displaced,displacedBy:c.displacedBy,index:u})}var h=vb({isMovingForward:t,destination:s,displaced:c.displaced,draggables:a,combine:m.combine,afterCritical:f});return h==null?null:Ko({draggable:r,insideDestination:l,destination:s,viewport:p,last:c.displaced,displacedBy:c.displacedBy,index:h})},Eb=function(e){var t=e.displaced,n=e.afterCritical,r=e.combineWith,a=e.displacedBy,s=!!(t.visible[r]||t.invisible[r]);return En(r,n)?s?st:ur(a.point):s?a.point:st},wb=function(e){var t=e.afterCritical,n=e.impact,r=e.draggables,a=Vo(n);a||(process.env.NODE_ENV,K());var s=a.draggableId,l=r[s].page.borderBox.center,c=Eb({displaced:n.displaced,afterCritical:t,combineWith:s,displacedBy:n.displacedBy});return ut(l,c)},_d=function(t,n){return n.margin[t.start]+n.borderBox[t.size]/2},Cb=function(t,n){return n.margin[t.end]+n.borderBox[t.size]/2},ws=function(t,n,r){return n[t.crossAxisStart]+r.margin[t.crossAxisStart]+r.borderBox[t.crossAxisSize]/2},Ld=function(t){var n=t.axis,r=t.moveRelativeTo,a=t.isMoving;return $n(n.line,r.marginBox[n.end]+_d(n,a),ws(n,r.marginBox,a))},Od=function(t){var n=t.axis,r=t.moveRelativeTo,a=t.isMoving;return $n(n.line,r.marginBox[n.start]-Cb(n,a),ws(n,r.marginBox,a))},Db=function(t){var n=t.axis,r=t.moveInto,a=t.isMoving;return $n(n.line,r.contentBox[n.start]+_d(n,a),ws(n,r.contentBox,a))},Nb=function(e){var t=e.impact,n=e.draggable,r=e.draggables,a=e.droppable,s=e.afterCritical,l=Kn(a.descriptor.id,r),c=n.page,p=a.axis;if(!l.length)return Db({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(En(u,s))return Od({axis:p,moveRelativeTo:h.page,isMoving:c});var S=Oo(h.page,m.point);return Od({axis:p,moveRelativeTo:S,isMoving:c})}var y=l[l.length-1];if(y.descriptor.id===n.descriptor.id)return c.borderBox.center;if(En(y.descriptor.id,s)){var w=Oo(y.page,ur(s.displacedBy.point));return Ld({axis:p,moveRelativeTo:w,isMoving:c})}return Ld({axis:p,moveRelativeTo:y.page,isMoving:c})},Cs=function(e,t){var n=e.frame;return n?ut(t,n.scroll.diff.displacement):t},kb=function(t){var n=t.impact,r=t.draggable,a=t.droppable,s=t.draggables,l=t.afterCritical,c=r.page.borderBox.center,p=n.at;return!a||!p?c:p.type==="REORDER"?Nb({impact:n,draggable:r,draggables:s,droppable:a,afterCritical:l}):wb({impact:n,draggables:s,afterCritical:l})},Ho=function(e){var t=kb(e),n=e.droppable,r=n?Cs(n,t):t;return r},Rd=function(e,t){var n=Dt(t,e.scroll.initial),r=ur(n),a=Kt({top:t.y,bottom:t.y+e.frame.height,left:t.x,right:t.x+e.frame.width}),s={frame:a,scroll:{initial:e.scroll.initial,max:e.scroll.max,current:t,diff:{value:n,displacement:r}}};return s};function Bd(e,t){return e.map(function(n){return t[n]})}function xb(e,t){for(var n=0;n<t.length;n++){var r=t[n].visible[e];if(r)return r}return null}var Ib=function(e){var t=e.impact,n=e.viewport,r=e.destination,a=e.draggables,s=e.maxScrollChange,l=Rd(n,ut(n.scroll.current,s)),c=r.frame?bs(r,ut(r.frame.scroll.current,s)):r,p=t.displaced,f=Gr({afterDragging:Bd(p.all,a),destination:r,displacedBy:t.displacedBy,viewport:l.frame,last:p,forceShouldAnimate:!1}),m=Gr({afterDragging:Bd(p.all,a),destination:c,displacedBy:t.displacedBy,viewport:n.frame,last:p,forceShouldAnimate:!1}),u={},h={},S=[p,f,m];p.all.forEach(function(w){var T=xb(w,S);if(T){h[w]=T;return}u[w]=!0});var y=be({},t,{displaced:{all:p.all,invisible:u,visible:h}});return y},Mb=function(e,t){return ut(e.scroll.diff.displacement,t)},Ds=function(e){var t=e.pageBorderBoxCenter,n=e.draggable,r=e.viewport,a=Mb(r,t),s=Dt(a,n.page.borderBox.center);return ut(n.client.borderBox.center,s)},Pd=function(e){var t=e.draggable,n=e.destination,r=e.newPageBorderBoxCenter,a=e.viewport,s=e.withDroppableDisplacement,l=e.onlyOnMainAxis,c=l===void 0?!1:l,p=Dt(r,t.page.borderBox.center),f=Hr(t.page.borderBox,p),m={target:f,destination:n,withDroppableDisplacement:s,viewport:a};return c?hb(m):Id(m)},_b=function(e){var t=e.isMovingForward,n=e.draggable,r=e.destination,a=e.draggables,s=e.previousImpact,l=e.viewport,c=e.previousPageBorderBoxCenter,p=e.previousClientSelection,f=e.afterCritical;if(!r.isEnabled)return null;var m=Kn(r.descriptor.id,a),u=fr(n,r),h=ib({isMovingForward:t,draggable:n,destination:r,insideDestination:m,previousImpact:s})||Tb({isMovingForward:t,isInHomeList:u,draggable:n,draggables:a,destination:r,insideDestination:m,previousImpact:s,viewport:l,afterCritical:f});if(!h)return null;var S=Ho({impact:h,draggable:n,droppable:r,draggables:a,afterCritical:f}),y=Pd({draggable:n,destination:r,newPageBorderBoxCenter:S,viewport:l.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0});if(y){var w=Ds({pageBorderBoxCenter:S,draggable:n,viewport:l});return{clientSelection:w,impact:h,scrollJumpRequest:null}}var T=Dt(S,c),C=Ib({impact:h,viewport:l,destination:r,draggables:a,maxScrollChange:T});return{clientSelection:p,impact:C,scrollJumpRequest:T}},gt=function(t){var n=t.subject.active;return n||(process.env.NODE_ENV!=="production"?K(!1,"Cannot get clipped area from droppable"):K()),n},Lb=function(e){var t=e.isMovingForward,n=e.pageBorderBoxCenter,r=e.source,a=e.droppables,s=e.viewport,l=r.subject.active;if(!l)return null;var c=r.axis,p=Rt(l[c.start],l[c.end]),f=Fo(a).filter(function(u){return u!==r}).filter(function(u){return u.isEnabled}).filter(function(u){return!!u.subject.active}).filter(function(u){return kd(s.frame)(gt(u))}).filter(function(u){var h=gt(u);return t?l[c.crossAxisEnd]<h[c.crossAxisEnd]:h[c.crossAxisStart]<l[c.crossAxisStart]}).filter(function(u){var h=gt(u),S=Rt(h[c.start],h[c.end]);return p(h[c.start])||p(h[c.end])||S(l[c.start])||S(l[c.end])}).sort(function(u,h){var S=gt(u)[c.crossAxisStart],y=gt(h)[c.crossAxisStart];return t?S-y:y-S}).filter(function(u,h,S){return gt(u)[c.crossAxisStart]===gt(S[0])[c.crossAxisStart]});if(!f.length)return null;if(f.length===1)return f[0];var m=f.filter(function(u){var h=Rt(gt(u)[c.start],gt(u)[c.end]);return h(n[c.line])});return m.length===1?m[0]:m.length>1?m.sort(function(u,h){return gt(u)[c.start]-gt(h)[c.start]})[0]:f.sort(function(u,h){var S=yd(n,Ed(gt(u))),y=yd(n,Ed(gt(h)));return S!==y?S-y:gt(u)[c.start]-gt(h)[c.start]})[0]},Ad=function(t,n){var r=t.page.borderBox.center;return En(t.descriptor.id,n)?Dt(r,n.displacedBy.point):r},Ob=function(t,n){var r=t.page.borderBox;return En(t.descriptor.id,n)?Hr(r,ur(n.displacedBy.point)):r},Rb=function(e){var t=e.pageBorderBoxCenter,n=e.viewport,r=e.destination,a=e.insideDestination,s=e.afterCritical,l=a.filter(function(c){return Id({target:Ob(c,s),destination:r,viewport:n.frame,withDroppableDisplacement:!0})}).sort(function(c,p){var f=Kr(t,Cs(r,Ad(c,s))),m=Kr(t,Cs(r,Ad(p,s)));return f<m?-1:m<f?1:c.descriptor.index-p.descriptor.index});return l[0]||null},Yr=at(function(t,n){var r=n[t.line];return{value:r,point:$n(t.line,r)}}),Bb=function(t,n,r){var a=t.axis;if(t.descriptor.mode==="virtual")return $n(a.line,n[a.line]);var s=t.subject.page.contentBox[a.size],l=Kn(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-s;return f<=0?null:$n(a.line,f)},Fd=function(t,n){return be({},t,{scroll:be({},t.scroll,{max:n})})},Vd=function(t,n,r){var a=t.frame;fr(n,t)&&(process.env.NODE_ENV!=="production"?K(!1,"Should not add placeholder space to home list"):K()),t.subject.withPlaceholder&&(process.env.NODE_ENV!=="production"?K(!1,"Cannot add placeholder size to a subject when it already has one"):K());var s=Yr(t.axis,n.displaceBy).point,l=Bb(t,s,r),c={placeholderSize:s,increasedBy:l,oldFrameMaxScroll:t.frame?t.frame.scroll.max:null};if(!a){var p=mr({page:t.subject.page,withPlaceholder:c,axis:t.axis,frame:t.frame});return be({},t,{subject:p})}var f=l?ut(a.scroll.max,l):a.scroll.max,m=Fd(a,f),u=mr({page:t.subject.page,withPlaceholder:c,axis:t.axis,frame:m});return be({},t,{subject:u,frame:m})},Pb=function(t){var n=t.subject.withPlaceholder;n||(process.env.NODE_ENV!=="production"?K(!1,"Cannot remove placeholder form subject when there was none"):K());var r=t.frame;if(!r){var a=mr({page:t.subject.page,axis:t.axis,frame:null,withPlaceholder:null});return be({},t,{subject:a})}var s=n.oldFrameMaxScroll;s||(process.env.NODE_ENV!=="production"?K(!1,"Expected droppable with frame to have old max frame scroll when removing placeholder"):K());var l=Fd(r,s),c=mr({page:t.subject.page,axis:t.axis,frame:l,withPlaceholder:null});return be({},t,{subject:c,frame:l})},Ab=function(e){var t=e.previousPageBorderBoxCenter,n=e.moveRelativeTo,r=e.insideDestination,a=e.draggable,s=e.draggables,l=e.destination,c=e.viewport,p=e.afterCritical;if(!n){if(r.length)return null;var f={displaced:Wr,displacedBy:Nd,at:{type:"REORDER",destination:{droppableId:l.descriptor.id,index:0}}},m=Ho({impact:f,draggable:a,droppable:l,draggables:s,afterCritical:p}),u=fr(a,l)?l:Vd(l,a,s),h=Pd({draggable:a,destination:u,newPageBorderBoxCenter:m,viewport:c.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0});return h?f:null}var S=t[l.axis.line]<=n.page.borderBox.center[l.axis.line],y=function(){var T=n.descriptor.index;return n.descriptor.id===a.descriptor.id||S?T:T+1}(),w=Yr(l.axis,a.displaceBy);return Ko({draggable:a,insideDestination:r,destination:l,viewport:c,displacedBy:w,last:Wr,index:y})},Fb=function(e){var t=e.isMovingForward,n=e.previousPageBorderBoxCenter,r=e.draggable,a=e.isOver,s=e.draggables,l=e.droppables,c=e.viewport,p=e.afterCritical,f=Lb({isMovingForward:t,pageBorderBoxCenter:n,source:a,droppables:l,viewport:c});if(!f)return null;var m=Kn(f.descriptor.id,s),u=Rb({pageBorderBoxCenter:n,viewport:c,destination:f,insideDestination:m,afterCritical:p}),h=Ab({previousPageBorderBoxCenter:n,destination:f,draggable:r,draggables:s,moveRelativeTo:u,insideDestination:m,viewport:c,afterCritical:p});if(!h)return null;var S=Ho({impact:h,draggable:r,droppable:f,draggables:s,afterCritical:p}),y=Ds({pageBorderBoxCenter:S,draggable:r,viewport:c});return{clientSelection:y,impact:h,scrollJumpRequest:null}},Nt=function(e){var t=e.at;return t?t.type==="REORDER"?t.destination.droppableId:t.combine.droppableId:null},Vb=function(t,n){var r=Nt(t);return r?n[r]:null},$b=function(e){var t=e.state,n=e.type,r=Vb(t.impact,t.dimensions.droppables),a=!!r,s=t.dimensions.droppables[t.critical.droppable.id],l=r||s,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,S=h.draggables,y=h.droppables;return p?_b({isMovingForward:f,previousPageBorderBoxCenter:u,draggable:m,destination:l,draggables:S,viewport:t.viewport,previousClientSelection:t.current.client.selection,previousImpact:t.impact,afterCritical:t.afterCritical}):Fb({isMovingForward:f,previousPageBorderBoxCenter:u,draggable:m,isOver:l,draggables:S,droppables:y,viewport:t.viewport,afterCritical:t.afterCritical})};function Hn(e){return e.phase==="DRAGGING"||e.phase==="COLLECTING"}function $d(e){var t=Rt(e.top,e.bottom),n=Rt(e.left,e.right);return function(a){return t(a.y)&&n(a.x)}}function Kb(e,t){return e.left<t.right&&e.right>t.left&&e.top<t.bottom&&e.bottom>t.top}function Hb(e){var t=e.pageBorderBox,n=e.draggable,r=e.candidates,a=n.page.borderBox.center,s=r.map(function(l){var c=l.axis,p=$n(l.axis.line,t.center[c.line],l.page.borderBox.center[c.crossAxisLine]);return{id:l.descriptor.id,distance:Kr(a,p)}}).sort(function(l,c){return c.distance-l.distance});return s[0]?s[0].id:null}function Wb(e){var t=e.pageBorderBox,n=e.draggable,r=e.droppables,a=Fo(r).filter(function(s){if(!s.isEnabled)return!1;var l=s.subject.active;if(!l||!Kb(t,l))return!1;if($d(l)(t.center))return!0;var c=s.axis,p=l.center[c.crossAxisLine],f=t[c.crossAxisStart],m=t[c.crossAxisEnd],u=Rt(l[c.crossAxisStart],l[c.crossAxisEnd]),h=u(f),S=u(m);return!h&&!S?!0:h?f<p:m>p});return a.length?a.length===1?a[0].descriptor.id:Hb({pageBorderBox:t,draggable:n,candidates:a}):null}var Kd=function(t,n){return Kt(Hr(t,n))},Gb=function(e,t){var n=e.frame;return n?Kd(t,n.scroll.diff.value):t};function Hd(e){var t=e.displaced,n=e.id;return!!(t.visible[n]||t.invisible[n])}function Yb(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 Ub=function(e){var t=e.pageBorderBoxWithDroppableScroll,n=e.draggable,r=e.destination,a=e.insideDestination,s=e.last,l=e.viewport,c=e.afterCritical,p=r.axis,f=Yr(r.axis,n.displaceBy),m=f.value,u=t[p.start],h=t[p.end],S=$o(n,a),y=Tn(S,function(T){var C=T.descriptor.id,D=T.page.borderBox.center[p.line],M=En(C,c),x=Hd({displaced:s,id:C});return M?x?h<=D:u<D-m:x?h<=D+m:u<D}),w=Yb({draggable:n,closest:y,inHomeList:fr(n,r)});return Ko({draggable:n,insideDestination:a,destination:r,viewport:l,last:s,displacedBy:f,index:w})},zb=4,jb=function(e){var t=e.draggable,n=e.pageBorderBoxWithDroppableScroll,r=e.previousImpact,a=e.destination,s=e.insideDestination,l=e.afterCritical;if(!a.isCombineEnabled)return null;var c=a.axis,p=Yr(a.axis,t.displaceBy),f=p.value,m=n[c.start],u=n[c.end],h=$o(t,s),S=Tn(h,function(w){var T=w.descriptor.id,C=w.page.borderBox,D=C[c.size],M=D/zb,x=En(T,l),k=Hd({displaced:r.displaced,id:T});return x?k?u>C[c.start]+M&&u<C[c.end]-M:m>C[c.start]-f+M&&m<C[c.end]-f-M:k?u>C[c.start]+f+M&&u<C[c.end]+f-M:m>C[c.start]+M&&m<C[c.end]-M});if(!S)return null;var y={displacedBy:p,displaced:r.displaced,at:{type:"COMBINE",combine:{draggableId:S.descriptor.id,droppableId:a.descriptor.id}}};return y},Wd=function(e){var t=e.pageOffset,n=e.draggable,r=e.draggables,a=e.droppables,s=e.previousImpact,l=e.viewport,c=e.afterCritical,p=Kd(n.page.borderBox,t),f=Wb({pageBorderBox:p,draggable:n,droppables:a});if(!f)return lb;var m=a[f],u=Kn(m.descriptor.id,r),h=Gb(m,p);return jb({pageBorderBoxWithDroppableScroll:h,draggable:n,previousImpact:s,destination:m,insideDestination:u,afterCritical:c})||Ub({pageBorderBoxWithDroppableScroll:h,draggable:n,destination:m,insideDestination:u,last:s.displaced,viewport:l,afterCritical:c})},Ns=function(e,t){var n;return be({},e,(n={},n[t.descriptor.id]=t,n))},qb=function(t){var n=t.previousImpact,r=t.impact,a=t.droppables,s=Nt(n),l=Nt(r);if(!s||s===l)return a;var c=a[s];if(!c.subject.withPlaceholder)return a;var p=Pb(c);return Ns(a,p)},Jb=function(e){var t=e.draggable,n=e.draggables,r=e.droppables,a=e.previousImpact,s=e.impact,l=qb({previousImpact:a,impact:s,droppables:r}),c=Nt(s);if(!c)return l;var p=r[c];if(fr(t,p)||p.subject.withPlaceholder)return l;var f=Vd(p,t,n);return Ns(l,f)},Ur=function(e){var t=e.state,n=e.clientSelection,r=e.dimensions,a=e.viewport,s=e.impact,l=e.scrollJumpRequest,c=a||t.viewport,p=r||t.dimensions,f=n||t.current.client.selection,m=Dt(f,t.initial.client.selection),u={offset:m,selection:f,borderBoxCenter:ut(t.initial.client.borderBoxCenter,m)},h={selection:ut(u.selection,c.scroll.current),borderBoxCenter:ut(u.borderBoxCenter,c.scroll.current),offset:ut(u.offset,c.scroll.diff.value)},S={client:u,page:h};if(t.phase==="COLLECTING")return be({phase:"COLLECTING"},t,{dimensions:p,viewport:c,current:S});var y=p.draggables[t.critical.draggable.id],w=s||Wd({pageOffset:h.offset,draggable:y,draggables:p.draggables,droppables:p.droppables,previousImpact:t.impact,viewport:c,afterCritical:t.afterCritical}),T=Jb({draggable:y,impact:w,previousImpact:t.impact,draggables:p.draggables,droppables:p.droppables}),C=be({},t,{current:S,dimensions:{draggables:p.draggables,droppables:T},impact:w,viewport:c,scrollJumpRequest:l||null,forceShouldAnimate:l?!1:null});return C};function Zb(e,t){return e.map(function(n){return t[n]})}var Gd=function(e){var t=e.impact,n=e.viewport,r=e.draggables,a=e.destination,s=e.forceShouldAnimate,l=t.displaced,c=Zb(l.all,r),p=Gr({afterDragging:c,destination:a,displacedBy:t.displacedBy,viewport:n.frame,forceShouldAnimate:s,last:l});return be({},t,{displaced:p})},Yd=function(e){var t=e.impact,n=e.draggable,r=e.droppable,a=e.draggables,s=e.viewport,l=e.afterCritical,c=Ho({impact:t,draggable:n,draggables:a,droppable:r,afterCritical:l});return Ds({pageBorderBoxCenter:c,draggable:n,viewport:s})},Ud=function(e){var t=e.state,n=e.dimensions,r=e.viewport;t.movementMode!=="SNAP"&&(process.env.NODE_ENV,K());var a=t.impact,s=r||t.viewport,l=n||t.dimensions,c=l.draggables,p=l.droppables,f=c[t.critical.draggable.id],m=Nt(a);m||(process.env.NODE_ENV!=="production"?K(!1,"Must be over a destination in SNAP movement mode"):K());var u=p[m],h=Gd({impact:a,viewport:s,destination:u,draggables:c}),S=Yd({impact:h,draggable:f,droppable:u,draggables:c,viewport:s,afterCritical:t.afterCritical});return Ur({impact:h,clientSelection:S,state:t,dimensions:l,viewport:s})},Xb=function(e){return{index:e.index,droppableId:e.droppableId}},zd=function(e){var t=e.draggable,n=e.home,r=e.draggables,a=e.viewport,s=Yr(n.axis,t.displaceBy),l=Kn(n.descriptor.id,r),c=l.indexOf(t);c===-1&&(process.env.NODE_ENV!=="production"?K(!1,"Expected draggable to be inside home list"):K());var p=l.slice(c+1),f=p.reduce(function(S,y){return S[y.descriptor.id]=!0,S},{}),m={inVirtualList:n.descriptor.mode==="virtual",displacedBy:s,effected:f},u=Gr({afterDragging:p,destination:n,displacedBy:s,last:null,viewport:a.frame,forceShouldAnimate:!1}),h={displaced:u,displacedBy:s,at:{type:"REORDER",destination:Xb(t.descriptor)}};return{impact:h,afterCritical:m}},Qb=function(e,t){return{draggables:e.draggables,droppables:Ns(e.droppables,t)}},zr=function(t){process.env.NODE_ENV},jr=function(t){process.env.NODE_ENV},ev=function(e){var t=e.draggable,n=e.offset,r=e.initialWindowScroll,a=Oo(t.client,n),s=Ro(a,r),l=be({},t,{placeholder:be({},t.placeholder,{client:a}),client:a,page:s});return l},tv=function(e){var t=e.frame;return t||(process.env.NODE_ENV!=="production"?K(!1,"Expected Droppable to have a frame"):K()),t},nv=function(e){var t=e.additions,n=e.updatedDroppables,r=e.viewport,a=r.scroll.diff.value;return t.map(function(s){var l=s.descriptor.droppableId,c=n[l],p=tv(c),f=p.scroll.diff.value,m=ut(a,f),u=ev({draggable:s,offset:m,initialWindowScroll:r.scroll.initial});return u})},rv=function(e){var t=e.state,n=e.published;zr();var r=n.modified.map(function(M){var x=t.dimensions.droppables[M.droppableId],k=bs(x,M.scroll);return k}),a=be({},t.dimensions.droppables,{},Cd(r)),s=Dd(nv({additions:n.additions,updatedDroppables:a,viewport:t.viewport})),l=be({},t.dimensions.draggables,{},s);n.removals.forEach(function(M){delete l[M]});var c={droppables:a,draggables:l},p=Nt(t.impact),f=p?c.droppables[p]:null,m=c.draggables[t.critical.draggable.id],u=c.droppables[t.critical.droppable.id],h=zd({draggable:m,home:u,draggables:l,viewport:t.viewport}),S=h.impact,y=h.afterCritical,w=f&&f.isCombineEnabled?t.impact:S,T=Wd({pageOffset:t.current.page.offset,draggable:c.draggables[t.critical.draggable.id],draggables:c.draggables,droppables:c.droppables,previousImpact:w,viewport:t.viewport,afterCritical:y});jr();var C=be({phase:"DRAGGING"},t,{phase:"DRAGGING",impact:T,onLiftImpact:S,dimensions:c,afterCritical:y,forceShouldAnimate:!1});if(t.phase==="COLLECTING")return C;var D=be({phase:"DROP_PENDING"},C,{phase:"DROP_PENDING",reason:t.reason,isWaiting:!1});return D},ks=function(t){return t.movementMode==="SNAP"},xs=function(t,n,r){var a=Qb(t.dimensions,n);return!ks(t)||r?Ur({state:t,dimensions:a}):Ud({state:t,dimensions:a})};function Is(e){return e.isDragging&&e.movementMode==="SNAP"?be({phase:"DRAGGING"},e,{scrollJumpRequest:null}):e}var jd={phase:"IDLE",completed:null,shouldFlush:!1},ov=function(e,t){if(e===void 0&&(e=jd),t.type==="FLUSH")return be({},jd,{shouldFlush:!0});if(t.type==="INITIAL_PUBLISH"){e.phase!=="IDLE"&&(process.env.NODE_ENV!=="production"?K(!1,"INITIAL_PUBLISH must come after a IDLE phase"):K());var n=t.payload,r=n.critical,a=n.clientSelection,s=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:ut(m.selection,s.scroll.initial),borderBoxCenter:ut(m.selection,s.scroll.initial),offset:ut(m.selection,s.scroll.diff.value)}},h=Fo(l.droppables).every(function(Q){return!Q.isFixedOnPage}),S=zd({draggable:p,home:f,draggables:l.draggables,viewport:s}),y=S.impact,w=S.afterCritical,T={phase:"DRAGGING",isDragging:!0,critical:r,movementMode:c,dimensions:l,initial:u,current:u,isWindowScrollAllowed:h,impact:y,afterCritical:w,onLiftImpact:y,viewport:s,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"?K(!1,"Collection cannot start from phase "+e.phase):K());var C=be({phase:"COLLECTING"},e,{phase:"COLLECTING"});return C}if(t.type==="PUBLISH_WHILE_DRAGGING")return e.phase==="COLLECTING"||e.phase==="DROP_PENDING"||(process.env.NODE_ENV!=="production"?K(!1,"Unexpected "+t.type+" received in phase "+e.phase):K()),rv({state:e,published:t.payload});if(t.type==="MOVE"){if(e.phase==="DROP_PENDING")return e;Hn(e)||(process.env.NODE_ENV!=="production"?K(!1,t.type+" not permitted in phase "+e.phase):K());var D=t.payload.client;return yn(D,e.current.client.selection)?e:Ur({state:e,clientSelection:D,impact:ks(e)?e.impact:null})}if(t.type==="UPDATE_DROPPABLE_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="COLLECTING")return Is(e);Hn(e)||(process.env.NODE_ENV!=="production"?K(!1,t.type+" not permitted in phase "+e.phase):K());var M=t.payload,x=M.id,k=M.newScroll,P=e.dimensions.droppables[x];if(!P)return e;var G=bs(P,k);return xs(e,G,!1)}if(t.type==="UPDATE_DROPPABLE_IS_ENABLED"){if(e.phase==="DROP_PENDING")return e;Hn(e)||(process.env.NODE_ENV!=="production"?K(!1,"Attempting to move in an unsupported phase "+e.phase):K());var E=t.payload,R=E.id,O=E.isEnabled,A=e.dimensions.droppables[R];A||(process.env.NODE_ENV!=="production"?K(!1,"Cannot find Droppable[id: "+R+"] to toggle its enabled state"):K()),A.isEnabled===O&&(process.env.NODE_ENV!=="production"?K(!1,"Trying to set droppable isEnabled to "+String(O)+`
|
|
405
|
-
but it is already `+String(
|
|
406
|
-
but it is already `+String(Z.isCombineEnabled)):K());var H=be({},Z,{isCombineEnabled:B});return xs(e,H,!0)}if(t.type==="MOVE_BY_WINDOW_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="DROP_ANIMATING")return e;Hn(e)||(process.env.NODE_ENV!=="production"?K(!1,"Cannot move by window in phase "+e.phase):K()),e.isWindowScrollAllowed||(process.env.NODE_ENV!=="production"?K(!1,"Window scrolling is currently not supported for fixed lists"):K());var q=t.payload.newScroll;if(yn(e.viewport.scroll.current,q))return Is(e);var ae=Rd(e.viewport,q);return ks(e)?Ud({state:e,viewport:ae}):Ur({state:e,viewport:ae})}if(t.type==="UPDATE_VIEWPORT_MAX_SCROLL"){if(!Hn(e))return e;var $=t.payload.maxScroll;if(yn($,e.viewport.scroll.max))return e;var
|
|
404
|
+
`},Po={dragHandleUsageInstructions:Jg,onDragStart:Zg,onDragUpdate:Xg,onDragEnd:Qg},st={x:0,y:0},ut=function(t,n){return{x:t.x+n.x,y:t.y+n.y}},Dt=function(t,n){return{x:t.x-n.x,y:t.y-n.y}},yn=function(t,n){return t.x===n.x&&t.y===n.y},ur=function(t){return{x:t.x!==0?-t.x:0,y:t.y!==0?-t.y:0}},$n=function(t,n,r){var a;return r===void 0&&(r=0),a={},a[t]=n,a[t==="x"?"y":"x"]=r,a},Kr=function(t,n){return Math.sqrt(Math.pow(n.x-t.x,2)+Math.pow(n.y-t.y,2))},yd=function(t,n){return Math.min.apply(Math,n.map(function(r){return Kr(t,r)}))},Td=function(t){return function(n){return{x:t(n.x),y:t(n.y)}}},eb=function(e,t){var n=Kt({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},Hr=function(t,n){return{top:t.top+n.y,left:t.left+n.x,bottom:t.bottom+n.y,right:t.right+n.x}},Ed=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}]},tb={top:0,right:0,bottom:0,left:0},nb=function(t,n){return n?Hr(t,n.scroll.diff.displacement):t},rb=function(t,n,r){if(r&&r.increasedBy){var a;return be({},t,(a={},a[n.end]=t[n.end]+r.increasedBy[n.line],a))}return t},ob=function(t,n){return n&&n.shouldClipSubject?eb(n.pageMarginBox,t):Kt(t)},mr=function(e){var t=e.page,n=e.withPlaceholder,r=e.axis,a=e.frame,s=nb(t.marginBox,a),l=rb(s,r,n),c=ob(l,a);return{page:t,withPlaceholder:n,active:c}},bs=function(e,t){e.frame||(process.env.NODE_ENV,K());var n=e.frame,r=Dt(t,n.scroll.initial),a=ur(r),s=be({},n,{scroll:{initial:n.scroll.initial,current:t,diff:{value:r,displacement:a},max:n.scroll.max}}),l=mr({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:s}),c=be({},e,{frame:s,subject:l});return c};function ab(e){return Number.isInteger?Number.isInteger(e):typeof e=="number"&&isFinite(e)&&Math.floor(e)===e}function Ao(e){return Object.values?Object.values(e):Object.keys(e).map(function(t){return e[t]})}function vs(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 Tn(e,t){if(e.find)return e.find(t);var n=vs(e,t);if(n!==-1)return e[n]}function wd(e){return Array.prototype.slice.call(e)}var Cd=at(function(e){return e.reduce(function(t,n){return t[n.descriptor.id]=n,t},{})}),Dd=at(function(e){return e.reduce(function(t,n){return t[n.descriptor.id]=n,t},{})}),Fo=at(function(e){return Ao(e)}),sb=at(function(e){return Ao(e)}),Kn=at(function(e,t){var n=sb(t).filter(function(r){return e===r.descriptor.droppableId}).sort(function(r,a){return r.descriptor.index-a.descriptor.index});return n});function ys(e){return e.at&&e.at.type==="REORDER"?e.at.destination:null}function Vo(e){return e.at&&e.at.type==="COMBINE"?e.at.combine:null}var $o=at(function(e,t){return t.filter(function(n){return n.descriptor.id!==e.descriptor.id})}),ib=function(e){var t=e.isMovingForward,n=e.draggable,r=e.destination,a=e.insideDestination,s=e.previousImpact;if(!r.isCombineEnabled)return null;var l=ys(s);if(!l)return null;function c(C){var T={type:"COMBINE",combine:{draggableId:C,droppableId:r.descriptor.id}};return be({},s,{at:T})}var p=s.displaced.all,f=p.length?p[0]:null;if(t)return f?c(f):null;var m=$o(n,a);if(!f){if(!m.length)return null;var u=m[m.length-1];return c(u.descriptor.id)}var h=vs(m,function(C){return C.descriptor.id===f});h===-1&&(process.env.NODE_ENV!=="production"?K(!1,"Could not find displaced item in set"):K());var S=h-1;if(S<0)return null;var y=m[S];return c(y.descriptor.id)},fr=function(e,t){return e.descriptor.droppableId===t.descriptor.id},Nd={point:st,value:0},Wr={invisible:{},visible:{},all:[]},lb={displaced:Wr,displacedBy:Nd,at:null},Rt=function(e,t){return function(n){return e<=n&&n<=t}},kd=function(e){var t=Rt(e.top,e.bottom),n=Rt(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 s=t(r.top)||t(r.bottom),l=n(r.left)||n(r.right),c=s&&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&&s;return u}},cb=function(e){var t=Rt(e.top,e.bottom),n=Rt(e.left,e.right);return function(r){var a=t(r.top)&&t(r.bottom)&&n(r.left)&&n(r.right);return a}},Ts={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},xd={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},db=function(e){return function(t){var n=Rt(t.top,t.bottom),r=Rt(t.left,t.right);return function(a){return e===Ts?n(a.top)&&n(a.bottom):r(a.left)&&r(a.right)}}},pb=function(t,n){var r=n.frame?n.frame.scroll.diff.displacement:st;return Hr(t,r)},ub=function(t,n,r){return n.subject.active?r(n.subject.active)(t):!1},mb=function(t,n,r){return r(n)(t)},Es=function(t){var n=t.target,r=t.destination,a=t.viewport,s=t.withDroppableDisplacement,l=t.isVisibleThroughFrameFn,c=s?pb(n,r):n;return ub(c,r,l)&&mb(c,a,l)},fb=function(t){return Es(be({},t,{isVisibleThroughFrameFn:kd}))},Id=function(t){return Es(be({},t,{isVisibleThroughFrameFn:cb}))},hb=function(t){return Es(be({},t,{isVisibleThroughFrameFn:db(t.destination.axis)}))},Sb=function(t,n,r){if(typeof r=="boolean")return r;if(!n)return!0;var a=n.invisible,s=n.visible;if(a[t])return!1;var l=s[t];return l?l.shouldAnimate:!0};function gb(e,t){var n=e.page.marginBox,r={top:t.point.y,right:0,bottom:0,left:t.point.x};return Kt(fs(n,r))}function Gr(e){var t=e.afterDragging,n=e.destination,r=e.displacedBy,a=e.viewport,s=e.forceShouldAnimate,l=e.last;return t.reduce(function(p,f){var m=gb(f,r),u=f.descriptor.id;p.all.push(u);var h=fb({target:m,destination:n,viewport:a,withDroppableDisplacement:!0});if(!h)return p.invisible[f.descriptor.id]=!0,p;var S=Sb(u,l,s),y={draggableId:u,shouldAnimate:S};return p.visible[u]=y,p},{all:[],visible:{},invisible:{}})}function bb(e,t){if(!e.length)return 0;var n=e[e.length-1].descriptor.index;return t.inHomeList?n:n+1}function Md(e){var t=e.insideDestination,n=e.inHomeList,r=e.displacedBy,a=e.destination,s=bb(t,{inHomeList:n});return{displaced:Wr,displacedBy:r,at:{type:"REORDER",destination:{droppableId:a.descriptor.id,index:s}}}}function Ko(e){var t=e.draggable,n=e.insideDestination,r=e.destination,a=e.viewport,s=e.displacedBy,l=e.last,c=e.index,p=e.forceShouldAnimate,f=fr(t,r);if(c==null)return Md({insideDestination:n,inHomeList:f,displacedBy:s,destination:r});var m=Tn(n,function(C){return C.descriptor.index===c});if(!m)return Md({insideDestination:n,inHomeList:f,displacedBy:s,destination:r});var u=$o(t,n),h=n.indexOf(m),S=u.slice(h),y=Gr({afterDragging:S,destination:r,displacedBy:s,last:l,viewport:a.frame,forceShouldAnimate:p});return{displaced:y,displacedBy:s,at:{type:"REORDER",destination:{droppableId:r.descriptor.id,index:c}}}}function En(e,t){return!!t.effected[e]}var vb=function(e){var t=e.isMovingForward,n=e.destination,r=e.draggables,a=e.combine,s=e.afterCritical;if(!n.isCombineEnabled)return null;var l=a.draggableId,c=r[l],p=c.descriptor.index,f=En(l,s);return f?t?p:p-1:t?p+1:p},yb=function(e){var t=e.isMovingForward,n=e.isInHomeList,r=e.insideDestination,a=e.location;if(!r.length)return null;var s=a.index,l=t?s+1:s-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},Tb=function(e){var t=e.isMovingForward,n=e.isInHomeList,r=e.draggable,a=e.draggables,s=e.destination,l=e.insideDestination,c=e.previousImpact,p=e.viewport,f=e.afterCritical,m=c.at;if(m||(process.env.NODE_ENV!=="production"?K(!1,"Cannot move in direction without previous impact location"):K()),m.type==="REORDER"){var u=yb({isMovingForward:t,isInHomeList:n,location:m.destination,insideDestination:l});return u==null?null:Ko({draggable:r,insideDestination:l,destination:s,viewport:p,last:c.displaced,displacedBy:c.displacedBy,index:u})}var h=vb({isMovingForward:t,destination:s,displaced:c.displaced,draggables:a,combine:m.combine,afterCritical:f});return h==null?null:Ko({draggable:r,insideDestination:l,destination:s,viewport:p,last:c.displaced,displacedBy:c.displacedBy,index:h})},Eb=function(e){var t=e.displaced,n=e.afterCritical,r=e.combineWith,a=e.displacedBy,s=!!(t.visible[r]||t.invisible[r]);return En(r,n)?s?st:ur(a.point):s?a.point:st},wb=function(e){var t=e.afterCritical,n=e.impact,r=e.draggables,a=Vo(n);a||(process.env.NODE_ENV,K());var s=a.draggableId,l=r[s].page.borderBox.center,c=Eb({displaced:n.displaced,afterCritical:t,combineWith:s,displacedBy:n.displacedBy});return ut(l,c)},_d=function(t,n){return n.margin[t.start]+n.borderBox[t.size]/2},Cb=function(t,n){return n.margin[t.end]+n.borderBox[t.size]/2},ws=function(t,n,r){return n[t.crossAxisStart]+r.margin[t.crossAxisStart]+r.borderBox[t.crossAxisSize]/2},Ld=function(t){var n=t.axis,r=t.moveRelativeTo,a=t.isMoving;return $n(n.line,r.marginBox[n.end]+_d(n,a),ws(n,r.marginBox,a))},Od=function(t){var n=t.axis,r=t.moveRelativeTo,a=t.isMoving;return $n(n.line,r.marginBox[n.start]-Cb(n,a),ws(n,r.marginBox,a))},Db=function(t){var n=t.axis,r=t.moveInto,a=t.isMoving;return $n(n.line,r.contentBox[n.start]+_d(n,a),ws(n,r.contentBox,a))},Nb=function(e){var t=e.impact,n=e.draggable,r=e.draggables,a=e.droppable,s=e.afterCritical,l=Kn(a.descriptor.id,r),c=n.page,p=a.axis;if(!l.length)return Db({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(En(u,s))return Od({axis:p,moveRelativeTo:h.page,isMoving:c});var S=Oo(h.page,m.point);return Od({axis:p,moveRelativeTo:S,isMoving:c})}var y=l[l.length-1];if(y.descriptor.id===n.descriptor.id)return c.borderBox.center;if(En(y.descriptor.id,s)){var C=Oo(y.page,ur(s.displacedBy.point));return Ld({axis:p,moveRelativeTo:C,isMoving:c})}return Ld({axis:p,moveRelativeTo:y.page,isMoving:c})},Cs=function(e,t){var n=e.frame;return n?ut(t,n.scroll.diff.displacement):t},kb=function(t){var n=t.impact,r=t.draggable,a=t.droppable,s=t.draggables,l=t.afterCritical,c=r.page.borderBox.center,p=n.at;return!a||!p?c:p.type==="REORDER"?Nb({impact:n,draggable:r,draggables:s,droppable:a,afterCritical:l}):wb({impact:n,draggables:s,afterCritical:l})},Ho=function(e){var t=kb(e),n=e.droppable,r=n?Cs(n,t):t;return r},Rd=function(e,t){var n=Dt(t,e.scroll.initial),r=ur(n),a=Kt({top:t.y,bottom:t.y+e.frame.height,left:t.x,right:t.x+e.frame.width}),s={frame:a,scroll:{initial:e.scroll.initial,max:e.scroll.max,current:t,diff:{value:n,displacement:r}}};return s};function Bd(e,t){return e.map(function(n){return t[n]})}function xb(e,t){for(var n=0;n<t.length;n++){var r=t[n].visible[e];if(r)return r}return null}var Ib=function(e){var t=e.impact,n=e.viewport,r=e.destination,a=e.draggables,s=e.maxScrollChange,l=Rd(n,ut(n.scroll.current,s)),c=r.frame?bs(r,ut(r.frame.scroll.current,s)):r,p=t.displaced,f=Gr({afterDragging:Bd(p.all,a),destination:r,displacedBy:t.displacedBy,viewport:l.frame,last:p,forceShouldAnimate:!1}),m=Gr({afterDragging:Bd(p.all,a),destination:c,displacedBy:t.displacedBy,viewport:n.frame,last:p,forceShouldAnimate:!1}),u={},h={},S=[p,f,m];p.all.forEach(function(C){var T=xb(C,S);if(T){h[C]=T;return}u[C]=!0});var y=be({},t,{displaced:{all:p.all,invisible:u,visible:h}});return y},Mb=function(e,t){return ut(e.scroll.diff.displacement,t)},Ds=function(e){var t=e.pageBorderBoxCenter,n=e.draggable,r=e.viewport,a=Mb(r,t),s=Dt(a,n.page.borderBox.center);return ut(n.client.borderBox.center,s)},Pd=function(e){var t=e.draggable,n=e.destination,r=e.newPageBorderBoxCenter,a=e.viewport,s=e.withDroppableDisplacement,l=e.onlyOnMainAxis,c=l===void 0?!1:l,p=Dt(r,t.page.borderBox.center),f=Hr(t.page.borderBox,p),m={target:f,destination:n,withDroppableDisplacement:s,viewport:a};return c?hb(m):Id(m)},_b=function(e){var t=e.isMovingForward,n=e.draggable,r=e.destination,a=e.draggables,s=e.previousImpact,l=e.viewport,c=e.previousPageBorderBoxCenter,p=e.previousClientSelection,f=e.afterCritical;if(!r.isEnabled)return null;var m=Kn(r.descriptor.id,a),u=fr(n,r),h=ib({isMovingForward:t,draggable:n,destination:r,insideDestination:m,previousImpact:s})||Tb({isMovingForward:t,isInHomeList:u,draggable:n,draggables:a,destination:r,insideDestination:m,previousImpact:s,viewport:l,afterCritical:f});if(!h)return null;var S=Ho({impact:h,draggable:n,droppable:r,draggables:a,afterCritical:f}),y=Pd({draggable:n,destination:r,newPageBorderBoxCenter:S,viewport:l.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0});if(y){var C=Ds({pageBorderBoxCenter:S,draggable:n,viewport:l});return{clientSelection:C,impact:h,scrollJumpRequest:null}}var T=Dt(S,c),w=Ib({impact:h,viewport:l,destination:r,draggables:a,maxScrollChange:T});return{clientSelection:p,impact:w,scrollJumpRequest:T}},gt=function(t){var n=t.subject.active;return n||(process.env.NODE_ENV!=="production"?K(!1,"Cannot get clipped area from droppable"):K()),n},Lb=function(e){var t=e.isMovingForward,n=e.pageBorderBoxCenter,r=e.source,a=e.droppables,s=e.viewport,l=r.subject.active;if(!l)return null;var c=r.axis,p=Rt(l[c.start],l[c.end]),f=Fo(a).filter(function(u){return u!==r}).filter(function(u){return u.isEnabled}).filter(function(u){return!!u.subject.active}).filter(function(u){return kd(s.frame)(gt(u))}).filter(function(u){var h=gt(u);return t?l[c.crossAxisEnd]<h[c.crossAxisEnd]:h[c.crossAxisStart]<l[c.crossAxisStart]}).filter(function(u){var h=gt(u),S=Rt(h[c.start],h[c.end]);return p(h[c.start])||p(h[c.end])||S(l[c.start])||S(l[c.end])}).sort(function(u,h){var S=gt(u)[c.crossAxisStart],y=gt(h)[c.crossAxisStart];return t?S-y:y-S}).filter(function(u,h,S){return gt(u)[c.crossAxisStart]===gt(S[0])[c.crossAxisStart]});if(!f.length)return null;if(f.length===1)return f[0];var m=f.filter(function(u){var h=Rt(gt(u)[c.start],gt(u)[c.end]);return h(n[c.line])});return m.length===1?m[0]:m.length>1?m.sort(function(u,h){return gt(u)[c.start]-gt(h)[c.start]})[0]:f.sort(function(u,h){var S=yd(n,Ed(gt(u))),y=yd(n,Ed(gt(h)));return S!==y?S-y:gt(u)[c.start]-gt(h)[c.start]})[0]},Ad=function(t,n){var r=t.page.borderBox.center;return En(t.descriptor.id,n)?Dt(r,n.displacedBy.point):r},Ob=function(t,n){var r=t.page.borderBox;return En(t.descriptor.id,n)?Hr(r,ur(n.displacedBy.point)):r},Rb=function(e){var t=e.pageBorderBoxCenter,n=e.viewport,r=e.destination,a=e.insideDestination,s=e.afterCritical,l=a.filter(function(c){return Id({target:Ob(c,s),destination:r,viewport:n.frame,withDroppableDisplacement:!0})}).sort(function(c,p){var f=Kr(t,Cs(r,Ad(c,s))),m=Kr(t,Cs(r,Ad(p,s)));return f<m?-1:m<f?1:c.descriptor.index-p.descriptor.index});return l[0]||null},Yr=at(function(t,n){var r=n[t.line];return{value:r,point:$n(t.line,r)}}),Bb=function(t,n,r){var a=t.axis;if(t.descriptor.mode==="virtual")return $n(a.line,n[a.line]);var s=t.subject.page.contentBox[a.size],l=Kn(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-s;return f<=0?null:$n(a.line,f)},Fd=function(t,n){return be({},t,{scroll:be({},t.scroll,{max:n})})},Vd=function(t,n,r){var a=t.frame;fr(n,t)&&(process.env.NODE_ENV!=="production"?K(!1,"Should not add placeholder space to home list"):K()),t.subject.withPlaceholder&&(process.env.NODE_ENV!=="production"?K(!1,"Cannot add placeholder size to a subject when it already has one"):K());var s=Yr(t.axis,n.displaceBy).point,l=Bb(t,s,r),c={placeholderSize:s,increasedBy:l,oldFrameMaxScroll:t.frame?t.frame.scroll.max:null};if(!a){var p=mr({page:t.subject.page,withPlaceholder:c,axis:t.axis,frame:t.frame});return be({},t,{subject:p})}var f=l?ut(a.scroll.max,l):a.scroll.max,m=Fd(a,f),u=mr({page:t.subject.page,withPlaceholder:c,axis:t.axis,frame:m});return be({},t,{subject:u,frame:m})},Pb=function(t){var n=t.subject.withPlaceholder;n||(process.env.NODE_ENV!=="production"?K(!1,"Cannot remove placeholder form subject when there was none"):K());var r=t.frame;if(!r){var a=mr({page:t.subject.page,axis:t.axis,frame:null,withPlaceholder:null});return be({},t,{subject:a})}var s=n.oldFrameMaxScroll;s||(process.env.NODE_ENV!=="production"?K(!1,"Expected droppable with frame to have old max frame scroll when removing placeholder"):K());var l=Fd(r,s),c=mr({page:t.subject.page,axis:t.axis,frame:l,withPlaceholder:null});return be({},t,{subject:c,frame:l})},Ab=function(e){var t=e.previousPageBorderBoxCenter,n=e.moveRelativeTo,r=e.insideDestination,a=e.draggable,s=e.draggables,l=e.destination,c=e.viewport,p=e.afterCritical;if(!n){if(r.length)return null;var f={displaced:Wr,displacedBy:Nd,at:{type:"REORDER",destination:{droppableId:l.descriptor.id,index:0}}},m=Ho({impact:f,draggable:a,droppable:l,draggables:s,afterCritical:p}),u=fr(a,l)?l:Vd(l,a,s),h=Pd({draggable:a,destination:u,newPageBorderBoxCenter:m,viewport:c.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0});return h?f:null}var S=t[l.axis.line]<=n.page.borderBox.center[l.axis.line],y=function(){var T=n.descriptor.index;return n.descriptor.id===a.descriptor.id||S?T:T+1}(),C=Yr(l.axis,a.displaceBy);return Ko({draggable:a,insideDestination:r,destination:l,viewport:c,displacedBy:C,last:Wr,index:y})},Fb=function(e){var t=e.isMovingForward,n=e.previousPageBorderBoxCenter,r=e.draggable,a=e.isOver,s=e.draggables,l=e.droppables,c=e.viewport,p=e.afterCritical,f=Lb({isMovingForward:t,pageBorderBoxCenter:n,source:a,droppables:l,viewport:c});if(!f)return null;var m=Kn(f.descriptor.id,s),u=Rb({pageBorderBoxCenter:n,viewport:c,destination:f,insideDestination:m,afterCritical:p}),h=Ab({previousPageBorderBoxCenter:n,destination:f,draggable:r,draggables:s,moveRelativeTo:u,insideDestination:m,viewport:c,afterCritical:p});if(!h)return null;var S=Ho({impact:h,draggable:r,droppable:f,draggables:s,afterCritical:p}),y=Ds({pageBorderBoxCenter:S,draggable:r,viewport:c});return{clientSelection:y,impact:h,scrollJumpRequest:null}},Nt=function(e){var t=e.at;return t?t.type==="REORDER"?t.destination.droppableId:t.combine.droppableId:null},Vb=function(t,n){var r=Nt(t);return r?n[r]:null},$b=function(e){var t=e.state,n=e.type,r=Vb(t.impact,t.dimensions.droppables),a=!!r,s=t.dimensions.droppables[t.critical.droppable.id],l=r||s,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,S=h.draggables,y=h.droppables;return p?_b({isMovingForward:f,previousPageBorderBoxCenter:u,draggable:m,destination:l,draggables:S,viewport:t.viewport,previousClientSelection:t.current.client.selection,previousImpact:t.impact,afterCritical:t.afterCritical}):Fb({isMovingForward:f,previousPageBorderBoxCenter:u,draggable:m,isOver:l,draggables:S,droppables:y,viewport:t.viewport,afterCritical:t.afterCritical})};function Hn(e){return e.phase==="DRAGGING"||e.phase==="COLLECTING"}function $d(e){var t=Rt(e.top,e.bottom),n=Rt(e.left,e.right);return function(a){return t(a.y)&&n(a.x)}}function Kb(e,t){return e.left<t.right&&e.right>t.left&&e.top<t.bottom&&e.bottom>t.top}function Hb(e){var t=e.pageBorderBox,n=e.draggable,r=e.candidates,a=n.page.borderBox.center,s=r.map(function(l){var c=l.axis,p=$n(l.axis.line,t.center[c.line],l.page.borderBox.center[c.crossAxisLine]);return{id:l.descriptor.id,distance:Kr(a,p)}}).sort(function(l,c){return c.distance-l.distance});return s[0]?s[0].id:null}function Wb(e){var t=e.pageBorderBox,n=e.draggable,r=e.droppables,a=Fo(r).filter(function(s){if(!s.isEnabled)return!1;var l=s.subject.active;if(!l||!Kb(t,l))return!1;if($d(l)(t.center))return!0;var c=s.axis,p=l.center[c.crossAxisLine],f=t[c.crossAxisStart],m=t[c.crossAxisEnd],u=Rt(l[c.crossAxisStart],l[c.crossAxisEnd]),h=u(f),S=u(m);return!h&&!S?!0:h?f<p:m>p});return a.length?a.length===1?a[0].descriptor.id:Hb({pageBorderBox:t,draggable:n,candidates:a}):null}var Kd=function(t,n){return Kt(Hr(t,n))},Gb=function(e,t){var n=e.frame;return n?Kd(t,n.scroll.diff.value):t};function Hd(e){var t=e.displaced,n=e.id;return!!(t.visible[n]||t.invisible[n])}function Yb(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 Ub=function(e){var t=e.pageBorderBoxWithDroppableScroll,n=e.draggable,r=e.destination,a=e.insideDestination,s=e.last,l=e.viewport,c=e.afterCritical,p=r.axis,f=Yr(r.axis,n.displaceBy),m=f.value,u=t[p.start],h=t[p.end],S=$o(n,a),y=Tn(S,function(T){var w=T.descriptor.id,D=T.page.borderBox.center[p.line],M=En(w,c),I=Hd({displaced:s,id:w});return M?I?h<=D:u<D-m:I?h<=D+m:u<D}),C=Yb({draggable:n,closest:y,inHomeList:fr(n,r)});return Ko({draggable:n,insideDestination:a,destination:r,viewport:l,last:s,displacedBy:f,index:C})},zb=4,jb=function(e){var t=e.draggable,n=e.pageBorderBoxWithDroppableScroll,r=e.previousImpact,a=e.destination,s=e.insideDestination,l=e.afterCritical;if(!a.isCombineEnabled)return null;var c=a.axis,p=Yr(a.axis,t.displaceBy),f=p.value,m=n[c.start],u=n[c.end],h=$o(t,s),S=Tn(h,function(C){var T=C.descriptor.id,w=C.page.borderBox,D=w[c.size],M=D/zb,I=En(T,l),k=Hd({displaced:r.displaced,id:T});return I?k?u>w[c.start]+M&&u<w[c.end]-M:m>w[c.start]-f+M&&m<w[c.end]-f-M:k?u>w[c.start]+f+M&&u<w[c.end]+f-M:m>w[c.start]+M&&m<w[c.end]-M});if(!S)return null;var y={displacedBy:p,displaced:r.displaced,at:{type:"COMBINE",combine:{draggableId:S.descriptor.id,droppableId:a.descriptor.id}}};return y},Wd=function(e){var t=e.pageOffset,n=e.draggable,r=e.draggables,a=e.droppables,s=e.previousImpact,l=e.viewport,c=e.afterCritical,p=Kd(n.page.borderBox,t),f=Wb({pageBorderBox:p,draggable:n,droppables:a});if(!f)return lb;var m=a[f],u=Kn(m.descriptor.id,r),h=Gb(m,p);return jb({pageBorderBoxWithDroppableScroll:h,draggable:n,previousImpact:s,destination:m,insideDestination:u,afterCritical:c})||Ub({pageBorderBoxWithDroppableScroll:h,draggable:n,destination:m,insideDestination:u,last:s.displaced,viewport:l,afterCritical:c})},Ns=function(e,t){var n;return be({},e,(n={},n[t.descriptor.id]=t,n))},qb=function(t){var n=t.previousImpact,r=t.impact,a=t.droppables,s=Nt(n),l=Nt(r);if(!s||s===l)return a;var c=a[s];if(!c.subject.withPlaceholder)return a;var p=Pb(c);return Ns(a,p)},Jb=function(e){var t=e.draggable,n=e.draggables,r=e.droppables,a=e.previousImpact,s=e.impact,l=qb({previousImpact:a,impact:s,droppables:r}),c=Nt(s);if(!c)return l;var p=r[c];if(fr(t,p)||p.subject.withPlaceholder)return l;var f=Vd(p,t,n);return Ns(l,f)},Ur=function(e){var t=e.state,n=e.clientSelection,r=e.dimensions,a=e.viewport,s=e.impact,l=e.scrollJumpRequest,c=a||t.viewport,p=r||t.dimensions,f=n||t.current.client.selection,m=Dt(f,t.initial.client.selection),u={offset:m,selection:f,borderBoxCenter:ut(t.initial.client.borderBoxCenter,m)},h={selection:ut(u.selection,c.scroll.current),borderBoxCenter:ut(u.borderBoxCenter,c.scroll.current),offset:ut(u.offset,c.scroll.diff.value)},S={client:u,page:h};if(t.phase==="COLLECTING")return be({phase:"COLLECTING"},t,{dimensions:p,viewport:c,current:S});var y=p.draggables[t.critical.draggable.id],C=s||Wd({pageOffset:h.offset,draggable:y,draggables:p.draggables,droppables:p.droppables,previousImpact:t.impact,viewport:c,afterCritical:t.afterCritical}),T=Jb({draggable:y,impact:C,previousImpact:t.impact,draggables:p.draggables,droppables:p.droppables}),w=be({},t,{current:S,dimensions:{draggables:p.draggables,droppables:T},impact:C,viewport:c,scrollJumpRequest:l||null,forceShouldAnimate:l?!1:null});return w};function Zb(e,t){return e.map(function(n){return t[n]})}var Gd=function(e){var t=e.impact,n=e.viewport,r=e.draggables,a=e.destination,s=e.forceShouldAnimate,l=t.displaced,c=Zb(l.all,r),p=Gr({afterDragging:c,destination:a,displacedBy:t.displacedBy,viewport:n.frame,forceShouldAnimate:s,last:l});return be({},t,{displaced:p})},Yd=function(e){var t=e.impact,n=e.draggable,r=e.droppable,a=e.draggables,s=e.viewport,l=e.afterCritical,c=Ho({impact:t,draggable:n,draggables:a,droppable:r,afterCritical:l});return Ds({pageBorderBoxCenter:c,draggable:n,viewport:s})},Ud=function(e){var t=e.state,n=e.dimensions,r=e.viewport;t.movementMode!=="SNAP"&&(process.env.NODE_ENV,K());var a=t.impact,s=r||t.viewport,l=n||t.dimensions,c=l.draggables,p=l.droppables,f=c[t.critical.draggable.id],m=Nt(a);m||(process.env.NODE_ENV!=="production"?K(!1,"Must be over a destination in SNAP movement mode"):K());var u=p[m],h=Gd({impact:a,viewport:s,destination:u,draggables:c}),S=Yd({impact:h,draggable:f,droppable:u,draggables:c,viewport:s,afterCritical:t.afterCritical});return Ur({impact:h,clientSelection:S,state:t,dimensions:l,viewport:s})},Xb=function(e){return{index:e.index,droppableId:e.droppableId}},zd=function(e){var t=e.draggable,n=e.home,r=e.draggables,a=e.viewport,s=Yr(n.axis,t.displaceBy),l=Kn(n.descriptor.id,r),c=l.indexOf(t);c===-1&&(process.env.NODE_ENV!=="production"?K(!1,"Expected draggable to be inside home list"):K());var p=l.slice(c+1),f=p.reduce(function(S,y){return S[y.descriptor.id]=!0,S},{}),m={inVirtualList:n.descriptor.mode==="virtual",displacedBy:s,effected:f},u=Gr({afterDragging:p,destination:n,displacedBy:s,last:null,viewport:a.frame,forceShouldAnimate:!1}),h={displaced:u,displacedBy:s,at:{type:"REORDER",destination:Xb(t.descriptor)}};return{impact:h,afterCritical:m}},Qb=function(e,t){return{draggables:e.draggables,droppables:Ns(e.droppables,t)}},zr=function(t){process.env.NODE_ENV},jr=function(t){process.env.NODE_ENV},ev=function(e){var t=e.draggable,n=e.offset,r=e.initialWindowScroll,a=Oo(t.client,n),s=Ro(a,r),l=be({},t,{placeholder:be({},t.placeholder,{client:a}),client:a,page:s});return l},tv=function(e){var t=e.frame;return t||(process.env.NODE_ENV!=="production"?K(!1,"Expected Droppable to have a frame"):K()),t},nv=function(e){var t=e.additions,n=e.updatedDroppables,r=e.viewport,a=r.scroll.diff.value;return t.map(function(s){var l=s.descriptor.droppableId,c=n[l],p=tv(c),f=p.scroll.diff.value,m=ut(a,f),u=ev({draggable:s,offset:m,initialWindowScroll:r.scroll.initial});return u})},rv=function(e){var t=e.state,n=e.published;zr();var r=n.modified.map(function(M){var I=t.dimensions.droppables[M.droppableId],k=bs(I,M.scroll);return k}),a=be({},t.dimensions.droppables,{},Cd(r)),s=Dd(nv({additions:n.additions,updatedDroppables:a,viewport:t.viewport})),l=be({},t.dimensions.draggables,{},s);n.removals.forEach(function(M){delete l[M]});var c={droppables:a,draggables:l},p=Nt(t.impact),f=p?c.droppables[p]:null,m=c.draggables[t.critical.draggable.id],u=c.droppables[t.critical.droppable.id],h=zd({draggable:m,home:u,draggables:l,viewport:t.viewport}),S=h.impact,y=h.afterCritical,C=f&&f.isCombineEnabled?t.impact:S,T=Wd({pageOffset:t.current.page.offset,draggable:c.draggables[t.critical.draggable.id],draggables:c.draggables,droppables:c.droppables,previousImpact:C,viewport:t.viewport,afterCritical:y});jr();var w=be({phase:"DRAGGING"},t,{phase:"DRAGGING",impact:T,onLiftImpact:S,dimensions:c,afterCritical:y,forceShouldAnimate:!1});if(t.phase==="COLLECTING")return w;var D=be({phase:"DROP_PENDING"},w,{phase:"DROP_PENDING",reason:t.reason,isWaiting:!1});return D},ks=function(t){return t.movementMode==="SNAP"},xs=function(t,n,r){var a=Qb(t.dimensions,n);return!ks(t)||r?Ur({state:t,dimensions:a}):Ud({state:t,dimensions:a})};function Is(e){return e.isDragging&&e.movementMode==="SNAP"?be({phase:"DRAGGING"},e,{scrollJumpRequest:null}):e}var jd={phase:"IDLE",completed:null,shouldFlush:!1},ov=function(e,t){if(e===void 0&&(e=jd),t.type==="FLUSH")return be({},jd,{shouldFlush:!0});if(t.type==="INITIAL_PUBLISH"){e.phase!=="IDLE"&&(process.env.NODE_ENV!=="production"?K(!1,"INITIAL_PUBLISH must come after a IDLE phase"):K());var n=t.payload,r=n.critical,a=n.clientSelection,s=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:ut(m.selection,s.scroll.initial),borderBoxCenter:ut(m.selection,s.scroll.initial),offset:ut(m.selection,s.scroll.diff.value)}},h=Fo(l.droppables).every(function(Q){return!Q.isFixedOnPage}),S=zd({draggable:p,home:f,draggables:l.draggables,viewport:s}),y=S.impact,C=S.afterCritical,T={phase:"DRAGGING",isDragging:!0,critical:r,movementMode:c,dimensions:l,initial:u,current:u,isWindowScrollAllowed:h,impact:y,afterCritical:C,onLiftImpact:y,viewport:s,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"?K(!1,"Collection cannot start from phase "+e.phase):K());var w=be({phase:"COLLECTING"},e,{phase:"COLLECTING"});return w}if(t.type==="PUBLISH_WHILE_DRAGGING")return e.phase==="COLLECTING"||e.phase==="DROP_PENDING"||(process.env.NODE_ENV!=="production"?K(!1,"Unexpected "+t.type+" received in phase "+e.phase):K()),rv({state:e,published:t.payload});if(t.type==="MOVE"){if(e.phase==="DROP_PENDING")return e;Hn(e)||(process.env.NODE_ENV!=="production"?K(!1,t.type+" not permitted in phase "+e.phase):K());var D=t.payload.client;return yn(D,e.current.client.selection)?e:Ur({state:e,clientSelection:D,impact:ks(e)?e.impact:null})}if(t.type==="UPDATE_DROPPABLE_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="COLLECTING")return Is(e);Hn(e)||(process.env.NODE_ENV!=="production"?K(!1,t.type+" not permitted in phase "+e.phase):K());var M=t.payload,I=M.id,k=M.newScroll,A=e.dimensions.droppables[I];if(!A)return e;var G=bs(A,k);return xs(e,G,!1)}if(t.type==="UPDATE_DROPPABLE_IS_ENABLED"){if(e.phase==="DROP_PENDING")return e;Hn(e)||(process.env.NODE_ENV!=="production"?K(!1,"Attempting to move in an unsupported phase "+e.phase):K());var E=t.payload,R=E.id,O=E.isEnabled,P=e.dimensions.droppables[R];P||(process.env.NODE_ENV!=="production"?K(!1,"Cannot find Droppable[id: "+R+"] to toggle its enabled state"):K()),P.isEnabled===O&&(process.env.NODE_ENV!=="production"?K(!1,"Trying to set droppable isEnabled to "+String(O)+`
|
|
405
|
+
but it is already `+String(P.isEnabled)):K());var z=be({},P,{isEnabled:O});return xs(e,z,!0)}if(t.type==="UPDATE_DROPPABLE_IS_COMBINE_ENABLED"){if(e.phase==="DROP_PENDING")return e;Hn(e)||(process.env.NODE_ENV!=="production"?K(!1,"Attempting to move in an unsupported phase "+e.phase):K());var L=t.payload,re=L.id,B=L.isCombineEnabled,Z=e.dimensions.droppables[re];Z||(process.env.NODE_ENV!=="production"?K(!1,"Cannot find Droppable[id: "+re+"] to toggle its isCombineEnabled state"):K()),Z.isCombineEnabled===B&&(process.env.NODE_ENV!=="production"?K(!1,"Trying to set droppable isCombineEnabled to "+String(B)+`
|
|
406
|
+
but it is already `+String(Z.isCombineEnabled)):K());var H=be({},Z,{isCombineEnabled:B});return xs(e,H,!0)}if(t.type==="MOVE_BY_WINDOW_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="DROP_ANIMATING")return e;Hn(e)||(process.env.NODE_ENV!=="production"?K(!1,"Cannot move by window in phase "+e.phase):K()),e.isWindowScrollAllowed||(process.env.NODE_ENV!=="production"?K(!1,"Window scrolling is currently not supported for fixed lists"):K());var q=t.payload.newScroll;if(yn(e.viewport.scroll.current,q))return Is(e);var ae=Rd(e.viewport,q);return ks(e)?Ud({state:e,viewport:ae}):Ur({state:e,viewport:ae})}if(t.type==="UPDATE_VIEWPORT_MAX_SCROLL"){if(!Hn(e))return e;var $=t.payload.maxScroll;if(yn($,e.viewport.scroll.max))return e;var j=be({},e.viewport,{scroll:be({},e.viewport.scroll,{max:$})});return be({phase:"DRAGGING"},e,{viewport:j})}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"?K(!1,t.type+" received while not in DRAGGING phase"):K());var oe=$b({state:e,type:t.type});return oe?Ur({state:e,impact:oe.impact,clientSelection:oe.clientSelection,scrollJumpRequest:oe.scrollJumpRequest}):e}if(t.type==="DROP_PENDING"){var ie=t.payload.reason;e.phase!=="COLLECTING"&&(process.env.NODE_ENV!=="production"?K(!1,"Can only move into the DROP_PENDING phase from the COLLECTING phase"):K());var J=be({phase:"DROP_PENDING"},e,{phase:"DROP_PENDING",isWaiting:!0,reason:ie});return J}if(t.type==="DROP_ANIMATE"){var V=t.payload,W=V.completed,X=V.dropDuration,te=V.newHomeClientOffset;e.phase==="DRAGGING"||e.phase==="DROP_PENDING"||(process.env.NODE_ENV!=="production"?K(!1,"Cannot animate drop from phase "+e.phase):K());var pe={phase:"DROP_ANIMATING",completed:W,dropDuration:X,newHomeClientOffset:te,dimensions:e.dimensions};return pe}if(t.type==="DROP_COMPLETE"){var ce=t.payload.completed;return{phase:"IDLE",completed:ce,shouldFlush:!1}}return e},av=function(t){return{type:"BEFORE_INITIAL_CAPTURE",payload:t}},sv=function(t){return{type:"LIFT",payload:t}},iv=function(t){return{type:"INITIAL_PUBLISH",payload:t}},lv=function(t){return{type:"PUBLISH_WHILE_DRAGGING",payload:t}},cv=function(){return{type:"COLLECTION_STARTING",payload:null}},dv=function(t){return{type:"UPDATE_DROPPABLE_SCROLL",payload:t}},pv=function(t){return{type:"UPDATE_DROPPABLE_IS_ENABLED",payload:t}},uv=function(t){return{type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:t}},qd=function(t){return{type:"MOVE",payload:t}},mv=function(t){return{type:"MOVE_BY_WINDOW_SCROLL",payload:t}},fv=function(t){return{type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:t}},hv=function(){return{type:"MOVE_UP",payload:null}},Sv=function(){return{type:"MOVE_DOWN",payload:null}},gv=function(){return{type:"MOVE_RIGHT",payload:null}},bv=function(){return{type:"MOVE_LEFT",payload:null}},Ms=function(){return{type:"FLUSH",payload:null}},vv=function(t){return{type:"DROP_ANIMATE",payload:t}},_s=function(t){return{type:"DROP_COMPLETE",payload:t}},Jd=function(t){return{type:"DROP",payload:t}},yv=function(t){return{type:"DROP_PENDING",payload:t}},Zd=function(){return{type:"DROP_ANIMATION_FINISHED",payload:null}};function Tv(e){if(!(e.length<=1)){for(var t=e.map(function(c){return c.descriptor.index}),n={},r=1;r<t.length;r++){var a=t[r],s=t[r-1];a!==s+1&&(n[a]=!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"&&He(`
|
|
407
407
|
Detected non-consecutive <Draggable /> indexes.
|
|
408
408
|
|
|
409
409
|
(This can cause unexpected bugs)
|
|
410
410
|
|
|
411
411
|
`+l+`
|
|
412
|
-
`)}}}function Ev(e,t){if(process.env.NODE_ENV!=="production"){var n=Kn(e.droppable.id,t.draggables);Tv(n)}}var wv=function(e){return function(t){var n=t.getState,r=t.dispatch;return function(a){return function(s){if(s.type!=="LIFT"){a(s);return}var l=s.payload,c=l.id,p=l.clientSelection,f=l.movementMode,m=n();m.phase==="DROP_ANIMATING"&&r(_s({completed:m.completed})),n().phase!=="IDLE"&&(process.env.NODE_ENV!=="production"?K(!1,"Unexpected phase to start a drag"):K()),r(Ms()),r(av({draggableId:c,movementMode:f}));var u={shouldPublishImmediately:f==="SNAP"},h={draggableId:c,scrollOptions:u},S=e.startPublishing(h),y=S.critical,
|
|
412
|
+
`)}}}function Ev(e,t){if(process.env.NODE_ENV!=="production"){var n=Kn(e.droppable.id,t.draggables);Tv(n)}}var wv=function(e){return function(t){var n=t.getState,r=t.dispatch;return function(a){return function(s){if(s.type!=="LIFT"){a(s);return}var l=s.payload,c=l.id,p=l.clientSelection,f=l.movementMode,m=n();m.phase==="DROP_ANIMATING"&&r(_s({completed:m.completed})),n().phase!=="IDLE"&&(process.env.NODE_ENV!=="production"?K(!1,"Unexpected phase to start a drag"):K()),r(Ms()),r(av({draggableId:c,movementMode:f}));var u={shouldPublishImmediately:f==="SNAP"},h={draggableId:c,scrollOptions:u},S=e.startPublishing(h),y=S.critical,C=S.dimensions,T=S.viewport;Ev(y,C),r(iv({critical:y,dimensions:C,clientSelection:p,movementMode:f,viewport:T}))}}}},Cv=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)}}}},Ls={outOfTheWay:"cubic-bezier(0.2, 0, 0, 1)",drop:"cubic-bezier(.2,1,.1,1)"},qr={opacity:{drop:0,combining:.7},scale:{drop:.75}},Os={outOfTheWay:.2,minDropTime:.33,maxDropTime:.55},Wn=Os.outOfTheWay+"s "+Ls.outOfTheWay,Jr={fluid:"opacity "+Wn,snap:"transform "+Wn+", opacity "+Wn,drop:function(t){var n=t+"s "+Ls.drop;return"transform "+n+", opacity "+n},outOfTheWay:"transform "+Wn,placeholder:"height "+Wn+", width "+Wn+", margin "+Wn},Xd=function(t){return yn(t,st)?null:"translate("+t.x+"px, "+t.y+"px)"},Rs={moveTo:Xd,drop:function(t,n){var r=Xd(t);return r?n?r+" scale("+qr.scale.drop+")":r:null}},Bs=Os.minDropTime,Qd=Os.maxDropTime,Dv=Qd-Bs,ep=1500,Nv=.6,kv=function(e){var t=e.current,n=e.destination,r=e.reason,a=Kr(t,n);if(a<=0)return Bs;if(a>=ep)return Qd;var s=a/ep,l=Bs+Dv*s,c=r==="CANCEL"?l*Nv:l;return Number(c.toFixed(2))},xv=function(e){var t=e.impact,n=e.draggable,r=e.dimensions,a=e.viewport,s=e.afterCritical,l=r.draggables,c=r.droppables,p=Nt(t),f=p?c[p]:null,m=c[n.descriptor.droppableId],u=Yd({impact:t,draggable:n,draggables:l,afterCritical:s,droppable:f||m,viewport:a}),h=Dt(u,n.client.borderBox.center);return h},Iv=function(e){var t=e.draggables,n=e.reason,r=e.lastImpact,a=e.home,s=e.viewport,l=e.onLiftImpact;if(!r.at||n!=="DROP"){var c=Gd({draggables:t,impact:l,destination:a,viewport:s,forceShouldAnimate:!0});return{impact:c,didDropInsideDroppable:!1}}if(r.at.type==="REORDER")return{impact:r,didDropInsideDroppable:!0};var p=be({},r,{displaced:Wr});return{impact:p,didDropInsideDroppable:!0}},Mv=function(e){var t=e.getState,n=e.dispatch;return function(r){return function(a){if(a.type!=="DROP"){r(a);return}var s=t(),l=a.payload.reason;if(s.phase==="COLLECTING"){n(yv({reason:l}));return}if(s.phase!=="IDLE"){var c=s.phase==="DROP_PENDING"&&s.isWaiting;c&&(process.env.NODE_ENV!=="production"?K(!1,"A DROP action occurred while DROP_PENDING and still waiting"):K()),s.phase==="DRAGGING"||s.phase==="DROP_PENDING"||(process.env.NODE_ENV!=="production"?K(!1,"Cannot drop in phase: "+s.phase):K());var p=s.critical,f=s.dimensions,m=f.draggables[s.critical.draggable.id],u=Iv({reason:l,lastImpact:s.impact,afterCritical:s.afterCritical,onLiftImpact:s.onLiftImpact,home:s.dimensions.droppables[s.critical.droppable.id],viewport:s.viewport,draggables:s.dimensions.draggables}),h=u.impact,S=u.didDropInsideDroppable,y=S?ys(h):null,C=S?Vo(h):null,T={index:p.draggable.index,droppableId:p.droppable.id},w={draggableId:m.descriptor.id,type:m.descriptor.type,source:T,reason:l,mode:s.movementMode,destination:y,combine:C},D=xv({impact:h,draggable:m,dimensions:f,viewport:s.viewport,afterCritical:s.afterCritical}),M={critical:s.critical,afterCritical:s.afterCritical,result:w,impact:h},I=!yn(s.current.client.offset,D)||!!w.combine;if(!I){n(_s({completed:M}));return}var k=kv({current:s.current.client.offset,destination:D,reason:l}),A={newHomeClientOffset:D,dropDuration:k,completed:M};n(vv(A))}}}},tp=function(){return{x:window.pageXOffset,y:window.pageYOffset}};function _v(e){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(n){n.target!==window&&n.target!==window.document||e()}}}function Lv(e){var t=e.onWindowScroll;function n(){t(tp())}var r=Vr(n),a=_v(r),s=vn;function l(){return s!==vn}function c(){l()&&(process.env.NODE_ENV!=="production"?K(!1,"Cannot start scroll listener when already active"):K()),s=Ot(window,[a])}function p(){l()||(process.env.NODE_ENV!=="production"?K(!1,"Cannot stop scroll listener when not active"):K()),r.cancel(),s(),s=vn}return{start:c,stop:p,isActive:l}}var Ov=function(t){return t.type==="DROP_COMPLETE"||t.type==="DROP_ANIMATE"||t.type==="FLUSH"},Rv=function(e){var t=Lv({onWindowScroll:function(r){e.dispatch(mv({newScroll:r}))}});return function(n){return function(r){!t.isActive()&&r.type==="INITIAL_PUBLISH"&&t.start(),t.isActive()&&Ov(r)&&t.stop(),n(r)}}},Bv=function(e){var t=!1,n=!1,r=setTimeout(function(){n=!0}),a=function(l){if(t){process.env.NODE_ENV!=="production"&&He("Announcement already made. Not making a second announcement");return}if(n){process.env.NODE_ENV!=="production"&&He(`
|
|
413
413
|
Announcements cannot be made asynchronously.
|
|
414
414
|
Default message has already been announced.
|
|
415
|
-
`);return}t=!0,e(l),clearTimeout(r)};return a.wasCalled=function(){return t},a},Pv=function(){var e=[],t=function(s){var l=vs(e,function(f){return f.timerId===s});l===-1&&(process.env.NODE_ENV!=="production"?K(!1,"Could not find timer"):K());var c=e.splice(l,1),p=c[0];p.callback()},n=function(s){var l=setTimeout(function(){return t(l)}),c={timerId:l,callback:s};e.push(c)},r=function(){if(e.length){var s=[].concat(e);e.length=0,s.forEach(function(l){clearTimeout(l.timerId),l.callback()})}};return{add:n,flush:r}},Av=function(t,n){return t==null&&n==null?!0:t==null||n==null?!1:t.droppableId===n.droppableId&&t.index===n.index},Fv=function(t,n){return t==null&&n==null?!0:t==null||n==null?!1:t.draggableId===n.draggableId&&t.droppableId===n.droppableId},Vv=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,a=t.droppable.id===n.droppable.id&&t.droppable.type===n.droppable.type;return r&&a},Zr=function(t,n){zr(),n(),jr()},Wo=function(t,n){return{draggableId:t.draggable.id,type:t.droppable.type,source:{droppableId:t.droppable.id,index:t.draggable.index},mode:n}},Ps=function(t,n,r,a){if(!t){r(a(n));return}var s=Bv(r),l={announce:s};t(n,l),s.wasCalled()||r(a(n))},$v=function(e,t){var n=Pv(),r=null,a=function(h,S){r&&(process.env.NODE_ENV!=="production"?K(!1,"Cannot fire onBeforeCapture as a drag start has already been published"):K()),Zr("onBeforeCapture",function(){var y=e().onBeforeCapture;if(y){var
|
|
415
|
+
`);return}t=!0,e(l),clearTimeout(r)};return a.wasCalled=function(){return t},a},Pv=function(){var e=[],t=function(s){var l=vs(e,function(f){return f.timerId===s});l===-1&&(process.env.NODE_ENV!=="production"?K(!1,"Could not find timer"):K());var c=e.splice(l,1),p=c[0];p.callback()},n=function(s){var l=setTimeout(function(){return t(l)}),c={timerId:l,callback:s};e.push(c)},r=function(){if(e.length){var s=[].concat(e);e.length=0,s.forEach(function(l){clearTimeout(l.timerId),l.callback()})}};return{add:n,flush:r}},Av=function(t,n){return t==null&&n==null?!0:t==null||n==null?!1:t.droppableId===n.droppableId&&t.index===n.index},Fv=function(t,n){return t==null&&n==null?!0:t==null||n==null?!1:t.draggableId===n.draggableId&&t.droppableId===n.droppableId},Vv=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,a=t.droppable.id===n.droppable.id&&t.droppable.type===n.droppable.type;return r&&a},Zr=function(t,n){zr(),n(),jr()},Wo=function(t,n){return{draggableId:t.draggable.id,type:t.droppable.type,source:{droppableId:t.droppable.id,index:t.draggable.index},mode:n}},Ps=function(t,n,r,a){if(!t){r(a(n));return}var s=Bv(r),l={announce:s};t(n,l),s.wasCalled()||r(a(n))},$v=function(e,t){var n=Pv(),r=null,a=function(h,S){r&&(process.env.NODE_ENV!=="production"?K(!1,"Cannot fire onBeforeCapture as a drag start has already been published"):K()),Zr("onBeforeCapture",function(){var y=e().onBeforeCapture;if(y){var C={draggableId:h,mode:S};y(C)}})},s=function(h,S){r&&(process.env.NODE_ENV!=="production"?K(!1,"Cannot fire onBeforeDragStart as a drag start has already been published"):K()),Zr("onBeforeDragStart",function(){var y=e().onBeforeDragStart;y&&y(Wo(h,S))})},l=function(h,S){r&&(process.env.NODE_ENV!=="production"?K(!1,"Cannot fire onBeforeDragStart as a drag start has already been published"):K());var y=Wo(h,S);r={mode:S,lastCritical:h,lastLocation:y.source,lastCombine:null},n.add(function(){Zr("onDragStart",function(){return Ps(e().onDragStart,y,t,Po.onDragStart)})})},c=function(h,S){var y=ys(S),C=Vo(S);r||(process.env.NODE_ENV!=="production"?K(!1,"Cannot fire onDragMove when onDragStart has not been called"):K());var T=!Vv(h,r.lastCritical);T&&(r.lastCritical=h);var w=!Av(r.lastLocation,y);w&&(r.lastLocation=y);var D=!Fv(r.lastCombine,C);if(D&&(r.lastCombine=C),!(!T&&!w&&!D)){var M=be({},Wo(h,r.mode),{combine:C,destination:y});n.add(function(){Zr("onDragUpdate",function(){return Ps(e().onDragUpdate,M,t,Po.onDragUpdate)})})}},p=function(){r||(process.env.NODE_ENV!=="production"?K(!1,"Can only flush responders while dragging"):K()),n.flush()},f=function(h){r||(process.env.NODE_ENV!=="production"?K(!1,"Cannot fire onDragEnd when there is no matching onDragStart"):K()),r=null,Zr("onDragEnd",function(){return Ps(e().onDragEnd,h,t,Po.onDragEnd)})},m=function(){if(r){var h=be({},Wo(r.lastCritical,r.mode),{combine:null,destination:null,reason:"CANCEL"});f(h)}};return{beforeCapture:a,beforeStart:s,start:l,update:c,flush:p,drop:f,abort:m}},Kv=function(e,t){var n=$v(e,t);return function(r){return function(a){return function(s){if(s.type==="BEFORE_INITIAL_CAPTURE"){n.beforeCapture(s.payload.draggableId,s.payload.movementMode);return}if(s.type==="INITIAL_PUBLISH"){var l=s.payload.critical;n.beforeStart(l,s.payload.movementMode),a(s),n.start(l,s.payload.movementMode);return}if(s.type==="DROP_COMPLETE"){var c=s.payload.completed.result;n.flush(),a(s),n.drop(c);return}if(a(s),s.type==="FLUSH"){n.abort();return}var p=r.getState();p.phase==="DRAGGING"&&n.update(p.critical,p.impact)}}}},Hv=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"?K(!1,"Cannot finish a drop animating when no drop is occurring"):K()),e.dispatch(_s({completed:r.completed}))}}},Wv=function(e){var t=null,n=null;function r(){n&&(cancelAnimationFrame(n),n=null),t&&(t(),t=null)}return function(a){return function(s){if((s.type==="FLUSH"||s.type==="DROP_COMPLETE"||s.type==="DROP_ANIMATION_FINISHED")&&r(),a(s),s.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(Zd())}};n=requestAnimationFrame(function(){n=null,t=Ot(window,[l])})}}}},Gv=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)}}}},Yv=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 a=r.payload.completed.result;a.combine&&e.tryShiftRecord(a.draggableId,a.combine.draggableId),e.tryRestoreFocusRecorded()}}}}}},Uv=function(t){return t.type==="DROP_COMPLETE"||t.type==="DROP_ANIMATE"||t.type==="FLUSH"},zv=function(e){return function(t){return function(n){return function(r){if(Uv(r)){e.stop(),n(r);return}if(r.type==="INITIAL_PUBLISH"){n(r);var a=t.getState();a.phase!=="DRAGGING"&&(process.env.NODE_ENV!=="production"?K(!1,"Expected phase to be DRAGGING after INITIAL_PUBLISH"):K()),e.start(a);return}n(r),e.scroll(t.getState())}}}},jv=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(Jd({reason:r.reason})))}}}},qv=process.env.NODE_ENV!=="production"&&typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({name:"react-beautiful-dnd"}):Lc,Jv=function(e){var t=e.dimensionMarshal,n=e.focusMarshal,r=e.styleMarshal,a=e.getResponders,s=e.announce,l=e.autoScroller;return Ic(ov,qv(FS(Cv(r),Gv(t),wv(t),Mv,Hv,Wv,jv,zv(l),Rv,Yv(n),Kv(a,s))))},As=function(){return{additions:{},removals:{},modified:{}}};function Zv(e){var t=e.registry,n=e.callbacks,r=As(),a=null,s=function(){a||(n.collectionStarting(),a=requestAnimationFrame(function(){a=null,zr();var m=r,u=m.additions,h=m.removals,S=m.modified,y=Object.keys(u).map(function(w){return t.draggable.getById(w).getDimension(st)}).sort(function(w,D){return w.descriptor.index-D.descriptor.index}),C=Object.keys(S).map(function(w){var D=t.droppable.getById(w),M=D.callbacks.getScrollWhileDragging();return{droppableId:w,scroll:M}}),T={additions:y,removals:Object.keys(h),modified:C};r=As(),jr(),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],s()},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],s()},p=function(){a&&(cancelAnimationFrame(a),a=null,r=As())};return{add:l,remove:c,stop:p}}var np=function(e){var t=e.scrollHeight,n=e.scrollWidth,r=e.height,a=e.width,s=Dt({x:n,y:t},{x:a,y:r}),l={x:Math.max(0,s.x),y:Math.max(0,s.y)};return l},rp=function(){var e=document.documentElement;return e||(process.env.NODE_ENV!=="production"?K(!1,"Cannot find document.documentElement"):K()),e},op=function(){var e=rp(),t=np({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight});return t},Xv=function(){var e=tp(),t=op(),n=e.y,r=e.x,a=rp(),s=a.clientWidth,l=a.clientHeight,c=r+s,p=n+l,f=Kt({top:n,left:r,right:c,bottom:p}),m={frame:f,scroll:{initial:e,current:e,max:t,diff:{value:st,displacement:st}}};return m},Qv=function(e){var t=e.critical,n=e.scrollOptions,r=e.registry;zr();var a=Xv(),s=a.scroll.current,l=t.droppable,c=r.droppable.getAllByType(l.type).map(function(u){return u.callbacks.getDimensionAndWatchScroll(s,n)}),p=r.draggable.getAllByType(t.draggable.type).map(function(u){return u.getDimension(s)}),f={draggables:Dd(p),droppables:Cd(c)};jr();var m={dimensions:f,critical:t,viewport:a};return m};function ap(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"&&He(`
|
|
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 ey=function(e,t){var n=null,r=Zv({callbacks:{publish:t.publishWhileDragging,collectionStarting:t.collectionStarting},registry:e}),a=function(S,y){e.droppable.exists(S)||(process.env.NODE_ENV!=="production"?K(!1,"Cannot update is enabled flag of Droppable "+S+" as it is not registered"):K()),n&&t.updateDroppableIsEnabled({id:S,isEnabled:y})},s=function(S,y){n&&(e.droppable.exists(S)||(process.env.NODE_ENV!=="production"?K(!1,"Cannot update isCombineEnabled flag of Droppable "+S+" as it is not registered"):K()),t.updateDroppableIsCombineEnabled({id:S,isCombineEnabled:y}))},l=function(S,y){n&&(e.droppable.exists(S)||(process.env.NODE_ENV!=="production"?K(!1,"Cannot update the scroll on Droppable "+S+" as it is not registered"):K()),t.updateDroppableScroll({id:S,newScroll:y}))},c=function(S,y){n&&e.droppable.getById(S).callbacks.scroll(y)},p=function(){if(n){r.stop();var S=n.critical.droppable;e.droppable.getAllByType(S.type).forEach(function(y){return y.callbacks.dragStopped()}),n.unsubscribe(),n=null}},f=function(S){n||(process.env.NODE_ENV!=="production"?K(!1,"Should only be subscribed when a collection is occurring"):K());var y=n.critical.draggable;S.type==="ADDITION"&&ap(e,y,S.value)&&r.add(S.value),S.type==="REMOVAL"&&ap(e,y,S.value)&&r.remove(S.value)},m=function(S){n&&(process.env.NODE_ENV!=="production"?K(!1,"Cannot start capturing critical dimensions as there is already a collection"):K());var y=e.draggable.getById(S.draggableId),
|
|
420
|
+
`),!1):!0}var ey=function(e,t){var n=null,r=Zv({callbacks:{publish:t.publishWhileDragging,collectionStarting:t.collectionStarting},registry:e}),a=function(S,y){e.droppable.exists(S)||(process.env.NODE_ENV!=="production"?K(!1,"Cannot update is enabled flag of Droppable "+S+" as it is not registered"):K()),n&&t.updateDroppableIsEnabled({id:S,isEnabled:y})},s=function(S,y){n&&(e.droppable.exists(S)||(process.env.NODE_ENV!=="production"?K(!1,"Cannot update isCombineEnabled flag of Droppable "+S+" as it is not registered"):K()),t.updateDroppableIsCombineEnabled({id:S,isCombineEnabled:y}))},l=function(S,y){n&&(e.droppable.exists(S)||(process.env.NODE_ENV!=="production"?K(!1,"Cannot update the scroll on Droppable "+S+" as it is not registered"):K()),t.updateDroppableScroll({id:S,newScroll:y}))},c=function(S,y){n&&e.droppable.getById(S).callbacks.scroll(y)},p=function(){if(n){r.stop();var S=n.critical.droppable;e.droppable.getAllByType(S.type).forEach(function(y){return y.callbacks.dragStopped()}),n.unsubscribe(),n=null}},f=function(S){n||(process.env.NODE_ENV!=="production"?K(!1,"Should only be subscribed when a collection is occurring"):K());var y=n.critical.draggable;S.type==="ADDITION"&&ap(e,y,S.value)&&r.add(S.value),S.type==="REMOVAL"&&ap(e,y,S.value)&&r.remove(S.value)},m=function(S){n&&(process.env.NODE_ENV!=="production"?K(!1,"Cannot start capturing critical dimensions as there is already a collection"):K());var y=e.draggable.getById(S.draggableId),C=e.droppable.getById(y.descriptor.droppableId),T={draggable:y.descriptor,droppable:C.descriptor},w=e.subscribe(f);return n={critical:T,unsubscribe:w},Qv({critical:T,registry:e,scrollOptions:S.scrollOptions})},u={updateDroppableIsEnabled:a,updateDroppableIsCombineEnabled:s,scrollDroppable:c,updateDroppableScroll:l,startPublishing:m,stopPublishing:p};return u},sp=function(e,t){return e.phase==="IDLE"?!0:e.phase!=="DROP_ANIMATING"||e.completed.result.draggableId===t?!1:e.completed.result.reason==="DROP"},ty=function(e){window.scrollBy(e.x,e.y)},ny=at(function(e){return Fo(e).filter(function(t){return!(!t.isEnabled||!t.frame)})}),ry=function(t,n){var r=Tn(ny(n),function(a){return a.frame||(process.env.NODE_ENV!=="production"?K(!1,"Invalid result"):K()),$d(a.frame.pageMarginBox)(t)});return r},oy=function(e){var t=e.center,n=e.destination,r=e.droppables;if(n){var a=r[n];return a.frame?a:null}var s=ry(t,r);return s},wn={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:function(t){return Math.pow(t,2)},durationDampening:{stopDampeningAt:1200,accelerateAt:360}},ay=function(e,t){var n=e[t.size]*wn.startFromPercentage,r=e[t.size]*wn.maxScrollAtPercentage,a={startScrollingFrom:n,maxScrollValueAt:r};return a},ip=function(e){var t=e.startOfRange,n=e.endOfRange,r=e.current,a=n-t;if(a===0)return process.env.NODE_ENV!=="production"&&He(`
|
|
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
|
|
@@ -438,7 +438,7 @@ Valid keys: `+JSON.stringify(Object.keys($),null," "));var se=Q(X,ce,J,V,W+"."+
|
|
|
438
438
|
-moz-user-select: none;
|
|
439
439
|
-ms-user-select: none;
|
|
440
440
|
overflow-anchor: none;
|
|
441
|
-
`}},l=[r,n,a,s];return{always:Xr(l,"always"),resting:Xr(l,"resting"),dragging:Xr(l,"dragging"),dropAnimating:Xr(l,"dropAnimating"),userCancel:Xr(l,"userCancel")}},kt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?
|
|
441
|
+
`}},l=[r,n,a,s];return{always:Xr(l,"always"),resting:Xr(l,"resting"),dragging:Xr(l,"dragging"),dropAnimating:Xr(l,"dropAnimating"),userCancel:Xr(l,"userCancel")}},kt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?x.useLayoutEffect:x.useEffect,Ws=function(){var t=document.querySelector("head");return t||(process.env.NODE_ENV!=="production"?K(!1,"Cannot find the head to append a style to"):K()),t},Sp=function(t){var n=document.createElement("style");return t&&n.setAttribute("nonce",t),n.type="text/css",n};function Ey(e,t){var n=Me(function(){return Ty(e)},[e]),r=x.useRef(null),a=x.useRef(null),s=ge(at(function(u){var h=a.current;h||(process.env.NODE_ENV!=="production"?K(!1,"Cannot set dynamic style element if it is not set"):K()),h.textContent=u}),[]),l=ge(function(u){var h=r.current;h||(process.env.NODE_ENV!=="production"?K(!1,"Cannot set dynamic style element if it is not set"):K()),h.textContent=u},[]);kt(function(){!r.current&&!a.current||(process.env.NODE_ENV!=="production"?K(!1,"style elements already mounted"):K());var u=Sp(t),h=Sp(t);return r.current=u,a.current=h,u.setAttribute(hr+"-always",e),h.setAttribute(hr+"-dynamic",e),Ws().appendChild(u),Ws().appendChild(h),l(n.always),s(n.resting),function(){var S=function(C){var T=C.current;T||(process.env.NODE_ENV!=="production"?K(!1,"Cannot unmount ref as it is not set"):K()),Ws().removeChild(T),C.current=null};S(r),S(a)}},[t,l,s,n.always,n.resting,e]);var c=ge(function(){return s(n.dragging)},[s,n.dragging]),p=ge(function(u){if(u==="DROP"){s(n.dropAnimating);return}s(n.userCancel)},[s,n.dropAnimating,n.userCancel]),f=ge(function(){a.current&&s(n.resting)},[s,n.resting]),m=Me(function(){return{dragging:c,dropping:p,resting:f}},[c,p,f]);return m}var gp=function(e){return e&&e.ownerDocument?e.ownerDocument.defaultView:window};function Qr(e){return e instanceof gp(e).HTMLElement}function bp(e,t){var n="["+Sr.contextId+'="'+e+'"]',r=wd(document.querySelectorAll(n));if(!r.length)return process.env.NODE_ENV!=="production"&&He('Unable to find any drag handles in the context "'+e+'"'),null;var a=Tn(r,function(s){return s.getAttribute(Sr.draggableId)===t});return a?Qr(a)?a:(process.env.NODE_ENV!=="production"&&He("drag handle needs to be a HTMLElement"),null):(process.env.NODE_ENV!=="production"&&He('Unable to find drag handle with id "'+t+'" as no handle with a matching id was found'),null)}function wy(e){var t=x.useRef({}),n=x.useRef(null),r=x.useRef(null),a=x.useRef(!1),s=ge(function(h,S){var y={id:h,focus:S};return t.current[h]=y,function(){var T=t.current,w=T[h];w!==y&&delete T[h]}},[]),l=ge(function(h){var S=bp(e,h);S&&S!==document.activeElement&&S.focus()},[e]),c=ge(function(h,S){n.current===h&&(n.current=S)},[]),p=ge(function(){r.current||a.current&&(r.current=requestAnimationFrame(function(){r.current=null;var h=n.current;h&&l(h)}))},[l]),f=ge(function(h){n.current=null;var S=document.activeElement;S&&S.getAttribute(Sr.draggableId)===h&&(n.current=h)},[]);kt(function(){return a.current=!0,function(){a.current=!1;var h=r.current;h&&cancelAnimationFrame(h)}},[]);var m=Me(function(){return{register:s,tryRecordFocus:f,tryRestoreFocusRecorded:p,tryShiftRecord:c}},[s,f,p,c]);return m}function Cy(){var e={draggables:{},droppables:{}},t=[];function n(u){return t.push(u),function(){var S=t.indexOf(u);S!==-1&&t.splice(S,1)}}function r(u){t.length&&t.forEach(function(h){return h(u)})}function a(u){return e.draggables[u]||null}function s(u){var h=a(u);return h||(process.env.NODE_ENV!=="production"?K(!1,"Cannot find draggable entry with id ["+u+"]"):K()),h}var l={register:function(h){e.draggables[h.descriptor.id]=h,r({type:"ADDITION",value:h})},update:function(h,S){var y=e.draggables[S.descriptor.id];y&&y.uniqueId===h.uniqueId&&(delete e.draggables[S.descriptor.id],e.draggables[h.descriptor.id]=h)},unregister:function(h){var S=h.descriptor.id,y=a(S);y&&h.uniqueId===y.uniqueId&&(delete e.draggables[S],r({type:"REMOVAL",value:h}))},getById:s,findById:a,exists:function(h){return!!a(h)},getAllByType:function(h){return Ao(e.draggables).filter(function(S){return S.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"?K(!1,"Cannot find droppable entry with id ["+u+"]"):K()),h}var f={register:function(h){e.droppables[h.descriptor.id]=h},unregister:function(h){var S=c(h.descriptor.id);S&&h.uniqueId===S.uniqueId&&delete e.droppables[h.descriptor.id]},getById:p,findById:c,exists:function(h){return!!c(h)},getAllByType:function(h){return Ao(e.droppables).filter(function(S){return S.descriptor.type===h})}};function m(){e.draggables={},e.droppables={},t.length=0}return{draggable:l,droppable:f,subscribe:n,clean:m}}function Dy(){var e=Me(Cy,[]);return x.useEffect(function(){return function(){requestAnimationFrame(e.clean)}},[e]),e}var Gs=x.createContext(null),eo=function(){var e=document.body;return e||(process.env.NODE_ENV!=="production"?K(!1,"Cannot find document.body"):K()),e},Ny={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},ky=function(t){return"rbd-announcement-"+t};function xy(e){var t=Me(function(){return ky(e)},[e]),n=x.useRef(null);x.useEffect(function(){var s=document.createElement("div");return n.current=s,s.id=t,s.setAttribute("aria-live","assertive"),s.setAttribute("aria-atomic","true"),be(s.style,Ny),eo().appendChild(s),function(){setTimeout(function(){var p=eo();p.contains(s)&&p.removeChild(s),s===n.current&&(n.current=null)})}},[t]);var r=ge(function(a){var s=n.current;if(s){s.textContent=a;return}process.env.NODE_ENV!=="production"&&He(`
|
|
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
|
|
@@ -447,7 +447,7 @@ Valid keys: `+JSON.stringify(Object.keys($),null," "));var se=Q(X,ce,J,V,W+"."+
|
|
|
447
447
|
Message not passed to screen reader:
|
|
448
448
|
|
|
449
449
|
"`+a+`"
|
|
450
|
-
`)},[]);return r}var vp=0,Iy={separator:"::"};function My(){vp=0}function Ys(e,t){return t===void 0&&(t=Iy),Me(function(){return""+e+t.separator+vp++},[t.separator,e])}function _y(e){var t=e.contextId,n=e.uniqueId;return"rbd-hidden-text-"+t+"-"+n}function Ly(e){var t=e.contextId,n=e.text,r=Ys("hidden-text",{separator:"-"}),a=Me(function(){return _y({contextId:t,uniqueId:r})},[r,t]);return
|
|
450
|
+
`)},[]);return r}var vp=0,Iy={separator:"::"};function My(){vp=0}function Ys(e,t){return t===void 0&&(t=Iy),Me(function(){return""+e+t.separator+vp++},[t.separator,e])}function _y(e){var t=e.contextId,n=e.uniqueId;return"rbd-hidden-text-"+t+"-"+n}function Ly(e){var t=e.contextId,n=e.text,r=Ys("hidden-text",{separator:"-"}),a=Me(function(){return _y({contextId:t,uniqueId:r})},[r,t]);return x.useEffect(function(){var l=document.createElement("div");return l.id=a,l.textContent=n,l.style.display="none",eo().appendChild(l),function(){var p=eo();p.contains(l)&&p.removeChild(l)}},[a,n]),a}var Go=x.createContext(null),Oy={react:"^16.8.5 || ^17.0.0 || ^18.0.0","react-dom":"^16.8.5 || ^17.0.0 || ^18.0.0"},Ry=/(\d+)\.(\d+)\.(\d+)/,yp=function(t){var n=Ry.exec(t);n==null&&(process.env.NODE_ENV!=="production"?K(!1,"Unable to parse React version "+t):K());var r=Number(n[1]),a=Number(n[2]),s=Number(n[3]);return{major:r,minor:a,patch:s,raw:t}},By=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},Py=function(e,t){var n=yp(e),r=yp(t);By(n,r)||process.env.NODE_ENV!=="production"&&He(`
|
|
451
451
|
React version: [`+r.raw+`]
|
|
452
452
|
does not satisfy expected peer dependency version: [`+n.raw+`]
|
|
453
453
|
|
|
@@ -470,11 +470,11 @@ Valid keys: `+JSON.stringify(Object.keys($),null," "));var se=Q(X,ce,J,V,W+"."+
|
|
|
470
470
|
A html5 doctype does not have a publicId
|
|
471
471
|
|
|
472
472
|
`+Us+`
|
|
473
|
-
`)};function zs(e){process.env.NODE_ENV!=="production"&&e()}function to(e,t){zs(function(){
|
|
473
|
+
`)};function zs(e){process.env.NODE_ENV!=="production"&&e()}function to(e,t){zs(function(){x.useEffect(function(){try{e()}catch(n){gs(`
|
|
474
474
|
A setup problem was encountered.
|
|
475
475
|
|
|
476
476
|
> `+n.message+`
|
|
477
|
-
`)}},t)})}function Fy(){to(function(){Py(Oy.react,
|
|
477
|
+
`)}},t)})}function Fy(){to(function(){Py(Oy.react,x.version),Ay(document)},[])}function js(e){var t=x.useRef(e);return x.useEffect(function(){t.current=e}),t}function Vy(){var e=null;function t(){return!!e}function n(l){return l===e}function r(l){e&&(process.env.NODE_ENV!=="production"?K(!1,"Cannot claim lock as it is already claimed"):K());var c={abandon:l};return e=c,c}function a(){e||(process.env.NODE_ENV!=="production"?K(!1,"Cannot release lock when there is no lock"):K()),e=null}function s(){e&&(e.abandon(),a())}return{isClaimed:t,isActive:n,claim:r,release:a,tryAbandon:s}}var $y=9,Ky=13,qs=27,Tp=32,Hy=33,Wy=34,Gy=35,Yy=36,Uy=37,zy=38,jy=39,qy=40,Yo,Jy=(Yo={},Yo[Ky]=!0,Yo[$y]=!0,Yo),Ep=function(e){Jy[e.keyCode]&&e.preventDefault()},Uo=function(){var e="visibilitychange";if(typeof document>"u")return e;var t=[e,"ms"+e,"webkit"+e,"moz"+e,"o"+e],n=Tn(t,function(r){return"on"+r in document});return n||e}(),wp=0,Cp=5;function Zy(e,t){return Math.abs(t.x-e.x)>=Cp||Math.abs(t.y-e.y)>=Cp}var Dp={type:"IDLE"};function Xy(e){var t=e.cancel,n=e.completed,r=e.getPhase,a=e.setPhase;return[{eventName:"mousemove",fn:function(l){var c=l.button,p=l.clientX,f=l.clientY;if(c===wp){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"?K(!1,"Cannot be IDLE"):K());var h=u.point;if(Zy(h,m)){l.preventDefault();var S=u.actions.fluidLift(m);a({type:"DRAGGING",actions:S})}}}},{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===qs){l.preventDefault(),t();return}Ep(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"?K(!1,"Unexpected phase"):K()),c.actions.shouldRespectForcePress()){t();return}l.preventDefault()}},{eventName:Uo,fn:t}]}function Np(e){var t=x.useRef(Dp),n=x.useRef(vn),r=Me(function(){return{eventName:"mousedown",fn:function(u){if(!u.defaultPrevented&&u.button===wp&&!(u.ctrlKey||u.metaKey||u.shiftKey||u.altKey)){var h=e.findClosestDraggableId(u);if(h){var S=e.tryGetLock(h,l,{sourceEvent:u});if(S){u.preventDefault();var y={x:u.clientX,y:u.clientY};n.current(),f(S,y)}}}}}},[e]),a=Me(function(){return{eventName:"webkitmouseforcewillbegin",fn:function(u){if(!u.defaultPrevented){var h=e.findClosestDraggableId(u);if(h){var S=e.findOptionsForDraggable(h);S&&(S.shouldRespectForcePress||e.canGetLock(h)&&u.preventDefault())}}}}},[e]),s=ge(function(){var u={passive:!1,capture:!0};n.current=Ot(window,[a,r],u)},[a,r]),l=ge(function(){var m=t.current;m.type!=="IDLE"&&(t.current=Dp,n.current(),s())},[s]),c=ge(function(){var m=t.current;l(),m.type==="DRAGGING"&&m.actions.cancel({shouldBlockNextClick:!0}),m.type==="PENDING"&&m.actions.abort()},[l]),p=ge(function(){var u={capture:!0,passive:!1},h=Xy({cancel:c,completed:l,getPhase:function(){return t.current},setPhase:function(y){t.current=y}});n.current=Ot(window,h,u)},[c,l]),f=ge(function(u,h){t.current.type!=="IDLE"&&(process.env.NODE_ENV!=="production"?K(!1,"Expected to move from IDLE to PENDING drag"):K()),t.current={type:"PENDING",point:h,actions:u},p()},[p]);kt(function(){return s(),function(){n.current()}},[s])}var gr;function Qy(){}var eT=(gr={},gr[Wy]=!0,gr[Hy]=!0,gr[Yy]=!0,gr[Gy]=!0,gr);function tT(e,t){function n(){t(),e.cancel()}function r(){t(),e.drop()}return[{eventName:"keydown",fn:function(s){if(s.keyCode===qs){s.preventDefault(),n();return}if(s.keyCode===Tp){s.preventDefault(),r();return}if(s.keyCode===qy){s.preventDefault(),e.moveDown();return}if(s.keyCode===zy){s.preventDefault(),e.moveUp();return}if(s.keyCode===jy){s.preventDefault(),e.moveRight();return}if(s.keyCode===Uy){s.preventDefault(),e.moveLeft();return}if(eT[s.keyCode]){s.preventDefault();return}Ep(s)}},{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:Uo,fn:n}]}function kp(e){var t=x.useRef(Qy),n=Me(function(){return{eventName:"keydown",fn:function(s){if(s.defaultPrevented||s.keyCode!==Tp)return;var l=e.findClosestDraggableId(s);if(!l)return;var c=e.tryGetLock(l,m,{sourceEvent:s});if(!c)return;s.preventDefault();var p=!0,f=c.snapLift();t.current();function m(){p||(process.env.NODE_ENV!=="production"?K(!1,"Cannot stop capturing a keyboard drag when not capturing"):K()),p=!1,t.current(),r()}t.current=Ot(window,tT(f,m),{capture:!0,passive:!1})}}},[e]),r=ge(function(){var s={passive:!1,capture:!0};t.current=Ot(window,[n],s)},[n]);kt(function(){return r(),function(){t.current()}},[r])}var Js={type:"IDLE"},nT=120,rT=.15;function oT(e){var t=e.cancel,n=e.getPhase;return[{eventName:"orientationchange",fn:t},{eventName:"resize",fn:t},{eventName:"contextmenu",fn:function(a){a.preventDefault()}},{eventName:"keydown",fn:function(a){if(n().type!=="DRAGGING"){t();return}a.keyCode===qs&&a.preventDefault(),t()}},{eventName:Uo,fn:t}]}function aT(e){var t=e.cancel,n=e.completed,r=e.getPhase;return[{eventName:"touchmove",options:{capture:!1},fn:function(s){var l=r();if(l.type!=="DRAGGING"){t();return}l.hasMoved=!0;var c=s.touches[0],p=c.clientX,f=c.clientY,m={x:p,y:f};s.preventDefault(),l.actions.move(m)}},{eventName:"touchend",fn:function(s){var l=r();if(l.type!=="DRAGGING"){t();return}s.preventDefault(),l.actions.drop({shouldBlockNextClick:!0}),n()}},{eventName:"touchcancel",fn:function(s){if(r().type!=="DRAGGING"){t();return}s.preventDefault(),t()}},{eventName:"touchforcechange",fn:function(s){var l=r();l.type==="IDLE"&&(process.env.NODE_ENV,K());var c=s.touches[0];if(c){var p=c.force>=rT;if(p){var f=l.actions.shouldRespectForcePress();if(l.type==="PENDING"){f&&t();return}if(f){if(l.hasMoved){s.preventDefault();return}t();return}s.preventDefault()}}}},{eventName:Uo,fn:t}]}function xp(e){var t=x.useRef(Js),n=x.useRef(vn),r=ge(function(){return t.current},[]),a=ge(function(S){t.current=S},[]),s=Me(function(){return{eventName:"touchstart",fn:function(S){if(!S.defaultPrevented){var y=e.findClosestDraggableId(S);if(y){var C=e.tryGetLock(y,c,{sourceEvent:S});if(C){var T=S.touches[0],w=T.clientX,D=T.clientY,M={x:w,y:D};n.current(),u(C,M)}}}}}},[e]),l=ge(function(){var S={capture:!0,passive:!1};n.current=Ot(window,[s],S)},[s]),c=ge(function(){var h=t.current;h.type!=="IDLE"&&(h.type==="PENDING"&&clearTimeout(h.longPressTimerId),a(Js),n.current(),l())},[l,a]),p=ge(function(){var h=t.current;c(),h.type==="DRAGGING"&&h.actions.cancel({shouldBlockNextClick:!0}),h.type==="PENDING"&&h.actions.abort()},[c]),f=ge(function(){var S={capture:!0,passive:!1},y={cancel:p,completed:c,getPhase:r},C=Ot(window,aT(y),S),T=Ot(window,oT(y),S);n.current=function(){C(),T()}},[p,r,c]),m=ge(function(){var S=r();S.type!=="PENDING"&&(process.env.NODE_ENV!=="production"?K(!1,"Cannot start dragging from phase "+S.type):K());var y=S.actions.fluidLift(S.point);a({type:"DRAGGING",actions:y,hasMoved:!1})},[r,a]),u=ge(function(S,y){r().type!=="IDLE"&&(process.env.NODE_ENV!=="production"?K(!1,"Expected to move from IDLE to PENDING drag"):K());var C=setTimeout(m,nT);a({type:"PENDING",point:y,actions:S,longPressTimerId:C}),f()},[f,r,a,m]);kt(function(){return l(),function(){n.current();var y=r();y.type==="PENDING"&&(clearTimeout(y.longPressTimerId),a(Js))}},[r,l,a]),kt(function(){var S=Ot(window,[{eventName:"touchmove",fn:function(){},options:{capture:!1,passive:!1}}]);return S},[])}function sT(e){zs(function(){var t=js(e);to(function(){t.current.length!==e.length&&(process.env.NODE_ENV!=="production"?K(!1,"Cannot change the amount of sensor hooks after mounting"):K(!1))})})}var iT={input:!0,button:!0,textarea:!0,select:!0,option:!0,optgroup:!0,video:!0,audio:!0};function Ip(e,t){if(t==null)return!1;var n=!!iT[t.tagName.toLowerCase()];if(n)return!0;var r=t.getAttribute("contenteditable");return r==="true"||r===""?!0:t===e?!1:Ip(e,t.parentElement)}function lT(e,t){var n=t.target;return Qr(n)?Ip(e,n):!1}var cT=function(e){return Kt(e.getBoundingClientRect()).center};function dT(e){return e instanceof gp(e).Element}var pT=function(){var e="matches";if(typeof document>"u")return e;var t=[e,"msMatchesSelector","webkitMatchesSelector"],n=Tn(t,function(r){return r in Element.prototype});return n||e}();function Mp(e,t){return e==null?null:e[pT](t)?e:Mp(e.parentElement,t)}function uT(e,t){return e.closest?e.closest(t):Mp(e,t)}function mT(e){return"["+Sr.contextId+'="'+e+'"]'}function fT(e,t){var n=t.target;if(!dT(n))return process.env.NODE_ENV!=="production"&&He("event.target must be a Element"),null;var r=mT(e),a=uT(n,r);return a?Qr(a)?a:(process.env.NODE_ENV!=="production"&&He("drag handle must be a HTMLElement"),null):null}function hT(e,t){var n=fT(e,t);return n?n.getAttribute(Sr.draggableId):null}function ST(e,t){var n="["+Hs.contextId+'="'+e+'"]',r=wd(document.querySelectorAll(n)),a=Tn(r,function(s){return s.getAttribute(Hs.id)===t});return a?Qr(a)?a:(process.env.NODE_ENV!=="production"&&He("Draggable element is not a HTMLElement"),null):null}function gT(e){e.preventDefault()}function zo(e){var t=e.expected,n=e.phase,r=e.isLockActive,a=e.shouldWarn;return r()?t!==n?(a&&process.env.NODE_ENV!=="production"&&He(`
|
|
478
478
|
Cannot perform action.
|
|
479
479
|
The actions you used belong to an outdated phase
|
|
480
480
|
|
|
@@ -492,7 +492,7 @@ Valid keys: `+JSON.stringify(Object.keys($),null," "));var se=Q(X,ce,J,V,W+"."+
|
|
|
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 _p(e){var t=e.lockAPI,n=e.store,r=e.registry,a=e.draggableId;if(t.isClaimed())return!1;var s=r.draggable.findById(a);return s?!(!s.options.isEnabled||!sp(n.getState(),a)):(process.env.NODE_ENV!=="production"&&He("Unable to find draggable with id: "+a),!1)}function bT(e){var t=e.lockAPI,n=e.contextId,r=e.store,a=e.registry,s=e.draggableId,l=e.forceSensorStop,c=e.sourceEvent,p=_p({lockAPI:t,store:r,registry:a,draggableId:s});if(!p)return null;var f=a.draggable.getById(s),m=ST(n,f.descriptor.id);if(!m)return process.env.NODE_ENV!=="production"&&He("Unable to find draggable element with id: "+s),null;if(c&&!f.options.canDragInteractiveElements&&lT(m,c))return null;var u=t.claim(l||vn),h="PRE_DRAG";function S(){return f.options.shouldRespectForcePress}function y(){return t.isActive(u)}function
|
|
495
|
+
`),!1)}function _p(e){var t=e.lockAPI,n=e.store,r=e.registry,a=e.draggableId;if(t.isClaimed())return!1;var s=r.draggable.findById(a);return s?!(!s.options.isEnabled||!sp(n.getState(),a)):(process.env.NODE_ENV!=="production"&&He("Unable to find draggable with id: "+a),!1)}function bT(e){var t=e.lockAPI,n=e.contextId,r=e.store,a=e.registry,s=e.draggableId,l=e.forceSensorStop,c=e.sourceEvent,p=_p({lockAPI:t,store:r,registry:a,draggableId:s});if(!p)return null;var f=a.draggable.getById(s),m=ST(n,f.descriptor.id);if(!m)return process.env.NODE_ENV!=="production"&&He("Unable to find draggable element with id: "+s),null;if(c&&!f.options.canDragInteractiveElements&&lT(m,c))return null;var u=t.claim(l||vn),h="PRE_DRAG";function S(){return f.options.shouldRespectForcePress}function y(){return t.isActive(u)}function C(A,G){zo({expected:A,phase:h,isLockActive:y,shouldWarn:!0})&&r.dispatch(G())}var T=C.bind(null,"DRAGGING");function w(A){function G(){t.release(),h="COMPLETED"}h!=="PRE_DRAG"&&(G(),h!=="PRE_DRAG"&&(process.env.NODE_ENV!=="production"?K(!1,"Cannot lift in phase "+h):K())),r.dispatch(sv(A.liftActionArgs)),h="DRAGGING";function E(R,O){if(O===void 0&&(O={shouldBlockNextClick:!1}),A.cleanup(),O.shouldBlockNextClick){var P=Ot(window,[{eventName:"click",fn:gT,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(P)}G(),r.dispatch(Jd({reason:R}))}return be({isActive:function(){return zo({expected:"DRAGGING",phase:h,isLockActive:y,shouldWarn:!1})},shouldRespectForcePress:S,drop:function(O){return E("DROP",O)},cancel:function(O){return E("CANCEL",O)}},A.actions)}function D(A){var G=Vr(function(R){T(function(){return qd({client:R})})}),E=w({liftActionArgs:{id:s,clientSelection:A,movementMode:"FLUID"},cleanup:function(){return G.cancel()},actions:{move:G}});return be({},E,{move:G})}function M(){var A={moveUp:function(){return T(hv)},moveRight:function(){return T(gv)},moveDown:function(){return T(Sv)},moveLeft:function(){return T(bv)}};return w({liftActionArgs:{id:s,clientSelection:cT(m),movementMode:"SNAP"},cleanup:vn,actions:A})}function I(){var A=zo({expected:"PRE_DRAG",phase:h,isLockActive:y,shouldWarn:!0});A&&t.release()}var k={isActive:function(){return zo({expected:"PRE_DRAG",phase:h,isLockActive:y,shouldWarn:!1})},shouldRespectForcePress:S,fluidLift:D,snapLift:M,abort:I};return k}var vT=[Np,kp,xp];function yT(e){var t=e.contextId,n=e.store,r=e.registry,a=e.customSensors,s=e.enableDefaultSensors,l=[].concat(s?vT:[],a||[]),c=x.useState(function(){return Vy()})[0],p=ge(function(D,M){D.isDragging&&!M.isDragging&&c.tryAbandon()},[c]);kt(function(){var D=n.getState(),M=n.subscribe(function(){var I=n.getState();p(D,I),D=I});return M},[c,n,p]),kt(function(){return c.tryAbandon},[c.tryAbandon]);var f=ge(function(w){return _p({lockAPI:c,registry:r,store:n,draggableId:w})},[c,r,n]),m=ge(function(w,D,M){return bT({lockAPI:c,registry:r,contextId:t,store:n,draggableId:w,forceSensorStop:D,sourceEvent:M&&M.sourceEvent?M.sourceEvent:null})},[t,c,r,n]),u=ge(function(w){return hT(t,w)},[t]),h=ge(function(w){var D=r.draggable.findById(w);return D?D.options:null},[r.draggable]),S=ge(function(){c.isClaimed()&&(c.tryAbandon(),n.getState().phase!=="IDLE"&&n.dispatch(Ms()))},[c,n]),y=ge(c.isClaimed,[c]),C=Me(function(){return{canGetLock:f,tryGetLock:m,findClosestDraggableId:u,findOptionsForDraggable:h,tryReleaseLock:S,isLockClaimed:y}},[f,m,u,h,S,y]);sT(l);for(var T=0;T<l.length;T++)l[T](C)}var TT=function(t){return{onBeforeCapture:t.onBeforeCapture,onBeforeDragStart:t.onBeforeDragStart,onDragStart:t.onDragStart,onDragEnd:t.onDragEnd,onDragUpdate:t.onDragUpdate}};function no(e){return e.current||(process.env.NODE_ENV!=="production"?K(!1,"Could not find store from lazy ref"):K()),e.current}function ET(e){var t=e.contextId,n=e.setCallbacks,r=e.sensors,a=e.nonce,s=e.dragHandleUsageInstructions,l=x.useRef(null);Fy();var c=js(e),p=ge(function(){return TT(c.current)},[c]),f=xy(t),m=Ly({contextId:t,text:s}),u=Ey(t,a),h=ge(function(R){no(l).dispatch(R)},[]),S=Me(function(){return _c({publishWhileDragging:lv,updateDroppableScroll:dv,updateDroppableIsEnabled:pv,updateDroppableIsCombineEnabled:uv,collectionStarting:cv},h)},[h]),y=Dy(),C=Me(function(){return ey(y,S)},[y,S]),T=Me(function(){return gy(be({scrollWindow:ty,scrollDroppable:C.scrollDroppable},_c({move:qd},h)))},[C.scrollDroppable,h]),w=wy(t),D=Me(function(){return Jv({announce:f,autoScroller:T,dimensionMarshal:C,focusMarshal:w,getResponders:p,styleMarshal:u})},[f,T,C,w,p,u]);process.env.NODE_ENV!=="production"&&l.current&&l.current!==D&&process.env.NODE_ENV!=="production"&&He("unexpected store change"),l.current=D;var M=ge(function(){var R=no(l),O=R.getState();O.phase!=="IDLE"&&R.dispatch(Ms())},[]),I=ge(function(){var R=no(l).getState();return R.isDragging||R.phase==="DROP_ANIMATING"},[]),k=Me(function(){return{isDragging:I,tryAbort:M}},[I,M]);n(k);var A=ge(function(R){return sp(no(l).getState(),R)},[]),G=ge(function(){return Hn(no(l).getState())},[]),E=Me(function(){return{marshal:C,focus:w,contextId:t,canLift:A,isMovementAllowed:G,dragHandleUsageInstructionsId:m,registry:y}},[t,C,m,w,A,G,y]);return yT({contextId:t,store:D,registry:y,customSensors:r,enableDefaultSensors:e.enableDefaultSensors!==!1}),x.useEffect(function(){return M},[M]),x.createElement(Go.Provider,{value:E},x.createElement(jc,{context:Gs,store:D},e.children))}var Lp=0;function wT(){Lp=0}function CT(){return Me(function(){return""+Lp++},[])}function DT(){wT(),My()}function Op(e){var t=CT(),n=e.dragHandleUsageInstructions||Po.dragHandleUsageInstructions;return x.createElement(qg,null,function(r){return x.createElement(ET,{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 Zs=function(t){return function(n){return t===n}},NT=Zs("scroll"),kT=Zs("auto"),xT=Zs("visible"),Rp=function(t,n){return n(t.overflowX)||n(t.overflowY)},IT=function(t,n){return n(t.overflowX)&&n(t.overflowY)},Bp=function(t){var n=window.getComputedStyle(t),r={overflowX:n.overflowX,overflowY:n.overflowY};return Rp(r,NT)||Rp(r,kT)},MT=function(){if(process.env.NODE_ENV==="production")return!1;var t=eo(),n=document.documentElement;if(n||(process.env.NODE_ENV,K()),!Bp(t))return!1;var r=window.getComputedStyle(n),a={overflowX:r.overflowX,overflowY:r.overflowY};return IT(a,xT)||process.env.NODE_ENV!=="production"&&He(`
|
|
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)
|
|
@@ -507,7 +507,7 @@ Valid keys: `+JSON.stringify(Object.keys($),null," "));var se=Q(X,ce,J,V,W+"."+
|
|
|
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
|
-
`)}},Xs=function(e){return{x:e.scrollLeft,y:e.scrollTop}},LT=function e(t){if(!t)return!1;var n=window.getComputedStyle(t);return n.position==="fixed"?!0:e(t.parentElement)},OT=function(e){var t=Pp(e),n=LT(e);return{closestScrollable:t,isFixedOnPage:n}},RT=function(e){var t=e.descriptor,n=e.isEnabled,r=e.isCombineEnabled,a=e.isFixedOnPage,s=e.direction,l=e.client,c=e.page,p=e.closest,f=function(){if(!p)return null;var S=p.scrollSize,y=p.client,
|
|
510
|
+
`)}},Xs=function(e){return{x:e.scrollLeft,y:e.scrollTop}},LT=function e(t){if(!t)return!1;var n=window.getComputedStyle(t);return n.position==="fixed"?!0:e(t.parentElement)},OT=function(e){var t=Pp(e),n=LT(e);return{closestScrollable:t,isFixedOnPage:n}},RT=function(e){var t=e.descriptor,n=e.isEnabled,r=e.isCombineEnabled,a=e.isFixedOnPage,s=e.direction,l=e.client,c=e.page,p=e.closest,f=function(){if(!p)return null;var S=p.scrollSize,y=p.client,C=np({scrollHeight:S.scrollHeight,scrollWidth:S.scrollWidth,height:y.paddingBox.height,width:y.paddingBox.width});return{pageMarginBox:p.page.marginBox,frameClient:y,scrollSize:S,shouldClipSubject:p.shouldClipSubject,scroll:{initial:p.scroll,current:p.scroll,max:C,diff:{value:st,displacement:st}}}}(),m=s==="vertical"?Ts:xd,u=mr({page:c,withPlaceholder:null,axis:m,frame:f}),h={descriptor:t,isCombineEnabled:r,isFixedOnPage:a,axis:m,isEnabled:n,client:l,page:c,frame:f,subject:u};return h},BT=function(t,n){var r=ud(t);if(!n||t!==n)return r;var a=r.paddingBox.top-n.scrollTop,s=r.paddingBox.left-n.scrollLeft,l=a+n.scrollHeight,c=s+n.scrollWidth,p={top:a,right:c,bottom:l,left:s},f=fs(p,r.border),m=Ss({borderBox:f,margin:r.margin,border:r.border,padding:r.padding});return m},PT=function(e){var t=e.ref,n=e.descriptor,r=e.env,a=e.windowScroll,s=e.direction,l=e.isDropDisabled,c=e.isCombineEnabled,p=e.shouldClipSubject,f=r.closestScrollable,m=BT(t,f),u=Ro(m,a),h=function(){if(!f)return null;var y=ud(f),C={scrollHeight:f.scrollHeight,scrollWidth:f.scrollWidth};return{client:y,page:Ro(y,a),scroll:Xs(f),scrollSize:C,shouldClipSubject:p}}(),S=RT({descriptor:n,isEnabled:!l,isCombineEnabled:c,isFixedOnPage:r.isFixedOnPage,direction:s,client:m,page:u,closest:h});return S},AT={passive:!1},FT={passive:!0},Ap=function(e){return e.shouldPublishImmediately?AT:FT};function jo(e){var t=x.useContext(e);return t||(process.env.NODE_ENV!=="production"?K(!1,"Could not find required context"):K()),t}var qo=function(t){return t&&t.env.closestScrollable||null};function VT(e){var t=x.useRef(null),n=jo(Go),r=Ys("droppable"),a=n.registry,s=n.marshal,l=js(e),c=Me(function(){return{id:e.droppableId,type:e.type,mode:e.mode}},[e.droppableId,e.mode,e.type]),p=x.useRef(c),f=Me(function(){return at(function(I,k){t.current||(process.env.NODE_ENV!=="production"?K(!1,"Can only update scroll when dragging"):K());var A={x:I,y:k};s.updateDroppableScroll(c.id,A)})},[c.id,s]),m=ge(function(){var I=t.current;return!I||!I.env.closestScrollable?st:Xs(I.env.closestScrollable)},[]),u=ge(function(){var I=m();f(I.x,I.y)},[m,f]),h=Me(function(){return Vr(u)},[u]),S=ge(function(){var I=t.current,k=qo(I);I&&k||(process.env.NODE_ENV!=="production"?K(!1,"Could not find scroll options while scrolling"):K());var A=I.scrollOptions;if(A.shouldPublishImmediately){u();return}h()},[h,u]),y=ge(function(I,k){t.current&&(process.env.NODE_ENV!=="production"?K(!1,"Cannot collect a droppable while a drag is occurring"):K());var A=l.current,G=A.getDroppableRef();G||(process.env.NODE_ENV!=="production"?K(!1,"Cannot collect without a droppable ref"):K());var E=OT(G),R={ref:G,descriptor:c,env:E,scrollOptions:k};t.current=R;var O=PT({ref:G,descriptor:c,env:E,windowScroll:I,direction:A.direction,isDropDisabled:A.isDropDisabled,isCombineEnabled:A.isCombineEnabled,shouldClipSubject:!A.ignoreContainerClipping}),P=E.closestScrollable;return P&&(P.setAttribute(hp.contextId,n.contextId),P.addEventListener("scroll",S,Ap(R.scrollOptions)),process.env.NODE_ENV!=="production"&&_T(P)),O},[n.contextId,c,S,l]),C=ge(function(){var I=t.current,k=qo(I);return I&&k||(process.env.NODE_ENV!=="production"?K(!1,"Can only recollect Droppable client for Droppables that have a scroll container"):K()),Xs(k)},[]),T=ge(function(){var I=t.current;I||(process.env.NODE_ENV!=="production"?K(!1,"Cannot stop drag when no active drag"):K());var k=qo(I);t.current=null,k&&(h.cancel(),k.removeAttribute(hp.contextId),k.removeEventListener("scroll",S,Ap(I.scrollOptions)))},[S,h]),w=ge(function(I){var k=t.current;k||(process.env.NODE_ENV!=="production"?K(!1,"Cannot scroll when there is no drag"):K());var A=qo(k);A||(process.env.NODE_ENV!=="production"?K(!1,"Cannot scroll a droppable with no closest scrollable"):K()),A.scrollTop+=I.y,A.scrollLeft+=I.x},[]),D=Me(function(){return{getDimensionAndWatchScroll:y,getScrollWhileDragging:C,dragStopped:T,scroll:w}},[T,y,C,w]),M=Me(function(){return{uniqueId:r,descriptor:c,callbacks:D}},[D,c,r]);kt(function(){return p.current=M.descriptor,a.droppable.register(M),function(){t.current&&(process.env.NODE_ENV!=="production"&&He("Unsupported: changing the droppableId or type of a Droppable during a drag"),T()),a.droppable.unregister(M)}},[D,c,T,M,s,a.droppable]),kt(function(){t.current&&s.updateDroppableIsEnabled(p.current.id,!e.isDropDisabled)},[e.isDropDisabled,s]),kt(function(){t.current&&s.updateDroppableIsCombineEnabled(p.current.id,e.isCombineEnabled)},[e.isCombineEnabled,s])}function Qs(){}var Fp={width:0,height:0,margin:tb},$T=function(t){var n=t.isAnimatingOpenOnMount,r=t.placeholder,a=t.animate;return n||a==="close"?Fp:{height:r.client.borderBox.height,width:r.client.borderBox.width,margin:r.client.margin}},KT=function(t){var n=t.isAnimatingOpenOnMount,r=t.placeholder,a=t.animate,s=$T({isAnimatingOpenOnMount:n,placeholder:r,animate:a});return{display:r.display,boxSizing:"border-box",width:s.width,height:s.height,marginTop:s.margin.top,marginRight:s.margin.right,marginBottom:s.margin.bottom,marginLeft:s.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:a!=="none"?Jr.placeholder:null}};function HT(e){var t=x.useRef(null),n=ge(function(){t.current&&(clearTimeout(t.current),t.current=null)},[]),r=e.animate,a=e.onTransitionEnd,s=e.onClose,l=e.contextId,c=x.useState(e.animate==="open"),p=c[0],f=c[1];x.useEffect(function(){return p?r!=="open"?(n(),f(!1),Qs):t.current?Qs:(t.current=setTimeout(function(){t.current=null,f(!1)}),n):Qs},[r,p,n]);var m=ge(function(h){h.propertyName==="height"&&(a(),r==="close"&&s())},[r,s,a]),u=KT({isAnimatingOpenOnMount:p,animate:e.animate,placeholder:e.placeholder});return x.createElement(e.placeholder.tagName,{style:u,"data-rbd-placeholder-context-id":l,onTransitionEnd:m,ref:e.innerRef})}var WT=x.memo(HT),ei=x.createContext(null);function Vp(e){e&&Qr(e)||(process.env.NODE_ENV!=="production"?K(!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:
|
|
@@ -518,8 +518,8 @@ Valid keys: `+JSON.stringify(Object.keys($),null," "));var se=Q(X,ce,J,V,W+"."+
|
|
|
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
|
-
`)}}],UT=[function(t){var n=t.props;n.renderClone||(process.env.NODE_ENV!=="production"?K(!1,"Must provide a clone render function (renderClone) for virtual lists"):K())},function(t){var n=t.getPlaceholderRef;n()&&(process.env.NODE_ENV!=="production"?K(!1,"Expected virtual list to not have a placeholder"):K())}];function zT(e){to(function(){ni(e,GT),e.props.mode==="standard"&&ni(e,YT),e.props.mode==="virtual"&&ni(e,UT)})}var jT=function(e){wc(t,e);function t(){for(var r,a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];return r=e.call.apply(e,[this].concat(s))||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(a,s){return a.shouldAnimate?a.on?{isVisible:!0,data:a.on,animate:"open"}:s.isVisible?{isVisible:!0,data:s.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:!!a.on,data:a.on,animate:"none"}};var n=t.prototype;return n.render=function(){if(!this.state.isVisible)return null;var a={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(a)},t}(
|
|
522
|
-
Provided: [type: `+typeof a+"] (value: "+a+")"):K(!1)),ab(e.index)||(process.env.NODE_ENV!=="production"?K(!1,r(a)+" requires an integer index prop"):K(!1)),e.mapped.type!=="DRAGGING"&&(Vp(n()),e.isEnabled&&(bp(t,a)||(process.env.NODE_ENV!=="production"?K(!1,r(a)+" Unable to find drag handle"):K(!1))))})}function oE(e){zs(function(){var t=I.useRef(e);to(function(){e!==t.current&&(process.env.NODE_ENV!=="production"?K(!1,"Draggable isClone prop value changed during component life"):K(!1))},[e])})}function aE(e){e.preventDefault()}function sE(e){var t=I.useRef(null),n=ge(function(R){t.current=R},[]),r=ge(function(){return t.current},[]),a=jo(Go),s=a.contextId,l=a.dragHandleUsageInstructionsId,c=a.registry,p=jo(ei),f=p.type,m=p.droppableId,u=Me(function(){return{id:e.draggableId,index:e.index,type:f,droppableId:m}},[e.draggableId,e.index,f,m]),h=e.children,S=e.draggableId,y=e.isEnabled,w=e.shouldRespectForcePress,T=e.canDragInteractiveElements,C=e.isClone,D=e.mapped,M=e.dropAnimationFinished;if(rE(e,s,r),oE(C),!C){var x=Me(function(){return{descriptor:u,registry:c,getDraggableRef:r,canDragInteractiveElements:T,shouldRespectForcePress:w,isEnabled:y}},[u,c,r,T,w,y]);nE(x)}var k=Me(function(){return y?{tabIndex:0,role:"button","aria-describedby":l,"data-rbd-drag-handle-draggable-id":S,"data-rbd-drag-handle-context-id":s,draggable:!1,onDragStart:aE}:null},[s,l,S,y]),P=ge(function(R){D.type==="DRAGGING"&&D.dropping&&R.propertyName==="transform"&&M()},[M,D]),G=Me(function(){var R=eE(D),O=D.type==="DRAGGING"&&D.dropping?P:null,A={innerRef:n,draggableProps:{"data-rbd-draggable-context-id":s,"data-rbd-draggable-id":S,style:R,onTransitionEnd:O},dragHandleProps:k};return A},[s,k,S,D,P,n]),E=Me(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(G,D.snapshot,E)}var Kp=function(e,t){return e===t},Hp=function(e){var t=e.combine,n=e.destination;return n?n.droppableId:t?t.droppableId:null},iE=function(t){return t.combine?t.combine.draggableId:null},lE=function(t){return t.at&&t.at.type==="COMBINE"?t.at.combine.draggableId:null};function cE(){var e=at(function(a,s){return{x:a,y:s}}),t=at(function(a,s,l,c,p){return{isDragging:!0,isClone:s,isDropAnimating:!!p,dropAnimation:p,mode:a,draggingOver:l,combineWith:c,combineTargetFor:null}}),n=at(function(a,s,l,c,p,f,m){return{mapped:{type:"DRAGGING",dropping:null,draggingOver:p,combineWith:f,mode:s,offset:a,dimension:l,forceShouldAnimate:m,snapshot:t(s,c,p,f,null)}}}),r=function(s,l){if(s.isDragging){if(s.critical.draggable.id!==l.draggableId)return null;var c=s.current.client.offset,p=s.dimensions.draggables[l.draggableId],f=Nt(s.impact),m=lE(s.impact),u=s.forceShouldAnimate;return n(e(c.x,c.y),s.movementMode,p,l.isClone,f,m,u)}if(s.phase==="DROP_ANIMATING"){var h=s.completed;if(h.result.draggableId!==l.draggableId)return null;var S=l.isClone,y=s.dimensions.draggables[l.draggableId],w=h.result,T=w.mode,C=Hp(w),D=iE(w),M=s.dropDuration,x={duration:M,curve:Ls.drop,moveTo:s.newHomeClientOffset,opacity:D?qr.opacity.drop:null,scale:D?qr.scale.drop:null};return{mapped:{type:"DRAGGING",offset:s.newHomeClientOffset,dimension:y,dropping:x,draggingOver:C,combineWith:D,mode:T,forceShouldAnimate:null,snapshot:t(T,S,C,D,x)}}}return null};return r}function Wp(e){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:e,combineWith:null}}var dE={mapped:{type:"SECONDARY",offset:st,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:Wp(null)}};function pE(){var e=at(function(l,c){return{x:l,y:c}}),t=at(Wp),n=at(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=!!(m.inVirtualList&&m.effected[c]),S=Vo(f),y=S&&S.draggableId===c?p:null;if(!u){if(!h)return r(y);if(f.displaced.invisible[c])return null;var w=ur(m.displacedBy.point),T=e(w.x,w.y);return n(T,y,!0)}if(h)return r(y);var C=f.displacedBy.point,D=e(C.x,C.y);return n(D,y,u.shouldAnimate)},s=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 s}var uE=function(){var t=cE(),n=pE(),r=function(s,l){return t(s,l)||n(s,l)||dE};return r},mE={dropAnimationFinished:Zd},fE=id(uE,mE,null,{context:Gs,pure:!0,areStatePropsEqual:Kp})(sE);function Gp(e){var t=jo(ei),n=t.isUsingCloneFor;return n===e.draggableId&&!e.isClone?null:I.createElement(fE,e)}function Yp(e){var t=typeof e.isDragDisabled=="boolean"?!e.isDragDisabled:!0,n=!!e.disableInteractiveElementBlocking,r=!!e.shouldRespectForcePress;return I.createElement(Gp,be({},e,{isClone:!1,isEnabled:t,canDragInteractiveElements:n,shouldRespectForcePress:r}))}function hE(e){var t=I.useContext(Go);t||(process.env.NODE_ENV!=="production"?K(!1,"Could not find app context"):K());var n=t.contextId,r=t.isMovementAllowed,a=I.useRef(null),s=I.useRef(null),l=e.children,c=e.droppableId,p=e.type,f=e.mode,m=e.direction,u=e.ignoreContainerClipping,h=e.isDropDisabled,S=e.isCombineEnabled,y=e.snapshot,w=e.useClone,T=e.updateViewportMaxScroll,C=e.getContainerForClone,D=ge(function(){return a.current},[]),M=ge(function(j){a.current=j},[]),x=ge(function(){return s.current},[]),k=ge(function(j){s.current=j},[]);zT({props:e,getDroppableRef:D,getPlaceholderRef:x});var P=ge(function(){r()&&T({maxScroll:op()})},[r,T]);VT({droppableId:c,type:p,mode:f,direction:m,isDropDisabled:h,isCombineEnabled:S,ignoreContainerClipping:u,getDroppableRef:D});var G=I.createElement(jT,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder},function(j){var L=j.onClose,re=j.data,B=j.animate;return I.createElement(WT,{placeholder:re,onClose:L,innerRef:k,animate:B,contextId:n,onTransitionEnd:P})}),E=Me(function(){return{innerRef:M,placeholder:G,droppableProps:{"data-rbd-droppable-id":c,"data-rbd-droppable-context-id":n}}},[n,c,G,M]),R=w?w.dragging.draggableId:null,O=Me(function(){return{droppableId:c,type:p,isUsingCloneFor:R}},[c,R,p]);function A(){if(!w)return null;var j=w.dragging,L=w.render,re=I.createElement(Gp,{draggableId:j.draggableId,index:j.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},function(B,Z){return L(B,Z,j)});return vo.createPortal(re,C())}return I.createElement(ei.Provider,{value:O},l(E,y),A())}var ri=function(t,n){return t===n.droppable.type},Up=function(t,n){return n.draggables[t.draggable.id]},SE=function(){var t={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},n=be({},t,{shouldAnimatePlaceholder:!1}),r=at(function(l){return{draggableId:l.id,type:l.type,source:{index:l.index,droppableId:l.droppableId}}}),a=at(function(l,c,p,f,m,u){var h=m.descriptor.id,S=m.descriptor.droppableId===l;if(S){var y=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:y}}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}}),s=function(c,p){var f=p.droppableId,m=p.type,u=!p.isDropDisabled,h=p.renderClone;if(c.isDragging){var S=c.critical;if(!ri(m,S))return n;var y=Up(S,c.dimensions),w=Nt(c.impact)===f;return a(f,u,w,w,y,h)}if(c.phase==="DROP_ANIMATING"){var T=c.completed;if(!ri(m,T.critical))return n;var C=Up(T.critical,c.dimensions);return a(f,u,Hp(T.result)===f,Nt(T.impact)===f,C,h)}if(c.phase==="IDLE"&&c.completed&&!c.shouldFlush){var D=c.completed;if(!ri(m,D.critical))return n;var M=Nt(D.impact)===f,x=!!(D.impact.at&&D.impact.at.type==="COMBINE"),k=D.critical.droppable.id===f;return M?x?t:n:k?t:n}return n};return s},gE={updateViewportMaxScroll:fv};function bE(){return document.body||(process.env.NODE_ENV!=="production"?K(!1,"document.body is not ready"):K()),document.body}var vE={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:bE},oi=id(SE,gE,null,{context:Gs,pure:!0,areStatePropsEqual:Kp})(hE);oi.defaultProps=vE;const yE={disabled:"boolean",href:"string",icon:"SpsIcon",kind:"ButtonKind",spinning:"boolean",spinningTitle:"string",type:"ButtonType"};function je(e){const{children:t,className:n,href:r,icon:a,kind:s=Y.ButtonKind.DEFAULT,spinning:l,spinningTitle:c,type:p=Y.ButtonType.BUTTON,unsafelyReplaceClassName:f,...m}=e;let{disabled:u}=e;l&&(u=!0);const{t:h}=$e.useWoodlandLanguage(),S=U(f||"sps-button",`sps-button--${s}`,u&&"sps-button--disabled",l&&"sps-button--spinning",n),y=a&&o.createElement("i",{className:U("sps-icon",`sps-icon-${a}`),"aria-hidden":"true"}),w=l&&o.createElement("div",{className:"sps-spinner"},c||h("button.spinningTitle"));return o.createElement("div",{className:S},r?o.createElement("a",{...m,href:r,className:"sps-button__clickable-element"},y,t,w):o.createElement("button",{...m,type:p,className:"sps-button__clickable-element",disabled:u},y,t,w))}Object.assign(je,{props:yE,displayName:"SpsButton"});const TE={content:"ReactNodeLike",icon:"SpsIcon",title:"string"};function zp(e){const{content:t,className:n,icon:r,title:a,"data-testid":s,unsafelyReplaceClassName:l,...c}=e,p=U(l||"sps-card__header",n);return o.createElement("div",{className:p,title:a,...c},o.createElement("div",{className:"sps-card__title"}," ",r&&o.createElement("i",{"aria-hidden":"true",className:`sps-icon sps-icon-${r}`})," ",a),o.createElement("div",{className:"sps-card__header-content"},t))}Object.assign(zp,{props:TE,displayName:"SpsCardHeader"});const EE={icon:"SpsIcon",kind:"TagKind"};function Ht(e){const{children:t,className:n,icon:r,kind:a=Y.TagKind.DEFAULT,"data-testid":s,unsafelyReplaceClassName:l,...c}=e,p=o.Children.toArray(t).filter(m=>typeof m=="string").join(""),f=U(l||"sps-tag",`sps-tag--${a}`,n);return o.createElement("span",{className:f,"data-testid":`${s}__tag`,title:p,...c},r&&o.createElement("i",{"aria-hidden":"true",className:`sps-icon sps-icon-${r}`,"data-testid":`${s}__icon`}),t)}Object.assign(Ht,{props:EE,displayName:"SpsTag"});const wE={activateTab:"Function",active:"boolean",icon:"SpsIcon",label:"string",index:"number",tag:"string",tagKind:"TagKind",tagIcon:"SpsIcon"};function ai(e){const{activateTab:t,active:n,children:r,className:a,label:s,icon:l,id:c,index:p=0,tag:f,tagKind:m,tagIcon:u,"data-testid":h,unsafelyReplaceClassName:S,...y}=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))},C=U(S||"sps-nav__item","sps-nav__link",n&&"active",a);return o.createElement("a",{className:C,onClick:w,"data-toggle":"tab",id:c,role:"tab","aria-controls":c,...y,tabIndex:0,onKeyDown:T},l&&o.createElement("i",{className:`sps-icon sps-icon-${l}`}),o.createElement("span",null,s),f&&o.createElement(Ht,{kind:m||Y.TagKind.KEY,icon:u},f))}Object.assign(ai,{props:wE,displayName:"SpsCardTabbedPane"});function CE(e,t,n){const[r,a]=o.useState({index:0,content:null}),s=o.useCallback((l,c,p)=>{a({index:c,content:p})},[]);return o.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=o.Children.toArray(e);n&&t?c(p,t):n&&l(p)},[t,e]),[r,s]}const DE={activeTab:"string",footer:"ReactNodeOrRenderFn",headerContent:"ReactNodeOrRenderFn",headerIcon:"SpsIcon",headerTitle:"string"};function si(e){o.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:s,headerIcon:l,headerTitle:c,"data-testid":p,unsafelyReplaceClassName:f,...m}=e,u=o.Children.toArray(n).some(w=>o.isValidElement(w)&&w.type===ai),[h,S]=CE(n,t,u),y=U(f||"sps-card",r);return o.createElement("div",{...m,className:y,"data-testid":`${p}__card`},(c||s)&&o.createElement(zp,{title:c,content:Tt(s),icon:l,"data-testid":`${p}__header`}),u===!0?o.createElement(o.Fragment,null,o.createElement("nav",{className:"sps-nav sps-nav--tabs",role:"tablist","data-testid":`${p}__tabs`},o.Children.map(n,(w,T)=>{if(o.isValidElement(w))return o.cloneElement(w,{active:T===h.index,index:T,activateTab:S,"data-testid":`${p}__tab`})})),o.createElement("div",{className:"sps-card__body","data-testid":`${p}__body--tab-active`},h.content)):o.createElement("div",{className:"sps-card__body","data-testid":`${p}__body`},n),a&&o.createElement("div",{className:"sps-card__footer","data-testid":`${p}__footer`},Tt(a)))}Object.assign(si,{props:DE,displayName:"SpsCard"});function ii(e,t){const[n,...r]=v.crumblePath(t);return r.length?e.members[n].get(r):e.members[n]}function NE(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(Eo.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,s]of r.members.entries())n&&a<n.length?s.reset(n[a]):s.reset();return r.update(),this},get(n){return ii(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 kE(e,t={}){return{validators:[],id:ht(),...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(Eo.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 xE(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 ii(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 IE(e,t){t&&e.setInitValue(t);const[n,r]=I.useState(),[a,s]=I.useState([]),[l,c]=I.useReducer(p=>{for(const f of a)for(const m of v.traversePath(p,f))m.validators&&m.validators.length&&(m.errors=wo(m.getValue(),m.validators),m.invalid=!!m.errors&&!m.pristine);return r(void 0),s([]),{...p}},e);return v.forEachNestedObject(l,(p,f)=>{f._type&&(f.update=function(){return a.push(p),s(a),n||r(window.setTimeout(c,0)),this})}),l}function ME(e,t=null){const[n,r]=I.useState(t),a=I.useRef(()=>null);return I.useEffect(()=>{const s=()=>n;if(e.validators){const l=e.validators.indexOf(a.current);l===-1?e.validators.push(s):e.validators[l]=s,e.update(),a.current=s}},[n]),[n,r]}const jp={formMeta:"SpsFormSetMeta<any>",onSubmit:"React.FormEventHandler"},ro=o.forwardRef((e,t)=>{const{children:n,onSubmit:r,formArray:a,formGroup:s,formMeta:l,...c}=e,p=s||a;function f(m){m.preventDefault(),p&&p.markAsDirty(),l&&(l.markAsDirty(),l.markAsBlurred(),l.markAsSubmitted()),r&&r(m)}return o.createElement("form",{ref:t,onSubmit:f,...c},n)});Object.assign(ro,{props:jp,displayName:"SpsForm"});const qp={},_E={ideal:{label:"Ideal",examples:{ideal:{react:v.code`
|
|
521
|
+
`)}}],UT=[function(t){var n=t.props;n.renderClone||(process.env.NODE_ENV!=="production"?K(!1,"Must provide a clone render function (renderClone) for virtual lists"):K())},function(t){var n=t.getPlaceholderRef;n()&&(process.env.NODE_ENV!=="production"?K(!1,"Expected virtual list to not have a placeholder"):K())}];function zT(e){to(function(){ni(e,GT),e.props.mode==="standard"&&ni(e,YT),e.props.mode==="virtual"&&ni(e,UT)})}var jT=function(e){wc(t,e);function t(){for(var r,a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];return r=e.call.apply(e,[this].concat(s))||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(a,s){return a.shouldAnimate?a.on?{isVisible:!0,data:a.on,animate:"open"}:s.isVisible?{isVisible:!0,data:s.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:!!a.on,data:a.on,animate:"none"}};var n=t.prototype;return n.render=function(){if(!this.state.isVisible)return null;var a={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(a)},t}(x.PureComponent),$p={dragging:5e3,dropAnimating:4500},qT=function(t,n){return n?Jr.drop(n.duration):t?Jr.snap:Jr.fluid},JT=function(t,n){return t?n?qr.opacity.drop:qr.opacity.combining:null},ZT=function(t){return t.forceShouldAnimate!=null?t.forceShouldAnimate:t.mode==="SNAP"};function XT(e){var t=e.dimension,n=t.client,r=e.offset,a=e.combineWith,s=e.dropping,l=!!a,c=ZT(e),p=!!s,f=p?Rs.drop(r,l):Rs.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:qT(c,s),transform:f,opacity:JT(l,p),zIndex:p?$p.dropAnimating:$p.dragging,pointerEvents:"none"};return m}function QT(e){return{transform:Rs.moveTo(e.offset),transition:e.shouldAnimateDisplacement?null:"none"}}function eE(e){return e.type==="DRAGGING"?XT(e):QT(e)}function tE(e,t,n){n===void 0&&(n=st);var r=window.getComputedStyle(t),a=t.getBoundingClientRect(),s=pd(a,r),l=Ro(s,n),c={client:s,tagName:t.tagName.toLowerCase(),display:r.display},p={x:s.marginBox.width,y:s.marginBox.height},f={descriptor:e,placeholder:c,displaceBy:p,client:s,page:l};return f}function nE(e){var t=Ys("draggable"),n=e.descriptor,r=e.registry,a=e.getDraggableRef,s=e.canDragInteractiveElements,l=e.shouldRespectForcePress,c=e.isEnabled,p=Me(function(){return{canDragInteractiveElements:s,shouldRespectForcePress:l,isEnabled:c}},[s,c,l]),f=ge(function(S){var y=a();return y||(process.env.NODE_ENV!=="production"?K(!1,"Cannot get dimension when no ref is set"):K()),tE(n,y,S)},[n,a]),m=Me(function(){return{uniqueId:t,descriptor:n,options:p,getDimension:f}},[n,f,p,t]),u=x.useRef(m),h=x.useRef(!0);kt(function(){return r.draggable.register(u.current),function(){return r.draggable.unregister(u.current)}},[r.draggable]),kt(function(){if(h.current){h.current=!1;return}var S=u.current;u.current=m,r.draggable.update(m,S)},[m,r.draggable])}function rE(e,t,n){to(function(){function r(s){return"Draggable[id: "+s+"]: "}var a=e.draggableId;a||(process.env.NODE_ENV!=="production"?K(!1,"Draggable requires a draggableId"):K(!1)),typeof a!="string"&&(process.env.NODE_ENV!=="production"?K(!1,`Draggable requires a [string] draggableId.
|
|
522
|
+
Provided: [type: `+typeof a+"] (value: "+a+")"):K(!1)),ab(e.index)||(process.env.NODE_ENV!=="production"?K(!1,r(a)+" requires an integer index prop"):K(!1)),e.mapped.type!=="DRAGGING"&&(Vp(n()),e.isEnabled&&(bp(t,a)||(process.env.NODE_ENV!=="production"?K(!1,r(a)+" Unable to find drag handle"):K(!1))))})}function oE(e){zs(function(){var t=x.useRef(e);to(function(){e!==t.current&&(process.env.NODE_ENV!=="production"?K(!1,"Draggable isClone prop value changed during component life"):K(!1))},[e])})}function aE(e){e.preventDefault()}function sE(e){var t=x.useRef(null),n=ge(function(R){t.current=R},[]),r=ge(function(){return t.current},[]),a=jo(Go),s=a.contextId,l=a.dragHandleUsageInstructionsId,c=a.registry,p=jo(ei),f=p.type,m=p.droppableId,u=Me(function(){return{id:e.draggableId,index:e.index,type:f,droppableId:m}},[e.draggableId,e.index,f,m]),h=e.children,S=e.draggableId,y=e.isEnabled,C=e.shouldRespectForcePress,T=e.canDragInteractiveElements,w=e.isClone,D=e.mapped,M=e.dropAnimationFinished;if(rE(e,s,r),oE(w),!w){var I=Me(function(){return{descriptor:u,registry:c,getDraggableRef:r,canDragInteractiveElements:T,shouldRespectForcePress:C,isEnabled:y}},[u,c,r,T,C,y]);nE(I)}var k=Me(function(){return y?{tabIndex:0,role:"button","aria-describedby":l,"data-rbd-drag-handle-draggable-id":S,"data-rbd-drag-handle-context-id":s,draggable:!1,onDragStart:aE}:null},[s,l,S,y]),A=ge(function(R){D.type==="DRAGGING"&&D.dropping&&R.propertyName==="transform"&&M()},[M,D]),G=Me(function(){var R=eE(D),O=D.type==="DRAGGING"&&D.dropping?A:null,P={innerRef:n,draggableProps:{"data-rbd-draggable-context-id":s,"data-rbd-draggable-id":S,style:R,onTransitionEnd:O},dragHandleProps:k};return P},[s,k,S,D,A,n]),E=Me(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(G,D.snapshot,E)}var Kp=function(e,t){return e===t},Hp=function(e){var t=e.combine,n=e.destination;return n?n.droppableId:t?t.droppableId:null},iE=function(t){return t.combine?t.combine.draggableId:null},lE=function(t){return t.at&&t.at.type==="COMBINE"?t.at.combine.draggableId:null};function cE(){var e=at(function(a,s){return{x:a,y:s}}),t=at(function(a,s,l,c,p){return{isDragging:!0,isClone:s,isDropAnimating:!!p,dropAnimation:p,mode:a,draggingOver:l,combineWith:c,combineTargetFor:null}}),n=at(function(a,s,l,c,p,f,m){return{mapped:{type:"DRAGGING",dropping:null,draggingOver:p,combineWith:f,mode:s,offset:a,dimension:l,forceShouldAnimate:m,snapshot:t(s,c,p,f,null)}}}),r=function(s,l){if(s.isDragging){if(s.critical.draggable.id!==l.draggableId)return null;var c=s.current.client.offset,p=s.dimensions.draggables[l.draggableId],f=Nt(s.impact),m=lE(s.impact),u=s.forceShouldAnimate;return n(e(c.x,c.y),s.movementMode,p,l.isClone,f,m,u)}if(s.phase==="DROP_ANIMATING"){var h=s.completed;if(h.result.draggableId!==l.draggableId)return null;var S=l.isClone,y=s.dimensions.draggables[l.draggableId],C=h.result,T=C.mode,w=Hp(C),D=iE(C),M=s.dropDuration,I={duration:M,curve:Ls.drop,moveTo:s.newHomeClientOffset,opacity:D?qr.opacity.drop:null,scale:D?qr.scale.drop:null};return{mapped:{type:"DRAGGING",offset:s.newHomeClientOffset,dimension:y,dropping:I,draggingOver:w,combineWith:D,mode:T,forceShouldAnimate:null,snapshot:t(T,S,w,D,I)}}}return null};return r}function Wp(e){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:e,combineWith:null}}var dE={mapped:{type:"SECONDARY",offset:st,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:Wp(null)}};function pE(){var e=at(function(l,c){return{x:l,y:c}}),t=at(Wp),n=at(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=!!(m.inVirtualList&&m.effected[c]),S=Vo(f),y=S&&S.draggableId===c?p:null;if(!u){if(!h)return r(y);if(f.displaced.invisible[c])return null;var C=ur(m.displacedBy.point),T=e(C.x,C.y);return n(T,y,!0)}if(h)return r(y);var w=f.displacedBy.point,D=e(w.x,w.y);return n(D,y,u.shouldAnimate)},s=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 s}var uE=function(){var t=cE(),n=pE(),r=function(s,l){return t(s,l)||n(s,l)||dE};return r},mE={dropAnimationFinished:Zd},fE=id(uE,mE,null,{context:Gs,pure:!0,areStatePropsEqual:Kp})(sE);function Gp(e){var t=jo(ei),n=t.isUsingCloneFor;return n===e.draggableId&&!e.isClone?null:x.createElement(fE,e)}function Yp(e){var t=typeof e.isDragDisabled=="boolean"?!e.isDragDisabled:!0,n=!!e.disableInteractiveElementBlocking,r=!!e.shouldRespectForcePress;return x.createElement(Gp,be({},e,{isClone:!1,isEnabled:t,canDragInteractiveElements:n,shouldRespectForcePress:r}))}function hE(e){var t=x.useContext(Go);t||(process.env.NODE_ENV!=="production"?K(!1,"Could not find app context"):K());var n=t.contextId,r=t.isMovementAllowed,a=x.useRef(null),s=x.useRef(null),l=e.children,c=e.droppableId,p=e.type,f=e.mode,m=e.direction,u=e.ignoreContainerClipping,h=e.isDropDisabled,S=e.isCombineEnabled,y=e.snapshot,C=e.useClone,T=e.updateViewportMaxScroll,w=e.getContainerForClone,D=ge(function(){return a.current},[]),M=ge(function(z){a.current=z},[]),I=ge(function(){return s.current},[]),k=ge(function(z){s.current=z},[]);zT({props:e,getDroppableRef:D,getPlaceholderRef:I});var A=ge(function(){r()&&T({maxScroll:op()})},[r,T]);VT({droppableId:c,type:p,mode:f,direction:m,isDropDisabled:h,isCombineEnabled:S,ignoreContainerClipping:u,getDroppableRef:D});var G=x.createElement(jT,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder},function(z){var L=z.onClose,re=z.data,B=z.animate;return x.createElement(WT,{placeholder:re,onClose:L,innerRef:k,animate:B,contextId:n,onTransitionEnd:A})}),E=Me(function(){return{innerRef:M,placeholder:G,droppableProps:{"data-rbd-droppable-id":c,"data-rbd-droppable-context-id":n}}},[n,c,G,M]),R=C?C.dragging.draggableId:null,O=Me(function(){return{droppableId:c,type:p,isUsingCloneFor:R}},[c,R,p]);function P(){if(!C)return null;var z=C.dragging,L=C.render,re=x.createElement(Gp,{draggableId:z.draggableId,index:z.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},function(B,Z){return L(B,Z,z)});return vo.createPortal(re,w())}return x.createElement(ei.Provider,{value:O},l(E,y),P())}var ri=function(t,n){return t===n.droppable.type},Up=function(t,n){return n.draggables[t.draggable.id]},SE=function(){var t={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},n=be({},t,{shouldAnimatePlaceholder:!1}),r=at(function(l){return{draggableId:l.id,type:l.type,source:{index:l.index,droppableId:l.droppableId}}}),a=at(function(l,c,p,f,m,u){var h=m.descriptor.id,S=m.descriptor.droppableId===l;if(S){var y=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:y}}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}}),s=function(c,p){var f=p.droppableId,m=p.type,u=!p.isDropDisabled,h=p.renderClone;if(c.isDragging){var S=c.critical;if(!ri(m,S))return n;var y=Up(S,c.dimensions),C=Nt(c.impact)===f;return a(f,u,C,C,y,h)}if(c.phase==="DROP_ANIMATING"){var T=c.completed;if(!ri(m,T.critical))return n;var w=Up(T.critical,c.dimensions);return a(f,u,Hp(T.result)===f,Nt(T.impact)===f,w,h)}if(c.phase==="IDLE"&&c.completed&&!c.shouldFlush){var D=c.completed;if(!ri(m,D.critical))return n;var M=Nt(D.impact)===f,I=!!(D.impact.at&&D.impact.at.type==="COMBINE"),k=D.critical.droppable.id===f;return M?I?t:n:k?t:n}return n};return s},gE={updateViewportMaxScroll:fv};function bE(){return document.body||(process.env.NODE_ENV!=="production"?K(!1,"document.body is not ready"):K()),document.body}var vE={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:bE},oi=id(SE,gE,null,{context:Gs,pure:!0,areStatePropsEqual:Kp})(hE);oi.defaultProps=vE;const yE={disabled:"boolean",href:"string",icon:"SpsIcon",kind:"ButtonKind",spinning:"boolean",spinningTitle:"string",type:"ButtonType"};function je(e){const{children:t,className:n,href:r,icon:a,kind:s=Y.ButtonKind.DEFAULT,spinning:l,spinningTitle:c,type:p=Y.ButtonType.BUTTON,unsafelyReplaceClassName:f,...m}=e;let{disabled:u}=e;l&&(u=!0);const{t:h}=Be.useWoodlandLanguage(),S=U(f||"sps-button",`sps-button--${s}`,u&&"sps-button--disabled",l&&"sps-button--spinning",n),y=a&&o.createElement("i",{className:U("sps-icon",`sps-icon-${a}`),"aria-hidden":"true"}),C=l&&o.createElement("div",{className:"sps-spinner"},c||h("button.spinningTitle"));return o.createElement("div",{className:S},r?o.createElement("a",{...m,href:r,className:"sps-button__clickable-element"},y,t,C):o.createElement("button",{...m,type:p,className:"sps-button__clickable-element",disabled:u},y,t,C))}Object.assign(je,{props:yE,displayName:"SpsButton"});const TE={content:"ReactNodeLike",icon:"SpsIcon",title:"string"};function zp(e){const{content:t,className:n,icon:r,title:a,"data-testid":s,unsafelyReplaceClassName:l,...c}=e,p=U(l||"sps-card__header",n);return o.createElement("div",{className:p,title:a,...c},o.createElement("div",{className:"sps-card__title"}," ",r&&o.createElement("i",{"aria-hidden":"true",className:`sps-icon sps-icon-${r}`})," ",a),o.createElement("div",{className:"sps-card__header-content"},t))}Object.assign(zp,{props:TE,displayName:"SpsCardHeader"});const EE={icon:"SpsIcon",kind:"TagKind"};function Ht(e){const{children:t,className:n,icon:r,kind:a=Y.TagKind.DEFAULT,"data-testid":s,unsafelyReplaceClassName:l,...c}=e,p=o.Children.toArray(t).filter(m=>typeof m=="string").join(""),f=U(l||"sps-tag",`sps-tag--${a}`,n);return o.createElement("span",{className:f,"data-testid":`${s}__tag`,title:p,...c},r&&o.createElement("i",{"aria-hidden":"true",className:`sps-icon sps-icon-${r}`,"data-testid":`${s}__icon`}),t)}Object.assign(Ht,{props:EE,displayName:"SpsTag"});const wE={activateTab:"Function",active:"boolean",icon:"SpsIcon",label:"string",index:"number",tag:"string",tagKind:"TagKind",tagIcon:"SpsIcon"};function ai(e){const{activateTab:t,active:n,children:r,className:a,label:s,icon:l,id:c,index:p=0,tag:f,tagKind:m,tagIcon:u,"data-testid":h,unsafelyReplaceClassName:S,...y}=e,C=()=>{t&&t(this,p,r)},T=D=>{(D.key==="Enter"||D.key===" "||D.key==="Spacebar")&&(D.preventDefault(),D.stopPropagation(),t&&t(this,p,r))},w=U(S||"sps-nav__item","sps-nav__link",n&&"active",a);return o.createElement("a",{className:w,onClick:C,"data-toggle":"tab",id:c,role:"tab","aria-controls":c,...y,tabIndex:0,onKeyDown:T},l&&o.createElement("i",{className:`sps-icon sps-icon-${l}`}),o.createElement("span",null,s),f&&o.createElement(Ht,{kind:m||Y.TagKind.KEY,icon:u},f))}Object.assign(ai,{props:wE,displayName:"SpsCardTabbedPane"});function CE(e,t,n){const[r,a]=o.useState({index:0,content:null}),s=o.useCallback((l,c,p)=>{a({index:c,content:p})},[]);return o.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=o.Children.toArray(e);n&&t?c(p,t):n&&l(p)},[t,e]),[r,s]}const DE={activeTab:"string",footer:"ReactNodeOrRenderFn",headerContent:"ReactNodeOrRenderFn",headerIcon:"SpsIcon",headerTitle:"string"};function si(e){o.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:s,headerIcon:l,headerTitle:c,"data-testid":p,unsafelyReplaceClassName:f,...m}=e,u=o.Children.toArray(n).some(C=>o.isValidElement(C)&&C.type===ai),[h,S]=CE(n,t,u),y=U(f||"sps-card",r);return o.createElement("div",{...m,className:y,"data-testid":`${p}__card`},(c||s)&&o.createElement(zp,{title:c,content:Tt(s),icon:l,"data-testid":`${p}__header`}),u===!0?o.createElement(o.Fragment,null,o.createElement("nav",{className:"sps-nav sps-nav--tabs",role:"tablist","data-testid":`${p}__tabs`},o.Children.map(n,(C,T)=>{if(o.isValidElement(C))return o.cloneElement(C,{active:T===h.index,index:T,activateTab:S,"data-testid":`${p}__tab`})})),o.createElement("div",{className:"sps-card__body","data-testid":`${p}__body--tab-active`},h.content)):o.createElement("div",{className:"sps-card__body","data-testid":`${p}__body`},n),a&&o.createElement("div",{className:"sps-card__footer","data-testid":`${p}__footer`},Tt(a)))}Object.assign(si,{props:DE,displayName:"SpsCard"});function ii(e,t){const[n,...r]=v.crumblePath(t);return r.length?e.members[n].get(r):e.members[n]}function NE(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(Eo.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,s]of r.members.entries())n&&a<n.length?s.reset(n[a]):s.reset();return r.update(),this},get(n){return ii(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 kE(e,t={}){return{validators:[],id:ht(),...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(Eo.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 xE(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 ii(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 IE(e,t){t&&e.setInitValue(t);const[n,r]=x.useState(),[a,s]=x.useState([]),[l,c]=x.useReducer(p=>{for(const f of a)for(const m of v.traversePath(p,f))m.validators&&m.validators.length&&(m.errors=wo(m.getValue(),m.validators),m.invalid=!!m.errors&&!m.pristine);return r(void 0),s([]),{...p}},e);return v.forEachNestedObject(l,(p,f)=>{f._type&&(f.update=function(){return a.push(p),s(a),n||r(window.setTimeout(c,0)),this})}),l}function ME(e,t=null){const[n,r]=x.useState(t),a=x.useRef(()=>null);return x.useEffect(()=>{const s=()=>n;if(e.validators){const l=e.validators.indexOf(a.current);l===-1?e.validators.push(s):e.validators[l]=s,e.update(),a.current=s}},[n]),[n,r]}const jp={formMeta:"SpsFormSetMeta<any>",onSubmit:"React.FormEventHandler"},ro=o.forwardRef((e,t)=>{const{children:n,onSubmit:r,formArray:a,formGroup:s,formMeta:l,...c}=e,p=s||a;function f(m){m.preventDefault(),p&&p.markAsDirty(),l&&(l.markAsDirty(),l.markAsBlurred(),l.markAsSubmitted()),r&&r(m)}return o.createElement("form",{ref:t,onSubmit:f,...c},n)});Object.assign(ro,{props:jp,displayName:"SpsForm"});const qp={},_E={ideal:{label:"Ideal",examples:{ideal:{react:v.code`
|
|
523
523
|
import {
|
|
524
524
|
SpsForm,
|
|
525
525
|
SpsLabel,
|
|
@@ -671,7 +671,7 @@ Valid keys: `+JSON.stringify(Object.keys($),null," "));var se=Q(X,ce,J,V,W+"."+
|
|
|
671
671
|
</>
|
|
672
672
|
)
|
|
673
673
|
}
|
|
674
|
-
`}}}},LE={index:"number",key:"string",columnId:"string",name:"string",value:"string",onDelete:"(columnValue: string) => void",mandatory:"boolean"};function Jo(e){const{index:t,key:n,columnId:r,name:a,value:s,onDelete:l,mandatory:c,ref:p,...f}=e,{t:m}
|
|
674
|
+
`}}}},LE={index:"number",key:"string",columnId:"string",name:"string",value:"string",onDelete:"(columnValue: string) => void",mandatory:"boolean"};function Jo(e){const{index:t,key:n,columnId:r,name:a,value:s,onDelete:l,mandatory:c,ref:p,...f}=e,{t:m}=Be.useWoodlandLanguage();return o.createElement(Yp,{key:r,draggableId:r||"",index:t||0,...f},u=>o.createElement("div",{ref:u.innerRef,...u.draggableProps,...u.dragHandleProps,className:"sps-content-row"},o.createElement("div",{className:"sps-content-row__col-group","data-col-value":s},o.createElement("div",{className:"sps-content-row__col sps-column-chooser__grab-col"},o.createElement("i",{className:"sps-column-chooser__drag-handle"})),o.createElement("div",{className:"sps-content-row__col--borderless"},o.createElement("div",{className:"sps-body-12"},a)),o.createElement("div",{className:"sps-content-row__col sps-column-chooser__delete-col"},!c&&o.createElement(je,{"aria-label":m("columnChooser.removeButton",{elementName:a,defaultValue:`Remove ${a}`}),kind:Y.ButtonKind.ICON,icon:Y.SpsIcon.X,onClick:()=>{l&&l(s||"")}})))))}Object.assign(Jo,{props:LE,displayName:"SpsColumnChooserColumn"});const OE={maxSelectedColumns:"number | null",unselectedColumns:"ColumnProps[]",selectedColumns:"ColumnProps[]",onApplyChanges:"(selectedColumns: ColumnProps[]) => void"};function li(e){const{unselectedColumns:t=[],selectedColumns:n=[],maxSelectedColumns:r=8,onApplyChanges:a,maxVisibleUnselectedColumns:s,updateInitialState:l,className:c,unsafelyReplaceClassName:p,...f}=e,[m,u]=Zt({isVisible:!1,unselectedColumns:[...t.map(E=>({...E,label:E.name,columnId:ht()}))],selectedColumns:[...n.map(E=>({...E,columnId:ht()}))],searchSelectedColumn:null,pendingUnselectedColumns:[...t.map(E=>({...E,label:E.name,columnId:ht()}))],pendingSelectedColumns:[...n.map(E=>({...E,columnId:ht()}))]}),{t:h}=Be.useWoodlandLanguage(),S={searchSelectedColumn:""},y=U(m.isVisible&&"sps-button--open",c),{formMeta:C,formValue:T,updateForm:w}=lc(S);function D(E){if(E.target.value){const R=[...m.pendingSelectedColumns],O=[];m.pendingUnselectedColumns.forEach(P=>{E.target.value===P.name?(w(S),R.push({columnId:ht(),name:P.name,value:P.value})):O.push(P)}),u({pendingSelectedColumns:R,pendingUnselectedColumns:O})}}function M(E){const R=[],O=[...m.pendingUnselectedColumns];m.pendingSelectedColumns.forEach(P=>{E===P.value?O.push({columnId:ht(),name:P.name,value:P.value}):R.push(P)}),u({pendingSelectedColumns:R,pendingUnselectedColumns:O})}function I(E){if(!E.destination)return;const R=[...m.pendingSelectedColumns],[O]=R.splice(E.source.index,1);R.splice(E.destination.index,0,O),u({pendingSelectedColumns:R})}function k(){const E=m.pendingSelectedColumns.map(R=>{const O={...R};return O.columnId&&delete O.columnId,O});w(S),u({isVisible:!1,selectedColumns:[...m.pendingSelectedColumns],unselectedColumns:[...m.pendingUnselectedColumns]}),a&&a(E)}function A(){u({isVisible:!m.isVisible}),m.isVisible&&u({pendingSelectedColumns:[...m.selectedColumns],pendingUnselectedColumns:[...m.unselectedColumns]})}const G=o.useCallback(E=>{const R=new RegExp(E??"","i");return s?m.pendingUnselectedColumns.filter(O=>R.test(O.name)).map(O=>O.name).slice(0,s):m.pendingUnselectedColumns.map(O=>O.name)},[m.pendingUnselectedColumns,s]);return o.useEffect(()=>{l&&u({unselectedColumns:[...t.map(E=>({...E,label:E.name,columnId:ht()}))],pendingUnselectedColumns:[...t.map(E=>({...E,label:E.name,columnId:ht()}))]})},[t]),o.useEffect(()=>{l&&u({selectedColumns:[...n.map(E=>({...E,columnId:ht()}))],pendingSelectedColumns:[...n.map(E=>({...E,columnId:ht()}))]})},[n]),o.createElement("div",{className:"sps-column-chooser z-stratum-dropdown",...f},o.createElement(je,{className:y,"aria-label":`${m.isVisible?"Close":"Open"} Column Chooser`,kind:Y.ButtonKind.ICON,icon:Y.SpsIcon.TABLE,onClick:A,"data-testid":"button"}),m.isVisible&&o.createElement(si,{"data-testid":"open",footer:()=>o.createElement(je,{"aria-label":"Apply Changes",kind:Y.ButtonKind.LINK,onClick:k},h("columnChooser.applyChanges",{defaultValue:"Apply Changes"}))},o.createElement("div",{className:"sps-column-chooser__search-container"},o.createElement(Xt,{suggestions:G,disabled:!!(r&&m.pendingSelectedColumns.length>=r),value:T.searchSelectedColumn?T.searchSelectedColumn:"",formMeta:C.fields.searchSelectedColumn,onChange:D,placeholder:h("columnChooser.findColumnsToAdd",{defaultValue:"Find Columns to Add"}),"data-testid":"autocomplete",disableOptionsMemoization:!0})),o.createElement("div",{className:"sps-column-chooser__selected-title"},h("columnChooser.selected",{defaultValue:"Selected"})),o.createElement(Op,{onDragEnd:I},o.createElement(oi,{droppableId:"column-chooser"},E=>o.createElement("div",{...E.droppableProps,ref:E.innerRef},m.pendingSelectedColumns.map((R,O)=>o.createElement(Jo,{index:O,key:R.columnId,columnId:R.columnId,name:R.name,value:R.value,onDelete:M,mandatory:R.mandatory})),E.placeholder)))))}Object.assign(li,{props:OE,displayName:"SpsColumnChooser"});const Jp={basic:{label:"Basic",description:"Column chooser component",examples:{basic:{react:v.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($),null," "));var se=Q(X,ce,J,V,W+"."+
|
|
|
690
690
|
/>
|
|
691
691
|
);
|
|
692
692
|
}
|
|
693
|
-
`}}}},RE={icon:{type:"SpsIcon",required:!0},size:"SpsIconSize"};function Wt(e){const{className:t,"data-testid":n,icon:r,size:a=Y.SpsIconSize.MEDIUM,unsafelyReplaceClassName:s,...l}=e,c=U(s||"sps-icon",`sps-icon-${r}`,`sps-icon--${a}`,e.onClick&&"interactive-icon",t);return o.createElement("i",{className:c,"aria-hidden":"true","data-testid":n,...l})}Object.assign(Wt,{props:RE,displayName:"SpsI"});const BE={borderless:"boolean",lean:"boolean",leaner:{type:"boolean",deprecated:!0},widthPx:"number",widthRem:"number"};function Gn(e){const{borderless:t,children:n,className:r,lean:a,leaner:s,style:l,unsafelyReplaceClassName:c,widthPx:p,widthRem:f,...m}=e;o.useEffect(()=>{s&&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(" "))},[s]);const u=U(c||"sps-content-row__col",t&&"sps-content-row__col--borderless",(a||s)&&"sps-content-row__col--lean",r),h=p?p/16:f,S=h?{...l,width:`${h}rem`}:l;return o.createElement("div",{...m,className:u,style:S},n)}Object.assign(Gn,{props:BE,displayName:"SpsContentRowCol"});const PE={};function Zo(e){const{children:t,className:n,"data-testid":r,unsafelyReplaceClassName:a,...s}=e,l=U(a||"sps-content-row__expansion",n);return o.createElement("div",{className:l,...s,"data-testid":`${r}__expansion`},t)}Object.assign(Zo,{props:PE,displayName:"SpsContentRowExpansion"});const AE={alternateLayout:"boolean",initiallyExpanded:"boolean",cardSpacing:"boolean",expanded:"boolean",onBeforeCollapsed:"() => boolean",onBeforeExpanded:"() => boolean",onSelectionChange:"ChangeEventHandler",onCollapsed:"() => void",onExpanded:"() => void",selectable:"boolean",selected:"boolean"};function ci(e){const{alternateLayout:t=!1,children:n,className:r,expanded:a,onBeforeCollapsed:s,onBeforeExpanded:l,onSelectionChange:c,onCollapsed:p,onExpanded:f,initiallyExpanded:m=!1,cardSpacing:u=!1,selectable:h=!1,selected:S,"data-testid":y,unsafelyReplaceClassName:
|
|
693
|
+
`}}}},RE={icon:{type:"SpsIcon",required:!0},size:"SpsIconSize"};function Wt(e){const{className:t,"data-testid":n,icon:r,size:a=Y.SpsIconSize.MEDIUM,unsafelyReplaceClassName:s,...l}=e,c=U(s||"sps-icon",`sps-icon-${r}`,`sps-icon--${a}`,e.onClick&&"interactive-icon",t);return o.createElement("i",{className:c,"aria-hidden":"true","data-testid":n,...l})}Object.assign(Wt,{props:RE,displayName:"SpsI"});const BE={borderless:"boolean",lean:"boolean",leaner:{type:"boolean",deprecated:!0},widthPx:"number",widthRem:"number"};function Gn(e){const{borderless:t,children:n,className:r,lean:a,leaner:s,style:l,unsafelyReplaceClassName:c,widthPx:p,widthRem:f,...m}=e;o.useEffect(()=>{s&&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(" "))},[s]);const u=U(c||"sps-content-row__col",t&&"sps-content-row__col--borderless",(a||s)&&"sps-content-row__col--lean",r),h=p?p/16:f,S=h?{...l,width:`${h}rem`}:l;return o.createElement("div",{...m,className:u,style:S},n)}Object.assign(Gn,{props:BE,displayName:"SpsContentRowCol"});const PE={};function Zo(e){const{children:t,className:n,"data-testid":r,unsafelyReplaceClassName:a,...s}=e,l=U(a||"sps-content-row__expansion",n);return o.createElement("div",{className:l,...s,"data-testid":`${r}__expansion`},t)}Object.assign(Zo,{props:PE,displayName:"SpsContentRowExpansion"});const AE={alternateLayout:"boolean",initiallyExpanded:"boolean",cardSpacing:"boolean",expanded:"boolean",onBeforeCollapsed:"() => boolean",onBeforeExpanded:"() => boolean",onSelectionChange:"ChangeEventHandler",onCollapsed:"() => void",onExpanded:"() => void",selectable:"boolean",selected:"boolean"};function ci(e){const{alternateLayout:t=!1,children:n,className:r,expanded:a,onBeforeCollapsed:s,onBeforeExpanded:l,onSelectionChange:c,onCollapsed:p,onExpanded:f,initiallyExpanded:m=!1,cardSpacing:u=!1,selectable:h=!1,selected:S,"data-testid":y,unsafelyReplaceClassName:C,...T}=e,{t:w}=Be.useWoodlandLanguage(),[D,M]=o.useState(m),I=typeof a=="boolean"?a:D;function k(P){P.stopPropagation(),I&&(!s||s())?(M(!1),p&&p()):!I&&(!l||l())&&(M(!0),f&&f())}const A=()=>o.createElement(Fn,{checked:S,onChange:c}),G=()=>o.createElement("button",{type:"button",className:"sps-content-row__expand-btn",onClick:k,"aria-label":w(`contentRow.${I?"collapse":"expand"}`,{defaultValue:`${I?"Collapse":"Expand"}`})},o.createElement(Wt,{icon:I?Y.SpsIcon.MINUS_CIRCLE:Y.SpsIcon.PLUS_CIRCLE})),E=U(C||"sps-content-row",I&&"sps-content-row--expanded",u&&"sps-content-row--card-spaced",S&&"sps-content-row--selected",t&&"sps-content-row--alternate-layout",r),[R,[O]]=_t(n,[{type:Gn},{type:Zo}]);return o.createElement("div",{className:E,"data-testid":y,...T},o.createElement("div",{className:"sps-content-row__col-group","data-testid":`${y}__children`},h&&!t&&o.createElement(Gn,{widthPx:46},o.createElement(A,null)),O&&!t&&o.createElement(Gn,{widthPx:44},o.createElement(G,null)),O&&h&&t&&o.createElement(Gn,{widthPx:46},o.createElement("section",null,o.createElement(A,null)),o.createElement("section",null,o.createElement(G,null))),R),O)}Object.assign(ci,{props:AE,displayName:"SpsContentRow"});const Zp={basic:{label:"Content rows",examples:{basic:{react:v.code`
|
|
694
694
|
import {
|
|
695
695
|
SpsContentRow,
|
|
696
696
|
SpsContentRowCol,
|
|
@@ -1158,7 +1158,7 @@ Valid keys: `+JSON.stringify(Object.keys($),null," "));var se=Q(X,ce,J,V,W+"."+
|
|
|
1158
1158
|
</>
|
|
1159
1159
|
)
|
|
1160
1160
|
}
|
|
1161
|
-
`}}}},FE=ar.default||ar;function VE(){return new Array(7).fill(null)}function Xp(e){const t=FE({year:e.year,month:e.month-1,date:1}),n=t.weekday(),r=t.daysInMonth(),a=Math.ceil((r+n)/7),s=a*7,l=new Array(a).fill(!0).map(VE);t.subtract(n,"days");for(let c=0;c<s;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 Qp(e){const[t,n]=o.useState(()=>Xp(e));return o.useEffect(()=>{n(Xp(e))},[e]),t}function eu(e){const[t,n]=o.useState(()=>ne.toMoment(e));return o.useEffect(()=>n(ne.toMoment(e)),[e]),t}const tu=ar.default||ar,bt="sps-datepicker__calendar";function oo({maxDate:e,selectedDate:t,selectedRange:n}){const r=n?ne.nullifyInvalidDate(n[0])||ne.nullifyInvalidDate(n[1]):null;return ne.nullifyInvalidDate(t)||r||ne.nullifyInvalidDate(e)||ne.create()}function Xo(e){const{children:t,className:n,isOpen:r,maxDate:a,minDate:s,onNewSelection:l,selectedDate:c,selectedRange:p,selectedPreset:f,showTwoMonths:m=!1,"data-testid":u,...h}=e,{t:S}
|
|
1161
|
+
`}}}},FE=ar.default||ar;function VE(){return new Array(7).fill(null)}function Xp(e){const t=FE({year:e.year,month:e.month-1,date:1}),n=t.weekday(),r=t.daysInMonth(),a=Math.ceil((r+n)/7),s=a*7,l=new Array(a).fill(!0).map(VE);t.subtract(n,"days");for(let c=0;c<s;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 Qp(e){const[t,n]=o.useState(()=>Xp(e));return o.useEffect(()=>{n(Xp(e))},[e]),t}function eu(e){const[t,n]=o.useState(()=>ne.toMoment(e));return o.useEffect(()=>n(ne.toMoment(e)),[e]),t}const tu=ar.default||ar,bt="sps-datepicker__calendar";function oo({maxDate:e,selectedDate:t,selectedRange:n}){const r=n?ne.nullifyInvalidDate(n[0])||ne.nullifyInvalidDate(n[1]):null;return ne.nullifyInvalidDate(t)||r||ne.nullifyInvalidDate(e)||ne.create()}function Xo(e){const{children:t,className:n,isOpen:r,maxDate:a,minDate:s,onNewSelection:l,selectedDate:c,selectedRange:p,selectedPreset:f,showTwoMonths:m=!1,"data-testid":u,...h}=e,{t:S}=Be.useWoodlandLanguage(),[y,C]=o.useState(()=>oo(e)),[T,w]=o.useState(ne.nextMonth({...y,date:15})),D=o.useMemo(()=>ne.create(),[]);o.useEffect(()=>{if(p&&p[0]&&p[1]&&p[0].month!==y.month&&p[0].month!==T.month&&p[1].month!==y.month&&p[1].month!==T.month){const B=oo(e);C(B),w(ne.nextMonth({month:B.month,date:15,year:B.year}))}else if(p&&p[0]&&!p[1]&&p[0].month!==y.month&&p[0].month!==T.month){const B=oo(e);C(B),w(ne.nextMonth({month:B.month,date:15,year:B.year}))}else if(p&&!p[0]&&p[1]&&p[1].month!==y.month&&p[1].month!==T.month){const B=oo(e);C(B),w(ne.nextMonth({month:B.month,date:15,year:B.year}))}else{const B=oo(e);C(B),w(ne.nextMonth({month:B.month,date:15,year:B.year}))}},[c,p,a,r]);const M=eu(y),I=Qp(y),k=eu(T),A=Qp(T),[G,E]=o.useState();function R(){C(ne.prevMonth({...y,date:15})),m&&w(ne.prevMonth({...T,date:15}))}function O(){C(ne.nextMonth({...y,date:15})),m&&w(ne.nextMonth({...T,date:15}))}function P(B){B.target&&B.target.classList.contains(`${bt}-day`)?m&&B.target.classList.contains(`${T.month}`)?E({...T,date:Number(B.target.textContent)}):E({...y,date:Number(B.target.textContent)}):(!B.target||!B.target.classList.contains(`${bt}-row`))&&E(void 0)}function z(B,Z=!1){const H=`${bt}-day`;return U(`${bt}-cell`,B&&y&&B.month===y.month&&!Z&&H,m&&B.month===T.month&&Z&&H,ne.isSameDate(D,B)&&`${H}--current-day`,(ne.isSameDate(B,c)&&ne.isInRange(B,[s,a])!==!1||p&&ne.isSameDate(B,p[0])||ne.isInRange(B,p))&&`${H}--selected`,ne.isInRange(B,[s,a])===!1&&`${H}--disabled`,p&&p[1]&&ne.isSameDate(B,p[0])&&!ne.isSameDate(B,p[1])&&`${H}--selection-start`,ne.isInRange(B,p,!1)&&`${H}--selection-middle`,p&&ne.isSameDate(B,p[1])&&!ne.isSameDate(B,p[0])&&`${H}--selection-end`,p&&p[0]&&!p[1]&&(!s&&!a||ne.isInRange(G,[s,a]))&&ne.isInRange(B,[p[0],G],!1)&&`${H}--pending-selection`,f&&f==="After"&&p&&p[0]&&p[1]===null&&(!s&&!a||ne.isInRange(B,[p[0],a]))&&ne.isInRange(B,[p[0],{month:12,date:31,year:3e3}],!1)&&`${H}--selected`,f&&f==="Before"&&p&&p[0]===null&&p[1]&&(!s&&!a||ne.isInRange(B,[s,p[1]]))&&ne.isInRange(B,[{month:1,date:1,year:1900},p[1]])&&`${H}--selected`)}function L(B){B&&y&&B.month===y.month&&ne.isInRange(B,[s,a])!==!1&&l(B),B&&m&&T&&B.month===T.month&&ne.isInRange(B,[s,a])!==!1&&l(B)}const re=U(bt,n);return y?o.createElement(o.Fragment,null,o.createElement("div",{"data-testid":`${u}`,className:re,...h,onMouseOver:P},o.createElement("div",{className:`${bt}-head`},o.createElement("button",{"data-testid":`${u}_prev_month`,type:"button",tabIndex:-1,disabled:ne.isSameMonth(y,s),title:S("datepicker.calendar.prevMonth",{defaultValue:"View Previous Month"}),className:"sps-datepicker__button sps-datepicker__button-previous-month",onClick:R},o.createElement("i",{className:"sps-icon sps-icon-chevron-left"})),o.createElement("span",{className:`${bt}-head-label`},o.createElement("span",{className:`${bt}-head-label-month`},M?M.format("MMMM"):""),o.createElement("span",{className:`${bt}-head-label-year`},y.year)),!m&&o.createElement("button",{type:"button","data-testid":`${u}_next_month`,tabIndex:-1,disabled:ne.isSameMonth(y,a),title:S("datepicker.calendar.nextMonth",{defaultValue:"View Next Month"}),className:"sps-datepicker__button sps-datepicker__button-next-month",onClick:O},o.createElement("i",{className:"sps-icon sps-icon-chevron-right"}))),o.createElement("div",{className:`${bt}-body`},o.createElement("div",{className:"sps-datepicker__calendar-row"},tu.weekdaysShort().map(B=>o.createElement("div",{key:B,className:"sps-datepicker__calendar-header-cell"},B))),I.map((B,Z)=>o.createElement("div",{key:Z,className:"sps-datepicker__calendar-row"},B.map((H,q)=>o.createElement("div",{key:q,className:z(H),onClick:()=>L(H),"data-testid":`${u}_${ne.toString(H)}`},H?H.date:"")))))),m&&o.createElement("div",{"data-testid":`${u}`,className:re,...h,onMouseOver:P},o.createElement("div",{className:`${bt}-head`},o.createElement("span",{className:`${bt}-head-label`},o.createElement("span",{className:`${bt}-head-label-month`},k?k.format("MMMM"):""),o.createElement("span",{className:`${bt}-head-label-year`},T.year)),o.createElement("button",{type:"button","data-testid":`${u}_next_month`,tabIndex:-1,disabled:ne.isSameMonth(T,a),title:S("datepicker.calendar.nextMonth",{defaultValue:"View Next Month"}),className:"sps-datepicker__button sps-datepicker__button-next-month",onClick:O},o.createElement("i",{className:"sps-icon sps-icon-chevron-right"}))),o.createElement("div",{className:`${bt}-body`},o.createElement("div",{className:"sps-datepicker__calendar-row"},tu.weekdaysShort().map(B=>o.createElement("div",{key:B,className:"sps-datepicker__calendar-header-cell"},B))),A.map((B,Z)=>o.createElement("div",{key:Z,className:"sps-datepicker__calendar-row"},B.map((H,q)=>o.createElement("div",{key:q,className:U(z(H,!0),`${T.month.toString()}`),onClick:()=>L(H),"data-testid":`${u}_${ne.toString(H)}`},H?H.date:""))))))):o.createElement(o.Fragment,null)}Object.assign(Xo,{displayName:"SpsDatepickerCalendar"});const nu="sps-datepicker__popup",Qo=o.forwardRef(({attachTo:e,children:t,className:n,isOpen:r,...a},s)=>{const l=s||o.useRef(null),c=cr("sps-datepicker-popup-portal"),p=o.useContext(Mt),[f]=r?An(l,e,Y.Position.BOTTOM_LEFT,{altPosition:za(Y.Position.BOTTOM_LEFT),...p}):[{}],m=U(nu,"z-stratum-dropdown",r&&`${nu}--open`,n);return c(o.createElement("div",{...a,className:m,ref:l,style:f},t))});Object.assign(Qo,{displayName:"SpsDatepickerPopup"});const $E={disabled:"boolean",formMeta:"SpsFormFieldMeta<SimpleDate>",maxDate:"SimpleDate",minDate:"SimpleDate",onChange:"(newDate: SimpleDate) => void",value:"SimpleDate",format:"string",showTwoMonths:"boolean",autoCloseOnSelect:"boolean"},ru="sps-datepicker";function di({children:e,className:t,disabled:n,formMeta:r,id:a,maxDate:s,minDate:l,onChange:c,value:p,format:f,showTwoMonths:m,autoCloseOnSelect:u=!0,"data-testid":h,...S}){const{wrapperId:y,controlId:C}=St(a,r),T=o.useRef(null),w=o.useRef(null),D=o.useRef(null),[M,I]=o.useState(ne.toString(p,f)),{showPopup:k,doShowPopup:A,doHidePopup:G}=dr(T,w);function E(B){r&&(r.setValue(B),r.markAsDirty()),c&&c(B)}function R(B){E(B),I(ne.toString(B,f)),D&&D.current&&D.current.focus(),u&&G()}function O(B){I(B.target.value);const Z=ne.createFrom(B.target.value,f);E(Z)}function P(){G(),I(""),E()}function z(B){switch(B.key){case"Tab":G();break;case"Backspace":B.target.selectionStart===0&&p&&!Array.isArray(p)&&P();break}}const L=U(ru,"sps-text-input",k&&`${ru}--open`,t),re=o.useRef(!1);return o.useEffect(()=>{re.current?p?ne.isValid(p)&&I(ne.toString(p,f)):P():re.current=!0},[p,f]),o.createElement(o.Fragment,null,o.createElement(nt,{id:y,className:L,formMeta:r,inputRef:D,focusInputOnClick:!0,ref:T},o.createElement("div",{className:U("sps-form-control",n&&"disabled")},o.createElement("i",{className:U("sps-text-input__icon","sps-icon","sps-icon-calendar-blank")}),o.createElement("input",{type:"text",ref:D,className:"sps-text-input__input",id:C,placeholder:(f==null?void 0:f.toUpperCase())||ir,onChange:O,onClick:A,onFocus:A,onKeyDown:z,value:M,disabled:n,"data-testid":`${h}_date_input`,...S}),p&&!n&&o.createElement("i",{className:"sps-icon sps-icon-x-circle sps-form-control__clear-btn",onClick:P}))),o.createElement(Qo,{isOpen:k,attachTo:T,ref:w},o.createElement(Xo,{"data-testid":`${h}_calendar`,selectedDate:p,onNewSelection:R,minDate:l,maxDate:s,showTwoMonths:m})))}Object.assign(di,{props:$E,displayName:"SpsDatepicker"});const ou={basic:{label:"Basic",examples:{basic:{react:v.code`
|
|
1162
1162
|
import {
|
|
1163
1163
|
useSpsForm,
|
|
1164
1164
|
SpsLabel,
|
|
@@ -1306,7 +1306,7 @@ Valid keys: `+JSON.stringify(Object.keys($),null," "));var se=Q(X,ce,J,V,W+"."+
|
|
|
1306
1306
|
</div>
|
|
1307
1307
|
);
|
|
1308
1308
|
}
|
|
1309
|
-
`}}}},KE={disabled:"boolean",formMeta:"SpsFormFieldMeta<SimpleDateRange| null | undefined>",maxDate:"SimpleDate",minDate:"SimpleDate",onChange:'(newDateRange: SimpleDateRange | null, preset?: DatePreset["definition"]) => void',presets:"Array<DatePreset>",selectedPreset:"string",onPresetChange:"(newPreset?: string) => void",value:"SimpleDateRange | DatePreset",showTwoMonths:"boolean",format:"string"},au="sps-datepicker",pi=[{definition:"P0D",label:"datepicker.preset.today"},{definition:"Before",label:"datepicker.preset.before"},{definition:"After",label:"datepicker.preset.after"},{definition:"P7D",label:"datepicker.preset.sevenDays"},{definition:"P30D",label:"datepicker.preset.thirtyDays"},{definition:"P60D",label:"datepicker.preset.sixtyDays"},{definition:"P90D",label:"datepicker.preset.ninetyDays"},{definition:"P1Y",label:"datepicker.preset.oneYear"}];function su(e,t=""){return e.find(n=>n.definition===t)}function HE(e,t){return e.length===t.length&&e.every((n,r)=>n.definition===t[r].definition&&n.label===t[r].label)}function ui({children:e,className:t,disabled:n,formMeta:r,id:a,maxDate:s,minDate:l,onChange:c,presets:p=pi,selectedPreset:f,onPresetChange:m,value:u,showTwoMonths:h=!1,format:S,"data-testid":y,...
|
|
1309
|
+
`}}}},KE={disabled:"boolean",formMeta:"SpsFormFieldMeta<SimpleDateRange| null | undefined>",maxDate:"SimpleDate",minDate:"SimpleDate",onChange:'(newDateRange: SimpleDateRange | null, preset?: DatePreset["definition"]) => void',presets:"Array<DatePreset>",selectedPreset:"string",onPresetChange:"(newPreset?: string) => void",value:"SimpleDateRange | DatePreset",showTwoMonths:"boolean",format:"string"},au="sps-datepicker",pi=[{definition:"P0D",label:"datepicker.preset.today"},{definition:"Before",label:"datepicker.preset.before"},{definition:"After",label:"datepicker.preset.after"},{definition:"P7D",label:"datepicker.preset.sevenDays"},{definition:"P30D",label:"datepicker.preset.thirtyDays"},{definition:"P60D",label:"datepicker.preset.sixtyDays"},{definition:"P90D",label:"datepicker.preset.ninetyDays"},{definition:"P1Y",label:"datepicker.preset.oneYear"}];function su(e,t=""){return e.find(n=>n.definition===t)}function HE(e,t){return e.length===t.length&&e.every((n,r)=>n.definition===t[r].definition&&n.label===t[r].label)}function ui({children:e,className:t,disabled:n,formMeta:r,id:a,maxDate:s,minDate:l,onChange:c,presets:p=pi,selectedPreset:f,onPresetChange:m,value:u,showTwoMonths:h=!1,format:S,"data-testid":y,...C}){const{t:T}=Be.useWoodlandLanguage(),{wrapperId:w,controlId:D}=St(a,r),M=o.useRef(null),I=o.useRef(null),k=o.useRef(null),[A,G]=o.useState(Array.isArray(u)?ne.toStringRange(u,S):""),[E,R]=o.useState(su(p,f)||null),[O,P]=o.useState(),{showPopup:z,doShowPopup:L,doHidePopup:re}=dr(M,k);function B(V,W){r&&(r.setValue(V),r.markAsDirty()),c==null||c(V,typeof W=="string"?W:void 0)}o.useEffect(()=>{R(su(p,f)||null)},[f]);function Z(V){return V&&/^datepicker\./.test(V.label)?T(V.label):(V==null?void 0:V.label)??""}function H(V){const W=u||[];let X,te=E;const pe=te?Z(te):"";pe==="Before"?X=[null,V]:pe==="After"?X=[V,null]:!W[0]||W[1]||ne.isBefore(V,W[0])?X=[V,null]:X=[W[0],V],(X[0]&&X[1]||pe==="Before"||pe==="After")&&(re(!0),I&&I.current&&I.current.focus()),te&&pe!=="Before"&&pe!=="After"?(R(null),m==null||m(),te=null):(te==null?void 0:te.definition)!==f&&(m==null||m(typeof(te==null?void 0:te.definition)=="string"?te.definition:Z(te))),B(X,te==null?void 0:te.definition),G(ne.toStringRange(X,S)),P(void 0)}function q(V){G(V.target.value);let W=ne.createRangeFrom(V.target.value,S),X=E;const te=X?Z(X):"";Array.isArray(W)&&(W[0]&&W[1]&&(te==="Before"||te==="After")?(R(null),X=null):te==="Before"&&W[0]!==null?W=[null,W[0]]:te==="After"&&W[0]!==null&&(W=[W[0],null])),B(W,null),P(void 0)}function ae(){R(null),P(void 0),G(""),B(),m==null||m(void 0)}function $(V){switch(V.key){case"Tab":re();break;case"Backspace":V.target.selectionStart===0&&u&&E&&ae();break}}function j(V){if(m&&(V==null?void 0:V.definition)!==f&&(typeof(V==null?void 0:V.definition)=="string"&&(V.definition==="Before"||V.definition==="After")&&(m==null||m()),m(typeof(V==null?void 0:V.definition)=="string"?V.definition:V?Z(V):"")),!V){R(null),B();return}const W=V&&Z(V);let X=ne.createRangeFromPreset(V,S);const te=ne.getRangeSeparator(S);(W==="Before"||W==="After")&&u&&u[0]&&u[1]?X=ne.createRangeFrom(te,S):W==="Before"?X=ne.createRangeFrom(`${te}${ne.toString(u&&(u[0]||u[1]),S)}`):W==="After"&&(X=ne.createRangeFrom(`${ne.toString(u&&(u[0]||u[1]),S)}${te}`));let pe=E;R(V),(JSON.stringify(u)!==JSON.stringify(X)||JSON.stringify(pe)!==JSON.stringify(V))&&B(X,typeof(V==null?void 0:V.definition)=="string"?V.definition:Z(V))}o.useEffect(()=>{if(!u||Array.isArray(u)&&!u.length){R(null);return}if(!HE(p,pi)&&Array.isArray(u)){const V=ne.toStringRange(u,S),W=p.find(X=>V===ne.toStringRange(ne.createRangeFromPreset(X,S),S));W?j(W):u[0]&&u[1]&&R(null)}},[u,S]),o.useEffect(()=>{const V=["Before","After"].includes(Z(E));!u||E&&!V?G(""):Array.isArray(u)&&((!u[0]||!u[0].hasOwnProperty(_r))&&(!u[1]||!u[1].hasOwnProperty(_r))&&G(ne.toStringRange(u,S)),E||P(void 0))},[u,E,S]);const oe=U(au,"sps-text-input",z&&`${au}--open`,t);let ie=A;const J=ne.getRangeSeparator(S);return E&&Z(E)==="Before"&&A.startsWith(J)?ie=A.substring(1):E&&Z(E)==="After"&&A.endsWith(J)&&(ie=A.substring(0,A.length-1)),o.createElement(o.Fragment,null,o.createElement(nt,{id:w,className:oe,formMeta:r,inputRef:I,focusInputOnClick:!0,ref:M},o.createElement("div",{className:U("sps-form-control",n&&"disabled")},o.createElement("i",{className:U("sps-text-input__icon","sps-icon","sps-icon-calendar")}),E&&o.createElement("div",{"data-testid":`${y}_selected_preset`,className:"sps-datepicker__selected-preset"},o.createElement("span",{className:"sps-tag sps-tag--info"},Z(E))),o.createElement("input",{type:"text",ref:I,className:"sps-text-input__input","data-testid":`${y}_date_input`,id:D,placeholder:!A&&!E?(S==null?void 0:S.toUpperCase())||ir:void 0,onChange:q,onClick:L,onFocus:L,onKeyDown:$,value:ie,disabled:n,...C}),u&&!n&&o.createElement("i",{className:"sps-icon sps-icon-x-circle sps-form-control__clear-btn",onClick:ae}))),o.createElement(Qo,{isOpen:z,attachTo:M,ref:k},o.createElement("div",{className:"sps-datepicker__presets"},o.createElement("fieldset",null,o.createElement("legend",{className:"sps-datepicker__presets-label"},T("datepicker.presetsLabel")),o.createElement("div",{className:"sps-custom-control sps-custom-radio sps-custom-control--no-error"},o.createElement("input",{"data-testid":`${y}_presets_custom_input`,type:"radio",id:`sps-date-range-picker-${w}__range-custom`,className:"sps-custom-control__input",checked:!E,name:`sps-date-range-picker-${w}__range`,onChange:()=>j()}),o.createElement("label",{className:"sps-custom-control__label",htmlFor:`sps-date-range-picker-${w}__range-custom`},T("datepicker.preset.custom",{defaultValue:"Custom"}))),p.map((V,W)=>o.createElement("div",{key:Z(V),className:"sps-custom-control sps-custom-radio sps-custom-control--no-error"},o.createElement("input",{type:"radio","data-testid":`${y}_preset_option_${V.label}`,id:`sps-date-range-picker-${w}__range-${W}`,name:`sps-date-range-picker-${w}__range`,onChange:()=>j(V),checked:E!=null&&E.definition?E.definition===V.definition:!1,className:"sps-custom-control__input"}),o.createElement("label",{className:"sps-custom-control__label",htmlFor:`sps-date-range-picker-${w}__range-${W}`},Z(V)))))),o.createElement(Xo,{"data-testid":`${y}_calendar`,selectedRange:Array.isArray(u)?u:O,onNewSelection:H,minDate:l,maxDate:s,showTwoMonths:h,selectedPreset:E&&Z(E),isOpen:z})))}Object.assign(ui,{props:KE,displayName:"SpsDateRangePicker"});const iu={basic:{label:"Basic",examples:{basic:{react:v.code`
|
|
1310
1310
|
import {
|
|
1311
1311
|
useSpsForm,
|
|
1312
1312
|
SpsLabel,
|
|
@@ -1510,7 +1510,7 @@ Valid keys: `+JSON.stringify(Object.keys($),null," "));var se=Q(X,ce,J,V,W+"."+
|
|
|
1510
1510
|
</div>
|
|
1511
1511
|
);
|
|
1512
1512
|
}
|
|
1513
|
-
`}}}},WE=ko||Ya,GE={action:"SpsActionMethod",captionKey:"string",comparisonKey:"string",conformWidth:"boolean",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",onBeforeChange:"(value: string) => boolean | Promise<boolean>"},Yn=o.forwardRef((e,t)=>{const{action:n,autoFixWidth:r=!1,captionKey:a,className:s,comparisonKey:l,conformWidth:c,disabled:p,formControl:f,formMeta:m,id:u,notClearable:h,options:S,onChange:y,onClick:
|
|
1513
|
+
`}}}},WE=ko||Ya,GE={action:"SpsActionMethod",captionKey:"string",comparisonKey:"string",conformWidth:"boolean",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",onBeforeChange:"(value: string) => boolean | Promise<boolean>"},Yn=o.forwardRef((e,t)=>{const{action:n,autoFixWidth:r=!1,captionKey:a,className:s,comparisonKey:l,conformWidth:c,disabled:p,formControl:f,formMeta:m,id:u,notClearable:h,options:S,onChange:y,onClick:C,onOpen:T,placeholder:w,searchDebounce:D,searchPlaceholder:M="Search…",tallOptionList:I,textKey:k,valueKey:A,unsafelyReplaceClassName:G,value:E,zeroState:R,loading:O,filterByTextAndCaptionKey:P,maxHeightOptionListPx:z,maxHeightOptionListRem:L,"data-testid":re,disableOptionsMemoization:B,disableDefaultOptionsFiltering:Z,onBeforeChange:H,...q}=e,ae=m||f,{wrapperId:$,controlId:j}=St(u,ae),oe=o.useRef(null),ie=o.useRef(null),J=o.useRef(null),{t:V}=Be.useWoodlandLanguage(),[W,X]=Zt({isOpen:!1,value:E,text:"",keyDown:null,opensUpward:!1,optionIds:""}),[te,pe]=o.useState();function ce(Se){X({value:Se,text:Se&&k?Se[k]:Se})}async function Q(Se){const Ue=Se&&A&&typeof Se=="object"?Se[A]:Se;H&&!await H(Ue)||(ce(Se),ae&&(ae.setValue(Ue),ae.markAsDirty()),y&&y(new bn({value:Ue})))}o.useEffect(()=>{ce(E)},[E,k]);function se(){Q(void 0)}function we(){X({isOpen:!1})}function Le(Se){Se.nativeEvent.stopImmediatePropagation(),p||X({isOpen:!W.isOpen})}function wt(Se){p||(["Up","ArrowUp","Down","ArrowDown"," ","Spacebar"].indexOf(Se.key)>-1&&Se.preventDefault(),ja.includes(Se.key)&&(pe(Se),Se.preventDefault()),Se.persist(),X({keyDown:Se}))}function lt(Se){X({isOpen:Se})}function ct(Se){X({opensUpward:Se})}function Xe(Se){Se.detail!==$&&X({isOpen:!1})}function At(Se){X({optionIds:new Array(Se).fill("").map((Ue,We)=>`${$}-options-option-${We}`).join(",")})}o.useEffect(()=>(document.addEventListener("click",we),document.addEventListener("DropdownOpened",Xe),()=>{document.removeEventListener("click",we),document.removeEventListener("DropdownOpened",Xe)}),[]),o.useLayoutEffect(()=>{if(r&&J.current&&oe.current){oe.current.style.width="";const Ue=`${oe.current.getBoundingClientRect().width+6}px`;oe.current.style.width=Ue,J.current.style.width=Ue,J.current.style.maxWidth=Ue}}),qa(()=>{if(W.isOpen){ie.current&&WE(ie.current,{scrollMode:"if-needed"}),T==null||T();const Se=document.createEvent("CustomEvent");Se.initCustomEvent("DropdownOpened",!1,!1,$),document.dispatchEvent(Se)}},[W.isOpen]),o.useImperativeHandle(t,()=>({focus:()=>{var Se;(Se=ie.current)==null||Se.focus()}})),o.useEffect(()=>{let Se;return W.isOpen&&(Se=()=>{X({isOpen:!1})},window.addEventListener("resize",Se)),()=>{Se&&window.removeEventListener("resize",Se)}},[W.isOpen]),Pr({isOpen:W.isOpen,rootRef:ie});const Qe=U(G||"sps-select",W.isOpen&&"sps-select--open",W.isOpen&&"z-stratum-dropdown",W.opensUpward&&"sps-select--opens-upward",s),Ke=W.text||w||V("select.defaultPlaceholder",{defaultValue:"Select one..."});return o.createElement(nt,{id:$,className:Qe,onKeyDown:wt,formControl:f,formMeta:m,ref:ie,role:"listbox","aria-owns":W.optionIds,"data-testid":re,onClick:C,...q},o.createElement("div",{className:U("sps-select__dropctrl",p&&"disabled"),id:j,tabIndex:0,onClick:Le,ref:J,title:Ke,"data-testid":`${re}-dropctrl`},o.createElement("div",{className:"sps-select__dropctrl-content"},o.createElement("span",{className:U("sps-select__value",!W.text&&"sps-select__value--placeholder"),"data-testid":`${re}-value`},Ke),W.value&&!h&&!p&&o.createElement("i",{className:"sps-icon sps-icon-x-circle sps-select__clear-btn",onClick:se,"data-testid":`${re}-clear-value`}),o.createElement("i",{className:"sps-icon sps-icon-chevron-down sps-select__dropctrl-icon"}))),o.createElement(Br,{id:`${$}-options`,ref:oe,attachTo:J,captionKey:a,comparisonKey:l,isOpen:W.isOpen,keyDown:W.keyDown,options:S,onOptionSelected:Q,onPositionFlip:ct,onSelfToggle:lt,searchDebounce:D,searchPlaceholder:M,selectedOption:W.value,specialAction:n,tall:I,textKey:k,filterByTextAndCaptionKey:P,optionRole:"option",valueKey:A,onOptionListChanged:At,zeroState:R,ignoreWidthStyles:r,loading:O,maxHeightPx:z,maxHeightRem:L,disableOptionsMemoization:B,disableDefaultOptionsFiltering:Z,"data-testid":`${re}-option-list`,typeaheadEvent:te,conformWidth:c}))});Object.assign(Yn,{props:GE,displayName:"SpsSelect"});const lu={general:{label:"General Usage",description:({NavigateTo:e})=>x.createElement(x.Fragment,null,x.createElement("h5",null,"Use a Select:"),x.createElement("ul",null,x.createElement("li",{className:"mb-2"},"When a list of predetermined values can be provided.")),x.createElement("h5",null,"Do Not Use a Select:"),x.createElement("ul",null,x.createElement("li",{className:"mb-2"},"When there are only two possible options. Consider"," ",x.createElement(e,{to:"checkbox"},"Checkboxes")," or"," ",x.createElement(e,{to:"radio-buttons"},"Radio Buttons")," insead."),x.createElement("li",{className:"mb-2"},"When it is ideal to display all available options without requiring a click. Consider"," ",x.createElement(e,{to:"checkbox"},"Checkboxes")," or"," ",x.createElement(e,{to:"radio-buttons"},"Radio Buttons")," insead.")),x.createElement("h5",null,"Using Selects in a Form"),x.createElement("p",null,"Reference the ",x.createElement(e,{to:"form"},"Forms")," page for guidelines for placing inputs in Form layouts"))},basic:{label:"Basic Selects",description:()=>x.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:v.code`
|
|
1514
1514
|
import { SpsLabel, SpsSelect, useSpsForm } from "@spscommerce/ds-react";
|
|
1515
1515
|
function DemoComponent() {
|
|
1516
1516
|
const colors = ["red", "blue", "green"];
|
|
@@ -1528,7 +1528,7 @@ Valid keys: `+JSON.stringify(Object.keys($),null," "));var se=Q(X,ce,J,V,W+"."+
|
|
|
1528
1528
|
</div>
|
|
1529
1529
|
)
|
|
1530
1530
|
}
|
|
1531
|
-
`},placeholderText:{description:()=>
|
|
1531
|
+
`},placeholderText:{description:()=>x.createElement(x.Fragment,null,x.createElement("h4",null,"Customizable Placeholder Text"),x.createElement("p",null,"Placeholder text can be customized to specifically reference the content in the dropdown menu.")),react:v.code`
|
|
1532
1532
|
import { SpsLabel, SpsSelect, useSpsForm } from "@spscommerce/ds-react";
|
|
1533
1533
|
function DemoComponent() {
|
|
1534
1534
|
const colors = ["red", "blue", "green"];
|
|
@@ -1550,7 +1550,7 @@ Valid keys: `+JSON.stringify(Object.keys($),null," "));var se=Q(X,ce,J,V,W+"."+
|
|
|
1550
1550
|
</div>
|
|
1551
1551
|
)
|
|
1552
1552
|
}
|
|
1553
|
-
`},defaultSelection:{description:()=>
|
|
1553
|
+
`},defaultSelection:{description:()=>x.createElement(x.Fragment,null,x.createElement("h4",null,"Default Selection / No Clear Button"),x.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:v.code`
|
|
1554
1554
|
import { SpsLabel, SpsSelect, useSpsForm } from "@spscommerce/ds-react";
|
|
1555
1555
|
function DemoComponent() {
|
|
1556
1556
|
const colors = ["Small", "Medium", "Large"];
|
|
@@ -1572,7 +1572,7 @@ Valid keys: `+JSON.stringify(Object.keys($),null," "));var se=Q(X,ce,J,V,W+"."+
|
|
|
1572
1572
|
</div>
|
|
1573
1573
|
)
|
|
1574
1574
|
}
|
|
1575
|
-
`},zeroState:{description:()=>
|
|
1575
|
+
`},zeroState:{description:()=>x.createElement(x.Fragment,null,x.createElement("h4",null,"Zero State / No Available Options"),x.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:v.code`
|
|
1576
1576
|
import { SpsLabel, SpsSelect, useSpsForm } from "@spscommerce/ds-react";
|
|
1577
1577
|
function DemoComponent() {
|
|
1578
1578
|
const { formValue, formMeta, updateForm } = useSpsForm({
|
|
@@ -1592,7 +1592,7 @@ Valid keys: `+JSON.stringify(Object.keys($),null," "));var se=Q(X,ce,J,V,W+"."+
|
|
|
1592
1592
|
</div>
|
|
1593
1593
|
)
|
|
1594
1594
|
}
|
|
1595
|
-
`},formHooks:{description:({NavigateTo:e})=>
|
|
1595
|
+
`},formHooks:{description:({NavigateTo:e})=>x.createElement(x.Fragment,null,x.createElement("h4",null,"Form Hooks"),x.createElement("p",null,"The ",x.createElement("code",null,"formMeta")," and ",x.createElement("code",null,"formValue")," props are used with the"," ",x.createElement("code",null,"useSpsForm")," hook. By using the ",x.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 ",x.createElement(e,{to:"form"},"Forms")," page.")),react:v.code`
|
|
1596
1596
|
import { SpsLabel, SpsSelect, useSpsForm } from "@spscommerce/ds-react";
|
|
1597
1597
|
function DemoComponent() {
|
|
1598
1598
|
const colors = ["red", "blue", "green"];
|
|
@@ -1613,7 +1613,7 @@ Valid keys: `+JSON.stringify(Object.keys($),null," "));var se=Q(X,ce,J,V,W+"."+
|
|
|
1613
1613
|
</div>
|
|
1614
1614
|
)
|
|
1615
1615
|
}
|
|
1616
|
-
`}}},filter:{label:"Select with Filter",description:()=>
|
|
1616
|
+
`}}},filter:{label:"Select with Filter",description:()=>x.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:v.code`
|
|
1617
1617
|
import { SpsLabel, SpsSelect, useSpsForm } from "@spscommerce/ds-react";
|
|
1618
1618
|
function DemoComponent() {
|
|
1619
1619
|
function colorSearch(search) {
|
|
@@ -1636,7 +1636,7 @@ Valid keys: `+JSON.stringify(Object.keys($),null," "));var se=Q(X,ce,J,V,W+"."+
|
|
|
1636
1636
|
</div>
|
|
1637
1637
|
)
|
|
1638
1638
|
}
|
|
1639
|
-
`},promise:{description:()=>
|
|
1639
|
+
`},promise:{description:()=>x.createElement(x.Fragment,null,x.createElement("h4",null,"Return a Promise"),x.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:v.code`
|
|
1640
1640
|
import { SpsLabel, SpsSelect, useSpsForm } from "@spscommerce/ds-react";
|
|
1641
1641
|
function DemoComponent() {
|
|
1642
1642
|
function colorSearch(search) {
|
|
@@ -1659,7 +1659,7 @@ Valid keys: `+JSON.stringify(Object.keys($),null," "));var se=Q(X,ce,J,V,W+"."+
|
|
|
1659
1659
|
</div>
|
|
1660
1660
|
)
|
|
1661
1661
|
}
|
|
1662
|
-
`},debounce:{description:()=>
|
|
1662
|
+
`},debounce:{description:()=>x.createElement(x.Fragment,null,x.createElement("h4",null,"Debounce"),x.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:v.code`
|
|
1663
1663
|
import { SpsLabel, SpsSelect, useSpsForm } from "@spscommerce/ds-react";
|
|
1664
1664
|
function DemoComponent() {
|
|
1665
1665
|
function colorSearch(search) {
|
|
@@ -1683,7 +1683,7 @@ Valid keys: `+JSON.stringify(Object.keys($),null," "));var se=Q(X,ce,J,V,W+"."+
|
|
|
1683
1683
|
</div>
|
|
1684
1684
|
)
|
|
1685
1685
|
}
|
|
1686
|
-
`}}},objectOptions:{label:"Object Options",description:()=>
|
|
1686
|
+
`}}},objectOptions:{label:"Object Options",description:()=>x.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:v.code`
|
|
1687
1687
|
import { SpsLabel, SpsSelect, useSpsForm } from "@spscommerce/ds-react";
|
|
1688
1688
|
function DemoComponent() {
|
|
1689
1689
|
const sizes = [
|
|
@@ -1709,7 +1709,7 @@ Valid keys: `+JSON.stringify(Object.keys($),null," "));var se=Q(X,ce,J,V,W+"."+
|
|
|
1709
1709
|
</div>
|
|
1710
1710
|
)
|
|
1711
1711
|
}
|
|
1712
|
-
`},extendedDetails:{description:()=>
|
|
1712
|
+
`},extendedDetails:{description:()=>x.createElement(x.Fragment,null,x.createElement("h4",null,"Extended Details"),x.createElement("p",null,"Extended details can be displayed in the dropdown menu. Only the primary detail is displayed as the selection.")),react:v.code`
|
|
1713
1713
|
import { SpsLabel, SpsSelect, useSpsForm } from "@spscommerce/ds-react";
|
|
1714
1714
|
function DemoComponent() {
|
|
1715
1715
|
const sizes = [
|
|
@@ -1736,7 +1736,7 @@ Valid keys: `+JSON.stringify(Object.keys($),null," "));var se=Q(X,ce,J,V,W+"."+
|
|
|
1736
1736
|
</div>
|
|
1737
1737
|
)
|
|
1738
1738
|
}
|
|
1739
|
-
`}}},selectWithAction:{label:"Select with Action Button",description:()=>
|
|
1739
|
+
`}}},selectWithAction:{label:"Select with Action Button",description:()=>x.createElement("p",null,"A Text Button can be added to the bottom of the dropdown menu to provide a specific action."),examples:{basic:{react:v.code`
|
|
1740
1740
|
import { SpsSelect, useSpsAction } from "@spscommerce/ds-react";
|
|
1741
1741
|
function DemoComponent() {
|
|
1742
1742
|
const colors = ["red", "blue", "green"];
|
|
@@ -1762,7 +1762,7 @@ Valid keys: `+JSON.stringify(Object.keys($),null," "));var se=Q(X,ce,J,V,W+"."+
|
|
|
1762
1762
|
</div>
|
|
1763
1763
|
)
|
|
1764
1764
|
}
|
|
1765
|
-
`}}},disabled:{label:"Disabled State",description:()=>
|
|
1765
|
+
`}}},disabled:{label:"Disabled State",description:()=>x.createElement("p",null,"In the disabled state, select inputs display the current selection or placeholder text, but cannot be interacted with."),examples:{basic:{react:v.code`
|
|
1766
1766
|
import { SpsLabel, SpsSelect, useSpsForm } from "@spscommerce/ds-react";
|
|
1767
1767
|
function DemoComponent() {
|
|
1768
1768
|
const colors = ["red", "blue", "green"];
|
|
@@ -1780,7 +1780,7 @@ Valid keys: `+JSON.stringify(Object.keys($),null," "));var se=Q(X,ce,J,V,W+"."+
|
|
|
1780
1780
|
</div>
|
|
1781
1781
|
)
|
|
1782
1782
|
}
|
|
1783
|
-
`}}},disableOptionsMemoization:{label:"Disable Options Memoization",description:()=>
|
|
1783
|
+
`}}},disableOptionsMemoization:{label:"Disable Options Memoization",description:()=>x.createElement("p",null,"Options Memoization is disabled to allow rerender of options upon change. Options function is memoized to prevent unnecessary rerenders."),examples:{basic:{react:v.code`
|
|
1784
1784
|
import {
|
|
1785
1785
|
SpsButton,
|
|
1786
1786
|
SpsLabel,
|
|
@@ -1823,7 +1823,7 @@ Valid keys: `+JSON.stringify(Object.keys($),null," "));var se=Q(X,ce,J,V,W+"."+
|
|
|
1823
1823
|
</div>
|
|
1824
1824
|
);
|
|
1825
1825
|
}
|
|
1826
|
-
`}}}},YE={formMeta:"SpsFormSetMeta<any>",stacked:"boolean"};function br({children:e,className:t,formArray:n,formGroup:r,formMeta:a,stacked:s,"data-testid":l,unsafelyReplaceClassName:c,...p}){const f=r||n,m=f||a,[u,h]=o.useState(!1);o.useEffect(()=>{if(m){const y=m.isFocused();!u&&y&&m.onFocus?m.onFocus():u&&!y&&m.onBlur&&m.onBlur(),h(y)}});const S=U(c||"sps-form-group",(f&&f.invalid||a&&(!a.isValid()||!a.contentsAreValid()))&&"sps-form-group--error",t);return o.createElement("div",{className:S,"data-testid":l,...p},o.createElement("div",{className:U("sps-input-group",s&&"sps-input-group--stacked")},e))}Object.assign(br,{props:YE,displayName:"SpsInputGroup"});const UE={disabled:"boolean",formMeta:"SpsFormFieldMeta<SimpleMomentRange>",maxDate:"SimpleDate",minDate:"SimpleDate",onChange:"(newMomentRange: SimpleMomentRange) => void",presets:"Array<DateTimePreset>",value:"SimpleMomentRange",showTwoMonths:"boolean",twentyFourHour:"boolean",format:"string",placeholder12h:"string",placeholder24h:"string",selectedPreset:"string",onPresetChange:"(newPreset?: string) => void"},cu="sps-datepicker",du=["AM","PM"],pu=[{definition:"P0D",label:"datepicker.preset.today"},{definition:"() => [null, {month: 1, date: 1, year: 3000}]",label:"datepicker.preset.before"},{definition:"() => [{month: 1, date: 1, year: 1990}, null]",label:"datepicker.preset.after"},{definition:"P7D",label:"datepicker.preset.sevenDays"},{definition:"P30D",label:"datepicker.preset.thirtyDays"},{definition:"P60D",label:"datepicker.preset.sixtyDays"},{definition:"P90D",label:"datepicker.preset.ninetyDays"},{definition:"P1Y",label:"datepicker.preset.oneYear"}];function uu(e,t=""){return e.find(n=>n.definition===t)}function mi({className:e,disabled:t,formMeta:n,id:r,maxDate:a,minDate:s,onChange:l,presets:c=pu,value:p,showTwoMonths:f=!1,twentyFourHour:m=!1,format:u,"data-testid":h,placeholder24h:S="00:00",placeholder12h:y="12:00",selectedPreset:w,onPresetChange:T}){const{t:C}=$e.useWoodlandLanguage(),{wrapperId:D,controlId:M}=St(r&&`${r}_from`,n),{wrapperId:x,controlId:k}=St(r&&`${r}_to`,n),P=o.useRef(null),G=o.useRef(null),E=o.useRef(null),R=o.useRef(null),O=o.useRef(null),A=ne.splitMomentInDateTimeParts(Array.isArray(p)?p[0]:void 0,m,u),j=ne.splitMomentInDateTimeParts(Array.isArray(p)?p[1]:void 0,m,u,!0),[L,re]=o.useState(A[0]),[B,Z]=o.useState(j[0]),[H,q]=o.useState(A[1]),[ae,$]=o.useState(j[1]),[z,oe]=o.useState(A[2]),[ie,J]=o.useState(j[2]),[V,W]=o.useState(uu(c,w)||null),{showPopup:X,doShowPopup:te,doHidePopup:pe}=dr(P,O);o.useEffect(()=>{W(uu(c,w)||null)},[w]);function ce(de){n&&(n.setValue(de),n.markAsDirty()),l&&l(de)}function Q(de){return de&&(/^datepicker\./.test(de.label)?C(de.label):de.label)}const se=Q(V)==="Before",we=Q(V)==="After";function Le(de){const De=p||[],Ne=ne.toMoment(de);let et;if(se)et=[null,Ne],pe(!0),T==null||T(Q(V));else if(we)et=[Ne,null],pe(!0),T==null||T(Q(V));else if(!De[0]||De[1]||Ne!=null&&Ne.isBefore(ne.toMoment(ne.createFrom(De[0],u)))){let Oe=parseInt((H==null?void 0:H.split(":")[0])||"0",10);!m&&Oe===12&&(Oe=0);const dt=parseInt((H==null?void 0:H.split(":")[1])||"0",10);Ne==null||Ne.set("hour",z==="PM"?12+Oe:Oe<12?Oe:0),Ne==null||Ne.set("minute",dt),et=[Ne,null],W(null),T==null||T(null)}else{let Oe=parseInt((ae==null?void 0:ae.split(":")[0])||"0",10);!m&&Oe===12&&(Oe=0);const dt=parseInt((ae==null?void 0:ae.split(":")[1])||"0",10);Ne==null||Ne.set("hour",ie==="PM"?12+Oe:Oe),Ne==null||Ne.set("minute",dt),Ne!=null&&Ne.isBefore(De[0])?et=[Ne,null]:(et=[De[0],Ne],pe(!0)),T==null||T(null),W(null)}ce(et)}function wt(de){re(de.target.value),V!==null&&(W(null),T==null||T(null))}function lt(de){ne.validateTimeString(de.target.value,m)&&(q(de.target.value),V!==null&&(W(null),T==null||T(null)))}function ct(de,De,Ne){const et=L,Oe=De??H,dt=z;if(et===A[0]&&Oe===A[1]&&dt===A[2])return;const vt=ne.createFrom(et,u);if(vt&&ne.isValid(vt)){const Ge=ne.toMoment(vt);let mt=parseInt((Oe==null?void 0:Oe.split(":")[0])||"0",10);!m&&mt===12&&(mt=0);const _n=parseInt((Oe==null?void 0:Oe.split(":")[1])||"0",10);Ge==null||Ge.set("hour",dt==="PM"?12+mt:mt),Ge==null||Ge.set("minute",_n);const he=[Ge,(Ge==null?void 0:Ge.isBefore(p==null?void 0:p[1]))&&(p==null?void 0:p[1])||null];ce(he)}}function Xe(de){ne.validateTimeString(de??H,m)&&(q(ne.padIncompleteTimeString(de??H,m)),setTimeout(()=>ct(void 0,de),0))}function At(de){oe(de.target.value)}function Qe(de){ne.validateTimeString(de,m)&&(q(de),setTimeout(()=>Xe(de),0))}o.useEffect(()=>{z!==A[2]&&ct()},[z]);function Ke(de){Z(de.target.value)}function Se(de){ne.validateTimeString(de.target.value,m)&&$(de.target.value)}function Ue(de,De,Ne){const et=B,Oe=De??ae,dt=ie;if(et===j[0]&&Oe===j[1]&&dt===j[2])return;const vt=ne.createFrom(et,u);if(vt&&ne.isValid(vt)){const Ge=ne.toMoment(vt);let mt=parseInt((Oe==null?void 0:Oe.split(":")[0])||"0",10);!m&&mt===12&&(mt=0);const _n=parseInt((Oe==null?void 0:Oe.split(":")[1])||"0",10);Ge==null||Ge.set("hour",dt==="PM"?12+mt:mt),Ge==null||Ge.set("minute",_n);const he=[(Ge==null?void 0:Ge.isAfter(p==null?void 0:p[0]))&&(p==null?void 0:p[0])||null,Ge];ce(he)}}function We(de){ne.validateTimeString(de??ae,m)&&($(ne.padIncompleteTimeString(de??ae,m)),setTimeout(()=>Ue(void 0,de),0))}function Te(de){J(de.target.value)}function ve(de){ne.validateTimeString(de,m)&&($(de),setTimeout(()=>We(de),0))}o.useEffect(()=>{ie!==j[2]&&Ue()},[ie]);function rt(){ce([null,null]),W(null),T==null||T(null)}function It(de){return function(De){switch(De.key){case"Tab":pe();break;case"Backspace":De.target.selectionStart===0&&p&&!Array.isArray(p)&&rt();break;case"Enter":de==="from"?ct():de==="to"&&Ue();break}}}function Ft(de){if(!de){W(null),ce([null,null]),T==null||T(null);return}W(de);const De=ne.createDateTimeRangeFromPreset(de);de&&Q(de)==="Before"?!p||Array.isArray(p)&&p[0]&&p[1]?ce([null,null]):Array.isArray(p)&&p[0]?ce([null,ne.toMoment(ne.createFrom(p[0],u))]):Array.isArray(p)&&p[1]&&ce([null,ne.toMoment(ne.createFrom(p[1],u))]):de&&Q(de)==="After"?!p||Array.isArray(p)&&p[0]&&p[1]?ce([null,null]):Array.isArray(p)&&p[0]?ce([ne.toMoment(ne.createFrom(p[0],u)),null]):Array.isArray(p)&&p[1]&&ce([ne.toMoment(ne.createFrom(p[1],u)),null]):JSON.stringify(p)!==JSON.stringify(De)&&ce([De[0],De[1]]),T&&(de==null?void 0:de.definition)!==w&&T(typeof(de==null?void 0:de.definition)=="string"?de==null?void 0:de.definition:Q(de))}o.useEffect(()=>{p&&Array.isArray(p)&&!p.length&&rt()},[p]),o.useEffect(()=>{if(p&&Array.isArray(p)&&Array.isArray(p)){if(p[0]&&!p[1]){const de=c.find(De=>Q(De)==="After");de&&Ft(de)}else if(!p[0]&&p[1]){const de=c.find(De=>Q(De)==="Before");de&&Ft(de)}else if(p[0]&&p[1]){const de=ne.toDateTimeStringRange(p,m,u),De=c.find(Ne=>de===ne.toDateTimeStringRange(ne.createDateTimeRangeFromPreset(Ne),m,u));De&&Ft(De)}}},[]),o.useEffect(()=>{A[0]?re(A[0]):re(""),A[1]?q(A[1]):q(m?"00:00":"12:00"),m||(A[2]?oe(A[2]):oe("AM")),j[0]?Z(j[0]):Z(""),j[1]?$(j[1]):$(m?"23:59":"11:59"),m||(j[2]?J(j[2]):J("PM"))},[A[0],A[1],A[2],j[0],j[1],j[2],m]);const xe=U(cu,"sps-text-input",X&&`${cu}--open`,e);return o.createElement(o.Fragment,null,o.createElement("div",{className:U("sps-datetime-range-picker")},o.createElement("div",{className:U("sps-datetime-range-picker__pair")},o.createElement(nt,{id:D,className:xe,formMeta:n,inputRef:G,focusInputOnClick:!0,ref:P},o.createElement("div",{className:U("sps-form-control",t&&"disabled")},o.createElement("i",{className:U("sps-text-input__icon","sps-icon","sps-icon-calendar")}),V&&o.createElement("div",{"data-testid":`${h}_selected_preset`,className:"sps-datepicker__selected-preset"},o.createElement("span",{className:"sps-tag sps-tag--info"},Q(V))),o.createElement("input",{type:"text",ref:G,className:"sps-text-input__input","data-testid":`${h}_from_date_input`,id:M,placeholder:!L&&!V?(u==null?void 0:u.toUpperCase())||ir:se?j[0]:we?A[0]:void 0,onChange:wt,onClick:te,onFocus:te,onBlur:()=>ct(),onKeyDown:It("from"),value:V?"":L,disabled:t}),p&&!t&&o.createElement("i",{className:"sps-icon sps-icon-x-circle sps-form-control__clear-btn",onClick:rt}))),!V&&(m?o.createElement(Xt,{className:"sps-time-input",placeholder:S,suggestions:$a,zeroState:"Custom time",value:H,onChange:lt,onBlur:()=>Xe(),onSelectionChange:Qe,disabled:t,inputNotClearable:!0,autoFocusOnSelection:!0}):o.createElement(br,null,o.createElement(Xt,{className:"sps-time-input",placeholder:y,suggestions:Va,zeroState:"Custom time",value:H,onChange:lt,onBlur:()=>Xe(),onSelectionChange:Qe,disabled:t,inputNotClearable:!0,autoFocusOnSelection:!0}),o.createElement(Yn,{options:du,value:z,onChange:At,disabled:t,notClearable:!0})))),!V&&o.createElement("span",{className:U("sps-datepicker__to")},"to"),!V&&o.createElement("div",{className:U("sps-datetime-range-picker__pair")},o.createElement(nt,{id:x,className:xe,formMeta:n,inputRef:R,focusInputOnClick:!0,ref:E},o.createElement("div",{className:U("sps-form-control",t&&"disabled")},o.createElement("i",{className:U("sps-text-input__icon","sps-icon","sps-icon-calendar")}),V&&o.createElement("div",{"data-testid":`${h}_selected_preset`,className:"sps-datepicker__selected-preset"},o.createElement("span",{className:"sps-tag sps-tag--info"},Q(V))),o.createElement("input",{type:"text",ref:R,className:"sps-text-input__input","data-testid":`${h}_to_date_input`,id:k,placeholder:!B&&!V?(u==null?void 0:u.toUpperCase())||ir:void 0,onChange:Ke,onClick:te,onFocus:te,onKeyDown:It("to"),onBlur:()=>Ue(),value:B,disabled:t}),p&&!t&&o.createElement("i",{className:"sps-icon sps-icon-x-circle sps-form-control__clear-btn",onClick:rt}))),m?o.createElement(Xt,{className:"sps-time-input",placeholder:S,suggestions:$a,zeroState:"Custom time",value:ae,onChange:Se,onBlur:()=>We(),onSelectionChange:ve,disabled:t,inputNotClearable:!0,autoFocusOnSelection:!0}):o.createElement(br,null,o.createElement(Xt,{className:"sps-time-input",placeholder:y,suggestions:Va,zeroState:"Custom time",value:ae,onChange:Se,onBlur:()=>We(),onSelectionChange:ve,disabled:t,inputNotClearable:!0,autoFocusOnSelection:!0}),o.createElement(Yn,{options:du,value:ie,onChange:Te,disabled:t,notClearable:!0})))),o.createElement(Qo,{isOpen:X,attachTo:P,ref:O},o.createElement("div",{className:"sps-datepicker__presets"},o.createElement("fieldset",null,o.createElement("legend",{className:"sps-datepicker__presets-label"},C("datepicker.presetsLabel",{defaultValue:"Ranges"})),o.createElement("div",{className:"sps-custom-control sps-custom-radio sps-custom-control--no-error"},o.createElement("input",{"data-testid":`${h}_presets_custom_input`,type:"radio",id:`sps-date-range-picker-${D}__range-custom`,className:"sps-custom-control__input",checked:!V,name:`sps-date-range-picker-${D}__range`,onChange:()=>Ft()}),o.createElement("label",{className:"sps-custom-control__label",htmlFor:`sps-date-range-picker-${D}__range-custom`},C("datepicker.preset.custom",{defaultValue:"Custom"}))),c.map((de,De)=>o.createElement("div",{key:Q(de),className:"sps-custom-control sps-custom-radio sps-custom-control--no-error"},o.createElement("input",{type:"radio","data-testid":`${h}_preset_option_${de.label}`,id:`sps-date-range-picker-${D}__range-${De}`,name:`sps-date-range-picker-${D}__range`,onChange:()=>Ft(de),checked:V!=null&&V.definition?V.definition===de.definition:!1,className:"sps-custom-control__input"}),o.createElement("label",{className:"sps-custom-control__label",htmlFor:`sps-date-range-picker-${D}__range-${De}`},Q(de)))))),o.createElement(Xo,{"data-testid":`${h}_calendar`,selectedRange:Array.isArray(p)?[ne.createFrom(p[0],u),ne.createFrom(p[1],u)]:void 0,onNewSelection:Le,minDate:s,maxDate:a,showTwoMonths:f,selectedPreset:V&&Q(V)})))}Object.assign(mi,{props:UE,displayName:"SpsDateTimeRangePicker"});const mu={basic:{label:"Basic",examples:{basic:{react:v.code`
|
|
1826
|
+
`}}}},YE={formMeta:"SpsFormSetMeta<any>",stacked:"boolean"};function br({children:e,className:t,formArray:n,formGroup:r,formMeta:a,stacked:s,"data-testid":l,unsafelyReplaceClassName:c,...p}){const f=r||n,m=f||a,[u,h]=o.useState(!1);o.useEffect(()=>{if(m){const y=m.isFocused();!u&&y&&m.onFocus?m.onFocus():u&&!y&&m.onBlur&&m.onBlur(),h(y)}});const S=U(c||"sps-form-group",(f&&f.invalid||a&&(!a.isValid()||!a.contentsAreValid()))&&"sps-form-group--error",t);return o.createElement("div",{className:S,"data-testid":l,...p},o.createElement("div",{className:U("sps-input-group",s&&"sps-input-group--stacked")},e))}Object.assign(br,{props:YE,displayName:"SpsInputGroup"});const UE={disabled:"boolean",formMeta:"SpsFormFieldMeta<SimpleMomentRange>",maxDate:"SimpleDate",minDate:"SimpleDate",onChange:"(newMomentRange: SimpleMomentRange) => void",presets:"Array<DateTimePreset>",value:"SimpleMomentRange",showTwoMonths:"boolean",twentyFourHour:"boolean",format:"string",placeholder12h:"string",placeholder24h:"string",selectedPreset:"string",onPresetChange:"(newPreset?: string) => void"},cu="sps-datepicker",du=["AM","PM"],pu=[{definition:"P0D",label:"datepicker.preset.today"},{definition:"() => [null, {month: 1, date: 1, year: 3000}]",label:"datepicker.preset.before"},{definition:"() => [{month: 1, date: 1, year: 1990}, null]",label:"datepicker.preset.after"},{definition:"P7D",label:"datepicker.preset.sevenDays"},{definition:"P30D",label:"datepicker.preset.thirtyDays"},{definition:"P60D",label:"datepicker.preset.sixtyDays"},{definition:"P90D",label:"datepicker.preset.ninetyDays"},{definition:"P1Y",label:"datepicker.preset.oneYear"}];function uu(e,t=""){return e.find(n=>n.definition===t)}function mi({className:e,disabled:t,formMeta:n,id:r,maxDate:a,minDate:s,onChange:l,presets:c=pu,value:p,showTwoMonths:f=!1,twentyFourHour:m=!1,format:u,"data-testid":h,placeholder24h:S="00:00",placeholder12h:y="12:00",selectedPreset:C,onPresetChange:T}){const{t:w}=Be.useWoodlandLanguage(),{wrapperId:D,controlId:M}=St(r&&`${r}_from`,n),{wrapperId:I,controlId:k}=St(r&&`${r}_to`,n),A=o.useRef(null),G=o.useRef(null),E=o.useRef(null),R=o.useRef(null),O=o.useRef(null),P=ne.splitMomentInDateTimeParts(Array.isArray(p)?p[0]:void 0,m,u),z=ne.splitMomentInDateTimeParts(Array.isArray(p)?p[1]:void 0,m,u,!0),[L,re]=o.useState(P[0]),[B,Z]=o.useState(z[0]),[H,q]=o.useState(P[1]),[ae,$]=o.useState(z[1]),[j,oe]=o.useState(P[2]),[ie,J]=o.useState(z[2]),[V,W]=o.useState(uu(c,C)||null),{showPopup:X,doShowPopup:te,doHidePopup:pe}=dr(A,O);o.useEffect(()=>{W(uu(c,C)||null)},[C]);function ce(de){n&&(n.setValue(de),n.markAsDirty()),l&&l(de)}function Q(de){return de&&(/^datepicker\./.test(de.label)?w(de.label):de.label)}const se=Q(V)==="Before",we=Q(V)==="After";function Le(de){const De=p||[],Ne=ne.toMoment(de);let et;if(se)et=[null,Ne],pe(!0),T==null||T(Q(V));else if(we)et=[Ne,null],pe(!0),T==null||T(Q(V));else if(!De[0]||De[1]||Ne!=null&&Ne.isBefore(ne.toMoment(ne.createFrom(De[0],u)))){let Oe=parseInt((H==null?void 0:H.split(":")[0])||"0",10);!m&&Oe===12&&(Oe=0);const dt=parseInt((H==null?void 0:H.split(":")[1])||"0",10);Ne==null||Ne.set("hour",j==="PM"?12+Oe:Oe<12?Oe:0),Ne==null||Ne.set("minute",dt),et=[Ne,null],W(null),T==null||T(null)}else{let Oe=parseInt((ae==null?void 0:ae.split(":")[0])||"0",10);!m&&Oe===12&&(Oe=0);const dt=parseInt((ae==null?void 0:ae.split(":")[1])||"0",10);Ne==null||Ne.set("hour",ie==="PM"?12+Oe:Oe),Ne==null||Ne.set("minute",dt),Ne!=null&&Ne.isBefore(De[0])?et=[Ne,null]:(et=[De[0],Ne],pe(!0)),T==null||T(null),W(null)}ce(et)}function wt(de){re(de.target.value),V!==null&&(W(null),T==null||T(null))}function lt(de){ne.validateTimeString(de.target.value,m)&&(q(de.target.value),V!==null&&(W(null),T==null||T(null)))}function ct(de,De,Ne){const et=L,Oe=De??H,dt=j;if(et===P[0]&&Oe===P[1]&&dt===P[2])return;const vt=ne.createFrom(et,u);if(vt&&ne.isValid(vt)){const Ge=ne.toMoment(vt);let mt=parseInt((Oe==null?void 0:Oe.split(":")[0])||"0",10);!m&&mt===12&&(mt=0);const _n=parseInt((Oe==null?void 0:Oe.split(":")[1])||"0",10);Ge==null||Ge.set("hour",dt==="PM"?12+mt:mt),Ge==null||Ge.set("minute",_n);const he=[Ge,(Ge==null?void 0:Ge.isBefore(p==null?void 0:p[1]))&&(p==null?void 0:p[1])||null];ce(he)}}function Xe(de){ne.validateTimeString(de??H,m)&&(q(ne.padIncompleteTimeString(de??H,m)),setTimeout(()=>ct(void 0,de),0))}function At(de){oe(de.target.value)}function Qe(de){ne.validateTimeString(de,m)&&(q(de),setTimeout(()=>Xe(de),0))}o.useEffect(()=>{j!==P[2]&&ct()},[j]);function Ke(de){Z(de.target.value)}function Se(de){ne.validateTimeString(de.target.value,m)&&$(de.target.value)}function Ue(de,De,Ne){const et=B,Oe=De??ae,dt=ie;if(et===z[0]&&Oe===z[1]&&dt===z[2])return;const vt=ne.createFrom(et,u);if(vt&&ne.isValid(vt)){const Ge=ne.toMoment(vt);let mt=parseInt((Oe==null?void 0:Oe.split(":")[0])||"0",10);!m&&mt===12&&(mt=0);const _n=parseInt((Oe==null?void 0:Oe.split(":")[1])||"0",10);Ge==null||Ge.set("hour",dt==="PM"?12+mt:mt),Ge==null||Ge.set("minute",_n);const he=[(Ge==null?void 0:Ge.isAfter(p==null?void 0:p[0]))&&(p==null?void 0:p[0])||null,Ge];ce(he)}}function We(de){ne.validateTimeString(de??ae,m)&&($(ne.padIncompleteTimeString(de??ae,m)),setTimeout(()=>Ue(void 0,de),0))}function Te(de){J(de.target.value)}function ve(de){ne.validateTimeString(de,m)&&($(de),setTimeout(()=>We(de),0))}o.useEffect(()=>{ie!==z[2]&&Ue()},[ie]);function rt(){ce([null,null]),W(null),T==null||T(null)}function It(de){return function(De){switch(De.key){case"Tab":pe();break;case"Backspace":De.target.selectionStart===0&&p&&!Array.isArray(p)&&rt();break;case"Enter":de==="from"?ct():de==="to"&&Ue();break}}}function Ft(de){if(!de){W(null),ce([null,null]),T==null||T(null);return}W(de);const De=ne.createDateTimeRangeFromPreset(de);de&&Q(de)==="Before"?!p||Array.isArray(p)&&p[0]&&p[1]?ce([null,null]):Array.isArray(p)&&p[0]?ce([null,ne.toMoment(ne.createFrom(p[0],u))]):Array.isArray(p)&&p[1]&&ce([null,ne.toMoment(ne.createFrom(p[1],u))]):de&&Q(de)==="After"?!p||Array.isArray(p)&&p[0]&&p[1]?ce([null,null]):Array.isArray(p)&&p[0]?ce([ne.toMoment(ne.createFrom(p[0],u)),null]):Array.isArray(p)&&p[1]&&ce([ne.toMoment(ne.createFrom(p[1],u)),null]):JSON.stringify(p)!==JSON.stringify(De)&&ce([De[0],De[1]]),T&&(de==null?void 0:de.definition)!==C&&T(typeof(de==null?void 0:de.definition)=="string"?de==null?void 0:de.definition:Q(de))}o.useEffect(()=>{p&&Array.isArray(p)&&!p.length&&rt()},[p]),o.useEffect(()=>{if(p&&Array.isArray(p)&&Array.isArray(p)){if(p[0]&&!p[1]){const de=c.find(De=>Q(De)==="After");de&&Ft(de)}else if(!p[0]&&p[1]){const de=c.find(De=>Q(De)==="Before");de&&Ft(de)}else if(p[0]&&p[1]){const de=ne.toDateTimeStringRange(p,m,u),De=c.find(Ne=>de===ne.toDateTimeStringRange(ne.createDateTimeRangeFromPreset(Ne),m,u));De&&Ft(De)}}},[]),o.useEffect(()=>{P[0]?re(P[0]):re(""),P[1]?q(P[1]):q(m?"00:00":"12:00"),m||(P[2]?oe(P[2]):oe("AM")),z[0]?Z(z[0]):Z(""),z[1]?$(z[1]):$(m?"23:59":"11:59"),m||(z[2]?J(z[2]):J("PM"))},[P[0],P[1],P[2],z[0],z[1],z[2],m]);const xe=U(cu,"sps-text-input",X&&`${cu}--open`,e);return o.createElement(o.Fragment,null,o.createElement("div",{className:U("sps-datetime-range-picker")},o.createElement("div",{className:U("sps-datetime-range-picker__pair")},o.createElement(nt,{id:D,className:xe,formMeta:n,inputRef:G,focusInputOnClick:!0,ref:A},o.createElement("div",{className:U("sps-form-control",t&&"disabled")},o.createElement("i",{className:U("sps-text-input__icon","sps-icon","sps-icon-calendar")}),V&&o.createElement("div",{"data-testid":`${h}_selected_preset`,className:"sps-datepicker__selected-preset"},o.createElement("span",{className:"sps-tag sps-tag--info"},Q(V))),o.createElement("input",{type:"text",ref:G,className:"sps-text-input__input","data-testid":`${h}_from_date_input`,id:M,placeholder:!L&&!V?(u==null?void 0:u.toUpperCase())||ir:se?z[0]:we?P[0]:void 0,onChange:wt,onClick:te,onFocus:te,onBlur:()=>ct(),onKeyDown:It("from"),value:V?"":L,disabled:t}),p&&!t&&o.createElement("i",{className:"sps-icon sps-icon-x-circle sps-form-control__clear-btn",onClick:rt}))),!V&&(m?o.createElement(Xt,{className:"sps-time-input",placeholder:S,suggestions:$a,zeroState:"Custom time",value:H,onChange:lt,onBlur:()=>Xe(),onSelectionChange:Qe,disabled:t,inputNotClearable:!0,autoFocusOnSelection:!0}):o.createElement(br,null,o.createElement(Xt,{className:"sps-time-input",placeholder:y,suggestions:Va,zeroState:"Custom time",value:H,onChange:lt,onBlur:()=>Xe(),onSelectionChange:Qe,disabled:t,inputNotClearable:!0,autoFocusOnSelection:!0}),o.createElement(Yn,{options:du,value:j,onChange:At,disabled:t,notClearable:!0})))),!V&&o.createElement("span",{className:U("sps-datepicker__to")},w("dateTimeRangePicker.to",{defaultValue:"to"})),!V&&o.createElement("div",{className:U("sps-datetime-range-picker__pair")},o.createElement(nt,{id:I,className:xe,formMeta:n,inputRef:R,focusInputOnClick:!0,ref:E},o.createElement("div",{className:U("sps-form-control",t&&"disabled")},o.createElement("i",{className:U("sps-text-input__icon","sps-icon","sps-icon-calendar")}),V&&o.createElement("div",{"data-testid":`${h}_selected_preset`,className:"sps-datepicker__selected-preset"},o.createElement("span",{className:"sps-tag sps-tag--info"},Q(V))),o.createElement("input",{type:"text",ref:R,className:"sps-text-input__input","data-testid":`${h}_to_date_input`,id:k,placeholder:!B&&!V?(u==null?void 0:u.toUpperCase())||ir:void 0,onChange:Ke,onClick:te,onFocus:te,onKeyDown:It("to"),onBlur:()=>Ue(),value:B,disabled:t}),p&&!t&&o.createElement("i",{className:"sps-icon sps-icon-x-circle sps-form-control__clear-btn",onClick:rt}))),m?o.createElement(Xt,{className:"sps-time-input",placeholder:S,suggestions:$a,zeroState:"Custom time",value:ae,onChange:Se,onBlur:()=>We(),onSelectionChange:ve,disabled:t,inputNotClearable:!0,autoFocusOnSelection:!0}):o.createElement(br,null,o.createElement(Xt,{className:"sps-time-input",placeholder:y,suggestions:Va,zeroState:"Custom time",value:ae,onChange:Se,onBlur:()=>We(),onSelectionChange:ve,disabled:t,inputNotClearable:!0,autoFocusOnSelection:!0}),o.createElement(Yn,{options:du,value:ie,onChange:Te,disabled:t,notClearable:!0})))),o.createElement(Qo,{isOpen:X,attachTo:A,ref:O},o.createElement("div",{className:"sps-datepicker__presets"},o.createElement("fieldset",null,o.createElement("legend",{className:"sps-datepicker__presets-label"},w("datepicker.presetsLabel",{defaultValue:"Ranges"})),o.createElement("div",{className:"sps-custom-control sps-custom-radio sps-custom-control--no-error"},o.createElement("input",{"data-testid":`${h}_presets_custom_input`,type:"radio",id:`sps-date-range-picker-${D}__range-custom`,className:"sps-custom-control__input",checked:!V,name:`sps-date-range-picker-${D}__range`,onChange:()=>Ft()}),o.createElement("label",{className:"sps-custom-control__label",htmlFor:`sps-date-range-picker-${D}__range-custom`},w("datepicker.preset.custom",{defaultValue:"Custom"}))),c.map((de,De)=>o.createElement("div",{key:Q(de),className:"sps-custom-control sps-custom-radio sps-custom-control--no-error"},o.createElement("input",{type:"radio","data-testid":`${h}_preset_option_${de.label}`,id:`sps-date-range-picker-${D}__range-${De}`,name:`sps-date-range-picker-${D}__range`,onChange:()=>Ft(de),checked:V!=null&&V.definition?V.definition===de.definition:!1,className:"sps-custom-control__input"}),o.createElement("label",{className:"sps-custom-control__label",htmlFor:`sps-date-range-picker-${D}__range-${De}`},Q(de)))))),o.createElement(Xo,{"data-testid":`${h}_calendar`,selectedRange:Array.isArray(p)?[ne.createFrom(p[0],u),ne.createFrom(p[1],u)]:void 0,onNewSelection:Le,minDate:s,maxDate:a,showTwoMonths:f,selectedPreset:V&&Q(V)})))}Object.assign(mi,{props:UE,displayName:"SpsDateTimeRangePicker"});const mu={basic:{label:"Basic",examples:{basic:{react:v.code`
|
|
1827
1827
|
import {
|
|
1828
1828
|
useSpsForm,
|
|
1829
1829
|
SpsLabel,
|
|
@@ -1971,10 +1971,10 @@ Valid keys: `+JSON.stringify(Object.keys($),null," "));var se=Q(X,ce,J,V,W+"."+
|
|
|
1971
1971
|
</>
|
|
1972
1972
|
);
|
|
1973
1973
|
}
|
|
1974
|
-
`}}}};function Qt(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 fi={exports:{}},ea={exports:{}},zE=ea.exports,fu;function nn(){return fu||(fu=1,function(e,t){(function(n,r){e.exports=r()})(zE,function(){var n;function r(){return n.apply(null,arguments)}function a(i){n=i}function s(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 g=[],b,N=i.length;for(b=0;b<N;++b)g.push(d(i[b],b));return g}function S(i,d){for(var g in d)c(d,g)&&(i[g]=d[g]);return c(d,"toString")&&(i.toString=d.toString),c(d,"valueOf")&&(i.valueOf=d.valueOf),i}function y(i,d,g,b){return vh(i,d,g,b,!0).utc()}function
|
|
1974
|
+
`}}}};function Qt(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 fi={exports:{}},ea={exports:{}},zE=ea.exports,fu;function nn(){return fu||(fu=1,function(e,t){(function(n,r){e.exports=r()})(zE,function(){var n;function r(){return n.apply(null,arguments)}function a(i){n=i}function s(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 g=[],b,N=i.length;for(b=0;b<N;++b)g.push(d(i[b],b));return g}function S(i,d){for(var g in d)c(d,g)&&(i[g]=d[g]);return c(d,"toString")&&(i.toString=d.toString),c(d,"valueOf")&&(i.valueOf=d.valueOf),i}function y(i,d,g,b){return vh(i,d,g,b,!0).utc()}function C(){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=C()),i._pf}var w;Array.prototype.some?w=Array.prototype.some:w=function(i){var d=Object(this),g=d.length>>>0,b;for(b=0;b<g;b++)if(b in d&&i.call(this,d[b],b,d))return!0;return!1};function D(i){var d=null,g=!1,b=i._d&&!isNaN(i._d.getTime());if(b&&(d=T(i),g=w.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&&g),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 M(i){var d=y(NaN);return i!=null?S(T(d),i):T(d).userInvalidated=!0,d}var I=r.momentProperties=[],k=!1;function A(i,d){var g,b,N,F=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),F>0)for(g=0;g<F;g++)b=I[g],N=d[b],f(N)||(i[b]=N);return i}function G(i){A(this,i),this._d=new Date(i._d!=null?i._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),k===!1&&(k=!0,r.updateOffset(this),k=!1)}function E(i){return i instanceof G||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 g=!0;return S(function(){if(r.deprecationHandler!=null&&r.deprecationHandler(null,i),g){var b=[],N,F,ee,fe=arguments.length;for(F=0;F<fe;F++){if(N="",typeof arguments[F]=="object"){N+=`
|
|
1975
1975
|
[`+F+"] ";for(ee in arguments[0])c(arguments[0],ee)&&(N+=ee+": "+arguments[0][ee]+", ");N=N.slice(0,-2)}else N=arguments[F];b.push(N)}R(i+`
|
|
1976
1976
|
Arguments: `+Array.prototype.slice.call(b).join("")+`
|
|
1977
|
-
`+new Error().stack),g=!1}return d.apply(this,arguments)},d)}var A={};function j(i,d){r.deprecationHandler!=null&&r.deprecationHandler(i,d),A[i]||(R(d),A[i]=!0)}r.suppressDeprecationWarnings=!1,r.deprecationHandler=null;function L(i){return typeof Function<"u"&&i instanceof Function||Object.prototype.toString.call(i)==="[object Function]"}function re(i){var d,g;for(g in i)c(i,g)&&(d=i[g],L(d)?this[g]=d:this["_"+g]=d);this._config=i,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function B(i,d){var g=S({},i),b;for(b in d)c(d,b)&&(l(i[b])&&l(d[b])?(g[b]={},S(g[b],i[b]),S(g[b],d[b])):d[b]!=null?g[b]=d[b]:delete g[b]);for(b in i)c(i,b)&&!c(d,b)&&l(i[b])&&(g[b]=S({},g[b]));return g}function Z(i){i!=null&&this.set(i)}var H;Object.keys?H=Object.keys:H=function(i){var d,g=[];for(d in i)c(i,d)&&g.push(d);return g};var q={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function ae(i,d,g){var b=this._calendar[i]||this._calendar.sameElse;return L(b)?b.call(d,g):b}function $(i,d,g){var b=""+Math.abs(i),N=d-b.length,F=i>=0;return(F?g?"+":"":"-")+Math.pow(10,Math.max(0,N)).toString().substr(1)+b}var z=/(\[[^\[]*\])|(\\)?([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,oe=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,ie={},J={};function V(i,d,g,b){var N=b;typeof b=="string"&&(N=function(){return this[b]()}),i&&(J[i]=N),d&&(J[d[0]]=function(){return $(N.apply(this,arguments),d[1],d[2])}),g&&(J[g]=function(){return this.localeData().ordinal(N.apply(this,arguments),i)})}function W(i){return i.match(/\[[\s\S]/)?i.replace(/^\[|\]$/g,""):i.replace(/\\/g,"")}function X(i){var d=i.match(z),g,b;for(g=0,b=d.length;g<b;g++)J[d[g]]?d[g]=J[d[g]]:d[g]=W(d[g]);return function(N){var F="",ee;for(ee=0;ee<b;ee++)F+=L(d[ee])?d[ee].call(N,i):d[ee];return F}}function te(i,d){return i.isValid()?(d=pe(d,i.localeData()),ie[d]=ie[d]||X(d),ie[d](i)):i.localeData().invalidDate()}function pe(i,d){var g=5;function b(N){return d.longDateFormat(N)||N}for(oe.lastIndex=0;g>=0&&oe.test(i);)i=i.replace(oe,b),oe.lastIndex=0,g-=1;return i}var ce={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 Q(i){var d=this._longDateFormat[i],g=this._longDateFormat[i.toUpperCase()];return d||!g?d:(this._longDateFormat[i]=g.match(z).map(function(b){return b==="MMMM"||b==="MM"||b==="DD"||b==="dddd"?b.slice(1):b}).join(""),this._longDateFormat[i])}var se="Invalid date";function we(){return this._invalidDate}var Le="%d",wt=/\d{1,2}/;function lt(i){return this._ordinal.replace("%d",i)}var ct={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 Xe(i,d,g,b){var N=this._relativeTime[g];return L(N)?N(i,d,g,b):N.replace(/%d/i,i)}function At(i,d){var g=this._relativeTime[i>0?"future":"past"];return L(g)?g(d):g.replace(/%s/i,d)}var Qe={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 Ke(i){return typeof i=="string"?Qe[i]||Qe[i.toLowerCase()]:void 0}function Se(i){var d={},g,b;for(b in i)c(i,b)&&(g=Ke(b),g&&(d[g]=i[b]));return d}var Ue={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 We(i){var d=[],g;for(g in i)c(i,g)&&d.push({unit:g,priority:Ue[g]});return d.sort(function(b,N){return b.priority-N.priority}),d}var Te=/\d/,ve=/\d\d/,rt=/\d{3}/,It=/\d{4}/,Ft=/[+-]?\d{6}/,xe=/\d\d?/,de=/\d\d\d\d?/,De=/\d\d\d\d\d\d?/,Ne=/\d{1,3}/,et=/\d{1,4}/,Oe=/[+-]?\d{1,6}/,dt=/\d+/,vt=/[+-]?\d+/,Ge=/Z|[+-]\d\d:?\d\d/gi,mt=/Z|[+-]\d\d(?::?\d\d)?/gi,_n=/[+-]?\d+(\.\d{1,3})?/,he=/[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,ye=/^[1-9]\d?/,tt=/^([1-9]\d|\d)/,Vt;Vt={};function me(i,d,g){Vt[i]=L(d)?d:function(b,N){return b&&g?g:d}}function Ml(i,d){return c(Vt,i)?Vt[i](d._strict,d._locale):new RegExp(FN(i))}function FN(i){return sn(i.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(d,g,b,N,F){return g||b||N||F}))}function sn(i){return i.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function $t(i){return i<0?Math.ceil(i)||0:Math.floor(i)}function Ce(i){var d=+i,g=0;return d!==0&&isFinite(d)&&(g=$t(d)),g}var _l={};function Ve(i,d){var g,b=d,N;for(typeof i=="string"&&(i=[i]),m(d)&&(b=function(F,ee){ee[d]=Ce(F)}),N=i.length,g=0;g<N;g++)_l[i[g]]=b}function po(i,d){Ve(i,function(g,b,N,F){N._w=N._w||{},d(g,N._w,N,F)})}function VN(i,d,g){d!=null&&c(_l,i)&&_l[i](d,g._a,g,i)}function wa(i){return i%4===0&&i%100!==0||i%400===0}var ft=0,ln=1,en=2,ot=3,Ut=4,cn=5,er=6,$N=7,KN=8;V("Y",0,0,function(){var i=this.year();return i<=9999?$(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"),me("Y",vt),me("YY",xe,ve),me("YYYY",et,It),me("YYYYY",Oe,Ft),me("YYYYYY",Oe,Ft),Ve(["YYYYY","YYYYYY"],ft),Ve("YYYY",function(i,d){d[ft]=i.length===2?r.parseTwoDigitYear(i):Ce(i)}),Ve("YY",function(i,d){d[ft]=r.parseTwoDigitYear(i)}),Ve("Y",function(i,d){d[ft]=parseInt(i,10)});function uo(i){return wa(i)?366:365}r.parseTwoDigitYear=function(i){return Ce(i)+(Ce(i)>68?1900:2e3)};var rh=Dr("FullYear",!0);function HN(){return wa(this.year())}function Dr(i,d){return function(g){return g!=null?(oh(this,i,g),r.updateOffset(this,d),this):mo(this,i)}}function mo(i,d){if(!i.isValid())return NaN;var g=i._d,b=i._isUTC;switch(d){case"Milliseconds":return b?g.getUTCMilliseconds():g.getMilliseconds();case"Seconds":return b?g.getUTCSeconds():g.getSeconds();case"Minutes":return b?g.getUTCMinutes():g.getMinutes();case"Hours":return b?g.getUTCHours():g.getHours();case"Date":return b?g.getUTCDate():g.getDate();case"Day":return b?g.getUTCDay():g.getDay();case"Month":return b?g.getUTCMonth():g.getMonth();case"FullYear":return b?g.getUTCFullYear():g.getFullYear();default:return NaN}}function oh(i,d,g){var b,N,F,ee,fe;if(!(!i.isValid()||isNaN(g))){switch(b=i._d,N=i._isUTC,d){case"Milliseconds":return void(N?b.setUTCMilliseconds(g):b.setMilliseconds(g));case"Seconds":return void(N?b.setUTCSeconds(g):b.setSeconds(g));case"Minutes":return void(N?b.setUTCMinutes(g):b.setMinutes(g));case"Hours":return void(N?b.setUTCHours(g):b.setHours(g));case"Date":return void(N?b.setUTCDate(g):b.setDate(g));case"FullYear":break;default:return}F=g,ee=i.month(),fe=i.date(),fe=fe===29&&ee===1&&!wa(F)?28:fe,N?b.setUTCFullYear(F,ee,fe):b.setFullYear(F,ee,fe)}}function WN(i){return i=Ke(i),L(this[i])?this[i]():this}function GN(i,d){if(typeof i=="object"){i=Se(i);var g=We(i),b,N=g.length;for(b=0;b<N;b++)this[g[b].unit](i[g[b].unit])}else if(i=Ke(i),L(this[i]))return this[i](d);return this}function YN(i,d){return(i%d+d)%d}var Je;Array.prototype.indexOf?Je=Array.prototype.indexOf:Je=function(i){var d;for(d=0;d<this.length;++d)if(this[d]===i)return d;return-1};function Ll(i,d){if(isNaN(i)||isNaN(d))return NaN;var g=YN(d,12);return i+=(d-g)/12,g===1?wa(i)?29:28:31-g%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)}),me("M",xe,ye),me("MM",xe,ve),me("MMM",function(i,d){return d.monthsShortRegex(i)}),me("MMMM",function(i,d){return d.monthsRegex(i)}),Ve(["M","MM"],function(i,d){d[ln]=Ce(i)-1}),Ve(["MMM","MMMM"],function(i,d,g,b){var N=g._locale.monthsParse(i,b,g._strict);N!=null?d[ln]=N:T(g).invalidMonth=i});var UN="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ah="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),sh=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,zN=he,jN=he;function qN(i,d){return i?s(this._months)?this._months[i.month()]:this._months[(this._months.isFormat||sh).test(d)?"format":"standalone"][i.month()]:s(this._months)?this._months:this._months.standalone}function JN(i,d){return i?s(this._monthsShort)?this._monthsShort[i.month()]:this._monthsShort[sh.test(d)?"format":"standalone"][i.month()]:s(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function ZN(i,d,g){var b,N,F,ee=i.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],b=0;b<12;++b)F=y([2e3,b]),this._shortMonthsParse[b]=this.monthsShort(F,"").toLocaleLowerCase(),this._longMonthsParse[b]=this.months(F,"").toLocaleLowerCase();return g?d==="MMM"?(N=Je.call(this._shortMonthsParse,ee),N!==-1?N:null):(N=Je.call(this._longMonthsParse,ee),N!==-1?N:null):d==="MMM"?(N=Je.call(this._shortMonthsParse,ee),N!==-1?N:(N=Je.call(this._longMonthsParse,ee),N!==-1?N:null)):(N=Je.call(this._longMonthsParse,ee),N!==-1?N:(N=Je.call(this._shortMonthsParse,ee),N!==-1?N:null))}function XN(i,d,g){var b,N,F;if(this._monthsParseExact)return ZN.call(this,i,d,g);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),b=0;b<12;b++){if(N=y([2e3,b]),g&&!this._longMonthsParse[b]&&(this._longMonthsParse[b]=new RegExp("^"+this.months(N,"").replace(".","")+"$","i"),this._shortMonthsParse[b]=new RegExp("^"+this.monthsShort(N,"").replace(".","")+"$","i")),!g&&!this._monthsParse[b]&&(F="^"+this.months(N,"")+"|^"+this.monthsShort(N,""),this._monthsParse[b]=new RegExp(F.replace(".",""),"i")),g&&d==="MMMM"&&this._longMonthsParse[b].test(i))return b;if(g&&d==="MMM"&&this._shortMonthsParse[b].test(i))return b;if(!g&&this._monthsParse[b].test(i))return b}}function ih(i,d){if(!i.isValid())return i;if(typeof d=="string"){if(/^\d+$/.test(d))d=Ce(d);else if(d=i.localeData().monthsParse(d),!m(d))return i}var g=d,b=i.date();return b=b<29?b:Math.min(b,Ll(i.year(),g)),i._isUTC?i._d.setUTCMonth(g,b):i._d.setMonth(g,b),i}function lh(i){return i!=null?(ih(this,i),r.updateOffset(this,!0),this):mo(this,"Month")}function QN(){return Ll(this.year(),this.month())}function ek(i){return this._monthsParseExact?(c(this,"_monthsRegex")||ch.call(this),i?this._monthsShortStrictRegex:this._monthsShortRegex):(c(this,"_monthsShortRegex")||(this._monthsShortRegex=zN),this._monthsShortStrictRegex&&i?this._monthsShortStrictRegex:this._monthsShortRegex)}function tk(i){return this._monthsParseExact?(c(this,"_monthsRegex")||ch.call(this),i?this._monthsStrictRegex:this._monthsRegex):(c(this,"_monthsRegex")||(this._monthsRegex=jN),this._monthsStrictRegex&&i?this._monthsStrictRegex:this._monthsRegex)}function ch(){function i(Ee,ke){return ke.length-Ee.length}var d=[],g=[],b=[],N,F,ee,fe;for(N=0;N<12;N++)F=y([2e3,N]),ee=sn(this.monthsShort(F,"")),fe=sn(this.months(F,"")),d.push(ee),g.push(fe),b.push(fe),b.push(ee);d.sort(i),g.sort(i),b.sort(i),this._monthsRegex=new RegExp("^("+b.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+g.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+d.join("|")+")","i")}function nk(i,d,g,b,N,F,ee){var fe;return i<100&&i>=0?(fe=new Date(i+400,d,g,b,N,F,ee),isFinite(fe.getFullYear())&&fe.setFullYear(i)):fe=new Date(i,d,g,b,N,F,ee),fe}function fo(i){var d,g;return i<100&&i>=0?(g=Array.prototype.slice.call(arguments),g[0]=i+400,d=new Date(Date.UTC.apply(null,g)),isFinite(d.getUTCFullYear())&&d.setUTCFullYear(i)):d=new Date(Date.UTC.apply(null,arguments)),d}function Ca(i,d,g){var b=7+d-g,N=(7+fo(i,0,b).getUTCDay()-d)%7;return-N+b-1}function dh(i,d,g,b,N){var F=(7+g-b)%7,ee=Ca(i,b,N),fe=1+7*(d-1)+F+ee,Ee,ke;return fe<=0?(Ee=i-1,ke=uo(Ee)+fe):fe>uo(i)?(Ee=i+1,ke=fe-uo(i)):(Ee=i,ke=fe),{year:Ee,dayOfYear:ke}}function ho(i,d,g){var b=Ca(i.year(),d,g),N=Math.floor((i.dayOfYear()-b-1)/7)+1,F,ee;return N<1?(ee=i.year()-1,F=N+dn(ee,d,g)):N>dn(i.year(),d,g)?(F=N-dn(i.year(),d,g),ee=i.year()+1):(ee=i.year(),F=N),{week:F,year:ee}}function dn(i,d,g){var b=Ca(i,d,g),N=Ca(i+1,d,g);return(uo(i)-b+N)/7}V("w",["ww",2],"wo","week"),V("W",["WW",2],"Wo","isoWeek"),me("w",xe,ye),me("ww",xe,ve),me("W",xe,ye),me("WW",xe,ve),po(["w","ww","W","WW"],function(i,d,g,b){d[b.substr(0,1)]=Ce(i)});function rk(i){return ho(i,this._week.dow,this._week.doy).week}var ok={dow:0,doy:6};function ak(){return this._week.dow}function sk(){return this._week.doy}function ik(i){var d=this.localeData().week(this);return i==null?d:this.add((i-d)*7,"d")}function lk(i){var d=ho(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"),me("d",xe),me("e",xe),me("E",xe),me("dd",function(i,d){return d.weekdaysMinRegex(i)}),me("ddd",function(i,d){return d.weekdaysShortRegex(i)}),me("dddd",function(i,d){return d.weekdaysRegex(i)}),po(["dd","ddd","dddd"],function(i,d,g,b){var N=g._locale.weekdaysParse(i,b,g._strict);N!=null?d.d=N:T(g).invalidWeekday=i}),po(["d","e","E"],function(i,d,g,b){d[b]=Ce(i)});function ck(i,d){return typeof i!="string"?i:isNaN(i)?(i=d.weekdaysParse(i),typeof i=="number"?i:null):parseInt(i,10)}function dk(i,d){return typeof i=="string"?d.weekdaysParse(i)%7||7:isNaN(i)?null:i}function Ol(i,d){return i.slice(d,7).concat(i.slice(0,d))}var pk="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),ph="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),uk="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),mk=he,fk=he,hk=he;function Sk(i,d){var g=s(this._weekdays)?this._weekdays:this._weekdays[i&&i!==!0&&this._weekdays.isFormat.test(d)?"format":"standalone"];return i===!0?Ol(g,this._week.dow):i?g[i.day()]:g}function gk(i){return i===!0?Ol(this._weekdaysShort,this._week.dow):i?this._weekdaysShort[i.day()]:this._weekdaysShort}function bk(i){return i===!0?Ol(this._weekdaysMin,this._week.dow):i?this._weekdaysMin[i.day()]:this._weekdaysMin}function vk(i,d,g){var b,N,F,ee=i.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],b=0;b<7;++b)F=y([2e3,1]).day(b),this._minWeekdaysParse[b]=this.weekdaysMin(F,"").toLocaleLowerCase(),this._shortWeekdaysParse[b]=this.weekdaysShort(F,"").toLocaleLowerCase(),this._weekdaysParse[b]=this.weekdays(F,"").toLocaleLowerCase();return g?d==="dddd"?(N=Je.call(this._weekdaysParse,ee),N!==-1?N:null):d==="ddd"?(N=Je.call(this._shortWeekdaysParse,ee),N!==-1?N:null):(N=Je.call(this._minWeekdaysParse,ee),N!==-1?N:null):d==="dddd"?(N=Je.call(this._weekdaysParse,ee),N!==-1||(N=Je.call(this._shortWeekdaysParse,ee),N!==-1)?N:(N=Je.call(this._minWeekdaysParse,ee),N!==-1?N:null)):d==="ddd"?(N=Je.call(this._shortWeekdaysParse,ee),N!==-1||(N=Je.call(this._weekdaysParse,ee),N!==-1)?N:(N=Je.call(this._minWeekdaysParse,ee),N!==-1?N:null)):(N=Je.call(this._minWeekdaysParse,ee),N!==-1||(N=Je.call(this._weekdaysParse,ee),N!==-1)?N:(N=Je.call(this._shortWeekdaysParse,ee),N!==-1?N:null))}function yk(i,d,g){var b,N,F;if(this._weekdaysParseExact)return vk.call(this,i,d,g);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),b=0;b<7;b++){if(N=y([2e3,1]).day(b),g&&!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]||(F="^"+this.weekdays(N,"")+"|^"+this.weekdaysShort(N,"")+"|^"+this.weekdaysMin(N,""),this._weekdaysParse[b]=new RegExp(F.replace(".",""),"i")),g&&d==="dddd"&&this._fullWeekdaysParse[b].test(i))return b;if(g&&d==="ddd"&&this._shortWeekdaysParse[b].test(i))return b;if(g&&d==="dd"&&this._minWeekdaysParse[b].test(i))return b;if(!g&&this._weekdaysParse[b].test(i))return b}}function Tk(i){if(!this.isValid())return i!=null?this:NaN;var d=mo(this,"Day");return i!=null?(i=ck(i,this.localeData()),this.add(i-d,"d")):d}function Ek(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 wk(i){if(!this.isValid())return i!=null?this:NaN;if(i!=null){var d=dk(i,this.localeData());return this.day(this.day()%7?d:d-7)}else return this.day()||7}function Ck(i){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||Rl.call(this),i?this._weekdaysStrictRegex:this._weekdaysRegex):(c(this,"_weekdaysRegex")||(this._weekdaysRegex=mk),this._weekdaysStrictRegex&&i?this._weekdaysStrictRegex:this._weekdaysRegex)}function Dk(i){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||Rl.call(this),i?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(c(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=fk),this._weekdaysShortStrictRegex&&i?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Nk(i){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||Rl.call(this),i?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(c(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=hk),this._weekdaysMinStrictRegex&&i?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Rl(){function i(yt,hn){return hn.length-yt.length}var d=[],g=[],b=[],N=[],F,ee,fe,Ee,ke;for(F=0;F<7;F++)ee=y([2e3,1]).day(F),fe=sn(this.weekdaysMin(ee,"")),Ee=sn(this.weekdaysShort(ee,"")),ke=sn(this.weekdays(ee,"")),d.push(fe),g.push(Ee),b.push(ke),N.push(fe),N.push(Ee),N.push(ke);d.sort(i),g.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("^("+g.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+d.join("|")+")","i")}function Bl(){return this.hours()%12||12}function kk(){return this.hours()||24}V("H",["HH",2],0,"hour"),V("h",["hh",2],0,Bl),V("k",["kk",2],0,kk),V("hmm",0,0,function(){return""+Bl.apply(this)+$(this.minutes(),2)}),V("hmmss",0,0,function(){return""+Bl.apply(this)+$(this.minutes(),2)+$(this.seconds(),2)}),V("Hmm",0,0,function(){return""+this.hours()+$(this.minutes(),2)}),V("Hmmss",0,0,function(){return""+this.hours()+$(this.minutes(),2)+$(this.seconds(),2)});function uh(i,d){V(i,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),d)})}uh("a",!0),uh("A",!1);function mh(i,d){return d._meridiemParse}me("a",mh),me("A",mh),me("H",xe,tt),me("h",xe,ye),me("k",xe,ye),me("HH",xe,ve),me("hh",xe,ve),me("kk",xe,ve),me("hmm",de),me("hmmss",De),me("Hmm",de),me("Hmmss",De),Ve(["H","HH"],ot),Ve(["k","kk"],function(i,d,g){var b=Ce(i);d[ot]=b===24?0:b}),Ve(["a","A"],function(i,d,g){g._isPm=g._locale.isPM(i),g._meridiem=i}),Ve(["h","hh"],function(i,d,g){d[ot]=Ce(i),T(g).bigHour=!0}),Ve("hmm",function(i,d,g){var b=i.length-2;d[ot]=Ce(i.substr(0,b)),d[Ut]=Ce(i.substr(b)),T(g).bigHour=!0}),Ve("hmmss",function(i,d,g){var b=i.length-4,N=i.length-2;d[ot]=Ce(i.substr(0,b)),d[Ut]=Ce(i.substr(b,2)),d[cn]=Ce(i.substr(N)),T(g).bigHour=!0}),Ve("Hmm",function(i,d,g){var b=i.length-2;d[ot]=Ce(i.substr(0,b)),d[Ut]=Ce(i.substr(b))}),Ve("Hmmss",function(i,d,g){var b=i.length-4,N=i.length-2;d[ot]=Ce(i.substr(0,b)),d[Ut]=Ce(i.substr(b,2)),d[cn]=Ce(i.substr(N))});function xk(i){return(i+"").toLowerCase().charAt(0)==="p"}var Ik=/[ap]\.?m?\.?/i,Mk=Dr("Hours",!0);function _k(i,d,g){return i>11?g?"pm":"PM":g?"am":"AM"}var fh={calendar:q,longDateFormat:ce,invalidDate:se,ordinal:Le,dayOfMonthOrdinalParse:wt,relativeTime:ct,months:UN,monthsShort:ah,week:ok,weekdays:pk,weekdaysMin:uk,weekdaysShort:ph,meridiemParse:Ik},qe={},So={},go;function Lk(i,d){var g,b=Math.min(i.length,d.length);for(g=0;g<b;g+=1)if(i[g]!==d[g])return g;return b}function hh(i){return i&&i.toLowerCase().replace("_","-")}function Ok(i){for(var d=0,g,b,N,F;d<i.length;){for(F=hh(i[d]).split("-"),g=F.length,b=hh(i[d+1]),b=b?b.split("-"):null;g>0;){if(N=Da(F.slice(0,g).join("-")),N)return N;if(b&&b.length>=g&&Lk(F,b)>=g-1)break;g--}d++}return go}function Rk(i){return!!(i&&i.match("^[^/\\\\]*$"))}function Da(i){var d=null,g;if(qe[i]===void 0&&e&&e.exports&&Rk(i))try{d=go._abbr,g=Qt,g("./locale/"+i),Ln(d)}catch{qe[i]=null}return qe[i]}function Ln(i,d){var g;return i&&(f(d)?g=pn(i):g=Pl(i,d),g?go=g:typeof console<"u"&&console.warn&&console.warn("Locale "+i+" not found. Did you forget to load it?")),go._abbr}function Pl(i,d){if(d!==null){var g,b=fh;if(d.abbr=i,qe[i]!=null)j("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=qe[i]._config;else if(d.parentLocale!=null)if(qe[d.parentLocale]!=null)b=qe[d.parentLocale]._config;else if(g=Da(d.parentLocale),g!=null)b=g._config;else return So[d.parentLocale]||(So[d.parentLocale]=[]),So[d.parentLocale].push({name:i,config:d}),null;return qe[i]=new Z(B(b,d)),So[i]&&So[i].forEach(function(N){Pl(N.name,N.config)}),Ln(i),qe[i]}else return delete qe[i],null}function Bk(i,d){if(d!=null){var g,b,N=fh;qe[i]!=null&&qe[i].parentLocale!=null?qe[i].set(B(qe[i]._config,d)):(b=Da(i),b!=null&&(N=b._config),d=B(N,d),b==null&&(d.abbr=i),g=new Z(d),g.parentLocale=qe[i],qe[i]=g),Ln(i)}else qe[i]!=null&&(qe[i].parentLocale!=null?(qe[i]=qe[i].parentLocale,i===Ln()&&Ln(i)):qe[i]!=null&&delete qe[i]);return qe[i]}function pn(i){var d;if(i&&i._locale&&i._locale._abbr&&(i=i._locale._abbr),!i)return go;if(!s(i)){if(d=Da(i),d)return d;i=[i]}return Ok(i)}function Pk(){return H(qe)}function Al(i){var d,g=i._a;return g&&T(i).overflow===-2&&(d=g[ln]<0||g[ln]>11?ln:g[en]<1||g[en]>Ll(g[ft],g[ln])?en:g[ot]<0||g[ot]>24||g[ot]===24&&(g[Ut]!==0||g[cn]!==0||g[er]!==0)?ot:g[Ut]<0||g[Ut]>59?Ut:g[cn]<0||g[cn]>59?cn:g[er]<0||g[er]>999?er:-1,T(i)._overflowDayOfYear&&(d<ft||d>en)&&(d=en),T(i)._overflowWeeks&&d===-1&&(d=$N),T(i)._overflowWeekday&&d===-1&&(d=KN),T(i).overflow=d),i}var Ak=/^\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)?)?$/,Fk=/^\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)?)?$/,Vk=/Z|[+-]\d\d(?::?\d\d)?/,Na=[["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]],Fl=[["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/]],$k=/^\/?Date\((-?\d+)/i,Kk=/^(?:(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}))$/,Hk={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 Sh(i){var d,g,b=i._i,N=Ak.exec(b)||Fk.exec(b),F,ee,fe,Ee,ke=Na.length,yt=Fl.length;if(N){for(T(i).iso=!0,d=0,g=ke;d<g;d++)if(Na[d][1].exec(N[1])){ee=Na[d][0],F=Na[d][2]!==!1;break}if(ee==null){i._isValid=!1;return}if(N[3]){for(d=0,g=yt;d<g;d++)if(Fl[d][1].exec(N[3])){fe=(N[2]||" ")+Fl[d][0];break}if(fe==null){i._isValid=!1;return}}if(!F&&fe!=null){i._isValid=!1;return}if(N[4])if(Vk.exec(N[4]))Ee="Z";else{i._isValid=!1;return}i._f=ee+(fe||"")+(Ee||""),$l(i)}else i._isValid=!1}function Wk(i,d,g,b,N,F){var ee=[Gk(i),ah.indexOf(d),parseInt(g,10),parseInt(b,10),parseInt(N,10)];return F&&ee.push(parseInt(F,10)),ee}function Gk(i){var d=parseInt(i,10);return d<=49?2e3+d:d<=999?1900+d:d}function Yk(i){return i.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Uk(i,d,g){if(i){var b=ph.indexOf(i),N=new Date(d[0],d[1],d[2]).getDay();if(b!==N)return T(g).weekdayMismatch=!0,g._isValid=!1,!1}return!0}function zk(i,d,g){if(i)return Hk[i];if(d)return 0;var b=parseInt(g,10),N=b%100,F=(b-N)/100;return F*60+N}function gh(i){var d=Kk.exec(Yk(i._i)),g;if(d){if(g=Wk(d[4],d[3],d[2],d[5],d[6],d[7]),!Uk(d[1],g,i))return;i._a=g,i._tzm=zk(d[8],d[9],d[10]),i._d=fo.apply(null,i._a),i._d.setUTCMinutes(i._d.getUTCMinutes()-i._tzm),T(i).rfc2822=!0}else i._isValid=!1}function jk(i){var d=$k.exec(i._i);if(d!==null){i._d=new Date(+d[1]);return}if(Sh(i),i._isValid===!1)delete i._isValid;else return;if(gh(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 Nr(i,d,g){return i??d??g}function qk(i){var d=new Date(r.now());return i._useUTC?[d.getUTCFullYear(),d.getUTCMonth(),d.getUTCDate()]:[d.getFullYear(),d.getMonth(),d.getDate()]}function Vl(i){var d,g,b=[],N,F,ee;if(!i._d){for(N=qk(i),i._w&&i._a[en]==null&&i._a[ln]==null&&Jk(i),i._dayOfYear!=null&&(ee=Nr(i._a[ft],N[ft]),(i._dayOfYear>uo(ee)||i._dayOfYear===0)&&(T(i)._overflowDayOfYear=!0),g=fo(ee,0,i._dayOfYear),i._a[ln]=g.getUTCMonth(),i._a[en]=g.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[ot]===24&&i._a[Ut]===0&&i._a[cn]===0&&i._a[er]===0&&(i._nextDay=!0,i._a[ot]=0),i._d=(i._useUTC?fo:nk).apply(null,b),F=i._useUTC?i._d.getUTCDay():i._d.getDay(),i._tzm!=null&&i._d.setUTCMinutes(i._d.getUTCMinutes()-i._tzm),i._nextDay&&(i._a[ot]=24),i._w&&typeof i._w.d<"u"&&i._w.d!==F&&(T(i).weekdayMismatch=!0)}}function Jk(i){var d,g,b,N,F,ee,fe,Ee,ke;d=i._w,d.GG!=null||d.W!=null||d.E!=null?(F=1,ee=4,g=Nr(d.GG,i._a[ft],ho(ze(),1,4).year),b=Nr(d.W,1),N=Nr(d.E,1),(N<1||N>7)&&(Ee=!0)):(F=i._locale._week.dow,ee=i._locale._week.doy,ke=ho(ze(),F,ee),g=Nr(d.gg,i._a[ft],ke.year),b=Nr(d.w,ke.week),d.d!=null?(N=d.d,(N<0||N>6)&&(Ee=!0)):d.e!=null?(N=d.e+F,(d.e<0||d.e>6)&&(Ee=!0)):N=F),b<1||b>dn(g,F,ee)?T(i)._overflowWeeks=!0:Ee!=null?T(i)._overflowWeekday=!0:(fe=dh(g,b,N,F,ee),i._a[ft]=fe.year,i._dayOfYear=fe.dayOfYear)}r.ISO_8601=function(){},r.RFC_2822=function(){};function $l(i){if(i._f===r.ISO_8601){Sh(i);return}if(i._f===r.RFC_2822){gh(i);return}i._a=[],T(i).empty=!0;var d=""+i._i,g,b,N,F,ee,fe=d.length,Ee=0,ke,yt;for(N=pe(i._f,i._locale).match(z)||[],yt=N.length,g=0;g<yt;g++)F=N[g],b=(d.match(Ml(F,i))||[])[0],b&&(ee=d.substr(0,d.indexOf(b)),ee.length>0&&T(i).unusedInput.push(ee),d=d.slice(d.indexOf(b)+b.length),Ee+=b.length),J[F]?(b?T(i).empty=!1:T(i).unusedTokens.push(F),VN(F,b,i)):i._strict&&!b&&T(i).unusedTokens.push(F);T(i).charsLeftOver=fe-Ee,d.length>0&&T(i).unusedInput.push(d),i._a[ot]<=12&&T(i).bigHour===!0&&i._a[ot]>0&&(T(i).bigHour=void 0),T(i).parsedDateParts=i._a.slice(0),T(i).meridiem=i._meridiem,i._a[ot]=Zk(i._locale,i._a[ot],i._meridiem),ke=T(i).era,ke!==null&&(i._a[ft]=i._locale.erasConvertYear(ke,i._a[ft])),Vl(i),Al(i)}function Zk(i,d,g){var b;return g==null?d:i.meridiemHour!=null?i.meridiemHour(d,g):(i.isPM!=null&&(b=i.isPM(g),b&&d<12&&(d+=12),!b&&d===12&&(d=0)),d)}function Xk(i){var d,g,b,N,F,ee,fe=!1,Ee=i._f.length;if(Ee===0){T(i).invalidFormat=!0,i._d=new Date(NaN);return}for(N=0;N<Ee;N++)F=0,ee=!1,d=P({},i),i._useUTC!=null&&(d._useUTC=i._useUTC),d._f=i._f[N],$l(d),D(d)&&(ee=!0),F+=T(d).charsLeftOver,F+=T(d).unusedTokens.length*10,T(d).score=F,fe?F<b&&(b=F,g=d):(b==null||F<b||ee)&&(b=F,g=d,ee&&(fe=!0));S(i,g||d)}function Qk(i){if(!i._d){var d=Se(i._i),g=d.day===void 0?d.date:d.day;i._a=h([d.year,d.month,g,d.hour,d.minute,d.second,d.millisecond],function(b){return b&&parseInt(b,10)}),Vl(i)}}function ex(i){var d=new G(Al(bh(i)));return d._nextDay&&(d.add(1,"d"),d._nextDay=void 0),d}function bh(i){var d=i._i,g=i._f;return i._locale=i._locale||pn(i._l),d===null||g===void 0&&d===""?M({nullInput:!0}):(typeof d=="string"&&(i._i=d=i._locale.preparse(d)),E(d)?new G(Al(d)):(u(d)?i._d=d:s(g)?Xk(i):g?$l(i):tx(i),D(i)||(i._d=null),i))}function tx(i){var d=i._i;f(d)?i._d=new Date(r.now()):u(d)?i._d=new Date(d.valueOf()):typeof d=="string"?jk(i):s(d)?(i._a=h(d.slice(0),function(g){return parseInt(g,10)}),Vl(i)):l(d)?Qk(i):m(d)?i._d=new Date(d):r.createFromInputFallback(i)}function vh(i,d,g,b,N){var F={};return(d===!0||d===!1)&&(b=d,d=void 0),(g===!0||g===!1)&&(b=g,g=void 0),(l(i)&&p(i)||s(i)&&i.length===0)&&(i=void 0),F._isAMomentObject=!0,F._useUTC=F._isUTC=N,F._l=g,F._i=i,F._f=d,F._strict=b,ex(F)}function ze(i,d,g,b){return vh(i,d,g,b,!1)}var nx=O("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var i=ze.apply(null,arguments);return this.isValid()&&i.isValid()?i<this?this:i:M()}),rx=O("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var i=ze.apply(null,arguments);return this.isValid()&&i.isValid()?i>this?this:i:M()});function yh(i,d){var g,b;if(d.length===1&&s(d[0])&&(d=d[0]),!d.length)return ze();for(g=d[0],b=1;b<d.length;++b)(!d[b].isValid()||d[b][i](g))&&(g=d[b]);return g}function ox(){var i=[].slice.call(arguments,0);return yh("isBefore",i)}function ax(){var i=[].slice.call(arguments,0);return yh("isAfter",i)}var sx=function(){return Date.now?Date.now():+new Date},bo=["year","quarter","month","week","day","hour","minute","second","millisecond"];function ix(i){var d,g=!1,b,N=bo.length;for(d in i)if(c(i,d)&&!(Je.call(bo,d)!==-1&&(i[d]==null||!isNaN(i[d]))))return!1;for(b=0;b<N;++b)if(i[bo[b]]){if(g)return!1;parseFloat(i[bo[b]])!==Ce(i[bo[b]])&&(g=!0)}return!0}function lx(){return this._isValid}function cx(){return zt(NaN)}function ka(i){var d=Se(i),g=d.year||0,b=d.quarter||0,N=d.month||0,F=d.week||d.isoWeek||0,ee=d.day||0,fe=d.hour||0,Ee=d.minute||0,ke=d.second||0,yt=d.millisecond||0;this._isValid=ix(d),this._milliseconds=+yt+ke*1e3+Ee*6e4+fe*1e3*60*60,this._days=+ee+F*7,this._months=+N+b*3+g*12,this._data={},this._locale=pn(),this._bubble()}function xa(i){return i instanceof ka}function Kl(i){return i<0?Math.round(-1*i)*-1:Math.round(i)}function dx(i,d,g){var b=Math.min(i.length,d.length),N=Math.abs(i.length-d.length),F=0,ee;for(ee=0;ee<b;ee++)Ce(i[ee])!==Ce(d[ee])&&F++;return F+N}function Th(i,d){V(i,0,0,function(){var g=this.utcOffset(),b="+";return g<0&&(g=-g,b="-"),b+$(~~(g/60),2)+d+$(~~g%60,2)})}Th("Z",":"),Th("ZZ",""),me("Z",mt),me("ZZ",mt),Ve(["Z","ZZ"],function(i,d,g){g._useUTC=!0,g._tzm=Hl(mt,i)});var px=/([\+\-]|\d\d)/gi;function Hl(i,d){var g=(d||"").match(i),b,N,F;return g===null?null:(b=g[g.length-1]||[],N=(b+"").match(px)||["-",0,0],F=+(N[1]*60)+Ce(N[2]),F===0?0:N[0]==="+"?F:-F)}function Wl(i,d){var g,b;return d._isUTC?(g=d.clone(),b=(E(i)||u(i)?i.valueOf():ze(i).valueOf())-g.valueOf(),g._d.setTime(g._d.valueOf()+b),r.updateOffset(g,!1),g):ze(i).local()}function Gl(i){return-Math.round(i._d.getTimezoneOffset())}r.updateOffset=function(){};function ux(i,d,g){var b=this._offset||0,N;if(!this.isValid())return i!=null?this:NaN;if(i!=null){if(typeof i=="string"){if(i=Hl(mt,i),i===null)return this}else Math.abs(i)<16&&!g&&(i=i*60);return!this._isUTC&&d&&(N=Gl(this)),this._offset=i,this._isUTC=!0,N!=null&&this.add(N,"m"),b!==i&&(!d||this._changeInProgress?Dh(this,zt(i-b,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,r.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?b:Gl(this)}function mx(i,d){return i!=null?(typeof i!="string"&&(i=-i),this.utcOffset(i,d),this):-this.utcOffset()}function fx(i){return this.utcOffset(0,i)}function hx(i){return this._isUTC&&(this.utcOffset(0,i),this._isUTC=!1,i&&this.subtract(Gl(this),"m")),this}function Sx(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var i=Hl(Ge,this._i);i!=null?this.utcOffset(i):this.utcOffset(0,!0)}return this}function gx(i){return this.isValid()?(i=i?ze(i).utcOffset():0,(this.utcOffset()-i)%60===0):!1}function bx(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function vx(){if(!f(this._isDSTShifted))return this._isDSTShifted;var i={},d;return P(i,this),i=bh(i),i._a?(d=i._isUTC?y(i._a):ze(i._a),this._isDSTShifted=this.isValid()&&dx(i._a,d.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function yx(){return this.isValid()?!this._isUTC:!1}function Tx(){return this.isValid()?this._isUTC:!1}function Eh(){return this.isValid()?this._isUTC&&this._offset===0:!1}var Ex=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,wx=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function zt(i,d){var g=i,b=null,N,F,ee;return xa(i)?g={ms:i._milliseconds,d:i._days,M:i._months}:m(i)||!isNaN(+i)?(g={},d?g[d]=+i:g.milliseconds=+i):(b=Ex.exec(i))?(N=b[1]==="-"?-1:1,g={y:0,d:Ce(b[en])*N,h:Ce(b[ot])*N,m:Ce(b[Ut])*N,s:Ce(b[cn])*N,ms:Ce(Kl(b[er]*1e3))*N}):(b=wx.exec(i))?(N=b[1]==="-"?-1:1,g={y:tr(b[2],N),M:tr(b[3],N),w:tr(b[4],N),d:tr(b[5],N),h:tr(b[6],N),m:tr(b[7],N),s:tr(b[8],N)}):g==null?g={}:typeof g=="object"&&("from"in g||"to"in g)&&(ee=Cx(ze(g.from),ze(g.to)),g={},g.ms=ee.milliseconds,g.M=ee.months),F=new ka(g),xa(i)&&c(i,"_locale")&&(F._locale=i._locale),xa(i)&&c(i,"_isValid")&&(F._isValid=i._isValid),F}zt.fn=ka.prototype,zt.invalid=cx;function tr(i,d){var g=i&&parseFloat(i.replace(",","."));return(isNaN(g)?0:g)*d}function wh(i,d){var g={};return g.months=d.month()-i.month()+(d.year()-i.year())*12,i.clone().add(g.months,"M").isAfter(d)&&--g.months,g.milliseconds=+d-+i.clone().add(g.months,"M"),g}function Cx(i,d){var g;return i.isValid()&&d.isValid()?(d=Wl(d,i),i.isBefore(d)?g=wh(i,d):(g=wh(d,i),g.milliseconds=-g.milliseconds,g.months=-g.months),g):{milliseconds:0,months:0}}function Ch(i,d){return function(g,b){var N,F;return b!==null&&!isNaN(+b)&&(j(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."),F=g,g=b,b=F),N=zt(g,b),Dh(this,N,i),this}}function Dh(i,d,g,b){var N=d._milliseconds,F=Kl(d._days),ee=Kl(d._months);i.isValid()&&(b=b??!0,ee&&ih(i,mo(i,"Month")+ee*g),F&&oh(i,"Date",mo(i,"Date")+F*g),N&&i._d.setTime(i._d.valueOf()+N*g),b&&r.updateOffset(i,F||ee))}var Dx=Ch(1,"add"),Nx=Ch(-1,"subtract");function Nh(i){return typeof i=="string"||i instanceof String}function kx(i){return E(i)||u(i)||Nh(i)||m(i)||Ix(i)||xx(i)||i===null||i===void 0}function xx(i){var d=l(i)&&!p(i),g=!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,F,ee=b.length;for(N=0;N<ee;N+=1)F=b[N],g=g||c(i,F);return d&&g}function Ix(i){var d=s(i),g=!1;return d&&(g=i.filter(function(b){return!m(b)&&Nh(i)}).length===0),d&&g}function Mx(i){var d=l(i)&&!p(i),g=!1,b=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],N,F;for(N=0;N<b.length;N+=1)F=b[N],g=g||c(i,F);return d&&g}function _x(i,d){var g=i.diff(d,"days",!0);return g<-6?"sameElse":g<-1?"lastWeek":g<0?"lastDay":g<1?"sameDay":g<2?"nextDay":g<7?"nextWeek":"sameElse"}function Lx(i,d){arguments.length===1&&(arguments[0]?kx(arguments[0])?(i=arguments[0],d=void 0):Mx(arguments[0])&&(d=arguments[0],i=void 0):(i=void 0,d=void 0));var g=i||ze(),b=Wl(g,this).startOf("day"),N=r.calendarFormat(this,b)||"sameElse",F=d&&(L(d[N])?d[N].call(this,g):d[N]);return this.format(F||this.localeData().calendar(N,this,ze(g)))}function Ox(){return new G(this)}function Rx(i,d){var g=E(i)?i:ze(i);return this.isValid()&&g.isValid()?(d=Ke(d)||"millisecond",d==="millisecond"?this.valueOf()>g.valueOf():g.valueOf()<this.clone().startOf(d).valueOf()):!1}function Bx(i,d){var g=E(i)?i:ze(i);return this.isValid()&&g.isValid()?(d=Ke(d)||"millisecond",d==="millisecond"?this.valueOf()<g.valueOf():this.clone().endOf(d).valueOf()<g.valueOf()):!1}function Px(i,d,g,b){var N=E(i)?i:ze(i),F=E(d)?d:ze(d);return this.isValid()&&N.isValid()&&F.isValid()?(b=b||"()",(b[0]==="("?this.isAfter(N,g):!this.isBefore(N,g))&&(b[1]===")"?this.isBefore(F,g):!this.isAfter(F,g))):!1}function Ax(i,d){var g=E(i)?i:ze(i),b;return this.isValid()&&g.isValid()?(d=Ke(d)||"millisecond",d==="millisecond"?this.valueOf()===g.valueOf():(b=g.valueOf(),this.clone().startOf(d).valueOf()<=b&&b<=this.clone().endOf(d).valueOf())):!1}function Fx(i,d){return this.isSame(i,d)||this.isAfter(i,d)}function Vx(i,d){return this.isSame(i,d)||this.isBefore(i,d)}function $x(i,d,g){var b,N,F;if(!this.isValid())return NaN;if(b=Wl(i,this),!b.isValid())return NaN;switch(N=(b.utcOffset()-this.utcOffset())*6e4,d=Ke(d),d){case"year":F=Ia(this,b)/12;break;case"month":F=Ia(this,b);break;case"quarter":F=Ia(this,b)/3;break;case"second":F=(this-b)/1e3;break;case"minute":F=(this-b)/6e4;break;case"hour":F=(this-b)/36e5;break;case"day":F=(this-b-N)/864e5;break;case"week":F=(this-b-N)/6048e5;break;default:F=this-b}return g?F:$t(F)}function Ia(i,d){if(i.date()<d.date())return-Ia(d,i);var g=(d.year()-i.year())*12+(d.month()-i.month()),b=i.clone().add(g,"months"),N,F;return d-b<0?(N=i.clone().add(g-1,"months"),F=(d-b)/(b-N)):(N=i.clone().add(g+1,"months"),F=(d-b)/(N-b)),-(g+F)||0}r.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",r.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function Kx(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function Hx(i){if(!this.isValid())return null;var d=i!==!0,g=d?this.clone().utc():this;return g.year()<0||g.year()>9999?te(g,d?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):L(Date.prototype.toISOString)?d?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",te(g,"Z")):te(g,d?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function Wx(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var i="moment",d="",g,b,N,F;return this.isLocal()||(i=this.utcOffset()===0?"moment.utc":"moment.parseZone",d="Z"),g="["+i+'("]',b=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",N="-MM-DD[T]HH:mm:ss.SSS",F=d+'[")]',this.format(g+b+N+F)}function Gx(i){i||(i=this.isUtc()?r.defaultFormatUtc:r.defaultFormat);var d=te(this,i);return this.localeData().postformat(d)}function Yx(i,d){return this.isValid()&&(E(i)&&i.isValid()||ze(i).isValid())?zt({to:this,from:i}).locale(this.locale()).humanize(!d):this.localeData().invalidDate()}function Ux(i){return this.from(ze(),i)}function zx(i,d){return this.isValid()&&(E(i)&&i.isValid()||ze(i).isValid())?zt({from:this,to:i}).locale(this.locale()).humanize(!d):this.localeData().invalidDate()}function jx(i){return this.to(ze(),i)}function kh(i){var d;return i===void 0?this._locale._abbr:(d=pn(i),d!=null&&(this._locale=d),this)}var xh=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 Ih(){return this._locale}var Ma=1e3,kr=60*Ma,_a=60*kr,Mh=(365*400+97)*24*_a;function xr(i,d){return(i%d+d)%d}function _h(i,d,g){return i<100&&i>=0?new Date(i+400,d,g)-Mh:new Date(i,d,g).valueOf()}function Lh(i,d,g){return i<100&&i>=0?Date.UTC(i+400,d,g)-Mh:Date.UTC(i,d,g)}function qx(i){var d,g;if(i=Ke(i),i===void 0||i==="millisecond"||!this.isValid())return this;switch(g=this._isUTC?Lh:_h,i){case"year":d=g(this.year(),0,1);break;case"quarter":d=g(this.year(),this.month()-this.month()%3,1);break;case"month":d=g(this.year(),this.month(),1);break;case"week":d=g(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":d=g(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":d=g(this.year(),this.month(),this.date());break;case"hour":d=this._d.valueOf(),d-=xr(d+(this._isUTC?0:this.utcOffset()*kr),_a);break;case"minute":d=this._d.valueOf(),d-=xr(d,kr);break;case"second":d=this._d.valueOf(),d-=xr(d,Ma);break}return this._d.setTime(d),r.updateOffset(this,!0),this}function Jx(i){var d,g;if(i=Ke(i),i===void 0||i==="millisecond"||!this.isValid())return this;switch(g=this._isUTC?Lh:_h,i){case"year":d=g(this.year()+1,0,1)-1;break;case"quarter":d=g(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":d=g(this.year(),this.month()+1,1)-1;break;case"week":d=g(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":d=g(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":d=g(this.year(),this.month(),this.date()+1)-1;break;case"hour":d=this._d.valueOf(),d+=_a-xr(d+(this._isUTC?0:this.utcOffset()*kr),_a)-1;break;case"minute":d=this._d.valueOf(),d+=kr-xr(d,kr)-1;break;case"second":d=this._d.valueOf(),d+=Ma-xr(d,Ma)-1;break}return this._d.setTime(d),r.updateOffset(this,!0),this}function Zx(){return this._d.valueOf()-(this._offset||0)*6e4}function Xx(){return Math.floor(this.valueOf()/1e3)}function Qx(){return new Date(this.valueOf())}function eI(){var i=this;return[i.year(),i.month(),i.date(),i.hour(),i.minute(),i.second(),i.millisecond()]}function tI(){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 nI(){return this.isValid()?this.toISOString():null}function rI(){return D(this)}function oI(){return S({},T(this))}function aI(){return T(this).overflow}function sI(){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"),me("N",Yl),me("NN",Yl),me("NNN",Yl),me("NNNN",gI),me("NNNNN",bI),Ve(["N","NN","NNN","NNNN","NNNNN"],function(i,d,g,b){var N=g._locale.erasParse(i,b,g._strict);N?T(g).era=N:T(g).invalidEra=i}),me("y",dt),me("yy",dt),me("yyy",dt),me("yyyy",dt),me("yo",vI),Ve(["y","yy","yyy","yyyy"],ft),Ve(["yo"],function(i,d,g,b){var N;g._locale._eraYearOrdinalRegex&&(N=i.match(g._locale._eraYearOrdinalRegex)),g._locale.eraYearOrdinalParse?d[ft]=g._locale.eraYearOrdinalParse(i,N):d[ft]=parseInt(i,10)});function iI(i,d){var g,b,N,F=this._eras||pn("en")._eras;for(g=0,b=F.length;g<b;++g){switch(typeof F[g].since){case"string":N=r(F[g].since).startOf("day"),F[g].since=N.valueOf();break}switch(typeof F[g].until){case"undefined":F[g].until=1/0;break;case"string":N=r(F[g].until).startOf("day").valueOf(),F[g].until=N.valueOf();break}}return F}function lI(i,d,g){var b,N,F=this.eras(),ee,fe,Ee;for(i=i.toUpperCase(),b=0,N=F.length;b<N;++b)if(ee=F[b].name.toUpperCase(),fe=F[b].abbr.toUpperCase(),Ee=F[b].narrow.toUpperCase(),g)switch(d){case"N":case"NN":case"NNN":if(fe===i)return F[b];break;case"NNNN":if(ee===i)return F[b];break;case"NNNNN":if(Ee===i)return F[b];break}else if([ee,fe,Ee].indexOf(i)>=0)return F[b]}function cI(i,d){var g=i.since<=i.until?1:-1;return d===void 0?r(i.since).year():r(i.since).year()+(d-i.offset)*g}function dI(){var i,d,g,b=this.localeData().eras();for(i=0,d=b.length;i<d;++i)if(g=this.clone().startOf("day").valueOf(),b[i].since<=g&&g<=b[i].until||b[i].until<=g&&g<=b[i].since)return b[i].name;return""}function pI(){var i,d,g,b=this.localeData().eras();for(i=0,d=b.length;i<d;++i)if(g=this.clone().startOf("day").valueOf(),b[i].since<=g&&g<=b[i].until||b[i].until<=g&&g<=b[i].since)return b[i].narrow;return""}function uI(){var i,d,g,b=this.localeData().eras();for(i=0,d=b.length;i<d;++i)if(g=this.clone().startOf("day").valueOf(),b[i].since<=g&&g<=b[i].until||b[i].until<=g&&g<=b[i].since)return b[i].abbr;return""}function mI(){var i,d,g,b,N=this.localeData().eras();for(i=0,d=N.length;i<d;++i)if(g=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())*g+N[i].offset;return this.year()}function fI(i){return c(this,"_erasNameRegex")||Ul.call(this),i?this._erasNameRegex:this._erasRegex}function hI(i){return c(this,"_erasAbbrRegex")||Ul.call(this),i?this._erasAbbrRegex:this._erasRegex}function SI(i){return c(this,"_erasNarrowRegex")||Ul.call(this),i?this._erasNarrowRegex:this._erasRegex}function Yl(i,d){return d.erasAbbrRegex(i)}function gI(i,d){return d.erasNameRegex(i)}function bI(i,d){return d.erasNarrowRegex(i)}function vI(i,d){return d._eraYearOrdinalRegex||dt}function Ul(){var i=[],d=[],g=[],b=[],N,F,ee,fe,Ee,ke=this.eras();for(N=0,F=ke.length;N<F;++N)ee=sn(ke[N].name),fe=sn(ke[N].abbr),Ee=sn(ke[N].narrow),d.push(ee),i.push(fe),g.push(Ee),b.push(ee),b.push(fe),b.push(Ee);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("^("+g.join("|")+")","i")}V(0,["gg",2],0,function(){return this.weekYear()%100}),V(0,["GG",2],0,function(){return this.isoWeekYear()%100});function La(i,d){V(0,[i,i.length],0,d)}La("gggg","weekYear"),La("ggggg","weekYear"),La("GGGG","isoWeekYear"),La("GGGGG","isoWeekYear"),me("G",vt),me("g",vt),me("GG",xe,ve),me("gg",xe,ve),me("GGGG",et,It),me("gggg",et,It),me("GGGGG",Oe,Ft),me("ggggg",Oe,Ft),po(["gggg","ggggg","GGGG","GGGGG"],function(i,d,g,b){d[b.substr(0,2)]=Ce(i)}),po(["gg","GG"],function(i,d,g,b){d[b]=r.parseTwoDigitYear(i)});function yI(i){return Oh.call(this,i,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function TI(i){return Oh.call(this,i,this.isoWeek(),this.isoWeekday(),1,4)}function EI(){return dn(this.year(),1,4)}function wI(){return dn(this.isoWeekYear(),1,4)}function CI(){var i=this.localeData()._week;return dn(this.year(),i.dow,i.doy)}function DI(){var i=this.localeData()._week;return dn(this.weekYear(),i.dow,i.doy)}function Oh(i,d,g,b,N){var F;return i==null?ho(this,b,N).year:(F=dn(i,b,N),d>F&&(d=F),NI.call(this,i,d,g,b,N))}function NI(i,d,g,b,N){var F=dh(i,d,g,b,N),ee=fo(F.year,0,F.dayOfYear);return this.year(ee.getUTCFullYear()),this.month(ee.getUTCMonth()),this.date(ee.getUTCDate()),this}V("Q",0,"Qo","quarter"),me("Q",Te),Ve("Q",function(i,d){d[ln]=(Ce(i)-1)*3});function kI(i){return i==null?Math.ceil((this.month()+1)/3):this.month((i-1)*3+this.month()%3)}V("D",["DD",2],"Do","date"),me("D",xe,ye),me("DD",xe,ve),me("Do",function(i,d){return i?d._dayOfMonthOrdinalParse||d._ordinalParse:d._dayOfMonthOrdinalParseLenient}),Ve(["D","DD"],en),Ve("Do",function(i,d){d[en]=Ce(i.match(xe)[0])});var Rh=Dr("Date",!0);V("DDD",["DDDD",3],"DDDo","dayOfYear"),me("DDD",Ne),me("DDDD",rt),Ve(["DDD","DDDD"],function(i,d,g){g._dayOfYear=Ce(i)});function xI(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"),me("m",xe,tt),me("mm",xe,ve),Ve(["m","mm"],Ut);var II=Dr("Minutes",!1);V("s",["ss",2],0,"second"),me("s",xe,tt),me("ss",xe,ve),Ve(["s","ss"],cn);var MI=Dr("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}),me("S",Ne,Te),me("SS",Ne,ve),me("SSS",Ne,rt);var On,Bh;for(On="SSSS";On.length<=9;On+="S")me(On,dt);function _I(i,d){d[er]=Ce(("0."+i)*1e3)}for(On="S";On.length<=9;On+="S")Ve(On,_I);Bh=Dr("Milliseconds",!1),V("z",0,0,"zoneAbbr"),V("zz",0,0,"zoneName");function LI(){return this._isUTC?"UTC":""}function OI(){return this._isUTC?"Coordinated Universal Time":""}var le=G.prototype;le.add=Dx,le.calendar=Lx,le.clone=Ox,le.diff=$x,le.endOf=Jx,le.format=Gx,le.from=Yx,le.fromNow=Ux,le.to=zx,le.toNow=jx,le.get=WN,le.invalidAt=aI,le.isAfter=Rx,le.isBefore=Bx,le.isBetween=Px,le.isSame=Ax,le.isSameOrAfter=Fx,le.isSameOrBefore=Vx,le.isValid=rI,le.lang=xh,le.locale=kh,le.localeData=Ih,le.max=rx,le.min=nx,le.parsingFlags=oI,le.set=GN,le.startOf=qx,le.subtract=Nx,le.toArray=eI,le.toObject=tI,le.toDate=Qx,le.toISOString=Hx,le.inspect=Wx,typeof Symbol<"u"&&Symbol.for!=null&&(le[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),le.toJSON=nI,le.toString=Kx,le.unix=Xx,le.valueOf=Zx,le.creationData=sI,le.eraName=dI,le.eraNarrow=pI,le.eraAbbr=uI,le.eraYear=mI,le.year=rh,le.isLeapYear=HN,le.weekYear=yI,le.isoWeekYear=TI,le.quarter=le.quarters=kI,le.month=lh,le.daysInMonth=QN,le.week=le.weeks=ik,le.isoWeek=le.isoWeeks=lk,le.weeksInYear=CI,le.weeksInWeekYear=DI,le.isoWeeksInYear=EI,le.isoWeeksInISOWeekYear=wI,le.date=Rh,le.day=le.days=Tk,le.weekday=Ek,le.isoWeekday=wk,le.dayOfYear=xI,le.hour=le.hours=Mk,le.minute=le.minutes=II,le.second=le.seconds=MI,le.millisecond=le.milliseconds=Bh,le.utcOffset=ux,le.utc=fx,le.local=hx,le.parseZone=Sx,le.hasAlignedHourOffset=gx,le.isDST=bx,le.isLocal=yx,le.isUtcOffset=Tx,le.isUtc=Eh,le.isUTC=Eh,le.zoneAbbr=LI,le.zoneName=OI,le.dates=O("dates accessor is deprecated. Use date instead.",Rh),le.months=O("months accessor is deprecated. Use month instead",lh),le.years=O("years accessor is deprecated. Use year instead",rh),le.zone=O("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",mx),le.isDSTShifted=O("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",vx);function RI(i){return ze(i*1e3)}function BI(){return ze.apply(null,arguments).parseZone()}function Ph(i){return i}var Re=Z.prototype;Re.calendar=ae,Re.longDateFormat=Q,Re.invalidDate=we,Re.ordinal=lt,Re.preparse=Ph,Re.postformat=Ph,Re.relativeTime=Xe,Re.pastFuture=At,Re.set=re,Re.eras=iI,Re.erasParse=lI,Re.erasConvertYear=cI,Re.erasAbbrRegex=hI,Re.erasNameRegex=fI,Re.erasNarrowRegex=SI,Re.months=qN,Re.monthsShort=JN,Re.monthsParse=XN,Re.monthsRegex=tk,Re.monthsShortRegex=ek,Re.week=rk,Re.firstDayOfYear=sk,Re.firstDayOfWeek=ak,Re.weekdays=Sk,Re.weekdaysMin=bk,Re.weekdaysShort=gk,Re.weekdaysParse=yk,Re.weekdaysRegex=Ck,Re.weekdaysShortRegex=Dk,Re.weekdaysMinRegex=Nk,Re.isPM=xk,Re.meridiem=_k;function Oa(i,d,g,b){var N=pn(),F=y().set(b,d);return N[g](F,i)}function Ah(i,d,g){if(m(i)&&(d=i,i=void 0),i=i||"",d!=null)return Oa(i,d,g,"month");var b,N=[];for(b=0;b<12;b++)N[b]=Oa(i,b,g,"month");return N}function zl(i,d,g,b){typeof i=="boolean"?(m(d)&&(g=d,d=void 0),d=d||""):(d=i,g=d,i=!1,m(d)&&(g=d,d=void 0),d=d||"");var N=pn(),F=i?N._week.dow:0,ee,fe=[];if(g!=null)return Oa(d,(g+F)%7,b,"day");for(ee=0;ee<7;ee++)fe[ee]=Oa(d,(ee+F)%7,b,"day");return fe}function PI(i,d){return Ah(i,d,"months")}function AI(i,d){return Ah(i,d,"monthsShort")}function FI(i,d,g){return zl(i,d,g,"weekdays")}function VI(i,d,g){return zl(i,d,g,"weekdaysShort")}function $I(i,d,g){return zl(i,d,g,"weekdaysMin")}Ln("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,g=Ce(i%100/10)===1?"th":d===1?"st":d===2?"nd":d===3?"rd":"th";return i+g}}),r.lang=O("moment.lang is deprecated. Use moment.locale instead.",Ln),r.langData=O("moment.langData is deprecated. Use moment.localeData instead.",pn);var un=Math.abs;function KI(){var i=this._data;return this._milliseconds=un(this._milliseconds),this._days=un(this._days),this._months=un(this._months),i.milliseconds=un(i.milliseconds),i.seconds=un(i.seconds),i.minutes=un(i.minutes),i.hours=un(i.hours),i.months=un(i.months),i.years=un(i.years),this}function Fh(i,d,g,b){var N=zt(d,g);return i._milliseconds+=b*N._milliseconds,i._days+=b*N._days,i._months+=b*N._months,i._bubble()}function HI(i,d){return Fh(this,i,d,1)}function WI(i,d){return Fh(this,i,d,-1)}function Vh(i){return i<0?Math.floor(i):Math.ceil(i)}function GI(){var i=this._milliseconds,d=this._days,g=this._months,b=this._data,N,F,ee,fe,Ee;return i>=0&&d>=0&&g>=0||i<=0&&d<=0&&g<=0||(i+=Vh(jl(g)+d)*864e5,d=0,g=0),b.milliseconds=i%1e3,N=$t(i/1e3),b.seconds=N%60,F=$t(N/60),b.minutes=F%60,ee=$t(F/60),b.hours=ee%24,d+=$t(ee/24),Ee=$t($h(d)),g+=Ee,d-=Vh(jl(Ee)),fe=$t(g/12),g%=12,b.days=d,b.months=g,b.years=fe,this}function $h(i){return i*4800/146097}function jl(i){return i*146097/4800}function YI(i){if(!this.isValid())return NaN;var d,g,b=this._milliseconds;if(i=Ke(i),i==="month"||i==="quarter"||i==="year")switch(d=this._days+b/864e5,g=this._months+$h(d),i){case"month":return g;case"quarter":return g/3;case"year":return g/12}else switch(d=this._days+Math.round(jl(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 mn(i){return function(){return this.as(i)}}var Kh=mn("ms"),UI=mn("s"),zI=mn("m"),jI=mn("h"),qI=mn("d"),JI=mn("w"),ZI=mn("M"),XI=mn("Q"),QI=mn("y"),eM=Kh;function tM(){return zt(this)}function nM(i){return i=Ke(i),this.isValid()?this[i+"s"]():NaN}function nr(i){return function(){return this.isValid()?this._data[i]:NaN}}var rM=nr("milliseconds"),oM=nr("seconds"),aM=nr("minutes"),sM=nr("hours"),iM=nr("days"),lM=nr("months"),cM=nr("years");function dM(){return $t(this.days()/7)}var fn=Math.round,Ir={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function pM(i,d,g,b,N){return N.relativeTime(d||1,!!g,i,b)}function uM(i,d,g,b){var N=zt(i).abs(),F=fn(N.as("s")),ee=fn(N.as("m")),fe=fn(N.as("h")),Ee=fn(N.as("d")),ke=fn(N.as("M")),yt=fn(N.as("w")),hn=fn(N.as("y")),Rn=F<=g.ss&&["s",F]||F<g.s&&["ss",F]||ee<=1&&["m"]||ee<g.m&&["mm",ee]||fe<=1&&["h"]||fe<g.h&&["hh",fe]||Ee<=1&&["d"]||Ee<g.d&&["dd",Ee];return g.w!=null&&(Rn=Rn||yt<=1&&["w"]||yt<g.w&&["ww",yt]),Rn=Rn||ke<=1&&["M"]||ke<g.M&&["MM",ke]||hn<=1&&["y"]||["yy",hn],Rn[2]=d,Rn[3]=+i>0,Rn[4]=b,pM.apply(null,Rn)}function mM(i){return i===void 0?fn:typeof i=="function"?(fn=i,!0):!1}function fM(i,d){return Ir[i]===void 0?!1:d===void 0?Ir[i]:(Ir[i]=d,i==="s"&&(Ir.ss=d-1),!0)}function hM(i,d){if(!this.isValid())return this.localeData().invalidDate();var g=!1,b=Ir,N,F;return typeof i=="object"&&(d=i,i=!1),typeof i=="boolean"&&(g=i),typeof d=="object"&&(b=Object.assign({},Ir,d),d.s!=null&&d.ss==null&&(b.ss=d.s-1)),N=this.localeData(),F=uM(this,!g,b,N),g&&(F=N.pastFuture(+this,F)),N.postformat(F)}var ql=Math.abs;function Mr(i){return(i>0)-(i<0)||+i}function Ra(){if(!this.isValid())return this.localeData().invalidDate();var i=ql(this._milliseconds)/1e3,d=ql(this._days),g=ql(this._months),b,N,F,ee,fe=this.asSeconds(),Ee,ke,yt,hn;return fe?(b=$t(i/60),N=$t(b/60),i%=60,b%=60,F=$t(g/12),g%=12,ee=i?i.toFixed(3).replace(/\.?0+$/,""):"",Ee=fe<0?"-":"",ke=Mr(this._months)!==Mr(fe)?"-":"",yt=Mr(this._days)!==Mr(fe)?"-":"",hn=Mr(this._milliseconds)!==Mr(fe)?"-":"",Ee+"P"+(F?ke+F+"Y":"")+(g?ke+g+"M":"")+(d?yt+d+"D":"")+(N||b||i?"T":"")+(N?hn+N+"H":"")+(b?hn+b+"M":"")+(i?hn+ee+"S":"")):"P0D"}var Ie=ka.prototype;Ie.isValid=lx,Ie.abs=KI,Ie.add=HI,Ie.subtract=WI,Ie.as=YI,Ie.asMilliseconds=Kh,Ie.asSeconds=UI,Ie.asMinutes=zI,Ie.asHours=jI,Ie.asDays=qI,Ie.asWeeks=JI,Ie.asMonths=ZI,Ie.asQuarters=XI,Ie.asYears=QI,Ie.valueOf=eM,Ie._bubble=GI,Ie.clone=tM,Ie.get=nM,Ie.milliseconds=rM,Ie.seconds=oM,Ie.minutes=aM,Ie.hours=sM,Ie.days=iM,Ie.weeks=dM,Ie.months=lM,Ie.years=cM,Ie.humanize=hM,Ie.toISOString=Ra,Ie.toString=Ra,Ie.toJSON=Ra,Ie.locale=kh,Ie.localeData=Ih,Ie.toIsoString=O("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Ra),Ie.lang=xh,V("X",0,0,"unix"),V("x",0,0,"valueOf"),me("x",vt),me("X",_n),Ve("X",function(i,d,g){g._d=new Date(parseFloat(i)*1e3)}),Ve("x",function(i,d,g){g._d=new Date(Ce(i))});//! moment.js
|
|
1977
|
+
`+new Error().stack),g=!1}return d.apply(this,arguments)},d)}var P={};function z(i,d){r.deprecationHandler!=null&&r.deprecationHandler(i,d),P[i]||(R(d),P[i]=!0)}r.suppressDeprecationWarnings=!1,r.deprecationHandler=null;function L(i){return typeof Function<"u"&&i instanceof Function||Object.prototype.toString.call(i)==="[object Function]"}function re(i){var d,g;for(g in i)c(i,g)&&(d=i[g],L(d)?this[g]=d:this["_"+g]=d);this._config=i,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function B(i,d){var g=S({},i),b;for(b in d)c(d,b)&&(l(i[b])&&l(d[b])?(g[b]={},S(g[b],i[b]),S(g[b],d[b])):d[b]!=null?g[b]=d[b]:delete g[b]);for(b in i)c(i,b)&&!c(d,b)&&l(i[b])&&(g[b]=S({},g[b]));return g}function Z(i){i!=null&&this.set(i)}var H;Object.keys?H=Object.keys:H=function(i){var d,g=[];for(d in i)c(i,d)&&g.push(d);return g};var q={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function ae(i,d,g){var b=this._calendar[i]||this._calendar.sameElse;return L(b)?b.call(d,g):b}function $(i,d,g){var b=""+Math.abs(i),N=d-b.length,F=i>=0;return(F?g?"+":"":"-")+Math.pow(10,Math.max(0,N)).toString().substr(1)+b}var j=/(\[[^\[]*\])|(\\)?([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,oe=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,ie={},J={};function V(i,d,g,b){var N=b;typeof b=="string"&&(N=function(){return this[b]()}),i&&(J[i]=N),d&&(J[d[0]]=function(){return $(N.apply(this,arguments),d[1],d[2])}),g&&(J[g]=function(){return this.localeData().ordinal(N.apply(this,arguments),i)})}function W(i){return i.match(/\[[\s\S]/)?i.replace(/^\[|\]$/g,""):i.replace(/\\/g,"")}function X(i){var d=i.match(j),g,b;for(g=0,b=d.length;g<b;g++)J[d[g]]?d[g]=J[d[g]]:d[g]=W(d[g]);return function(N){var F="",ee;for(ee=0;ee<b;ee++)F+=L(d[ee])?d[ee].call(N,i):d[ee];return F}}function te(i,d){return i.isValid()?(d=pe(d,i.localeData()),ie[d]=ie[d]||X(d),ie[d](i)):i.localeData().invalidDate()}function pe(i,d){var g=5;function b(N){return d.longDateFormat(N)||N}for(oe.lastIndex=0;g>=0&&oe.test(i);)i=i.replace(oe,b),oe.lastIndex=0,g-=1;return i}var ce={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 Q(i){var d=this._longDateFormat[i],g=this._longDateFormat[i.toUpperCase()];return d||!g?d:(this._longDateFormat[i]=g.match(j).map(function(b){return b==="MMMM"||b==="MM"||b==="DD"||b==="dddd"?b.slice(1):b}).join(""),this._longDateFormat[i])}var se="Invalid date";function we(){return this._invalidDate}var Le="%d",wt=/\d{1,2}/;function lt(i){return this._ordinal.replace("%d",i)}var ct={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 Xe(i,d,g,b){var N=this._relativeTime[g];return L(N)?N(i,d,g,b):N.replace(/%d/i,i)}function At(i,d){var g=this._relativeTime[i>0?"future":"past"];return L(g)?g(d):g.replace(/%s/i,d)}var Qe={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 Ke(i){return typeof i=="string"?Qe[i]||Qe[i.toLowerCase()]:void 0}function Se(i){var d={},g,b;for(b in i)c(i,b)&&(g=Ke(b),g&&(d[g]=i[b]));return d}var Ue={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 We(i){var d=[],g;for(g in i)c(i,g)&&d.push({unit:g,priority:Ue[g]});return d.sort(function(b,N){return b.priority-N.priority}),d}var Te=/\d/,ve=/\d\d/,rt=/\d{3}/,It=/\d{4}/,Ft=/[+-]?\d{6}/,xe=/\d\d?/,de=/\d\d\d\d?/,De=/\d\d\d\d\d\d?/,Ne=/\d{1,3}/,et=/\d{1,4}/,Oe=/[+-]?\d{1,6}/,dt=/\d+/,vt=/[+-]?\d+/,Ge=/Z|[+-]\d\d:?\d\d/gi,mt=/Z|[+-]\d\d(?::?\d\d)?/gi,_n=/[+-]?\d+(\.\d{1,3})?/,he=/[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,ye=/^[1-9]\d?/,tt=/^([1-9]\d|\d)/,Vt;Vt={};function me(i,d,g){Vt[i]=L(d)?d:function(b,N){return b&&g?g:d}}function Ml(i,d){return c(Vt,i)?Vt[i](d._strict,d._locale):new RegExp(FN(i))}function FN(i){return sn(i.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(d,g,b,N,F){return g||b||N||F}))}function sn(i){return i.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function $t(i){return i<0?Math.ceil(i)||0:Math.floor(i)}function Ce(i){var d=+i,g=0;return d!==0&&isFinite(d)&&(g=$t(d)),g}var _l={};function $e(i,d){var g,b=d,N;for(typeof i=="string"&&(i=[i]),m(d)&&(b=function(F,ee){ee[d]=Ce(F)}),N=i.length,g=0;g<N;g++)_l[i[g]]=b}function po(i,d){$e(i,function(g,b,N,F){N._w=N._w||{},d(g,N._w,N,F)})}function VN(i,d,g){d!=null&&c(_l,i)&&_l[i](d,g._a,g,i)}function wa(i){return i%4===0&&i%100!==0||i%400===0}var ft=0,ln=1,en=2,ot=3,Ut=4,cn=5,er=6,$N=7,KN=8;V("Y",0,0,function(){var i=this.year();return i<=9999?$(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"),me("Y",vt),me("YY",xe,ve),me("YYYY",et,It),me("YYYYY",Oe,Ft),me("YYYYYY",Oe,Ft),$e(["YYYYY","YYYYYY"],ft),$e("YYYY",function(i,d){d[ft]=i.length===2?r.parseTwoDigitYear(i):Ce(i)}),$e("YY",function(i,d){d[ft]=r.parseTwoDigitYear(i)}),$e("Y",function(i,d){d[ft]=parseInt(i,10)});function uo(i){return wa(i)?366:365}r.parseTwoDigitYear=function(i){return Ce(i)+(Ce(i)>68?1900:2e3)};var rh=Dr("FullYear",!0);function HN(){return wa(this.year())}function Dr(i,d){return function(g){return g!=null?(oh(this,i,g),r.updateOffset(this,d),this):mo(this,i)}}function mo(i,d){if(!i.isValid())return NaN;var g=i._d,b=i._isUTC;switch(d){case"Milliseconds":return b?g.getUTCMilliseconds():g.getMilliseconds();case"Seconds":return b?g.getUTCSeconds():g.getSeconds();case"Minutes":return b?g.getUTCMinutes():g.getMinutes();case"Hours":return b?g.getUTCHours():g.getHours();case"Date":return b?g.getUTCDate():g.getDate();case"Day":return b?g.getUTCDay():g.getDay();case"Month":return b?g.getUTCMonth():g.getMonth();case"FullYear":return b?g.getUTCFullYear():g.getFullYear();default:return NaN}}function oh(i,d,g){var b,N,F,ee,fe;if(!(!i.isValid()||isNaN(g))){switch(b=i._d,N=i._isUTC,d){case"Milliseconds":return void(N?b.setUTCMilliseconds(g):b.setMilliseconds(g));case"Seconds":return void(N?b.setUTCSeconds(g):b.setSeconds(g));case"Minutes":return void(N?b.setUTCMinutes(g):b.setMinutes(g));case"Hours":return void(N?b.setUTCHours(g):b.setHours(g));case"Date":return void(N?b.setUTCDate(g):b.setDate(g));case"FullYear":break;default:return}F=g,ee=i.month(),fe=i.date(),fe=fe===29&&ee===1&&!wa(F)?28:fe,N?b.setUTCFullYear(F,ee,fe):b.setFullYear(F,ee,fe)}}function WN(i){return i=Ke(i),L(this[i])?this[i]():this}function GN(i,d){if(typeof i=="object"){i=Se(i);var g=We(i),b,N=g.length;for(b=0;b<N;b++)this[g[b].unit](i[g[b].unit])}else if(i=Ke(i),L(this[i]))return this[i](d);return this}function YN(i,d){return(i%d+d)%d}var Je;Array.prototype.indexOf?Je=Array.prototype.indexOf:Je=function(i){var d;for(d=0;d<this.length;++d)if(this[d]===i)return d;return-1};function Ll(i,d){if(isNaN(i)||isNaN(d))return NaN;var g=YN(d,12);return i+=(d-g)/12,g===1?wa(i)?29:28:31-g%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)}),me("M",xe,ye),me("MM",xe,ve),me("MMM",function(i,d){return d.monthsShortRegex(i)}),me("MMMM",function(i,d){return d.monthsRegex(i)}),$e(["M","MM"],function(i,d){d[ln]=Ce(i)-1}),$e(["MMM","MMMM"],function(i,d,g,b){var N=g._locale.monthsParse(i,b,g._strict);N!=null?d[ln]=N:T(g).invalidMonth=i});var UN="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ah="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),sh=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,zN=he,jN=he;function qN(i,d){return i?s(this._months)?this._months[i.month()]:this._months[(this._months.isFormat||sh).test(d)?"format":"standalone"][i.month()]:s(this._months)?this._months:this._months.standalone}function JN(i,d){return i?s(this._monthsShort)?this._monthsShort[i.month()]:this._monthsShort[sh.test(d)?"format":"standalone"][i.month()]:s(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function ZN(i,d,g){var b,N,F,ee=i.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],b=0;b<12;++b)F=y([2e3,b]),this._shortMonthsParse[b]=this.monthsShort(F,"").toLocaleLowerCase(),this._longMonthsParse[b]=this.months(F,"").toLocaleLowerCase();return g?d==="MMM"?(N=Je.call(this._shortMonthsParse,ee),N!==-1?N:null):(N=Je.call(this._longMonthsParse,ee),N!==-1?N:null):d==="MMM"?(N=Je.call(this._shortMonthsParse,ee),N!==-1?N:(N=Je.call(this._longMonthsParse,ee),N!==-1?N:null)):(N=Je.call(this._longMonthsParse,ee),N!==-1?N:(N=Je.call(this._shortMonthsParse,ee),N!==-1?N:null))}function XN(i,d,g){var b,N,F;if(this._monthsParseExact)return ZN.call(this,i,d,g);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),b=0;b<12;b++){if(N=y([2e3,b]),g&&!this._longMonthsParse[b]&&(this._longMonthsParse[b]=new RegExp("^"+this.months(N,"").replace(".","")+"$","i"),this._shortMonthsParse[b]=new RegExp("^"+this.monthsShort(N,"").replace(".","")+"$","i")),!g&&!this._monthsParse[b]&&(F="^"+this.months(N,"")+"|^"+this.monthsShort(N,""),this._monthsParse[b]=new RegExp(F.replace(".",""),"i")),g&&d==="MMMM"&&this._longMonthsParse[b].test(i))return b;if(g&&d==="MMM"&&this._shortMonthsParse[b].test(i))return b;if(!g&&this._monthsParse[b].test(i))return b}}function ih(i,d){if(!i.isValid())return i;if(typeof d=="string"){if(/^\d+$/.test(d))d=Ce(d);else if(d=i.localeData().monthsParse(d),!m(d))return i}var g=d,b=i.date();return b=b<29?b:Math.min(b,Ll(i.year(),g)),i._isUTC?i._d.setUTCMonth(g,b):i._d.setMonth(g,b),i}function lh(i){return i!=null?(ih(this,i),r.updateOffset(this,!0),this):mo(this,"Month")}function QN(){return Ll(this.year(),this.month())}function ek(i){return this._monthsParseExact?(c(this,"_monthsRegex")||ch.call(this),i?this._monthsShortStrictRegex:this._monthsShortRegex):(c(this,"_monthsShortRegex")||(this._monthsShortRegex=zN),this._monthsShortStrictRegex&&i?this._monthsShortStrictRegex:this._monthsShortRegex)}function tk(i){return this._monthsParseExact?(c(this,"_monthsRegex")||ch.call(this),i?this._monthsStrictRegex:this._monthsRegex):(c(this,"_monthsRegex")||(this._monthsRegex=jN),this._monthsStrictRegex&&i?this._monthsStrictRegex:this._monthsRegex)}function ch(){function i(Ee,ke){return ke.length-Ee.length}var d=[],g=[],b=[],N,F,ee,fe;for(N=0;N<12;N++)F=y([2e3,N]),ee=sn(this.monthsShort(F,"")),fe=sn(this.months(F,"")),d.push(ee),g.push(fe),b.push(fe),b.push(ee);d.sort(i),g.sort(i),b.sort(i),this._monthsRegex=new RegExp("^("+b.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+g.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+d.join("|")+")","i")}function nk(i,d,g,b,N,F,ee){var fe;return i<100&&i>=0?(fe=new Date(i+400,d,g,b,N,F,ee),isFinite(fe.getFullYear())&&fe.setFullYear(i)):fe=new Date(i,d,g,b,N,F,ee),fe}function fo(i){var d,g;return i<100&&i>=0?(g=Array.prototype.slice.call(arguments),g[0]=i+400,d=new Date(Date.UTC.apply(null,g)),isFinite(d.getUTCFullYear())&&d.setUTCFullYear(i)):d=new Date(Date.UTC.apply(null,arguments)),d}function Ca(i,d,g){var b=7+d-g,N=(7+fo(i,0,b).getUTCDay()-d)%7;return-N+b-1}function dh(i,d,g,b,N){var F=(7+g-b)%7,ee=Ca(i,b,N),fe=1+7*(d-1)+F+ee,Ee,ke;return fe<=0?(Ee=i-1,ke=uo(Ee)+fe):fe>uo(i)?(Ee=i+1,ke=fe-uo(i)):(Ee=i,ke=fe),{year:Ee,dayOfYear:ke}}function ho(i,d,g){var b=Ca(i.year(),d,g),N=Math.floor((i.dayOfYear()-b-1)/7)+1,F,ee;return N<1?(ee=i.year()-1,F=N+dn(ee,d,g)):N>dn(i.year(),d,g)?(F=N-dn(i.year(),d,g),ee=i.year()+1):(ee=i.year(),F=N),{week:F,year:ee}}function dn(i,d,g){var b=Ca(i,d,g),N=Ca(i+1,d,g);return(uo(i)-b+N)/7}V("w",["ww",2],"wo","week"),V("W",["WW",2],"Wo","isoWeek"),me("w",xe,ye),me("ww",xe,ve),me("W",xe,ye),me("WW",xe,ve),po(["w","ww","W","WW"],function(i,d,g,b){d[b.substr(0,1)]=Ce(i)});function rk(i){return ho(i,this._week.dow,this._week.doy).week}var ok={dow:0,doy:6};function ak(){return this._week.dow}function sk(){return this._week.doy}function ik(i){var d=this.localeData().week(this);return i==null?d:this.add((i-d)*7,"d")}function lk(i){var d=ho(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"),me("d",xe),me("e",xe),me("E",xe),me("dd",function(i,d){return d.weekdaysMinRegex(i)}),me("ddd",function(i,d){return d.weekdaysShortRegex(i)}),me("dddd",function(i,d){return d.weekdaysRegex(i)}),po(["dd","ddd","dddd"],function(i,d,g,b){var N=g._locale.weekdaysParse(i,b,g._strict);N!=null?d.d=N:T(g).invalidWeekday=i}),po(["d","e","E"],function(i,d,g,b){d[b]=Ce(i)});function ck(i,d){return typeof i!="string"?i:isNaN(i)?(i=d.weekdaysParse(i),typeof i=="number"?i:null):parseInt(i,10)}function dk(i,d){return typeof i=="string"?d.weekdaysParse(i)%7||7:isNaN(i)?null:i}function Ol(i,d){return i.slice(d,7).concat(i.slice(0,d))}var pk="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),ph="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),uk="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),mk=he,fk=he,hk=he;function Sk(i,d){var g=s(this._weekdays)?this._weekdays:this._weekdays[i&&i!==!0&&this._weekdays.isFormat.test(d)?"format":"standalone"];return i===!0?Ol(g,this._week.dow):i?g[i.day()]:g}function gk(i){return i===!0?Ol(this._weekdaysShort,this._week.dow):i?this._weekdaysShort[i.day()]:this._weekdaysShort}function bk(i){return i===!0?Ol(this._weekdaysMin,this._week.dow):i?this._weekdaysMin[i.day()]:this._weekdaysMin}function vk(i,d,g){var b,N,F,ee=i.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],b=0;b<7;++b)F=y([2e3,1]).day(b),this._minWeekdaysParse[b]=this.weekdaysMin(F,"").toLocaleLowerCase(),this._shortWeekdaysParse[b]=this.weekdaysShort(F,"").toLocaleLowerCase(),this._weekdaysParse[b]=this.weekdays(F,"").toLocaleLowerCase();return g?d==="dddd"?(N=Je.call(this._weekdaysParse,ee),N!==-1?N:null):d==="ddd"?(N=Je.call(this._shortWeekdaysParse,ee),N!==-1?N:null):(N=Je.call(this._minWeekdaysParse,ee),N!==-1?N:null):d==="dddd"?(N=Je.call(this._weekdaysParse,ee),N!==-1||(N=Je.call(this._shortWeekdaysParse,ee),N!==-1)?N:(N=Je.call(this._minWeekdaysParse,ee),N!==-1?N:null)):d==="ddd"?(N=Je.call(this._shortWeekdaysParse,ee),N!==-1||(N=Je.call(this._weekdaysParse,ee),N!==-1)?N:(N=Je.call(this._minWeekdaysParse,ee),N!==-1?N:null)):(N=Je.call(this._minWeekdaysParse,ee),N!==-1||(N=Je.call(this._weekdaysParse,ee),N!==-1)?N:(N=Je.call(this._shortWeekdaysParse,ee),N!==-1?N:null))}function yk(i,d,g){var b,N,F;if(this._weekdaysParseExact)return vk.call(this,i,d,g);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),b=0;b<7;b++){if(N=y([2e3,1]).day(b),g&&!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]||(F="^"+this.weekdays(N,"")+"|^"+this.weekdaysShort(N,"")+"|^"+this.weekdaysMin(N,""),this._weekdaysParse[b]=new RegExp(F.replace(".",""),"i")),g&&d==="dddd"&&this._fullWeekdaysParse[b].test(i))return b;if(g&&d==="ddd"&&this._shortWeekdaysParse[b].test(i))return b;if(g&&d==="dd"&&this._minWeekdaysParse[b].test(i))return b;if(!g&&this._weekdaysParse[b].test(i))return b}}function Tk(i){if(!this.isValid())return i!=null?this:NaN;var d=mo(this,"Day");return i!=null?(i=ck(i,this.localeData()),this.add(i-d,"d")):d}function Ek(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 wk(i){if(!this.isValid())return i!=null?this:NaN;if(i!=null){var d=dk(i,this.localeData());return this.day(this.day()%7?d:d-7)}else return this.day()||7}function Ck(i){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||Rl.call(this),i?this._weekdaysStrictRegex:this._weekdaysRegex):(c(this,"_weekdaysRegex")||(this._weekdaysRegex=mk),this._weekdaysStrictRegex&&i?this._weekdaysStrictRegex:this._weekdaysRegex)}function Dk(i){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||Rl.call(this),i?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(c(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=fk),this._weekdaysShortStrictRegex&&i?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Nk(i){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||Rl.call(this),i?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(c(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=hk),this._weekdaysMinStrictRegex&&i?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Rl(){function i(yt,hn){return hn.length-yt.length}var d=[],g=[],b=[],N=[],F,ee,fe,Ee,ke;for(F=0;F<7;F++)ee=y([2e3,1]).day(F),fe=sn(this.weekdaysMin(ee,"")),Ee=sn(this.weekdaysShort(ee,"")),ke=sn(this.weekdays(ee,"")),d.push(fe),g.push(Ee),b.push(ke),N.push(fe),N.push(Ee),N.push(ke);d.sort(i),g.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("^("+g.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+d.join("|")+")","i")}function Bl(){return this.hours()%12||12}function kk(){return this.hours()||24}V("H",["HH",2],0,"hour"),V("h",["hh",2],0,Bl),V("k",["kk",2],0,kk),V("hmm",0,0,function(){return""+Bl.apply(this)+$(this.minutes(),2)}),V("hmmss",0,0,function(){return""+Bl.apply(this)+$(this.minutes(),2)+$(this.seconds(),2)}),V("Hmm",0,0,function(){return""+this.hours()+$(this.minutes(),2)}),V("Hmmss",0,0,function(){return""+this.hours()+$(this.minutes(),2)+$(this.seconds(),2)});function uh(i,d){V(i,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),d)})}uh("a",!0),uh("A",!1);function mh(i,d){return d._meridiemParse}me("a",mh),me("A",mh),me("H",xe,tt),me("h",xe,ye),me("k",xe,ye),me("HH",xe,ve),me("hh",xe,ve),me("kk",xe,ve),me("hmm",de),me("hmmss",De),me("Hmm",de),me("Hmmss",De),$e(["H","HH"],ot),$e(["k","kk"],function(i,d,g){var b=Ce(i);d[ot]=b===24?0:b}),$e(["a","A"],function(i,d,g){g._isPm=g._locale.isPM(i),g._meridiem=i}),$e(["h","hh"],function(i,d,g){d[ot]=Ce(i),T(g).bigHour=!0}),$e("hmm",function(i,d,g){var b=i.length-2;d[ot]=Ce(i.substr(0,b)),d[Ut]=Ce(i.substr(b)),T(g).bigHour=!0}),$e("hmmss",function(i,d,g){var b=i.length-4,N=i.length-2;d[ot]=Ce(i.substr(0,b)),d[Ut]=Ce(i.substr(b,2)),d[cn]=Ce(i.substr(N)),T(g).bigHour=!0}),$e("Hmm",function(i,d,g){var b=i.length-2;d[ot]=Ce(i.substr(0,b)),d[Ut]=Ce(i.substr(b))}),$e("Hmmss",function(i,d,g){var b=i.length-4,N=i.length-2;d[ot]=Ce(i.substr(0,b)),d[Ut]=Ce(i.substr(b,2)),d[cn]=Ce(i.substr(N))});function xk(i){return(i+"").toLowerCase().charAt(0)==="p"}var Ik=/[ap]\.?m?\.?/i,Mk=Dr("Hours",!0);function _k(i,d,g){return i>11?g?"pm":"PM":g?"am":"AM"}var fh={calendar:q,longDateFormat:ce,invalidDate:se,ordinal:Le,dayOfMonthOrdinalParse:wt,relativeTime:ct,months:UN,monthsShort:ah,week:ok,weekdays:pk,weekdaysMin:uk,weekdaysShort:ph,meridiemParse:Ik},qe={},So={},go;function Lk(i,d){var g,b=Math.min(i.length,d.length);for(g=0;g<b;g+=1)if(i[g]!==d[g])return g;return b}function hh(i){return i&&i.toLowerCase().replace("_","-")}function Ok(i){for(var d=0,g,b,N,F;d<i.length;){for(F=hh(i[d]).split("-"),g=F.length,b=hh(i[d+1]),b=b?b.split("-"):null;g>0;){if(N=Da(F.slice(0,g).join("-")),N)return N;if(b&&b.length>=g&&Lk(F,b)>=g-1)break;g--}d++}return go}function Rk(i){return!!(i&&i.match("^[^/\\\\]*$"))}function Da(i){var d=null,g;if(qe[i]===void 0&&e&&e.exports&&Rk(i))try{d=go._abbr,g=Qt,g("./locale/"+i),Ln(d)}catch{qe[i]=null}return qe[i]}function Ln(i,d){var g;return i&&(f(d)?g=pn(i):g=Pl(i,d),g?go=g:typeof console<"u"&&console.warn&&console.warn("Locale "+i+" not found. Did you forget to load it?")),go._abbr}function Pl(i,d){if(d!==null){var g,b=fh;if(d.abbr=i,qe[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=qe[i]._config;else if(d.parentLocale!=null)if(qe[d.parentLocale]!=null)b=qe[d.parentLocale]._config;else if(g=Da(d.parentLocale),g!=null)b=g._config;else return So[d.parentLocale]||(So[d.parentLocale]=[]),So[d.parentLocale].push({name:i,config:d}),null;return qe[i]=new Z(B(b,d)),So[i]&&So[i].forEach(function(N){Pl(N.name,N.config)}),Ln(i),qe[i]}else return delete qe[i],null}function Bk(i,d){if(d!=null){var g,b,N=fh;qe[i]!=null&&qe[i].parentLocale!=null?qe[i].set(B(qe[i]._config,d)):(b=Da(i),b!=null&&(N=b._config),d=B(N,d),b==null&&(d.abbr=i),g=new Z(d),g.parentLocale=qe[i],qe[i]=g),Ln(i)}else qe[i]!=null&&(qe[i].parentLocale!=null?(qe[i]=qe[i].parentLocale,i===Ln()&&Ln(i)):qe[i]!=null&&delete qe[i]);return qe[i]}function pn(i){var d;if(i&&i._locale&&i._locale._abbr&&(i=i._locale._abbr),!i)return go;if(!s(i)){if(d=Da(i),d)return d;i=[i]}return Ok(i)}function Pk(){return H(qe)}function Al(i){var d,g=i._a;return g&&T(i).overflow===-2&&(d=g[ln]<0||g[ln]>11?ln:g[en]<1||g[en]>Ll(g[ft],g[ln])?en:g[ot]<0||g[ot]>24||g[ot]===24&&(g[Ut]!==0||g[cn]!==0||g[er]!==0)?ot:g[Ut]<0||g[Ut]>59?Ut:g[cn]<0||g[cn]>59?cn:g[er]<0||g[er]>999?er:-1,T(i)._overflowDayOfYear&&(d<ft||d>en)&&(d=en),T(i)._overflowWeeks&&d===-1&&(d=$N),T(i)._overflowWeekday&&d===-1&&(d=KN),T(i).overflow=d),i}var Ak=/^\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)?)?$/,Fk=/^\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)?)?$/,Vk=/Z|[+-]\d\d(?::?\d\d)?/,Na=[["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]],Fl=[["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/]],$k=/^\/?Date\((-?\d+)/i,Kk=/^(?:(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}))$/,Hk={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 Sh(i){var d,g,b=i._i,N=Ak.exec(b)||Fk.exec(b),F,ee,fe,Ee,ke=Na.length,yt=Fl.length;if(N){for(T(i).iso=!0,d=0,g=ke;d<g;d++)if(Na[d][1].exec(N[1])){ee=Na[d][0],F=Na[d][2]!==!1;break}if(ee==null){i._isValid=!1;return}if(N[3]){for(d=0,g=yt;d<g;d++)if(Fl[d][1].exec(N[3])){fe=(N[2]||" ")+Fl[d][0];break}if(fe==null){i._isValid=!1;return}}if(!F&&fe!=null){i._isValid=!1;return}if(N[4])if(Vk.exec(N[4]))Ee="Z";else{i._isValid=!1;return}i._f=ee+(fe||"")+(Ee||""),$l(i)}else i._isValid=!1}function Wk(i,d,g,b,N,F){var ee=[Gk(i),ah.indexOf(d),parseInt(g,10),parseInt(b,10),parseInt(N,10)];return F&&ee.push(parseInt(F,10)),ee}function Gk(i){var d=parseInt(i,10);return d<=49?2e3+d:d<=999?1900+d:d}function Yk(i){return i.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Uk(i,d,g){if(i){var b=ph.indexOf(i),N=new Date(d[0],d[1],d[2]).getDay();if(b!==N)return T(g).weekdayMismatch=!0,g._isValid=!1,!1}return!0}function zk(i,d,g){if(i)return Hk[i];if(d)return 0;var b=parseInt(g,10),N=b%100,F=(b-N)/100;return F*60+N}function gh(i){var d=Kk.exec(Yk(i._i)),g;if(d){if(g=Wk(d[4],d[3],d[2],d[5],d[6],d[7]),!Uk(d[1],g,i))return;i._a=g,i._tzm=zk(d[8],d[9],d[10]),i._d=fo.apply(null,i._a),i._d.setUTCMinutes(i._d.getUTCMinutes()-i._tzm),T(i).rfc2822=!0}else i._isValid=!1}function jk(i){var d=$k.exec(i._i);if(d!==null){i._d=new Date(+d[1]);return}if(Sh(i),i._isValid===!1)delete i._isValid;else return;if(gh(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 Nr(i,d,g){return i??d??g}function qk(i){var d=new Date(r.now());return i._useUTC?[d.getUTCFullYear(),d.getUTCMonth(),d.getUTCDate()]:[d.getFullYear(),d.getMonth(),d.getDate()]}function Vl(i){var d,g,b=[],N,F,ee;if(!i._d){for(N=qk(i),i._w&&i._a[en]==null&&i._a[ln]==null&&Jk(i),i._dayOfYear!=null&&(ee=Nr(i._a[ft],N[ft]),(i._dayOfYear>uo(ee)||i._dayOfYear===0)&&(T(i)._overflowDayOfYear=!0),g=fo(ee,0,i._dayOfYear),i._a[ln]=g.getUTCMonth(),i._a[en]=g.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[ot]===24&&i._a[Ut]===0&&i._a[cn]===0&&i._a[er]===0&&(i._nextDay=!0,i._a[ot]=0),i._d=(i._useUTC?fo:nk).apply(null,b),F=i._useUTC?i._d.getUTCDay():i._d.getDay(),i._tzm!=null&&i._d.setUTCMinutes(i._d.getUTCMinutes()-i._tzm),i._nextDay&&(i._a[ot]=24),i._w&&typeof i._w.d<"u"&&i._w.d!==F&&(T(i).weekdayMismatch=!0)}}function Jk(i){var d,g,b,N,F,ee,fe,Ee,ke;d=i._w,d.GG!=null||d.W!=null||d.E!=null?(F=1,ee=4,g=Nr(d.GG,i._a[ft],ho(ze(),1,4).year),b=Nr(d.W,1),N=Nr(d.E,1),(N<1||N>7)&&(Ee=!0)):(F=i._locale._week.dow,ee=i._locale._week.doy,ke=ho(ze(),F,ee),g=Nr(d.gg,i._a[ft],ke.year),b=Nr(d.w,ke.week),d.d!=null?(N=d.d,(N<0||N>6)&&(Ee=!0)):d.e!=null?(N=d.e+F,(d.e<0||d.e>6)&&(Ee=!0)):N=F),b<1||b>dn(g,F,ee)?T(i)._overflowWeeks=!0:Ee!=null?T(i)._overflowWeekday=!0:(fe=dh(g,b,N,F,ee),i._a[ft]=fe.year,i._dayOfYear=fe.dayOfYear)}r.ISO_8601=function(){},r.RFC_2822=function(){};function $l(i){if(i._f===r.ISO_8601){Sh(i);return}if(i._f===r.RFC_2822){gh(i);return}i._a=[],T(i).empty=!0;var d=""+i._i,g,b,N,F,ee,fe=d.length,Ee=0,ke,yt;for(N=pe(i._f,i._locale).match(j)||[],yt=N.length,g=0;g<yt;g++)F=N[g],b=(d.match(Ml(F,i))||[])[0],b&&(ee=d.substr(0,d.indexOf(b)),ee.length>0&&T(i).unusedInput.push(ee),d=d.slice(d.indexOf(b)+b.length),Ee+=b.length),J[F]?(b?T(i).empty=!1:T(i).unusedTokens.push(F),VN(F,b,i)):i._strict&&!b&&T(i).unusedTokens.push(F);T(i).charsLeftOver=fe-Ee,d.length>0&&T(i).unusedInput.push(d),i._a[ot]<=12&&T(i).bigHour===!0&&i._a[ot]>0&&(T(i).bigHour=void 0),T(i).parsedDateParts=i._a.slice(0),T(i).meridiem=i._meridiem,i._a[ot]=Zk(i._locale,i._a[ot],i._meridiem),ke=T(i).era,ke!==null&&(i._a[ft]=i._locale.erasConvertYear(ke,i._a[ft])),Vl(i),Al(i)}function Zk(i,d,g){var b;return g==null?d:i.meridiemHour!=null?i.meridiemHour(d,g):(i.isPM!=null&&(b=i.isPM(g),b&&d<12&&(d+=12),!b&&d===12&&(d=0)),d)}function Xk(i){var d,g,b,N,F,ee,fe=!1,Ee=i._f.length;if(Ee===0){T(i).invalidFormat=!0,i._d=new Date(NaN);return}for(N=0;N<Ee;N++)F=0,ee=!1,d=A({},i),i._useUTC!=null&&(d._useUTC=i._useUTC),d._f=i._f[N],$l(d),D(d)&&(ee=!0),F+=T(d).charsLeftOver,F+=T(d).unusedTokens.length*10,T(d).score=F,fe?F<b&&(b=F,g=d):(b==null||F<b||ee)&&(b=F,g=d,ee&&(fe=!0));S(i,g||d)}function Qk(i){if(!i._d){var d=Se(i._i),g=d.day===void 0?d.date:d.day;i._a=h([d.year,d.month,g,d.hour,d.minute,d.second,d.millisecond],function(b){return b&&parseInt(b,10)}),Vl(i)}}function ex(i){var d=new G(Al(bh(i)));return d._nextDay&&(d.add(1,"d"),d._nextDay=void 0),d}function bh(i){var d=i._i,g=i._f;return i._locale=i._locale||pn(i._l),d===null||g===void 0&&d===""?M({nullInput:!0}):(typeof d=="string"&&(i._i=d=i._locale.preparse(d)),E(d)?new G(Al(d)):(u(d)?i._d=d:s(g)?Xk(i):g?$l(i):tx(i),D(i)||(i._d=null),i))}function tx(i){var d=i._i;f(d)?i._d=new Date(r.now()):u(d)?i._d=new Date(d.valueOf()):typeof d=="string"?jk(i):s(d)?(i._a=h(d.slice(0),function(g){return parseInt(g,10)}),Vl(i)):l(d)?Qk(i):m(d)?i._d=new Date(d):r.createFromInputFallback(i)}function vh(i,d,g,b,N){var F={};return(d===!0||d===!1)&&(b=d,d=void 0),(g===!0||g===!1)&&(b=g,g=void 0),(l(i)&&p(i)||s(i)&&i.length===0)&&(i=void 0),F._isAMomentObject=!0,F._useUTC=F._isUTC=N,F._l=g,F._i=i,F._f=d,F._strict=b,ex(F)}function ze(i,d,g,b){return vh(i,d,g,b,!1)}var nx=O("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var i=ze.apply(null,arguments);return this.isValid()&&i.isValid()?i<this?this:i:M()}),rx=O("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var i=ze.apply(null,arguments);return this.isValid()&&i.isValid()?i>this?this:i:M()});function yh(i,d){var g,b;if(d.length===1&&s(d[0])&&(d=d[0]),!d.length)return ze();for(g=d[0],b=1;b<d.length;++b)(!d[b].isValid()||d[b][i](g))&&(g=d[b]);return g}function ox(){var i=[].slice.call(arguments,0);return yh("isBefore",i)}function ax(){var i=[].slice.call(arguments,0);return yh("isAfter",i)}var sx=function(){return Date.now?Date.now():+new Date},bo=["year","quarter","month","week","day","hour","minute","second","millisecond"];function ix(i){var d,g=!1,b,N=bo.length;for(d in i)if(c(i,d)&&!(Je.call(bo,d)!==-1&&(i[d]==null||!isNaN(i[d]))))return!1;for(b=0;b<N;++b)if(i[bo[b]]){if(g)return!1;parseFloat(i[bo[b]])!==Ce(i[bo[b]])&&(g=!0)}return!0}function lx(){return this._isValid}function cx(){return zt(NaN)}function ka(i){var d=Se(i),g=d.year||0,b=d.quarter||0,N=d.month||0,F=d.week||d.isoWeek||0,ee=d.day||0,fe=d.hour||0,Ee=d.minute||0,ke=d.second||0,yt=d.millisecond||0;this._isValid=ix(d),this._milliseconds=+yt+ke*1e3+Ee*6e4+fe*1e3*60*60,this._days=+ee+F*7,this._months=+N+b*3+g*12,this._data={},this._locale=pn(),this._bubble()}function xa(i){return i instanceof ka}function Kl(i){return i<0?Math.round(-1*i)*-1:Math.round(i)}function dx(i,d,g){var b=Math.min(i.length,d.length),N=Math.abs(i.length-d.length),F=0,ee;for(ee=0;ee<b;ee++)Ce(i[ee])!==Ce(d[ee])&&F++;return F+N}function Th(i,d){V(i,0,0,function(){var g=this.utcOffset(),b="+";return g<0&&(g=-g,b="-"),b+$(~~(g/60),2)+d+$(~~g%60,2)})}Th("Z",":"),Th("ZZ",""),me("Z",mt),me("ZZ",mt),$e(["Z","ZZ"],function(i,d,g){g._useUTC=!0,g._tzm=Hl(mt,i)});var px=/([\+\-]|\d\d)/gi;function Hl(i,d){var g=(d||"").match(i),b,N,F;return g===null?null:(b=g[g.length-1]||[],N=(b+"").match(px)||["-",0,0],F=+(N[1]*60)+Ce(N[2]),F===0?0:N[0]==="+"?F:-F)}function Wl(i,d){var g,b;return d._isUTC?(g=d.clone(),b=(E(i)||u(i)?i.valueOf():ze(i).valueOf())-g.valueOf(),g._d.setTime(g._d.valueOf()+b),r.updateOffset(g,!1),g):ze(i).local()}function Gl(i){return-Math.round(i._d.getTimezoneOffset())}r.updateOffset=function(){};function ux(i,d,g){var b=this._offset||0,N;if(!this.isValid())return i!=null?this:NaN;if(i!=null){if(typeof i=="string"){if(i=Hl(mt,i),i===null)return this}else Math.abs(i)<16&&!g&&(i=i*60);return!this._isUTC&&d&&(N=Gl(this)),this._offset=i,this._isUTC=!0,N!=null&&this.add(N,"m"),b!==i&&(!d||this._changeInProgress?Dh(this,zt(i-b,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,r.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?b:Gl(this)}function mx(i,d){return i!=null?(typeof i!="string"&&(i=-i),this.utcOffset(i,d),this):-this.utcOffset()}function fx(i){return this.utcOffset(0,i)}function hx(i){return this._isUTC&&(this.utcOffset(0,i),this._isUTC=!1,i&&this.subtract(Gl(this),"m")),this}function Sx(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var i=Hl(Ge,this._i);i!=null?this.utcOffset(i):this.utcOffset(0,!0)}return this}function gx(i){return this.isValid()?(i=i?ze(i).utcOffset():0,(this.utcOffset()-i)%60===0):!1}function bx(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function vx(){if(!f(this._isDSTShifted))return this._isDSTShifted;var i={},d;return A(i,this),i=bh(i),i._a?(d=i._isUTC?y(i._a):ze(i._a),this._isDSTShifted=this.isValid()&&dx(i._a,d.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function yx(){return this.isValid()?!this._isUTC:!1}function Tx(){return this.isValid()?this._isUTC:!1}function Eh(){return this.isValid()?this._isUTC&&this._offset===0:!1}var Ex=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,wx=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function zt(i,d){var g=i,b=null,N,F,ee;return xa(i)?g={ms:i._milliseconds,d:i._days,M:i._months}:m(i)||!isNaN(+i)?(g={},d?g[d]=+i:g.milliseconds=+i):(b=Ex.exec(i))?(N=b[1]==="-"?-1:1,g={y:0,d:Ce(b[en])*N,h:Ce(b[ot])*N,m:Ce(b[Ut])*N,s:Ce(b[cn])*N,ms:Ce(Kl(b[er]*1e3))*N}):(b=wx.exec(i))?(N=b[1]==="-"?-1:1,g={y:tr(b[2],N),M:tr(b[3],N),w:tr(b[4],N),d:tr(b[5],N),h:tr(b[6],N),m:tr(b[7],N),s:tr(b[8],N)}):g==null?g={}:typeof g=="object"&&("from"in g||"to"in g)&&(ee=Cx(ze(g.from),ze(g.to)),g={},g.ms=ee.milliseconds,g.M=ee.months),F=new ka(g),xa(i)&&c(i,"_locale")&&(F._locale=i._locale),xa(i)&&c(i,"_isValid")&&(F._isValid=i._isValid),F}zt.fn=ka.prototype,zt.invalid=cx;function tr(i,d){var g=i&&parseFloat(i.replace(",","."));return(isNaN(g)?0:g)*d}function wh(i,d){var g={};return g.months=d.month()-i.month()+(d.year()-i.year())*12,i.clone().add(g.months,"M").isAfter(d)&&--g.months,g.milliseconds=+d-+i.clone().add(g.months,"M"),g}function Cx(i,d){var g;return i.isValid()&&d.isValid()?(d=Wl(d,i),i.isBefore(d)?g=wh(i,d):(g=wh(d,i),g.milliseconds=-g.milliseconds,g.months=-g.months),g):{milliseconds:0,months:0}}function Ch(i,d){return function(g,b){var N,F;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."),F=g,g=b,b=F),N=zt(g,b),Dh(this,N,i),this}}function Dh(i,d,g,b){var N=d._milliseconds,F=Kl(d._days),ee=Kl(d._months);i.isValid()&&(b=b??!0,ee&&ih(i,mo(i,"Month")+ee*g),F&&oh(i,"Date",mo(i,"Date")+F*g),N&&i._d.setTime(i._d.valueOf()+N*g),b&&r.updateOffset(i,F||ee))}var Dx=Ch(1,"add"),Nx=Ch(-1,"subtract");function Nh(i){return typeof i=="string"||i instanceof String}function kx(i){return E(i)||u(i)||Nh(i)||m(i)||Ix(i)||xx(i)||i===null||i===void 0}function xx(i){var d=l(i)&&!p(i),g=!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,F,ee=b.length;for(N=0;N<ee;N+=1)F=b[N],g=g||c(i,F);return d&&g}function Ix(i){var d=s(i),g=!1;return d&&(g=i.filter(function(b){return!m(b)&&Nh(i)}).length===0),d&&g}function Mx(i){var d=l(i)&&!p(i),g=!1,b=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],N,F;for(N=0;N<b.length;N+=1)F=b[N],g=g||c(i,F);return d&&g}function _x(i,d){var g=i.diff(d,"days",!0);return g<-6?"sameElse":g<-1?"lastWeek":g<0?"lastDay":g<1?"sameDay":g<2?"nextDay":g<7?"nextWeek":"sameElse"}function Lx(i,d){arguments.length===1&&(arguments[0]?kx(arguments[0])?(i=arguments[0],d=void 0):Mx(arguments[0])&&(d=arguments[0],i=void 0):(i=void 0,d=void 0));var g=i||ze(),b=Wl(g,this).startOf("day"),N=r.calendarFormat(this,b)||"sameElse",F=d&&(L(d[N])?d[N].call(this,g):d[N]);return this.format(F||this.localeData().calendar(N,this,ze(g)))}function Ox(){return new G(this)}function Rx(i,d){var g=E(i)?i:ze(i);return this.isValid()&&g.isValid()?(d=Ke(d)||"millisecond",d==="millisecond"?this.valueOf()>g.valueOf():g.valueOf()<this.clone().startOf(d).valueOf()):!1}function Bx(i,d){var g=E(i)?i:ze(i);return this.isValid()&&g.isValid()?(d=Ke(d)||"millisecond",d==="millisecond"?this.valueOf()<g.valueOf():this.clone().endOf(d).valueOf()<g.valueOf()):!1}function Px(i,d,g,b){var N=E(i)?i:ze(i),F=E(d)?d:ze(d);return this.isValid()&&N.isValid()&&F.isValid()?(b=b||"()",(b[0]==="("?this.isAfter(N,g):!this.isBefore(N,g))&&(b[1]===")"?this.isBefore(F,g):!this.isAfter(F,g))):!1}function Ax(i,d){var g=E(i)?i:ze(i),b;return this.isValid()&&g.isValid()?(d=Ke(d)||"millisecond",d==="millisecond"?this.valueOf()===g.valueOf():(b=g.valueOf(),this.clone().startOf(d).valueOf()<=b&&b<=this.clone().endOf(d).valueOf())):!1}function Fx(i,d){return this.isSame(i,d)||this.isAfter(i,d)}function Vx(i,d){return this.isSame(i,d)||this.isBefore(i,d)}function $x(i,d,g){var b,N,F;if(!this.isValid())return NaN;if(b=Wl(i,this),!b.isValid())return NaN;switch(N=(b.utcOffset()-this.utcOffset())*6e4,d=Ke(d),d){case"year":F=Ia(this,b)/12;break;case"month":F=Ia(this,b);break;case"quarter":F=Ia(this,b)/3;break;case"second":F=(this-b)/1e3;break;case"minute":F=(this-b)/6e4;break;case"hour":F=(this-b)/36e5;break;case"day":F=(this-b-N)/864e5;break;case"week":F=(this-b-N)/6048e5;break;default:F=this-b}return g?F:$t(F)}function Ia(i,d){if(i.date()<d.date())return-Ia(d,i);var g=(d.year()-i.year())*12+(d.month()-i.month()),b=i.clone().add(g,"months"),N,F;return d-b<0?(N=i.clone().add(g-1,"months"),F=(d-b)/(b-N)):(N=i.clone().add(g+1,"months"),F=(d-b)/(N-b)),-(g+F)||0}r.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",r.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function Kx(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function Hx(i){if(!this.isValid())return null;var d=i!==!0,g=d?this.clone().utc():this;return g.year()<0||g.year()>9999?te(g,d?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):L(Date.prototype.toISOString)?d?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",te(g,"Z")):te(g,d?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function Wx(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var i="moment",d="",g,b,N,F;return this.isLocal()||(i=this.utcOffset()===0?"moment.utc":"moment.parseZone",d="Z"),g="["+i+'("]',b=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",N="-MM-DD[T]HH:mm:ss.SSS",F=d+'[")]',this.format(g+b+N+F)}function Gx(i){i||(i=this.isUtc()?r.defaultFormatUtc:r.defaultFormat);var d=te(this,i);return this.localeData().postformat(d)}function Yx(i,d){return this.isValid()&&(E(i)&&i.isValid()||ze(i).isValid())?zt({to:this,from:i}).locale(this.locale()).humanize(!d):this.localeData().invalidDate()}function Ux(i){return this.from(ze(),i)}function zx(i,d){return this.isValid()&&(E(i)&&i.isValid()||ze(i).isValid())?zt({from:this,to:i}).locale(this.locale()).humanize(!d):this.localeData().invalidDate()}function jx(i){return this.to(ze(),i)}function kh(i){var d;return i===void 0?this._locale._abbr:(d=pn(i),d!=null&&(this._locale=d),this)}var xh=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 Ih(){return this._locale}var Ma=1e3,kr=60*Ma,_a=60*kr,Mh=(365*400+97)*24*_a;function xr(i,d){return(i%d+d)%d}function _h(i,d,g){return i<100&&i>=0?new Date(i+400,d,g)-Mh:new Date(i,d,g).valueOf()}function Lh(i,d,g){return i<100&&i>=0?Date.UTC(i+400,d,g)-Mh:Date.UTC(i,d,g)}function qx(i){var d,g;if(i=Ke(i),i===void 0||i==="millisecond"||!this.isValid())return this;switch(g=this._isUTC?Lh:_h,i){case"year":d=g(this.year(),0,1);break;case"quarter":d=g(this.year(),this.month()-this.month()%3,1);break;case"month":d=g(this.year(),this.month(),1);break;case"week":d=g(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":d=g(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":d=g(this.year(),this.month(),this.date());break;case"hour":d=this._d.valueOf(),d-=xr(d+(this._isUTC?0:this.utcOffset()*kr),_a);break;case"minute":d=this._d.valueOf(),d-=xr(d,kr);break;case"second":d=this._d.valueOf(),d-=xr(d,Ma);break}return this._d.setTime(d),r.updateOffset(this,!0),this}function Jx(i){var d,g;if(i=Ke(i),i===void 0||i==="millisecond"||!this.isValid())return this;switch(g=this._isUTC?Lh:_h,i){case"year":d=g(this.year()+1,0,1)-1;break;case"quarter":d=g(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":d=g(this.year(),this.month()+1,1)-1;break;case"week":d=g(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":d=g(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":d=g(this.year(),this.month(),this.date()+1)-1;break;case"hour":d=this._d.valueOf(),d+=_a-xr(d+(this._isUTC?0:this.utcOffset()*kr),_a)-1;break;case"minute":d=this._d.valueOf(),d+=kr-xr(d,kr)-1;break;case"second":d=this._d.valueOf(),d+=Ma-xr(d,Ma)-1;break}return this._d.setTime(d),r.updateOffset(this,!0),this}function Zx(){return this._d.valueOf()-(this._offset||0)*6e4}function Xx(){return Math.floor(this.valueOf()/1e3)}function Qx(){return new Date(this.valueOf())}function eI(){var i=this;return[i.year(),i.month(),i.date(),i.hour(),i.minute(),i.second(),i.millisecond()]}function tI(){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 nI(){return this.isValid()?this.toISOString():null}function rI(){return D(this)}function oI(){return S({},T(this))}function aI(){return T(this).overflow}function sI(){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"),me("N",Yl),me("NN",Yl),me("NNN",Yl),me("NNNN",gI),me("NNNNN",bI),$e(["N","NN","NNN","NNNN","NNNNN"],function(i,d,g,b){var N=g._locale.erasParse(i,b,g._strict);N?T(g).era=N:T(g).invalidEra=i}),me("y",dt),me("yy",dt),me("yyy",dt),me("yyyy",dt),me("yo",vI),$e(["y","yy","yyy","yyyy"],ft),$e(["yo"],function(i,d,g,b){var N;g._locale._eraYearOrdinalRegex&&(N=i.match(g._locale._eraYearOrdinalRegex)),g._locale.eraYearOrdinalParse?d[ft]=g._locale.eraYearOrdinalParse(i,N):d[ft]=parseInt(i,10)});function iI(i,d){var g,b,N,F=this._eras||pn("en")._eras;for(g=0,b=F.length;g<b;++g){switch(typeof F[g].since){case"string":N=r(F[g].since).startOf("day"),F[g].since=N.valueOf();break}switch(typeof F[g].until){case"undefined":F[g].until=1/0;break;case"string":N=r(F[g].until).startOf("day").valueOf(),F[g].until=N.valueOf();break}}return F}function lI(i,d,g){var b,N,F=this.eras(),ee,fe,Ee;for(i=i.toUpperCase(),b=0,N=F.length;b<N;++b)if(ee=F[b].name.toUpperCase(),fe=F[b].abbr.toUpperCase(),Ee=F[b].narrow.toUpperCase(),g)switch(d){case"N":case"NN":case"NNN":if(fe===i)return F[b];break;case"NNNN":if(ee===i)return F[b];break;case"NNNNN":if(Ee===i)return F[b];break}else if([ee,fe,Ee].indexOf(i)>=0)return F[b]}function cI(i,d){var g=i.since<=i.until?1:-1;return d===void 0?r(i.since).year():r(i.since).year()+(d-i.offset)*g}function dI(){var i,d,g,b=this.localeData().eras();for(i=0,d=b.length;i<d;++i)if(g=this.clone().startOf("day").valueOf(),b[i].since<=g&&g<=b[i].until||b[i].until<=g&&g<=b[i].since)return b[i].name;return""}function pI(){var i,d,g,b=this.localeData().eras();for(i=0,d=b.length;i<d;++i)if(g=this.clone().startOf("day").valueOf(),b[i].since<=g&&g<=b[i].until||b[i].until<=g&&g<=b[i].since)return b[i].narrow;return""}function uI(){var i,d,g,b=this.localeData().eras();for(i=0,d=b.length;i<d;++i)if(g=this.clone().startOf("day").valueOf(),b[i].since<=g&&g<=b[i].until||b[i].until<=g&&g<=b[i].since)return b[i].abbr;return""}function mI(){var i,d,g,b,N=this.localeData().eras();for(i=0,d=N.length;i<d;++i)if(g=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())*g+N[i].offset;return this.year()}function fI(i){return c(this,"_erasNameRegex")||Ul.call(this),i?this._erasNameRegex:this._erasRegex}function hI(i){return c(this,"_erasAbbrRegex")||Ul.call(this),i?this._erasAbbrRegex:this._erasRegex}function SI(i){return c(this,"_erasNarrowRegex")||Ul.call(this),i?this._erasNarrowRegex:this._erasRegex}function Yl(i,d){return d.erasAbbrRegex(i)}function gI(i,d){return d.erasNameRegex(i)}function bI(i,d){return d.erasNarrowRegex(i)}function vI(i,d){return d._eraYearOrdinalRegex||dt}function Ul(){var i=[],d=[],g=[],b=[],N,F,ee,fe,Ee,ke=this.eras();for(N=0,F=ke.length;N<F;++N)ee=sn(ke[N].name),fe=sn(ke[N].abbr),Ee=sn(ke[N].narrow),d.push(ee),i.push(fe),g.push(Ee),b.push(ee),b.push(fe),b.push(Ee);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("^("+g.join("|")+")","i")}V(0,["gg",2],0,function(){return this.weekYear()%100}),V(0,["GG",2],0,function(){return this.isoWeekYear()%100});function La(i,d){V(0,[i,i.length],0,d)}La("gggg","weekYear"),La("ggggg","weekYear"),La("GGGG","isoWeekYear"),La("GGGGG","isoWeekYear"),me("G",vt),me("g",vt),me("GG",xe,ve),me("gg",xe,ve),me("GGGG",et,It),me("gggg",et,It),me("GGGGG",Oe,Ft),me("ggggg",Oe,Ft),po(["gggg","ggggg","GGGG","GGGGG"],function(i,d,g,b){d[b.substr(0,2)]=Ce(i)}),po(["gg","GG"],function(i,d,g,b){d[b]=r.parseTwoDigitYear(i)});function yI(i){return Oh.call(this,i,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function TI(i){return Oh.call(this,i,this.isoWeek(),this.isoWeekday(),1,4)}function EI(){return dn(this.year(),1,4)}function wI(){return dn(this.isoWeekYear(),1,4)}function CI(){var i=this.localeData()._week;return dn(this.year(),i.dow,i.doy)}function DI(){var i=this.localeData()._week;return dn(this.weekYear(),i.dow,i.doy)}function Oh(i,d,g,b,N){var F;return i==null?ho(this,b,N).year:(F=dn(i,b,N),d>F&&(d=F),NI.call(this,i,d,g,b,N))}function NI(i,d,g,b,N){var F=dh(i,d,g,b,N),ee=fo(F.year,0,F.dayOfYear);return this.year(ee.getUTCFullYear()),this.month(ee.getUTCMonth()),this.date(ee.getUTCDate()),this}V("Q",0,"Qo","quarter"),me("Q",Te),$e("Q",function(i,d){d[ln]=(Ce(i)-1)*3});function kI(i){return i==null?Math.ceil((this.month()+1)/3):this.month((i-1)*3+this.month()%3)}V("D",["DD",2],"Do","date"),me("D",xe,ye),me("DD",xe,ve),me("Do",function(i,d){return i?d._dayOfMonthOrdinalParse||d._ordinalParse:d._dayOfMonthOrdinalParseLenient}),$e(["D","DD"],en),$e("Do",function(i,d){d[en]=Ce(i.match(xe)[0])});var Rh=Dr("Date",!0);V("DDD",["DDDD",3],"DDDo","dayOfYear"),me("DDD",Ne),me("DDDD",rt),$e(["DDD","DDDD"],function(i,d,g){g._dayOfYear=Ce(i)});function xI(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"),me("m",xe,tt),me("mm",xe,ve),$e(["m","mm"],Ut);var II=Dr("Minutes",!1);V("s",["ss",2],0,"second"),me("s",xe,tt),me("ss",xe,ve),$e(["s","ss"],cn);var MI=Dr("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}),me("S",Ne,Te),me("SS",Ne,ve),me("SSS",Ne,rt);var On,Bh;for(On="SSSS";On.length<=9;On+="S")me(On,dt);function _I(i,d){d[er]=Ce(("0."+i)*1e3)}for(On="S";On.length<=9;On+="S")$e(On,_I);Bh=Dr("Milliseconds",!1),V("z",0,0,"zoneAbbr"),V("zz",0,0,"zoneName");function LI(){return this._isUTC?"UTC":""}function OI(){return this._isUTC?"Coordinated Universal Time":""}var le=G.prototype;le.add=Dx,le.calendar=Lx,le.clone=Ox,le.diff=$x,le.endOf=Jx,le.format=Gx,le.from=Yx,le.fromNow=Ux,le.to=zx,le.toNow=jx,le.get=WN,le.invalidAt=aI,le.isAfter=Rx,le.isBefore=Bx,le.isBetween=Px,le.isSame=Ax,le.isSameOrAfter=Fx,le.isSameOrBefore=Vx,le.isValid=rI,le.lang=xh,le.locale=kh,le.localeData=Ih,le.max=rx,le.min=nx,le.parsingFlags=oI,le.set=GN,le.startOf=qx,le.subtract=Nx,le.toArray=eI,le.toObject=tI,le.toDate=Qx,le.toISOString=Hx,le.inspect=Wx,typeof Symbol<"u"&&Symbol.for!=null&&(le[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),le.toJSON=nI,le.toString=Kx,le.unix=Xx,le.valueOf=Zx,le.creationData=sI,le.eraName=dI,le.eraNarrow=pI,le.eraAbbr=uI,le.eraYear=mI,le.year=rh,le.isLeapYear=HN,le.weekYear=yI,le.isoWeekYear=TI,le.quarter=le.quarters=kI,le.month=lh,le.daysInMonth=QN,le.week=le.weeks=ik,le.isoWeek=le.isoWeeks=lk,le.weeksInYear=CI,le.weeksInWeekYear=DI,le.isoWeeksInYear=EI,le.isoWeeksInISOWeekYear=wI,le.date=Rh,le.day=le.days=Tk,le.weekday=Ek,le.isoWeekday=wk,le.dayOfYear=xI,le.hour=le.hours=Mk,le.minute=le.minutes=II,le.second=le.seconds=MI,le.millisecond=le.milliseconds=Bh,le.utcOffset=ux,le.utc=fx,le.local=hx,le.parseZone=Sx,le.hasAlignedHourOffset=gx,le.isDST=bx,le.isLocal=yx,le.isUtcOffset=Tx,le.isUtc=Eh,le.isUTC=Eh,le.zoneAbbr=LI,le.zoneName=OI,le.dates=O("dates accessor is deprecated. Use date instead.",Rh),le.months=O("months accessor is deprecated. Use month instead",lh),le.years=O("years accessor is deprecated. Use year instead",rh),le.zone=O("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",mx),le.isDSTShifted=O("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",vx);function RI(i){return ze(i*1e3)}function BI(){return ze.apply(null,arguments).parseZone()}function Ph(i){return i}var Re=Z.prototype;Re.calendar=ae,Re.longDateFormat=Q,Re.invalidDate=we,Re.ordinal=lt,Re.preparse=Ph,Re.postformat=Ph,Re.relativeTime=Xe,Re.pastFuture=At,Re.set=re,Re.eras=iI,Re.erasParse=lI,Re.erasConvertYear=cI,Re.erasAbbrRegex=hI,Re.erasNameRegex=fI,Re.erasNarrowRegex=SI,Re.months=qN,Re.monthsShort=JN,Re.monthsParse=XN,Re.monthsRegex=tk,Re.monthsShortRegex=ek,Re.week=rk,Re.firstDayOfYear=sk,Re.firstDayOfWeek=ak,Re.weekdays=Sk,Re.weekdaysMin=bk,Re.weekdaysShort=gk,Re.weekdaysParse=yk,Re.weekdaysRegex=Ck,Re.weekdaysShortRegex=Dk,Re.weekdaysMinRegex=Nk,Re.isPM=xk,Re.meridiem=_k;function Oa(i,d,g,b){var N=pn(),F=y().set(b,d);return N[g](F,i)}function Ah(i,d,g){if(m(i)&&(d=i,i=void 0),i=i||"",d!=null)return Oa(i,d,g,"month");var b,N=[];for(b=0;b<12;b++)N[b]=Oa(i,b,g,"month");return N}function zl(i,d,g,b){typeof i=="boolean"?(m(d)&&(g=d,d=void 0),d=d||""):(d=i,g=d,i=!1,m(d)&&(g=d,d=void 0),d=d||"");var N=pn(),F=i?N._week.dow:0,ee,fe=[];if(g!=null)return Oa(d,(g+F)%7,b,"day");for(ee=0;ee<7;ee++)fe[ee]=Oa(d,(ee+F)%7,b,"day");return fe}function PI(i,d){return Ah(i,d,"months")}function AI(i,d){return Ah(i,d,"monthsShort")}function FI(i,d,g){return zl(i,d,g,"weekdays")}function VI(i,d,g){return zl(i,d,g,"weekdaysShort")}function $I(i,d,g){return zl(i,d,g,"weekdaysMin")}Ln("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,g=Ce(i%100/10)===1?"th":d===1?"st":d===2?"nd":d===3?"rd":"th";return i+g}}),r.lang=O("moment.lang is deprecated. Use moment.locale instead.",Ln),r.langData=O("moment.langData is deprecated. Use moment.localeData instead.",pn);var un=Math.abs;function KI(){var i=this._data;return this._milliseconds=un(this._milliseconds),this._days=un(this._days),this._months=un(this._months),i.milliseconds=un(i.milliseconds),i.seconds=un(i.seconds),i.minutes=un(i.minutes),i.hours=un(i.hours),i.months=un(i.months),i.years=un(i.years),this}function Fh(i,d,g,b){var N=zt(d,g);return i._milliseconds+=b*N._milliseconds,i._days+=b*N._days,i._months+=b*N._months,i._bubble()}function HI(i,d){return Fh(this,i,d,1)}function WI(i,d){return Fh(this,i,d,-1)}function Vh(i){return i<0?Math.floor(i):Math.ceil(i)}function GI(){var i=this._milliseconds,d=this._days,g=this._months,b=this._data,N,F,ee,fe,Ee;return i>=0&&d>=0&&g>=0||i<=0&&d<=0&&g<=0||(i+=Vh(jl(g)+d)*864e5,d=0,g=0),b.milliseconds=i%1e3,N=$t(i/1e3),b.seconds=N%60,F=$t(N/60),b.minutes=F%60,ee=$t(F/60),b.hours=ee%24,d+=$t(ee/24),Ee=$t($h(d)),g+=Ee,d-=Vh(jl(Ee)),fe=$t(g/12),g%=12,b.days=d,b.months=g,b.years=fe,this}function $h(i){return i*4800/146097}function jl(i){return i*146097/4800}function YI(i){if(!this.isValid())return NaN;var d,g,b=this._milliseconds;if(i=Ke(i),i==="month"||i==="quarter"||i==="year")switch(d=this._days+b/864e5,g=this._months+$h(d),i){case"month":return g;case"quarter":return g/3;case"year":return g/12}else switch(d=this._days+Math.round(jl(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 mn(i){return function(){return this.as(i)}}var Kh=mn("ms"),UI=mn("s"),zI=mn("m"),jI=mn("h"),qI=mn("d"),JI=mn("w"),ZI=mn("M"),XI=mn("Q"),QI=mn("y"),eM=Kh;function tM(){return zt(this)}function nM(i){return i=Ke(i),this.isValid()?this[i+"s"]():NaN}function nr(i){return function(){return this.isValid()?this._data[i]:NaN}}var rM=nr("milliseconds"),oM=nr("seconds"),aM=nr("minutes"),sM=nr("hours"),iM=nr("days"),lM=nr("months"),cM=nr("years");function dM(){return $t(this.days()/7)}var fn=Math.round,Ir={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function pM(i,d,g,b,N){return N.relativeTime(d||1,!!g,i,b)}function uM(i,d,g,b){var N=zt(i).abs(),F=fn(N.as("s")),ee=fn(N.as("m")),fe=fn(N.as("h")),Ee=fn(N.as("d")),ke=fn(N.as("M")),yt=fn(N.as("w")),hn=fn(N.as("y")),Rn=F<=g.ss&&["s",F]||F<g.s&&["ss",F]||ee<=1&&["m"]||ee<g.m&&["mm",ee]||fe<=1&&["h"]||fe<g.h&&["hh",fe]||Ee<=1&&["d"]||Ee<g.d&&["dd",Ee];return g.w!=null&&(Rn=Rn||yt<=1&&["w"]||yt<g.w&&["ww",yt]),Rn=Rn||ke<=1&&["M"]||ke<g.M&&["MM",ke]||hn<=1&&["y"]||["yy",hn],Rn[2]=d,Rn[3]=+i>0,Rn[4]=b,pM.apply(null,Rn)}function mM(i){return i===void 0?fn:typeof i=="function"?(fn=i,!0):!1}function fM(i,d){return Ir[i]===void 0?!1:d===void 0?Ir[i]:(Ir[i]=d,i==="s"&&(Ir.ss=d-1),!0)}function hM(i,d){if(!this.isValid())return this.localeData().invalidDate();var g=!1,b=Ir,N,F;return typeof i=="object"&&(d=i,i=!1),typeof i=="boolean"&&(g=i),typeof d=="object"&&(b=Object.assign({},Ir,d),d.s!=null&&d.ss==null&&(b.ss=d.s-1)),N=this.localeData(),F=uM(this,!g,b,N),g&&(F=N.pastFuture(+this,F)),N.postformat(F)}var ql=Math.abs;function Mr(i){return(i>0)-(i<0)||+i}function Ra(){if(!this.isValid())return this.localeData().invalidDate();var i=ql(this._milliseconds)/1e3,d=ql(this._days),g=ql(this._months),b,N,F,ee,fe=this.asSeconds(),Ee,ke,yt,hn;return fe?(b=$t(i/60),N=$t(b/60),i%=60,b%=60,F=$t(g/12),g%=12,ee=i?i.toFixed(3).replace(/\.?0+$/,""):"",Ee=fe<0?"-":"",ke=Mr(this._months)!==Mr(fe)?"-":"",yt=Mr(this._days)!==Mr(fe)?"-":"",hn=Mr(this._milliseconds)!==Mr(fe)?"-":"",Ee+"P"+(F?ke+F+"Y":"")+(g?ke+g+"M":"")+(d?yt+d+"D":"")+(N||b||i?"T":"")+(N?hn+N+"H":"")+(b?hn+b+"M":"")+(i?hn+ee+"S":"")):"P0D"}var Ie=ka.prototype;Ie.isValid=lx,Ie.abs=KI,Ie.add=HI,Ie.subtract=WI,Ie.as=YI,Ie.asMilliseconds=Kh,Ie.asSeconds=UI,Ie.asMinutes=zI,Ie.asHours=jI,Ie.asDays=qI,Ie.asWeeks=JI,Ie.asMonths=ZI,Ie.asQuarters=XI,Ie.asYears=QI,Ie.valueOf=eM,Ie._bubble=GI,Ie.clone=tM,Ie.get=nM,Ie.milliseconds=rM,Ie.seconds=oM,Ie.minutes=aM,Ie.hours=sM,Ie.days=iM,Ie.weeks=dM,Ie.months=lM,Ie.years=cM,Ie.humanize=hM,Ie.toISOString=Ra,Ie.toString=Ra,Ie.toJSON=Ra,Ie.locale=kh,Ie.localeData=Ih,Ie.toIsoString=O("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Ra),Ie.lang=xh,V("X",0,0,"unix"),V("x",0,0,"valueOf"),me("x",vt),me("X",_n),$e("X",function(i,d,g){g._d=new Date(parseFloat(i)*1e3)}),$e("x",function(i,d,g){g._d=new Date(Ce(i))});//! moment.js
|
|
1978
1978
|
return r.version="2.30.1",a(ze),r.fn=le,r.min=ox,r.max=ax,r.now=sx,r.utc=y,r.unix=RI,r.months=PI,r.isDate=u,r.locale=Ln,r.invalid=M,r.duration=zt,r.isMoment=E,r.weekdays=FI,r.parseZone=BI,r.localeData=pn,r.isDuration=xa,r.monthsShort=AI,r.weekdaysMin=$I,r.defineLocale=Pl,r.updateLocale=Bk,r.locales=Pk,r.weekdaysShort=VI,r.normalizeUnits=Ke,r.relativeTimeRounding=mM,r.relativeTimeThreshold=fM,r.calendarFormat=_x,r.prototype=le,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})}(ea)),ea.exports}var jE=fi.exports,hu;function qE(){return hu||(hu=1,function(e,t){(function(n,r){r(typeof Qt=="function"?nn():n.moment)})(jE,function(n){//! moment.js locale configuration
|
|
1979
1979
|
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(a){var s=a%10,l=~~(a%100/10)===1?"th":s===1?"st":s===2?"nd":s===3?"rd":"th";return a+l},week:{dow:0,doy:4}});return r})}()),fi.exports}qE();var hi={exports:{}},JE=hi.exports,Su;function ZE(){return Su||(Su=1,function(e,t){(function(n,r){r(typeof Qt=="function"?nn():n.moment)})(JE,function(n){//! moment.js locale configuration
|
|
1980
1980
|
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(a){var s=a%10,l=~~(a%100/10)===1?"th":s===1?"st":s===2?"nd":s===3?"rd":"th";return a+l}});return r})}()),hi.exports}ZE();var Si={exports:{}},XE=Si.exports,gu;function QE(){return gu||(gu=1,function(e,t){(function(n,r){r(typeof Qt=="function"?nn():n.moment)})(XE,function(n){//! moment.js locale configuration
|
|
@@ -1992,7 +1992,7 @@ var r=n.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_
|
|
|
1992
1992
|
import { SpsDateTime } from "@spscommerce/ds-react";
|
|
1993
1993
|
`,jsx:v.code`
|
|
1994
1994
|
<SpsDateTime>2018-09-11T16:32:52.822000Z</SpsDateTime>
|
|
1995
|
-
`}}}},Du={compact:"boolean",wideTerms:"boolean",widerTerms:"boolean"};function ta(e){const{children:t,className:n,compact:r=!1,"data-testid":a,unsafelyReplaceClassName:s,wideTerms:l=!1,widerTerms:c=!1,...p}=e,f=o.Children.map(t,(u,h)=>{if(u.type.toString()!==o.Fragment.toString()){const
|
|
1995
|
+
`}}}},Du={compact:"boolean",wideTerms:"boolean",widerTerms:"boolean"};function ta(e){const{children:t,className:n,compact:r=!1,"data-testid":a,unsafelyReplaceClassName:s,wideTerms:l=!1,widerTerms:c=!1,...p}=e,f=o.Children.map(t,(u,h)=>{if(u.type.toString()!==o.Fragment.toString()){const C=parseInt(`${h/2}`,10)+1;return o.cloneElement(u,{style:{...u.props.style,msGridRow:C}})}const S=u.props.children;return o.Children.map(S,C=>o.cloneElement(C,{style:{...C.props.style,msGridRow:h+1}}))}),m=U(s||"sps-description-list",r&&"sps-description-list--compact",l&&"sps-description-list--wide-terms",c&&"sps-description-list--wider-terms",n);return o.createElement("dl",{className:m,"data-testid":`${a}`,...p},f)}Object.assign(ta,{props:Du,displayName:"SpsDescriptionList / SpsDl"});function Nu(e){return o.createElement(ta,{...e})}Object.assign(Nu,{props:Du,displayName:"SpsDescriptionList / SpsDl"});const ku={};function na(e){const{children:t,className:n,"data-testid":r,unsafelyReplaceClassName:a,...s}=e,l=U(a||"sps-description-list__definition",n);return o.createElement("dd",{className:l,"data-testid":`${r}`,...s},t)}Object.assign(na,{props:ku,displayName:"SpsDescriptionListDefinition / SpsDd"});function xu(e){return o.createElement(na,{...e})}Object.assign(xu,{props:ku,displayName:"SpsDescriptionListDefinition / SpsDd"});var _e=(e=>(e.VISIBLE="visible",e.DEFER_VISIBLE="defer_visible",e.HIDDEN="hidden",e.DELAYED_HIDDEN="delayed_hidden",e))(_e||{});function ra(e){return e==="visible"?"hidden":"visible"}const Iu=13,Un=new Map,gw={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 Bt({children:e,className:t,for:n,"data-testid":r,hideDelay:a=Y.TOOLTIP_HIDE_DELAY_MS_DEFAULT,isShown:s,kind:l=Y.TooltipKind.DEFAULT,offsets:c=[0,0],onDeferred:p,position:f=Y.Position.TOP_MIDDLE,altPosition:m=za(f),showOn:u=Y.TooltipShowTrigger.MOUSEOVER,style:h,title:S,unsafelyReplaceClassName:y}){const C=o.useRef({instanceKey:Symbol("ds-react:tooltip:instance-key"),prevIsShown:s,hideTimer:null}),[T,w]=o.useState(!1),D=o.useRef(null),M=typeof n=="string"?o.useRef(document.getElementById(n)):n,I=o.useRef(null),k=o.useCallback(()=>{C.current.hideTimer&&(window.clearTimeout(C.current.hideTimer),C.current.hideTimer=null)},[]),A=o.useCallback(()=>{k(),w(!1)},[]),G=o.useCallback((q=!1)=>{var ae;if(q===!0&&Un.size>0)return p&&p(),!1;if(((ae=D.current)==null?void 0:ae.textContent)==="")return console.warn("SpsTooltip is empty; aborting show"),!1;k();for(const $ of Un.values())$();return w(!0),!0},[]),E=o.useCallback(q=>{q&&q.stopPropagation(),w(ae=>ae?(A(),!1):G())},[]),R=o.useCallback(q=>{D.current&&!D.current.contains(q.target)&&A()},[]),O=o.useCallback(()=>{k(),C.current.hideTimer=window.setTimeout(A,a)},[]),P=o.useCallback(q=>{var V,W,X,te,pe,ce;const[ae,$]=q.split(" "),j=(V=M==null?void 0:M.current)==null?void 0:V.getBoundingClientRect(),oe=I.current?parseInt(((W=getComputedStyle(I.current))==null?void 0:W.width)||"0",10):0,ie=oe*Math.sqrt(2),J=(ie-oe)/2;if(["top","bottom"].includes(ae)&&$!=="middle"){if(!(j!=null&&j.width)||j.width>50)return 0;const Q=I.current?parseInt(((X=getComputedStyle(I.current))==null?void 0:X.left)||"0",10):0,se=I.current?parseInt(((te=getComputedStyle(I.current))==null?void 0:te.right)||"0",10):0,Le=(Q<se?Q:se)-J+ie/2;return j.width/2-Le}else if(["left","right"].includes(ae)&&$!=="middle"){if(j!=null&&j.height&&j.height>50)return 0;const Q=I.current?parseInt(((pe=getComputedStyle(I.current))==null?void 0:pe.top)||"0",10):0,se=I.current?parseInt(((ce=getComputedStyle(I.current))==null?void 0:ce.bottom)||"0",10):0,Le=(Q<se?Q:se)-J+ie/2;return j.height/2-Le}else return 0},[]);o.useEffect(()=>{if(typeof n=="string"&&(M.current=document.getElementById(n)),T?Un.set(C.current.instanceKey,A):Un.has(C.current.instanceKey)&&Un.delete(C.current.instanceKey),u===Y.TooltipShowTrigger.MANUAL){if(s!==C.current.prevIsShown)switch(s){case"visible":G();break;case"defer_visible":G(!0);break;case"hidden":A();break;case"delayed_hidden":O();break}C.current.prevIsShown=s}},[T,s]),o.useEffect(()=>{if(M.current)switch(u){case Y.TooltipShowTrigger.MOUSEOVER:M.current.addEventListener("mouseenter",G),M.current.addEventListener("mouseleave",O);break;case Y.TooltipShowTrigger.CLICK:M.current.addEventListener("click",E),document.addEventListener("click",R);break;case Y.TooltipShowTrigger.MANUAL:break}},[M]),o.useEffect(()=>{var q;((q=D.current)==null?void 0:q.textContent)===""&&T&&(C.current.hideTimer&&(clearTimeout(C.current.hideTimer),C.current.hideTimer=null),w(!1))},[e,T]),o.useEffect(()=>()=>{Un.has(C.current.instanceKey)&&Un.delete(C.current.instanceKey),M.current&&(M.current.removeEventListener("mouseenter",G),M.current.removeEventListener("mouseleave",O),M.current.removeEventListener("click",E),document.removeEventListener("click",R))},[]);const z=cr("sps-tooltip-portal"),L=o.useContext(Mt),[[re,B],Z]=o.useState([{},!1]);o.useEffect(()=>{Z(T?An(D,M,f,{altPosition:m,setMinWidth:!1,offsets:[c[0]-Iu,c[1]+P(f)],...L}):[{},!1])},[T,f,m,c[0],c[1],e]),o.useEffect(()=>{const q=()=>{T&&Z(An(D,M,f,{altPosition:m,setMinWidth:!1,offsets:[c[0]-Iu,c[1]+P(f)],...L}))};return document.addEventListener("scroll",q),()=>{document.removeEventListener("scroll",q)}},[T]);const H=U(y||"sps-tooltip","z-stratum-tip",`sps-tooltip--${l}`,`sps-tooltip--pos-${(B?m:f).replace(" ","-")}`,T&&"sps-tooltip--shown",t);return z(o.createElement("div",{role:"tooltip",className:H,"data-testid":r,ref:D,style:{...h,...re},onMouseEnter:u===Y.TooltipShowTrigger.MOUSEOVER?k:void 0,onMouseLeave:u===Y.TooltipShowTrigger.MOUSEOVER?O:void 0},S&&(typeof S=="string"?o.createElement("span",{className:"sps-tooltip__title d-block"},S):S),o.createElement("span",{className:"sps-tooltip__body d-block"},e),o.createElement("span",{ref:I,className:"sps-tooltip__caret"})))}Object.assign(Bt,{props:gw,displayName:"SpsTooltip"});const Mu={error:"boolean",errors:"ReactNodeOrRenderFn",help:"ReactNodeOrRenderFn",labelFor:"SpsFormFieldMeta<any>",required:"boolean"};function oa(e){const{children:t,className:n,error:r,errors:a,help:s,labelFor:l,required:c,"data-testid":p,unsafelyReplaceClassName:f,...m}=e,u=o.useRef(null),h=o.useRef();function S(){var k;return(h==null?void 0:h.current)&&((k=h.current.parentElement)==null?void 0:k.classList.contains("sps-form-group--error"))}function y(){return l&&!l.isPristine()&&!l.isValid()}const[C,T]=o.useState(),[w,D]=o.useState(_e.HIDDEN);o.useEffect(()=>{T(y()||S()?Y.TooltipKind.ERROR:Y.TooltipKind.HELP)}),o.useEffect(()=>{var G;h.current=(G=u==null?void 0:u.current)==null?void 0:G.getElementsByClassName("sps-form-group__label")[0];const k=()=>D(_e.VISIBLE),A=()=>D(_e.HIDDEN);return h.current&&(h.current.addEventListener("focus",k),h.current.addEventListener("blur",A)),()=>{h.current&&(h.current.removeEventListener("focus",k),h.current.removeEventListener("blur",A))}}),l&&(l.onFocus=()=>D(_e.VISIBLE),l.onBlur=()=>D(_e.HIDDEN));const M=U(f||"sps-description-list__term",(c||l&&l.isRequired())&&"sps-description-list__term--required",(r||y())&&"sps-description-list__term--error",n);function I(){D(w===_e.VISIBLE?_e.HIDDEN:_e.VISIBLE)}return o.createElement(o.Fragment,null,o.createElement("dt",{className:M,"data-testid":`${p}`,ref:u,onMouseEnter:()=>D(_e.VISIBLE),onMouseLeave:()=>D(_e.DELAYED_HIDDEN),onClick:I,...m},t),o.createElement(Bt,{kind:C,for:u,showOn:Y.TooltipShowTrigger.MANUAL,isShown:w},Tt(C===Y.TooltipKind.ERROR?a:s)))}Object.assign(oa,{props:Mu,displayName:"SpsDescriptionListTerm / SpsDt"});function _u(e){return o.createElement(oa,{...e})}Object.assign(_u,{props:Mu,displayName:"SpsDescriptionListTerm / SpsDt"});const Lu={general:{label:"General Usage",description:()=>x.createElement(x.Fragment,null,x.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."),x.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."),x.createElement("h5",null,"Use a Description List"),x.createElement("ul",null,x.createElement("li",{className:"mb-2"},"To display two or more terms that have accompanying descriptions or values.")),x.createElement("h5",null,"Do Not Use a Description List"),x.createElement("ul",null,x.createElement("li",{className:"mb-2"},"To display a single term"),x.createElement("li",{className:"mb-2"},"If the listed terms do not have descriptions")))},basic:{label:"Basic Description Lists",description:()=>x.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:()=>x.createElement("h5",null,"1-to-3"),react:v.code`
|
|
1996
1996
|
import { SpsDl, SpsDt, SpsDd } from "@spscommerce/ds-react";
|
|
1997
1997
|
function DemoComponent() {
|
|
1998
1998
|
return (
|
|
@@ -2006,7 +2006,7 @@ var r=n.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_
|
|
|
2006
2006
|
</SpsDl>
|
|
2007
2007
|
)
|
|
2008
2008
|
}
|
|
2009
|
-
`},oneToTwo:{description:()=>
|
|
2009
|
+
`},oneToTwo:{description:()=>x.createElement("h5",null,"1-to-2"),react:v.code`
|
|
2010
2010
|
import { SpsDl, SpsDt, SpsDd } from "@spscommerce/ds-react";
|
|
2011
2011
|
function DemoComponent() {
|
|
2012
2012
|
return (
|
|
@@ -2020,7 +2020,7 @@ var r=n.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_
|
|
|
2020
2020
|
</SpsDl>
|
|
2021
2021
|
)
|
|
2022
2022
|
}
|
|
2023
|
-
`},oneToOne:{description:()=>
|
|
2023
|
+
`},oneToOne:{description:()=>x.createElement("h5",null,"1-to-1"),react:v.code`
|
|
2024
2024
|
import { SpsDl, SpsDt, SpsDd } from "@spscommerce/ds-react";
|
|
2025
2025
|
function DemoComponent() {
|
|
2026
2026
|
return (
|
|
@@ -2034,7 +2034,7 @@ var r=n.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_
|
|
|
2034
2034
|
</SpsDl>
|
|
2035
2035
|
)
|
|
2036
2036
|
}
|
|
2037
|
-
`},compactOneToThree:{description:()=>
|
|
2037
|
+
`},compactOneToThree:{description:()=>x.createElement("h5",null,"Compact 1-to-3"),react:v.code`
|
|
2038
2038
|
import { SpsDl, SpsDt, SpsDd } from "@spscommerce/ds-react";
|
|
2039
2039
|
function DemoComponent() {
|
|
2040
2040
|
return (
|
|
@@ -2048,7 +2048,7 @@ var r=n.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_
|
|
|
2048
2048
|
</SpsDl>
|
|
2049
2049
|
)
|
|
2050
2050
|
}
|
|
2051
|
-
`},compactOneToTwo:{description:()=>
|
|
2051
|
+
`},compactOneToTwo:{description:()=>x.createElement("h5",null,"Compact 1-to-2"),react:v.code`
|
|
2052
2052
|
import { SpsDl, SpsDt, SpsDd } from "@spscommerce/ds-react";
|
|
2053
2053
|
function DemoComponent() {
|
|
2054
2054
|
return (
|
|
@@ -2062,7 +2062,7 @@ var r=n.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_
|
|
|
2062
2062
|
</SpsDl>
|
|
2063
2063
|
)
|
|
2064
2064
|
}
|
|
2065
|
-
`},compactOneToOne:{description:()=>
|
|
2065
|
+
`},compactOneToOne:{description:()=>x.createElement("h5",null,"Compact 1-to-1"),react:v.code`
|
|
2066
2066
|
import { SpsDl, SpsDt, SpsDd } from "@spscommerce/ds-react";
|
|
2067
2067
|
function DemoComponent() {
|
|
2068
2068
|
return (
|
|
@@ -2076,7 +2076,7 @@ var r=n.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_
|
|
|
2076
2076
|
</SpsDl>
|
|
2077
2077
|
)
|
|
2078
2078
|
}
|
|
2079
|
-
`}}},inputFields:{label:"Description Lists with Input Fields",description:({NavigateTo:e})=>
|
|
2079
|
+
`}}},inputFields:{label:"Description Lists with Input Fields",description:({NavigateTo:e})=>x.createElement(x.Fragment,null,x.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."),x.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."),x.createElement("p",null,"Input Fields inside of Description Lists should follow standard Form rules. Visit the"," ",x.createElement(e,{to:"form"},"Forms")," page for more information regarding Form rules."),x.createElement("p",null,x.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:()=>x.createElement("h5",null,"1-to-3"),react:v.code`
|
|
2080
2080
|
import {
|
|
2081
2081
|
SpsDl,
|
|
2082
2082
|
SpsDt,
|
|
@@ -2143,7 +2143,7 @@ var r=n.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_
|
|
|
2143
2143
|
</SpsForm>
|
|
2144
2144
|
)
|
|
2145
2145
|
}
|
|
2146
|
-
`},oneToTwo:{description:()=>
|
|
2146
|
+
`},oneToTwo:{description:()=>x.createElement("h5",null,"1-to-2"),react:v.code`
|
|
2147
2147
|
import {
|
|
2148
2148
|
SpsDl,
|
|
2149
2149
|
SpsDt,
|
|
@@ -2207,7 +2207,7 @@ var r=n.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_
|
|
|
2207
2207
|
</SpsForm>
|
|
2208
2208
|
)
|
|
2209
2209
|
}
|
|
2210
|
-
`},oneToOne:{description:()=>
|
|
2210
|
+
`},oneToOne:{description:()=>x.createElement("h5",null,"1-to-1"),react:v.code`
|
|
2211
2211
|
import {
|
|
2212
2212
|
SpsDl,
|
|
2213
2213
|
SpsDt,
|
|
@@ -2271,7 +2271,7 @@ var r=n.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_
|
|
|
2271
2271
|
</SpsForm>
|
|
2272
2272
|
)
|
|
2273
2273
|
}
|
|
2274
|
-
`},compactOneToThree:{description:()=>
|
|
2274
|
+
`},compactOneToThree:{description:()=>x.createElement("h5",null,"Compact 1-to-3"),react:v.code`
|
|
2275
2275
|
import {
|
|
2276
2276
|
SpsDl,
|
|
2277
2277
|
SpsDt,
|
|
@@ -2338,7 +2338,7 @@ var r=n.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_
|
|
|
2338
2338
|
</SpsForm>
|
|
2339
2339
|
)
|
|
2340
2340
|
}
|
|
2341
|
-
`},compactOneToTwo:{description:()=>
|
|
2341
|
+
`},compactOneToTwo:{description:()=>x.createElement("h5",null,"Compact 1-to-2"),react:v.code`
|
|
2342
2342
|
import {
|
|
2343
2343
|
SpsDl,
|
|
2344
2344
|
SpsDt,
|
|
@@ -2402,7 +2402,7 @@ var r=n.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_
|
|
|
2402
2402
|
</SpsForm>
|
|
2403
2403
|
)
|
|
2404
2404
|
}
|
|
2405
|
-
`},compactOneToOne:{description:()=>
|
|
2405
|
+
`},compactOneToOne:{description:()=>x.createElement("h5",null,"Compact 1-to-1"),react:v.code`
|
|
2406
2406
|
import {
|
|
2407
2407
|
SpsDl,
|
|
2408
2408
|
SpsDt,
|
|
@@ -2466,7 +2466,7 @@ var r=n.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_
|
|
|
2466
2466
|
</SpsForm>
|
|
2467
2467
|
)
|
|
2468
2468
|
}
|
|
2469
|
-
`}}}},bw=ko||Ya,vw={alignLeft:"boolean",disabled:"boolean",conformWidth:"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 zn(e){const{action:t,alignLeft:n,className:r,conformWidth:a,disabled:s,icon:l,id:c,kind:p,label:f,options:m=[],tabIndex:u,spinning:h,spinningTitle:S,tallOptionList:y,unsafelyReplaceClassName:
|
|
2469
|
+
`}}}},bw=ko||Ya,vw={alignLeft:"boolean",disabled:"boolean",conformWidth:"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 zn(e){const{action:t,alignLeft:n,className:r,conformWidth:a,disabled:s,icon:l,id:c,kind:p,label:f,options:m=[],tabIndex:u,spinning:h,spinningTitle:S,tallOptionList:y,unsafelyReplaceClassName:C,onOpen:T,onClose:w,loading:D,maxHeightOptionListPx:M,maxHeightOptionListRem:I,disableOptionsMemoization:k,...A}=e,{t:G}=Be.useWoodlandLanguage(),E=gn(c),[R,O]=o.useState(!1),[P,z]=o.useState(!1),[L,re]=o.useState(),B=o.useRef(null),Z=m.map(Q=>typeof Q=="function"?Q:Object.assign(Q[1],{...Y.SPS_ACTION_DEFAULTS,...Q[0]})),H=`${E.current}-button`,q=`${E.current}-menu`;let ae,$;f?($=p||Y.DropdownKind.DEFAULT,ae=l):($=Y.DropdownKind.ICON,ae=l||Y.SpsIcon.ELLIPSES);const j=o.useRef(null);o.useEffect(()=>{R&&T?T():!R&&w&&w()},[R]);function oe(Q){j.current&&!j.current.contains(Q.target)&&O(!1)}function ie(Q){Q.preventDefault(),!s&&!h&&O(!R)}function J(Q){O(Q)}function V(){O(!1)}function W(Q){s||(["Up","ArrowUp","Down","ArrowDown"].indexOf(Q.key)>-1&&Q.preventDefault(),Q.persist(),re(Q))}function X(Q){Q.detail!==E.current&&O(!1)}o.useEffect(()=>(document.addEventListener("click",oe),document.addEventListener("DropdownOpened",X),()=>{document.removeEventListener("click",oe),document.removeEventListener("DropdownOpened",X)}),[]),o.useEffect(()=>{if(R){B.current&&bw(B.current,{scrollMode:"if-needed"});const Q=document.createEvent("CustomEvent");Q.initCustomEvent("DropdownOpened",!1,!1,E.current),document.dispatchEvent(Q)}},[R]);const te=U(C||"sps-dropdown",R&&"sps-dropdown--open",R&&"z-stratum-dropdown",P&&"sps-dropdown--opens-upward",!f&&"sps-dropdown--no-label",s&&"disabled",r),pe=U("sps-button",`sps-button--${$}`,s&&"sps-button--disabled",h&&"sps-button--spinning"),ce=$===Y.DropdownKind.ICON&&!n?[Y.Position.BOTTOM_RIGHT,Y.Position.TOP_RIGHT]:void 0;return o.useEffect(()=>{let Q;return R&&(Q=()=>{O(!1)},window.addEventListener("resize",Q)),()=>{Q&&window.removeEventListener("resize",Q)}},[R]),Pr({isOpen:R,rootRef:j}),o.createElement("div",{...A,id:E.current,className:te,onKeyDown:W},o.createElement("div",{onClick:ie,className:pe,ref:j},o.createElement("button",{type:"button",id:H,ref:B,"aria-haspopup":"true","aria-controls":q,"aria-expanded":R?!0:void 0,tabIndex:u,disabled:s,onClick:ie},o.createElement("i",{className:U("sps-icon",`sps-icon-${ae}`)}),f&&o.createElement("span",null,f),h&&o.createElement("div",{className:"sps-spinner",key:1},S||G("button.spinningTitle")))),o.createElement(Br,{positionOverride:ce,isOpen:R,"aria-labelledby":H,keyDown:L,onOptionSelected:V,id:q,attachTo:j,onPositionFlip:z,onSelfToggle:J,options:Z,offsets:[0,0],tall:y,optionRole:"option",loading:D,maxHeightPx:M,maxHeightRem:I,disableOptionsMemoization:k,specialAction:t,conformWidth:a}))}Object.assign(zn,{props:vw,displayName:"SpsDropdown"});const Ou={labelled:{label:"Labelled",examples:{default:{description:"<h3> Default Dropdown</h3>",react:v.code`
|
|
2470
2470
|
import {
|
|
2471
2471
|
SpsDropdown,
|
|
2472
2472
|
useSpsAction,
|
|
@@ -2703,7 +2703,7 @@ var r=n.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_
|
|
|
2703
2703
|
</SpsTable>
|
|
2704
2704
|
)
|
|
2705
2705
|
}
|
|
2706
|
-
`}}}},yw={checked:"boolean",onChange:"ChangeEventHandler",indeterminate:"boolean",disabled:"boolean",options:"Array<SpsActionMethod | [SpsActionDescriptor, () => void]>"};function Ci(e){const{options:t,className:n,checked:r,onChange:a,indeterminate:s,disabled:l,"data-testid":c,...p}=e,f=U("sps-checkbox-dropdown",n);return o.createElement("span",{className:f,"data-testid":c,...p},o.createElement(Fn,{indeterminate:s,checked:r,disabled:l,onChange:a,inline:!0,"data-testid":`${c}__checkbox`}),o.createElement(zn,{disabled:l,options:t,icon:Y.SpsIcon.CHEVRON_DOWN,"data-testid":`${c}__dropdown`}))}Object.assign(Ci,{props:yw,displayName:"SpsCheckboxDropdown"});const Tw={errors:"ReactNodeOrRenderFn",formMeta:"SpsFormSetMeta<any>",legend:"string",hasRequiredFields:"boolean",optional:"boolean",enabled:"boolean",onToggled:"(isEnabled: boolean) => void",tooltip:"string",applyNestedStyles:"boolean"};function Di({children:e,className:t,errors:n,formArray:r,formGroup:a,formMeta:s,legend:l,unsafelyReplaceClassName:c,hasRequiredFields:p=!1,optional:f=!1,enabled:m=!1,onToggled:u,tooltip:h,applyNestedStyles:S,"data-testid":y,errorsTooltipTrigger:
|
|
2706
|
+
`}}}},yw={checked:"boolean",onChange:"ChangeEventHandler",indeterminate:"boolean",disabled:"boolean",options:"Array<SpsActionMethod | [SpsActionDescriptor, () => void]>"};function Ci(e){const{options:t,className:n,checked:r,onChange:a,indeterminate:s,disabled:l,"data-testid":c,...p}=e,f=U("sps-checkbox-dropdown",n);return o.createElement("span",{className:f,"data-testid":c,...p},o.createElement(Fn,{indeterminate:s,checked:r,disabled:l,onChange:a,inline:!0,"data-testid":`${c}__checkbox`}),o.createElement(zn,{disabled:l,options:t,icon:Y.SpsIcon.CHEVRON_DOWN,"data-testid":`${c}__dropdown`}))}Object.assign(Ci,{props:yw,displayName:"SpsCheckboxDropdown"});const Tw={errors:"ReactNodeOrRenderFn",formMeta:"SpsFormSetMeta<any>",legend:"string",hasRequiredFields:"boolean",optional:"boolean",enabled:"boolean",onToggled:"(isEnabled: boolean) => void",tooltip:"string",applyNestedStyles:"boolean"};function Di({children:e,className:t,errors:n,formArray:r,formGroup:a,formMeta:s,legend:l,unsafelyReplaceClassName:c,hasRequiredFields:p=!1,optional:f=!1,enabled:m=!1,onToggled:u,tooltip:h,applyNestedStyles:S,"data-testid":y,errorsTooltipTrigger:C=Y.TooltipShowTrigger.CLICK,errorsTooltipPosition:T=Y.Position.LEFT_MIDDLE}){const w=a||r,D=o.useRef(null),M=o.useRef(null),[I,k]=o.useState(_e.HIDDEN),[A,G]=o.useState(!1),[E,R]=o.useState(m);qa(()=>{u==null||u(E)},[E]),o.useEffect(()=>{if(w||s){const z=w&&w.isFocused()||s&&s.isFocused();!A&&z?k(_e.VISIBLE):A&&!z&&k(_e.HIDDEN),G(z||!1)}});const O=U(c||S?"nested-styles-fieldset":"sps-fieldset",(w&&!w.isPristine()&&w.invalid||s&&(!s.isValid()||!s.contentsAreValid()))&&"sps-fieldset--error",t,f&&!E&&"sps-fieldset--collapsed",p&&"sps-fieldset--required-fields");function P(){k(I===_e.VISIBLE?_e.HIDDEN:_e.VISIBLE)}return o.createElement("div",{className:"sps-fieldset-container"},o.createElement("fieldset",{className:O,"data-testid":y},o.createElement("legend",{className:"sps-fieldset__legend",ref:D,onMouseEnter:()=>k(_e.VISIBLE),onMouseLeave:()=>k(_e.DELAYED_HIDDEN),onClick:P},f&&o.createElement(Fn,{checked:E,className:"d-inline-flex pr-1",onChange:z=>{R(z.target.checked)},"data-testid":`${y}__checkbox`}),l,h&&o.createElement("span",{className:"sps-fieldset__legend-icon",ref:M},o.createElement(Wt,{icon:Y.SpsIcon.INFO_CIRCLE,"data-testid":`${y}__info-icon`}))),h&&o.createElement(Bt,{for:M},h),!!n&&o.createElement(Bt,{for:D,kind:Y.TooltipKind.ERROR,showOn:C,position:T,isShown:I},Tt(n)),e))}Object.assign(Di,{props:Tw,displayName:"SpsFieldset"});const Ru={basic:{label:"Basic Content Sections",description:"info about basic content sections",examples:{basic:{react:v.code`
|
|
2707
2707
|
import {
|
|
2708
2708
|
useSpsForm,
|
|
2709
2709
|
SpsFieldset,
|
|
@@ -2983,7 +2983,7 @@ var r=n.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_
|
|
|
2983
2983
|
</SpsForm>
|
|
2984
2984
|
)
|
|
2985
2985
|
}
|
|
2986
|
-
`}}}},Ew={disabled:"boolean",defaultValue:"number",min:"number",max:"number",step:"number",onValueChange:"(newValue: number) => void"};function Ni(e){const{autoComplete:t,disabled:n,defaultValue:r=0,min:a=Number.MIN_SAFE_INTEGER,max:s=Number.MAX_SAFE_INTEGER,step:l=1,onValueChange:c,unsafelyReplaceClassName:p,className:f,"data-testid":m,...u}=e,[h,S]=o.useState(Math.max(a,r));o.useEffect(()=>{S(Math.max(a,r))},[r]);const[y,
|
|
2986
|
+
`}}}},Ew={disabled:"boolean",defaultValue:"number",min:"number",max:"number",step:"number",onValueChange:"(newValue: number) => void"};function Ni(e){const{autoComplete:t,disabled:n,defaultValue:r=0,min:a=Number.MIN_SAFE_INTEGER,max:s=Number.MAX_SAFE_INTEGER,step:l=1,onValueChange:c,unsafelyReplaceClassName:p,className:f,"data-testid":m,...u}=e,[h,S]=o.useState(Math.max(a,r));o.useEffect(()=>{S(Math.max(a,r))},[r]);const[y,C]=o.useState(!1);o.useEffect(()=>{c&&typeof c=="function"&&c(h),C(h<a||h>s)},[h]);const T=()=>h<=a?!1:(h>s?S(s):S(I=>Math.max(I-l,a)),!0),w=()=>h>=s?!1:(h<a?S(a):S(I=>I+l),!0),D=I=>{I.target.value!==""&&S(parseInt(I.target.value,10))},M=p||U("sps-incrementor sps-input-group sps-input-group__append",f);return o.createElement("div",{className:M,...u,"data-testid":m},o.createElement("div",{className:"sps-button sps-button--icon"},o.createElement("button",{type:"button","data-testid":`${m}__minus`,onClick:T,disabled:n,"aria-label":`Subtract ${l}`},o.createElement("i",{className:"sps-icon sps-icon-minus","aria-hidden":"true"}))),o.createElement("div",{className:"sps-text-input"},o.createElement("input",{type:"text",className:U("sps-form-control",y&&"sps-input--error"),value:h,onChange:D,disabled:n,"data-testid":`${m}__input`,autoComplete:t})),o.createElement("div",{className:"sps-button sps-button--icon"},o.createElement("button",{type:"button","data-testid":`${m}__plus`,onClick:w,disabled:n,"aria-label":`Add ${l}`},o.createElement("i",{className:"sps-icon sps-icon-plus-sign","aria-hidden":"true"}))))}Object.assign(Ni,{props:Ew,displayName:"SpsIncrementor"});const Bu={stepExample:{label:"Incrementor",description:"info about incrementor",examples:{stacked:{react:v.code`
|
|
2987
2987
|
import { SpsIncrementor } from "@spscommerce/ds-react";
|
|
2988
2988
|
function Component () {
|
|
2989
2989
|
const [value, setValue] = React.useState("");
|
|
@@ -3004,7 +3004,7 @@ var r=n.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_
|
|
|
3004
3004
|
</React.Fragment>
|
|
3005
3005
|
);
|
|
3006
3006
|
}
|
|
3007
|
-
`}}}},ww={for:{type:"SpsFormMetaBase<any>",required:!0},description:"string",stronglySuggested:"boolean",help:"ReactNodeOrRenderFn",helpIcon:"SpsIcon",helpIconColor:"string",errors:"ReactNodeOrRenderFn"};function ki({children:e,className:t,description:n,for:r,stronglySuggested:a,help:s,helpIcon:l=Y.SpsIcon.QUESTION_CIRCLE,helpIconColor:c="blue200",errors:p,unsafelyReplaceClassName:f,"data-testid":m,...u}){const{t:h}
|
|
3007
|
+
`}}}},ww={for:{type:"SpsFormMetaBase<any>",required:!0},description:"string",stronglySuggested:"boolean",help:"ReactNodeOrRenderFn",helpIcon:"SpsIcon",helpIconColor:"string",errors:"ReactNodeOrRenderFn"};function ki({children:e,className:t,description:n,for:r,stronglySuggested:a,help:s,helpIcon:l=Y.SpsIcon.QUESTION_CIRCLE,helpIconColor:c="blue200",errors:p,unsafelyReplaceClassName:f,"data-testid":m,...u}){const{t:h}=Be.useWoodlandLanguage(),S=o.useRef(null),y=o.useRef(null),C=o.useRef(null),T=o.useRef(null),[w,D]=o.useState(_e.HIDDEN),[M,I]=o.useState(_e.HIDDEN),[k,A]=o.useState(_e.HIDDEN),[G,E]=o.useState(_e.HIDDEN),R={maxLength:"This field accepts a maximum number of characters.",alpha:"This field accepts only alphabetic values.",numeric:"This field accpets only numerical values (zero or greater).",positiveOrNegativeNumber:"This field accpets only numerical values.",nonNumeric:"This field accepts only non-numerical values."};function O(){A(_e.HIDDEN),D(_e.HIDDEN)}function P(){I(_e.HIDDEN),E(_e.HIDDEN)}function z(W){W.preventDefault(),P(),A(ra(k))}function L(){return r&&(r instanceof Bn&&r.isVisibilyInvalid()||!(r instanceof Bn)&&!r.isValid())?[M,I]:r&&r instanceof Bn&&r.hasPreventativeErrors()?[G,E]:[_e.HIDDEN,()=>{}]}function re(){P();const[W,X]=L();X(ra(W))}function B(){P();const[,W]=L();W(_e.VISIBLE)}function Z(W){W.preventDefault(),P(),D(ra(w))}o.useEffect(()=>{r&&(r.onFocus=B,r.onBlur=P)},[r]);const H=U(f||"sps-form-group__label-container",t),[q,ae]=r instanceof Bn?[r,void 0]:[void 0,r];function $(W,X){return{dateFormat:`Please enter a date in the format ${X}.`,dateRangeOrder:"End date cannot be before start date.",dateValidity:"Please enter a valid date.",max:`Please enter a value no greater than ${X}.`,maxLength:`Please enter no more than ${X} characters.`,min:`Please enter a value no less than ${X}.`,minLength:`Please enter at least ${X} characters.`,required:"This field is required."}[W]}function j(){var W;if(q){for(const X of["dateFormat","dateRangeOrder","dateValidity","required","minLength"])if(q.hasError(X))return h(`label.errors.${X}`,{context:q.errors?q.errors[X]:"",defaultValue:`${$(X,q.errors?q.errors[X]:"")}`});if(q.hasError("dateConstraint")){const X=(W=q.errors)==null?void 0:W.dateConstraint,te=X.minExceeded?"min":"max";return h(`label.errors.dateConstraint.${te}`,{context:X,defaultValue:te==="min"?`Please enter a date on or after ${typeof X=="object"?X.minExceeded:X}`:`Please enter a date on or prior to ${typeof X=="object"?X.maxExceeded:X}`})}}return null}function oe(){if(q){for(const W of qt)if(q.hasPreventativeError(W))return h(`label.preventativeErrors.${W}`,{defaultValue:`${R[W]}`})}return null}const[ie,J]=_t(e,[{type:Wt}]);o.useEffect(()=>{q!=null&&q.hasPreventativeErrors()&&E(_e.VISIBLE)},[q==null?void 0:q.hasPreventativeErrors()]);const V=o.useRef(null);return o.useEffect(()=>{function W(X){var te;(te=V.current)!=null&&te.contains(X.target)||O()}return document.addEventListener("click",W),()=>{document.removeEventListener("click",W)}},[]),o.createElement(nt,{ref:V,formMeta:q,formControl:ae},o.createElement("div",{className:H},o.createElement("button",{className:U("sps-icon-button-wrapper","suggested-icon",!a&&"d-none"),tabIndex:0,onClick:z,type:"button","aria-label":`${J} Strongly Suggested Help`,hidden:!a},o.createElement("i",{ref:y,"data-testid":`${m}__suggested-icon`,className:U("sps-icon","sps-icon-exclamation-triangle","orange200","sps-form-group__label-suggested-icon",!a&&"d-none")})),o.createElement("i",{ref:S,"data-testid":`${m}__error-icon`,className:U("sps-icon","sps-icon-exclamation-circle","sps-form-group__label--error-icon"),onClick:re,"aria-label":`${J} Error Help`}),o.createElement("label",{htmlFor:r&&"id"in r?r.id:void 0,className:"sps-form-group__label","data-testid":m,...u},o.createElement("span",{ref:T,className:"sps-form-group__label-content"},J)),o.createElement("button",{className:U("sps-icon-button-wrapper",!s&&"d-none"),tabIndex:0,onClick:Z,type:"button","aria-label":`${J} Help`,hidden:!s},o.createElement("i",{ref:C,"data-testid":`${m}__help-icon`,className:U("sps-icon",`sps-icon-${l}`,c,!s&&"d-none"),onClick:Z})),ie),o.createElement(Bt,{kind:Y.TooltipKind.DEFAULT,for:C,showOn:Y.TooltipShowTrigger.MANUAL,isShown:w,altPosition:Y.Position.TOP_MIDDLE},Tt(s)),o.createElement(Bt,{kind:Y.TooltipKind.ERROR,for:S,showOn:Y.TooltipShowTrigger.MANUAL,isShown:M,altPosition:Y.Position.LEFT_MIDDLE},Tt(p)||j()),(q==null?void 0:q.hasPreventativeErrors())&&o.createElement(Bt,{kind:Y.TooltipKind.WARNING,for:T,showOn:Y.TooltipShowTrigger.MANUAL,isShown:G,altPosition:Y.Position.LEFT_MIDDLE},Tt(p)||oe()),o.createElement(Bt,{kind:Y.TooltipKind.DEFAULT,for:y,position:Y.Position.TOP_LEFT,altPosition:Y.Position.TOP_LEFT,showOn:Y.TooltipShowTrigger.MANUAL,isShown:k},h("label.stronglySuggested")),n&&o.createElement("div",{className:"sps-form-control__description","data-testid":`${m}__description`},n))}Object.assign(ki,{props:ww,displayName:"SpsLabel"});const Pu={general:{label:"General Usage",description:()=>o.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:v.code`
|
|
3008
3008
|
import {
|
|
3009
3009
|
SpsLabel,
|
|
3010
3010
|
SpsTextInput,
|
|
@@ -3172,11 +3172,11 @@ var r=n.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_
|
|
|
3172
3172
|
></SpsTextInput>
|
|
3173
3173
|
</>;
|
|
3174
3174
|
}
|
|
3175
|
-
`}}}},Cw={clearSelected:{type:"() => void",required:!0},itemsSelected:{type:"string | number",required:!0}};function xi(e){const{itemsSelected:t,clearSelected:n,children:r,className:a,"data-testid":s,unsafelyReplaceClassName:l,...c}=e,{t:p}
|
|
3175
|
+
`}}}},Cw={clearSelected:{type:"() => void",required:!0},itemsSelected:{type:"string | number",required:!0}};function xi(e){const{itemsSelected:t,clearSelected:n,children:r,className:a,"data-testid":s,unsafelyReplaceClassName:l,...c}=e,{t:p}=Be.useWoodlandLanguage(),f=()=>{typeof n=="function"&&n()},m=U(l||"sps-list-action-bar-container","z-stratum-actionbar",a);return t?o.createElement("div",{className:m,...c,"data-testid":s},o.createElement("div",{className:"sps-list-action-bar"},o.createElement("div",{className:"sps-list-action-bar__details"},o.createElement("span",{className:"sps-tag sps-tag--info","data-testid":`${s}__badge`},t),p("listActionBar.itemsSelected",{defaultValue:"Items Selected"})),o.createElement("div",{className:"sps-list-action-bar__actions"},o.createElement(Mt.Provider,{value:{fixed:!0}},r)),o.createElement("div",{className:"sps-list-action-bar__clear"},o.createElement(je,{kind:Y.ButtonKind.LINK,icon:Y.SpsIcon.X,onClick:f,"data-testid":`${s}__clear-button`},p("listActionBar.clearSelected",{defaultValue:"Clear Selected"}))))):o.createElement(o.Fragment,null)}Object.assign(xi,{props:Cw,displayName:"SpsListActionBar"});const aa=o.createContext({resizeable:!1,resizeState:{},setResizeState:()=>{},setSingleResizeState:()=>{},sort:[],setSort:()=>{}}),Dw=({children:e,resizeable:t=!1,resizeState:n,onResizeStateChange:r,sort:a,onSortChange:s})=>{const[l,c]=o.useState(n||{}),[p,f]=o.useState(a||[]),m=o.useRef(s);m.current=s;const u=o.useRef(r);u.current=r,o.useEffect(()=>{a&&a!==p&&f(a)},[a]);const h=o.useCallback(T=>{var w;f(T),(w=m.current)==null||w.call(m,T)},[]),S=o.useCallback(T=>{var w;c(T),(w=u.current)==null||w.call(u,T)},[]),y=o.useCallback((T,w)=>{c(D=>{var I;const M={...D,[T]:w};return(I=u.current)==null||I.call(u,M),M})},[]),C=o.useMemo(()=>({resizeable:t,resizeState:l,setResizeState:S,setSingleResizeState:y,sort:p,setSort:h}),[t,l,S,y,p,h]);return o.createElement(aa.Provider,{value:C},e)},Au=(e,t)=>{o.useLayoutEffect(()=>{if(e&&t.current){let n=0,r=!0,a=t.current.previousElementSibling;for(;a!==null;){if(!a.classList.contains("sps-table__cell--pinned")){r=!1;break}a=a.previousElementSibling}if(r){for(a=t.current.previousElementSibling;a!==null;)n+=a.clientWidth,a=a.previousElementSibling;t.current.style.left=`${n}px`}else{let s=t.current.nextElementSibling;for(;s!==null;)n+=s.clientWidth,s=s.nextElementSibling;t.current.style.right=`${n}px`}}})},Nw=e=>{o.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,a=e.current.offsetHeight-e.current.clientHeight;if(n.length>0){const s=[],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?s.push(f):l.push(f)});const c=s.reduce((f,m)=>f+m.clientWidth,0),p=l.reduce((f,m)=>f+m.clientWidth,0);e.current.style.backgroundPosition=`${c}px 0,
|
|
3176
3176
|
calc(100% - ${p}px) 0,
|
|
3177
3177
|
${c}px ${-a}px,
|
|
3178
3178
|
calc(100% - ${p+r}px) ${-a}px`}else e.current.style.backgroundPosition=`0 0, 100% 0, 0 ${-a}px,
|
|
3179
|
-
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)}})},kw=(e,t,n)=>{o.useLayoutEffect(()=>{const r=e.current;if(!r)return;const a=r==null?void 0:r.querySelector("thead"),s=r==null?void 0:r.querySelector("table"),l=s==null?void 0:s.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,C)=>{const D=p[C];if(D){const M=D.getAttribute("data-resizekey"),x=M&&n?n[M]:void 0;if(x){const k=`${x}px`;D.style.minWidth=k,D.style.maxWidth=k,D.style.width=k,T.style.minWidth=k,T.style.maxWidth=k,T.style.width=k}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=""})},S=()=>{a&&r&&(a.scrollLeft=r.scrollLeft)},y=()=>{let T=null;u===window?T=f?f.getBoundingClientRect().height:0:u instanceof HTMLElement&&(T=u.getBoundingClientRect().top);const C=r.scrollLeft,D=a==null?void 0:a.getBoundingClientRect(),M=r.getBoundingClientRect();if(T&&D&&D.top<=T&&T<=M.bottom-D.height&&M.top<=T){if(c&&Array.from(c).forEach((x,k)=>{const P=x.getBoundingClientRect().width,G=p[k].getBoundingClientRect().width,E=`${Math.max(P,G)}px`;p[k].style.minWidth=E,p[k].style.width=E,p[k].style.maxWidth=E,x.style.minWidth=E,x.style.width=E,x.style.maxWidth=E}),a&&e.current){a.style.position="fixed",a.style.top=`${T}px`,a.style.overflow="hidden";const x=e.current.offsetWidth-e.current.clientWidth,k=`${M.width-x}px`;a.style.maxWidth=k,a.style.width=k,a.style.minWidth=k}m||(m=document.createElement("div"),m.style.width=`${D.width}px`,m.style.height=`${D.height}px`,m.className="placeholder-head",r.insertBefore(m,s))}else m&&(r.removeChild(m),m=null,h());r.scrollLeft=C,S()},w=()=>{h(),y(),S()};return a&&a.classList.contains("sps-table__head--pinned")&&(u=vc(r)||window,u.addEventListener("scroll",y),window.addEventListener("resize",w),r.addEventListener("scroll",S),w()),()=>{u&&(u.removeEventListener("scroll",y),window.removeEventListener("resize",w)),r.removeEventListener("scroll",S)}})},xw=(e,t)=>{const n=()=>{if(!e.current||!t)return;const r=e.current,a=r==null?void 0:r.querySelector("table > thead"),s=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&&s&&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=s.getBoundingClientRect().height,m=a.getBoundingClientRect().height,u=r.scrollTop,h=f+p-r.getBoundingClientRect().height-r.scrollTop,S=r.scrollLeft;c.style.bottom=`${-u}px`,c.style.left=`${S}px`,c.style.opacity=h>0?"1":"0",l.style.top=`${u+m}px`,l.style.left=`${S}px`,l.style.opacity=u>0?"1":"0"}};o.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)}}},[]),o.useLayoutEffect(()=>{e.current&&t&&n()})},Iw={sort:"SortedColumn",onSortChange:"SortChangeHandler",selectable:"boolean",maxHeightPx:"number",maxHeightRem:"number",resizeable:"boolean",resizeState:"ResizeState",onResizeStateChange:"ResizeStateChangeHandler"};function jn({children:e,className:t,onSortChange:n,sort:r,"data-testid":a,unsafelyReplaceClassName:s,maxHeightPx:l,maxHeightRem:c,resizeable:p,resizeState:f,onResizeStateChange:m,...u}){const h=U(s||"sps-table-container",t),S=l?l/16:c,y=S?{maxHeight:`${S}rem`}:{},w=o.useRef(null);return xw(w,S),Nw(w),kw(w,S,f),o.createElement(Dw,{resizeable:p,resizeState:f,onResizeStateChange:m,sort:r,onSortChange:n},o.createElement("div",{ref:w,className:h,style:y},o.createElement("div",{className:"sps-table__shadow shadow--top"}),o.createElement("div",{className:"sps-table__shadow shadow--bottom"}),o.createElement("table",{className:"sps-table",role:"table","data-testid":`${a}`,...u},e)))}Object.assign(jn,{props:Iw,displayName:"SpsTable"});function Fu(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 Vu=({tableHeaderRef:e,resizerRef:t,resizeKey:n})=>{const{resizeable:r,resizeState:a,setSingleResizeState:s}=o.useContext(aa),l=!!r&&!!n,c=l?a==null?void 0:a[n]:0;return o.useLayoutEffect(()=>{var P,G;let p,f=c,m=0;const u=Fu(e.current),h=(P=e.current)==null?void 0:P.querySelector(".sps-table__column-resizer"),S=(G=e.current)==null?void 0:G.querySelector(".sps-table__column-resizer-guide");function y(){if(e.current&&p&&(h&&(h.style.backgroundColor=Pa.colors.blue200,h.style.zIndex="999"),S&&u&&(S.style.height=`${u.getBoundingClientRect().height}px`,S.style.display="block"),u)){const E=u.querySelectorAll("thead > tr > th");for(let R=0;R<E.length;R+=1){const O=E[R].querySelector(".sps-table__column-resizer");E[R].style.cursor="col-resize",E[R]!==e.current&&O&&(E[R].classList.remove("sps-table__header--resizeable"),O.style.display="none")}}}function w(){e.current&&p&&h&&S&&(h.style.right=`${m}px`,h.style.zIndex="999",S.style.right=`${m}px`)}function T(){if(e.current){const E=f?`${f}px`:"";e.current.style.width=E,e.current.style.maxWidth=E,e.current.style.minWidth=E;const R=e.current.querySelector(".sps-table__header-cell-body");if(R&&(R.style.overflow=E?"hidden":"",R.style.textOverflow=E?"ellipsis":""),h&&S&&(h.style.right="0",h.style.backgroundColor="",h.style.zIndex="0",S.style.right="0",S.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 A=0;A<O.length;A+=1){const j=O[A].querySelector(".sps-table__header-cell-body"),L=O[A].querySelector(".sps-table__column-resizer");O[A].style.cursor="default",O[A]!==e.current&&L&&(O[A].classList.add("sps-table__header--resizeable"),L.style.display="block"),j!=null&&j.textContent&&!j.title&&(j.title=j.textContent)}}}}const C=E=>{e.current&&(E.preventDefault(),p=E.clientX,f=e.current.clientWidth,y())},D=E=>{if(!p||!e.current)return;const R=Math.max(Math.min(p-E.clientX,40),-40);R!==0&&(p=E.clientX,m+=R,f=Math.max(f-R,40),w())},M=()=>{!e.current||!p||(p=0,m=0,T(),s(n,f))},x=()=>{f=0,T(),s(n,f)};let k=!1;return l&&t.current&&(t.current.addEventListener("dragstart",C),t.current.addEventListener("mousedown",C),t.current.addEventListener("dblclick",x),window.addEventListener("mousemove",D),window.addEventListener("dragend",M),window.addEventListener("mouseup",M),k=!0,T()),()=>{t.current&&k&&(t.current.removeEventListener("dragstart",C),t.current.removeEventListener("mousedown",C),t.current.removeEventListener("dblclick",x)),k&&(window.removeEventListener("mousemove",D),window.removeEventListener("dragend",M),window.removeEventListener("mouseup",M))}},[l,c,n,s]),{isResizeable:l}},$u=e=>{const{resizeable:t,resizeState:n}=o.useContext(aa);o.useLayoutEffect(()=>{if(!t||!n||!e.current)return;const r=Fu(e.current);if(!r)return;const a=r.querySelector(`thead > tr > th:nth-of-type(${e.current.cellIndex+1})`);if(!a)return;const s=a.getAttribute("data-resizekey");if(!s)return;const l=n[s],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||"")})},Ku={controlCell:"boolean",sortKey:"string",resizeKey:"string",pinned:"boolean"};function it({children:e,className:t,controlCell:n,sortKey:r,resizeKey:a="","data-testid":s,unsafelyReplaceClassName:l,pinned:c=!1,...p}){const{sort:f,setSort:m}=o.useContext(aa),u=f==null?void 0:f.find(D=>D.key===r),h=()=>{if(r&&!n){const D=(u==null?void 0:u.direction)===Y.SortDirection.ASCENDING?Y.SortDirection.DESCENDING:Y.SortDirection.ASCENDING;m([{key:r,direction:D}])}},S=D=>{(D.key==="Enter"||D.key===" "||D.key==="Spacebar")&&(D.preventDefault(),h())},y=o.useRef(null);Au(c,y);const w=o.useRef(null),{isResizeable:T}=Vu({tableHeaderRef:y,resizerRef:w,resizeKey:a}),C=U(l||"sps-table__header",n&&"sps-table__header--control",!r&&"sps-table__header--sort-disabled",(u==null?void 0:u.direction)===Y.SortDirection.ASCENDING&&"sps-table__header--sorted-asc",(u==null?void 0:u.direction)===Y.SortDirection.DESCENDING&&"sps-table__header--sorted-desc",c&&"sps-table__cell--pinned",T&&"sps-table__header--resizeable",t);return o.createElement("th",{className:C,ref:y,role:"columnheader","aria-sort":(u==null?void 0:u.direction)||"none","data-testid":`${s}__header`,"data-resizekey":a||void 0,...p},o.createElement("span",{className:"sps-table__header-cell-body","data-testid":`${s}__header-cell-body`,onClick:h,tabIndex:r?0:void 0,onKeyDown:S},e),T&&o.createElement(o.Fragment,null,o.createElement("span",{ref:w,className:U("sps-table__column-resizer")}),o.createElement("span",{className:U("sps-table__column-resizer-guide")})))}Object.assign(it,{props:Ku,displayName:"SpsTableHeader"});function Hu(e){return o.createElement(it,{...e})}Object.assign(Hu,{props:Ku,displayName:"SpsTh"});const Wu={pinned:"boolean"};function Cn({children:e,className:t,"data-testid":n,unsafelyReplaceClassName:r,pinned:a,...s}){const l=U(r||"sps-table__head",a&&"sps-table__head--pinned",t);return o.createElement("thead",{className:l,"data-testid":`${n}__head`,...s},e)}Object.assign(Cn,{props:Wu,displayName:"SpsTableHead"});function Gu(e){return o.createElement(Cn,{...e})}Object.assign(Gu,{props:Wu,displayName:"SpsThead"});const Yu={};function Ye({children:e,className:t,"data-testid":n,unsafelyReplaceClassName:r,...a}){const s=U(r||"sps-table__row",t);return o.createElement("tr",{className:s,role:"row","data-testid":`${n}__row`,...a},e)}Object.assign(Ye,{props:Yu,displayName:"SpsTableRow"});function Uu(e){return o.createElement(Ye,{...e})}Object.assign(Uu,{props:Yu,displayName:"SpsTr"});const zu={};function Dn(e){const{children:t,className:n,"data-testid":r,unsafelyReplaceClassName:a,...s}=e,l=U(a||"sps-table__body",n);return o.createElement("tbody",{className:l,"data-testid":`${r}__body`,...s},t)}Object.assign(Dn,{props:zu,displayName:"SpsTableBody"});function ju(e){return o.createElement(Dn,{...e})}Object.assign(ju,{props:zu,displayName:"SpsTbody"});const qu={buttonCell:"boolean",controlCell:"boolean",wrap:"SpsTableCellWrapWidth",pinned:"boolean"};function ue(e){const{buttonCell:t,children:n,className:r,controlCell:a,"data-testid":s,unsafelyReplaceClassName:l,wrap:c,pinned:p=!1,...f}=e,m=U(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=o.useRef(null);return Au(p,u),$u(u),o.createElement("td",{className:m,ref:u,role:"cell","data-testid":`${s}__cell`,...f},n)}Object.assign(ue,{props:qu,displayName:"SpsTableCell"});function Ju(e){return o.createElement(ue,{...e})}Object.assign(Ju,{props:qu,displayName:"SpsTd"});const Mw={};function Zu(e){const{children:t,className:n,unsafelyReplaceClassName:r,...a}=e,[s,l,c]=_t(t,[{type:je,props:{kind:Y.ButtonKind.LINK}},[{type:je,props:{kind:Y.ButtonKind.ICON}},{type:zn}]]),p=s.length>0&&(l.length>0||c.length>0),f=l.length>0&&c.length>0,m=U(r||"sps-button-group",n);return o.createElement("div",{className:m,...a},s.length>0&&s,p&&o.createElement("div",{className:"sps-vertical-rule"}),l.length>0&&l,f&&o.createElement("div",{className:"sps-vertical-rule"}),c.length>0&&c)}Object.assign(Zu,{props:Mw,displayName:"SpsButtonGroup"});const _w={basic:{label:"Basic Buttons",description:({NavigateTo:e})=>o.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"," ",o.createElement(e,{to:"Modal"},"Modal"),"."),examples:{basic:{description:"Without Icons",imports:v.code`
|
|
3179
|
+
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)}})},kw=(e,t,n)=>{o.useLayoutEffect(()=>{const r=e.current;if(!r)return;const a=r==null?void 0:r.querySelector("thead"),s=r==null?void 0:r.querySelector("table"),l=s==null?void 0:s.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,w)=>{const D=p[w];if(D){const M=D.getAttribute("data-resizekey"),I=M&&n?n[M]:void 0;if(I){const k=`${I}px`;D.style.minWidth=k,D.style.maxWidth=k,D.style.width=k,T.style.minWidth=k,T.style.maxWidth=k,T.style.width=k}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=""})},S=()=>{a&&r&&(a.scrollLeft=r.scrollLeft)},y=()=>{let T=null;u===window?T=f?f.getBoundingClientRect().height:0:u instanceof HTMLElement&&(T=u.getBoundingClientRect().top);const w=r.scrollLeft,D=a==null?void 0:a.getBoundingClientRect(),M=r.getBoundingClientRect();if(T&&D&&D.top<=T&&T<=M.bottom-D.height&&M.top<=T){if(c&&Array.from(c).forEach((I,k)=>{const A=I.getBoundingClientRect().width,G=p[k].getBoundingClientRect().width,E=`${Math.max(A,G)}px`;p[k].style.minWidth=E,p[k].style.width=E,p[k].style.maxWidth=E,I.style.minWidth=E,I.style.width=E,I.style.maxWidth=E}),a&&e.current){a.style.position="fixed",a.style.top=`${T}px`,a.style.overflow="hidden";const I=e.current.offsetWidth-e.current.clientWidth,k=`${M.width-I}px`;a.style.maxWidth=k,a.style.width=k,a.style.minWidth=k}m||(m=document.createElement("div"),m.style.width=`${D.width}px`,m.style.height=`${D.height}px`,m.className="placeholder-head",r.insertBefore(m,s))}else m&&(r.removeChild(m),m=null,h());r.scrollLeft=w,S()},C=()=>{h(),y(),S()};return a&&a.classList.contains("sps-table__head--pinned")&&(u=vc(r)||window,u.addEventListener("scroll",y),window.addEventListener("resize",C),r.addEventListener("scroll",S),C()),()=>{u&&(u.removeEventListener("scroll",y),window.removeEventListener("resize",C)),r.removeEventListener("scroll",S)}})},xw=(e,t)=>{const n=()=>{if(!e.current||!t)return;const r=e.current,a=r==null?void 0:r.querySelector("table > thead"),s=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&&s&&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=s.getBoundingClientRect().height,m=a.getBoundingClientRect().height,u=r.scrollTop,h=f+p-r.getBoundingClientRect().height-r.scrollTop,S=r.scrollLeft;c.style.bottom=`${-u}px`,c.style.left=`${S}px`,c.style.opacity=h>0?"1":"0",l.style.top=`${u+m}px`,l.style.left=`${S}px`,l.style.opacity=u>0?"1":"0"}};o.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)}}},[]),o.useLayoutEffect(()=>{e.current&&t&&n()})},Iw={sort:"SortedColumn",onSortChange:"SortChangeHandler",selectable:"boolean",maxHeightPx:"number",maxHeightRem:"number",resizeable:"boolean",resizeState:"ResizeState",onResizeStateChange:"ResizeStateChangeHandler"};function jn({children:e,className:t,onSortChange:n,sort:r,"data-testid":a,unsafelyReplaceClassName:s,maxHeightPx:l,maxHeightRem:c,resizeable:p,resizeState:f,onResizeStateChange:m,...u}){const h=U(s||"sps-table-container",t),S=l?l/16:c,y=S?{maxHeight:`${S}rem`}:{},C=o.useRef(null);return xw(C,S),Nw(C),kw(C,S,f),o.createElement(Dw,{resizeable:p,resizeState:f,onResizeStateChange:m,sort:r,onSortChange:n},o.createElement("div",{ref:C,className:h,style:y},o.createElement("div",{className:"sps-table__shadow shadow--top"}),o.createElement("div",{className:"sps-table__shadow shadow--bottom"}),o.createElement("table",{className:"sps-table",role:"table","data-testid":`${a}`,...u},e)))}Object.assign(jn,{props:Iw,displayName:"SpsTable"});function Fu(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 Vu=({tableHeaderRef:e,resizerRef:t,resizeKey:n})=>{const{resizeable:r,resizeState:a,setSingleResizeState:s}=o.useContext(aa),l=!!r&&!!n,c=l?a==null?void 0:a[n]:0;return o.useLayoutEffect(()=>{var A,G;let p,f=c,m=0;const u=Fu(e.current),h=(A=e.current)==null?void 0:A.querySelector(".sps-table__column-resizer"),S=(G=e.current)==null?void 0:G.querySelector(".sps-table__column-resizer-guide");function y(){if(e.current&&p&&(h&&(h.style.backgroundColor=Pa.colors.blue200,h.style.zIndex="999"),S&&u&&(S.style.height=`${u.getBoundingClientRect().height}px`,S.style.display="block"),u)){const E=u.querySelectorAll("thead > tr > th");for(let R=0;R<E.length;R+=1){const O=E[R].querySelector(".sps-table__column-resizer");E[R].style.cursor="col-resize",E[R]!==e.current&&O&&(E[R].classList.remove("sps-table__header--resizeable"),O.style.display="none")}}}function C(){e.current&&p&&h&&S&&(h.style.right=`${m}px`,h.style.zIndex="999",S.style.right=`${m}px`)}function T(){if(e.current){const E=f?`${f}px`:"";e.current.style.width=E,e.current.style.maxWidth=E,e.current.style.minWidth=E;const R=e.current.querySelector(".sps-table__header-cell-body");if(R&&(R.style.overflow=E?"hidden":"",R.style.textOverflow=E?"ellipsis":""),h&&S&&(h.style.right="0",h.style.backgroundColor="",h.style.zIndex="0",S.style.right="0",S.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 P=0;P<O.length;P+=1){const z=O[P].querySelector(".sps-table__header-cell-body"),L=O[P].querySelector(".sps-table__column-resizer");O[P].style.cursor="default",O[P]!==e.current&&L&&(O[P].classList.add("sps-table__header--resizeable"),L.style.display="block"),z!=null&&z.textContent&&!z.title&&(z.title=z.textContent)}}}}const w=E=>{e.current&&(E.preventDefault(),p=E.clientX,f=e.current.clientWidth,y())},D=E=>{if(!p||!e.current)return;const R=Math.max(Math.min(p-E.clientX,40),-40);R!==0&&(p=E.clientX,m+=R,f=Math.max(f-R,40),C())},M=()=>{!e.current||!p||(p=0,m=0,T(),s(n,f))},I=()=>{f=0,T(),s(n,f)};let k=!1;return l&&t.current&&(t.current.addEventListener("dragstart",w),t.current.addEventListener("mousedown",w),t.current.addEventListener("dblclick",I),window.addEventListener("mousemove",D),window.addEventListener("dragend",M),window.addEventListener("mouseup",M),k=!0,T()),()=>{t.current&&k&&(t.current.removeEventListener("dragstart",w),t.current.removeEventListener("mousedown",w),t.current.removeEventListener("dblclick",I)),k&&(window.removeEventListener("mousemove",D),window.removeEventListener("dragend",M),window.removeEventListener("mouseup",M))}},[l,c,n,s]),{isResizeable:l}},$u=e=>{const{resizeable:t,resizeState:n}=o.useContext(aa);o.useLayoutEffect(()=>{if(!t||!n||!e.current)return;const r=Fu(e.current);if(!r)return;const a=r.querySelector(`thead > tr > th:nth-of-type(${e.current.cellIndex+1})`);if(!a)return;const s=a.getAttribute("data-resizekey");if(!s)return;const l=n[s],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||"")})},Ku={controlCell:"boolean",sortKey:"string",resizeKey:"string",pinned:"boolean"};function it({children:e,className:t,controlCell:n,sortKey:r,resizeKey:a="","data-testid":s,unsafelyReplaceClassName:l,pinned:c=!1,...p}){const{sort:f,setSort:m}=o.useContext(aa),u=f==null?void 0:f.find(D=>D.key===r),h=()=>{if(r&&!n){const D=(u==null?void 0:u.direction)===Y.SortDirection.ASCENDING?Y.SortDirection.DESCENDING:Y.SortDirection.ASCENDING;m([{key:r,direction:D}])}},S=D=>{(D.key==="Enter"||D.key===" "||D.key==="Spacebar")&&(D.preventDefault(),h())},y=o.useRef(null);Au(c,y);const C=o.useRef(null),{isResizeable:T}=Vu({tableHeaderRef:y,resizerRef:C,resizeKey:a}),w=U(l||"sps-table__header",n&&"sps-table__header--control",!r&&"sps-table__header--sort-disabled",(u==null?void 0:u.direction)===Y.SortDirection.ASCENDING&&"sps-table__header--sorted-asc",(u==null?void 0:u.direction)===Y.SortDirection.DESCENDING&&"sps-table__header--sorted-desc",c&&"sps-table__cell--pinned",T&&"sps-table__header--resizeable",t);return o.createElement("th",{className:w,ref:y,role:"columnheader","aria-sort":(u==null?void 0:u.direction)||"none","data-testid":`${s}__header`,"data-resizekey":a||void 0,...p},o.createElement("span",{className:"sps-table__header-cell-body","data-testid":`${s}__header-cell-body`,onClick:h,tabIndex:r?0:void 0,onKeyDown:S},e),T&&o.createElement(o.Fragment,null,o.createElement("span",{ref:C,className:U("sps-table__column-resizer")}),o.createElement("span",{className:U("sps-table__column-resizer-guide")})))}Object.assign(it,{props:Ku,displayName:"SpsTableHeader"});function Hu(e){return o.createElement(it,{...e})}Object.assign(Hu,{props:Ku,displayName:"SpsTh"});const Wu={pinned:"boolean"};function Cn({children:e,className:t,"data-testid":n,unsafelyReplaceClassName:r,pinned:a,...s}){const l=U(r||"sps-table__head",a&&"sps-table__head--pinned",t);return o.createElement("thead",{className:l,"data-testid":`${n}__head`,...s},e)}Object.assign(Cn,{props:Wu,displayName:"SpsTableHead"});function Gu(e){return o.createElement(Cn,{...e})}Object.assign(Gu,{props:Wu,displayName:"SpsThead"});const Yu={};function Ye({children:e,className:t,"data-testid":n,unsafelyReplaceClassName:r,...a}){const s=U(r||"sps-table__row",t);return o.createElement("tr",{className:s,role:"row","data-testid":`${n}__row`,...a},e)}Object.assign(Ye,{props:Yu,displayName:"SpsTableRow"});function Uu(e){return o.createElement(Ye,{...e})}Object.assign(Uu,{props:Yu,displayName:"SpsTr"});const zu={};function Dn(e){const{children:t,className:n,"data-testid":r,unsafelyReplaceClassName:a,...s}=e,l=U(a||"sps-table__body",n);return o.createElement("tbody",{className:l,"data-testid":`${r}__body`,...s},t)}Object.assign(Dn,{props:zu,displayName:"SpsTableBody"});function ju(e){return o.createElement(Dn,{...e})}Object.assign(ju,{props:zu,displayName:"SpsTbody"});const qu={buttonCell:"boolean",controlCell:"boolean",wrap:"SpsTableCellWrapWidth",pinned:"boolean"};function ue(e){const{buttonCell:t,children:n,className:r,controlCell:a,"data-testid":s,unsafelyReplaceClassName:l,wrap:c,pinned:p=!1,...f}=e,m=U(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=o.useRef(null);return Au(p,u),$u(u),o.createElement("td",{className:m,ref:u,role:"cell","data-testid":`${s}__cell`,...f},n)}Object.assign(ue,{props:qu,displayName:"SpsTableCell"});function Ju(e){return o.createElement(ue,{...e})}Object.assign(Ju,{props:qu,displayName:"SpsTd"});const Mw={};function Zu(e){const{children:t,className:n,unsafelyReplaceClassName:r,...a}=e,[s,l,c]=_t(t,[{type:je,props:{kind:Y.ButtonKind.LINK}},[{type:je,props:{kind:Y.ButtonKind.ICON}},{type:zn}]]),p=s.length>0&&(l.length>0||c.length>0),f=l.length>0&&c.length>0,m=U(r||"sps-button-group",n);return o.createElement("div",{className:m,...a},s.length>0&&s,p&&o.createElement("div",{className:"sps-vertical-rule"}),l.length>0&&l,f&&o.createElement("div",{className:"sps-vertical-rule"}),c.length>0&&c)}Object.assign(Zu,{props:Mw,displayName:"SpsButtonGroup"});const _w={basic:{label:"Basic Buttons",description:({NavigateTo:e})=>o.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"," ",o.createElement(e,{to:"Modal"},"Modal"),"."),examples:{basic:{description:"Without Icons",imports:v.code`
|
|
3180
3180
|
import { SpsButton } from "@spscommerce/ds-react";
|
|
3181
3181
|
import { ButtonKind } from "@spscommerce/ds-shared";
|
|
3182
3182
|
`,jsx:v.code`
|
|
@@ -4917,7 +4917,7 @@ var r=n.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_
|
|
|
4917
4917
|
import { FeedbackBlockKind } from "@spscommerce/ds-shared";
|
|
4918
4918
|
`,jsx:v.code`
|
|
4919
4919
|
<SpsMicroBlock kind={FeedbackBlockKind.TIP} message="Pro Tip: Don't be a loser."/>
|
|
4920
|
-
`}}}},Pw={kind:"ModalKind",size:"ModalSize",title:"string",onClose:"() => void",focusElementOnOpen:"React.MutableRefObject<HTMLElement>",fullHeight:"boolean"};function sa({children:e}){return o.createElement("div",{className:"sps-modal__footer"},e)}Object.assign(sa,{props:{},propTypes:{},displayName:"SpsModalFooter"});function Mi({children:e,className:t,id:n,kind:r=Y.ModalKind.GENERAL,size:a=Y.ModalSize.SMALL,onClose:s,focusElementOnOpen:l,title:c,fullHeight:p=!1,...f}){const m=gn(n),u=U("sps-modal","z-stratum-dialog",`sps-modal--${r}`,`sps-modal--${a}`,t),{t:h}
|
|
4920
|
+
`}}}},Pw={kind:"ModalKind",size:"ModalSize",title:"string",onClose:"() => void",focusElementOnOpen:"React.MutableRefObject<HTMLElement>",fullHeight:"boolean"};function sa({children:e}){return o.createElement("div",{className:"sps-modal__footer"},e)}Object.assign(sa,{props:{},propTypes:{},displayName:"SpsModalFooter"});function Mi({children:e,className:t,id:n,kind:r=Y.ModalKind.GENERAL,size:a=Y.ModalSize.SMALL,onClose:s,focusElementOnOpen:l,title:c,fullHeight:p=!1,...f}){const m=gn(n),u=U("sps-modal","z-stratum-dialog",`sps-modal--${r}`,`sps-modal--${a}`,t),{t:h}=Be.useWoodlandLanguage(),S=o.useRef(null),y=o.useRef(document.body.style.paddingRight||""),C=o.useRef(document.body.style.overflow||"");C.current==="hidden"&&(C.current="",y.current=""),o.useLayoutEffect(()=>{let I=!1;if(document.body.style.overflow!=="hidden"){const k=`${window.innerWidth-document.body.clientWidth}px`;document.body.style.paddingRight=k,document.body.style.overflow="hidden",I=!0}return()=>{I&&(document.body.style.overflow=C.current,document.body.style.paddingRight=y.current)}},[]),o.useEffect(()=>{l&&l.current?l.current.focus():S.current&&S.current.focus()},[l]);const T=o.useCallback(I=>{if(I&&I.key==="Escape"&&s&&s(),I&&I.key==="Tab"&&S.current){const k=S.current.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'),A=k[0],G=k[k.length-1];k.length===0?I.preventDefault():I.shiftKey&&I.target===A?(I.preventDefault(),G.focus()):!I.shiftKey&&I.target===G&&(I.preventDefault(),A.focus())}},[s]),[[w],D]=_t(e,[{type:sa}]),M={general:"Action",info:"Info",success:"Success",warning:"Warning","serious-warning":"Warning"};return o.createElement("div",{id:m.current,role:"dialog","aria-modal":!0,"aria-labelledby":`${m.current}-title`,className:u,onKeyDown:T,tabIndex:-1,ref:S},o.createElement("div",{...f,className:U("sps-modal__dialog",{"sps-modal__dialog-full-height":p})},o.createElement("div",{className:"sps-modal__titlebar"},o.createElement("div",{className:"sps-modal__title",id:`${m.current}-title`},c||h(`modal.defaultTitle.${r}`,{defaultValue:`${M[r]}`})),s&&o.createElement("div",{className:"sps-button sps-button--icon",onClick:s},o.createElement("button",{"aria-label":h("modal.close",{defaultValue:"Close modal"}),type:"button"},o.createElement("i",{className:"sps-icon sps-icon-x"})))),o.createElement("div",{className:"sps-modal__body"},o.createElement(Mt.Provider,{value:{parentElementRef:S,fixed:!0}},D)),w||o.createElement("div",{className:"sps-modal__footer"},o.createElement(je,{kind:r===Y.ModalKind.SERIOUS_WARNING?Y.ButtonKind.DELETE:Y.ButtonKind.KEY,onClick:s},h("modal.defaultButtonLabel",{defaultValue:"Okay"})))))}Object.assign(Mi,{props:Pw,displayName:"SpsModal"});const Aw={title:"string",show:"boolean",closeOnEscapePressed:"boolean",onClose:"() => void",focusElementOnOpen:"React.MutableRefObject<HTMLElement>"};function _i({children:e,className:t,id:n,show:r,closeOnEscapePressed:a=!0,onClose:s,focusElementOnOpen:l,title:c,...p}){const f=gn(n),m=U("sps-slide-in-panel","z-stratum-dialog",r?"open":"",t),{t:u}=Be.useWoodlandLanguage(),h=o.useRef(null),S=o.useRef(document.body.style.paddingRight||""),y=o.useRef(document.body.style.overflow||"");y.current==="hidden"&&(y.current="",S.current=""),o.useLayoutEffect(()=>{let w=!1;if(r&&document.body.style.overflow!=="hidden"){const D=`${window.innerWidth-document.body.clientWidth}px`;document.body.style.paddingRight=D,document.body.style.overflow="hidden",w=!0}return()=>{w&&(document.body.style.overflow=y.current,document.body.style.paddingRight=S.current)}},[r]),o.useEffect(()=>{l&&l.current?l.current.focus():h.current&&h.current.focus()},[l]);const C=o.useCallback(w=>{if(a&&w&&w.key==="Escape"&&s&&s(),w&&w.key==="Tab"&&h.current){const D=h.current.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'),M=D[0],I=D[D.length-1];D.length===0?w.preventDefault():w.shiftKey&&w.target===M?(w.preventDefault(),I.focus()):!w.shiftKey&&w.target===I&&(w.preventDefault(),M.focus())}},[s]);o.useEffect(()=>(window.addEventListener("keydown",C),()=>{window.removeEventListener("keydown",C)}),[C]);const[T]=_t(e);return o.createElement("div",{id:f.current,role:"dialog","aria-labelledby":`${f.current}-title`,className:m,tabIndex:-1,ref:h},o.createElement("div",{...p,className:`sps-slide-in-panel__dialog ${r?"open":""}`},o.createElement("div",{className:"sps-slide-in-panel__titlebar"},o.createElement("div",{className:"sps-slide-in-panel__title",id:`${f.current}-title`},c||u("slideInPanel.defaultTitle",{defaultValue:"Slide In Panel"})),s&&o.createElement("div",{className:"sps-button sps-button--icon",onClick:s},o.createElement("button",{"aria-label":u("slideInPanel.close",{defaultValue:"Close"}),type:"button"},o.createElement("i",{className:"sps-icon sps-icon-x"})))),o.createElement("div",{className:"sps-slide-in-panel__body"},o.createElement(Mt.Provider,{value:{parentElementRef:h,fixed:!0}},T))))}Object.assign(_i,{props:Aw,displayName:"SpsSlideInPanel"});const nm={generalUsage:{label:"General Usage",description:()=>o.createElement(o.Fragment,null),examples:{noCloseButton:{description:()=>o.createElement(o.Fragment,null,o.createElement("p",null,"Click on the button below to show the slide-in panel.")),react:v.code`
|
|
4921
4921
|
import { SpsButton, SpsSlideInPanel } from "@spscommerce/ds-react";
|
|
4922
4922
|
import { ButtonKind } from "@spscommerce/ds-shared";
|
|
4923
4923
|
function Component() {
|
|
@@ -5387,7 +5387,7 @@ var r=n.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_
|
|
|
5387
5387
|
</>
|
|
5388
5388
|
);
|
|
5389
5389
|
}
|
|
5390
|
-
`}}}},Fw={captionKey:"string",clearSearchOnBlur:"boolean",clearSearchOnEnter:"boolean",debounce:"number",disabled:"boolean",disableSelected:"boolean",comparisonKey:"string",conformWidth:"boolean",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",filterByTextAndCaptionKey:"boolean",maxHeightOptionListPx:"number",maxHeightOptionListRem:"number",disableOptionsMemoization:"boolean"};function Li({action:e,captionKey:t,className:n,clearSearchOnBlur:r,clearSearchOnEnter:a,conformWidth:s,debounce:l,disabled:c,disableSelected:p=!1,comparisonKey:f,formControl:m,formMeta:u,hideSelected:h,id:S,onChange:y,onSearchChange:
|
|
5390
|
+
`}}}},Fw={captionKey:"string",clearSearchOnBlur:"boolean",clearSearchOnEnter:"boolean",debounce:"number",disabled:"boolean",disableSelected:"boolean",comparisonKey:"string",conformWidth:"boolean",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",filterByTextAndCaptionKey:"boolean",maxHeightOptionListPx:"number",maxHeightOptionListRem:"number",disableOptionsMemoization:"boolean"};function Li({action:e,captionKey:t,className:n,clearSearchOnBlur:r,clearSearchOnEnter:a,conformWidth:s,debounce:l,disabled:c,disableSelected:p=!1,comparisonKey:f,formControl:m,formMeta:u,hideSelected:h,id:S,onChange:y,onSearchChange:C,options:T,placeholder:w,tallOptionList:D,textKey:M,unsafelyReplaceClassName:I,value:k,zeroState:A="There are no matching options.",loading:G,filterByTextAndCaptionKey:E,icon:R,maxHeightOptionListPx:O,maxHeightOptionListRem:P,disableOptionsMemoization:z,"data-testid":L,wrap:re=!1,...B}){const Z=k??[],H=u||m,{wrapperId:q,controlId:ae}=St(S,H),[$,j]=Zt({keyDown:null,opensUpward:!1,searchText:"",activeTagIndex:null,optionIds:""});o.useEffect(()=>{C&&C($.searchText)},[$.searchText]);const oe=o.useRef(null),ie=o.useRef(null),J=o.useRef(null),V=o.useRef(null),W=o.useRef(null);function X(){r&&j({searchText:""})}const{showPopup:te,doShowPopup:pe,doHidePopup:ce}=dr(oe,V,X);function Q(){j({activeTagIndex:null}),pe()}function se(){setTimeout(()=>{var Te;(Te=J.current)==null||Te.focus()},0)}function we(Te){if(W.current&&W.current.children.length&&typeof Te=="number"){const ve=W.current.children[Te],rt=ve==null?void 0:ve.querySelector(".sps-clickable-tag__icon");rt&&rt.focus()}}function Le(Te){j({searchText:""}),H&&(H.setValue(Te),H.markAsDirty()),y&&y(new bn({value:Te}))}function wt(Te){Z.indexOf(Te)===-1&&Le([...Z,Te]),se()}function lt(Te){const ve=Z.filter((rt,It)=>It!==Te);Le(ve)}function ct(Te){j({searchText:Te.target.value})}function Xe(Te){var ve,rt;if(!c){const It=!h&&!Te.target.selectionStart&&Z&&Z.length;switch(Te.key){case"Backspace":if($.activeTagIndex===Z.length-1){lt($.activeTagIndex),se();return}if($.activeTagIndex!==null){lt($.activeTagIndex);return}if(It){Le(Z.slice(0,Z.length-1));return}break;case"Delete":if($.activeTagIndex!==null){lt($.activeTagIndex);return}break;case"Up":case"ArrowUp":case"Down":case"ArrowDown":Te.preventDefault();break;case"Left":case"ArrowLeft":if(It){$.activeTagIndex===null?(j({activeTagIndex:Z.length-1}),ce(),we(Z.length-1)):$.activeTagIndex>0&&(j({activeTagIndex:$.activeTagIndex-1}),ce(),we($.activeTagIndex-1));return}break;case"Right":case"ArrowRight":if($.activeTagIndex!==null){$.activeTagIndex===Z.length-1?(j({activeTagIndex:null}),pe(),(ve=J.current)==null||ve.focus()):(j({activeTagIndex:$.activeTagIndex+1}),we($.activeTagIndex+1));return}break;case"Tab":ce();break;case"Escape":ce(),(rt=J.current)==null||rt.blur();break;case"Enter":a&&j({searchText:""});break}Te.persist(),j({keyDown:Te})}}function At(Te){j({opensUpward:Te})}function Qe(Te){Le([]),Te.stopPropagation()}function Ke(Te){j({optionIds:new Array(Te).fill("").map((ve,rt)=>`${q}-options-option-${rt}`).join(",")})}const Se=o.useCallback(()=>{j({searchText:""}),se()},[]),Ue=U(I||"sps-multi-select",te&&"sps-multi-select--open",te&&"z-stratum-dropdown",$.opensUpward&&"sps-multi-select--opens-upward",c&&"sps-form-control--disabled",n),We=new Array(Z.length).fill(0).map((Te,ve)=>`${q}_tag-${ve}`);return o.useEffect(()=>{let Te;return te&&(Te=()=>{ce()},window.addEventListener("resize",Te)),()=>{Te&&window.removeEventListener("resize",Te)}},[te]),Pr({isOpen:te,rootRef:oe}),o.createElement(nt,{id:q,className:Ue,formControl:m,formMeta:u,ref:oe,inputRef:J,focusInputOnClick:!0,onKeyDown:Xe,role:"listbox","aria-multiselectable":!0,"aria-activedescendant":We[$.activeTagIndex||0],"aria-owns":$.optionIds},o.createElement("div",{className:"sps-text-input",ref:ie},o.createElement("div",{className:U("sps-form-control",Z&&!c&&"sps-form-control--clearable")},R&&o.createElement("i",{className:U("sps-text-input__icon","sps-icon",`sps-icon-${R}`)}),o.createElement("div",{className:"sps-multi-select__tags-and-input",ref:W},h?null:Z.map((Te,ve)=>o.createElement(Ar,{id:We[ve],role:"option",disabled:c,"aria-selected":"true",key:We[ve],onRemove:()=>lt(ve),wrap:re},M?Te[M]:Te)),o.createElement("input",{type:"text",ref:J,"data-testid":`${L}__option-list-input`,value:$.searchText,className:"sps-text-input__input",placeholder:Z.length===0?w:void 0,id:ae,onClick:Q,onChange:ct,onFocus:Q,onKeyDown:Xe,disabled:c,role:"listbox","aria-multiselectable":"true","aria-owns":We.join(" "),...B})),Z.length!==0&&!c?o.createElement("i",{className:"sps-icon sps-icon-x-circle sps-form-control__clear-btn",onClick:Te=>Qe(Te)}):null)),o.createElement(Br,{id:`${q}_options`,ref:V,"data-testid":`${L}__option-list`,attachTo:ie,captionKey:t,disabledOptions:p?Z:null,isOpen:te,comparisonKey:f,keepOpen:!0,keyDown:$.keyDown,options:T,specialAction:e,onOptionSelected:wt,onPositionFlip:At,hideInlineSearch:!0,optionRole:"option",onOptionListChanged:Ke,filterByTextAndCaptionKey:E,searchDebounce:l,search:$.searchText,tall:D,textKey:M,zeroState:A,loading:G,maxHeightPx:O,maxHeightRem:P,disableOptionsMemoization:z,onSpecialActionSelect:Se,conformWidth:s}))}Object.assign(Li,{props:Fw,displayName:"SpsMultiSelect"});const om={general:{label:"General Usage",description:({NavigateTo:e})=>o.createElement(o.Fragment,null,o.createElement("h5",null,"Use a Mulit-Select"),o.createElement("ul",null,o.createElement("li",null,"When a list of predetermined values can be provided and the input allows multiple entries.")),o.createElement("h5",null,"Do Not Use a Multi-Select:"),o.createElement("ul",null,o.createElement("li",{className:"mb-2"},"When there are only two possible options. Consider"," ",o.createElement(e,{to:"checkbox"},"Checkboxes")," or"," ",o.createElement(e,{to:"radio-buttons"},"Radio Buttons")," instead."),o.createElement("li",null,"When it is ideal to display all available options without requiring a click. Consider"," ",o.createElement(e,{to:"checkbox"},"Checkboxes")," or"," ",o.createElement(e,{to:"radio-buttons"},"Radio Buttons")," instead.")),o.createElement("h5",null,"Using Multi-Selects in a Form"),o.createElement("p",null,"Reference the ",o.createElement(e,{to:"form"},"Forms")," page for guidelines for placing"," ",o.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:v.code`
|
|
5391
5391
|
import {
|
|
5392
5392
|
SpsLabel,
|
|
5393
5393
|
SpsMultiSelect,
|
|
@@ -5769,7 +5769,7 @@ var r=n.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_
|
|
|
5769
5769
|
<br />
|
|
5770
5770
|
{JSON.stringify(formValue)}
|
|
5771
5771
|
</>
|
|
5772
|
-
}`}}}},Vw={page:"number",numPages:"number",onPageChange:"(pageNumber: number) => void",disabled:"boolean",unknownPageCount:"boolean",nextPageBtnDisabled:"boolean",onBeforeChange:"(page: number) => boolean | Promise<boolean>"};function ia(e){const{numPages:t=0,onPageChange:n,page:r=1,unsafelyReplaceClassName:a,className:s,"data-testid":l,disabled:c=!1,unknownPageCount:p=!1,nextPageBtnDisabled:f=!1,onBeforeChange:m,...u}=e,{t:h}
|
|
5772
|
+
}`}}}},Vw={page:"number",numPages:"number",onPageChange:"(pageNumber: number) => void",disabled:"boolean",unknownPageCount:"boolean",nextPageBtnDisabled:"boolean",onBeforeChange:"(page: number) => boolean | Promise<boolean>"};function ia(e){const{numPages:t=0,onPageChange:n,page:r=1,unsafelyReplaceClassName:a,className:s,"data-testid":l,disabled:c=!1,unknownPageCount:p=!1,nextPageBtnDisabled:f=!1,onBeforeChange:m,...u}=e,{t:h}=Be.useWoodlandLanguage(),[S,y]=o.useState(r),[C,T]=o.useState(r);o.useEffect(()=>{T(r),y(r)},[r]);async function w(k){if(m&&!await m(k))return;const A=v.constrain(k,[1,t]);k!==C&&(T(A),y(A),n&&typeof n=="function"&&n(A))}function D(k){y(Number(k.target.value)||"")}const M=U(a||"sps-page-selector",s),I=gn();return o.createElement("div",{className:M,"data-testid":l,...u},!p&&o.createElement(o.Fragment,null,o.createElement("div",{className:"sps-pagination__input-wrapper","data-testid":`${l}__input`},o.createElement("div",{className:"sps-form-control sps-pagination__input-sizer"},S),o.createElement("label",{htmlFor:I.current,className:"sr-only"},h("pagination.page",{defaultValue:"Page"})),o.createElement(ro,{onSubmit:()=>w(Number(S))},o.createElement("input",{id:I.current,type:"text",value:S,onInput:D,onChange:()=>{},className:"sps-form-control sps-pagination__input",disabled:c,onBlur:()=>w(Number(S))}))),o.createElement("span",{className:"sps-page-selector__total-pages","data-testid":`${l}_page-count`},Number.isNaN(t)?h("pagination.ofMany",{defaultValue:"of many"}):h("pagination.ofPageCount",{pageCount:t,defaultValue:`of ${t}`}))),o.createElement("div",{className:"sps-icon-button-panel","data-testid":`${l}__buttons`},o.createElement("div",{className:U("sps-button","sps-button--icon",(C===1||c)&&"sps-button--disabled")},o.createElement("button",{type:"button",onClick:()=>w(C-1),disabled:C===1||c,title:h("pagination.prevPage",{defaultValue:"Previous Page"})},o.createElement("i",{className:"sps-icon sps-icon-chevron-left","aria-hidden":"true"}))),o.createElement("div",{className:U("sps-button","sps-button--icon",(C===t||c||f)&&"sps-button--disabled")},o.createElement("button",{type:"button",onClick:()=>w(C+1),disabled:C===t||c||f,title:h("pagination.nextPage",{defaultValue:"Next Page"})},o.createElement("i",{className:"sps-icon sps-icon-chevron-right","aria-hidden":"true"})))))}Object.assign(ia,{props:Vw,displayName:"SpsPageSelector"});const $w={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",onBeforeChange:"(page: number, pageSize: number) => boolean | Promise<boolean>"};function Oi(e){const{className:t,onPageChange:n,page:r=1,pageSizeOptions:a=Y.DEFAULT_PAGE_SIZE_OPTIONS,pageSize:s=a[0],"data-testid":l,totalResults:c,unsafelyReplaceClassName:p,disabled:f=!1,unknownPageCount:m=!1,nextPageBtnDisabled:u=!1,resultsOnPage:h,onBeforeChange:S,...y}=e,{t:C}=Be.useWoodlandLanguage(),[T,w]=Zt({page:r,pageSize:s,numPages:0,indices:[0,0]});function D(O=T.pageSize){return c!==void 0?Math.ceil(c/O):NaN}function M(O=T.page,P=T.pageSize){const z=D(P),L=O===z&&c!==void 0&&c%P||P,re=h||(z===0?0:L),B=(O-1)*P;return z===0?[0,0]:[B+1,B+re]}function I(O){const P={page:O,indices:M(O)};return w(P),P}function k(O,P){const z={page:P,pageSize:O,numPages:D(O),indices:M(P,O)};return w(z),z}o.useEffect(()=>{w({numPages:D(),indices:M()})},[c,h]),o.useEffect(()=>{r!==T.page&&I(r)},[r]),o.useEffect(()=>{s!==T.pageSize&&k(s,r!==T.page?r:T.page)},[s]);function A(){return typeof c=="number"?c:C("pagination.many",{defaultValue:"many"})}function G(O){const P=k(O.target.value,1);n(P.page,P.pageSize,P.indices)}function E(O){const P=I(O);n(P.page,T.pageSize,P.indices)}const R=U(p||"sps-pagination",t);return o.createElement("div",{className:R,"data-testid":l,...y},o.createElement("div",{"data-testid":`${l}__size-selector`,className:"sps-page-size-selector"},C("pagination.view",{defaultValue:"View"}),o.createElement(Yn,{options:a,onChange:G,notClearable:!0,autoFixWidth:!0,value:T.pageSize,className:"ml-1 mr-1",disabled:f,onBeforeChange:S?O=>S(T.page,Number(O)):void 0}),C("pagination.perPage",{defaultValue:"Per Page"})),m?o.createElement("div",{className:"sps-pagination__details"},`${C("pagination.viewing",{defaultValue:"Viewing"})} ${T.indices[0]} - ${T.indices[1]} ${C("pagination.ofMany",{defaultValue:"of many"})}`):o.createElement("div",{className:"sps-pagination__details"},`${C("pagination.viewing",{defaultValue:"Viewing"})} ${T.indices[0]} - ${T.indices[1]} ${C("pagination.of",{defaultValue:"of"})} ${A()}`),o.createElement(ia,{numPages:T.numPages,page:T.page,onPageChange:E,disabled:f,unknownPageCount:m,nextPageBtnDisabled:u,onBeforeChange:S?O=>S(O,T.pageSize):void 0}))}Object.assign(Oi,{props:$w,displayName:"SpsPagination"});const am={general:{label:"General Usage",description:()=>o.createElement(o.Fragment,null,o.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."),o.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})=>o.createElement(o.Fragment,null,o.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."),o.createElement("ul",null,o.createElement("li",null,o.createElement("p",null,o.createElement("span",{className:"sps-text-semibold"},"Results-per-page Select")," (left): allows the user to adjust the number of records being displayed per page.*")),o.createElement("li",null,o.createElement("p",null,o.createElement("span",{className:"sps-text-semibold"},"Viewing details")," (middle): describes which results are being displayed on the current page.")),o.createElement("li",null,o.createElement("p",null,o.createElement("span",{className:"sps-text-semibold"},"Page Navigator")," (right): allows the user to navigate between pages of results"))),o.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."),o.createElement("br",null),o.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 ",o.createElement(e,{to:"/style-and-layout/page-types"},"Page Types")," page.")),examples:{basic:{description:()=>o.createElement("h4",null,"Building the Standard Pagination Bar"),react:v.code`
|
|
5773
5773
|
import { SpsPagination } from "@spscommerce/ds-react";
|
|
5774
5774
|
function Component() {
|
|
5775
5775
|
const [page, setPage] = React.useState(2);
|
|
@@ -5884,7 +5884,7 @@ var r=n.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_
|
|
|
5884
5884
|
function Component() {
|
|
5885
5885
|
return <SpsPageSelector numPages={25} onPageChange={() => {}} disabled />;
|
|
5886
5886
|
}
|
|
5887
|
-
`}}}},Kw={checked:"boolean",disabled:"boolean",formMeta:"SpsFormFieldMeta<any>",inline:"boolean",centered:"boolean",label:"string",name:{type:"string",required:!0},onChange:"ChangeEventHandler",value:"any"};function Ri({checked:e,className:t,"data-testid":n,disabled:r,formControl:a,formMeta:s,id:l,inline:c,centered:p,label:f,name:m,onChange:u,ref:h,unsafelyReplaceClassName:S,value:y,...
|
|
5887
|
+
`}}}},Kw={checked:"boolean",disabled:"boolean",formMeta:"SpsFormFieldMeta<any>",inline:"boolean",centered:"boolean",label:"string",name:{type:"string",required:!0},onChange:"ChangeEventHandler",value:"any"};function Ri({checked:e,className:t,"data-testid":n,disabled:r,formControl:a,formMeta:s,id:l,inline:c,centered:p,label:f,name:m,onChange:u,ref:h,unsafelyReplaceClassName:S,value:y,...C}){const T=s||a,w=o.useRef(null),{wrapperId:D,controlId:M}=St(l),I=U(S||"sps-radio-button","sps-checkable",c&&"sps-checkable--inline",p&&"sps-checkable--centered",!f&&"sps-checkable--no-label",t);function k(A){var G;T&&(T.setValue(y),T.markAsDirty()),u&&u(A),(G=w.current)==null||G.focus()}return o.createElement(nt,{id:D,className:I,formControl:a,formMeta:s,inputRef:w,ref:h,"data-testid":`${n}`,onClick:()=>{var A;return(A=w.current)==null?void 0:A.click()}},o.createElement("input",{type:"radio",ref:w,className:"sps-checkable__input","data-checked":e?"checked":void 0,"data-testid":`${n}__radio-input`,id:M,name:m,checked:e,disabled:r,onChange:k,...C}),o.createElement("label",{className:"sps-checkable__label",htmlFor:M},f||""))}Object.assign(Ri,{props:Kw,displayName:"SpsRadioButton"});const sm={general:{label:"General Usage",description:({NavigateTo:e})=>o.createElement(o.Fragment,null,o.createElement("h5",null,"Use Radio Buttons:"),o.createElement("ul",null,o.createElement("li",null,"When only one option can be selected from the available options.")),o.createElement("h5",null,"Do Not Use Radio Buttons:"),o.createElement("ul",null,o.createElement("li",null,"When a selection causes an immediate change in the system. Use a"," ",o.createElement(e,{to:"toggle"},"Toggle")," instead."),o.createElement("li",null,"When multiple options can be selected from the available options. Use"," ",o.createElement(e,{to:"checkbox"},"Checkboxes")," instead."),o.createElement("li",null,"When the list of available options requires too much space to list efficiently. Use"," ",o.createElement(e,{to:"dropdown"},"Dropdown")," instead.")),o.createElement("h5",null,"Using Radio Buttons in a Form"),o.createElement("p",null,"Reference the ",o.createElement(e,{to:"form"},"Forms")," page for guidelines for placing Radio Buttons in Form Layouts."),o.createElement("h5",null,"End to End Testing Radio Buttons"),o.createElement("p",null,'To determine if a radio button is checked in an E2E test, you should Use data-checked="checked".'))},basic:{label:"Basic Radio Buttons",description:()=>o.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:()=>o.createElement("h4",null,"Horizontal Group"),react:v.code`
|
|
5888
5888
|
import {
|
|
5889
5889
|
useSpsForm,
|
|
5890
5890
|
SpsForm,
|
|
@@ -6428,7 +6428,7 @@ var r=n.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_
|
|
|
6428
6428
|
</SpsForm>
|
|
6429
6429
|
);
|
|
6430
6430
|
}
|
|
6431
|
-
`}}}},im=({branch:e,setActiveBranch:t,activeBranch:n})=>{const[r,a]=
|
|
6431
|
+
`}}}},im=({branch:e,setActiveBranch:t,activeBranch:n})=>{const[r,a]=x.useState(e.expanded||!1);return o.createElement("ul",{className:U("sps-side-nav__branch",e.name===n&&"sps-side-nav__branch--active")},o.createElement("li",{className:U("sps-side-nav__leaf",e.name===n&&"sps-side-nav__leaf--active")},o.createElement("span",{className:"sps-side-nav__link",onClick:()=>{a(!r),e.subNavItems||t(e.name,e.key)},onKeyDown:s=>{(s.key==="Enter"||s.key===" ")&&(s.stopPropagation(),s.preventDefault(),a(!r),e.subNavItems||t(e.name,e.key))},role:"tab",tabIndex:0,"aria-selected":e.name===n},e.subNavItems&&o.createElement("i",{className:U("sps-icon sps-side-nav__toggle",r?"sps-icon-chevron-down":"sps-icon-chevron-right")}),o.createElement("span",{className:"sps-side-nav__link-title"},e.icon&&o.createElement("i",{className:`sps-icon sps-icon-${e.icon} mr-2`}),e.name),o.createElement("div",{className:"sps-side-nav__link-tag",style:{marginTop:"-2px"}},e.tag&&o.createElement("span",{className:`sps-tag sps-tag--${e.tag}`},e.tagContent))),e.subNavItems&&r&&e.subNavItems.map(s=>o.createElement(im,{branch:{...s,expanded:la(s.subNavItems||[],n)},setActiveBranch:t,activeBranch:n,key:s.key??s.name}))))},la=(e,t)=>e?e.some(n=>n.name===t)||e.some(n=>la(n.subNavItems||[],t)):!1,lm=({title:e,titleIcon:t,navOptions:n,onNavChange:r,activeNavItem:a,tabs:s,onTabChange:l,initialActiveTab:c,filterable:p,filterInputPlaceholder:f})=>{const m=x.useRef(a),[u,h]=x.useState(a),[S,y]=x.useState(c||(s?s[0]:"")),[C,T]=x.useState(""),w=(k,A)=>{h(k),r&&r(k,A)},D=k=>{y(k),l&&l(k)},M=k=>k?k.some(A=>A.name.toLowerCase().includes(C))||k.some(A=>M(A.subNavItems||[])):!1,I=n.map(k=>({...k,navItems:k.navItems.filter(A=>A.name.toLowerCase().includes(C)||M(A.subNavItems||[]))}));return a!==m.current&&(h(a),m.current=a),o.createElement("div",{className:"sps-side-nav sps-card"},e&&o.createElement("div",{className:"sps-card__header",title:e},o.createElement("div",{className:"sps-card__title"},t&&o.createElement("i",{className:`sps-icon sps-icon-${t}`}),e)),s&&o.createElement("nav",{className:"sps-nav sps-nav--tabs"},s.map(k=>o.createElement("span",{className:U("sps-nav__item","sps-nav__link",k===S&&"active"),"data-toggle":"tab",role:"tab",tabIndex:0,key:k,onClick:()=>D(k),onKeyDown:A=>{(A.key==="Enter"||A.key===" ")&&(A.stopPropagation(),A.preventDefault(),D(k))}},o.createElement("span",null,k)))),o.createElement("div",{className:"sps-card__body"},p&&o.createElement("section",{className:"sps-side-nav__section"},o.createElement("div",{className:"sps-text-input"},o.createElement("div",{className:"sps-form-control"},o.createElement("i",{className:"sps-text-input__icon sps-icon sps-icon-filter"}),o.createElement("input",{type:"text",className:"sps-text-input__input",placeholder:f,onChange:k=>{T(k.target.value)}})))),I.map(k=>o.createElement("section",{className:"sps-side-nav__section",key:k.key??k.sectionTitle},k.sectionTitle&&o.createElement("div",{className:"sps-side-nav__section-title",style:{fontWeight:400}},k.sectionTitle),k.navItems.map(A=>o.createElement(im,{branch:{...A,expanded:la(A.subNavItems||[],a)},activeBranch:u,setActiveBranch:(G,E)=>{w(G,E)},key:A.key??A.name}))))))},cm={usage:{label:"Usage",customSection:()=>o.createElement(o.Fragment,null,o.createElement("div",null,o.createElement("span",{className:"sps-body-14 mb-2"},"Use the Side Navigation if:"),o.createElement("ul",{className:"mt-2"},o.createElement("li",{className:"mb-1"},"The navigation benefits from subsections or nested structures"),o.createElement("li",{className:"mb-1"},"There are too many items for Tabbed Navigation"),o.createElement("li",null,"The navigation items have long names"))),o.createElement("div",null,o.createElement("span",{className:"sps-body-14 mb-2"},"Avoid using the Side Navigation if:"),o.createElement("ul",{className:"mt-2"},o.createElement("li",{className:"mb-1"},"Tabbed Navigation is sufficient"),o.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:v.code`
|
|
6432
6432
|
import { SpsSideNav } from "@spscommerce/ds-react";
|
|
6433
6433
|
import { SpsIcon } from "@spscommerce/ds-shared";
|
|
6434
6434
|
function DemoComponent() {
|
|
@@ -6749,7 +6749,7 @@ var r=n.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_
|
|
|
6749
6749
|
</div>
|
|
6750
6750
|
);
|
|
6751
6751
|
}
|
|
6752
|
-
`}}}},Hw={disabled:"boolean",href:"string",label:"string",icon:"SpsIcon",kind:"StdButtonKind",options:"Array<SpsActionMethod | [SpsActionDescriptor, () => void]>",spinning:"boolean",spinningTitle:"string"};function Bi(e){const{children:t,className:n,"data-testid":r,disabled:a,href:s,label:l,options:c,icon:p,kind:f=Y.StdButtonKind.DEFAULT,spinning:m,spinningTitle:u,unsafelyReplaceClassName:h,onClick:S,...y}=e,
|
|
6752
|
+
`}}}},Hw={disabled:"boolean",href:"string",label:"string",icon:"SpsIcon",kind:"StdButtonKind",options:"Array<SpsActionMethod | [SpsActionDescriptor, () => void]>",spinning:"boolean",spinningTitle:"string"};function Bi(e){const{children:t,className:n,"data-testid":r,disabled:a,href:s,label:l,options:c,icon:p,kind:f=Y.StdButtonKind.DEFAULT,spinning:m,spinningTitle:u,unsafelyReplaceClassName:h,onClick:S,...y}=e,C=o.useRef(null),[T,w]=o.useState({width:0}),[D,M]=o.useState(!1),[I,k]=o.useState(!1);o.useLayoutEffect(()=>{C.current&&w({width:C.current.offsetWidth})},[]),o.useEffect(()=>{k(!!m)},[m]);const A=()=>{M(!0)},G=()=>{M(!1)},E=U(h||"sps-split-button",`sps-split-button--${f}`,D&&"sps-split-button--open",n);return o.createElement(o.Fragment,null,I?o.createElement(je,{className:n,"data-testid":r,style:{width:T.width},kind:f,icon:p,href:s,spinning:!0,spinningTitle:u},l):o.createElement("div",{ref:C,className:E,"data-testid":r,...y},o.createElement(je,{kind:f,icon:p,href:s,disabled:a,onClick:S},l),o.createElement(zn,{kind:f,options:c,disabled:a,onOpen:A,onClose:G})))}Object.assign(Bi,{props:Hw,displayName:"SpsSplitButton"});const dm={kinds:{label:"Regular Split Buttons",description:v.code`<p>info about split buttons</p>`,examples:{basic:{description:v.code`<p>Basic</p>`,imports:v.code`
|
|
6753
6753
|
import { SpsSplitButton } from "@spscommerce/ds-react";
|
|
6754
6754
|
`,jsx:v.code`
|
|
6755
6755
|
<React.Fragment>
|
|
@@ -6821,7 +6821,7 @@ var r=n.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_
|
|
|
6821
6821
|
]} className="mr-1">
|
|
6822
6822
|
</SpsSplitButton>
|
|
6823
6823
|
</React.Fragment>
|
|
6824
|
-
`}}}},Ww={};function ao(e){const{children:t,className:n,"data-testid":r,unsafelyReplaceClassName:a,...s}=e,l=U(a||"sps-content-row__expansion",n);return o.createElement("div",{className:l,...s,"data-testid":`${r}__expansion`},t)}Object.assign(ao,{props:Ww,displayName:"SpsSummaryListExpansion"});const Gw={expanded:"boolean",selected:"boolean",onToggle:"(isExpanded: boolean) => void"};function Pi(e){const{children:t,className:n,expanded:r,onToggle:a,selected:s,"data-testid":l,unsafelyReplaceClassName:c,...p}=e,[f,m]=Zt({isExpanded:r,expandable:!1});o.useEffect(()=>{const
|
|
6824
|
+
`}}}},Ww={};function ao(e){const{children:t,className:n,"data-testid":r,unsafelyReplaceClassName:a,...s}=e,l=U(a||"sps-content-row__expansion",n);return o.createElement("div",{className:l,...s,"data-testid":`${r}__expansion`},t)}Object.assign(ao,{props:Ww,displayName:"SpsSummaryListExpansion"});const Gw={expanded:"boolean",selected:"boolean",onToggle:"(isExpanded: boolean) => void"};function Pi(e){const{children:t,className:n,expanded:r,onToggle:a,selected:s,"data-testid":l,unsafelyReplaceClassName:c,...p}=e,[f,m]=Zt({isExpanded:r,expandable:!1});o.useEffect(()=>{const w=o.Children.toArray(t).some(D=>o.isValidElement(D)&&D.type===ao);m({expandable:w})},[]);function u(){const w=!f.isExpanded;m({isExpanded:w}),a&&a(w)}function h(w){w.stopPropagation(),u()}function S(w){(w.key==="Enter"||w.key===" "||w.key==="Spacebar")&&(w.preventDefault(),w.stopPropagation(),u())}const y=U(c||"sps-summary-list-row","sps-content-row",f.expandable&&"sps-summary-list-row--expandable",f.isExpanded&&"sps-content-row--expanded",s&&"sps-summary-list-row--selected",n),[C,T]=_t(t,[{type:ao}]);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(" ")),o.createElement("div",{className:y,"data-testid":l,...p},o.createElement("div",{className:"sps-content-row__col-group","data-testid":`${l}__col-group`,onClick:h,onKeyDown:S,tabIndex:0},T),C)}Object.assign(Pi,{props:Gw,displayName:"SpsSummaryListRow"});const Yw={borderless:"boolean",lean:"boolean",leaner:"boolean",width:"string"};function Ai(e){const{className:t,children:n,borderless:r,lean:a,leaner:s,"data-testid":l,unsafelyReplaceClassName:c,width:p,...f}=e,m=U(c||"sps-content-row__col",a&&"sps-content-row__col--lean",s&&"sps-content-row__col--leaner",r&&"sps-content-row__col--borderless",t);return o.createElement("div",{className:m,style:{width:p},...f,"data-testid":`${l}__col`},n)}Object.assign(Ai,{props:Yw,displayName:"SpsSummaryListColumn"});const pm={basic:{label:"Basic Usage",examples:{basic:{imports:v.code`
|
|
6825
6825
|
import {
|
|
6826
6826
|
SpsSummaryListRow,
|
|
6827
6827
|
SpsSummaryListColumn,
|
|
@@ -7115,7 +7115,7 @@ var r=n.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_
|
|
|
7115
7115
|
</SpsSummaryListRow>
|
|
7116
7116
|
);
|
|
7117
7117
|
}
|
|
7118
|
-
`}}}},Uw={tasks:"ReactSpsTask[]",taskQueuePosition:"Position",notificationText:"string",tooltipConfig:"{ position: Position, kind: TooltipKind }",onClose:"() => void",onOpen:"() => void",onClearCompleted:"() => void",suppressTooltips:"boolean"};function Fi({tasks:e=[],taskQueuePosition:t=Y.Position.BOTTOM_RIGHT,notificationText:n,tooltipConfig:r={},onOpen:a,onClose:s,onClearCompleted:l,className:c,"data-testid":p,unsafelyReplaceClassName:f,suppressTooltips:m=!1,...u}){const{t:h}
|
|
7118
|
+
`}}}},Uw={tasks:"ReactSpsTask[]",taskQueuePosition:"Position",notificationText:"string",tooltipConfig:"{ position: Position, kind: TooltipKind }",onClose:"() => void",onOpen:"() => void",onClearCompleted:"() => void",suppressTooltips:"boolean"};function Fi({tasks:e=[],taskQueuePosition:t=Y.Position.BOTTOM_RIGHT,notificationText:n,tooltipConfig:r={},onOpen:a,onClose:s,onClearCompleted:l,className:c,"data-testid":p,unsafelyReplaceClassName:f,suppressTooltips:m=!1,...u}){const{t:h}=Be.useWoodlandLanguage(),S=!!e.length,[y,C]=o.useState(!1),[T,w]=o.useState(S),D=o.useRef(null),M=o.useRef(null),I=o.useCallback(()=>{C(!1),s&&s()},[]);o.useEffect(()=>{y?window.addEventListener("resize",I):window.removeEventListener("resize",I)},[y]);const k=cr("sps-task-queue-portal"),A=o.useContext(Mt),[G]=y?An(M,D,t,{altPosition:t,...A}):[{},!1],E=r.position||Y.Position.BOTTOM_RIGHT,R=r.kind||Y.TooltipKind.DEFAULT,O=e.filter($=>$.unread).length,P=e.filter($=>$.status===Y.SpsTaskStatus.IN_PROGRESS).length,z=e.some($=>$.status===Y.SpsTaskStatus.COMPLETED||$.status===Y.SpsTaskStatus.ERRORED),L=o.useRef(s);L.current=s;const re=o.useRef(null),B=()=>{S&&!y?(C(!0),a&&a()):y&&(C(!1),s&&s()),re.current&&(re.current.scrollTop=0)},Z=$=>$.status===Y.SpsTaskStatus.IN_PROGRESS?Y.SpsTaskStatusIcons[$.status]:`sps-icon sps-icon-${Y.SpsTaskStatusIcons[$.status]}`;o.useEffect(()=>{y&&!S&&(C(!1),L.current&&L.current())},[y,S]);const H=o.useRef();o.useEffect(()=>{O>0?(w(!0),H.current&&window.clearTimeout(H.current),H.current=window.setTimeout(()=>{H.current=void 0,w(!1)},Y.TASK_QUEUE_NOTIFICATION_DURATION_MS)):(H.current&&(window.clearTimeout(H.current),H.current=void 0),w(!1))},[O]),o.useEffect(()=>{var j;const $=()=>{C(oe=>(oe&&L.current&&L.current(),!1))};return(j=document.getElementById("root"))==null||j.addEventListener("click",$),()=>{var oe;(oe=document.getElementById("root"))==null||oe.removeEventListener("click",$)}},[]),Pr({isOpen:y,rootRef:D}),o.useEffect(()=>()=>{H.current&&window.clearTimeout(H.current)},[]);const q=U(f||"sps-task-queue",y&&"sps-task-queue--open",y&&"z-stratum-dropdown",!S&&"sps-task-queue--no-tasks",c);function ae($){return($.actions||[]).map(j=>{if(o.isValidElement(j)){const oe=j;if(oe.type!==je||oe.props.kind!==Y.ButtonKind.ICON)throw new Error("Task queue task action must be a config object or an SpsButton of kind ICON");return oe}else{const oe=j;return o.createElement("div",{key:oe.icon,className:"sps-button sps-button--icon"},o.createElement("button",{type:"button",title:oe.label,disabled:oe.disabled,onClick:()=>{oe.onClick&&oe.onClick($)}},oe.caption,oe.icon&&o.createElement("i",{className:`sps-icon sps-icon-${oe.icon}`,"aria-hidden":"true"})))}})}return o.createElement("div",{className:q,onClick:$=>{$.nativeEvent.stopImmediatePropagation()},"data-testid":p,...u},o.createElement("button",{type:"button",ref:D,className:"sps-task-queue__button",title:"Task Queue",onClick:B},!!O&&o.createElement("span",{className:"sps-tag sps-tag--info"},O),P?o.createElement("span",{className:"sps-spinner sps-spinner--small"}):o.createElement("i",{className:"sps-icon sps-icon-list","aria-hidden":"true"})),o.createElement(Bt,{for:D,position:E,kind:R,showOn:S?Y.TooltipShowTrigger.MANUAL:Y.TooltipShowTrigger.MOUSEOVER,isShown:T&&!y?_e.VISIBLE:_e.HIDDEN,hideDelay:Number(S)&&Y.TASK_QUEUE_NOTIFICATION_DURATION_MS},!m&&T&&(n||h("taskQueue.newTask",{defaultValue:"You have a new task in your queue."})),!m&&!T&&!S&&h("taskQueue.noTasks",{defaultValue:"There are currently no tasks in your queue."})),k(o.createElement("div",{ref:M,className:U("sps-task-queue__task-list",y&&"sps-task-queue__task-list--open","z-stratum-dropdown"),style:G},o.createElement("div",{ref:re,className:"sps-task-queue__task-list-tasks"},e.map(($,j)=>o.createElement("div",{key:j,className:U("sps-task-queue__task",$.unread&&"sps-task-queue__task--unread")},o.createElement("i",{className:Z($)}),o.createElement("div",{className:"sps-task-queue__task-description"},o.createElement("div",{className:"sps-task-queue__task-heading"},$.heading),$.subheading&&o.createElement("div",{className:"sps-task-queue__task-subheading",title:$.subheading},$.subheading)),$.actions&&!!$.actions.length&&o.createElement("div",{className:"sps-task-queue__task-actions"},ae($))))),z&&l&&o.createElement("div",{className:"sps-task-queue__footer"},o.createElement("div",{className:"sps-button sps-button--link"},o.createElement("button",{type:"button",onClick:l},h("taskQueue.clearCompleted",{defaultValue:"Clear Completed"})))))))}Object.assign(Fi,{props:Uw,displayName:"SpsTaskQueue"});const um={inProgress:{label:"Task Queue in progress",description:"<p>Info about Task Queue</p>",examples:{inProgress:{react:v.code`
|
|
7119
7119
|
import { SpsTaskQueue } from "@spscommerce/ds-react";
|
|
7120
7120
|
import { SpsTaskStatus, SpsIcon } from "@spscommerce/ds-shared";
|
|
7121
7121
|
|
|
@@ -7404,7 +7404,7 @@ var r=n.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_
|
|
|
7404
7404
|
</div>
|
|
7405
7405
|
);
|
|
7406
7406
|
}
|
|
7407
|
-
`}}}},zw={disabled:"boolean",formMeta:"SpsFormFieldMeta<string>",icon:"SpsIcon",name:"string",onChange:"ChangeEventHandler<HTMLInputElement>",placeholder:"string",value:"string",additionalText:"string"},ca=o.forwardRef(({className:e,disabled:t=!1,formControl:n,formMeta:r,icon:a,id:s,name:l,onChange:c,placeholder:p,"data-testid":f,title:m,unsafelyReplaceClassName:u,value:h="",additionalText:S,notClearable:y,...
|
|
7407
|
+
`}}}},zw={disabled:"boolean",formMeta:"SpsFormFieldMeta<string>",icon:"SpsIcon",name:"string",onChange:"ChangeEventHandler<HTMLInputElement>",placeholder:"string",value:"string",additionalText:"string"},ca=o.forwardRef(({className:e,disabled:t=!1,formControl:n,formMeta:r,icon:a,id:s,name:l,onChange:c,placeholder:p,"data-testid":f,title:m,unsafelyReplaceClassName:u,value:h="",additionalText:S,notClearable:y,...C},T)=>{const w=r||n,{wrapperId:D,controlId:M}=St(s,w),I=o.useRef(null);function k(R,O){w&&(w.setValue(R),w.markAsDirty()),c&&I.current&&c(O||new bn(I.current))}function A(){I.current&&(I.current.value="",k(""))}function G(R){k(R.target.value,R)}const E=U(u||"sps-text-input",e);return o.createElement(nt,{id:D,className:E,formControl:n,formMeta:r,inputRef:I,ref:T,focusInputOnClick:!0,"data-testid":`${f}`},o.createElement("div",{className:U("sps-form-control",t&&"disabled")},a&&o.createElement("i",{className:U("sps-text-input__icon","sps-icon",`sps-icon-${a}`)}),o.createElement("input",{type:"text",ref:I,"data-testid":`${f}__input`,className:"sps-text-input__input",id:M,name:l,placeholder:p,onChange:G,title:m,value:h,disabled:t,...C}),!y&&h&&!t&&o.createElement("i",{"data-testid":`${f}__input_clear`,className:"sps-icon sps-icon-x-circle sps-form-control__clear-btn",onClick:A})),S&&o.createElement("p",{className:"sps-input__additional-text"},S))});Object.assign(ca,{props:zw,displayName:"SpsTextInput"});const mm={general:{label:"General Usage",description:({NavigateTo:e})=>o.createElement(o.Fragment,null,o.createElement("h5",null,"Use a Text Input:"),o.createElement("ul",null,o.createElement("li",null,"When the value required is short (a single word or short phrase)."),o.createElement("li",null,"When only one value is required or accepted.")),o.createElement("h5",null,"Do Not Use a Text Input:"),o.createElement("ul",null,o.createElement("li",null,"When a value of considerable length (such as a sentence or paragraph) is required or accepted. Use a ",o.createElement(e,{to:"text-areas"},"Text Area")," instead."),o.createElement("li",null,"When more than one value is required or accepted in the field. Use"," ",o.createElement(e,{to:"multi-select"},"Multi-Select")," instead."),o.createElement("li",null,"When a boolean selection is required (such as on/off, yes/no, etc). Use"," ",o.createElement(e,{to:"checkbox"},"Checkboxes"),","," ",o.createElement(e,{to:"radio-buttons"},"Radio Buttons")," or"," ",o.createElement(e,{to:"toggle"},"Toggles")," instead.")),o.createElement("h5",null,"Using Text Inputs in a Form"),o.createElement("p",null,"Reference the ",o.createElement(e,{to:"form"},"Forms")," page for guidelines for placing Inputs in Form Layouts."))},basic:{label:"Basic Text Inputs",description:()=>o.createElement("p",null,"Basic Text Inputs include a label and an input field."),examples:{standard:{react:v.code`
|
|
7408
7408
|
import { SpsLabel, SpsTextInput, useSpsForm } from "@spscommerce/ds-react";
|
|
7409
7409
|
|
|
7410
7410
|
function DemoComponent() {
|
|
@@ -7479,7 +7479,7 @@ var r=n.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_
|
|
|
7479
7479
|
</div>
|
|
7480
7480
|
);
|
|
7481
7481
|
}
|
|
7482
|
-
`}}}},jw={disabled:"boolean",formMeta:"SpsFormFieldMeta<string>",name:"string",onChange:"ChangeEventHandler",placeholder:"string",rows:"number",value:"string",additionalText:"string"};function Vi({className:e,disabled:t=!1,formControl:n,formMeta:r,id:a,name:s,onChange:l,placeholder:c="",ref:p,rows:f=2,"data-testid":m,unsafelyReplaceClassName:u,value:h="",additionalText:S,...y}){const
|
|
7482
|
+
`}}}},jw={disabled:"boolean",formMeta:"SpsFormFieldMeta<string>",name:"string",onChange:"ChangeEventHandler",placeholder:"string",rows:"number",value:"string",additionalText:"string"};function Vi({className:e,disabled:t=!1,formControl:n,formMeta:r,id:a,name:s,onChange:l,placeholder:c="",ref:p,rows:f=2,"data-testid":m,unsafelyReplaceClassName:u,value:h="",additionalText:S,...y}){const C=r||n,{wrapperId:T,controlId:w}=St(a,C),D=o.useRef(null);function M(G,E){C&&(C.setValue(G),C.markAsDirty()),l&&D.current&&l(E||new bn(D.current))}function I(){D.current&&(D.current.value="",M(""))}function k(G){M(G.target.value,G)}const A=U(u||"sps-textarea",e);return o.createElement(nt,{id:T,className:A,formControl:n,formMeta:r,inputRef:D,ref:p,"data-testid":m},o.createElement("div",{className:"position-relative"},o.createElement("textarea",{ref:D,rows:f,"data-testid":`${m}__input`,className:"sps-form-control input--clearable",id:w,name:s,placeholder:c,onChange:k,"aria-label":c,value:h||"",disabled:t,...y}),h&&!t&&o.createElement("i",{"data-testid":`${m}__input_clear`,className:"sps-icon sps-icon-x-circle sps-form-control__clear-btn",onClick:I})),S&&o.createElement("p",{className:"sps-input__additional-text"},S))}Object.assign(Vi,{props:jw,displayName:"SpsTextarea"});const fm={general:{label:"General Usage",description:({NavigateTo:e})=>o.createElement(o.Fragment,null,o.createElement("h5",null,"Use a Text Area:"),o.createElement("ul",null,o.createElement("li",null,"When a value of considerable length (such as a sentence or paragraph) is required or accepted.")),o.createElement("h5",null,"Do Not Use a Text Area:"),o.createElement("ul",null,o.createElement("li",null,"When the value required is short (a single word or short phrase). Use a"," ",o.createElement(e,{to:"text-inputs"},"Text Input")," instead."),o.createElement("li",null,"When more than one value is required or accepted in the field. Use"," ",o.createElement(e,{to:"multi-select"},"Multi-Select")," instead."),o.createElement("li",null,"When a boolean selection is required (such as on/off, yes/no, etc). Use"," ",o.createElement(e,{to:"checkbox"},"Checkboxes"),","," ",o.createElement(e,{to:"radio-buttons"},"Radio Buttons")," or"," ",o.createElement(e,{to:"toggle"},"Toggles")," instead.")),o.createElement("h5",null,"Using Text Areas in a Form"),o.createElement("p",null,"Reference the ",o.createElement(e,{to:"form"},"Forms")," page for guidelines for placing Inputs in Form Layouts."))},basic:{label:"Basic Text Areas",description:()=>o.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:v.code`
|
|
7483
7483
|
import { SpsLabel, SpsTextarea, useSpsForm } from "@spscommerce/ds-react";
|
|
7484
7484
|
function DemoComponent() {
|
|
7485
7485
|
const { formValue, formMeta, updateForm } = useSpsForm({ notes: "" });
|
|
@@ -7550,7 +7550,7 @@ var r=n.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_
|
|
|
7550
7550
|
</div>
|
|
7551
7551
|
);
|
|
7552
7552
|
}
|
|
7553
|
-
`}}}},hm={active:"boolean",description:"string",disabled:"boolean",formMeta:"SpsFormFieldMeta<boolean>",label:"string",large:"boolean",onChange:"(isActive: boolean) => void"};function $i(e){const{active:t,className:n,description:r,disabled:a,formControl:s,formMeta:l,id:c,label:p,large:f,onChange:m,ref:u,"data-testid":h,unsafelyReplaceClassName:S,...y}=e;gc("SpsToggle",hm,e);const
|
|
7553
|
+
`}}}},hm={active:"boolean",description:"string",disabled:"boolean",formMeta:"SpsFormFieldMeta<boolean>",label:"string",large:"boolean",onChange:"(isActive: boolean) => void"};function $i(e){const{active:t,className:n,description:r,disabled:a,formControl:s,formMeta:l,id:c,label:p,large:f,onChange:m,ref:u,"data-testid":h,unsafelyReplaceClassName:S,...y}=e;gc("SpsToggle",hm,e);const C=l||s,[T,w]=o.useState(t),{wrapperId:D,controlId:M}=St(c,C),I=`${D}_status-label`,k=`${D}_description`,A=o.useRef(null);o.useEffect(()=>w(t),[t]);function G(O){var P;w(O.target.checked),C&&(C.setValue(O.target.checked),C.markAsDirty()),m&&m(O.target.checked),(P=A.current)==null||P.focus()}const E=t??T,R=U(S||"sps-toggle",E&&"sps-toggle--active",f&&"sps-toggle--large",a&&"sps-toggle--disabled",n);return o.createElement(nt,{id:D,formControl:s,formMeta:l,inputRef:A,ref:u,"data-testid":`${h}`},o.createElement("div",{className:R},o.createElement("input",{type:"checkbox",ref:A,className:"sps-toggle__input",id:M,checked:E||!1,disabled:a,onChange:G,"aria-describedby":`${I},${k}`,"data-testid":`${h}__input`,...y}),o.createElement("span",{className:"sps-toggle__slider"}),p&&o.createElement("label",{className:"sps-toggle__status-label",htmlFor:M,id:I},p),r&&o.createElement("span",{className:"sps-toggle__description",id:k},r)))}Object.assign($i,{props:hm,displayName:"SpsToggle"});const Sm={general:{label:"General Usage",description:({NavigateTo:e})=>o.createElement(o.Fragment,null,o.createElement("h5",null,"Use Toggles:"),o.createElement("ul",null,o.createElement("li",{className:"mb-2"},'When an option represents a specific "on/off" state.'),o.createElement("li",{className:"mb-2"},"When the selection causes an imeediate change in the system.")),o.createElement("h5",null,"Do Not Use Toggles:"),o.createElement("ul",null,o.createElement("li",{className:"mb-2"},"When a selection does not cause an immediate change in the system."," ",o.createElement(e,{to:"checkbox"},"Checkboxes")," or"," ",o.createElement(e,{to:"radio-buttons"},"Radio Buttons")," instead."),o.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:()=>o.createElement("p",null,"Basic toggles can appear with or without labels and can include an extended description if necessary."),examples:{basic:{description:()=>o.createElement("h4",{className:"mb-3"},"Toggle"),react:v.code`
|
|
7554
7554
|
import { SpsToggle, useSpsForm } from "@spscommerce/ds-react";
|
|
7555
7555
|
function DemoComponent() {
|
|
7556
7556
|
const { formValue, formMeta, updateForm } = useSpsForm({
|
|
@@ -8369,7 +8369,7 @@ var r=n.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_
|
|
|
8369
8369
|
kind={FeedbackBlockKind.WARNING}
|
|
8370
8370
|
message="This order is missing a shipment date."
|
|
8371
8371
|
/>
|
|
8372
|
-
`}}}};function tC(){return o.createElement(Yi,{kind:Y.FeedbackBlockKind.WARNING},"The Workflow component is being deprecated. As of November 6, 2024, please use the"," ",o.createElement("a",{href:"#/components/wizard"},"Wizard")," ","component instead.")}const nC={};function Ui({children:e,className:t,...n}){return o.createElement("div",{className:U("sps-filter-panel",t),...n},e)}Object.assign(Ui,{props:nC,displayName:"SpsFilterPanel"});const rC={title:"string | ReactNode",expanded:"boolean",heightPx:"number",heightRem:"number",onExpand:"() => void",onCollapse:"() => void"};function zi({children:e,className:t,title:n,expanded:r,heightPx:a,heightRem:s,onExpand:l,onCollapse:c,...p}){const[f,m]=o.useState(r),u=typeof r<"u"?r:f,h=a?a/16:s,S=h?{overflowY:"scroll",height:`${h}rem`}:{},y=()=>o.createElement("button",{type:"button",className:"sps-filter-panel__section__expand-btn",onMouseDown:
|
|
8372
|
+
`}}}};function tC(){return o.createElement(Yi,{kind:Y.FeedbackBlockKind.WARNING},"The Workflow component is being deprecated. As of November 6, 2024, please use the"," ",o.createElement("a",{href:"#/components/wizard"},"Wizard")," ","component instead.")}const nC={};function Ui({children:e,className:t,...n}){return o.createElement("div",{className:U("sps-filter-panel",t),...n},e)}Object.assign(Ui,{props:nC,displayName:"SpsFilterPanel"});const rC={title:"string | ReactNode",expanded:"boolean",heightPx:"number",heightRem:"number",onExpand:"() => void",onCollapse:"() => void"};function zi({children:e,className:t,title:n,expanded:r,heightPx:a,heightRem:s,onExpand:l,onCollapse:c,...p}){const[f,m]=o.useState(r),u=typeof r<"u"?r:f,h=a?a/16:s,S=h?{overflowY:"scroll",height:`${h}rem`}:{},y=()=>o.createElement("button",{type:"button",className:"sps-filter-panel__section__expand-btn",onMouseDown:C=>C.preventDefault(),onClick:()=>{m(!u),!u&&l?l():u&&c&&c()}},o.createElement(Wt,{icon:u?Y.SpsIcon.MINUS_CIRCLE:Y.SpsIcon.PLUS_CIRCLE}));return o.useEffect(()=>{m(r)},[r]),o.createElement("div",{className:U("sps-filter-panel__section",t),...p},o.createElement("div",{className:"sps-filter-panel__section__title-wrapper"},o.createElement(y,null),n&&(typeof n=="string"?o.createElement("p",null,n):n)),u&&o.createElement("div",{className:"sps-filter-panel__section__content-wrapper",style:S},o.createElement("div",{className:"sps-filter-panel__section__content"},e)))}Object.assign(zi,{props:rC,displayName:"SpsFilterPanelSection"});const oC={onClear:"() => void"};function ji({children:e,className:t,onClear:n,...r}){const{t:a}=Be.useWoodlandLanguage();return o.createElement("div",{className:U("sps-filter-panel__cap",t),...r},o.createElement("div",{className:"sps-filter-panel__cap__title-wrapper"},o.createElement(Wt,{icon:Y.SpsIcon.FILTER,size:Y.SpsIconSize.SMALL}),o.createElement("p",null,a("filterPanel.title",{defaultValue:"Filters"}))),o.createElement(je,{kind:Y.ButtonKind.LINK,onClick:n},a("filterPanel.clear",{defaultValue:"Clear Filters"})),e)}Object.assign(ji,{props:oC,displayName:"SpsFilterPanelCap"});const xm={generalUsage:{label:"General Usage",examples:{general:{react:v.code`
|
|
8373
8373
|
import {
|
|
8374
8374
|
useSpsForm,
|
|
8375
8375
|
SpsForm,
|
|
@@ -8790,7 +8790,7 @@ var r=n.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_
|
|
|
8790
8790
|
</div>
|
|
8791
8791
|
);
|
|
8792
8792
|
}
|
|
8793
|
-
`}}}},aC={value:"string",placeholder:"string",formMeta:"SpsFormFieldMeta<string>",onFilterChange:"ChangeEventHandler<HTMLInputElement>"};function qi({className:e,value:t,placeholder:n,formMeta:r,onFilterChange:a,...s}){const{t:l}
|
|
8793
|
+
`}}}},aC={value:"string",placeholder:"string",formMeta:"SpsFormFieldMeta<string>",onFilterChange:"ChangeEventHandler<HTMLInputElement>"};function qi({className:e,value:t,placeholder:n,formMeta:r,onFilterChange:a,...s}){const{t:l}=Be.useWoodlandLanguage();return o.createElement("div",{className:U("sps-filter-panel__filter-box",e),...s},o.createElement(ca,{value:t,icon:Y.SpsIcon.FILTER,formMeta:r,placeholder:n||l("filterPanel.filterPlaceholder",{defaultValue:"Filter options"}),onChange:a}))}Object.assign(qi,{props:aC,displayName:"SpsFilterPanelFilterBox"});const sC={showCondition:"boolean"};function Ji({showCondition:e=!0,children:t,className:n,...r}){return e?o.createElement("div",{className:U("sps-conditional-field",n),...r},t):null}Object.assign(Ji,{props:sC,displayName:"SpsConditionalField"});const Im={generalUsage:{label:"General Usage",examples:{withCheckbox:{react:v.code`
|
|
8794
8794
|
import {
|
|
8795
8795
|
SpsCheckbox,
|
|
8796
8796
|
SpsInputGroup,
|
|
@@ -8927,7 +8927,7 @@ var r=n.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_
|
|
|
8927
8927
|
)
|
|
8928
8928
|
}
|
|
8929
8929
|
`}}}};function Mm(e,t){const n=new RegExp(`[\\t\r
|
|
8930
|
-
${t.join("").replace("]","\\]").replace(" ","\\s")}]+`);return e.split(n).filter(r=>r!=="")}const iC={disabled:"boolean",formMeta:"SpsFormFieldMeta<any[]>",icon:"SpsIcon",onChange:"ChangeEventHandler",onEntryChange:"(searchText: string) => void",placeholder:"string",value:"any",createTagOptions:"string[]",isSingleLine:"boolean"};function Zi({className:e,disabled:t,formControl:n,formMeta:r,id:a,onChange:s,onEntryChange:l,placeholder:c,unsafelyReplaceClassName:p,value:f,icon:m,createTagOptions:u=[" ",","],"data-testid":h,isSingleLine:S,...y}){const
|
|
8930
|
+
${t.join("").replace("]","\\]").replace(" ","\\s")}]+`);return e.split(n).filter(r=>r!=="")}const iC={disabled:"boolean",formMeta:"SpsFormFieldMeta<any[]>",icon:"SpsIcon",onChange:"ChangeEventHandler",onEntryChange:"(searchText: string) => void",placeholder:"string",value:"any",createTagOptions:"string[]",isSingleLine:"boolean"};function Zi({className:e,disabled:t,formControl:n,formMeta:r,id:a,onChange:s,onEntryChange:l,placeholder:c,unsafelyReplaceClassName:p,value:f,icon:m,createTagOptions:u=[" ",","],"data-testid":h,isSingleLine:S,...y}){const C=r||n,{wrapperId:T,controlId:w}=St(a,C),[D,M]=Zt({keyDown:null,searchText:"",activeTagIndex:null,optionIds:""});o.useEffect(()=>{l&&l(D.searchText)},[D.searchText]);const I=o.useRef(null),k=o.useRef(null),A=o.useRef(null);function G(){setTimeout(()=>{var q;(q=k.current)==null||q.focus()},0)}function E(q){M({searchText:""}),C&&(C.setValue(q),C.markAsDirty()),s&&s(new bn({value:q}))}function R(q){const ae=(f||[]).filter(($,j)=>j!==q);E(ae)}function O(q){M({searchText:q.target.value})}function P(q){if(A.current&&A.current.children.length&&typeof q=="number"){const ae=A.current.children[q],$=ae==null?void 0:ae.querySelector(".sps-clickable-tag__icon");$&&$.focus()}}const z=o.useCallback(q=>{M({activeTagIndex:null,searchText:""});const ae=D.searchText.trim(),$=f||[];ae&&$.indexOf(ae)===-1&&E([...$,...Mm(ae,u)]),!((q.key==="Tab"||q.key==="Enter")&&!D.searchText)&&q.preventDefault()},[D.searchText,f,Mm]);function L(q){z(q)}function re(q){var ae;if(!t){const $=!q.target.selectionStart&&f&&f.length,j=f?f.length:0;switch(q.key){case"Backspace":if(D.activeTagIndex===j-1){R(D.activeTagIndex),G();return}if(D.activeTagIndex!==null){R(D.activeTagIndex);return}if($){E(f.slice(0,j-1)),G();return}break;case"Delete":D.activeTagIndex!==null&&(R(D.activeTagIndex),G());break;case"Enter":case"Tab":z(q);break;case"Up":case"ArrowUp":case"Down":case"ArrowDown":q.preventDefault();break;case"Left":case"ArrowLeft":if($){D.activeTagIndex===null?(M({activeTagIndex:j-1}),P(j-1)):D.activeTagIndex>0&&(M({activeTagIndex:D.activeTagIndex-1}),P(D.activeTagIndex-1));return}break;case"Right":case"ArrowRight":if(D.activeTagIndex!==null){D.activeTagIndex===j-1?(M({activeTagIndex:null}),(ae=k.current)==null||ae.focus()):(M({activeTagIndex:D.activeTagIndex+1}),P(D.activeTagIndex+1));return}break}for(const oe of u)q.key===oe&&z(q);q.persist(),M({keyDown:q})}}function B(q){E([]),q.stopPropagation()}const Z=U(p||"sps-multi-select",t&&"sps-form-control--disabled",e),H=new Array((f==null?void 0:f.length)||0).fill(0).map((q,ae)=>`${T}_tag-${ae}`);return o.createElement(nt,{id:T,className:Z,formControl:n,formMeta:r,ref:I,inputRef:k,focusInputOnClick:!0,onKeyDown:re,role:"listbox","aria-multiselectable":!0,"aria-activedescendant":H[D.activeTagIndex||0],"aria-owns":D.optionIds},o.createElement("div",{className:"sps-text-input"},o.createElement("div",{className:S?U("sps-form-control",f&&!t&&"sps-form-control--clearable"&&"sps-multi-select__max-height"):U("sps-form-control",f&&!t&&"sps-form-control--clearable")},m&&o.createElement("i",{className:U("sps-text-input__icon","sps-icon",`sps-icon-${m}`)}),o.createElement("div",{className:"sps-multi-select__tags-and-input",ref:A},Array.isArray(f)&&f.map((q,ae)=>o.createElement(Ar,{id:H[ae],role:"option",disabled:t,"aria-selected":"true",key:H[ae],onRemove:()=>R(ae)},o.createElement("span",null,q))),o.createElement("input",{type:"text",ref:k,"data-testid":`${h}__multi-value-text-input`,value:D.searchText,className:"sps-text-input__input",placeholder:D.searchText.length===0&&(!f||f.length===0)?c:void 0,id:w,onBlur:L,onChange:O,onKeyDown:re,disabled:t,role:"listbox","aria-multiselectable":"true","aria-owns":H.join(" "),...y})),f&&f.length!==0&&!t?o.createElement("i",{className:"sps-icon sps-icon-x-circle sps-form-control__clear-btn",onClick:q=>B(q)}):null)))}Object.assign(Zi,{props:iC,displayName:"SpsMultiValueTextInput"});const _m={general:{label:"General Usage",description:()=>o.createElement(o.Fragment,null,o.createElement("h5",null,"Coming soon"))},basic:{label:"Basic Usage",examples:{basic:{react:v.code`
|
|
8931
8931
|
import { SpsMultiValueTextInput, SpsLabel, useSpsForm } from "@spscommerce/ds-react";
|
|
8932
8932
|
function DemoComponent() {
|
|
8933
8933
|
const { formValue, formMeta, updateForm } = useSpsForm({
|
|
@@ -9084,7 +9084,7 @@ ${t.join("").replace("]","\\]").replace(" ","\\s")}]+`);return e.split(n).filter
|
|
|
9084
9084
|
</>
|
|
9085
9085
|
)
|
|
9086
9086
|
}
|
|
9087
|
-
`}}}},lC={disabled:"boolean",formMeta:"SpsFormFieldMeta<string>",onChange:"(newValue: string) => void",value:"string",twentyFourHour:"boolean",placeholder12h:"string",placeholder24h:"string"},Lm=["AM","PM"],Xi=o.forwardRef(function({className:t,disabled:n,formControl:r,formMeta:a,id:s,onChange:l,value:c,twentyFourHour:p=!1,placeholder24h:f="00:00",placeholder12h:m="12:00","data-testid":u,...h},S){var Z;const y=a||r,{wrapperId:
|
|
9087
|
+
`}}}},lC={disabled:"boolean",formMeta:"SpsFormFieldMeta<string>",onChange:"(newValue: string) => void",value:"string",twentyFourHour:"boolean",placeholder12h:"string",placeholder24h:"string"},Lm=["AM","PM"],Xi=o.forwardRef(function({className:t,disabled:n,formControl:r,formMeta:a,id:s,onChange:l,value:c,twentyFourHour:p=!1,placeholder24h:f="00:00",placeholder12h:m="12:00","data-testid":u,...h},S){var Z;const y=a||r,{wrapperId:C}=St(s,y),T=o.useRef(null),{current:w}=gn(s),D=p?c:c==null?void 0:c.split(" ")[0],M=ne.validateTimeString(D,p)?ne.padIncompleteTimeString(D,p):"",I=p?"":(Z=c==null?void 0:c.split(" ")[1])==null?void 0:Z.toUpperCase(),k=M&&Lm.find(H=>H===I)||"",[A,G]=o.useState(M),[E,R]=o.useState(k||"AM");function O(H){a&&(a.setValue(H||""),a.markAsDirty()),l&&l(H||"")}function P(H){ne.validateTimeString(H.target.value,p)&&G(H.target.value)}function z(H){if(ne.validateTimeString(H??A,p)){const q=ne.padIncompleteTimeString(H??A,p);G(q),O(q&&!p?`${q} ${E}`:q||"")}else O("")}function L(H){R(H.target.value);const q=ne.padIncompleteTimeString(A,p);q&&!p&&O(`${q} ${H.target.value}`)}function re(H){ne.validateTimeString(H,p)&&(G(H??""),setTimeout(()=>z(H),0))}o.useEffect(()=>{M!==A&&G(M)},[M]),o.useEffect(()=>{k&&k!==E&&R(k)},[k]);const B=U("sps-time-input",t);return p?o.createElement(nt,{id:C,formControl:r,formMeta:a,inputRef:T,ref:S,"data-testid":u},o.createElement(Xt,{id:w,"data-testid":u,className:B,suggestions:$a,zeroState:"Custom time",placeholder:f,value:A,onChange:P,onBlur:()=>z(),onSelectionChange:re,onKeyDown:H=>{H.key==="Enter"&&z()},disabled:n,inputNotClearable:!0,autoFocusOnSelection:!0,...h})):o.createElement(nt,{id:C,formControl:r,formMeta:a,inputRef:T,ref:S,"data-testid":u},o.createElement(br,null,o.createElement(Xt,{id:w,"data-testid":u,className:B,suggestions:Va,zeroState:"Custom time",placeholder:m,value:A,onChange:P,onBlur:()=>z(),onSelectionChange:re,onKeyDown:H=>{H.key==="Enter"&&z()},disabled:n,inputNotClearable:!0,autoFocusOnSelection:!0}),o.createElement(Yn,{id:`${w}__select`,"data-testid":`${u}__select`,options:Lm,value:E,onChange:L,disabled:n,notClearable:!0,className:B})))});Object.assign(Xi,{props:lC,displayName:"SpsTimeInput"});const Om={basic:{label:"Basic",examples:{basic:{react:v.code`
|
|
9088
9088
|
import {
|
|
9089
9089
|
useSpsForm,
|
|
9090
9090
|
SpsTimeInput,
|
|
@@ -9137,7 +9137,7 @@ ${t.join("").replace("]","\\]").replace(" ","\\s")}]+`);return e.split(n).filter
|
|
|
9137
9137
|
</>
|
|
9138
9138
|
);
|
|
9139
9139
|
}
|
|
9140
|
-
`}}}},cC={Autocomplete:{components:[Xt],examples:yc},Checkboxes:{components:[Fn],examples:Tc},"Clickable Tags":{components:[Ar],examples:Ec},"Column Chooser":{components:[li,Jo],examples:Jp},"Conditional Fields":{description:()=>o.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:[Ji],examples:Im},"Content Rows":{components:[ci,Gn,Zo],examples:Zp},"Content Sections":{components:[Di],examples:Ru},"Date Pickers":{components:[di],examples:ou},"Date Range Pickers":{components:[ui],examples:iu},"Date Time Range Pickers":{components:[mi],examples:mu},Datetime:{components:[wi],examples:Cu},"Time Input":{components:[Xi],examples:Om},"Description Lists":{description:()=>o.createElement("p",null,"Description Lists display a series of terms with accompanying descriptions such as a glossary of terms."),components:[ta,na,oa],examples:Lu},Dropdown:{components:[zn,Ci],examples:Ou},"Filter Panel":{components:[Ui,zi,ji,qi],examples:xm},Form:{components:[ro],examples:qp},Incrementor:{components:[Ni],examples:Bu},Label:{description:()=>o.createElement("p",null,"Labels provide a description for the value to be entered or selected in an accompanying input field."),components:[ki],examples:Pu},"List Action Bar":{description:()=>o.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:[xi],examples:em},"Micro Block":{components:[Ii],examples:tm},Modals:{description:()=>o.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:[Mi,sa],examples:rm},"Multi Select":{description:()=>o.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:[Li],examples:om},"Multi Value Text Input":{description:()=>o.createElement("p",null,"To be determined."),components:[Zi],examples:_m},Pagination:{description:()=>o.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:[Oi,ia],examples:am},"Radio Buttons":{description:"Radio Buttons allow a user to make single selection from a list of predefined options.",components:[Ri],examples:sm},Selects:{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:lu},"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:[lm],examples:cm},"Split Button":{components:[Bi],examples:dm},"Summary List Row":{components:[Pi,Ai,ao],examples:pm},Tables:{description:({NavigateTo:e})=>o.createElement(o.Fragment,null,o.createElement("div",{className:"sps-body-14"},"Tables (along with ",o.createElement(e,{to:"content-rows"},"Content Rows")," and"," ",o.createElement(e,{to:"content-tiles"},"Content Tiles"),") are one of three options for displaying a list of records on a page."),o.createElement("br",null),o.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:[jn,Dn,ue,Cn,it,Ye],examples:Qu},"Task Queue":{components:[Fi],examples:um},"Text Inputs":{description:()=>o.createElement("p",null,"Text Inputs consist of a Label and a field in which a user enters a short value."),components:[ca],examples:mm},"Text Areas":{description:()=>o.createElement("p",null,"Text Areas consist of a Label and a field in which a user enters a long value."),components:[Vi],examples:fm},Toggles:{description:()=>o.createElement("p",null,"Toggles allow a user to immediately turn a setting on or off."),components:[$i],examples:Sm},Tooltips:{components:[Bt,Ki],examples:gm},Wizard:{components:[Wi,Gi],examples:ym},Workflow:{components:[da,pa,ua,ma],examples:km,notices:[tC]},"Slide In Panels":{description:"",components:[_i],examples:nm}},Rm=new WeakMap;function fa(e,t,n){return e?(typeof t=="string"&&(t=t.replace(/\s+/g,"")),`${Rm.get(e)}-${n}-${t}`):""}const so=typeof document<"u"?I.useLayoutEffect:()=>{};function yr(e){const t=I.useRef(null);return so(()=>{t.current=e},[e]),I.useCallback((...n)=>{const r=t.current;return r==null?void 0:r(...n)},[])}const ha={prefix:String(Math.round(Math.random()*1e10)),current:0},Bm=I.createContext(ha),dC=I.createContext(!1);let pC=!!(typeof window<"u"&&window.document&&window.document.createElement),Qi=new WeakMap;function uC(e=!1){let t=I.useContext(Bm),n=I.useRef(null);if(n.current===null&&!e){var r,a;let s=(a=I.__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(s){let l=Qi.get(s);l==null?Qi.set(s,{id:t.current,state:s.memoizedState}):s.memoizedState!==l.state&&(t.current=l.id,Qi.delete(s))}n.current=++t.current}return n.current}function mC(e){let t=I.useContext(Bm);t===ha&&!pC&&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=uC(!!e),r=t===ha&&process.env.NODE_ENV==="test"?"react-aria":`react-aria${t.prefix}`;return e||`${r}-${n}`}function fC(e){let t=I.useId(),[n]=I.useState(Pm()),r=n||process.env.NODE_ENV==="test"?"react-aria":`react-aria${ha.prefix}`;return e||`${r}-${t}`}const hC=typeof I.useId=="function"?fC:mC;function SC(){return!1}function gC(){return!0}function bC(e){return()=>{}}function Pm(){return typeof I.useSyncExternalStore=="function"?I.useSyncExternalStore(bC,SC,gC):I.useContext(dC)}let vC=!!(typeof window<"u"&&window.document&&window.document.createElement),Nn=new Map;function Am(e){let[t,n]=I.useState(e),r=I.useRef(null),a=hC(t),s=I.useCallback(l=>{r.current=l},[]);return vC&&(Nn.has(a)&&!Nn.get(a).includes(s)?Nn.set(a,[...Nn.get(a),s]):Nn.set(a,[s])),so(()=>{let l=a;return()=>{Nn.delete(l)}},[a]),I.useEffect(()=>{let l=r.current;l&&(r.current=null,n(l))}),a}function yC(e,t){if(e===t)return e;let n=Nn.get(e);if(n)return n.forEach(a=>a(t)),t;let r=Nn.get(t);return r?(r.forEach(a=>a(e)),e):t}function Fm(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}const xt=e=>{var t;return(t=e==null?void 0:e.ownerDocument)!==null&&t!==void 0?t:document},qn=e=>e&&"window"in e&&e.window===e?e:xt(e).defaultView||window;function Vm(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=Vm(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function TC(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=Vm(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 a in r){let s=t[a],l=r[a];typeof s=="function"&&typeof l=="function"&&a[0]==="o"&&a[1]==="n"&&a.charCodeAt(2)>=65&&a.charCodeAt(2)<=90?t[a]=Fm(s,l):(a==="className"||a==="UNSAFE_className")&&typeof s=="string"&&typeof l=="string"?t[a]=TC(s,l):a==="id"&&s&&l?t.id=yC(s,l):t[a]=l!==void 0?l:s}}return t}const EC=new Set(["id"]),wC=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),CC=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),DC=/^(data-.*)$/;function NC(e,t={}){let{labelable:n,isLink:r,propNames:a}=t,s={};for(const l in e)Object.prototype.hasOwnProperty.call(e,l)&&(EC.has(l)||n&&wC.has(l)||r&&CC.has(l)||a!=null&&a.has(l)||DC.test(l))&&(s[l]=e[l]);return s}function rn(e){if(kC())e.focus({preventScroll:!0});else{let t=xC(e);e.focus(),IC(t)}}let Sa=null;function kC(){if(Sa==null){Sa=!1;try{document.createElement("div").focus({get preventScroll(){return Sa=!0,!0}})}catch{}}return Sa}function xC(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 IC(e){for(let{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}function ga(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 el(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 on(e){let t=null;return()=>(t==null&&(t=e()),t)}const Jn=on(function(){return el(/^Mac/i)}),MC=on(function(){return el(/^iPhone/i)}),$m=on(function(){return el(/^iPad/i)||Jn()&&navigator.maxTouchPoints>1}),tl=on(function(){return MC()||$m()}),_C=on(function(){return Jn()||tl()}),LC=on(function(){return ga(/AppleWebKit/i)&&!OC()}),OC=on(function(){return ga(/Chrome/i)}),Km=on(function(){return ga(/Android/i)}),RC=on(function(){return ga(/Firefox/i)}),BC=I.createContext({isNative:!0,open:AC,useHref:e=>e});function nl(){return I.useContext(BC)}function Zn(e,t,n=!0){var r,a;let{metaKey:s,ctrlKey:l,altKey:c,shiftKey:p}=t;RC()&&(!((a=window.event)===null||a===void 0||(r=a.type)===null||r===void 0)&&r.startsWith("key"))&&e.target==="_blank"&&(Jn()?s=!0:l=!0);let f=LC()&&Jn()&&!$m()?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:s,ctrlKey:l,altKey:c,shiftKey:p}):new MouseEvent("click",{metaKey:s,ctrlKey:l,altKey:c,shiftKey:p,bubbles:!0,cancelable:!0});Zn.isOpening=n,rn(e),e.dispatchEvent(f),Zn.isOpening=!1}Zn.isOpening=!1;function PC(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 AC(e,t){PC(e,n=>Zn(n,t))}function FC(e){let t=nl();var n;const r=t.useHref((n=e==null?void 0:e.href)!==null&&n!==void 0?n:"");return{href:e!=null&&e.href?r: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 Tr=new Map,rl=new Set;function Hm(){if(typeof window>"u")return;function e(r){return"propertyName"in r}let t=r=>{if(!e(r)||!r.target)return;let a=Tr.get(r.target);a||(a=new Set,Tr.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=Tr.get(r.target);if(a&&(a.delete(r.propertyName),a.size===0&&(r.target.removeEventListener("transitioncancel",n),Tr.delete(r.target)),Tr.size===0)){for(let s of rl)s();rl.clear()}};document.body.addEventListener("transitionrun",t),document.body.addEventListener("transitionend",n)}typeof document<"u"&&(document.readyState!=="loading"?Hm():document.addEventListener("DOMContentLoaded",Hm));function Wm(e){requestAnimationFrame(()=>{Tr.size===0?e():rl.add(e)})}function Gm(){let e=I.useRef(new Map),t=I.useCallback((a,s,l,c)=>{let p=c!=null&&c.once?(...f)=>{e.current.delete(l),l(...f)}:l;e.current.set(l,{type:s,eventTarget:a,fn:p,options:c}),a.addEventListener(s,l,c)},[]),n=I.useCallback((a,s,l,c)=>{var p;let f=((p=e.current.get(l))===null||p===void 0?void 0:p.fn)||l;a.removeEventListener(s,f,c),e.current.delete(l)},[]),r=I.useCallback(()=>{e.current.forEach((a,s)=>{n(a.eventTarget,a.type,s,a.options)})},[n]);return I.useEffect(()=>r,[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}function Ym(e,t){let{id:n,"aria-label":r,"aria-labelledby":a}=e;return n=Am(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 VC(e,t){so(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}function $C(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 KC(e,t){const n=[];for(;e&&e!==document.documentElement;)$C(e,t)&&n.push(e),e=e.parentElement;return n}let HC=0;const ol=new Map;function WC(e){let[t,n]=I.useState();return so(()=>{if(!e)return;let r=ol.get(e);if(r)n(r.element.id);else{let a=`react-aria-description-${HC++}`;n(a);let s=document.createElement("div");s.id=a,s.style.display="none",s.textContent=e,document.body.appendChild(s),r={refCount:0,element:s},ol.set(e,r)}return r.refCount++,()=>{r&&--r.refCount===0&&(r.element.remove(),ol.delete(e))}},[e]),{"aria-describedby":e?t:void 0}}function Um(e,t,n,r){let a=yr(n),s=n==null;I.useEffect(()=>{if(s||!e.current)return;let l=e.current;return l.addEventListener(t,a,r),()=>{l.removeEventListener(t,a,r)}},[e,t,r,s,a])}function zm(e,t){let n=jm(e,t,"left"),r=jm(e,t,"top"),a=t.offsetWidth,s=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,S=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+s>S&&(c+=r+s-S),e.scrollLeft=l,e.scrollTop=c}function jm(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 qm(e,t){if(document.contains(e)){let l=document.scrollingElement||document.documentElement;if(window.getComputedStyle(l).overflow==="hidden"){let p=KC(e);for(let f of p)zm(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,a,s;t==null||(a=t.containingElement)===null||a===void 0||(r=a.scrollIntoView)===null||r===void 0||r.call(a,{block:"center",inline:"center"}),(s=e.scrollIntoView)===null||s===void 0||s.call(e,{block:"nearest"})}}}}function al(e){return e.mozInputSource===0&&e.isTrusted?!0:Km()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function GC(e){return!Km()&&e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"}function Jm(e,t,n){let[r,a]=I.useState(e||t),s=I.useRef(e!==void 0),l=e!==void 0;I.useEffect(()=>{let f=s.current;f!==l&&console.warn(`WARN: A component changed from ${f?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}.`),s.current=l},[l]);let c=l?e:r,p=I.useCallback((f,...m)=>{let u=(h,...S)=>{n&&(Object.is(c,h)||n(h,...S)),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((S,...y)=>{let w=f(l?c:S,...y);return u(w,...m),l?S:w})):(l||a(f),u(f,...m))},[l,c,n]);return[c,p]}function sl(e){return _C()?e.altKey:e.ctrlKey}function Er(e){return Jn()?e.metaKey:e.ctrlKey}const YC=1e3;function UC(e){let{keyboardDelegate:t,selectionManager:n,onTypeSelect:r}=e,a=I.useRef({search:"",timeout:null}).current,s=l=>{let c=zC(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=""},YC)};return{typeSelectProps:{onKeyDownCapture:t.getKeyForSearch?s:null}}}function zC(e){return e.length===1||!/^[A-Z]/i.test(e)?e:""}let wr="default",il="",ba=new WeakMap;function Zm(e){if(tl()){if(wr==="default"){const t=xt(e);il=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none"}wr="disabled"}else(e instanceof HTMLElement||e instanceof SVGElement)&&(ba.set(e,e.style.userSelect),e.style.userSelect="none")}function va(e){if(tl()){if(wr!=="disabled")return;wr="restoring",setTimeout(()=>{Wm(()=>{if(wr==="restoring"){const t=xt(e);t.documentElement.style.webkitUserSelect==="none"&&(t.documentElement.style.webkitUserSelect=il||""),il="",wr="default"}})},300)}else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&ba.has(e)){let t=ba.get(e);e.style.userSelect==="none"&&(e.style.userSelect=t),e.getAttribute("style")===""&&e.removeAttribute("style"),ba.delete(e)}}const Xm=I.createContext({register:()=>{}});Xm.displayName="PressResponderContext";function jC(e,t){return t.get?t.get.call(e):t.value}function Qm(e,t,n){if(!t.has(e))throw new TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function qC(e,t){var n=Qm(e,t,"get");return jC(e,n)}function JC(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function ZC(e,t,n){JC(e,t),t.set(e,n)}function XC(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 ef(e,t,n){var r=Qm(e,t,"set");return XC(e,r,n),n}function QC(e){let t=I.useContext(Xm);if(t){let{register:n,...r}=t;e=kn(r,e),n()}return VC(t,e.ref),e}var ya=new WeakMap;class Ta{continuePropagation(){ef(this,ya,!1)}get shouldStopPropagation(){return qC(this,ya)}constructor(t,n,r,a){ZC(this,ya,{writable:!0,value:void 0}),ef(this,ya,!0);var s;let l=(s=a==null?void 0:a.target)!==null&&s!==void 0?s:r.currentTarget;const c=l==null?void 0:l.getBoundingClientRect();let p,f=0,m,u=null;r.clientX!=null&&r.clientY!=null&&(m=r.clientX,u=r.clientY),c&&(m!=null&&u!=null?(p=m-c.left,f=u-c.top):(p=c.width/2,f=c.height/2)),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,this.x=p,this.y=f}}const tf=Symbol("linkClicked");function nf(e){let{onPress:t,onPressChange:n,onPressStart:r,onPressEnd:a,onPressUp:s,isDisabled:l,isPressed:c,preventFocusOnPress:p,shouldCancelOnPointerExit:f,allowTextSelectionOnPress:m,ref:u,...h}=QC(e),[S,y]=I.useState(!1),w=I.useRef({isPressed:!1,ignoreEmulatedMouseEvents:!1,ignoreClickAfterPress:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null}),{addGlobalListener:T,removeAllGlobalListeners:C}=Gm(),D=yr((E,R)=>{let O=w.current;if(l||O.didFirePressStart)return!1;let A=!0;if(O.isTriggeringEvent=!0,r){let j=new Ta("pressstart",R,E);r(j),A=j.shouldStopPropagation}return n&&n(!0),O.isTriggeringEvent=!1,O.didFirePressStart=!0,y(!0),A}),M=yr((E,R,O=!0)=>{let A=w.current;if(!A.didFirePressStart)return!1;A.ignoreClickAfterPress=!0,A.didFirePressStart=!1,A.isTriggeringEvent=!0;let j=!0;if(a){let L=new Ta("pressend",R,E);a(L),j=L.shouldStopPropagation}if(n&&n(!1),y(!1),t&&O&&!l){let L=new Ta("press",R,E);t(L),j&&(j=L.shouldStopPropagation)}return A.isTriggeringEvent=!1,j}),x=yr((E,R)=>{let O=w.current;if(l)return!1;if(s){O.isTriggeringEvent=!0;let A=new Ta("pressup",R,E);return s(A),O.isTriggeringEvent=!1,A.shouldStopPropagation}return!0}),k=yr(E=>{let R=w.current;R.isPressed&&R.target&&(R.isOverTarget&&R.pointerType!=null&&M(an(R.target,E),R.pointerType,!1),R.isPressed=!1,R.isOverTarget=!1,R.activePointerId=null,R.pointerType=null,C(),m||va(R.target))}),P=yr(E=>{f&&k(E)}),G=I.useMemo(()=>{let E=w.current,R={onKeyDown(A){if(cl(A.nativeEvent,A.currentTarget)&&A.currentTarget.contains(A.target)){var j;af(A.target,A.key)&&A.preventDefault();let L=!0;if(!E.isPressed&&!A.repeat){E.target=A.currentTarget,E.isPressed=!0,L=D(A,"keyboard");let re=A.currentTarget,B=Z=>{cl(Z,re)&&!Z.repeat&&re.contains(Z.target)&&E.target&&x(an(E.target,Z),"keyboard")};T(xt(A.currentTarget),"keyup",Fm(B,O),!0)}L&&A.stopPropagation(),A.metaKey&&Jn()&&((j=E.metaKeyEvents)===null||j===void 0||j.set(A.key,A.nativeEvent))}else A.key==="Meta"&&(E.metaKeyEvents=new Map)},onClick(A){if(!(A&&!A.currentTarget.contains(A.target))&&A&&A.button===0&&!E.isTriggeringEvent&&!Zn.isOpening){let j=!0;if(l&&A.preventDefault(),!E.ignoreClickAfterPress&&!E.ignoreEmulatedMouseEvents&&!E.isPressed&&(E.pointerType==="virtual"||al(A.nativeEvent))){!l&&!p&&rn(A.currentTarget);let L=D(A,"virtual"),re=x(A,"virtual"),B=M(A,"virtual");j=L&&re&&B}E.ignoreEmulatedMouseEvents=!1,E.ignoreClickAfterPress=!1,j&&A.stopPropagation()}}},O=A=>{var j;if(E.isPressed&&E.target&&cl(A,E.target)){var L;af(A.target,A.key)&&A.preventDefault();let B=A.target;M(an(E.target,A),"keyboard",E.target.contains(B)),C(),A.key!=="Enter"&&ll(E.target)&&E.target.contains(B)&&!A[tf]&&(A[tf]=!0,Zn(E.target,A,!1)),E.isPressed=!1,(L=E.metaKeyEvents)===null||L===void 0||L.delete(A.key)}else if(A.key==="Meta"&&(!((j=E.metaKeyEvents)===null||j===void 0)&&j.size)){var re;let B=E.metaKeyEvents;E.metaKeyEvents=void 0;for(let Z of B.values())(re=E.target)===null||re===void 0||re.dispatchEvent(new KeyboardEvent("keyup",Z))}};if(typeof PointerEvent<"u"){R.onPointerDown=B=>{if(B.button!==0||!B.currentTarget.contains(B.target))return;if(GC(B.nativeEvent)){E.pointerType="virtual";return}dl(B.currentTarget)&&B.preventDefault(),E.pointerType=B.pointerType;let Z=!0;E.isPressed||(E.isPressed=!0,E.isOverTarget=!0,E.activePointerId=B.pointerId,E.target=B.currentTarget,!l&&!p&&rn(B.currentTarget),m||Zm(E.target),Z=D(B,E.pointerType),T(xt(B.currentTarget),"pointermove",A,!1),T(xt(B.currentTarget),"pointerup",j,!1),T(xt(B.currentTarget),"pointercancel",re,!1)),Z&&B.stopPropagation()},R.onMouseDown=B=>{B.currentTarget.contains(B.target)&&B.button===0&&(dl(B.currentTarget)&&B.preventDefault(),B.stopPropagation())},R.onPointerUp=B=>{!B.currentTarget.contains(B.target)||E.pointerType==="virtual"||B.button===0&&Cr(B,B.currentTarget)&&x(B,E.pointerType||B.pointerType)};let A=B=>{B.pointerId===E.activePointerId&&(E.target&&Cr(B,E.target)?!E.isOverTarget&&E.pointerType!=null&&(E.isOverTarget=!0,D(an(E.target,B),E.pointerType)):E.target&&E.isOverTarget&&E.pointerType!=null&&(E.isOverTarget=!1,M(an(E.target,B),E.pointerType,!1),P(B)))},j=B=>{B.pointerId===E.activePointerId&&E.isPressed&&B.button===0&&E.target&&(Cr(B,E.target)&&E.pointerType!=null?M(an(E.target,B),E.pointerType):E.isOverTarget&&E.pointerType!=null&&M(an(E.target,B),E.pointerType,!1),E.isPressed=!1,E.isOverTarget=!1,E.activePointerId=null,E.pointerType=null,C(),m||va(E.target),"ontouchend"in E.target&&B.pointerType!=="mouse"&&T(E.target,"touchend",L,{once:!0}))},L=B=>{of(B.target)&&B.preventDefault()},re=B=>{k(B)};R.onDragStart=B=>{B.currentTarget.contains(B.target)&&k(B)}}else{R.onMouseDown=L=>{if(L.button!==0||!L.currentTarget.contains(L.target))return;if(dl(L.currentTarget)&&L.preventDefault(),E.ignoreEmulatedMouseEvents){L.stopPropagation();return}E.isPressed=!0,E.isOverTarget=!0,E.target=L.currentTarget,E.pointerType=al(L.nativeEvent)?"virtual":"mouse",!l&&!p&&rn(L.currentTarget),D(L,E.pointerType)&&L.stopPropagation(),T(xt(L.currentTarget),"mouseup",A,!1)},R.onMouseEnter=L=>{if(!L.currentTarget.contains(L.target))return;let re=!0;E.isPressed&&!E.ignoreEmulatedMouseEvents&&E.pointerType!=null&&(E.isOverTarget=!0,re=D(L,E.pointerType)),re&&L.stopPropagation()},R.onMouseLeave=L=>{if(!L.currentTarget.contains(L.target))return;let re=!0;E.isPressed&&!E.ignoreEmulatedMouseEvents&&E.pointerType!=null&&(E.isOverTarget=!1,re=M(L,E.pointerType,!1),P(L)),re&&L.stopPropagation()},R.onMouseUp=L=>{L.currentTarget.contains(L.target)&&!E.ignoreEmulatedMouseEvents&&L.button===0&&x(L,E.pointerType||"mouse")};let A=L=>{if(L.button===0){if(E.isPressed=!1,C(),E.ignoreEmulatedMouseEvents){E.ignoreEmulatedMouseEvents=!1;return}E.target&&Cr(L,E.target)&&E.pointerType!=null?M(an(E.target,L),E.pointerType):E.target&&E.isOverTarget&&E.pointerType!=null&&M(an(E.target,L),E.pointerType,!1),E.isOverTarget=!1}};R.onTouchStart=L=>{if(!L.currentTarget.contains(L.target))return;let re=eD(L.nativeEvent);if(!re)return;E.activePointerId=re.identifier,E.ignoreEmulatedMouseEvents=!0,E.isOverTarget=!0,E.isPressed=!0,E.target=L.currentTarget,E.pointerType="touch",!l&&!p&&rn(L.currentTarget),m||Zm(E.target),D(xn(E.target,L),E.pointerType)&&L.stopPropagation(),T(qn(L.currentTarget),"scroll",j,!0)},R.onTouchMove=L=>{if(!L.currentTarget.contains(L.target))return;if(!E.isPressed){L.stopPropagation();return}let re=rf(L.nativeEvent,E.activePointerId),B=!0;re&&Cr(re,L.currentTarget)?!E.isOverTarget&&E.pointerType!=null&&(E.isOverTarget=!0,B=D(xn(E.target,L),E.pointerType)):E.isOverTarget&&E.pointerType!=null&&(E.isOverTarget=!1,B=M(xn(E.target,L),E.pointerType,!1),P(xn(E.target,L))),B&&L.stopPropagation()},R.onTouchEnd=L=>{if(!L.currentTarget.contains(L.target))return;if(!E.isPressed){L.stopPropagation();return}let re=rf(L.nativeEvent,E.activePointerId),B=!0;re&&Cr(re,L.currentTarget)&&E.pointerType!=null?(x(xn(E.target,L),E.pointerType),B=M(xn(E.target,L),E.pointerType)):E.isOverTarget&&E.pointerType!=null&&(B=M(xn(E.target,L),E.pointerType,!1)),B&&L.stopPropagation(),E.isPressed=!1,E.activePointerId=null,E.isOverTarget=!1,E.ignoreEmulatedMouseEvents=!0,E.target&&!m&&va(E.target),C()},R.onTouchCancel=L=>{L.currentTarget.contains(L.target)&&(L.stopPropagation(),E.isPressed&&k(xn(E.target,L)))};let j=L=>{E.isPressed&&L.target.contains(E.target)&&k({currentTarget:E.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})};R.onDragStart=L=>{L.currentTarget.contains(L.target)&&k(L)}}return R},[T,l,p,C,m,k,P,M,D,x]);return I.useEffect(()=>()=>{var E;m||va((E=w.current.target)!==null&&E!==void 0?E:void 0)},[m]),{isPressed:c||S,pressProps:kn(h,G)}}function ll(e){return e.tagName==="A"&&e.hasAttribute("href")}function cl(e,t){const{key:n,code:r}=e,a=t,s=a.getAttribute("role");return(n==="Enter"||n===" "||n==="Spacebar"||r==="Space")&&!(a instanceof qn(a).HTMLInputElement&&!sf(a,n)||a instanceof qn(a).HTMLTextAreaElement||a.isContentEditable)&&!((s==="link"||!s&&ll(a))&&n!=="Enter")}function eD(e){const{targetTouches:t}=e;return t.length>0?t[0]:null}function rf(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 xn(e,t){let n=0,r=0;return t.targetTouches&&t.targetTouches.length===1&&(n=t.targetTouches[0].clientX,r=t.targetTouches[0].clientY),{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey,clientX:n,clientY:r}}function an(e,t){let n=t.clientX,r=t.clientY;return{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey,clientX:n,clientY:r}}function tD(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 nD(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=tD(e);return nD(n,r)}function dl(e){return!(e instanceof HTMLElement)||!e.hasAttribute("draggable")}function of(e){return e instanceof HTMLInputElement?!1:e instanceof HTMLButtonElement?e.type!=="submit"&&e.type!=="reset":!ll(e)}function af(e,t){return e instanceof HTMLInputElement?!sf(e,t):of(e)}const rD=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function sf(e,t){return e.type==="checkbox"||e.type==="radio"?t===" ":rD.has(e.type)}let io=null,oD=new Set,lo=new Map,Xn=!1,pl=!1;function ul(e,t){for(let n of oD)n(e,t)}function aD(e){return!(e.metaKey||!Jn()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function Ea(e){Xn=!0,aD(e)&&(io="keyboard",ul("keyboard",e))}function Pt(e){io="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(Xn=!0,ul("pointer",e))}function lf(e){al(e)&&(Xn=!0,io="virtual")}function cf(e){e.target===window||e.target===document||(!Xn&&!pl&&(io="virtual",ul("virtual",e)),Xn=!1,pl=!1)}function df(){Xn=!1,pl=!0}function pf(e){if(typeof window>"u"||lo.get(qn(e)))return;const t=qn(e),n=xt(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){Xn=!0,r.apply(this,arguments)},n.addEventListener("keydown",Ea,!0),n.addEventListener("keyup",Ea,!0),n.addEventListener("click",lf,!0),t.addEventListener("focus",cf,!0),t.addEventListener("blur",df,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",Pt,!0),n.addEventListener("pointermove",Pt,!0),n.addEventListener("pointerup",Pt,!0)):(n.addEventListener("mousedown",Pt,!0),n.addEventListener("mousemove",Pt,!0),n.addEventListener("mouseup",Pt,!0)),t.addEventListener("beforeunload",()=>{uf(e)},{once:!0}),lo.set(t,{focus:r})}const uf=(e,t)=>{const n=qn(e),r=xt(e);t&&r.removeEventListener("DOMContentLoaded",t),lo.has(n)&&(n.HTMLElement.prototype.focus=lo.get(n).focus,r.removeEventListener("keydown",Ea,!0),r.removeEventListener("keyup",Ea,!0),r.removeEventListener("click",lf,!0),n.removeEventListener("focus",cf,!0),n.removeEventListener("blur",df,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",Pt,!0),r.removeEventListener("pointermove",Pt,!0),r.removeEventListener("pointerup",Pt,!0)):(r.removeEventListener("mousedown",Pt,!0),r.removeEventListener("mousemove",Pt,!0),r.removeEventListener("mouseup",Pt,!0)),lo.delete(n))};function sD(e){const t=xt(e);let n;return t.readyState!=="loading"?pf(e):(n=()=>{pf(e)},t.addEventListener("DOMContentLoaded",n)),()=>uf(e,n)}typeof document<"u"&&sD();function ml(){return io}const iD=500;function lD(e){let{isDisabled:t,onLongPressStart:n,onLongPressEnd:r,onLongPress:a,threshold:s=iD,accessibilityDescription:l}=e;const c=I.useRef(void 0);let{addGlobalListener:p,removeGlobalListener:f}=Gm(),{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},s),h.pointerType==="touch")){let S=y=>{y.preventDefault()};p(h.target,"contextmenu",S,{once:!0}),p(window,"pointerup",()=>{setTimeout(()=>{f(h.target,"contextmenu",S)},30)},{once:!0})}},onPressEnd(h){c.current&&clearTimeout(c.current),r&&(h.pointerType==="mouse"||h.pointerType==="touch")&&r({...h,type:"longpressend"})}}),u=WC(a&&!t?l:void 0);return{longPressProps:kn(m,u)}}function fl(e){const t=xt(e);if(ml()==="virtual"){let n=t.activeElement;Wm(()=>{t.activeElement===n&&e.isConnected&&rn(e)})}else rn(e)}function cD(e){const t=qn(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:s}=e.ownerDocument.defaultView;let{display:l,visibility:c}=s(e);a=l!=="none"&&c!=="hidden"&&c!=="collapse"}return a}function dD(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 mf(e,t){return e.nodeName!=="#comment"&&cD(e)&&dD(e,t)&&(!e.parentElement||mf(e.parentElement,e))}const hl=["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]"],pD=hl.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";hl.push('[tabindex]:not([tabindex="-1"]):not([disabled])');const uD=hl.join(':not([hidden]):not([tabindex="-1"]),');function ff(e,t){return!e||!t?!1:t.some(n=>n.contains(e))}function hf(e,t,n){let r=t!=null&&t.tabbable?uD:pD,a=xt(e).createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode(s){var l;return!(t==null||(l=t.from)===null||l===void 0)&&l.contains(s)?NodeFilter.FILTER_REJECT:s.matches(r)&&mf(s)&&(!n||ff(s,n))&&(!(t!=null&&t.accept)||t.accept(s))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return t!=null&&t.from&&(a.currentNode=t.from),a}class Sl{get size(){return this.fastMap.size}getTreeNode(t){return this.fastMap.get(t)}addTreeNode(t,n,r){let a=this.fastMap.get(n??null);if(!a)return;let s=new Sf({scopeRef:t});a.addChild(s),s.parent=a,this.fastMap.set(t,s),r&&(s.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 s of this.traverse())s!==n&&n.nodeToRestore&&s.nodeToRestore&&n.scopeRef&&n.scopeRef.current&&ff(s.nodeToRestore,n.scopeRef.current)&&(s.nodeToRestore=n.nodeToRestore);let a=n.children;r&&(r.removeChild(n),a.size>0&&a.forEach(s=>r&&r.addChild(s))),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 Sl;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 Sf({scopeRef:null}),this.fastMap.set(null,this.root)}}class Sf{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 Sl;function mD(e,t){let n=t==null?void 0:t.isDisabled,[r,a]=I.useState(!1);return so(()=>{if(e!=null&&e.current&&!n){let s=()=>{if(e.current){let c=hf(e.current,{tabbable:!0});a(!!c.nextNode())}};s();let l=new MutationObserver(s);return l.observe(e.current,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["tabIndex","disabled"]}),()=>{l.disconnect()}}}),n?!1:r}const fD=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),hD=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function SD(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 fD.has(n.script)}let t=e.split("-")[0];return hD.has(t)}const gD=Symbol.for("react-aria.i18n.locale");function gf(){let e=typeof window<"u"&&window[gD]||typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:SD(e)?"rtl":"ltr"}}let gl=gf(),co=new Set;function bf(){gl=gf();for(let e of co)e(gl)}function bD(){let e=Pm(),[t,n]=I.useState(gl);return I.useEffect(()=>(co.size===0&&window.addEventListener("languagechange",bf),co.add(n),()=>{co.delete(n),co.size===0&&window.removeEventListener("languagechange",bf)}),[]),e?{locale:"en-US",direction:"ltr"}:t}const vD=I.createContext(null);function vf(){let e=bD();return I.useContext(vD)||e}function yD(e){let{selectionManager:t,keyboardDelegate:n,ref:r,autoFocus:a=!1,shouldFocusWrap:s=!1,disallowEmptySelection:l=!1,disallowSelectAll:c=!1,selectOnFocus:p=t.selectionBehavior==="replace",disallowTypeAhead:f=!1,shouldUseVirtualFocus:m,allowsTabNavigation:u=!1,isVirtualized:h,scrollRef:S=r,linkBehavior:y="action"}=e,{direction:w}=vf(),T=nl(),C=O=>{if(O.altKey&&O.key==="Tab"&&O.preventDefault(),!r.current.contains(O.target))return;const A=(J,V)=>{if(J!=null){if(t.isLink(J)&&y==="selection"&&p&&!sl(O)){vo.flushSync(()=>{t.setFocusedKey(J,V)});let W=S.current.querySelector(`[data-key="${CSS.escape(J.toString())}"]`),X=t.getItemProps(J);T.open(W,O,X.href,X.routerOptions);return}if(t.setFocusedKey(J,V),t.isLink(J)&&y==="override")return;O.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(J):p&&!sl(O)&&t.replaceSelection(J)}};switch(O.key){case"ArrowDown":if(n.getKeyBelow){var j,L,re;let J=t.focusedKey!=null?(j=n.getKeyBelow)===null||j===void 0?void 0:j.call(n,t.focusedKey):(L=n.getFirstKey)===null||L===void 0?void 0:L.call(n);J==null&&s&&(J=(re=n.getFirstKey)===null||re===void 0?void 0:re.call(n,t.focusedKey)),J!=null&&(O.preventDefault(),A(J))}break;case"ArrowUp":if(n.getKeyAbove){var B,Z,H;let J=t.focusedKey!=null?(B=n.getKeyAbove)===null||B===void 0?void 0:B.call(n,t.focusedKey):(Z=n.getLastKey)===null||Z===void 0?void 0:Z.call(n);J==null&&s&&(J=(H=n.getLastKey)===null||H===void 0?void 0:H.call(n,t.focusedKey)),J!=null&&(O.preventDefault(),A(J))}break;case"ArrowLeft":if(n.getKeyLeftOf){var q,ae,$;let J=(q=n.getKeyLeftOf)===null||q===void 0?void 0:q.call(n,t.focusedKey);J==null&&s&&(J=w==="rtl"?(ae=n.getFirstKey)===null||ae===void 0?void 0:ae.call(n,t.focusedKey):($=n.getLastKey)===null||$===void 0?void 0:$.call(n,t.focusedKey)),J!=null&&(O.preventDefault(),A(J,w==="rtl"?"first":"last"))}break;case"ArrowRight":if(n.getKeyRightOf){var z,oe,ie;let J=(z=n.getKeyRightOf)===null||z===void 0?void 0:z.call(n,t.focusedKey);J==null&&s&&(J=w==="rtl"?(oe=n.getLastKey)===null||oe===void 0?void 0:oe.call(n,t.focusedKey):(ie=n.getFirstKey)===null||ie===void 0?void 0:ie.call(n,t.focusedKey)),J!=null&&(O.preventDefault(),A(J,w==="rtl"?"last":"first"))}break;case"Home":if(n.getFirstKey){O.preventDefault();let J=n.getFirstKey(t.focusedKey,Er(O));t.setFocusedKey(J),Er(O)&&O.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(J):p&&t.replaceSelection(J)}break;case"End":if(n.getLastKey){O.preventDefault();let J=n.getLastKey(t.focusedKey,Er(O));t.setFocusedKey(J),Er(O)&&O.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(J):p&&t.replaceSelection(J)}break;case"PageDown":if(n.getKeyPageBelow){let J=n.getKeyPageBelow(t.focusedKey);J!=null&&(O.preventDefault(),A(J))}break;case"PageUp":if(n.getKeyPageAbove){let J=n.getKeyPageAbove(t.focusedKey);J!=null&&(O.preventDefault(),A(J))}break;case"a":Er(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 J=hf(r.current,{tabbable:!0}),V,W;do W=J.lastChild(),W&&(V=W);while(W);V&&!V.contains(document.activeElement)&&rn(V)}break}}},D=I.useRef({top:0,left:0});Um(S,"scroll",h?null:()=>{D.current={top:S.current.scrollTop,left:S.current.scrollLeft}});let M=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 L=B=>{B!=null&&(t.setFocusedKey(B),p&&t.replaceSelection(B))},re=O.relatedTarget;var A,j;re&&O.currentTarget.compareDocumentPosition(re)&Node.DOCUMENT_POSITION_FOLLOWING?L((A=t.lastSelectedKey)!==null&&A!==void 0?A:n.getLastKey()):L((j=t.firstSelectedKey)!==null&&j!==void 0?j:n.getFirstKey())}else h||(S.current.scrollTop=D.current.top,S.current.scrollLeft=D.current.left);if(t.focusedKey!=null){let L=S.current.querySelector(`[data-key="${CSS.escape(t.focusedKey.toString())}"]`);L&&(L.contains(document.activeElement)||rn(L),ml()==="keyboard"&&qm(L,{containingElement:r.current}))}}},x=O=>{O.currentTarget.contains(O.relatedTarget)||t.setFocused(!1)};const k=I.useRef(a);I.useEffect(()=>{if(k.current){let O=null;a==="first"&&(O=n.getFirstKey()),a==="last"&&(O=n.getLastKey());let A=t.selectedKeys;if(A.size){for(let j of A)if(t.canSelectItem(j)){O=j;break}}t.setFocused(!0),t.setFocusedKey(O),O==null&&!m&&fl(r.current)}},[]);let P=I.useRef(t.focusedKey);I.useEffect(()=>{if(t.isFocused&&t.focusedKey!=null&&(t.focusedKey!==P.current||k.current)&&(S!=null&&S.current)){let O=ml(),A=r.current.querySelector(`[data-key="${CSS.escape(t.focusedKey.toString())}"]`);if(!A)return;(O==="keyboard"||k.current)&&(zm(S.current,A),O!=="virtual"&&qm(A,{containingElement:r.current}))}!m&&t.isFocused&&t.focusedKey==null&&P.current!=null&&fl(r.current),P.current=t.focusedKey,k.current=!1}),Um(r,"react-aria-focus-scope-restore",O=>{O.preventDefault(),t.setFocused(!0)});let G={onKeyDown:C,onFocus:M,onBlur:x,onMouseDown(O){S.current===O.target&&O.preventDefault()}},{typeSelectProps:E}=UC({keyboardDelegate:n,selectionManager:t});f||(G=kn(E,G));let R;return m||(R=t.focusedKey==null?0:-1),{collectionProps:{...G,tabIndex:R}}}function TD(e){let{selectionManager:t,key:n,ref:r,shouldSelectOnPressUp:a,shouldUseVirtualFocus:s,focus:l,isDisabled:c,onAction:p,allowsDifferentPressOrigin:f,linkBehavior:m="action"}=e,u=nl(),h=H=>{if(H.pointerType==="keyboard"&&sl(H))t.toggleSelection(n);else{if(t.selectionMode==="none")return;if(t.isLink(n)){if(m==="selection"){let q=t.getItemProps(n);u.open(r.current,H,q.href,q.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):H&&H.shiftKey?t.extendSelection(n):t.selectionBehavior==="toggle"||H&&(Er(H)||H.pointerType==="touch"||H.pointerType==="virtual")?t.toggleSelection(n):t.replaceSelection(n)}};I.useEffect(()=>{n===t.focusedKey&&t.isFocused&&!s&&(l?l():document.activeElement!==r.current&&fl(r.current))},[r,n,t.focusedKey,t.childFocusStrategy,t.isFocused,s]),c=c||t.isDisabled(n);let S={};!s&&!c?S={tabIndex:n===t.focusedKey?0:-1,onFocus(H){H.target===r.current&&t.setFocusedKey(n)}}:c&&(S.onMouseDown=H=>{H.preventDefault()});let y=t.isLink(n)&&m==="override",w=t.isLink(n)&&m!=="selection"&&m!=="none",T=!c&&t.canSelectItem(n)&&!y,C=(p||w)&&!c,D=C&&(t.selectionBehavior==="replace"?!T:!T||t.isEmpty),M=C&&T&&t.selectionBehavior==="replace",x=D||M,k=I.useRef(null),P=x&&T,G=I.useRef(!1),E=I.useRef(!1),R=H=>{if(p&&p(),w){let q=t.getItemProps(n);u.open(r.current,H,q.href,q.routerOptions)}},O={};a?(O.onPressStart=H=>{k.current=H.pointerType,G.current=P,H.pointerType==="keyboard"&&(!x||Tf())&&h(H)},f?(O.onPressUp=D?null:H=>{H.pointerType!=="keyboard"&&T&&h(H)},O.onPress=D?R:null):O.onPress=H=>{if(D||M&&H.pointerType!=="mouse"){if(H.pointerType==="keyboard"&&!yf())return;R(H)}else H.pointerType!=="keyboard"&&T&&h(H)}):(O.onPressStart=H=>{k.current=H.pointerType,G.current=P,E.current=D,T&&(H.pointerType==="mouse"&&!D||H.pointerType==="keyboard"&&(!C||Tf()))&&h(H)},O.onPress=H=>{(H.pointerType==="touch"||H.pointerType==="pen"||H.pointerType==="virtual"||H.pointerType==="keyboard"&&x&&yf()||H.pointerType==="mouse"&&E.current)&&(x?R(H):T&&h(H))}),S["data-key"]=n,O.preventFocusOnPress=s;let{pressProps:A,isPressed:j}=nf(O),L=M?H=>{k.current==="mouse"&&(H.stopPropagation(),H.preventDefault(),R(H))}:void 0,{longPressProps:re}=lD({isDisabled:!P,onLongPress(H){H.pointerType==="touch"&&(h(H),t.setSelectionBehavior("toggle"))}}),B=H=>{k.current==="touch"&&G.current&&H.preventDefault()},Z=t.isLink(n)?H=>{Zn.isOpening||H.preventDefault()}:void 0;return{itemProps:kn(S,T||D?A:{},P?re:{},{onDoubleClick:L,onDragStartCapture:B,onClick:Z}),isPressed:j,isSelected:t.isSelected(n),isFocused:t.isFocused&&t.focusedKey===n,isDisabled:c,allowsSelection:T,hasAction:x}}function yf(){let e=window.event;return(e==null?void 0:e.key)==="Enter"}function Tf(){let e=window.event;return(e==null?void 0:e.key)===" "||(e==null?void 0:e.code)==="Space"}function ED(e,t,n){let{key:r,isDisabled:a,shouldSelectOnPressUp:s}=e,{selectionManager:l,selectedKey:c}=t,p=r===c,f=a||t.isDisabled||t.selectionManager.isDisabled(r),{itemProps:m,isPressed:u}=TD({selectionManager:l,key:r,ref:n,isDisabled:f,shouldSelectOnPressUp:s,linkBehavior:"selection"}),h=fa(t,r,"tab"),S=fa(t,r,"tabpanel"),{tabIndex:y}=m,w=t.collection.getItem(r),T=NC(w==null?void 0:w.props,{labelable:!0});delete T.id;let C=FC(w==null?void 0:w.props);return{tabProps:kn(T,C,m,{id:h,"aria-selected":p,"aria-disabled":f||void 0,"aria-controls":p?S:void 0,tabIndex:f?void 0:y,role:"tab"}),isSelected:p,isDisabled:f,isPressed:u}}function wD(e,t,n){let r=mD(n)?void 0:0;var a;const s=fa(t,(a=e.id)!==null&&a!==void 0?a:t==null?void 0:t.selectedKey,"tabpanel"),l=Ym({...e,id:s,"aria-labelledby":fa(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 CD{getKeyLeftOf(t){return this.flipDirection?this.getNextKey(t):this.getPreviousKey(t)}getKeyRightOf(t){return this.flipDirection?this.getPreviousKey(t):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}getKeyAbove(t){return this.tabDirection?null:this.getPreviousKey(t)}getKeyBelow(t){return this.tabDirection?null:this.getNextKey(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,a=new Set){this.collection=t,this.flipDirection=n==="rtl"&&r==="horizontal",this.disabledKeys=a,this.tabDirection=r==="horizontal"}}function DD(e,t,n){let{orientation:r="horizontal",keyboardActivation:a="automatic"}=e,{collection:s,selectionManager:l,disabledKeys:c}=t,{direction:p}=vf(),f=I.useMemo(()=>new CD(s,p,r,c),[s,c,r,p]),{collectionProps:m}=yD({ref:n,selectionManager:l,keyboardDelegate:f,selectOnFocus:a==="automatic",disallowEmptySelection:!0,scrollRef:n,linkBehavior:"selection"}),u=Am();Rm.set(t,u);let h=Ym({...e,id:u});return{tabListProps:{...kn(m,h),role:"tablist","aria-orientation":r,tabIndex:void 0}}}function Ef({item:e,state:t}){const{key:n}=e,r=o.useRef(null),{tabProps:a}=ED({key:n},t,r),s=t.selectedKey===n,l=t.disabledKeys.has(n);return o.createElement("div",{...a,ref:r,className:U("sps-nav__item","sps-nav__link",s&&"active",l&&"sps-nav__item--disabled")},e.rendered)}function wf({state:e,...t}){const n=o.useRef(null),{tabPanelProps:r}=wD(t,e,n);return o.createElement("div",{...r,ref:n,className:"sps-card__body"},e.selectedItem?e.selectedItem.props.children:null)}class Cf{*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(t){let n=this.keyMap.get(t);var r;return n&&(r=n.prevKey)!==null&&r!==void 0?r:null}getKeyAfter(t){let n=this.keyMap.get(t);var r;return n&&(r=n.nextKey)!==null&&r!==void 0?r:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(t){var n;return(n=this.keyMap.get(t))!==null&&n!==void 0?n:null}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.firstKey=null,this.lastKey=null,this.iterable=t;let n=l=>{if(this.keyMap.set(l.key,l),l.childNodes&&l.type==="section")for(let c of l.childNodes)n(c)};for(let l of t)n(l);let r=null,a=0;for(let[l,c]of this.keyMap)r?(r.nextKey=l,c.prevKey=r.key):(this.firstKey=l,c.prevKey=void 0),c.type==="item"&&(c.index=a++),r=c,r.nextKey=void 0;var s;this.lastKey=(s=r==null?void 0:r.key)!==null&&s!==void 0?s:null}}class Yt extends Set{constructor(t,n,r){super(t),t instanceof Yt?(this.anchorKey=n??t.anchorKey,this.currentKey=r??t.currentKey):(this.anchorKey=n,this.currentKey=r)}}function ND(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function kD(e){let{selectionMode:t="none",disallowEmptySelection:n,allowDuplicateSelectionEvents:r,selectionBehavior:a="toggle",disabledBehavior:s="all"}=e,l=I.useRef(!1),[,c]=I.useState(!1),p=I.useRef(null),f=I.useRef(null),[,m]=I.useState(null),u=I.useMemo(()=>Df(e.selectedKeys),[e.selectedKeys]),h=I.useMemo(()=>Df(e.defaultSelectedKeys,new Yt),[e.defaultSelectedKeys]),[S,y]=Jm(u,h,e.onSelectionChange),w=I.useMemo(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),[T,C]=I.useState(a);a==="replace"&&T==="toggle"&&typeof S=="object"&&S.size===0&&C("replace");let D=I.useRef(a);return I.useEffect(()=>{a!==D.current&&(C(a),D.current=a)},[a]),{selectionMode:t,disallowEmptySelection:n,selectionBehavior:T,setSelectionBehavior:C,get isFocused(){return l.current},setFocused(M){l.current=M,c(M)},get focusedKey(){return p.current},get childFocusStrategy(){return f.current},setFocusedKey(M,x="first"){p.current=M,f.current=x,m(M)},selectedKeys:S,setSelectedKeys(M){(r||!ND(M,S))&&y(M)},disabledKeys:w,disabledBehavior:s}}function Df(e,t){return e?e==="all"?"all":new Yt(e):t}class xD{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&&or.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&&or.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 Yt([t],t,t);else{let s=this.state.selectedKeys;var r;let l=(r=s.anchorKey)!==null&&r!==void 0?r:t;n=new Yt(s,l,t);var a;for(let c of this.getKeyRange(l,(a=s.currentKey)!==null&&a!==void 0?a:t))n.delete(c);for(let c of this.getKeyRange(t,l))this.canSelectItem(c)&&n.add(c)}this.state.setSelectedKeys(n)}getKeyRange(t,n){let r=this.collection.getItem(t),a=this.collection.getItem(n);return r&&a?or.compareNodeOrder(this.collection,r,a)<=0?this.getKeyRangeInternal(t,n):this.getKeyRangeInternal(n,t):[]}getKeyRangeInternal(t,n){var r;if(!((r=this.layoutDelegate)===null||r===void 0)&&r.getKeyRange)return this.layoutDelegate.getKeyRange(t,n);let a=[],s=t;for(;s!=null;){let l=this.collection.getItem(s);if((l&&l.type==="item"||l.type==="cell"&&this.allowsCellSelection)&&a.push(s),s===n)return a;s=this.collection.getKeyAfter(s)}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 Yt(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 Yt([t],t,t):new Yt;this.state.setSelectedKeys(n)}setSelectedKeys(t){if(this.selectionMode==="none")return;let n=new Yt;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!=null;){if(this.canSelectItem(r)){let a=this.collection.getItem(r);a.type==="item"&&t.push(r),a.hasChildNodes&&(this.allowsCellSelection||a.type!=="item")&&n(or.getFirstItem(or.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 Yt)}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 a;this.allowsCellSelection=(a=r==null?void 0:r.allowsCellSelection)!==null&&a!==void 0?a:!1,this._isSelectAll=null,this.layoutDelegate=(r==null?void 0:r.layoutDelegate)||null}}function ID(e){let{filter:t,layoutDelegate:n}=e,r=kD(e),a=I.useMemo(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),s=I.useCallback(m=>t?new Cf(t(m)):new Cf(m),[t]),l=I.useMemo(()=>({suppressTextValueWarning:e.suppressTextValueWarning}),[e.suppressTextValueWarning]),c=or.useCollection(e,s,l),p=I.useMemo(()=>new xD(c,r,{layoutDelegate:n}),[c,r,n]);const f=I.useRef(null);return I.useEffect(()=>{if(r.focusedKey!=null&&!c.getItem(r.focusedKey)&&f.current){const C=f.current.getItem(r.focusedKey),D=[...f.current.getKeys()].map(E=>{const R=f.current.getItem(E);return(R==null?void 0:R.type)==="item"?R:null}).filter(E=>E!==null),M=[...c.getKeys()].map(E=>{const R=c.getItem(E);return(R==null?void 0:R.type)==="item"?R:null}).filter(E=>E!==null);var m,u;const x=((m=D==null?void 0:D.length)!==null&&m!==void 0?m:0)-((u=M==null?void 0:M.length)!==null&&u!==void 0?u:0);var h,S,y;let k=Math.min(x>1?Math.max(((h=C==null?void 0:C.index)!==null&&h!==void 0?h:0)-x+1,0):(S=C==null?void 0:C.index)!==null&&S!==void 0?S:0,((y=M==null?void 0:M.length)!==null&&y!==void 0?y:0)-1),P=null,G=!1;for(;k>=0;){if(!p.isDisabled(M[k].key)){P=M[k];break}if(k<M.length-1&&!G)k++;else{G=!0;var w,T;k>((w=C==null?void 0:C.index)!==null&&w!==void 0?w:0)&&(k=(T=C==null?void 0:C.index)!==null&&T!==void 0?T:0),k--}}r.setFocusedKey(P?P.key:null)}f.current=c},[c,p,r,r.focusedKey]),{collection:c,disabledKeys:a,selectionManager:p}}function MD(e){var t;let[n,r]=Jm(e.selectedKey,(t=e.defaultSelectedKey)!==null&&t!==void 0?t:null,e.onSelectionChange),a=I.useMemo(()=>n!=null?[n]:[],[n]),{collection:s,disabledKeys:l,selectionManager:c}=ID({...e,selectionMode:"single",disallowEmptySelection:!0,allowDuplicateSelectionEvents:!0,selectedKeys:a,onSelectionChange:f=>{if(f==="all")return;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?s.getItem(n):null;return{collection:s,disabledKeys:l,selectionManager:c,selectedKey:n,setSelectedKey:r,selectedItem:p}}function _D(e){var t;let n=MD({...e,suppressTextValueWarning:!0,defaultSelectedKey:(t=e.defaultSelectedKey)!==null&&t!==void 0?t:Nf(e.collection,e.disabledKeys?new Set(e.disabledKeys):new Set)}),{selectionManager:r,collection:a,selectedKey:s}=n,l=I.useRef(s);return I.useEffect(()=>{let c=s;(r.isEmpty||!a.getItem(c))&&(c=Nf(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 Nf(e,t){let n=null;if(e){var r,a,s,l;for(n=e.getFirstKey();(t.has(n)||!((a=e.getItem(n))===null||a===void 0||(r=a.props)===null||r===void 0)&&r.isDisabled)&&n!==e.getLastKey();)n=e.getKeyAfter(n);(t.has(n)||!((l=e.getItem(n))===null||l===void 0||(s=l.props)===null||s===void 0)&&s.isDisabled)&&n===e.getLastKey()&&(n=e.getFirstKey())}return n}const LD={},OD={};function bl(e){const t=_D(e),n=o.useRef(null),{tabListProps:r}=DD(e,t,n);return o.createElement(o.Fragment,null,o.createElement("div",{...r,ref:n,className:"sps-nav sps-nav--tabs sps-tabs-v2"},[...t.collection].map(a=>o.createElement(Ef,{key:a.key,item:a,state:t}))),o.createElement(wf,{key:t.selectedItem?t.selectedItem.key:null,state:t}))}Object.assign(bl,{props:LD,propTypes:OD,displayName:"SpsTabsV2"});const RD={};function vl({children:e,className:t,...n}){return o.createElement("div",{className:U("sps-card__footer",t),...n},e)}Object.assign(vl,{props:RD,displayName:"SpsCardV2Footer"});const BD={};function yl({children:e,className:t,...n}){return o.createElement("div",{className:U("sps-card__header",t),...n},e)}Object.assign(yl,{props:BD,displayName:"SpsCardV2Header"});const PD={};function kf({children:e,className:t,...n}){const[r,a,s,l,c]=_t(e,[{type:yl},{type:bl},{type:Gh.Tabs},{type:vl}]),p=a.length>0?a:s;return o.createElement("div",{className:U("sps-card",t),...n},r,p.length>0?p:o.createElement("div",{className:"sps-card__body"},c),l)}Object.assign(kf,{props:PD,displayName:"SpsCardV2"});const AD={};function xf({children:e,className:t,...n}){return o.createElement("div",{className:U("sps-card__title",t),...n},e)}Object.assign(xf,{props:AD,displayName:"SpsCardV2Title"});const FD={...jp,controlsDisabled:"boolean",footerLinks:"ReactNodeOrRenderFn",formMeta:"SpsFormSetMeta<any>",isOpen:"boolean",onClear:"() => void",onSubmit:"React.FormEventHandler"};function If(e){const{children:t,className:n,controlsDisabled:r,footerLinks:a,formArray:s,formGroup:l,formMeta:c,isOpen:p,onClear:f,onSubmit:m,unsafelyReplaceClassName:u,...h}=e,{t:S}=$e.useWoodlandLanguage();function y(){f&&f()}const w=U(u||"sps-advanced-search",p&&"sps-advanced-search--open",n);return o.createElement("div",{className:w,...h},o.createElement(ro,{onSubmit:m,formArray:s,formGroup:l,formMeta:c},o.createElement("div",{className:"sps-advanced-search__form"},t),o.createElement("div",{className:"sps-advanced-search__footer"},a&&o.createElement("div",{id:"footer_links"},Tt(a)),o.createElement("div",{className:"sps-advanced-search__footer-controls"},o.createElement(je,{kind:Y.ButtonKind.DEFAULT,type:Y.ButtonType.BUTTON,className:"mr-2",onClick:y,disabled:r},S("advancedSearch.clear")),o.createElement(je,{kind:Y.ButtonKind.KEY,type:Y.ButtonType.SUBMIT,disabled:r},S("advancedSearch.search"))))))}Object.assign(If,{props:FD,displayName:"SpsAdvancedSearch"});const VD={general:{label:"General Usage",description:({NavigateTo:e,Link:t})=>o.createElement(o.Fragment,null,o.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).'),o.createElement("p",null,"Advanced Search works in conjunction with the"," ",o.createElement(e,{to:"list-toolbar"},"List Bar")," and"," ",o.createElement(e,{to:"search-results-bar"},"Search Results")," components. Refer to those pages for additional details."),o.createElement("p",null,"Use the following guidelines when including Advanced Search on your page:",o.createElement("ul",null,o.createElement("li",null,"The Advanced Search Panel can contain any number of input fields."),o.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"," ",o.createElement(t,{to:"/style-and-layout/grid/"},"SPS Grid")," and guidelines for"," ",o.createElement(e,{to:"form"},"Form Layouts"),"."))))},basic:{label:"Basic Usage",description:({NavigateTo:e})=>o.createElement(o.Fragment,null,o.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 ",o.createElement(e,{to:"list-toolbar"},"List Bar")," page.")),examples:{basic:{react:v.code`
|
|
9140
|
+
`}}}},cC={Autocomplete:{components:[Xt],examples:yc},Checkboxes:{components:[Fn],examples:Tc},"Clickable Tags":{components:[Ar],examples:Ec},"Column Chooser":{components:[li,Jo],examples:Jp},"Conditional Fields":{description:()=>o.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:[Ji],examples:Im},"Content Rows":{components:[ci,Gn,Zo],examples:Zp},"Content Sections":{components:[Di],examples:Ru},"Date Pickers":{components:[di],examples:ou},"Date Range Pickers":{components:[ui],examples:iu},"Date Time Range Pickers":{components:[mi],examples:mu},Datetime:{components:[wi],examples:Cu},"Time Input":{components:[Xi],examples:Om},"Description Lists":{description:()=>o.createElement("p",null,"Description Lists display a series of terms with accompanying descriptions such as a glossary of terms."),components:[ta,na,oa],examples:Lu},Dropdown:{components:[zn,Ci],examples:Ou},"Filter Panel":{components:[Ui,zi,ji,qi],examples:xm},Form:{components:[ro],examples:qp},Incrementor:{components:[Ni],examples:Bu},Label:{description:()=>o.createElement("p",null,"Labels provide a description for the value to be entered or selected in an accompanying input field."),components:[ki],examples:Pu},"List Action Bar":{description:()=>o.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:[xi],examples:em},"Micro Block":{components:[Ii],examples:tm},Modals:{description:()=>o.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:[Mi,sa],examples:rm},"Multi Select":{description:()=>o.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:[Li],examples:om},"Multi Value Text Input":{description:()=>o.createElement("p",null,"To be determined."),components:[Zi],examples:_m},Pagination:{description:()=>o.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:[Oi,ia],examples:am},"Radio Buttons":{description:"Radio Buttons allow a user to make single selection from a list of predefined options.",components:[Ri],examples:sm},Selects:{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:lu},"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:[lm],examples:cm},"Split Button":{components:[Bi],examples:dm},"Summary List Row":{components:[Pi,Ai,ao],examples:pm},Tables:{description:({NavigateTo:e})=>o.createElement(o.Fragment,null,o.createElement("div",{className:"sps-body-14"},"Tables (along with ",o.createElement(e,{to:"content-rows"},"Content Rows")," and"," ",o.createElement(e,{to:"content-tiles"},"Content Tiles"),") are one of three options for displaying a list of records on a page."),o.createElement("br",null),o.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:[jn,Dn,ue,Cn,it,Ye],examples:Qu},"Task Queue":{components:[Fi],examples:um},"Text Inputs":{description:()=>o.createElement("p",null,"Text Inputs consist of a Label and a field in which a user enters a short value."),components:[ca],examples:mm},"Text Areas":{description:()=>o.createElement("p",null,"Text Areas consist of a Label and a field in which a user enters a long value."),components:[Vi],examples:fm},Toggles:{description:()=>o.createElement("p",null,"Toggles allow a user to immediately turn a setting on or off."),components:[$i],examples:Sm},Tooltips:{components:[Bt,Ki],examples:gm},Wizard:{components:[Wi,Gi],examples:ym},Workflow:{components:[da,pa,ua,ma],examples:km,notices:[tC]},"Slide In Panels":{description:"",components:[_i],examples:nm}},Rm=new WeakMap;function fa(e,t,n){return e?(typeof t=="string"&&(t=t.replace(/\s+/g,"")),`${Rm.get(e)}-${n}-${t}`):""}const so=typeof document<"u"?x.useLayoutEffect:()=>{};function yr(e){const t=x.useRef(null);return so(()=>{t.current=e},[e]),x.useCallback((...n)=>{const r=t.current;return r==null?void 0:r(...n)},[])}const ha={prefix:String(Math.round(Math.random()*1e10)),current:0},Bm=x.createContext(ha),dC=x.createContext(!1);let pC=!!(typeof window<"u"&&window.document&&window.document.createElement),Qi=new WeakMap;function uC(e=!1){let t=x.useContext(Bm),n=x.useRef(null);if(n.current===null&&!e){var r,a;let s=(a=x.__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(s){let l=Qi.get(s);l==null?Qi.set(s,{id:t.current,state:s.memoizedState}):s.memoizedState!==l.state&&(t.current=l.id,Qi.delete(s))}n.current=++t.current}return n.current}function mC(e){let t=x.useContext(Bm);t===ha&&!pC&&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=uC(!!e),r=t===ha&&process.env.NODE_ENV==="test"?"react-aria":`react-aria${t.prefix}`;return e||`${r}-${n}`}function fC(e){let t=x.useId(),[n]=x.useState(Pm()),r=n||process.env.NODE_ENV==="test"?"react-aria":`react-aria${ha.prefix}`;return e||`${r}-${t}`}const hC=typeof x.useId=="function"?fC:mC;function SC(){return!1}function gC(){return!0}function bC(e){return()=>{}}function Pm(){return typeof x.useSyncExternalStore=="function"?x.useSyncExternalStore(bC,SC,gC):x.useContext(dC)}let vC=!!(typeof window<"u"&&window.document&&window.document.createElement),Nn=new Map;function Am(e){let[t,n]=x.useState(e),r=x.useRef(null),a=hC(t),s=x.useCallback(l=>{r.current=l},[]);return vC&&(Nn.has(a)&&!Nn.get(a).includes(s)?Nn.set(a,[...Nn.get(a),s]):Nn.set(a,[s])),so(()=>{let l=a;return()=>{Nn.delete(l)}},[a]),x.useEffect(()=>{let l=r.current;l&&(r.current=null,n(l))}),a}function yC(e,t){if(e===t)return e;let n=Nn.get(e);if(n)return n.forEach(a=>a(t)),t;let r=Nn.get(t);return r?(r.forEach(a=>a(e)),e):t}function Fm(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}const xt=e=>{var t;return(t=e==null?void 0:e.ownerDocument)!==null&&t!==void 0?t:document},qn=e=>e&&"window"in e&&e.window===e?e:xt(e).defaultView||window;function Vm(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=Vm(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function TC(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=Vm(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 a in r){let s=t[a],l=r[a];typeof s=="function"&&typeof l=="function"&&a[0]==="o"&&a[1]==="n"&&a.charCodeAt(2)>=65&&a.charCodeAt(2)<=90?t[a]=Fm(s,l):(a==="className"||a==="UNSAFE_className")&&typeof s=="string"&&typeof l=="string"?t[a]=TC(s,l):a==="id"&&s&&l?t.id=yC(s,l):t[a]=l!==void 0?l:s}}return t}const EC=new Set(["id"]),wC=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),CC=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),DC=/^(data-.*)$/;function NC(e,t={}){let{labelable:n,isLink:r,propNames:a}=t,s={};for(const l in e)Object.prototype.hasOwnProperty.call(e,l)&&(EC.has(l)||n&&wC.has(l)||r&&CC.has(l)||a!=null&&a.has(l)||DC.test(l))&&(s[l]=e[l]);return s}function rn(e){if(kC())e.focus({preventScroll:!0});else{let t=xC(e);e.focus(),IC(t)}}let Sa=null;function kC(){if(Sa==null){Sa=!1;try{document.createElement("div").focus({get preventScroll(){return Sa=!0,!0}})}catch{}}return Sa}function xC(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 IC(e){for(let{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}function ga(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 el(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 on(e){let t=null;return()=>(t==null&&(t=e()),t)}const Jn=on(function(){return el(/^Mac/i)}),MC=on(function(){return el(/^iPhone/i)}),$m=on(function(){return el(/^iPad/i)||Jn()&&navigator.maxTouchPoints>1}),tl=on(function(){return MC()||$m()}),_C=on(function(){return Jn()||tl()}),LC=on(function(){return ga(/AppleWebKit/i)&&!OC()}),OC=on(function(){return ga(/Chrome/i)}),Km=on(function(){return ga(/Android/i)}),RC=on(function(){return ga(/Firefox/i)}),BC=x.createContext({isNative:!0,open:AC,useHref:e=>e});function nl(){return x.useContext(BC)}function Zn(e,t,n=!0){var r,a;let{metaKey:s,ctrlKey:l,altKey:c,shiftKey:p}=t;RC()&&(!((a=window.event)===null||a===void 0||(r=a.type)===null||r===void 0)&&r.startsWith("key"))&&e.target==="_blank"&&(Jn()?s=!0:l=!0);let f=LC()&&Jn()&&!$m()?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:s,ctrlKey:l,altKey:c,shiftKey:p}):new MouseEvent("click",{metaKey:s,ctrlKey:l,altKey:c,shiftKey:p,bubbles:!0,cancelable:!0});Zn.isOpening=n,rn(e),e.dispatchEvent(f),Zn.isOpening=!1}Zn.isOpening=!1;function PC(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 AC(e,t){PC(e,n=>Zn(n,t))}function FC(e){let t=nl();var n;const r=t.useHref((n=e==null?void 0:e.href)!==null&&n!==void 0?n:"");return{href:e!=null&&e.href?r: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 Tr=new Map,rl=new Set;function Hm(){if(typeof window>"u")return;function e(r){return"propertyName"in r}let t=r=>{if(!e(r)||!r.target)return;let a=Tr.get(r.target);a||(a=new Set,Tr.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=Tr.get(r.target);if(a&&(a.delete(r.propertyName),a.size===0&&(r.target.removeEventListener("transitioncancel",n),Tr.delete(r.target)),Tr.size===0)){for(let s of rl)s();rl.clear()}};document.body.addEventListener("transitionrun",t),document.body.addEventListener("transitionend",n)}typeof document<"u"&&(document.readyState!=="loading"?Hm():document.addEventListener("DOMContentLoaded",Hm));function Wm(e){requestAnimationFrame(()=>{Tr.size===0?e():rl.add(e)})}function Gm(){let e=x.useRef(new Map),t=x.useCallback((a,s,l,c)=>{let p=c!=null&&c.once?(...f)=>{e.current.delete(l),l(...f)}:l;e.current.set(l,{type:s,eventTarget:a,fn:p,options:c}),a.addEventListener(s,l,c)},[]),n=x.useCallback((a,s,l,c)=>{var p;let f=((p=e.current.get(l))===null||p===void 0?void 0:p.fn)||l;a.removeEventListener(s,f,c),e.current.delete(l)},[]),r=x.useCallback(()=>{e.current.forEach((a,s)=>{n(a.eventTarget,a.type,s,a.options)})},[n]);return x.useEffect(()=>r,[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}function Ym(e,t){let{id:n,"aria-label":r,"aria-labelledby":a}=e;return n=Am(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 VC(e,t){so(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}function $C(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 KC(e,t){const n=[];for(;e&&e!==document.documentElement;)$C(e,t)&&n.push(e),e=e.parentElement;return n}let HC=0;const ol=new Map;function WC(e){let[t,n]=x.useState();return so(()=>{if(!e)return;let r=ol.get(e);if(r)n(r.element.id);else{let a=`react-aria-description-${HC++}`;n(a);let s=document.createElement("div");s.id=a,s.style.display="none",s.textContent=e,document.body.appendChild(s),r={refCount:0,element:s},ol.set(e,r)}return r.refCount++,()=>{r&&--r.refCount===0&&(r.element.remove(),ol.delete(e))}},[e]),{"aria-describedby":e?t:void 0}}function Um(e,t,n,r){let a=yr(n),s=n==null;x.useEffect(()=>{if(s||!e.current)return;let l=e.current;return l.addEventListener(t,a,r),()=>{l.removeEventListener(t,a,r)}},[e,t,r,s,a])}function zm(e,t){let n=jm(e,t,"left"),r=jm(e,t,"top"),a=t.offsetWidth,s=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,S=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+s>S&&(c+=r+s-S),e.scrollLeft=l,e.scrollTop=c}function jm(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 qm(e,t){if(document.contains(e)){let l=document.scrollingElement||document.documentElement;if(window.getComputedStyle(l).overflow==="hidden"){let p=KC(e);for(let f of p)zm(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,a,s;t==null||(a=t.containingElement)===null||a===void 0||(r=a.scrollIntoView)===null||r===void 0||r.call(a,{block:"center",inline:"center"}),(s=e.scrollIntoView)===null||s===void 0||s.call(e,{block:"nearest"})}}}}function al(e){return e.mozInputSource===0&&e.isTrusted?!0:Km()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function GC(e){return!Km()&&e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"}function Jm(e,t,n){let[r,a]=x.useState(e||t),s=x.useRef(e!==void 0),l=e!==void 0;x.useEffect(()=>{let f=s.current;f!==l&&console.warn(`WARN: A component changed from ${f?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}.`),s.current=l},[l]);let c=l?e:r,p=x.useCallback((f,...m)=>{let u=(h,...S)=>{n&&(Object.is(c,h)||n(h,...S)),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((S,...y)=>{let C=f(l?c:S,...y);return u(C,...m),l?S:C})):(l||a(f),u(f,...m))},[l,c,n]);return[c,p]}function sl(e){return _C()?e.altKey:e.ctrlKey}function Er(e){return Jn()?e.metaKey:e.ctrlKey}const YC=1e3;function UC(e){let{keyboardDelegate:t,selectionManager:n,onTypeSelect:r}=e,a=x.useRef({search:"",timeout:null}).current,s=l=>{let c=zC(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=""},YC)};return{typeSelectProps:{onKeyDownCapture:t.getKeyForSearch?s:null}}}function zC(e){return e.length===1||!/^[A-Z]/i.test(e)?e:""}let wr="default",il="",ba=new WeakMap;function Zm(e){if(tl()){if(wr==="default"){const t=xt(e);il=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none"}wr="disabled"}else(e instanceof HTMLElement||e instanceof SVGElement)&&(ba.set(e,e.style.userSelect),e.style.userSelect="none")}function va(e){if(tl()){if(wr!=="disabled")return;wr="restoring",setTimeout(()=>{Wm(()=>{if(wr==="restoring"){const t=xt(e);t.documentElement.style.webkitUserSelect==="none"&&(t.documentElement.style.webkitUserSelect=il||""),il="",wr="default"}})},300)}else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&ba.has(e)){let t=ba.get(e);e.style.userSelect==="none"&&(e.style.userSelect=t),e.getAttribute("style")===""&&e.removeAttribute("style"),ba.delete(e)}}const Xm=x.createContext({register:()=>{}});Xm.displayName="PressResponderContext";function jC(e,t){return t.get?t.get.call(e):t.value}function Qm(e,t,n){if(!t.has(e))throw new TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function qC(e,t){var n=Qm(e,t,"get");return jC(e,n)}function JC(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function ZC(e,t,n){JC(e,t),t.set(e,n)}function XC(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 ef(e,t,n){var r=Qm(e,t,"set");return XC(e,r,n),n}function QC(e){let t=x.useContext(Xm);if(t){let{register:n,...r}=t;e=kn(r,e),n()}return VC(t,e.ref),e}var ya=new WeakMap;class Ta{continuePropagation(){ef(this,ya,!1)}get shouldStopPropagation(){return qC(this,ya)}constructor(t,n,r,a){ZC(this,ya,{writable:!0,value:void 0}),ef(this,ya,!0);var s;let l=(s=a==null?void 0:a.target)!==null&&s!==void 0?s:r.currentTarget;const c=l==null?void 0:l.getBoundingClientRect();let p,f=0,m,u=null;r.clientX!=null&&r.clientY!=null&&(m=r.clientX,u=r.clientY),c&&(m!=null&&u!=null?(p=m-c.left,f=u-c.top):(p=c.width/2,f=c.height/2)),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,this.x=p,this.y=f}}const tf=Symbol("linkClicked");function nf(e){let{onPress:t,onPressChange:n,onPressStart:r,onPressEnd:a,onPressUp:s,isDisabled:l,isPressed:c,preventFocusOnPress:p,shouldCancelOnPointerExit:f,allowTextSelectionOnPress:m,ref:u,...h}=QC(e),[S,y]=x.useState(!1),C=x.useRef({isPressed:!1,ignoreEmulatedMouseEvents:!1,ignoreClickAfterPress:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null}),{addGlobalListener:T,removeAllGlobalListeners:w}=Gm(),D=yr((E,R)=>{let O=C.current;if(l||O.didFirePressStart)return!1;let P=!0;if(O.isTriggeringEvent=!0,r){let z=new Ta("pressstart",R,E);r(z),P=z.shouldStopPropagation}return n&&n(!0),O.isTriggeringEvent=!1,O.didFirePressStart=!0,y(!0),P}),M=yr((E,R,O=!0)=>{let P=C.current;if(!P.didFirePressStart)return!1;P.ignoreClickAfterPress=!0,P.didFirePressStart=!1,P.isTriggeringEvent=!0;let z=!0;if(a){let L=new Ta("pressend",R,E);a(L),z=L.shouldStopPropagation}if(n&&n(!1),y(!1),t&&O&&!l){let L=new Ta("press",R,E);t(L),z&&(z=L.shouldStopPropagation)}return P.isTriggeringEvent=!1,z}),I=yr((E,R)=>{let O=C.current;if(l)return!1;if(s){O.isTriggeringEvent=!0;let P=new Ta("pressup",R,E);return s(P),O.isTriggeringEvent=!1,P.shouldStopPropagation}return!0}),k=yr(E=>{let R=C.current;R.isPressed&&R.target&&(R.isOverTarget&&R.pointerType!=null&&M(an(R.target,E),R.pointerType,!1),R.isPressed=!1,R.isOverTarget=!1,R.activePointerId=null,R.pointerType=null,w(),m||va(R.target))}),A=yr(E=>{f&&k(E)}),G=x.useMemo(()=>{let E=C.current,R={onKeyDown(P){if(cl(P.nativeEvent,P.currentTarget)&&P.currentTarget.contains(P.target)){var z;af(P.target,P.key)&&P.preventDefault();let L=!0;if(!E.isPressed&&!P.repeat){E.target=P.currentTarget,E.isPressed=!0,L=D(P,"keyboard");let re=P.currentTarget,B=Z=>{cl(Z,re)&&!Z.repeat&&re.contains(Z.target)&&E.target&&I(an(E.target,Z),"keyboard")};T(xt(P.currentTarget),"keyup",Fm(B,O),!0)}L&&P.stopPropagation(),P.metaKey&&Jn()&&((z=E.metaKeyEvents)===null||z===void 0||z.set(P.key,P.nativeEvent))}else P.key==="Meta"&&(E.metaKeyEvents=new Map)},onClick(P){if(!(P&&!P.currentTarget.contains(P.target))&&P&&P.button===0&&!E.isTriggeringEvent&&!Zn.isOpening){let z=!0;if(l&&P.preventDefault(),!E.ignoreClickAfterPress&&!E.ignoreEmulatedMouseEvents&&!E.isPressed&&(E.pointerType==="virtual"||al(P.nativeEvent))){!l&&!p&&rn(P.currentTarget);let L=D(P,"virtual"),re=I(P,"virtual"),B=M(P,"virtual");z=L&&re&&B}E.ignoreEmulatedMouseEvents=!1,E.ignoreClickAfterPress=!1,z&&P.stopPropagation()}}},O=P=>{var z;if(E.isPressed&&E.target&&cl(P,E.target)){var L;af(P.target,P.key)&&P.preventDefault();let B=P.target;M(an(E.target,P),"keyboard",E.target.contains(B)),w(),P.key!=="Enter"&&ll(E.target)&&E.target.contains(B)&&!P[tf]&&(P[tf]=!0,Zn(E.target,P,!1)),E.isPressed=!1,(L=E.metaKeyEvents)===null||L===void 0||L.delete(P.key)}else if(P.key==="Meta"&&(!((z=E.metaKeyEvents)===null||z===void 0)&&z.size)){var re;let B=E.metaKeyEvents;E.metaKeyEvents=void 0;for(let Z of B.values())(re=E.target)===null||re===void 0||re.dispatchEvent(new KeyboardEvent("keyup",Z))}};if(typeof PointerEvent<"u"){R.onPointerDown=B=>{if(B.button!==0||!B.currentTarget.contains(B.target))return;if(GC(B.nativeEvent)){E.pointerType="virtual";return}dl(B.currentTarget)&&B.preventDefault(),E.pointerType=B.pointerType;let Z=!0;E.isPressed||(E.isPressed=!0,E.isOverTarget=!0,E.activePointerId=B.pointerId,E.target=B.currentTarget,!l&&!p&&rn(B.currentTarget),m||Zm(E.target),Z=D(B,E.pointerType),T(xt(B.currentTarget),"pointermove",P,!1),T(xt(B.currentTarget),"pointerup",z,!1),T(xt(B.currentTarget),"pointercancel",re,!1)),Z&&B.stopPropagation()},R.onMouseDown=B=>{B.currentTarget.contains(B.target)&&B.button===0&&(dl(B.currentTarget)&&B.preventDefault(),B.stopPropagation())},R.onPointerUp=B=>{!B.currentTarget.contains(B.target)||E.pointerType==="virtual"||B.button===0&&Cr(B,B.currentTarget)&&I(B,E.pointerType||B.pointerType)};let P=B=>{B.pointerId===E.activePointerId&&(E.target&&Cr(B,E.target)?!E.isOverTarget&&E.pointerType!=null&&(E.isOverTarget=!0,D(an(E.target,B),E.pointerType)):E.target&&E.isOverTarget&&E.pointerType!=null&&(E.isOverTarget=!1,M(an(E.target,B),E.pointerType,!1),A(B)))},z=B=>{B.pointerId===E.activePointerId&&E.isPressed&&B.button===0&&E.target&&(Cr(B,E.target)&&E.pointerType!=null?M(an(E.target,B),E.pointerType):E.isOverTarget&&E.pointerType!=null&&M(an(E.target,B),E.pointerType,!1),E.isPressed=!1,E.isOverTarget=!1,E.activePointerId=null,E.pointerType=null,w(),m||va(E.target),"ontouchend"in E.target&&B.pointerType!=="mouse"&&T(E.target,"touchend",L,{once:!0}))},L=B=>{of(B.target)&&B.preventDefault()},re=B=>{k(B)};R.onDragStart=B=>{B.currentTarget.contains(B.target)&&k(B)}}else{R.onMouseDown=L=>{if(L.button!==0||!L.currentTarget.contains(L.target))return;if(dl(L.currentTarget)&&L.preventDefault(),E.ignoreEmulatedMouseEvents){L.stopPropagation();return}E.isPressed=!0,E.isOverTarget=!0,E.target=L.currentTarget,E.pointerType=al(L.nativeEvent)?"virtual":"mouse",!l&&!p&&rn(L.currentTarget),D(L,E.pointerType)&&L.stopPropagation(),T(xt(L.currentTarget),"mouseup",P,!1)},R.onMouseEnter=L=>{if(!L.currentTarget.contains(L.target))return;let re=!0;E.isPressed&&!E.ignoreEmulatedMouseEvents&&E.pointerType!=null&&(E.isOverTarget=!0,re=D(L,E.pointerType)),re&&L.stopPropagation()},R.onMouseLeave=L=>{if(!L.currentTarget.contains(L.target))return;let re=!0;E.isPressed&&!E.ignoreEmulatedMouseEvents&&E.pointerType!=null&&(E.isOverTarget=!1,re=M(L,E.pointerType,!1),A(L)),re&&L.stopPropagation()},R.onMouseUp=L=>{L.currentTarget.contains(L.target)&&!E.ignoreEmulatedMouseEvents&&L.button===0&&I(L,E.pointerType||"mouse")};let P=L=>{if(L.button===0){if(E.isPressed=!1,w(),E.ignoreEmulatedMouseEvents){E.ignoreEmulatedMouseEvents=!1;return}E.target&&Cr(L,E.target)&&E.pointerType!=null?M(an(E.target,L),E.pointerType):E.target&&E.isOverTarget&&E.pointerType!=null&&M(an(E.target,L),E.pointerType,!1),E.isOverTarget=!1}};R.onTouchStart=L=>{if(!L.currentTarget.contains(L.target))return;let re=eD(L.nativeEvent);if(!re)return;E.activePointerId=re.identifier,E.ignoreEmulatedMouseEvents=!0,E.isOverTarget=!0,E.isPressed=!0,E.target=L.currentTarget,E.pointerType="touch",!l&&!p&&rn(L.currentTarget),m||Zm(E.target),D(xn(E.target,L),E.pointerType)&&L.stopPropagation(),T(qn(L.currentTarget),"scroll",z,!0)},R.onTouchMove=L=>{if(!L.currentTarget.contains(L.target))return;if(!E.isPressed){L.stopPropagation();return}let re=rf(L.nativeEvent,E.activePointerId),B=!0;re&&Cr(re,L.currentTarget)?!E.isOverTarget&&E.pointerType!=null&&(E.isOverTarget=!0,B=D(xn(E.target,L),E.pointerType)):E.isOverTarget&&E.pointerType!=null&&(E.isOverTarget=!1,B=M(xn(E.target,L),E.pointerType,!1),A(xn(E.target,L))),B&&L.stopPropagation()},R.onTouchEnd=L=>{if(!L.currentTarget.contains(L.target))return;if(!E.isPressed){L.stopPropagation();return}let re=rf(L.nativeEvent,E.activePointerId),B=!0;re&&Cr(re,L.currentTarget)&&E.pointerType!=null?(I(xn(E.target,L),E.pointerType),B=M(xn(E.target,L),E.pointerType)):E.isOverTarget&&E.pointerType!=null&&(B=M(xn(E.target,L),E.pointerType,!1)),B&&L.stopPropagation(),E.isPressed=!1,E.activePointerId=null,E.isOverTarget=!1,E.ignoreEmulatedMouseEvents=!0,E.target&&!m&&va(E.target),w()},R.onTouchCancel=L=>{L.currentTarget.contains(L.target)&&(L.stopPropagation(),E.isPressed&&k(xn(E.target,L)))};let z=L=>{E.isPressed&&L.target.contains(E.target)&&k({currentTarget:E.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})};R.onDragStart=L=>{L.currentTarget.contains(L.target)&&k(L)}}return R},[T,l,p,w,m,k,A,M,D,I]);return x.useEffect(()=>()=>{var E;m||va((E=C.current.target)!==null&&E!==void 0?E:void 0)},[m]),{isPressed:c||S,pressProps:kn(h,G)}}function ll(e){return e.tagName==="A"&&e.hasAttribute("href")}function cl(e,t){const{key:n,code:r}=e,a=t,s=a.getAttribute("role");return(n==="Enter"||n===" "||n==="Spacebar"||r==="Space")&&!(a instanceof qn(a).HTMLInputElement&&!sf(a,n)||a instanceof qn(a).HTMLTextAreaElement||a.isContentEditable)&&!((s==="link"||!s&&ll(a))&&n!=="Enter")}function eD(e){const{targetTouches:t}=e;return t.length>0?t[0]:null}function rf(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 xn(e,t){let n=0,r=0;return t.targetTouches&&t.targetTouches.length===1&&(n=t.targetTouches[0].clientX,r=t.targetTouches[0].clientY),{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey,clientX:n,clientY:r}}function an(e,t){let n=t.clientX,r=t.clientY;return{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey,clientX:n,clientY:r}}function tD(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 nD(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=tD(e);return nD(n,r)}function dl(e){return!(e instanceof HTMLElement)||!e.hasAttribute("draggable")}function of(e){return e instanceof HTMLInputElement?!1:e instanceof HTMLButtonElement?e.type!=="submit"&&e.type!=="reset":!ll(e)}function af(e,t){return e instanceof HTMLInputElement?!sf(e,t):of(e)}const rD=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function sf(e,t){return e.type==="checkbox"||e.type==="radio"?t===" ":rD.has(e.type)}let io=null,oD=new Set,lo=new Map,Xn=!1,pl=!1;function ul(e,t){for(let n of oD)n(e,t)}function aD(e){return!(e.metaKey||!Jn()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function Ea(e){Xn=!0,aD(e)&&(io="keyboard",ul("keyboard",e))}function Pt(e){io="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(Xn=!0,ul("pointer",e))}function lf(e){al(e)&&(Xn=!0,io="virtual")}function cf(e){e.target===window||e.target===document||(!Xn&&!pl&&(io="virtual",ul("virtual",e)),Xn=!1,pl=!1)}function df(){Xn=!1,pl=!0}function pf(e){if(typeof window>"u"||lo.get(qn(e)))return;const t=qn(e),n=xt(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){Xn=!0,r.apply(this,arguments)},n.addEventListener("keydown",Ea,!0),n.addEventListener("keyup",Ea,!0),n.addEventListener("click",lf,!0),t.addEventListener("focus",cf,!0),t.addEventListener("blur",df,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",Pt,!0),n.addEventListener("pointermove",Pt,!0),n.addEventListener("pointerup",Pt,!0)):(n.addEventListener("mousedown",Pt,!0),n.addEventListener("mousemove",Pt,!0),n.addEventListener("mouseup",Pt,!0)),t.addEventListener("beforeunload",()=>{uf(e)},{once:!0}),lo.set(t,{focus:r})}const uf=(e,t)=>{const n=qn(e),r=xt(e);t&&r.removeEventListener("DOMContentLoaded",t),lo.has(n)&&(n.HTMLElement.prototype.focus=lo.get(n).focus,r.removeEventListener("keydown",Ea,!0),r.removeEventListener("keyup",Ea,!0),r.removeEventListener("click",lf,!0),n.removeEventListener("focus",cf,!0),n.removeEventListener("blur",df,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",Pt,!0),r.removeEventListener("pointermove",Pt,!0),r.removeEventListener("pointerup",Pt,!0)):(r.removeEventListener("mousedown",Pt,!0),r.removeEventListener("mousemove",Pt,!0),r.removeEventListener("mouseup",Pt,!0)),lo.delete(n))};function sD(e){const t=xt(e);let n;return t.readyState!=="loading"?pf(e):(n=()=>{pf(e)},t.addEventListener("DOMContentLoaded",n)),()=>uf(e,n)}typeof document<"u"&&sD();function ml(){return io}const iD=500;function lD(e){let{isDisabled:t,onLongPressStart:n,onLongPressEnd:r,onLongPress:a,threshold:s=iD,accessibilityDescription:l}=e;const c=x.useRef(void 0);let{addGlobalListener:p,removeGlobalListener:f}=Gm(),{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},s),h.pointerType==="touch")){let S=y=>{y.preventDefault()};p(h.target,"contextmenu",S,{once:!0}),p(window,"pointerup",()=>{setTimeout(()=>{f(h.target,"contextmenu",S)},30)},{once:!0})}},onPressEnd(h){c.current&&clearTimeout(c.current),r&&(h.pointerType==="mouse"||h.pointerType==="touch")&&r({...h,type:"longpressend"})}}),u=WC(a&&!t?l:void 0);return{longPressProps:kn(m,u)}}function fl(e){const t=xt(e);if(ml()==="virtual"){let n=t.activeElement;Wm(()=>{t.activeElement===n&&e.isConnected&&rn(e)})}else rn(e)}function cD(e){const t=qn(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:s}=e.ownerDocument.defaultView;let{display:l,visibility:c}=s(e);a=l!=="none"&&c!=="hidden"&&c!=="collapse"}return a}function dD(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 mf(e,t){return e.nodeName!=="#comment"&&cD(e)&&dD(e,t)&&(!e.parentElement||mf(e.parentElement,e))}const hl=["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]"],pD=hl.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";hl.push('[tabindex]:not([tabindex="-1"]):not([disabled])');const uD=hl.join(':not([hidden]):not([tabindex="-1"]),');function ff(e,t){return!e||!t?!1:t.some(n=>n.contains(e))}function hf(e,t,n){let r=t!=null&&t.tabbable?uD:pD,a=xt(e).createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode(s){var l;return!(t==null||(l=t.from)===null||l===void 0)&&l.contains(s)?NodeFilter.FILTER_REJECT:s.matches(r)&&mf(s)&&(!n||ff(s,n))&&(!(t!=null&&t.accept)||t.accept(s))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return t!=null&&t.from&&(a.currentNode=t.from),a}class Sl{get size(){return this.fastMap.size}getTreeNode(t){return this.fastMap.get(t)}addTreeNode(t,n,r){let a=this.fastMap.get(n??null);if(!a)return;let s=new Sf({scopeRef:t});a.addChild(s),s.parent=a,this.fastMap.set(t,s),r&&(s.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 s of this.traverse())s!==n&&n.nodeToRestore&&s.nodeToRestore&&n.scopeRef&&n.scopeRef.current&&ff(s.nodeToRestore,n.scopeRef.current)&&(s.nodeToRestore=n.nodeToRestore);let a=n.children;r&&(r.removeChild(n),a.size>0&&a.forEach(s=>r&&r.addChild(s))),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 Sl;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 Sf({scopeRef:null}),this.fastMap.set(null,this.root)}}class Sf{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 Sl;function mD(e,t){let n=t==null?void 0:t.isDisabled,[r,a]=x.useState(!1);return so(()=>{if(e!=null&&e.current&&!n){let s=()=>{if(e.current){let c=hf(e.current,{tabbable:!0});a(!!c.nextNode())}};s();let l=new MutationObserver(s);return l.observe(e.current,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["tabIndex","disabled"]}),()=>{l.disconnect()}}}),n?!1:r}const fD=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),hD=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function SD(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 fD.has(n.script)}let t=e.split("-")[0];return hD.has(t)}const gD=Symbol.for("react-aria.i18n.locale");function gf(){let e=typeof window<"u"&&window[gD]||typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:SD(e)?"rtl":"ltr"}}let gl=gf(),co=new Set;function bf(){gl=gf();for(let e of co)e(gl)}function bD(){let e=Pm(),[t,n]=x.useState(gl);return x.useEffect(()=>(co.size===0&&window.addEventListener("languagechange",bf),co.add(n),()=>{co.delete(n),co.size===0&&window.removeEventListener("languagechange",bf)}),[]),e?{locale:"en-US",direction:"ltr"}:t}const vD=x.createContext(null);function vf(){let e=bD();return x.useContext(vD)||e}function yD(e){let{selectionManager:t,keyboardDelegate:n,ref:r,autoFocus:a=!1,shouldFocusWrap:s=!1,disallowEmptySelection:l=!1,disallowSelectAll:c=!1,selectOnFocus:p=t.selectionBehavior==="replace",disallowTypeAhead:f=!1,shouldUseVirtualFocus:m,allowsTabNavigation:u=!1,isVirtualized:h,scrollRef:S=r,linkBehavior:y="action"}=e,{direction:C}=vf(),T=nl(),w=O=>{if(O.altKey&&O.key==="Tab"&&O.preventDefault(),!r.current.contains(O.target))return;const P=(J,V)=>{if(J!=null){if(t.isLink(J)&&y==="selection"&&p&&!sl(O)){vo.flushSync(()=>{t.setFocusedKey(J,V)});let W=S.current.querySelector(`[data-key="${CSS.escape(J.toString())}"]`),X=t.getItemProps(J);T.open(W,O,X.href,X.routerOptions);return}if(t.setFocusedKey(J,V),t.isLink(J)&&y==="override")return;O.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(J):p&&!sl(O)&&t.replaceSelection(J)}};switch(O.key){case"ArrowDown":if(n.getKeyBelow){var z,L,re;let J=t.focusedKey!=null?(z=n.getKeyBelow)===null||z===void 0?void 0:z.call(n,t.focusedKey):(L=n.getFirstKey)===null||L===void 0?void 0:L.call(n);J==null&&s&&(J=(re=n.getFirstKey)===null||re===void 0?void 0:re.call(n,t.focusedKey)),J!=null&&(O.preventDefault(),P(J))}break;case"ArrowUp":if(n.getKeyAbove){var B,Z,H;let J=t.focusedKey!=null?(B=n.getKeyAbove)===null||B===void 0?void 0:B.call(n,t.focusedKey):(Z=n.getLastKey)===null||Z===void 0?void 0:Z.call(n);J==null&&s&&(J=(H=n.getLastKey)===null||H===void 0?void 0:H.call(n,t.focusedKey)),J!=null&&(O.preventDefault(),P(J))}break;case"ArrowLeft":if(n.getKeyLeftOf){var q,ae,$;let J=(q=n.getKeyLeftOf)===null||q===void 0?void 0:q.call(n,t.focusedKey);J==null&&s&&(J=C==="rtl"?(ae=n.getFirstKey)===null||ae===void 0?void 0:ae.call(n,t.focusedKey):($=n.getLastKey)===null||$===void 0?void 0:$.call(n,t.focusedKey)),J!=null&&(O.preventDefault(),P(J,C==="rtl"?"first":"last"))}break;case"ArrowRight":if(n.getKeyRightOf){var j,oe,ie;let J=(j=n.getKeyRightOf)===null||j===void 0?void 0:j.call(n,t.focusedKey);J==null&&s&&(J=C==="rtl"?(oe=n.getLastKey)===null||oe===void 0?void 0:oe.call(n,t.focusedKey):(ie=n.getFirstKey)===null||ie===void 0?void 0:ie.call(n,t.focusedKey)),J!=null&&(O.preventDefault(),P(J,C==="rtl"?"last":"first"))}break;case"Home":if(n.getFirstKey){O.preventDefault();let J=n.getFirstKey(t.focusedKey,Er(O));t.setFocusedKey(J),Er(O)&&O.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(J):p&&t.replaceSelection(J)}break;case"End":if(n.getLastKey){O.preventDefault();let J=n.getLastKey(t.focusedKey,Er(O));t.setFocusedKey(J),Er(O)&&O.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(J):p&&t.replaceSelection(J)}break;case"PageDown":if(n.getKeyPageBelow){let J=n.getKeyPageBelow(t.focusedKey);J!=null&&(O.preventDefault(),P(J))}break;case"PageUp":if(n.getKeyPageAbove){let J=n.getKeyPageAbove(t.focusedKey);J!=null&&(O.preventDefault(),P(J))}break;case"a":Er(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 J=hf(r.current,{tabbable:!0}),V,W;do W=J.lastChild(),W&&(V=W);while(W);V&&!V.contains(document.activeElement)&&rn(V)}break}}},D=x.useRef({top:0,left:0});Um(S,"scroll",h?null:()=>{D.current={top:S.current.scrollTop,left:S.current.scrollLeft}});let M=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 L=B=>{B!=null&&(t.setFocusedKey(B),p&&t.replaceSelection(B))},re=O.relatedTarget;var P,z;re&&O.currentTarget.compareDocumentPosition(re)&Node.DOCUMENT_POSITION_FOLLOWING?L((P=t.lastSelectedKey)!==null&&P!==void 0?P:n.getLastKey()):L((z=t.firstSelectedKey)!==null&&z!==void 0?z:n.getFirstKey())}else h||(S.current.scrollTop=D.current.top,S.current.scrollLeft=D.current.left);if(t.focusedKey!=null){let L=S.current.querySelector(`[data-key="${CSS.escape(t.focusedKey.toString())}"]`);L&&(L.contains(document.activeElement)||rn(L),ml()==="keyboard"&&qm(L,{containingElement:r.current}))}}},I=O=>{O.currentTarget.contains(O.relatedTarget)||t.setFocused(!1)};const k=x.useRef(a);x.useEffect(()=>{if(k.current){let O=null;a==="first"&&(O=n.getFirstKey()),a==="last"&&(O=n.getLastKey());let P=t.selectedKeys;if(P.size){for(let z of P)if(t.canSelectItem(z)){O=z;break}}t.setFocused(!0),t.setFocusedKey(O),O==null&&!m&&fl(r.current)}},[]);let A=x.useRef(t.focusedKey);x.useEffect(()=>{if(t.isFocused&&t.focusedKey!=null&&(t.focusedKey!==A.current||k.current)&&(S!=null&&S.current)){let O=ml(),P=r.current.querySelector(`[data-key="${CSS.escape(t.focusedKey.toString())}"]`);if(!P)return;(O==="keyboard"||k.current)&&(zm(S.current,P),O!=="virtual"&&qm(P,{containingElement:r.current}))}!m&&t.isFocused&&t.focusedKey==null&&A.current!=null&&fl(r.current),A.current=t.focusedKey,k.current=!1}),Um(r,"react-aria-focus-scope-restore",O=>{O.preventDefault(),t.setFocused(!0)});let G={onKeyDown:w,onFocus:M,onBlur:I,onMouseDown(O){S.current===O.target&&O.preventDefault()}},{typeSelectProps:E}=UC({keyboardDelegate:n,selectionManager:t});f||(G=kn(E,G));let R;return m||(R=t.focusedKey==null?0:-1),{collectionProps:{...G,tabIndex:R}}}function TD(e){let{selectionManager:t,key:n,ref:r,shouldSelectOnPressUp:a,shouldUseVirtualFocus:s,focus:l,isDisabled:c,onAction:p,allowsDifferentPressOrigin:f,linkBehavior:m="action"}=e,u=nl(),h=H=>{if(H.pointerType==="keyboard"&&sl(H))t.toggleSelection(n);else{if(t.selectionMode==="none")return;if(t.isLink(n)){if(m==="selection"){let q=t.getItemProps(n);u.open(r.current,H,q.href,q.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):H&&H.shiftKey?t.extendSelection(n):t.selectionBehavior==="toggle"||H&&(Er(H)||H.pointerType==="touch"||H.pointerType==="virtual")?t.toggleSelection(n):t.replaceSelection(n)}};x.useEffect(()=>{n===t.focusedKey&&t.isFocused&&!s&&(l?l():document.activeElement!==r.current&&fl(r.current))},[r,n,t.focusedKey,t.childFocusStrategy,t.isFocused,s]),c=c||t.isDisabled(n);let S={};!s&&!c?S={tabIndex:n===t.focusedKey?0:-1,onFocus(H){H.target===r.current&&t.setFocusedKey(n)}}:c&&(S.onMouseDown=H=>{H.preventDefault()});let y=t.isLink(n)&&m==="override",C=t.isLink(n)&&m!=="selection"&&m!=="none",T=!c&&t.canSelectItem(n)&&!y,w=(p||C)&&!c,D=w&&(t.selectionBehavior==="replace"?!T:!T||t.isEmpty),M=w&&T&&t.selectionBehavior==="replace",I=D||M,k=x.useRef(null),A=I&&T,G=x.useRef(!1),E=x.useRef(!1),R=H=>{if(p&&p(),C){let q=t.getItemProps(n);u.open(r.current,H,q.href,q.routerOptions)}},O={};a?(O.onPressStart=H=>{k.current=H.pointerType,G.current=A,H.pointerType==="keyboard"&&(!I||Tf())&&h(H)},f?(O.onPressUp=D?null:H=>{H.pointerType!=="keyboard"&&T&&h(H)},O.onPress=D?R:null):O.onPress=H=>{if(D||M&&H.pointerType!=="mouse"){if(H.pointerType==="keyboard"&&!yf())return;R(H)}else H.pointerType!=="keyboard"&&T&&h(H)}):(O.onPressStart=H=>{k.current=H.pointerType,G.current=A,E.current=D,T&&(H.pointerType==="mouse"&&!D||H.pointerType==="keyboard"&&(!w||Tf()))&&h(H)},O.onPress=H=>{(H.pointerType==="touch"||H.pointerType==="pen"||H.pointerType==="virtual"||H.pointerType==="keyboard"&&I&&yf()||H.pointerType==="mouse"&&E.current)&&(I?R(H):T&&h(H))}),S["data-key"]=n,O.preventFocusOnPress=s;let{pressProps:P,isPressed:z}=nf(O),L=M?H=>{k.current==="mouse"&&(H.stopPropagation(),H.preventDefault(),R(H))}:void 0,{longPressProps:re}=lD({isDisabled:!A,onLongPress(H){H.pointerType==="touch"&&(h(H),t.setSelectionBehavior("toggle"))}}),B=H=>{k.current==="touch"&&G.current&&H.preventDefault()},Z=t.isLink(n)?H=>{Zn.isOpening||H.preventDefault()}:void 0;return{itemProps:kn(S,T||D?P:{},A?re:{},{onDoubleClick:L,onDragStartCapture:B,onClick:Z}),isPressed:z,isSelected:t.isSelected(n),isFocused:t.isFocused&&t.focusedKey===n,isDisabled:c,allowsSelection:T,hasAction:I}}function yf(){let e=window.event;return(e==null?void 0:e.key)==="Enter"}function Tf(){let e=window.event;return(e==null?void 0:e.key)===" "||(e==null?void 0:e.code)==="Space"}function ED(e,t,n){let{key:r,isDisabled:a,shouldSelectOnPressUp:s}=e,{selectionManager:l,selectedKey:c}=t,p=r===c,f=a||t.isDisabled||t.selectionManager.isDisabled(r),{itemProps:m,isPressed:u}=TD({selectionManager:l,key:r,ref:n,isDisabled:f,shouldSelectOnPressUp:s,linkBehavior:"selection"}),h=fa(t,r,"tab"),S=fa(t,r,"tabpanel"),{tabIndex:y}=m,C=t.collection.getItem(r),T=NC(C==null?void 0:C.props,{labelable:!0});delete T.id;let w=FC(C==null?void 0:C.props);return{tabProps:kn(T,w,m,{id:h,"aria-selected":p,"aria-disabled":f||void 0,"aria-controls":p?S:void 0,tabIndex:f?void 0:y,role:"tab"}),isSelected:p,isDisabled:f,isPressed:u}}function wD(e,t,n){let r=mD(n)?void 0:0;var a;const s=fa(t,(a=e.id)!==null&&a!==void 0?a:t==null?void 0:t.selectedKey,"tabpanel"),l=Ym({...e,id:s,"aria-labelledby":fa(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 CD{getKeyLeftOf(t){return this.flipDirection?this.getNextKey(t):this.getPreviousKey(t)}getKeyRightOf(t){return this.flipDirection?this.getPreviousKey(t):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}getKeyAbove(t){return this.tabDirection?null:this.getPreviousKey(t)}getKeyBelow(t){return this.tabDirection?null:this.getNextKey(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,a=new Set){this.collection=t,this.flipDirection=n==="rtl"&&r==="horizontal",this.disabledKeys=a,this.tabDirection=r==="horizontal"}}function DD(e,t,n){let{orientation:r="horizontal",keyboardActivation:a="automatic"}=e,{collection:s,selectionManager:l,disabledKeys:c}=t,{direction:p}=vf(),f=x.useMemo(()=>new CD(s,p,r,c),[s,c,r,p]),{collectionProps:m}=yD({ref:n,selectionManager:l,keyboardDelegate:f,selectOnFocus:a==="automatic",disallowEmptySelection:!0,scrollRef:n,linkBehavior:"selection"}),u=Am();Rm.set(t,u);let h=Ym({...e,id:u});return{tabListProps:{...kn(m,h),role:"tablist","aria-orientation":r,tabIndex:void 0}}}function Ef({item:e,state:t}){const{key:n}=e,r=o.useRef(null),{tabProps:a}=ED({key:n},t,r),s=t.selectedKey===n,l=t.disabledKeys.has(n);return o.createElement("div",{...a,ref:r,className:U("sps-nav__item","sps-nav__link",s&&"active",l&&"sps-nav__item--disabled")},e.rendered)}function wf({state:e,...t}){const n=o.useRef(null),{tabPanelProps:r}=wD(t,e,n);return o.createElement("div",{...r,ref:n,className:"sps-card__body"},e.selectedItem?e.selectedItem.props.children:null)}class Cf{*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(t){let n=this.keyMap.get(t);var r;return n&&(r=n.prevKey)!==null&&r!==void 0?r:null}getKeyAfter(t){let n=this.keyMap.get(t);var r;return n&&(r=n.nextKey)!==null&&r!==void 0?r:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(t){var n;return(n=this.keyMap.get(t))!==null&&n!==void 0?n:null}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.firstKey=null,this.lastKey=null,this.iterable=t;let n=l=>{if(this.keyMap.set(l.key,l),l.childNodes&&l.type==="section")for(let c of l.childNodes)n(c)};for(let l of t)n(l);let r=null,a=0;for(let[l,c]of this.keyMap)r?(r.nextKey=l,c.prevKey=r.key):(this.firstKey=l,c.prevKey=void 0),c.type==="item"&&(c.index=a++),r=c,r.nextKey=void 0;var s;this.lastKey=(s=r==null?void 0:r.key)!==null&&s!==void 0?s:null}}class Yt extends Set{constructor(t,n,r){super(t),t instanceof Yt?(this.anchorKey=n??t.anchorKey,this.currentKey=r??t.currentKey):(this.anchorKey=n,this.currentKey=r)}}function ND(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function kD(e){let{selectionMode:t="none",disallowEmptySelection:n,allowDuplicateSelectionEvents:r,selectionBehavior:a="toggle",disabledBehavior:s="all"}=e,l=x.useRef(!1),[,c]=x.useState(!1),p=x.useRef(null),f=x.useRef(null),[,m]=x.useState(null),u=x.useMemo(()=>Df(e.selectedKeys),[e.selectedKeys]),h=x.useMemo(()=>Df(e.defaultSelectedKeys,new Yt),[e.defaultSelectedKeys]),[S,y]=Jm(u,h,e.onSelectionChange),C=x.useMemo(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),[T,w]=x.useState(a);a==="replace"&&T==="toggle"&&typeof S=="object"&&S.size===0&&w("replace");let D=x.useRef(a);return x.useEffect(()=>{a!==D.current&&(w(a),D.current=a)},[a]),{selectionMode:t,disallowEmptySelection:n,selectionBehavior:T,setSelectionBehavior:w,get isFocused(){return l.current},setFocused(M){l.current=M,c(M)},get focusedKey(){return p.current},get childFocusStrategy(){return f.current},setFocusedKey(M,I="first"){p.current=M,f.current=I,m(M)},selectedKeys:S,setSelectedKeys(M){(r||!ND(M,S))&&y(M)},disabledKeys:C,disabledBehavior:s}}function Df(e,t){return e?e==="all"?"all":new Yt(e):t}class xD{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&&or.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&&or.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 Yt([t],t,t);else{let s=this.state.selectedKeys;var r;let l=(r=s.anchorKey)!==null&&r!==void 0?r:t;n=new Yt(s,l,t);var a;for(let c of this.getKeyRange(l,(a=s.currentKey)!==null&&a!==void 0?a:t))n.delete(c);for(let c of this.getKeyRange(t,l))this.canSelectItem(c)&&n.add(c)}this.state.setSelectedKeys(n)}getKeyRange(t,n){let r=this.collection.getItem(t),a=this.collection.getItem(n);return r&&a?or.compareNodeOrder(this.collection,r,a)<=0?this.getKeyRangeInternal(t,n):this.getKeyRangeInternal(n,t):[]}getKeyRangeInternal(t,n){var r;if(!((r=this.layoutDelegate)===null||r===void 0)&&r.getKeyRange)return this.layoutDelegate.getKeyRange(t,n);let a=[],s=t;for(;s!=null;){let l=this.collection.getItem(s);if((l&&l.type==="item"||l.type==="cell"&&this.allowsCellSelection)&&a.push(s),s===n)return a;s=this.collection.getKeyAfter(s)}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 Yt(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 Yt([t],t,t):new Yt;this.state.setSelectedKeys(n)}setSelectedKeys(t){if(this.selectionMode==="none")return;let n=new Yt;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!=null;){if(this.canSelectItem(r)){let a=this.collection.getItem(r);a.type==="item"&&t.push(r),a.hasChildNodes&&(this.allowsCellSelection||a.type!=="item")&&n(or.getFirstItem(or.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 Yt)}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 a;this.allowsCellSelection=(a=r==null?void 0:r.allowsCellSelection)!==null&&a!==void 0?a:!1,this._isSelectAll=null,this.layoutDelegate=(r==null?void 0:r.layoutDelegate)||null}}function ID(e){let{filter:t,layoutDelegate:n}=e,r=kD(e),a=x.useMemo(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),s=x.useCallback(m=>t?new Cf(t(m)):new Cf(m),[t]),l=x.useMemo(()=>({suppressTextValueWarning:e.suppressTextValueWarning}),[e.suppressTextValueWarning]),c=or.useCollection(e,s,l),p=x.useMemo(()=>new xD(c,r,{layoutDelegate:n}),[c,r,n]);const f=x.useRef(null);return x.useEffect(()=>{if(r.focusedKey!=null&&!c.getItem(r.focusedKey)&&f.current){const w=f.current.getItem(r.focusedKey),D=[...f.current.getKeys()].map(E=>{const R=f.current.getItem(E);return(R==null?void 0:R.type)==="item"?R:null}).filter(E=>E!==null),M=[...c.getKeys()].map(E=>{const R=c.getItem(E);return(R==null?void 0:R.type)==="item"?R:null}).filter(E=>E!==null);var m,u;const I=((m=D==null?void 0:D.length)!==null&&m!==void 0?m:0)-((u=M==null?void 0:M.length)!==null&&u!==void 0?u:0);var h,S,y;let k=Math.min(I>1?Math.max(((h=w==null?void 0:w.index)!==null&&h!==void 0?h:0)-I+1,0):(S=w==null?void 0:w.index)!==null&&S!==void 0?S:0,((y=M==null?void 0:M.length)!==null&&y!==void 0?y:0)-1),A=null,G=!1;for(;k>=0;){if(!p.isDisabled(M[k].key)){A=M[k];break}if(k<M.length-1&&!G)k++;else{G=!0;var C,T;k>((C=w==null?void 0:w.index)!==null&&C!==void 0?C:0)&&(k=(T=w==null?void 0:w.index)!==null&&T!==void 0?T:0),k--}}r.setFocusedKey(A?A.key:null)}f.current=c},[c,p,r,r.focusedKey]),{collection:c,disabledKeys:a,selectionManager:p}}function MD(e){var t;let[n,r]=Jm(e.selectedKey,(t=e.defaultSelectedKey)!==null&&t!==void 0?t:null,e.onSelectionChange),a=x.useMemo(()=>n!=null?[n]:[],[n]),{collection:s,disabledKeys:l,selectionManager:c}=ID({...e,selectionMode:"single",disallowEmptySelection:!0,allowDuplicateSelectionEvents:!0,selectedKeys:a,onSelectionChange:f=>{if(f==="all")return;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?s.getItem(n):null;return{collection:s,disabledKeys:l,selectionManager:c,selectedKey:n,setSelectedKey:r,selectedItem:p}}function _D(e){var t;let n=MD({...e,suppressTextValueWarning:!0,defaultSelectedKey:(t=e.defaultSelectedKey)!==null&&t!==void 0?t:Nf(e.collection,e.disabledKeys?new Set(e.disabledKeys):new Set)}),{selectionManager:r,collection:a,selectedKey:s}=n,l=x.useRef(s);return x.useEffect(()=>{let c=s;(r.isEmpty||!a.getItem(c))&&(c=Nf(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 Nf(e,t){let n=null;if(e){var r,a,s,l;for(n=e.getFirstKey();(t.has(n)||!((a=e.getItem(n))===null||a===void 0||(r=a.props)===null||r===void 0)&&r.isDisabled)&&n!==e.getLastKey();)n=e.getKeyAfter(n);(t.has(n)||!((l=e.getItem(n))===null||l===void 0||(s=l.props)===null||s===void 0)&&s.isDisabled)&&n===e.getLastKey()&&(n=e.getFirstKey())}return n}const LD={},OD={};function bl(e){const t=_D(e),n=o.useRef(null),{tabListProps:r}=DD(e,t,n);return o.createElement(o.Fragment,null,o.createElement("div",{...r,ref:n,className:"sps-nav sps-nav--tabs sps-tabs-v2"},[...t.collection].map(a=>o.createElement(Ef,{key:a.key,item:a,state:t}))),o.createElement(wf,{key:t.selectedItem?t.selectedItem.key:null,state:t}))}Object.assign(bl,{props:LD,propTypes:OD,displayName:"SpsTabsV2"});const RD={};function vl({children:e,className:t,...n}){return o.createElement("div",{className:U("sps-card__footer",t),...n},e)}Object.assign(vl,{props:RD,displayName:"SpsCardV2Footer"});const BD={};function yl({children:e,className:t,...n}){return o.createElement("div",{className:U("sps-card__header",t),...n},e)}Object.assign(yl,{props:BD,displayName:"SpsCardV2Header"});const PD={};function kf({children:e,className:t,...n}){const[r,a,s,l,c]=_t(e,[{type:yl},{type:bl},{type:Gh.Tabs},{type:vl}]),p=a.length>0?a:s;return o.createElement("div",{className:U("sps-card",t),...n},r,p.length>0?p:o.createElement("div",{className:"sps-card__body"},c),l)}Object.assign(kf,{props:PD,displayName:"SpsCardV2"});const AD={};function xf({children:e,className:t,...n}){return o.createElement("div",{className:U("sps-card__title",t),...n},e)}Object.assign(xf,{props:AD,displayName:"SpsCardV2Title"});const FD={...jp,controlsDisabled:"boolean",footerLinks:"ReactNodeOrRenderFn",formMeta:"SpsFormSetMeta<any>",isOpen:"boolean",onClear:"() => void",onSubmit:"React.FormEventHandler"};function If(e){const{children:t,className:n,controlsDisabled:r,footerLinks:a,formArray:s,formGroup:l,formMeta:c,isOpen:p,onClear:f,onSubmit:m,unsafelyReplaceClassName:u,...h}=e,{t:S}=Be.useWoodlandLanguage();function y(){f&&f()}const C=U(u||"sps-advanced-search",p&&"sps-advanced-search--open",n);return o.createElement("div",{className:C,...h},o.createElement(ro,{onSubmit:m,formArray:s,formGroup:l,formMeta:c},o.createElement("div",{className:"sps-advanced-search__form"},t),o.createElement("div",{className:"sps-advanced-search__footer"},a&&o.createElement("div",{id:"footer_links"},Tt(a)),o.createElement("div",{className:"sps-advanced-search__footer-controls"},o.createElement(je,{kind:Y.ButtonKind.DEFAULT,type:Y.ButtonType.BUTTON,className:"mr-2",onClick:y,disabled:r},S("advancedSearch.clear")),o.createElement(je,{kind:Y.ButtonKind.KEY,type:Y.ButtonType.SUBMIT,disabled:r},S("advancedSearch.search"))))))}Object.assign(If,{props:FD,displayName:"SpsAdvancedSearch"});const VD={general:{label:"General Usage",description:({NavigateTo:e,Link:t})=>o.createElement(o.Fragment,null,o.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).'),o.createElement("p",null,"Advanced Search works in conjunction with the"," ",o.createElement(e,{to:"list-toolbar"},"List Bar")," and"," ",o.createElement(e,{to:"search-results-bar"},"Search Results")," components. Refer to those pages for additional details."),o.createElement("p",null,"Use the following guidelines when including Advanced Search on your page:",o.createElement("ul",null,o.createElement("li",null,"The Advanced Search Panel can contain any number of input fields."),o.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"," ",o.createElement(t,{to:"/style-and-layout/grid/"},"SPS Grid")," and guidelines for"," ",o.createElement(e,{to:"form"},"Form Layouts"),"."))))},basic:{label:"Basic Usage",description:({NavigateTo:e})=>o.createElement(o.Fragment,null,o.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 ",o.createElement(e,{to:"list-toolbar"},"List Bar")," page.")),examples:{basic:{react:v.code`
|
|
9141
9141
|
import {
|
|
9142
9142
|
SpsListToolbar,
|
|
9143
9143
|
SpsListToolbarSearch,
|
|
@@ -9368,7 +9368,7 @@ ${t.join("").replace("]","\\]").replace(" ","\\s")}]+`);return e.split(n).filter
|
|
|
9368
9368
|
</SpsAdvancedSearch>
|
|
9369
9369
|
</>;
|
|
9370
9370
|
}
|
|
9371
|
-
`}}}},$D=function({viewing:e,in:t,onChange:n}){return o.createElement("div",{className:"sps-context-bar"},"Viewing",o.createElement("span",{className:"sps-context-bar__emphasized"},e),!!t&&o.createElement(o.Fragment,null,"in",o.createElement("span",{className:"sps-context-bar__emphasized"},t)),!!n&&o.createElement(je,{className:"sps-context-bar__change-button",kind:Y.ButtonKind.LINK,onClick:n},"Change"))},KD={disabled:"boolean",formMeta:"SpsFormFieldMeta<number>",name:"string",onChange:"ChangeEventHandler<number>",value:"number"};function HD(e){return e?Number.parseInt(e.replace(/[^\d]/g,""),10)/100:null}function WD(e){return typeof e=="number"?e.toFixed(2):""}function Mf({className:e,disabled:t=!1,formMeta:n,id:r,name:a,onChange:s,ref:l,title:c,value:p,...f}){const{wrapperId:m,controlId:u}=St(r,n),h=o.useRef(null);function S(D){n&&(n.setValue(D),n.markAsDirty()),s&&s(D)}function y(){S(null)}function
|
|
9371
|
+
`}}}},$D=function({viewing:e,in:t,onChange:n}){const{t:r}=Be.useWoodlandLanguage();return o.createElement("div",{className:"sps-context-bar"},r("contextBar.viewing",{defaultValue:"Viewing"}),o.createElement("span",{className:"sps-context-bar__emphasized"},e),!!t&&o.createElement(o.Fragment,null,r("contextBar.in",{defaultValue:"in"}),o.createElement("span",{className:"sps-context-bar__emphasized"},t)),!!n&&o.createElement(je,{className:"sps-context-bar__change-button",kind:Y.ButtonKind.LINK,onClick:n},r("contextBar.change",{defaultValue:"Change"})))},KD={disabled:"boolean",formMeta:"SpsFormFieldMeta<number>",name:"string",onChange:"ChangeEventHandler<number>",value:"number"};function HD(e){return e?Number.parseInt(e.replace(/[^\d]/g,""),10)/100:null}function WD(e){return typeof e=="number"?e.toFixed(2):""}function Mf({className:e,disabled:t=!1,formMeta:n,id:r,name:a,onChange:s,ref:l,title:c,value:p,...f}){const{wrapperId:m,controlId:u}=St(r,n),h=o.useRef(null);function S(D){n&&(n.setValue(D),n.markAsDirty()),s&&s(D)}function y(){S(null)}function C(D){S(HD(D.target.value))}function T(D){D.currentTarget.setSelectionRange(D.currentTarget.value.length,D.currentTarget.value.length)}const w=U("sps-text-input",e);return o.createElement(nt,{id:m,className:w,formMeta:n,inputRef:h,ref:l},o.createElement("div",{className:U("sps-form-control",t&&"disabled")},o.createElement(Wt,{className:"sps-text-input__icon",icon:Y.SpsIcon.DOLLAR_SIGN}),o.createElement("input",{type:"text",ref:h,onFocus:T,className:"sps-text-input__input",id:u,name:a,placeholder:"0.00",onChange:C,title:c,value:WD(p),disabled:t,...f}),p!==null&&!t&&o.createElement("i",{className:"sps-icon sps-icon-x-circle sps-form-control__clear-btn",onClick:y})))}Object.assign(Mf,{props:KD,displayName:"SpsCurrencyInput"});const GD={basic:{label:"Basic",examples:{basic:{react:v.code`
|
|
9372
9372
|
import {
|
|
9373
9373
|
useSpsForm,
|
|
9374
9374
|
SpsCurrencyInput,
|
|
@@ -9414,7 +9414,7 @@ ${t.join("").replace("]","\\]").replace(" ","\\s")}]+`);return e.split(n).filter
|
|
|
9414
9414
|
</>
|
|
9415
9415
|
)
|
|
9416
9416
|
}
|
|
9417
|
-
`}}}},YD={};function Tl(e){const{children:t,className:n,unsafelyReplaceClassName:r,...a}=e,s=U(r||"sps-list-action-bar-container","z-stratum-bar",n);return o.createElement("div",{className:s,...a},o.createElement("div",{className:"sps-list-action-bar"},o.createElement("div",{className:"sps-list-action-bar__actions"},t)))}Object.assign(Tl,{props:YD,displayName:"SpsFocusedTaskActions"});const UD={fullWidth:"boolean",isOpen:"boolean",onClose:"() => void"};function El(e){const{children:t,className:n,fullWidth:r,isOpen:a,onClose:s,title:l,"data-testid":c,unsafelyReplaceClassName:p,...f}=e,m=o.useRef(null),{t:u}
|
|
9417
|
+
`}}}},YD={};function Tl(e){const{children:t,className:n,unsafelyReplaceClassName:r,...a}=e,s=U(r||"sps-list-action-bar-container","z-stratum-bar",n);return o.createElement("div",{className:s,...a},o.createElement("div",{className:"sps-list-action-bar"},o.createElement("div",{className:"sps-list-action-bar__actions"},t)))}Object.assign(Tl,{props:YD,displayName:"SpsFocusedTaskActions"});const UD={fullWidth:"boolean",isOpen:"boolean",onClose:"() => void"};function El(e){const{children:t,className:n,fullWidth:r,isOpen:a,onClose:s,title:l,"data-testid":c,unsafelyReplaceClassName:p,...f}=e,m=o.useRef(null),{t:u}=Be.useWoodlandLanguage();o.useEffect(()=>{document.body.style.overflow=a?"hidden":""},[a]),o.useEffect(()=>()=>{document.body.style.overflow=""},[]);const h=U(p||"sps-focused-task","z-stratum-dialog",r&&"sps-focused-task--full-width",a&&"sps-focused-task--open",n),[S,y]=_t(t,[{type:Tl}]);return o.createElement("div",{className:h,ref:m,"data-testid":c,...f},o.createElement("div",{className:"sps-focused-task__title"},o.createElement(je,{className:"sps-focused-task__close-btn",kind:Y.ButtonKind.ICON,icon:Y.SpsIcon.X,onClick:s,title:u("focusedTask.close",{defaultValue:"Close"})})),o.createElement("div",{className:"sps-focused-task__body"},o.createElement(Mt.Provider,{value:{parentElementRef:m}},a&&y)),S)}Object.assign(El,{props:UD,displayName:"SpsFocusedTask"});const zD={basic:{examples:{basic:{react:v.code`
|
|
9418
9418
|
import {
|
|
9419
9419
|
SpsButton,
|
|
9420
9420
|
SpsFocusedTask,
|
|
@@ -9498,7 +9498,7 @@ ${t.join("").replace("]","\\]").replace(" ","\\s")}]+`);return e.split(n).filter
|
|
|
9498
9498
|
</>
|
|
9499
9499
|
);
|
|
9500
9500
|
}
|
|
9501
|
-
`}}}},jD={imgSrc:"string",kind:"GrowlerKind",onClose:"() => void",persist:"boolean",title:"string"};function wl(e){const{children:t,className:n,imgSrc:r,kind:a=Y.GrowlerKind.INFO,onClose:s,persist:l,title:c,unsafelyReplaceClassName:p,...f}=e,m=o.useRef(s);o.useEffect(()=>{m.current=s},[s]);const{t:u}
|
|
9501
|
+
`}}}},jD={imgSrc:"string",kind:"GrowlerKind",onClose:"() => void",persist:"boolean",title:"string"};function wl(e){const{children:t,className:n,imgSrc:r,kind:a=Y.GrowlerKind.INFO,onClose:s,persist:l,title:c,unsafelyReplaceClassName:p,...f}=e,m=o.useRef(s);o.useEffect(()=>{m.current=s},[s]);const{t:u}=Be.useWoodlandLanguage(),[h,S]=o.useState(!0),[y,C]=o.useState(!1);function T(){return[window.setTimeout(()=>C(!0),Y.GROWLER_VISIBLE_DURATION_MS),window.setTimeout(()=>{S(!1),m.current&&m.current()},Y.GROWLER_VISIBLE_DURATION_MS+Y.GROWLER_FADEOUT_DURATION_MS)]}const w=o.useRef([]);function D(){l||(w.current=T())}function M(){for(const R of w.current)window.clearTimeout(R);w.current=[]}function I(){M(),S(!0),C(!1)}function k(){I(),C(!1),S(!1),s&&s()}const A=a===Y.GrowlerKind.PROGRESS?"sps-spinner":U("sps-icon",`sps-icon-${Y.GrowlerIcon.get(a)}`),G=U(p||"sps-growler",h&&"show",y&&"fade",`sps-growler--${a}`,n);return o.useEffect(()=>(D(),()=>{M()}),[]),cr("sps-growler-display-area",["sps-growler-area","z-stratum-growlers"])(o.createElement("div",{role:"alert",className:G,onMouseEnter:I,onMouseLeave:D,...f},o.createElement("div",{className:"sps-growler__icon-box"},r&&o.createElement("img",{src:r,alt:""}),!r&&o.createElement("i",{className:A,"aria-hidden":"true"})),o.createElement("div",{className:"sps-growler__message-box"},o.createElement("div",{className:"sps-growler__message-box-text"},c&&o.createElement("span",{className:"sps-growler__message-box-title d-block"},c),o.createElement("div",{className:"sps-growler__message-box-subtitle"},t)),o.createElement("button",{type:"button",className:"sps-growler__close-button","aria-hidden":"true",onClick:k},o.createElement("i",{className:"sps-icon sps-icon-x",title:u("growler.dismiss",{defaultValue:"Dismiss"})})))))}Object.assign(wl,{props:jD,displayName:"SpsGrowler"});function qD(){const[e,t]=o.useState([]),n=o.useCallback(()=>e.map(a=>o.createElement(wl,{id:a.id,key:a.id,title:a.title,kind:a.kind,imgSrc:a.imgSrc,persist:a.persist,onClose:()=>{a.onClose&&a.onClose(),a.closed=!0,e.every(s=>s.closed)&&t([])}},Tt(a.content))),[e]),r=o.useCallback(a=>{t(s=>[...s,{...a,kind:a.kind||Y.GrowlerKind.INFO,id:a.id||ht()}])},[]);return[n,r]}const JD={writingGuidelines:{label:"Writing Guidelines",customSection:()=>o.createElement(o.Fragment,null,o.createElement("p",null,"Use the following guidelines to write an effective Growler message."),o.createElement("ul",null,o.createElement("li",null,"Write all messages in sentence case.",o.createElement("ul",null,o.createElement("li",null,"Capitalize the first word of the message."),o.createElement("li",null,"Add punctuation, such as a period, at the end of the message."))),o.createElement("li",null,"Keep messages as succinct as possible while also providing sufficient information to the customer."),o.createElement("li",null,"If you can clearly convey your message in a single statement, use only the Primary Message."),o.createElement("li",null,"If the message requires additional details, such as further information or instructions, use both the Primary and Secondary Messages.")),o.createElement("p",null,"For more examples of effective feedback message writing, refer to"," ",o.createElement("a",{href:"https://atlassian.design/content/messaging-guidelines",target:"_blank",rel:"noreferrer"},"Atlassian's Messaging Guidelines"),"."))},error:{label:"Error",description:()=>o.createElement(o.Fragment,null,o.createElement("p",null,"Acceptable message: Document ABC123 has not been sent. Check the form and try sending it again."),o.createElement("p",null,`Unacceptable message: Can't send your document."`)),examples:{primary:{description:"Primary Message Only",react:v.code`
|
|
9502
9502
|
import { SpsButton, SpsGrowler } from "@spscommerce/ds-react";
|
|
9503
9503
|
import { ButtonKind, GrowlerKind } from "@spscommerce/ds-shared";
|
|
9504
9504
|
|
|
@@ -9786,7 +9786,7 @@ ${t.join("").replace("]","\\]").replace(" ","\\s")}]+`);return e.split(n).filter
|
|
|
9786
9786
|
</>
|
|
9787
9787
|
);
|
|
9788
9788
|
}
|
|
9789
|
-
`}}}};function ZD(e){const{children:t}=e;return o.createElement("div",{className:"insight-tile-wrapper"},t)}const XD={horizontal:"boolean",icon:"SpsIcon",kind:"SpsInsightTileKind",title:"string",metric:"number | string",partnerCount:"number",totalPartners:"number"};function _f(e){const{children:t,className:n,horizontal:r=!1,icon:a,kind:s="general",title:l,metric:c,partnerCount:p,totalPartners:f,unsafelyReplaceClassName:m,...u}=e,h=U(m||"sps-insight-tile",`sps-insight-tile--${s}`,n,r&&"sps-insight-tile--horizontal",t&&"sps-insight-tile--has-detail"),{t:S}
|
|
9789
|
+
`}}}};function ZD(e){const{children:t}=e;return o.createElement("div",{className:"insight-tile-wrapper"},t)}const XD={horizontal:"boolean",icon:"SpsIcon",kind:"SpsInsightTileKind",title:"string",metric:"number | string",partnerCount:"number",totalPartners:"number"};function _f(e){const{children:t,className:n,horizontal:r=!1,icon:a,kind:s="general",title:l,metric:c,partnerCount:p,totalPartners:f,unsafelyReplaceClassName:m,...u}=e,h=U(m||"sps-insight-tile",`sps-insight-tile--${s}`,n,r&&"sps-insight-tile--horizontal",t&&"sps-insight-tile--has-detail"),{t:S}=Be.useWoodlandLanguage(),[y,C,T]=(p?S("insightTile.partnerCount",{count:p,total:f,defaultValue:`${p} |of| ${f}`}):"").split("|");return o.createElement(o.Fragment,null,o.createElement("div",{className:h,...u},o.createElement("div",{className:"sps-insight-tile__body"},a?o.createElement("i",{className:`sps-icon sps-icon-${a}`}):o.createElement("i",{className:`sps-icon sps-icon-${Y.SpsInsightTileIcons[s]}`}),c&&o.createElement("div",{className:"sps-insight-tile__metric-count"},c),l&&o.createElement("div",{className:"sps-insight-tile__description"},o.createElement("div",{className:"sps-insight-tile__title",style:{"-webkit-box-orient":"vertical"}},l),o.createElement("div",{className:"sps-insight-tile__detail"},t))),p&&o.createElement("div",{className:"sps-insight-tile__partner-count"},p===f?o.createElement("div",null,S("insightTile.all",{defaultValue:"ALL"})):o.createElement(o.Fragment,null,o.createElement("div",null,y),o.createElement("div",null,C),o.createElement("div",null,T)),o.createElement("div",{className:"sps-insight-tile__partners-text"},S("insightTile.partners",{defaultValue:"PARTNERS"})))))}Object.assign(_f,{props:XD,displayName:"SpsInsightTile"});const QD={inline:"boolean"};function Lf(e){const{children:t,className:n,inline:r,"data-testid":a,unsafelyReplaceClassName:s,...l}=e,c=U(s||"sps-key-value-list",r&&"sps-key-value-list--inline",n);return o.createElement("div",{className:c,"data-testid":`${a}`,...l},t)}Object.assign(Lf,{props:QD,displayName:"SpsKeyValueList"});const eN={itemKey:{type:"string | nodeOrRenderFn",required:!0},titleColor:"KeyValueListTitleColor"};function Of(e){const{children:t,className:n,itemKey:r,titleColor:a=Y.KeyValueListTitleColor.LIGHT,"data-testid":s,unsafelyReplaceClassName:l,...c}=e,p=U(l||"sps-key-value-list__item",`sps-key-value-list__item--${a}`,n);return o.createElement("div",{className:p,"data-testid":`${s}`,...c},o.createElement("span",{className:"sps-key-value-list__key","data-testid":`${s}__key`},r),o.createElement("span",{className:"sps-key-value-list__value","data-testid":`${s}__value`},t))}Object.assign(Of,{props:eN,displayName:"SpsKeyValueListItem"});const tN={color:"TagKind",href:"String",icon:"SpsIcon",tagKey:{type:"String",required:!0},value:{type:"String",required:!0}};function Rf(e){const{color:t=Y.TagKind.KEY,className:n,"data-testid":r,href:a,icon:s,tagKey:l,value:c,unsafelyReplaceClassName:p,...f}=e,m=U(p||"sps-key-value-tag",a&&"sps-key-value-tag--link",n);return o.createElement("span",{className:m,"data-testid":`${r}__key-value-tag`,...f},o.createElement(Ht,{icon:s,kind:t,className:"sps-key-value-tag--key"},l),o.createElement(Ht,{className:`sps-key-value-tag--value ${t}`},a&&o.createElement("a",{href:a},c),!a&&c))}Object.assign(Rf,{props:tN,displayName:"SpsKeyValueTag"});const nN={basic:{label:"Basic",examples:{basic:{react:v.code`
|
|
9790
9790
|
import { SpsKeyValueTag } from "@spscommerce/ds-react";
|
|
9791
9791
|
function Component() {
|
|
9792
9792
|
return (
|
|
@@ -9815,7 +9815,7 @@ ${t.join("").replace("]","\\]").replace(" ","\\s")}]+`);return e.split(n).filter
|
|
|
9815
9815
|
</>
|
|
9816
9816
|
)
|
|
9817
9817
|
}
|
|
9818
|
-
`}}}};function Bf(e){const{tabs:t,activeTab:n,onTabChange:r,className:a,unsafelyReplaceClassName:s,"data-testid":l,...c}=e,[p,f]=o.useState();o.useEffect(()=>{if(t.length)if(n){const h=t.find(S=>S.label===n.label);f(h)}else f(t[0])},[]);const m=(h,S)=>{h.preventDefault(),f(S),typeof r=="function"&&r(S)},u=U(s||"sps-tabs",a);return o.createElement("div",{className:u},o.createElement("nav",{className:"sps-nav sps-nav--tabs","data-testid":l,...c},t.map(h=>o.createElement("a",{key:h.label,id:h.id,className:U("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:S=>{m(S,h)},"data-testid":`${l}__tab-link`},h.icon&&o.createElement("i",{className:`sps-icon sps-icon-${h.icon}`}),o.createElement("span",null,h.label),h.tag&&o.createElement("span",{className:"sps-tag sps-tag--key"},h.tag)))))}Object.assign(Bf,{displayName:"SpsTabs"});const rN={resultsCount:"number",totalResults:"number",onClear:"() => void"};function Pf(e){const{children:t,className:n,resultsCount:r,totalResults:a,onClear:s,"data-testid":l,unsafelyReplaceClassName:c,...p}=e,{t:f}
|
|
9818
|
+
`}}}};function Bf(e){const{tabs:t,activeTab:n,onTabChange:r,className:a,unsafelyReplaceClassName:s,"data-testid":l,...c}=e,[p,f]=o.useState();o.useEffect(()=>{if(t.length)if(n){const h=t.find(S=>S.label===n.label);f(h)}else f(t[0])},[]);const m=(h,S)=>{h.preventDefault(),f(S),typeof r=="function"&&r(S)},u=U(s||"sps-tabs",a);return o.createElement("div",{className:u},o.createElement("nav",{className:"sps-nav sps-nav--tabs","data-testid":l,...c},t.map(h=>o.createElement("a",{key:h.label,id:h.id,className:U("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:S=>{m(S,h)},"data-testid":`${l}__tab-link`},h.icon&&o.createElement("i",{className:`sps-icon sps-icon-${h.icon}`}),o.createElement("span",null,h.label),h.tag&&o.createElement("span",{className:"sps-tag sps-tag--key"},h.tag)))))}Object.assign(Bf,{displayName:"SpsTabs"});const rN={resultsCount:"number",totalResults:"number",onClear:"() => void"};function Pf(e){const{children:t,className:n,resultsCount:r,totalResults:a,onClear:s,"data-testid":l,unsafelyReplaceClassName:c,...p}=e,{t:f}=Be.useWoodlandLanguage(),m=U(c||"sps-search-results-bar",n),[u,h,S]=f("searchResultsBar.count",{count:r,total:a,defaultValue:`${r} of ${a}`}).split(" ");return o.createElement("div",{className:m,"data-testid":`${l}`,...p},o.createElement("span",{className:"sps-search-results-bar__label","data-testid":`${l}__label`},f("searchResultsBar.matchingResults",{defaultValue:"Matching results"})),u&&!Number.isNaN(Number(u))&&o.createElement("span",{className:"sps-search-results-bar__count","data-testid":`${l}__count`},o.createElement("i",{className:"sps-icon sps-icon-double-angle-right"}),o.createElement("span",null,u)),S&&!Number.isNaN(Number(S))&&o.createElement("span",{className:"sps-search-results-bar__total","data-testid":`${l}__total`},h," ",S),o.createElement("div",{className:"sps-search-results-bar__buttons","data-testid":`${l}__button`},o.createElement("button",{type:"button",onClick:s},f("searchResultsBar.clear",{defaultValue:"Clear"}))))}Object.assign(Pf,{props:rN,displayName:"SpsSearchResultsBar"});const oN={results:"number || string || null",selections:"{ [key: string]: string[] }",zeroStateText:"string",onClear:"() => void"};function Cl(e){const{className:t,results:n,selections:r,zeroStateText:a,onClear:s,"data-testid":l,unsafelyReplaceClassName:c,...p}=e,{t:f}=Be.useWoodlandLanguage(),m=U(c||"sps-search-results-bar-v2",t),u=r?Object.keys(r).reduce((h,S)=>(r[S].length>0&&(h[S]=r[S]),h),{}):{};return o.createElement("div",{className:m,"data-testid":`${l}`,...p},n!=null&&o.createElement("div",{className:"sps-search-results-bar-v2__results"},o.createElement("span",{"data-testid":`${l}__label`},f("searchResultsBar.results",{defaultValue:"Results:"})),o.createElement(Ht,{kind:Y.TagKind.INFO},o.createElement("span",null,n))),o.createElement("div",{className:"sps-search-results-bar-v2__selections"},Object.keys(u).length>0?Object.keys(u).map((h,S)=>o.createElement(o.Fragment,null,o.createElement("span",{key:S,className:"sps-search-results-bar-v2__selection"},h,":"),u[h].map((y,C)=>o.createElement(Ht,{key:C,kind:Y.TagKind.KEY},o.createElement("span",null,y))))):o.createElement("span",{className:"font-italic"},a||f("searchResultsBar.noAdvancedSearchSelections",{defaultValue:"No Advanced Search Selections"}))),o.createElement("div",{className:"sps-search-results-bar-v2__buttons","data-testid":`${l}__button`},o.createElement(je,{kind:Y.ButtonKind.LINK,onClick:s},f("searchResultsBar.clearResults",{defaultValue:"Clear Results"}))))}Object.assign(Cl,{props:oN,displayName:"SpsSearchResultsBarV2"});const aN={basic:{label:"Basic",description:({NavigateTo:e})=>o.createElement(o.Fragment,null,o.createElement("p",null,"SpsSearchResultsBarV2 should be used with List Toolbar and Advanced Search."),o.createElement("p",null,"For more examples go to the Advanced Search section on the"," ",o.createElement(e,{to:"list-toolbar"},"List Toolbar")," page.")),examples:{basic:{react:v.code`
|
|
9819
9819
|
import {
|
|
9820
9820
|
useSpsForm,
|
|
9821
9821
|
SpsListToolbar,
|
|
@@ -10033,7 +10033,7 @@ ${t.join("").replace("]","\\]").replace(" ","\\s")}]+`);return e.split(n).filter
|
|
|
10033
10033
|
</>
|
|
10034
10034
|
)
|
|
10035
10035
|
}
|
|
10036
|
-
`}}}},sN={onSubmit:"FormEventHandler"};function Dl(e){const{children:t,onSubmit:n}=e;function r(a){a.preventDefault(),n&&n(a)}return o.createElement("form",{onSubmit:r,className:"sps-list-toolbar__search-form",noValidate:!0},o.createElement(br,{className:"sps-list-toolbar__search-field"},t))}Object.assign(Dl,{props:sN,displayName:"SpsListToolbarSearch"});const iN={};function Nl(e){const{children:t}=e;return o.createElement("div",null,t)}Object.assign(Nl,{props:iN,displayName:"SpsListToolbarSearchInfo"});const lN={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 Af(e){const{activeTab:t,advancedSearch:n,children:r,className:a,onToggleAdvancedSearch:s,onTabChange:l,tabs:c,title:p,unsafelyReplaceClassName:f,onToolbarPinned:m,selectable:u,isSelected:h,isIndeterminate:S,onSelectionChange:y,pinResultsBar:
|
|
10036
|
+
`}}}},sN={onSubmit:"FormEventHandler"};function Dl(e){const{children:t,onSubmit:n}=e;function r(a){a.preventDefault(),n&&n(a)}return o.createElement("form",{onSubmit:r,className:"sps-list-toolbar__search-form",noValidate:!0},o.createElement(br,{className:"sps-list-toolbar__search-field"},t))}Object.assign(Dl,{props:sN,displayName:"SpsListToolbarSearch"});const iN={};function Nl(e){const{children:t}=e;return o.createElement("div",null,t)}Object.assign(Nl,{props:iN,displayName:"SpsListToolbarSearchInfo"});const lN={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 Af(e){const{activeTab:t,advancedSearch:n,children:r,className:a,onToggleAdvancedSearch:s,onTabChange:l,tabs:c,title:p,unsafelyReplaceClassName:f,onToolbarPinned:m,selectable:u,isSelected:h,isIndeterminate:S,onSelectionChange:y,pinResultsBar:C,pinToolbar:T=!0,"data-testid":w,...D}=e,{t:M}=Be.useWoodlandLanguage();let I=null;const[k,A]=o.useState(!1),G=o.useRef(null),E=o.useRef(null),R=v.lockToAnimationFrames(()=>{if(G.current&&T){const ae=G.current.getBoundingClientRect();ae&&ae.height>0&&ae.top<=60&&(typeof I=="number"?window.scrollY<I&&(I=null,A(!1)):(I=window.scrollY,A(!0),s&&s(!1)))}});o.useEffect(()=>(window.addEventListener("scroll",R),()=>{window.removeEventListener("scroll",R)}),[]);const O=o.useRef();o.useLayoutEffect(()=>{if(E.current&&G.current&&T){if(k&&O.current)E.current.style.height=O.current.height,E.current.style.width=O.current.width,E.current.style.marginBottom=O.current.marginBottom;else if(!k){E.current.style.height="",E.current.style.width="",E.current.style.marginBottom="";const ae=window.getComputedStyle(G.current);O.current={height:ae.height,width:ae.width,marginBottom:ae.marginBottom}}}},[k]);function P(ae){l&&l(ae)}function z(){s&&s(!(n!=null&&n.isOpen))}function L(ae){m&&m(ae)}o.useEffect(()=>{L(k)},[k]);const re=U(f||"sps-list-toolbar",k&&T&&"sps-list-toolbar--pinned",k&&T&&"z-stratum-toolbar",n&&n.isOpen&&"sps-list-toolbar--advanced-search-open",a),[B,Z,H,q]=_t(r,[{type:Dl},{type:Nl},{type:Cl}]);return o.createElement("div",{className:"sps-list-toolbar__wrapper",ref:E},o.createElement("div",{className:re,"data-testid":w,ref:G,...D},o.createElement("div",{className:"sps-list-toolbar__content"},!!u&&o.createElement("div",{className:"sps-list-toolbar__selection-controls"},o.createElement(Fn,{checked:h,indeterminate:S,onChange:()=>{y==null||y(!h)}})),c&&o.createElement(Bf,{tabs:c,onTabChange:P,activeTab:t,"data-testid":`${w}__tabs`}),o.createElement("div",{className:"sps-list-toolbar__search-controls"},!p&&B,!p&&Z,B.length>0&&n&&o.createElement("div",{className:"sps-list-toolbar__advanced-search-toggle","data-testid":`${w}__advanced-search`},o.createElement("div",{className:"sps-list-toolbar__advanced-search-toggle-button-wrapper"},o.createElement(je,{kind:Y.ButtonKind.LINK,onClick:z},M("listToolbar.advancedSearchToggle",{defaultValue:"Advanced Search"}))),(n.enteredFields||0)>0&&o.createElement(Ht,{"data-testid":`${w}__entered_fields`,kind:Y.TagKind.INFO},o.createElement("span",null,n.enteredFields))),p&&o.createElement("div",{"data-testid":`${w}-title`,className:"sps-list-toolbar__advanced-search-title"},p)),k?o.createElement("div",{className:"sps-list-toolbar__header-content"},o.createElement(Mt.Provider,{value:{fixed:!0}},q)):o.createElement("div",{className:"sps-list-toolbar__header-content"},q)),o.createElement("div",null,(!k||C)&&H)))}Object.assign(Af,{props:lN,displayName:"SpsListToolbar"});const cN={options:"SortOption[]",activeOption:"SortOption",onSortChange:"(option: SortOption) => void",defaultOption:"SortOption"};function Ff(e){const{options:t,onSortChange:n,defaultOption:r,activeOption:a,className:s,unsafelyReplaceClassName:l}=e,c=(t||[]).map(f=>[{label:f.label,icon:f.icon},()=>{n&&n(f)}]),p=U(l||"sps-list-toolbar-sort-by",s);return o.createElement(zn,{className:p,icon:(a==null?void 0:a.icon)||(r==null?void 0:r.icon),label:(a==null?void 0:a.label)||(r==null?void 0:r.label),options:c})}Object.assign(Ff,{props:cN,displayName:"SpsListToolbarSortBy"});function Vf(){const[e,t]=o.useState(!1);function n(){t(!1)}function r(){t(!0)}return o.createElement(o.Fragment,null,o.createElement("p",null,"The List Bar is divided into a number of different sections. It spans the entire width of the corresponding list."),o.createElement(je,{kind:Y.ButtonKind.LINK,onClick:r},"View Content Order Example"),o.createElement(El,{isOpen:e,onClose:n},o.createElement("h1",null,"Content Order"),o.createElement("img",{src:"assets/images/list-toolbar-example.svg",alt:"A List Toolbar with labels on each section",className:"w-100 mb-3"}),o.createElement(jn,null,o.createElement(Cn,null,o.createElement(it,{style:{width:"80px"}},"Order"),o.createElement(it,null,"Section"),o.createElement(it,null,"Notes")),o.createElement(Dn,null,o.createElement(Ye,null,o.createElement(ue,null,o.createElement("span",{className:"sps-tag sps-tag--info"},"1")),o.createElement(ue,null,"Checkbox"),o.createElement(ue,null,"For Content Rows and Content Tiles only.")),o.createElement(Ye,null,o.createElement(ue,null,o.createElement("span",{className:"sps-tag sps-tag--info"},"2")),o.createElement(ue,null,"Search/Filter Box"),o.createElement(ue,null)),o.createElement(Ye,null,o.createElement(ue,null,o.createElement("span",{className:"sps-tag sps-tag--info"},"3")),o.createElement(ue,null,"Saved Search"),o.createElement(ue,null)),o.createElement(Ye,null,o.createElement(ue,null,o.createElement("span",{className:"sps-tag sps-tag--info"},"4")),o.createElement(ue,null,"Advanced Search"),o.createElement(ue,null,"For more information, visit the Advanced Search page.")),o.createElement(Ye,null,o.createElement(ue,null,o.createElement("span",{className:"sps-tag sps-tag--info"},"5")),o.createElement(ue,null,"Column Editor"),o.createElement(ue,{wrap:500},"Use for Tables only. For more information, visit the Column Editor page.")),o.createElement(Ye,null,o.createElement(ue,null,o.createElement("span",{className:"sps-tag sps-tag--info"},"6")),o.createElement(ue,null,"List View Selector"),o.createElement(ue,null)),o.createElement(Ye,null,o.createElement(ue,null,o.createElement("span",{className:"sps-tag sps-tag--info"},"7")),o.createElement(ue,null,"Sorting"),o.createElement(ue,null)),o.createElement(Ye,null,o.createElement(ue,null,o.createElement("span",{className:"sps-tag sps-tag--info"},"8")),o.createElement(ue,null,"Buttons"),o.createElement(ue,{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 dN={general:{label:"General Usage",description:()=>o.createElement(o.Fragment,null,o.createElement("h5",null,"Use a List Toolbar:"),o.createElement("ul",null,o.createElement("li",null,"When list content needs to be searched, filtered, sorted, or otherwise interacted with.")),o.createElement("h5",null,"Avoid a List Toolbar:"),o.createElement("ul",null,o.createElement("li",null,"When no list is present."),o.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:o.createElement(Vf,null)},checkbox:{label:"Checkbox",description:({NavigateTo:e})=>o.createElement("p",null,"Use a Checkbox in the List Toolbar when items in a"," ",o.createElement(e,{to:"Content rows"},"Content Row")," or"," ",o.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:v.code`
|
|
10037
10037
|
import {
|
|
10038
10038
|
SpsListToolbar,
|
|
10039
10039
|
SpsListToolbarSearch,
|
|
@@ -10724,7 +10724,7 @@ ${t.join("").replace("]","\\]").replace(" ","\\s")}]+`);return e.split(n).filter
|
|
|
10724
10724
|
</SpsListToolbar>
|
|
10725
10725
|
)
|
|
10726
10726
|
}
|
|
10727
|
-
`}}}};var $f=(e=>(e.Ok="Ok",e.Cancel="Cancel",e))($f||{});const pN=()=>{const[e,t]=
|
|
10727
|
+
`}}}};var $f=(e=>(e.Ok="Ok",e.Cancel="Cancel",e))($f||{});const pN=()=>{const[e,t]=x.useState([]),n=f=>{const m=[...e],u={...f};return u.key=ht(),new Promise(S=>{m.push({component:u,resolve:S}),t(m)})},r=f=>{const m=[...e],u=m.pop();u==null||u.resolve(f),t(m)},[a,s]=x.useState(!1),[l,c]=x.useState();x.useEffect(()=>{a&&(r(l),s(!1))},[a]);const p=f=>{s(!0),c(f)};return[e.map(f=>f.component),n,p]};function uN(e,t){const n={...Y.SPS_ACTION_DEFAULTS,...e},[r,a]=Zt(n);return Object.assign(t,r),[t,s=>{a(s),Object.assign(t,r)}]}const mN={};function Kf(e){const{children:t,className:n,"data-testid":r,unsafelyReplaceClassName:a,...s}=e;let l;const c=[];o.Children.forEach(t,f=>{o.isValidElement(f)&&f.type==="i"?l=f:c.push(f)});const p=U(a||"sps-page-title",n);return o.createElement("div",{className:p,"data-testid":`${r}`,...s},l,o.createElement("div",{className:"sps-page-title__text","data-testid":`${r}__text`},c))}Object.assign(Kf,{props:mN,displayName:"SpsPageTitle"});const fN={};function Hf(e){const{children:t,className:n,"data-testid":r,unsafelyReplaceClassName:a,...s}=e,l=U(a||"sps-page-title__subtitle",n);return o.createElement("div",{className:l,"data-testid":r,...s},t)}Object.assign(Hf,{props:fN,displayName:"SpsPageSubtitle"});const hN={basic:{label:"Basic",examples:{basic:{imports:v.code`
|
|
10728
10728
|
import { SpsPageTitle } from "@spscommerce/ds-react";
|
|
10729
10729
|
`,jsx:v.code`
|
|
10730
10730
|
<SpsPageTitle>
|
|
@@ -10758,7 +10758,7 @@ ${t.join("").replace("]","\\]").replace(" ","\\s")}]+`);return e.split(n).filter
|
|
|
10758
10758
|
MacNeil Automotive Parts
|
|
10759
10759
|
</SpsPageSubtitle>
|
|
10760
10760
|
</SpsPageTitle>
|
|
10761
|
-
`}}}},SN={active:"boolean",as:"React.ElementType"};function kl(e){const{active:t,as:n="a",children:r,className:a,unsafelyReplaceClassName:s,...l}=e,c=U(s||"sps-nav__item","sps-nav__link",t&&"active");return o.createElement(n,{className:c,...l},r)}Object.assign(kl,{props:SN,displayName:"SpsProductBarTab"});const gN={activeTab:"string",fullWidth:"boolean",onTabChange:"(newTab: string) => void",onProductNameClick:"React.MouseEventHandler",productLogoSrc:"string",productName:"string",productNameHref:"string",tabs:"Array<string>"};function Wf(e){const{activeTab:t,children:n,className:r,fullWidth:a,onProductNameClick:s,onTabChange:l,productLogoSrc:c,productName:p,productNameHref:f,tabs:m=[],unsafelyReplaceClassName:u,...h}=e,S=o.useRef(null),[
|
|
10761
|
+
`}}}},SN={active:"boolean",as:"React.ElementType"};function kl(e){const{active:t,as:n="a",children:r,className:a,unsafelyReplaceClassName:s,...l}=e,c=U(s||"sps-nav__item","sps-nav__link",t&&"active");return o.createElement(n,{className:c,...l},r)}Object.assign(kl,{props:SN,displayName:"SpsProductBarTab"});const gN={activeTab:"string",fullWidth:"boolean",onTabChange:"(newTab: string) => void",onProductNameClick:"React.MouseEventHandler",productLogoSrc:"string",productName:"string",productNameHref:"string",tabs:"Array<string>"};function Wf(e){const{activeTab:t,children:n,className:r,fullWidth:a,onProductNameClick:s,onTabChange:l,productLogoSrc:c,productName:p,productNameHref:f,tabs:m=[],unsafelyReplaceClassName:u,...h}=e,{t:S}=Be.useWoodlandLanguage(),y=o.useRef(null),[C,T]=_t(n,[{type:kl}]),[w,D]=o.useState(t||m[0]);o.useEffect(()=>{D(t||m[0])},[t]);function M(k){D(k),l&&l(k)}const I=U(u||"sps-navbar-container","z-stratum-bar",r);return o.createElement("div",{className:I,...h,ref:y},o.createElement("nav",{className:U("sps-navbar","sps-navbar--expand-lg",a&&"sps-navbar--full-width")},p||c?o.createElement(o.Fragment,null,o.createElement("a",{className:"sps-navbar__brand",href:f,onClick:s},c&&o.createElement("img",{className:"sps-navbar__brand-logo",src:c,"aria-hidden":"true",alt:`${p} Logo`}),p&&o.createElement("span",{className:"sps-navbar__brand-name"},p)),o.createElement("span",{className:"sps-vertical-rule"})):null,o.createElement("div",{className:"sps-navbar__nav"},m.map(k=>o.createElement("a",{className:U("sps-nav__item","sps-nav__link",k===w&&"active"),key:k,onClick:()=>M(k)},o.createElement("span",null,k),k===w&&o.createElement("span",{className:"sr-only"},"(",S("productBar.current",{defaultValue:"current"}),")"))),C),o.createElement("div",{className:"sps-navbar__content"},o.createElement(Mt.Provider,{value:{parentElementRef:y,fixed:!0}},T))))}Object.assign(Wf,{props:gN,displayName:"SpsProductBar"});const bN={basic:{label:"Basic",description:v.code`
|
|
10762
10762
|
<p>Product navigation bar</p>
|
|
10763
10763
|
`,examples:{basic:{react:v.code`
|
|
10764
10764
|
import { SpsProductBar, SpsButton } from "@spscommerce/ds-react";
|
|
@@ -10863,7 +10863,7 @@ ${t.join("").replace("]","\\]").replace(" ","\\s")}]+`);return e.split(n).filter
|
|
|
10863
10863
|
</SpsProductBar>
|
|
10864
10864
|
)
|
|
10865
10865
|
}
|
|
10866
|
-
`}}}},vN={percentComplete:"number",title:"string",detail:"string",disabled:"boolean",onClose:"() => void"};function Gf(e){const{children:t,className:n,detail:r,disabled:a,onClose:s,percentComplete:l=0,title:c,"data-testid":p,unsafelyReplaceClassName:f,...m}=e,{t:u}
|
|
10866
|
+
`}}}},vN={percentComplete:"number",title:"string",detail:"string",disabled:"boolean",onClose:"() => void"};function Gf(e){const{children:t,className:n,detail:r,disabled:a,onClose:s,percentComplete:l=0,title:c,"data-testid":p,unsafelyReplaceClassName:f,...m}=e,{t:u}=Be.useWoodlandLanguage(),h=U(f||"sps-progress-bar",l===1&&"sps-progress-bar--complete",a&&"sps-progress-bar--disabled",n);return o.createElement("div",{className:h,...m},o.createElement("div",{className:"sps-progress-bar__content"},c&&o.createElement("div",{className:"sps-progress-bar__heading"},o.createElement("div",{className:"sps-progress-bar__title"},c),o.createElement("div",{className:"sps-progress-bar__percentage"},`${Math.floor(l*100)}%`)),o.createElement("div",{className:"sps-progress-bar__bar-background"},o.createElement("div",{className:"sps-progress-bar__bar-progress",style:{width:`${l*100}%`}})),r&&o.createElement("div",{className:"sps-progress-bar__detail"},r)),s&&o.createElement("div",{className:"sps-progress-bar__close-button"},o.createElement(je,{kind:Y.ButtonKind.ICON,icon:Y.SpsIcon.X,onClick:s,title:u("progressBar.closeButtonTitle",{defaultValue:"Close progress bar"})})))}Object.assign(Gf,{props:vN,displayName:"SpsProgressBar"});const yN={general:{label:"General Usage",customSection:()=>o.createElement(o.Fragment,null,o.createElement("h4",null,"General Usage"),o.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."),o.createElement("p",null,"For processes that typically complete within minutes or less, opt for the Standard Progress Bar."),o.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:()=>o.createElement(o.Fragment,null,o.createElement("p",null,"Standard Progress Bars are comprised of the following Required and Optional elements."),o.createElement("img",{src:"assets/images/progress-bar-example.svg",alt:"A Progress Bar with labels on each section",className:"w-100 mb-3"}),o.createElement(jn,null,o.createElement(Cn,null,o.createElement(it,null,"Section"),o.createElement(it,null,"Content Type"),o.createElement(it,null,"Required"),o.createElement(it,null,"Description/Guidelines")),o.createElement(Dn,null,o.createElement(Ye,null,o.createElement(ue,null,o.createElement("span",{className:"sps-tag sps-tag--info"},"1")),o.createElement(ue,null,"Title"),o.createElement(ue,null,"No"),o.createElement(ue,{wrap:400},"Use the Title when it provides necessary or helpful detail about the file or action that is being processed.")),o.createElement(Ye,null,o.createElement(ue,null,o.createElement("span",{className:"sps-tag sps-tag--info"},"2")),o.createElement(ue,null,"Progress Meter"),o.createElement(ue,null,"Yes"),o.createElement(ue,null)),o.createElement(Ye,null,o.createElement(ue,null,o.createElement("span",{className:"sps-tag sps-tag--info"},"3")),o.createElement(ue,null,"Progress Counter"),o.createElement(ue,null,"No"),o.createElement(ue,{wrap:400},"The Progress Counter should not be used without the existence of a Title.")),o.createElement(Ye,null,o.createElement(ue,null,o.createElement("span",{className:"sps-tag sps-tag--info"},"4")),o.createElement(ue,null,"Clear Button"),o.createElement(ue,null,"No"),o.createElement(ue,{wrap:400},"If the process requires the option to be cancelled or removed from a list the clear button can be used.")),o.createElement(Ye,null,o.createElement(ue,null,o.createElement("span",{className:"sps-tag sps-tag--info"},"5")),o.createElement(ue,null,"Progress Details"),o.createElement(ue,null,"No"),o.createElement(ue,{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:()=>o.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:v.code`
|
|
10867
10867
|
import { SpsCard, SpsProgressBar } from "@spscommerce/ds-react";
|
|
10868
10868
|
function Component() {
|
|
10869
10869
|
function handleClose() {
|
|
@@ -10912,7 +10912,7 @@ ${t.join("").replace("]","\\]").replace(" ","\\s")}]+`);return e.split(n).filter
|
|
|
10912
10912
|
</SpsCard>
|
|
10913
10913
|
)
|
|
10914
10914
|
}
|
|
10915
|
-
`}}}},TN={maxHeight:"string"};function Yf(e){const{children:t,maxHeight:n}=e;return o.createElement("div",{className:"sps-scrollable-container",style:{maxHeight:n}},t)}Object.assign(Yf,{props:TN,displayName:"SpsScrollableContainer"});const EN={channelId:{type:"string",required:!0}};function Uf(e){const{channelId:t,className:n,unsafelyReplaceClassName:r,...a}=e,{t:s}
|
|
10915
|
+
`}}}},TN={maxHeight:"string"};function Yf(e){const{children:t,maxHeight:n}=e;return o.createElement("div",{className:"sps-scrollable-container",style:{maxHeight:n}},t)}Object.assign(Yf,{props:TN,displayName:"SpsScrollableContainer"});const EN={channelId:{type:"string",required:!0}};function Uf(e){const{channelId:t,className:n,unsafelyReplaceClassName:r,...a}=e,{t:s}=Be.useWoodlandLanguage(),l=U(r||"sps-slack-link",n);return o.createElement("a",{className:l,target:"_blank",rel:"noreferrer",href:`https://spscommerce.slack.com/archives/${t}`,...a},o.createElement("i",{className:`sps-icon sps-icon-${Y.SpsIcon.CONVERSATION}`,"aria-hidden":"true"}),o.createElement("span",null,s("slackLink.label",{defaultValue:"Chat"})))}Object.assign(Uf,{props:EN,displayName:"SpsSlackLink"});const wN={basic:{examples:{basic:{react:v.code`
|
|
10916
10916
|
import { SpsProductBar, SpsSlackLink } from "@spscommerce/ds-react";
|
|
10917
10917
|
function DemoComponent() {
|
|
10918
10918
|
return (
|
|
@@ -10925,7 +10925,7 @@ ${t.join("").replace("]","\\]").replace(" ","\\s")}]+`);return e.split(n).filter
|
|
|
10925
10925
|
><SpsSlackLink channelId="CELEGDK4Y" /></SpsProductBar>
|
|
10926
10926
|
);
|
|
10927
10927
|
}
|
|
10928
|
-
`}}}},CN={sortKey:"string",sortDisabled:"boolean",sort:"SortedColumn[]",onSortChange:"SortChangeHandler",widthPx:"number",widthRem:"number"};function xl({className:e,"data-testid":t,unsafelyReplaceClassName:n,sortKey:r,sort:a,sortDisabled:s,onSortChange:l,onClick:c,children:p,widthPx:f,widthRem:m,style:u,...h}){const S=o.useMemo(()=>{const
|
|
10928
|
+
`}}}},CN={sortKey:"string",sortDisabled:"boolean",sort:"SortedColumn[]",onSortChange:"SortChangeHandler",widthPx:"number",widthRem:"number"};function xl({className:e,"data-testid":t,unsafelyReplaceClassName:n,sortKey:r,sort:a,sortDisabled:s,onSortChange:l,onClick:c,children:p,widthPx:f,widthRem:m,style:u,...h}){const S=o.useMemo(()=>{const w=!!r&&!s&&Array.isArray(a)&&a.find(D=>D.key===r);return w?w.direction:void 0},[a,r,s]),y=U(n||"sps-sorting-header__cell",S===Y.SortDirection.ASCENDING&&"sps-sorting-header__cell--sorted-asc",S===Y.SortDirection.DESCENDING&&"sps-sorting-header__cell--sorted-desc",s&&"sps-sorting-header__cell--sort-disabled",e),C=f?f/16:m,T=C?{...u,width:`${C}rem`}:u;return o.createElement("div",{className:y,onClick:w=>{r&&!s&&l&&l([{key:r,direction:S===Y.SortDirection.ASCENDING?Y.SortDirection.DESCENDING:Y.SortDirection.ASCENDING}]),c&&c(w)},"data-testid":t,style:T,...h},p)}Object.assign(xl,{props:CN,displayName:"SpsSortingHeaderCell"});const DN={sort:"SortedColumn[]",onSortChange:"SortChangeHandler"};function zf({className:e,"data-testid":t,unsafelyReplaceClassName:n,sort:r,onSortChange:a,children:s,...l}){const c=U(n||"sps-sorting-header",e),p={sort:r,onSortChange:a};return o.createElement("div",{className:c,...l},o.Children.map(s,f=>f&&o.isValidElement(f)&&f.type===xl?o.cloneElement(f,p):f))}Object.assign(zf,{props:DN,displayName:"SpsSortingHeader"});const NN={basic:{label:"Basic Sorting Header",examples:{basic:{react:v.code`
|
|
10929
10929
|
import { SpsSortingHeader, SpsSortingHeaderCell } from "@spscommerce/ds-react";
|
|
10930
10930
|
function DemoComponent() {
|
|
10931
10931
|
const [sort, setSort] = React.useState([{ key: 'id', direction: SortDirection.DESCENDING }]);
|